Linux WMA to MP3 Conversion
WMA files are Windows Media Audio files, intended to be played on the Windows Media Player, and are proprietary in nature. They contain Digital Rights Management (DRM) labels and thus can't be played on portable music players like the iPod. It's intentionally difficult to take these labels off the files, but if you have these files and want to convert them, there are a few options.
-
Single File Methods
-
One way to convert files one at a time into mp3 files is to use one of the many online conversion services. There are several that do WMA conversion, including youconvertit.com, zamzar.com, media.io, and media-convert.com. All of them have a simple interface. You upload your original file, provide and email address and type of file wished, and click "Convert." Some, including media.io, don't ask for an email, and allow you to download the file within seconds of clicking "Covert." The only downside of online conversion is that you can only convert one file at a time.
Linux Command Line Solution
-
You can also convert WMA to MP3 in the terminal, using the following commands. Make sure you've installed Lame and Mplayer before doing this.
Install them through Synaptic or as an alternative:
sudo apt-get install mplayer
sudo apt-get install lameAll wma's should be in the Desktop folder.
Create a text file with Gedit, or another text file editor and name it "wmamp3 in ~/"
Copy and paste the following code:#!/bin/bash
current_directory=$( pwd )
#remove spaces
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done#remove uppercase
for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done#Rip with Mplayer / encode with LAME
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm -waveheader $i && lame -m s audiodump.wav -o $i; done#convert file names
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; donerm audiodump.wav
Then, again in the terminal, enter
chmod +x ~/wmamp3
sudo cp ~/wmamp3 /usr/binFinally, when you type "wmamp3" the conversion will take place. The process takes a few seconds, and it discards the original WMA and leaves only the MP3. The best part about this method is that it will work on multiple files, and if you change some of the coding and added codecs, it will work with other file types, too.
-
Software
-
Soundconverter is a download that works quickly. Download it through the package manager or by command line (sudo apt-get install soundconverter). Choose the file, choose "mp3" in preferences, and then click convert. Audacity changes many files easily, but not WMA. The Audacity website says that a beta version will do it, but it hasn't been released yet.
Quality Loss
-
Be prepared to lose audio quality when making this conversion. Certain audio file types compress the sound files and by doing so, lose sound quality. MP3 and WMA are both "lossy" audio file types, and by converting one to the other, more quality is lost. Whether or not the human ear can detect the difference is debatable.
Conclusion
-
Although Windows(r) has certainly made converting WMAs challenging, there are several options available for quick, acceptable conversion. The best way is probably through the command line, although many users are intimidated by the terminal. It's quick and an online connection is not necessary to do the actual conversion. You can convert an entire folder full at one time.
-
References
Resources
- Photo Credit music image by peter Hires Images from Fotolia.com