Best daily deals

All products featured are independently chosen by us. However, SoundGuys may receive a commission on orders placed through its retail links. See our ethics statement.

The important difference between audio and file compression

Everything you need to know about audio coding compression and what it means for your music and streaming quality.
By
September 15, 2021

When discussing compression in the context of audio, disambiguation is needed, since it can refer to different things. Firstly, it can refer to dynamic range compression, where an audio signal’s amplitude characteristics are modified by signal processing—that can happen in either the analog or digital domain. That’s a topic for another day and not what we’re talking about here.

Making files on your computer smaller, which could be audio, video, or your tax return documents, is referred to as compression—specifically file compression—you’re probably familiar with .zip files. This is a technique that removes redundancy to make data files smaller, which can later be unpacked to restore the original files to their original sizes. It’s an offline process that doesn’t affect the data in any way once it’s been decompressed.

Editor’s note: this article was updated on September 15, 2021, for changes to wording and to add a contents menu.

An array of old school 3.5" floppy disks.
S Migaj Data storage has long been a limitation that needs to be worked around.

Then there is audio file coding compression, which audio codecs such as MP3, AAC, and FLAC enable. Digital audio compression codecs like these are the cornerstone of modern online streaming services. Unlike the dynamic range compression used in recording studios, audio compression codecs don’t affect perceived loudness. Instead, audio coding compression uses clever algorithms to shrink down an uncompressed 50MB music file into something much more portable, say around 7MB, for example. That’s obviously great news for your data plan if you stream a lot, but understanding the differences between codecs and the data compression coding they use is pretty important—if quality matters to you.

A picture of Pandora vs Spotify music streaming services search tabs open next to one another.
Lily Katz / SoundGuys
Comparing streaming services: Spotify’s Search tab (left) compared to Pandora’s Search tab (right).

If you need to decide which streaming service to sign up for, make sure to check the codec each service uses, rather than the specific streaming bit rate. It’s tempting to compare streaming quality based on numbers alone, but it’s wrong. While that flies in the face of the common perception that a larger number means better quality, it’s an important concept to understand.

Audio file compression can be the difference between a muddled mess and toe-tapping bliss. We’ve all heard our share of terrible MP3 rips and flawless FLAC files. Although music compression codecs are mostly very good these days, there is still plenty of misinformation and confusion out there about what makes for a good quality experience.

How does audio coding compression work?

Green apple iPod in front of pumpkin
Ben Szymanski The success of MP3 compression was propelled by downloads and a certain portable player.

Digital audio coding compression comes in a growing number of forms, from the files streamed from online services to the data sent to your Bluetooth headphones. For starters, almost all audio compression codecs are lossy—as opposed to lossless—meaning that some information is removed and discarded. This data reduction is not considered to be a big detriment to sound quality, provided the removed data is deemed inaudible to the vast majority of listeners. The compressed file is decoded and fed to a DAC when you want to listen.

256kbps AAC is equivalent to 320kbps MP3. Who knew?

File types like MP3, AAC, and Ogg Vorbis use psychoacoustic compression principle to exploit the limits of human hearing and remove imperceptible parts of the file to reduce its size. Encoding and decoding aren’t particularly time sensitive, and are done in the frequency domain using MDCT. These algorithms can be very accurate and produce great-sounding results with very small file sizes. Think about it like meticulously picking out which sounds can and cannot be heard: it takes a while, but is very difficult to distinguish from the origination source when done properly.


Real-time audio codecs, like Bluetooth’s SBC, aptX, LDAC, and others, tend to use noise shaping as a form of compression because it’s faster and can be done with lower latency. This type of compression isn’t content-specific like psychoacoustic compression is, but it still abuses the sensitivity of our ears to make compression optimizations. On the whole, results are quite good—but these algorithms have to complete very quickly. They, therefore, can’t squeeze file sizes down quite as far as psychoacoustic compression types do for the same given audio quality.

There’s also some overlap between the two, depending on your latency and processing requirements. AAC, for example, is used as both a file and Bluetooth codec. Both of these types of compression can also be taken to the extreme, and produce noticeable compression artifacts. However, streaming service file sizes and those transmitted over Bluetooth are usually more than good enough to avoid these problems.

A spectrogram showing what a 24-bit music file looks like without any data deleted from it - how audio compression works
This is what a 24-bit music file looks like before any data is removed. Frequency is the Y-axis, time is the X-axis, and intensity is color.

Finally, there are also completely lossless file types like FLAC. Similar to a .zip file, these data compression types exploit coding rather than auditory optimizations and won’t compress files anywhere near as much. Despite the larger file size, it’s generally considered impossible to tell the difference between a 320kbps MP3 and a FLAC file that’s 5x the size.

What effect does bit rate have on audio quality?

With the background out of the way, it’s important to recognize that not all compression algorithms are equal. Therefore, comparing quality based on file size or bit rate (inkbps) of two different file types is putting the cart before the horse. It’s not always possible to compare audio quality by bit rate alone. If you accept the premise that different compression algorithms can offer different qualities for the same bit rates, it stands to reason that sometimes a low-bitrate file can sound better than a high-bitrate one—depending on the codec, anyway.

There are a few factors that determine whether some bit rates are better than others. First is the algorithm type and what it’s designed to do, as we outlined previously. Non-real-time (aka offline), psychoacoustic codecs can actually produce less data and sound better than low-latency real-time codecs. Next is the quality of the algorithm and the encoder used (AAC is an improvement over MP3, for example), and Opus is considered better still for any given file size. Back in the early days, different MP3 encoders produced very different sounding results.

It's not always possible to compare audio quality by bit rate alone.

So how do we measure quality when the numbers don’t tell us everything? Well, we look to a more subjective test called the ITU-R BS.1116-3 perception test. Essentially, people listen to several files in both lossless and lossy versions and then rate the difference on a scale of 1-5. A score of 5 is imperceptibly different than a lossless source, and a score of 1 is a very annoying degradation of sound quality. While humans don’t make for ideal test equipment, it’s necessary when we try to compare file formats and their perceived performance.

For our purposes, check out the results from this 2014 Public Multiformat Listening Test. The test compares listener responses to five different popular compression codecs set at approximately 96kbps, and ranks them each for quality and distortion audibility.

Codec File Compression Quality Results
listening-test.coresv The mean rating given to each codec is indicated by the middle point of each vertical I-shaped line segment. Each I-shaped segment represents the 95% confidence interval of the mean rating (using bootstrap analysis) for each codec.

Despite the very similar bit rates, the Opus codec scores consistently higher than its competitors, followed by AAC and Ogg. The MP3 comes in fourth despite often encoding at a slightly higher bit rate. FAAC consistently performs the worst, highlighting that bit rate alone doesn’t determine audio quality. Also note how that even at 96kbps, heavy compression from the four most popular codecs doesn’t rank as annoyingly bad.

A chart comparing the Bluetooth codecs LC3 and SBC to one another from the Bluetooth SIG.
Bluetooth SIG Bluetooth LC3 scores higher for sound quality than SBC and also runs at lower bit-rates.

The LC3 Bluetooth codec at 160kkps claims to sound better than SBC at 345kbps. Our internal findings reveal that the aptX also beats SBC for sound quality, despite a very similar 352kbps bit rate. Likewise, aptX sounds better than LDAC at its 330kbps setting, but this is a much tougher comparison between LDAC at 660kbps and aptX HD at 576kbps.

How does quality compare across streaming platforms?

Enough of the hypothetical, what about the real world? Well, with this newfound knowledge we’re now in a position to look at digital download and streaming services with more of an eye for quality. Let’s quickly run down the quality on offer from the most popular streaming platforms.

Streaming ServiceMax streaming qualitySupported FormatsSpatial audio option
Streaming Service
Qobuz
Max streaming quality
24bit / 192kHz
Supported Formats
AIFF, ALAC, FLAC, WAV, WMA Lossless
Spatial audio option
No
Streaming Service
Amazon Music Unlimited
Max streaming quality
24bit / 192kHz
Supported Formats
FLAC, MP3
Spatial audio option
Yes
Streaming Service
Tidal HiFi Plus
Max streaming quality
24bit / 192kHz
Supported Formats
AAC, ALAC, FLAC, MQA
Spatial audio option
Yes
Streaming Service
Deezer HiFi
Max streaming quality
16bit / 44.1kHz
Supported Formats
FLAC
Spatial audio option
No
Streaming Service
Spotify Premium
Max streaming quality
320kbps
Supported Formats
AAC, Ogg Vorbis
Spatial audio option
No
Streaming Service
Apple Music
Max streaming quality
24bit / 192kHz
Supported Formats
AAC, ALAC
Spatial audio option
Yes
Streaming Service
YouTube Music Premium
Max streaming quality
256kbps
Supported Formats
AAC, OPUS
Spatial audio option
No
Streaming Service
SoundCloud Go+
Max streaming quality
256kbps
Supported Formats
AAC
Spatial audio option
No
Streaming Service
Slacker Radio
Max streaming quality
320kbps
Supported Formats
MP3
Spatial audio option
No
Streaming Service
Pandora
Max streaming quality
192kbps
Supported Formats
AAC
Spatial audio option
No
Streaming Service
Spotify Free
Max streaming quality
160kbps
Supported Formats
AAC
Spatial audio option
No
Streaming Service
Deezer Free
Max streaming quality
128kbps
Supported Formats
MP3
Spatial audio option
No

As you can see, there’s a surprising similarity between most of the streaming services. AAC is the most popular type of lossy compression, while Hi-Res libraries offer FLAC as standard. Providing you have a decent internet connection, you’re unlikely to notice any perceivable difference between the vast majority of these services. At around 192kbps, AAC sounds very good. Anything above that is a bonus.

The exception to the list is Spotify which, on most devices, defaults to a variable ‘Automatic’ setting and offers four fixed playback tiers: 24kbps (Low), 96kbps (Normal), 160kbps (High), and 320kbps (Very High). 160kbps with the Ogg Vorbis codec Spotify uses on most devices isn’t bad, but it’s easier to tell apart from lossless than 320kbps. Fortunately, you can manually set streaming quality to high or obtain very high’s 320kbps setting if you’re willing to pay for a Premium subscription.  If you want to go beyond that, you’ll be interested in Spotify HiFi.

Bluetooth codecs have higher bit rates for a given quality compared to streaming file types.

Most music streaming services now offer very similar levels of music quality. While you can pay more for high-resolution streaming, the lossy compression options out there are virtually indistinguishable from CD quality. So the next time you hear someone complaining about music streaming quality remind them it’s much more likely to be their cheap Alexa speaker or headphones that sucks.

Make your music sound great with the best headphones

FAQ

This is going to depend on what you value, what your able to perceive, and what your audio setup is like. If you just want an affordable option that works, get Spotify Premium. There’s even Spotify Duo for those who live with partners and want a discounted rate, along with other specific memberships. However, if you have a pretty good headphone or speaker setup, and want to listen to FLAC files, Amazon Music HD is an affordable option especially for Prime members. To learn more, read up on our comprehensive Spotify vs Amazon Music HD rundown.