Even better screencast with GNOME on Wayland

With last week’s release of PipeWire 3, and Mutter’s subsequent adaptation to depend on it, I decided to revive something I have started to work on a few months ago. The results can be found in this merge request.

PipeWire 0.3 brings one very interesting and important feature to the game: it can import DMA-Buf file descriptors, and share it with clients. On the client side, one easy way to make use of this feature is simply by using the pipewiresrc source in GStreamer.

The key aspect of DMA-Buf sharing is that we avoid copying images between GPU and CPU memory. On a 4K monitor, which is what I’m using these days, that means it avoids needlessly copying almost 2GB of pixels every second.

Explaining the intrinsics of DMA-Buf sharing, and how the interactions between Mutter and PipeWire work, is hard! Even though I’ve wrote about complicated topics before, nowadays we have a better venue for this type of article: the Mutter & GNOME Shell development blog. Stay tuned!

For now, I’ve done a quick recording using OBS Studio, and the obs-xdg-portal plugin that I wrote about a few months ago:

This is a Wayland-only feature, and only when sharing monitors. Window sharing may come in the future, but that’s a bit trickier to implement. I personally don’t care about X11 enough to implement it for X11 as well.

Enjoy!

11 thoughts on “Even better screencast with GNOME on Wayland

  1. I notice there is skipping every few seconds which is actually also present in your showcase. Is this something you’ve noticed and are planning to fix?

    Like

  2. It’s nice to see screen sharing moving forward but, sadly, pipewire 3 is not compatible with chromium pipewire support, so it breaks the only precary support for WebRTC we had in Wayland 😦

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s