Comparison:
mp3
Pros: supported by most devices, Cons: poor quality at low bitrates
aac
Pros: good encoding quality at low bitrate Cons: loads the processor during playback
I will deliberately not give examples of what AAC sounds like, since it has several encoding profiles:
- Low Complexity (LC-AAC)
- High-Efficiency Advanced Audio Coding (HE-AAC)
- Main Profile
- High Efficiency Advanced Audio Coding (AAC+)
The latter is precisely what is actively used in radio broadcasting. As the wiki says:
This profile is aimed at low bitrate. It is a combination of AAC LC, but with a sampling rate half that of the original, which significantly reduces the bitrate overhead, then uses Spectral Band Replication technology by predicting it and using some additional information for reconstruction. Naturally, this approach is not very accurate and is only suitable in cases where it is very necessary to reduce the bitrate.
And so, in simpler language, Evgeniy says:
The SBR mode, which invents the frequency, is not used in conventional AAC. there is a natural sound, and on the plus side there is an invented upper band from 6 kHz and above, synthesized based on very compressed information from the original sound
Let's draw some conclusions: aac aac - discord. Having started broadcasting, you can set aac+ in the same RadioBOSS and do more important things, and there are many more of them at the start of the radio station. But then it’s worth taking the time to play with the encoder’s settings and get better sound at a low bitrate.
ogg Pros: Free, better quality compared to mp3 Cons: Incompatible with some players
Evgeniy’s opinion about OGG:
It’s also a bit of a shame for ogg. Well, yes, they don’t use flagships, well, never mind them. Not everything in Moscow is done correctly, I was convinced more than once, seeing, for example, file databases on FTP, etc. And with all this, on OGG ~68 kilobits (always VBR) you can achieve the same sound as 128 mp3 stereo ! that is, just to save bitrate, it will also be very useful for someone, especially when it comes to embedding a stream into a website. The end user will ultimately not care what is encoded. Any browser will understand in any case, and the sound with small traffic will again be transmitted more efficiently, it will sound better, and not even in mono. To summarize: in the case of audio algorithms, OGG encoding algorithms are approximately the same as aac, the only questions are legal subtleties.
AAC frequency range
AAC compresses audio with losses: “extra” frequencies are cut off , the signal is leveled (“overlapping” blocks of information are added), and errors are corrected. All lossy codecs (codecs for lossy compression) work on approximately the same principle.
Losses are mainly expressed in the reduced frequency range : usually the upper limit of the HF. In addition, due to signal equalization, distortion can be (and most often is) added, which can be in any area of the range.
Let's see how AAC (source: lossless audio file) works in comparison with SBC on some Android smartphones and iPhones:
Full frequency range using AAC and SBC codecs
Serious differences in the implementation of AAC on different smartphones are immediately visible . There are a few things to consider:
- a person can theoretically hear sounds in the region of 20 Hz - 20 kHz;
- Most of the “stuff” in music is below 16-18 kHz;
- with age we perceive HF worse (up to 16-17 kHz on average after 30 years)
Let's take a closer look at the edge of the HF range :
As you can see, AAC on the Huawei P20 Pro “cuts” the HF very early: around 14 kHz . These frequencies can be heard even by very elderly people, if there are no hearing problems. Samsung Galaxy Note 8 (via AAC) limits the upper threshold to 17 kHz. But the iPhone 7 does better: about 19 kHz.
This scatter of results is especially interesting in comparison with the work of the SBC codec on the same Android smartphones. The upper limits of the range are higher on all “experimental” ones, albeit with greater distortion. But the main thing is that they are very similar: that is, the SBC codec works more or less the same on different phones.
Support of various formats by various browsers:
Please note that not all browsers support certain formats. Collected the data into a table. The data will be correct if you play the radio using HTML5. When using “old” Flash players, there may be more nuances.
Browser / Codec | mp3 | aac | ogg |
Google Chrome / Yandex Browser and others on Chromium | Yes | Yes | Yes |
Mozilla Firefox | Yes | Yes | Yes |
Internet Explorer | Yes | Yes | No |
Opera | Yes | No | Yes |
Safari | Yes | Yes | No |
Features of AAC
Another interesting point is that even files already encoded in AAC change when transmitted via the Bluetooth version of this codec. That is, they are recoded again. Before this, the test files were in uncompressed format.
Upper end of the frequency range. Source – AAC file
In general, the picture repeats itself . The decline for the iPhone occurs noticeably later and is already closer to the upper limit of hearing, in contrast to Android phones.
Background noise level (AAC file)
The background noise level graph clearly shows that even on an iPhone, the AAC file is re-encoded when transmitted via Bluetooth AAC: about 15 dB of noise is added. The general trend has not changed: with both lossless and AAC files, when transmitted “over the air” through the codec of the same name, the iPhone looks better: re-encoding adds less distortion here.
As a result, we can say that AAC is a very interesting codec . Its quality cannot be judged simply by the level of background noise and frequency range, as is the case with other codecs. AAC in its algorithms takes into account psychoacoustics, auditory masking - quality cannot be measured only in numbers.
AirPods 2 naturally supports AAC
Instead of a thousand words:
I prepared a table with broadcast formats of popular FM radio stations. Please note that the table shows streams that can only be enabled on the official website. In fact, there may be much more of them. You can just listen to them and form your own opinion.
Station | Number of threads | Format / Bitrate |
Europa Plus | 1 | HLS aac 96 kb/s |
Autoradio | 1 | mp3 128 kbps |
Road Radio | 1 | HLS aac 96 kb/s |
Russian radio | ||
Retro FM | 1 | HLS aac 96 kb/s |
Radio Dacha | 2 | aac 24 / aac 56 |
Radio Chanson | 3 | mp3 64 / mp3 128 / mp3 256 |
Humor FM | 1 | mp3 256 kbps |
Vesti FM | 5 | mp3 64 kbps mp3 128 kbps mp3 256 kbps aac 32 kbps aac 64 kbps |
Radio Russia | 1 | mp3 192 kb/s |
Radio Energy | 1 | aac 64 |
Lighthouse | 1 | aac 64 |
Love Radio | 2 | aac 24 aac 56 |
Our radio | 2 | mp3 64 mp3 128 |
DFM | 1 | aac 96 |
Hit FM | 1 | aac 96 |
Echo of Moscow | 1 | mp3 32 |
Silver Rain | 2 | mp3 48 mp3 128 Not visible on the website: aac 64 |
Radio record | 1 | mp3 320 |
Reasons for poor performance of the AAC codec on Android
There are two main reasons for the difference in AAC quality on Android and iOS:
- prioritization of processes by energy consumption on Android;
- various AAC encoding software;
Xiaomi Mi AirDots Pro and Apple AirPods support AAC codec
Andriod has Energy Aware Scheduling (EAS) algorithms . This system changes the priorities of processes based on their energy consumption. That is, the choice of which task will be allocated more processing power (and the processor in smartphones performs a huge number of tasks simultaneously) may vary.
If the system is configured to save battery power , like the Huawei P20 Pro, then when performing a task that is difficult for the processor, priority will be given to optimizing power consumption. As shown above, AAC uses psychoacoustic algorithms when encoding, and this is a rather heavy load on the processor. Accordingly, this task will be performed with lower bitrate and overall quality to optimize energy costs.
Sony WF-SP700N – completely wireless headphones with AAC support
If EAS gave the AAC encoding process a high priority, it would drain a lot of battery life, although the quality would improve. But the priority is battery saving; in this case, EAS quality is sacrificed.
The second main reason is different “encoders”, AAC encoding software . iOS uses Apple AAC, which is considered the highest quality available. And in Android the default is Fraunhofer FDK AAC, it “copes with its responsibilities” a little worse.
Apple AAC, of course, does not exist “under” Linux, so you won’t be able to install it on an Android smartphone. And as you know, it’s generally better not to install anything third-party on the iPhone.