Overview
Thehost.capture section configures Windows Graphics Capture (WGC) for screen capture, including GPU texture copying, frame queuing, adaptive backoff, and thread priority optimization.
Texture Copy Pool
GPU texture copy operations require pre-allocated D3D11 resources.integer
default:"4"
Number of D3D11 texture copy resources in the pool.Default:
4Higher values allow more parallel copy operations but use more GPU memory.Recommended:4- Standard (default)6-8- High frame rate (120+ FPS)2-3- Memory constrained systems
integer
default:"2"
Number of frame buffers for WGC capture.Default:
2Minimum of 2 required for double-buffering. Higher values add latency.Frame Queue Management
integer
default:"2"
Maximum frames queued for encoding.Default:
2Lower values reduce latency but may cause frame drops if encoder is slow.Recommended:1- Absolute minimum latency (may drop frames)2- Low latency (default)3-4- More stable, slightly higher latency
integer
default:"500"
Time window in milliseconds for frame drop detection.Default:
500 msUsed to detect sustained frame dropping vs. occasional drops.integer
default:"12"
Minimum frame drops within window to trigger warnings.Default:
12Prevents spurious warnings from occasional frame drops.Cursor and Border
boolean
default:"false"
Render cursor into captured frames.Default:
falseWhen disabled, the client renders its own cursor for lower latency.boolean
default:"false"
Require window border for capture.Default:
falseWhen enabled, WGC only captures windows with borders (excludes fullscreen exclusive).Frame Change Detection
boolean
default:"true"
Skip encoding frames identical to previous frame.Default:
trueSaves bandwidth and GPU cycles when screen content is static.integer
default:"166666"
Minimum frame capture interval in 100-nanosecond units.Default:
166666 (16.67 ms = 60 FPS)Controls the maximum capture rate. For 60 FPS: 1000000 / 60 * 10 = 166666Common values:83333- 120 FPS166666- 60 FPS (default)333333- 30 FPS
Adaptive Backoff
Dynamically reduce capture rate when encoder falls behind.boolean
default:"false"
Enable adaptive capture rate backoff.Default:
falseWhen enabled, automatically reduces capture rate if encoder cannot keep up.integer
default:"2000"
Time window for adaptive backoff measurements.Default:
2000 msLonger windows provide more stable adaptation but slower response.integer
default:"8"
Number of EAGAIN (encoder busy) errors to trigger backoff.Default:
8Higher values tolerate more encoder saturation before reducing capture rate.Thread Priority (MMCSS)
Multimedia Class Scheduler Service (MMCSS) provides real-time thread priority for capture.boolean
default:"true"
Enable MMCSS for capture thread.Default:
trueBoosts capture thread priority to reduce jitter and frame timing variance.integer
default:"4"
MMCSS task priority level.Default:
4Range: 1 (lowest) to 8 (highest)Higher values give more CPU priority but may impact other system tasks.Recommended:3-4- Standard priority (default)5-6- High priority (gaming)7-8- Maximum priority (use with caution)
Windows Graphics Capture (WGC)
WGC is the modern Windows 10+ screen capture API. Configuration is primarily done through the parameters above.How WGC Works
- Capture: WGC provides GPU texture from compositor
- Copy: Texture copied to staging resource from
copyPoolSizepool - Queue: Frame queued for encoding (up to
maxQueueDepth) - Encode: FFmpeg/NVENC encodes the frame
- Stream: Encoded frame sent over WebRTC
WGC Requirements
- Windows 10 version 1903 or later
- DirectX 11 compatible GPU
- Target window must be visible (minimized windows cannot be captured)
Performance Optimization
Low Latency Configuration
Minimize every source of latency:High Frame Rate Configuration
For 120+ FPS capture:Stable Configuration
For consistent performance with minimal frame drops:Troubleshooting
Frame Drops
Symptoms: Frequent frame drops, stuttering Solutions:- Increase
copyPoolSizeto 6-8 - Increase
maxQueueDepthto 3-4 - Enable
adaptiveBackoff - Reduce target
fpsin video configuration - Use faster NVENC preset (
p1orp2)
High Latency
Symptoms: Delayed response to inputs Solutions:- Reduce
maxQueueDepthto 1-2 - Disable
adaptiveBackoff - Set
cursortofalse - Ensure
mmcss.enableistrue - Increase
mmcss.priorityto 6-7
GPU Memory Issues
Symptoms: Crashes, D3D11 errors Solutions:- Reduce
copyPoolSizeto 2-3 - Reduce
framePoolBuffersto 2 - Lower capture resolution
- Check GPU memory usage with Task Manager
CPU Usage
Symptoms: High CPU usage in capture thread Solutions:- Enable
skipUnchanged - Use hardware encoding (NVENC/QSV/AMF)
- Increase
minUpdateInterval100nsto reduce frame rate - Disable
gpuTimingif enabled
Example: Gaming Streaming Profile
- 120 FPS capture capability
- Low latency (2 frame queue depth)
- High thread priority
- Efficient bandwidth usage (skip unchanged frames)
- Sufficient copy pool for smooth operation