Technology

Low Latency HLS (LL-HLS): How It Works, Players, FFmpeg and Setup

LL-HLS takes HLS from tens of seconds to about three without giving up what makes HLS useful: plain HTTP, CDN caching and players on every device. This is how it works and where setups usually break.

What low latency HLS is, and why regular HLS is slow

HLS (HTTP Live Streaming) is the format almost every live video on the web ends up in. The server cuts the encoder's stream into segments, lists them in a playlist (the .m3u8 file) and the player downloads them one after another over plain HTTP. That simplicity is why HLS reaches huge audiences through any CDN. It is also why it is slow. If you want the basics of playlists first, our guide on what an M3U8 file is covers them.

The delay comes from the segments. The HLS specification (RFC 8216) tells players not to start closer than three target durations from the end of a live playlist, so with the common 6-second segments a viewer starts at least 18 seconds behind the newest segment, before adding encoding, upload and the time it takes to produce each segment. Our own player goes further on purpose and keeps about 30 seconds of margin, because that buffer absorbs network drops before the viewer notices them.

Low-Latency HLS, LL-HLS for short, is Apple's answer. It was presented in 2019, revised in 2020 and is now part of the draft second edition of the HLS specification that Apple maintains. It brings the delay down to a few seconds (about 3 on XtreamCast) while keeping what makes HLS useful: it still runs over HTTP, CDNs can still cache it, and a player that does not understand the new tags simply plays the stream as regular HLS.

How LL-HLS works: five additions to the playlist

LL-HLS adds a handful of tags and rules. You will never write them by hand, but knowing them turns debugging from guesswork into reading a text file.

1. Partial segments

Instead of waiting for a full segment, the server publishes small parts of it as they are encoded, usually between 200 ms and 1 second each, listed with EXT-X-PART. Full segments still exist for players that need them; parts are what let a low latency player stay close to the live edge.

#EXT-X-PART:DURATION=0.33334,URI="seg271.part0.mp4",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.33334,URI="seg271.part1.mp4"
#EXT-X-PART:DURATION=0.33334,URI="seg271.part2.mp4"

INDEPENDENT=YES marks the parts that start with a keyframe, where a player can begin decoding.

2. Preload hints

EXT-X-PRELOAD-HINT announces the next part before it exists. The player requests it immediately and the server answers the moment the part is ready, which saves a round trip for every part.

#EXT-X-PRELOAD-HINT:TYPE=PART,URI="seg271.part3.mp4"

3. Blocking playlist reload

With regular HLS the player polls the playlist every few seconds and usually arrives too early or too late. With LL-HLS it asks for a specific future version using query parameters (_HLS_msn for the segment number, _HLS_part for the part), and the server holds the request open until that version exists. The server announces support with CAN-BLOCK-RELOAD=YES in EXT-X-SERVER-CONTROL.

4. Delta updates

A low latency player reloads the playlist constantly. When the server sets CAN-SKIP-UNTIL, the player can request a delta playlist (_HLS_skip=YES) in which older segments are replaced by a single EXT-X-SKIP tag, so each reload stays small.

5. Rendition reports

With several qualities, EXT-X-RENDITION-REPORT tells the player where the other renditions are, so switching quality does not mean starting the wait over. A typical server control line puts several of these together:

#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,PART-HOLD-BACK=1.0,CAN-SKIP-UNTIL=12.0

PART-HOLD-BACK is how far from the live edge a low latency player should stay. The specification requires at least twice the part target duration and recommends three times, so with parts of a third of a second a player can sit about one second from the edge. Add encoding, upload and the network, and you land at the usual 2 to 4 seconds.

Low latency HLS players

Player support is no longer the obstacle it was a few years ago:

PlayerLL-HLS supportWhat to watch
Safari and Apple devicesNative since iOS 14 and macOS 11Nothing to configure
hls.jsSince version 1.0lowLatencyMode is on by default; check that your player wrapper does not turn it off
Android (Media3 ExoPlayer)SupportedSet the target live offset to match your goal
Video.jsExperimental in its HLS engineTest it before you rely on it

Chrome and Edge on desktop have also played HLS natively since late 2025 (versions 141 and 142), and Safari always has. Most websites still play through hls.js anyway, because it behaves the same in every browser and exposes the low latency controls. A minimal setup looks like this:

const hls = new Hls({ lowLatencyMode: true });
hls.loadSource('https://example.com/live/playlist.m3u8');
hls.attachMedia(document.querySelector('video'));

To check whether a stream really is LL-HLS, open the playlist URL in a browser or with curl and look for EXT-X-PART and EXT-X-SERVER-CONTROL. No parts in the playlist means no low latency, whatever the player does.

Low latency HLS with FFmpeg

FFmpeg is excellent for encoding and pushing a live stream, but its HLS muxer does not produce Apple's LL-HLS: it writes regular segments and playlists, without parts, preload hints or blocking reloads. Its DASH muxer has an lhls option, but that implements an older community proposal (LHLS, built on EXT-X-PREFETCH tags), not Apple's LL-HLS.

The practical setup is to let FFmpeg encode and send RTMP or SRT to a server that packages LL-HLS. A command tuned for that, for a 30 fps source:

ffmpeg -re -i input.mp4 \
  -c:v libx264 -preset veryfast -tune zerolatency \
  -g 60 -keyint_min 60 -sc_threshold 0 \
  -b:v 4500k -maxrate 4500k -bufsize 9000k \
  -c:a aac -b:a 128k -ar 48000 \
  -f flv rtmp://your-server/live/your-stream-key

-g 60 at 30 fps puts a keyframe every 2 seconds, and -sc_threshold 0 stops x264 from adding extra keyframes on scene changes, which keeps segments aligned. For SRT, switch the output to -f mpegts and an srt:// address. The -re flag is only there because this example reads a file; drop it with a live source.

Servers that package LL-HLS: MediaMTX, Wowza and nginx

Packaging happens on the server, so that is where your choice matters.

MediaMTX

The open-source server most people try first. It takes RTMP, SRT and other inputs, and its HLS output uses the low latency variant by default. The relevant lines in mediamtx.yml:

hlsVariant: lowLatency
hlsSegmentDuration: 1s
hlsPartDuration: 200ms

Put it behind HTTPS for production, and decide who will maintain it once it carries real events.

Wowza Streaming Engine

It supports Apple LL-HLS through its configuration, on a server you install, tune and keep updated yourself. If you run Wowza and are tired of maintaining it, we compare the options on our Wowza alternative page.

nginx

The classic nginx-rtmp-module only produces regular HLS. nginx is very good as a cache or reverse proxy in front of an LL-HLS origin, but the origin itself has to answer blocking playlist requests, which a static file server cannot do.

Managed platforms

The provider runs the packaging for you. On XtreamCast, standard delivery is HLS and LL-HLS is a per-channel add-on at USD 20/month on paid video plans, with a delay of about 3 seconds. Our team switches it on for your channel and you do not change anything in your encoder.

CDN rules that keep LL-HLS low

Most broken LL-HLS deployments we have looked at were fine at the origin and wrong at the CDN. The rules are not the ones people expect:

  • Parts and segments can be cached. Once published, a part never changes, so caching it adds no delay. What must never be cached is an error: if the CDN stores a 404 for a part that a preload hint requested a moment too early, players stall.
  • Playlists need care. Blocking requests carry query parameters (_HLS_msn, _HLS_part, _HLS_skip). The CDN has to include the query string in the cache key, or it will hand the same old playlist to every request. A playlist requested without those parameters should only be cached very briefly.
  • Long requests have to survive. The origin holds blocking requests open until new content exists. A CDN or proxy with an aggressive timeout cuts them.
  • CORS on everything. If the player lives on another domain, every playlist and part needs the right Access-Control-Allow-Origin header. When it is missing, the browser blocks the requests and playback stalls or fails.
  • HTTP/2. A low latency player makes many small requests, and HTTP/2 lets them share one connection instead of opening new ones.

Low latency HLS vs WebRTC

This is the question we get most often once someone discovers LL-HLS. The short version: LL-HLS when you have an audience, WebRTC when you have a conversation.

AspectLL-HLSWebRTC playback
DelayAbout 3 secondsUp to 0.3 seconds on XtreamCast, never guaranteed
TransportHTTP over TCPRTP over UDP
Audience sizeScales like HLS, through CDNsOne connection per viewer: groups, not mass audiences
Several qualitiesPossible, as with any HLSNot on XtreamCast: one quality for everyone
Best forLive chat, Q&A, sportsAuctions, classes, interactive groups

On XtreamCast there is no automatic fallback between them: a channel that uses WebRTC playback for a bidding room keeps its HLS output for everyone else. We go into the details in our guide to WebRTC streaming for interactive video.

Common mistakes when setting up LL-HLS

Keyframes too far apart

Parts do not each need a keyframe; only the ones marked INDEPENDENT=YES start with one. But segments start on keyframes, and a player that joins or switches quality has to begin at an independent part. With keyframes every 4 seconds or more, startup and quality changes suffer. Keep the interval at 1 to 2 seconds.

A player that ignores parts

A player without LL-HLS support skips EXT-X-PART and plays full segments at normal latency. The stream works, so nobody notices until someone measures.

A big player buffer

If the player is configured to keep 10 seconds of buffer just in case, the delay will not drop below 10 seconds, whatever the server does.

Measuring at the origin instead of at the viewer

The delay that matters is the one viewers see on their own networks. Our guide on how to measure stream latency shows how to measure it from camera to screen.

LL-HLS on XtreamCast

Every XtreamCast channel delivers standard HLS, with the roughly 30-second margin our player keeps on purpose. When viewers need to be closer to live, LL-HLS is the per-channel add-on: about 3 seconds of delay, activated by our team, while your encoder keeps sending H.264 video and AAC audio over RTMP or SRT as before. For a real-time conversation instead, WebRTC playback goes up to 0.3 seconds for USD 20/month. You can compare all three on the low-latency streaming page.

If you are still deciding whether you need low latency at all, start with our guide on how to reduce stream delay: sometimes the fix is a setting, not a new protocol.

LL-HLS without running the packaging yourself

Standard HLS on every channel, LL-HLS at about 3 seconds as a per-channel add-on that our team activates, and WebRTC playback for interactive groups.