subshift

2.0.2 • Public • Published

Pipeline Status

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

Readme

Keywords

Package Sidebar

Install

npm i subshift

Weekly Downloads

0

Version

2.0.2

License

ISC

Unpacked Size

11 kB

Total Files

8

Last publish

Collaborators

  • ngerritsen