An m3u8 file is a plain-text playlist, encoded in UTF-8, that tells a video player where to find the pieces of an HLS (HTTP Live Streaming) stream. The name comes from the older M3U playlist format used for audio: the 8 simply means UTF-8 text.
The file itself contains no video. It is a short list of URLs and instructions, usually served with the MIME type application/vnd.apple.mpegurl or audio/mpegurl.
Master playlist — lists several versions of the same stream at different resolutions and bitrates. The player picks one and can switch mid-playback when bandwidth changes.
Media playlist — lists the actual segment files (usually .ts or .m4s) in playback order, each with a duration.
#EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:10.0, segment0.ts #EXTINF:10.0, segment1.ts #EXTINF:10.0, segment2.ts #EXT-X-ENDLIST
Each #EXTINF line gives the duration of the segment that follows. #EXT-X-ENDLIST marks a finished video-on-demand asset; a live playlist omits it and keeps appending new segments. Full tag reference →