Shifts SRT subtitle files by ms.
Make sure you have Node.js 6+ installed. Then install subshift:
npm install -g subshift
Add a delay to all subtitles:
subshift shift file.srt 3000
Add a negative a delay:
subshift shift file.srt -200
When you specify a second shift, subshift will perform a linear correction:
subshift shift file.srt 1000 2000
This will shift the first subtitle with 1 second and the last with 2 seconds, it will distribute the delays in between in a linear fashion.
Sync allows you to do a linear correction by providing the correct times for the start of the first and last subtitle.
subshift sync file.srt 00:01:30 01:30:52
This basically does the same as a shift with a start and end shift, but is more convenient because you don't have to calculate the shift durations yourself.
Beware that subshift overwrites the origin file by default, you can create a backup or separate output file:
subshift file.srt 3000 -o file-sync.srt
subshift file.srt 3000 -b # Creates file.srt.bak with the original file
Display help:
subshift --help
- Provide reference points for linear shifts.
- Ability to provide seconds instead of milliseconds