Subpytles allows you to edit your ".srt" subtitles file to delay all of them directly from the terminal.
The purpose of this project is to delay the subtitles of a srt file that does not exactly match the movie timing.
This version is for python3. If you are using python2 checkout the python2 branch.
- delay subtitles appearance for the whole file
- slice out a part of a file and optionnaly apply a delay on it.
positional arguments:
filepath Path of srt file
optional arguments:
-h, --help show this help message and exit
--delay -d Delay in milliseconds, positive or negative
--start -s Treat subtitles from this time
--end -e Treat subtitles until this time
Output subtitles and forward them of 6 seconds
./subpytles.py --delay 6000 /path/to/your/file.srt
Output subtitles and backward them of 8 seconds. Save it into a new file called updated_subtitles.srt
./subpytles.py --delay -8000 /path/to/your/file.srt > updated_subtitles.srt
Extract subtitles after time 0:01:41
./subpytles.py --start=0:01:41 fixtures/subtitles.srt
Extract subtitles between time 0:01:41 and 0:01:43,400
./subpytles.py --start=0:01:41 --end=0:01:43,400 fixtures/subtitles.srt
Extract subtitles between time 0:01:41 and 0:01:43,400 and apply a delay onto it
./subpytles.py --delay=5000 --start=0:01:41 --end=0:01:43,400 fixtures/subtitles.srt
Extract subtitles between time 0:01:41 and 0:01:43,400. Apply a delay onto it. Save it into updated_subtitles.srt
./subpytles.py --delay=5000 --start=0:01:41 --end=0:01:43,400 fixtures/subtitles.srt > updated_subtitles.srt
Use the great VLC player and press "h" and "j" keys to delay subtitles. VLC will display the delay in milliseconds. That's the information you need for this script.
Mac OS and Linux (actually all Unix based system with python).