TS IPTV

M3U and M3U8 playlists

M3U is the most common IPTV playlist format: a plain text file where each channel is one description line and one link line. This page gives the full syntax TS IPTV reads, including the Kodi-style attributes.

TS IPTV includes no channels. It plays only the playlists you add. Every example uses example.com placeholders, a public test stream, or TS IPTV's own example files on tsiptv.web.app.

What M3U is

M3U started with the WinPlay3 and Winamp music players as a list of media locations, one per line. The IPTV community extended it into a channel list: each channel gets a name, a logo, a group and an identifier for the programme guide. These extensions are a shared convention, not a formal standard.

NameWhat it is
M3UA plain list of locations, one per line, with no metadata.
Extended M3UThe first line is #EXTM3U, and each entry is preceded by an #EXTINF line.
M3U8The same format encoded as UTF-8. The .m3u8 extension signals UTF-8.

HLS playlists are not IPTV channel lists

HLS streams also use .m3u8 files that start with #EXTM3U (RFC 8216), but those are the index of one stream, not a channel list:

HLS media playlistIPTV channel list
An entry isa 2–10 second segment of one streama channel (a link to that channel's stream)
#EXTINF:<n>segment duration in seconds-1 or 0 (ignored)
Typical tags#EXT-X-TARGETDURATION, #EXT-X-MEDIA-SEQUENCE, #EXT-X-STREAM-INFonly #EXTM3U
Attributes on #EXTINFnonetvg-id="…", group-title="…" and others
Who opens itthe video player, automaticallyyou, when you add a playlist

If you paste the link of an HLS stream into TS IPTV, the app recognises it and asks “This is a single stream”: choose Add as channel to create a playlist with exactly one channel.

Syntax

#EXTM3U [header attributes]
#EXTINF:-1 [key="value" ...],<Channel name>
[#EXTGRP:<group>]
[#EXTVLCOPT:<option>=<value>]
[#KODIPROP:<property>=<value>]
<stream URL>[|Header=Value&Header=Value]

The first line is #EXTM3U. Each channel starts with an #EXTINF line, may have a few option lines, and ends with the link line. Parts in square brackets are optional. Lines that start with # but are not a known tag are comments.

Attributes on the #EXTM3U line

AttributeMeaning
x-tvg-urlXMLTV guide URL. Several URLs may be separated by commas; TS IPTV downloads all of them (up to 5) and merges them.
url-tvgOlder name for x-tvg-url. Read only when x-tvg-url is absent.
tvg-shiftDefault guide time shift in hours (for example +2, -4.5) for channels that do not set their own.
catchup, catchup-days, catchup-source, catchup-correctionDefault catch-up values for channels that do not set their own. See catch-up in the Kodi guide.

Attributes on the #EXTINF line

Each attribute is key="value", with the value in straight double quotes. Attribute names are case-insensitive (tvg-ID is read as tvg-id). All attributes go before the comma; the channel name follows it.

AttributeRequiredMeaning
(name after the comma)yesThe channel's display name: the text after the first comma that is outside quotes, so names may contain commas.
tvg-idrecommendedIdentifier that links the channel to <channel id> in the XMLTV guide. Usually ChannelName.country, for example ExampleNews.us.
tvg-namenoAlternative name used only for guide matching; it does not replace the display name.
tvg-logonoLogo image URL (PNG, JPG or SVG).
group-titlenoThe channel's group. Separate several groups with semicolons: group-title="News;HD" puts the channel in both.
tvg-chno (or ch-number)noChannel number, an integer. Shown before the channel name.
tvg-shiftnoGuide time shift for this channel only, in hours.
radiono"true" marks a radio station: it gets a radio icon and the player shows its logo instead of a video area.
mediano"true" marks an on-demand video instead of a live channel.
catchup, catchup-days, catchup-source, catchup-correctionnoCatch-up information. Stored; playback of past programmes comes later.
user-agent, referrernon-standardSome generators write headers as attributes. TS IPTV reads them, but prefer #EXTVLCOPT or the | suffix below.

#EXTGRP

#EXTGRP:Group name is another way to set a group, and it works two ways:

#EXTVLCOPT

LineMeaning
#EXTVLCOPT:http-user-agent=…User-Agent header for this stream.
#EXTVLCOPT:http-referrer=…Referer header for this stream (note the spelling referrer with two r's; http-referer is accepted too).
other keysStored, no effect.

Headers after |

You can attach HTTP headers right after the link, Kodi style: https://cdn.example.com/live.m3u8|User-Agent=Mozilla%2F5.0&Referer=https%3A%2F%2Fexample.com%2F.

#KODIPROP

#KODIPROP:key=value lines come from Kodi. They declare the stream type (mimetype), headers and DRM (Widevine, PlayReady, ClearKey). Each key and its platform support is described in the Kodi formats guide.

Complete example

This is TS IPTV's example file. The first channel really plays (the Mux public test stream, Big Buck Bunny © Blender Foundation, licensed CC BY 3.0); the other channels use example.com placeholders to show the syntax.

#EXTM3U x-tvg-url="https://tsiptv.web.app/examples/guide.xml"
#EXTINF:-1 tvg-id="HlsTest.example" tvg-chno="1" group-title="Test",HLS Test Channel
https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8
#EXTINF:-1 tvg-id="ExampleNews.us" tvg-chno="2" tvg-logo="https://example.com/logos/news.png" group-title="News;HD",Example News
#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64)
#EXTVLCOPT:http-referrer=https://example.com/
https://cdn.example.com/news/index.m3u8
#EXTINF:-1 tvg-id="ExampleSports.us" tvg-chno="3" group-title="Sports",Example Sports
https://cdn.example.com/sports/index.m3u8|Referer=https%3A%2F%2Fexample.com%2F
#EXTINF:-1 tvg-id="ExampleRadio.us" tvg-chno="4" radio="true" group-title="Radio",Example Radio
https://cdn.example.com/radio/stream.aac
#EXTINF:-1 tvg-id="ExampleProtected.us" tvg-chno="5" group-title="DRM demo",Example Protected
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://license.example.com/widevine|Content-Type=application%2Foctet-stream|R{SSM}|R
#KODIPROP:mimetype=application/dash+xml
https://cdn.example.com/protected/manifest.mpd
#EXTINF:-1 tvg-id="ExampleArchive.us" tvg-chno="6" catchup="shift" catchup-days="3" group-title="Archive",Example Archive
https://cdn.example.com/archive/index.m3u8

Part by part:

  1. Line 1: the #EXTM3U header, with x-tvg-url pointing to the example XMLTV guide.
  2. HLS Test Channel: the simplest channel: one #EXTINF line with an id, a number and a group, then the link.
  3. Example News: in two groups (News;HD), with a logo, sending User-Agent and Referer through two #EXTVLCOPT lines.
  4. Example Sports: sends Referer with the | suffix, URL-encoded.
  5. Example Radio: radio="true" marks a radio station.
  6. Example Protected: a Widevine-protected DASH stream, declared with three #KODIPROP lines (see the Kodi guide).
  7. Example Archive: declares shift catch-up for 3 days.

The smallest valid playlist has three lines:

#EXTM3U
#EXTINF:-1,My Channel
https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8

If you have a single stream and want to keep it as a file, you can also use a .strm file: see .strm files in the Kodi guide.

Create one by hand

  1. Open a plain-text editor: Notepad (Windows), TextEdit in plain text mode (macOS) or VS Code. Do not use Word or Google Docs.
  2. Type #EXTM3U on the first line.
  3. For each channel, add two lines: #EXTINF:-1 <attributes>,<Name> and then the stream URL.
  4. Use straight double quotes " around attribute values, not curly quotes “ ”.
  5. Save as UTF-8 (in Notepad: Save as › Encoding: UTF-8; UTF-8 without BOM is best), with the extension .m3u or .m3u8.
  6. Test each stream URL before you share the file, for example in VLC: Media › Open Network Stream.

Host it

Any link that returns the file itself works. The server may send Content-Type audio/x-mpegurl, application/vnd.apple.mpegurl or text/plain; TS IPTV detects the content.

OptionURL shape
GitHub (raw file)https://raw.githubusercontent.com/<user>/<repo>/<branch>/playlist.m3u
GitHub Pageshttps://<user>.github.io/<repo>/playlist.m3u
Any static host (Netlify, Cloudflare Pages, your own nginx…)https://www.example.com/playlist.m3u
DropboxChange dl=0 at the end of the share link to dl=1 so it returns the file, not a preview page.
A file on your deviceNo hosting needed: use Import from file in TS IPTV.

What does not work: Google Drive or OneDrive share pages, Dropbox preview links (dl=0), and GitHub links of the form github.com/<user>/<repo>/blob/…. They return a web page, not the file. Use the Raw or direct-download link instead.

Add it in TS IPTV

On phones, tablets and desktop

  1. Open Add IPTV Source (the Add IPTV button on the home screen).
  2. Enter a Source Name, for example “My channels”.
  3. Paste the link into Source Link and choose Add IPTV. Or choose Import from file and pick an .m3u/.m3u8 file on your device (up to 20 MB).
  4. When the import finishes, TS IPTV shows how many channels it found. If entries were skipped, you also see “N entries could not be imported” and a Details button listing the reasons: a Kodi add-on is needed (plugin://), web-page scraping, or no stream link.

On Android TV

  1. Open the import dialog and use the arrow keys to move between the name, the link and the add button.
  2. Type the link with the on-screen keyboard (or your phone's keyboard, if your TV supports it).
  3. Import from file appears only if the TV has a file picker; most TVs do not, so use a link.

Playlists imported from a file do not refresh on their own: import the file again after you edit it.

Common mistakes

MistakeSymptomFix
Something other than #EXTM3U/#EXTINF at the start (an HTML page, other text)Not recognised as a playlistMake #EXTM3U the very start of the file.
The link is a web page (a share page, a GitHub blob/ URL)“This link opens a web page, not a playlist”Use the raw or direct-download link.
Curly quotes “ ” inserted by a word processorLogos and groups missingRetype them as straight ".
No comma before the name, or attributes after the nameThe name shows as tvg-id="…", or there is no nameWrite #EXTINF:-1 attributes,Name; nothing after the name.
The link is on the same line as #EXTINFThe channel has no streamThe link goes on its own line.
Unencoded space or | in the link404 or 400 errorsEncode spaces as %20; use | only for the header suffix.
Headers written as attributes (user-agent="…")The server still refuses on some playersUse #EXTVLCOPT:http-user-agent=… or the |User-Agent=… suffix.
Saved as ANSI/Windows-1252 with accented namesGarbled names (é)Save again as UTF-8.
tvg-id matches no XMLTV <channel id>No programme guideCopy ids exactly; they are case-sensitive.
An HLS stream imported as a channel listHundreds of “channels” named after segment numbersChoose Add as channel in the single-stream dialog, or import the real channel list.
Links with temporary tokens (?token=…)Works today, fails tomorrowTokens expire by design; get a fresh list from your provider.
plugin://… entriesSkipped, listed in the import detailsThese are Kodi add-ons, not streams; TS IPTV cannot run them. See the Kodi guide.

What TS IPTV supports

FeatureAndroidiOSDesktop
M3U, extended M3U, M3U8, gzip-compressed filesSupportedSupportedSupported
Several groups, #EXTGRP, channel numbers, radioSupportedSupportedSupported
Several guides in x-tvg-url, tvg-shiftSupportedSupportedSupported
Per-channel headers (#EXTVLCOPT, |, #KODIPROP)All headersBest effortUser-Agent and Referer only
DASH .mpd streams without DRMSupportedSupported through the built-in VLC player; only the User-Agent and Referer headers are sentSupported
DRM (Widevine, PlayReady, ClearKey)Android onlyNot supportedNot supported
Catch-upStored, playback coming later
rtmp, rtsp, udp… streamsImported unchanged; whether they play depends on each platform's player.
plugin:// and #WEBPROP entriesNot supported Skipped and listed in the import details.