x264的参数设置 Bitstream profile:压缩时使用规格模式。可选项:Auto、Baseline、Main、High建议:选择Main (注意:需要在PSP上播放的MP4-AVC必须选择Main,否则PSP无法播放!) Bitstream level:--Level:表示编、解码等级 P frame Quantitizer:--qp:固定量化模式并设置使用的量化值。 Maximum interval between IDR-frames:--keyint:最大IDR帧间距。一般来说 压 制 动画时,可以增大该值。 默认值:250 Minimum interval between IDR-frames:--min-keyint:最小IDR帧间距。一般来说 压 制 动画时,可以减小该值。 默认值:25 Frames used as predictors in B and P frames:--ref:最大参考帧数,范围0-16。该参数对质量和压缩比都有提高。 建议:大于1 (注意:数值越高速度越慢!) Maximum B frames between I and P frames:--bframes:在I帧与P帧之间可插 入 B 帧数量的最大值,范围0-16。 建议:大于1 (注意:数值越高速度越慢!) Adaptive B-frame decision method:--b-adapt:自适应B帧判定模式。0:关闭;1:快速;2:优化。下拉菜单中:0-Off为:关闭,1-Fast为:快速,2-Optimal为:优化。默认值为:1-Fast。 建议:选择2-Optimal (注意:当该选项选择为2时, Number of B-frames参数设置较高时,编码速度会下降!)。 B-frames used as for predicting:--b-pyramid:允许B帧做参考帧。 建议:选择No Alpha parameter of deblocking filter:设置环路滤波的AlphaC的参数,范围-6-6。 默认值:0 Beta parameter of deblocking filter:设置环路滤波的Beta的参数,范围-6-6。 默认值:0 (注意:Alpha parameter of deblocking filter和Beta parameter of deblocking filter在X264中的参数为--deblock 0:0前一个0对应Alpha parameter of deblocking filter的参数值,后一个0对应Beta parameter of deblocking filter的参数值!) 熵编码与缓冲
Use CABAC:内容自适应二进制算术编码,高效率的熵编码。关闭该参数时会严重降低画面质量,但是能提高编码速度。(当不勾选该项时该参数显示为:--no-cabac)。 默认值:选择Yes Minimum quantizer:--qpmin:设置最小量化值,范围0-51。 默认值:10 Maximum quantizer:--qpmax:设置最大量化值,范围0-51。 默认值:51 Quantizer step:--qpstep:设置相邻帧之间的量化值差,范围0-50。 默认值:4 Maximum local bitrate:--vbv-maxrate:平均码率模式下,最大瞬时码率 (与-B设置相同)。 默认值:0 (注意:该参数的取值与在ABR编码模式下的Bitrate(码率)保持一致!) Averaging period for maximum local bitrate:--vbv-bufsize:码率控制缓冲区的大小,单位kbit。 默认值:0 Initial buffer occupancy:--vbv-init:码率控制缓冲区数据保留的最大数据量与冲区大小之比,范围0-1.0。 默认值:0.9 Quantizer compression percentage:--qcomp:线性量化控制,0.0为固定码率,1.0为固定量化值,只能用于二次压缩和基于质量的压缩模式。 默认值:60 Direct macroblocks prediction:--direct:动态预测方式。可选项:None、Spatial、Temporal、Auto。 默认值:Temporal。 建议:选择Auto Use weighted prediction for B-frames:--weightb:允许 B 帧加权预测,可以减少相邻 B 帧 质量低的影响,对质量和压缩比都有提高,且对速度影响极少。 建议:选择Yes (注意:要使该参数生效需要让Maximum B frames between I and P frames设置大于1!) Enable all macroblock type:动态块划分方法,在Level较低时允许使用包括8x8、4x8、4x4划分方法。 建议:选择Yes (注意:如果要使用这些划分方法,需要Subpel refinement quality设置大于等于5!) Adaptive spatial transform size:允许动态划分方法在4x4和8x8DCT之间自动选择,并且允许使用i8x8动态划分方法。 建议:选择Yes (注意:如果选择No那么只是用4x4DCT动态预测!) 动态预测与分区
Psychovisual optimization strength for RDO:--psy-rd 0:0:在rdo中使用Psy算法(一种心理视觉模型)。 默认值:1.0 建议:0 (注意:这个参数对应--psy-rd 0:0中前面的数值!当Subpel refinement quality参数大于等于6时才能使用该这个参数。该参数会影响到Chroma Qp Offset参数。当设置该数设置为1.0时Chroma Qp Offset会自动设置为-2;当该参数设置为0时Chroma Qp Offset会自动设置为0!) Psychovisual optimization strength for Trellis:--psy-rd 0:0sy-Trellis量化,可提高细节,但会大幅提高码率。 默认值:0.0。 (注意:该参数需要Subpel refinement quality参数大于等于6且Trellis参数大于等于1才能使用。这个参数对应--psy-rd 0:0中后面的数值!) Mixed reference frame:--mixed-refs:可以在一帧内使用不同参考帧。该参数能提高画面质量,但对速度影响较大。 默认值:不勾选 建议:勾选 Rate-distortion optimal quantization(trellis):--trellis:Trellis量化,对每个8x8的块寻找合适的量化值,需要勾选CABAC才能使用该参数。可选项: Disabled:关闭(0); Enabled only for the final encode:只在最后编码时使用(1); Enabled during all mode decision:一直使用(2)。 默认值:0 建议:开启该参数 (注意:该参数能提画面高质量,配置较低的电脑且对画面质量没有要求的用户可以选择Enabled only for the final encode,配置较高的电脑且对画面质量有要求的用户可以选择Enabled during all mode decision;画面质量:Enabled only for the final encode比Enabled during all mode decision差!编码速度:Enabled only for the final encode比Enabled during all mode decision快!) 量化模式等设置
How AQ distribures bits:--aq-mode:自适应量化模式,可以在1帧中不同宏块间重新分配量化值,能提高暗部细节,但会提高码率。不能在固定量化模式(Const.Quantizer模式)中使用。0:关闭;1:开启。可选项: Disabled:关闭(0); Variance:AQ开启(1)。 默认值:Variance AQ(1) Reduce blocking and blurring in flat and texture areas:--aq-strength:AQ强度,减小低细节宏块的量化值。可选项:Weak、Normal、Strong。 默认值:Normal Intra luma quantization deadzone:--deadzone-intra:设置intra模式下,亮度死区量化值,范围0-32。 默认值:11 Inter luma quantization deadzone:--deadzone-inter:设置inter模式下,亮度死区量化值,范围0-32; 默认值:21 Performs early skip detection in P-frames:关闭P帧快速跳过的检测。 默认值:Yes 建议:勾选No (注意:勾选No后视屏参数中显示为:--no-fast-pskip!) Eliminate DCT blocks with small coefficient:关闭P帧联合编码。关闭该项后可以增加细节,但也会增大体积。 默认值:Yes 建议:不勾选 (注意:不勾选后视屏参数中显示为:--no-dct-decimate!) Noise reduction:--nr:噪声去除,范围0-100000。 默认值:0 Interlaced video content:--interlaced:启用纯交错模式。用于隔行扫描的源。 默认值:No Global header:在基于码率的编码模式下 SPS和PPS只会在开头出现一次。许多播放器(如索尼的PSP)需要使用这一功能.默认会让PPS在每个阶段重复检测。 默认值:No Use access unit delimiters:--aud:使用数据定义符号。 默认值:No Enable picture timing data:允许画面启用定时数据。 默认值:No Set SPS and PPS id number:--sps-id:设置SPS和PPS的ID值。 默认值:0 JM-compatible custom quant matrices file:--cqmfile:读取JM格式的外部量化矩阵文件。 默认值:空 (注意:如果设置了该选项x264会自动忽略其他--cqm选项) 编码线程与加速
Threads:--threads:编码线程,使用多线程技术。多核CPU可以选择自己的CPU核数加快编码速度。 默认值:0(自动) Non-deterministic:--non-deterministic:非确定性。可以稍微减少多线程的开销。 默认值:Yes Crop overscan setting:--overscan:过扫描线。可选项: Undefined:不设置 Show:观看 Crop:去除 默认值:Undefined(不设置) Video format:--videoformat:视频格式,有点像播放制式。 可选项:Component、Pal、Ntsc、Secam、Mac、Undefined. 默认值:Undefined Full range samples setting:--fullrange:指定颜色全范围样本设置。 默认值:No Color Primaries:--colorprim:原始色度格式。 默认值:空 Transfer characteristics:--transfer:转换方式。 默认值:空 Color matrix setting:--colormatrix:色度矩阵设置. 默认值:空 Chroma sample location:--chromaloc:色度样本指定,范围0-5。 默认值:0 Turbo Mode:在多次编码时通过降低Subpel refinement quality参数和Frames used as predictors in B and P frames参数从而加速第一次编码的速度。 可选项: Disabled:禁止使用加速功能。 Reduce subq:保持Subpel refinement quality参数为用户设置参数不变,降低Frames used as predictors in B and P frames参数为1。 Reduce subq and frameref to 1:将Subpel refinement quality参数和Frames used as predictors in B and P frames参数都降低为1. 默认值:Reduce subq and frameref to 1 (注意:Reduce subq and frameref to 1的编码速度大于Reduce subq大于Disabled;编码质量Disabled优于Reduce subq优于Reduce subq and frameref to 1!) 在音频选项栏中的参数设置及含义如下: 转换音频流:对原始音频进行编码。只有勾选该项后,才会启用编码器对原始音频进行编码。 建议:勾选