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
| Part | Meaning |
|---|---|
#EXTM3U | First line of an extended playlist. Can carry x-tvg-url or url-tvg: the address of the TV guide (EPG) in XMLTV format. |
#EXTINF:-1 | Starts one channel. -1 means "live, no fixed length". |
tvg-id | The id used to match the channel with the guide. Empty or wrong id = no programme info. |
tvg-logo | Logo image shown by the player. |
group-title | Category the player shows (News, Sports…). |
| text after the comma | Channel name shown on screen. It can contain commas. |
#EXTVLCOPT | Player options for the next stream, often a user agent or referrer. |
| the URL line | The stream itself: .m3u8 (HLS) or .ts (MPEG-TS) most of the time. |
Common problems and how to spot them
- No guide for some channels: run
iptv-toolkit infoand look at "No tvg-id". - Same channel listed twice: "Duplicate URLs" in
info; remove them withclean. - Channel opens a login page:
checkreportsDEADwith "HLS URL did not return a playlist". - Huge list, slow player: keep only the groups you watch with
filter -g.
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.