Screencasting over Wi‑Fi on GNOME

On GNOME we usually had no good way of using remote display devices like Chromecast, Miracast or AirPlay. VLC for example does support streaming to Chromecast, but the Miracast implementations were all not integrated well enough to be usable. Also, at least Miracast requires the use of the H264 or H265 codecs, which have been problematic due to licensing requirements.

I have been working on a gnome‑screencast application, which currently has working support for Miracast devices. It requires a current development version of NetworkManager, but should work out of the box otherwise. If you are on Fedora, you can try out gnome‑screencast by using my copr repository.

To stream to a Miracast (revision 1) device, a few things need to happen. First we need to establish a Wi‑Fi Direct connection. We also need to start an RTSP server that the sink can connect to. And finally, once the sink is connected, a GStreamer pipeline is used to fetch the screen content from mutter, encode it and send it to the Miracast sink.

For the encoding, gnome-screencast will make use of the OpenH264 and Frauenhofer FDK ACC codecs that are available on Fedora. If you have better encoders installed, then these may be used automatically.

When available, gnome‑screencast will make use of the Mutter Screencasting API which allows it to grab the screens content on Wayland. The API is still improving in mutter, and in the future it will be possible to add support to stream the cursor separately.

One major piece that was missing for Miracast devices is integrated support for Wi‑Fi Direct (a.k.a. Wi‑Fi P2P) in our platform. While this was supported in the lower parts of the stack (Kernel and wpa_supplicant), we were lacking the required bits in NetworkManager to enable the usage in GNOME. I worked on adding the required support and thanks to Thomas Haller this has now been merged into NetworkManager 1.16.

With all this in place, it is possible to implement proper support for screen-casting using Miracast in GNOME. The below video shows gnome-screencast in action streaming my laptop screen with the Blender short film “Caminandes 3: Llamigos“ playing.

If you have a Miracast compatible device, then please try out the copr repository. You can report issues on github. Also, feel free to comment here or write me a mail with your experiences.

6 thoughts on “Screencasting over Wi‑Fi on GNOME”

  1. Nice, but I have two questions:
    1. Does it only work with Wayland or does it work with X11 too?
    2. Does it “only” work as sender or can it also work as receiver?

  2. This is great!
    – I’m assuming this is leveraging PipeWire?
    – And is ChromeCast/Airplay support also in scope?
    – Any overlap with gnome-remote-desktop?

  3. Can/will this be extended to cover the case of using the wireless display as a 2nd monitor?

  4. First of all, great work! I am facing some issues, though. I have a Sony BRAVIA TV which is Miracast enabled. But, I can’t see it in the “sinks” list. What should I do?

  5. Great news for Miracast support on Gnome. I have been using Miracast on my Ubuntu Touch tablet and always missed this feature in Linux desktop / Gnome. Thank you very much!

  6. hello thanks for your Good work i am using Debian based system (Kali linux) and i try deal with gnome-screencast but any news about how to install it on debian.

Leave a Reply

Your email address will not be published. Required fields are marked *