Streaming & WebRTC
GFN uses WebRTC (and its own native RTC variant) to stream game video and audio from the rig to the client. The streaming stack lives primarily in vendor_beautified.js.
Stream Backends
| Backend | Registry Value | Description |
|---|---|---|
LIBWEBRTC | StreamServerModeOverride=1 | Standard libwebrtc |
NATIVE_RTC | StreamServerModeOverride=2 | NVIDIA's NativeRTC (default for all clients) |
Default for all clients:
{
"StreamServerMode": 2,
"EnableNativeRTCAllClients": true,
"EnableNativeRtcSeparateStreams": 1,
"EnableWebRtcSeparateStreams": 1
}Network Test (Pre-Session)
Before every session, the client runs a network quality test:
// From vendor_beautified.js
NetworkTest: {
startNetworkTest() // Initiate test
stopNetworkTest() // Cancel test
getNetworkTestExceptionTelemetryEvent()
getNetworkTestHttpTelemetryEvent()
}
// User-Agent for network test requests
USER_AGENT: "GFN-PC/1.0 (WebRTC) NetworkTest/0.0.51"Results feed into networkTestSessionId tracked in telemetry.
ICE Connection
WebRTC ICE is used to establish the peer connection:
| Error Code | Name | Description |
|---|---|---|
0x8004000C | NVST_STREAMING_ICE_CONNECTION_FAILED | ICE establishment failed |
0x8004000D | NVST_STREAMING_ICE_CONNECTION_DISCONNECTED | ICE connection lost |
Codec Support
Codec selection is dynamic based on client/server capabilities:
| Codec | Control Flag | Condition |
|---|---|---|
| H.264 | Default | All clients |
| HEVC/H.265 | HevcEnable=1 | TV clients at 1440p/4K, 4K sessions |
| AV1 | Enabled by default | Disabled on half-GPU instances |
4K Encoding
For 4K sessions, two-pass encoding can be overridden per game:
{
"name": "Disable4k2Pass_ForSpecificGames4K60",
"filters": [
{ "key": "sessionRequestData.clientRequestMonitorSettings.framesPerSecond", "value": "60" },
{ "key": "sessionRequestData.appId", "value": "101606111,100838211,..." }
]
}Frame Pacing
Minimum target frame time controls the effective FPS cap:
minTargetFrameTimeUs: 7936 → 1,000,000 / 7936 ≈ 126 FPS maxApplied on both macOS and Windows clients.
Separate Streams
When EnableNativeRtcSeparateStreams=1, video and audio use separate WebRTC tracks:
EnableWebRtcSeparateStreams: libwebrtc pathEnableNativeRtcSeparateStreams: NativeRTC pathDisableNativeRtcSeparateStreams=0: Ensure separate streams not disabled
Surround Sound
Enabled for native Windows/macOS clients ≥ v2.0.52.0:
surroundBrowser: 1 // 7.1 surround audio
separateMicStream: 1 // Separate microphone streamGRC (Game Ready Check)
Enabled for Windows and macOS clients:
{
"name": "EnableGrc_WindowsMacOSX",
"filters": [{ "key": "sessionRequestData.clientPlatformName", "value": "Windows,MacOSX" }]
}Stream Server Configuration
Key registry values managed by GameStream:
| Registry Key | Type | Description |
|---|---|---|
StreamServerMode | REG_SZ | Stream backend mode |
StreamServerModeOverride | REG_SZ | Per-session override |
HdrSupported | REG_DWORD | HDR output enabled |
Enable4k | REG_DWORD | 4K resolution |
Enable1440p | REG_DWORD | 1440p resolution |
Enable7_1ForGFN | REG_DWORD | 7.1 audio |
Allow120FpsModeSet | REG_DWORD | 120 FPS |
DynamicFrlFramePacing | REG_DWORD | Dynamic frame pacing |
EnableStreamerMinidump | REG_DWORD | Crash dump collection |
Av1Disable | REG_DWORD | Disable AV1 encoding |
HevcEnable | REG_DWORD | Enable HEVC |
Bundle Port
{
"general.nativeRtcOnBundlePort": 1
}NativeRTC uses a single bundled port for all media (mux audio+video).
NACK (Retransmission)
Hysteresis for retransmission requests, enabled for native clients:
{
"name": "EnableNackHysteresisLength",
"filters": [{ "key": "clientInfo.clientType", "value": "NATIVE" }],
"settingParameters": [
{ "key": "video[0].nackHysteresisLengthUs", "value": "4000" }
]
}UDS (Uplink Detection Statistics)
Enabled for Windows and macOS native clients:
{
"vqos[0].statsProcessorThread.flags": 255,
"vqos[0].sendEndOfSessionQosTelemetry": 1
}