jmhobbs

any2mp3

Here's a modification of a bash script I made a while back to convert anything that mplayer can play into an mp3 file. Change bitrates and the like to taste.

#!/bin/bash
#
# any2mp3
#
for i in *.$1; do
mplayer -vc null -vo null -ao pcm:fast "$i" -ao pcm:file="${i%.$1}.wav"
done
for i in *.wav; do
lame -h -V2 --vbr-new "$i" "${i%.wav}.mp3"
done
rm *.wav

Say you are in a directory of m4a files, just run any2mp3.sh m4a and wait.