A review and some remarks on lossless and lossy sound formats, audio codecs, and trends (fashions)

These are some remarks on my recent review of comparisons of bit rates, sample rates, and the endless arguments about whether to use 128kbps, 192kbps, 256lbps, or even 320kbps bit rates with lossy audio compression formats like MP3 at 44.1kHz, as well as a review of the debate about whether it matters whether consumer recordings use "only" CD Quality 16-bit sample bit depth at 44.1kHz sample rate, or higher sample bit depths like 24-bit and higher sample rates like 48kHz, 96kHz or even 192kHz for lossless formats, so-called "high(er) definition" audio.

I also have guide on "high definition audio" for Mac users here: Mac OS X: HOWTO adjust your system's sound quality, and record or find "high definition" audio sources.

Human beings happily enjoying music without being sad about bit rates and compression formats

WARNING: this page is fairly littered with links to MP3 bit rate and high definition audio comparison tests.
Find also various sample test files via: Audio engineering test/sample file resources, and online generators and online audio tests

Firstly, I'll put myself out there. If a musical composition and recording is basically quite good, and you can't even enjoy it at all in MP3 format on a small personal music playing device at 128kbps or even "as low as" 96kbps, then your view of life is broken, and you should go back in time to the trenches of WWI or perhaps explore a firestorm of WWII and see how much fun that is, until you realise how lucky you are to be alive and to be able to own and carry a cheap personal music playing device smaller than your pocket that holds days, weeks, or even months of music.

I listen to SBS Chill on my nice DAB+ digital radio at "only" 56 kbps/AAC (HE-AAC) and I manage to enjoy it.
I would prefer them to allocate a bit more, but the music is simply amazing anyway.

It is of course quite nice if you can have your personal music collection at higher bit rates, and if you have genuine professional audio needs or very - and I mean very - fancy speakers at home it is "nice" to use 320kbps MP3 or perhaps even a lossless format at 16-bit 44.1kHz, assuming the original source was "only" CD quality.

Or if the original source of the incredibly cleanly recorded music really warrants it, you might convince yourself (despite numerous professionally, scientifically conducted double-blind experiments that prove you won't be able to tell the difference) that you need 24-bit sample depth for your personal music collection, possibly even at one of the higher sample rates like 96kHz, presumably because you have very - and I mean very - sharp hearing better than nearly all other human beings, including "audiophiles", who have participated in those blind tests and all failed to consistently notice any difference.

But I really don't believe your ears and home speakers are so good you ever "need" 24-bit/192kHz lossless in your personal music collection.

Some background on lossy compressed and lossless audio formats

So, enough of the opinions for now, and on to the research and summary. It is useful to know that:

- From Wikipedia: Bit rate:

'the number of bits that are conveyed or processed per unit of time.'

- From Wikipedia: Sample rate:

'defines the number of samples per unit of time (usually seconds) taken from a continuous signal to make a discrete signal.'
'The full range of human hearing is between 20 Hz and 20 kHz. The minimum sampling rate that satisfies the [Nyquist-Shannon] sampling theorem for this full bandwidth is 40 kHz. The 44.1 kHz sampling rate used for Compact Disc was chosen for this and other technical reasons.'

Dogs and cats and some other animals can hear higher frequencies it seems, but they don't usually use iPods, although they might listen to music on very expensive sound systems in the loungerooms of audiophiles.

I recommend also this tutorial series by Dave Marshall from 2001: Implications of Sample Rate and Bit Size

Comparing bit rates of lossy compressed samples without considering the sample rate of the encoded source is inconsistent. For example, one might compare MP3 bit rates of different sample files assuming the same sample rate (44.1 kHz for traditional reasons) but it "aint necessarily so". Mostly it is (because mostly an MP3 is encoded from a 44.1 kHz CD quality source). But not always.

The bit rate works together with the sample rate in a subtle way to give what you perceive as sound quality. From Wikipedia:MP3:

'Compression efficiency of encoders is typically defined by the bit rate, because compression ratio depends on the bit depth and sampling rate of the input signal. Nevertheless, compression ratios are often published. They may use the Compact Disc (CD) parameters as references (44.1 kHz, 2 channels at 16 bits per channel or 2×16 bit), or sometimes the Digital Audio Tape (DAT) SP parameters (48 kHz, 2×16 bit). Compression ratios with this latter reference are higher, which demonstrates the problem with use of the term compression ratio for lossy encoders.'

'Several bit rates are specified in the MPEG-1 Audio Layer III standard: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320 kbit/s, with available sampling frequencies of 32, 44.1 and 48 kHz.'

'A sample rate of 44.1 kHz is almost always used, because this is also used for CD audio, the main source used for creating MP3 files. A greater variety of bit rates are used on the Internet. The rate of 128 kbit/s is commonly used, at a compression ratio of 11:1, offering adequate audio quality in a relatively small space. As Internet bandwidth availability and hard drive sizes have increased, higher bit rates up to 320 kbit/s are widespread.'

Uncompressed audio as stored on an audio-CD has a bit rate of 1,411.2 kbit/s, so the bitrates 128, 160 and 192 kbit/s represent compression ratios of approximately 11:1, 9:1 and 7:1 respectively.'

The compression ratio for 320kbps MP3 at 44.1kHz is 4.4:1, at which point - if you care about the sound quality so much - you might as well ask yourself why not just use a lossless compression format like Apple Lossless ALAC (which BTW is also (now) supported by all iOS device (iPod, iPad, and iPhone) models) or FLAC with a compression ratio of about 2:1.

OK, let's look at bit depths for uncompressed lossless like WAV and AIFF:

- From Wikipedia: Audio bit depth:

'In digital audio using pulse-code modulation (PCM), bit depth is the number of bits of information in each sample, and it directly corresponds to the resolution of each sample. Examples of bit depth include Compact Disc Digital Audio, which uses 16 bits per sample, and DVD-Audio and Blu-ray Disc which can support up to 24 bits per sample.'


'Bit depth is only meaningful in reference to a PCM digital signal. Non-PCM formats, such as lossy compression formats like MP3, AAC and Vorbis, do not have associated bit depths. For example, in MP3, quantization is performed on PCM samples that have been transformed into the frequency domain.'

'The bit depth has no impact on the frequency response, which is constrained by the sample rate.'

- From Pulse Code Modulation (PCM):

'a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, Compact Discs, digital telephony and other digital audio applications. In a PCM stream, the amplitude of the analog signal is sampled regularly at uniform intervals, and each sample is quantized to the nearest value within a range of digital steps. PCM streams have two basic properties that determine their fidelity to the original analog signal: the sampling rate, the number of times per second that samples are taken; and the bit depth, which determines the number of possible digital values that each sample can take.'

Just quoting bit rates without stating specifics of the encoding method is dangerous (error prone). You can't compare bit rates between say lossy MP3 and AAC with sample/audio bit depths of lossless uncompressed WAV PCM or lossless compressed ALAC or FLAC without specifying exactly what was done and how in the processing and encoding. Also, in the past there was a wide range of quality in MP3 and AAC encoders, although this is less so in 2013.

So here is the crash course in what really counts, unless you are a genuine audio professional wrangling with issues specific to high-end professional audio production (not your iPod's music collection or your home movies):

- Music CDs use 16-bit, DVD-Audio and Blu-ray can support 24 bits per sample, and they can support a range of sample rates higher than the 44.1kHz used for CDs. A lot of people listened to 16-bit CDs for a long time and it didn't kill them, and it's still not dangerous to listen to "only" 16-bit at 44.1kHz if the music is good. See also my summary at: Mac OS X: HOWTO adjust your system's sound quality, and record or find "high definition" audio sources

- From Wikipedia: Advanced Audio Coding (AAC)

'a standardized, lossy compression and encoding scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit rates'

There is increasing support for AAC in consumer devices, but MP3 is still probably more widely supported (still the "de facto"), although the gap is closing fast. Therefore:

MP3 (a lossy compression format) is not suddenly evil just because Advanced Audio Coding (AAC) (another lossy compression format) is clearly usually better as an algorithm. There are still a lot of devices that still don't support AAC, and if you are preparing music for somebody who has a device that only handles MP3 (and more still do), or if you are unsure, then use MP3. There is no shame in it, you will not be less cool than somebody who uses AAC, you will merely need a bit more (say 20% to 30%) more disc/storage space and more kbps to get about the same sound quality, depending on the type of music (see comparison links at the end of this article).

And even if you use Apple devices (as I do), you are still allowed to use MP3s, in 2013.

- High Efficiency AAC is typically used by broadcasters who can only offer lower bit rates; the algorithm is tuned to work well with less data and with streaming.

- Apple's popular .m4a suffix does not tell you automatically what the audio format is. It is a container format, and could, for example, contain ACC lossy compressed audio or ALAC lossless compressed. One needs to open the container and look inside to know.

- Some people claim that at lower bit rates the free open source Vorbis lossy compression format performs slightly better than AAC, but at higher bit rates above 128kbps it is likely indistinguishable.

- If you insist on using completely lossless compression, it does not matter much whether you use Apple's Lossless Audio Codec (ALAC) (often stored inside a special MP4 container with the filename extension .m4a) or the Free Lossless Audio Codec (FLAC). Really, it doesn't.

- ALAC 'Testers using a selection of music have found that compressed files are about 40% to 60% the size of the originals depending on the kind of music, which is similar to other lossless formats'

- FLAC 'Digital audio compressed by FLAC's algorithm can typically be reduced to 50–60% of its original size'.

So you can win a bet at a pub with an audiophile by quoting Wikipedia ! It depends a bit on the type of audio tested of course. But not that much.

If you are a musician or sound engineer working with professional sound recording and mixing you will need to stay lossless, and some sound editing systems support working "directly" in FLAC or ALAC - instead of uncompressed WAV or AIFF - and thus save typically around 50% storage space along the way (sometimes at the price of a bit of compression/decompression time).

Otherwise, unless you are being naughty distributing stolen PCM-sourced music via torrent sites and wish to save the torrent pirates some disk space and your torrent "customers" some download time, there is really barely any reason to not simply compress the music using a lossy format like AAC or MP3 (at 160kpbs, or perhaps 192kpbs, or if you insist you can hear the difference then even at 320kbps) and you still win massively on storage space.

There is an excellent summary of the (ridiculously) large number of audio formats at: http://en.wikipedia.org/wiki/Comparison_of_audio_codecs. But it does not show it seems a comparison of file sizes for various formats for "comparable" music styles.

Ok, time for some "expert" assessments of MP3 bitrates vs. CD quality

At the lower end of the scale, there is a "self-test" comparison by Daniel Potts (PC World) from 2002 at 'Audio compression formats compared'. It is interesting to note that he claims that MP3 with constant bit rate (CBR) can achieve 'CD quality' with 128kbps and a filesize of 960kB/min, whereas he claims AAC can achieve 'CD quality' with 80kbps and filesize of about 600kB/minute, a significantly smaller file size.

Really, 128kbps MP3 CBR ? That is probably far lower than most audio professional would equate to CD quality. Here is another comparison from How Stuff Works 'How MP3 Files Work' (and since they know how stuff works we trust them more):

'Using a bit rate of 128 Kbps usually results in a sound quality equivalent to what you'd hear on the radio. Many music sites and blogs urge people to use a bit rate of 160 Kbps or higher if they want the MP3 file to have the same sound quality as a CD.'

'Some audiophiles - people who seek out the best ways to experience music - look down on the MP3 format. They argue that even at the highest bit rate settings, MP3 files are inferior to CDs and vinyl records. But other people argue that it's impossible for the human ear to detect the difference between an uncompressed CD file and an MP3 encoded with a 320 Kbps bit rate.'

[It is assumed above that they are talking here about Constant Bit Rate (CBR) not Variable Bit Rate (VBR).]

Here's another example of mp3 vs cd audio quality tests from Sam Lin asserting that CD quality requires a bit higher MP3 bit rate, including some frequency analysis and nice graphics to prove it. He not only tested an orchestral piano piece and a pop song, he also tested some pink noise. He did blind listening tests and used a range of different sorts of speakers:

'There has been much debate on the sound quality of MP3's vs the 16-bit linear PCM used in producing audio CD's. Not being able to find much in the way of critical test results, I set out to perform some tests of my own. As a baseline, I chose 192Kbps as the lowest MP3 bitrate, since this seems to be a commonly agreed upon threshold for "near CD quality," and most of the MP3's I've listened to encoded below 192Kbps have sounded too degraded for my tastes.'

Some opinions, from a musician (live performer)

Oops, what was that I read above ? Many experts seem to agree that most/many people can't hear the difference between a 16-bit 44.1 kHz CD and an MP3 at 192kbps (CBR). And I recall well when CDs came out that lots of people seemed to enjoy the music on them ! Maybe it was ... because of good music, with good musicians, with good songs played well .. maybe it wasn't so much because of every last digital bit.

Most posh wine "experts" can't tell the difference between red wine and white wine when their nose is pegged and some can't even tell the difference when just blindfolded; it must be true if The Guardian says it too. And many - if not most - audiophiles bathe in their own self-absorbed obsession with bit rates, bit depths, and sample rates. A similar sentiment is expressed in this humorous MacWorld article 'Listen- (or shut-) up', which includes some nice tests.

Having some of your music in only 128kbps MP3 (instead of 192kbps or 320kbps MP3, or better AAC, or even in a nice compressed lossless format like FLAC or ALAC) is not a good reason to be grumpy or whinge and complain:

If you are still sad, maybe you have chosen the wrong music instead of the wrong bit rate or audio format ? Or perhaps you could learn how to sing a song or play a musical instrument instead. It may even be more fun than fussing about bit rates. And it might even sound better live, too.

You are also not suddenly a better human being than somebody else if your entire personal music collection is all, only, strictly, religiously, in 320kbps. Up to the challenge? Do 320kbps mp3 files really sound better? Take the test!

Live is best, uncompressed !

I am a live musician, a performer, and I know from experience that as long as you are an entertainer, you can bring people enjoyment, if you have the will to do it. And I also know, that nothing, no recording technology, no digital anything, will ever reproduce the sound of a live instrument, ever, anywhere. Ask my bongos (wood and skins/hide); they do some amazing things that no computer will ever do, and no number of bits are ever going to match them. Or stand near a nice brass trumpet played well and listen to it. Doh, computers and most speakers are not made of wood or hide or brass !

But what if I am a big-time DJ playing big music on big speakers to a big crowd at a really big gig ?

You mean like at your girlfriend's 18th birthday party, where all of her (heavily drinking) friends might notice if you only use 192kbps MP3s of Lady Gaga ? Maybe, just to be safe, you should instead use only 32-bit floating point lossless with 192kHz sample rates, so they can hear those really special "bright" sounds (that were never present in the original recordings anyway) above the ... noise ?

Or maybe there is a dog or cat at the party (oops, "gig") with really sharp hearing ?

If you do seriously have the chance to present your audio wares professionally on quality audio equipment, for people who seriously care (or can even notice), then by all means use 320kbps MP3 (or similar high bit AAC) or, if you have the storage space to spare, then simply use uncompressed lossless WAV or AIFF, or compressed lossless ALAC or FLAC (assuming you can play FLAC directly without decompression on your Mac).

Some arguments for consistent use of 320kbps MP3s and even uncompresssed lossless by DJs are made in this article A DJ’s Guide to Audio Files and Bitrates by Dan White (Sep 2012) (although the article also makes some terminology mistakes, such as in one place confusing bit rates of lossy codecs with sample bit depth and sample rates of lossless ones).

One potentially good argument is that if you are processing the music on the fly, such as tempo shifting for tempo matching, then - if you really have to work with lossy compressed MP3 - 320kbps is more forgiving, but of course it also means your processors have to work a bit harder. In any case, storage is now cheap and compact, and processing power is getting better all the time.

"And I am DJing with MP3s because ..."

If you really are a "big time" DJ, what are you working with MP3s for ? If you are seriously DJing professionally,
you don't have to worry about whether or not all of your music resources will fit on your iPhone.

Audiophiles insisting they can hear better than 16-bit / 44.1kHz Compact Disc quality are (probably) kidding themselves

I recommend that anybody who still seriously doubts this reads this detailed article by Monty, Mar 2012, a humorous and technically rich challenge: 24/192 Music Downloads ...and why they make no sense. Accurate, scientific, fantastic ! Also tells you how your ears work, and provides some fabulous audio test files (including some very quiet ones, and some very high frequency ones, for you to _not_ hear noise). After explaining well why 196kHz sample rate won't help you (and may even do some harm) he explains how dithering can push the dynamics of a 16-bit system down below the usually quoted RMS figure of -96dB down to -120dB, and gives test files to prove it ! And his conclusion:

'16 bits is enough to store all we can hear, and will be enough forever.'


When does 24 bit matter?

Professionals use 24 bit samples in recording and production for headroom, noise floor, and convenience reasons.

16 bits is enough to span the real hearing range with room to spare. It does not span the entire possible signal range of audio equipment. The primary reason to use 24 bits when recording is to prevent mistakes; rather than being careful to center 16 bit recording-- risking clipping if you guess too high and adding noise if you guess too low-- 24 bits allows an operator to set an approximate level and not worry too much about it. Missing the optimal gain setting by a few bits has no consequences, and effects that dynamically compress the recorded range have a deep floor to work with.

An engineer also requires more than 16 bits during mixing and mastering. Modern work flows may involve literally thousands of effects and operations. The quantization noise and noise floor of a 16 bit sample may be undetectable during playback, but multiplying that noise by a few thousand times eventually becomes noticeable. 24 bits keeps the accumulated noise at a very low level. Once the music is ready to distribute, there's no reason to keep more than 16 bits.


Listening tests

There are numerous controlled tests confirming this, but I'll plug a recent paper, Audibility of a CD-Standard A/D/A Loop Inserted into High-Resolution Audio Playback, done by local folks here at the Boston Audio Society.


This paper presented listeners with a choice between high-rate DVD-A/SACD
[DVD-Audio (supports up to 2-channel 24-bit 192 kHz) and Super Audio CD] content, chosen by high-definition audio advocates to show off high-def's superiority, and that same content resampled on the spot down to 16-bit / 44.1kHz Compact Disc rate. The listeners were challenged to identify any difference whatsoever between the two using an ABX methodology. BAS conducted the test using high-end professional equipment in noise-isolated studio listening environments with both amateur and trained professional listeners.

In 554 trials, listeners chose correctly 49.8% of the time. In other words, they were guessing. Not one listener throughout the entire test was able to identify which was 16/44.1 and which was high rate, and the 16-bit signal wasn't even dithered!'

Some other useful audio and sound engineering guides and resources concerning formats

- From Paul Sellars of Sound on Sound, an absolutely fabulous "must read" description of MP3s and the MP3 encoding/decoding process: Perceptual Coding: How Mp3 Compression Works (May 200).

- From The Great MP3 Bitrate Test: My Ears Versus Yours:

' .. three songs chosen from vastly different genres, encoded from CD and transcoded into the various popular bitrates available for MP3s (64k, 96, 128, 160, 192, 256, and 320kbps with VBR off) ..'

His conclusion is that in some cases he could hear nothing better above 192kbps, but in some cases he reckons he could hear improvements at 256kbps and 320kbps.

- From PC Pro: 24-bit audio: the new way to make you pay more for music? By Barry Collins, Feb 2011

- Mac software to play FLAC files

- An Overview of Apple Lossless Compression Results by Kirk McElhearn, May 2011. He notes that the Apple Lossless codec has gone open source. Provides some nice tests on various styles of music demonstrating ALAC:

'The range of compression for these examples is from 36% to 68%, with the majority of the examples clustering around the 50% level.' .. ' (These file sizes are similar for other lossless formats, such as FLAC, SHN and APE.)'

So hopefully there's another argument, ALAC vs FLAC, that we no longer have to have (ever again).

I hope this review was of some interest to you and don't forget:

Entertainment, sentiment, performance, and participation are more important than bit rates and sample rates. Love beats technology, and live is best.
Syndicate content