0

Is there a way to badge edit multiple .srt files. We have a project where recent edits to videos offset the .srt files by 5 seconds. I know how to timeshifts .srt on a single file, but I'm wondering if there is a way to timeshift 1000s of .srt files by 5 seconds.

Most command lines I'm aware off can do it file by file, but I haven't seen it work on folders.

  • make a small test directory and see if `for f in * ; do shifttime --yourArgs .... "$f" ; done` gets you some leverage. Maybe you'll need to handle renaming your files too? `...do shiftime ... "$f" > "$f".fixed `. Confirm that the `fixed` version has what you need then can post a new question with some working code. This does assume a usable *nix Shell (bash, zsh, a few others). Similar commands are also available for Windows based machines or better yet, learn PowerShell. Good luck! – shellter Jan 28 '22 at 03:11

1 Answers1

0

This is an interesting challenge. You'd almost certainly have to write some short script to do this. Command line tools like sed and awk are great for text processing tasks like this, but the challenge I think you'll face is the timecode. It's not as simple as just adding 5 to the seconds field of each timecode because you might tip over the edge of a minute (i.e. 00:00:59.000 + 5 = 00:01:04.000). You'll have to write some custom code to handle this part of the problem as far as I know.

The rest is pretty straight forward, you just need a command like find . -name ".srt" | xargs the-custom-script-you-have-to-write.sh

Sorry it's not a more satisfying answer. I don't know of any existing utilities that do this.