Engineering April 14, 2026

Why adaptive bitrate streaming is harder than it looks

ABR looks simple on the surface — encode multiple quality levels, let the player pick the right one. The devil, as always, is in the details.


Adaptive bitrate (ABR) streaming powers every major video platform. The basic idea is straightforward: encode your video at multiple bitrates, package it into small segments, and let the player switch quality levels based on the viewer's available bandwidth. When it works, it's invisible — smooth playback at the best possible quality with no buffering. When it doesn't, viewers experience frustrating quality oscillations or stalls.

We've been shipping ABR in production for three years, handling content ranging from low-latency live sports to on-demand feature films. Here's what we've learned.

Segment duration matters more than you think

The conventional wisdom is to use 6-second segments for VOD. But for content with variable scene complexity, 2-second segments let the player react to bandwidth changes much faster, at the cost of higher HTTP request overhead. For live streams with end-to-end latency requirements under 3 seconds, 1-second segments are worth the overhead.

The right answer depends on your use case. For long-form content delivered to viewers on reliable broadband, 6-second segments reduce server load and improve cache efficiency. For short clips or mobile-first content, shorter segments improve perceived quality at the cost of marginally higher origin traffic. We now expose segment duration as a per-asset configuration option rather than a platform-wide default.

Bandwidth estimation is a moving target

The most common ABR algorithm — throughput-based estimation — measures the time it took to download the last segment and uses that to predict available bandwidth for the next one. It sounds reasonable, but it reacts poorly to sudden bandwidth drops, often requiring two or three download cycles before selecting a lower quality rendition.

More sophisticated approaches like BOLA use buffer occupancy as the primary signal, which is more stable under volatile network conditions. Pensieve uses reinforcement learning trained on real network traces. In our own testing, a hybrid approach — buffer-based with a throughput floor to prevent excessive quality drops on fast networks — outperformed pure throughput estimation in 78% of simulated network scenarios.

The edge cases that matter in production

  • Startup quality: The first segment is always fetched at the lowest rendition because the player has no bandwidth estimate yet. For a viewer on fast broadband, this causes a jarring quality jump in the first two seconds. We now issue a short TCP probe request before the first segment fetch to establish an initial bandwidth estimate, reducing the startup quality gap significantly.
  • Mid-roll ad insertion: When a player switches between content and ad segments, the bandwidth estimator often resets, causing the startup quality problem to recur after every ad break. We persist the estimator state across segment boundaries so the player immediately selects an appropriate quality for ad content.
  • Mobile network handoffs: LTE and 5G bandwidth can swing by 10× in under a second when a device moves between cells. Static segment duration handles this poorly. Dynamic segment duration selection — where the encoder produces segments of varying duration based on keyframe placement — combined with shorter probe intervals improves resilience significantly.
  • Codec mismatch at quality boundaries: When a player switches from an H.264 rendition to an AV1 rendition (or vice versa), some players exhibit a brief freeze while the codec decoder initialises. We standardise codec choice per asset at ingest time and only introduce AV1 as an option for players that have demonstrated decode capability.

LightStream handles all of this for you

Our encoder automatically selects optimal segment durations per asset type, and our player SDK ships with a production-tuned hybrid ABR algorithm. You upload; we deliver.

Get started free

← Back to blog