Log in

View Full Version : PCM -> MP3 with CBR, by ACM LAME codec


elzhov
8th November 2006, 10:36
Hi there,

I'm trying to convert AVI file containing PCM audio 22050 Hz, to that containing MP3. With constant birate - because my smartphone's videoplayer does not support audiostreams encoded with ABR/VBR MP3.

I opened AVI in VirtualDub, choose ACM LAME codec for audio compression, and it showed me the following list of supported output formats:

http://nfdfn.jinr.ru/~etv/weekly/private/non-all-formats.png

I turned on "show all formats", and found that CBR is not available for sample frequencies lower than 24000 Hz at all.
On the other hand, I installed lame.exe from K-Lite Codec Pack (where I get the ACM Lame codec itself), and ran

lame --cbr stream.wav stream.mp3

and got the CBR mp3 with 22050 Hz without any problem. I merged that mp3 with original AVI, and my smartphone played it successfully.

Finally, I choose the frequency, where CBR is available, 44100 Hz, but got the following error:

http://nfdfn.jinr.ru/~etv/weekly/private/vdub_error.png

I'd try to use DirectShow MP3 codec, but VirtualDub, AFAIK, could not recognize DirectShow codecs.

So the question is: can I convert at Windoze AVI with PCM stream to AVI with CBR MP3, by ANY way?!

Much thanks! :-)

jdrumstik
8th November 2006, 19:44
Try extracting the audio in VirtualDub and converting it in audacity to WAV. Then select WAV file for audio source in VirtualDub and you should be able to reconvert that to MP3. You will loose a little quality but this is for a phone right?

dexy
9th November 2006, 00:28
You simply need to convert the sample rate before you are going to do compression. Just convert the sample rate (audio/conversinon menu) to the desired sample rate, then compress it. Anyway, i recommended to you to use mpeg layer 3 codec (fraunhofer), but if you want to use lame codec, then use it.