Export with external encoder examples.

Audacity is able to export through external encoders such as LAME and SoX using an option in the Export menu.
An overview of this is described in the manual http://manual.audacityteam.org/man/Exporting_to_an_External_Program

Here’s the examples of Command Line export options from the Audacity manual:

command  -  "%f"

The “%f” command passes the file name and extension entered in the File Export Dialog as the output file of the external program.

LAME Examples:

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

produces a variable bit rate MP3 of minimum 112 kbps bit rate, with a copyright marker and CRC error checking enabled.

Here’s some examples more examples (not in the manual):

High quality mono MP3 with LAME:

lame -V 0 -a - "%f"

High compression (small file size) mono MP3 with LAME:

lame -V 9 -a - "%f"

SoX Examples:

sox -t wav - -t ogg "%f"

Export as an Ogg Vorbis file.

sox -t wav - -t wav "%f" echo 0.8 0.3 30 0.4 reverb 60 10 15 100 10 10

Export as a WAV file with a “bathroom” reverberation effect.

Feel free to add your own recipes.

To just use the command on Windows (without giving a path to the encoder), you’ll need to have installed the Lame or FFmpeg binaries in their default location in “Program Files” so as to create a Windows registry setting that Audacity will look for as the location of the encoder.

Here are a couple of examples with FFmpeg.

This exports a file with the codec forced to Nellymoser Asao, so for example you might want to use .flv extension for the format to export to in Audacity’s “Export File” window:

ffmpeg -i - -acodec nellymoser  "%f"

This exports a file forcing the file to a 256 kbps mp2, using FFmpeg from an arbitrary location of your choice (ensure the path has quotes around it if it includes spaces as it does here):

"E:FFmpeg for Audacityffmpeg.exe" -i - -acodec mp2 -ab 256000 "%f"

I’d be interested to know if command-line exporting works on Mac. /src/export/ExportCL.cpp suggests the code does not work on Windows or Mac, but I expect it does.


Exporting U-law encoded file using SOX.

This one is from Leland and is useful for producing standard U-Law 18-byte fmt chunk files as required by many telephony applications.

C:...sox -t wav - -e u-law "%f"