Stremio-compatible addons
An addon is a small web service, or even a folder of static JSON files, that answers a handful of HTTP requests with catalogues, details and stream links. The addon protocol is open and documented; TS IPTV can use any addon that follows it and returns ordinary video links.
TS IPTV includes no channels and no addons. Nothing is pre-installed and TS IPTV does not recommend any addon. Addons are third-party services that you add yourself; you are responsible for having the rights to what you watch through them.
The protocol was created for the Stremio app and is published as the open stremio-addon-sdk specification. TS IPTV is not affiliated with or endorsed by Stremio; “Stremio-compatible” only describes the protocol. Every example uses TS IPTV's own sample addon on tsiptv.web.app, public-domain films from archive.org, a public test stream or example.com placeholders.
What an addon is
An addon is identified by the link to its manifest, a JSON file that always ends in /manifest.json. The manifest says what the addon offers: which content types (movie, series, tv…), which catalogues, and which resources (catalogue lists, details, streams, subtitles). The player then builds further URLs from the manifest's address and requests them with plain HTTP GET. Every answer is JSON. There is no login, no session and no custom transport, which is why an addon can be as simple as a set of files on a static web host.
Addons are useful for publishing your own collection with posters, descriptions, seasons and episodes, for example a home media server, a licensed service you operate, or an archive of public-domain films.
The protocol
The normative text is the SDK's protocol.md and the API reference. This section summarises what an addon author needs.
URLs
The base URL is the manifest link without /manifest.json. All other requests are built from it:
GET {base}/manifest.json
GET {base}/{resource}/{type}/{id}.json
GET {base}/{resource}/{type}/{id}/{extra}.json
| Resource | type | id | Response |
|---|---|---|---|
catalog | the catalogue's type | the catalogue id from the manifest | { "metas": [ … ] } |
meta | the item's type | the item id from the catalogue | { "meta": { … } } |
stream | the item's type | the video id (a film: its own id; an episode: the episode id; tv: the channel id) | { "streams": [ … ] } |
subtitles | the item's type | the video id | { "subtitles": [ … ] } |
addon_catalog | from addonCatalogs | from addonCatalogs | { "addons": [ … ] } |
- A query string on the manifest link is kept and added after
.jsonof every request. Anything before/manifest.jsonis kept too; configurable addons put the user's settings there, for examplehttps://addon.example.com/eyJsYW5nIjoiZW4ifQ/manifest.json. - SDK servers answer 404
{"err":"not found"}for unknown resources and 500{"err":"handler error"}when a handler fails; they may also answer with a 307 redirect. Static hosts answer 404 for any file that does not exist.
Encoding: path segments and extra
resource,typeandidare each encoded like JavaScript'sencodeURIComponent: every byte except letters, digits and- _ . ! ~ * ' ( )becomes%XX. Sott1234567:1:2is sent astt1234567%3A1%3A2.extraisname=valuepairs joined with&, each name and value encoded the same way:search=his%20girl&skip=100. A space is%20, never+; a literal&or=inside a value becomes%26or%3D.- Extras that allow several values repeat the name:
genre=Action&genre=Comedy. TS IPTV writes extras in the order the manifest declares them, withskiplast, and leaves out the/{extra}segment when there are none.
Manifest
| Field | Required | Meaning |
|---|---|---|
id | yes | Reverse-DNS identifier, for example com.example.myaddon. The same id added again means an update. |
version | yes | Version string, normally semver (1.0.0). |
name | yes | Display name. |
description | yes (spec) | One or two sentences. |
types | yes | Content types: movie, series, channel, tv, or any other string. |
resources | yes | "catalog", "meta", "stream", "subtitles", "addon_catalog", or objects { "name": "stream", "types": ["movie"], "idPrefixes": ["ex_"] }. |
catalogs | yes (may be []) | List of catalogues (below). |
idPrefixes | no | Only ids starting with one of these are sent to the addon, for example ["ex_"]. |
addonCatalogs | no | Lists of other addons (type, id, name). |
behaviorHints | no | adult, p2p, configurable, configurationRequired, epgProvider, all booleans. |
logo, background, contactEmail | no | Logo (256×256 PNG), background image, contact address. |
A catalogue is { "type", "id", "name", "extra": [ … ] }. The same id may be used for several types. Each extra entry is { "name", "isRequired", "options", "optionsLimit" }:
| Extra | Meaning |
|---|---|
search | Free-text search. isRequired: true makes a search-only catalogue that is never shown as a row. |
genre | Filter; the values come from options. A required genre starts on its first option. |
skip | Paging (below). |
| other names | Allowed; declare them the same way. |
Older manifests use extraSupported/extraRequired string lists and a separate genres list; TS IPTV reads those too, but extra wins when both are present.
Paging
A catalogue page holds up to 100 items. The first page is requested without skip; the following pages with skip=100, skip=200 and so on. The specification says a page with fewer than 100 items is the end. TS IPTV is more lenient: it asks for the next page with skip equal to the number of items received so far and stops at an empty page, a page with no new ids, or an error answer after a short page (a static host's 404). Only declare skip if your catalogue has more than one page.
Catalogue items and details
| Field | Where | Meaning |
|---|---|---|
id, type, name | both | Required. |
poster, posterShape | both | Image; shape poster (portrait, default), square or landscape. |
genres, releaseInfo, description, imdbRating | both | Text shown on cards and on the detail page. |
background, logo, released, runtime, language, country, links | meta | Detail page fields. released is ISO 8601; runtime is text such as "92 min". |
videos | meta | Episodes of a series (or a channel's videos). Without videos, the item has one video whose id is the item id. |
behaviorHints.defaultVideoId, behaviorHints.isLive | meta | Open this video directly; a live item (tv implies live). |
A video is { "id", "title", "released", "season", "episode", "thumbnail", "overview" }. Season 0 means specials. A released date in the future marks an upcoming episode. If a video carries its own streams array, those are the only streams used for it.
Streams
Each stream object has exactly one source and some labels:
| Field | Meaning |
|---|---|
url | A direct https (or http) link: MP4, MKV, HLS .m3u8, DASH .mpd. |
externalUrl | A web page to open in a browser. |
name | Short label, for example the quality. |
description (older: title) | Longer label, may have several lines. |
behaviorHints.proxyHeaders.request | HTTP headers to send with every request for this stream, for example { "User-Agent": "…", "Referer": "…" }. The specification requires notWebReady: true alongside. |
behaviorHints.notWebReady | The link cannot play directly in a web browser (not MP4, plain http, or needs headers). |
behaviorHints.bingeGroup | Streams of the same group are preferred for the next episode. |
behaviorHints.filename, videoSize | File name and size; helps players guess the format. |
behaviorHints.countryWhitelist | ISO 3166-1 alpha-3 codes (lower case) where the stream works. |
Other source fields exist in the specification; TS IPTV does not use them (see What TS IPTV plays). Order streams from highest to lowest quality.
Subtitles
GET {base}/subtitles/{type}/{videoId}.json, optionally with videoHash, videoSize and filename in extra, returns { "subtitles": [ { "id", "url", "lang", "label" } ] }. lang is an ISO 639-2 code such as eng; files are SRT or VTT. TS IPTV does not use subtitle addons yet.
Caching
Any response may carry cacheMaxAge, staleRevalidate and staleError (seconds). The SDK turns them into a Cache-Control header and also keeps them in the JSON. TS IPTV honours Cache-Control first, then these fields, then its own defaults (catalogues 1 hour, details 6 hours, streams 5 minutes), and never keeps stream answers longer than 5 minutes.
Types and ids
Types are free strings; movie, series, channel and tv are the common ones. Ids are opaque. Give your ids a prefix of your own (ex_news, tspd_his_girl_friday) and declare it in idPrefixes, so the player only asks your addon about your items. Episode ids are separate ids, for example tspd_superman_s1e1.
Complete example: the sample addon
TS IPTV publishes a small static addon, the Public Domain Sampler, as a live example and QA fixture. It has one film (His Girl Friday, 1940), one cartoon series (Fleischer Superman, 1941–43), both public domain on archive.org, and one live channel that plays the Mux public test stream (Big Buck Bunny © Blender Foundation, CC BY 3.0). Its manifest link is https://tsiptv.web.app/examples/stremio-sampler/manifest.json.
These are all its files; each one is exactly the URL a player requests:
manifest.json
catalog/movie/tspd-movie.json
catalog/movie/tspd-movie/genre=Comedy.json
catalog/series/tspd-series.json
catalog/tv/tspd-tv.json
meta/movie/tspd_his_girl_friday.json
meta/series/tspd_superman.json
meta/tv/tspd_test_hls.json
stream/movie/tspd_his_girl_friday.json
stream/series/tspd_superman_s1e1.json
stream/tv/tspd_test_hls.json
manifest.json
{
"id": "org.tsiptv.publicdomain.static",
"version": "1.0.0",
"name": "Public Domain Sampler (static)",
"description": "Public-domain films and cartoons from archive.org, plus a public HLS test channel. Static JSON on GitHub Pages.",
"resources": ["catalog", "meta", "stream"],
"types": ["movie", "series", "tv"],
"idPrefixes": ["tspd_"],
"catalogs": [
{ "type": "movie", "id": "tspd-movie", "name": "Public Domain Movies",
"extra": [ { "name": "genre", "isRequired": false, "options": ["Comedy"] } ] },
{ "type": "series", "id": "tspd-series", "name": "Public Domain Cartoons" },
{ "type": "tv", "id": "tspd-tv", "name": "Test Channels" }
],
"behaviorHints": { "adult": false, "p2p": false }
}
Three catalogues, one per type. The movie catalogue declares a genre extra with a single option, so exactly one extra file exists: catalog/movie/tspd-movie/genre=Comedy.json (a copy of the unfiltered list). idPrefixes is tspd_, and ids use _, never :, because every id becomes a file name.
catalog/movie/tspd-movie.json
{
"metas": [
{ "id": "tspd_his_girl_friday", "type": "movie", "name": "His Girl Friday",
"poster": "https://archive.org/services/img/his_girl_friday",
"releaseInfo": "1940", "genres": ["Comedy"] }
]
}
Requested as …/catalog/movie/tspd-movie.json. The catalogue does not declare skip, so this single page is the whole catalogue and no further page is requested.
meta/series/tspd_superman.json
{
"meta": {
"id": "tspd_superman", "type": "series", "name": "Fleischer Superman (1941-43)",
"poster": "https://archive.org/services/img/superman_the_mechanical_monsters",
"releaseInfo": "1941-1943", "genres": ["Animation"],
"description": "Fleischer Studios Superman cartoons, public domain.",
"videos": [
{ "id": "tspd_superman_s1e1", "title": "The Mechanical Monsters",
"season": 1, "episode": 1, "released": "1941-11-28T00:00:00.000Z",
"thumbnail": "https://archive.org/services/img/superman_the_mechanical_monsters" }
]
}
}
A series lists its episodes in videos. The episode id tspd_superman_s1e1 is what the stream request uses.
stream/movie/tspd_his_girl_friday.json and stream/tv/tspd_test_hls.json
{
"streams": [
{ "name": "archive.org", "description": "MP4 · 512kb",
"url": "https://archive.org/download/his_girl_friday/his_girl_friday_512kb.mp4",
"behaviorHints": { "filename": "his_girl_friday_512kb.mp4" } }
]
}
{
"streams": [
{ "name": "HLS", "description": "Mux public test stream",
"url": "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
"behaviorHints": { "notWebReady": true,
"proxyHeaders": { "request": { "User-Agent": "TSIPTV-Example/1.0" } } } }
]
}
The film's stream is a direct MP4 url with a filename hint. The live channel's stream is HLS and asks for a User-Agent header through proxyHeaders.request; TS IPTV sends it with every playlist and segment request. The remaining files follow the same pattern: series catalogue, tv catalogue, film details, channel details, episode stream, Comedy genre file.
Create your own addon
Option 1: static JSON files (no server)
- Download the sample files above into a folder with the same tree.
- Edit
manifest.json: a newid(reverse-DNS of a domain you control),name,description, your ownidPrefixesand catalogues. - For each catalogue, write
catalog/{type}/{catalogId}.json. Add one file pergenreoption (catalog/{type}/{catalogId}/genre={option}.json) and, for more than 100 items,…/skip=100.json,…/skip=200.json. - For each item, write
meta/{type}/{id}.json; for each film, episode or channel,stream/{type}/{videoId}.json. - Keep ids and
extravalues URL-safe: letters, digits,_and-. Validate each file as JSON (VS Code shows errors as you type). - Test locally: in the folder run
npx http-server . --cors -c-1and addhttp://127.0.0.1:8080/manifest.json(Android emulator:http://10.0.2.2:8080/manifest.json).
Limits of static hosting: no free-text search (queries cannot be pre-generated), one file per genre and page, and no : in ids (the host would look for a file name with :, which Windows and some hosts do not allow).
Option 2: the Node.js SDK
With the official SDK (Node.js 12 or later) you write handlers instead of files, which allows search, large catalogues and computed answers. serveHTTP adds the CORS headers for you and turns the cacheMaxAge, staleRevalidate and staleError values your handlers return into a Cache-Control header.
package.json:
{
"name": "my-publicdomain-addon",
"version": "1.0.0",
"main": "addon.js",
"scripts": { "start": "node addon.js" },
"dependencies": { "stremio-addon-sdk": "^1.6.10" }
}
addon.js (the sample addon with search, genre filter and paging):
const { addonBuilder, serveHTTP } = require('stremio-addon-sdk')
const ITEMS = [
{ id: 'tspd_his_girl_friday', type: 'movie', name: 'His Girl Friday',
releaseInfo: '1940', genres: ['Comedy'],
poster: 'https://archive.org/services/img/his_girl_friday',
streams: [{ name: 'archive.org', description: 'MP4 512kb',
url: 'https://archive.org/download/his_girl_friday/his_girl_friday_512kb.mp4',
behaviorHints: { filename: 'his_girl_friday_512kb.mp4' } }] },
{ id: 'tspd_superman', type: 'series', name: 'Fleischer Superman (1941-43)',
releaseInfo: '1941-1943', genres: ['Animation'],
poster: 'https://archive.org/services/img/superman_the_mechanical_monsters',
videos: [{ id: 'tspd_superman_s1e1', title: 'The Mechanical Monsters',
season: 1, episode: 1, released: '1941-11-28T00:00:00.000Z',
streams: [{ name: 'archive.org', description: 'MP4 512kb',
url: 'https://archive.org/download/superman_the_mechanical_monsters/superman_the_mechanical_monsters_512kb.mp4' }] }] },
{ id: 'tspd_test_hls', type: 'tv', name: 'HLS Test Channel',
posterShape: 'square', poster: 'https://archive.org/services/img/his_girl_friday',
streams: [{ name: 'HLS', description: 'Mux public test stream',
url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
behaviorHints: { notWebReady: true,
proxyHeaders: { request: { 'User-Agent': 'TSIPTV-Example/1.0' } } } }] }
]
const PAGE = 100
const builder = new addonBuilder({
id: 'org.example.publicdomain', version: '1.0.0', name: 'My Public Domain Addon',
description: 'Public-domain films and cartoons, plus a public HLS test channel.',
resources: ['catalog', 'meta', 'stream'], types: ['movie', 'series', 'tv'],
idPrefixes: ['tspd_'],
catalogs: ['movie', 'series', 'tv'].map(type => ({
type, id: 'tspd-' + type, name: 'Public Domain ' + type,
extra: [{ name: 'search' }, { name: 'genre', options: ['Animation', 'Comedy'] }, { name: 'skip' }]
})),
behaviorHints: { adult: false, p2p: false }
})
const preview = i => ({ id: i.id, type: i.type, name: i.name, poster: i.poster,
posterShape: i.posterShape, genres: i.genres, releaseInfo: i.releaseInfo })
builder.defineCatalogHandler(({ type, id, extra }) => {
let list = ITEMS.filter(i => i.type === type && id === 'tspd-' + type)
if (extra.genre) list = list.filter(i => (i.genres || []).includes(extra.genre))
if (extra.search) list = list.filter(i => i.name.toLowerCase().includes(extra.search.toLowerCase()))
const skip = parseInt(extra.skip || '0', 10) || 0
return Promise.resolve({ metas: list.slice(skip, skip + PAGE).map(preview), cacheMaxAge: 3600 })
})
builder.defineMetaHandler(({ type, id }) => {
const i = ITEMS.find(x => x.id === id && x.type === type)
if (!i) return Promise.resolve({ meta: null })
const meta = preview(i)
if (i.videos) meta.videos = i.videos.map(({ streams, ...v }) => v)
return Promise.resolve({ meta, cacheMaxAge: 3600 })
})
builder.defineStreamHandler(({ type, id }) => {
for (const i of ITEMS) {
if (i.id === id && i.streams) return Promise.resolve({ streams: i.streams, cacheMaxAge: 600 })
const v = (i.videos || []).find(v => v.id === id)
if (v) return Promise.resolve({ streams: v.streams, cacheMaxAge: 600 })
}
return Promise.resolve({ streams: [] })
})
serveHTTP(builder.getInterface(), { port: process.env.PORT || 7000 })
- Run
npm install, thennpm start. The SDK prints the manifest link,http://127.0.0.1:7000/manifest.json. - Add that link in TS IPTV on the same computer, or
http://10.0.2.2:7000/manifest.jsonfrom an Android emulator, orhttp://<your computer's LAN address>:7000/manifest.jsonfrom a phone or TV on the same network. - To publish it, deploy to any Node.js host that gives you an HTTPS address, and use
https://<your host>/manifest.json.
The SDK can also generate a configuration page (config in the manifest) and mount the addon in an existing Express app; see the SDK README.
Host it
- HTTPS. The specification requires HTTPS for everything except
127.0.0.1. TS IPTV also acceptshttp://, with the warning “This addon does not use an encrypted connection”. - CORS. The specification requires
Access-Control-Allow-Origin: *on every route, including/manifest.json. TS IPTV is an installed app and does not need it, but web-based players do, so add it. - Cache headers. A short
Cache-Control: public, max-age=600on catalogues and details is a good default; keep stream answers short-lived if the links expire. - Content type. Serve
.jsonasapplication/json. No redirect from/file.jsonto/file.json/.
| Host | What to do |
|---|---|
| GitHub Pages | Push the file tree to a repository and enable Pages. Add an empty .nojekyll file at the root so files are served unchanged. Pages already sends Access-Control-Allow-Origin: *. Manifest: https://<user>.github.io/<repo>/manifest.json. |
| Firebase Hosting | Add a header rule in firebase.json: {"source": "**/*.json", "headers": [{"key": "Access-Control-Allow-Origin", "value": "*"}]}. TS IPTV's sample addon is hosted this way. |
| Netlify | A _headers file at the root with /* and, on the next line, Access-Control-Allow-Origin: *. |
| Vercel | vercel.json: {"headers": [{"source": "/(.*)", "headers": [{"key": "Access-Control-Allow-Origin", "value": "*"}]}]}. |
| Any web server | Serve the folder as static files and add the CORS header, for example in nginx: add_header Access-Control-Allow-Origin *; |
| Node.js SDK | Any Node.js host with HTTPS; serveHTTP sets the CORS headers itself; Cache-Control comes from the cacheMaxAge your handlers return. |
A GitHub blob/ page or a file-sharing page is not an addon: the manifest link must return the JSON itself.
Add it in TS IPTV
- Phone, tablet, iOS and desktop: Profile → Addons → Add addon. Android TV: Settings → Addons → Add addon (type the link with the on-screen keyboard).
- Paste the manifest link (it ends with
/manifest.json). Astremio://…/manifest.jsoninstall link also works; TS IPTV turns it intohttps://, orhttp://for local and LAN hosts (localhost,127.0.0.1,10.x,192.168.x,172.16–31.x). - Choose Continue. The preview shows the name, version, host, content types, number of catalogues, whether the addon provides streams, and any warning (not encrypted, peer-to-peer, adult content).
- Read and accept the notice (“Addons are third-party services, not operated by TS IPTV…”), then choose Add.
- Discover appears: on phones between Home and History, on TV at the top of the Home rail. It shows one row per catalogue; open a title and choose a stream to play it.
If the manifest says configurationRequired, TS IPTV does not add it yet: choose Configure to open the addon's /configure page in your browser (on TV the address is shown as text), finish there, and paste the link it gives you. Manage addons (enable, reorder, update, remove) in the same Addons screen. Addon links can contain personal settings, so TS IPTV stores them encrypted and shows only the host.
Common mistakes
| Mistake | Symptom | Fix |
|---|---|---|
The link does not end with /manifest.json | “Enter the addon's manifest link. It ends with /manifest.json.” | Use the manifest link, not the addon's web page. |
A manifest field missing (id, name, version, types, resources) | “This link did not return a valid addon manifest.” | Add the field; check the file is valid JSON. |
+ instead of %20 in a static file name | Genre or search file not found | Players send %20; name files with URL-safe values only. |
: in ids of a static addon | Files cannot be created on Windows, or 404s | Use _ or - in ids. |
| Pages of 20 items | Other apps stop after the first page | Return 100 items per page; only the last page may be shorter. |
idPrefixes that do not match your ids, or "stream" missing from resources | Details or streams never requested | Declare every resource you serve and a prefix all your ids share. |
A video with its own streams | No other addon is asked for that video | Leave inline streams out unless they are the only ones. |
configurationRequired: true | “This addon must be configured first.” | Configure it in the browser and paste the configured link. |
A link on 127.0.0.1:11470 | “This address belongs to the Stremio app's own local server…” | That server belongs to another app; it is not an addon. |
An old /stremio/v1 addon | “This is an old-style addon that TS IPTV cannot use.” | Only the current HTTP protocol is supported. |
An addon that offers only sources other than url | “No playable stream was found for this title.” | TS IPTV plays url streams only; see below. |
| No CORS header | Works in TS IPTV, fails in web players | Add Access-Control-Allow-Origin: *. |
GitHub Pages without .nojekyll | Files starting with _ missing | Add an empty .nojekyll. |
| Expired or signed stream links cached for long | Streams fail after a while | Keep cacheMaxAge short on stream answers. |
What TS IPTV plays
| Feature | Android | iOS | Desktop |
|---|---|---|---|
url streams: HTTPS/HTTP MP4, HLS | Supported | Supported | Supported |
url streams: DASH .mpd without DRM | Supported | Supported through the built-in VLC player; only the User-Agent and Referer headers are sent | Supported |
url streams: MKV | Supported | May not play | Supported |
proxyHeaders.request | All headers | Best effort | User-Agent and Referer only |
externalUrl | Opens in your browser after you confirm; on a TV without a browser the link is shown as text. stremio:///… page links open the matching TS IPTV screen. | ||
| Torrent, Usenet, archive and YouTube streams | Not supported | ||
Catalogues, genre filter, search, paging, series with seasons, live tv items | Supported | ||
configurable, configurationRequired | Supported Through the addon's configuration page in the browser. | ||
adult, p2p hints | Warnings when adding; adult addons need an 18+ confirmation and are left out of Discover rows and search. | ||
| Continue watching and resume for addon films and episodes | Supported | ||
Subtitles, EPG addons (epgProvider), addon lists (addon_catalog), auto-play of the next episode | Not yet | ||
TS IPTV has no built-in addons and does not suggest any. Addons can be disabled remotely only when a takedown request requires it.