% lame [options] inputfile [outputfile]
=======================================================================
Examples:
=======================================================================
fixed bit rate jstereo 128kbs encoding:
% lame sample.wav sample.mp3
fixed bit rate jstereo 128kbs encoding, highest quality: (recommended)
% lame -h sample.wav sample.mp3
To disable joint stereo encoding (slightly faster, but less quality at bitrates<=128kbs)
% lame -m s sample.wav sample.mp3
Fast encode, low quality (no noise shaping)
% lame -f sample.wav sample.mp3
Variable Bitrate (VBR): (use -V n to adjust quality/filesize)
% lame -h -v sample.wav sample.mp3
Note: VBR is currently under heavy development. Right now it can
often result in too much compression. I would recommend using VBR
with a minimum bitrate of 112kbs. This will let LAME increase
the bitrate for difficult-to-encode frames, but prevent LAME from
being too aggressive for simple frames:
% lame -h -v -b 112 sample.wav sample.mp3
=======================================================================
LOW BITRATES
=======================================================================
At lower bitrates, (like 24kbs per channel), it is recommended that
you use a 16kHz sampling rate combined with lowpass filtering. LAME,
as well as commercial encoders (FhG, Xing) will do this automatically.
However, if you feel there is too much (or not enough) lowpass
filtering, you may need to try different values of the lowpass cutoff
and passband width (--resample, --lowpass and --lowpass-width options).
=======================================================================
STREAMING EXAMPLES
=======================================================================
% cat inputfile | lame [options] - - > output
=======================================================================
For more options, just type:
% lame --help
Scripts are included to run lame on multiple files:
bach script: mlame Run "mlame -h" for instructions.
sh script: auenc Run auenc for instructions
=======================================================================
options guide:
=======================================================================
These options are explained in detail below.
Quality related:
-m m/s/j/f mode selection
-k disable all filtering
-d allow block types to differ between channels
--athonly ignore psy-model output, only use masking from the ATH
--voice experimental voice encoding mode
--noshort disable short blocks
Constant Bit Rate (CBR)
-b n set bitrate (8,16,24,...,320)
-h higher quality but slower
-f disable noise shaping. Encodes faster, but lower quality
--freeformat produce a free format bitstream. User must also specify
a bitrate with -b, between 8 and 320 kbs.
Variable Bit Rate (VBR)
-v VBR
--vbr-old use old variable bitrate (VBR) routine
-V n VBR quality setting (0=highest quality, 9=lowest)
-b n specify a minimum allowed bitrate (8,16,24,...,320)
-B n specify a maximum allowed bitrate (8,16,24,...,320)
-F strictly enforce minimum bitrate
-t disable Xing VBR informational tag
--nohist disable display of VBR bitrate histogram
--abr n specify average bitrate desired
Experimental (undocumented): may work better or worse:
-X n try different quality measures (when comparing quantizations)
-Y
-Z
Operational:
-r assume input file is raw PCM
-s n input sampling frequency in kHz (for raw PCM input files)
--resample n output sampling frequency
--mp3input input file is an MP3 file. decode using mpglib/mpg123
--ogginput input file is an Ogg Vorbis file. decode using libvorbis
-x swap bytes of input file
-a downmix stereo input file to mono .mp3
-e n/5/c de-emphasis
-p add CRC error protection
-c mark the encoded file as copyrighted
-o mark the encoded file as a copy
-S don't print progress report, VBR histogram
-g run MP3x, the graphical frame analyzer
--strictly-enforce-ISO comply as much as possible to ISO MPEG spec
--decode assume input file is an mp3 file, and decode to wav.
-t disable writing of WAV header when using --decode
(decode to raw pcm, native endian format (use -x to swap))
--ogg Encode using Ogg Vorbis (.ogg) instead of mp3.
ID3 tagging:
--tt
audio/song title (max 30 chars for version 1 tag)
--ta audio/song artist (max 30 chars for version 1 tag)
--tl audio/song album (max 30 chars for version 1 tag)
--ty audio/song year of issue (1 to 9999)
--tc user-defined text (max 30 chars for v1 tag, 28 for v1.1)
--tn