M4A (AAC) export fails with FFmpeg error 0x15002

I’m on macOS Catalina 10.15.4, using Audacity 2.4.1.

I installed FFmpeg as per the instructions (64-bit using the pkg). I can export to AC3 and WMA. But when I try to export to M4A (AAC), it gives:

FFmpeg Error
Can’t open audio codec “aac” (0x15002)
Experimental feature

I’ve tried with Project Rate of 44.1 kHz and 48 kHz, with a single mono track and a single stereo track, with different quality settings (though mostly with the default). I have tried uninstalling the app and deleting all settings/libraries - i.e.

  • Deleted ~/Library/Application Support/audacity
  • Deleted /Library/Application Support/audacity

I then reinstalled Audacity and FFmpeg, but with the same result.

Nothing gets registered in the log file.

The only possible reason I can think of is that I had previous installed audacity using Homebrew. I discovered that isn’t possible any more, so uninstalled it (with brew uninstall). I also had ffmpeg 4.2.2 installed independently through Homebrew, and uninstalled that as well. Still no luck.

Incidentally, the log file gives the following for the FFmpeg library version numbers:

16:09:04: AVCodec version 0x373466 - 55.52.102 (built against 0x373466 - 55.52.102)
16:09:04: AVFormat version 0x372164 - 55.33.100 (built against 0x372164 - 55.33.100)
16:09:04: AVUtil version 0x344264 - 52.66.100 (built against 0x344264 - 52.66.100)

According to the manual (https://manual.audacityteam.org/man/faq_errors.html#Why_do_I_get_.22FFmpeg_Error_-_Can.27t_open_audio_codec_0x15002.22_.28or_0x15003.29.3F)

Error 0x15002 > occurs if you export more than a 2-channel M4A file (such as a 5.1 surround sound file), using the “M4A (AAC) Files (FFmpeg)” export choice. To correct the error and export up to 8 channels, choose (external program) and specify a command that tells Audacity to explicitly use the native FFmpeg AAC encoder.

I too am receiving the same error in 2.4.1 when trying to create the M4A file. My setup and workflow is identical to what I had in 2.3.3: Stereo input from a tape deck and output to bluetooth Logitech headphones. No fancy multi channel mixing which is what the FAQ refers to.

I tried the explicit export as per the FAQ as pointed out in the prior msg, but that failed the same way. I reinstalled both Audacity and the FFmpeg code and received the same error.

Macbook air / Catalina 10.15.4

One of the Audacity developers has been looking into this.
It appears that there has been a problem with the AAC encoder for a long time, but it has been mostly hidden by another bug. That other bug has now been fixed, exposing this bug. This is now logged on the Audacity bug tracker.

You may be glad to know that we have fixed this for the upcoming 2.4.2 - I just did the QA testing of the fix made by Leland Lucius.


Excellent news. Any ETA on 2.4.2 GA?