Overview
srtshift retimes subtitle files. It reads a subtitle track, moves the timestamps the way you ask, and writes the result back — without touching the dialogue, styling or positioning.
It exists for the three ways a subtitle track tends to go wrong:
- A constant offset. Every line is late or early by the same amount, usually because the track was made for a release with a different intro length.
- A frame-rate mismatch. The track was timed for 23.976 fps but the video is 25 fps (or the reverse), so the drift grows as the film plays.
- A partial drift. Everything is fine until a cut — a removed ad break or a missing scene — and the rest of the file is off from there.
Each of these is one command. Start with installation, then see usage for the full option list.
A first run
Shift a file two seconds earlier and save it next to the original:
srtshift -2s -o episode.fixed.srt episode.srt
srtshift never writes over the input unless you pass
-i. If you give neither -i nor -o, the result goes to standard output so you can preview it.Supported formats
| Format | Extension | Notes |
|---|---|---|
| SubRip | .srt | Full support. |
| Advanced SubStation | .ass, .ssa | Styling and tags preserved; only event times change. |
| WebVTT | .vtt | Cue settings and regions preserved. |
| MicroDVD | .sub | Frame-based; requires --fps to resolve times. |