Created
December 31, 2014 03:02
-
-
Save jhorology/c195d54d509e9fff0293 to your computer and use it in GitHub Desktop.
Bulk convert Apple Loops to m4a without re-sampling.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
IFS=$'\n' | |
APPLE_LOOPS='/Library/Audio/Apple Loops' | |
cd `dirname $0` | |
echo "" > convert.log | |
for file in $(find $APPLE_LOOPS -print -type f -name *.caf) | |
do | |
newfile=`echo $file | sed "s|^$APPLE_LOOPS/||"` | |
newdir=`dirname "${newfile}"` | |
outfile=`basename "${newfile}" .caf` | |
mkdir -p "${newdir}" | |
## afinfo --warnings "${file}" | |
afconvert -v -f m4af -d 0 "${file}" "${newdir}/${outfile}.m4a" 2>&1 | tee -a convert.log | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment