Automatically download subtitles for a given video file, from multiple subtitle sources
In order to run this project, the following tools are required
- Php 5.6 or higher
- Composer
- Opensubtitles.org account (optional)
Installing this project can be done with the following steps:
git clone https://github.com/PtrTn/AutoSubtitles.git
cd AutoSubtitles
composer install
Optional (skipping this step will prevent downloading subtitles from Opensubtitles):
4. cp app/config.yml.dist app/config.yml
5. Enter username and password
6. For development purposes the default user agent can be used, in other cases a new user agent should be requested
After installing, subtitles can be downloaded using the following command:
bin/console app:subtitles:download {video file}
Running this command will download subtitles for the given video file. Subtitles are matched based on video hash, rather than filename which proves to be more accurate. Subtitles are downloaded from SubDb.com and Opensubtitles.org. Downloaded subtitle files are renamed to match the given input video file and will have a suffix indicating its source and language.
Running the following command:
bin/console app:subtitles:download var/Legion.S01E01.720p.HDTV.x264-FLEET[eztv].mkv
Will place the following two files in the same directory
Legion.S01E01.720p.HDTV.x264-FLEET[eztv].OpenSubtitles-EN.srt
Legion.S01E01.720p.HDTV.x264-FLEET[eztv].SubDb-EN.srt
Opening the video file in VLC player will automatically load the subtitle files as below
- Configurable languages
- Allow downloading of subtitles for multiple files at once
- Checking for rate limits
- Caching
- Domain specific exceptions for nicer reporting
- Async downloading
- Client side application
- When no subtitles are found, empty subtitle file is created