PlayerStream
EN
Ko-fi

Guides / Create an addon

Addon · stream

Link addon.

What gets played. For each movie or episode, your addon says where the video is; the app checks it, sorts it and plays it.

Only content you have permission for. Whoever creates an addon is responsible for what it offers, and whoever adds it to the app, for what they add. Only use videos you have the right to share: your own, public domain or under a license that allows it.

01

What it's for.

When someone opens a title page or taps “Play”, the app asks all its link addons whether they have that title. Yours appear alongside everyone else's, with their quality, size and language.

In the manifest, the stream resource with the type movie, series or both:

manifest.json
{
  "id": "org.example.open-movies",
  "version": "1.0.0",
  "name": "Open Movies (example)",
  "resources": ["stream"],
  "types": ["movie"],
  "idPrefixes": ["tmdb:", "tt"],
  "catalogs": []
}
AndroidAndroid TVWindowsWeb version
02

The request.

WhatAddress the app requests
A movie/stream/movie/tmdb:45745.json or /stream/movie/tt1727587.json
An episode/stream/series/tt1234567:1:2.json (the series id, season 1, episode 2; or tmdb:N:1:2)
  • Which id: if any of your idPrefixes starts with tmdb, with tmdb:N. If you set no prefixes, or tt, with the IMDb one. With only your own prefixes, the app never asks you.
  • Episodes are numbered according to what each user chooses in Settings → Content → Metadata and search (“Series data” and “Anime data”): PlayerStream, TMDB, TVDB or an addon. If the chosen addon provides the IMDb numbering, that one is used.
  • It waits 8 seconds to connect and 20 for a reply; if the connection fails, it tries once more.
  • Your reply is cached for 10 minutes. And if someone chooses “Only available titles in colour”, the app asks in the background about the titles it shows, to colour their posters: reply fast and cache what you can.
  • If you reply 429 (too many requests), the app pauses for 1 minute and then goes one at a time (if it happens again, 5 and then 10 minutes).
03

The response.

A streams list. This example works as is (Sintel, Blender Foundation, CC BY 3.0):

stream/movie/tmdb:45745.json
{
  "streams": [
    {
      "name": "Open Movies\n1080p",
      "title": "Sintel (2010) · Blender Foundation · CC BY 3.0\n1080p · MKV",
      "url": "https://download.blender.org/durian/movies/Sintel.2010.1080p.mkv",
      "behaviorHints": {
        "filename": "Sintel.2010.1080p.mkv",
        "videoSize": 1180090590,
        "bingeGroup": "open-movies"
      }
    },
    {
      "name": "Open Movies\nInfo",
      "title": "About this open movie (blender.org)",
      "externalUrl": "https://www.blender.org/about/projects/"
    }
  ]
}
FieldWhat the app does
urlThe video's address (http or https). If infoHash is also given, url wins.
infoHashA torrent: the app builds the magnet link from this hash.
sourcesWith infoHash: the ones starting with tracker: (up to 10). dht: entries are not used.
fileIdxWith infoHash: which file in the torrent (starting at 0).
name, titleQuality, language and size are read from here (see below). description works the same as title.
behaviorHints.filenameThe name shown in the list (also used to search for subtitles).
behaviorHints.videoSizeThe size in bytes.
behaviorHints.bingeGroupThe next episode is looked for in the same group and the same addon.
behaviorHints.proxyHeaders.requestHeaders for requesting the video, for example {"Referer": "https://your-site/"}.
subtitlesSubtitles for that link (url and lang): they appear first in the list.
externalUrl, ytIdWithout url or infoHash: they appear at the end as extras. externalUrl opens outside the app; ytId, as a trailer.

Not used: notWebReady, proxyHeaders.response, countryWhitelist, videoHash, nzbUrl or rarUrls. And a url starting with magnet: doesn't open: use infoHash.

04

Link types.

Direct address

A file (MKV, MP4, MOV…) or an HLS/DASH stream on your server. Before showing it, the app requests the first byte (Range: bytes=0-0) and reads the beginning to learn the size, resolution and audio tracks. It hides the link for 6 hours if the reply is anything other than 200 or 206, if it's a web page (text/html) or if it's smaller than 40 MB. Your server must accept range requests (Range): without them, seeking forward or back doesn't work.

Torrent

a torrent link
{
  "name": "Mi torrent\n1080p",
  "title": "Mi película (licencia CC BY)",
  "infoHash": "TU_HASH_DE_40_CARACTERES",
  "fileIdx": 0,
  "sources": ["tracker:udp://tracker.example.org:6969/announce"]
}
  • With a debrid service set up, it goes through the debrid. Without one, through the app's torrent engine (“Torrents without debrid”, on by default on Android and Windows). The first time, it warns that while you watch, pieces are shared with other people; upload is capped at 1 MB/s by default.
  • The web version has no torrent engine: only with debrid.
  • Only use torrents you have the right to share: for example, of your own videos.

Ace Stream

A url with acestream://ID (or the 40-character id) opens with the official Ace Stream app, which each user installs: PlayerStream doesn't include it. On Android and Windows; not in the web version.

External link

externalUrl opens a website outside the app (for example, the work's page). For security, addresses without a scheme or of type file:, content:, intent:, javascript: or data: are not opened.

05

Language, quality and order.

The app reads name and title to place and filter each link according to Settings → Player → Links:

  • Quality: 4K, 2160p or UHD, 1080p, 720p, 480p, as a separate word (first in name, then in title).
  • Size: videoSize or text such as 1.2 GB or 700 MB.
  • Language: flags (🇬🇧, 🇪🇸…) or an audio line in title: 🔊 English, Audio: Spanish, English, Languages: French. Names work in Spanish, English, French, Italian, German and Portuguese, as do their 3-letter codes.

Watch the language. By default, the app shows links in the device's language and those that don't state any (“No language”). A link that only says “English” won't show on a phone set to Spanish until the user adds English in Settings → Player → Links. If your video has no clear language (no dialogue, for example), don't set one.

Order: first the ones that state a language, then from highest to lowest quality and, at the same quality, the largest. In the addon's gear (Settings → Content → Addons), each user can choose “Ignore order” (yours is kept) or “Ignore filters” (all of them, without checking the file). You can change this order in Settings → Player → Links → Order.

06

Adding it and watching.

It's added like any addon: Settings → Content → Addons → “Address, JSON or line” → “Add” (step by step, with pictures, in the catalog guide). Then open a movie your addon has a link for and tap “Play”:

The list of links for Sintel: the example addon's one with 1080P, the file name, AC3 5.1 audio and 1.1 GB, and below it the external link “About this open movie”
The example addon's links: the quality, the file name, the audio the app reads from the file itself, and the size. Below, the external link.

If the title page shows “Available”, some addon has a link for that title.

07

Common errors.

What happensWhy
“No links for this.”No addon returned anything; or your prefixes don't match (with only your own prefixes you're never asked); or the id isn't the one you expect (check your server's log).
Your link doesn't show upThe language (see above); or it's smaller than 40 MB; or it replies with HTML or an error when the first byte is requested.
“The addon isn't responding (…).”HTTP error or timeout when requesting the links.
“We were asked to slow down…”You replied 429.
Seeking doesn't workYour server doesn't accept range requests (Range).
It doesn't work on the webhttp address or no CORS on the video: see Publishing your addon.

To test: open …/stream/movie/tmdb:45745.json in the browser and, from the device, the video's address.