Skip to content

ngerritsen/subshift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subshift

Shifts SRT subtitle files by ms.

Usage

Make sure you have Node.js 6+ installed. Then install subshift:

Installation

npm install -g subshift

Shift

Add a delay to all subtitles:

subshift shift file.srt 3000

Add a negative a delay:

subshift shift file.srt -200

When you specify a second shift, subshift will perform a linear correction:

subshift shift file.srt 1000 2000

This will shift the first subtitle with 1 second and the last with 2 seconds, it will distribute the delays in between in a linear fashion.

Sync

Sync allows you to do a linear correction by providing the correct times for the start of the first and last subtitle.

subshift sync file.srt 00:01:30 01:30:52

This basically does the same as a shift with a start and end shift, but is more convenient because you don't have to calculate the shift durations yourself.

Output files

Beware that subshift overwrites the origin file by default, you can create a backup or separate output file:

subshift file.srt 3000 -o file-sync.srt
subshift file.srt 3000 -b # Creates file.srt.bak with the original file

Help

Display help:

subshift --help

Feature wishlist ⭐️

  • Provide reference points for linear shifts.
  • Ability to provide seconds instead of milliseconds

About

Shifts SRT subtitle files by ms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published