Home / HLS playlist tags

HLS playlist tag reference

Every line in an m3u8 playlist that starts with #EXT is a tag. Tags beginning with #EXT-X- are HLS-specific; #EXTINF is inherited from the M3U format. Lines beginning with a single # are comments, and any other non-empty line is interpreted as a URI.

Basic playlist tags

TagMeaning
#EXTM3UMust be the first line. Identifies the file as an extended M3U playlist.
#EXT-X-VERSION:nCompatibility version. Higher versions unlock newer tags but exclude older players.
#EXT-X-TARGETDURATION:nMaximum segment duration in seconds, rounded up. Required in every media playlist.
#EXT-X-MEDIA-SEQUENCE:nSequence number of the first segment. Important for live sliding windows.
#EXTINF:duration,[title]Duration of the segment URI on the following line.
#EXT-X-ENDLISTNo more segments will be added. Present for VOD, absent for live.
#EXT-X-PLAYLIST-TYPE:VOD / EVENTDeclares whether the playlist is immutable or append-only.
#EXT-X-DISCONTINUITYEncoding parameters change at this point (e.g. an ad break with a different resolution).
#EXT-X-PROGRAM-DATE-TIMEAbsolute wall-clock timestamp for the following segment; used for sync and analytics.

Master playlist tags

TagMeaning
#EXT-X-STREAM-INFDescribes the variant URI below. Attributes include BANDWIDTH, RESOLUTION, CODECS, FRAME-RATE and AUDIO/VIDEO group IDs.
#EXT-X-MEDIADeclares alternative renditions such as audio languages or subtitle tracks.
#EXT-X-I-FRAME-STREAM-INFPoints to an I-frame-only playlist used for fast trick-play and thumbnails.
#EXT-X-SESSION-KEYEncryption key applicable to all variants in the session.

Encryption and low latency

TagMeaning
#EXT-X-KEYSpecifies METHOD (AES-128, SAMPLE-AES, NONE), the key URI and optional IV.
#EXT-X-MAPPoints to the initialisation segment required by fMP4/CMAF segments.
#EXT-X-PART / #EXT-X-PART-INFLow-Latency HLS partial segments; lets players start before a full segment exists.
#EXT-X-SERVER-CONTROLAdvertises LL-HLS capabilities such as CAN-BLOCK-RELOAD and hold-back values.
#EXT-X-DEFINEVariable substitution, useful for templated playlist delivery.

A master playlist example

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="English",DEFAULT=YES,URI="audio/en.m3u8"
#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2",AUDIO="aac"
video/360p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2400000,RESOLUTION=1280x720,CODECS="avc1.4d401f,mp4a.40.2",AUDIO="aac"
video/720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2",AUDIO="aac"
video/1080p.m3u8

The player starts with the variant that best matches available bandwidth, then moves up or down. Accurate BANDWIDTH values matter more than the order of variants.

Validation checklist

Related reading