Skip to main content

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
This is the fundamental building block for all quality configurations in LCK.

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/QHD
  • 3840×2160 — 4K/UHD

Bitrate

Controls video quality and file size. Higher = better quality, larger files.
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 content
  • 60 — Smooth motion, gaming, action
  • 120 — High-speed capture (requires powerful hardware)

Audio Bitrate

Audio quality in bits per second:
  • 128000 (128 kbps) — Acceptable for voice
  • 192000 (192 kbps) — Good quality, default
  • 256000 (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

Higher settings require more CPU/GPU power. Test on target devices to ensure smooth performance.

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


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
4K requires powerful hardware — Test extensively before shipping