srt-linear-timeshift(1)

SRT subtitle processing tool

Section 1 python3-srt bookworm source

Description

SRT-LINEAR-TIMESHIFT

NAME

srt-linear-timeshift - SRT subtitle processing tool

DESCRIPTION

usage: srt linear-timeshift [-h] [--input FILE] [--output FILE] [--inplace]
[--no-strict] [--debug] [--ignore-parsing-errors]

[--encoding ENCODING] --from-start FROM_START --to-start TO_START --from-end FROM_END --to-end TO_END

Perform linear time correction on a subtitle.

options:

-h, --help

show this help message and exit

--input FILE, -i FILE

the file to process (default: stdin)

--output FILE, -o FILE

the file to write to (default: stdout)

--inplace, -p

modify file in place

--no-strict

allow blank lines in output, your media player may explode

--debug

enable debug logging

--ignore-parsing-errors, -c

try to keep going, even if there are parsing errors

--encoding ENCODING, -e ENCODING

the encoding to read/write files in (default: utf8)

--from-start FROM_START, --f1 FROM_START

the first desynchronised timestamp

--to-start TO_START, --t1 TO_START

the first synchronised timestamp

--from-end FROM_END, --f2 FROM_END

the second desynchronised timestamp

--to-end TO_END, --t2 TO_END

the second synchronised timestamp

examples:

Stretch out a subtitle so that second 1 is 2, 2 is 4, etc

$ srt linear-timeshift --f1 00:00:01,000 --t1 00:00:01,000 --f2 00:00:02,000 --t2 00:00:03,000