Audacity LAME Command Line Export Options, Explained

Sep 21, 2026

Audacity has an export format called (external program) that pipes your audio to a command line instead of encoding it internally — and that is how you reach LAME switches the export dialogs do not expose.

The Audacity Manual describes the feature plainly: "This sends audio via a command-line to an external program, either for processing or for encoding as an audio file." And the reason you would bother: "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."

The command

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

Audacity ships with two commands already filled in — "Two default commands are provided (these only work on Windows and Linux not on Mac)":

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

The bare LAME default is worth knowing before you run it, because it is not the same encoding you get from the MP3 format option. The manual states: "the default LAME command creates a 64 kbps (mono) or 128 kbps (stereo) constant bit rate MP3 at quality level "3"."

Compare that with the regular MP3 Export Options page, which says "The default MP3 encoding options in Audacity are 170 - 210 kbps VBR (preset "Standard")." So switching to the command line and pressing Export without editing anything gives you a noticeably lower-bitrate, constant-bit-rate file than the dialog you just left. That is the single most common surprise with this feature.

The manual's own worked example fixes that. "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"

What each part does

The only token the Audacity Manual defines outright is the placeholder: "The "%f" command passes the file name and extension entered in the Export Audio dialog as the output file of the external program."

That matters more than it looks. The name and extension come from the export dialog, not from the command — so the command decides how the file is encoded and the dialog decides what it is called. Get the extension wrong in the dialog and you end up with a correctly encoded file wearing the wrong name.

For the switches themselves, the manual documents them by describing what the finished command produces rather than defining each one:

CommandWhat the manual says it produces
lame - "%f"64 kbps mono / 128 kbps stereo constant bit rate MP3 at quality level "3"
lame - -v -b 112 -c -p "%f"Variable bit rate MP3, minimum 112 kbps, copyright marker and CRC error checking enabled
lame - --tt "my song title" --ty 2001 "%f"Title tag "my song title" and year tag "2001", written in both ID3v1 and ID3v2

For a switch-by-switch reference beyond these outcomes, check LAME's own documentation — the Audacity page is written around the examples above.

The ID3v1 case: the reason this feature exists for most people

If you have ever wondered why a tag you set in Audacity is invisible in some old player or car stereo, this is it. The Metadata Editor page states: "For both MP3 and MP2, only ID3v2.3 tags are exported. ID3v1 can be exported using Cmd-line export."

So the command line is the documented route to ID3v1. The manual gives both forms. "By default, both ID3v1 and ID3v2 tags are exported. The following command writes a title tag "my song title" and year tag "2001" in ID3v1 (at the bottom of the file) and ID3v2 (at the top of the file):"

lame - --tt "my song title" --ty 2001 "%f"
lame - --id3v1-only --tt "my song title" --ty 2001 "%f"

One trap comes with it, stated on the same page: "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."

Read that twice if you normally rely on the Metadata Editor. Tags you already filled in are not carried over — anything you want in the file has to be in the command. If your tags matter more than the ID3 version does, the ordinary MP3 export is the easier path; see why Audacity metadata goes missing after export for what survives which format.

Variations

A different encoder entirely. The same box accepts FFmpeg. The manual: "For example this command exports to 256 kbps MP2 using FFmpeg:"

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

A binary that is not on the standard path. The shipped commands assume a standard install — "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." For anything else: "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."

Reusing what you typed last time. "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 all you actually want is a WAV turned into a good MP3, none of this is necessary — you can do it in a browser tab without installing an encoder at all:

Try it right here

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

Loading tool…

That runs locally on your machine, so nothing is uploaded. The standalone WAV to MP3 converter is the same engine if you would rather work from a tool page, and all Clapr tools lists the rest.

Troubleshooting

It fails immediately on a Mac. This is documented behaviour, not a broken install: "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." The manual repeats it: "On Mac the shipped commands for "lame" and "ffmpeg" do not work, trying them will simply generate an error message." The stated fix is to supply your own binary — "Accordingly it is necessary to download a version of LAME or FFmpeg" — and then point the command at its full path.

It fails on Windows even though LAME works elsewhere. The bare lame command has a condition attached: "On Windows, this requires that you used the LAME or FFmpeg EXE installer and did not change the installation directory." Install somewhere custom and you must write the full quoted path instead.

Nothing tells you why it failed. There is a checkbox for that: "Show output 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."

Export Multiple produces nothing. 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)."

FAQ

Where is the command line export in Audacity? File > Export Audio, then choose (external program) from the Format dropdown, per the Audacity Manual. The Command box is inside that export dialog.

Do I need to install LAME to export MP3 from Audacity? Two different things are involved. For the ordinary MP3 format export the manual says "the LAME library for MP3 export is built-in with Audacity for Windows and Mac", while "Linux users will still need to download and install the free and recommended LAME third-party encoder". The (external program) route calls a command-line LAME instead, and that one has to be installed in the standard location — on Windows, via the EXE installer with the install directory unchanged.

How do I write ID3v1 tags from Audacity? Through this export. The Metadata Editor page states that only ID3v2.3 tags are exported for MP3 and MP2, and that "ID3v1 can be exported using Cmd-line export." Use --tt and --ty in the command, plus --id3v1-only if you want ID3v1 alone.

Why are my Metadata Editor tags missing from the exported file? Because command-line exports bypass it. The manual: Metadata Editor "does not appear before command-line exports, nor are any tags it already contains passed to the external application." Put the tags in the command.

What bitrate does the default command give me? 64 kbps mono or 128 kbps stereo, constant bit rate, at quality level "3" — lower than the 170–210 kbps VBR the MP3 dialog uses by default. Add -v -b 112 style switches if you want variable bit rate.


Command-line exports are powerful and unusually easy to get subtly wrong — a working file at the wrong bitrate looks exactly like a working file. More command-line and encoder walkthroughs live in the ffmpeg and command-line section.

All quotes above are from the Audacity Manual pages for Exporting to an external program, MP3 Export Options, Metadata Editor and Export Multiple, checked 21 September 2026. Verify against the current manual before relying on them.

Clapr team

Clapr team

Audacity LAME Command Line Export Options, Explained | Clapr Blog