iptv-toolkit
iptv-toolkit / M3U format

The M3U format explained

An IPTV playlist is a plain text file. Once you can read it, most "channel missing" or "no guide" problems become easy to fix.

#EXTM3U x-tvg-url="https://example.com/epg.xml"
#EXTINF:-1 tvg-id="news.one" tvg-logo="https://example.com/news1.png" group-title="News",News One
https://example.com/live/news1/index.m3u8
#EXTINF:-1 tvg-id="sports.one" group-title="Sports",Sports One HD
#EXTVLCOPT:http-user-agent=Mozilla/5.0
https://example.com/live/sports1/index.m3u8

Line by line

PartMeaning
#EXTM3UFirst line of an extended playlist. Can carry x-tvg-url or url-tvg: the address of the TV guide (EPG) in XMLTV format.
#EXTINF:-1Starts one channel. -1 means "live, no fixed length".
tvg-idThe id used to match the channel with the guide. Empty or wrong id = no programme info.
tvg-logoLogo image shown by the player.
group-titleCategory the player shows (News, Sports…).
text after the commaChannel name shown on screen. It can contain commas.
#EXTVLCOPTPlayer options for the next stream, often a user agent or referrer.
the URL lineThe stream itself: .m3u8 (HLS) or .ts (MPEG-TS) most of the time.

Common problems and how to spot them

M3U or M3U8?

Same format. .m3u8 just means the file is UTF-8 encoded. The HLS stream URLs inside a playlist are also .m3u8 files, but those are a different kind of playlist that lists video segments.