转:ffmpeg使用x264编码的配置+ ffmpeg与 x264编码器参数完整对照表
本文链接:http://www.php-oa.com/2009/03/09/ffmpeg_x264.html
转帖:http://rhingheart.blogspot.com/2009/03/ffmpegx264-ffmpeg-x264.html
使用ffmpeg进行.264编码的相关文章比较少,google了一下,特总结如下:
qscale的取值可以是0.01-255但实际使用超过50就很糟糕了
ffmpeg的cbr模式可以把码率控制的不错,但是vbr无法限制最高码率(虽然有max的设置,但是程序没有实现)
x264标准的封装是x264+aacinflv或者x264+aacinMP4
接下来说明下ffmpeg命令行的语法规则(本块内容来自2009-03-02官方文档):
语法规则结构:
ffmpeg[[infileoptions][`-i'infile]]...{[outfileoptions]outfile}...
一个最简单的命令形式:
ffmpeg-iinput.avi-b64koutput.avi
这个命令把视频以64k的码率重编码。
显然,输入文件前面要加一个-i选项下面介绍一些有用的全局参数:
-formats参数。会显示你机器当前支持的封装、编码、解码器的信息
-y参数,会指示ffmpeg覆盖输出文件
-t指定视频流持续的时常,支持以秒为单位的数字或"时:分:秒[.毫秒]"
-fs指定输出文件大小的限制
-ss指定开始的时间,和-t的单位一样
-target直接设定你想要转成的目标格式,所有的相关设置都会采用内设值,当然也你也可以加上自己要修改的参数。可用的选择有:
"vcd","svcd","dvd","dv","dv50","pal-vcd","ntsc-svcd",…
这个例子把视频转换成vcd的格式
ffmpeg-imyfile.avi-targetvcd/tmp/vcd.mpg
接下来介绍视频选项:
-b指定码率注意单位是bit/s,所以我们一般要加k,比如-b1000k就是1000kb/s
-g设置组的大小
-vframes指定要编码的帧数,比如-vframes1就是编码1帧,截图的时候就这样写.
-r指定帧率,默认是25
-s指定图像分辨率,用wxh的格式,比如320×240
-aspect指定宽高比可以些16:9这种,也可以写小数比如1.3333
-croptop指定顶部裁减多少像素,类似的还有-cropleft-cropright-cropbuttom
-bt设置比特率容许的误差,默认4000k,在第一阶段时使用这个参数会告诉码率控制器能够偏移平均码率多远,这个选项和最大最小码率无关.设太小了不利于质量
-maxrate和-minrate指定允许的最大和最小码率,一般如果要用cbr模式编码的话会用这个:
ffmpeg-imyfile.avi-b4000k-minrate4000k-maxrate4000k-bufsize1835kout.m2v
否则用处不大
-vcodec强制使用某种编码器
-sameq使用和源文件相同的质量,这个选项是动态码率的
-pass指定编码阶段,这个只有1和2,第一阶段的时候应该不处理音频,并且把输出导向空,比如:
ffmpeg-ifoo.mov-vcodeclibxvid-pass1-an-frawvideo-yNULffmpeg-ifoo.mov-vcodeclibxvid-pass1-an-frawvideo-y/dev/null
-qscale使用固定量化因子来量化视频这个是在vbr模式的,前面有提到,越小质量越好,不要超过50,相关的参数还有-qmin–qmax用来设定最大最小可使用的量化值
-qdiff指定固定量化器因子允许的最大偏差
-qblur指定量化器模糊系数,可用范围是0.0-1.0越大使得码率在时间上分配的越平均
-qcomp指定视频量化器压缩系数,默认0.5
-me_method指定运动估计方法(motionestimationmethod),可用的选择从垃圾到好排列如下:
zero(0向量)
phods
log
x1
hex
umh
epzs(默认)
full(完全搜索,很慢又好不到哪里去)
-mbd设定宏模块决策,可用的值:
0使用mb_cmp,不知道是什么东西,所以这些参数我参考一下mencoder里面的
1选用需要比特最少的宏块模式
2选用码率失真最优的宏块模式
-4mv使用宏块的4个运动向量,只支持mpeg4
-part使用数据划分,只支持mpeg4
-ilme强制允许交错的编码,只支持mpeg2和mpeg4,你可以选择用-deinterlace来去交错
音频部分:
-ar设置采样频率,默认44100hz
-ab设置比特率,默认64k
-an禁用音频录制
-acodec指定音频编码器
下面举几个x264编码的例子:
我使用mencoder调用x264编码一个psp用的视频:
x264+aacinmp4(我修改过的,原作者的不能使用)
mencodertest_video.vob-oaclavc-lavcoptsacodec=libfaac:abitrate=94-ovcx264-x264encopts\
cabac=1:ref=1:deblock=1,0,0:analyse=0x1,0x111:me=hex:subme=6:psy_rd=1.0,0.0:mixed_refs=0:me_range=32:chroma_me=1:trellis=1:8x\
8dct=0:no-chroma-me=0:chroma_qp_offset=-\
2:nr=0:dct_decimate=1:bframes=3:b_pyramid=0:b_adapt=1:b_bias=0:direct=3:keyint=250:keyint_min=25:scenecut=40:qp=18:bitrate=80\
0-lavdoptser=2-oflavf-lavfoptsformat=mp4-vfscale=720:480-omen.mp4
对应的ffmpeg编码参数是:
ffmpeg
ffmpeg-iinputfile.avi-fpsp-acodeclibfaac-ab94k-vcodeclibx264-cqp28-coder1-refs3-deblockalpha1-deblockbeta-1-me_methodumh-subq9-me_range32-trellis2-chromaoffset-2-nr0-bf2-b_strategy1-bframebias0-directpred3-g250-i_qfactor1.3-b_qfactor1.4-flags2+bpyramid+wpred+mixed_refs+8x8dct-er2-s480x320
需要注意的是,flags2里面那块,似乎要按照一定顺序才能正常工作,其他地方都差不多,详细情况可以从下面两篇文章得出:
第一篇是这个在网上被传了很多,但有些问题的对照表格,我修改了有问题的部分:
FFmpegoptionx264option
-g<frames>–keyint
-b<bitspersecond>–bitrate
-bufsize<bits>–vbv-bufsize
-maxrate<bits>–vbv-maxrate
-pass<1,2,3>–pass
-crf<float>–crf
-cqp<int>–qp
-bf<int>–bframes
-coder<0,1>–no-cabac
-bframebias<int>–b-bias
-keyint_min<int>–min-keyint
-sc_threshold<int>–scenecut
-deblockalpha<int>-deblockbeta<int>–deblock
-qmin<int>–qpmin
-qmax<int>–qpmax
-qdiff<int>–qpstep
-qcomp<float>–qcomp
-qblur<float>–qblur
-complexityblur<float>–cplxblur
-refs<int>–ref
-directpred<int>–direct
-me_method<epzs,hex,umh,full>–me
-me_range<int>–merange
-subq<int>–subme
-bidir_refine<0,1>–bime
-trellis<0,1,2>–trellis
-nr<int>–nr
-level<int>–level
-bt<bits>–ratetol=-bt/-b
-rc_init_occupancy<bits>–vbv-init=-rc_init_occupancy/-bufsize
-i_qfactor<float>–ipratio=1/-i_qfactor
-b_qfactor<float>–pbratio
-chromaoffset<int>–chroma-qp-offset
-rc_eq<string>–rc_eq
-threads<int>–threads
-cmp<-chroma/+chroma>–no-chroma-me
-partitions–partitions
+parti8×8i8×8
+parti4×4i4×4
+partp8×8p8×8
+partp4×4p4×4
+partb8×8b8×8
-flags
-loop/+loop–no-deblock/–deblock
-psnr/+psnr–no-psnr/nothing
-flags2
+bpyramid–b-pyramid
+wpred–weightb
+brdo–b-rdo我这里的ffmpeg已经不能用这个了
+mixed_refs–mixed-refs
+dct8×8–8×8dct
-fastpskip/+fastpskip–no-fast-pskip
+aud–aud
下面是一篇关于这些参数详细解释的文章,转自:http://ffmpeg.x264.googlepages.com/mapping
一下是这篇文章在2008年11月19日更新的版本:
Frame-typeoptions:
–keyint<integer>(x264)
-g<integer>(FFmpeg)
Keyframeinterval,alsoknownasGOPlength.ThisdeterminesthemaximumdistancebetweenI-frames.VeryhighGOPlengthswillresultinslightlymoreefficientcompression,butwillmakeseekinginthevideosomewhatmoredifficult.Recommendeddefault:250
–min-keyint<integer>(x264)
-keyint_min<integer>(FFmpeg)
MinimumGOPlength,theminimumdistancebetweenI-frames.Recommendeddefault:25
–scenecut<integer>(x264)
-sc_threshold<integer>(FFmpeg)
Adjuststhesensitivityofx264′sscenecutdetection.Rarelyneedstobeadjusted.Recommendeddefault:40
–pre-scenecut(x264)
UNKNOWN(FFmpeg)
Slightlyfaster(butlessprecise)scenecutdetection.Normalscenecutdetectiondecideswhetheraframeisascenecutaftertheframeisencoded,andifsothenre-encodestheframeasanI-frame.Thisisnotcompatiblewiththreading,however,andso–pre-scenecutisautomaticallyactivatedwhenmultipleencodingthreadsareused.
–bframes<integer>(x264)
-bf<integer>(FFmpeg)
B-framesareacoreelementofH.264andaremoreefficientinH.264thananypreviousstandard.Somespecifictargets,suchasHD-DVDandBlu-Ray,havelimitationsonthenumberofconsecutiveB-frames.Most,however,donot;asaresult,thereisrarelyanynegativeeffecttosettingthistothemaximum(16)sincex264will,ifB-adaptisused,automaticallychoosethebestnumberofB-framesanyways.ThisparametersimplyservestolimitthemaxnumberofB-frames.NotethatBaselineProfile,suchasthatusedbyiPods,doesnotsupportB-frames.Recommendeddefault:16
–b-adapt<integer>(x264)
-b_strategy<integer>(FFmpeg)
x264,bydefault,adaptivelydecidesthroughalow-resolutionlookaheadthebestnumberofB-framestouse.Itispossibletodisablethisadaptivity;thisisnotrecommended.Recommendeddefault:1
0:Veryfast,butnotrecommended.Doesnotworkwithpre-scenecut(scenecutmustbeofftoforceoffb-adapt).
1:Fast,defaultmodeinx264.Agoodbalancebetweenspeedandquality.
2:AmuchslowerbutmoreaccurateB-framedecisionmodethatcorrectlydetectsfadesandgenerallygivesconsiderablybetterquality.Itsspeedgetsconsiderablyslowerathighbframesvalues,soitsrecommendedtokeepbframesrelativelylow(perhapsaround3)whenusingthisoption.Italsomayslowdownthefirstpassofx264wheninthreadedmode.
–b-bias0(x264)
-bframebias0(FFmpeg)
Makex264morelikelytochoosehighernumbersofB-framesduringtheadaptivelookahead.Notgenerallyrecommended.Recommendeddefault:0
–b-pyramid(x264)
-flags2+bpyramid(FFmpeg)
AllowsB-framestobekeptasreferences.Thenameistechnicallymisleading,asx264doesnotactuallyusepyramidcoding;itsimplyaddsB-referencestothenormalreferencelist.B-referencesgetaquantizerhalfwaybetweenthatofaB-frameandP-frame.Thissettingisgenerallybeneficial,butitincreasestheDPB(decodingpicturebuffer)sizerequiredforplayback,sowhenencodingforhardware,disablingitmayhelpcompatibility.
–no-cabac(x264)
-coder0,1(FFmpeg)
CABACisthedefaultentropyencoderusedbyx264.Thoughsomewhatsloweronboththedecodingandencodingend,itoffers10-15%improvedcompressiononlive-actionsourcesandconsiderablyhigherimprovementsonanimatedsources,especiallyatlowbitrates.Itisalsorequiredfortheuseoftrellisquantization.DisablingCABACmaysomewhatimprovedecodingperformance,especiallyathighbitrates.CABACisnotallowedinBaselineProfile.Recommendeddefault:-coder1(CABACenabled)
–ref<integer>(x264)
-refs<integer>(FFmpeg)
OneofH.264′smostusefulfeaturesistheabillitytoreferenceframesotherthantheoneimmediatelypriortothecurrentframe.Thisparameterletsonespecifyhowmanyreferencescanbeused,throughamaximumof16.IncreasingthenumberofrefsincreasestheDPB(DecodedPictureBuffer)requirement,whichmeanshardwareplaybackdeviceswilloftenhavestrictlimitstothenumberofrefstheycanhandle.Inlive-actionsources,morereferencehavelimitedusebeyond4-8,butincartoonsourcesuptothemaximumvalueof16isoftenuseful.Morereferenceframesrequiremoreprocessingpowerbecauseeveryframeissearchedbythemotionsearch(exceptwhenanearlyskipdecisionismade).Theslowdownisespeciallyapparentwithslowermotionestimationmethods.Recommendeddefault:-refs6
–no-deblock(x264)
-flags-loop(FFmpeg)
Disableloopfilter.Recommendeddefault:-flags+loop(Enabled)
–deblock(x264)
-deblockalpha<integer>(FFmpeg)
-deblockbeta<integer>(FFmpeg)
OneofH.264′smainfeaturesisthein-loopdeblocker,whichavoidstheproblemofblockingartifactsdisruptingmotionestimation.ThisrequiresasmallamountofdecodingCPU,butconsiderablyincreasesqualityinnearlyallcases.Itsstrengthmayberaisedorloweredinordertoavoidmoreartifactsorkeepmoredetail,respectively.Deblockhastwoparameters:alpha(strength)andbeta(threshold).Recommendeddefaults:-deblockalpha0-deblockbeta0(Musthave‘-flags+loop’)
–interlaced(x264)
UNKNOWN(FFmpeg)
Enablesinterlacedencoding.x264′sinterlacedencodingisnotasefficientasitsprogressiveencoding;considerdeinterlacingformaximumeffectiveness.
Ratecontrol:
–qp<integer>(x264)
-cqp<integer>(FFmpeg)
Constantquantizermode.Notexactlyconstantcompletely–B-framesandI-frameshavedifferentquantizersfromP-frames.Generallyshouldnotbeused,sinceCRFgivesbetterqualityatthesamebitrate.
–bitrate<integer>(x264)
-b<integer>(FFmpeg)
Enablestargetbitratemode.Attemptstoreachaspecificbitrate.Shouldbeusedin2-passmodewheneverpossible;1-passbitratemodeisgenerallytheworstratecontrolmodex264has.
–crf<float>(x264)
-crf<float>(FFmpeg)
Constantqualitymode(alsoknownasconstantratefactor).Bitratecorrespondsapproximatelytothatofconstantquantizer,butgivesbetterqualityoverallatlittlespeedcost.Thebestone-passoptioninx264.
–vbv-maxrate<integer>(x264)
-maxrate<integer>(FFmpeg)
Specifiesthemaximumbitrateatanypointinthevideo.RequirestheVBVbuffersizetobeset.Thisoptionisgenerallyusedwhenencodingforapieceofhardwarewithbitratelimitations.
–vbv-bufsize<integer>(x264)
-bufsize<integer>(FFmpeg)
Dependsontheprofilelevelofthevideobeingencoded.Setonlyifyou’reencodingforahardwaredevice.
–vbv-init<float>(x264)
-rc_init_occupancy<float>(FFmpeg)
InitialVBVbufferoccupancy.Note:Don’tmesswiththis.
–qpmin<integer>(x264)
-qmin<integer>(FFmpeg)
Minimumquantizer.Doesn’tneedtobechanged.Recommendeddefault:-qmin10
–qpmax<integer>(x264)
-qmax<integer>(FFmpeg)
Maximumquantizer.Doesn’tneedtobechanged.Recommendeddefault:-qmax51
–qpstep<integer>(x264)
-qdiff<integer>(FFmpeg)
SetmaxQPstep.Recommendeddefault:-qdiff4
–ratetol<float>(x264)
-bt<float>(FFmpeg)
Allowedvarianceofaveragebitrate
–ipratio<float>(x264)
-i_qfactor<float>(FFmpeg)
QscaledifferencebetweenI-framesandP-frames.
–pbratio<float>(x264)
-b_qfactor<float>(FFmpeg)
QscaledifferencebetweenP-framesandB-frames.
–chroma-qp-offset<integer>(x264)
-chromaoffset<integer>(FFmpeg)
QPdifferencebetweenchromaandluma.
–aq-strength<float>(x264)
UNKNOWN(FFmpeg)
Adjuststhestrengthofadaptivequantization.Highervaluestakemorebitsawayfromcomplexareasandedgesandmovethemtowardssimpler,flatterareastomaintainfinedetail.Default:1.0
–pass<1,2,3>(x264)
-pass<1,2,3>(FFmpeg)
Usedwith–bitrate.Pass1writesthestatsfile,pass2readsit,and3bothreadsandwritesit.Ifyouwanttousethreepass,thismeansyouwillhavetouse–pass1forthefirstpass,–pass3forthesecond,and–pass2or3forthethird.
–stats<string>(x264)
UNKNOWN(FFmpeg)
Allowssettingaspecificfilenameforthefirstpassstatsfile.
–rceq<string>(x264)
-rc_eq<string>(FFmpeg)
Ratecontrolequation.Recommendeddefault:-rc_eq‘blurCplx^(1-qComp)’
–qcomp<float>(x264)
-qcomp<float>(FFmpeg)
QPcurvecompression:0.0=>CBR,1.0=>CQP.Recommendeddefault:-qcomp0.60
–cplxblur<float>(x264)
-complexityblur<float>(FFmpeg)
ReducefluctuationsinQP(beforecurvecompression)[20.0]
–qblur<float>(x264)
-qblur<float>(FFmpeg)
ReducefluctuationsinQP(aftercurvecompression)[0.5]
–zones/(x264)
UNKNOWN(FFmpeg)
Allowssettingaspecificquantizerforaspecificregionofvideo.
–qpfile(x264)
UNKNOWN(FFmpeg)
Allowsonetoreadinasetofframetypesandquantizersfromafile.Usefulfortestingvariousencodingoptionswhileensuringtheexactsamequantizerdistribution.
Analysis:
–partitions<string>(x264)
-partitions<string>(FFmpeg)
p8x8(x264)/+partp8x8(FFmpeg)
p4x4(x264)/+partp4x4(FFmpeg)
b8x8(x264)/+partb8x8(FFmpeg)
i8x8(x264)/+parti8x8(FFmpeg)
i4x4(x264)/+parti4x4(FFmpeg)
OneofH.264′smostusefulfeaturesistheabilitytochooseamongmanycombinationsofinterandintrapartitions.P-macroblockscanbesubdividedinto16×8,8×16,8×8,4×8,8×4,and4×4partitions.B-macroblockscanbedividedinto16×8,8×16,and8×8partitions.I-macroblockscanbedividedinto4×4or8×8partitions.Analyzingmorepartitionoptionsimprovesqualityatthecostofspeed.Thedefaultistoanalyzeallpartitionsexceptp4x4(p8x8,i8x8,i4x4,b8x8),sincep4x4isnotparticularlyusefulexceptathighbitratesandlowerresolutions.Notethati8x8requires8x8dct,andisthereforeaHighProfile-onlypartition.p8x8isthemostcostly,speed-wise,ofthepartitions,butalsogivesthemostbenefit.Generally,wheneverpossible,allpartitiontypesexceptp4x4shouldbeused.
–direct<integer>(x264)
-directpred<integer>(FFmpeg)
B-framesinH.264canchoosebetweenspatialandtemporalpredictionmode.Autoallowsx264topickthebestofthese;theheuristicusediswhichevermodeallowsmoreskipmacroblocks.Autoshouldgenerallybeused.
–direct-8×8(x264)
UNKONWN(FFmpeg)
Thisshouldbeleftatthedefault(-1).
–weightb(x264)
-flags2+wpred(FFmpeg)
ThisallowsB-framestouseweightedpredictionoptionsotherthanthedefault.Thereisnorealspeedcostforthis,soitshouldalwaysbeenabled.
–me
–merange<integer>(x264)
-me_range<integer>(FFmpeg)
MErangecontrolsthemaxrangeofthemotionsearch.ForHEXandDIA,thisisclampedtobetween4and16,withadefaultof16.ForUMHandESA,itcanbeincreasedbeyondthedefault16toallowforawider-rangemotionsearch,whichisusefulonHDfootageandforhigh-motionfootage.NotethatforUMHandESA,increasingMErangewillsignificantlyslowdownencoding.
–mvrange(x264)
UNKNOWN(FFmpeg)
Limitsthemaximummotionvectorrange.Sincex264bydefaultlimitsthisto511.75forstandardscompliance,thisshouldnotbechanged.
–subme6(x264)
-subq6(FFmpeg)
1:Fastest,butextremelylowquality.Shouldbeavoidedexceptonfirstpassencoding.
2-5:Progressivelybetterandslower,5servesasagoodmediumforhigherspeedencoding.
6-7:6isthedefault.Activatesrate-distortionoptimizationforpartitiondecision.Thiscanconsiderablyimproveefficiency,thoughithasanotablespeedcost.6activatesitinI/Pframes,andsubme7activatesitinBframes.
8-9:Activatesrate-distortionrefinement,whichusesRDOtorefinebothmotionvectorsandintrapredictionmodes.Slowerthansubme6,butagain,moreefficient.
Anextremelyimportantencodingparameterwhichdetermineswhatalgorithmsareusedforbothsubpixelmotionsearchingandpartitiondecision.
–psy-rd<float>:<float>(x264)
UNKNOWN(FFmpeg)
Firstvaluerepresentstheamountthatx264biasesinfavorofdetailretentioninsteadofmaxPSNRinmodedecision.Requiressubme>=6.Secondvalueispsy-trellis,anexperimentalalgorithmthattriestoimprovesharpnessanddetailretentionattheexpenseofmoreartifacting.Recommendedstartingvaluesare0.1-0.2.Requirestrellis>=1.Recommendeddefault:1.0:0.0
–mixed-refs(x264)
-flags2+mixed_refs(FFmpeg)
H.264allowsp8x8blockstoselectdifferentreferencesforeachp8x8block.Thisoptionallowsthisanalysistobedone,andboostsqualitywithlittlespeedimpact.Itshouldgenerallybeused,thoughitobviouslyhasnoeffectwithonlyonereferenceframe.
–no-chroma-me(x264)
UNKNOWN(FFmpeg)
Chromaisusedinthelaststepsofthesubpixelrefinementbydefault.Foraslightspeedincrease,thiscanbedisabled(atthecostofquality).
–8x8dct(x264)
-flags2+dct8x8(FFmpeg)
Givesanotablequalityboostbyallowingx264tochoosebetween8×8and4×4frequencytransformsize.Requiredfori8x8partitions.Speedcostforthisoptionisnear-zerobothforencodinganddecoding;theonlyreasontodisableitiswhenoneneedssupportonadevicenotcompatiblewithHighProfile.
–trellis<0,1,2>(x264)
-trellis<0,1,2>(FFmpeg)
0:disabled
1:enabledonlyonthefinalencodeofaMB
2:enabledonallmodedecisions
Themaindecisionmadeinquantizationiswhichcoefficientstoroundupandwhichtorounddown.Trellischoosestheoptimalroundingchoicesforthemaximumrate-distortionscore,tomaximizePSNRrelativetobitrate.Thisgenerallyincreasesqualityrelativetobitratebyabout5%forasomewhatsmallspeedcost.Itshouldgenerallybeenabled.NotethattrellisrequiresCABAC.
–no-fast-pskip(x264)
-flags2-fastpskip(FFmpeg)
Bydefault,x264willskipmacroblocksinP-framesthatdon’tappeartohavechangedenoughbetweentwoframestojustifyencodingthedifference.Thisconsiderablyspeedsupencoding.However,foraslightqualityboost,P-skipcanbedisabled.Inthiscase,thefullanalysiswillbedoneonallP-blocks,andtheonlyskipsintheoutputstreamwillbetheblockswhosemotionvectorshappentomatchthatoftheskipvectorandmotionvectorshappentomatchthatoftheskipvectorandwhichhavenoresidual.Thespeedcostofenablingno-fast-pskipisrelativelyhigh,especiallywithmanyreferenceframes.ThereisasimilarB-skipinternaltox264,whichiswhyB-framesgenerallyencodemuchfasterthanP-frames,butitcannotbedisabledonthecommandline.
–no-dct-decimate(x264)
UNKNOWN(FFmpeg)
Bydefault,x264willdecimate(removeallcoefficientsfrom)P-blocksthatareextremelyclosetoemptyofcoefficents.Thiscanimproveoverallefficiencywithlittlevisualcost,butmayworkagainstanattempttoretaingrainorsimilar.DCTdecimationshouldbeleftonunlessthere’sagoodreasontodisableit.
–nr(x264)
UNKNOWN(FFmpeg)
afast,built-innoisereductionroutine.Notaseffectiveasexternalfilterssuchashqdn3d,butfaster.Sincex264alreadynaturallyreducesnoisethroughitsquantizationprocess,thisparameterisnotusuallynecessary.
–deadzone-inter(264)
–deadzone-intra(x264)
UNKNOWN(FFmpeg)
UNKNOWN(FFmpeg)
Whentrellisisn’tactivated,deadzoneparametersdeterminehowmanyDCTcoefficientsareroundedupordown.Roundingupresultsinhigherqualityandmoredetailretention,butcostsmorebits–soroundingisabalancebetweenqualityandbitcost.Loweringthesesettingswillresultinmorecoefficientsbeingroundedup,andraisingthesettingswillresultinmorecoefficientsbeingroundeddown.Recommended:keepthematthedefaults.
–cqm(264)
–cqpfile(x264)UNKNOWN(FFmpeg)
UNKNOWN(FFmpeg)
Allowstheuseofacustomquantizationmatrixtoweightfrequenciesdifferentlyinthequantizationprocess.Thepresetsquantmatricesare"jvt"and"flat".–cqpfilereadsacustomquantmatricesfromaJM-compatiblefile.Recommendedonlyifyouknowwhatyou’redoing.