Flatpak saved my live stream
I hope that the effort required for switching from X11 to Wayland will be worth it. I just spent my whole Sunday rebuilding my livestreaming setup.
A little bit of background: For sending my camera and desktop video to Twitch and YouTube, I use the popular Open Broadcaster Software. Since I’m running an atomic Linux distribution, I had to find a way to install OBS differently than as a traditional distro package. For the last year or so, I’ve been using Ublue’s [OBS Studio Portable for Linux] with great success. It’s a Distrobox container image which comes with OBS preinstalled on an Ubuntu base system. Its main advantages are that the image gets updated regularly and includes an amazingly long list of commonly used OBS plugins. Thanks to the tight host integration of Distrobox containers, even the GPU-based video encoding worked nicely, allowing me to stream at minimal CPU load.
I got my Linux workstation with an Nvidia GTX 1080, and this year, I upgraded to an RTX 3060. Its performance is more than enough for my needs, which are mostly video streaming and editing, and a little bit of gaming on the side. Because of Nvidia’s spotty Wayland support, I kept using X11 as my graphics subsystem. Recent driver updates did remediate most of the Wayland issues, but every time I tried switching, I found that OBS fell back to encoding on the CPU instead of the GPU, pegging all 32 logical cores of my Ryzen 9 to 100% load. Back to Xorg it was.
This option went away when Bluefin switched to Fedora 41 a few days ago. Fedora 41 dropped X11 support, and even layering gnome-session-x11
on top didn’t bring it back. While the Wayland-based desktop itself was a pleasant experience despite my choice of GPU, the OBS Distrobox was broken again.
I could have held out on using the latest Bluefin release for a while by booting into the last available F40 version, but it was clear that I had to make the jump eventually.
Just when I was about to order a Radeon GPU, I remembered that there was an alternative way of installing OBS, namely right on the host system from a Flatpak. I jumped into the Gnome Software Centre, installed the OBS flatpak, and voilĂ : OBS was again running at less than 5% CPU load. Next week’s live streams were saved! This success came at a price, though.
The reason I eventually switched to the full-fat Distrobox OBS about a year ago was that the only reliable way of installing plugins for Flatpak OBS is also via Flatpak, and at the time, there were only very few plugins available on Flathub. The situation has improved only a little since then, but at least the most common plugins are now there. I rebuilt my stream setup from backups I pulled from my Distrobox OBS, and was able to restore 95% of the production features. I only lost a few cosmetic effects, for which I’m missing the necessary plugins.
And there’s hope; we’re talking about Open Source Software, after all. Installing OBS from a Flatpak seems to be becoming more common nowadays, which does increase the need for Flatpak-based plugin releases. If I can find the time, I’d like to explore myself how complex it is to build these releases. Maybe I can scratch my own itch this way and at the same time contribute to the community.
See you soon on one of my live streams!