⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usage.txt

📁 LAME无疑是目前最优秀的MP3编码软件
💻 TXT
📖 第 1 页 / 共 3 页
字号:

% lame [options] inputfile [outputfile]

For more options, just type:
% lame --help


=======================================================================
Constant Bitrate Examples:
=======================================================================
fixed bit rate jstereo 128 kbps encoding:
% lame sample.wav  sample.mp3      

fixed bit rate jstereo 128 kbps encoding, higher quality:  (recommended)
% lame -h sample.wav  sample.mp3      

Fast encode, low quality  (no noise shaping)
% lame -f sample.wav  sample.mp3     

=======================================================================
Variable Bitrate Examples:
=======================================================================
LAME has two types of variable bitrate: ABR and VBR.

ABR is the type of variable bitrate encoding usually found in other
MP3 encoders, Vorbis and AAC.  The number of bits is determined by
some metric (like perceptual entropy, or just the number of bits
needed for a certain set of encoding tables), and it is not based on
computing the actual encoding/quantization error.  ABR should always
give results equal or better than CBR:

ABR:   (--abr <x> means encode with an average bitrate of around x kbps)
lame -h --abr 128  sample.wav sample.mp3


VBR is a true variable bitrate mode which bases the number of bits for
each frame on the measured quantization error relative to the
estimated allowed masking.  VBR is currently under heavy development.
It can on occasion result in too much compression, so it should be
used with a minimum bitrate of 112 kbps.  This will let LAME increase
the bitrate for difficult-to-encode frames, but prevent LAME from
being too aggressive for simple frames:

Variable Bitrate (VBR): (use -V n to adjust quality/filesize)
% lame -h -v -b 112 sample.wav sample.mp3



=======================================================================
LOW BITRATES
=======================================================================
At lower bitrates, (like 24 kbps per channel), it is recommended that
you use a 16 kHz 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




=======================================================================
Scripts are included (in the 'misc' subdirectory)
to run lame on multiple files:

bach script:  mlame     Run "mlame -?" for instructions.
sh script:    auenc     Run auenc for instructions
sh script:    mugeco.sh

Pearl script which will re-encode mp3 files and preserve id3 tags:
lameid3.pl 

Windows scripts:
lame4dos.bat  
Lame.vbs   (and an HTML frontend: LameGUI.html)


=======================================================================
options guide:
=======================================================================
These options are explained in detail below.


Quality related:

-m m/s/j/f/a   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        (obsolete, try --preset voice instead)
--noshort      disable short blocks
-q n           Internal algorithm quality setting 0..9. 
               0 = slowest algorithms, but potentially highest quality
               9 = faster algorithms, very poor quality
-h             same as -q2
-f             same as -q7


Constant Bit Rate (CBR)
-b  n          set bitrate (8, 16, 24, ..., 320)
--freeformat   produce a free format bitstream.  User must also specify
               a bitrate with -b, between 8 and 640 kbps.

Variable Bit Rate (VBR)
-v             VBR
--vbr-old      use old variable bitrate (VBR) routine (default)
--vbr-new      use new 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 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
--scale <arg>   multiply PCM input by <arg>
--scale-l <arg> scale channel 0 (left) input (multiply PCM data) by <arg>
--scale-r <arg> scale channel 1 (right) input (multiply PCM data) by <arg>
-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
--strictly-enforce-ISO   comply as much as possible to ISO MPEG spec
--replaygain-fast   compute RG fast but slightly inaccurately (default)
--replaygain-accurate   compute RG more accurately and find the peak sample
--noreplaygain  disable ReplayGain analysis
--clipdetect    enable --replaygain-accurate and print a message whether
                clipping occurs and how far the waveform is from full scale

--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 <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>  user-defined text (max 30 chars for v1 tag, 28 for v1.1)
--tn <track>    audio/song track number (1 to 255, creates v1.1 tag)
--tg <genre>    audio/song genre (name or number in list)
--add-id3v2     force addition of version 2 tag
--id3v1-only    add only a version 1 tag
--id3v2-only    add only a version 2 tag
--space-id3v1   pad version 1 tag with spaces instead of nulls
--pad-id3v2     pad version 2 tag with extra 128 bytes
--genre-list    print alphabetically sorted ID3 genre list and exit

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.

OS/2-specific options:
    --priority <type>     sets the process priority


options not yet described:
--nores            disable bit reservoir
--noath            disable ATH
--athlower <n db>  lower the ATH by n db.  
--athshort         use only the ATH for short blocks
--cwlimit <freq>   specify range of tonality calculation
--disptime
--notemp           disable temporal masking

--lowpass
--lowpass-width
--highpass
--highpass-width





=======================================================================
Detailed description of all options in alphabetical order
=======================================================================


=======================================================================
downmix
=======================================================================
-a  

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.


=======================================================================
average bitrate encoding (aka Safe VBR)
=======================================================================
--abr n

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.





=======================================================================
ATH only
=======================================================================
--athonly

This option causes LAME to ignore the output of the psy-model and
only use masking from the ATH.  (absolute threshold of hearing)

Using --athonly is NOT RECOMMENDED.  It is designed for testing
different ATH curves.



=======================================================================
bitrate
=======================================================================
-b  n

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

For MPEG-2 and MPEG-2.5 (sampling frequencies of 8, 11.025, 
12, 16, 22.05 and 24 kHz)
n = 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160


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

When used with variable bitrate encodings (VBR), -b specifies the
minimum bitrate to use.  This is useful to prevent LAME VBR from
using some very aggressive compression which can cause some distortion
due to small flaws in the psycho-acoustic model.

=======================================================================
max bitrate
=======================================================================
-B  n

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 flexability as CBR

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -