Using OBS studio on Sway with Pipewire
1
vote
1
answer
1021
views
I am on Debian 12 / SWAY desktop which is WLR based.
****
I first install the *"OBS Studio"* version
29.0
with:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/4
└─> sudo apt install obs-studio
*"OBS Studio"* can now be started with terminal command:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/4
└─> obs
If *"OBS Studio"* is configured to run on *"Xorg"* by default we will not see our display! If this is the case we can still force it to run on *"Wayland"* like this:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/4
└─> env QT_QPA_PLATFORM=wayland obs
Now it is surely using *"Wayland"* but this is still not enough for it to detect the desktop! I tried installing packages:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/0
└─> sudo apt install xdg-desktop-portal xdg-desktop-portal-wlr
> **Attention:**
> *"Sway"* is based on *"WLR"* and therefore we installed xdg-desktop-portal-wlr
*"portal"* implementation for xdg-desktop-portal
. Different *"portal"* implementations exist and should be installed for different desktops. Debian supports *"portals"* for *"KDE"* (xdg-desktop-portal-kde
), *"GTK"* (xdg-desktop-portal-gtk
) or *"Gnome"* (xdg-desktop-portal-gnome
).
I tested and made a conclusion that it does not matter which *"Pipewire session manager"* is used. By default people use pipewire-media-session
but I use wireplumber
which deprecates pipewire-media-session
([link](https://wiki.archlinux.org/title/PipeWire#Session_manager)) .
At this point I get no screens shown in *"OBS Studio"*! But I am able to record my screen and microphone using a simple CLI video recorder like this:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/0
└─> sudo apt install wl-recorder
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/0
└─> pw-jack wf-recorder -a
And this works like a charm...
It is just *"OBS Studio"* that fails to work...
Asked by 71GA
(1296 rep)
Mar 18, 2024, 10:22 PM
Last activity: Mar 29, 2024, 08:11 AM
Last activity: Mar 29, 2024, 08:11 AM