Soon to be Newbie Stereo owner & MP3s/OGG

M

MDS

Audioholic Spartan
First let me say that I do respect that some people can and do a hear a difference and prefer fully lossless or uncompressed audio when given the choice. I still maintain that lossy codecs do a great job in the vast majority of cases and is still 'good enough' for the other cases. I apologize if I sounded harsh with the uncalled for 'audiophile' quip - that is usually not my style.

Ok, let's start with why just comparing bit rates between PCM and lossy codecs is not sufficient to explain why lossy codecs sometimes produce sound that is noticeably inferior to some people.

In a nutshell, the bits that come out of the encoder are not simply a subset of the bits that went in. The encoder does not look at 1411 kilobits (1.4 megabits) in one second of audio and decide we can't hear bits 200-500 or bits 800,000 - 810,000 and thus they can be discarded.

PCM theory
As I think everyone knows, at least intuitively, PCM audio data is a sequence of numbers that are generated by sampling the analog audio thousands of times per second and calculating a value to represent the amplitude of the signal at each moment in time. This is what the analog to digital converter does.

The 'sampling rate' determines how many numbers there are per second and the 'bit depth' determines the range of those values. For CD, that means 44,100 samples per second and each value is a number between -32,768 and +32,767 (16 bits, but the numbers are signed because the waveform has both a positive and negative component). Basically, the ADC takes a snapshot of the analog signal every 1/44,100 seconds and computes its amplitude at that moment in time.

But our ears are analog, so for playback we need a DAC to convert those samples from the time domain into the frequency domain. There are many algorithms to do this: Fast Fourier Transform (FFT), Modified Discrete Cosine Transform (MDCT), and others. The amplitudes are converted to voltages and the DAC, along with a filter that chops the frequency to (roughly) half of the sampling frequency, re-creates the analog waveform.

So what does that have to do with a lossy codec? The codec can't determine what we can hear or not based solely on the PCM samples - it must first do the same thing that a DAC would do to convert from the time domain to the frequency domain.

It operates on blocks of samples. Using a filter, the blocks are further divided into "sub-bands", little slivers of the block if you will. Each sub-band is converted to the frequency domain and analyzed by comparing it to the perceptual model that defines how the human ear hears. If the model says we would not hear that little sliver because for example the preceding sliver was louder or the following sliver is louder and thus would mask this one and not be heard, that sub-band (all the samples from which it was created) are discarded. If it is deemed audible, then it must be included in the result.

All of the blocks (frames) that survive must be coded; ie turned back into bits and stored in an efficient manner. The target bit rate; eg, 192 kbps, determines how many bits are available to code each second of audio - so the encoder is constantly calculating the most efficient use of those 192 Kbits to encode that second of audio. If it is variable rate, it will use more or fewer bits as necessary instead of being stuck with a fixed number like 192 Kbits as in constant bit rate.

So the bits that come out of the encoder are not identical to the ones that went in and it is not fair to simply divide 1411 kbps by 192 kbps to determine how much was 'lost'. The MPEG 1 - Layer III (mp3) algorithm has been studied and tested extensively over the years. If you look at spectral plots of the resulting frequency, you will see that it tracks the original fairly closely.

Sure some things are lost (192 kbps for example drops ALL frequencies above roughly 16 kHz which most people can't hear anyway) but by modifying the block size and number of sub-bands it can be tweaked to work better for different types of music. Research on improving the perceptual model also may improve it, but I think those efforts are largely dead as we've moved on to other algorithms like AAC and of course Dolby Digital and DTS.

That's the best I can do for now...
 
M

miklorsmith

Full Audioholic
Excellent Explanation

Certainly convinced me. Of course, science and perception are inextricably tied with this as with any concept in audio. My failing is that I try to pull science (or pseudo- or false-science) to explain what I hear. I feel that some others should listen without (scientific) bias more. I suspect this may be near-impossible, as you cannot check yourself (or biases, or knowledge) at the door.

My (erroneous) citations of numbers (not my style either) was only to indicate that a lot of information is left out. The numbers I referred to are not indicative in any way of the ultimate signal quality one can expect to hear in any .mp3 file. In fact, the technology is amazing and does work very well. The fact that files can be reduced so much while still maintaining excellent sound is incredible.

I have done quite a bit of sighted A/B comparisons with different software packages and compression ratios. Balancing file size and quality, I use EAC/lame with a 192 VBR to great success. However, I have a nice CDP and the hardware I have with .mp3 files produces a harmonically thin sound that does not satisfy my personal expectations compared to the CD alternative.

As an aside, "CD quality" has long been held to be inferior by the true blue-bloods, as being overly compressed from the original analog signal. This thought has led to fierce defense of vinyl and the appearance of hi-rez audio formats. My opinion is that the oft-cited issues with CD sound will be cured through better playback equipment. In fact, it already has to a large extent. I see the long-range picture populated with hard-drive-based playback equipment, which is immune to jitter and clock issues. Expensive prototypes have been said to be the current state of the art, and they're infants. It's a great time for all of us.
 
BMXTRIX

BMXTRIX

Audioholic Warlord
One of the tests I think would be great would be a blind test with multiple encoding rates (64-384 + WAV) mixed together and put back onto CD.

Then listen in different environments. Put it on your main zone in the primary room, try the second zone output of the receiver. Try the distributed audio system and your ceiling speakers... in your bathroom.

The real key to all of this seems to be processing speed and alogrithm technology. MP3 is many years old now. WMV uses newer algorithms which are more processor intensive. Newer CODECs will be even more processor intensive and require better hardware to decode the audio. But, the file will be that much better for the same bit rate as other formats.

MP3 isn't the answer, it is just a tool. People who get hung up on MP3 being so bad, aren't using the tool for what it was intended for. It was never intended as an audiophile grade audio component. On the other hand, in my digital music server and my bathroom, I can start a playlist up by pressing one button as I walk into the bathroom in the morning. I can also drop a CD with MP3s on it into my car stereo and drive a full tank of gas away before having to change the disc or repeating a song.

CD, for that matter is a tool as well... Shouldn't a real audiophile be talking about how poor 44.1 sampling is compared to what goes on with SACD and DVD-A? The later two formats are really designed to be used on top end systems in good listening environments and exist specifically because CD is not the end-all be-all of what digital music can be.

There is no question in my mind that MP3 is far superior to cassette tapes which used to be the only way to carry music with you. It is not CD, but is far more transportable, and is far better than FM radio is for sure.

Just a tool, which should be used appropriately when being critical of it.
 
krabapple

krabapple

Banned
annunaki said:
Read my posts after the original, this has been addressed. I am sure a properly done Mp3 can sound very much like the original cd. However, the VAST majority of Mp3s are made using a lossy codec and do not sound like the original.
'Mp3' is not (yet) a generic term for data-compressed files.

All mp3s are lossy-compressed. Not all lossy compressed files are mp3s. Not all data compressed files are lossy.

Whether the vast majority of mp3s sound like their sources or not depends on the factors I've named. It is not an inherent quality of mp3s, that they *must* be audibly distinguishable from original. All mp3s do not sound like 128 kbps mp3s encoded with Xing.
 
krabapple

krabapple

Banned
miklorsmith said:
There is no "lossless" mp3, it's only a matter of how much loss there is. Uncompressed CD's, or .wav files in compu-speak, run at a bitrate of 1,411 kb/s. The .mp3 format is capable of no better than 320 kb/s. This means that AT BEST, 78% of the signal has been removed. At 192 kb/s, the removal percentage increases to 86%.

It is frequently said that the part that is removed is the part you don't hear. Logically, it is hard to imagine that the remaining 14% constitutes 100% of what you hear. In practice, reasonably resolving equipment quickly shows the reduced content to be sonically inferior.
Wow...you've just denied the logic behind perceptual encoding. Someone had better tell those poor programmers and developers, then. (Fortunately, science doesn't always stop with what is 'hard to imagine'.)

Body and dynamics become highly compromised as bit-rate decreases.
Yes, beyond a certain point, dependent on several other factors too.

I love .mp3 music. It sounds very good and is highly portable. It is not "CD quality" at any bitrate and is only played in my home at parties. Fine as background music, but for critical listening you're only cheating yourself.
Interestingly, you wouldn't be allowed to make this post on HA.org, without some ABX data to back it up. Got any?
 
newsletter

  • RBHsound.com
  • BlueJeansCable.com
  • SVS Sound Subwoofers
  • Experience the Martin Logan Montis
Top