The shape of a playlist
#EXTM3U x-tvg-url="http://example.com/epg.xml"
#EXTINF:-1 tvg-id="news.example" tvg-name="Example News" tvg-logo="http://example.com/news.png" group-title="News",Example News HD
http://example.com/live/user/pass/1001.ts
#EXTINF:-1 tvg-id="sport1.example" tvg-logo="http://example.com/sport1.png" group-title="Sport",Example Sport 1
http://example.com/live/user/pass/1002.ts
- Line 1: the
#EXTM3Uheader, with optional playlist-wide attributes. - Then, for each channel, two lines: an
#EXTINFline describing it, and the stream address on the next line.
The two core tags
| Tag | Format | What it means |
|---|---|---|
#EXTM3U | #EXTM3U | Marks the file as an extended M3U playlist. The HLS specification says it must be the first line. |
#EXTINF | #EXTINF:<duration>,<title> | Describes the entry that follows. The text after the comma is the name shown in the channel list. |
The duration is in seconds. Live IPTV channels have no fixed length, so playlists use -1. Attributes such as tvg-id sit between the duration and the comma.
Header attributes
Placed on the #EXTM3U line, these apply to the whole playlist:
| Attribute | What it does |
|---|---|
x-tvg-url | The address of the XMLTV guide. Kodi’s IPTV Simple client uses it if no guide address is set in the add-on’s settings. Many playlists use url-tvg for the same job, so players differ in which they read. |
tvg-shift | A time shift in hours for the guide, used for every channel that doesn’t set its own |
catchup-correction | A time correction for catch-up requests, used for every channel that doesn’t set its own |
Channel attributes
Placed on each #EXTINF line. The descriptions follow Kodi’s IPTV Simple client documentation, a detailed public reference:
| Attribute | What it does |
|---|---|
tvg-id | Unique identifier that maps the channel to its listings in the XMLTV guide |
tvg-name | The channel’s name in the XMLTV guide, if it differs from the display name |
tvg-logo | Address of the channel’s logo image |
tvg-chno | The channel number to use |
tvg-shift | A time-zone shift in hours for this channel’s guide entries |
group-title | The group or groups the channel belongs to, separated by semicolons |
radio | Set to true for a radio station |
catchup | Catch-up mode, such as default or append |
catchup-days | How many days back catch-up is available |
catchup-source | The catch-up address, or the part added to the channel address, with time placeholders |
catchup-correction | A time correction for this channel’s catch-up requests |
Other directives you may see
#EXTGRP:assigns groups to every channel after it, until an empty#EXTGRPline.#EXTVLCOPT:passes a VLC-style option. Kodi’s IPTV Simple client turnshttp-user-agentandhttp-referreroptions into request headers. See IPTV user agent.#KODIPROP:passes a property to Kodi, one per line.
Getting the details right
- Quote attribute values with straight double quotes:
group-title="News". - Keep each channel to two lines. A missing stream address or a stray blank line can shift every channel after it.
- Save as UTF-8. The HLS specification requires playlists to be UTF-8 without a byte order mark; following that avoids broken accents in channel names. See M3U vs M3U8.
- Match
tvg-idcharacter for character to theidof the channel in the guide; don’t rely on a player ignoring differences in capitals or spaces. See XMLTV explained and EPG not available for this channel.
To check a playlist’s structure in your browser, use our M3U playlist checker. To change groups and channel order safely, see how to edit an IPTV playlist.
