Bitrate - themactep/thingino-firmware GitHub Wiki
Video Encoder Bitrate Modes
This page documents common video encoder bitrate and quality control modes: CBR, VBR, Capped VBR, Fixed QP (FixQP), and Capped Quality. Each mode represents a different strategy for controlling compression, quality, and bandwidth usage.
Overview Table
| Mode | Controls | Output Size Predictability | Quality Consistency | Typical Use Cases |
|---|---|---|---|---|
| CBR | Bitrate | Very High | Low–Medium | Live streaming, broadcast, strict bandwidth limits |
| VBR | Quality (indirect) | Low | High | File encoding, VOD, archival |
| Capped VBR | Quality + Max Bitrate | Medium | High | Streaming with bandwidth limits |
| FixQP | Quantizer | Very Low | Very High | Testing, low-latency, analysis |
| Capped Quality | Quality + Bitrate Cap | Medium–High | High | Modern streaming, adaptive delivery |
Constant Bitrate (CBR)
Description
CBR enforces a constant output bitrate over time. The encoder adjusts quality dynamically to ensure the bitrate stays at (or very near) the target.
Pros
- Highly predictable bandwidth usage
- Compatible with legacy decoders and delivery systems
- Ideal for real-time transmission
- Simplifies network planning
Cons
- Quality fluctuates with scene complexity
- Inefficient compression (wastes bits on simple scenes)
- Complex scenes may show blocking or banding
Appropriate Use
- Live streaming (RTMP, SRT, broadcast)
- Satellite, cable, or radio links
- Environments with strict bandwidth ceilings
- Older hardware encoders or platforms
Variable Bitrate (VBR)
Description
VBR allows the encoder to vary bitrate freely based on scene complexity, targeting a desired quality level rather than a fixed bitrate.
Pros
- Better overall visual quality
- More efficient compression
- Allocates bits where they matter most
- Ideal for offline encoding
Cons
- Unpredictable instantaneous and average bitrate
- Potential delivery issues for constrained networks
- File size not precisely known ahead of time
Appropriate Use
- Video-on-demand (VOD)
- Local playback
- Archival and mezzanine files
- Two-pass encoding workflows
Capped VBR
Description
Capped VBR is VBR with an enforced maximum bitrate. The encoder prioritizes quality but will reduce quality if the bitrate ceiling is reached.
Pros
- Better quality than CBR
- Prevents bitrate spikes
- Safer for streaming than pure VBR
- Good balance of efficiency and predictability
Cons
- Still less predictable than CBR
- Quality may degrade during complex scenes
- Requires careful tuning of cap values
Appropriate Use
- Streaming platforms with max bitrate limits
- CDN-friendly uploads
- Cloud transcoding pipelines
- Adaptive bitrate ladder generation
Fixed Quantization Parameter (FixQP)
Description
FixQP locks the quantization parameter (QP) to a fixed value. Bitrate is entirely unconstrained and varies based on content complexity.
Pros
- Extremely consistent visual quality
- Minimal encoder decision overhead
- Useful for benchmarking and debugging
- Very low latency
Cons
- No bitrate control whatsoever
- Can produce extremely large files
- Unsuitable for network delivery
- Poor storage efficiency
Appropriate Use
- Encoder testing and research
- Quality comparison experiments
- Low-latency internal pipelines
- Intermediate analysis encodes
Capped Quality (Quality-Based with Bitrate Cap)
Description
Capped Quality targets a quality metric (CRF, CQ, ICQ, etc.) while enforcing a maximum bitrate. It is conceptually similar to capped VBR but is explicitly quality-driven.
Pros
- Consistent perceived quality
- Prevents excessive bitrate spikes
- Efficient compression
- Widely supported in modern encoders (x264, x265, AV1)
Cons
- Average bitrate still varies
- Requires tuning quality and cap values
- Not as deterministic as CBR
Appropriate Use
- Modern streaming workflows
- Adaptive bitrate streaming (HLS, DASH)
- Cloud and SaaS video platforms
- High-quality VOD delivery
Practical Guidance
Choose CBR if:
- Bandwidth is fixed or guaranteed
- You are doing live or real-time delivery
- Infrastructure expects constant rates
Choose VBR or Capped Quality if:
- You want the best visual quality per bit
- You are encoding files or VOD
- Some bitrate variability is acceptable
Choose Capped VBR if:
- You need quality prioritization with safety limits
- You are targeting CDNs or streaming services
Choose FixQP if:
- You are testing, benchmarking, or analyzing encoders
- Bitrate and file size do not matter
Notes
- Many encoders expose these modes under different names (CRF, CQ, ICQ, QP, VBV, HRD).
- Hardware encoders often approximate these behaviors rather than implementing them strictly.
- Modern workflows increasingly favor quality-based modes with caps over pure CBR.