shell question

hans w. koch's icon

hello,

i am trying to convert a bunch of .caf audio files (apple audio format for e.g. iphone) to .aiff with the help of a shell script i found online at: http://www.devdaily.com/mac-os-x/convert-caf-sound-file-aif-aiff-mp3-format

the script is simple enough:
afconvert -f AIFF -d I8 MyInputFile.caf MyOutputFile.aif
and while it works well in the terminal (cd´íng to the directory containing the .caf files and executing the script), i can´t get it to run from the shell object.

if anybody has an idea why, i´d be very grateful!
thanks
hans

Tim Lloyd's icon

I had this problem a little while ago. What you need to do is specify your input file and output file as paths, for example:

afconvert -f AIFF -d I8 "/Users/Tim_Lloyd/Desktop/test.caf" "/Users/Tim_Lloyd/Desktop/test.aif"

Enclose the paths in quotes so that it will work with spaces in filenames etc. - the backslashes are there to "escape" the quotes, as they're a special character in max and otherwise won't be recognised.

I'm not too familiar with afconvert, does the "I8" part dither to 8-bit? That's what it sounds like :p

hans w. koch's icon

thank you tim, spot on.
now, that i got it working, i have to start exploring that I8 flag stuff too :-)
best
hans