PipeWire and fixing the Linux Video Capture stack
&gt; In fact in the first few releases of Fedora Workstation where we shipped PipeWire we solely enabled it as a tool to handle screen sharing for Wayland and Flatpaks.<p>PipeWire is truly a godsend for screen recording on Wayland, not very long ago, if at all, every desktop environment &#x2F; compositor had their own home brewed protocol and developing anything related to screen recording on Wayland was a massive pain [1]. I still can not fathom how Wayland could even exist this long without any decent way to do screen recording and I also do not get why there is no official protocol or at least extension for this!<p>But thanks to PipeWire some first projects finally support screen capturing on Wayland. Both Firefox (via webrtc) [2] and OBS [3] directly interface with PipeWire. For my personal project Weylus [4] I opted for the gstreamer plugin as at the time the documentation for PipeWire itself was very lacking and I could not figure out how to get it to work. Fortunately gstreamer is better documented and it turned out to be rather easy to use.
But it shows that all this is still in an early stage as I hit quite some bugs, probably the most egregious (maybe even somewhat funny) one is KDE&#x27;s kwin_wayland crashing if you hover the cursor over any window close button while screen recording [5], sadly it doesn&#x27;t seem to be fixed yet. For some more bugs I&#x27;ve hit, see [6].<p>Something I am a little worried about is that flatpak with their xdg-desktop-portal [7] is now responsible for the de facto standard how screen recording is negotiated on Wayland. I fear that this means if flatpak does not need a feature, even if it makes sense in another context, it probably won&#x27;t ever be implemented. For example something I require for my project are proper window names and their position as well as size, but apparently this is nothing essential for flatpak and the issues I have opened have largely been ignored [8]. This is by no means meant as an accusation, just an observations that things are not all good.<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;H-M-H&#x2F;Weylus&#x2F;issues&#x2F;3#issuecomment-652670480" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;H-M-H&#x2F;Weylus&#x2F;issues&#x2F;3#issuecomment-652670...</a><p>[2]: <a href="https:&#x2F;&#x2F;webrtc.googlesource.com&#x2F;src&#x2F;+&#x2F;refs&#x2F;heads&#x2F;main&#x2F;modules&#x2F;desktop_capture&#x2F;linux&#x2F;base_capturer_pipewire.cc" rel="nofollow">https:&#x2F;&#x2F;webrtc.googlesource.com&#x2F;src&#x2F;+&#x2F;refs&#x2F;heads&#x2F;main&#x2F;module...</a><p>[3]: <a href="https:&#x2F;&#x2F;github.com&#x2F;obsproject&#x2F;obs-studio&#x2F;blob&#x2F;master&#x2F;plugins&#x2F;linux-capture&#x2F;pipewire.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;obsproject&#x2F;obs-studio&#x2F;blob&#x2F;master&#x2F;plugins...</a><p>[4]: <a href="https:&#x2F;&#x2F;github.com&#x2F;H-M-H&#x2F;Weylus" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;H-M-H&#x2F;Weylus</a><p>[5]: <a href="https:&#x2F;&#x2F;bugs.kde.org&#x2F;show_bug.cgi?id=435042" rel="nofollow">https:&#x2F;&#x2F;bugs.kde.org&#x2F;show_bug.cgi?id=435042</a><p>[6]: <a href="https:&#x2F;&#x2F;github.com&#x2F;H-M-H&#x2F;Weylus&#x2F;issues&#x2F;3#issuecomment-808940593" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;H-M-H&#x2F;Weylus&#x2F;issues&#x2F;3#issuecomment-808940...</a><p>[7]: <a href="https:&#x2F;&#x2F;github.com&#x2F;flatpak&#x2F;xdg-desktop-portal" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;flatpak&#x2F;xdg-desktop-portal</a><p>[8]: <a href="https:&#x2F;&#x2F;github.com&#x2F;flatpak&#x2F;xdg-desktop-portal&#x2F;issues&#x2F;created_by&#x2F;H-M-H" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;flatpak&#x2F;xdg-desktop-portal&#x2F;issues&#x2F;created...</a>