To convert flac to m4a by using ffmpeg on Mac OS X

first, download ffmpeg (http://www.ffmpegmac.net/) for mac os x binary. you could use the following command to convert :

# ffmpeg -i xxxxx.flac xxxxx.m4a

or just my simple script to convert all files in the directory :

# cat convert_flac2m4a.sh
#/bin/bash

for filename in *.flac;
do
    if [[ "$filename" != "*.flac" ]]
    then
        /Applications/ffmpeg/ffmpeg -i "$filename" -vn -b:a 325k "${filename%\.*}.m4a";
    fi
done

have fun~