OnAirPlayout.com

24/7 Cloud Master Control Broadcast Playout & Live TV Graphics Engine

LATENCY OPTIMIZATION • Streaming & CDN • 8 min read

Low-Latency HLS (LL-HLS) vs. Standard HLS: Tuning Segment Duration, GOP Length, and Keyframe Intervals

Reducing glass-to-glass live television delay from 18 seconds down to 3–5 seconds without sacrificing playback stability.

By OnAirPlayout Engineering (Founder & Lead Broadcast Architect) • OnAirPlayout Broadcast Suite

Key Engineering Takeaways

  • Standard HLS historically suffered from 15–30 seconds of latency due to 6-second segments and a 3-segment player buffer requirement.
  • Reducing encoder GOP (keyframe interval) to 1–2 seconds and segment duration to 2 seconds cuts latency to 4–6 seconds while remaining 100% CDN-cacheable.
  • Tuning hls.js liveSyncDurationCount in the web player keeps viewers locked to the live edge.

1. Where Does Latency Come From in Live HTTP Streaming?

Every HTTP Live Streaming (HLS) pipeline introduces delay at three stages: encoder GOP accumulation, packager segment creation, and client player buffering. Because an HLS segment can only begin on an IDR keyframe, a 6-second segment duration forces the packager to wait 6 full seconds before publishing a single file—and a player buffering 3 segments waits 18 seconds before rendering the first frame.

2. The 2-Second Sweet Spot for Global CDN Compatibility

In OnAir Playout’s streaming architecture, engineered by the OnAirPlayout Engineering Team, we configure a locked 2-second IDR keyframe interval (-g 120 at 60fps) paired with 2-second HLS segments. This reduces end-to-end latency to ~4–5 seconds while allowing Global Broadcast CDN to cache complete segments with zero origin strain.

3. When to Use WebRTC WHEP vs. Edge-Cached HLS

Use WebRTC (sub-500ms latency) for internal studio confidence monitoring and return feeds for field reporters; use Edge-Cached HLS (4–5s latency) for public distribution to thousands of concurrent viewers.