# convert files in directory from m4a to mp3
function m4a() {
find . -iname '*.m4a' -exec bash -c 'ffmpeg -i "$1" "${1/m4a/mp3}"' -- {} \;
}
use Run Shell Script (bash / pass in as arguments)
for f in "$@"
do
/usr/local/bin/ffmpeg -i "$f" "${f/m4a/mp3}"
done
Hey, great hack!
A poor-man's pull-request:
Please consider adding some defensive programing to the Automator Workflow,
as in my fork -
https://gist.github.com/goneng/7169ad93053a07e4015572a49808486c/revisions?diff=unified
Thanks