M3U8 File Structure Explained

An M3U8 file is a plain-text playlist. It does not contain video bytes. It contains instructions that tell the player what to load, in what order, and under which conditions.

Quick model: M3U8 is control-plane metadata; video segments are the data plane.

Two playlist levels

1. Master playlist

A master playlist lists available renditions (for example 1080p, 720p, 480p). Each rendition points to a media playlist.

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080
1080/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720
720/index.m3u8

2. Media playlist

A media playlist lists actual segments in playback order.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:6.0,
seg0.ts
#EXTINF:6.0,
seg1.ts
#EXTINF:6.0,
seg2.ts
#EXT-X-ENDLIST

Tags you should know

Live vs VOD differences

Common formatting mistakes

  1. Relative URLs that break after CDN path changes.
  2. Wrong MIME type for playlist responses.
  3. Inconsistent segment durations causing unstable live edge.
  4. Invalid line endings or accidental BOM characters in generated manifests.

Debug checklist

  1. Open the M3U8 URL in browser and verify plain text output.
  2. Check every listed segment URL returns HTTP 200.
  3. Verify content-type and cache headers.
  4. Test in both browser player and VLC.

Bottom line

If your team can read M3U8 manifests confidently, most playback incidents become easier to isolate and fix. Start by separating master-level issues from segment-level issues.

Related guides