A media playlist is the .m3u8 file that, for a single rendition, enumerates the media segments to play in order. Each segment is preceded by an #EXTINF tag giving its duration. The playlist also carries the target segment duration (#EXT-X-TARGETDURATION), the media sequence number of the first listed segment (#EXT-X-MEDIA-SEQUENCE), any encryption key (#EXT-X-KEY), discontinuity markers, and for live streams a list of partial segments and preload hints.

For VOD, the media playlist is static — list every segment once, end with #EXT-X-ENDLIST, cache for years. For live, it is a sliding window: the packager publishes new segments at the live edge, drops old ones from the start of the list, and the player re-fetches the playlist every segment-duration to discover them. The window size is typically 5–10 segments, equating to 30–60 s of seekable history.

A subtle but important detail: media playlist updates must be idempotent and consistent. If the player fetches the playlist twice within a second, the two responses must list the same segments and the same sequence numbers, or the player will get confused. This is hard to satisfy under CDN caching and is the reason most live media playlists ship with Cache-Control: max-age=1 or no-cache plus careful CDN config to let the freshness window match the segment-publish cadence.

Book cover: Video Streaming, Volume 2 of the Fora Soft Video Engineering Handbook

The book · Volume 2 of 7

Video Streaming: A Complete Guide to Video Delivery: From Network Protocols and Transport to Ingest, HLS, and MPEG-DASH

The media playlist is the file a live HLS player re-fetches every few seconds, so its target duration, sequence numbers and discontinuity tags decide whether playback holds steady. This volume covers HLS media playlists in detail, along with segment packaging, live and VOD playlist behaviour, CMAF and the latency budget of segmented delivery. Written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Live HLS players drifting, stalling or skipping segments in the media playlist?

Share a sample media playlist and your packager settings, and we will send back an audit of target duration, sequence and discontinuity handling with concrete fixes. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →