Coder’s Eye

A site about one of the three passions in my life.

Coder’s Eye header image 2

Converting WMA to MP3 on OSX or Linux

October 3rd, 2006 · 3 Comments

MusicFinding 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.

Technorati Tags: ,

Tags: Tips · Macintosh · Linux

Bookmark this article

del.icio.us:Converting WMA to MP3 on OSX or Linux digg:Converting WMA to MP3 on OSX or Linux spurl:Converting WMA to MP3 on OSX or Linux wists:Converting WMA to MP3 on OSX or Linux simpy:Converting WMA to MP3 on OSX or Linux newsvine:Converting WMA to MP3 on OSX or Linux blinklist:Converting WMA to MP3 on OSX or Linux furl:Converting WMA to MP3 on OSX or Linux reddit:Converting WMA to MP3 on OSX or Linux fark:Converting WMA to MP3 on OSX or Linux blogmarks:Converting WMA to MP3 on OSX or Linux Y!:Converting WMA to MP3 on OSX or Linux smarking:Converting WMA to MP3 on OSX or Linux magnolia:Converting WMA to MP3 on OSX or Linux segnalo:Converting WMA to MP3 on OSX or Linux gifttagging:Converting WMA to MP3 on OSX or Linux

3 responses so far ↓

  • 1 Jefficus // Mar 29, 2007 at 6:47 am

    This works well but beware, it jettisons the metadata en route.

  • 2 Fabio Varesano // Jul 31, 2007 at 6:35 am

    Thanks for the informations.. worked as expected. Keep on the good work!

  • 3 Marin Todorov // Nov 2, 2007 at 6:03 am

    Hi Bruce,

    you can try the tool I’m using - it’s free and relatively fast :)

    http://www.nch.com.au/switch/plus.html

    Just download the free version and voila ! converting between several diff audio formats

    Marin

Leave a Comment