# Confused About MP3 Sample Rates

G

#### Guest

##### Guest

I noticed for the first time, today, a common specification which
appears on practically every MP3-capable recorder. I've never really
paid it much attention but it struck me as odd just now.

Look at the specs for any MP3 recorder and you'll probably see listed
the bitrates at which the device can record, and then, puzzlingly,
the sampling rates it supports.

As I understand it, a 320 Kb/s MP3 file (for example) delivers data at
rate of 320 Kb/s. Period. Where, exactly does a sampling rate fit into
the equation?

Will an MP3 file recorded at 48KHz be larger or better sounding than
the same file recorded at 44.1KHz?

Or are the sampling rates perhaps stated as starting points from which
the MP3 algorithm starts its calculations to end up at a given
bitrate?

While we're at it, is the formula for calculating the target size of
an MP3 file at a given compression ratio as simple as taking the input
bitrate (say 1378.125Kb/s × [song length] for stereo 16/44.1) and
dividing it by the output bitrate to get the compression ratio and
applying that ratio to the file size?

KZ

G

#### Guest

##### Guest

Ken Zenachon wrote:
>
> Look at the specs for any MP3 recorder and you'll probably see listed
> the bitrates at which the device can record, and then, puzzlingly,
> the sampling rates it supports.
>
> As I understand it, a 320 Kb/s MP3 file (for example) delivers data at
> rate of 320 Kb/s. Period. Where, exactly does a sampling rate fit into
> the equation?

Starting with 16 bit, stereo, 44.1 kHz PCM (e.g. WAV file).

16 x 2 x 44,100 = 1,411,200 bits per second.

If this is compressed to MP3 with a resultant bit rate of 320 Kb/s, you
have achieved 1411200/320000 or roughly 4.4:1 compression ratio. The
higher the compression ratio, the more "lossy" the compression, and at
a certain point you will hear the sound degrading.

Sampling rate will set the upper limit of frequency response at
(practically) somewhat less than half of the sampling rate (see
Nyquist).

So MP3 bitrate combined with sampling rate will give you some idea of
your maximum frequency response as well as the amount of compression
achieved.

For best sound quality, go for higher sampling frequency (up to a
point) and lower compression ratio.

G

#### Guest

##### Guest

Drily Lit Raga wrote:
[snip good stuff]
>
> For best sound quality, go for higher sampling frequency (up to a
> point) and lower compression ratio.
>

Up to a point, indeed. There is a good reason why MP3 encoders tend to
reduce the sample rate when running at low bit rates. For a constant bit
rate, if you increase the sample rate you will decrease the number of
quantization bits.

In other words, at low bit rates, using different sample rates will vary
the balance between bandwidth and distortion (quantization noise and MP3
coding artifacts)

And in case it's still not clear, any particular MP3 file has a definite
audio sampling rate embedded in its code.

--
Anahata
anahata@treewind.co.uk -+- http/www.treewind.co.uk
Home: 01638 720444 Mob: 07976 263827

G

#### Guest

##### Guest

wrote:

>Up to a point, indeed. There is a good reason why MP3 encoders tend to
>reduce the sample rate when running at low bit rates. For a constant bit
>rate, if you increase the sample rate you will decrease the number of
>quantization bits.
>
>In other words, at low bit rates, using different sample rates will vary
>the balance between bandwidth and distortion (quantization noise and MP3
>coding artifacts)

Essentially *none* of the above is correct. Sorry.

Chris Hornbeck

G

#### Guest

##### Guest

Thanks, Drilly.
I actually havea pretty good grip on sampling theory. My question was
specifically about how the sampling rate of a file is factored into
the output MP3 bitrate, and why recording devices offer a choice of
sampling rates if the output bitrate is fixed.

KZ

On 20 Sep 2005 13:23:30 -0700, "Drily Lit Raga"

>Ken Zenachon wrote:
>>
>> Look at the specs for any MP3 recorder and you'll probably see listed
>> the bitrates at which the device can record, and then, puzzlingly,
>> the sampling rates it supports.
>>
>> As I understand it, a 320 Kb/s MP3 file (for example) delivers data at
>> rate of 320 Kb/s. Period. Where, exactly does a sampling rate fit into
>> the equation?
>
>Starting with 16 bit, stereo, 44.1 kHz PCM (e.g. WAV file).
>
>16 x 2 x 44,100 = 1,411,200 bits per second.
>
>If this is compressed to MP3 with a resultant bit rate of 320 Kb/s, you
>have achieved 1411200/320000 or roughly 4.4:1 compression ratio. The
>higher the compression ratio, the more "lossy" the compression, and at
>a certain point you will hear the sound degrading.
>
>Sampling rate will set the upper limit of frequency response at
>(practically) somewhat less than half of the sampling rate (see
>Nyquist).
>
>So MP3 bitrate combined with sampling rate will give you some idea of
>your maximum frequency response as well as the amount of compression
>achieved.
>
>For best sound quality, go for higher sampling frequency (up to a
>point) and lower compression ratio.

G

#### Guest

##### Guest

Chris Hornbeck wrote:
>
> Essentially *none* of the above is correct. Sorry.

Then I must have expressed myself badly or you didn't understand what I
meant. But I can't be bothered to pursue it further unless you want to

Anahata

G

#### Guest

##### Guest

"Anahata" <anahata@treewind.co.uk> wrote in message
> Chris Hornbeck wrote:
>>
>> Essentially *none* of the above is correct. Sorry.
>
> Then I must have expressed myself badly...

It wasn't really bad expression, but some how the word
ordering lost me until I read it 3 times.

I think what you were trying to say was basically right.

However, the internal operation of MP3 coders is pretty much
a black art unless you're an insider or have access to some
open source encoder. It's dangerous to try to generalize
about what they do, except that they produce valid MP3
bitsteams that most decoders (which are highly standardized)
turn back into an approximation of music. ;-)

G

#### Guest

##### Guest

On Wed, 21 Sep 2005 06:58:46 +0200, Chris Hornbeck wrote:

> wrote:
>
>>Up to a point, indeed. There is a good reason why MP3 encoders tend to
>>reduce the sample rate when running at low bit rates. For a constant bit
>>rate, if you increase the sample rate you will decrease the number of
>>quantization bits.
>>
>>In other words, at low bit rates, using different sample rates will vary
>>the balance between bandwidth and distortion (quantization noise and MP3
>>coding artifacts)
>
> Essentially *none* of the above is correct. Sorry.

Maybe hard to understand, but Anahata was completely correct.

MP3 can be used with a range of bitrates. If the output bitrate is
30kbit/sec, quality wil get worse if you try to put a stereo signal with
48k samples/sec in the file. So at low bitrates, the result is better
with lower samplerates and less channels, e.g 22ksamples mono at 30
kbit/sec.

If the bitrate is high enough, there is an advantage in a higher
samplerate.

As we are discussing quality. Quality depends also on the algorithm. With
Lame you have a number of settings impoving quality at the cost of extra
CPU time for compression.

--
Chel van Gennip
Visit Serg van Gennip's site http/www.serg.vangennip.com

G

#### Guest

##### Guest

On Wed, 21 Sep 2005 11:54:51 +0100, Anahata <anahata@treewind.co.uk>
wrote:

>Chris Hornbeck wrote:
>>
>> Essentially *none* of the above is correct. Sorry.
>
>Then I must have expressed myself badly or you didn't understand what I
>meant. But I can't be bothered to pursue it further unless you want to

I'm sorry to have been short. The problem is doubtless
with my reading comprehension. When you said "MP3 encoders
>tend to reduce the sample rate when running at low bit rates."
I got lost.

You doubless meant something different from what I read.
Again, my apologies.

Chris Hornbeck

Audio 6
Audio 1
Audio 2
Audio 1
Audio 1
Audio 2
Audio 8
Audio 1
Audio 4
Audio 1
Audio 3
Audio 5
Audio 2
Audio 5
Audio 3
Audio 1
Audio 2
G Audio 5
Audio 1
Audio 1