Scroll to navigation

SRT-PROCESS(1) User Commands SRT-PROCESS(1)

NAME

srt-process - SRT subtitle processing tool

DESCRIPTION

usage: srt process [-h] [--input FILE] [--output FILE] [--inplace]

[--no-strict] [--debug] [--ignore-parsing-errors] [--encoding ENCODING] -f FUNC [-m MODULE]

Process subtitle text content using arbitrary Python code.

options:

show this help message and exit
the file to process (default: stdin)
the file to write to (default: stdout)
modify file in place
allow blank lines in output, your media player may explode
enable debug logging
try to keep going, even if there are parsing errors
the encoding to read/write files in (default: utf8)
a function to use to process lines
modules to import in the function context

examples:

Strip HTML-like symbols from a subtitle
$ srt process -m re -f 'lambda sub: re.sub("<[^<]+?>", "", sub)'
June 2023 srt-process 3.5.3