SubtitleScale

SubtitleScale is a command-line utility that solves the common problem of subtitle synchronization when the timing offset increases linearly throughout the video. Unlike simple offset adjustments, this tool handles progressive desynchronization by applying linear interpolation.

GitHub

Problem solved

When subtitles become progressively out of sync with video content, the time difference often increases linearly - from milliseconds at the start to potentially minutes by the end. SubtitleScale fixes this by:

  • Taking the correct timestamps for first and last subtitles
  • Calculating the required time adjustment for each subtitle
  • Applying linear interpolation for all subtitles in between

Technical implementation

The core functionality includes:

  • Time string parsing and manipulation
  • Linear interpolation algorithm
  • SRT format parsing and generation
  • UTF-8 text processing