Blame USAGE

Packit 47f805
Packit 47f805
% lame [options] inputfile [outputfile]
Packit 47f805
    inputfile and/or outputfile can be "-", which means stdin/stdout.
Packit 47f805
Packit 47f805
For more options, just type:
Packit 47f805
% lame --help  or lame --longhelp
Packit 47f805
Packit 47f805
Note: The HTML documentation is more complete than this text file.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Constant Bitrate Examples:
Packit 47f805
=======================================================================
Packit 47f805
fixed bit rate jstereo 128 kbps encoding:
Packit 47f805
% lame -b128 sample.wav  sample.mp3
Packit 47f805
Packit 47f805
Use highest quality mode, slowest:
Packit 47f805
% lame -q0 -b128 sample.wav  sample.mp3
Packit 47f805
Packit 47f805
Use fast encode, low quality  (no noise shaping)
Packit 47f805
% lame -f -b128 sample.wav  sample.mp3
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Variable Bitrate Examples:
Packit 47f805
=======================================================================
Packit 47f805
LAME has two types of variable bitrate: ABR and VBR.
Packit 47f805
Packit 47f805
ABR is the type of variable bitrate encoding usually found in other
Packit 47f805
MP3 encoders, Vorbis and AAC.  The number of bits is determined by
Packit 47f805
some metric (like perceptual entropy, or just the number of bits
Packit 47f805
needed for a certain set of encoding tables), and it is not based on
Packit 47f805
computing the actual encoding/quantization error.  ABR should always
Packit 47f805
give results equal or better than CBR:
Packit 47f805
Packit 47f805
ABR:   (--abr <x> means encode with an average bitrate of around x kbps)
Packit 47f805
% lame --abr 128  sample.wav sample.mp3
Packit 47f805
Packit 47f805
Another way to enable abr is:
Packit 47f805
% lame --preset 128 sample.wav sample.mp3
Packit 47f805
Packit 47f805
Packit 47f805
VBR is a true variable bitrate mode which bases the number of bits for
Packit 47f805
each frame on the measured quantization error relative to the
Packit 47f805
estimated allowed masking. The value 0 is the highest quality, which
Packit 47f805
creates bigger files, and the lowest is 9.999, which creates the smallest
Packit 47f805
files. Decimal values can be specified, like: 4.51.
Packit 47f805
The resulting filesizes depend on the input material. On typical music 
Packit 47f805
you can expect -V5 resulting in files averaging 132 kbps, -V2 averaging 
Packit 47f805
200 kbps.
Packit 47f805
Packit 47f805
Variable Bitrate (VBR): (use -V n to adjust quality/filesize)
Packit 47f805
% lame -V2 sample.wav sample.mp3
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Low Bitrates
Packit 47f805
=======================================================================
Packit 47f805
At lower bitrates, (like 24 kbps per channel), it is recommended that
Packit 47f805
you use a 16 kHz sampling rate combined with lowpass filtering.  LAME,
Packit 47f805
as well as commercial encoders (FhG, Xing) will do this automatically.
Packit 47f805
However, if you feel there is too much (or not enough) lowpass
Packit 47f805
filtering, you may need to try different values of the lowpass cutoff
Packit 47f805
and passband width (--resample, --lowpass and --lowpass-width options).
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Streaming Example
Packit 47f805
=======================================================================
Packit 47f805
Packit 47f805
% cat inputfile | lame [options] - - > output
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Scripts are included (in the 'misc' subdirectory)
Packit 47f805
to run lame on multiple files:
Packit 47f805
Packit 47f805
bash script:  mlame      Run "mlame -?" for instructions.
Packit 47f805
sh script:    auenc      Run auenc for instructions
Packit 47f805
sh script:    mugeco.sh
Packit 47f805
Packit 47f805
Perl script which will re-encode mp3 files and preserve id3 tags:
Packit 47f805
lameid3.pl
Packit 47f805
Packit 47f805
Windows scripts:
Packit 47f805
lame4dos.bat
Packit 47f805
Lame.vbs   (and an HTML frontend: LameGUI.html)
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
options guide:
Packit 47f805
=======================================================================
Packit 47f805
These options are explained in detail below.
Packit 47f805
Packit 47f805
By default, LAME accepts a PCM audio sample inside a .WAV container as the
Packit 47f805
input file, in 8, 16, 24 and 32 bits integer and in IEEE FLOAT.
Packit 47f805
If it is compiled with libsndfile, then it also supports the extra formats
Packit 47f805
that the library supports.
Packit 47f805
There is also support for raw PCM data and piped input
Packit 47f805
Packit 47f805
Packit 47f805
Input options:
Packit 47f805
--scale <arg>   multiply PCM input by <arg>
Packit 47f805
--scale-l <arg> scale channel 0 (left) input (multiply PCM data) by <arg>
Packit 47f805
--scale-r <arg> scale channel 1 (right) input (multiply PCM data) by <arg>
Packit 47f805
--gain number   apply Gain adjustment in decibels, range -20.0 to +12.0.
Packit 47f805
--swap-channel	Swap Left and Right input channels
Packit 47f805
--mp1input      input file is an MPEG 1 Layer I file.  decode on the fly
Packit 47f805
--mp2input      input file is an MPEG 1 Layer II file.  decode on the fly
Packit 47f805
--mp3input      input file is an MPEG 1 Layer III file.  decode on the fly
Packit 47f805
--nogap <file1> <file2> <...>
Packit 47f805
                gapless encoding for a set of contiguous files
Packit 47f805
--nogapout <dir>
Packit 47f805
                output dir for gapless encoding (must precede --nogap)
Packit 47f805
--nogaptags     allow the use of VBR tags in gapless encoding
Packit 47f805
--out-dir path	If no explicit output file is specified, a file will be
Packit 47f805
                written at given path. Ignored when using piped/streamed input
Packit 47f805
Packit 47f805
Packit 47f805
Input options for raw PCM:
Packit 47f805
-r              read the input file as a raw (headerless) PCM stream
Packit 47f805
-s  n           input sampling frequency in kHz (Default 44.1Khz)
Packit 47f805
--signed        input is signed (default)
Packit 47f805
--unsigned      input is unsigned
Packit 47f805
--bitwidth w    input bit width is w (default 16)
Packit 47f805
-x              swap bytes of input file
Packit 47f805
--little-endian input is little-endian (default)
Packit 47f805
--big-endian    input is big-endian
Packit 47f805
-a              downmix stereo file to mono file for mono encoding.
Packit 47f805
                Needed with raw input for the -mm mode to do the downmix.
Packit 47f805
Packit 47f805
Resampling and filtering:
Packit 47f805
--lowpass      Frequency(kHz), lowpass filter cutoff above freq.
Packit 47f805
               Range [0.001..50]kHz or [50..50000]Hz
Packit 47f805
--lowpass-width
Packit 47f805
               Frequency(kHz), lowpass window width.
Packit 47f805
			   Range [0.001..16]kHz or [16..50000]Hz
Packit 47f805
			   (See further restriction in the detailed explanation)
Packit 47f805
--highpass     Frequency(kHz), highpass filter cutoff below freq.
Packit 47f805
               Range [0.001..16]kHz or [16..50000]Hz
Packit 47f805
               (See further restriction in the detailed explanation)
Packit 47f805
--highpass-width
Packit 47f805
               Frequency(kHz), highpass window width
Packit 47f805
               (See further restriction in the detailed explanation)
Packit 47f805
--resample n   Sampling frequency of output file(kHz)
Packit 47f805
               Default=automatic depending on settings like bitrate.
Packit 47f805
	
Packit 47f805
Operational:
Packit 47f805
--preset type	Enables some preconfigured settings. Check below for each
Packit 47f805
                of the valid values
Packit 47f805
--decode        assume input file is an mp3 file, and decode to wav.
Packit 47f805
--decode-mp3delay samples
Packit 47f805
                Set the encoder delay to use to decode the input .mp3 file
Packit 47f805
-t              disable writing of WAV header when using --decode
Packit 47f805
                (decode to raw pcm, native endian format (use -x to swap))
Packit 47f805
Packit 47f805
-m m/s/j/f/a   mode selection
Packit 47f805
-q n           Internal algorithm quality setting 0..9.
Packit 47f805
               0 = slowest algorithms, but potentially highest quality
Packit 47f805
               9 = faster algorithms, very poor quality
Packit 47f805
			   Default is 3. Read the differences between VBR and CBR below.
Packit 47f805
-h             same as -q2
Packit 47f805
-f             same as -q7
Packit 47f805
Packit 47f805
--priority <type>
Packit 47f805
               sets the process priority (Windows and OS/2-specific):
Packit 47f805
                     0,1 = Low priority (IDLE_PRIORITY_CLASS)
Packit 47f805
                     2 = normal priority (NORMAL_PRIORITY_CLASS, defaul
Packit 47f805
                     3,4 = High priority (HIGH_PRIORITY_CLASS))
Packit 47f805
               Note: Calling '--priority' without a parameter will set it to 0.
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
Constant Bit Rate (CBR)
Packit 47f805
-b  n          set bitrate (8, 16, 24, ..., 320)
Packit 47f805
--freeformat   produce a free format bitstream.  User must also specify
Packit 47f805
               a bitrate with -b, between 8 and 640 kbps.
Packit 47f805
Packit 47f805
Variable Bit Rate (VBR)
Packit 47f805
-v             VBR  ( alias of -V 4 )
Packit 47f805
--vbr-old      use old variable bitrate (VBR) routine
Packit 47f805
--vbr-new      use new variable bitrate (VBR) routine (default)
Packit 47f805
-V n           VBR quality setting  (0=highest quality, 9.999=lowest)
Packit 47f805
-b  n          specify a minimum allowed bitrate (8,16,24,...,320)
Packit 47f805
-B  n          specify a maximum allowed bitrate (8,16,24,...,320)
Packit 47f805
-F             strictly enforce minimum bitrate
Packit 47f805
-t             disable VBR informational tag
Packit 47f805
--nohist       disable display of VBR bitrate histogram
Packit 47f805
Packit 47f805
--abr n        specify average bitrate desired
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
MP3 header/stream options:
Packit 47f805
-e  n/5/c       de-emphasis
Packit 47f805
-p              add CRC error protection
Packit 47f805
-c              mark the encoded file as copyrighted
Packit 47f805
-o              mark the encoded file as a copy
Packit 47f805
-S              don't print progress report, VBR histogram
Packit 47f805
--strictly-enforce-ISO   comply as much as possible to ISO MPEG spec
Packit 47f805
--replaygain-fast   compute RG fast but slightly inaccurately (default)
Packit 47f805
--replaygain-accurate   compute RG more accurately and find the peak sample
Packit 47f805
--noreplaygain  disable ReplayGain analysis
Packit 47f805
--clipdetect    enable --replaygain-accurate and print a message whether
Packit 47f805
                clipping occurs and how far the waveform is from full scale
Packit 47f805
Packit 47f805
Packit 47f805
ID3 tagging:
Packit 47f805
Packit 47f805
--tt <title>    audio/song title (max 30 chars for version 1 tag)
Packit 47f805
--ta <artist>   audio/song artist (max 30 chars for version 1 tag)
Packit 47f805
--tl <album>    audio/song album (max 30 chars for version 1 tag)
Packit 47f805
--ty <year>     audio/song year of issue (1 to 9999)
Packit 47f805
--tc <comment>  user-defined text (max 30 chars for v1 tag, 28 for v1.1)
Packit 47f805
--tn <track[/total]>
Packit 47f805
                audio/song track number (1 to 255, creates v1.1 tag.
Packit 47f805
                adding a total force a version 2 tag)
Packit 47f805
--tg <genre>    audio/song genre (name or number in list)
Packit 47f805
--ti <file>     audio/song albumArt (jpeg/png/gif file, v2.3 tag)
Packit 47f805
--tv <id=value> user-defined frame specified by id and value (v2.3 tag)
Packit 47f805
--add-id3v2     force addition of version 2 tag
Packit 47f805
--id3v1-only    add only a version 1 tag
Packit 47f805
--id3v2-only    add only a version 2 tag
Packit 47f805
--id3v2-utf16   add following options in unicode text encoding
Packit 47f805
--id3v2-latin1  add following options in latin-1 text encoding
Packit 47f805
--space-id3v1   pad version 1 tag with spaces instead of nulls
Packit 47f805
--pad-id3v2     same as '--pad-id3v2-size 128'
Packit 47f805
--pad-id3v2-size <num>
Packit 47f805
                adds version 2 tag, pad with extra <num> bytes
Packit 47f805
--genre-list    print alphabetically sorted ID3 genre list and exit
Packit 47f805
--ignore-tag-errors
Packit 47f805
                ignore errors in values passed for tags
Packit 47f805
Packit 47f805
Note: A version 2 tag will NOT be added unless one of the input fields
Packit 47f805
won't fit in a version 1 tag (e.g. the title string is longer than 30
Packit 47f805
characters), or the '--add-id3v2' or '--id3v2-only' options are used,
Packit 47f805
or output is redirected to stdout.
Packit 47f805
Packit 47f805
Packit 47f805
Verbosity:
Packit 47f805
--disptime     secs	Print progress report every secs seconds
Packit 47f805
--nohist	   Disable VBR histogram display
Packit 47f805
--silent       Don't print anything on screen
Packit 47f805
--quiet        Don't print anything on screen
Packit 47f805
--verbose	   Print a lot of useful information
Packit 47f805
--version      Print License information
Packit 47f805
--license	   Print License information
Packit 47f805
--help         Shows the common list of switches.
Packit 47f805
               Add id3 or dev to get help for a specified topic
Packit 47f805
--usage        Shows the common list of switches.
Packit 47f805
               Add id3 or dev to get help for a specified topic
Packit 47f805
--longhelp     Shows the complete list of switches
Packit 47f805
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Detailed description of all options in alphabetical order
Packit 47f805
=======================================================================
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Downmix
Packit 47f805
=======================================================================
Packit 47f805
-a
Packit 47f805
Packit 47f805
mix the stereo input file to mono and encode as mono.
Packit 47f805
Packit 47f805
This option is only needed in the case of raw PCM stereo input
Packit 47f805
(because LAME cannot determine the number of channels in the input file).
Packit 47f805
To encode a stereo (RAW) PCM input file as mono, use "lame -m m -a"
Packit 47f805
Packit 47f805
For WAV and AIFF input files, using "-m m" will always produce a
Packit 47f805
mono .mp3 file from both mono and stereo input.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Average bitrate encoding (aka Safe VBR)
Packit 47f805
=======================================================================
Packit 47f805
--abr n
Packit 47f805
Packit 47f805
turns on encoding with a targeted average bitrate of n kbps, allowing
Packit 47f805
to use frames of different sizes.  The allowed range of n is 8...320
Packit 47f805
kbps, you can use any integer value within that range.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Use version 2 of the ID3 tag standard
Packit 47f805
=======================================================================
Packit 47f805
 --add-id3v2 Force addition of version 2 tag
Packit 47f805
Packit 47f805
Tells LAME to add the tag information as id3v2. This implies adding both,
Packit 47f805
a version 1 and a version 2 tag, if the values fit on a version 1 tag.
Packit 47f805
See --id3v1-only and --id3v2-only if you want a more fine-grained control.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Bitrate
Packit 47f805
=======================================================================
Packit 47f805
-b  n
Packit 47f805
Packit 47f805
MPEG-1   layer III sample frequencies (kHz):  32  48  44.1
Packit 47f805
bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
Packit 47f805
Packit 47f805
MPEG-2   layer III sample frequencies (kHz):  16  24  22.05
Packit 47f805
bitrates (kbps):  8 16 24 32 40 48 56 64 80 96 112 128 144 160
Packit 47f805
Packit 47f805
MPEG-2.5 layer III sample frequencies (kHz):   8  12  11.025
Packit 47f805
bitrates (kbps):  8 16 24 32 40 48 56 64
Packit 47f805
Packit 47f805
The bitrate to be used.  Default is 128kbps in MPEG1 (64 for mono),
Packit 47f805
64kbps in MPEG2 (32 for mono) and 32kbps in MPEG2.5 (16 for mono).
Packit 47f805
Packit 47f805
When used with variable bitrate encodings (VBR), -b specifies the
Packit 47f805
minimum bitrate to use.  This is useful only if you need to circumvent
Packit 47f805
a buggy hardware device with strange bitrate constrains.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Max bitrate
Packit 47f805
=======================================================================
Packit 47f805
-B  n
Packit 47f805
Packit 47f805
see also option "-b" for allowed bitrates.
Packit 47f805
Packit 47f805
Maximum allowed bitrate when using VBR/ABR.
Packit 47f805
Packit 47f805
Using -B is NOT RECOMMENDED.  A 128 kbps CBR bitstream, because of the
Packit 47f805
bit reservoir, can actually have frames which use as many bits as a
Packit 47f805
320 kbps frame.  ABR/VBR modes minimize the use of the bit reservoir, and
Packit 47f805
thus need to allow 320 kbps frames to get the same flexability as CBR
Packit 47f805
streams.  This is useful only if you need to circumvent a buggy hardware
Packit 47f805
device with strange bitrate constrains.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Endianess, big.
Packit 47f805
=======================================================================
Packit 47f805
 --big-endian Set the byte order to big-endian.
Packit 47f805
Packit 47f805
This switch tells LAME that the RAW pcm input is encoded in big-endian
Packit 47f805
instead of little-endian.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Sample bit with
Packit 47f805
=======================================================================
Packit 47f805
--bitwidth Sets the bitwidth value
Packit 47f805
Packit 47f805
With RAW pcm input, this switch lets you specify the bitwidth of the same
Packit 47f805
(8 bits, 16 bits...)
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Copyright
Packit 47f805
=======================================================================
Packit 47f805
-c
Packit 47f805
Packit 47f805
flag the encoded file as copyrighted
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Clipping detection
Packit 47f805
=======================================================================
Packit 47f805
--clipdetect
Packit 47f805
Packit 47f805
Enable --replaygain-accurate and print a message whether clipping
Packit 47f805
occurs and how far in dB the waveform is from full scale.
Packit 47f805
Packit 47f805
This option is not usable if the MP3 decoder was _explicitly_ disabled
Packit 47f805
in the build of LAME.
Packit 47f805
Packit 47f805
See also: --replaygain-accurate
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
MPEG audio decode capability
Packit 47f805
=======================================================================
Packit 47f805
--decode
Packit 47f805
Packit 47f805
This uses LAME's HIP decoder to decode an MP3 file (layers 1, 2 and 3) to
Packit 47f805
a wav file.
Packit 47f805
Packit 47f805
If -t is used (disable wav header), LAME will output
Packit 47f805
raw pcm in native endian format (use -x to swap bytes).
Packit 47f805
Packit 47f805
This option is not usable if the MP3 decoder was _explicitly_ disabled
Packit 47f805
in the build of LAME.
Packit 47f805
Packit 47f805
HIP stands for Hip Isn't a Player and is based off of Michael Hipp's mpglib 0.2a
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
MPEG audio decode capability
Packit 47f805
=======================================================================
Packit 47f805
--decode-mp3delay x Indicate a different encoder delay for decoding
Packit 47f805
Packit 47f805
When decoding an mp3 file, LAME automatically corrects for the start delay
Packit 47f805
that the encoder had to put into it. This setting lets you specify a different
Packit 47f805
delay than LAME's own one, so that it is possible to compensate for the delay
Packit 47f805
of mp3's generated with other encoders.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
De-emphasis
Packit 47f805
=======================================================================
Packit 47f805
-e  n/5/c
Packit 47f805
Packit 47f805
  n = (none, default)
Packit 47f805
  5 = 0/15 microseconds
Packit 47f805
  c = CCITT j.17
Packit 47f805
Packit 47f805
All this does is set a flag in the bitstream.  If you have a PCM
Packit 47f805
input file where one of the above types of (obsolete) emphasis has
Packit 47f805
been applied, you can set this flag in LAME.  Then the mp3 decoder
Packit 47f805
should de-emphasize the output during playback, although most
Packit 47f805
decoders ignore this flag.
Packit 47f805
Packit 47f805
A better solution would be to apply the de-emphasis with a standalone
Packit 47f805
utility before encoding, and then encode without -e.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Strictly enforce VBR minimum bitrate
Packit 47f805
=======================================================================
Packit 47f805
-F
Packit 47f805
Packit 47f805
strictly enforce VBR minimum bitrate.   Without this option, passages of
Packit 47f805
analog silence will be encoded at the minimum bitrate possible (32 or 8,
Packit 47f805
depending on MPEG version).
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Free format bitstreams
Packit 47f805
=======================================================================
Packit 47f805
--freeformat
Packit 47f805
Packit 47f805
LAME will produce a fixed bitrate, free format bitstream. User must 
Packit 47f805
specify the desired bitrate in kbps, which can be any integer between 
Packit 47f805
8 and 640.
Packit 47f805
Packit 47f805
Not supported by most decoders.  Complient decoders (of which there
Packit 47f805
are few) are only required to support up to 320 kbps.
Packit 47f805
Packit 47f805
Decoders known to handle free format:
Packit 47f805
Packit 47f805
                      supports up to
Packit 47f805
mpg123                   640 kbps
Packit 47f805
MAD                      640 kbps
Packit 47f805
"lame --decode"          640 kbps
Packit 47f805
l3dec                    310 kbps
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Gain
Packit 47f805
=======================================================================
Packit 47f805
--gain Apply gain in decibels.
Packit 47f805
Packit 47f805
Apply Gain adjustment in decibels, range -20.0 to +12.0. 0dBFS means no 
Packit 47f805
amplification.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
High pass filter
Packit 47f805
=======================================================================
Packit 47f805
--highpass number Use a highpass filter when encoding
Packit 47f805
Packit 47f805
Enables a highpass filter of the specified frequency when encoding the source.
Packit 47f805
    Range [0.001..50]kHz or [50..50000]Hz.
Packit 47f805
This is usually not required, and the gains are usually minimal. May be useful
Packit 47f805
to remove an interference signal on 50Hz or 60Hz, or a DC offset.
Packit 47f805
(default: disabled)
Packit 47f805
Note: The current implementation has a minimum highpass frequency of
Packit 47f805
(67.5/62)% of the sample rate (I.e. 481Hz at 44Khz).
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
High pass filter
Packit 47f805
=======================================================================
Packit 47f805
--highpass-width width Set the width of the decaying curve.
Packit 47f805
Packit 47f805
Specify the width in Hz of the decaying curve of the highpass.
Packit 47f805
    Range [16..50000]Hz
Packit 47f805
The minimum (and default) width is 75% of a band's width (which is 1/64th of
Packit 47f805
 the sample rate).
Packit 47f805
Note: See the remark in the --highpass command above.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
ID3 tag modes
Packit 47f805
=======================================================================
Packit 47f805
--id3v1-only Disable the use of id3v2.
Packit 47f805
Packit 47f805
Put it before any tag setting.
Packit 47f805
This setting tells LAME to use ID3 v1 tag only, and not create an ID3v2
Packit 47f805
even if it thinks it should.
Packit 47f805
Packit 47f805
--id3v2-only Disable the user ov id3v1.
Packit 47f805
Packit 47f805
Put it before any tag setting.
Packit 47f805
This setting tells LAME to use ID3 v2 tag only. An ID3 v1 tag would not
Packit 47f805
be written.
Packit 47f805
Packit 47f805
--ignore-tag-errors Ignore tag information errors
Packit 47f805
Packit 47f805
Put it before any tag setting.
Packit 47f805
This tells lame to ignore the tag information it sees as erroneous and 
Packit 47f805
continue encoding without those. Without this setting, errors are reported
Packit 47f805
and encoding does not start.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Endianess. little
Packit 47f805
=======================================================================
Packit 47f805
--little-endian Set the byte order to little-endian.
Packit 47f805
Packit 47f805
This switch tells LAME that the RAW pcm input is encoded in little-endian.
Packit 47f805
It is the default setting.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Low pass filter
Packit 47f805
=======================================================================
Packit 47f805
--lowpass number Use a lowpass filter when encoding
Packit 47f805
Packit 47f805
Enables a lowpass filter of the specified frequency when encoding the source.
Packit 47f805
    Range [0.001..50]kHz or [50..50000]Hz
Packit 47f805
Packit 47f805
Using a lowpass filter helps reducing the amount of data to encode. This is
Packit 47f805
important in MP3 due to a limitation in very high frequencies (>16Khz).
Packit 47f805
The default value depends on the target bitrate/quality. It is not recommended
Packit 47f805
to change it as a general basis.
Packit 47f805
Packit 47f805
--lowpass-width width Set the width of the decaying curve.
Packit 47f805
Packit 47f805
Specify the width in Hz of the decaying curve of the lowpass.
Packit 47f805
    Range [0.001..16]kHz or [16..50000]Hz
Packit 47f805
The lowpass is in the center of this curve. The minimum (and default) width
Packit 47f805
is 75% of a band's width (which is 1/64th of the sample rate).
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Modes:
Packit 47f805
=======================================================================
Packit 47f805
-m m        mono
Packit 47f805
-m l	    get only the left channel of a stereo signal for a mono output
Packit 47f805
-m r	    get only the right channel of a stereo signal for a mono output
Packit 47f805
-m s        (forced) L/R stereo
Packit 47f805
-m j        joint stereo
Packit 47f805
-m f        forced mid/side stereo
Packit 47f805
-m d        dual (independent) channels. Its purpose was meant for dual language
Packit 47f805
            streams where only one of them should be decoded.
Packit 47f805
			Most decoders just decode them as a stereo stream.
Packit 47f805
-m a        Currently, a synonym of m j. (In older releases it selected
Packit 47f805
            different modes depending on the bitrate)
Packit 47f805
Packit 47f805
MONO is the default mode for mono input files.  If "-m m" is specified
Packit 47f805
for a stereo input file, the two channels will be averaged into a mono
Packit 47f805
signal.  (Note: See comments about the -a switch for RAW PCM streams)
Packit 47f805
Packit 47f805
(FORCED) L/R STEREO encodes the left and the right signals independently,
Packit 47f805
and gives more or less bits to each, depending on the currently available.
Packit 47f805
Packit 47f805
JOINT STEREO is the default mode of encoding.
Packit 47f805
jstereo means the encoder can use (on a frame by frame basis) either
Packit 47f805
L/R stereo or mid/side stereo.  In mid/side stereo, the mid(L+R) and side(L-R)
Packit 47f805
channels are encoded, and more bits are allocated to the mid channel
Packit 47f805
than the side channel.  When there isn't too much stereo separation, this
Packit 47f805
effectively increases the bandwidth, so having higher quality with the same
Packit 47f805
amount of bits.
Packit 47f805
Packit 47f805
Using mid/side stereo inappropriately can result in audible
Packit 47f805
compression artifacts.  Too much switching between mid/side and L/R
Packit 47f805
stereo can also sound bad. To determine when to switch to mid/side
Packit 47f805
stereo, LAME uses a much more sophisticated algorithm than that
Packit 47f805
described in the ISO documentation.
Packit 47f805
Packit 47f805
FORCED MID/SIDE STEREO forces all frames to be encoded mid/side stereo.  It
Packit 47f805
should only be used if you are sure every frame of the input file
Packit 47f805
has very little stereo seperation.
Packit 47f805
Packit 47f805
DUAL CHANNEL mode is similar to encode the left and right as two mono signals.
Packit 47f805
Its purpose was meant for Dual language streams where only one of them should
Packit 47f805
be decoded. Most decoders just decode them as a stereo stream
Packit 47f805
Packit 47f805
INTENSITY STEREO
Packit 47f805
	Not supported.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
MP3 input file
Packit 47f805
=======================================================================
Packit 47f805
--mp1input --mp2input --mp3input MPEG layer I, II or III input file
Packit 47f805
Packit 47f805
Assume the input file is a MP1/2/3 file.  LAME will decode the input file
Packit 47f805
before re-encoding it.  Since MP3 is a lossy format, this is not recommended 
Packit 47f805
in general.  But it is useful for creating low bitrate mp3s from high bitrate 
Packit 47f805
mp3s.  If the filename ends in ".mp3" LAME will assume it is an MP3.  For 
Packit 47f805
stdin or MP3 files which dont end in .mp3 you need to use this switch.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
No Gap (continuous audio) encoding of multiple files
Packit 47f805
=======================================================================
Packit 47f805
 --nogap file1 file2 [...] Encodes multiple continuous files.
Packit 47f805
Packit 47f805
Encodes multiple files (ordered by position) which are meant to be played
Packit 47f805
gaplessly.
Packit 47f805
Packit 47f805
By default, LAME will encode the files with accurate length, but the first
Packit 47f805
and last frame may contain a few erroneous samples for signals that don't
Packit 47f805
fade-in/out (as is the case of continuous playback).
Packit 47f805
Packit 47f805
This setting solves that by using the samples from the next/previous file to
Packit 47f805
compute the encoding.
Packit 47f805
Packit 47f805
--nogapout dir Specify a directory for the output of the files encoded
Packit 47f805
               with --nogap
Packit 47f805
Packit 47f805
This setting should precede --nogap, and is used to specify the alternate
Packit 47f805
directory where to store the encoded files. The default one is the input file
Packit 47f805
directory.
Packit 47f805
Packit 47f805
--nogaptags Enables the use of VBR tags with files encoded with --nogap
Packit 47f805
Packit 47f805
Tells LAME to put VBR tags to encoded files if they are encoded in VBR or ABR
Packit 47f805
modes. Else, using the --nogap option doesn't generate it.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Disable historgram display
Packit 47f805
=======================================================================
Packit 47f805
--nohist
Packit 47f805
Packit 47f805
By default, LAME will display a bitrate histogram while producing
Packit 47f805
VBR mp3 files.  This will disable that feature.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Disable ReplayGain analysis
Packit 47f805
=======================================================================
Packit 47f805
--noreplaygain
Packit 47f805
Packit 47f805
By default ReplayGain analysis is enabled. This switch disables it.
Packit 47f805
Packit 47f805
See also: --replaygain-accurate, --replaygain-fast
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Non-original
Packit 47f805
=======================================================================
Packit 47f805
-o
Packit 47f805
Packit 47f805
mark the encoded file as a copy
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
CRC error protection
Packit 47f805
=======================================================================
Packit 47f805
-p
Packit 47f805
Packit 47f805
Turn on CRC error protection.
Packit 47f805
It will add a cyclic redundancy check (CRC) code in each frame, allowing
Packit 47f805
to detect transmission errors that could occur on the MP3 stream. However,
Packit 47f805
it takes 16 bits per frame that would otherwise be used for encoding, and
Packit 47f805
therefore will slightly reduce the sound quality.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
ID3 V2 padding
Packit 47f805
=======================================================================
Packit 47f805
 --pad-id3v2 Pad ID3v2 tag.
Packit 47f805
Packit 47f805
Pads the ID3v2 tag with extra 128bytes to allow it to expand.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Preset system.
Packit 47f805
=======================================================================
Packit 47f805
--preset x Enable one of the presets
Packit 47f805
Packit 47f805
   Setting         Meaning
Packit 47f805
--preset medium	   -V 5
Packit 47f805
--preset standard  -V 2
Packit 47f805
--preset extreme   -V 0
Packit 47f805
--preset insane    -b 320
Packit 47f805
--preset fast xxx  In versions older than LAME 3.98, "fast" was needed to
Packit 47f805
                   enable the vbr-new routine. It is no longer needed.
Packit 47f805
--preset number	   --abr number
Packit 47f805
--preset cbr number	-b number
Packit 47f805
Packit 47f805
Old compatibility settings. Meaningless
Packit 47f805
--preset phone	   -b 16 -m m
Packit 47f805
--preset phon+ /
Packit 47f805
      lw / mw-eu   -b 24 -m m
Packit 47f805
--preset mw-us     -b 40 -m m
Packit 47f805
--preset voice     -b 56 -m m
Packit 47f805
--preset fm / radio -b 112
Packit 47f805
--preset hifi      -b 160
Packit 47f805
--preset cd        -b 192
Packit 47f805
--preset studio    -b 256
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Windows and OS/2 process priority control
Packit 47f805
=======================================================================
Packit 47f805
--priority <type>
Packit 47f805
Packit 47f805
(Windows and OS/2 only)
Packit 47f805
Packit 47f805
Sets the process priority for LAME while running under Windows or IBM OS/2.
Packit 47f805
This can be very useful to avoid the system becoming slow and/or unresponsive. 
Packit 47f805
By setting LAME to run in a lower priority, you leave more time for the system 
Packit 47f805
to update basic processing (drawing windows, polling keyboard/mouse, etc). The 
Packit 47f805
impact in LAME's performance is minimal if you use priority 0 to 2.
Packit 47f805
Packit 47f805
The valid parameters are:
Packit 47f805
Packit 47f805
     0 = Low priority (IDLE, delta = 0)
Packit 47f805
     1 = Medium priority (IDLE, delta = +31)
Packit 47f805
     2 = Regular priority (REGULAR, delta = -31)
Packit 47f805
     3 = High priority (REGULAR, delta = 0)
Packit 47f805
     4 = Maximum priority (REGULAR, delta = +31)
Packit 47f805
Packit 47f805
Note that if you call '--priority' without a parameter, priority 0 will be 
Packit 47f805
assumed.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Algorithm quality selection
Packit 47f805
=======================================================================
Packit 47f805
-q n
Packit 47f805
Packit 47f805
Bitrate is of course the main influence on quality. The higher the bitrate,
Packit 47f805
the higher the quality. But for a given bitrate, we have a choice of algorithms
Packit 47f805
to determine the best scalefactors and Huffman coding (noise shaping).
Packit 47f805
Packit 47f805
For CBR, ABR and --vbr-old modes, the following table applies
Packit 47f805
Packit 47f805
-q 0            Use the best algorithms (Best Huffman coding search, full outer
Packit 47f805
                loop, and the highest precision of several parameters).
Packit 47f805
-q 1 to -q 4    Similar to -q 0 without the full outer loop and decreasing
Packit 47f805
                precision of parameters the further from q0. -q 3 is the default
Packit 47f805
-q 5 and -q 6   Same as -q 7, but enables noise shaping and increases subblock
Packit 47f805
                gain
Packit 47f805
-q 7 to -q 9    Same as -f. Very fast, OK quality. Psychoacoustics are used for
Packit 47f805
                pre-echo and mid/side stereo, but no noise-shaping is done.
Packit 47f805
Packit 47f805
For the default VBR mode since LAME 3.98, the following table applies
Packit 47f805
Packit 47f805
-q 0 to -q 4    include all features of the other modes and additionally use
Packit 47f805
                the best search when applying Huffman coding.
Packit 47f805
-q 5 and -q 6   include all features of -q7, calculate and consider actual
Packit 47f805
                quantisation noise, and additionally enable subblock gain.
Packit 47f805
-q 7 to -q 9    This level uses a psymodel but does not calculate quantisation
Packit 47f805
                noise when encoding: it takes a quick guess.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Input file is raw pcm
Packit 47f805
=======================================================================
Packit 47f805
-r
Packit 47f805
Packit 47f805
Assume the input file is raw pcm.  Sampling rate and mono/stereo/jstereo
Packit 47f805
must be specified on the command line.  Without -r, LAME will perform
Packit 47f805
several fseek()'s on the input file looking for WAV and AIFF headers.
Packit 47f805
Packit 47f805
Not supported if LAME is compiled to use LIBSNDFILE.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Slightly more accurate ReplayGain analysis and finding the peak sample
Packit 47f805
=======================================================================
Packit 47f805
--replaygain-accurate
Packit 47f805
Packit 47f805
Compute "Radio" ReplayGain on the decoded data stream. Find the peak sample
Packit 47f805
by decoding on the fly the encoded data stream and store it in the file.
Packit 47f805
Packit 47f805
Packit 47f805
ReplayGain analysis does _not_ affect the content of a compressed data
Packit 47f805
stream itself, it is a value stored in the header of a sound file.
Packit 47f805
Information on the purpose of ReplayGain and the algorithms used is
Packit 47f805
available from http://www.replaygain.org/
Packit 47f805
Packit 47f805
By default, LAME performs ReplayGain analysis on the input data (after
Packit 47f805
the user-specified volume scaling). This behaviour might give slightly
Packit 47f805
inaccurate results because the data on the output of a lossy
Packit 47f805
compression/decompression sequence differs from the initial input data.
Packit 47f805
When --replaygain-accurate is specified the mp3 stream gets decoded on
Packit 47f805
the fly and the analysis is performed on the decoded data stream.
Packit 47f805
Although theoretically this method gives more accurate results, it has
Packit 47f805
several disadvantages:
Packit 47f805
  * tests have shown that the difference between the ReplayGain values
Packit 47f805
    computed on the input data and decoded data is usually no greater
Packit 47f805
    than 0.5dB, although the minimum volume difference the human ear
Packit 47f805
    can perceive is about 1.0dB
Packit 47f805
  * decoding on the fly significantly slows down the encoding process
Packit 47f805
The apparent advantage is that:
Packit 47f805
  * with --replaygain-accurate the peak sample is determined and
Packit 47f805
    stored in the file. The knowledge of the peak sample can be useful
Packit 47f805
    to decoders (players) to prevent a negative effect called 'clipping'
Packit 47f805
    that introduces distortion into sound.
Packit 47f805
Packit 47f805
Packit 47f805
Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag.
Packit 47f805
The analysis is performed with the reference volume equal to 89dB.
Packit 47f805
Note: the reference volume has been changed from 83dB on transition from 
Packit 47f805
version 3.95 to 3.95.1.
Packit 47f805
Packit 47f805
This option is not usable if the MP3 decoder was _explicitly_ disabled
Packit 47f805
in the build of LAME. (Note: if LAME is compiled without the MP3 decoder,
Packit 47f805
ReplayGain analysis is performed on the input data after user-specified
Packit 47f805
volume scaling).
Packit 47f805
Packit 47f805
See also: --replaygain-fast, --noreplaygain, --clipdetect
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Fast ReplayGain analysis
Packit 47f805
=======================================================================
Packit 47f805
--replaygain-fast
Packit 47f805
Packit 47f805
Compute "Radio" ReplayGain of the input data stream after user-specified
Packit 47f805
volume scaling and/or resampling.
Packit 47f805
Packit 47f805
ReplayGain analysis does _not_ affect the content of a compressed data
Packit 47f805
stream itself, it is a value stored in the header of a sound file.
Packit 47f805
Information on the purpose of ReplayGain and the algorithms used is
Packit 47f805
available from http://www.replaygain.org/
Packit 47f805
Packit 47f805
Only the "Radio" ReplayGain value is computed. It is stored in the LAME tag.
Packit 47f805
The analysis is performed with the reference volume equal to 89dB.
Packit 47f805
Note: the reference volume has been changed from 83dB on transition
Packit 47f805
from version 3.95 to 3.95.1.
Packit 47f805
Packit 47f805
This switch is enabled by default.
Packit 47f805
Packit 47f805
See also: --replaygain-accurate, --noreplaygain
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Output sampling frequency in kHz
Packit 47f805
=======================================================================
Packit 47f805
--resample  n
Packit 47f805
Packit 47f805
where n = 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48. The values as Hz
Packit 47f805
instead of Khz are also supported. Else, the value will be ignored.
Packit 47f805
Packit 47f805
Output sampling frequency.  Resample the input if necessary.
Packit 47f805
Packit 47f805
If not specified, LAME may sometimes resample automatically
Packit 47f805
when faced with extreme compression conditions (like encoding
Packit 47f805
a 44.1 kHz input file at 32 kbps).  To disable this automatic
Packit 47f805
resampling, you have to use --resamle to set the output samplerate
Packit 47f805
equal to the input samplerate.  In that case, LAME will not
Packit 47f805
perform any extra computations.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Sampling frequency in kHz (for input RAW PCM)
Packit 47f805
=======================================================================
Packit 47f805
-s  n
Packit 47f805
Packit 47f805
where n = sampling rate in kHz.
Packit 47f805
Packit 47f805
Required for raw PCM input files.  Otherwise it will be determined
Packit 47f805
from the header information in the input file.
Packit 47f805
Packit 47f805
LAME will automatically resample the input file to one of the
Packit 47f805
supported MP3 samplerates if necessary.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Silent operation
Packit 47f805
=======================================================================
Packit 47f805
-S
Packit 47f805
Packit 47f805
don't print progress report
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Scale
Packit 47f805
=======================================================================
Packit 47f805
--scale <arg>
Packit 47f805
Packit 47f805
Scales input by <arg>.  This just multiplies the PCM data
Packit 47f805
(after it has been converted to floating point) by <arg>.
Packit 47f805
Packit 47f805
<arg> > 1:  increase volume
Packit 47f805
<arg> = 1:  no effect
Packit 47f805
<arg> < 1:  reduce volume
Packit 47f805
Packit 47f805
Use with care, since most MP3 decoders will truncate data
Packit 47f805
which decodes to values greater than 32768.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Strict ISO complience
Packit 47f805
=======================================================================
Packit 47f805
--strictly-enforce-ISO
Packit 47f805
Packit 47f805
With this option, LAME will enforce the 7680 bit limitation on
Packit 47f805
total frame size.  This results in many wasted bits for
Packit 47f805
high bitrate encodings.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Disable VBR tag/WAV header
Packit 47f805
=======================================================================
Packit 47f805
-t
Packit 47f805
This setting has two different uses:
Packit 47f805
Packit 47f805
When encoding to VBR, this setting disables writing the VBR Tag (also
Packit 47f805
known as XING tag). This tag is embedded by default in the frame 0 of
Packit 47f805
MP3 file. It allows VBR aware players to accurately seek and compute playing
Packit 47f805
times in such files.
Packit 47f805
Packit 47f805
When decoding MP3 to WAV using --decode, this flag will disable writing the
Packit 47f805
WAV header. The output will be raw pcm, native endian format. Use -x to swap
Packit 47f805
bytes.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
VBR quality setting
Packit 47f805
=======================================================================
Packit 47f805
 -V n Enable VBR encoding
Packit 47f805
Packit 47f805
Encodes using the VBR algorithm, at the indicated quality.
Packit 47f805
0=highest quality, bigger files. 9.999=lowest quality, smaller files.
Packit 47f805
Decimal values can be specified, like: 4.51
Packit 47f805
Packit 47f805
On average, the resulting bitrates are as follows:
Packit 47f805
Setting       Average bitrate (kbps)
Packit 47f805
    0             245
Packit 47f805
    2             190
Packit 47f805
    3             175
Packit 47f805
    4             165
Packit 47f805
    5             130
Packit 47f805
Packit 47f805
Using -V 7 or higher (lower quality) is not recommended.
Packit 47f805
ABR usually produces better results.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Swap bytes
Packit 47f805
=======================================================================
Packit 47f805
-x
Packit 47f805
Packit 47f805
swap bytes in the input file (and output file when using --decode).
Packit 47f805
For sorting out little endian/big endian type problems.  If your encodings 
Packit 47f805
sound like static, try this first.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Ignore scalefactor band 21
Packit 47f805
=======================================================================
Packit 47f805
-Y Ignore noise in sbf21, like CBR mode does
Packit 47f805
Packit 47f805
Allows -V2, -V1 and -V0 to not encode the highest frequencies accurately,
Packit 47f805
if doing so causes disproportional increases in bitrate.
Packit 47f805
This is the same that CBR and ABR modes do.
Packit 47f805
Packit 47f805
Due to the design of the MP3 format, to keep precision in the last scalefactor
Packit 47f805
band, an encoder needs to increase the precision in all the bands (not only in
Packit 47f805
this one).
Packit 47f805
The consequence is an increase of bitrate (+60kbps in some cases) compared to
Packit 47f805
not keeping that precision. Generally, this band should allow for distortions,
Packit 47f805
so using this switch shouldn't cause harm.
Packit 47f805