Adaptive Bitrate selection is what decides whether you watch your favorite show in 480p or 1080p tonight. The algorithm watches your buffer fill rate and network throughput, then picks the next segment's bitrate. Pick wrong and the viewer either sees pixelation or a spinner.

Advertisement

Throughput-based (the naive one)

Measure download time of last N segments → estimate available bandwidth → pick highest bitrate ≤ estimate × safety_factor (~0.85). Simple, responds fast, but oscillates when bandwidth is noisy.

Buffer-based (BOLA)

Pick bitrate as a function of buffer occupancy, not bandwidth. When buffer is full (e.g., 30s ahead), go high quality. When buffer is low (5s ahead), drop to a lower bitrate to avoid stall. Smoother, but conservatively under-uses bandwidth on uncongested links.

Advertisement

Hybrid (Pensieve, MPC)

Combine throughput estimate + buffer state + a few seconds of look-ahead. MPC (Model Predictive Control) solves a small optimization at each segment boundary minimizing stall probability + maximizing bitrate. Pensieve uses reinforcement learning to learn the policy from traces. These are what production CDNs (Netflix, YouTube) actually use.

Key metrics to track

QoE: rebuffer ratio (% of session in spinner), startup delay (seconds to first frame), average bitrate, bitrate switches per minute. There is no single "good" number — Netflix research shows users prefer slightly lower average bitrate if it means fewer switches.

Common bugs

Bitrate ladder mismatch — having only 480p and 4K available, ABR thrashes between them. Add 720p+1080p rungs. Cold start explosion — first segment picked too high, viewer waits 10s — always start from a low bitrate. Buffer collapse cascade — one slow segment triggers downshift, which underuses bandwidth, which keeps buffer low forever — use a hysteresis window.

Buffer-based or hybrid ABR. Throughput-only is for prototypes. Always cap startup bitrate.