Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
If you have the win32 codecs installed (also available from mplayer's site) then you can not only play WMA/WMV files, you can also convert them!
mplayer file.wma -ao pcm -aofile file.wav will convert to a wav file from which you can convert to an mp3/ogg yourself, or there are options to convert straight to mp3... I just can't remember them I know it has been touched upon quite recently though (I think it was something to do with extracting the audio from .mov files).
after reading the man pages, couldn't find anything to stream the sound to STDOUT or to an MP3, but you can simply use lame to convert to mp3 "lame -h infile.wav outfile.mp3" or to convert to ogg " oggenc infile.wav"
You do realize then that you are compressing a compressed file?
The original file will be compressed to the WMA format, which will introduce audio artefacts, and then compressing that file with even more artefacts!
If you're happy with the output though, go for it
Yes, the original file is WMA a compressed format, but the problem here is that it's not an mp3 or ogg. Therefor I cannot play in xmms or burn it to a cd with other mp3s and oggs via K3B. When I use mplayer to convert wma to wav, mplayer is "playing" the wma file into a wav file, so, in essence, it is creating a totally new file that is not compressed. From that I produce an mp3/ogg file.
I don't see how you are saying that I am compressing an already compressed file.
The WAV file that is created by uncompressing the WMA is not the original WAV file.
It suffers from the compression artefacts introduced when the WMA file was created from the original WAV file.
When you compress that with MP3 of OGG software, you then introduced MP3 or OGG compression artefacts as well as including the WMA compression artefacts.
How good the sound quality is, very much depends on what bitrate was used for the original compression to WMA.
i dont have the original. that's why this all came about, there are sometimes instances where you are looking for a song and you can ONLY find it on WMA, which is why we are on this discussion.
I was reading this post, as I was in the same situation..
I decided to just stop and write a little perl program to:
1) Read all .wma files in a directory and with each one:
2) Use mplayer to make a converted copy to wav file
3) Use lame to convert the wav file to mp3
4) Remove the wav file
When complete, you will end up with an .mp3 copy of each .wma file. Im not an audio codec expert by any means, so there may be switches to make it faster/more efficient/etc.. Im also not responsible if something does not work right - but for me this works great.
Just copy the code below starting at "#! /usr/bin/perl" into a new text file, name it "convert.pl" or whatever you wish - place the file in the folder with the wma files.. then run it from the command line "perl convert.pl" - and wait. Dont worry about spaces in file names - it will leave all original file names as is and use the original file names to make the .mp3 file.
Enjoy:
#! /usr/bin/perl
### WMA TO MP3 CONVERTER
$dir=`pwd`;
## READ EACH FILE, IF WMA, MAKE A "COPY" TO WAV THEN TO MP3 THEN DELETE WMA
Ok, y'all are so smart, think you can help me here? I've got my wma files stored in a file structure so i want to convert them recursevly, can you help fix this script? It has issues with spaces and ' and such. Oh, and i'm stat'ing the files cauze some of them have the stupid wma protection and mplayer cant convert them properly so if it attempts to convert and the wav file is smaller than the wma file i basically remove the wav and move on to the next file in the list.
# Start a new file
echo "Start converting at $DATE $TIME with PID $$" > /tmp/wma2mp3.$$
echo "OGG is better and free (SCNR)">> /tmp/wma2mp3.$$
# For encoding wma to mp3 (but ogg is much better ;-) )
for i in "`find "${STARTLOCATION}" -name *.wma -print`"
do
mplayer -ao pcm -aofile "${i%.wma}.wav" "$i" && lame -h "${i%.wma}.wav" "${i%.wma}.mp3"
# Use this for ogg:
#mplayer -ao pcm -aofile "${i%.wma}.wav" "$i" && oggenc "${i%.wma}.wav"
# If returncode == 0
if [ $? -eq 0 ];then
echo "\"${i}\" convertet to \"${i}.mp3\"" >> /tmp/wma2mp3.$$
rm "${i%.wma}.wav" && rm "${i}"
else
echo "failed decoding \"${i}\"" >> /tmp/wma2mp3.$$
fi
done
echo "Finished converting at $DATE $TIME with PID $$" >> /tmp/wma2mp3.$$
cat /tmp/wma2mp3.$$|mail -s "Files converted on ${DATE}" root
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.