Audacity FFmpeg Error 0x15002: Can't Open Audio Codec

Sep 25, 2026

Error 0x15002 is Audacity refusing a channel count, not a sign that your FFmpeg install is broken. If you got this code while exporting, reinstalling the FFmpeg library will not change anything — the export was rejected because of how many channels you asked for and which export choice you picked.

Audacity's FAQ: Errors page ties the code to one specific situation, and the fix documented there comes with a condition that the same page leaves out. That missing condition is why some people follow the official workaround and still end up short of the channel count they wanted.

What error 0x15002 actually means

The manual states it in one sentence: "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."

Three things have to be true at once for that code to appear — the format is M4A (AAC) via FFmpeg, the export carries more than two channels, and you are exporting rather than importing. Drop any one of them and you get a different failure, or none.

It belongs to a family of export traps. The same FAQ describes them as: "There are many Unable to Export traps in Audacity. … They additionally give a code number that tells us what the error was." The Unable to export page calls itself "landing page for esoteric Export failure messages" and shows what a code looks like in the wild when it asks you to "report the error code (here 'OGG:355')" on the forum.

The usual way people end up with more than two channels without meaning to is the Export Audio dialog: "Custom mapping: use this to export multi-channel (surround sound) files or to make customized assignments between Audacity tracks and the channels in the exported file." Selecting it and clicking Configure opens Advanced Mixing Options, where that page notes AAC specifically: "AAC multi-channel export is subject to the FFmpeg encoder used, as described in our file formats comparison table."

The fastest fix

If you did not actually need surround, set Channels back to Stereo in the Export Audio dialog and re-export. Stereo is the normal setting — the dialog describes it as "stereo pair with left and right channels - this is the default setting even if you only have mono tracks for exporting." The error disappears because the condition that triggers it is gone.

That is the right answer far more often than people expect, because plenty of 0x15002 reports start with someone who only wanted an audio file out of a video and opened Audacity to get it.

Try it right here

Runs in your browser. Your file is not uploaded anywhere.

Loading tool…

This runs in your browser — the file is decoded locally and handed back, nothing is uploaded. If MP3 is your destination anyway, the channel question is settled for you: Audacity's own format comparison table lists MP3 at 2 channels. Related paths are extract audio from video for other output formats, and extracting audio without re-encoding if you want the command-line version.

When you genuinely need more than two channels

Here is where the two official pages diverge. FAQ: Errors gives the workaround like this: "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."

The export formats page describes the same route in its footnote (2) with an extra step: "More than 2 channels output is not supported with the recommended FFmpeg 2.2.2 library, unless you export using (external program) with a command that tells Audacity to explicitly use the native FFmpeg encoder. This produces maximum 6 channels. For up to 8 channels, point the same command to the latest FFmpeg-git."

So the (external program) route on its own gets you to six. Eight needs the command pointed at a different FFmpeg build. The exporting to an external program page says the same thing next to its example commands: "The native encoder is required to export more than stereo, up to a maximum of 6 channels. To export up to 8 channels you must point the same command to latest FFmpeg-git. Change the value before "k" in the following command to set a different bit rate in kbps. Note: "-strict experimental" is not required in this command if using latest FFmpeg-git:"

ffmpeg -i - -strict experimental -c:a aac -b:a 240k "%f"
ffmpeg -i - -strict experimental -c:a aac -q:a 10 "%f"

The second one "specifies a VBR quality range instead of bit rate," per the same page. Four details from that page decide whether the command runs at all:

  • %f is the output file. "The "%f" command passes the file name and extension entered in the Export Audio dialog as the output file of the external program."
  • The bare ffmpeg command is platform-dependent. It "only works on Windows and Linux, assuming LAME or FFmpeg are installed on the system in the standard location," and on Windows "this requires that you used the LAME or FFmpeg EXE installer and did not change the installation directory."
  • On Mac the shipped commands fail. "On Mac the shipped commands for "lame" and "ffmpeg" do not work, trying them will simply generate an error message." You supply a full path instead, which "must be enclosed inside quotes if there are any spaces in the path."
  • Metadata does not come along. "Metadata Editor does not appear before command-line exports, nor are any tags it already contains passed to the external application."

For the download and install steps themselves, check the official documentation — the manual points those to the Audacity Support site rather than covering them.

Other causes, in order of likelihood

You hit 0x15003 instead. Different code, same family: "Error 0x15003 occurs if you export more than a 6-channel AC3 file. Six channels is the maximum possible for AC3." Worth knowing that the format comparison table lists AC3 at 7 channels while the errors FAQ says six is the maximum — two official pages, two numbers, so plan for six.

You picked WMA and expected surround. Footnote (3) on the same table: "A maximum of 2 channels can be written using the "WMA (version 2) Files (FFmpeg)" export choice or FFmpeg at the command-line using (external program)."

You went looking for a setting that is not there. Both the Mixing page and the formats page tell you to "choose "Use custom mix" in the Import / Export Preferences" — but the Import / Export Preferences page lists only Exported Label Style, Exported Allegro file saving, Music Imports, and the music-loop behaviour. Go through the Export Audio dialog's Custom mapping option instead.

The format and codec pair simply does not work. The Export Audio dialog warns that "not all combinations of format and codec that are offered in the dialog will work properly, you will need to experiment," and the formats page adds that "some exports might result in zero-byte or invalid files if FFmpeg does not support the combination chosen."

The disk is the real problem. The Unable to export page notes that "some of these errors may have an underlying cause of disk full, so you may want to check your disk space."

How to tell it worked

Do not judge by playing the file back in Audacity. The Advanced Mixing Options page is explicit: "There is no support at the moment for multi-channel playback of audio in Audacity - playback of a multi-channel file in Audacity will always be mixed down to stereo."

Two things you can check instead. In the (external program) dialog, the Show output box: "If checked, a Command Output window in Audacity will display a success or failure message from the external program. If unchecked, the window will only appear in the case of an error message." And check the file is not zero bytes, since that is one of the documented failure shapes.

One expectation to set on the result: "Audacity does not perform mapping of the channels in exported files to specific playback channels."

FAQ

Why does Audacity throw 0x15002 on a 5.1 export? Because the M4A (AAC) Files (FFmpeg) export choice is the one being used and the export has more than two channels — the manual names a 5.1 surround file as the example. It is a refusal by the export choice, not a codec installation problem.

Does the official workaround really get me 8 channels? Only with the extra condition. Going through (external program) with the native FFmpeg encoder "produces maximum 6 channels," and for up to 8 you must point the same command at the latest FFmpeg-git. The errors FAQ says "up to 8 channels" without that step.

What is error 0x15003? The AC3 equivalent: it "occurs if you export more than a 6-channel AC3 file. Six channels is the maximum possible for AC3."

Can I export surround as WAV instead? The format comparison table lists WAV and AIFF 16-bit PCM at 32 channels, and Advanced Mixing Options allows "32 output channels (WAV, AIFF or OGG)" and "8 output channels (FLAC)". WAV and AIFF are capped at 4GB, which the manual calls "a general restriction and not an Audacity one."

Will the AAC bit rate I set actually be used? The AAC options page documents "a bug in Audacity whereby the bit rate setting that you make in an AAC export is not always honored by Audacity." For stereo, "all selected bit rates of 196kbps or less export at 196-198kbps," while "settings in the range 200kbps to 320kbps are reasonably closely honored on export."


Still stuck on the export dialog? Browse the rest of the export and error fixes, convert a finished file with M4A to MP3, or see all Clapr tools — all of them run in your browser, with nothing uploaded.

Quotations from the Audacity Manual, checked 16 September 2026. Verify against the official pages before relying on them.

Clapr team

Clapr team

Audacity FFmpeg Error 0x15002: Can't Open Audio Codec | Clapr Blog