ffsubsync
ffsubsync copied to clipboard
Run multiple inputs at once
There are situations where I need to synchronize multiple subtitle files from a single reference. This process ends up being I/O intensive as ffmpeg
reads the entire reference file on every ffsubsync
call for every subtitle file I want to synchronize. In order to save time, it would be great to allow ffsubsync
to synchronize multiple files at once.
Hi there! This is actually supported currently, but it's not ideal from an interface perspective. You can run
ffs reference.mkv -i 1.srt 2.srt 3.srt --overwrite-input
and it will sync all 3 srt's to the reference, overwriting them in the process. It would be nice if there were a way to do this without overwriting though, e.g. if we had a way to specify a common suffix like -synced
or something. I'll leave this issue open until I get around to implementing that; in the mean time, the workaround is to copy your inputs manually and then specify --overwrite-input
ffs reference.mkv -i 1.srt 2.srt 3.srt --overwrite-input
Wow, this is exactly what I'm looking for, I have dozens of foreign subtitles of all kinds of language that I want to sync with a film.
Does ffsubsync accept a .txt file as input, which contains path to all to-be-synced srt line by line.
Using a .txt file would be more organized and easier to adjust than CLI, and can be less intimidating when share this project to non-programers
@cyzs233 not sure how it would look on Windows, but you can do a command substitution to put all the stuff in the text file on the command line, something like this:
ffs reference.mkv -i $(cat all_to_be_synced.txt) --overwrite-input
Definitely don't take my word for it but a few searches suggest the equivalent windows command would be something like
ffs reference.mkv -i (type all_to_be_synced.txt) --overwrite-input
References: https://superuser.com/questions/289344/is-there-something-like-command-substitution-in-windows-cli https://superuser.com/questions/434870/what-is-the-windows-equivalent-of-the-unix-command-cat
It works!!! Thank you so much, you're a lifesaver.❤
ffs reference.mkv -i (type all_to_by_synced.txt) --overwrite-input
@cyzs233 usually this is done by globbing, for example, on linux
ffs reference.mkv -i /home/user/Downloads/subs/* --overwrite-input
this will process all files in the folder /home/user/Downloads/subs/
(non-recursive)
this should be similar on windows, maybe
ffs reference.mkv -i C:/Users/user/Downloads/subs/* --overwrite-input
just wanted to know if i can run this in a folder with multiple video and sub files