Full command line switch reference

switch parameter
-a downmix stereo file to mono
--athonly ATH only
-b bitrate (8...320)
-B max VBR bitrate (8...320)
-c copyright
-d block type control
-e de-emphasis (n, 5, c)
-f fast mode
-g turn on MP3x graphical frame analyser (may not be available on your release)
-h high quality
--help help
--highpass highpass filtering frequency in kHz
--highpass-width width of highpass filtering in kHz
-k full bandwidth
--lowpass lowpass filtering frequency in kHz
--lowpass-width width of lowpass filtering in kHz
-m stereo mode (s, j, f, m)
--mp3input mp3 input file
--noath no ATH
--nohist disable histogram display
--nores disable bit reservoir
--noshort disable short blocks frames
-o non-original
-p error protection
--preset use built-in preset (phone, voice, fm, tape, hifi, cd, studio)
-r input file is raw pcm
--resample output sampling frequency in kHz
-s sampling frequency in kHz
-S silent operation
-t disable VBR tag
-V VBR quality setting (0...9)
--voice voice encoding mode
-x swapbytes

* -a    downmix 
Mix the stereo input file to mono and encode as mono. This option is only needed in the case of raw PCM stereo input (because LAME cannot determine the number of channels in the input file).
To encode a stereo PCM input file as mono, use "lame -m s -a".
For WAV and AIFF input files, using "-m m" will always produce a mono .mp3 file from both mono and stereo input.
The downmix is calculated as the sum of the left and right channel, attenuated by 6 dB.


* --athonly    ATH only
This option causes LAME to ignore the output of the psy-model and only use masking from the ATH. Might be useful at very high bitrates or for testing the ATH.

* -b    bitrate
For MPEG1 (sampling frequencies of 32, 44.1 and 48kHz)
n = 32,40,48,56,64,80,96,112,128,160,192,224,256,320

For MPEG2 (sampling frequencies of 16, 22.05 and 24kHz)
n = 8,16,24,32,40,48,56,64,80,96,112,128,144,160

Default is 128kbs for MPEG1 and 80kbs for MPEG2.

When used with variable bitrate encoding (VBR), -b specifies the minimum bitrate to be used.

* -B    maximum VBR bitrate 
For MPEG1 (sampling frequencies of 32, 44.1 and 48kHz)
n = 32,40,48,56,64,80,96,112,128,160,192,224,256,320

For MPEG2 (sampling frequencies of 16, 22.05 and 24kHz)
n = 8,16,24,32,40,48,56,64,80,96,112,128,144,160

Specifies the maximum allowed bitrate when using VBR.

note: If you own an mp3 hardware player build upon a MAS 3503 chip, you must set maximum bitrate to no more than 224 kpbs.
* -c    copyright
Mark the encoded file as being copyrighted.


* -d    block type control
Allows the left and right channels to use different block size types.


* -e n/5/c    de-emphasis

n = (none, default)
5 = 0/15 microseconds
c = citt j.17

All this does is set a flag in the bitstream. If you have a PCM input file where one of the above types of (obsolete) emphasis has been applied, you can set this flag in LAME. Then the mp3 decoder should de-emphasize the output during playback, although most decoders ignore this flag.
A better solution would be to apply the de-emphasis with a standalone utility before encoding.


* -f    fast mode
This switch forces the encoder to use the fast encoding mode. It will reduce a lot the quality of the output. This might be useful for real-time processing or streaming on slowest computers.


* -h    high quality
Enables specialized mid/side masking thresholds to be used in jstereo mode and also enables a more accurate but slightly slower quantization formula. It will sound better but is about 20% slower.
Recommended setting.

In the future there may be more quality settings, ranging from 0 (highest) to 9 (lowest) but right now there are just 3: 2,5 or 9. They are enabled with:

-f 'fast mode' quality 9
default quality 5
-h 'high quality' quality 2


* --help    help
Display a list of all available options.


* --highpass    highpass filtering frequency in kHz
Set an highpass filtering frequency. Frequencies below the specified one will be cutoff.


* --highpass-width    width of highpass filtering in kHz
Set the width of the highpass filter. The default value is 15% of highpass frequency.


* -k    full bandwidth
Tells the encoder to use full bandwidth. By default, the encoder uses some highpass filtering at low bitrates, in order to keep a good quality. Increasing the bandwidth from the default setting might produces ringing artefacts at low bitrates. Use with care!


* --lowpass    lowpass filtering frequency in kHz
Set a lowpass filtering frequency. Frequencies above the specified one will be cutoff.


* --lowpass-width    width of lowpass filtering in kHz
Set the width of the lowpass filter. The default value is 15% of lowpass frequency.


* -m s/j/f/m    stereo mode
Joint-stereo is the default mode for stereo files with VBR or fixed bitrates of 160kbs or less. At higher fixed bitrates, the default is stereo.

stereo

In this mode, the encoder makes no use of potentially existing correlations between the two input channels. It can, however, negotiate the bit demand between both channel, i.e. give one channel more bits if the other contains silence.

joint stereo
In this mode, the encoder will make use of a correlation between both channels. The signal will be matrixed into a sum ("mid") and difference ("side") signal. For quasi-mono signals, this will give a significant gain in encoding quality.
This mode does not destroy phase information like IS stereo that may be used by other encoders and thus can be used to encode DOLBY ProLogic surround signals.

forced joint stereo
This mode will force MS joint stereo on all frames. It's slightly faster than joint stereo, but it should be used only if you are sure that every frame of the input file has very little stereo separation.

mono
The input will be encoded as a mono signal. If it was a stereo signal, it will be downsampled to mono. The downmix is calculated as the sum of the left and right channel, attenuated by 6 dB.


* --mp3input    mp3 input file
Assume the input file is a MP3 file. Usefull for downsampling from one mp3 to another. As an example, it can be usefull for streaming through an IceCast server.
If the filename ends in ".mp3" LAME will assume it is an MP3. For stdin or MP3 files which dont end in .mp3 you need to use this switch.

* --noath    no ATH
Disable any use of the ATH for masking.

* --nohist    disable histogram display
By default, LAME will display a bitrate histogram while producing VBR mp3 files. This will disable that feature.
Histogram display might not be available on your release.

* --nores    disable bit reservoir
Disable the bit reservoir. Each frame will then become independent from previous ones, but the quality will be lower.

* --noshort    disable short blocks frames
Encode all frames using long blocks only. This could increase quality when encoding at very low bitrates, but can produce serious pre-echo artefacts.

* -o    non-original
Mark the encoded file as a copy.


* -p    error protection
Turn on CRC error protection.


* --preset phone/voice/fm/tape/hifi/cd/studio     use built-in preset
Use one of the built-in presets.


* -r    input file is raw pcm
Assume the input file is raw pcm. Sampling rate and mono/stereo/jstereo must be specified on the command line. Without -r, LAME will perform several fseek()'s on the input file looking for WAV and AIFF headers.
Might not be available on your release.


* --resample    output sampling frequency in kHz
n = 16, 22.05, 24, 32, 44.1, 48

Resample the input to the specified frequency. If not specified, LAME will automatically resample the input when using high compression ratios.

* -s 16/22.05/24/32/44.1/48    sampling frequency
Required only for raw PCM input files. Otherwise it will be determined from the header.


* -S    silent operation
Don't print progress report.


* -t    disable VBR tag
Disable writing of the VBR Tag (only valid in VBR mode).
This tag in embedded in frame 0 of the MP3 file. It lets VBR aware players correctly seek and compute playing times of VBR files.


* -V 0...9    VBR quality setting
Enable VBR (Variable BitRate) and specifies the value of VBR quality.
default=4
0=highest quality.

* --voice    voice encoding mode
Use voice encoding mode. In the case of voice encoding, it will increase the quality a low bitrates, or reduce the file size when using VBR.
However, be carefull to only use it on 44.1kHz files.

* -x    swapbytes
Swap bytes in the input file. For sorting out little endian/big endian type problems. If your encodings sounds like static, try this first.