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
#EXTM3U: header line, mandatory.-
#EXT-X-STREAM-INF: defines one variant stream in a master playlist. -
#EXT-X-TARGETDURATION: maximum segment duration. -
#EXT-X-MEDIA-SEQUENCE: sequence number of first listed segment. #EXTINF: duration of each segment.#EXT-X-ENDLIST: marks VOD completion.
Live vs VOD differences
- VOD playlists usually end with
#EXT-X-ENDLIST. - Live playlists keep updating and may remove old segments as new ones arrive.
-
Live setups need careful cache policy, especially for the
.m3u8manifest.
Common formatting mistakes
- Relative URLs that break after CDN path changes.
- Wrong MIME type for playlist responses.
- Inconsistent segment durations causing unstable live edge.
- Invalid line endings or accidental BOM characters in generated manifests.
Debug checklist
- Open the M3U8 URL in browser and verify plain text output.
- Check every listed segment URL returns HTTP 200.
- Verify content-type and cache headers.
- 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.