M3U and M3U8 playlist format explained
An extended M3U playlist is a UTF-8 text file that normally
begins with #EXTM3U. Each media item is described by
an #EXTINF line followed by its media URL on the next
non-comment line.
Minimal safe example
#EXTM3U #EXTINF:-1 tvg-id="example.channel" group-title="Demo",Example channel https://media.example/stream.m3u8
-1 means the duration is unknown or continuous.
Quoted attributes carry application-specific metadata; the text
after the comma is the display name.
M3U versus M3U8 and HLS
.m3u8 conventionally indicates UTF-8 text. An M3U8
file may be a list of channel URLs, or it may be an HLS manifest
containing protocol tags such as #EXT-X-VERSION,
#EXT-X-STREAM-INF and
#EXT-X-TARGETDURATION. HLS syntax is standardized
separately; do not rewrite its tags as IPTV channel metadata.
Common problems
- A UTF-8 byte-order mark or mixed line endings confusing older parsers.
- An
#EXTINFrecord with no following URL. - Commas or quotation marks inserted into attributes incorrectly.
- Duplicate URLs, expired tokens or secret-bearing URLs copied into public files.
-
Using
tvg-nameas a substitute for a stable XMLTV channel identifier.
Sources
- RFC 8216 — HTTP Live Streaming, especially the playlist and UTF-8 requirements.
- XMLTV project for the programme-guide format commonly paired with IPTV playlists.