GNOME Network Displays for Miracast Desktop Streaming
GNOME Network Displays is an open-source tool designed to wirelessly stream a Linux desktop session to external monitors, smart TVs, and streaming dongles. By acting as a Miracast source, the application discovers compatible wireless receivers, negotiates a peer-to-peer connection, and continuously encodes and transmits the display and audio output in real time. This article explains the technical role and core functionality of GNOME Network Displays in facilitating Miracast screencasting on modern Linux systems.
Discovery and Wi-Fi Direct Establishment
The primary role of GNOME Network Displays begins at the network
layer. Unlike protocols that rely entirely on an existing local area
network, standard Miracast requires a peer-to-peer connection via Wi-Fi
Direct (P2P). GNOME Network Displays interfaces with the system's
network stack—primarily through NetworkManager and
wpa_supplicant—to scan for Wi-Fi P2P-capable sink devices.
Once a user selects a target display, the software initiates the
handshake, configures the temporary direct wireless link, and
establishes the transport layer without requiring an intermediate
router.
Desktop Session Capture
Once a network link is established, GNOME Network Displays must
capture the visual output of the operating system. On modern Linux
installations running the Wayland display server, applications cannot
capture screen contents directly due to security sandboxing. GNOME
Network Displays solves this by leveraging the desktop portal system
(xdg-desktop-portal) and PipeWire. PipeWire captures the
screen buffer directly from the compositor (such as Mutter in GNOME)
with minimal latency and routes the raw multimedia stream to the
streaming pipeline. Depending on compositor support, the application can
either mirror an active display or create a virtual monitor to serve as
an extended desktop workspace.
Real-Time Multimedia Encoding
Miracast standards dictate specific audio and video formats, typically requiring H.264 video compression alongside AAC or LPCM audio multiplexed into an MPEG-TS container. GNOME Network Displays utilizes the GStreamer multimedia framework to assemble an encoding pipeline on the fly. It converts the raw video and audio frames provided by PipeWire into the compliant Miracast format. Where available, the application utilizes hardware acceleration (such as VA-API on Intel and AMD or NVENC on NVIDIA) to minimize CPU usage, reduce battery drain, and keep streaming latency low enough for interactive use.
Session Management via RTSP
After encoding, the application manages the streaming lifecycle using the Real-Time Streaming Protocol (RTSP). GNOME Network Displays acts as an RTSP control client, communicating with the sink device to negotiate stream parameters such as resolution, frame rate, and audio codecs. Once negotiated, it encapsulates the MPEG-TS stream into the Real-time Transport Protocol (RTP) over UDP and begins transmission. Throughout the session, the application monitors connection stability and handles session termination cleanly, restoring local display configurations when the wireless connection is closed.