Topic: SNR of MP3 (Read 19151 times)
0 Members and 1 Guest are viewing this topic.

## SNR of MP3

##### Reply #25 – 2012-08-31 20:07:39
I still think that the best way to measure mp3 noise is to do a subtraction test.

I can't think of a worse general way to measure anything than subtraction tests, because they frequently conflate a myriad of differences into one signal.

## SNR of MP3

##### Reply #26 – 2012-08-31 21:08:46
The SNR of an MP3 is around 25-30dB.  Does this mean that I only need to decode them to 6-bit PCM to capture all the details?

So, after all of the back and forth of how to measure the SNR of an mp3, has this question been answered?

It was a rhetorical question.  Of course it's not enough to capture the output of MP3.  LPCM's quantization noise is spread out evenly across the entire spectrum (noise-shape dither can do some juggling, but not much), but of course MP3 has low distortion levels "where it counts".

The main point of bringing up the subject, and I hope everyone gets the point, is that simply taking the SNR or THD+N and dividing by 6.02dB and saying "use this many bits" is not an accurate model.

## SNR of MP3

##### Reply #27 – 2012-08-31 21:58:13
Ignoring that people may have missed the point or are simply ignoring the point in order to argue a different one and then nitpick when things don't go their way, maybe you could offer some insight as to how you arrived at the figure you provided?
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

## SNR of MP3

##### Reply #28 – 2012-09-03 09:50:15
The main point of bringing up the subject, and I hope everyone gets the point, is that simply taking the SNR or THD+N and dividing by 6.02dB and saying "use this many bits" is not an accurate model.
...but looking at the minimum point in the noise floor, and figuring out how many bits are needed to preserve that, works pretty well (see LossyWAV).

Cheers,
David.

## SNR of MP3

##### Reply #29 – 2012-12-29 17:30:36
What is the THD+N of 16-bit 44.1 Khz PCM?

## SNR of MP3

##### Reply #30 – 2012-12-29 17:52:03
-96dB without playing games with dither and it's all N; there is no THD.

Perhaps a little research into digital sampling is in order?
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

## SNR of MP3

##### Reply #31 – 2012-12-29 18:04:45
Anyways, anyone who ever heard a 6-bit PCM file knows this is funny. 6-bit PCM is incredibly noisy and it is the equivalent of the rough maximum resolution you can do with digital audio on the PC Speaker. Yes, I mean that little tiny beeper.

Here is a short part of a 192 kbps mp3 bitcrushed to 6-bits:
http://www.hydrogenaudio.org/forums/index....showtopic=98564

## SNR of MP3

##### Reply #32 – 2012-12-29 21:21:47
Anyways, anyone who ever heard a 6-bit PCM file knows this is funny. 6-bit PCM is incredibly noisy and it is the equivalent of the rough maximum resolution you can do with digital audio on the PC Speaker. Yes, I mean that little tiny beeper.

Here is a short part of a 192 kbps mp3 bitcrushed to 6-bits:
http://www.hydrogenaudio.org/forums/index....showtopic=98564

To be clear, MP3 does not work the same as PCM.  128kbit/s @ 44.1k is 2.9 bits per sample.  Throw in ~ 2:1 lossless compression and you get very roughly 6 bits per sample.  Actually when I tried this via the subtraction method (and using WMA rather then MP3) I got closer to 5 bits per sample.  This puts a hard limit on the SNR because you only have a few bits, thus noise will be large as in your sample.  However, lossy codecs are quite clever about distributing that quantization noise, and so you will find that 2.9 bits/sample on mp3 sounds quite a lot better then 6 bits/sample PCM.

## SNR of MP3

##### Reply #33 – 2012-12-29 22:44:23
In other words SNR is not enough representative metrics. It doesn't take  psychoacoustics into account.

## SNR of MP3

##### Reply #34 – 2012-12-29 23:05:18
So what would be the "percievable SNR" for an average mp3?

## SNR of MP3

##### Reply #35 – 2012-12-29 23:28:37
What do you mean?

The whole point of this discussion is that applying SNR as a metric to qualify MP3 is a lot more than just a little silly.  SNR of MP3 is low, or far lower than what people would normally deem acceptable from a hi-fi system. The lower it can go without being noticed or found offensive, I'd say the better the encoder is doing its job.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

## SNR of MP3

##### Reply #36 – 2012-12-30 01:45:10
So what would be the "percievable SNR" for an average mp3?

What do you think perceivable snr would mean?

## SNR of MP3

##### Reply #37 – 2012-12-30 02:42:10
The LP noise floor is rather high- maybe -70dB under very good conditions. 12-bit sampling (RMS noise floor of -72dB) would be sufficient for LP use as long as your levels are right (peak signal above -6dB). (12-bit sampling was used for DV but hasn't seen any other widespread use).

The SNR of an MP3 is around 25-30dB.

In which alternative universe? At what ludicrously low bit rate?

SNR is a measurable quantity. I've measured it in high-bit rate MP3s. The exact number escapes me but I seem to recall some number north of 80 dB. It was so high that I questioned the use of bandwidth to maintain it.

The SNR of a good-sounding MP3 will be in the 30dB range. Dynamic range is much, much higher. Consider it floating-point like.

This is not alternative universe, this is perceptual coding 101.
-----
J. D. (jj) Johnston

## SNR of MP3

##### Reply #38 – 2012-12-30 02:44:05
I still think that the best way to measure mp3 noise is to do a subtraction test.

You're still dead one right, too!
-----
J. D. (jj) Johnston

## SNR of MP3

##### Reply #39 – 2012-12-30 02:47:47
I still think that the best way to measure mp3 noise is to do a subtraction test.

I can't think of a worse general way to measure anything than subtraction tests, because they frequently conflate a myriad of differences into one signal.

Since MP3 has no phase shift or frequency shaping to speak of, delay-compensated direct difference is exactly the right way to measure SNR.

In fact, it's ALWAYS the right way to measure SNR, which is formally mathematically defined as

SNR = sum( (x*x))/sum( (x-y)^2)

So Arny, you're right that it makes little sense in perceptual terms, which is why I say in my talks "SNR is mostly useless for perceptual purposes".  None the less, SNR is the relevant question when asking "bits of resolution", courtesy of Mr. Shannon.
-----
J. D. (jj) Johnston

## SNR of MP3

##### Reply #40 – 2012-12-30 02:49:17
Of course, as a later codec using noiseshaped DPCM showed clearly, 6 bits/sample is more than sufficient, but there is substantial noise shaping as well as power adaptation.
-----
J. D. (jj) Johnston

## SNR of MP3

##### Reply #41 – 2012-12-30 09:23:13
Of course, as a later codec using noiseshaped DPCM showed clearly, 6 bits/sample is more than sufficient, but there is substantial noise shaping as well as power adaptation.

Pardon my ignorance, but which codec is that? And 6-bit DPCM does in fact have more bits of resolution, given that it encodes sample differences, not the samples themselves. 4-bit ADPCM ordinarily gives around 10-14 bit of resolution, even without any dithering or noise shaping.

## SNR of MP3

##### Reply #42 – 2012-12-30 10:15:30
I don't get it. If I encode 1 kHz at 0 dB to mp3, will that mean I will get noise at -30 dB?
I find that hard to believe. Is there any sample that I can use to measure noise level in some program like Audacity, for example?

## SNR of MP3

##### Reply #43 – 2012-12-30 11:09:07
Of course, as a later codec using noiseshaped DPCM showed clearly, 6 bits/sample is more than sufficient, but there is substantial noise shaping as well as power adaptation.

Pardon my ignorance, but which codec is that? And 6-bit DPCM does in fact have more bits of resolution, given that it encodes sample differences, not the samples themselves. 4-bit ADPCM ordinarily gives around 10-14 bit of resolution, even without any dithering or noise shaping.

You're missing the key point, look-ahead noise shaping, ala Jayant-Noll A*DPCM.

I also think you're confusing dynamic range with SNR.

The paper was from the dire end of Lucent and its subsequent slit into a bunch of companies.
-----
J. D. (jj) Johnston

## SNR of MP3

##### Reply #44 – 2012-12-30 11:12:06
I don't get it. If I encode 1 kHz at 0 dB to mp3, will that mean I will get noise at -30 dB?
I find that hard to believe. Is there any sample that I can use to measure noise level in some program like Audacity, for example?

You can use any music you want, just time-align your before and after, and then give on a gain of +1 and the other -1.

You can believe what you want, and with a single sine wave, you will get more than 30dB even though you don't need it, but you really need to understand how noise shaping works in a perceptual coder.

You are aware of the "13dB Miracle" yes?
-----
J. D. (jj) Johnston

## SNR of MP3

##### Reply #45 – 2012-12-30 18:02:34
I find that hard to believe.

That 5 or 6 bits worth of information has a lot more quantization noise then 15 or 16?  What about that is unexpected?

## SNR of MP3

##### Reply #46 – 2012-12-30 20:47:07
I find that hard to believe.

That 5 or 6 bits worth of information has a lot more quantization noise then 15 or 16?  What about that is unexpected?

Yes, but MP3 is not 5 or 6 bit PCM. It is a 32 bit floating point file that contains lossily compressed information which is stored in a non-PCM way. Some guy on this forum once said that mp3 files vs. wav files are like vector graphics files vs bitmap files. By the type of reasoning some people think here, MIDI files would be around perhaps 0.001 bit.

A file with 2.9 bits of resolution would divide the waveform into only cca 7.4 steps and distort the sound wave into a near-squarewave shape. It would be unlistenable even with the most clever dithering and noise shaping in the universe unless you sampled it at megahertz rates, which mp3 definitely does not do.

And LPs can definitely not be stored in just 12 bits. SNR does not tell the whole picture. Quantization error is not "noise", it is ugly disharmonic distortion. Dither prevents that, but it increases dynamic range only, the SNR is actually worse. A dithered 12 bit recording would get rid of most of the distortion, but it would have more noise than an LP. The reason why tapes and LPs are sampled at 16 or 24 bits when digitalizing is that the noise floor of a tape or an LP is very different from digital quantization "noise". You can actually hear signals below the noise level on analog mediums while on undithered digital the signal just drops off.

A CD is definitely superior to LP in noise level, however this does not apply to low resolution digital recordings. A cheap 1980s tape boombox and an 8-bit file might have a similiar SNR, but the tape boombox will sound better as the noise on it is just hiss while 8-bit file will have an ugly, swishy noisy distortion sound in the quiet parts. That is because quantization noise is not static or white noise, it is just how our ears percieve a "steppier" waveform. I am no analog fanboy, but digital quantization error definitely sounds worse than analog noise. That is the same reason why an overdriven tube/transistor analog distortion pedal creates cool rock/metal guitar sounds while digital clipping creates horrible sound. Try digitally clipping a guitar recording in Audacity, you are not going to get a cool rock sound, you are gonna get some seriously horrible sound. Both phenomena are caused by clipping, but forms of clipping are very different from each other just like forms of noise.

## SNR of MP3

##### Reply #47 – 2012-12-30 21:09:54
The 2.9 bits/sample quoted is not a literal 2.9 bits for every sample - rather an average. Not all samples are stored equally in MP3.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

## SNR of MP3

##### Reply #48 – 2012-12-30 21:17:00
The 2.9 bits/sample quoted is not a literal 2.9 bits for every sample - rather an average. Not all samples are stored equally in MP3.

Yes, but still, 2.9 bits would divide the waveform into only 7 steps. A sine wave would look like a rough stairway. This is clearly not the case with MP3.

## SNR of MP3

##### Reply #49 – 2012-12-30 21:33:24
No, MP3 doesn't store wave data in PCM format.