HomeProgrammingConverting WMA to MP3 on OSX or Linux

Converting WMA to MP3 on OSX or Linux

Finding this technique took more time than I thought it should, so I thought I’d share a quick and simple music transcoding tip.

Converting WMA to MP3

1) Get mplayer and lame installed. I use the accelerated and precompiled mplayer and lame for OSX. 2) Create a simple shell script: #! /bin/sh set -e F=$1 mplayer -ao pcm:file="${F%.wma}.wav" "$F" lame --preset hifi "${F%.wma}.wav" "${F%.wma}.mp3" rm -f "${F%.wma}.wav" Save as “convert_wav.sh”, make executable, and run it on your wma files. An easy way to hit all of them in a directory tree is: find . -name "*wma" -exec convert_wav.sh {} \; Thanks to the original version, found and modified from that given on Macosxhints.com.


I started out going to college for Business administration but soon found out that Coding would be a great way to have a sustainable career! I made coder's eye as my personal journey on learning how to code and sharing my Findings along the way. My vision with CE now is to be a way to help beginners that want to learn code but don't know where to start.


Sorry, the comment form is closed at this time.