Use lame batch vonvert wma to mp3

zhshqzyc
zhshqzyc used Ask the Experts™
on
Hi, I am using a free converter file "lame.exe" to convert wma files to mp3. But no successfully.
My code
echo
for %%x in (*.wav) do lame %%x
pause

Open in new window

The lame is here
also here
Thanks for help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
It may just be that you file names have spaces in them, try wrapping the call in quotes:
 
echo
for %%x in (*.wav) do lame "%%x"
pause

Open in new window

You should also pass the second parameter to specify the new file name (not sure if it's required?):
echo
for %%x in (*.wav) do lame "%%x" "%%~nx.mp3"
pause

Open in new window

~n removes the extension so you can add your own.

Author

Commented:
Still no response. Maybe something wrong on lame?
Announcing the Winners!

The results are in for the 15th Annual Expert Awards! Congratulations to the winners, and thank you to everyone who participated in the nominations. We are so grateful for the valuable contributions experts make on a daily basis. Click to read more about this year’s recipients!

Author

Commented:
OOp, it is wma file not wav file.

Author

Commented:
unsupported audio format. Maybe lame is not proper.
Ah, I didn't actually read that you wanted to convert WMA cause your script used WAV,

LAME cannot convert WMA but you can pipe to LAME using FFMPEG to convert from WMA:
echo
for %%x in (*.wma) do ffmpeg.exe -i "%%x" -vn -f wav - | lame.exe - "%%~nx.mp3"
pause

Open in new window

Get FFMPEG here: http://ffmpeg.org/download.html#release_0.6
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
I've used Jodix Free WMA to MP3 Converter http://www.wma-mp3.org/  a few times and it worked ok.
Think of it this way, WAV is like the RAW waveform audio.  Most others, MP3, OGG, AAC, WMA, MP4 etc are using some encoding.  In fact MP3 supports several different encoders and encoding techniques, such as fixed bitrate versus variable bitrate, accomplished by any number of encoders out there, some of which you have to purchase and may or may not be supported by your consumer electronics player.
For instance, at first iPods could only play Apple .AAC.  At the same time the RCA Lyra and most MP3 players could not play AAC.  
In fact, at first, if you wanted to encode MP3 in anything above 96 bitrate, most encoders cost money.  Almost all the decoders are free, it's the encoder that lets you create that they wanted to charge for.  LAME was the first open-source free encoder that let you create the highest quality fixed at bitrates exceeding 192 or variable bitrate songs without purchasing MP3Pro or something.

As soon as iPods came out that could play most MP3s their sales and stock shot through the roof.  Microsoft came out with their own "better" more efficient format, but Apple devices still don't play Microsoft's somewhat proprietary .WMA format, or vice versa.

Most straight command-line encoders are going to go from WAV to their target format, period.  The decoder will let it play.

It's like PDFs, to decode/view (play) them is a free addin, but to be able to create them, they wanted you to buy the encoder/creator

If you get the free K-Lite Codeck Pack, (comes in small, medium, large, ie typical, mega, full) that installs a whole bunch of video and audio decodecs so you can play most any audio/video.  It includes only a few encoders.  Like LAME is free, Xvid is the "open" equiv of the very efficient and therefore popular DivX video with audio encoder.

Getting back to your onjective, to go from one encoded format to another encoded format, typically more than just the one codec bundle is going to be needed, you'll need more than one codec, so that typically means a "Converter" program that has or uses multiple codecs.  LAME can turn a WAV into MP3 but it cannot decode a WMA.

Perhaps consider this one as the broadest range of from and to encodings, including to WAV http://www.nesoft.org/index.shtml.  Or maybe http://www.nch.com.au/switch/index.html  http://www.avs4you.com/AVS-Audio-Converter.aspx   They're not necessarily command-line requiring you to make a batch script.  Some batch converters use a GUI, some have command-line equivalent.

Author

Commented:
Thanks for help. I used jetshell to convert wma to wav first then used lame do the remaining.
I am going to try FFMPEG and other free softwares.

The question is that many free softwares contain add-on, my homepage was always changed.

That is the reason why I select lame command-line encoder.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial