What Problem Does This Solve?
When capturing video, you need to specify technical parameters: resolution (1920×1080), bitrate (5 Mbps), framerate (30 fps), and audio bitrate (192 kbps). These settings determine video quality, file size, and performance impact.CameraTrackDescriptor bundles these parameters into a single struct that you pass to quality options and camera configurations.
When to Use CameraTrackDescriptor
You’ll use this whenever configuring:- Quality presets in
QualityOption - Recording vs. streaming settings (different bitrates)
- Custom camera configurations
- Device-specific overrides
Quick Example
Understanding the Parameters
Resolution
The output video dimensions in pixels. Common values:1920×1080— Full HD (1080p)1280×720— HD (720p)2560×1440— 2K/QHD3840×2160— 4K/UHD
Bitrate
Controls video quality and file size. Higher = better quality, larger files.| Bitrate | Use Case |
|---|---|
3 << 20 (3 Mbps) | Low-quality streaming, mobile |
5 << 20 (5 Mbps) | Standard streaming, 1080p30 |
8 << 20 (8 Mbps) | High-quality recording, 1080p60 |
15 << 20 (15 Mbps) | Very high quality, 1440p/4K |
The
<< 20 syntax shifts bits to get megabits. 5 << 20 = 5,242,880 bits/sec ≈ 5 Mbps.Framerate
Frames per second. Common values:30— Standard for most content60— Smooth motion, gaming, action120— High-speed capture (requires powerful hardware)
Audio Bitrate
Audio quality in bits per second:128000(128 kbps) — Acceptable for voice192000(192 kbps) — Good quality, default256000(256 kbps) — High quality music/ambience
Default Values
If you don’t specify parameters, you get these defaults:Common Patterns
High-quality recording
Bandwidth-constrained streaming
4K recording
Mobile-optimized
Bitrate Guidelines by Resolution
| Resolution | 30fps Min | 30fps Recommended | 60fps Recommended |
|---|---|---|---|
| 720p | 2 Mbps | 3-4 Mbps | 5-6 Mbps |
| 1080p | 3 Mbps | 5-8 Mbps | 10-12 Mbps |
| 1440p | 6 Mbps | 10-15 Mbps | 18-25 Mbps |
| 4K | 15 Mbps | 25-35 Mbps | 40-50 Mbps |
API Reference
Constructor
Parameters
resolution— Output resolution (width × height)bitrate— Video bitrate in bits per second (default: 5 Mbps)framerate— Frames per second (default: 30)audioBitrate— Audio bitrate in bits per second (default: 192 kbps)
Fields
| Field | Type | Description |
|---|---|---|
Resolution | CameraResolutionDescriptor | Video output resolution |
Bitrate | uint | Video bitrate in bits per second |
Framerate | uint | Video framerate (fps) |
AudioBitrate | uint | Audio bitrate in bits per second |
Performance Tips
Start conservative — Use 1080p30 at 5 Mbps as a baseline
Profile on device — Desktop performance ≠ mobile performance
Match display framerate — Recording at 60fps from a 30fps game wastes bandwidth
Related
- CameraResolutionDescriptor — Define output resolution
- QualityOption — Use tracks in quality presets
- QualityOptionOverride — Device-specific settings