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 (FAQ:Errors - Audacity Manual)

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.

Peter.

Excellent news. Any ETA on 2.4.2 GA?

I AM on 2.4.2 (Standard *buntu 22.04). I still run into this problem. Is this a fault of 2.4.2, still; or anything else that I’m doing wrong?
ffmpeg is already the newest version (7:4.4.2-0ubuntu0.22.04.1)

I’m on Windows so I can’t really help but Audacity uses a special version of FFmpeg.

…There is a way to use an “external” CODEC but I don’t know how to do that either. :frowning: