This is a utility for linear shifting of SRT subtitles. Use it when you have a SRT subtitle that is good, except that it runs either too fast or too slow.
To calculate offset and scale you need two sample points, preferrably one near the beginning of the video and one near
the end. v0 and v1 are timestamps at the video start and end, and d0 and d1 are subtitle offsets in seconds
(as you enter them in VLC adjustments).
Usage:
python pysrt.py v0 d0 v1 d1 < file.srt > corrected.srt
For example:
python pysrt.py 00:10:00 -5 01:30:00 -15 < file.srt > corrected.srt