Syntax
Attributes
| Attribute | Value | Required | What it means |
|---|---|---|---|
| URI | URI of the file holding the init section | Yes | Where to get the Media Initialization Section. A relative URI is resolved against the address of the playlist. |
| BYTERANGE | "length@offset" in bytes, such as "720@0" Default: The whole resource | No | The part of the file at URI that holds the initialization section, in the same format as EXT-X-BYTERANGE. It should contain only the initialization section. The RFC 8216bis draft makes the @offset part required. |
What EXT-X-MAP means
EXT-X-MAP tells the player where to find the Media Initialization Section: the header data it needs before it can read the segments. For fragmented MP4 (fMP4) and CMAF segments, this is usually a small file, often named init.mp4, that holds the ftyp and moov boxes describing the tracks and codecs. The segments then hold only the media.
The tag applies to every segment after it until the next EXT-X-MAP or the end of the playlist. Its attributes are URI, which is required, and BYTERANGE, which is optional.
Where it goes
Media playlists only, before the first segment it applies to. Most fMP4 playlists have one EXT-X-MAP near the top. A new one is needed when the initialization data changes, for example after a discontinuity where the codec or resolution changes.
Rules from RFC 8216
- Every fMP4 segment must have an
EXT-X-MAPapplied to it. - MPEG-2 TS segments do not need one, because each segment can carry its own initialization tables (the PAT and PMT). A TS segment must either contain those tables or have an
EXT-X-MAPapplied. - WebVTT subtitle segments must either start with a WebVTT header or have an
EXT-X-MAPapplied. - The tag requires
EXT-X-VERSION6 or higher in a normal playlist, and 5 or higher in a playlist withEXT-X-I-FRAMES-ONLY. - If the initialization section is encrypted with
AES-128, theEXT-X-KEYthat applies to it must include anIV. - In I-frame-only playlists, it should be supplied when the first I-frame does not directly follow the initialization section at the start of its file.
Common mistakes
- Version too low. A playlist with fMP4 segments and a version below 6 breaks the rules. Lenient players may still play it; strict ones refuse.
- Saving segments without the init section. An fMP4 segment on its own cannot be played. Joining segments into one file only works if the initialization section comes first.
- A
BYTERANGEwithout an offset. RFC 8216 refers to theEXT-X-BYTERANGEformat, where the offset is optional, but the RFC 8216bis draft makes it required here. Writing"length@offset"every time works under both.
How players treat it
Players download the initialization section once, pass it to the decoder, and reuse it for every segment until the map changes. In browsers, Media Source Extensions need it appended before any media segment.
Example
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:4
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="init.mp4"
#EXTINF:4.000,
segment0.m4s
#EXTINF:4.000,
segment1.m4s
#EXTINF:2.500,
segment2.m4s
#EXT-X-ENDLISTAll three fMP4 segments share the initialization section in init.mp4, which a player loads once before the first segment.
How m3u8.cloud handles it
Supported. m3u8.cloud handles fMP4 and CMAF pieces described by EXT-X-MAP and downloads the initialization section once, not once per piece.
If you save the original pieces of an fMP4 stream, the result is a fragmented .mp4 file rather than a .ts file.
Related tags
Check the tags in any playlist
Open the m3u8 inspector