SRT-LINEAR-TIMESHIFT(1)
β¨ SRT-LINEAR-TIMESHIFT(1) β¨
okay bestie, sit down, we're doing math on subtitles and it's genuinely iconic π
πΈ NAME πΈ
srt-linear-timeshift β the SRT subtitle processing tool that stretches and squishes time so your subs actually line up π«Ά
π¦ DESCRIPTION π¦
here's the vibe, no cap:
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. that's the whole assignment, and she ate π₯
π options:
-h,--helpβ shows this help message and then dips, that's it, exit stage left π--input FILE,-i FILEβ the file to process (default: stdin). if you don't hand her a file she'll just read from stdin like a lil gremlin π--output FILE,-o FILEβ the file to write to (default: stdout). no file given? she's printing straight to stdout, periodt π«--inplace,-pβ modify file in place. she's editing the file itself, no copy, no backup, main character energy only π--no-strictβ allow blank lines in output, your media player may explode π like fr fr, that's the actual documented consequence, don't say I didn't warn you--debugβ enable debug logging. she gets chatty, she tells you everything π--ignore-parsing-errors,-cβ try to keep going, even if there are parsing errors. resilience queen, she simply refuses to give up π--encoding ENCODING,-e ENCODINGβ the encoding to read/write files in (default:utf8). change it if your files are built different β¨--from-start FROM_START,--f1 FROM_STARTβ the first desynchronised timestamp. this is where the chaos begins π--to-start TO_START,--t1 TO_STARTβ the first synchronised timestamp. this is where the chaos ends, glow up complete β--from-end FROM_END,--f2 FROM_ENDβ the second desynchronised timestamp. the other end of the mess π--to-end TO_END,--t2 TO_ENDβ the second synchronised timestamp. the other end of the fix, she's healed π§
π examples:
Stretch out a subtitle so that second 1 is 1, 2 is 3, 3 is 5, etc
$ srt linear-timeshift --f1 00:00:01,000 --t1 00:00:01,000 --f2
00:00:02,000 --t2 00:00:03,000
look at her go. two points in, two points out, everything in between gets linearly interpolated. it's giving geometry class but make it subtitles π
quick lil heads up bestie:--from-start,--to-start,--from-endand--to-endare not optional. all four, every time, no skipping. she needs both pairs or she can't do the math π«Ά
that was srt-linear-timeshift version 3.5.3, from June 2023, and that's the whole manual, iykyk π mwah, go sync those subs bestie β¨π
π¦ where this page comes from
- debian trixie: python3-srt 3.5.3-1 Β· MIT
- ubuntu noble: python3-srt 3.5.3-1 Β· MIT
- ubuntu questing: python3-srt 3.5.3-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms