EXTM3U

Marks a file as an Extended M3U playlist. It must be the first line of every HLS master playlist and media playlist.

Basic tagAny protocol versionIn: Master or media playlistRFC 8216, section 4.3.1.1

Syntax

#EXTM3U

What EXTM3U means

#EXTM3U is the header line of every HLS playlist. It says the file is an Extended M3U playlist. Plain M3U is an old playlist format for music players: a text file with one file path per line. The extended version adds lines that start with #EXT and carry extra information. HLS is built on that format and keeps two of its tags, EXTM3U and EXTINF.

The tag has no value and no attributes. It is the same in master playlists, which list the available qualities, and in media playlists, which list the video segments.

Where it goes

It must be the first line of the file, and it appears once. Nothing may come before it: no blank line, no comment, no spaces. Every other tag follows it.

Rules from RFC 8216

Section 4.3.1.1 makes EXTM3U the required first line of every media playlist and every master playlist. The general file rules in section 4.1 matter here too:

Common mistakes

How players treat it

Players check the first line before anything else. If it is not #EXTM3U, they report a parsing or format error and play nothing. How strictly players check the Content-Type header varies, so a playlist served with the wrong type can work in one player and fail in another. Serving playlists as application/vnd.apple.mpegurl avoids that question.

Example

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXTINF:6.000,
segment0.ts
#EXTINF:6.000,
segment1.ts
#EXT-X-ENDLIST

The #EXTM3U line comes first, before any other tag, in this short on-demand media playlist.

How m3u8.cloud handles it

m3u8.cloud checks the first line before anything else. A file that does not start with #EXTM3U is rejected as "not an HLS playlist".

That usually means the link leads to a web page, an error message or an expired address rather than the playlist itself. See how to find the m3u8 link.

Check the tags in any playlist

Open the m3u8 inspector