Detailed Command Line Switches: Options Ordered by Feature
Detailed Command Line Switches: Options Ordered by Feature
Detailed command line switches
Options ordered by feature
Setting Brief 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.
If no explicit output file is specified, a file will be written at given path. Ignored when using
outdir path
piped/streamed input
mp1input1 Input file is an MPEG layer I file. Implicit if extension is .mp1
mp2input1 Input file is an MPEG layer II file. Implicit if extension is .mp2
mp3input1 Input file is an MPEG layer III file. Implicit if extension is .mp3
scale number Scale input (multiply PCM data) by number.
scalel number Scale channel 0 (left) input (multiply PCM data ) by number
scaler number Scale channel 1 (right) input (multiply PCM data) by number
gain number apply Gain adjustment in decibels, range 20.0 to +12.0.
swapchannel Swap Left and Right channels
nogap file1 file2 ... Gapless encoding for a set of contiguous files
nogapout dir Output dir for gapless encoding (must precede nogap)
nogaptags Allow the use of VBR tags in gapless encoding
Input options for RAW PCM
r Assume input file is raw PCM.
s number Input sampling frequency in kHz (Default is 44.1Khz)
signed / unsigned Input is signed (default) or unsigned
bitwidth w Input bit width is w (default 16)
x Force byteswapping of input stream
littleendian / big
Input is littleendian (default) or bigendian
endian
Downmix from stereo to mono file for mono encoding. Needed with RAW input for the mm mode
a
to do the downmix.
Constant Bit Rate (CBR)
b number Set the bitrate in kbps, default 128 kbps
cbr Enforce use of constant bitrate
comp ratio Choose bitrate to obtain the specified compression ratio
Produce a free format bitstream instead of the standard one. Supported bitrates between 8 and
freeformat
640 kbps. Scarce support by decoders.
Variable Bit Rate (ABR)
abr number Specify average bitrate desired (instead of quality)
Variable Bit Rate (VBR)
Quality setting for VBR. default number=4.
V number Decimal values can be specified, like: 4.51
0=highest quality, bigger files. 9.999=lowest quality, smaller files
vbrold Use old variable bitrate (VBR) routine
b number Specify a minimum allowed bitrate. default 32 kbps (See F setting below)
B number Specify a maximum allowed bitrate. default 320 kbps
[Link] 1/11
4/8/2016 Detailed command-line switches
F Enforce b option for digital silence frames too, rather than encoding them at 8 or 32 kbps.
t Disable VBR informational tag
T Enable and force writing LAME Tag
Allows V2, V1 and V0 to not to encode the highest frequencies accurately, if doing so causes
Y
disproportional increases in bitrate. This is the same that CBR and ABR modes do.
Operational options
preset type Enables some preconfigured settings. Check below for each of the valid values
Sets the process priority:
0,1 = Low priority
priority number
2 = normal priority (default)
3,4 = High priority
flush Flush output stream as soon as possible
decode Input=mp3 file, output=wav
decodemp3delay
Set the encoder delay to use to decode the input .mp3 file
samples
t Disable writing wav header when using decode
noasm type Disable assembly optimizations for mmx/3dnow/sse
Noise shaping & psycho acoustic algorithms
number = 0...9. Default q 3
q 0: Highest quality, very slow
q number
q 9: Poor quality, but fast
Please, see notes in the detailed description
joint, simple, force, dualmono, mono, left, right. default is j.
joint = joins the best possible of MS and LR stereo
m mode
simple = force LR stereo on all frames
force = force MS stereo on all frames.
Filter and resampling options:
resample sfreq Sampling frequency of output file(kHz) default=automatic
lowpass number Frequency(kHz), lowpass filter cutoff above freq. Range [0.001..50]kHz or [50..50000]Hz
lowpasswidth Frequency(kHz), lowpass window width. Range [0.001..16]kHz or [16..50000]Hz (See further
number restriction in the detailed explanation)
Frequency(kHz), highpass filter cutoff below freq. Range [0.001..16]kHz or [16..50000]Hz (See
highpass number
further restriction in the detailed explanation)
highpasswidth
Frequency(kHz), highpass window width (See further restriction in the detailed explanation)
number
ID3 tag Information
tt title Audio/song title (max 30 chars for version 1 tag)
ta artist Audio/song artist (max 30 chars for version 1 tag)
tl album Audio/song album (max 30 chars for version 1 tag)
ty year Audio/song year of issue (1 to 9999)
tc comment Userdefined text (max 30 chars for v1 tag, 28 for v1.1)
Audio/song track number and (optionally) the total number of tracks on the original recording.
tn track[/total] (track and total each 1 to 255. just the track number creates v1.1 tag, providing a total forces
v2.0).
tg genre Audio/song genre (name or number in list)
ti file Audio/song albumArt (jpeg/png/gif file, 128KB max, v2.3)
Text or URL frame specified by id and value (v2.3 tag). User defined frame. Syntax: tv
tv id=value
"TXXX=description=content"
addid3v2 Force addition of version 2 tag
id3v1only Add only a version 1 tag
id3v2only Add only a version 2 tag
id3v2latin1 Add following options in ISO88591 text encoding
id3v2utf16 Add following options in unicode text encoding
spaceid3v1 Pad version 1 tag with spaces instead of nulls
padid3v2size n Adds ID3v2 tag with n padding bytes
genrelist Print alphabetically sorted ID3 genre list and exit
ignoretagerrors Ignore 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 'addid3v2' or 'id3v2only' options are used, or output is redirected to stdout.
MP3 header/stream options:
e mode Deemphasis n/5/c (obsolete)
c Mark as copyright
[Link] 2/11
4/8/2016 Detailed command-line switches
o Mark as nonoriginal
p Error detection. adds 16 bit checksum to every frame (the checksum is computed correctly)
strictlyenforceISO Comply as much as possible to ISO MPEG spec
replaygainfast Compute RG fast but slightly inaccurately (default)
replaygainaccurate1 Compute RG more accurately and find the peak sample
noreplaygain Disable ReplayGain analysis
Enable replaygainaccurate and print a message whether clipping occurs and how far the
clipdetect1 waveform is from full scale
Verbosity:
disptime secs Print progress report every secs seconds
nohist Disable VBR histogram display
silent / quiet Don't print anything on screen
verbose Print a lot of useful information
version / license Print License information
help / usage Shows the common list of switches. Add id3 or dev to get help for a specified topic
longhelp Shows the complete list of switches
Experimental switches for developers. Only enabled in alpha/debug versions. Can change from version to
version
Disables the bit reservour. Each frame will become independent from previous ones, but the
nores
quality will be lower.
bufferconstraint x available values for x: default, strict, maximum
noath turns ATH down to a flat noise floor
athshort ignore GPSYCHO for short blocks, use ATH only
athonly ignore GPSYCHO completely, use ATH only
athtype x selects between different ATH types [04]
athlower x Lower the ATH by x.x dB's
athaatype n ATH auto adjust: 0 'no' else 'loudness based'
athaasensitivity x activation offset in /+ dB for ATH autoadjustment
short Allow the use of short blocs (default)
noshort Disable use of short blocks
allshort Use only short blocks
shortthreshold x[,y] short block switching threshold, x for L/R/M channel, y for S channel
temporalmasking x x=0 disables, x=1 enables temporal masking effect
notemp Alias of temporalmasking 0
nssafejoint M/S switching criterion
nsmsfix x M/S switching tuning [effective 03.5]
nsbass x Adjust masking for sfbs 0 6 (long) 0 5 (short)
nsalto x Adjust masking for sfbs 7 13 (long) 6 10 (short)
nstreble x Adjust masking for sfbs 14 21 (long) 11 12 (short)
nssfb21 x Change nstreble by x dB for sfb21
Z [n] always do calculate short block maskings
substep use pseudo substep noise shaping method types 02
X n[,m] selects between different noise measurements n for long block, m for short. if m is omitted, m = n
In LAME 3.98, the new VBR was made default, and this switch may be used for experimental
vbrnew
tweaks.
Aliases and removed settings
f Alias of q 7.
h Alias of q 2.
v Alias of V 4
S Alias of silent
altpreset Alias of preset
r3mix Alias of V 3
vbrmtrh Alias of LAME 3.98 default vbr mode
padid3v2 Alias of padid3v2size 128
d No longer supported
k No longer supported
[Link] 3/11
4/8/2016 Detailed command-line switches
cwlimit No longer supported
ogginput No longer supported. Compile with libsndfile instead
brief Currently unused
interch x Currently unused
nspsytune Currently 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 m 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.
addid3v2 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 id3v1only and id3v2only if you want a more finegrained control.
b n Bitrate
The bitrate to be used. Default is 128kbps in MPEG1 (64 for mono), 64kbps in MPEG2 (32 for mono) and
32kbps in MPEG2.5 (16 for mono).
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)
bigendian Set the byte order to bigendian.
This switch tells LAME that the RAW pcm input is encoded in bigendian instead of littleendian.
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:
Will encode at b 128 (ignore completely V and encode at default bitrate)
Will encode at b 160 (ignore ABR and use the specified bitrate)
Will encode at b 192 (ignore ABR and use the nearest bitrate to the one specified)
clipdetect Clipping detection
[Link] 4/11
4/8/2016 Detailed command-line switches
clipdetect Clipping detection
Enable replaygainaccurate 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: replaygainaccurate
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 originalfilesize/desiredfilesize
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.
decodemp3delay 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 deemphasis 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 deemphasis 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 knwon to handle free format:
Supports up to
MAD 640 kbps
"lame decode" 640 kbps
l3dec 310 kbps
gain Apply gain in decibels.
Apply Gain adjustment in decibels, range 20.0 to +12.0. 0dBFS means no amplification.
genrelist 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.
15 Rap
123 Acappella 19 Industrial 68 Rave
3 Dance
34 Acid 33 Instrumental 14 R&B
125 Dance Hall
74 Acid Jazz 46 Instrumental Pop 16 Reggae
50 Darkwave
73 Acid Punk 47 Instrumental Rock 76 Retro
22 Death Metal
99 Acoustic 8 Jazz
[Link] 5/11
4/8/2016 Detailed command-line switches
20 Alternative 4 Disco 29 Jazz+Funk 87 Revival
40 Alternative Rock 55 Dream 146 JPop 118 Rhythmic Soul
26 Ambient 127 Drum & Bass 63 Jungle 17 Rock
145 Anime 122 Drum Solo 86 Latin 78 Rock & Roll
90 Avantgarde 120 Duet 71 LoFi 143 Salsa
116 Ballad 98 Easy Listening 45 Meditative 114 Samba
41 Bass 52 Electronic 142 Merengue 110 Satire
135 Beat 48 Ethnic 9 Metal 69 Showtunes
85 Bebob 54 Eurodance 77 Musical 21 Ska
96 Big Band 124 EuroHouse 82 National Folk 111 Slow Jam
138 Black Metal 25 EuroTechno 64 Native US 95 Slow Rock
89 Bluegrass 84 Fast Fusion 133 Negerpunk 105 Sonata
0 Blues 80 Folk 10 New Age 42 Soul
107 Booty Bass 115 Folklore 66 New Wave 37 Sound Clip
132 BritPop 81 FolkRock 39 Noise 24 Soundtrack
65 Cabaret 119 Freestyle 11 Oldies 56 Southern Rock
88 Celtic 5 Funk 103 Opera 44 Space
104 Chamber Music 30 Fusion 12 Other 101 Speech
102 Chanson 36 Game 75 Polka 83 Swing
97 Chorus 59 Gangsta 134 Polsk Punk 94 Symphonic Rock
136 Christian Gangsta 126 Goa 13 Pop 106 Symphony
61 Christian Rap 38 Gospel 53 PopFolk 147 SynthPop
141 Christian Rock 49 Gothic 62 Pop/Funk 113 Tango
32 Classical 91 Gothic Rock 109 Porn Groove 18 Techno
1 Classic Rock 6 Grunge 117 Power Ballad 51 TechnoIndustrial
112 Club 129 Hardcore 23 Pranks 130 Terror
128 ClubHouse 79 Hard Rock 108 Primus 144 Thrash Metal
57 Comedy 137 Heavy Metal 92 Progressive Rock 60 Top 40
140 Contemporary Christian 7 HipHop 67 Psychedelic 70 Trailer
2 Country 35 House 93 Psychedelic Rock 31 Trance
139 Crossover 100 Humour 43 Punk 72 Tribal
58 Cult 131 Indie 121 Punk Rock 27 TripHop
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).
highpasswidth 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.
id3v1only 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.
id3v2only 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.
ignoretagerrors 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.
littleendian Set the byte order to littleendian.
This switch tells LAME that the RAW pcm input is encoded in littleendian. It is the default setting.
longhelp Shows the detailed help
Prints a help page with all of the commandline 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.
lowpasswidth width Set the width of the decaying curve.
[Link] 6/11
4/8/2016 Detailed command-line switches
lowpasswidth 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 m mono
m l get only the left channel of a stereo signal for a mono output
m r get only the right channel of a stereo signal for a mono output
m s forced L/R stereo
m j
/ automatic switch between L/R and M/S stereo
m a
m f forced mid/side stereo
m d dual (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. (Note: See comments about the a switch for RAW PCM streams)
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 (LR) 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. Its purpose was meant for
Dual language streams where only one of them should be decoded. Most decoders just decode them as a
stereo stream
Assume the input file is an MP1/2/3 file. LAME will decode the input file before reencoding 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 fadein/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: replaygainaccurate, replaygainfast
o nonoriginal
[Link] 7/11
4/8/2016 Detailed command-line switches
o nonoriginal
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.
padid3v2 Pad ID3v2 tag.
Index
page Pads the ID3v2 tag with extra 128bytes to allow it to expand.
preset x Enable one of the presets
About
LAME Setting Meaning
preset medium V 5 vbrold
Intro to
encoding preset standard V 2 vbrold
preset extreme V 0 vbrold
Usage preset insane b 320 vbrold
of LAME
In versions older than LAME 3.98, "fast" was needed to enable the vbrnew routine. It is no
preset fast xxx
longer needed.
Common
switches
preset number abr number
Detailed preset cbr number b number
Settings
Old compatibility settings. Meaningless
preset cd b 192
LAME
preset studio b 256
links
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:
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 vbrold modes, the following table applies
Use the best algorithms (Best Huffman coding search, full outer loop, and the highest precision of several
q 0
parameters).
Similar to q 0 without the full outer loop and with decreasing precision of parameters the further from q 0. q
q 1 to q 4
3 is the default
q 5 and q
Same as q 7, but enables noise shaping and increases subblock gain
6
[Link] 8/11
4/8/2016 Detailed command-line switches
q 7 to q 9 Same as f. Very fast, OK quality. Psychoacoustics are used for preecho and mid/side stereo, but no noise
shaping is done.
For the default VBR mode since LAME 3.98, the following table applies
q 0 to q 4 include all features of the other modes and additionally use the best search when applying Huffman coding.
q 7 to q 9 This level uses a psymodel but does not calculate quantisation noise when encoding: it takes a quick guess.
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.
replaygainaccurate Slightly more accurate ReplayGain analysis and finding the peak sample
Compute "Radio" ReplayGain on the decoded data stream. Find the peak sample by decoding on the fly the
encoded 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 [Link]
By default, LAME performs ReplayGain analysis on the input data (after the userspecified 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 replaygainaccurate 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:
tests have shown that the difference between the ReplayGain values computed on the input data and
decoded data is usually no greater than 0.5dB, although the minimum volume difference the human
ear can perceive is about 1.0dB
decoding on the fly significantly slows down the encoding process
The apparent advantage is that:
with replaygainaccurate the peak sample is determined and stored in the file. The knowledge of the
peak sample can be useful to decoders (players) to prevent a negative effect called 'clipping' that
introduces distortion into sound.
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 userspecified
volume scaling).
See also: replaygainfast, noreplaygain, clipdetect
replaygainfast Fast ReplayGain analysis
Compute "Radio" ReplayGain of the input data stream after userspecified 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 [Link]
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: replaygainaccurate, 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
[Link] 9/11
4/8/2016 Detailed command-line switches
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.
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.
spaceid3v1 Use spaces for padding.
Use spaces instead of null values for padding data in an ID3v1 tag.
strictlyenforceISO 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.
0=highest quality, bigger files. 9.999=lowest quality, smaller files. Decimal values can be specified, like:
4.51
On average, the resulting bitrates are as follows:
Setting Average bitrate (kbps)
0 245
2 190
3 175
4 165
5 130
Using V 7 or higher (lower quality) is not recommended. ABR usually produces better results.
vbrold Uses the old VBR method of encoding
Tells LAME to encode to VBR using the old (slower) method of encoding.
verbose Program verbosity
Print a lot of information on screen.
version Prints the license page
[Link] 10/11
4/8/2016 Detailed command-line switches
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
HTML markup and design by Roberto Amorim and Sebastian Mares. Logo by Sam Fisher.
[Link] 11/11