Skip to content
Subliminal - Subtitles, faster than your thoughts
Branch: master
Clone or download
Latest commit a952dfb Feb 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Fix usage.rst May 27, 2016
subliminal Release 2.0.5 Sep 3, 2016
tests Revert "Update opensubtitles unittests and cassettes" Sep 8, 2016
.coveragerc
.dockerignore Add docker support Jun 6, 2016
.gitignore Update to 1.0.dev0 Jul 15, 2015
.travis.yml
CONTRIBUTING.md
Dockerfile Add cache support for docker container and instructions in README Sep 3, 2016
HISTORY.rst Release 2.0.5 Sep 3, 2016
LICENSE Update license to 2016 Feb 9, 2016
MANIFEST.in Complete rewrite of subliminal Oct 29, 2013
README.rst
dev-requirements.txt Add dev-requirements.txt Oct 30, 2015
pytest.ini Merge branch 'score' into develop Feb 2, 2016
requirements.txt Update to 1.0.dev0 Jul 15, 2015
setup.cfg Fix unittests Dec 29, 2015
setup.py Fix for dogpile.cache>=0.6.0 Jun 6, 2016
tox.ini Code style Aug 27, 2015

README.rst

Subliminal

Subtitles, faster than your thoughts.

Latest Version Travis CI build status Documentation Status Code coverage License Join the chat at https://gitter.im/Diaoul/subliminal
Project page:https://github.com/Diaoul/subliminal
Documentation:https://subliminal.readthedocs.org/

Usage

CLI

Download English subtitles:

$ subliminal download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
Collecting videos  [####################################]  100%
1 video collected / 0 video ignored / 0 error
Downloading subtitles  [####################################]  100%
Downloaded 1 subtitle

Library

Download best subtitles in French and English for videos less than two weeks old in a video folder:

#!/usr/bin/env python

from datetime import timedelta

from babelfish import Language
from subliminal import download_best_subtitles, region, save_subtitles, scan_videos

# configure the cache
region.configure('dogpile.cache.dbm', arguments={'filename': 'cachefile.dbm'})

# scan for videos newer than 2 weeks and their existing subtitles in a folder
videos = scan_videos('/video/folder', age=timedelta(weeks=2))

# download best subtitles
subtitles = download_best_subtitles(videos, {Language('eng'), Language('fra')})

# save them to disk, next to the video
for v in videos:
    save_subtitles(v, subtitles[v])

Docker

Run subliminal in a docker container:

$ docker run --rm --name subliminal -v subliminal_cache:/usr/src/cache -v /tvshows:/tvshows -it diaoulael/subliminal download -l en /tvshows/The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4

Installation

Subliminal can be installed as a regular python module by running:

$ [sudo] pip install subliminal

For a better isolation with your system you should use a dedicated virtualenv or install for your user only using the --user flag.

Nautilus/Nemo integration

See the dedicated project page for more information.

You can’t perform that action at this time.