15% discount on service renewal Renew now

0

admin Admin

M3U playlists explained: #EXTINF, tvg-id, group-title and catch-up

Article

Almost every IPTV player opens M3U playlists, yet few apps explain what the lines inside one mean. This guide reads the M3U playlist format the way IPTV players do: the header, the #EXTINF line and its attributes, the catch-up tags, and the option lines some players accept. Once you can read a playlist, you can work out why a channel sits in the wrong group, why the TV guide stays empty, or why a stream plays on your computer but not on your TV box.

Everything here applies to any IPTV subscription that gives you an M3U link, and to public playlists. The examples use placeholders (http://example-server.com:8080, username, password). A real M3U link contains your login, so treat it like a password: don't post it, and replace it with placeholders when you ask for help.

How the M3U playlist format is built

M3U began as a plain-text audio playlist in the 1990s, and the general format never received a formal specification; only its HLS variant is defined, in RFC 8216. It is a de facto standard, so each player decides which parts it understands. IPTV playlists use the extended variant: the first line is #EXTM3U, and every channel then takes two lines, one that describes it and one that holds the stream address.

#EXTM3U x-tvg-url="http://example-server.com:8080/xmltv.php?username=username&password=password"

#EXTINF:-1 tvg-id="NewsOne.us" tvg-name="News One" tvg-logo="http://example-server.com:8080/logos/newsone.png" tvg-chno="101" group-title="News",News One HD

http://example-server.com:8080/live/username/password/101.ts

Read the #EXTINF line from left to right:

  • -1 is the duration. Music playlists put a track length in seconds here. A live channel has no fixed length, so IPTV playlists write -1, and a few write 0.
  • The attributes follow, each in the form name="value", separated by spaces.
  • The comma closes the attribute list. The text after it is the channel name the player displays.

Players skip lines that start with # when they don't recognize the directive. That is why playlists from different sources can carry extra tags without breaking older apps.

.m3u, .m3u8 and HLS

The two extensions differ in text encoding. An .m3u8 file has to be UTF-8, while the older .m3u used the computer's local code page. Today most systems default to UTF-8 anyway, but save any playlist you edit as UTF-8 so accented and non-Latin channel names survive.

The confusing part is that HLS streaming also uses .m3u8. A stream address that ends in index.m3u8 is not a channel list. It is an HLS playlist that points to short video segments, or to one playlist per quality level, and on a live channel it changes every few seconds. You play it; you don't edit it.

The #EXTINF attributes players actually use

Attribute What it does Where it goes wrong
tvg-id Links the channel to its entry in the XMLTV guide, the id of a <channel> element. Empty, duplicated, or written in a different letter case from the guide.
tvg-name A second name some players use for guide matching when the ID fails. Spaces versus underscores; many apps ignore it.
tvg-logo The address of the channel logo. Dead image links; oversized images slow down small boxes.
tvg-chno The channel number. Some players number channels their own way unless told to use playlist numbers.
group-title The category the channel appears under. Kodi accepts several groups separated by semicolons. Groups move when the provider reorganizes its list.
tvg-shift Moves this channel's guide times by a number of hours. A fixed shift turns wrong when the clocks change for daylight saving.
radio Set to true, marks an audio-only station. Rarely set by providers.

The header line can carry settings too. x-tvg-url (some generators write url-tvg) points to the guide file. Kodi's IPTV Simple client uses it only when no guide address is set in the add-on itself; other players apply their own rules. A tvg-shift on the header applies to every channel that doesn't set its own.

How tvg-id matching works

The TV guide is a separate XMLTV file, and the player has to pair each playlist entry with a <channel> in it. Kodi's IPTV Simple client documents its order, which is a fair model of what other apps do. It first compares the XMLTV channel id with tvg-id. If nothing matches, it compares the XMLTV display-name with tvg-name, as written or with spaces turned into underscores. Last, it compares the display name with the channel name after the comma. The first match wins.

Two details catch people out. Matching is case-sensitive unless you turn on Ignore case for EPG channel IDs in Kodi, and a Kodi forum thread traced an empty guide to playlists that spelled the attribute itself tvg-ID. Duplicate IDs are the other trap. A channel listed in HD and SD often shares one ID, which suits the guide, but tools that treat the ID as a unique key can merge or drop one of the two.

The public iptv-org playlists use IDs that combine a channel and a feed, such as RUV.is@SD: the channel name, a dot, the country code, then the feed after the @. Those playlists collect user-submitted links to publicly available streams. The streams are public broadcasts, and you should still respect the rights and the law where you live.

Catch-up tags

Catch-up plays a program that has already aired, from an archive the provider keeps for that channel. The playlist can tell the player how to ask for it:

  • catchup names the method. Kodi documents default (the full archive address sits in catchup-source), append (the source is added to the end of the live address), shift (time parameters are added to the live address), flussonic or fs, xc (an Xtream Codes archive address is built from the live address) and vod.
  • catchup-days says how many days back the archive reaches.
  • catchup-source is an address template. The player fills in placeholders such as {utc} (the program start as a UTC timestamp), {duration} (its length in seconds) or {Y}-{m}-{d} (its date).
  • catchup-correction moves the requested time when the archive and the guide disagree by some hours.

Older playlists sometimes carry timeshift="3", a legacy attribute from early smart TV apps. In the Kodi support thread for catch-up, the suggested fix for such a playlist was to add catchup="default" and use catchup-days="3" instead. Keep in mind that a tag only describes how to request an archive. It doesn't create one: if the provider doesn't record a channel, the tag does nothing. The catch-up article in this section explains archives player by player.

Lines that change how a stream opens

  • #EXTVLCOPT:http-user-agent=... and #EXTVLCOPT:http-referrer=... come from VLC. Kodi turns these two into HTTP headers. Place them between the #EXTINF line and the address.
  • #KODIPROP: passes one property to Kodi per line, for example which input stream add-on should open the channel.
  • A pipe after the address adds headers in Kodi and in several other players: http://example-server.com:8080/live/username/password/101.ts|User-Agent=MyPlayer.
  • #EXTGRP: sets a group for the entries that follow it. In Kodi it applies until an empty #EXTGRP line, and any group-title resets it.

Provider links: m3u, m3u_plus, ts and m3u8

Many providers run panels that speak the Xtream Codes API, and their M3U link follows one pattern:

http://example-server.com:8080/get.php?username=username&password=password&type=m3u_plus&output=ts

  • type=m3u returns bare entries. type=m3u_plus adds the guide ID and logo attributes, so use it whenever you want a TV guide.
  • output=ts asks for MPEG-TS streams. output=hls, which many panels also accept as m3u8, asks for HLS. Which formats work depends on the panel and your account.

MPEG-TS is one continuous stream, while HLS arrives as a series of short segments listed in a playlist. Players and media servers handle the two differently, so when a channel refuses to play in one format, try the other before you decide the channel is down.

These links often include films and series as well, which can make the file very large and slow to load on small devices. If your player supports Xtream Codes logins, it can fetch live channels, films and series separately instead.

Editing a playlist without breaking it

  1. Download the playlist and open it in a plain text editor that saves UTF-8. A word processor swaps straight quotes for curly ones, and players then ignore the attributes.
  2. Keep each pair together: every #EXTINF line must be followed by its address, with option lines such as #EXTVLCOPT in between and nothing else.
  3. Change values inside the quotes only. A missing closing quote can swallow the rest of the line, channel name included.
  4. Keep commas out of attribute values you add. Simple parsers treat the first comma as the end of the attributes.
  5. Load the result as a local file. A provider link refreshes from the server, so your edits only live in the saved copy.

If you want filtered or renamed channels that stay in step with the provider, filter in the player (hidden groups, favorites) or put a proxy such as Threadfin in between. It filters and maps channels and serves a clean playlist and guide to the apps behind it.

When a playlist won't load

  • "Invalid playlist" or zero channels: open the link in a browser. If you get an error page, a login message or an empty file, the problem is the account or the address, not the player. Look for typos in the username and password and check that the subscription is active.
  • No #EXTM3U on the first line: strict players refuse the file. Add the header.
  • Channels load but none play: try one stream address in another player on the same network. If it plays there, the first player may need a different user agent or the other output format.
  • Logos missing: the logo address is dead or blocked, and the player falls back to the name.
  • Guide empty: compare tvg-id with the guide file. The TV guide article in the Setup and help section covers matching, time offsets and gaps.

For player-specific steps, our VLC guide shows how to open an M3U link on a computer, and the apps and players hub lists the players that accept M3U links on each kind of device.

Sources and further reading

0 replies

0 replies

Log in with the account you ordered with to reply and vote.Log in
Chat on WhatsApp