Analysis of AAC Vs MP3. Which is Better Quality?

MP3 Vs AAC audio quality at comparable bit rates

In my first post, we looked at cellphone ringtone formats, focussing on the .m4r used on iOS devices.

The question of codec compression quality was raised in the context of MP3 Vs AAC (M4A). While audio quality is largely subjective, there are some attributes of quality that we can measure and discuss. In this post we’ll do a simple A/B comparison of an audio file that has been compressed with both MP3 and AAC codecs at a variety of comparable bitrates

Audio file for analysis

The audio file that we are going to analyse is a track from the original ToneRack iPhone app. It is called Trance Up Uno, and as the name suggests this song is an uplifting trance number. (Sorry if you don’t like electronic music, but bear with me, it’s good for the purpose of comparison.) It has a full range of frequencies and good stereo spread.

The reference tracks

For any A/B comparison we need a reference track. Here is the track at 320kbps mp3 and m4a (AAC). While this is compressed audio, 320kbps is currently considered the benchmark for high quality compressed audio. iTunes currently offers audio in 320kbps and 256kbps. So we’ll stick to this level of quality for the purpose of this simple analysis.

320k

Below are the audio files and the corresponding frequency graphs (mp3 on the left and AAC on the right). The screenshots are taken from Waves Paz Anaylzers and show the RMS amplitude of frequencies across the audible frequency range.

Trance Up Uno 320k MP3

ToneRack_TranceUpUno_320k_mp3

Frequency response of 230k mp3

320k mp3

Trance Up Uno 320k AAC

ToneRack_TranceUpUno_320k_m4a

frequency response of 320k m4a

320 AAC

128k

You’re probably thinking that 256kbps should have been the next rate to compare, but even at this rate, although audible, the differences in quality are quite subtle. Below are the audio files at 128k and the corresponding frequency graphs (mp3 on the left and AAC on the right).

Trance Up Uno 128k MP3

ToneRack_TranceUpUno_128k_mp3

frequency response of 128k mp3

128k mp3

Trance Up Uno 128k AAC

ToneRack_TranceUpUno_128k_m4a

frequency response of 128k m4a

128k AAC

Listening to the samples, you can hear that the mp3 compression has introduced subtle, yet audible artifacts. This is most notable in the slight graininess of the upper frequencies. Comparing the graphs, you can see that the AAC codec is  more aggressive with its low pass filter, which brick walls a touch above 16kHz, while the mp3 codec tails off less aggressively.

 

56k

Now we jump right down to our 56k encodings. And this is where things start to get interesting! (See mp3 on the left and AAC on the right).

Trance Up Uno 56k MP3

ToneRack_TranceUpUno_56k_mp3

frequency response 56k mp3

56k mp3

Trance Up Uno 56k AAC

ToneRack_TranceUpUno_56k_m4a

frequency response 56k m4a

56k AAC

At this low bit rate of 56kbps the audible difference between the two codecs is like night and day. The mp3 version has been compressed to a point where the degradation of the audio quality is immediately noticeable, with low-fi artefacts very prominent, rendering the audio unusable for any kind of meaningful application. On the other hand the AAC version is still perfectly audible, suffering only from some minor graininess and high frequency cutoff. It’s interesting that the mp3 codec retains a wider frequency range (with a comparable LPF to that of the 128k AAC, at about  16kHz) while the AAC codec sacrifices frequency bandwidth in favour of retaining a higher quality of sound in the remaining bandwidth. The AAC brick-walls at around 10kHz.   If you consider that the amount of frequencies (and in turn data) doubles with every octave, you can understand that the AAC is much smarter approach – loose some of the data size contributing higher frequencies in order to allow a better ‘overall’ quality of sound.

 

32k / 16k

I did bounce this track at 32kbps for comparison, but these versions only serve to further demonstrate the point already made when comparing the 56kbps versions.  That being the AAC codec continues to sacrifice upper frequencies (for 32kbps rolling off at around 5k as opposed to the mp3 still rolling off at 16k)  in order to maintain a better sound quality. So, here is the audio file for the 16kbps as the final food for though.
Trance Up Uno 16k AAC

Frequency_Response_16k_m4a

frequency response 16k m4a

16k AAC

Bear in mind that the mp3 codec does not allow for encoding below 32kbps (for the probable reason that there is no practical application for audio of such low quality, not that I can think of anyway, and at least not in the context of digital content for the consumer market). The screenshot of the 16kbps AAC audio  shows a LPF applied at around 3kHZ, giving this version an upper frequency range around that of the standard telephone system. This aggressive low pass filtering and the ‘low-fi’ artefacts result in audio of a very low quality. However, having said that, one could argue that the sound is intelligible to a degree, and therefore could have some kind of practical application. This file has a data size of 80KB compared to the 1.3MB reference track  or 5.5MB at CD quality 44.1k 16bit. It’s testament to the ingenuity of the AAC code that there is any intelligibility at all. I’d take the 16kbps AAC over the 56kbps mp3 any day.

 

Conlcusion

This simple analysis has focused on 2 basic elements. The high frequency response (audio bandwidth) resulting from low pass filtering that can be measured and quantified. The audible compression artefacts are more subjective at higher bit rates, but undeniable at lower bit rates. The shift in thinking from the previous generation mp3 to the AAC is smart in it’s focus on delivering better quality at lower bit rates through (amongst other techniques) sacrificing upper frequencies. The consumer market bit rates of 320-256kbps (Eg. the quality of audio you get from iTunes or the like)  don’t display any perceptible differences in quality, while at lower bit rates (sub 128kbps) the AAC codec is a hands down winner.

 

Share it now!