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

📄 usage

📁 MPEG-4编解码的实现(包括MPEG4视音频编解码)
💻
📖 第 1 页 / 共 2 页
字号:

% 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 psycho-acoustics)
% 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 (--lowpass and --lowpass-width options).




=======================================================================
STREAMING EXAMPLES
=======================================================================
Streaming mono 22.05kHz raw pcm, 24kbs output:
% cat inputfile | lame -r -m m -b 24 -s 22.05 - - > output

Streaming mono 22.05kHz raw pcm, with downsampling to 16kHz:
% cat inputfile | sox -t raw -x -w -s -c 1 -r 22050 -  -t raw -x -w -s -c 1 -r 16000 - resample 0.66 | lame -r -m m -b 24 -s 16 - - > output

You may or may not need one or both of the "-x" (swap bytes) option in Sox.  




=======================================================================

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 psycho-acoustics.  Encoding much faster but lower quality


Variable Bit Rate (VBR)
-v             VBR
-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)
-t             disable Xing VBR informational tag 
--nohist       disable display of VBR bitrate histogram


Experimental (undocumented):  may work better or worse:

-X n           try different quality measures (when comparing quantizations)
-Y             try to use scalefac_select 
-Z             try to use subblock_gain


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


id3 tagging:

--tt "title"     title of song (max 30 chars)
--ta "artist"    artist who did the song (max 30 chars)
--tl "album"     album where it came from (max 30 chars)
--ty "year"      year in which the song/album was made (max 4 chars)
--tc "comment"   additional info (max 30 chars)
--tg "genre"     genre of song (name or number)



options not yet described:
--nores            disable bit reservoir
--noath            disable ATH
--cwlimit <freq>   specify range of tonality calculation

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

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

This option causes LAME to ignore the output of the psy-model and
only use masking from the ATH.  Might be useful at very high bitrates
or for testing the ATH.  




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

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

For MPEG2 (sampling frequencies of 16, 22.05 and 24kHz)
n = 8,16,24,32,40,48,56,64,80,96,112,128,144,160


The bitrate to be used.  Default is 128kbs MPEG1, 80kbs 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

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

For MPEG2 (sampling frequencies of 16, 22.05 and 24kHz)
n = 8,16,24,32,40,48,56,64,80,96,112,128,144,160

Maximum allowed bitrate when using VBR.


=======================================================================
copyright
=======================================================================
-c   

mark the encoded file as copyrighted



=======================================================================
block type control
=======================================================================
-d 

Allows the left and right channels to use different block types.
Normally this is not allowed, only because the FhG encoder does
not seem to allow it either.  If anyone finds a sample where -d
produces better results, let me know.  (mt@sulaco.org)



=======================================================================
de-emphasis
=======================================================================
-e  n/5/c   

  n = (none, default)
  5 = 0/15 microseconds
  c = citt j.17

All this does is set a flag in the bitstream.  If you have a PCM
input file where one of the above types of (obsolete) emphasis has
been applied, you can set this flag in LAME.  Then the mp3 decoder
should de-emphasize the output during playback, although most 
decoders ignore this flag.

A better solution would be to apply the de-emphasis with a standalone
utility before encoding, and then encode without -e.  



=======================================================================
fast mode
=======================================================================
-f   

disable psycho-acoustics.  Encoding much faster but lower quality



=======================================================================
graphical frame analyzer
=======================================================================
-g

run MP3x, the graphical frame analyzer analysis on the inputfile.  The
inputfile can be either an .mp3 file or uncompressed audio file.  MP3x
support must be compiled into LAME, and requires GTK 1.2.

⌨️ 快捷键说明

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