currently, I run this command...
# Script designed to convert webm files to m4a for easy listening
for i in *.m4a ; do
echo ffmpeg -i "\""$PWD/$i"\"" -c:a copy "\""$PWD/${i%.m4a}.mkv"\"" >> ~/bulk.command.txt
done
to create myself a script file that I can later run to do batch repackages of media files. Sadly this process requires me to enter each directory that needs to be repackaged and have me type the scripts name.
Sometimes these projects have quite a few directories as well as subdirectories. Also these projects when getting big, are requiring me to really be careful on the size of the projects root dir.
I am still learning how to code in bash, and this simple script took me quite some time to perfect to make sure just about every possible file name is accounted for.
What I would like to do next is modify it in such as way as I can simply go into my home folders music folder, run this command a single time AND also have it save the directory layout, but also place the files ffmpeg creates into a different directory. Do any wizards out there have some code examples, or terms, or ideas how I can accomplish this task?
-map 0
if you want to stream copy all streams from the input; otherwise theffmpeg
default stream selection behavior will choose only one stream per stream type. For example, if there are two audio streams it will by default only copy one. Although, it is unlikely that M4A has more than one stream per type.