-
Notifications
You must be signed in to change notification settings - Fork 60
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
ffmpeg snags stdin which prevents while loops from continuing #69
Comments
Hmm. Are you just doing a: Let me know how you are calling it and any options you use so I can recreate and see if I can come up with an alternate solution. |
It's a little more complicated, unfortunately. find . | grep mkv$ | while read lines; do if mkvinfo "$lines" | grep A_DTS; Not pretty, but gets the job done. The "echo" statements were mostly for --Matt On Fri, Feb 24, 2012 at 4:13 PM, Chris Hoekstra <
|
Just an FYI, you shouldn't need to grep for DTS. The script will ignore anything without a DTS track in it and anything that looks like its already had the conversion done. |
last answer here : https://stackoverflow.com/questions/21634088/execute-ffmpeg-command-in-a-loop passing -nostdin to ffmpeg is the right thing to do . Since we're masking the interactive dialog anyway, this should be in the default command |
I was trying to use mkvdts2ac3 in a while loop to process all my mkv's that have DTS tracks, and it would always stop after processing one file. I searched around a bit and the cause appears to be that ffmpeg does that "Press [q] to stop encoding" and that somehow breaks the while loop.
The fix, from here: http://ubuntuforums.org/archive/index.php/t-1335037.html
was to add < /dev/null to satisfy the stdin for ffmpeg. However, I can't make that work without eliminating the perl progress tracking for that step. It works great if I change that line to just run a basic ffmpeg command line instead.
Hopefully your bash-fu is stronger than mine and you can make this work, while still keeping the nifty progress tracking you've got.
Thanks for the awesome script!!
The text was updated successfully, but these errors were encountered: