An m3u8 file is a UTF-8 text manifest listing media segments and metadata for an HLS player to consume. Each line is either a comment, a tag starting with #EXT-X-, or a URL pointing to a media segment. Tags carry duration (#EXTINF), discontinuity markers (#EXT-X-DISCONTINUITY), encryption keys (#EXT-X-KEY), partial-segment definitions (#EXT-X-PART), and dozens of other annotations.
There are two kinds of m3u8 in HLS. The multi-variant playlist (sometimes called master) lists available renditions — different bitrates, resolutions, codecs and languages — each referenced by its own URL. The media playlist (one per rendition) lists the actual segments. The player fetches the multi-variant playlist first, picks a starting rendition, and then keeps re-fetching the media playlist (for live) or reads it once (for VOD).
m3u8 evolved from the older M3U format used by audio players (Winamp, iTunes), which is why the file extension and the basic syntax look pedestrian compared to DASH's XML MPD. The simplicity is a feature: an m3u8 can be inspected with cat, generated with printf, and concatenated trivially. Almost every text editor highlights it, every CDN serves it as application/vnd.apple.mpegurl, and every HLS-capable player parses it.
The book · Volume 2 of 7
Video Streaming: A Complete Guide to Video Delivery: From Network Protocols and Transport to Ingest, HLS, and MPEG-DASH
An m3u8 playlist is where many HLS playback bugs start: a wrong tag, a stale live window, or a discontinuity the player misreads. Volume 2 covers HLS in detail, with segment packaging, MPEG-DASH and CMAF, live and VOD workflows and latency budgets, so you can read an m3u8 and know what the player will do with it. Written by Nikolay Sapunov, CEO at Fora Soft.
HLS playback breaking and you suspect something in the m3u8 playlist?
Send us the playlist URL and we will audit its tags, segment timing and live window and return a fix list for your packager. 250+ video products shipped since 2005.