srt-align logo

srt-align DarkfullDante

Use this command to install srt-align:
winget install --id=DarkfullDante.srtAlign -e

a CLI tool to align a subrip file with video file

srt-align is a command-line tool designed to synchronize timestamps in an SRT (SubRip) file with a corresponding video source. This utility helps correct subtitle timing issues, ensuring that text appears on screen at the right moment.

Key Features:

  • Shift Adjustment: Aligns subtitles by applying a proportional time shift, useful when the video and audio have different durations or playback speeds.
  • Linear Adjustment: Corrects offsets caused by incorrect start times, allowing precise alignment of subtitle timestamps with the video.
  • Timestamp Validation: Ensures that all adjusted timestamps conform to the standard SRT format (e.g., [-]##:##:##,###).
  • File Handling: Supports overwriting the original file or generating a new output file named -edited.

Audience & Benefit:
Ideal for content creators, video editors, and anyone requiring precise subtitle alignment. By ensuring accurate synchronization between subtitles and video playback, srt-align enhances user experience and maintains professional quality in media production.

The tool can be installed via winget on Windows systems.

README

SRT Align

SRT Align is a CLI software that can edit timestamp in an SRT file (SubRip) to align the timing with the video Source. The tool can help for two types of offset:

  • Shift: help with different duration of files and one source is faster than the other
  • Linear: when the subtitle is always slightly before or being the video source due to wrong start time

Installation

Windows

Installer

  1. Download the most recent release (srt-align_Setup.exe)
  2. Run the installer

Manual

  1. Download the most recent release (srt-align.exe)
  2. Place the file in your folder of choice
  3. Add the location of srt-align.exe to your environnement variable (PATH) for access from anywhere in cmd/powershell

Linux

Manual

  1. Download the most recent release(srt-align)
  2. Place the file in your folder of choice
  3. Add a symbolic link in /usr/local/bin

Usage

The structure of the commands for the tool is has followed:

> srt-align {--shift|--linear} [OPTIONS...] \ [output]

Options

OptionDescription
-h --helpShow the help panel
-v --versionShow the package version
-s --shiftShifts the timestamp of a file based on a mutiple ratio (floating point value) where 1 means no change.
-l --linearIncrease or decrease the timestamp value of a file based on a timestamp provided. The timestamp must be in a valid format for srt file ([-]##:##:##,###)
-o --overwriteTells the program to overwrite the input file that was provided.

A choice must be made between a shift alignement and a linear alignement. Both cannot be inputed at the same time.

Input/Output

  • input: The input srt file that must be provided. This file is mandatory.
  • output: The ouptut file for the srt file after modification. This item is optional. If this value is ommited, the file will be named after the input name with "-edited" at the end. The file will be placed in the input file directory.

Licence

GPL3

Versions
0.6.1
Website
License