-
Notifications
You must be signed in to change notification settings - Fork 66
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
avoid doubling file extensions in example for recursively batch processing with find
?
#465
Comments
Thanks for opening this @EG-tech! The current formula you linked is set up to work as a Maybe just a matter of taste, but I tend to form the Definitely worth explaining in more detail the issue with the double file extension output and the workaround like you have suggested. These days I tend to just be lazy and leave the double extension and then clean it up with a batch find/rename in the file browser, but having a 100% bash approach seems very in scope for ffmprovisr! |
hey @privatezero! sorry if unclear: I don't mean to change up any of the I'm talking just about the very end of that section, which already has a recommended variation for one-off use with
Running ☝️ that example
are functionally equivalent (the former is your same method but avoids double file extensions and having to do a batch rename cleanup, FWIW 😉 ) As far as ffmprovisr and explanatory text goes, your method looks simpler since you'd only need to explain |
In the "Batch Processing (Mac/Linux)" section, there's an example variation provided for recursively processing files contained in sub-directories using
find
, rather than the standardfor
loop for processing within the same directory - this was super helpful to me for a completely different/non-AV batch processing task, but as @kieranjol noted when originally suggesting the current one-liner, the limitation with sendingfind
output directly into the ffmpeg command with-exec
is that you wind up doubling up on file extensions in the output file name, e.g.filename.mxf.mov
I'm a bit torn here - on the one hand, the current version is definitely simpler/quicker to understand, on the other hand, it's a bit confusing if you're not expecting that output, and trying to batch rename from Bash after-the-fact is a can of regex worms.
It would require a bit more text to explain the loop, but what about:
find input_directory -iname "*.mxf" -print0 | while read -d $'\0' file; do ffmpeg -i "$file" -map 0 -c copy "${file%.mxf}.mov"; done
?(see e.g. https://askubuntu.com/a/648990)
The text was updated successfully, but these errors were encountered: