标签:des style http color 使用 os strong io
我们在对音频格式的转换中,打交道最多的就是MP3了。如果你能彻底玩转MP3,那么对你的音频创作和对其他音频格式的掌握会有很大的帮助。下面我们给大家介绍MP3制作软件:LAME
要制作出高音质的MP3靠以前广为流传的MP3编码器是不行的。LAME与一般MP3编码器与众不同,它支持几乎所有能够采用到MP3编码中的技术,LAME支持CBR(固定码率)和VBR(动态码率,还有一个效果不是很出众的ABR),LAME是MP3史上具有里程碑意义的软件,LAME是一个Command line程序,象Dos程序一样需要手工输入,而且参数及其复杂,但可很方便的供其他程序调用,LAME同时也提供了一个DLL版本,但我们认为不如EXE版本的好,所以忽略不提。不要被LAME复杂的参数所吓倒,文章中我们会提示如何操作来达到一劳永逸的效果。我们需要粗略的了解一下LAME的参数。
LAME其实真正要用到的参数就几个而已。
VBR压缩级别参数:[-V] 指定VBR的压缩品质,范围为0-9(数字越小品质越高),预设值为4。
码率参数:[-b] 指定流量变动的下限,预设为32Kbps。[-B] 指定流量变动的上限,预设为320Kbps。注意 -b 和-B 的大小写差异。如果使用在CBR编码模式中,[-b]所指定的码率就是固定码率大小,可供指定的码率大小可以为:16 24 32 40 48 56 64 80 96 112 128 160 192 224 256 320。
高品质编码模式参数:[-h] 高品质编码模式。这个选项在 VBR 压缩模式中是预设开启的。CBR编码模式中是关闭的。
精度参数:[-q] 指定频率资料量化时的精确度,范围是为0-9(数字越小品质越高),预设值为2。如果在使用-q 0参数是觉得编码速度慢得过份,请使用默认值。如果编码的曲子是钢琴或者小提琴、古筝二胡这类细节很丰富的乐器独奏,我们推荐你就是耐着性子也要用-q 0参数,虽然慢点,但值得。
声道模式参数:[-m] 立体声压缩模式,细分参数分别有 s:Stereo j:Joint Stereo f:Force ms_stereo m:Mono。当使用VBR编码并把品质设为4-9和使用CBR编码流量小于160 Kbps时,预设为j(Joint Stereo)。其余时候预设为s(Stereo)。
通过长期的使用,我们给出2个参数使用建议。
CBR 模式编码的推荐参数:-b -m s -h ( 为码率数值)。VBR 模式编码推荐参数:-V 0。
在新版本的LAME中(3.90后),LAME提供了全新的--alt-preset系列预置参数,这组参数最大的好处就是不用再去记忆那些繁多的参数,而提供最佳化的选择。
CBR模式:
--alt-preset insane 320kbps CBR模式,音质最好,体积最大。
VBR模式:
--alt-preset extreme 平均Bitrate范围在192~256kbps之间,音质接近insane,体积小了一些,但比 -V 0 编码效率要低。
--alt-preset系列参数提供比老参数更优秀的音质,但编码效率却低了很多,您需要更强劲的CPU支持才行,而相对比老参数提高相对不是很多,在乎您的取舍了,笔者倾向使用老参数。
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(转)hifi级mp3制作和LAME参数设置2009-11-10 18:59:35
mp3也能hifi,hifi级mp3制作和LAME参数设置mp3也能HIF,hifi级mp3制作
对于我这样的普通人来说,无损压缩只能玩玩而已——虽然我的硬盘有160G,但是看到硬盘空间一个G一个G的减小,心里还是很不舒服。因此,我还是要听MP3。
不要跟我提那些下载的128kbps MP3,大多数音质没法听。下面,我们请出的工具就是LAME。大家要问了,超级解霸等工具不是也可以压MP3吗?算了吧,一旦你使了LAME,这些软件我保证你连看都不会再看一眼。那么,LAME有什么绝招呢?LAME的两大神功就是VBR(动态流量编码)和心理声学模型。LAME可以说是将VBR的能力发挥到了极致。它将波形分割成50帧(30帧约1秒)一段,根据该段落内频率的高低动态设置比特率,低频使用相对低的比特率,高频使用高比特率,这样一来音质就得到了很大程度的保护。此外,LAME的心理声学模型也是最出色的。就这样,LAME将MP3的音质提高到了一个崭新的阶段,可以说LAME做出的MP3真正有着近似CD的音质了。但是LAME一开始只有命令行模式,使用不太方便,好在有人作出外壳程序,解决了这个问题。笔者现在使用的就是一个名为RazorLame的外壳,
首先我们设置一下LAME的参数,点击LAME options。
里面有General, VBR, Advance和Expert等设置,要了解这些设置,我们还是需要首先了解一下LAME繁多的参数。
CBR(固定流量编码)编码时的基本参数:
CBR可以算是是最常用的的MP3编码方式,其编码流量可在32kbps-320kbps中选择。我们从网上下载的MP3最常用的是128kbps,但是这个流量显然是不够的。如果你想做接近CD水准的MP3,推荐你用320Kbps的CBR(最高质量MP3),这类MP3音质最好,但是体积很大。如果你又想要小体积,那么还是不要用CBR了
-b参数:指定编码的流量。LAME中可以使用的流量如下:
32 40 48 56 64 80 96 112 128 160 192 224 256 320。当然数字越大,体积越大,音质越好。这一点,体积与音质成正比。在波形静音的部分,LAME会自动采用最小的流量。
-h参数:高品质编码模式,可以增加音质,我们当然需要,一定要毫不犹豫用这个参数。这个选项在 VBR 压缩模式中是预设开启的。
-q参数:指定波形数据量化时的精确度,范围为0-9,数字越低质量越好。笔者选择2,因为LAME的开发者推荐这个参数。0理论上最好,但是开发者说这是个实验型参数(不懂)。
因此,最强的MP3的命令行:-b 320 –h –q2。
VBR(动态流量编码)编码时的基本参数:
VBR编码是LAME一大神功,可为你提供最佳的音质/体积比,所以笔者强烈推荐使用VBR。
-V参数:指定VBR的压缩品质,范围为0-9(数字越小品质越高),我们选择2。
-b参数: 指定流量变动的下限,预设为32Kbps。使用预设就可以了。
-B参数: 指定流量变动的上限,预设为320Kbps。推荐使用预设值
其他如-q参数与CBR相同。
笔者推荐VBR命令:-V2 q2
此外LAME还提供一种ABR的编码方式,这种编码将CBR通过VBR的方式压缩,可以指定流量大小,参数为—abr
然后是一些共同参数:
-m参数:选择立体声输出方式:有-ms (Stereo 立体声) -mj (Joint Stereo 联合立体声) –mm (Mono 单声道)等4种可以选择。
为了简化LAME繁多的参数,开发者又提供一组强大的预制参数-ap供选择。这类参数是以--alt –present开头,因此,最好的参数又有了新的选择:
CBR参数:--alt-preset insane或者--alt-preset cbr 320。音质最好,体积最大。
VBR参数:.--alt-preset extreme。音质很好,体积小,笔者推荐并使用这一参数。
然后我们回到LAME options,首先要到General中指定输出的MP3文件存放位置。Advance中都是一些实验性参数,有兴趣可以试试,说不定可以试出什么新的最优化参数来,其中有一个 Delete source file after encoding 的选项,选取之后,编码完成后原始的波形文件会被自动删除,非常方便。然后是核心——VBR的设置。这里你可以通过上面学到的知识进行设置,不错吧。再后就是Expert——专家设置。这里面有一个Custom options。可以自己直接写命令行,但是这一项好像不是给专家设计的——更像给懒人使用的,你只要把笔者的推荐CBR或VBR参数拷贝上去,然后在底下only use custom options的选项前打上勾就可以了,真是方便。最后是Audio processing,注意output sampling frequency一定要选择44.1KHz。默认为32KHz,会引起音质的下降。最后,点击编码(Encode)就可以开始了。再耐心等待几分钟,我们的HIFI级MP3就出炉了。
=================================================
LAME问与答——兼谈最新的编码参数设置方案
1.LAME是什么?
LAME是目前最好的MP3编码引擎。LAME(mitiok.ma.cx)编码出来的MP3音色纯厚、空间宽广、低音清晰、细节表现良好,它独创的心理音响模型技术保证了CD音频还原的真实性,配合VBR和ABR参数,音质几乎可以媲美CD音频,但文件体积却非常小。对于一个免费引擎,LAME的优势不言而喻。
2.上边提到的VBR和ABR是什么?还有CBR?
VBR(Variable Bitrate)动态比特率。也就是没有固定的比特率,压缩软件在压缩时根据音频数据即时确定使用什么比特率,这是以质量为前提兼顾文件大小的方式,推荐编码模式;
ABR(Average Bitrate)平均比特率,是VBR的一种插值参数。LAME针对CBR不佳的文件体积比和VBR生成文件大小不定的特点独创了这种编码模式。ABR在指定的文件大小内,以每50帧(30帧约1秒)为一段,低频和不敏感频率使用相对低的流量,高频和大动态表现时使用高流量,可以做为VBR和CBR的一种折衷选择。
CBR(Constant Bitrate),常数比特率,指文件从头到尾都是一种位速率。相对于VBR和ABR来讲,它压缩出来的文件体积很大,而且音质相对于VBR和ABR不会有明显的提高。
3.下载的压缩包里怎么有两种格式的LAME文件?它们有什么区别?哪一种比较好?
LAME分DLL和EXE两种版本,DLL版本做为一个方便的接口程序在大多数抓轨软件中都能看到(比如AltoMP3Maker),但由于可控性差,与具备丰富调节参数的EXE版相比,其压缩出来的MP3效果稍逊一筹。
4.怎么EXE版本是命令行方式运行的程序?太难用了
针对这一点,网上出现了一些EXE版的外壳程序,比如RazorLAME(www.dors.de/razorLAME),它是Win窗口程序,通过它可以使我们在视窗界面下轻松调整各种参数,使繁琐的压缩过程简单化。我们也可以用直接用EAC(目前最好的抓轨软件,www.exactaudiocopy.de)来调用LAME.exe,可以在抓轨同时压缩MP3,事半功倍。
5.我在一些网站学会了使用-V 0 -q 0这样的终极参数,这下可以压出最高品质MP3了
实际上象-V 0 -q 0这样的参数可以压缩出最高品质MP3的说法从来都不是LAME开发者所应允的。在LAME中,象0、1这样的Level属于试验参数,如果用它压缩MP3,非但不会提高音质(相对于Level2而言),反而会导入多余的噪音,所以以上的参数应该改为-V 2 -q 2。实际上象这样的参数标准几近淘汰,-ap参数将做为新的LAME参数标准逐渐流行。
6.-ap参数?没听说过
这种参数属于预置参数。
--abr 128 -h --nspsytune --athtype 2 --lowpass 16 --ns-bass -8 --scale 0.93,面对上边这组微调参数你会不会有一种晕菜的感觉呢@_@……正是为了简化参数设置,避免各种不必要的试验参数,LAME开发者精心调配出了-ap参数,它是一组代码级参数(也就是说没有微调参数可以实现与它相同的功能)。使用这种新的预置参数标准既可以压缩出更高品质的MP3,又可以避免我们陷入微调参数的迷宫中。以下是-ap参数列表:
最高品质参数:
--alt-preset insane或者--alt-preset cbr 320
320k CBR,音质最好,文件体积最大
VBR参数:
1.--alt-preset extreme
220-270k左右的VBR,音质与上面参数相仿,但文件体积小25%,推荐此参数
2.--alt-preset fast extreme
音质比上面参数稍微差一些
3.--alt-preset standard
180-220k左右的VBR,在音质和文件大小之间比较好的平衡
4.--alt-preset fast standard
音质比上面参数稍微差一些
5.--alt-preset standard -Y
虽然品质稍差,但文件体积非常小
ABR参数:
--alt-preset <Bitrate>
(可用Bitrate:80、96、112、128、160、192、224、256、320)
CBR参数:
--alt-preset cbr <Bitrate>
(可用Bitrate:80、96、112、128、160、192、224、256、320)
========================================================
对MP3及音频压缩技术的一些误解
1、mp3的音质很差?
错。mp3作为当前音频有损压缩的“王者”,它的编码技术已经几近完美。很多人只是不清楚如何才能压缩出高品质的mp3而已。2001年12月,世界上最优秀的mp3编码器--LAME推出了革命性的版本3.90.2,针对lame压缩参数过于烦琐的情况,提供了几个preset(预设)参数。现在只要使用LAME的standard(标准)模式进行压缩,就能得到近似于CD的完美音质。
2、128kbps的mp3=CD音质?
错。首先,所谓CD音质是一个带有很大主观性的名词,基本上可以认为CD音质意味着在平均水平的听音条件下能达到用光驱放CD的效果。但是根据这个定义,无数的试听结果表明,不管用什么编码器,什么样的设置,128kbps的mp3都不能达到这个标准。关于这方面的主题可参http://ff123.net/,这是一个非常著名的国外音频站点,对128kbps的mp3的测试有非常详细的理论阐述。
3、mp3 192kbps CBR(固定比特速率) stereo(立体声)编码是音质与文件大小的最佳平衡设置?
错。这一误解有很深的根源。因为128kbps的mp3在音质上不能被“苛刻”的音乐爱好者接受,所以他们要寻求更好的设置。对Xing编码器及Fraunhofer编码器来说,直到现在它们在VBR(可变比特速率)和jointstereo(混合立体声)的算法上都很失败,所以很多人都认为CBR和stereo才是最佳的选择,而且192kbps的mp3在文件大小上也是可以接受的。是LAME编码器改变了这一切!LAME采用的VBR及智能的joint stereo算法非常优秀,已经没什么理由再去使用CBR和stereo--这样做只会浪费有限的bits。标准的VBR预定设置(即使用--alt-preset standard参数)生成的mp3文件的平均比特率也是192kbps,但它的音质要好过CBR 192kbps,在同等的比特率下其他的编码器非其敌手(按:除了1、mpc--其音质在该bitrate左右好于mp3, 2、最近的oggenc 1.0--not tested yet)。
4、mp3 320kbps CBR Stereo是mp3音质的极限?
错(或者说Not exactly true)。虽然320kbps是mp3标准的极限,但在320kbps下使用设计良好的Joint Stereo,能够将节省下下的bits用于纯粹的音乐部分(从而提高音质)。如果音源的立体声分离度很低,使用完全的stereo是一种浪费。
5、VBR的音质不如CBR?
错。设计良好的VBR算法不会将bits浪费在易于编码的部分,节省下来的bits将用在对复杂的音频部分进行编码。这一误解可能来自于较老的FhG Encoder的VBR算法及Xing VBR算法中存在的bug,对当前的lame编码器来说,它的VBR算法已被协调得很好,不会有音质上的问题。
6、Joint Stereo 音质不佳?
错。当前主流的encoder如lame、mppenc、oggenc、aacenc都使用了所谓smart joint stereo的技术,不会破坏stereo image,请参阅如下的两个链接(E文,由编码器的开发者解答):
http://www.hydrogenaudio.org/forums/showthread.php?s=&threadid=1081 ;
http://www.hydrogenaudio.org/forums/showthread.php?s=&threadid=759 ;
更为技术性的解释如下:
http://www.xiph.org/ogg/vorbis/doc/stereo.html ;
7、Blade是最佳的mp3编码器?
错。(似乎不用过多的解释)Blade不推荐用于所有bitrate的mp3编码,由于缺少相当多的功能,其音质较lame或FhG逊色很多。下面的两个链接有助于了解blade的缺憾:
http://forums.afterdawn.com/thread_view.cfm/1914 ;
http://www.hydrogenaudio.org/forums/showthread.php?s=&threadid=463 ;
最新消息——Blade已经停止开发,其作者在主页上声明ogg是更好的选择
8、wma在64kbps可达CD音质?
错。不用我多费笔墨,不相信的话点击下面的链接了解详情::
http://www.hydrogenaudio.org/forums/showthread.php?s=&threadid=1434 ;
http://forums.winamp.com/showthread.php?s=&threadid=89378 ;
另外,专门为winamp写plugin的Peter也写了篇文章:
Why not to use wma http://205.188.228.81/showthread.php?threadid=81838)
9、不同的音乐类型需要不同的编码器及不同的参数?
错。编码器是在音频信号级进行处理,不去分辨音乐类型。只要心理学模型与编码算法正确,同一设置就适用于所有的音乐类型。详情参见:
http://www.hydrogenaudio.org/forums/showthread.php?s=&threadid=1835
======================================================
小身材也要大味道——128kbps下如何设置Lame编码参数
Lame MP3编码引擎大家已经相当熟悉了,而且在APX参数推出以后,它的使用变得更加方便。但是很多朋友还是反映,Lame压缩出来的MP3体积还是大了一点,降低压缩波特比又怕效果不好,那么如何在底码率下用Lame压出效果相对比较好的曲目呢?
其实一般来说,128kbps的编码率下,任何编码器都无法达到CD音质(M$所言,WMA在64kbps或96kpbs就能达到CD Quality是一个真实的谎言),对Lame来说,要想在128kbps超过那些专门为低bitrate作了优化的encoder如mp3pro、wma甚至ogg,冗长的参数是不可或缺的,这篇短文就为您进行详细的解释
1、Lame的版本的问题
Lame.exe的当前的最新稳定版是3.92,很多地方都可以提供下载,推荐使用。不过还有一个版本就是dibrom(Lame preset参数的开发者)编译的3.90.2,Lame随后的3.91、3.92版本有相当部分(特别是preset部分)是脱胎于此版的。这也是当前在preset参数设置下编码最快的版本,下载链接如下http://www.hydrogenaudio.org/extra/Lame/Lame3.90.2-ICL.zip ;
Lame的开发速度很快,3.93的alpha版已经出过十几个了。虽然内部测试版不推荐使用,但它的确修正了不少的错误(像对人们误解最大的q0参数的修正),所以也提供一个下载链接,有兴趣的朋友不妨一试:http://mitiok.free.fr/Lame-20020706.zip(这是最新7月6日版)。
2、参数设置
Lame的参数设置的争论是最大的,我也有被千夫所指的经历和准备……。下面的文字都是我在r3mix和Hydrogen论坛得来的信息的综合:
a、对CBR:
--alt-preset cbr 128 或者
-h --nspsytune --athtype 2 --lowpass 16 --ns-bass -8 --scale 0.93
b、对ABR:
--alt-preset 128(该preset与--abr 128 -h --nspsytune --athtype 2 --lowpass 17.5 --ns-bass -6 --scale 0.93基本相当)
--abr 128 -h --nspsytune --athtype 2 --lowpass 16 --ns-bass -8 --scale 0.93
c、对VBR:
在128kbps下VBR没有用武之地。
就音质来说,我认为,ABR>CBR。
小结:
r3mix论坛曾有一句话让我印象很深刻: one can‘t talk about Lame without mentioning the version and settings. Lame的参数之多很为人诟病,preset的出现对懒人如我者是最大的福音,虽然128kbps不是我喜欢的bitrate,但不可否认这是internet上最流行的……。好像主题已经有点乱了,就此打住. 独乐乐不如众乐乐,让我们一起研究、共享我们的知识,我们的音乐。
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(转)lame 3.90.3 转换mp3的所有参数2009-11-11 12:28:13| 分类: 默认分类 阅读315 评论0 字号:大中小订阅
LAME version 3.90.3 MMX (http://www.mp3dev.org/)
-- Compiled at http://www.hydrogenaudio.org
-- Check this website for up to date information on the --alt-presets
usage: lame [options] <infile> [outfile]
<infile> and/or <outfile> can be "-", which means stdin/stdout.
RECOMMENDED:
lame -h input.wav output.mp3
OPTIONS:
Input options:
-r input is raw pcm
-x force byte-swapping of input
-s sfreq sampling frequency of input file (kHz) - default 44.1 kHz
--bitwidth w input bit width is w (default 16)
--mp1input input file is a MPEG Layer I file
--mp2input input file is a MPEG Layer II file
--mp3input input file is a MPEG Layer III file
--nogap <file1> <file2> <...>
gapless encoding for a set of contiguous files
--nogapout <dir>
output dir for gapless encoding (must precede --nogap)
Operational options:
-m <mode> (s)tereo【立体声】, (j)oint【联合立体声】, (f)orce, (m)ono or (a)auto
default is (s) or (j) depending on bitrate
force = force ms_stereo on all frames.
auto = jstereo, with varialbe mid/side threshold
-a downmix from stereo to mono file for mono encoding
-d allow channels to have different blocktypes
--freeformat produce a free format bitstream
--decode input=mp3 file, output=wav
-t disable writing wav header when using --decode
--comp <arg> choose bitrate to achive a compression ratio of <arg>
--scale <arg> scale input (multiply PCM data) 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>
--preset type type must be phone, voice, fm, tape, hifi, cd or studio
"--preset help" gives some more infos on these
--alt-preset type type must be "standard", "extreme", "insane",
or a value for an average desired bitrate and depending on
the value specified, appropriate quality settings will be
used.
--r3mix use high-quality VBR preset
Verbosity:
--disptime <arg>print progress report every arg seconds
-S don‘t print progress report, VBR histograms
--nohist disable VBR histogram display
--silent don‘t print anything on screen
--quiet don‘t print anything on screen
--verbose print a lot of useful information
Noise shaping & psycho acoustic algorithms:
-q <arg> <arg> = 0...9. Default -q 5
-q 0: Highest quality, very slow
-q 9: Poor quality, but fast
-h Same as -q 2. Recommended.
-f Same as -q 7. Fast, ok quality
CBR (constant bitrate, the default) options:
-b <bitrate> set the bitrate in kbps, default 128 kbps
ABR options:
--abr <bitrate> specify average bitrate desired (instead of quality)
VBR options:
-v use variable bitrate (VBR) (--vbr-old)
--vbr-old use old variable bitrate (VBR) routine
--vbr-new use new variable bitrate (VBR) routine
-V n quality setting for VBR. default n=4
0=high quality,bigger files. 9=smaller files
-b <bitrate> specify minimum allowed bitrate, default 32 kbps
-B <bitrate> specify maximum allowed bitrate, default 320 kbps
-F strictly enforce the -b option, for use with players that
do not support low bitrate mp3
-t disable writing LAME Tag
ATH related:
--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 n selects between different ATH types [0-5]
--athlower x lowers ATH by x dB
--athaa-type n ATH auto adjust types 1-3, else no adjustment
--athaa-loudapprox n n=1 total energy or n=2 equal loudness curve
--athaa-sensitivity x activation offset in -/+ dB for ATH auto-adjustment
PSY related:
--short use short blocks when appropriate
--noshort do not use short blocks
--allshort use only short blocks
--cwlimit <freq> compute tonality up to freq (in kHz) default 8.8717
--notemp disable temporal masking effect
--nspsytune experimental PSY tunings by Naoki Shibata
--nssafejoint M/S switching criterion
--nsmsfix <arg> M/S switching tuning [effective 0-3.5]
--ns-bass x adjust masking for sfbs 0 - 6 (long) 0 - 5 (short)
--ns-alto x adjust masking for sfbs 7 - 13 (long) 6 - 10 (short)
--ns-treble x adjust masking for sfbs 14 - 21 (long) 11 - 12 (short)
--ns-sfb21 x change ns-treble by x dB for sfb21
experimental switches:
-X n selects between different noise measurements
-Y lets LAME ignore noise in sfb21, like in CBR
MP3 header/stream options:
-e <emp> de-emphasis n/5/c (obsolete)
-c mark as copyright
-o mark as non-original
-p error protection. adds 16 bit checksum to every frame
(the checksum is computed correctly)
--nores disable the bit reservoir
--strictly-enforce-ISO comply as much as possible to ISO MPEG spec
Filter options:
-k keep ALL frequencies (disables all filters),【保留所有频率,不使用过滤】
Can cause ringing and twinkling
--lowpass <freq> frequency(kHz), lowpass filter cutoff above freq
--lowpass-width <freq> frequency(kHz) - default 15% of lowpass freq
--highpass <freq> frequency(kHz), highpass filter cutoff below freq
--highpass-width <freq> frequency(kHz) - default 15% of highpass freq
--resample <sfreq> sampling frequency of output file(kHz)- default=automatic
ID3 tag options:
--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.
MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
我个人在foobar0.83中的lame里使用的参数为:
-m s -q 0 -b 320 --noath -k - %d
LAME其实真正要用到的参数就几个而已。
VBR压缩级别参数:[-V] 指定VBR的压缩品质,范围为0-9(数字越小品质越高),预设值为4。
码率参数:[-b] 指定流量变动的下限,预设为32Kbps。[-B] 指定流量变动的上限,预设为320Kbps。注意 -b 和-B 的大小写差异。如果使用在CBR编码模式中,[-b]所指定的码率就是固定码率大小,可供指定的码率大小可以为:16 24 32 40 48 56 64 80 96 112 128 160 192 224 256 320。
高品质编码模式参数:[-h] 高品质编码模式。这个选项在 VBR 压缩模式中是预设开启的。CBR编码模式中是关闭的。
精度参数:[-q] 指定频率资料量化时的精确度,范围是为0-9(数字越小品质越高),预设值为2。如果在使用-q 0参数是觉得编码速度慢得过份,请使用默认值。如果编码的曲子是钢琴或者小提琴、古筝二胡这类细节很丰富的乐器独奏,我们推荐你就是耐着性子也要用-q 0参数,虽然慢点,但值得。
声道模式参数:[-m] 立体声压缩模式,细分参数分别有 s:Stereo j:Joint Stereo f:Force ms_stereo m:Mono。当使用VBR编码并把品质设为4-9和使用CBR编码流量小于160 Kbps时,预设为j(Joint Stereo)。其余时候预设为s(Stereo)。
通过长期的使用,我们给出2个参数使用建议。
CBR 模式编码的推荐参数:-b -m s -h ( 为码率数值)。VBR 模式编码推荐参数:-V 0。
在新版本的LAME中(3.90后),LAME提供了全新的--alt-preset系列预置参数,这组参数最大的好处就是不用再去记忆那些繁多的参数,而提供最佳化的选择。
CBR模式:
--alt-preset insane 320kbps CBR模式,音质最好,体积最大。
VBR模式:
--alt-preset extreme 平均Bitrate范围在192~256kbps之间,音质接近insane,体积小了一些,但比 -V 0 编码效率要低。
--alt-preset系列参数提供比老参数更优秀的音质,但编码效率却低了很多,您需要更强劲的CPU支持才行,而相对比老参数提高相对不是很多,在乎您的取舍了,笔者倾向使用老参数。
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
lame3.90.3 Full command line switch reference2009-11-11 13:06:58| 分类: 默认分类 阅读17 评论0 字号:大中小 订阅
Full command line switch reference
note: Options which could exist without beeing documented here are considered as experimental ones. Such experimental options should usually not be used.
switch | parameter |
-a | downmix stereo file to mono |
--abr | average bitrate encoding |
--allshort | use short blocks only |
--athlower | lower the ATH |
--athonly | ATH only |
--athshort | ATH only for short blocks |
--athtype | select ATH type |
-b | bitrate (8...320) |
-B | max VBR/ABR bitrate (8...320) |
--bitwidth | input bit width |
-c | copyright |
--comp | choose compression ratio |
--cwlimit | tonality limit |
-d | block type control |
--decode | decoding only |
--disptime | time between display updates |
-e | de-emphasis (n, 5, c) |
-f | fast mode |
-F | strictly enforce the -b option |
--freeformat | free format bitstream |
-h | high quality |
--help | help |
--highpass | highpass filtering frequency in kHz |
--highpass-width | width of highpass filtering in kHz |
-k | full bandwidth |
--lowpass | lowpass filtering frequency in kHz |
--lowpass-width | width of lowpass filtering in kHz |
-m | stereo mode (s, j, f, m) |
--mp1input | MPEG Layer I input file |
--mp2input | MPEG Layer II input file |
--mp3input | MPEG Layer III input file |
--noath | disable ATH |
--nohist | disable histogram display |
--nores | disable bit reservoir |
--noshort | disable short blocks frames |
--notemp | disable temporal masking |
-o | non-original |
-p | error protection |
--preset | use built-in preset |
--alt-preset | use updated and much higher quality "alternate" presets |
--priority | OS/2 process priority control |
-q | algorithm quality selection |
--quiet | silent operation |
-r | input file is raw pcm |
--resample | output sampling frequency in kHz (encoding only) |
--r3mix | r3mix VBR preset |
-s | sampling frequency in kHz |
-S | silent operation |
--scale | scale input |
--scale-l | scale input channel 0 (left) |
--scale-r | scale input channel 1 (right) |
--short | use short blocks |
--silent | silent operation |
--strictly-enforce-ISO | strict ISO compliance |
-t | disable INFO/WAV header |
-V | VBR quality setting (0...9) |
--vbr-new | new VBR mode |
--vbr-old | older VBR mode |
--verbose | verbosity |
-x | swapbytes |
-X | change quality measure |
* -a downmix
Mix the stereo input file to mono and encode as mono.
The downmix is calculated as the sum of the left and right channel, attenuated by 6 dB.
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.
--------------------------------------------------------------------------------
* --abr n average bitrate encoding
Turns on encoding with a targeted average bitrate of n kbits, allowing to use frames of different sizes. The allowed range of n is 8-310, you can use any integer value within that range.
It can be combined with the -b and -B switches like:
lame --abr 123 -b 64 -B 192 a.wav a.mp3
which would limit the allowed frame sizes between 64 and 192 kbits.
--------------------------------------------------------------------------------
* --allshort use short blocks only
Use only short blocks, no long ones.
--------------------------------------------------------------------------------
* --athlower n lower the ATH
Lower the ATH (absolute threshold of hearing) by n dB.
Normally, humans are unable to hear any sound below this threshold, but for music recorded at very low level this option might be usefull.
--------------------------------------------------------------------------------
* --athonly ATH only
This option causes LAME to ignore the output of the psy-model and only use masking from the ATH (absolute threshold of hearing). Might be useful at very high bitrates or for testing the ATH.
--------------------------------------------------------------------------------
* --athshort ATH only for short blocks
Ignore psychoacoustic model for short blocks, use ATH only.
--------------------------------------------------------------------------------
* --athtype 0/1/2 select ATH type
The Absolute Threshold of Hearing is the minimum threshold under which humans are unable to hear any sound. In the past, LAME was using ATH shape 0 which is the Painter & Spanias formula. Tests have shown that this formula is innacurate for the 13-22 kHz area, leading to audible artifacts in some cases. Shape 1 was thus implemented, which is over sensitive, leading to very high bitrates. Shape 2 formula was accurately modelized from real data in order to real optimal quality while not wasting bitrate. In CBR and ABR modes, LAME uses ATH shape 2 by default.
In VBR mode, LAME is adapting its shape according to the -V value, going gradually from the 0 shape at -V9 up to shape 2 at -V0.
--------------------------------------------------------------------------------
* -b n bitrate
For MPEG1 (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 MPEG2 (sampling frequencies of 16, 22.05 and 24 kHz)
n = 8,16,24,32,40,48,56,64,80,96,112,128,144,160
Default is 128 kbs for MPEG1 and 64 kbs for MPEG2.
When used with variable bitrate encoding (VBR), -b specifies the minimum bitrate to be used. However, in order to avoid wasted space, the smallest frame size available will be used during silences.
--------------------------------------------------------------------------------
* -B n maximum VBR/ABR bitrate
For MPEG1 (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 MPEG2 (sampling frequencies of 16, 22.05 and 24 kHz)
n = 8,16,24,32,40,48,56,64,80,96,112,128,144,160
Specifies the maximum allowed bitrate when using VBR/ABR
The use of -B is NOT RECOMMENDED. A 128kbs CBR bitstream, because of the bit reservoir, can actually have frames which use as many bits as a 320kbs frame. VBR modes minimize the use of the bit reservoir, and thus need to allow 320kbs frames to get the same flexibility as CBR streams.
note: If you own an mp3 hardware player build upon a MAS 3503 chip, you must set maximum bitrate to no more than 224 kpbs.
* --bitwidth 8/16/24/32 input bit width
Required only for raw PCM input files. Otherwise it will be determined from the header of the input file.
--------------------------------------------------------------------------------
* -c copyright
Mark the encoded file as being copyrighted.
--------------------------------------------------------------------------------
* --comp choose compression ratio
Instead of choosing bitrate, using this option, user can choose compression ratio to achieve.
--------------------------------------------------------------------------------
* --cwlimit n tonality limit
Compute tonality up to freq (in kHz). Default setting is 8.8717.
--------------------------------------------------------------------------------
* -d block type control
Allows the left and right channels to use different block size types.
--------------------------------------------------------------------------------
* --decode decoding only
Uses LAME for decoding to a wav file. The input file can be any input type supported by encoding, including layer I,II,III (MP3) and OGG files. In case of MPEG files, LAME uses a bugfixed version of mpglib for decoding.
If -t is used (disable wav header), Lame will output raw pcm in native endian format. You can use -x to swap bytes order.
--------------------------------------------------------------------------------
* --disptime n time between display updates
Set the delay in seconds between two display updates.
--------------------------------------------------------------------------------
* -e n/5/c de-emphasis
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.
--------------------------------------------------------------------------------
* -f fast mode
This switch forces the encoder to use a faster encoding mode, but with a lower quality. The behaviour is the same as the -q7 switch.
Noise shaping will be disabled, but psycho acoustics will still be computed for bit allocation and pre-echo detection.
--------------------------------------------------------------------------------
* -F strictly enforce the -b option
This is mainly for use with hardware players that do not support low bitrate mp3.
Without this option, the minimum bitrate will be ignored for passages of analog silence, ie when the music level is below the absolute threshold of human hearing (ATH).
--------------------------------------------------------------------------------
* --freeformat free format bitstream
Produces a free format bitstream. With this option, you can use -b with any bitrate higher than 8 kbps.
However, even if an mp3 decoder is required to support free bitrates at least up to 320 kbps, many players are unable to deal with it.
Tests have shown that the following decoders support free format:
FreeAmp up to 440 kbps
in_mpg123 up to 560 kbps
l3dec up to 310 kbps
LAME up to 560 kbps
MAD up to 640 kbps
--------------------------------------------------------------------------------
* -h high quality
Use some quality improvements. Encoding will be slower, but the result will be of higher quality. The behaviour is the same as the -q2 switch.
This switch is always enabled when using VBR.
--------------------------------------------------------------------------------
* --help help
Display a list of all available options.
--------------------------------------------------------------------------------
* --highpass highpass filtering frequency in kHz
Set an highpass filtering frequency. Frequencies below the specified one will be cutoff.
--------------------------------------------------------------------------------
* --highpass-width width of highpass filtering in kHz
Set the width of the highpass filter. The default value is 15% of the highpass frequency.
--------------------------------------------------------------------------------
* -k full bandwidth
Tells the encoder to use full bandwidth and to disable all filters. By default, the encoder uses some highpass filtering at low bitrates, in order to keep a good quality by giving more bits to more important frequencies.
Increasing the bandwidth from the default setting might produce ringing artefacts at low bitrates. Use with care!
--------------------------------------------------------------------------------
* --lowpass lowpass filtering frequency in kHz
Set a lowpass filtering frequency. Frequencies above the specified one will be cutoff.
--------------------------------------------------------------------------------
* --lowpass-width width of lowpass filtering in kHz
Set the width of the lowpass filter. The default value is 15% of the lowpass frequency.
--------------------------------------------------------------------------------
* -m s/j/f/d/m stereo mode
Joint-stereo is the default mode for stereo files with VBR when -V is more than 4 or fixed bitrates of 160kbs or less. At higher fixed bitrates or higher VBR settings, the default is stereo.
stereo
In this mode, the encoder makes no use of potentially existing correlations between the two input channels. It can, however, negotiate the bit demand between both channel, i.e. give one channel more bits if the other contains silence or needs less bits because of a lower complexity.
joint stereo
In this mode, the encoder will make use of a correlation between both channels. The signal will be matrixed into a sum ("mid"), computed by L+R, and difference ("side") signal, computed by L-R, and more bits are allocated to the mid channel.
This will effectively increase the bandwidth if the signal does not have too much stereo separation, thus giving a significant gain in encoding quality.
Using mid/side stereo inappropriately can result in audible compression artifacts. To 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 that described in the ISO documentation, and thus is safe to use in joint stereo mode.
forced joint stereo
This mode will force MS joint stereo on all frames. It‘s slightly faster than joint stereo, but it should be used only if you are sure that every frame of the input file has very little stereo separation.
dual channels
In this mode, the 2 channels will be totally indenpendently encoded. Each channel will have exactly half of the bitrate. This mode is designed for applications like dual languages encoding (ex: English in one channel and French in the other). Using this encoding mode for regular stereo files will result in a lower quality encoding.
mono
The input will be encoded as a mono signal. If it was a stereo signal, it will be downsampled to mono. The downmix is calculated as the sum of the left and right channel, attenuated by 6 dB.
--------------------------------------------------------------------------------
* --mp1input MPEG Layer I input file
Assume the input file is a MPEG Layer I file.
If the filename ends in ".mp1" or ".mpg" LAME will assume it is a MPEG Layer I file. For stdin or Layer I files which do not end in .mp1 or .mpg you need to use this switch.
--------------------------------------------------------------------------------
* --mp2input MPEG Layer II input file
Assume the input file is a MPEG Layer II (ie MP2) file.
If the filename ends in ".mp2" LAME will assume it is a MPEG Layer II file. For stdin or Layer II files which do not end in .mp2 you need to use this switch.
--------------------------------------------------------------------------------
* --mp3input MPEG Layer III input file
Assume the input file is a MP3 file. Usefull for downsampling from one mp3 to another. As an example, it can be usefull for streaming through an IceCast server.
If the filename ends in ".mp3" LAME will assume it is an MP3 file. For stdin or MP3 files which do not end in .mp3 you need to use this switch.
--------------------------------------------------------------------------------
* --noath disable ATH
Disable any use of the ATH (absolute threshold of hearing) for masking. Normally, humans are unable to hear any sound below this threshold.
--------------------------------------------------------------------------------
* --nohist disable histogram display
By default, LAME will display a bitrate histogram while producing VBR mp3 files. This will disable that feature.
Histogram display might not be available on your release.
--------------------------------------------------------------------------------
* --nores disable bit reservoir
Disable the bit reservoir. Each frame will then become independent from previous ones, but the quality will be lower.
--------------------------------------------------------------------------------
* --noshort disable short blocks frames
Encode all frames using long blocks only. This could increase quality when encoding at very low bitrates, but can produce serious pre-echo artefacts.
--------------------------------------------------------------------------------
* --notemp disable temporal masking
Don‘t make use of the temporal masking effect.
--------------------------------------------------------------------------------
* -o non-original
Mark the encoded file as being a copy.
--------------------------------------------------------------------------------
* -p error protection
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.
--------------------------------------------------------------------------------
* --preset presetName use built-in preset
Use one of the built-in presets (phone, phon+, lw, mw-eu, mw-us, sw, fm, voice, radio, tape, hifi, cd, studio).
"--preset help" gives more information about the used options in these presets.
--------------------------------------------------------------------------------
* --alt-preset presetName use updated and much higher quality "alternate" presets
Use one of the built-in alternate presets (standard, fast standard, extreme, fast extreme, insane, or the abr/cbr modes).
"--alt-preset help" gives more information about the usage possibilities for these presets.
--------------------------------------------------------------------------------
* --priority 0...4 OS/2 process priority control
With this option, LAME will run with a different process priority under IBM OS/2.
This will greatly improve system responsiveness, since OS/2 will have more free time to properly update the screen and poll the keyboard/mouse. It should make quite a difference overall, especially on slower machines. LAME‘s performance impact should be minimal.
0 (Low priority)
Priority 0 assumes "IDLE" class, with delta 0.
LAME will have the lowest priority possible, and the encoding may be suspended very frequently by user interaction.
1 (Medium priority)
Priority 1 assumes "IDLE" class, with delta +31.
LAME won‘t interfere at all with what you‘re doing.
Recommended if you have a slower machine.
2 (Regular priority)
Priority 2 assumes "REGULAR" class, with delta -31.
LAME won‘t interfere with your activity. It‘ll run just like a regular process, but will spare just a bit of idle time for the system. Recommended for most users.
3 (High priority)
Priority 3 assumes "REGULAR" class, with delta 0.
LAME will run with a priority a bit higher than a normal process.
Good if you‘re just running LAME by itself or with moderate user interaction.
4 (Maximum priority)
Priority 4 assumes "REGULAR" class, with delta +31.
LAME will run with a very high priority, and may interfere with the machine response.
Recommended if you only intend to run LAME by itself, or if you have a fast processor.
Priority 1 or 2 is recommended for most users.
--------------------------------------------------------------------------------
* -q 0..9 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 encoding (noise shaping).
-q 0: use slowest & best possible version of all algorithms. -q 0 and -q 1 are slow and may not produce significantly higher quality.
-q 2: recommended. Same as -h.
-q 5: default value. Good speed, reasonable quality.
-q 7: same as -f. Very fast, ok quality. (psycho acoustics are used for pre-echo & M/S, but no noise shaping is done.
-q 9: disables almost all algorithms including psy-model. poor quality.
--------------------------------------------------------------------------------
* -r input file is raw pcm
Assume the input file is raw pcm. Sampling rate and mono/stereo/jstereo 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.
Might not be available on your release.
--------------------------------------------------------------------------------
* --resample 8/11.025/12/16/22.05/24/32/44.1/48 output sampling frequency in kHz
Select ouptut sampling frequency (for encoding only).
If not specified, LAME will automatically resample the input when using high compression ratios.
--------------------------------------------------------------------------------
* --r3mix r3mix VBR preset
Uses r3mix VBR preset.
See www.r3mix.net for more details.
--------------------------------------------------------------------------------
* -s 8/11.025/12/16/22.05/24/32/44.1/48 sampling frequency
Required only for raw PCM input files. Otherwise it will be determined from the header of the input file.
LAME will automatically resample the input file to one of the supported MP3 samplerates if necessary.
--------------------------------------------------------------------------------
* -S / --silent / --quiet silent operation
Don‘t print progress report.
--------------------------------------------------------------------------------
* --scale n scales input by n
* --scale-l n scales input channel 0 (left) by n
* --scale-r n scales input channel 1 (right) by n
Scales input by n. This just multiplies the PCM data (after it has been converted to floating point) by n.
n > 1: increase volume
n = 1: no effect
n < 1: reduce volume
Use with care, since most MP3 decoders will truncate data which decodes to values greater than 32768.
--------------------------------------------------------------------------------
* --short use short blocks
Let LAME use short blocks when appropriate. It is the default setting.
--------------------------------------------------------------------------------
* --strictly-enforce-ISO 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 but will ensure strict ISO compatibility. This compatibility might be important for hardware players.
--------------------------------------------------------------------------------
* -t disable INFO/WAV header
Disable writing of the INFO Tag on encoding.
This tag in embedded in frame 0 of the MP3 file. It includes some information about the encoding options of the file, and in VBR it lets VBR aware players correctly seek and compute playing times of VBR files.
When ‘--decode‘ is specified (decode to WAV), this flag will disable writing of the WAV header. The output will be raw pcm, native endian format. Use -x to swap bytes.
--------------------------------------------------------------------------------
* -V 0...9 VBR quality setting
Enable VBR (Variable BitRate) and specifies the value of VBR quality.
default=4
0=highest quality.
--------------------------------------------------------------------------------
* --vbr-new new VBR mode
Invokes the newest VBR algorithm. During the development of version 3.90, considerable tuning was done on this algorithm, and it is now considered to be on par with the original --vbr-old.
It has the added advantage of being very fast (over twice as fast as --vbr-old).
--------------------------------------------------------------------------------
* --vbr-old older VBR mode
Invokes the oldest, most tested VBR algorithm. It produces very good quality files, though is not very fast. This has, up through v3.89, been considered the "workhorse" VBR algorithm.
--------------------------------------------------------------------------------
* --verbose verbosity
Print a lot of information on screen.
--------------------------------------------------------------------------------
* -x swapbytes
Swap bytes in the input file or ouptut file when using --decode.
For sorting out little endian/big endian type problems. If your encodings sounds like static, try this first.
--------------------------------------------------------------------------------
* -X 0...7 change quality measure
When LAME searches for a "good" quantization, it has to compare the actual one with the best one found so far. The comparison says which one is better, the best so far or the actual. The -X parameter selects between different approaches to make this decision, -X0 beeing the default mode:
-X0
The criterions are (in order of importance):
* less distorted scalefactor bands
* the sum of noise over the thresholds is lower
* the total noise is lower
-X1
The actual is better if the maximum noise over all scalefactor bands is less than the best so far .
-X2
The actual is better if the total sum of noise is lower than the best so far.
-X3
The actual is better if the total sum of noise is lower than the best so far and the maximum noise over all scalefactor bands is less than the best so far plus 2db.
-X4
Not yet documented.
-X5
The criterions are (in order of importance):
* the sum of noise over the thresholds is lower
* the total sum of noise is lower
-X6
The criterions are (in order of importance):
* the sum of noise over the thresholds is lower
* the maximum noise over all scalefactor bands is lower
* the total sum of noise is lower
-X7
The criterions are:
* less distorted scalefactor bands
or
* the sum of noise over the thresholds is lower
>>>>>>>>>>>>>>>>>>>>>>>>>>
MP3 Lame 转换 参数 设置(转),布布扣,bubuko.com
标签:des style http color 使用 os strong io
原文地址:http://www.cnblogs.com/smileberry/p/3885408.html