Imagine playing Cyberpunk 2077 with full Path Tracing at 4K 120Hz HDR on your living room OLED TV, or running modded PC games on your Steam Deck OLED with 8 hours of battery life and whisper-quiet fans—all powered by your high-end desktop GPU sitting in another room.
In 2026, local in-home game streaming is no longer a laggy compromise.
When NVIDIA discontinued its proprietary GameStream protocol, the open-source community rallied behind Sunshine (a cross-platform self-hosted game stream server) paired with Moonlight (the fastest, lowest-latency streaming client in existence).
In this master engineering guide, we walk you through building the ultimate ultra-low latency game streaming pipeline, comparing Moonlight vs. Steam Remote Play, configuring hardware NVENC/AMF encoding and AV1/HEVC decoding, configuring a Virtual Display Driver for headless 4K 120Hz streaming, and eliminating network jitter.
1. The Low-Latency Streaming Pipeline: Where Delay Happens
To achieve sub-8ms streaming, you must understand the five distinct stages of the frame transmission pipeline:
THE 5-STAGE STREAMING LATENCY PIPELINE
- HOST PC (RTX 4090 / RX 7900 XTX):
- Frame Capture (Desktop Duplication API / NVFBC): 0.8 ms
- Hardware Video Encoding (NVENC AV1 / HEVC): 1.8 ms LOCAL HOME NETWORK (Wi-Fi 6E / Wi-Fi 7 / Ethernet):
- Network Packet Transit Time (Gigabit LAN): 1.2 ms CLIENT DEVICE (Steam Deck, TV, Apple Silicon, Tablet):
- Hardware Video Decoding (Client SoC VPU): 1.5 ms
- 5. Display Scanout & Frame Render: 1.6 ms TOTAL END-TO-END CLICK-TO-PHOTON LATENCY: ~6.9 ms!
At under 7ms total latency, your brain perceives zero lag—input feels completely instantaneous, whether you are parrying in Elden Ring or flicking in competitive games.
2. Sunshine + Moonlight vs. Steam Remote Play: Architecture Comparison
Why do power users overwhelmingly prefer Sunshine + Moonlight over Valve's built-in Steam Remote Play?
STREAMING PROTOCOL ARCHITECTURE
- STEAM REMOTE PLAY:
- Captures game window hook -> Encodes at variable bitrate.
- Frequent frame time pacing spikes and visible compression macro- blocks during fast camera pans.
- Struggles with non-Steam launchers (Xbox App, Battle.net, Epic).
- SUNSHINE + MOONLIGHT (Winner!):
- Direct GPU framebuffer capture via Windows Desktop Duplication API.
- Pushes up to 150 Mbps pristine uncompressed-quality bitrates.
- Universal compatibility: launches full desktop, emulators & apps.
- Supports HDR10, 10-bit color, 120Hz/144Hz, and 7.1 surround sound.
3. Test Your Local Network Latency & Jitter
Estimate your local LAN transmission delay and packet pacing using our interactive network tool:
Interactive Calculator
Run exact formula simulations on NexProTools.
4. Video Codec Showdown: AV1 vs. HEVC (H.265) vs. H.264
Choosing the right video compression codec dictates both image sharpness and client decode latency:
| Video Codec | Compression Efficiency | Encoding Latency (Host) | Decoding Latency (Client) | Best Use Case |
|---|---|---|---|---|
| H.264 (AVC) | Baseline (Needs 80+ Mbps) | 1.2 ms (Fastest) | 0.8 ms (Universal) | Older TVs, Firestick, low-end client chips |
| HEVC (H.265) | +40/% sharper than H.264 | 1.6 ms | 1.2 ms | Steam Deck OLED, Apple TV 4K, iPads, ROG Ally |
| AV1 | +55/% efficiency vs H.264 | 2.2 ms | 1.8 ms | RTX 40-series host to AV1-compatible clients |
Pro Recommendation: For 95% of client devices (including the Steam Deck and Apple devices), HEVC (H.265) at 60–90 Mbps bitrate delivers the absolute best balance of pristine 10-bit HDR picture quality and ultra-low decoding latency.
5. Step-by-Step Setup: Installing Sunshine Host on PC
Follow these steps to turn your desktop PC into an enterprise-grade streaming server:
1. Download & Install Sunshine:
- Download the latest official installer from the Sunshine GitHub repository.
- During setup, check Install ViGEmBus (essential for virtual Xbox/PlayStation controller emulation).
- Open
http://localhost:47990in your browser to access the Sunshine Web Configuration UI. - Set up your administrator username and password.
2. Configure Host Encoding Settings:
- Navigate to Configuration > Audio/Video:
- Encoder: NVENC (for NVIDIA) or AMF (for AMD).
- NVENC Preset: P1 (Lowest Latency / High Performance).
- Tune: Ultra Low Latency (ULL).
- Rate Control: CBR (Constant Bitrate).
6. The Virtual Display Driver (IddSampleDriver): Headless 4K 120Hz Streaming
A common problem when streaming is that your desktop monitor might be a 1440p 60Hz screen, while your living room TV is a 4K 120Hz OLED. If you stream your desktop, the stream is restricted to your monitor's physical resolution.
VIRTUAL DISPLAY DRIVER ARCHITECTURE
- PHYSICAL MONITOR: [ Off or Disconnected ]
- VIRTUAL DISPLAY: [ 3840×2160 @ 120Hz HDR Software Display ]
- HOST GPU: Renders game at full 4K 120Hz HDR directly to virtual display buffer -> Encoded via NVENC.
- MOONLIGHT CLIENT: Receives native 4K 120Hz HDR stream on TV!
How to Install the Virtual Display Driver:
- Download IddSampleDriver or Virtual-Display-Driver from GitHub.
- Configure
options.txtto add custom virtual resolutions:3840, 2160, 120(4K 120Hz)2560, 1600, 90(Steam Deck OLED native aspect ratio)1920, 1080, 120(Handheld 1080p standard)
- In Sunshine Web UI under Applications > Desktop, set the prep script to automatically switch primary display to the Virtual Display when Moonlight connects, and switch back when you disconnect.
7. Optimizing Moonlight Client Settings (Steam Deck / TV / iPad)
On your client device (Steam Deck, Apple TV 4K, Android TV, or tablet):
- Open Moonlight Settings:
- Resolution: Match your client screen natively (e.g.
1280×800on Steam Deck,3840×2160on 4K TV). - Frame Rate: Match client refresh rate (90 FPS on Steam Deck OLED, 120 FPS on iPad Pro/TV).
- Video Bitrate:
- 1080p 60Hz: 30 Mbps – 45 Mbps
- 1440p 120Hz: 50 Mbps – 70 Mbps
- 4K 120Hz HDR: 80 Mbps – 120 Mbps
- Video Codec: HEVC (H.265) or AV1.
- Enable HDR (Experimental) if client display supports HDR10.
- Frame Pacing: Balanced or Prefer Lowest Latency.
- Resolution: Match your client screen natively (e.g.
8. Network Optimization: Zero Jitter Wi-Fi & MoCA Setup
Even the fastest GPU will stutter if your Wi-Fi drops packets:
HOME NETWORK BEST PRACTICES
- 1. HOST PC MUST BE WIRED: Always connect your host gaming PC via Cat6 / Cat6a Gigabit Ethernet directly to your router or switch.
- 2. USE 5GHz / 6GHz WI-FI FOR CLIENT: Separate your router bands. Connect client devices to an isolated 5GHz (80MHz channel) or 6GHz (Wi-Fi 6E/7) SSID. Never use 2.4GHz for game streaming!
- 3. DISABLE WI-FI LOCATION SERVICES: On Apple devices and Windows, disable Location Services (Prevents periodic 200ms ping spikes).
9. Frequently Asked Questions (FAQ)
Can I stream over the internet away from home?
Yes! Using Tailscale or ZeroTier (free, encrypted WireGuard-based VPN meshes), you can connect your handheld or laptop to your home PC from anywhere in the world with zero port forwarding.
Does Moonlight pass through rumble / haptics?
Yes. Sunshine and Moonlight support full Xbox controller vibration, PS5 DualSense adaptive triggers (via USB), and gyro motion aiming inputs.
10. Game Streaming Action Checklist
STREAMING ACTION CHECKLIST
- [ ] Step 1: Install Sunshine on Host PC & ViGEmBus driver.
- [ ] Step 2: Configure NVENC/AMF Ultra Low Latency encoder in Sunshine.
- [ ] Step 3: Install Virtual Display Driver for headless 4K/HDR.
- [ ] Step 4: Install Moonlight on client device and pair with PIN.
- [ ] Step 5: Set client bitrate to 60–90 Mbps (HEVC Codec).
- [ ] Step 6: Enjoy pristine 120Hz PC gaming from any screen in house!
