Syntax
What EXT-X-VERSION means
EXT-X-VERSION gives the protocol compatibility version of the playlist: the version of HLS a player must support to handle the playlist, its media and its server correctly. The value is a whole number, and it applies to the entire file.
A playlist that only uses features from version 1 can leave the tag out. As soon as it uses a tag or attribute from a later version, the tag becomes required.
Where it goes
It can appear in master and media playlists, usually right after #EXTM3U. A playlist must not contain more than one.
What each version adds
Section 7 of RFC 8216 lists the minimum version for each feature:
| Version | Needed when the playlist uses |
|---|---|
| 2 | The IV attribute of EXT-X-KEY |
| 3 | Decimal (floating-point) EXTINF durations |
| 4 | EXT-X-BYTERANGE or EXT-X-I-FRAMES-ONLY |
| 5 | The KEYFORMAT and KEYFORMATVERSIONS attributes of EXT-X-KEY, or EXT-X-MAP in an I-frame-only playlist |
| 6 | EXT-X-MAP in a playlist without EXT-X-I-FRAMES-ONLY |
| 7 | SERVICE values in the INSTREAM-ID attribute of EXT-X-MEDIA |
Two features were removed along the way: the PROGRAM-ID attribute of EXT-X-STREAM-INF and EXT-X-I-FRAME-STREAM-INF in version 6, and the EXT-X-ALLOW-CACHE tag in version 7. The RFC 8216bis draft continues the list up to version 13 for newer features such as variable substitution.
Rules from RFC 8216
- The tag must be present if the playlist uses anything that is not compatible with version 1.
- A playlist must not contain more than one
EXT-X-VERSIONtag. A player that finds two must refuse the playlist. - Servers should not declare a higher version than the playlist needs.
- A player must not try to play a playlist whose version it does not support.
Common mistakes
- Version too low. Decimal durations with no version tag, or fMP4 segments with
EXT-X-MAPunder version 3, break the rules. Validators flag both. - Two version tags. This can happen when a script joins two playlists. Strict players reject the result.
- Version higher than needed. Older devices that support only lower versions refuse a playlist that claims a version it does not need.
How players treat it
Strict players compare the number with the versions they support and stop if it is higher. Many players, especially in browsers, look at the tags that are actually present and are lenient about a missing or low version. Do not rely on that: set the version to match the features the playlist uses.
Example
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:4
#EXT-X-MAP:URI="init.mp4"
#EXTINF:4.000,
seg0.m4s
#EXTINF:4.000,
seg1.m4s
#EXT-X-ENDLISTVersion 6 is needed here because the playlist uses EXT-X-MAP without EXT-X-I-FRAMES-ONLY; the decimal durations alone would only need version 3.
How m3u8.cloud handles it
m3u8.cloud reads the version and shows it in the m3u8 inspector. It is there for information only and never blocks a download, even when it is missing, too low or higher than needed.
Related tags
Check the tags in any playlist
Open the m3u8 inspector