GlossaryHLS (HTTP Live Streaming)

HLS (HTTP Live Streaming)

HLS (HTTP Live Streaming) is a streaming protocol created by Apple and published as RFC 8216. It delivers video as short media segments over ordinary HTTP, so any web server or CDN can carry it. A text playlist with the .m3u8 extension tells the player which segments exist and in what order. A multivariant playlist lists several versions of the same video at different bitrates, so the player can switch between them as the connection changes. HLS plays natively on Apple devices and through JavaScript players elsewhere.

How does HLS work?

The source video is encoded into a ladder of renditions, each at its own resolution and bitrate. Each rendition is cut into short segments. Apple's authoring guidance targets segments of 6 seconds with a keyframe every 2 seconds, so the player can switch rendition cleanly at segment boundaries.

Each rendition gets a media playlist, an .m3u8 file listing its segments in order. A multivariant playlist sits above them, listing every rendition with its bandwidth, resolution and codecs. The player loads the multivariant playlist first, picks a rendition, loads that media playlist and starts fetching segments over plain HTTP.

For on-demand video the playlists are complete and never change. For live, the media playlist is a sliding window: the encoder adds a segment every few seconds, and the player reloads the playlist to discover it. Segments can be MPEG-TS or fragmented MP4, the format that also makes CMAF possible.

HLS vs. DASH

HLS and DASH solve the same problem in nearly the same way: a manifest that lists renditions, and short segments fetched over HTTP. HLS is Apple's protocol and uses .m3u8 playlists. DASH, short for Dynamic Adaptive Streaming over HTTP, is an ISO standard and uses an XML manifest with the .mpd extension.

The practical difference is device support. iPhones, iPads, Safari and Apple TV play HLS natively and do not play DASH natively. Chrome, Android and many smart TVs play both through players such as hls.js, dash.js, Shaka Player or ExoPlayer.

DRM follows the same lines. FairPlay is Apple's system and is used with HLS. Widevine and PlayReady are used with DASH and with HLS built on fragmented MP4. CMAF, the Common Media Application Format, lets one set of fragmented MP4 segments serve both protocols, so many services publish HLS and DASH manifests that point at the same files.

HLS vs. LL-HLS

Standard HLS live streams run well behind real time. The delay comes from segment length: an encoder must finish a whole segment before it can be listed, and players usually wait for about three segments before starting. With 6 second segments, that alone adds up to well over 10 seconds, before encoding and CDN time.

LL-HLS, short for Low-Latency HLS, is Apple's extension that shrinks this. Each segment is split into partial segments, often well under a second each, which are listed as soon as they exist. The server can hold a playlist request open until the next part is ready, called a blocking playlist reload, and the playlist hints at the next part so the player can request it early.

The result is live latency of a few seconds, close enough for live sport, auctions and live classes where chat and reactions follow the action. LL-HLS stays compatible: older players simply play the full segments.

How does HLS encryption work?

HLS can encrypt segments in two main ways. With AES-128, each whole segment is encrypted, and the playlist carries an EXT-X-KEY tag with the address of the key. The player downloads the key over HTTPS and decrypts each segment before playing it. SAMPLE-AES encrypts parts of the media samples instead, and it is the method FairPlay uses.

The weak point of plain AES-128 is the key address. Anyone who can fetch the playlist can usually fetch the key too, so a stream downloader can save and decrypt the whole video. Putting a short-lived token on the key request helps, but the key still reaches page code in the clear.

DRM closes that gap. With FairPlay on Apple devices, or Widevine and PlayReady on HLS built from fragmented MP4, the key travels inside a license that only the device's DRM module can open, and the page never sees it. Encryption does nothing about a shared link by itself, which is why it is paired with signed playback URLs.

How does FastPix handle HLS?

FastPix delivers on-demand video as HLS and DASH, and live video as LL-HLS. Uploads come in through resumable SDKs or are pulled from cloud storage or any HTTPS URL. Per-title encoding builds a ladder in H.264 and HEVC (H.265) as standard, with AV1 available on request, and packaging happens just in time as CMAF, so one set of segments serves both HLS and DASH. Just-in-time encoding lets playback start before the full encode finishes.

Live streams are ingested over RTMP, RTMPS or SRT and delivered as LL-HLS at 4 to 7 seconds glass-to-glass. With auto_archive, each broadcast becomes an on-demand HLS asset with the same playback ID and policy, and DVR lets viewers return to the live edge. Playback IDs can be public or signed with expiring tokens, with Widevine, FairPlay and PlayReady DRM.

FastPix Player reads those playlists through four platform-native player SDKs: web, Android built on Media3 including Android TV, iOS built on AVPlayer including tvOS and visionOS, and Flutter, plus React Native. You can set rendition order or lock quality to one rung of the multivariant playlist. Storyboard sprite sheets with a WebVTT track drive seek preview thumbnails, and chapters appear on the timeline. On Android, playback begins after 500 ms of buffered media instead of Media3's stock 1000 ms. Any HLS player, such as hls.js, can also play a FastPix playback ID.

Standard encoding is free up to 4K and billed per source minute, not per rendition. Storage is billed per rendition-minute and streaming per minute watched. Live encoding is $0.0324 a minute up to 1080p. The free plan includes 10 videos, 100,000 streaming minutes and 30 live minutes a month, with no card needed.

By the numbers

Watch: How Video Streaming Works | Video Engineering 101