7

I wrote this about a year ago while trying to compile FFmpeg for Cygwin/Windows, based on the claims made in the FFmpeg wiki:

The Fraunhofer FDK AAC codec library. This is currently the highest-quality AAC encoder available with ffmpeg. Requires ffmpeg to be configured with --enable-libfdk-aac (and additionally --enable-nonfree if you're also using --enable-gpl).

However, recently attempting to build FFmpeg with the media-autobuild_suite showed the following when presented with the FDK-AAC build option:

Build FDK-AAC library and binary? [AAC-LC/HE/HEv2 codec]
1 = Yes
2 = No

Note: FFmpeg's aac encoder is no longer experimental and considered equal or
better in quality from 96kbps and above. It still doesn't support AAC-HE/HEv2
so if you need that or want better quality at lower bitrates than 96kbps,
use FDK-AAC.

However, this third-party tool is the only reference I can find to the claim that FFmpeg's default AAC encoder is now superior to FDK-AAC, and the relevant FFmpeg wiki page itself remains unchanged. Is this true, and if so, what was the source for this information?

2 Answers 2

13

FDK is better

The claim that the FFmpeg AAC encoder is better is incorrect.

The source was originally on the FFmpeg Codecs Documentation for the AAC encoder. I guess the author did not perform a comprehensive personal listening test. The claim was removed in 2020-05.

There have not been major improvements to the native FFmpeg AAC encoder since the flurry of activity in 2015-2016, so FDK is still better. The biggest changes since then are use the fast coder as the default in early 2018, then switch to the twoloop coder on 2021-05.

Blind test results

The best way find out which is better is by personally performing a rigorous, blind test. Some recent examples:

AAC listening test by Kamedo2
Source: Personal Listening Test of AAC-LC and xHE-AAC at 96kbps and 128kbps by Kamedo2 (2020-09-12)

AAC listening test by guruboolez
Source: Personal Blind Listening Test of AAC at 128 kbps (six encoders & 105 samples) by guruboolez (2020-10-17)

As you can see both listeners on average rated FDK better than FFmpeg AAC. However, keep in mind that:

  • these testers may be very familiar with the source content.
  • the average listener may not be able to tell a difference.
  • the graphs may look like there could be a huge difference but the difference may actually be subtle (but I didn't try it myself).
  • quality is subjective: you'll have to compare them yourself to decide.

When to use FDK-AAC

  • If AAC quality is the most important factor.
  • If you need AAC-HE/HEv2 as FFmpeg AAC is only AAC-LC.
  • You don't mind compiling ffmpeg. libfdk_aac is considered non-free and not compatible with the GPL, so you won't find many pre-built ffmpeg with libfdk_aac support. So that is why you must compile.

FFmpeg AAC: Maybe Good Enough

  • Use a higher bitrate compared to libfdk_aac. If it sounds crappy add more bits, use a different AAC encoder, or use a different format such as Opus or FLAC.
  • Experiment with -aac_coder. See ffmpeg -h encoder=aac to see which is the default value for your ffmpeg and compare with the other coders.
3

fdk_aac is more stable than a native aac. we are doing a lot of streaming transcoding and if there is something off coming from the source native aac encoder will start producing garbage and will not recover. valid for the latest 4.2.x version. Also native encoder was slower comparing to libfdk (when you doing a 100+ encodes on a server it adds up)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .