Advanced Audio Coding
Convert AAC audio files to MP3, WAV, or OGG directly in your browser — no upload, no server. FileDex uses FFmpeg WASM to transcode Advanced Audio Coding locally, preserving audio quality and privacy.
Your files never leave your device
Common questions
Is AAC better quality than MP3 at the same bitrate?
Yes. AAC achieves audibly transparent quality at 128kbps where MP3 typically requires 192kbps for equivalent results. AAC uses more advanced psychoacoustic modeling, temporal noise shaping, and a wider range of transform block sizes.
Can I convert AAC to MP3 without quality loss?
No. Both AAC and MP3 are lossy formats — converting between them is a generation loss operation. The AAC must be fully decoded to PCM, then re-encoded to MP3, discarding additional audio data in the process. At 192kbps+ VBR MP3 output, the additional loss is typically inaudible.
What is the difference between .aac and .m4a files?
A .aac file is raw AAC bitstream with ADTS frame headers. A .m4a file is AAC audio wrapped in an MP4/M4A container, which adds metadata, a seek table, and chapter support. The audio codec inside is the same. M4A is more compatible with media libraries and players.
Why does my .aac file not play in some music players?
Raw ADTS .aac files lack the container metadata that many players expect. Wrap the AAC in an M4A container using FFmpeg with -c:a copy (no re-encoding) to add proper MP4 atoms and seek support. This fixes compatibility with most players.
What AAC profile should I use for music streaming?
AAC-LC at 128-256kbps for standard streaming quality. HE-AAC (with SBR) at 48-64kbps for bandwidth-constrained scenarios like mobile radio or podcasts. HE-AACv2 at 24-32kbps for ultra-low bitrate stereo where some quality trade-off is acceptable.
What makes .AAC special
Perceptual audio coding reached a turning point when the MPEG-2 committee published Advanced Audio Coding in 1997 as a direct successor to MP3. AAC was not an incremental improvement — it replaced MP3's hybrid filterbank with a pure Modified Discrete Cosine Transform, eliminated the granule structure that limited MP3's frequency resolution, and introduced spectral band replication tools that MP3 never had. The result: AAC at 128 kbps consistently matches or exceeds MP3 at 192 kbps in blind listening tests.
Continue reading — full technical deep dive
Codec profiles and their differences
AAC ships in several profiles, each adding tools on top of the base:
- AAC-LC (Low Complexity): The default profile. Uses a 1024-sample MDCT window, Huffman coding, and mid/side stereo. Targets 96–256 kbps. This is what iTunes, YouTube, and Spotify use for standard streaming.
- HE-AAC v1: Adds Spectral Band Replication, which encodes frequencies above ~6 kHz as parametric descriptions rather than full waveform data. Effective at 48–80 kbps. Used in DAB+ digital radio and many podcast feeds.
- HE-AAC v2: Adds Parametric Stereo on top of SBR, encoding the stereo image as parameters applied to a mono core. Targets 24–48 kbps. Common in mobile streaming in bandwidth-constrained markets.
- xHE-AAC (Extended HE): Uses USAC (Unified Speech and Audio Coding), switching dynamically between speech and music coding modes. Operates from 12 kbps to 500+ kbps. Apple adopted it for Podcasts and FaceTime.
Temporal noise shaping
AAC uses temporal noise shaping (TNS) to redistribute quantization noise across time within each transform window — artifacts follow the signal's temporal envelope, masking distortion behind loud transients where the ear is least sensitive. TNS applies a linear prediction filter to the spectral coefficients before quantization, then inverts it during decode. The effect is subtle but measurable: on castanets and snare hits, TNS reduces audible pre-echo by 6–10 dB compared to a flat noise floor.
Container formats
Raw AAC bitstreams use ADTS (Audio Data Transport Stream) framing, where each frame carries its own header — simple but wasteful. For file storage and streaming, AAC wraps inside MP4 (M4A) using the ISO Base Media File Format. Apple's .m4a and .m4b (audiobook) extensions are MP4 containers holding AAC-LC. The MPEG-DASH and HLS streaming protocols also deliver AAC inside fragmented MP4 segments.
| Profile | Typical bitrate | Frequency range | Primary use |
|---|---|---|---|
| AAC-LC | 128–256 kbps | Full (20 Hz–20 kHz) | Music streaming, video audio |
| HE-AAC v1 | 48–80 kbps | Full via SBR | Digital radio, podcasts |
| HE-AAC v2 | 24–48 kbps | Full via SBR+PS | Mobile streaming |
| xHE-AAC | 12–500+ kbps | Adaptive | Voice + music mixed content |
Decode performance
AAC-LC decode is lightweight: a modern smartphone processes stereo 256 kbps AAC in under 2% CPU utilization. Hardware decode is universal — every SoC from Apple's A-series to Qualcomm's Snapdragon includes a dedicated AAC DSP block. Software decode via libfdk-aac or Apple's AudioToolbox runs at roughly 80× real-time on a single core.
When to use AAC vs alternatives
AAC-LC at 128–192 kbps is the safe default for music distribution to Apple devices and web <audio> elements — Safari only added Opus support in 2023, and older iOS versions ignore it entirely. Opus outperforms AAC below 96 kbps and supports lower latency (5 ms vs 20 ms framing), making it better for VoIP and real-time communication. FLAC or ALAC serve lossless archival. Vorbis in Ogg is functionally equivalent to AAC at similar bitrates but has weaker hardware support.
Limitations
AAC's licensing situation is complex. Fraunhofer and Dolby hold essential patents; royalties apply to commercial encoder distribution (though not to end-user playback). The patent portfolio expires between 2028 and 2031 depending on jurisdiction. Maximum channel count in standard AAC-LC is 48 channels (7.1 + height channels for Atmos use the USAC profile). Gapless playback requires encoder-delay metadata in the MP4 container — many encoders write this incorrectly, causing audible clicks at track boundaries.
.AAC compared to alternatives
| Formats | Criteria | Winner |
|---|---|---|
| .AAC vs .MP3 | Compression efficiency AAC achieves audibly transparent quality at 128kbps where MP3 requires 192kbps for equivalent results. AAC uses a wider range of block sizes, temporal noise shaping, and better stereo coding. | AAC wins |
| .AAC vs .OPUS | Low-bitrate performance Opus outperforms AAC-LC below 96kbps and matches HE-AAC at 32-64kbps while adding seamless speech/music switching. Opus also has lower latency (5ms vs 20ms for AAC-LD). | OPUS wins |
| .AAC vs .FLAC | Quality preservation FLAC is lossless — zero information is discarded. AAC is perceptual lossy compression that permanently removes audio data deemed inaudible. FLAC files are 2-3x larger than equivalent AAC. | FLAC wins |
| .HE-AAC vs .MP3 | Streaming at 48kbps HE-AAC uses Spectral Band Replication (SBR) to reconstruct high frequencies from a low-bitrate core, producing listenable audio at 48kbps where MP3 is severely degraded. | HE-AAC wins |
Convert .AAC to...
Technical reference
- MIME Type
audio/aac- Magic Bytes
FF F1ADTS frame sync. Also FF F9 for CRC-protected frames.- Developer
- ISO / Moving Picture Experts Group
- Year Introduced
- 1997
- Open Standard
- Yes — View specification
ADTS frame sync. Also FF F9 for CRC-protected frames.
Binary Structure
Raw AAC files with .aac extension typically use ADTS (Audio Data Transport Stream) framing. Each ADTS frame begins with a 12-bit sync word (0xFFF), followed by header fields: MPEG version (1 bit: 0=MPEG-4, 1=MPEG-2), layer (always 0), protection absent flag (1 bit), profile (2 bits: 0=Main, 1=LC, 2=SSR, 3=LTP), sampling frequency index (4 bits), channel configuration (3 bits), and frame length (13 bits). The header is 7 bytes without CRC or 9 bytes with CRC. After the header, the raw AAC access unit follows, containing spectral data encoded via Modified Discrete Cosine Transform (MDCT) with Huffman coding. ADTS framing makes each frame independently decodable, enabling mid-stream joining and basic seeking. AAC in M4A/MP4 containers uses AudioSpecificConfig (ASC) in the esds box instead of per-frame ADTS headers, which is more efficient.
| Offset | Length | Field | Example | Description |
|---|---|---|---|---|
0x00 | 12 bits | Sync word | FFF | ADTS sync word. All 12 bits set to 1. Identifies the start of an ADTS frame. |
bit 12 | 1 bit | MPEG version | 0 | 0 = MPEG-4, 1 = MPEG-2. Determines which AAC profiles are available. |
bit 13 | 2 bits | Layer | 00 | Always 00 for AAC. Non-zero values are reserved. |
bit 15 | 1 bit | Protection absent | 1 | 1 = no CRC (7-byte header). 0 = CRC present (9-byte header with 16-bit CRC after header). |
bit 16 | 2 bits | Profile | 01 | AAC profile: 00=Main, 01=LC (Low Complexity, most common), 10=SSR, 11=LTP. |
bit 18 | 4 bits | Sampling frequency index | 0100 | Index into frequency table: 0=96kHz, 3=48kHz, 4=44.1kHz, 6=32kHz, 8=16kHz, 11=8kHz. |
bit 30 | 3 bits | Channel configuration | 010 | Channel count: 1=mono, 2=stereo, 6=5.1 surround, 7=7.1. Value 0 means channel config is in the bitstream. |
bit 43 | 13 bits | Frame length | variable | Total ADTS frame size in bytes including header. Used to locate the next frame in the stream. |
Attack Vectors
- Malformed ADTS headers — crafted frame length fields can cause buffer over-reads in vulnerable decoders
- Nested SBR/PS data — maliciously constructed HE-AAC bitstreams with invalid SBR parameters have triggered crashes in older decoders
- ID3v2 tag injection — oversized or malformed ID3v2 tags prepended to ADTS streams can exploit tag parsers
Mitigation: FileDex decodes AAC entirely in the browser sandbox using FFmpeg WASM. No server-side processing, no file upload. The WASM runtime enforces memory bounds and runs isolated from the host system.