[opensource] Freeware to convert m4a to mp3?

Paul Betts bettsp at cse.ohio-state.edu
Thu May 11 11:23:42 EDT 2006

On Wed, 2006-05-10 at 14:52 -0400, Tim Duly wrote:
> Hello,
> I was curious is anyone knew of a small lightweight program to convert
> m4a (apple's) to a standard mp3 file... I've searched and only found
> "try and buy" programs

dir=`dirname "${1}"`
tmpfile="/tmp/`date +%s`"
mplayer -ao pcm "${1}" -ao pcm:file=$tmpfile -vo null -vc dummy && lame
-m j -h --vbr-new -b 160 $tmpfile -o "$dir/`basename "${1}" .m4a`.mp3"
rm -f $tmpfile
mono tagcopy.exe "${1}" "$dir/`basename "${1}" .m4a`.mp3" &

I attached a small program I wrote called Tagcopy (depends on Taglib)
that'll copy the tags from the original file to the new one(with source,
of course). 

So you could use this script (which I originally wrote for wmas so I
called wma2mp3 but you could call it 'm4a2mp3') like this:

find /path/to/music -name *.m4a -exec m4a2mp3 {} \;

Paul Betts <bettsp at cse.ohio-state.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagcopy.tar.bz2
Type: application/x-bzip-compressed-tar
Size: 8835 bytes
Desc: not available
Url : http://mail.cse.ohio-state.edu/pipermail/opensource/attachments/20060511/2312bb1e/tagcopy.tar.bin

More information about the Opensource mailing list