mplayer logoIn order to convert WMA file into MP3 format in Ubuntu (or Debian) you should install the following requirements first:

1. mplayer (sudo aptitude install mplayer)
2. lame (sudo aptitude install lame)
3. win32 codecs (sudo aptitude install ubuntu-restricted-extras)

and then convert file.wma into file.mp3 using the following console command:

mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader file.wma;lame -m s -V 3 audiodump.wav;mv audiodump.wav.mp3 file.mp3;rm audiodump.wav

This also works for Fedora / Centos / Redhat family Linux distributions (requirements should be installed by yum package manager via third-party software repositories).

 

8 Comments

 

  1. March 9, 2010  12:23 am by yo keller Reply

    the script worked very well in my Ubuntu config - given the prerequisites (I had to install lame)



    thanks

    yo

  2. June 3, 2010  11:34 pm by nrg-1 Reply

    Actually start reading your blog it is actually really helpful i shall definately keep an eye on your blog, you have turned me into a frequent reader.Do you have a newsletter i can subscribe to ?

  3. June 3, 2010  11:38 pm by nrg-1 Reply

    Actually checked out your post it's quite illuminating i shall certainly keep an eye on your blog, you have turned me into a constant reader.Do you have a newsletter i could sign up to ?

  4. January 26, 2011  12:52 pm by Agustina Biederman Reply

    valuable People are bound to find this really important. I'm sure all of us readers appreciate your efforts as much as me!. Have a great week

  5. February 7, 2012  6:20 pm by best deals on iphone 4s Reply

    Brilliant information out there. I by no means let a 24-hour interval terminate withouth looking for up-to-date critical information through this website

  6. March 30, 2012  8:25 pm by fruit mocking party Reply

    A lot of whatever you articulate is astonishingly accurate and it makes me wonder the reason why I had not looked at this with this light previously. This article really did switch the light on for me as far as this subject matter goes. But at this time there is one position I am not really too cozy with so while I attempt to reconcile that with the actual core theme of your point, permit me see what the rest of the visitors have to say.Well done.

  7. May 22, 2012  8:14 pm by Tomas Reply

    Unfortunately this method didn't work for me, seems like I need different headers to be able to convert the music. Here's an example of the error message I got:

    MPlayer svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.

    Playing ScuttleButtin.wma.
    libavformat version 53.21.0 (external)
    Mismatching header version 53.19.0
    ASF file format detected.
    [asfheader] Audio stream found, -aid 1
    Clip info:
    title: Scuttle Buttin'
    author: Stevie Ray Vaughan
    Load subtitles in ./
    ==========================================================================
    Opening audio decoder: [dmo] Win32/DMO decoders
    Win32 LoadLibrary failed to load: /usr/lib/codecs/wma9dmod.dll
    IMediaObject ERROR: 0x83e21f6 could not open DMO DLL (0x0 : 0)
    ERROR: Could not open required DirectShow codec wma9dmod.dll.
    ADecoder preinit failed :(
    ADecoder init failed :(
    Opening audio decoder: [dmo] Win32/DMO decoders
    Win32 LoadLibrary failed to load: /usr/lib/codecs/wmadmod.dll
    IMediaObject ERROR: 0x83e21f6 could not open DMO DLL (0x0 : 0)
    ERROR: Could not open required DirectShow codec wmadmod.dll.
    ADecoder preinit failed :(
    ADecoder init failed :(
    Cannot find codec for audio format 0x163.
    Audio: no sound
    Video: no video


    Exiting... (End of file)
    Could not find "audiodump.wav".
    mv: cannot stat `audiodump.wav.mp3': No such file or directory
    rm: cannot remove `audiodump.wav': No such file or directory

    Any ideas??
    Regards,
    Tomas

  8. August 25, 2012  1:29 pm by Robert Starsi Reply

    Very cool tutorial, thanks! On OS X you can do "brew install mplayer lame".

Leave a reply

 

Your email address will not be published.