NYCPHP Meetup

NYPHP.org

[nycphp-talk] WAV to MP3 conversion with LAME

Chris Bielanski Cbielanski at inta.org
Tue Jun 22 13:20:28 EDT 2004


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
> 



More information about the talk mailing list