Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nestrilabs/nestri/llms.txt
Use this file to discover all available pages before exploring further.
nestri-server is a Rust binary that creates a full GStreamer media pipeline, captures your Wayland display, encodes video with a hardware GPU encoder, mixes in system audio, and delivers both streams to a browser over WebRTC. The WebRTC signalling layer is handled by a custom libp2p signaller — NestriSignaller — which connects to a Nestri relay node to exchange session descriptions without a central TURN server.
GStreamer pipeline
The pipeline has two parallel branches — video and audio — that both feed into a singlewebrtcsink element. This sink uses Google’s public STUN server (stun.l.google.com:19302) and the NestriSignaller for WebRTC negotiation. Congestion control and retransmission are disabled to minimise latency.
Video branch
waylanddisplaysrc is given the DRI render node path of the selected GPU (render-node property). When --software-render is set, the render node is explicitly set to "software" instead.
The vapostproc element is inserted only for VAAPI and QSV encoders in zero-copy mode. It converts DMABuf frames to video/x-raw(memory:VAMemory) with the correct pixel format (NV12 for 8-bit, P010_10LE for 10-bit). NVENC zero-copy uses video/x-raw(memory:CUDAMemory) directly from the source, bypassing vapostproc.
Audio branch
frame-size is set to 10 ms for the lowest achievable audio latency.
Supported GPU vendors and encoder APIs
nestri-server detects GPUs by scanning /sys/class/drm and reading PCI vendor IDs. Three vendor IDs are recognised:
| Vendor | PCI ID | Encoder API | GStreamer element prefix |
|---|---|---|---|
| NVIDIA | 0x10de | NVENC | nv…enc |
| AMD | 0x1002 | VAAPI | va…enc |
| Intel | 0x8086 | VAAPI / QuickSync (QSV) | va…enc / qsv…enc |
klass metadata contains encoder/video. It filters to the subset compatible with the detected GPUs, scores each candidate by API priority (NVENC = QSV > VAAPI > software), and picks the highest-scoring encoder that successfully reaches PLAYING state in a brief probe pipeline.
Supported video codecs
| Codec | Flag value | Notes |
|---|---|---|
| H.264 / AVC | h264 | Default. Widest browser support. 8-bit colour only. |
| H.265 / HEVC | h265 | Better compression at equivalent bitrate. Browser support varies. 10-bit with zero-copy. |
| AV1 | av1 | Highest efficiency. Chromium-based browsers. 10-bit with zero-copy. |
Audio capture methods
| Method | GStreamer element | Flag value |
|---|---|---|
| PipeWire | pipewiresrc | pipewire (default) |
| PulseAudio | pulsesrc | pulseaudio |
| ALSA | alsasrc | alsa |
Explore further
GPU selection and configuration
Select a specific GPU by vendor, name, index, or device path. Covers Docker GPU passthrough and the zero-copy DMABuf/CUDA pipeline.
Video and audio encoding options
Configure codecs, bitrate, rate control mode, latency preset, keyframe distance, and bit depth for video and audio.
Complete configuration reference
Full reference for every CLI flag and environment variable accepted by nestri-server, organised by section.
Runner containers
Run nestri-server inside a pre-built Steam, Heroic, or Minecraft container with GPU passthrough already configured.