Skip to content

Instantly share code, notes, and snippets.

@ymotongpoo
Created January 10, 2012 16:54
Show Gist options
  • Save ymotongpoo/1589999 to your computer and use it in GitHub Desktop.
Save ymotongpoo/1589999 to your computer and use it in GitHub Desktop.
convert AIFF to ALAC, ALAC to AAC
#!/bin/bash
IFS="
"
cd "${1}"
echo "source dir: "${PWD}
echo "target dir: "${2}
for input in `find . -name "*.aiff" -type f`
do
echo "${input}"
afconvert -f m4af -d 'alac' "${input}" "${2}/${input}.m4a"
done
#!/bin/bash
IFS="
"
cd ${1}
echo "source dir: "${PWD}
for input in `find . -name "*.m4a"`
do
afconvert -v -d 'aac' -f m4af -b 128000 -o "${input%.*}.aac.m4a" "${input}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment