Audacity Export: The (external program) FFmpeg Command

Sep 20, 2026

Audacity's built-in FFmpeg command for (external program) export is ffmpeg -i - "%f", and the manual attaches a platform caveat to it: the two shipped commands "only work on Windows and Linux not on Mac." On Mac they do not quietly fall back to something else — the export fails.

That one line explains most of the confusion around this dialog. Below is the default command, the one placeholder Audacity actually defines, and every variation the Exporting to an external program page documents — so you can copy a command that is officially described rather than guess at flags.

The command

The manual describes what this export choice does in one sentence: "This sends audio via a command-line to an external program, either for processing or for encoding as an audio file." The reason to use it: "With this you can export using the installed LAME MP3 encoder or FFmpeg encoder with additional parameters not supported in the options dialogs in the Export Audio Dialog."

You get there through the normal export route — "Accessed by: File > Export Audio then choosing (external program) from the Format dropdown menu."

Two commands ship in the Command box, and the manual introduces them with the caveat already attached: "Two default commands are provided (these only work on Windows and Linux not on Mac):"

ffmpeg -i - "%f"
lame - "%f"

What each part actually does

%f is the output file. This is the only placeholder the manual defines, and it defines it precisely: "The "%f" command passes the file name and extension entered in the Export Audio dialog as the output file of the external program." So the name and the extension both come from the export dialog, not from the command — which is why the extension you type there decides what you actually get.

The bare program name is a platform assumption. Per the manual, "Accessing the LAME or FFmpeg command-line program with just the "lame" or "ffmpeg" command (as shipped with Audacity) only works on Windows and Linux, assuming LAME or FFmpeg are installed on the system in the standard location." On Windows there is a further condition: "this requires that you used the LAME or FFmpeg EXE installer and did not change the installation directory."

Anywhere else, give the full path. "For using a downloaded version of LAME or FFmpeg, the full path to the command-line program must be given. The path must be enclosed inside quotes if there are any spaces in the path."

Show output decides whether you see the result. "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." Leave it checked while you are still iterating on a command.

The Command box remembers 12 entries. "The "Command" box holds up to the last 12 items entered. When a thirteenth command is entered, the first one (at the bottom of the list) is removed." If you have a command you rely on, keep it somewhere outside Audacity — a dozen experiments is enough to push it off the list.

Variations the manual documents

Every command below is quoted from the Audacity Manual along with the description the manual gives it.

256 kbps MP2 — "For example this command exports to 256 kbps MP2 using FFmpeg:"

ffmpeg -i - -acodec mp2 -ab 256000 "%f"

AAC at a chosen bit rate. The manual presents two commands that use -strict experimental "to specify the native FFmpeg AAC encoder," notes that "the native encoder is required to export more than stereo, up to a maximum of 6 channels," and adds "to export up to 8 channels you must point the same command to latest FFmpeg-git." It also says -strict experimental "is not required in this command if using latest FFmpeg-git," and that you "change the value before "k" in the following command to set a different bit rate in kbps":

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

AAC by quality instead of bit rate — this one "specifies a VBR quality range instead of bit rate":

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

Apple Lossless from a custom FFmpeg location on Windows. Note the extension instruction, which is easy to get wrong: "When specifying the file name above the command, add the extension ".m4a" (without quotes), not .alac:"

"E:\FFmpeg for Audacity\ffmpeg.exe" -i - -acodec alac "%f"

Metadata into an M4A on Mac — "setting metadata for genre and artist/composer in an exported M4A file with the standard AAC (lossy) codec":

/Applications/FFmpeg_for_Audacity_on_OSX/ffmpeg -i - -metadata genre="pop" -metadata author="Jo S" "%f"

On the LAME side, the manual says "the default LAME command creates a 64 kbps (mono) or 128 kbps (stereo) constant bit rate MP3 at quality level "3"." For something else — "to produce a variable bit rate MP3 of minimum 112 kbps bit rate, with a copyright marker and CRC error checking enabled":

lame - -v -b 112 -c -p "%f"

Try it right here

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

Loading tool…

If the whole reason you opened this dialog was to pull an audio file out of something, the browser tool above does that without an FFmpeg install — the file is decoded locally and handed back, nothing is uploaded. For other outputs there is extract audio from video and M4A to MP3, and the rest of the command-line write-ups live in the FFmpeg guides.

Troubleshooting

The shipped command errors on Mac. Stated twice on the same page: "On Mac with either the LAME or FFmpeg Commands that the dialog offers by default (as shown above), the export fails and an error message will be displayed," and "on Mac the shipped commands for "lame" and "ffmpeg" do not work, trying them will simply generate an error message." The manual's answer is that "accordingly it is necessary to download a version of LAME or FFmpeg" and then point the command at its full path. For the download and install steps themselves, check the official documentation — the manual routes those to the Audacity Support site. See also FFmpeg library not found.

Nothing exports when you use Export Multiple. The Export Multiple page is explicit: "When exporting using (external program), Audacity will not export the files, and will show an error message, unless you add an appropriate extension to the (external program) Command or to the file names (the labels or tracks)."

Your tags vanished. Expected behaviour, not a bug: "Metadata Editor does not appear before command-line exports, nor are any tags it already contains passed to the external application. Use the appropriate command for your application to write metadata to the output file as described below." That is what the -metadata and LAME tag commands above are for — more on that in metadata missing after export.

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

Part of the audio is missing. Before blaming the command: "When using Export Audacity will only export tracks that are not grayed-out by use of the Mute or Solo buttons in the tracks' Track Control Panels."

FAQ

What is the default FFmpeg command in Audacity? ffmpeg -i - "%f" — one of two commands provided by default, alongside lame - "%f". The manual states both "only work on Windows and Linux not on Mac."

What does %f mean in an Audacity export command? It "passes the file name and extension entered in the Export Audio dialog as the output file of the external program." Type the extension you want in the export dialog; the command picks it up.

Why does the ffmpeg command fail on my Mac? Because the shipped commands "do not work" there, per the manual — "trying them will simply generate an error message." You need a downloaded FFmpeg and the full path to it in the command, quoted if the path contains spaces.

Can I set an AAC bit rate this way? Yes — the documented command is ffmpeg -i - -strict experimental -c:a aac -b:a 240k "%f", and you "change the value before "k"" to pick a different rate in kbps. See also AAC bit rate not working.

Why does my command work in a terminal but not in Audacity? The manual's framing is that Audacity "aims to provide the same exporting/importing features as FFmpeg," so the suggested test runs the other way: "one way to test if there is a problem in the Audacity implementation of FFmpeg is to use a command-line version of FFmpeg separately to perform the same task. If it fails in FFmpeg, then Audacity has the same limitation."


Would rather skip the command line entirely? Every converter at all Clapr tools runs 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 Export: The (external program) FFmpeg Command | Clapr Blog