In 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:
file.wmamplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader
file.mp3;lame -m s -V 3 audiodump.wav;mv audiodump.wav.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).
the script worked very well in my Ubuntu config – given the prerequisites (I had to install lame)
thanks
yo
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