Stremio service for OpenSubtitles

subtitles, opensubtitles, stremio
npm install stremio-opensubtitles@0.16.2



OpenSubtitles add-on for Stremio.

Functionalities include:

  • Find subtitle files for the currently playing video
  • Calculate opensubtitles video hash for currently playing video
  • Load and parse an srt file into individual tracks

Using with Stremio

This add-on is hosted at so you can go ahead and install it from there.

Alternatively, you can run locally by:

git clone
cd stremio-opensubtitles
npm install
npm start
open http://localhost:3011/stremio/v1 # open in browser, install from there

Proxying to vtt or srt

Often when building web applications, or doing casting to limited devices, it's important that we can serve a clean, UTF8 encoded .srt or .vtt file, often with CORS support.

This add-on has a function which it exports called proxySrtOrVtt which would proxy any URL to an srt or vtt, which may be zipped or gzipped, to a UTF8-encoded VTT or SRT.

How to use with connect/express:

var subtitles = require("stremio-opensubtitles");
app.get("/subtitles.:ext", subtitles.proxySrtOrVtt);

Example on the front-end:

.then(function(res) {  /* res will be an array of all subtitle tracks */})
.catch(function(e) { console.error(e) })

NOTE: in standalone mode (running via npm start), those endpoints (/subtitles.vtt, / will be accessible by default.

Expose subtitles.hash

By default, this function is not exposed, because Stremio can possibly send subtitles.hash calls for localhost:11470... addresses, which this add-on cannot access when it's hosted remotely.

The local instance of this add-on will expose this method by using this code:

var subtitles = require('stremio-opensubtitles');
subtitles.methods['subtitles.hash'] = subtitles.subtitlesHash;