This page covers how the SDK selects video codecs, the resolution presets it supports, the available resolution modes, and the bitrate and quality controls.Documentation Index
Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt
Use this file to discover all available pages before exploring further.
Supported codecs
The SDK supports four video codecs:| Codec | Browser Support | Notes |
|---|---|---|
| H264 | All browsers | Default fallback, widest compatibility |
| VP8 | All browsers | Good compatibility |
| VP9 | Chrome, Edge, Firefox | Better compression than VP8 |
| AV1 | Chrome, Edge | Best compression. Requires Unreal Engine 5.3+ and is not supported on Firefox |
Codec negotiation
The SDK automatically negotiates the best codec:- Detects which codecs the browser supports via
RTCRtpReceiver.getCapabilities('video') - Tries the
primaryCodecyou configured (or dashboard default) - If the primary codec is unavailable or incompatible:
- Tries the
fallBackCodec
- Tries the
- If the fallback is also unavailable:
- Falls back to H264
H264 is the ultimate fallback. If both your primary and fallback codecs are unavailable, the SDK will always fall back to H264 — so every user will get a working stream regardless of browser.
- AV1 requires Unreal Engine version > 5.3. On older versions, it falls back automatically.
- Firefox does not support setting codec preferences via the
setOptionSettingOptionsAPI. The SDK handles this silently.
Resolution presets
The SDK uses predefined resolution presets:| Preset | Dimensions |
|---|---|
"360p (640x360)" | 640 x 360 |
"480p (854x480)" | 854 x 480 |
"720p (1280x720)" | 1280 x 720 |
"1080p (1920x1080)" | 1920 x 1080 |
"1440p (2560x1440)" | 2560 x 1440 |
"4K (3840x2160)" | 3840 x 2160 |
Device-specific resolution
The SDK detects the user’s device and applies the appropriate starting resolution:| Device | Config Parameter | Default |
|---|---|---|
| Desktop | startResolution | "1080p (1920x1080)" |
| Tablet | startResolutionTab | "720p (1280x720)" |
| Mobile | startResolutionMobile | "480p (854x480)" |
Resolution modes
Fixed Resolution Mode
Sends the exact resolution dimensions to UE. The stream always renders at the specified resolution regardless of the browser viewport size.Dynamic Resolution Mode
Adapts the resolution to match the browser viewport while respecting themaxStreamQuality ceiling. When the viewport is smaller than the max quality, the SDK sends viewport dimensions. When larger, it scales down proportionally.
In this mode, the SDK also listens for window resize events and adjusts resolution automatically (with a 200ms debounce).
Crop on Resize Mode
Similar to Dynamic Resolution Mode but preserves the aspect ratio by scaling to fit the viewport with proportional dimensions.Changing resolution at runtime
UseUIControl.handleResMax() to change the maximum resolution during a session:
"WIDTHxHEIGHT".
In Fixed Resolution Mode, this sends a r.SetRes console command to UE. In Dynamic/Crop modes, it recalculates the resolution based on the viewport.
Bitrate control
| Parameter | Type | Default | Description |
|---|---|---|---|
minBitrate | number | 1 | Minimum bitrate in Mbps |
maxBitrate | number | 100 | Maximum bitrate in Mbps |
Quantization parameter (QP)
QP controls video compression quality. Lower values mean better quality but more bandwidth.| Parameter | Type | Default | Description |
|---|---|---|---|
minQP | number | 20 | Minimum QP (1-51, lower = better quality) |
maxQP | number | -1 | Maximum QP (-1 = no limit / auto) |
Next steps
Initialization and configuration
See all configuration parameters in one place.
Input controls
Configure mouse, keyboard, touch, gamepad, and WebXR input.