Categories
General

Save a WMA stream and convert it to an MP3

A WMA stream is like an innocent person imprisoned in a gulag. It is our duty to free them! First, free the music from its streaming prison by capturing it to a WMA file:

mplayer -dumpstream -dumpfile pop_tune.wma mms://gulag.com/pop_tune.wma

(From this page.) It’ll take a while, but you should end up with a file called ‘pop_tune.wma.’ A WMA is like an innocent person on work release from the gulag, wearing a lo-jack that prevents them from walking normally. So, let’s remove the lo-jack by converting the WMA to a WAV:

mplayer -vo null -vc dummy -ao pcm:file=pop_tune.wav pop_tune.wma

(From this page, refined by this reply.) If it worked, you should have a WAV file, which you can easily encode in your favorite non-evil format. You can also just use ffmpeg to turn the WMA file straight into an MP3 (or a ton of other things). This makes a 128kbps MP3:

ffmpeg -ab 128 -i pop_tune.wma pop_tune.mp3

Avatar photo

By isaac

I like cats. he/him