What is AAC (Advanced Audio Coding)?

Advanced Audio Coding, or AAC, is a family of lossy perceptual audio codecs standardized by MPEG in MPEG-2 Part 7 and MPEG-4 Part 3. It is commonly stored in MP4 and M4A files, framed as ADTS, and carried in the media segments of adaptive streaming protocols such as HLS and DASH.

How AAC (Advanced Audio Coding) works

AAC compresses audio with a perceptual model and an MDCT filter bank: spectral components are quantized with the aim of keeping the resulting noise below the estimated masking threshold, which makes the coding lossy. It is a codec family rather than one fixed configuration. MPEG-4 defines audio object types such as AAC-LC, and the HE-AAC and HE-AAC v2 profiles layer Spectral Band Replication and Parametric Stereo on an AAC-LC core. Manifests and MIME types name the variant with an RFC 6381 codecs string: mp4a.40.2 for AAC-LC, mp4a.40.5 for HE-AAC, and mp4a.40.29 for HE-AAC v2. With Spectral Band Replication the AAC-LC core typically runs at half the output sample rate, so the sample rate and channel count a stream declares depend on whether its signaling describes the core or the decoder output. When the output rate is doubled this way, an HE-AAC frame decodes to 2048 output samples, where an AAC-LC frame typically holds 1024.

Key facts

  1. Can an AAC-LC decoder play HE-AAC? Only the core, and only when the signaling is backward compatible. HE-AAC is an AAC-LC core plus Spectral Band Replication (SBR), and HE-AAC v2 adds Parametric Stereo (PS); an HE-AAC v2 decoder also decodes HE-AAC and AAC-LC. With implicit signaling, where the decoder configuration does not declare SBR, or with explicit backward-compatible signaling, an AAC-LC-only decoder decodes the core alone: band-limited audio, typically at half the output sample rate and, when PS is in use, in mono. With explicit hierarchical signaling, AAC-LC-only decoders cannot decode the stream at all, and decoders without PS support cannot decode HE-AAC v2.
  2. How should HE-AAC be signaled for streaming? Apple’s HLS authoring specification requires explicit signaling of SBR data for HE-AAC in fragmented MP4 without naming a mode, and DASH-IF’s interoperability guidelines recommend the explicit backward-compatible mode for SBR and PS and expect clients to play AAC-LC, HE-AAC, and HE-AAC v2. In a DASH manifest the declared sampling rate and channel configuration describe the output after SBR and PS, for example 48 kHz stereo over a 24 kHz mono core. Players use the declared codecs string to decide whether they can play a rendition, so an AAC-LC-only device may skip one declared as mp4a.40.5 even if its decoder could play the core.
  3. Is ADTS AAC interchangeable with AAC in MP4? The coded audio can be identical, but the framing differs. ADTS puts a header with the decoding parameters in front of every frame, so a decoder can start at any frame without separate configuration, although it needs the preceding frame to reproduce the audio correctly. MP4 and M4A instead carry one MPEG-4 AudioSpecificConfig as out-of-band decoder configuration and store headerless frames in media data boxes, located through the movie box’s sample tables in a regular file and through each movie fragment box in fragmented MP4. Moving audio between the two rewrites the framing without decoding, for example with FFmpeg’s aac_adtstoasc bitstream filter. The filter builds that configuration from the ADTS header, which can signal SBR only implicitly, so for HE-AAC it does not by itself add the explicit SBR signaling that Apple requires in fragmented MP4.
  4. Why is decoded AAC longer than its source? Encoders prepend silent priming samples (at least 1024, historically often 2112) and pad the final packet, which typically holds 1024 samples. Unless a player trims both, audio starts late relative to video and the padding stays in the decoded output, which matters for gapless joins and sample-accurate edits. MP4 and M4A files can state the trim explicitly with an edit list plus roll sample groups; AAC bitstreams themselves typically do not convey it, so an ADTS player has to assume a value. In fragmented MP4 the edit list sits in the initialization segment; DASH-IF’s guidelines require content to play correctly when clients ignore edit lists, and RFC 8216 does not mention them for HLS, so a streaming package should not depend on one alone.

When AAC (Advanced Audio Coding) matters

Choose AAC when a single lossy audio format has to play across browsers and HLS or DASH players; some browsers rely on the operating system’s decoder rather than shipping their own. Use AAC-LC by default and reserve HE-AAC for low bitrates: Apple’s HLS authoring specification says HE-AAC should not be used above 64 kbit/s. As a working point, Fraunhofer’s FDK AAC encoder documentation suggests 1 to 1.5 bits per audio sample for AAC-LC, which it puts at 48 to 72 kbit/s for one 48 kHz channel, against 0.625 for HE-AAC with a half-rate core and 0.5 for HE-AAC v2.

How Transloadit helps with AAC (Advanced Audio Coding)

Transloadit’s /audio/encode Robot encodes audio to AAC with its aac and audio/aac presets, which produce MP4 output. Bitrate, sample rate, and individual FFmpeg options can be overridden per Step, and the dash/ audio presets prepare AAC renditions that /video/adaptive can combine into an adaptive stream.

The presets page lists each preset’s codec, bitrate, and sample rate per FFmpeg stack version.

Explore Transloadit’s audio capabilities

Sources

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free