Help - Search - Members - Calendar
Full Version: Automatic downsampling in LAME <= 96kbps
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
enzo
I just noticed that LAME automatically downsamples 44.1 kHz audio to 32 kHz when encoding to bitrates lower than or equal to 96 kbps.

Here's how to reproduce it:

- Take a 44.1 kHz WAV file
- Encode it to MP3 using "lame -b 96 file.wav"
- The resulting MP3 will be at 32 kHz

I found this problem in my own software BonkEnc, but it's also reproducible with CDex (if sampling rate is set to "auto") and the LAME command line encoder.

I ask myself if this doesn't do more harm than good. I think resampling might cause artifacts so leaving the sampling rate at 44.1 kHz might be the better choice.

The question now is: Should I fix this in BonkEnc, i.e. make it encode to 44.1 kHz even at low bitrates, or should I leave everything as is?
Mike Giacomelli
Lower sample rates are used because they provide higher quality for MP3 at low bitrates. The best solution though is to not use mp3 at low bitrates, since it's performance is poor.
DualIP
imho it isn't necessary to lower the samplerate for low bitrates. Just using a low pass filter will have similar effect.
halb27
I've heard several samples where downsampling helped a lot more than just using a lowpass.

For very low bitrate downsampling and lowpassing softly from ~ 10 kHz (depending on bitrate used) to 16 kHz is the best way to go IMO.
menno
You save about 3kbps on headers and side info when downsampling to 32kHz. This is a big advantage.
Time resolution decreases though, this could be disadvantageous.
halb27
IIRC it was mainly problem samples of a tonal character which did significantly improve from downsampling.
Time resolution sure gets worse.
enzo
Thank you very much for the answers.

I think I will provide an "auto" and a "no resampling" option in future versions of BonkEnc. "auto" will be default and let the LAME encoder decide which sampling rate to use. "no resampling" will force the input sampling rate on the ouput file.
2Bdecided
Oh good. A feature to reduce quality by over riding what lame does intelligently by default.

At least put "reduces quality" or "not recommended" next to the option.

Cheers,
David.
salpro
the fraunhofer mp3 codec don't have this "flaw" at the 96kbps , it is useful for divx films
as downsamplig to 32khz gives desynchronisation with the film

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.