Glossary entry · Protocol
HLS (HTTP Live Streaming)
The dominant adaptive bitrate streaming protocol on the public web. HLS delivers video as small segments listed inside an M3U8 playlist, served over ordinary HTTP.
Definition
HLS, short for HTTP Live Streaming, is an HTTP-based adaptive bitrate streaming protocol. Apple introduced it in 2009 to deliver video to the iPhone over the same infrastructure that already powered the rest of the web. Today HLS is documented in RFC 8216 and a series of follow-up drafts maintained by Apple.
The protocol has three moving parts: a text playlist file with an .m3u8 extension, a stream of small media segment files (originally .ts, increasingly .m4s in modern deployments), and an optional encryption layer that protects each segment individually. Any standard web server can host all three components, which is why HLS spread faster than competing protocols that required dedicated streaming servers.
How HLS works under the hood
An HLS session starts with the player fetching a master playlist. The master playlist is an M3U8 file that lists the available variant streams, each tagged with its resolution and bandwidth. A typical master playlist contains entries for 360p, 720p, and 1080p variants. The player picks an initial variant based on the user's bandwidth estimate.
Each variant points to a media playlist, another M3U8 file that lists the actual segment URLs along with metadata. The structure is intentionally minimal:
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:5.96,
seg-0001.ts
#EXTINF:6.00,
seg-0002.ts
#EXT-X-ENDLIST
The player downloads segments in order, buffers a few seconds ahead, and feeds them into the decoder. Because every segment is an independent HTTP file, ordinary CDN caching applies. Most segments are between two and ten seconds long, which keeps both seek latency and live latency reasonable.
The adaptive bitrate behavior happens silently. The player tracks how fast each segment downloaded and compares the throughput against the bandwidth tags in the master playlist. If conditions degrade, the next segment fetched will be from a lower-bitrate variant. The switch happens at segment boundaries, so no re-encoding or buffer reset is needed.
Segments: .ts versus .m4s
The original HLS spec used MPEG-2 Transport Stream (.ts) segments. That format was chosen because it was already common in digital TV broadcasting. Starting with HLS protocol version 6, Apple added support for fragmented MP4 (.m4s) segments. fMP4 segments share the same container family as DASH segments, which makes it possible to publish a single set of segments that both HLS and DASH MPD manifests can reference. This unified approach is sometimes called CMAF.
HLS vs DASH
HLS and DASH are the two adaptive bitrate streaming protocols you will encounter in practice. Both fragment video into HTTP segments and describe playback through a text manifest. The differences are mostly historical and political.
- Origin: HLS is Apple. DASH is an ISO/IEC standard developed by MPEG.
- Manifest format: HLS uses plain-text M3U8 playlists. DASH uses an XML manifest with the
.mpdextension. See our DASH MPD glossary entry for the full breakdown. - Native browser support: HLS plays natively in Safari. DASH plays natively nowhere on the web and always requires a JavaScript player like dash.js or Shaka Player.
- DRM: HLS uses FairPlay on Apple platforms. DASH ships with Widevine and PlayReady, which is why most premium streaming services use DASH for non-Apple clients.
If you want a more conceptual walkthrough with examples and download recipes, our beginner guide on what M3U8 and HLS streaming are is the longer companion to this definition.
When you encounter HLS in the wild
HLS is everywhere. You see it on Twitch, Vimeo Live, every iOS-friendly course platform, most online news players, and almost every Cloudflare Stream or Bunny.net Stream deployment. The easiest way to spot it is to open DevTools, switch to the Network tab, and filter for m3u8. The first match is almost always the master playlist. If you have ever needed to grab the M3U8 URL of a page that is playing video, we walk through the exact DevTools workflow in our guide on how to find an m3u8 URL.
Once you have the URL, the next question is usually how to save the stream offline. Because the playlist references segments rather than a single file, ordinary right-click "Save as" gives you a useless text file. You need a tool that fetches every segment, optionally decrypts them with the AES-128 key, and muxes them into a single MP4. Our roundup of the best HLS downloader Chrome extensions covers the GUI options. For command-line workflows, the free M3U8 downloader tools roundup covers ffmpeg, yt-dlp, N_m3u8DL-RE and more.
HLS encryption and DRM
HLS supports two security models. The lightweight option is per-segment AES-128 encryption, advertised through the EXT-X-KEY tag in the playlist. The player downloads a 16-byte key file and decrypts each segment with AES-128 in CBC mode. This is the model used by self-hosted setups and most course platforms. See the dedicated AES-128 glossary entry for the full mechanics.
The heavyweight option is full DRM through FairPlay, Widevine, or PlayReady. The key is delivered through a license server that runs in a tamper-resistant environment on the device. Consumer tools cannot bypass DRM, only the device's secure media path can decrypt those streams.