Help - Search - Members - Calendar
Full Version: How does sample rate affect quality
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
audio2u
Hi all,
Just wondering, does the sample rate of the source file affect Lame's encoded quality?
For example, if you use a wav file which is sampled at 44k as an input, and you encode at, I dunno, let's say -v5 --vbr-new, will the quality be the same, as if the input wav had first been SRC'd to 32k, and THEN encoded at the aforementioned rate?
Now, I realise that the 44k wav has a frequency response greater than the 32k version, I get that much.
Actually, no, let's start this all over again.
Let's say I start with a 32k wav file. That way, the FR is finite.
Now, let's suppose I SRC the 32k wav UP to 44k.
Both files have the same FR.
But, will the quality of 2 MP3's encoded from these 2 wav's be the same?
I hope I've expressed myself clearly enough.
Shade[ST]
Higher sample rate means less bits available to actually encode the sound. You'll get better freq. response, but typically worse quality, especially if you're not changing the default lowpass setting.
kjoonlee
huh.gif ?
audio2u
QUOTE
' date='Oct 3 2006, 14:25' post='437298']
Higher sample rate means less bits available to actually encode the sound. You'll get better freq. response, but typically worse quality, especially if you're not changing the default lowpass setting.


Right!
I had a feeling there was something like that at play, but wasn't sure.
Ta!
kjoonlee
We're not talking about 64kbps CBR here. How can there be less bits available?
audio2u
At a higher samplig rate, the samples are closer together in time, which means that at xx kbps (kilobits per SECOND), those encoded BITS have to cover more samples in less time, therefore lower quality.
kjoonlee
But the bitrate isn't fixed. --vbr-new, remember?
audio2u
Oh, ok... good point.
Well, back to my original question then... smile.gif
Shade[ST]
Bitrate isn't fixed, but it's targeted nonetheless. Presets are optimized to aim for a specific quality. If you alter the sample rate and increase it, it will have less room to store what it's looking to store.. Logically.

I guess Gabriel would be best advised to answer this...
audio2u
OK, that seems fair.
Thanks for your input, Shade.
kjoonlee
QUOTE
' date='Oct 3 2006, 14:50' post='437315']
Bitrate isn't fixed, but it's targeted nonetheless. Presets are optimized to aim for a specific quality. If you alter the sample rate and increase it, it will have less room to store what it's looking to store.. Logically.

I guess Gabriel would be best advised to answer this...

No, you're making wrong assumptions.

ttf32.wav.mp3 152kbps.
ttf32-44.wav.mp3 157kbps.
audio2u
OK, now I'm confused. smile.gif

Hang on, what you're saying there is that the 44k version (which was upsampled from 32k) used a slightly higher bitrate?
Have I got that right?
kjoonlee
Right. Overhead, perhaps?

CODE
File Name : ttf32.wav.mp3
File Path : D:\kjoonlee\wip\ttf32.wav.mp3
Subsong Index : 0
File Size : 3 684 960 bytes
Last Modified : 2006-10-03 14:58:38
Duration : 3:14.333 (6218667 samples)
Sample Rate : 32000 Hz
Channels : 2
Bitrate : 152 kbps
Codec : MP3
Codec Profile : MP3 VBR V5
Encoding : lossy
Tool : LAME3.97b
<ENC_DELAY> : 576
<ENC_PADDING> : 1557
<MP3_ACCURATE_LENGTH> : yes
<MP3_STEREO_MODE> : joint stereo

CODE
File Name : ttf32-44.wav.mp3
File Path : D:\kjoonlee\wip\ttf32-44.wav.mp3
Subsong Index : 0
File Size : 3 817 617 bytes
Last Modified : 2006-10-03 15:00:36
Duration : 3:14.333 (8570101 samples)
Sample Rate : 44100 Hz
Channels : 2
Bitrate : 157 kbps
Codec : MP3
Codec Profile : MP3 VBR V5
Encoding : lossy
Tool : LAME3.97b
<ENC_DELAY> : 576
<ENC_PADDING> : 1355
<MP3_ACCURATE_LENGTH> : yes
<MP3_STEREO_MODE> : joint stereo
itv
The psychoacoustic model (or the parameters for it) are probably different for different sample rates. I think that this could in principle cause differences quality-wise too, if the fine-tuning of the model was done only for a certain samplerate(s). Probably not the case with Lame, though.
Gabriel
Things are not that easy:

*Reducing sample rate is reducing temporal resolution, as frame sizes are constant regarding number of samples. Reducing sample rate could then increase temporal smearing.

*Reducing sample rate is increasing frequency resolution of the encoded frame/psymodel. Reducing sample rate could then increase possible compression (considering a similar usefull bandwitdh).

*Mp3 is quite inneficient in the upper part of the spectrum, due the a technical limitation. Lame is first selecting lowpass (based on compression ratio), then selecting samplerate in order to try avoiding this limitation.

Advice:
Change the lowpass if you want, but let Lame choose itself the appropriate sample rate based on the provided lowpass.
kjoonlee
That reminds me of this topic. http://www.hydrogenaudio.org/forums/index....showtopic=26726
cabbagerat
QUOTE(Gabriel @ Oct 2 2006, 23:39) *

*Mp3 is quite inneficient in the upper part of the spectrum, due the a technical limitation. Lame is first selecting lowpass (based on compression ratio), then selecting samplerate in order to try avoiding this limitation.
Gabriel. Is it worth upsampling to 48kHz before encoding to avoid the limitations of the MP3 format with high frequency material and improve temporal resolution? I would imagine not, but I don't know.
Gabriel
QUOTE(cabbagerat @ Oct 3 2006, 12:59) *

Is it worth upsampling to 48kHz before encoding to avoid the limitations of the MP3 format with high frequency material and improve temporal resolution? I would imagine not, but I don't know.

Regarding avoiding sfb21 limitation (design limitation of mp3), the answer is clearly no, as the sfb21 is approximately starting at the same frequency in 44.1 and 48kHz modes.
Regarding improving temporal resolution: perhaps
gameplaya15143
QUOTE(audio2u @ Oct 3 2006, 00:17) *

Both files have the same FR.
But, will the quality of 2 MP3's encoded from these 2 wav's be the same?
I hope I've expressed myself clearly enough.

They should be close in audible quality. ABX to find out. Average bitrate should be higher for the higher samplerate though. And you expressed your question perfectly clearly to me.
audio2u
Thanks gameplaya!
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.