LAME Official Logo

Detailed command line switches

Options ordered by feature

SettingBrief description
Input options
By default, LAME accepts a PCM audio sample inside a .WAV container as the input file, in 8, 16, 24 and 32 bits integer and in IEEE FLOAT. If it is compiled with libsndfile, then it also supports the extra formats that the library supports.
There is also support for RAW PCM data and and piped input
-For piped/streamed Input, use "-" as the input and/or output file name.
--out-dir pathIf no explicit output file is specified, a file will be written at given path. Ignored when using piped/streamed input
--mp1input1Input file is an MPEG layer I file. Implicit if extension is .mp1
--mp2input1Input file is an MPEG layer II file. Implicit if extension is .mp2
--mp3input1Input file is an MPEG layer III file. Implicit if extension is .mp3
--scale numberScale input (multiply PCM data) by number.
--scale-l numberScale channel 0 (left) input (multiply PCM data ) by number
--scale-r numberScale channel 1 (right) input (multiply PCM data) by number
--swap-channelSwap input channels
--nogap file1 file2 ...Gapless encoding for a set of contiguous files
--nogapout dirOutput dir for gapless encoding (must precede --nogap)
--nogaptagsAllow the use of VBR tags in gapless encoding
Input options for RAW PCM
-rAssume input file is raw PCM.
-s numberInput sampling frequency in kHz
-x Force byte-swapping of input
--bitwidth w Input bit width is w (default 16)
--signed / --unsigned Input is signed (default) or unsigned
--little-endian / --big-endian Input is little-endian (default) or big-endian
-aDownmix from stereo to mono file for mono encoding
Constant Bit Rate (CBR)
-b numberSet the bitrate in kbps, default 128 kbps
--cbrEnforce use of constant bitrate
--comp ratioChoose bitrate to obtain the specified compression ratio
--freeformatProduce a free format bitstream instead of the standard one. Supported bitrates between 8 and 640 kbps. Scarce support by decoders.
Variable Bit Rate (ABR)
--abr numberSpecify average bitrate desired (instead of quality)
Variable Bit Rate (VBR)
-V numberQuality setting for VBR. default number=4.
Decimal values can be specified, like: 4.51
0=highest quality, bigger files. 9.999=lowest quality, smaller files
--vbr-oldUse old variable bitrate (VBR) routine
-b numberSpecify a minimum allowed bitrate. default 32 kbps (See -F setting below)
-B numberSpecify a maximum allowed bitrate. default 320 kbps
-FEnforce -b option for digital silence frames too, rather than encoding them at 8 or 32 kbps.
-tDisable VBR informational tag
-TEnable and force writing LAME Tag
-YAllows -V2, -V1 and -V0 to not to encode the highest frequencies accurately, if doing so causes disproportional increases in bitrate. This is the same that CBR and ABR modes do.
Operational options
--preset typeEnables some preconfigured settings. Check below for each of the valid values
--resample sfreqSampling frequency of output file(kHz)- default=automatic
--priority numberSets the process priority:
0,1 = Low priority
2 = normal priority (default)
3,4 = High priority
--flushFlush output stream as soon as possible
--decodeInput=mp3 file, output=wav
--decode-mp3delay samplesSet the encoder delay to use to decode the input .mp3 file
-tDisable writing wav header when using --decode
--noasm typeDisable assembly optimizations for mmx/3dnow/sse
Noise shaping & psycho acoustic algorithms
-q numbernumber = 0...9. Default -q 3
-q 0: Highest quality, very slow
-q 9: Poor quality, but fast
Please, see notes in the detailed description
-m modejoint, simple, force, dual-mono, mono, left, right. default is j.
joint = joins the best possible of MS and LR stereo
simple = force LR stereo on all frames
force = force MS stereo on all frames.
Filter options:
--lowpass numberFrequency(kHz), lowpass filter cutoff above freq. Range [0.001..50]kHz or [50..50000]Hz
--lowpass-width numberFrequency(kHz), lowpass window width. Range [0.001..16]kHz or [16..50000]Hz - (See further restriction in the detailed explanation)
--highpass numberFrequency(kHz), highpass filter cutoff below freq. Range [0.001..16]kHz or [16..50000]Hz (See further restriction in the detailed explanation)
--highpass-width numberFrequency(kHz), highpass window width - (See further restriction in the detailed explanation)
ID3 tag Information
--tt titleAudio/song title (max 30 chars for version 1 tag)
--ta artistAudio/song artist (max 30 chars for version 1 tag)
--tl albumAudio/song album (max 30 chars for version 1 tag)
--ty yearAudio/song year of issue (1 to 9999)
--tc commentUser-defined text (max 30 chars for v1 tag, 28 for v1.1)
--tn track[/total]Audio/song track number and (optionally) the total number of tracks on the original recording.
(track and total each 1 to 255. just the track number creates v1.1 tag, providing a total forces v2.0).
--tg genreAudio/song genre (name or number in list)
--ti fileAudio/song albumArt (jpeg/png/gif file, 128KB max, v2.3)
--tv id=valueText or URL frame specified by id and value (v2.3 tag), user defined text frame syntax: --tv "TXXX=description=content"
--add-id3v2Force addition of version 2 tag
--id3v1-onlyAdd only a version 1 tag
--id3v2-onlyAdd only a version 2 tag
--id3v2-latin1Add following options in ISO-8859-1 text encoding
--id3v2-utf16Add following options in unicode text encoding
--space-id3v1Pad version 1 tag with spaces instead of nulls
--pad-id3v2-size nAdds ID3v2 tag with n padding bytes
--genre-listPrint alphabetically sorted ID3 genre list and exit
--ignore-tag-errorsIgnore errors in values passed for tags
Note: A version 2 tag will NOT be added unless one of the input fields won't fit in a version 1 tag (e.g. the title string is longer than 30 characters), or the '--add-id3v2' or '--id3v2-only' options are used, or output is redirected to stdout.
MP3 header/stream options:
-e modeDe-emphasis n/5/c (obsolete)
-cMark as copyright
-oMark as non-original
-pError detection. adds 16 bit checksum to every frame (the checksum is computed correctly)
--strictly-enforce-ISOComply as much as possible to ISO MPEG spec
--replaygain-fastCompute RG fast but slightly inaccurately (default)
--replaygain-accurate1Compute RG more accurately and find the peak sample
--noreplaygainDisable ReplayGain analysis
--clipdetect1Enable --replaygain-accurate and print a message whether clipping occurs and how far the waveform is from full scale
Verbosity:
--disptime secsPrint progress report every secs seconds
--nohistDisable VBR histogram display
--silent / --quietDon't print anything on screen
--verbosePrint a lot of useful information
--version / --licensePrint License information
--help / --usageShows the common list of switches. Add id3 or dev to get help for a specified topic
--longhelpShows the complete list of switches
Experimental switches for developers. Only enabled in alpha/debug versions:
--noresEach frame will then become independent from previous ones, but the quality will be lower.
--noshortDisable use of short blocks
--shortAllow the use of short blocs (default)
--allshortUse only short blocks
--shortthreshold x[,y]
--temporal-masking xx=0 disables, x=1 enables temporal masking effect
--notempAlias of --temporal-masking 0
--nssafejointM/S switching criterion
--nsmsfix xM/S switching tuning [effective 0-3.5]
--interch xAdjust inter-channel masking ratio (default 0.0). Range [0.0..1.0]
--ns-bass xAdjust masking for sfbs 0 - 6 (long) 0 - 5 (short)
--ns-alto xAdjust masking for sfbs 7 - 13 (long) 6 - 10 (short)
--ns-treble xAdjust masking for sfbs 14 - 21 (long) 11 - 12 (short)
--ns-sfb21 xChange ns-treble by x dB for sfb21
--substep
--noathDisable the use of ATH
--athonlyUse only ATH
--athshortATH only for short blocks
--athlower xLower the ATH by x.x dB's
--athtype xSelect ATH type curve
--vbr-newIn LAME 3.98, the new VBR was made default, and this switch is now used for experimental tweaks
--buffer-constraint xavailable values for x: default, strict, maximum
Aliases and removed settings
-fAlias of -q 7.
-hAlias of -q 2.
-vAlias of -V 4
-SAlias of --silent
--alt-presetAlias of --preset
--r3mixAlias of -V 3
--vbr-mtrhAlias of LAME 3.98 default vbr mode
--pad-id3v2Alias of --pad-id3v2-size 128
-dNo longer supported
-kNo longer supported
--cwlimitNo longer supported
--ogginputNo longer supported. Compile with libsndfile instead
-ZCurrently unused
--briefCurrently unused
--nspsytuneCurrently unused

Detailed description in alphabetical order

-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.

--abr n Average bitrate encoding (aka Safe VBR)

turns on encoding with a targeted average bitrate of n kbps, allowing to use frames of different sizes. The allowed range of n is 8...320 kbps, you can use any integer value within that range.

--add-id3v2 Force addition of version 2 tag

Tells LAME to add the tag information as id3v2. This implies adding both, a version 1 and a version 2 tag, if the values fit on a version 1 tag. See --id3v1-only and --id3v2-only if you want a more fine-grained control.

-b n Bitrate

Codec sample frequencies (kHz) bitrates (kbps)
MPEG-1 layer III 32, 48, 44.1 32 40 48 56 64 80 96 112 128 160 192 224 256 320
MPEG-2 layer III 16, 24, 22.05 8 16 24 32 40 48 56 64 80 96 112 128 144 160
MPEG-2.5 layer III 8, 12, 11.025 8 16 24 32 40 48 56 64

The bitrate to be used. Default for CBR is 128 kbps MPEG1, 80 kbps MPEG2.

When used with variable bitrate encodings (VBR), -b specifies the minimum bitrate to use. This is useful only if you need to circumvent a buggy hardware device with strange bitrate constrains. (You will need the -F setting too for digital silence).
Default for ABR/VBR is the minimum allowed bitrate for the MPEG version. (i.e. no limit)

-B n Max bitrate

see also option "-b" for allowed bitrates.

Maximum allowed bitrate when using VBR/ABR.

Using -B is NOT RECOMMENDED. A 128 kbps CBR bitstream, because of the bit reservoir, can actually have frames which use as many bits as a 320 kbps frame. ABR/VBR modes minimize the use of the bit reservoir, and thus need to allow 320 kbps frames to get the same flexibility as CBR streams. This is useful only if you need to circumvent a buggy hardware device with strange bitrate constrains.
Default value is the maximum allowed bitrate for the MPEG versio (i.e. no limit)

--big-endian Set the byte order to big-endian.

This switch tells LAME that the RAW pcm input is encoded in big-endian instead of little-endian.

--bitwidth Sets the bitwidth value

With RAW pcm input, this switch lets specify the bitwidth of the same (8 bits, 16 bits...)

-c copyright flag

mark the encoded file as copyrighted

--cbr Enforce constant bitrate encoding

This switch disables the VBR encoding. Examples:

lame -V 0 --cbr input.wav
Will encode at -b 128 (ignore completely -V and encode at default bitrate)
lame --preset 160 --cbr
Will encode at -b 160 (ignore ABR and use the specified bitrate)
lame --abr 200 --cbr
Will encode at -b 192 (ignore ABR and use the nearest bitrate to the one specified)

--clipdetect Clipping detection

Enable --replaygain-accurate and print a message whether clipping occurs and how far in dB the waveform is from full scale.

This option is not usable if the MP3 decoder was explicitly disabled in the build of LAME.

See also: --replaygain-accurate

--comp x Indicate a compression ratio instead of a bitrate

Use this in place of the -b setting if you prefer to indicate a compression ratio (integer value). The ratio is the value of original-filesize/desired-filesize

--decode MP3 decode capability

This uses LAME's HIP2 decoder to decode an MP3 (layers 1, 2 and 3) file to a wav file.

If -t is used (disable wav header), LAME will output raw pcm in native endian format (use -x to swap bytes).

This option is not usable if the MP3 decoder was explicitly disabled in the build of LAME.

--decode-mp3delay x Indicate a different encoder delay for decoding

When decoding an mp3 file, LAME automatically corrects for the start delay that the encoder had to put into it.
This setting lets you specify a different delay than LAME's own one, so that it is possible to compensate for the delay of mp3's generated with other encoders.

--disptime secs Update the display each secs

Use this setting to change the frequency that LAME updates the display when encoding a file. Allows decimal values (like 0.5)

-e n/5/c Write the de-emphasis flag

n = (none, default)
5 = 50/15 microseconds
c = ccitt 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, and then encode without -e.

-F Enforce the minimum bitrate

Enforces the minimum bitrate. Without this option, passages of analog silence will be encoded at the minimum bitrate possible (32 or 8, depending on MPEG version).

--flush Flush the output stream as soon as possible

This setting forces a flush of the data written as soon as the operation has finished. This is mostly useful in case of streams. With files, it may degrade performance, since the OS has to write to disk in smaller chunks.

--freeformat Encode to freeformat stream

LAME will produce a fixed bitrate, free format bitstream. User must specify the desired bitrate in kbps, which can be any integer between 8 and 640.

Not supported by most decoders. Compliant decoders (of which there are few) are only required to support up to 320 kbps.

Decoders which can handle free format:

Supports up to
MAD640 kbps
"lame --decode"640 kbps
l3dec310 kbps

--genre-list Print alphabetical ordered list of known genres

Tell LAME to print the list of genres with their index to be used with the --tg setting.

123 Acappella
34 Acid
74 Acid Jazz
73 Acid Punk
99 Acoustic
20 Alternative
40 Alternative Rock
26 Ambient
145 Anime
90 Avantgarde
116 Ballad
41 Bass
135 Beat
85 Bebob
96 Big Band
138 Black Metal
89 Bluegrass
0 Blues
107 Booty Bass
132 BritPop
65 Cabaret
88 Celtic
104 Chamber Music
102 Chanson
97 Chorus
136 Christian Gangsta
61 Christian Rap
141 Christian Rock
32 Classical
1 Classic Rock
112 Club
128 Club-House
57 Comedy
140 Contemporary Christian
2 Country
139 Crossover
58 Cult
3 Dance
125 Dance Hall
50 Darkwave
22 Death Metal
4 Disco
55 Dream
127 Drum & Bass
122 Drum Solo
120 Duet
98 Easy Listening
52 Electronic
48 Ethnic
54 Eurodance
124 Euro-House
25 Euro-Techno
84 Fast Fusion
80 Folk
115 Folklore
81 Folk-Rock
119 Freestyle
5 Funk
30 Fusion
36 Game
59 Gangsta
126 Goa
38 Gospel
49 Gothic
91 Gothic Rock
6 Grunge
129 Hardcore
79 Hard Rock
137 Heavy Metal
7 Hip-Hop
35 House
100 Humour
131 Indie
19 Industrial
33 Instrumental
46 Instrumental Pop
47 Instrumental Rock
8 Jazz
29 Jazz+Funk
146 JPop
63 Jungle
86 Latin
71 Lo-Fi
45 Meditative
142 Merengue
9 Metal
77 Musical
82 National Folk
64 Native US
133 Negerpunk
10 New Age
66 New Wave
39 Noise
11 Oldies
103 Opera
12 Other
75 Polka
134 Polsk Punk
13 Pop
53 Pop-Folk
62 Pop/Funk
109 Porn Groove
117 Power Ballad
23 Pranks
108 Primus
92 Progressive Rock
67 Psychedelic
93 Psychedelic Rock
43 Punk
121 Punk Rock
15 Rap
68 Rave
14 R&B
16 Reggae
76 Retro
87 Revival
118 Rhythmic Soul
17 Rock
78 Rock & Roll
143 Salsa
114 Samba
110 Satire
69 Showtunes
21 Ska
111 Slow Jam
95 Slow Rock
105 Sonata
42 Soul
37 Sound Clip
24 Soundtrack
56 Southern Rock
44 Space
101 Speech
83 Swing
94 Symphonic Rock
106 Symphony
147 SynthPop
113 Tango
18 Techno
51 Techno-Industrial
130 Terror
144 Thrash Metal
60 Top 40
70 Trailer
31 Trance
72 Tribal
27 Trip-Hop
28 Vocal

--help Print the command line help.

Print the short command line help and exit.

--highpass number Use a highpass filter when encoding

Enables a highpass filter of the specified frequency when encoding the source. Range [0.001..50]kHz or [50..50000]Hz.
This is usually not required, and the gains are usually minimal. May be useful to remove an interference signal on 50Hz or 60Hz, or a DC offset. (default: disabled)
Note: The current implementation has a minimum highpass frequency of (67.5/62)% of the sample rate (I.e. 481Hz at 44Khz).

--highpass-width width Set the width of the decaying curve.

Specify the width in Hz of the decaying curve of the highpass. Range [16..50000]Hz
The minimum (and default) width is 75% of a band's width (which is 1/64th of the sample rate).
Note: See the remark in the --highpass command above.

--id3v1-only Disable the use of id3v2.

Put it before any tag setting.
This setting tells LAME to use ID3 v1 tag only, and not create an ID3v2 even if it thinks it should.

--id3v2-only Disable the user ov id3v1.

Put it before any tag setting.
This setting tells LAME to use ID3 v2 tag only. An ID3 v1 tag would not be written.

--ignore-tag-errors Ignore tag information errors

Put it before any tag setting.
This tells lame to ignore the tag information that sees as erroneous and continue encoding without those. Without this setting, errors are reported and encoding does not start.

--license Print the license page

Prints version and license information about LAME encoder.

--little-endian Set the byte order to little-endian.

This switch tells LAME that the RAW pcm input is encoded in little-endian. It is the default setting.

--longhelp Shows the detailed help

Prints a help page with all of the command-line switches and a brief explanation of them.

--lowpass number Use a lowpass filter when encoding

Enables a lowpass filter of the specified frequency when encoding the source. Range [0.001..50]kHz or [50..50000]Hz

Using a lowpass filter helps reducing the amount of data to encode. This is important in MP3 due to a limitation in very high frequencies (>16Khz). The default value depends on the target bitrate/quality. It is not recommended to change it as a general basis.

--lowpass-width width Set the width of the decaying curve.

Specify the width in Hz of the decaying curve of the lowpass. Range [0.001..16]kHz or [16..50000]Hz
The lowpass is in the center of this curve. The minimum (and default) width is 75% of a band's width (which is 1/64th of the sample rate).

-m x Channel modes

-m mmono
-m lget only the left channel of a stereo signal for a mono output
-m rget only the right channel of a stereo signal for a mono output
-m sforced L/R stereo
-m jautomatic switch between L/R and M/S stereo
-m fforced mid/side stereo
-m ddual (independent) channels

MONO is the default mode for mono input files. If "-m m" is specified for a stereo input file, the two channels will be averaged into a mono signal.

FORCED L/R STEREO encodes the left and the right signals independently, and gives more or less bits to each, depending on the currently available.

JOINT STEREO is the default mode of encoding. jstereo means the encoder can use (on a frame by frame basis) either L/R stereo or mid/side stereo. In mid/side stereo, the mid (L+R) and side (L-R) channels are encoded, and more bits are allocated to the mid channel than the side channel. When there isn't too much stereo separation, this effectively increases the bandwidth, so having higher quality with the same amount of bits.
Using mid/side stereo inappropriately can result in audible compression artifacts. Too much switching between mid/side and regular stereo can also sound bad. To determine when to switch to mid/side stereo, LAME uses a much more sophisticated algorithm than the one described in the ISO documentation.

FORCED MID/SIDE STEREO forces all frames to be encoded with mid/side stereo. It should only be used if you are sure every frame of the input file has very little stereo seperation.

DUAL CHANNEL mode is similar to encode the left and right as two mono signals. The main use of Dual channel is to encode content in two languages.

--mp1input --mp2input --mp3input MPEG layer I, II or III input file

Assume the input file is an MP1/2/3 file. LAME will decode the input file before re-encoding it. Since MP3 is a lossy format, this is not recommended in general. But it is useful for creating low bitrate mp3s from high bitrate mp3s. If the filename ends in ".mp3" LAME will assume it is an MP3. For stdin or MP3 files which don't end in .mp3 you need to use this switch.

--noasm value Disables the specified assembler instructions

When the encoder is compiled with assembler optimizations, this setting allows to disable them at runtime (They are only enabled if the CPU supports them). The purpose of this setting is to detect problems in those optimizations, and/or check the speed difference.

--nogap file1 file2 [...] Encodes multiple continuous files.

Encodes multiple files (ordered by position) which are meant to be played gaplessly.

By default, LAME will encode the files with accurate length, but the first and last frame may contain a few erroneous samples for signals that don't fade-in/out (as is the case of continuous playback).

This setting solves that by using the samples from the next/previous file to compute the encoding.

--nogapout dir Specify a directory for the output of the files encoded with --nogap

This setting should precede --nogap, and is used to specify the alternate directory where to store the encoded files. The default one is the input file directory.

--nogaptags Enables the use of VBR tags with files encoded with --nogap

Tells LAME to put VBR tags to encoded files if they are encoded in VBR or ABR modes. Else, using the --nogap option doesn't generate it.

--nohist Disable bitrate Histogram

By default, LAME will display a bitrate histogram while producing VBR mp3 files. This will disable that feature.

--noreplaygain Disable ReplayGain analysis

By default ReplayGain analysis is enabled. This switch disables it.

See also: --replaygain-accurate, --replaygain-fast

-o non-original

Mark the encoded file as a copy

-p CRC error detection

Turn on CRC error protection. It will add a cyclic redundancy check (CRC) code in each frame, allowing to detect transmission errors that could occur on the MP3 stream. However, it takes 16 bits per frame that would otherwise be used for encoding, and then will slightly reduce the sound quality.

--pad-id3v2 Pad ID3v2 tag.

Pads the ID3v2 tag with extra 128bytes to allow it to expand.

--preset x Enable one of the presets

SettingMeaning
--preset medium-V 5 --vbr-old
--preset standard-V 2 --vbr-old
--preset extreme-V 0 --vbr-old
--preset insane-b 320 --vbr-old
--preset fast xxxAdding the "fast" keyword before the mentioned presets enables the LAME 3.98 default vbr routine.
 
--preset number--abr number
--preset cbr number-b number
Old compatibility settings. Meaningless
--preset phone-b 16 -m m
--preset phon+ / lw / mw-eu-b 24 -m m
--preset mw-us-b 40 -m m
--preset voice-b 56 -m m
--preset fm / radio-b 112
--preset hifi-b 160
--preset cd-b 192
--preset studio-b 256

--priority value Set process priority

(Windows and OS/2 only)

Sets the process priority for LAME while running under Windows and/or IBM OS/2. This can be very useful to avoid the system becoming slow and/or unresponsive. By setting LAME to run in a lower priority, you leave more time for the system to update basic processing (drawing windows, polling keyboard/mouse, etc). The impact in LAME's performance is minimal if you use priority 0 to 2.

The valid parameters are:

PriorityWindowsOS/2
0Low priority IDLE_PRIORITY_CLASSIDLE, delta = 0
1Medium priority IDLE_PRIORITY_CLASSIDLE, delta = +31
2Regular priority NORMAL_PRIORITY_CLASSREGULAR, delta = -31
3High priority HIGH_PRIORITY_CLASSREGULAR, delta = 0
4Maximum priority HIGH_PRIORITY_CLASSREGULAR, delta = +31

Note that if you call '--priority' without a parameter, then priority 0 will be assumed.

-q n Algorithm quality selection

Bitrate is of course the main influence on quality. The higher the bitrate, the higher the quality. But for a given bitrate, we have a choice of algorithms to determine the best scalefactors and Huffman coding (noise shaping).

For CBR, ABR and --vbr-old modes, the following table applies

-q 0Use slowest & best possible version of all algorithms.
-q 3Default value. Good speed, good quality
-q 7Very fast, ok quality. (psycho acoustics are used for pre-echo & M/S, but no noise shaping is done.
-q 9Disables almost all algorithms including psy-model. Poor quality.

For the default VBR mode since LAME 3.98, the following table applies

-q 0 to -q 4Use the best algorithm.
-q 5 to -q 9Use the not so good algorithm

--quiet Don't print any output in the screen

Disables the screen output. Useful for job processing or other times where screen output is undesirable.

-r Input file is raw pcm

Assume the input file is raw pcm. Sampling rate and mono/stereo 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.

Not supported if LAME is compiled to use LIBSNDFILE.

--replaygain-accurate Slightly more accurate ReplayGain analysis and finding the peak sample

Enable decoding on the fly. Compute "Radio" ReplayGain on the decoded data stream. Find the peak sample of the decoded data stream and store it in the file.

ReplayGain analysis does _not_ affect the content of a compressed data stream itself, it is a value stored in the header of a sound file. Information on the purpose of ReplayGain and the algorithms used is available from http://www.replaygain.org/

By default, LAME performs ReplayGain analysis on the input data (after the user-specified volume scaling). This behaviour might give slightly inaccurate results because the data on the output of a lossy compression/decompression sequence differs from the initial input data. When --replaygain-accurate is specified the mp3 stream gets decoded on the fly and the analysis is performed on the decoded data stream. Although theoretically this method gives more accurate results, it has several disadvantages:

The apparent advantage is that:

Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag. The analysis is performed with the reference volume equal to 89dB. Note: the reference volume has been changed from 83dB on transition from version 3.95 to 3.95.1.

This option is not usable if the MP3 decoder was _explicitly_ disabled in the build of LAME. (Note: if LAME is compiled without the MP3 decoder, ReplayGain analysis is performed on the input data after user-specified volume scaling).

See also: --replaygain-fast, --noreplaygain, --clipdetect

--replaygain-fast Fast ReplayGain analysis

Compute "Radio" ReplayGain of the input data stream after user-specified volume scaling and/or resampling.

ReplayGain analysis does _not_ affect the content of a compressed data stream itself, it is a value stored in the header of a sound file. Information on the purpose of ReplayGain and the algorithms used is available from http://www.replaygain.org/

Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag. The analysis is performed with the reference volume equal to 89dB. Note: the reference volume has been changed from 83dB on transition from version 3.95 to 3.95.1.

This switch is enabled by default.

See also: --replaygain-accurate, --noreplaygain

--resample n Output sampling frequency in kHz

where n = 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48

Output sampling frequency. Resample the input if necessary.

If not specified, LAME may sometimes resample automatically when faced with extreme compression conditions (like encoding a 44.1 kHz input file at 32 kbps). To disable this automatic resampling, you have to use --resample to set the output sample rate equal to the input sample rate. In that case, LAME will not perform any extra computations.

-s n Sampling frequency in kHz

where n = sampling rate in kHz.

Required for raw PCM input files. Otherwise it will be determined from the header information in the input file.

LAME will automatically resample the input file to one of the supported MP3 sample rates if necessary.

--scale arg --scale-l arg --scale-r arg Scale the amplitude of the input file

Scales input by arg. This just multiplies the PCM data (after it has been converted to floating point) by arg.

arg > 1: increase volume
arg = 1: no effect
arg < 1: reduce volume

Use with care, since most MP3 decoders will truncate data which decodes to values greater than 32768.

The l and r variants apply the scaling only to left (channel 0) or right (channel 1) respectively.

--signed Input RAW uses signed values

Use with RAW pcm to indicate if the data is signed (values centered at zero) or unsigned (all positive values). This is the default value.

--silent Don't print any output in the screen

Disables the screen output. Useful for job processing or other times where screen output is undesirable.

--space-id3v1 Use spaces for padding.

Use spaces instead of null values for padding data in an ID3v1 tag.

--strictly-enforce-ISO Strict ISO compliance

With this option, LAME will enforce the 7680 bit limitation on total frame size. This results in many wasted bits for high bitrate encodings. Some decoders need it.

-t Disable VBR tag or disable WAV header

This setting has two different uses:

When encoding to VBR, this setting disables writing the VBR Tag (also known as XING tag). This tag is embedded by default in the frame 0 of the MP3 file. It lets VBR aware players to correctly seek and compute playing times in such files.

When decoding MP3 to WAV using --decode, this flag will disable writing the WAV header. The output will be raw pcm, native endian format. Use -x to swap bytes.

-T Force the usage of the LAME tag

By default, LAME already adds a LAME tag when encoding. This setting overrides the -t setting, and implies --nogaptags.

--unsigned Input RAW uses unsigned values

Use with RAW pcm to indicate if the data is signed (values centered at zero) or unsigned (all positive values).

--usage Print the command line help.

Print the short command line help and exit.

-V n Enable VBR encoding

Encodes using the VBR algorithm, at the indicated quality.
Decimal values can be specified, like: 4.51
0=highest quality, bigger files. 9.999=lowest quality, smaller files

Using -V 7 or higher (lower quality) is not recommended. ABR usually produces better results.

--vbr-old Uses the old VBR method of encoding

Tells LAME to encode to VBR using the old (slower) method of encoding.

--verboseProgram verbosity

Print a lot of information on screen.

--version Prints the license page

Prints version and license information about LAME encoder.

-x Swap input bytes

swap bytes in the input file (and output file when using --decode). For sorting out little endian/big endian type problems. If your encodings sound like static, try this first.

-Y Ignore noise in sbf21, like CBR mode does

Allows -V2, -V1 and -V0 to not encode the highest frequencies accurately, if doing so causes disproportional increases in bitrate. This is the same that CBR and ABR modes do.
Due to the design of the MP3 format, to keep precision in the last scalefactor band, an encoder needs to increase the precision in all the bands (not only in this one).
The consequence is an increase of bitrate (+60kbps in some cases) compared to not keeping that precision. Generally, this band should allow for distortions, so using this switch shouldn't cause harm.

 

  1. If compiled with decoding capabilities
  2. HIP stands for Hip Isn't a Player and is based off of Michael Hipp's mpglib 0.2a