Showing posts with label mp3. Show all posts
Showing posts with label mp3. Show all posts

Friday, 17 December 2010

Convert m4a to mp3

Via the Debian Linux Desktop survival guide


Using faad, convert the m4a to wav:
$ faad -o abc.wav abc.m4a

Yes you read that right - faad has output as the first option, and input as the second option.

Then using lame convert wav to mp3. Bitrate is specified with the "-b" option.
$ lame -h -b 192 abc.wav abc.mp3

You can combine this into a script that will convert all m4a's in a directory into mp3s
for i in *.m4a
do
faad -o - "$i" | lame -h -b 192 - "${i%m4a}mp3"
done