Categories
Linux Music

How to convert from WMA to MP3

Converting Windows Media Audio files into MP3 format is rather easy with mplayer and lame. My car stereo plays MP3s, so WMA is of no use to me!
This code is based on this script but I have to wonder why they overwrote the wma file?
Piping the output of mplayer into lame is left as an easy lesson for the reader!
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm -waveheader "$i" && lame -m j -h --vbr-new -b 160 audiodump.wav -o "`basename "$i" .wma`.mp3"; done; rm -f audiodump.wav