AAC (advanced audio coding)
What is advanced audio coding (AAC)?
Advanced Audio Coding (AAC) is a commonly used lossy digital audio compression codec developed by MPEG (Moving Picture Experts Group). This codec was designed to replace MP3 because it offers higher sound quality at the same bit rate. It is the most commonly supported audio codec and is available in every major browser and device. There are two common versions of AAC: AAC-LD (Low Delay) which is also referred to as AAC-LC (Low Complexity) and AAC-HE (High Efficiency).
AAC-LD/AAC-LC is used for two-way communication. It combines high enough quality audio with low enough latency to facilitate communication. AAC-HE (or HE-AAC) is for streaming audio, typically for something like digital radio.
This codec uses two coding strategies to reduce the amount of data to represent audio. The strategies are:
- Discarding signal components that are deemed irrelevant.
- Removing redundancies in the audio signal.
What audio signal components are considered irrelevant?
Irrelevant components in an audio signal are those which can't be heard by humans. AAC, like many other audio codecs, starts by dropping out any sound data that can't be heard by humans or which is difficult to hear. Difficult to hear sound includes anything that's a very high frequency and situations where a quiet sound occurs at the same time as a louder sound. This technique is fine for transmission of audio information, but not storage, as storing with this technique would result in sound degradation every time the audio was decompressed for use.
Removing redundancy in an audio signal
Typically handling of redundancy doesn't result in the loss of sound data. Instead, the codec figures out how many times the same sound component occurs and then saves that information as XYZ sound occurred ABC number of times. This can be used to reconstruct this part of the signal exactly the same as before. This lossless technique can be combined with lossy techniques to increase transmission and storage efficiency.
What makes AAC better than MP3?
AAC is a better codec than MP3 because it takes more samples than an MP3 does, resulting in higher quality. The samples use less space, making this codec more efficient. It offers more channels, up to 48, the ability to use arbitrary bit rates and variable frame rate lengths, joint stereo, better handling of audio frequencies over 16kHz and you can add additional modules to increase compression efficiency. All of these make the codec provide higher quality sound with more efficient use of space while also providing more flexibility to developers.
AAC and api.video
api.video transcodes your videos to HLS because this is the industry standard for streaming beautiful, fast, high-quality video across the internet. When it comes to sound, Apple's HLS specification requires the use of AAC-LC, HE-AAC v1, HE-AAC v2,xHE-AAC, Apple Lossless, FLAC or multichannel formats that only carry stereo. Stereo audio must be provided in AAC for HLS.