AAC audio compression has been standardized as a part of MPEG-2 and MPEG-4 specifications. First version was released in 1997. For future transport AAC audio can be packaged with different methods:
- ADIF – has one header at the beginning of a file followed by raw AAC blocks
- ADTS – ADTS header is added to the beginning of each raw AAC block
- LATM/LOAS – LATM provides a method of multiplexing of several AAC streams, LOAS can be used for adding synchronization to LATM packets.
This article is a high level overview of AAC audio with ADTS encapsulation. Also in the article we will show the location of some parameters of the original audio (channel count, frame_size, sampling rate, profile) in encoded elementary audio stream. To analyze AAC/ADTS audio we will use Virinext Bitstream Analyzer. You can download the evaluation version on the Download page. For license acquiring please check the Buy license page.
High level ADTS bitstream overview
ADTS header starts with a 12-bits prefix 0xFFF and consists of 7 or 9 bytes. ADTS header consists of adts_fixed_header and adts_variable_header. Later we will show the location of some parameters of the audio (frame size, sampling rate, channels count, profile) in encoded AAC/ADTS elementary streams. As an example we will use the file with parameters in the screenshots below.
Frame size
In ADTS header frame size is stored in adts_variable_header::frame_length field. This value includes the length of the ADTS header.
In the example file we have adts_variable_header::frame_length field = 30 on selected frame, that means size of this frame is 30 bytes.
Sampling rate
In ADTS sampling rate is calculated based on adts_fixed_header::sampling_frequency_index value according to the following table.
In the example file we have adts_fixed_header::sampling_frequency_index = 3, that means sampling rate is 48 kHz.
Channels count
For ADTS the adts_fixed_header::channel_configuration value is used for determining number of channels and channels map by using the following table.
In the example file we have adts_fixed_header::channel_configuration = 2, that means audio has 2 channels.
Profile
Profile defines the features that the encoder can use during encoding. Based on the profile value, the decoder can recognize the requirements for decoding specific bitstream. In ADTS header the profile is signalled via adts_fixed_header::profile value.
Conclusion
We have provided a high level overview of AAC audio with ADTS encapsulation and described the location of some parameters of audio in encoded bitstream. AAC audio files can be analyzed with Virinext Bitstream Analyzer. It is a GUI tool for both in-depth and high-level analysis for many encoding standards including AAC audio.