Skip to main content

What Problem Does This Solve?

Video capture needs to know the output dimensions: 1920×1080, 1280×720, etc. This simple struct defines the width and height in pixels. CameraResolutionDescriptor is used inside CameraTrackDescriptor to specify resolution for recording and streaming tracks.

When to Use This

You’ll use this whenever defining:
  • Video output resolution in quality presets
  • Custom camera configurations
  • Resolution-specific settings
It’s a basic building block—you’ll create these frequently but they’re simple.

Quick Example


Common Resolutions


Default Value

If you create a CameraResolutionDescriptor with no parameters, you get a 512×512 square:
This is rarely useful—always specify your target resolution explicitly.

Common Patterns

Standard 16:9 resolutions

Social media-optimized

Performance tiers


Aspect Ratio Considerations

Always match your source content aspect ratio. Recording 4:3 gameplay to 16:9 video will add black bars.
Common aspect ratios:
  • 16:9 — Standard widescreen (1920×1080, 1280×720)
  • 21:9 — Ultrawide (2560×1080)
  • 4:3 — Legacy (1024×768)
  • 1:1 — Square (1080×1080)
  • 9:16 — Vertical mobile (1080×1920)
Calculate aspect ratio: width / height
  • 1920 / 1080 = 1.777… ≈ 16:9
  • 1080 / 1080 = 1.0 = 1:1

Performance Impact

Higher resolutions = more pixels = more processing power required:
Doubling width and height quadruples the pixel count. 4K has 4× the pixels of 1080p, not 2×.

API Reference

Constructor

Parameters

  • width — Horizontal resolution in pixels (default: 512)
  • height — Vertical resolution in pixels (default: 512)

Fields


Best Practices

Match display resolution — Don’t record 4K from a 1080p display
Consider target platform — Mobile users rarely need >1080p
Test performance — Higher resolution = higher CPU/GPU load
Even numbers preferred — Some encoders require width/height divisible by 2 or 8