For the past few months, I’ve been doing live coding sessions on YouTube showing how GNOME development goes. Usually it’s a pair of sessions per week, one in Brazilian Portuguese so that my beloved community can enjoy GNOME in their native language; and one in English, to give other people at least a chance to follow development as well.

We are quite lucky to have OBS Studio available for screencasting and streaming, as it makes our lives a lot easier. It’s really a fantastic application. I learned about it while browsing Flathub, and it’s what actually motivated me to start streaming in the first place. However, I have to switch to X11 in order to use it, since the GNOME screencast plugin never really worked for me.

This is annoying since Mutter supports screencasting for years now, and I really want to showcase the latest and greatest while streaming. We’re still not using the appropriate APIs and methods to screencast, which doesn’t set a high standard on the community.

So I decided to get my hands dirty, bite the bullet, and fix this situation. And so was born the obs-xdg-portal plugin for OBS Studio! The plugin uses the standard ScreenCast portal, which means it should work inside and outside the Flatpak sandbox, in Wayland and X11, and on GNOME and KDE (and perhaps others?).

Selecting a monitor for screencast

Selecting a window for screencast

The screencast in action — working perfectly!

Do notice that OBS Studio itself is not yet compatible with Wayland, as this is a work in progress. In the pictures above, I’m running OBS Studio under XWayland, which really shows how powerful the platform is — it’s able to natively screencast on Wayland even on XWayland clients! If I have time, interest, motivation, and energy, perhaps the OBS Studio Wayland branch can be pushed forward.

This plugin is already available in the Flathub version of OBS Studio.