Covert AACs to MP3s

Posted on the June 7th, 2009 under Linux by admin

A very simple bash script to use in Debian/Ubuntu to convert AAC (M4A) files to MP3. This will work only with unprotected DRM-less AACs. Great for use with your shiny GPS device that can play MP3s.

#!/bin/bash
#aac2mp3.sh

for i in *.m4a; do
ffmpeg -i "$i" -acodec libmp3lame -ac 2 -ab 256k "${i%m4a}mp3";
done

Note that you’ll need ffmpeg and libmp3lame installed, e.g.

apt-get install libmp3lame0
apt-get install ffmpeg

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>