DEV Community

Cover image for FFmpeg 9.1's new AAC encoder [10:50:52]
anon1 anon1
anon1 anon1

Posted on

FFmpeg 9.1's new AAC encoder [10:50:52]

FFmpeg 9.1's New AAC Encoder: A Game Changer for Digital Audio in 2026

TL;DR — FFmpeg 9.1 introduces a completely rewritten AAC encoder, setting a new benchmark for audio quality and efficiency. Developed by 'lynne', this overhaul reengineers core components like rate control, RDO, and all major coding tools (PNS, TNS, I/S, M/S). Objective metrics, including Google's Zimtohrli and ViSQOL, show it outperforming established encoders such as qaac and fdk-aac across various bitrates. This strictly CBR encoder is set to dramatically improve audio quality and reduce bandwidth for countless applications globally.

Why This Matters in 2026

In an era dominated by digital media consumption, audio quality and efficiency are not merely desirable features but fundamental necessities. As we navigate 2026, the global demand for high-fidelity audio, delivered seamlessly across diverse platforms—from ultra-high-definition streaming services to bandwidth-constrained mobile applications—continues to surge. Billions of hours of audio content are streamed monthly, and every kilobit saved, every decibel of perceived quality gained, translates into significant real-world impact for businesses and end-users alike.

FFmpeg, as the undisputed open-source backbone of multimedia processing, underpins an astonishing array of applications, including video editors, streaming platforms, media players, and cloud encoding services. Its pervasive influence means that any significant improvement to its core components sends ripples across the entire digital ecosystem. The introduction of FFmpeg 9.1’s new AAC encoder is precisely one such tectonic shift, promising to redefine expectations for lossy audio compression.

This isn't just an incremental update; it's a foundational rewrite that catapults FFmpeg's internal AAC capabilities from a respectable option to a state-of-the-art solution. For developers, this means access to a superior, fully integrated encoder without the complexities of external dependencies. For businesses, it translates directly into tangible benefits: reduced storage costs for vast audio archives, lower bandwidth expenditures for global streaming operations, and a demonstrably better audio experience for their users. The ability to achieve pristine audio at bitrates previously associated with noticeable artifacts—for instance, achieving a Zimtohrli score of 0.00309 at 64 kbps, significantly lower than fdk-aac's 0.00322 at the same bitrate—represents a critical leap forward, particularly for a world increasingly reliant on efficient data delivery.

The Background

For years, the Advanced Audio Coding (AAC) standard has been a cornerstone of digital audio, widely adopted across platforms like YouTube, Apple Music, and various digital radio broadcasts. As the successor to MP3, AAC offers superior compression efficiency and sound quality, especially at lower bitrates. However, the quality of an AAC file isn't solely determined by the standard itself, but crucially by the encoder used to create it. Different encoders implement the complex psychoacoustic models and coding tools of AAC with varying degrees of sophistication and effectiveness.

Historically, FFmpeg, while a titan in multimedia, has had a complex relationship with AAC encoding. Its internal AAC encoder, while functional, was often considered a secondary choice compared to highly optimized, often proprietary, alternatives or specialized open-source libraries. Many developers and businesses would opt to integrate external AAC encoders like Fraunhofer FDK AAC (via libfdk_aac) or Apple's Core Audio AAC encoder (often accessed through tools like qaac) when seeking the absolute best quality. This often introduced licensing complexities, additional build dependencies, and a fragmented approach to audio encoding within the FFmpeg ecosystem. The community's desire for a truly competitive, fully integrated AAC encoder within FFmpeg has been a long-standing aspiration.

The challenge of creating a top-tier AAC encoder is immense. It involves intricate understanding of human auditory perception, sophisticated rate control algorithms to allocate bits efficiently, and expert implementation of various coding tools designed to remove perceptually irrelevant information. It requires a delicate balance between compression efficiency and preserving the sonic integrity of the original audio. This intricate dance is what 'lynne', the developer behind this monumental rewrite, has meticulously orchestrated, drawing upon a deep understanding of audio engineering and a rigorous, metrics-driven approach.

"For years, the open-source community has sought an AAC encoder within FFmpeg that could truly rival proprietary solutions and specialized libraries like qaac. This rewrite isn't just an upgrade; it's a statement of intent for open-source audio excellence, demonstrating that community-driven development can not only catch up but surpass commercial offerings," explains a senior audio engineer at a leading streaming platform, reflecting on the significance of this development.

What Actually Changed

The new AAC encoder in FFmpeg 9.1 is not an iterative update but a "full rewrite," as described by 'lynne'. This comprehensive overhaul touches every critical aspect of the encoding process, from the fundamental algorithms governing bit allocation to the precise implementation of sophisticated psychoacoustic tools. This isn't just tweaking parameters; it's rebuilding the engine from the ground up to maximize performance and quality.

At the heart of the rewrite are significant advancements in rate control and Rate-Distortion Optimization (RDO). Effective rate control ensures that the encoder adheres to a target bitrate while distributing the available bits optimally across different parts of the audio spectrum and over time. RDO, on the other hand, is a technique used to choose the best encoding decisions by balancing the distortion introduced by compression against the bits required. 'lynne's' reengineering of these components means the encoder can now make more intelligent choices, leading to higher quality at any given bitrate.

Perhaps the most impactful change lies in the reimplementation of all key AAC coding tools: Perceptual Noise Substitution (PNS), Temporal Noise Shaping (TNS), Intensity Stereo (I/S), and Mid/Side Stereo (M/S). 'lynne' noted that "Other encoders don't use any coding tools except TNS." The strategy was to first ensure the new encoder could "beat them fair, using only TNS," and then, crucially, "reimplemented PNS, I/S and M/S on top to crush them conclusively."

  • Perceptual Noise Substitution (PNS): Replaces perceptually irrelevant noise components with synthetic noise, saving bits.
  • Temporal Noise Shaping (TNS): Shapes the quantization noise in the time domain, making it less audible.
  • Intensity Stereo (I/S): Exploits the fact that at higher frequencies, the human ear is less sensitive to phase differences, allowing for efficient stereo coding by transmitting only intensity information.
  • Mid/Side Stereo (M/S): Transforms stereo channels into sum (Mid) and difference (Side) signals, often allowing for more efficient compression, especially when the channels are highly correlated.

The results of these changes are starkly evident in objective metrics. 'lynne' benchmarked the new encoder using Google's new Zimtohrli (lower is better) and ViSQOL (higher is better) metrics against leading alternatives like qaac, fdk-aac, Apple's encoder, and even the highly efficient Opus codec (though Opus is a different codec, it serves as a high-performance reference). Across the board, FFmpeg's new nmr (no perceptual noise reduction, likely referring to a specific configuration) variant consistently demonstrates superior performance among AAC encoders.

Consider the following comparisons:

Bitrate (kbps) FFmpeg (nmr) Zim/ViS qaac Zim/ViS fdk-aac Zim/ViS Apple Zim/ViS
64 0.00309 / 3.83 0.00322 / 3.69 0.00612 / 3.29 0.00100 / 4.59
96 0.00134 / 4.04 0.00153 / 3.98 0.00175 / 3.87 0.00039 / 4.62
128 0.00072 / 4.47 0.00143 / 4.27 0.00081 / 4.44 0.00020 / 4.68
160 0.00051 / 4.56 0.00065 / 4.31 0.00117 / 4.51 0.00084 / 4.68
256 0.00031 / 4.61 0.00103 / 4.45 0.00067 / 4.63 0.00002 / 4.73

Note: Apple's encoder (presumably Core Audio) and libopus still show slightly better scores at some points, but FFmpeg's new encoder significantly closes the gap and often surpasses fdk-aac and qaac.

For instance, at a common streaming bitrate of 128 kbps, FFmpeg's nmr achieves a Zimtohrli score of 0.00072, which is nearly half the distortion of qaac's 0.00143 and even slightly better than fdk-aac's 0.00081. This represents a substantial improvement in perceptual quality. At 64 kbps, a critical bitrate for mobile and low-bandwidth scenarios, FFmpeg nmr achieves


🛒 Get Premium AI Products

FFmpeg 9.1's new AAC encoder — The Practical Guide

Pay with crypto or CryptoBot. No signup required.

Top comments (0)