Subtitles, faster than your thoughts
Project description
Subtitles, faster than your thoughts.
- Project page:
- Documentation:
- Community:
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
Configuration
Arguments can be passed to the CLI using a configuration file. By default it looks for a subliminal.toml file in the default configuration folder (see the CLI help for the exact platform-specific default path). Or use the -c option to specify the path to the configuration file.
Look for this example configuration file or use the generate_default_config function from the subliminal.cli module to generate a configuration file with all the options and their default values:
$ python -c "from subliminal.cli import generate_default_config; print(generate_default_config())"
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 ghcr.io/diaoul/subliminal download -l en /tvshows/The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
Debugging
By default, subliminal output is minimal. Run with the –debug flag before the download command to get more information:
$ subliminal --debug download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
Installation
For a better isolation with your system you should use a dedicated virtualenv. The preferred installation method is to use pipx that does that for you:
$ pipx install subliminal
Subliminal can be also be installed as a regular python module by running:
$ pip install --user subliminal
If you want to modify the code, fork this repo, clone your fork locally and install a development version:
$ git clone https://github.com/<my-username>/subliminal $ cd subliminal $ pip install --user -e '.[docs,types,tests,dev]'
To extract information about the video files, subliminal uses knowit. For better results, make sure one of its provider is installed, for instance MediaInfo.
Integrations
Subliminal integrates with various desktop file managers to enhance your workflow:
Nautilus/Nemo: See the dedicated project page for more information.
Dolphin: See this Gist. for more details.
Contributing
We welcome contributions from the community! If you’re interested in contributing, here are a few ways you can get involved:
Browse Issues and Pull Requests: Check out the existing Issues and Pull Requests to see where you can help.
Report Bugs or Request Features: If you encounter a bug or have a feature request, please create a GitHub Issue.
Follow the Contribution Guide: For detailed instructions on how to contribute, please refer to our Contribution Guide.
Your contributions are greatly appreciated and help make this project better for everyone!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file subliminal-2.5.0.tar.gz.
File metadata
- Download URL: subliminal-2.5.0.tar.gz
- Upload date:
- Size: 3.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c79507e9c304895fb41eb0039b11f5abcb9f77376fe550cb605932836dfadc3
|
|
| MD5 |
da4f9e182e1e823584b99e24dfda53ce
|
|
| BLAKE2b-256 |
74f62ab857184363b1153212be632e88c66b2332329d2793c98d5bba5c2efc34
|
Provenance
The following attestation bundles were made for subliminal-2.5.0.tar.gz:
Publisher:
publish.yaml on Diaoul/subliminal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subliminal-2.5.0.tar.gz -
Subject digest:
3c79507e9c304895fb41eb0039b11f5abcb9f77376fe550cb605932836dfadc3 - Sigstore transparency entry: 763985148
- Sigstore integration time:
-
Permalink:
Diaoul/subliminal@052ac8c0a97d6cdc7825bc81f1f0cf0105acb7d5 -
Branch / Tag:
refs/tags/2.5.0 - Owner: https://github.com/Diaoul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@052ac8c0a97d6cdc7825bc81f1f0cf0105acb7d5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file subliminal-2.5.0-py3-none-any.whl.
File metadata
- Download URL: subliminal-2.5.0-py3-none-any.whl
- Upload date:
- Size: 114.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
219f969024882c4699416a4b155ba0ddf09c0952e4c15aefc52db4003cc8226e
|
|
| MD5 |
c7e02e2fabb0947a4ae8c4df70889ba2
|
|
| BLAKE2b-256 |
2e230bd7d3e1878c682b90370982bb1e750870d5b97bfcfda5aa78d0a40f5f4a
|
Provenance
The following attestation bundles were made for subliminal-2.5.0-py3-none-any.whl:
Publisher:
publish.yaml on Diaoul/subliminal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
subliminal-2.5.0-py3-none-any.whl -
Subject digest:
219f969024882c4699416a4b155ba0ddf09c0952e4c15aefc52db4003cc8226e - Sigstore transparency entry: 763985151
- Sigstore integration time:
-
Permalink:
Diaoul/subliminal@052ac8c0a97d6cdc7825bc81f1f0cf0105acb7d5 -
Branch / Tag:
refs/tags/2.5.0 - Owner: https://github.com/Diaoul
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@052ac8c0a97d6cdc7825bc81f1f0cf0105acb7d5 -
Trigger Event:
release
-
Statement type: