SkillAgentSearch skills...

Subshift

Shifts SRT subtitle files by ms.

Install / Use

/learn @ngerritsen/Subshift
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1y ago
Forks0

Languages

JavaScript

Security Score

55/100

Audited on Oct 10, 2024

No findings