SRT-LINEAR-TIMESHIFT(1)

πŸ“¦
version 3.5.3 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu questing

✨ 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-end and --to-end are 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