Monday, September 25, 2006

m4a to mp3 using 'faad' and 'lame'

Ok, i looked around for a scrypt to do this and the mplayer codec did not want to work right away for me... i had to install faad...

& sudo apt -get install faad

and then use this scrypte and save it as something like m4a2mp3.sh and execute like this...

& ./m4a2mp3.sh

(all the files in the dir will be converted to wav...

# m4a to mp3
for i in *.m4a
do
faad "$i"
x=`echo "$i"|sed -e 's/.m4a/.wav/'`
y=`echo "$i"|sed -e 's/.m4a/.mp3/'`
lame -h -b 192 "$x" "$y"
rm "$x"
done

0 comments: