M3U8 Playlist Explained
Master or media, live or VOD, clear or encrypted: the tags that decide whether a stream plays, plus a one-minute routine for checking any playlist before you convert it.
In detail
An M3U8 playlist is the file that makes HLS work. Get it wrong - a missing #EXT-X-ENDLIST, a relative segment address resolved against the wrong base, a variant list with no matching media playlist - and the stream fails in a way that looks like a network problem. This page is the short version of the format: what each tag does, what a correct playlist looks like, and how to check one before blaming the player.
The two playlist types
A master playlist does not contain video. It lists variants, each with a bitrate, often a resolution, and the address of a media playlist:
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5200000,RESOLUTION=1920x1080
1080p/index.m3u8
A player reads that list and picks a variant based on bandwidth, screen size or user choice. Our tools pick the highest bitrate automatically and show every variant in the info panel.
A media playlist contains the actual segments:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:9.98,
seg-0.ts
#EXTINF:9.98,
seg-1.ts
#EXT-X-ENDLIST
The tags that matter in practice
| Tag | What it means |
|---|---|
#EXTM3U |
Required first line. Without it the file is not a playlist at all. |
#EXT-X-TARGETDURATION |
Longest segment, in seconds. Players use it to size buffers. |
#EXTINF |
Duration of the next segment, then the segment address on the following line. |
#EXT-X-MEDIA-SEQUENCE |
Sequence number of the first segment, which lets live players detect a sliding window. |
#EXT-X-KEY |
Encryption: method, key address, optional IV. METHOD=NONE means clear. |
#EXT-X-MAP |
Initialisation segment for fragmented MP4. Without it, .m4s files are unplayable. |
#EXT-X-ENDLIST |
The stream is finished. Missing means it is still live and still growing. |
#EXT-X-DISCONTINUITY |
The next segment does not join the previous one (an ad break, a camera change). |
Live playlists versus VOD playlists
A VOD playlist ends with #EXT-X-ENDLIST and never changes: every segment is already there. A live playlist has no end marker, keeps a sliding window of recent segments and is rewritten every few seconds by the server.
That difference explains a common disappointment: converting a live playlist gives you the part recorded so far, not the whole programme. There is no "rest of the stream" to fetch yet.
How to check a playlist in one minute
- Open the
.m3u8address in a new tab. If you see a web page, a login form or an ad instead of#EXTM3U, the address is not a direct playlist. - Look for
#EXT-X-STREAM-INF. If it is there, the file is a master playlist - open one of the variants it points to. - Count the
#EXTINFlines. That is roughly the number of segments, and the sum of the durations is the length of the recording. - Search for
#EXT-X-KEY. If the method is notNONE, the segments are encrypted and no browser-side tool can finish the job. - Open one segment address in a new tab. If it downloads or plays, the content is public; if it returns 403, the playlist is tied to a session and nothing outside that site will work.
That five-step check takes a minute and predicts the outcome better than any error message.
Building one, or fixing one
Two rules cause most broken playlists: segments must be listed in playback order, and relative addresses are resolved against the playlist's own URL, not the page that embedded it. A playlist served from /hls/720p/index.m3u8 with an entry seg-1.ts means /hls/720p/seg-1.ts.
Ready to use one? The M3U8 player reads master and media playlists and tells you which one you gave it. To keep a copy, the M3U8 to MP4 converter merges the segments into a single MP4.
Try it with your own link
Everything below runs in your browser — the stream link is never sent to us.
Questions people ask
What is the difference between a master and a media playlist?
A master playlist lists qualities and points to a media playlist for each one. A media playlist lists the actual segments. Tools have to resolve one before they can reach the other.
Why is there no #EXT-X-ENDLIST in my playlist?
Because the stream is live. The server keeps rewriting the playlist and dropping old segments, so it never has a defined end.
What does #EXT-X-MAP do?
It points to an initialisation segment that describes the fragmented MP4 stream. If you concatenate the .m4s files without it, the result is a file that opens and shows nothing.
Can I edit a playlist to convert only part of a stream?
Yes - remove the segment lines you do not want and keep the tags consistent. That is a normal way to cut a stream, as long as the segments themselves are public.
Why do relative segment addresses fail?
They are resolved against the playlist URL, not the page you are on. Move the playlist file and every relative address breaks with it.
Questions from other users
Got a stream that refuses to convert? Post the error message here — it usually tells us what the host is blocking.