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).
| Key | What TS IPTV does |
|---|---|
inputstream, inputstreamaddon, inputstreamclass | Ignored: they only select a decoder inside Kodi. |
mimetype | Stream 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_type | mpd, hls, ism: a stream type hint, as above. |
inputstream.adaptive.common_headers, manifest_headers, stream_headers | Headers 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, drm | DRM configuration (see below). |
| other keys | Stored, no effect. |
DRM
| DRM system | Value in the playlist | Android | iOS | Desktop |
|---|---|---|---|---|
| Widevine | com.widevine.alpha (or widevine) | Supported | Not supported | Not supported |
| PlayReady | com.microsoft.playready (or playready) | Supported | Not supported | Not supported |
| ClearKey | org.w3.clearkey (or clearkey) | DASH streams only | Not supported | Not supported |
| WisePlay | com.huawei.wiseplay | Not supported | Not supported | Not 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
- Field 1: the licence server URL.
- Field 2: headers as
name=value&…, URL-encoded. Leave it empty if there are none. - Field 3 may only be empty or
R{SSM}; field 4 may only be empty orR. Other values (b{SSM},B{SSM},J…responses,{HASH}in the URL) need special handling TS IPTV does not have yet: the channel is imported, but playing it shows “This channel's DRM setup is not supported yet”. - With
license_type=clearkey,license_keymay bekid:keypairs, a{"keys":[…]}JWKS, adata:URI or a URL.
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 |
|---|---|
default | catchup-source is the whole URL. |
append | The 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, fs | Following the Flussonic server's URL convention. |
xc | Following the /timeshift/… convention of Xtream Codes style APIs. |
vod | Plays 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
- Kodi video add-ons and any
plugin://…link; - add-on repositories and
addons.xmlfiles; - installs from zip files;
- web-page scraping with
#WEBPROPor links that start with@.
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
license_type=com.widevine.alpha: the DRM system is Widevine.license_key=…|Content-Type=application%2Foctet-stream|R{SSM}|R: send licence requests tolicense.example.comwith aContent-Typeheader, raw body and raw response.mimetype=application/dash+xml: the stream is DASH.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
- Write the M3U list as in the M3U guide.
- Add the
#KODIPROPlines right after the channel's#EXTINF, before the link line, one property per line. - URL-encode header values (
/→%2F,:→%3A). - For
.strm: create a text file with only the stream URL (plus#KODIPROPlines 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
- 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.
- 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
.strmfile. - If the playlist has no
x-tvg-url, addx-tvg-url="<XMLTV URL>"to its#EXTM3Uline (see the XMLTV guide). - Read the import message: entries that need a Kodi add-on or web-page scraping are counted under Details.
Common mistakes
| Case | Symptom | What to do |
|---|---|---|
Headers attached with | to a manifest URL | No error: TS IPTV accepts it | Kodi 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 stream | Does not play; a DRM message is shown | ClearKey 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://… entries | Skipped, listed under Details | They need a Kodi add-on; they cannot run in TS IPTV. |
What TS IPTV supports
| Feature | Android | iOS | Desktop |
|---|---|---|---|
| PVR IPTV Simple M3U attributes | Supported | Supported | Supported |
mimetype, manifest_type | Supported | Supported | Supported |
Headers (*_headers, #EXTVLCOPT, |) | All headers | Best effort | User-Agent and Referer only |
DASH .mpd streams without DRM | Supported | Supported through the built-in VLC player; only the User-Agent and Referer headers are sent | Supported |
| Widevine, PlayReady | Android only | Not supported | Not supported |
| ClearKey | DASH only | Not supported | Not supported |
| Catch-up | Stored, playback coming later | ||
.strm files | Supported | Supported | Supported |
Kodi add-ons, plugin://, repositories, #WEBPROP | Not supported | ||