2013-05-07 WMA to MP3

This is based on How to Convert Unprotected WMA Files Into MP3 Files. I’m leaving the instructions here for my future self. :)

for file in *.wma; do
  mplayer -vo null -vc dummy -af resample=44100 \
    -ao pcm:file="${file%%.[Ww][Mm][Aa]}.wav" "$file"
  lame --preset standard "${file%%.[Ww][Mm][Aa]}.wav" \

Use {{locate}} and {{locate}} to find the location of your executables. On a Mac, they’re probably not on your PATH... I installed MPlayer OSX and iTunes-LAME to get the executables. You’ll need to do something similar.

This is the result I just used for some files with upper case file extension:

for file in *.WMA; do
  "/Applications/MPlayer OSX.app/Contents/Resources/External_Binaries/mplayer_intel.app/Contents/MacOS/mplayer" \
    -vo null -vc dummy -af resample=44100 \
    -ao pcm:file="${file%%.[Ww][Mm][Aa]}.wav" "$file"
  "/Applications/iTunes-LAME.app/Contents/Resources/lame" \
    --preset standard "${file%%.[Ww][Mm][Aa]}.wav" \


Show Google +1


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.