Menu

Home

Cristiano

Welcome to the SubtitleTools wiki!

We'll keep this short and sweet, because there currently is just one (1) SubtitleTool, and that's SubtitleOffsetter.

SubtitleOffsetter is a command-line tool to add or subtract an offset to or from the timings specified within an .srt file.

There currently is only one binary release, for Windows, but the C++ code which constitute the source for it is highly portable. The 'Makefile' in svn just needs the '.exe' removed from the OFFSETTER_BIN variable, and it should readily create binaries for any platform. There are no external dependencies needed. It's a fairly basic program.

When and how to use

If you struggle to find a fitting subtitle file for your video, you just use the one closest matching. Then start viewing the video, and keep an eye on the timer. Note down the time when someone starts talking for the first time in the video. Then compare this time to the first timing in the .srt file (just open it in a text editor). Calculate the difference in milliseconds. Use the program to add or subtract the calculated offset to or from all timings.

Command line

Usage is displayed if the program is run without parameters. Just start a command prompt, shell or terminal, cd to the directory where you put the binary, and run the program.

The program needs two parameters:

  • The input .srt file to read.
  • The offset to add (or subtract if negative) to or from the timings specified in the .srt file.

Only one thing left to mention: the output the program produces gets written to standard output (usually the screen). To capture it in an .srt file you need to 'pipe' it to a file, usually by appending "> filename.srt" at the end of your command (no quotes).

Notes

When supplying a negative offset, it can happen that the first few subtitles are shifted out in negative time (negative hⓂ️s). When that happens, they are simply discarded and the rest of them are reindexed, starting again at 1 from the first time a positive one is encountered.