TS IPTV

Kodi formats in TS IPTV

Many IPTV playlists are written for Kodi. TS IPTV reads their formats: the M3U attributes, #KODIPROP, headers, DRM, catch-up information and .strm files. TS IPTV cannot run Kodi add-ons.

TS IPTV includes no channels and recommends no Kodi add-on, repository or playlist. Every example uses example.com placeholders, a public test stream, or TS IPTV's own example files on tsiptv.web.app.

Kodi and PVR IPTV Simple

Kodi is an open-source media player. Its official PVR IPTV Simple Client add-on reads M3U playlists and XMLTV guides; its README is the most widely quoted description of IPTV M3U attributes. The DRM and header properties come from inputstream.adaptive, Kodi's adaptive-streaming player. TS IPTV reuses those data formats, because they are plain text; it does not reuse Kodi's program code.

What TS IPTV understands

The basics (#EXTINF attributes, several groups with ;, #EXTGRP, #EXTVLCOPT, headers after |, x-tvg-url) are in the M3U guide. This section covers what is specific to Kodi.

#KODIPROP

Each #KODIPROP:key=value line sits between #EXTINF and the link and applies to that channel only. Keys are case-insensitive; the value runs to the end of the line (JSON is allowed).

KeyWhat TS IPTV does
inputstream, inputstreamaddon, inputstreamclassIgnored: they only select a decoder inside Kodi.
mimetypeStream type hint: application/dash+xml (DASH), application/vnd.apple.mpegurl or application/x-mpegurl (HLS), application/vnd.ms-sstr+xml (Smooth Streaming), video/mp2t (MPEG-TS). Useful when the link has no .mpd/.m3u8 extension.
inputstream.adaptive.manifest_typempd, hls, ism: a stream type hint, as above.
inputstream.adaptive.common_headers, manifest_headers, stream_headersHeaders as name=url-encoded-value&name=…. All three are merged and sent with every request of the channel.
inputstream.adaptive.license_type, license_key, drm_legacy, drmDRM configuration (see below).
other keysStored, no effect.

DRM

DRM systemValue in the playlistAndroidiOSDesktop
Widevinecom.widevine.alpha (or widevine)SupportedNot supportedNot supported
PlayReadycom.microsoft.playready (or playready)SupportedNot supportedNot supported
ClearKeyorg.w3.clearkey (or clearkey)DASH streams onlyNot supportedNot supported
WisePlaycom.huawei.wiseplayNot supportedNot supportedNot supported

On iOS and desktop, a DRM channel shows “DRM is not supported on this device” before the stream is requested, and you can still switch to other channels. Ordinary AES-128 encrypted HLS needs no DRM properties and plays on every platform.

Kodi has three ways to write a DRM configuration. When a channel has several, the newest wins: drm, then drm_legacy, then license_type + license_key.

1. license_type + license_key (the old way). license_key has four fields joined with |: URL|headers|request-body|response.

#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

2. drm_legacy: key-system|URL-or-keys|headers, 1 to 3 fields.

#KODIPROP:inputstream.adaptive.drm_legacy=com.widevine.alpha|https://license.example.com/widevine|User-Agent=Mozilla%2F5.0
#KODIPROP:inputstream.adaptive.drm_legacy=org.w3.clearkey|000102030405060708090a0b0c0d0e0f:00112233445566778899aabbccddeeff

3. drm (JSON). TS IPTV uses the first supported key system whose configuration only uses license.server_url, license.req_headers and license.keyids.

#KODIPROP:inputstream.adaptive.drm={"com.widevine.alpha":{"license":{"server_url":"https://license.example.com/widevine","req_headers":"X-Example=1"}}}

ClearKey keys: the KID and the key are 32 hex characters; the UUID form with dashes (00010203-0405-…) is accepted, and non-hex values are read as base64 of 16 bytes. TS IPTV ships no keys and no tools to obtain keys: DRM support is for content you are entitled to watch, for example an operator's playlist.

Catch-up

TS IPTV reads and stores all the catch-up information below. Playing past programmes comes in a later update; there is no catch-up button or badge yet.

catchup=How the catch-up URL is built
defaultcatchup-source is the whole URL.
appendThe channel URL + catchup-source.
shift (or the older timeshift="N")The channel URL + ?utc={utc}&lutc={lutc} (or &utc=… if the URL already has a ?).
flussonic, flussonic-hls, flussonic-ts, fsFollowing the Flussonic server's URL convention.
xcFollowing the /timeshift/… convention of Xtream Codes style APIs.
vodPlays catchup-source only.

Related attributes: catchup-days (or tvg-rec) is the archive length in days; catchup-correction is a number of hours to add. Placeholders in catchup-source: {utc} (programme start, Unix seconds), {utcend}, {lutc} (now), {Y} {m} {d} {H} {M} {S} (in the device's local time, as in Kodi), {duration}, {duration:60} (minutes), {offset:X}, {catchup-id} and the formatted form {utc:YmdHM}.

.strm files

A .strm file is a text file with exactly one stream URL, optionally preceded by #KODIPROP or #EXTVLCOPT lines and optionally followed by headers after |. TS IPTV imports it as a one-channel playlist named after the file (without the extension). A .strm file that points to plugin:// is refused.

What TS IPTV cannot run

The reason: Kodi add-ons are Python programs that only run inside Kodi, on top of Kodi's own libraries; they are not data another player can read. Running code downloaded from arbitrary sources is also a security risk, and app store rules do not allow it. When you import a playlist, such entries are skipped and listed under Details; the rest of the playlist is imported.

Complete example

TS IPTV's example M3U file has two channels that use Kodi-style features: Example Sports sends a header with the | suffix, and Example Protected declares Widevine DRM with #KODIPROP. The licence URL is a placeholder, so that channel is for illustration only.

#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
  1. license_type=com.widevine.alpha: the DRM system is Widevine.
  2. license_key=…|Content-Type=application%2Foctet-stream|R{SSM}|R: send licence requests to license.example.com with a Content-Type header, raw body and raw response.
  3. mimetype=application/dash+xml: the stream is DASH.
  4. catchup="shift" catchup-days="3" on the last channel: catch-up information, stored.

And a .strm file pointing to the Mux public test stream (Big Buck Bunny © Blender Foundation, CC BY 3.0):

#KODIPROP:mimetype=application/vnd.apple.mpegurl
https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8

Write it by hand

  1. Write the M3U list as in the M3U guide.
  2. Add the #KODIPROP lines right after the channel's #EXTINF, before the link line, one property per line.
  3. URL-encode header values (/ → %2F, : → %3A).
  4. For .strm: create a text file with only the stream URL (plus #KODIPROP lines if needed) and save it as UTF-8 with the extension .strm. The file name becomes the channel name.

Host it

Kodi-style M3U lists are hosted like any M3U file: see hosting an M3U file. .strm files are usually imported directly from the device with Import from file; if you host one, the server may send it as text/plain.

Moving from Kodi to TS IPTV

  1. In Kodi, open the settings of PVR IPTV Simple Client. In the general section, copy the M3U playlist URL (or note the local file path). In the EPG section, copy the XMLTV URL.
  2. In TS IPTV, open Add IPTV Source, paste the playlist URL into Source Link and choose Add IPTV; or choose Import from file for a local file or a .strm file.
  3. If the playlist has no x-tvg-url, add x-tvg-url="<XMLTV URL>" to its #EXTM3U line (see the XMLTV guide).
  4. Read the import message: entries that need a Kodi add-on or web-page scraping are counted under Details.

Common mistakes

CaseSymptomWhat to do
Headers attached with | to a manifest URLNo error: TS IPTV accepts itKodi recommends *_headers; TS IPTV reads both.
license_key with a special body or response (b{SSM}, J…, {HASH})“This channel's DRM setup is not supported yet”Ask your provider for a standard licence setup (R{SSM}|R).
ClearKey on an HLS streamDoes not play; a DRM message is shownClearKey works with DASH streams on Android only.
WisePlay (com.huawei.wiseplay)“This channel's DRM setup is not supported yet”Not supported.
A DRM channel on iPhone, iPad or desktop“DRM is not supported on this device”Watch that channel on Android.
The licence server refuses“The DRM licence server refused this device”Check that your subscription is active.
plugin://… entriesSkipped, listed under DetailsThey need a Kodi add-on; they cannot run in TS IPTV.

What TS IPTV supports

FeatureAndroidiOSDesktop
PVR IPTV Simple M3U attributesSupportedSupportedSupported
mimetype, manifest_typeSupportedSupportedSupported
Headers (*_headers, #EXTVLCOPT, |)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
Widevine, PlayReadyAndroid onlyNot supportedNot supported
ClearKeyDASH onlyNot supportedNot supported
Catch-upStored, playback coming later
.strm filesSupportedSupportedSupported
Kodi add-ons, plugin://, repositories, #WEBPROPNot supported