Início / Conhecimento / Ao vivo

Understanding and Reducing HLS Live Latency

Este artigo está disponível em chinês e inglês; a tradução para português está a caminho.

Low latency is the heart of a good live experience. To improve it, you first need to know what the delay is made of.

Where latency comes from

  1. Capture and encoding: camera capture and encoder processing take time.
  2. Segmentation: the encoder must fill a complete segment before publishing, so segment length contributes directly.
  3. Distribution: upload to the CDN, plus CDN caching and refresh.
  4. Player buffer: the buffer kept for jitter resistance is usually the largest share.

End-to-end optimisation

  • Use low-latency encoder settings on the ingest side (short GOP, zero buffering);
  • Shorten segments from 6–10 seconds to 1–2 seconds;
  • Lower the player's buffer target and use LL-HLS incremental loading;
  • Pick CDN nodes close to your audience.
Don't fixate on one stage. The whole chain is like a barrel: the shortest stave decides the final latency. Measure each leg first, then optimise where it counts.
← Windows Media Player vs VLC: The HLS GapHLS Encryption and DRM: The Security Layer in Your Playlist →