snapcrafters / obs-studio

This is a community-supported modified build of OBS Studio.
https://snapcraft.io/obs-studio
117 stars 35 forks source link

[Bug]: Black screen get from Wayland trying to share my screen in KDE plasma #192

Open mcortinas opened 7 months ago

mcortinas commented 7 months ago

What happened?

Snap has refreshed this week and obs-studio can not use wayland in order to read the screensharing. I'm not sure but the input the scene calle Pipewire ScreenSharing or something like that has been dissapeared. Obs-studio receive a balck screen while try to share my screen in a recording session

I tried without lucky to create a symlink but the file-system is in read-only mode .... do you know some workaround???

cd /snap/obs-studio/current/obs-plugins/64bit/ 
ln -s linux-pipewire.so libpipewire-0.3.so.0
ln: failed to create symbolic link 'libpipewire-0.3.so.0': Read-only file system

What should have happened?

When I launch the obs-studio i should share my screen in my recording scene but not, I only see a screen in black

Output of snap info $snap_name

name:      obs-studio
summary:   Free and open source software for live streaming and screen recording
publisher: Snapcrafters✪
store-url: https://snapcraft.io/obs-studio
license:   GPL-2.0
description: |
  OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming
  video content, efficiently.

  **NOTE: This is a community-supported modified build of OBS Studio; please file issues on the
  Snapcrafters GitHub:  https://github.com/snapcrafters/obs-studio/issues**

  **Batteries included**

  The snap of OBS studio comes pre-loaded with some extra features:

    * Supports **nvenc (NVIDIA) and VA-API (AMD & Intel) accelerated video encoding**.
    * **Advanced Scene Switcher** plugin; an automated scene switcher
    * **Browser** plugin; CEF-based OBS Studio browser plugin
    * **Directory Watch Media** plugin; filter you can add to a media source to load the oldest or
    newest file in a directory.
    * **Dynamic Delay** plugin; filter for dynamic delaying a video source.
    * **Freeze Filter** plugin; freeze a source using a filter.
    * **GStreamer** plugins; feed GStreamer launch pipelines into OBS Studio and use GStreamer
    encoder elements.
    * **Move Transition** plugin; move sources to a new position during a scene transition.
    * **NDI** plugin; Network A/V via NewTek's NDI.
    * **RGB Levels** plugin; simple filter to adjust RGB levels.
    * **Source Switcher** plugin; to switch between a list of sources.
    * **StreamFX** plugin; collection modern effects filters and transitions.
    * **Text Pango** plugin; Provides a text source rendered using Pango with multi-language
    support, emoji support, vertical rendering and RTL support.
    * **Transition Matrix** plugin; customize Any -> One or One -> One scene transitions.
    * **Waveform** plugin; audio visualization using fftw.
    * **Websockets** plugin; remote-control OBS Studio through WebSockets.

  **Connecting Interfaces**

  For the best experience, you'll want to connect the following interfaces.

     sudo snap connect obs-studio:alsa
     sudo snap connect obs-studio:audio-record
     sudo snap connect obs-studio:avahi-control
     sudo snap connect obs-studio:camera
     sudo snap connect obs-studio:jack1
     sudo snap connect obs-studio:kernel-module-observe

  **NDI**

  If you want to use the NDI plugin you'll need to connect the Avahi Control interface.

     snap connect obs-studio:avahi-control

  **Virtual Camera**

  Starting with OBS 26.1.0, Virtual Camera support is integrated. Here's how to install and
  configure `v4l2loopback`:

     sudo snap connect obs-studio:kernel-module-observe
     sudo apt -y install v4l2loopback-dkms v4l2loopback-utils
     echo "options v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera'
     exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf
     echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
     sudo modprobe -r v4l2loopback
     sudo modprobe v4l2loopback devices=1 video_nr=13 card_label='OBS Virtual Camera'
     exclusive_caps=1

  **NOTE!** Using `video_nr` greater than 64 will not work.

  **Removable Storage**

  To access content on external storage, connect to the removable-media plug:

     snap connect obs-studio:removable-media

  **3rd Party plugins**

  To install pre-compiled plugins, download and extract the plugin to
  `~/snap/obs-studio/current/.config/obs-studio/plugins/`.

  This is how the Input Overlay plugin looks when correctly installed:

     /home/username/snap/obs-studio/current/.config/obs-studio/plugins/
     └── input-overlay
         ├── bin
         │   └── 64bit
         │       └── input-overlay.so
         └── data
             └── locale
                 ├── de-DE.ini
                 ├── en-US.ini
                 └── ru-RU.ini

  If you want to use the Input Overlay plugin, you'll also need to connect the joystick interface:

     snap connect obs-studio:joystick

  **NOTE: This is a community-supported modified build of OBS Studio; please file issues on the
  Snapcrafters GitHub:  https://github.com/snapcrafters/obs-studio/issues**
commands:
  - obs-studio
snap-id:      6uLU2MJmBURfLNz4rmL4WT2CmtVULE2u
tracking:     latest/candidate
refresh-date: today at 13:36 CET
channels:
  latest/stable:    30.1.0 2024-03-14 (1298) 603MB -
  latest/candidate: 30.1.0 2024-03-13 (1298) 603MB -
  latest/beta:      ↑
  latest/edge:      30.0.0 2023-12-22 (1296) 606MB -
installed:          30.1.0            (1298) 603MB devmode```

Output of snap connections $snap_name

connections obs-studio
Interface                 Plug                                 Slot                            Notes
alsa                      obs-studio:alsa                      -                               -
audio-playback            obs-studio:audio-playback            :audio-playback                 -
audio-record              obs-studio:audio-record              :audio-record                   -
avahi-control             obs-studio:avahi-control             -                               -
browser-support           obs-studio:browser-support           :browser-support                -
camera                    obs-studio:camera                    :camera                         -
content[gnome-42-2204]    obs-studio:gnome-42-2204             gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]     obs-studio:gtk-3-themes              gtk-common-themes:gtk-3-themes  -
content[icon-themes]      obs-studio:icon-themes               gtk-common-themes:icon-themes   -
content[sound-themes]     obs-studio:sound-themes              gtk-common-themes:sound-themes  -
desktop                   obs-studio:desktop                   :desktop                        -
desktop-legacy            obs-studio:desktop-legacy            :desktop-legacy                 -
gsettings                 obs-studio:gsettings                 :gsettings                      -
hardware-observe          obs-studio:hardware-observe          -                               -
home                      obs-studio:home                      :home                           -
jack1                     obs-studio:jack1                     -                               -
joystick                  obs-studio:joystick                  -                               -
kernel-module-observe     obs-studio:kernel-module-observe     -                               -
network                   obs-studio:network                   :network                        -
network-bind              obs-studio:network-bind              :network-bind                   -
opengl                    obs-studio:opengl                    :opengl                         -
password-manager-service  obs-studio:password-manager-service  -                               -
process-control           obs-studio:process-control           -                               -
pulseaudio                obs-studio:pulseaudio                :pulseaudio                     -
raw-usb                   obs-studio:raw-usb                   -                               -
removable-media           obs-studio:removable-media           -                               -
screen-inhibit-control    obs-studio:screen-inhibit-control    :screen-inhibit-control         -
screencast-legacy         obs-studio:screencast-legacy         -                               -
system-observe            obs-studio:system-observe            -                               -
unity7                    obs-studio:unity7                    :unity7                         -
upower-observe            obs-studio:upower-observe            :upower-observe                 -
wayland                   obs-studio:wayland                   :wayland                        -
x11                       obs-studio:x11                       :x11                            -

Output of snap version

version
snap    2.61.2-0.fc39
snapd   2.61.2-0.fc39
series  16
fedora  39
kernel  6.7.9-200.fc39.x86_64

Relevant log output

`sudo dmesg | grep -i denied` is empty

Teminal output of app

I think the error is the library file located inside the snap is this linux-pipewire.so instead of libpipewire-0.3.so.0

snap run obs-studio | grep -i error

qt.core.logging: Ignoring malformed logging rule: '’*.debug=false’'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
error: os_dlopen(../../obs-plugins/64bit/linux-pipewire-audio.so->../../obs-plugins/64bit/linux-pipewire-audio.so): libpipewire-0.3.so.0: cannot open shared object file: No such file or directory

error: os_dlopen(../../obs-plugins/64bit/linux-pipewire-audio.so->../../obs-plugins/64bit/linux-pipewire-audio.so): libpipewire-0.3.so.0: cannot open shared object file: No such file or directory

error: os_dlopen(../../obs-plugins/64bit/linux-pipewire.so->../../obs-plugins/64bit/linux-pipewire.so): libpipewire-0.3.so.0: cannot open shared object file: No such file or directory

error: os_dlopen(../../obs-plugins/64bit/linux-pipewire.so->../../obs-plugins/64bit/linux-pipewire.so): libpipewire-0.3.so.0: cannot open shared object file: No such file or directory

I tried without lucky to create a symlink but the file-system is in read-only mode .... do you know some workaround???

cd /snap/obs-studio/current/obs-plugins/64bit/ 
ln -s linux-pipewire.so libpipewire-0.3.so.0
ln: failed to create symbolic link 'libpipewire-0.3.so.0': Read-only file system
lengau commented 7 months ago

@mcortinas I'm not able to reproduce this on Kubuntu 24.04 with version 30.1.1 (revision 1299) using the "Screen Capture (Pipewire)" plugin, nor do I get similar errors

image

Can you confirm whether it's still an issue with the latest obs-studio? Also do you have any other machines you could test it on?