How it works
An encoder (often FFmpeg, or a hosted service) turns one source video into several renditions, for example 1080p, 720p and 480p, and slices each into segments a few seconds long. Plain-text playlists with the .m3u8 extension list the segments, and a main (multivariant) playlist lists the renditions. The player reads the playlists, then downloads segments one after another, choosing the highest quality the connection can sustain and switching as conditions change.
Because it is just files over HTTP, HLS works with any web server or CDN and caches well. Apple introduced it in 2009, and it is published as RFC 8216. The same approach carries live streams, and Low-Latency HLS brings the delay down to a few seconds. Safari and recent versions of Chrome play it natively; other browsers use a JavaScript player such as hls.js or Video.js, built on Media Source Extensions.
MPEG-DASH is the main open alternative, and DRM systems such as FairPlay and Widevine protect paid content. The hard parts are encoding every upload into several renditions and paying for storage and bandwidth, which is why hosted services such as Mux, Cloudflare Stream and Bunny Stream, or AWS Elemental MediaConvert with a CDN, are common.
HLS streaming pros and cons
Pros
- Adapts quality to each viewer's connection, so playback rarely stalls
- Plain HTTP files, so any CDN can cache and deliver them
- Plays natively on iPhone, iPad, Mac and recent versions of Chrome
- Handles both on-demand and live video
- Starts quickly, without downloading the whole file first
Cons
- Needs an encoding step to produce the renditions and playlists
- Firefox and some other browsers need a JavaScript player
- Live delay is higher than WebRTC, even with Low-Latency HLS
- Several renditions per video add storage and bandwidth costs
When to use HLS streaming
Pick it when
- Videos longer than a short clip, watched on connections of varying speed
- Live streams to many viewers at once
- Courses, films or paid content that may need DRM later
Skip it when
- Short, small clips where a plain MP4 file is simpler
- Calls or interactive streams that need sub-second delay (WebRTC fits better)
HLS streaming pricing
Free
The protocol is free. Hosting costs money: Cloudflare Stream charges about $5 a month per 1,000 minutes stored and $1 per 1,000 minutes watched; Mux has a free plan for up to 10 videos.
Approximate, checked September 2026.What the other tools cost
Related terms
More in Media and documents
Video and audio