NYCPHP Meetup

NYPHP.org

[nycphp-talk] WAV to MP3 conversion with LAME

Stephen Musgrave stephen at musgrave.org
Tue Jun 22 13:42:29 EDT 2004


chris & joel -

thanks for the comments.  i failed to mention in my original post that when
i pull angel.com's WAV file into iTunes and look at the info, the file has
the following characteristics:

Sample Rate: 8.000 KHz
Channels: Mono
Sample Size: 8 bit
Bit Rate: 64kbps

while LAME works "automatically", since it isn't recognizing the file, i've
attempted to force these numbers when converting in LAME.

lame -s8-bitwidth8-b64-mm source.wav target.wav

i've tried this several different ways, suppressed filters, etc, etc.

<shrug>

Stephen



On 6/22/04 1:20 PM, "Chris Bielanski" <Cbielanski at inta.org> wrote:

> This does sound like they are using an off-standard PCM encoding, either
> storing it at an unsual bitrate or omitting the header information, yes. I'd
> contact angel.com to get the scoop on that format and adjust your LAME
> encoding accordingly. Alternately, you're just going to have to muck areounf
> with "feeds and speeds" of decoing the PCM stream.
> 
> Do some math on the duration change between the PCM file and your mp3
> output, that might be a place to start to determine the factor by which the
> sampling must decrease. For example, you might be trying to encode an 11k
> PCM stream at the "standard" 44k, which (in theory) would result in your 1/4
> ratio of source to destination. The same would happen if you're encoding a
> 22k mono stream at 44k stereo. Source is halved once by the doubled sampling
> rate (22k -> 44k) and halved again by the channel separation (mono ->
> stereo)
> 
> HTH,
> Chris Bielanski
> Web Programmer, 
> International Trademark Association,
> 1133 Avenue of the Americas, 33rd Floor
> New York, NY 10036
> +1 (212) 642-1745, f: +1 (212) 768-7796
> mailto:cbielanski at inta.org, www.inta.org
> INTA -- 125 Years of Excellence
> 
> 
> 
>> -----Original Message-----
>> From: Stephen Musgrave [mailto:stephen at musgrave.org]
>> Sent: Tuesday, June 22, 2004 1:06 PM
>> To: nyPHP - Talk Talk
>> Subject: [nycphp-talk] WAV to MP3 conversion with LAME
>> 
>> 
>> 
>> hello list -
>> 
>> this is an obscure situation, but on the off chance that
>> someone has had
>> this experience...
>> 
>> my client is using angel.com call center services.  the voice
>> mail is saved
>> as a WAV file, we suck that down to our server and convert it
>> to MP3 using
>> LAME on LINUX.  the problem is that the resulting MP3 file is
>> noise (and the
>> duration of the file is also about 1/4 of the original).
>> 
>> it feels like the bitrate, sample size and or sample rate is
>> out of sync,
>> which it probably is, but i am not a digital audio expert by
>> any means!
>> (i've tried various settings including 'auto').
>> 
>> when reading the output log from lame, it warns:
>> 
>> Warning: corrupt or unsupported WAVE format
>> Assuming raw pcm input file
>> 
>> also, when converting the WAV file with iTunes to MP3, it
>> works just fine.
>> i suspect that angel.com is writing their WAV files missing
>> some header
>> information?
>> 
>> so, if anybody has any light to shed on this stumper, it
>> would be greatly
>> appreciated!
>> 
>> stephen
>> 
>> _______________________________________________
>> talk mailing list
>> talk at lists.nyphp.org
>> http://lists.nyphp.org/mailman/listinfo/talk
>> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> 




More information about the talk mailing list