Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run multiple inputs at once #144

Open
vitiko98 opened this issue Dec 6, 2021 · 6 comments
Open

Run multiple inputs at once #144

vitiko98 opened this issue Dec 6, 2021 · 6 comments

Comments

@vitiko98
Copy link

vitiko98 commented Dec 6, 2021

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.

@smacke
Copy link
Owner

smacke commented Dec 6, 2021

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

@cyzs233
Copy link

cyzs233 commented Jan 28, 2022

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.
list of out sync srt

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

@smacke
Copy link
Owner

smacke commented Jan 29, 2022

@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

@cyzs233
Copy link

cyzs233 commented Jan 29, 2022

It works!!! Thank you so much, you're a lifesaver.❤

ffs reference.mkv -i (type all_to_by_synced.txt) --overwrite-input

@milahu
Copy link

milahu commented Apr 11, 2023

@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

@jakanaka
Copy link

jakanaka commented Jul 3, 2023

just wanted to know if i can run this in a folder with multiple video and sub files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants