ffprobe-all.html 2.1 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by , GNU Texinfo 7.1 -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. ffprobe Documentation
  8. </title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  10. <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  11. <link rel="stylesheet" type="text/css" href="style.min.css">
  12. </head>
  13. <body>
  14. <div class="container">
  15. <h1>
  16. ffprobe Documentation
  17. </h1>
  18. <div class="top-level-extent" id="SEC_Top">
  19. <div class="element-contents" id="SEC_Contents">
  20. <h2 class="contents-heading">Table of Contents</h2>
  21. <div class="contents">
  22. <ul class="toc-numbered-mark">
  23. <li><a id="toc-Synopsis" href="#Synopsis">1 Synopsis</a></li>
  24. <li><a id="toc-Description" href="#Description">2 Description</a></li>
  25. <li><a id="toc-Options" href="#Options">3 Options</a>
  26. <ul class="toc-numbered-mark">
  27. <li><a id="toc-Stream-specifiers-1" href="#Stream-specifiers-1">3.1 Stream specifiers</a></li>
  28. <li><a id="toc-Generic-options" href="#Generic-options">3.2 Generic options</a></li>
  29. <li><a id="toc-AVOptions" href="#AVOptions">3.3 AVOptions</a></li>
  30. <li><a id="toc-Main-options" href="#Main-options">3.4 Main options</a></li>
  31. </ul></li>
  32. <li><a id="toc-Writers" href="#Writers">4 Writers</a>
  33. <ul class="toc-numbered-mark">
  34. <li><a id="toc-default" href="#default">4.1 default</a></li>
  35. <li><a id="toc-compact_002c-csv" href="#compact_002c-csv">4.2 compact, csv</a></li>
  36. <li><a id="toc-flat" href="#flat">4.3 flat</a></li>
  37. <li><a id="toc-ini" href="#ini">4.4 ini</a></li>
  38. <li><a id="toc-json" href="#json">4.5 json</a></li>
  39. <li><a id="toc-xml" href="#xml">4.6 xml</a></li>
  40. </ul></li>
  41. <li><a id="toc-Timecode" href="#Timecode">5 Timecode</a></li>
  42. <li><a id="toc-Syntax" href="#Syntax">6 Syntax</a>
  43. <ul class="toc-numbered-mark">
  44. <li><a id="toc-Quoting-and-escaping" href="#Quoting-and-escaping">6.1 Quoting and escaping</a>
  45. <ul class="toc-numbered-mark">
  46. <li><a id="toc-Examples" href="#Examples">6.1.1 Examples</a></li>
  47. </ul></li>
  48. <li><a id="toc-Date" href="#Date">6.2 Date</a></li>
  49. <li><a id="toc-Time-duration" href="#Time-duration">6.3 Time duration</a>
  50. <ul class="toc-numbered-mark">
  51. <li><a id="toc-Examples-1" href="#Examples-1">6.3.1 Examples</a></li>
  52. </ul></li>
  53. <li><a id="toc-Video-size" href="#Video-size">6.4 Video size</a></li>
  54. <li><a id="toc-Video-rate" href="#Video-rate">6.5 Video rate</a></li>
  55. <li><a id="toc-Ratio" href="#Ratio">6.6 Ratio</a></li>
  56. <li><a id="toc-Color" href="#Color">6.7 Color</a></li>
  57. <li><a id="toc-Channel-Layout" href="#Channel-Layout">6.8 Channel Layout</a></li>
  58. </ul></li>
  59. <li><a id="toc-Expression-Evaluation" href="#Expression-Evaluation">7 Expression Evaluation</a></li>
  60. <li><a id="toc-Codec-Options" href="#Codec-Options">8 Codec Options</a></li>
  61. <li><a id="toc-Decoders" href="#Decoders">9 Decoders</a></li>
  62. <li><a id="toc-Video-Decoders" href="#Video-Decoders">10 Video Decoders</a>
  63. <ul class="toc-numbered-mark">
  64. <li><a id="toc-av1" href="#av1">10.1 av1</a>
  65. <ul class="toc-numbered-mark">
  66. <li><a id="toc-Options-1" href="#Options-1">10.1.1 Options</a></li>
  67. </ul></li>
  68. <li><a id="toc-rawvideo" href="#rawvideo">10.2 rawvideo</a>
  69. <ul class="toc-numbered-mark">
  70. <li><a id="toc-Options-2" href="#Options-2">10.2.1 Options</a></li>
  71. </ul></li>
  72. <li><a id="toc-libdav1d" href="#libdav1d">10.3 libdav1d</a>
  73. <ul class="toc-numbered-mark">
  74. <li><a id="toc-Options-3" href="#Options-3">10.3.1 Options</a></li>
  75. </ul></li>
  76. <li><a id="toc-libdavs2" href="#libdavs2">10.4 libdavs2</a></li>
  77. <li><a id="toc-libuavs3d" href="#libuavs3d">10.5 libuavs3d</a>
  78. <ul class="toc-numbered-mark">
  79. <li><a id="toc-Options-4" href="#Options-4">10.5.1 Options</a></li>
  80. </ul></li>
  81. <li><a id="toc-libxevd" href="#libxevd">10.6 libxevd</a>
  82. <ul class="toc-numbered-mark">
  83. <li><a id="toc-Options-5" href="#Options-5">10.6.1 Options</a></li>
  84. </ul></li>
  85. <li><a id="toc-QSV-Decoders" href="#QSV-Decoders">10.7 QSV Decoders</a>
  86. <ul class="toc-numbered-mark">
  87. <li><a id="toc-Common-Options" href="#Common-Options">10.7.1 Common Options</a></li>
  88. <li><a id="toc-HEVC-Options" href="#HEVC-Options">10.7.2 HEVC Options</a></li>
  89. </ul></li>
  90. <li><a id="toc-v210" href="#v210">10.8 v210</a>
  91. <ul class="toc-numbered-mark">
  92. <li><a id="toc-Options-6" href="#Options-6">10.8.1 Options</a></li>
  93. </ul></li>
  94. </ul></li>
  95. <li><a id="toc-Audio-Decoders" href="#Audio-Decoders">11 Audio Decoders</a>
  96. <ul class="toc-numbered-mark">
  97. <li><a id="toc-ac3" href="#ac3">11.1 ac3</a>
  98. <ul class="toc-numbered-mark">
  99. <li><a id="toc-AC_002d3-Decoder-Options" href="#AC_002d3-Decoder-Options">11.1.1 AC-3 Decoder Options</a></li>
  100. </ul></li>
  101. <li><a id="toc-flac" href="#flac">11.2 flac</a>
  102. <ul class="toc-numbered-mark">
  103. <li><a id="toc-FLAC-Decoder-options" href="#FLAC-Decoder-options">11.2.1 FLAC Decoder options</a></li>
  104. </ul></li>
  105. <li><a id="toc-ffwavesynth" href="#ffwavesynth">11.3 ffwavesynth</a></li>
  106. <li><a id="toc-libcelt" href="#libcelt">11.4 libcelt</a></li>
  107. <li><a id="toc-libgsm" href="#libgsm">11.5 libgsm</a></li>
  108. <li><a id="toc-libilbc" href="#libilbc">11.6 libilbc</a>
  109. <ul class="toc-numbered-mark">
  110. <li><a id="toc-Options-7" href="#Options-7">11.6.1 Options</a></li>
  111. </ul></li>
  112. <li><a id="toc-libopencore_002damrnb" href="#libopencore_002damrnb">11.7 libopencore-amrnb</a></li>
  113. <li><a id="toc-libopencore_002damrwb" href="#libopencore_002damrwb">11.8 libopencore-amrwb</a></li>
  114. <li><a id="toc-libopus" href="#libopus">11.9 libopus</a></li>
  115. </ul></li>
  116. <li><a id="toc-Subtitles-Decoders" href="#Subtitles-Decoders">12 Subtitles Decoders</a>
  117. <ul class="toc-numbered-mark">
  118. <li><a id="toc-libaribb24" href="#libaribb24">12.1 libaribb24</a>
  119. <ul class="toc-numbered-mark">
  120. <li><a id="toc-libaribb24-Decoder-Options" href="#libaribb24-Decoder-Options">12.1.1 libaribb24 Decoder Options</a></li>
  121. </ul></li>
  122. <li><a id="toc-libaribcaption" href="#libaribcaption">12.2 libaribcaption</a>
  123. <ul class="toc-numbered-mark">
  124. <li><a id="toc-libaribcaption-Decoder-Options" href="#libaribcaption-Decoder-Options">12.2.1 libaribcaption Decoder Options</a></li>
  125. <li><a id="toc-libaribcaption-decoder-usage-examples" href="#libaribcaption-decoder-usage-examples">12.2.2 libaribcaption decoder usage examples</a></li>
  126. </ul></li>
  127. <li><a id="toc-dvbsub" href="#dvbsub">12.3 dvbsub</a>
  128. <ul class="toc-numbered-mark">
  129. <li><a id="toc-Options-8" href="#Options-8">12.3.1 Options</a></li>
  130. </ul></li>
  131. <li><a id="toc-dvdsub" href="#dvdsub">12.4 dvdsub</a>
  132. <ul class="toc-numbered-mark">
  133. <li><a id="toc-Options-9" href="#Options-9">12.4.1 Options</a></li>
  134. </ul></li>
  135. <li><a id="toc-libzvbi_002dteletext" href="#libzvbi_002dteletext">12.5 libzvbi-teletext</a>
  136. <ul class="toc-numbered-mark">
  137. <li><a id="toc-Options-10" href="#Options-10">12.5.1 Options</a></li>
  138. </ul></li>
  139. </ul></li>
  140. <li><a id="toc-Bitstream-Filters" href="#Bitstream-Filters">13 Bitstream Filters</a>
  141. <ul class="toc-numbered-mark">
  142. <li><a id="toc-aac_005fadtstoasc" href="#aac_005fadtstoasc">13.1 aac_adtstoasc</a></li>
  143. <li><a id="toc-av1_005fmetadata" href="#av1_005fmetadata">13.2 av1_metadata</a></li>
  144. <li><a id="toc-chomp" href="#chomp">13.3 chomp</a></li>
  145. <li><a id="toc-dca_005fcore" href="#dca_005fcore">13.4 dca_core</a></li>
  146. <li><a id="toc-dump_005fextra" href="#dump_005fextra">13.5 dump_extra</a></li>
  147. <li><a id="toc-dv_005ferror_005fmarker" href="#dv_005ferror_005fmarker">13.6 dv_error_marker</a></li>
  148. <li><a id="toc-eac3_005fcore" href="#eac3_005fcore">13.7 eac3_core</a></li>
  149. <li><a id="toc-extract_005fextradata" href="#extract_005fextradata">13.8 extract_extradata</a></li>
  150. <li><a id="toc-filter_005funits" href="#filter_005funits">13.9 filter_units</a></li>
  151. <li><a id="toc-hapqa_005fextract" href="#hapqa_005fextract">13.10 hapqa_extract</a></li>
  152. <li><a id="toc-h264_005fmetadata" href="#h264_005fmetadata">13.11 h264_metadata</a></li>
  153. <li><a id="toc-h264_005fmp4toannexb" href="#h264_005fmp4toannexb">13.12 h264_mp4toannexb</a></li>
  154. <li><a id="toc-h264_005fredundant_005fpps" href="#h264_005fredundant_005fpps">13.13 h264_redundant_pps</a></li>
  155. <li><a id="toc-hevc_005fmetadata" href="#hevc_005fmetadata">13.14 hevc_metadata</a></li>
  156. <li><a id="toc-hevc_005fmp4toannexb" href="#hevc_005fmp4toannexb">13.15 hevc_mp4toannexb</a></li>
  157. <li><a id="toc-imxdump" href="#imxdump">13.16 imxdump</a></li>
  158. <li><a id="toc-mjpeg2jpeg" href="#mjpeg2jpeg">13.17 mjpeg2jpeg</a></li>
  159. <li><a id="toc-mjpegadump" href="#mjpegadump">13.18 mjpegadump</a></li>
  160. <li><a id="toc-mov2textsub-1" href="#mov2textsub-1">13.19 mov2textsub</a></li>
  161. <li><a id="toc-mpeg2_005fmetadata" href="#mpeg2_005fmetadata">13.20 mpeg2_metadata</a></li>
  162. <li><a id="toc-mpeg4_005funpack_005fbframes" href="#mpeg4_005funpack_005fbframes">13.21 mpeg4_unpack_bframes</a></li>
  163. <li><a id="toc-noise" href="#noise">13.22 noise</a>
  164. <ul class="toc-numbered-mark">
  165. <li><a id="toc-Examples-2" href="#Examples-2">13.22.1 Examples</a></li>
  166. </ul></li>
  167. <li><a id="toc-null" href="#null">13.23 null</a></li>
  168. <li><a id="toc-pcm_005frechunk" href="#pcm_005frechunk">13.24 pcm_rechunk</a></li>
  169. <li><a id="toc-pgs_005fframe_005fmerge" href="#pgs_005fframe_005fmerge">13.25 pgs_frame_merge</a></li>
  170. <li><a id="toc-prores_005fmetadata" href="#prores_005fmetadata">13.26 prores_metadata</a></li>
  171. <li><a id="toc-remove_005fextra" href="#remove_005fextra">13.27 remove_extra</a></li>
  172. <li><a id="toc-setts" href="#setts">13.28 setts</a></li>
  173. <li><a id="toc-showinfo" href="#showinfo">13.29 showinfo</a></li>
  174. <li><a id="toc-text2movsub-1" href="#text2movsub-1">13.30 text2movsub</a></li>
  175. <li><a id="toc-trace_005fheaders" href="#trace_005fheaders">13.31 trace_headers</a></li>
  176. <li><a id="toc-truehd_005fcore" href="#truehd_005fcore">13.32 truehd_core</a></li>
  177. <li><a id="toc-vp9_005fmetadata" href="#vp9_005fmetadata">13.33 vp9_metadata</a></li>
  178. <li><a id="toc-vp9_005fsuperframe" href="#vp9_005fsuperframe">13.34 vp9_superframe</a></li>
  179. <li><a id="toc-vp9_005fsuperframe_005fsplit" href="#vp9_005fsuperframe_005fsplit">13.35 vp9_superframe_split</a></li>
  180. <li><a id="toc-vp9_005fraw_005freorder" href="#vp9_005fraw_005freorder">13.36 vp9_raw_reorder</a></li>
  181. </ul></li>
  182. <li><a id="toc-Format-Options" href="#Format-Options">14 Format Options</a>
  183. <ul class="toc-numbered-mark">
  184. <li><a id="toc-Format-stream-specifiers-1" href="#Format-stream-specifiers-1">14.1 Format stream specifiers</a></li>
  185. </ul></li>
  186. <li><a id="toc-Demuxers" href="#Demuxers">15 Demuxers</a>
  187. <ul class="toc-numbered-mark">
  188. <li><a id="toc-aa" href="#aa">15.1 aa</a></li>
  189. <li><a id="toc-aac" href="#aac">15.2 aac</a></li>
  190. <li><a id="toc-apng" href="#apng">15.3 apng</a></li>
  191. <li><a id="toc-asf" href="#asf">15.4 asf</a></li>
  192. <li><a id="toc-concat-1" href="#concat-1">15.5 concat</a>
  193. <ul class="toc-numbered-mark">
  194. <li><a id="toc-Syntax-1" href="#Syntax-1">15.5.1 Syntax</a></li>
  195. <li><a id="toc-Options-11" href="#Options-11">15.5.2 Options</a></li>
  196. <li><a id="toc-Examples-3" href="#Examples-3">15.5.3 Examples</a></li>
  197. </ul></li>
  198. <li><a id="toc-dash" href="#dash">15.6 dash</a>
  199. <ul class="toc-numbered-mark">
  200. <li><a id="toc-Options-12" href="#Options-12">15.6.1 Options</a></li>
  201. </ul></li>
  202. <li><a id="toc-dvdvideo" href="#dvdvideo">15.7 dvdvideo</a>
  203. <ul class="toc-numbered-mark">
  204. <li><a id="toc-Background" href="#Background">15.7.1 Background</a></li>
  205. <li><a id="toc-Options-13" href="#Options-13">15.7.2 Options</a></li>
  206. <li><a id="toc-Examples-4" href="#Examples-4">15.7.3 Examples</a></li>
  207. </ul></li>
  208. <li><a id="toc-ea" href="#ea">15.8 ea</a>
  209. <ul class="toc-numbered-mark">
  210. <li><a id="toc-Options-14" href="#Options-14">15.8.1 Options</a></li>
  211. </ul></li>
  212. <li><a id="toc-imf" href="#imf">15.9 imf</a></li>
  213. <li><a id="toc-flv_002c-live_005fflv_002c-kux" href="#flv_002c-live_005fflv_002c-kux">15.10 flv, live_flv, kux</a></li>
  214. <li><a id="toc-gif" href="#gif">15.11 gif</a></li>
  215. <li><a id="toc-hls" href="#hls">15.12 hls</a></li>
  216. <li><a id="toc-image2" href="#image2">15.13 image2</a>
  217. <ul class="toc-numbered-mark">
  218. <li><a id="toc-Examples-5" href="#Examples-5">15.13.1 Examples</a></li>
  219. </ul></li>
  220. <li><a id="toc-libgme" href="#libgme">15.14 libgme</a></li>
  221. <li><a id="toc-libmodplug" href="#libmodplug">15.15 libmodplug</a></li>
  222. <li><a id="toc-libopenmpt" href="#libopenmpt">15.16 libopenmpt</a></li>
  223. <li><a id="toc-mov_002fmp4_002f3gp" href="#mov_002fmp4_002f3gp">15.17 mov/mp4/3gp</a>
  224. <ul class="toc-numbered-mark">
  225. <li><a id="toc-Options-15" href="#Options-15">15.17.1 Options</a></li>
  226. <li><a id="toc-Audible-AAX" href="#Audible-AAX">15.17.2 Audible AAX</a></li>
  227. </ul></li>
  228. <li><a id="toc-mpegts" href="#mpegts">15.18 mpegts</a></li>
  229. <li><a id="toc-mpjpeg" href="#mpjpeg">15.19 mpjpeg</a></li>
  230. <li><a id="toc-rawvideo-1" href="#rawvideo-1">15.20 rawvideo</a></li>
  231. <li><a id="toc-sbg" href="#sbg">15.21 sbg</a></li>
  232. <li><a id="toc-tedcaptions" href="#tedcaptions">15.22 tedcaptions</a></li>
  233. <li><a id="toc-vapoursynth" href="#vapoursynth">15.23 vapoursynth</a></li>
  234. <li><a id="toc-w64" href="#w64">15.24 w64</a></li>
  235. <li><a id="toc-wav-1" href="#wav-1">15.25 wav</a></li>
  236. </ul></li>
  237. <li><a id="toc-Metadata" href="#Metadata">16 Metadata</a></li>
  238. <li><a id="toc-Protocol-Options" href="#Protocol-Options">17 Protocol Options</a></li>
  239. <li><a id="toc-Protocols" href="#Protocols">18 Protocols</a>
  240. <ul class="toc-numbered-mark">
  241. <li><a id="toc-amqp" href="#amqp">18.1 amqp</a></li>
  242. <li><a id="toc-async" href="#async">18.2 async</a></li>
  243. <li><a id="toc-bluray" href="#bluray">18.3 bluray</a></li>
  244. <li><a id="toc-cache" href="#cache">18.4 cache</a></li>
  245. <li><a id="toc-concat-2" href="#concat-2">18.5 concat</a></li>
  246. <li><a id="toc-concatf" href="#concatf">18.6 concatf</a></li>
  247. <li><a id="toc-crypto" href="#crypto">18.7 crypto</a></li>
  248. <li><a id="toc-data" href="#data">18.8 data</a></li>
  249. <li><a id="toc-fd" href="#fd">18.9 fd</a></li>
  250. <li><a id="toc-file" href="#file">18.10 file</a></li>
  251. <li><a id="toc-ftp" href="#ftp">18.11 ftp</a></li>
  252. <li><a id="toc-gopher" href="#gopher">18.12 gopher</a></li>
  253. <li><a id="toc-gophers" href="#gophers">18.13 gophers</a></li>
  254. <li><a id="toc-hls-1" href="#hls-1">18.14 hls</a></li>
  255. <li><a id="toc-http" href="#http">18.15 http</a>
  256. <ul class="toc-numbered-mark">
  257. <li><a id="toc-HTTP-Cookies" href="#HTTP-Cookies">18.15.1 HTTP Cookies</a></li>
  258. </ul></li>
  259. <li><a id="toc-Icecast" href="#Icecast">18.16 Icecast</a></li>
  260. <li><a id="toc-ipfs" href="#ipfs">18.17 ipfs</a></li>
  261. <li><a id="toc-mmst" href="#mmst">18.18 mmst</a></li>
  262. <li><a id="toc-mmsh" href="#mmsh">18.19 mmsh</a></li>
  263. <li><a id="toc-md5" href="#md5">18.20 md5</a></li>
  264. <li><a id="toc-pipe" href="#pipe">18.21 pipe</a></li>
  265. <li><a id="toc-prompeg" href="#prompeg">18.22 prompeg</a></li>
  266. <li><a id="toc-rist" href="#rist">18.23 rist</a></li>
  267. <li><a id="toc-rtmp" href="#rtmp">18.24 rtmp</a></li>
  268. <li><a id="toc-rtmpe" href="#rtmpe">18.25 rtmpe</a></li>
  269. <li><a id="toc-rtmps" href="#rtmps">18.26 rtmps</a></li>
  270. <li><a id="toc-rtmpt" href="#rtmpt">18.27 rtmpt</a></li>
  271. <li><a id="toc-rtmpte" href="#rtmpte">18.28 rtmpte</a></li>
  272. <li><a id="toc-rtmpts" href="#rtmpts">18.29 rtmpts</a></li>
  273. <li><a id="toc-libsmbclient" href="#libsmbclient">18.30 libsmbclient</a></li>
  274. <li><a id="toc-libssh" href="#libssh">18.31 libssh</a></li>
  275. <li><a id="toc-librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">18.32 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
  276. <li><a id="toc-rtp" href="#rtp">18.33 rtp</a></li>
  277. <li><a id="toc-rtsp" href="#rtsp">18.34 rtsp</a>
  278. <ul class="toc-numbered-mark">
  279. <li><a id="toc-Muxer" href="#Muxer">18.34.1 Muxer</a></li>
  280. <li><a id="toc-Demuxer" href="#Demuxer">18.34.2 Demuxer</a></li>
  281. <li><a id="toc-Examples-6" href="#Examples-6">18.34.3 Examples</a></li>
  282. </ul></li>
  283. <li><a id="toc-sap" href="#sap">18.35 sap</a>
  284. <ul class="toc-numbered-mark">
  285. <li><a id="toc-Muxer-1" href="#Muxer-1">18.35.1 Muxer</a></li>
  286. <li><a id="toc-Demuxer-1" href="#Demuxer-1">18.35.2 Demuxer</a></li>
  287. </ul></li>
  288. <li><a id="toc-sctp" href="#sctp">18.36 sctp</a></li>
  289. <li><a id="toc-srt" href="#srt">18.37 srt</a></li>
  290. <li><a id="toc-srtp" href="#srtp">18.38 srtp</a></li>
  291. <li><a id="toc-subfile" href="#subfile">18.39 subfile</a></li>
  292. <li><a id="toc-tee" href="#tee">18.40 tee</a></li>
  293. <li><a id="toc-tcp" href="#tcp">18.41 tcp</a></li>
  294. <li><a id="toc-tls" href="#tls">18.42 tls</a></li>
  295. <li><a id="toc-udp" href="#udp">18.43 udp</a>
  296. <ul class="toc-numbered-mark">
  297. <li><a id="toc-Examples-7" href="#Examples-7">18.43.1 Examples</a></li>
  298. </ul></li>
  299. <li><a id="toc-unix" href="#unix">18.44 unix</a></li>
  300. <li><a id="toc-zmq" href="#zmq">18.45 zmq</a></li>
  301. </ul></li>
  302. <li><a id="toc-Device-Options" href="#Device-Options">19 Device Options</a></li>
  303. <li><a id="toc-Input-Devices" href="#Input-Devices">20 Input Devices</a>
  304. <ul class="toc-numbered-mark">
  305. <li><a id="toc-alsa" href="#alsa">20.1 alsa</a>
  306. <ul class="toc-numbered-mark">
  307. <li><a id="toc-Options-16" href="#Options-16">20.1.1 Options</a></li>
  308. </ul></li>
  309. <li><a id="toc-android_005fcamera" href="#android_005fcamera">20.2 android_camera</a>
  310. <ul class="toc-numbered-mark">
  311. <li><a id="toc-Options-17" href="#Options-17">20.2.1 Options</a></li>
  312. </ul></li>
  313. <li><a id="toc-avfoundation" href="#avfoundation">20.3 avfoundation</a>
  314. <ul class="toc-numbered-mark">
  315. <li><a id="toc-Options-18" href="#Options-18">20.3.1 Options</a></li>
  316. <li><a id="toc-Examples-8" href="#Examples-8">20.3.2 Examples</a></li>
  317. </ul></li>
  318. <li><a id="toc-bktr" href="#bktr">20.4 bktr</a>
  319. <ul class="toc-numbered-mark">
  320. <li><a id="toc-Options-19" href="#Options-19">20.4.1 Options</a></li>
  321. </ul></li>
  322. <li><a id="toc-decklink" href="#decklink">20.5 decklink</a>
  323. <ul class="toc-numbered-mark">
  324. <li><a id="toc-Options-20" href="#Options-20">20.5.1 Options</a></li>
  325. <li><a id="toc-Examples-9" href="#Examples-9">20.5.2 Examples</a></li>
  326. </ul></li>
  327. <li><a id="toc-dshow" href="#dshow">20.6 dshow</a>
  328. <ul class="toc-numbered-mark">
  329. <li><a id="toc-Options-21" href="#Options-21">20.6.1 Options</a></li>
  330. <li><a id="toc-Examples-10" href="#Examples-10">20.6.2 Examples</a></li>
  331. </ul></li>
  332. <li><a id="toc-fbdev" href="#fbdev">20.7 fbdev</a>
  333. <ul class="toc-numbered-mark">
  334. <li><a id="toc-Options-22" href="#Options-22">20.7.1 Options</a></li>
  335. </ul></li>
  336. <li><a id="toc-gdigrab" href="#gdigrab">20.8 gdigrab</a>
  337. <ul class="toc-numbered-mark">
  338. <li><a id="toc-Options-23" href="#Options-23">20.8.1 Options</a></li>
  339. </ul></li>
  340. <li><a id="toc-iec61883" href="#iec61883">20.9 iec61883</a>
  341. <ul class="toc-numbered-mark">
  342. <li><a id="toc-Options-24" href="#Options-24">20.9.1 Options</a></li>
  343. <li><a id="toc-Examples-11" href="#Examples-11">20.9.2 Examples</a></li>
  344. </ul></li>
  345. <li><a id="toc-jack" href="#jack">20.10 jack</a>
  346. <ul class="toc-numbered-mark">
  347. <li><a id="toc-Options-25" href="#Options-25">20.10.1 Options</a></li>
  348. </ul></li>
  349. <li><a id="toc-kmsgrab" href="#kmsgrab">20.11 kmsgrab</a>
  350. <ul class="toc-numbered-mark">
  351. <li><a id="toc-Options-26" href="#Options-26">20.11.1 Options</a></li>
  352. <li><a id="toc-Examples-12" href="#Examples-12">20.11.2 Examples</a></li>
  353. </ul></li>
  354. <li><a id="toc-lavfi" href="#lavfi">20.12 lavfi</a>
  355. <ul class="toc-numbered-mark">
  356. <li><a id="toc-Options-27" href="#Options-27">20.12.1 Options</a></li>
  357. <li><a id="toc-Examples-13" href="#Examples-13">20.12.2 Examples</a></li>
  358. </ul></li>
  359. <li><a id="toc-libcdio" href="#libcdio">20.13 libcdio</a>
  360. <ul class="toc-numbered-mark">
  361. <li><a id="toc-Options-28" href="#Options-28">20.13.1 Options</a></li>
  362. </ul></li>
  363. <li><a id="toc-libdc1394" href="#libdc1394">20.14 libdc1394</a>
  364. <ul class="toc-numbered-mark">
  365. <li><a id="toc-Options-29" href="#Options-29">20.14.1 Options</a></li>
  366. </ul></li>
  367. <li><a id="toc-openal" href="#openal">20.15 openal</a>
  368. <ul class="toc-numbered-mark">
  369. <li><a id="toc-Options-30" href="#Options-30">20.15.1 Options</a></li>
  370. <li><a id="toc-Examples-14" href="#Examples-14">20.15.2 Examples</a></li>
  371. </ul></li>
  372. <li><a id="toc-oss" href="#oss">20.16 oss</a>
  373. <ul class="toc-numbered-mark">
  374. <li><a id="toc-Options-31" href="#Options-31">20.16.1 Options</a></li>
  375. </ul></li>
  376. <li><a id="toc-pulse" href="#pulse">20.17 pulse</a>
  377. <ul class="toc-numbered-mark">
  378. <li><a id="toc-Options-32" href="#Options-32">20.17.1 Options</a></li>
  379. <li><a id="toc-Examples-15" href="#Examples-15">20.17.2 Examples</a></li>
  380. </ul></li>
  381. <li><a id="toc-sndio" href="#sndio">20.18 sndio</a>
  382. <ul class="toc-numbered-mark">
  383. <li><a id="toc-Options-33" href="#Options-33">20.18.1 Options</a></li>
  384. </ul></li>
  385. <li><a id="toc-video4linux2_002c-v4l2" href="#video4linux2_002c-v4l2">20.19 video4linux2, v4l2</a>
  386. <ul class="toc-numbered-mark">
  387. <li><a id="toc-Options-34" href="#Options-34">20.19.1 Options</a></li>
  388. </ul></li>
  389. <li><a id="toc-vfwcap" href="#vfwcap">20.20 vfwcap</a>
  390. <ul class="toc-numbered-mark">
  391. <li><a id="toc-Options-35" href="#Options-35">20.20.1 Options</a></li>
  392. </ul></li>
  393. <li><a id="toc-x11grab" href="#x11grab">20.21 x11grab</a>
  394. <ul class="toc-numbered-mark">
  395. <li><a id="toc-Options-36" href="#Options-36">20.21.1 Options</a></li>
  396. </ul></li>
  397. </ul></li>
  398. <li><a id="toc-Resampler-Options" href="#Resampler-Options">21 Resampler Options</a></li>
  399. <li><a id="toc-Scaler-Options" href="#Scaler-Options">22 Scaler Options</a></li>
  400. <li><a id="toc-Filtering-Introduction" href="#Filtering-Introduction">23 Filtering Introduction</a></li>
  401. <li><a id="toc-graph2dot" href="#graph2dot">24 graph2dot</a></li>
  402. <li><a id="toc-Filtergraph-description" href="#Filtergraph-description">25 Filtergraph description</a>
  403. <ul class="toc-numbered-mark">
  404. <li><a id="toc-Filtergraph-syntax-1" href="#Filtergraph-syntax-1">25.1 Filtergraph syntax</a></li>
  405. <li><a id="toc-Notes-on-filtergraph-escaping" href="#Notes-on-filtergraph-escaping">25.2 Notes on filtergraph escaping</a></li>
  406. </ul></li>
  407. <li><a id="toc-Timeline-editing" href="#Timeline-editing">26 Timeline editing</a></li>
  408. <li><a id="toc-Changing-options-at-runtime-with-a-command" href="#Changing-options-at-runtime-with-a-command">27 Changing options at runtime with a command</a></li>
  409. <li><a id="toc-Options-for-filters-with-several-inputs-_0028framesync_0029" href="#Options-for-filters-with-several-inputs-_0028framesync_0029">28 Options for filters with several inputs (framesync)</a></li>
  410. <li><a id="toc-Audio-Filters" href="#Audio-Filters">29 Audio Filters</a>
  411. <ul class="toc-numbered-mark">
  412. <li><a id="toc-aap" href="#aap">29.1 aap</a></li>
  413. <li><a id="toc-acompressor" href="#acompressor">29.2 acompressor</a>
  414. <ul class="toc-numbered-mark">
  415. <li><a id="toc-Commands" href="#Commands">29.2.1 Commands</a></li>
  416. </ul></li>
  417. <li><a id="toc-acontrast" href="#acontrast">29.3 acontrast</a></li>
  418. <li><a id="toc-acopy" href="#acopy">29.4 acopy</a></li>
  419. <li><a id="toc-acrossfade" href="#acrossfade">29.5 acrossfade</a>
  420. <ul class="toc-numbered-mark">
  421. <li><a id="toc-Examples-16" href="#Examples-16">29.5.1 Examples</a></li>
  422. </ul></li>
  423. <li><a id="toc-acrossover" href="#acrossover">29.6 acrossover</a>
  424. <ul class="toc-numbered-mark">
  425. <li><a id="toc-Examples-17" href="#Examples-17">29.6.1 Examples</a></li>
  426. </ul></li>
  427. <li><a id="toc-acrusher" href="#acrusher">29.7 acrusher</a>
  428. <ul class="toc-numbered-mark">
  429. <li><a id="toc-Commands-1" href="#Commands-1">29.7.1 Commands</a></li>
  430. </ul></li>
  431. <li><a id="toc-acue" href="#acue">29.8 acue</a></li>
  432. <li><a id="toc-adeclick" href="#adeclick">29.9 adeclick</a></li>
  433. <li><a id="toc-adeclip" href="#adeclip">29.10 adeclip</a></li>
  434. <li><a id="toc-adecorrelate" href="#adecorrelate">29.11 adecorrelate</a></li>
  435. <li><a id="toc-adelay" href="#adelay">29.12 adelay</a>
  436. <ul class="toc-numbered-mark">
  437. <li><a id="toc-Examples-18" href="#Examples-18">29.12.1 Examples</a></li>
  438. </ul></li>
  439. <li><a id="toc-adenorm" href="#adenorm">29.13 adenorm</a>
  440. <ul class="toc-numbered-mark">
  441. <li><a id="toc-Commands-2" href="#Commands-2">29.13.1 Commands</a></li>
  442. </ul></li>
  443. <li><a id="toc-aderivative_002c-aintegral" href="#aderivative_002c-aintegral">29.14 aderivative, aintegral</a></li>
  444. <li><a id="toc-adrc" href="#adrc">29.15 adrc</a>
  445. <ul class="toc-numbered-mark">
  446. <li><a id="toc-Commands-3" href="#Commands-3">29.15.1 Commands</a></li>
  447. <li><a id="toc-Examples-19" href="#Examples-19">29.15.2 Examples</a></li>
  448. </ul></li>
  449. <li><a id="toc-adynamicequalizer" href="#adynamicequalizer">29.16 adynamicequalizer</a>
  450. <ul class="toc-numbered-mark">
  451. <li><a id="toc-Commands-4" href="#Commands-4">29.16.1 Commands</a></li>
  452. </ul></li>
  453. <li><a id="toc-adynamicsmooth" href="#adynamicsmooth">29.17 adynamicsmooth</a>
  454. <ul class="toc-numbered-mark">
  455. <li><a id="toc-Commands-5" href="#Commands-5">29.17.1 Commands</a></li>
  456. </ul></li>
  457. <li><a id="toc-aecho" href="#aecho">29.18 aecho</a>
  458. <ul class="toc-numbered-mark">
  459. <li><a id="toc-Examples-20" href="#Examples-20">29.18.1 Examples</a></li>
  460. </ul></li>
  461. <li><a id="toc-aemphasis" href="#aemphasis">29.19 aemphasis</a>
  462. <ul class="toc-numbered-mark">
  463. <li><a id="toc-Commands-6" href="#Commands-6">29.19.1 Commands</a></li>
  464. </ul></li>
  465. <li><a id="toc-aeval" href="#aeval">29.20 aeval</a>
  466. <ul class="toc-numbered-mark">
  467. <li><a id="toc-Examples-21" href="#Examples-21">29.20.1 Examples</a></li>
  468. </ul></li>
  469. <li><a id="toc-aexciter" href="#aexciter">29.21 aexciter</a>
  470. <ul class="toc-numbered-mark">
  471. <li><a id="toc-Commands-7" href="#Commands-7">29.21.1 Commands</a></li>
  472. </ul></li>
  473. <li><a id="toc-afade-1" href="#afade-1">29.22 afade</a>
  474. <ul class="toc-numbered-mark">
  475. <li><a id="toc-Commands-8" href="#Commands-8">29.22.1 Commands</a></li>
  476. <li><a id="toc-Examples-22" href="#Examples-22">29.22.2 Examples</a></li>
  477. </ul></li>
  478. <li><a id="toc-afftdn" href="#afftdn">29.23 afftdn</a>
  479. <ul class="toc-numbered-mark">
  480. <li><a id="toc-Commands-9" href="#Commands-9">29.23.1 Commands</a></li>
  481. <li><a id="toc-Examples-23" href="#Examples-23">29.23.2 Examples</a></li>
  482. </ul></li>
  483. <li><a id="toc-afftfilt" href="#afftfilt">29.24 afftfilt</a>
  484. <ul class="toc-numbered-mark">
  485. <li><a id="toc-Examples-24" href="#Examples-24">29.24.1 Examples</a></li>
  486. </ul></li>
  487. <li><a id="toc-afir-1" href="#afir-1">29.25 afir</a>
  488. <ul class="toc-numbered-mark">
  489. <li><a id="toc-Examples-25" href="#Examples-25">29.25.1 Examples</a></li>
  490. </ul></li>
  491. <li><a id="toc-aformat-1" href="#aformat-1">29.26 aformat</a></li>
  492. <li><a id="toc-afreqshift" href="#afreqshift">29.27 afreqshift</a>
  493. <ul class="toc-numbered-mark">
  494. <li><a id="toc-Commands-10" href="#Commands-10">29.27.1 Commands</a></li>
  495. </ul></li>
  496. <li><a id="toc-afwtdn" href="#afwtdn">29.28 afwtdn</a>
  497. <ul class="toc-numbered-mark">
  498. <li><a id="toc-Commands-11" href="#Commands-11">29.28.1 Commands</a></li>
  499. </ul></li>
  500. <li><a id="toc-agate" href="#agate">29.29 agate</a>
  501. <ul class="toc-numbered-mark">
  502. <li><a id="toc-Commands-12" href="#Commands-12">29.29.1 Commands</a></li>
  503. </ul></li>
  504. <li><a id="toc-aiir" href="#aiir">29.30 aiir</a>
  505. <ul class="toc-numbered-mark">
  506. <li><a id="toc-Examples-26" href="#Examples-26">29.30.1 Examples</a></li>
  507. </ul></li>
  508. <li><a id="toc-alimiter" href="#alimiter">29.31 alimiter</a></li>
  509. <li><a id="toc-allpass" href="#allpass">29.32 allpass</a>
  510. <ul class="toc-numbered-mark">
  511. <li><a id="toc-Commands-13" href="#Commands-13">29.32.1 Commands</a></li>
  512. </ul></li>
  513. <li><a id="toc-aloop" href="#aloop">29.33 aloop</a></li>
  514. <li><a id="toc-amerge-1" href="#amerge-1">29.34 amerge</a>
  515. <ul class="toc-numbered-mark">
  516. <li><a id="toc-Examples-27" href="#Examples-27">29.34.1 Examples</a></li>
  517. </ul></li>
  518. <li><a id="toc-amix" href="#amix">29.35 amix</a>
  519. <ul class="toc-numbered-mark">
  520. <li><a id="toc-Examples-28" href="#Examples-28">29.35.1 Examples</a></li>
  521. <li><a id="toc-Commands-14" href="#Commands-14">29.35.2 Commands</a></li>
  522. </ul></li>
  523. <li><a id="toc-amultiply" href="#amultiply">29.36 amultiply</a></li>
  524. <li><a id="toc-anequalizer" href="#anequalizer">29.37 anequalizer</a>
  525. <ul class="toc-numbered-mark">
  526. <li><a id="toc-Examples-29" href="#Examples-29">29.37.1 Examples</a></li>
  527. <li><a id="toc-Commands-15" href="#Commands-15">29.37.2 Commands</a></li>
  528. </ul></li>
  529. <li><a id="toc-anlmdn" href="#anlmdn">29.38 anlmdn</a>
  530. <ul class="toc-numbered-mark">
  531. <li><a id="toc-Commands-16" href="#Commands-16">29.38.1 Commands</a></li>
  532. </ul></li>
  533. <li><a id="toc-anlmf_002c-anlms" href="#anlmf_002c-anlms">29.39 anlmf, anlms</a>
  534. <ul class="toc-numbered-mark">
  535. <li><a id="toc-Examples-30" href="#Examples-30">29.39.1 Examples</a></li>
  536. <li><a id="toc-Commands-17" href="#Commands-17">29.39.2 Commands</a></li>
  537. </ul></li>
  538. <li><a id="toc-anull" href="#anull">29.40 anull</a></li>
  539. <li><a id="toc-apad" href="#apad">29.41 apad</a>
  540. <ul class="toc-numbered-mark">
  541. <li><a id="toc-Examples-31" href="#Examples-31">29.41.1 Examples</a></li>
  542. </ul></li>
  543. <li><a id="toc-aphaser" href="#aphaser">29.42 aphaser</a></li>
  544. <li><a id="toc-aphaseshift" href="#aphaseshift">29.43 aphaseshift</a>
  545. <ul class="toc-numbered-mark">
  546. <li><a id="toc-Commands-18" href="#Commands-18">29.43.1 Commands</a></li>
  547. </ul></li>
  548. <li><a id="toc-apsnr" href="#apsnr">29.44 apsnr</a></li>
  549. <li><a id="toc-apsyclip" href="#apsyclip">29.45 apsyclip</a>
  550. <ul class="toc-numbered-mark">
  551. <li><a id="toc-Commands-19" href="#Commands-19">29.45.1 Commands</a></li>
  552. </ul></li>
  553. <li><a id="toc-apulsator" href="#apulsator">29.46 apulsator</a></li>
  554. <li><a id="toc-aresample-1" href="#aresample-1">29.47 aresample</a>
  555. <ul class="toc-numbered-mark">
  556. <li><a id="toc-Examples-32" href="#Examples-32">29.47.1 Examples</a></li>
  557. </ul></li>
  558. <li><a id="toc-areverse" href="#areverse">29.48 areverse</a>
  559. <ul class="toc-numbered-mark">
  560. <li><a id="toc-Examples-33" href="#Examples-33">29.48.1 Examples</a></li>
  561. </ul></li>
  562. <li><a id="toc-arls" href="#arls">29.49 arls</a></li>
  563. <li><a id="toc-arnndn" href="#arnndn">29.50 arnndn</a>
  564. <ul class="toc-numbered-mark">
  565. <li><a id="toc-Commands-20" href="#Commands-20">29.50.1 Commands</a></li>
  566. </ul></li>
  567. <li><a id="toc-asdr" href="#asdr">29.51 asdr</a></li>
  568. <li><a id="toc-asetnsamples" href="#asetnsamples">29.52 asetnsamples</a></li>
  569. <li><a id="toc-asetrate" href="#asetrate">29.53 asetrate</a></li>
  570. <li><a id="toc-ashowinfo" href="#ashowinfo">29.54 ashowinfo</a></li>
  571. <li><a id="toc-asisdr" href="#asisdr">29.55 asisdr</a></li>
  572. <li><a id="toc-asoftclip" href="#asoftclip">29.56 asoftclip</a>
  573. <ul class="toc-numbered-mark">
  574. <li><a id="toc-Commands-21" href="#Commands-21">29.56.1 Commands</a></li>
  575. </ul></li>
  576. <li><a id="toc-aspectralstats" href="#aspectralstats">29.57 aspectralstats</a></li>
  577. <li><a id="toc-asr" href="#asr">29.58 asr</a></li>
  578. <li><a id="toc-astats-1" href="#astats-1">29.59 astats</a></li>
  579. <li><a id="toc-asubboost" href="#asubboost">29.60 asubboost</a>
  580. <ul class="toc-numbered-mark">
  581. <li><a id="toc-Commands-22" href="#Commands-22">29.60.1 Commands</a></li>
  582. </ul></li>
  583. <li><a id="toc-asubcut" href="#asubcut">29.61 asubcut</a>
  584. <ul class="toc-numbered-mark">
  585. <li><a id="toc-Commands-23" href="#Commands-23">29.61.1 Commands</a></li>
  586. </ul></li>
  587. <li><a id="toc-asupercut" href="#asupercut">29.62 asupercut</a>
  588. <ul class="toc-numbered-mark">
  589. <li><a id="toc-Commands-24" href="#Commands-24">29.62.1 Commands</a></li>
  590. </ul></li>
  591. <li><a id="toc-asuperpass" href="#asuperpass">29.63 asuperpass</a>
  592. <ul class="toc-numbered-mark">
  593. <li><a id="toc-Commands-25" href="#Commands-25">29.63.1 Commands</a></li>
  594. </ul></li>
  595. <li><a id="toc-asuperstop" href="#asuperstop">29.64 asuperstop</a>
  596. <ul class="toc-numbered-mark">
  597. <li><a id="toc-Commands-26" href="#Commands-26">29.64.1 Commands</a></li>
  598. </ul></li>
  599. <li><a id="toc-atempo" href="#atempo">29.65 atempo</a>
  600. <ul class="toc-numbered-mark">
  601. <li><a id="toc-Examples-34" href="#Examples-34">29.65.1 Examples</a></li>
  602. <li><a id="toc-Commands-27" href="#Commands-27">29.65.2 Commands</a></li>
  603. </ul></li>
  604. <li><a id="toc-atilt" href="#atilt">29.66 atilt</a>
  605. <ul class="toc-numbered-mark">
  606. <li><a id="toc-Commands-28" href="#Commands-28">29.66.1 Commands</a></li>
  607. </ul></li>
  608. <li><a id="toc-atrim" href="#atrim">29.67 atrim</a></li>
  609. <li><a id="toc-axcorrelate" href="#axcorrelate">29.68 axcorrelate</a>
  610. <ul class="toc-numbered-mark">
  611. <li><a id="toc-Examples-35" href="#Examples-35">29.68.1 Examples</a></li>
  612. </ul></li>
  613. <li><a id="toc-bandpass" href="#bandpass">29.69 bandpass</a>
  614. <ul class="toc-numbered-mark">
  615. <li><a id="toc-Commands-29" href="#Commands-29">29.69.1 Commands</a></li>
  616. </ul></li>
  617. <li><a id="toc-bandreject" href="#bandreject">29.70 bandreject</a>
  618. <ul class="toc-numbered-mark">
  619. <li><a id="toc-Commands-30" href="#Commands-30">29.70.1 Commands</a></li>
  620. </ul></li>
  621. <li><a id="toc-bass_002c-lowshelf" href="#bass_002c-lowshelf">29.71 bass, lowshelf</a>
  622. <ul class="toc-numbered-mark">
  623. <li><a id="toc-Commands-31" href="#Commands-31">29.71.1 Commands</a></li>
  624. </ul></li>
  625. <li><a id="toc-biquad" href="#biquad">29.72 biquad</a>
  626. <ul class="toc-numbered-mark">
  627. <li><a id="toc-Commands-32" href="#Commands-32">29.72.1 Commands</a></li>
  628. </ul></li>
  629. <li><a id="toc-bs2b" href="#bs2b">29.73 bs2b</a></li>
  630. <li><a id="toc-channelmap" href="#channelmap">29.74 channelmap</a>
  631. <ul class="toc-numbered-mark">
  632. <li><a id="toc-Examples-36" href="#Examples-36">29.74.1 Examples</a></li>
  633. </ul></li>
  634. <li><a id="toc-channelsplit" href="#channelsplit">29.75 channelsplit</a>
  635. <ul class="toc-numbered-mark">
  636. <li><a id="toc-Examples-37" href="#Examples-37">29.75.1 Examples</a></li>
  637. </ul></li>
  638. <li><a id="toc-chorus" href="#chorus">29.76 chorus</a>
  639. <ul class="toc-numbered-mark">
  640. <li><a id="toc-Examples-38" href="#Examples-38">29.76.1 Examples</a></li>
  641. </ul></li>
  642. <li><a id="toc-compand" href="#compand">29.77 compand</a>
  643. <ul class="toc-numbered-mark">
  644. <li><a id="toc-Examples-39" href="#Examples-39">29.77.1 Examples</a></li>
  645. </ul></li>
  646. <li><a id="toc-compensationdelay" href="#compensationdelay">29.78 compensationdelay</a>
  647. <ul class="toc-numbered-mark">
  648. <li><a id="toc-Commands-33" href="#Commands-33">29.78.1 Commands</a></li>
  649. </ul></li>
  650. <li><a id="toc-crossfeed" href="#crossfeed">29.79 crossfeed</a>
  651. <ul class="toc-numbered-mark">
  652. <li><a id="toc-Commands-34" href="#Commands-34">29.79.1 Commands</a></li>
  653. </ul></li>
  654. <li><a id="toc-crystalizer" href="#crystalizer">29.80 crystalizer</a>
  655. <ul class="toc-numbered-mark">
  656. <li><a id="toc-Commands-35" href="#Commands-35">29.80.1 Commands</a></li>
  657. </ul></li>
  658. <li><a id="toc-dcshift" href="#dcshift">29.81 dcshift</a></li>
  659. <li><a id="toc-deesser" href="#deesser">29.82 deesser</a></li>
  660. <li><a id="toc-dialoguenhance" href="#dialoguenhance">29.83 dialoguenhance</a>
  661. <ul class="toc-numbered-mark">
  662. <li><a id="toc-Commands-36" href="#Commands-36">29.83.1 Commands</a></li>
  663. </ul></li>
  664. <li><a id="toc-drmeter" href="#drmeter">29.84 drmeter</a></li>
  665. <li><a id="toc-dynaudnorm" href="#dynaudnorm">29.85 dynaudnorm</a>
  666. <ul class="toc-numbered-mark">
  667. <li><a id="toc-Commands-37" href="#Commands-37">29.85.1 Commands</a></li>
  668. </ul></li>
  669. <li><a id="toc-earwax" href="#earwax">29.86 earwax</a></li>
  670. <li><a id="toc-equalizer" href="#equalizer">29.87 equalizer</a>
  671. <ul class="toc-numbered-mark">
  672. <li><a id="toc-Examples-40" href="#Examples-40">29.87.1 Examples</a></li>
  673. <li><a id="toc-Commands-38" href="#Commands-38">29.87.2 Commands</a></li>
  674. </ul></li>
  675. <li><a id="toc-extrastereo" href="#extrastereo">29.88 extrastereo</a>
  676. <ul class="toc-numbered-mark">
  677. <li><a id="toc-Commands-39" href="#Commands-39">29.88.1 Commands</a></li>
  678. </ul></li>
  679. <li><a id="toc-firequalizer" href="#firequalizer">29.89 firequalizer</a>
  680. <ul class="toc-numbered-mark">
  681. <li><a id="toc-Examples-41" href="#Examples-41">29.89.1 Examples</a></li>
  682. </ul></li>
  683. <li><a id="toc-flanger" href="#flanger">29.90 flanger</a></li>
  684. <li><a id="toc-haas" href="#haas">29.91 haas</a></li>
  685. <li><a id="toc-hdcd" href="#hdcd">29.92 hdcd</a></li>
  686. <li><a id="toc-headphone" href="#headphone">29.93 headphone</a>
  687. <ul class="toc-numbered-mark">
  688. <li><a id="toc-Examples-42" href="#Examples-42">29.93.1 Examples</a></li>
  689. </ul></li>
  690. <li><a id="toc-highpass" href="#highpass">29.94 highpass</a>
  691. <ul class="toc-numbered-mark">
  692. <li><a id="toc-Commands-40" href="#Commands-40">29.94.1 Commands</a></li>
  693. </ul></li>
  694. <li><a id="toc-join" href="#join">29.95 join</a></li>
  695. <li><a id="toc-ladspa" href="#ladspa">29.96 ladspa</a>
  696. <ul class="toc-numbered-mark">
  697. <li><a id="toc-Examples-43" href="#Examples-43">29.96.1 Examples</a></li>
  698. <li><a id="toc-Commands-41" href="#Commands-41">29.96.2 Commands</a></li>
  699. </ul></li>
  700. <li><a id="toc-loudnorm" href="#loudnorm">29.97 loudnorm</a></li>
  701. <li><a id="toc-lowpass" href="#lowpass">29.98 lowpass</a>
  702. <ul class="toc-numbered-mark">
  703. <li><a id="toc-Examples-44" href="#Examples-44">29.98.1 Examples</a></li>
  704. <li><a id="toc-Commands-42" href="#Commands-42">29.98.2 Commands</a></li>
  705. </ul></li>
  706. <li><a id="toc-lv2" href="#lv2">29.99 lv2</a>
  707. <ul class="toc-numbered-mark">
  708. <li><a id="toc-Examples-45" href="#Examples-45">29.99.1 Examples</a></li>
  709. <li><a id="toc-Commands-43" href="#Commands-43">29.99.2 Commands</a></li>
  710. </ul></li>
  711. <li><a id="toc-mcompand" href="#mcompand">29.100 mcompand</a></li>
  712. <li><a id="toc-pan-1" href="#pan-1">29.101 pan</a>
  713. <ul class="toc-numbered-mark">
  714. <li><a id="toc-Mixing-examples" href="#Mixing-examples">29.101.1 Mixing examples</a></li>
  715. <li><a id="toc-Remapping-examples" href="#Remapping-examples">29.101.2 Remapping examples</a></li>
  716. </ul></li>
  717. <li><a id="toc-replaygain" href="#replaygain">29.102 replaygain</a></li>
  718. <li><a id="toc-resample" href="#resample">29.103 resample</a></li>
  719. <li><a id="toc-rubberband" href="#rubberband">29.104 rubberband</a>
  720. <ul class="toc-numbered-mark">
  721. <li><a id="toc-Commands-44" href="#Commands-44">29.104.1 Commands</a></li>
  722. </ul></li>
  723. <li><a id="toc-sidechaincompress" href="#sidechaincompress">29.105 sidechaincompress</a>
  724. <ul class="toc-numbered-mark">
  725. <li><a id="toc-Commands-45" href="#Commands-45">29.105.1 Commands</a></li>
  726. <li><a id="toc-Examples-46" href="#Examples-46">29.105.2 Examples</a></li>
  727. </ul></li>
  728. <li><a id="toc-sidechaingate" href="#sidechaingate">29.106 sidechaingate</a>
  729. <ul class="toc-numbered-mark">
  730. <li><a id="toc-Commands-46" href="#Commands-46">29.106.1 Commands</a></li>
  731. </ul></li>
  732. <li><a id="toc-silencedetect" href="#silencedetect">29.107 silencedetect</a>
  733. <ul class="toc-numbered-mark">
  734. <li><a id="toc-Examples-47" href="#Examples-47">29.107.1 Examples</a></li>
  735. </ul></li>
  736. <li><a id="toc-silenceremove" href="#silenceremove">29.108 silenceremove</a>
  737. <ul class="toc-numbered-mark">
  738. <li><a id="toc-Examples-48" href="#Examples-48">29.108.1 Examples</a></li>
  739. <li><a id="toc-Commands-47" href="#Commands-47">29.108.2 Commands</a></li>
  740. </ul></li>
  741. <li><a id="toc-sofalizer" href="#sofalizer">29.109 sofalizer</a>
  742. <ul class="toc-numbered-mark">
  743. <li><a id="toc-Examples-49" href="#Examples-49">29.109.1 Examples</a></li>
  744. </ul></li>
  745. <li><a id="toc-speechnorm" href="#speechnorm">29.110 speechnorm</a>
  746. <ul class="toc-numbered-mark">
  747. <li><a id="toc-Commands-48" href="#Commands-48">29.110.1 Commands</a></li>
  748. <li><a id="toc-Examples-50" href="#Examples-50">29.110.2 Examples</a></li>
  749. </ul></li>
  750. <li><a id="toc-stereotools" href="#stereotools">29.111 stereotools</a>
  751. <ul class="toc-numbered-mark">
  752. <li><a id="toc-Commands-49" href="#Commands-49">29.111.1 Commands</a></li>
  753. <li><a id="toc-Examples-51" href="#Examples-51">29.111.2 Examples</a></li>
  754. </ul></li>
  755. <li><a id="toc-stereowiden" href="#stereowiden">29.112 stereowiden</a>
  756. <ul class="toc-numbered-mark">
  757. <li><a id="toc-Commands-50" href="#Commands-50">29.112.1 Commands</a></li>
  758. </ul></li>
  759. <li><a id="toc-superequalizer" href="#superequalizer">29.113 superequalizer</a></li>
  760. <li><a id="toc-surround" href="#surround">29.114 surround</a></li>
  761. <li><a id="toc-tiltshelf" href="#tiltshelf">29.115 tiltshelf</a>
  762. <ul class="toc-numbered-mark">
  763. <li><a id="toc-Commands-51" href="#Commands-51">29.115.1 Commands</a></li>
  764. </ul></li>
  765. <li><a id="toc-treble_002c-highshelf" href="#treble_002c-highshelf">29.116 treble, highshelf</a>
  766. <ul class="toc-numbered-mark">
  767. <li><a id="toc-Commands-52" href="#Commands-52">29.116.1 Commands</a></li>
  768. </ul></li>
  769. <li><a id="toc-tremolo" href="#tremolo">29.117 tremolo</a></li>
  770. <li><a id="toc-vibrato" href="#vibrato">29.118 vibrato</a></li>
  771. <li><a id="toc-virtualbass" href="#virtualbass">29.119 virtualbass</a></li>
  772. <li><a id="toc-volume" href="#volume">29.120 volume</a>
  773. <ul class="toc-numbered-mark">
  774. <li><a id="toc-Commands-53" href="#Commands-53">29.120.1 Commands</a></li>
  775. <li><a id="toc-Examples-52" href="#Examples-52">29.120.2 Examples</a></li>
  776. </ul></li>
  777. <li><a id="toc-volumedetect" href="#volumedetect">29.121 volumedetect</a>
  778. <ul class="toc-numbered-mark">
  779. <li><a id="toc-Examples-53" href="#Examples-53">29.121.1 Examples</a></li>
  780. </ul></li>
  781. </ul></li>
  782. <li><a id="toc-Audio-Sources" href="#Audio-Sources">30 Audio Sources</a>
  783. <ul class="toc-numbered-mark">
  784. <li><a id="toc-abuffer" href="#abuffer">30.1 abuffer</a>
  785. <ul class="toc-numbered-mark">
  786. <li><a id="toc-Examples-54" href="#Examples-54">30.1.1 Examples</a></li>
  787. </ul></li>
  788. <li><a id="toc-aevalsrc" href="#aevalsrc">30.2 aevalsrc</a>
  789. <ul class="toc-numbered-mark">
  790. <li><a id="toc-Examples-55" href="#Examples-55">30.2.1 Examples</a></li>
  791. </ul></li>
  792. <li><a id="toc-afdelaysrc" href="#afdelaysrc">30.3 afdelaysrc</a></li>
  793. <li><a id="toc-afireqsrc" href="#afireqsrc">30.4 afireqsrc</a></li>
  794. <li><a id="toc-afirsrc" href="#afirsrc">30.5 afirsrc</a></li>
  795. <li><a id="toc-anullsrc" href="#anullsrc">30.6 anullsrc</a>
  796. <ul class="toc-numbered-mark">
  797. <li><a id="toc-Examples-56" href="#Examples-56">30.6.1 Examples</a></li>
  798. </ul></li>
  799. <li><a id="toc-flite" href="#flite">30.7 flite</a>
  800. <ul class="toc-numbered-mark">
  801. <li><a id="toc-Examples-57" href="#Examples-57">30.7.1 Examples</a></li>
  802. </ul></li>
  803. <li><a id="toc-anoisesrc" href="#anoisesrc">30.8 anoisesrc</a>
  804. <ul class="toc-numbered-mark">
  805. <li><a id="toc-Examples-58" href="#Examples-58">30.8.1 Examples</a></li>
  806. </ul></li>
  807. <li><a id="toc-hilbert" href="#hilbert">30.9 hilbert</a></li>
  808. <li><a id="toc-sinc" href="#sinc">30.10 sinc</a></li>
  809. <li><a id="toc-sine" href="#sine">30.11 sine</a>
  810. <ul class="toc-numbered-mark">
  811. <li><a id="toc-Examples-59" href="#Examples-59">30.11.1 Examples</a></li>
  812. </ul></li>
  813. </ul></li>
  814. <li><a id="toc-Audio-Sinks" href="#Audio-Sinks">31 Audio Sinks</a>
  815. <ul class="toc-numbered-mark">
  816. <li><a id="toc-abuffersink" href="#abuffersink">31.1 abuffersink</a></li>
  817. <li><a id="toc-anullsink" href="#anullsink">31.2 anullsink</a></li>
  818. </ul></li>
  819. <li><a id="toc-Video-Filters" href="#Video-Filters">32 Video Filters</a>
  820. <ul class="toc-numbered-mark">
  821. <li><a id="toc-addroi" href="#addroi">32.1 addroi</a>
  822. <ul class="toc-numbered-mark">
  823. <li><a id="toc-Examples-60" href="#Examples-60">32.1.1 Examples</a></li>
  824. </ul></li>
  825. <li><a id="toc-alphaextract" href="#alphaextract">32.2 alphaextract</a></li>
  826. <li><a id="toc-alphamerge" href="#alphamerge">32.3 alphamerge</a></li>
  827. <li><a id="toc-amplify" href="#amplify">32.4 amplify</a>
  828. <ul class="toc-numbered-mark">
  829. <li><a id="toc-Commands-54" href="#Commands-54">32.4.1 Commands</a></li>
  830. </ul></li>
  831. <li><a id="toc-ass" href="#ass">32.5 ass</a></li>
  832. <li><a id="toc-atadenoise" href="#atadenoise">32.6 atadenoise</a>
  833. <ul class="toc-numbered-mark">
  834. <li><a id="toc-Commands-55" href="#Commands-55">32.6.1 Commands</a></li>
  835. </ul></li>
  836. <li><a id="toc-avgblur" href="#avgblur">32.7 avgblur</a>
  837. <ul class="toc-numbered-mark">
  838. <li><a id="toc-Commands-56" href="#Commands-56">32.7.1 Commands</a></li>
  839. </ul></li>
  840. <li><a id="toc-backgroundkey" href="#backgroundkey">32.8 backgroundkey</a>
  841. <ul class="toc-numbered-mark">
  842. <li><a id="toc-Commands-57" href="#Commands-57">32.8.1 Commands</a></li>
  843. </ul></li>
  844. <li><a id="toc-bbox" href="#bbox">32.9 bbox</a>
  845. <ul class="toc-numbered-mark">
  846. <li><a id="toc-Commands-58" href="#Commands-58">32.9.1 Commands</a></li>
  847. </ul></li>
  848. <li><a id="toc-bilateral" href="#bilateral">32.10 bilateral</a>
  849. <ul class="toc-numbered-mark">
  850. <li><a id="toc-Commands-59" href="#Commands-59">32.10.1 Commands</a></li>
  851. </ul></li>
  852. <li><a id="toc-bilateral_005fcuda" href="#bilateral_005fcuda">32.11 bilateral_cuda</a>
  853. <ul class="toc-numbered-mark">
  854. <li><a id="toc-Examples-61" href="#Examples-61">32.11.1 Examples</a></li>
  855. </ul></li>
  856. <li><a id="toc-bitplanenoise" href="#bitplanenoise">32.12 bitplanenoise</a></li>
  857. <li><a id="toc-blackdetect" href="#blackdetect">32.13 blackdetect</a></li>
  858. <li><a id="toc-blackframe" href="#blackframe">32.14 blackframe</a></li>
  859. <li><a id="toc-blend-1" href="#blend-1">32.15 blend</a>
  860. <ul class="toc-numbered-mark">
  861. <li><a id="toc-Examples-62" href="#Examples-62">32.15.1 Examples</a></li>
  862. <li><a id="toc-Commands-60" href="#Commands-60">32.15.2 Commands</a></li>
  863. </ul></li>
  864. <li><a id="toc-blockdetect-1" href="#blockdetect-1">32.16 blockdetect</a>
  865. <ul class="toc-numbered-mark">
  866. <li><a id="toc-Examples-63" href="#Examples-63">32.16.1 Examples</a></li>
  867. </ul></li>
  868. <li><a id="toc-blurdetect-1" href="#blurdetect-1">32.17 blurdetect</a>
  869. <ul class="toc-numbered-mark">
  870. <li><a id="toc-Examples-64" href="#Examples-64">32.17.1 Examples</a></li>
  871. </ul></li>
  872. <li><a id="toc-bm3d" href="#bm3d">32.18 bm3d</a>
  873. <ul class="toc-numbered-mark">
  874. <li><a id="toc-Examples-65" href="#Examples-65">32.18.1 Examples</a></li>
  875. </ul></li>
  876. <li><a id="toc-boxblur" href="#boxblur">32.19 boxblur</a>
  877. <ul class="toc-numbered-mark">
  878. <li><a id="toc-Examples-66" href="#Examples-66">32.19.1 Examples</a></li>
  879. </ul></li>
  880. <li><a id="toc-bwdif-1" href="#bwdif-1">32.20 bwdif</a></li>
  881. <li><a id="toc-bwdif_005fcuda" href="#bwdif_005fcuda">32.21 bwdif_cuda</a></li>
  882. <li><a id="toc-ccrepack" href="#ccrepack">32.22 ccrepack</a></li>
  883. <li><a id="toc-cas" href="#cas">32.23 cas</a>
  884. <ul class="toc-numbered-mark">
  885. <li><a id="toc-Commands-61" href="#Commands-61">32.23.1 Commands</a></li>
  886. </ul></li>
  887. <li><a id="toc-chromahold" href="#chromahold">32.24 chromahold</a>
  888. <ul class="toc-numbered-mark">
  889. <li><a id="toc-Commands-62" href="#Commands-62">32.24.1 Commands</a></li>
  890. </ul></li>
  891. <li><a id="toc-chromakey-1" href="#chromakey-1">32.25 chromakey</a>
  892. <ul class="toc-numbered-mark">
  893. <li><a id="toc-Commands-63" href="#Commands-63">32.25.1 Commands</a></li>
  894. <li><a id="toc-Examples-67" href="#Examples-67">32.25.2 Examples</a></li>
  895. </ul></li>
  896. <li><a id="toc-chromakey_005fcuda" href="#chromakey_005fcuda">32.26 chromakey_cuda</a>
  897. <ul class="toc-numbered-mark">
  898. <li><a id="toc-Examples-68" href="#Examples-68">32.26.1 Examples</a></li>
  899. </ul></li>
  900. <li><a id="toc-chromanr" href="#chromanr">32.27 chromanr</a>
  901. <ul class="toc-numbered-mark">
  902. <li><a id="toc-Commands-64" href="#Commands-64">32.27.1 Commands</a></li>
  903. </ul></li>
  904. <li><a id="toc-chromashift" href="#chromashift">32.28 chromashift</a>
  905. <ul class="toc-numbered-mark">
  906. <li><a id="toc-Commands-65" href="#Commands-65">32.28.1 Commands</a></li>
  907. </ul></li>
  908. <li><a id="toc-ciescope" href="#ciescope">32.29 ciescope</a></li>
  909. <li><a id="toc-codecview" href="#codecview">32.30 codecview</a>
  910. <ul class="toc-numbered-mark">
  911. <li><a id="toc-Examples-69" href="#Examples-69">32.30.1 Examples</a></li>
  912. </ul></li>
  913. <li><a id="toc-colorbalance" href="#colorbalance">32.31 colorbalance</a>
  914. <ul class="toc-numbered-mark">
  915. <li><a id="toc-Examples-70" href="#Examples-70">32.31.1 Examples</a></li>
  916. <li><a id="toc-Commands-66" href="#Commands-66">32.31.2 Commands</a></li>
  917. </ul></li>
  918. <li><a id="toc-colorcontrast" href="#colorcontrast">32.32 colorcontrast</a>
  919. <ul class="toc-numbered-mark">
  920. <li><a id="toc-Commands-67" href="#Commands-67">32.32.1 Commands</a></li>
  921. </ul></li>
  922. <li><a id="toc-colorcorrect" href="#colorcorrect">32.33 colorcorrect</a>
  923. <ul class="toc-numbered-mark">
  924. <li><a id="toc-Commands-68" href="#Commands-68">32.33.1 Commands</a></li>
  925. </ul></li>
  926. <li><a id="toc-colorchannelmixer" href="#colorchannelmixer">32.34 colorchannelmixer</a>
  927. <ul class="toc-numbered-mark">
  928. <li><a id="toc-Examples-71" href="#Examples-71">32.34.1 Examples</a></li>
  929. <li><a id="toc-Commands-69" href="#Commands-69">32.34.2 Commands</a></li>
  930. </ul></li>
  931. <li><a id="toc-colorize" href="#colorize">32.35 colorize</a>
  932. <ul class="toc-numbered-mark">
  933. <li><a id="toc-Commands-70" href="#Commands-70">32.35.1 Commands</a></li>
  934. </ul></li>
  935. <li><a id="toc-colorkey" href="#colorkey">32.36 colorkey</a>
  936. <ul class="toc-numbered-mark">
  937. <li><a id="toc-Examples-72" href="#Examples-72">32.36.1 Examples</a></li>
  938. <li><a id="toc-Commands-71" href="#Commands-71">32.36.2 Commands</a></li>
  939. </ul></li>
  940. <li><a id="toc-colorhold" href="#colorhold">32.37 colorhold</a>
  941. <ul class="toc-numbered-mark">
  942. <li><a id="toc-Commands-72" href="#Commands-72">32.37.1 Commands</a></li>
  943. </ul></li>
  944. <li><a id="toc-colorlevels" href="#colorlevels">32.38 colorlevels</a>
  945. <ul class="toc-numbered-mark">
  946. <li><a id="toc-Examples-73" href="#Examples-73">32.38.1 Examples</a></li>
  947. <li><a id="toc-Commands-73" href="#Commands-73">32.38.2 Commands</a></li>
  948. </ul></li>
  949. <li><a id="toc-colormap" href="#colormap">32.39 colormap</a></li>
  950. <li><a id="toc-colormatrix" href="#colormatrix">32.40 colormatrix</a></li>
  951. <li><a id="toc-colorspace" href="#colorspace">32.41 colorspace</a></li>
  952. <li><a id="toc-colorspace_005fcuda" href="#colorspace_005fcuda">32.42 colorspace_cuda</a></li>
  953. <li><a id="toc-colortemperature" href="#colortemperature">32.43 colortemperature</a>
  954. <ul class="toc-numbered-mark">
  955. <li><a id="toc-Commands-74" href="#Commands-74">32.43.1 Commands</a></li>
  956. </ul></li>
  957. <li><a id="toc-convolution" href="#convolution">32.44 convolution</a>
  958. <ul class="toc-numbered-mark">
  959. <li><a id="toc-Commands-75" href="#Commands-75">32.44.1 Commands</a></li>
  960. <li><a id="toc-Examples-74" href="#Examples-74">32.44.2 Examples</a></li>
  961. </ul></li>
  962. <li><a id="toc-convolve" href="#convolve">32.45 convolve</a></li>
  963. <li><a id="toc-copy" href="#copy">32.46 copy</a></li>
  964. <li><a id="toc-coreimage-1" href="#coreimage-1">32.47 coreimage</a>
  965. <ul class="toc-numbered-mark">
  966. <li><a id="toc-Examples-75" href="#Examples-75">32.47.1 Examples</a></li>
  967. </ul></li>
  968. <li><a id="toc-corr" href="#corr">32.48 corr</a></li>
  969. <li><a id="toc-cover_005frect" href="#cover_005frect">32.49 cover_rect</a>
  970. <ul class="toc-numbered-mark">
  971. <li><a id="toc-Examples-76" href="#Examples-76">32.49.1 Examples</a></li>
  972. </ul></li>
  973. <li><a id="toc-crop" href="#crop">32.50 crop</a>
  974. <ul class="toc-numbered-mark">
  975. <li><a id="toc-Examples-77" href="#Examples-77">32.50.1 Examples</a></li>
  976. <li><a id="toc-Commands-76" href="#Commands-76">32.50.2 Commands</a></li>
  977. </ul></li>
  978. <li><a id="toc-cropdetect" href="#cropdetect">32.51 cropdetect</a>
  979. <ul class="toc-numbered-mark">
  980. <li><a id="toc-Examples-78" href="#Examples-78">32.51.1 Examples</a></li>
  981. <li><a id="toc-Commands-77" href="#Commands-77">32.51.2 Commands</a></li>
  982. </ul></li>
  983. <li><a id="toc-cue-1" href="#cue-1">32.52 cue</a></li>
  984. <li><a id="toc-curves-1" href="#curves-1">32.53 curves</a>
  985. <ul class="toc-numbered-mark">
  986. <li><a id="toc-Commands-78" href="#Commands-78">32.53.1 Commands</a></li>
  987. <li><a id="toc-Examples-79" href="#Examples-79">32.53.2 Examples</a></li>
  988. </ul></li>
  989. <li><a id="toc-datascope" href="#datascope">32.54 datascope</a>
  990. <ul class="toc-numbered-mark">
  991. <li><a id="toc-Commands-79" href="#Commands-79">32.54.1 Commands</a></li>
  992. </ul></li>
  993. <li><a id="toc-dblur" href="#dblur">32.55 dblur</a>
  994. <ul class="toc-numbered-mark">
  995. <li><a id="toc-Commands-80" href="#Commands-80">32.55.1 Commands</a></li>
  996. </ul></li>
  997. <li><a id="toc-dctdnoiz" href="#dctdnoiz">32.56 dctdnoiz</a>
  998. <ul class="toc-numbered-mark">
  999. <li><a id="toc-Examples-80" href="#Examples-80">32.56.1 Examples</a></li>
  1000. </ul></li>
  1001. <li><a id="toc-deband" href="#deband">32.57 deband</a>
  1002. <ul class="toc-numbered-mark">
  1003. <li><a id="toc-Commands-81" href="#Commands-81">32.57.1 Commands</a></li>
  1004. </ul></li>
  1005. <li><a id="toc-deblock" href="#deblock">32.58 deblock</a>
  1006. <ul class="toc-numbered-mark">
  1007. <li><a id="toc-Examples-81" href="#Examples-81">32.58.1 Examples</a></li>
  1008. <li><a id="toc-Commands-82" href="#Commands-82">32.58.2 Commands</a></li>
  1009. </ul></li>
  1010. <li><a id="toc-decimate-1" href="#decimate-1">32.59 decimate</a></li>
  1011. <li><a id="toc-deconvolve" href="#deconvolve">32.60 deconvolve</a></li>
  1012. <li><a id="toc-dedot" href="#dedot">32.61 dedot</a></li>
  1013. <li><a id="toc-deflate" href="#deflate">32.62 deflate</a>
  1014. <ul class="toc-numbered-mark">
  1015. <li><a id="toc-Commands-83" href="#Commands-83">32.62.1 Commands</a></li>
  1016. </ul></li>
  1017. <li><a id="toc-deflicker" href="#deflicker">32.63 deflicker</a></li>
  1018. <li><a id="toc-dejudder" href="#dejudder">32.64 dejudder</a></li>
  1019. <li><a id="toc-delogo" href="#delogo">32.65 delogo</a>
  1020. <ul class="toc-numbered-mark">
  1021. <li><a id="toc-Examples-82" href="#Examples-82">32.65.1 Examples</a></li>
  1022. </ul></li>
  1023. <li><a id="toc-derain-1" href="#derain-1">32.66 derain</a></li>
  1024. <li><a id="toc-deshake" href="#deshake">32.67 deshake</a></li>
  1025. <li><a id="toc-despill" href="#despill">32.68 despill</a>
  1026. <ul class="toc-numbered-mark">
  1027. <li><a id="toc-Commands-84" href="#Commands-84">32.68.1 Commands</a></li>
  1028. </ul></li>
  1029. <li><a id="toc-detelecine" href="#detelecine">32.69 detelecine</a></li>
  1030. <li><a id="toc-dilation-1" href="#dilation-1">32.70 dilation</a>
  1031. <ul class="toc-numbered-mark">
  1032. <li><a id="toc-Commands-85" href="#Commands-85">32.70.1 Commands</a></li>
  1033. </ul></li>
  1034. <li><a id="toc-displace" href="#displace">32.71 displace</a>
  1035. <ul class="toc-numbered-mark">
  1036. <li><a id="toc-Examples-83" href="#Examples-83">32.71.1 Examples</a></li>
  1037. </ul></li>
  1038. <li><a id="toc-dnn_005fclassify" href="#dnn_005fclassify">32.72 dnn_classify</a></li>
  1039. <li><a id="toc-dnn_005fdetect" href="#dnn_005fdetect">32.73 dnn_detect</a></li>
  1040. <li><a id="toc-dnn_005fprocessing-1" href="#dnn_005fprocessing-1">32.74 dnn_processing</a>
  1041. <ul class="toc-numbered-mark">
  1042. <li><a id="toc-Examples-84" href="#Examples-84">32.74.1 Examples</a></li>
  1043. </ul></li>
  1044. <li><a id="toc-drawbox" href="#drawbox">32.75 drawbox</a>
  1045. <ul class="toc-numbered-mark">
  1046. <li><a id="toc-Examples-85" href="#Examples-85">32.75.1 Examples</a></li>
  1047. <li><a id="toc-Commands-86" href="#Commands-86">32.75.2 Commands</a></li>
  1048. </ul></li>
  1049. <li><a id="toc-drawgraph-1" href="#drawgraph-1">32.76 drawgraph</a></li>
  1050. <li><a id="toc-drawgrid" href="#drawgrid">32.77 drawgrid</a>
  1051. <ul class="toc-numbered-mark">
  1052. <li><a id="toc-Examples-86" href="#Examples-86">32.77.1 Examples</a></li>
  1053. <li><a id="toc-Commands-87" href="#Commands-87">32.77.2 Commands</a></li>
  1054. </ul></li>
  1055. <li><a id="toc-drawtext-1" href="#drawtext-1">32.78 drawtext</a>
  1056. <ul class="toc-numbered-mark">
  1057. <li><a id="toc-Syntax-2" href="#Syntax-2">32.78.1 Syntax</a></li>
  1058. <li><a id="toc-Text-expansion" href="#Text-expansion">32.78.2 Text expansion</a></li>
  1059. <li><a id="toc-Commands-88" href="#Commands-88">32.78.3 Commands</a></li>
  1060. <li><a id="toc-Examples-87" href="#Examples-87">32.78.4 Examples</a></li>
  1061. </ul></li>
  1062. <li><a id="toc-edgedetect" href="#edgedetect">32.79 edgedetect</a>
  1063. <ul class="toc-numbered-mark">
  1064. <li><a id="toc-Examples-88" href="#Examples-88">32.79.1 Examples</a></li>
  1065. </ul></li>
  1066. <li><a id="toc-elbg" href="#elbg">32.80 elbg</a></li>
  1067. <li><a id="toc-entropy" href="#entropy">32.81 entropy</a></li>
  1068. <li><a id="toc-epx" href="#epx">32.82 epx</a></li>
  1069. <li><a id="toc-eq" href="#eq">32.83 eq</a>
  1070. <ul class="toc-numbered-mark">
  1071. <li><a id="toc-Commands-89" href="#Commands-89">32.83.1 Commands</a></li>
  1072. </ul></li>
  1073. <li><a id="toc-erosion-1" href="#erosion-1">32.84 erosion</a>
  1074. <ul class="toc-numbered-mark">
  1075. <li><a id="toc-Commands-90" href="#Commands-90">32.84.1 Commands</a></li>
  1076. </ul></li>
  1077. <li><a id="toc-estdif" href="#estdif">32.85 estdif</a>
  1078. <ul class="toc-numbered-mark">
  1079. <li><a id="toc-Commands-91" href="#Commands-91">32.85.1 Commands</a></li>
  1080. </ul></li>
  1081. <li><a id="toc-exposure" href="#exposure">32.86 exposure</a>
  1082. <ul class="toc-numbered-mark">
  1083. <li><a id="toc-Commands-92" href="#Commands-92">32.86.1 Commands</a></li>
  1084. </ul></li>
  1085. <li><a id="toc-extractplanes" href="#extractplanes">32.87 extractplanes</a>
  1086. <ul class="toc-numbered-mark">
  1087. <li><a id="toc-Examples-89" href="#Examples-89">32.87.1 Examples</a></li>
  1088. </ul></li>
  1089. <li><a id="toc-fade" href="#fade">32.88 fade</a>
  1090. <ul class="toc-numbered-mark">
  1091. <li><a id="toc-Examples-90" href="#Examples-90">32.88.1 Examples</a></li>
  1092. </ul></li>
  1093. <li><a id="toc-feedback" href="#feedback">32.89 feedback</a>
  1094. <ul class="toc-numbered-mark">
  1095. <li><a id="toc-Examples-91" href="#Examples-91">32.89.1 Examples</a></li>
  1096. </ul></li>
  1097. <li><a id="toc-fftdnoiz" href="#fftdnoiz">32.90 fftdnoiz</a></li>
  1098. <li><a id="toc-fftfilt" href="#fftfilt">32.91 fftfilt</a>
  1099. <ul class="toc-numbered-mark">
  1100. <li><a id="toc-Examples-92" href="#Examples-92">32.91.1 Examples</a></li>
  1101. </ul></li>
  1102. <li><a id="toc-field" href="#field">32.92 field</a></li>
  1103. <li><a id="toc-fieldhint" href="#fieldhint">32.93 fieldhint</a></li>
  1104. <li><a id="toc-fieldmatch" href="#fieldmatch">32.94 fieldmatch</a>
  1105. <ul class="toc-numbered-mark">
  1106. <li><a id="toc-p_002fc_002fn_002fu_002fb-meaning-1" href="#p_002fc_002fn_002fu_002fb-meaning-1">32.94.1 p/c/n/u/b meaning</a>
  1107. <ul class="toc-numbered-mark">
  1108. <li><a id="toc-p_002fc_002fn" href="#p_002fc_002fn">32.94.1.1 p/c/n</a></li>
  1109. <li><a id="toc-u_002fb" href="#u_002fb">32.94.1.2 u/b</a></li>
  1110. </ul></li>
  1111. <li><a id="toc-Examples-93" href="#Examples-93">32.94.2 Examples</a></li>
  1112. </ul></li>
  1113. <li><a id="toc-fieldorder" href="#fieldorder">32.95 fieldorder</a></li>
  1114. <li><a id="toc-fillborders" href="#fillborders">32.96 fillborders</a>
  1115. <ul class="toc-numbered-mark">
  1116. <li><a id="toc-Commands-93" href="#Commands-93">32.96.1 Commands</a></li>
  1117. </ul></li>
  1118. <li><a id="toc-find_005frect" href="#find_005frect">32.97 find_rect</a>
  1119. <ul class="toc-numbered-mark">
  1120. <li><a id="toc-Examples-94" href="#Examples-94">32.97.1 Examples</a></li>
  1121. </ul></li>
  1122. <li><a id="toc-floodfill" href="#floodfill">32.98 floodfill</a></li>
  1123. <li><a id="toc-format-1" href="#format-1">32.99 format</a>
  1124. <ul class="toc-numbered-mark">
  1125. <li><a id="toc-Examples-95" href="#Examples-95">32.99.1 Examples</a></li>
  1126. </ul></li>
  1127. <li><a id="toc-fps-1" href="#fps-1">32.100 fps</a>
  1128. <ul class="toc-numbered-mark">
  1129. <li><a id="toc-Examples-96" href="#Examples-96">32.100.1 Examples</a></li>
  1130. </ul></li>
  1131. <li><a id="toc-framepack" href="#framepack">32.101 framepack</a></li>
  1132. <li><a id="toc-framerate" href="#framerate">32.102 framerate</a></li>
  1133. <li><a id="toc-framestep" href="#framestep">32.103 framestep</a></li>
  1134. <li><a id="toc-freezedetect" href="#freezedetect">32.104 freezedetect</a></li>
  1135. <li><a id="toc-freezeframes" href="#freezeframes">32.105 freezeframes</a></li>
  1136. <li><a id="toc-frei0r-1" href="#frei0r-1">32.106 frei0r</a>
  1137. <ul class="toc-numbered-mark">
  1138. <li><a id="toc-Examples-97" href="#Examples-97">32.106.1 Examples</a></li>
  1139. <li><a id="toc-Commands-94" href="#Commands-94">32.106.2 Commands</a></li>
  1140. </ul></li>
  1141. <li><a id="toc-fspp" href="#fspp">32.107 fspp</a></li>
  1142. <li><a id="toc-fsync-1" href="#fsync-1">32.108 fsync</a></li>
  1143. <li><a id="toc-gblur" href="#gblur">32.109 gblur</a>
  1144. <ul class="toc-numbered-mark">
  1145. <li><a id="toc-Commands-95" href="#Commands-95">32.109.1 Commands</a></li>
  1146. </ul></li>
  1147. <li><a id="toc-geq" href="#geq">32.110 geq</a>
  1148. <ul class="toc-numbered-mark">
  1149. <li><a id="toc-Examples-98" href="#Examples-98">32.110.1 Examples</a></li>
  1150. </ul></li>
  1151. <li><a id="toc-gradfun" href="#gradfun">32.111 gradfun</a>
  1152. <ul class="toc-numbered-mark">
  1153. <li><a id="toc-Examples-99" href="#Examples-99">32.111.1 Examples</a></li>
  1154. </ul></li>
  1155. <li><a id="toc-graphmonitor-1" href="#graphmonitor-1">32.112 graphmonitor</a></li>
  1156. <li><a id="toc-grayworld" href="#grayworld">32.113 grayworld</a></li>
  1157. <li><a id="toc-greyedge" href="#greyedge">32.114 greyedge</a>
  1158. <ul class="toc-numbered-mark">
  1159. <li><a id="toc-Examples-100" href="#Examples-100">32.114.1 Examples</a></li>
  1160. </ul></li>
  1161. <li><a id="toc-guided" href="#guided">32.115 guided</a>
  1162. <ul class="toc-numbered-mark">
  1163. <li><a id="toc-Commands-96" href="#Commands-96">32.115.1 Commands</a></li>
  1164. <li><a id="toc-Examples-101" href="#Examples-101">32.115.2 Examples</a></li>
  1165. </ul></li>
  1166. <li><a id="toc-haldclut-1" href="#haldclut-1">32.116 haldclut</a>
  1167. <ul class="toc-numbered-mark">
  1168. <li><a id="toc-Commands-97" href="#Commands-97">32.116.1 Commands</a></li>
  1169. <li><a id="toc-Workflow-examples" href="#Workflow-examples">32.116.2 Workflow examples</a>
  1170. <ul class="toc-numbered-mark">
  1171. <li><a id="toc-Hald-CLUT-video-stream" href="#Hald-CLUT-video-stream">32.116.2.1 Hald CLUT video stream</a></li>
  1172. <li><a id="toc-Hald-CLUT-with-preview" href="#Hald-CLUT-with-preview">32.116.2.2 Hald CLUT with preview</a></li>
  1173. </ul></li>
  1174. </ul></li>
  1175. <li><a id="toc-hflip" href="#hflip">32.117 hflip</a></li>
  1176. <li><a id="toc-histeq" href="#histeq">32.118 histeq</a></li>
  1177. <li><a id="toc-histogram-1" href="#histogram-1">32.119 histogram</a>
  1178. <ul class="toc-numbered-mark">
  1179. <li><a id="toc-Examples-102" href="#Examples-102">32.119.1 Examples</a></li>
  1180. </ul></li>
  1181. <li><a id="toc-hqdn3d-1" href="#hqdn3d-1">32.120 hqdn3d</a>
  1182. <ul class="toc-numbered-mark">
  1183. <li><a id="toc-Commands-98" href="#Commands-98">32.120.1 Commands</a></li>
  1184. </ul></li>
  1185. <li><a id="toc-hwdownload-1" href="#hwdownload-1">32.121 hwdownload</a></li>
  1186. <li><a id="toc-hwmap" href="#hwmap">32.122 hwmap</a></li>
  1187. <li><a id="toc-hwupload-1" href="#hwupload-1">32.123 hwupload</a></li>
  1188. <li><a id="toc-hwupload_005fcuda-1" href="#hwupload_005fcuda-1">32.124 hwupload_cuda</a></li>
  1189. <li><a id="toc-hqx" href="#hqx">32.125 hqx</a></li>
  1190. <li><a id="toc-hstack-1" href="#hstack-1">32.126 hstack</a></li>
  1191. <li><a id="toc-hsvhold" href="#hsvhold">32.127 hsvhold</a></li>
  1192. <li><a id="toc-hsvkey" href="#hsvkey">32.128 hsvkey</a></li>
  1193. <li><a id="toc-hue" href="#hue">32.129 hue</a>
  1194. <ul class="toc-numbered-mark">
  1195. <li><a id="toc-Examples-103" href="#Examples-103">32.129.1 Examples</a></li>
  1196. <li><a id="toc-Commands-99" href="#Commands-99">32.129.2 Commands</a></li>
  1197. </ul></li>
  1198. <li><a id="toc-huesaturation" href="#huesaturation">32.130 huesaturation</a></li>
  1199. <li><a id="toc-hysteresis" href="#hysteresis">32.131 hysteresis</a></li>
  1200. <li><a id="toc-iccdetect" href="#iccdetect">32.132 iccdetect</a></li>
  1201. <li><a id="toc-iccgen" href="#iccgen">32.133 iccgen</a></li>
  1202. <li><a id="toc-identity" href="#identity">32.134 identity</a></li>
  1203. <li><a id="toc-idet" href="#idet">32.135 idet</a>
  1204. <ul class="toc-numbered-mark">
  1205. <li><a id="toc-Examples-104" href="#Examples-104">32.135.1 Examples</a></li>
  1206. </ul></li>
  1207. <li><a id="toc-il" href="#il">32.136 il</a>
  1208. <ul class="toc-numbered-mark">
  1209. <li><a id="toc-Commands-100" href="#Commands-100">32.136.1 Commands</a></li>
  1210. </ul></li>
  1211. <li><a id="toc-inflate" href="#inflate">32.137 inflate</a>
  1212. <ul class="toc-numbered-mark">
  1213. <li><a id="toc-Commands-101" href="#Commands-101">32.137.1 Commands</a></li>
  1214. </ul></li>
  1215. <li><a id="toc-interlace" href="#interlace">32.138 interlace</a></li>
  1216. <li><a id="toc-kerndeint" href="#kerndeint">32.139 kerndeint</a>
  1217. <ul class="toc-numbered-mark">
  1218. <li><a id="toc-Examples-105" href="#Examples-105">32.139.1 Examples</a></li>
  1219. </ul></li>
  1220. <li><a id="toc-kirsch" href="#kirsch">32.140 kirsch</a>
  1221. <ul class="toc-numbered-mark">
  1222. <li><a id="toc-Commands-102" href="#Commands-102">32.140.1 Commands</a></li>
  1223. </ul></li>
  1224. <li><a id="toc-lagfun" href="#lagfun">32.141 lagfun</a>
  1225. <ul class="toc-numbered-mark">
  1226. <li><a id="toc-Commands-103" href="#Commands-103">32.141.1 Commands</a></li>
  1227. </ul></li>
  1228. <li><a id="toc-lenscorrection" href="#lenscorrection">32.142 lenscorrection</a>
  1229. <ul class="toc-numbered-mark">
  1230. <li><a id="toc-Options-37" href="#Options-37">32.142.1 Options</a></li>
  1231. <li><a id="toc-Commands-104" href="#Commands-104">32.142.2 Commands</a></li>
  1232. </ul></li>
  1233. <li><a id="toc-lensfun" href="#lensfun">32.143 lensfun</a>
  1234. <ul class="toc-numbered-mark">
  1235. <li><a id="toc-Examples-106" href="#Examples-106">32.143.1 Examples</a></li>
  1236. </ul></li>
  1237. <li><a id="toc-libplacebo" href="#libplacebo">32.144 libplacebo</a>
  1238. <ul class="toc-numbered-mark">
  1239. <li><a id="toc-Options-38" href="#Options-38">32.144.1 Options</a>
  1240. <ul class="toc-numbered-mark">
  1241. <li><a id="toc-Output-mode" href="#Output-mode">32.144.1.1 Output mode</a></li>
  1242. <li><a id="toc-Scaling" href="#Scaling">32.144.1.2 Scaling</a></li>
  1243. <li><a id="toc-Debanding" href="#Debanding">32.144.1.3 Debanding</a></li>
  1244. <li><a id="toc-Color-adjustment" href="#Color-adjustment">32.144.1.4 Color adjustment</a></li>
  1245. <li><a id="toc-Peak-detection" href="#Peak-detection">32.144.1.5 Peak detection</a></li>
  1246. <li><a id="toc-Tone-mapping" href="#Tone-mapping">32.144.1.6 Tone mapping</a></li>
  1247. <li><a id="toc-Dithering" href="#Dithering">32.144.1.7 Dithering</a></li>
  1248. <li><a id="toc-Custom-shaders" href="#Custom-shaders">32.144.1.8 Custom shaders</a></li>
  1249. <li><a id="toc-Debugging-_002f-performance" href="#Debugging-_002f-performance">32.144.1.9 Debugging / performance</a></li>
  1250. </ul></li>
  1251. <li><a id="toc-Commands-105" href="#Commands-105">32.144.2 Commands</a></li>
  1252. <li><a id="toc-Examples-107" href="#Examples-107">32.144.3 Examples</a></li>
  1253. </ul></li>
  1254. <li><a id="toc-libvmaf-1" href="#libvmaf-1">32.145 libvmaf</a>
  1255. <ul class="toc-numbered-mark">
  1256. <li><a id="toc-Examples-108" href="#Examples-108">32.145.1 Examples</a></li>
  1257. </ul></li>
  1258. <li><a id="toc-libvmaf_005fcuda" href="#libvmaf_005fcuda">32.146 libvmaf_cuda</a>
  1259. <ul class="toc-numbered-mark">
  1260. <li><a id="toc-Examples-109" href="#Examples-109">32.146.1 Examples</a></li>
  1261. </ul></li>
  1262. <li><a id="toc-limitdiff" href="#limitdiff">32.147 limitdiff</a>
  1263. <ul class="toc-numbered-mark">
  1264. <li><a id="toc-Commands-106" href="#Commands-106">32.147.1 Commands</a></li>
  1265. </ul></li>
  1266. <li><a id="toc-limiter" href="#limiter">32.148 limiter</a>
  1267. <ul class="toc-numbered-mark">
  1268. <li><a id="toc-Commands-107" href="#Commands-107">32.148.1 Commands</a></li>
  1269. </ul></li>
  1270. <li><a id="toc-loop" href="#loop">32.149 loop</a>
  1271. <ul class="toc-numbered-mark">
  1272. <li><a id="toc-Examples-110" href="#Examples-110">32.149.1 Examples</a></li>
  1273. </ul></li>
  1274. <li><a id="toc-lut1d" href="#lut1d">32.150 lut1d</a>
  1275. <ul class="toc-numbered-mark">
  1276. <li><a id="toc-Commands-108" href="#Commands-108">32.150.1 Commands</a></li>
  1277. </ul></li>
  1278. <li><a id="toc-lut3d-1" href="#lut3d-1">32.151 lut3d</a>
  1279. <ul class="toc-numbered-mark">
  1280. <li><a id="toc-Commands-109" href="#Commands-109">32.151.1 Commands</a></li>
  1281. </ul></li>
  1282. <li><a id="toc-lumakey" href="#lumakey">32.152 lumakey</a>
  1283. <ul class="toc-numbered-mark">
  1284. <li><a id="toc-Commands-110" href="#Commands-110">32.152.1 Commands</a></li>
  1285. </ul></li>
  1286. <li><a id="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">32.153 lut, lutrgb, lutyuv</a>
  1287. <ul class="toc-numbered-mark">
  1288. <li><a id="toc-Commands-111" href="#Commands-111">32.153.1 Commands</a></li>
  1289. <li><a id="toc-Examples-111" href="#Examples-111">32.153.2 Examples</a></li>
  1290. </ul></li>
  1291. <li><a id="toc-lut2_002c-tlut2" href="#lut2_002c-tlut2">32.154 lut2, tlut2</a>
  1292. <ul class="toc-numbered-mark">
  1293. <li><a id="toc-Commands-112" href="#Commands-112">32.154.1 Commands</a></li>
  1294. <li><a id="toc-Examples-112" href="#Examples-112">32.154.2 Examples</a></li>
  1295. </ul></li>
  1296. <li><a id="toc-maskedclamp" href="#maskedclamp">32.155 maskedclamp</a>
  1297. <ul class="toc-numbered-mark">
  1298. <li><a id="toc-Commands-113" href="#Commands-113">32.155.1 Commands</a></li>
  1299. </ul></li>
  1300. <li><a id="toc-maskedmax" href="#maskedmax">32.156 maskedmax</a>
  1301. <ul class="toc-numbered-mark">
  1302. <li><a id="toc-Commands-114" href="#Commands-114">32.156.1 Commands</a></li>
  1303. </ul></li>
  1304. <li><a id="toc-maskedmerge" href="#maskedmerge">32.157 maskedmerge</a>
  1305. <ul class="toc-numbered-mark">
  1306. <li><a id="toc-Commands-115" href="#Commands-115">32.157.1 Commands</a></li>
  1307. </ul></li>
  1308. <li><a id="toc-maskedmin" href="#maskedmin">32.158 maskedmin</a>
  1309. <ul class="toc-numbered-mark">
  1310. <li><a id="toc-Commands-116" href="#Commands-116">32.158.1 Commands</a></li>
  1311. </ul></li>
  1312. <li><a id="toc-maskedthreshold" href="#maskedthreshold">32.159 maskedthreshold</a>
  1313. <ul class="toc-numbered-mark">
  1314. <li><a id="toc-Commands-117" href="#Commands-117">32.159.1 Commands</a></li>
  1315. </ul></li>
  1316. <li><a id="toc-maskfun" href="#maskfun">32.160 maskfun</a>
  1317. <ul class="toc-numbered-mark">
  1318. <li><a id="toc-Commands-118" href="#Commands-118">32.160.1 Commands</a></li>
  1319. </ul></li>
  1320. <li><a id="toc-mcdeint" href="#mcdeint">32.161 mcdeint</a></li>
  1321. <li><a id="toc-median" href="#median">32.162 median</a>
  1322. <ul class="toc-numbered-mark">
  1323. <li><a id="toc-Commands-119" href="#Commands-119">32.162.1 Commands</a></li>
  1324. </ul></li>
  1325. <li><a id="toc-mergeplanes" href="#mergeplanes">32.163 mergeplanes</a>
  1326. <ul class="toc-numbered-mark">
  1327. <li><a id="toc-Examples-113" href="#Examples-113">32.163.1 Examples</a></li>
  1328. </ul></li>
  1329. <li><a id="toc-mestimate" href="#mestimate">32.164 mestimate</a></li>
  1330. <li><a id="toc-midequalizer" href="#midequalizer">32.165 midequalizer</a></li>
  1331. <li><a id="toc-minterpolate" href="#minterpolate">32.166 minterpolate</a></li>
  1332. <li><a id="toc-mix" href="#mix">32.167 mix</a>
  1333. <ul class="toc-numbered-mark">
  1334. <li><a id="toc-Commands-120" href="#Commands-120">32.167.1 Commands</a></li>
  1335. </ul></li>
  1336. <li><a id="toc-monochrome" href="#monochrome">32.168 monochrome</a>
  1337. <ul class="toc-numbered-mark">
  1338. <li><a id="toc-Commands-121" href="#Commands-121">32.168.1 Commands</a></li>
  1339. </ul></li>
  1340. <li><a id="toc-morpho" href="#morpho">32.169 morpho</a>
  1341. <ul class="toc-numbered-mark">
  1342. <li><a id="toc-Commands-122" href="#Commands-122">32.169.1 Commands</a></li>
  1343. </ul></li>
  1344. <li><a id="toc-mpdecimate" href="#mpdecimate">32.170 mpdecimate</a></li>
  1345. <li><a id="toc-msad" href="#msad">32.171 msad</a></li>
  1346. <li><a id="toc-multiply" href="#multiply">32.172 multiply</a>
  1347. <ul class="toc-numbered-mark">
  1348. <li><a id="toc-Commands-123" href="#Commands-123">32.172.1 Commands</a></li>
  1349. </ul></li>
  1350. <li><a id="toc-negate" href="#negate">32.173 negate</a>
  1351. <ul class="toc-numbered-mark">
  1352. <li><a id="toc-Commands-124" href="#Commands-124">32.173.1 Commands</a></li>
  1353. </ul></li>
  1354. <li><a id="toc-nlmeans-1" href="#nlmeans-1">32.174 nlmeans</a></li>
  1355. <li><a id="toc-nnedi" href="#nnedi">32.175 nnedi</a>
  1356. <ul class="toc-numbered-mark">
  1357. <li><a id="toc-Commands-125" href="#Commands-125">32.175.1 Commands</a></li>
  1358. </ul></li>
  1359. <li><a id="toc-noformat" href="#noformat">32.176 noformat</a>
  1360. <ul class="toc-numbered-mark">
  1361. <li><a id="toc-Examples-114" href="#Examples-114">32.176.1 Examples</a></li>
  1362. </ul></li>
  1363. <li><a id="toc-noise-1" href="#noise-1">32.177 noise</a>
  1364. <ul class="toc-numbered-mark">
  1365. <li><a id="toc-Examples-115" href="#Examples-115">32.177.1 Examples</a></li>
  1366. </ul></li>
  1367. <li><a id="toc-normalize" href="#normalize">32.178 normalize</a>
  1368. <ul class="toc-numbered-mark">
  1369. <li><a id="toc-Commands-126" href="#Commands-126">32.178.1 Commands</a></li>
  1370. <li><a id="toc-Examples-116" href="#Examples-116">32.178.2 Examples</a></li>
  1371. </ul></li>
  1372. <li><a id="toc-null-1" href="#null-1">32.179 null</a></li>
  1373. <li><a id="toc-ocr" href="#ocr">32.180 ocr</a></li>
  1374. <li><a id="toc-ocv" href="#ocv">32.181 ocv</a>
  1375. <ul class="toc-numbered-mark">
  1376. <li><a id="toc-dilate-1" href="#dilate-1">32.181.1 dilate</a></li>
  1377. <li><a id="toc-erode" href="#erode">32.181.2 erode</a></li>
  1378. <li><a id="toc-smooth" href="#smooth">32.181.3 smooth</a></li>
  1379. </ul></li>
  1380. <li><a id="toc-oscilloscope" href="#oscilloscope">32.182 oscilloscope</a>
  1381. <ul class="toc-numbered-mark">
  1382. <li><a id="toc-Commands-127" href="#Commands-127">32.182.1 Commands</a></li>
  1383. <li><a id="toc-Examples-117" href="#Examples-117">32.182.2 Examples</a></li>
  1384. </ul></li>
  1385. <li><a id="toc-overlay-1" href="#overlay-1">32.183 overlay</a>
  1386. <ul class="toc-numbered-mark">
  1387. <li><a id="toc-Commands-128" href="#Commands-128">32.183.1 Commands</a></li>
  1388. <li><a id="toc-Examples-118" href="#Examples-118">32.183.2 Examples</a></li>
  1389. </ul></li>
  1390. <li><a id="toc-overlay_005fcuda-1" href="#overlay_005fcuda-1">32.184 overlay_cuda</a></li>
  1391. <li><a id="toc-owdenoise" href="#owdenoise">32.185 owdenoise</a></li>
  1392. <li><a id="toc-pad-1" href="#pad-1">32.186 pad</a>
  1393. <ul class="toc-numbered-mark">
  1394. <li><a id="toc-Examples-119" href="#Examples-119">32.186.1 Examples</a></li>
  1395. </ul></li>
  1396. <li><a id="toc-palettegen-1" href="#palettegen-1">32.187 palettegen</a>
  1397. <ul class="toc-numbered-mark">
  1398. <li><a id="toc-Examples-120" href="#Examples-120">32.187.1 Examples</a></li>
  1399. </ul></li>
  1400. <li><a id="toc-paletteuse" href="#paletteuse">32.188 paletteuse</a>
  1401. <ul class="toc-numbered-mark">
  1402. <li><a id="toc-Examples-121" href="#Examples-121">32.188.1 Examples</a></li>
  1403. </ul></li>
  1404. <li><a id="toc-perspective" href="#perspective">32.189 perspective</a></li>
  1405. <li><a id="toc-phase" href="#phase">32.190 phase</a>
  1406. <ul class="toc-numbered-mark">
  1407. <li><a id="toc-Commands-129" href="#Commands-129">32.190.1 Commands</a></li>
  1408. </ul></li>
  1409. <li><a id="toc-photosensitivity" href="#photosensitivity">32.191 photosensitivity</a></li>
  1410. <li><a id="toc-pixdesctest" href="#pixdesctest">32.192 pixdesctest</a></li>
  1411. <li><a id="toc-pixelize" href="#pixelize">32.193 pixelize</a>
  1412. <ul class="toc-numbered-mark">
  1413. <li><a id="toc-Commands-130" href="#Commands-130">32.193.1 Commands</a></li>
  1414. </ul></li>
  1415. <li><a id="toc-pixscope" href="#pixscope">32.194 pixscope</a>
  1416. <ul class="toc-numbered-mark">
  1417. <li><a id="toc-Commands-131" href="#Commands-131">32.194.1 Commands</a></li>
  1418. </ul></li>
  1419. <li><a id="toc-pp" href="#pp">32.195 pp</a>
  1420. <ul class="toc-numbered-mark">
  1421. <li><a id="toc-Examples-122" href="#Examples-122">32.195.1 Examples</a></li>
  1422. </ul></li>
  1423. <li><a id="toc-pp7" href="#pp7">32.196 pp7</a></li>
  1424. <li><a id="toc-premultiply" href="#premultiply">32.197 premultiply</a></li>
  1425. <li><a id="toc-prewitt" href="#prewitt">32.198 prewitt</a>
  1426. <ul class="toc-numbered-mark">
  1427. <li><a id="toc-Commands-132" href="#Commands-132">32.198.1 Commands</a></li>
  1428. </ul></li>
  1429. <li><a id="toc-pseudocolor" href="#pseudocolor">32.199 pseudocolor</a>
  1430. <ul class="toc-numbered-mark">
  1431. <li><a id="toc-Commands-133" href="#Commands-133">32.199.1 Commands</a></li>
  1432. <li><a id="toc-Examples-123" href="#Examples-123">32.199.2 Examples</a></li>
  1433. </ul></li>
  1434. <li><a id="toc-psnr" href="#psnr">32.200 psnr</a>
  1435. <ul class="toc-numbered-mark">
  1436. <li><a id="toc-Examples-124" href="#Examples-124">32.200.1 Examples</a></li>
  1437. </ul></li>
  1438. <li><a id="toc-pullup-1" href="#pullup-1">32.201 pullup</a></li>
  1439. <li><a id="toc-qp" href="#qp">32.202 qp</a>
  1440. <ul class="toc-numbered-mark">
  1441. <li><a id="toc-Examples-125" href="#Examples-125">32.202.1 Examples</a></li>
  1442. </ul></li>
  1443. <li><a id="toc-qrencode" href="#qrencode">32.203 qrencode</a>
  1444. <ul class="toc-numbered-mark">
  1445. <li><a id="toc-qrencode-Expressions" href="#qrencode-Expressions">32.203.1 qrencode Expressions</a></li>
  1446. <li><a id="toc-qrencode-Text-expansion" href="#qrencode-Text-expansion">32.203.2 qrencode Text expansion</a></li>
  1447. <li><a id="toc-Examples-126" href="#Examples-126">32.203.3 Examples</a></li>
  1448. </ul></li>
  1449. <li><a id="toc-quirc" href="#quirc">32.204 quirc</a></li>
  1450. <li><a id="toc-random" href="#random">32.205 random</a></li>
  1451. <li><a id="toc-readeia608" href="#readeia608">32.206 readeia608</a>
  1452. <ul class="toc-numbered-mark">
  1453. <li><a id="toc-Commands-134" href="#Commands-134">32.206.1 Commands</a></li>
  1454. <li><a id="toc-Examples-127" href="#Examples-127">32.206.2 Examples</a></li>
  1455. </ul></li>
  1456. <li><a id="toc-readvitc" href="#readvitc">32.207 readvitc</a>
  1457. <ul class="toc-numbered-mark">
  1458. <li><a id="toc-Examples-128" href="#Examples-128">32.207.1 Examples</a></li>
  1459. </ul></li>
  1460. <li><a id="toc-remap" href="#remap">32.208 remap</a></li>
  1461. <li><a id="toc-removegrain" href="#removegrain">32.209 removegrain</a></li>
  1462. <li><a id="toc-removelogo" href="#removelogo">32.210 removelogo</a></li>
  1463. <li><a id="toc-repeatfields" href="#repeatfields">32.211 repeatfields</a></li>
  1464. <li><a id="toc-reverse" href="#reverse">32.212 reverse</a>
  1465. <ul class="toc-numbered-mark">
  1466. <li><a id="toc-Examples-129" href="#Examples-129">32.212.1 Examples</a></li>
  1467. </ul></li>
  1468. <li><a id="toc-rgbashift" href="#rgbashift">32.213 rgbashift</a>
  1469. <ul class="toc-numbered-mark">
  1470. <li><a id="toc-Commands-135" href="#Commands-135">32.213.1 Commands</a></li>
  1471. </ul></li>
  1472. <li><a id="toc-roberts" href="#roberts">32.214 roberts</a>
  1473. <ul class="toc-numbered-mark">
  1474. <li><a id="toc-Commands-136" href="#Commands-136">32.214.1 Commands</a></li>
  1475. </ul></li>
  1476. <li><a id="toc-rotate" href="#rotate">32.215 rotate</a>
  1477. <ul class="toc-numbered-mark">
  1478. <li><a id="toc-Examples-130" href="#Examples-130">32.215.1 Examples</a></li>
  1479. <li><a id="toc-Commands-137" href="#Commands-137">32.215.2 Commands</a></li>
  1480. </ul></li>
  1481. <li><a id="toc-sab" href="#sab">32.216 sab</a></li>
  1482. <li><a id="toc-scale-1" href="#scale-1">32.217 scale</a>
  1483. <ul class="toc-numbered-mark">
  1484. <li><a id="toc-Options-39" href="#Options-39">32.217.1 Options</a></li>
  1485. <li><a id="toc-Examples-131" href="#Examples-131">32.217.2 Examples</a></li>
  1486. <li><a id="toc-Commands-138" href="#Commands-138">32.217.3 Commands</a></li>
  1487. </ul></li>
  1488. <li><a id="toc-scale_005fcuda-1" href="#scale_005fcuda-1">32.218 scale_cuda</a>
  1489. <ul class="toc-numbered-mark">
  1490. <li><a id="toc-Examples-132" href="#Examples-132">32.218.1 Examples</a></li>
  1491. </ul></li>
  1492. <li><a id="toc-scale_005fnpp-1" href="#scale_005fnpp-1">32.219 scale_npp</a></li>
  1493. <li><a id="toc-scale2ref" href="#scale2ref">32.220 scale2ref</a>
  1494. <ul class="toc-numbered-mark">
  1495. <li><a id="toc-Examples-133" href="#Examples-133">32.220.1 Examples</a></li>
  1496. <li><a id="toc-Commands-139" href="#Commands-139">32.220.2 Commands</a></li>
  1497. </ul></li>
  1498. <li><a id="toc-scale2ref_005fnpp" href="#scale2ref_005fnpp">32.221 scale2ref_npp</a>
  1499. <ul class="toc-numbered-mark">
  1500. <li><a id="toc-Examples-134" href="#Examples-134">32.221.1 Examples</a></li>
  1501. </ul></li>
  1502. <li><a id="toc-scale_005fvt" href="#scale_005fvt">32.222 scale_vt</a></li>
  1503. <li><a id="toc-scharr" href="#scharr">32.223 scharr</a>
  1504. <ul class="toc-numbered-mark">
  1505. <li><a id="toc-Commands-140" href="#Commands-140">32.223.1 Commands</a></li>
  1506. </ul></li>
  1507. <li><a id="toc-scroll" href="#scroll">32.224 scroll</a>
  1508. <ul class="toc-numbered-mark">
  1509. <li><a id="toc-Commands-141" href="#Commands-141">32.224.1 Commands</a></li>
  1510. </ul></li>
  1511. <li><a id="toc-scdet-1" href="#scdet-1">32.225 scdet</a></li>
  1512. <li><a id="toc-selectivecolor-1" href="#selectivecolor-1">32.226 selectivecolor</a>
  1513. <ul class="toc-numbered-mark">
  1514. <li><a id="toc-Examples-135" href="#Examples-135">32.226.1 Examples</a></li>
  1515. </ul></li>
  1516. <li><a id="toc-separatefields-1" href="#separatefields-1">32.227 separatefields</a></li>
  1517. <li><a id="toc-setdar_002c-setsar" href="#setdar_002c-setsar">32.228 setdar, setsar</a>
  1518. <ul class="toc-numbered-mark">
  1519. <li><a id="toc-Examples-136" href="#Examples-136">32.228.1 Examples</a></li>
  1520. </ul></li>
  1521. <li><a id="toc-setfield-1" href="#setfield-1">32.229 setfield</a></li>
  1522. <li><a id="toc-setparams-1" href="#setparams-1">32.230 setparams</a></li>
  1523. <li><a id="toc-sharpen_005fnpp" href="#sharpen_005fnpp">32.231 sharpen_npp</a></li>
  1524. <li><a id="toc-shear" href="#shear">32.232 shear</a>
  1525. <ul class="toc-numbered-mark">
  1526. <li><a id="toc-Commands-142" href="#Commands-142">32.232.1 Commands</a></li>
  1527. </ul></li>
  1528. <li><a id="toc-showinfo-1" href="#showinfo-1">32.233 showinfo</a></li>
  1529. <li><a id="toc-showpalette" href="#showpalette">32.234 showpalette</a></li>
  1530. <li><a id="toc-shuffleframes" href="#shuffleframes">32.235 shuffleframes</a>
  1531. <ul class="toc-numbered-mark">
  1532. <li><a id="toc-Examples-137" href="#Examples-137">32.235.1 Examples</a></li>
  1533. </ul></li>
  1534. <li><a id="toc-shufflepixels" href="#shufflepixels">32.236 shufflepixels</a></li>
  1535. <li><a id="toc-shuffleplanes" href="#shuffleplanes">32.237 shuffleplanes</a>
  1536. <ul class="toc-numbered-mark">
  1537. <li><a id="toc-Examples-138" href="#Examples-138">32.237.1 Examples</a></li>
  1538. </ul></li>
  1539. <li><a id="toc-signalstats-1" href="#signalstats-1">32.238 signalstats</a>
  1540. <ul class="toc-numbered-mark">
  1541. <li><a id="toc-Examples-139" href="#Examples-139">32.238.1 Examples</a></li>
  1542. </ul></li>
  1543. <li><a id="toc-signature-1" href="#signature-1">32.239 signature</a>
  1544. <ul class="toc-numbered-mark">
  1545. <li><a id="toc-Examples-140" href="#Examples-140">32.239.1 Examples</a></li>
  1546. </ul></li>
  1547. <li><a id="toc-siti-1" href="#siti-1">32.240 siti</a>
  1548. <ul class="toc-numbered-mark">
  1549. <li><a id="toc-Examples-141" href="#Examples-141">32.240.1 Examples</a></li>
  1550. </ul></li>
  1551. <li><a id="toc-smartblur-1" href="#smartblur-1">32.241 smartblur</a></li>
  1552. <li><a id="toc-sobel" href="#sobel">32.242 sobel</a>
  1553. <ul class="toc-numbered-mark">
  1554. <li><a id="toc-Commands-143" href="#Commands-143">32.242.1 Commands</a></li>
  1555. </ul></li>
  1556. <li><a id="toc-spp-1" href="#spp-1">32.243 spp</a>
  1557. <ul class="toc-numbered-mark">
  1558. <li><a id="toc-Commands-144" href="#Commands-144">32.243.1 Commands</a></li>
  1559. </ul></li>
  1560. <li><a id="toc-sr-1" href="#sr-1">32.244 sr</a></li>
  1561. <li><a id="toc-ssim" href="#ssim">32.245 ssim</a>
  1562. <ul class="toc-numbered-mark">
  1563. <li><a id="toc-Examples-142" href="#Examples-142">32.245.1 Examples</a></li>
  1564. </ul></li>
  1565. <li><a id="toc-stereo3d" href="#stereo3d">32.246 stereo3d</a>
  1566. <ul class="toc-numbered-mark">
  1567. <li><a id="toc-Examples-143" href="#Examples-143">32.246.1 Examples</a></li>
  1568. </ul></li>
  1569. <li><a id="toc-streamselect_002c-astreamselect" href="#streamselect_002c-astreamselect">32.247 streamselect, astreamselect</a>
  1570. <ul class="toc-numbered-mark">
  1571. <li><a id="toc-Commands-145" href="#Commands-145">32.247.1 Commands</a></li>
  1572. <li><a id="toc-Examples-144" href="#Examples-144">32.247.2 Examples</a></li>
  1573. </ul></li>
  1574. <li><a id="toc-subtitles-1" href="#subtitles-1">32.248 subtitles</a></li>
  1575. <li><a id="toc-super2xsai" href="#super2xsai">32.249 super2xsai</a></li>
  1576. <li><a id="toc-swaprect" href="#swaprect">32.250 swaprect</a>
  1577. <ul class="toc-numbered-mark">
  1578. <li><a id="toc-Commands-146" href="#Commands-146">32.250.1 Commands</a></li>
  1579. </ul></li>
  1580. <li><a id="toc-swapuv" href="#swapuv">32.251 swapuv</a></li>
  1581. <li><a id="toc-tblend" href="#tblend">32.252 tblend</a></li>
  1582. <li><a id="toc-telecine" href="#telecine">32.253 telecine</a></li>
  1583. <li><a id="toc-thistogram" href="#thistogram">32.254 thistogram</a></li>
  1584. <li><a id="toc-threshold" href="#threshold">32.255 threshold</a>
  1585. <ul class="toc-numbered-mark">
  1586. <li><a id="toc-Commands-147" href="#Commands-147">32.255.1 Commands</a></li>
  1587. <li><a id="toc-Examples-145" href="#Examples-145">32.255.2 Examples</a></li>
  1588. </ul></li>
  1589. <li><a id="toc-thumbnail" href="#thumbnail">32.256 thumbnail</a>
  1590. <ul class="toc-numbered-mark">
  1591. <li><a id="toc-Examples-146" href="#Examples-146">32.256.1 Examples</a></li>
  1592. </ul></li>
  1593. <li><a id="toc-tile-1" href="#tile-1">32.257 tile</a>
  1594. <ul class="toc-numbered-mark">
  1595. <li><a id="toc-Examples-147" href="#Examples-147">32.257.1 Examples</a></li>
  1596. </ul></li>
  1597. <li><a id="toc-tiltandshift" href="#tiltandshift">32.258 tiltandshift</a></li>
  1598. <li><a id="toc-tinterlace" href="#tinterlace">32.259 tinterlace</a></li>
  1599. <li><a id="toc-tmedian" href="#tmedian">32.260 tmedian</a>
  1600. <ul class="toc-numbered-mark">
  1601. <li><a id="toc-Commands-148" href="#Commands-148">32.260.1 Commands</a></li>
  1602. </ul></li>
  1603. <li><a id="toc-tmidequalizer" href="#tmidequalizer">32.261 tmidequalizer</a></li>
  1604. <li><a id="toc-tmix" href="#tmix">32.262 tmix</a>
  1605. <ul class="toc-numbered-mark">
  1606. <li><a id="toc-Examples-148" href="#Examples-148">32.262.1 Examples</a></li>
  1607. <li><a id="toc-Commands-149" href="#Commands-149">32.262.2 Commands</a></li>
  1608. </ul></li>
  1609. <li><a id="toc-tonemap-1" href="#tonemap-1">32.263 tonemap</a>
  1610. <ul class="toc-numbered-mark">
  1611. <li><a id="toc-Options-40" href="#Options-40">32.263.1 Options</a></li>
  1612. </ul></li>
  1613. <li><a id="toc-tpad" href="#tpad">32.264 tpad</a></li>
  1614. <li><a id="toc-transpose-1" href="#transpose-1">32.265 transpose</a></li>
  1615. <li><a id="toc-transpose_005fnpp" href="#transpose_005fnpp">32.266 transpose_npp</a></li>
  1616. <li><a id="toc-trim" href="#trim">32.267 trim</a></li>
  1617. <li><a id="toc-unpremultiply" href="#unpremultiply">32.268 unpremultiply</a></li>
  1618. <li><a id="toc-unsharp-1" href="#unsharp-1">32.269 unsharp</a>
  1619. <ul class="toc-numbered-mark">
  1620. <li><a id="toc-Examples-149" href="#Examples-149">32.269.1 Examples</a></li>
  1621. </ul></li>
  1622. <li><a id="toc-untile-1" href="#untile-1">32.270 untile</a>
  1623. <ul class="toc-numbered-mark">
  1624. <li><a id="toc-Examples-150" href="#Examples-150">32.270.1 Examples</a></li>
  1625. </ul></li>
  1626. <li><a id="toc-uspp" href="#uspp">32.271 uspp</a></li>
  1627. <li><a id="toc-v360" href="#v360">32.272 v360</a>
  1628. <ul class="toc-numbered-mark">
  1629. <li><a id="toc-Examples-151" href="#Examples-151">32.272.1 Examples</a></li>
  1630. <li><a id="toc-Commands-150" href="#Commands-150">32.272.2 Commands</a></li>
  1631. </ul></li>
  1632. <li><a id="toc-vaguedenoiser" href="#vaguedenoiser">32.273 vaguedenoiser</a></li>
  1633. <li><a id="toc-varblur" href="#varblur">32.274 varblur</a>
  1634. <ul class="toc-numbered-mark">
  1635. <li><a id="toc-Commands-151" href="#Commands-151">32.274.1 Commands</a></li>
  1636. </ul></li>
  1637. <li><a id="toc-vectorscope" href="#vectorscope">32.275 vectorscope</a></li>
  1638. <li><a id="toc-vidstabdetect-1" href="#vidstabdetect-1">32.276 vidstabdetect</a>
  1639. <ul class="toc-numbered-mark">
  1640. <li><a id="toc-Examples-152" href="#Examples-152">32.276.1 Examples</a></li>
  1641. </ul></li>
  1642. <li><a id="toc-vidstabtransform-1" href="#vidstabtransform-1">32.277 vidstabtransform</a>
  1643. <ul class="toc-numbered-mark">
  1644. <li><a id="toc-Options-41" href="#Options-41">32.277.1 Options</a></li>
  1645. <li><a id="toc-Examples-153" href="#Examples-153">32.277.2 Examples</a></li>
  1646. </ul></li>
  1647. <li><a id="toc-vflip" href="#vflip">32.278 vflip</a></li>
  1648. <li><a id="toc-vfrdet" href="#vfrdet">32.279 vfrdet</a></li>
  1649. <li><a id="toc-vibrance" href="#vibrance">32.280 vibrance</a>
  1650. <ul class="toc-numbered-mark">
  1651. <li><a id="toc-Commands-152" href="#Commands-152">32.280.1 Commands</a></li>
  1652. </ul></li>
  1653. <li><a id="toc-vif" href="#vif">32.281 vif</a></li>
  1654. <li><a id="toc-vignette-1" href="#vignette-1">32.282 vignette</a>
  1655. <ul class="toc-numbered-mark">
  1656. <li><a id="toc-Expressions" href="#Expressions">32.282.1 Expressions</a></li>
  1657. <li><a id="toc-Examples-154" href="#Examples-154">32.282.2 Examples</a></li>
  1658. </ul></li>
  1659. <li><a id="toc-vmafmotion" href="#vmafmotion">32.283 vmafmotion</a></li>
  1660. <li><a id="toc-vstack-1" href="#vstack-1">32.284 vstack</a></li>
  1661. <li><a id="toc-w3fdif" href="#w3fdif">32.285 w3fdif</a>
  1662. <ul class="toc-numbered-mark">
  1663. <li><a id="toc-Commands-153" href="#Commands-153">32.285.1 Commands</a></li>
  1664. </ul></li>
  1665. <li><a id="toc-waveform" href="#waveform">32.286 waveform</a></li>
  1666. <li><a id="toc-weave_002c-doubleweave" href="#weave_002c-doubleweave">32.287 weave, doubleweave</a>
  1667. <ul class="toc-numbered-mark">
  1668. <li><a id="toc-Examples-155" href="#Examples-155">32.287.1 Examples</a></li>
  1669. </ul></li>
  1670. <li><a id="toc-xbr" href="#xbr">32.288 xbr</a></li>
  1671. <li><a id="toc-xcorrelate" href="#xcorrelate">32.289 xcorrelate</a></li>
  1672. <li><a id="toc-xfade" href="#xfade">32.290 xfade</a>
  1673. <ul class="toc-numbered-mark">
  1674. <li><a id="toc-Examples-156" href="#Examples-156">32.290.1 Examples</a></li>
  1675. </ul></li>
  1676. <li><a id="toc-xmedian" href="#xmedian">32.291 xmedian</a>
  1677. <ul class="toc-numbered-mark">
  1678. <li><a id="toc-Commands-154" href="#Commands-154">32.291.1 Commands</a></li>
  1679. </ul></li>
  1680. <li><a id="toc-xstack-1" href="#xstack-1">32.292 xstack</a>
  1681. <ul class="toc-numbered-mark">
  1682. <li><a id="toc-Examples-157" href="#Examples-157">32.292.1 Examples</a></li>
  1683. </ul></li>
  1684. <li><a id="toc-yadif-1" href="#yadif-1">32.293 yadif</a></li>
  1685. <li><a id="toc-yadif_005fcuda" href="#yadif_005fcuda">32.294 yadif_cuda</a></li>
  1686. <li><a id="toc-yaepblur" href="#yaepblur">32.295 yaepblur</a>
  1687. <ul class="toc-numbered-mark">
  1688. <li><a id="toc-Commands-155" href="#Commands-155">32.295.1 Commands</a></li>
  1689. </ul></li>
  1690. <li><a id="toc-zoompan" href="#zoompan">32.296 zoompan</a>
  1691. <ul class="toc-numbered-mark">
  1692. <li><a id="toc-Examples-158" href="#Examples-158">32.296.1 Examples</a></li>
  1693. </ul></li>
  1694. <li><a id="toc-zscale-1" href="#zscale-1">32.297 zscale</a>
  1695. <ul class="toc-numbered-mark">
  1696. <li><a id="toc-Options-42" href="#Options-42">32.297.1 Options</a></li>
  1697. <li><a id="toc-Commands-156" href="#Commands-156">32.297.2 Commands</a></li>
  1698. </ul></li>
  1699. </ul></li>
  1700. <li><a id="toc-OpenCL-Video-Filters" href="#OpenCL-Video-Filters">33 OpenCL Video Filters</a>
  1701. <ul class="toc-numbered-mark">
  1702. <li><a id="toc-avgblur_005fopencl" href="#avgblur_005fopencl">33.1 avgblur_opencl</a>
  1703. <ul class="toc-numbered-mark">
  1704. <li><a id="toc-Example" href="#Example">33.1.1 Example</a></li>
  1705. </ul></li>
  1706. <li><a id="toc-boxblur_005fopencl" href="#boxblur_005fopencl">33.2 boxblur_opencl</a>
  1707. <ul class="toc-numbered-mark">
  1708. <li><a id="toc-Examples-159" href="#Examples-159">33.2.1 Examples</a></li>
  1709. </ul></li>
  1710. <li><a id="toc-colorkey_005fopencl" href="#colorkey_005fopencl">33.3 colorkey_opencl</a>
  1711. <ul class="toc-numbered-mark">
  1712. <li><a id="toc-Examples-160" href="#Examples-160">33.3.1 Examples</a></li>
  1713. </ul></li>
  1714. <li><a id="toc-convolution_005fopencl" href="#convolution_005fopencl">33.4 convolution_opencl</a>
  1715. <ul class="toc-numbered-mark">
  1716. <li><a id="toc-Examples-161" href="#Examples-161">33.4.1 Examples</a></li>
  1717. </ul></li>
  1718. <li><a id="toc-erosion_005fopencl" href="#erosion_005fopencl">33.5 erosion_opencl</a>
  1719. <ul class="toc-numbered-mark">
  1720. <li><a id="toc-Example-1" href="#Example-1">33.5.1 Example</a></li>
  1721. </ul></li>
  1722. <li><a id="toc-deshake_005fopencl" href="#deshake_005fopencl">33.6 deshake_opencl</a>
  1723. <ul class="toc-numbered-mark">
  1724. <li><a id="toc-Examples-162" href="#Examples-162">33.6.1 Examples</a></li>
  1725. </ul></li>
  1726. <li><a id="toc-dilation_005fopencl" href="#dilation_005fopencl">33.7 dilation_opencl</a>
  1727. <ul class="toc-numbered-mark">
  1728. <li><a id="toc-Example-2" href="#Example-2">33.7.1 Example</a></li>
  1729. </ul></li>
  1730. <li><a id="toc-nlmeans_005fopencl-1" href="#nlmeans_005fopencl-1">33.8 nlmeans_opencl</a></li>
  1731. <li><a id="toc-overlay_005fopencl" href="#overlay_005fopencl">33.9 overlay_opencl</a>
  1732. <ul class="toc-numbered-mark">
  1733. <li><a id="toc-Examples-163" href="#Examples-163">33.9.1 Examples</a></li>
  1734. </ul></li>
  1735. <li><a id="toc-pad_005fopencl" href="#pad_005fopencl">33.10 pad_opencl</a></li>
  1736. <li><a id="toc-prewitt_005fopencl" href="#prewitt_005fopencl">33.11 prewitt_opencl</a>
  1737. <ul class="toc-numbered-mark">
  1738. <li><a id="toc-Example-3" href="#Example-3">33.11.1 Example</a></li>
  1739. </ul></li>
  1740. <li><a id="toc-program_005fopencl-1" href="#program_005fopencl-1">33.12 program_opencl</a></li>
  1741. <li><a id="toc-remap_005fopencl" href="#remap_005fopencl">33.13 remap_opencl</a></li>
  1742. <li><a id="toc-roberts_005fopencl" href="#roberts_005fopencl">33.14 roberts_opencl</a>
  1743. <ul class="toc-numbered-mark">
  1744. <li><a id="toc-Example-4" href="#Example-4">33.14.1 Example</a></li>
  1745. </ul></li>
  1746. <li><a id="toc-sobel_005fopencl" href="#sobel_005fopencl">33.15 sobel_opencl</a>
  1747. <ul class="toc-numbered-mark">
  1748. <li><a id="toc-Example-5" href="#Example-5">33.15.1 Example</a></li>
  1749. </ul></li>
  1750. <li><a id="toc-tonemap_005fopencl" href="#tonemap_005fopencl">33.16 tonemap_opencl</a>
  1751. <ul class="toc-numbered-mark">
  1752. <li><a id="toc-Example-6" href="#Example-6">33.16.1 Example</a></li>
  1753. </ul></li>
  1754. <li><a id="toc-unsharp_005fopencl" href="#unsharp_005fopencl">33.17 unsharp_opencl</a>
  1755. <ul class="toc-numbered-mark">
  1756. <li><a id="toc-Examples-164" href="#Examples-164">33.17.1 Examples</a></li>
  1757. </ul></li>
  1758. <li><a id="toc-xfade_005fopencl" href="#xfade_005fopencl">33.18 xfade_opencl</a></li>
  1759. </ul></li>
  1760. <li><a id="toc-VAAPI-Video-Filters" href="#VAAPI-Video-Filters">34 VAAPI Video Filters</a>
  1761. <ul class="toc-numbered-mark">
  1762. <li><a id="toc-overlay_005fvaapi" href="#overlay_005fvaapi">34.1 overlay_vaapi</a>
  1763. <ul class="toc-numbered-mark">
  1764. <li><a id="toc-Examples-165" href="#Examples-165">34.1.1 Examples</a></li>
  1765. </ul></li>
  1766. <li><a id="toc-tonemap_005fvaapi" href="#tonemap_005fvaapi">34.2 tonemap_vaapi</a>
  1767. <ul class="toc-numbered-mark">
  1768. <li><a id="toc-Example-7" href="#Example-7">34.2.1 Example</a></li>
  1769. </ul></li>
  1770. <li><a id="toc-hstack_005fvaapi" href="#hstack_005fvaapi">34.3 hstack_vaapi</a></li>
  1771. <li><a id="toc-vstack_005fvaapi" href="#vstack_005fvaapi">34.4 vstack_vaapi</a></li>
  1772. <li><a id="toc-xstack_005fvaapi" href="#xstack_005fvaapi">34.5 xstack_vaapi</a></li>
  1773. </ul></li>
  1774. <li><a id="toc-Vulkan-Video-Filters" href="#Vulkan-Video-Filters">35 Vulkan Video Filters</a>
  1775. <ul class="toc-numbered-mark">
  1776. <li><a id="toc-avgblur_005fvulkan" href="#avgblur_005fvulkan">35.1 avgblur_vulkan</a></li>
  1777. <li><a id="toc-blend_005fvulkan" href="#blend_005fvulkan">35.2 blend_vulkan</a></li>
  1778. <li><a id="toc-bwdif_005fvulkan" href="#bwdif_005fvulkan">35.3 bwdif_vulkan</a></li>
  1779. <li><a id="toc-chromaber_005fvulkan" href="#chromaber_005fvulkan">35.4 chromaber_vulkan</a></li>
  1780. <li><a id="toc-color_005fvulkan" href="#color_005fvulkan">35.5 color_vulkan</a></li>
  1781. <li><a id="toc-vflip_005fvulkan" href="#vflip_005fvulkan">35.6 vflip_vulkan</a></li>
  1782. <li><a id="toc-hflip_005fvulkan" href="#hflip_005fvulkan">35.7 hflip_vulkan</a></li>
  1783. <li><a id="toc-flip_005fvulkan" href="#flip_005fvulkan">35.8 flip_vulkan</a></li>
  1784. <li><a id="toc-gblur_005fvulkan" href="#gblur_005fvulkan">35.9 gblur_vulkan</a></li>
  1785. <li><a id="toc-nlmeans_005fvulkan" href="#nlmeans_005fvulkan">35.10 nlmeans_vulkan</a></li>
  1786. <li><a id="toc-overlay_005fvulkan" href="#overlay_005fvulkan">35.11 overlay_vulkan</a></li>
  1787. <li><a id="toc-transpose_005fvt" href="#transpose_005fvt">35.12 transpose_vt</a></li>
  1788. <li><a id="toc-transpose_005fvulkan" href="#transpose_005fvulkan">35.13 transpose_vulkan</a></li>
  1789. </ul></li>
  1790. <li><a id="toc-QSV-Video-Filters" href="#QSV-Video-Filters">36 QSV Video Filters</a>
  1791. <ul class="toc-numbered-mark">
  1792. <li><a id="toc-hstack_005fqsv" href="#hstack_005fqsv">36.1 hstack_qsv</a></li>
  1793. <li><a id="toc-vstack_005fqsv" href="#vstack_005fqsv">36.2 vstack_qsv</a></li>
  1794. <li><a id="toc-xstack_005fqsv" href="#xstack_005fqsv">36.3 xstack_qsv</a></li>
  1795. </ul></li>
  1796. <li><a id="toc-Video-Sources" href="#Video-Sources">37 Video Sources</a>
  1797. <ul class="toc-numbered-mark">
  1798. <li><a id="toc-buffer" href="#buffer">37.1 buffer</a></li>
  1799. <li><a id="toc-cellauto" href="#cellauto">37.2 cellauto</a>
  1800. <ul class="toc-numbered-mark">
  1801. <li><a id="toc-Examples-166" href="#Examples-166">37.2.1 Examples</a></li>
  1802. </ul></li>
  1803. <li><a id="toc-coreimagesrc-1" href="#coreimagesrc-1">37.3 coreimagesrc</a>
  1804. <ul class="toc-numbered-mark">
  1805. <li><a id="toc-Examples-167" href="#Examples-167">37.3.1 Examples</a></li>
  1806. </ul></li>
  1807. <li><a id="toc-ddagrab" href="#ddagrab">37.4 ddagrab</a>
  1808. <ul class="toc-numbered-mark">
  1809. <li><a id="toc-Examples-168" href="#Examples-168">37.4.1 Examples</a></li>
  1810. </ul></li>
  1811. <li><a id="toc-gradients" href="#gradients">37.5 gradients</a>
  1812. <ul class="toc-numbered-mark">
  1813. <li><a id="toc-Commands-157" href="#Commands-157">37.5.1 Commands</a></li>
  1814. </ul></li>
  1815. <li><a id="toc-mandelbrot" href="#mandelbrot">37.6 mandelbrot</a></li>
  1816. <li><a id="toc-mptestsrc" href="#mptestsrc">37.7 mptestsrc</a></li>
  1817. <li><a id="toc-frei0r_005fsrc" href="#frei0r_005fsrc">37.8 frei0r_src</a></li>
  1818. <li><a id="toc-life" href="#life">37.9 life</a>
  1819. <ul class="toc-numbered-mark">
  1820. <li><a id="toc-Examples-169" href="#Examples-169">37.9.1 Examples</a></li>
  1821. </ul></li>
  1822. <li><a id="toc-qrencodesrc" href="#qrencodesrc">37.10 qrencodesrc</a>
  1823. <ul class="toc-numbered-mark">
  1824. <li><a id="toc-Examples-170" href="#Examples-170">37.10.1 Examples</a></li>
  1825. </ul></li>
  1826. <li><a id="toc-allrgb_002c-allyuv_002c-color_002c-colorchart_002c-colorspectrum_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc" href="#allrgb_002c-allyuv_002c-color_002c-colorchart_002c-colorspectrum_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc">37.11 allrgb, allyuv, color, colorchart, colorspectrum, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc</a>
  1827. <ul class="toc-numbered-mark">
  1828. <li><a id="toc-Examples-171" href="#Examples-171">37.11.1 Examples</a></li>
  1829. <li><a id="toc-Commands-158" href="#Commands-158">37.11.2 Commands</a></li>
  1830. </ul></li>
  1831. <li><a id="toc-openclsrc" href="#openclsrc">37.12 openclsrc</a></li>
  1832. <li><a id="toc-sierpinski" href="#sierpinski">37.13 sierpinski</a></li>
  1833. <li><a id="toc-zoneplate" href="#zoneplate">37.14 zoneplate</a>
  1834. <ul class="toc-numbered-mark">
  1835. <li><a id="toc-Commands-159" href="#Commands-159">37.14.1 Commands</a></li>
  1836. <li><a id="toc-Examples-172" href="#Examples-172">37.14.2 Examples</a></li>
  1837. </ul></li>
  1838. </ul></li>
  1839. <li><a id="toc-Video-Sinks" href="#Video-Sinks">38 Video Sinks</a>
  1840. <ul class="toc-numbered-mark">
  1841. <li><a id="toc-buffersink" href="#buffersink">38.1 buffersink</a></li>
  1842. <li><a id="toc-nullsink" href="#nullsink">38.2 nullsink</a></li>
  1843. </ul></li>
  1844. <li><a id="toc-Multimedia-Filters" href="#Multimedia-Filters">39 Multimedia Filters</a>
  1845. <ul class="toc-numbered-mark">
  1846. <li><a id="toc-a3dscope" href="#a3dscope">39.1 a3dscope</a>
  1847. <ul class="toc-numbered-mark">
  1848. <li><a id="toc-Commands-160" href="#Commands-160">39.1.1 Commands</a></li>
  1849. </ul></li>
  1850. <li><a id="toc-abitscope" href="#abitscope">39.2 abitscope</a></li>
  1851. <li><a id="toc-adrawgraph" href="#adrawgraph">39.3 adrawgraph</a></li>
  1852. <li><a id="toc-agraphmonitor" href="#agraphmonitor">39.4 agraphmonitor</a></li>
  1853. <li><a id="toc-ahistogram" href="#ahistogram">39.5 ahistogram</a></li>
  1854. <li><a id="toc-aphasemeter" href="#aphasemeter">39.6 aphasemeter</a>
  1855. <ul class="toc-numbered-mark">
  1856. <li><a id="toc-phasing-detection" href="#phasing-detection">39.6.1 phasing detection</a></li>
  1857. <li><a id="toc-Examples-173" href="#Examples-173">39.6.2 Examples</a></li>
  1858. </ul></li>
  1859. <li><a id="toc-avectorscope" href="#avectorscope">39.7 avectorscope</a>
  1860. <ul class="toc-numbered-mark">
  1861. <li><a id="toc-Examples-174" href="#Examples-174">39.7.1 Examples</a></li>
  1862. <li><a id="toc-Commands-161" href="#Commands-161">39.7.2 Commands</a></li>
  1863. </ul></li>
  1864. <li><a id="toc-bench_002c-abench" href="#bench_002c-abench">39.8 bench, abench</a>
  1865. <ul class="toc-numbered-mark">
  1866. <li><a id="toc-Examples-175" href="#Examples-175">39.8.1 Examples</a></li>
  1867. </ul></li>
  1868. <li><a id="toc-concat-3" href="#concat-3">39.9 concat</a>
  1869. <ul class="toc-numbered-mark">
  1870. <li><a id="toc-Examples-176" href="#Examples-176">39.9.1 Examples</a></li>
  1871. <li><a id="toc-Commands-162" href="#Commands-162">39.9.2 Commands</a></li>
  1872. </ul></li>
  1873. <li><a id="toc-ebur128-1" href="#ebur128-1">39.10 ebur128</a>
  1874. <ul class="toc-numbered-mark">
  1875. <li><a id="toc-Examples-177" href="#Examples-177">39.10.1 Examples</a></li>
  1876. </ul></li>
  1877. <li><a id="toc-interleave_002c-ainterleave" href="#interleave_002c-ainterleave">39.11 interleave, ainterleave</a>
  1878. <ul class="toc-numbered-mark">
  1879. <li><a id="toc-Examples-178" href="#Examples-178">39.11.1 Examples</a></li>
  1880. </ul></li>
  1881. <li><a id="toc-latency_002c-alatency" href="#latency_002c-alatency">39.12 latency, alatency</a></li>
  1882. <li><a id="toc-metadata_002c-ametadata" href="#metadata_002c-ametadata">39.13 metadata, ametadata</a>
  1883. <ul class="toc-numbered-mark">
  1884. <li><a id="toc-Examples-179" href="#Examples-179">39.13.1 Examples</a></li>
  1885. </ul></li>
  1886. <li><a id="toc-perms_002c-aperms" href="#perms_002c-aperms">39.14 perms, aperms</a></li>
  1887. <li><a id="toc-realtime_002c-arealtime" href="#realtime_002c-arealtime">39.15 realtime, arealtime</a>
  1888. <ul class="toc-numbered-mark">
  1889. <li><a id="toc-Commands-163" href="#Commands-163">39.15.1 Commands</a></li>
  1890. </ul></li>
  1891. <li><a id="toc-segment_002c-asegment" href="#segment_002c-asegment">39.16 segment, asegment</a>
  1892. <ul class="toc-numbered-mark">
  1893. <li><a id="toc-Examples-180" href="#Examples-180">39.16.1 Examples</a></li>
  1894. </ul></li>
  1895. <li><a id="toc-select_002c-aselect" href="#select_002c-aselect">39.17 select, aselect</a>
  1896. <ul class="toc-numbered-mark">
  1897. <li><a id="toc-Examples-181" href="#Examples-181">39.17.1 Examples</a></li>
  1898. </ul></li>
  1899. <li><a id="toc-sendcmd_002c-asendcmd" href="#sendcmd_002c-asendcmd">39.18 sendcmd, asendcmd</a>
  1900. <ul class="toc-numbered-mark">
  1901. <li><a id="toc-Commands-syntax" href="#Commands-syntax">39.18.1 Commands syntax</a></li>
  1902. <li><a id="toc-Examples-182" href="#Examples-182">39.18.2 Examples</a></li>
  1903. </ul></li>
  1904. <li><a id="toc-setpts_002c-asetpts" href="#setpts_002c-asetpts">39.19 setpts, asetpts</a>
  1905. <ul class="toc-numbered-mark">
  1906. <li><a id="toc-Examples-183" href="#Examples-183">39.19.1 Examples</a></li>
  1907. <li><a id="toc-Commands-164" href="#Commands-164">39.19.2 Commands</a></li>
  1908. </ul></li>
  1909. <li><a id="toc-setrange" href="#setrange">39.20 setrange</a></li>
  1910. <li><a id="toc-settb_002c-asettb" href="#settb_002c-asettb">39.21 settb, asettb</a>
  1911. <ul class="toc-numbered-mark">
  1912. <li><a id="toc-Examples-184" href="#Examples-184">39.21.1 Examples</a></li>
  1913. </ul></li>
  1914. <li><a id="toc-showcqt" href="#showcqt">39.22 showcqt</a>
  1915. <ul class="toc-numbered-mark">
  1916. <li><a id="toc-Examples-185" href="#Examples-185">39.22.1 Examples</a></li>
  1917. </ul></li>
  1918. <li><a id="toc-showcwt" href="#showcwt">39.23 showcwt</a></li>
  1919. <li><a id="toc-showfreqs" href="#showfreqs">39.24 showfreqs</a></li>
  1920. <li><a id="toc-showspatial" href="#showspatial">39.25 showspatial</a></li>
  1921. <li><a id="toc-showspectrum-1" href="#showspectrum-1">39.26 showspectrum</a>
  1922. <ul class="toc-numbered-mark">
  1923. <li><a id="toc-Examples-186" href="#Examples-186">39.26.1 Examples</a></li>
  1924. </ul></li>
  1925. <li><a id="toc-showspectrumpic" href="#showspectrumpic">39.27 showspectrumpic</a>
  1926. <ul class="toc-numbered-mark">
  1927. <li><a id="toc-Examples-187" href="#Examples-187">39.27.1 Examples</a></li>
  1928. </ul></li>
  1929. <li><a id="toc-showvolume" href="#showvolume">39.28 showvolume</a></li>
  1930. <li><a id="toc-showwaves" href="#showwaves">39.29 showwaves</a>
  1931. <ul class="toc-numbered-mark">
  1932. <li><a id="toc-Examples-188" href="#Examples-188">39.29.1 Examples</a></li>
  1933. </ul></li>
  1934. <li><a id="toc-showwavespic" href="#showwavespic">39.30 showwavespic</a>
  1935. <ul class="toc-numbered-mark">
  1936. <li><a id="toc-Examples-189" href="#Examples-189">39.30.1 Examples</a></li>
  1937. </ul></li>
  1938. <li><a id="toc-sidedata_002c-asidedata" href="#sidedata_002c-asidedata">39.31 sidedata, asidedata</a></li>
  1939. <li><a id="toc-spectrumsynth" href="#spectrumsynth">39.32 spectrumsynth</a>
  1940. <ul class="toc-numbered-mark">
  1941. <li><a id="toc-Examples-190" href="#Examples-190">39.32.1 Examples</a></li>
  1942. </ul></li>
  1943. <li><a id="toc-split_002c-asplit" href="#split_002c-asplit">39.33 split, asplit</a>
  1944. <ul class="toc-numbered-mark">
  1945. <li><a id="toc-Examples-191" href="#Examples-191">39.33.1 Examples</a></li>
  1946. </ul></li>
  1947. <li><a id="toc-zmq_002c-azmq" href="#zmq_002c-azmq">39.34 zmq, azmq</a>
  1948. <ul class="toc-numbered-mark">
  1949. <li><a id="toc-Examples-192" href="#Examples-192">39.34.1 Examples</a></li>
  1950. </ul></li>
  1951. </ul></li>
  1952. <li><a id="toc-Multimedia-Sources" href="#Multimedia-Sources">40 Multimedia Sources</a>
  1953. <ul class="toc-numbered-mark">
  1954. <li><a id="toc-amovie" href="#amovie">40.1 amovie</a></li>
  1955. <li><a id="toc-avsynctest" href="#avsynctest">40.2 avsynctest</a>
  1956. <ul class="toc-numbered-mark">
  1957. <li><a id="toc-Commands-165" href="#Commands-165">40.2.1 Commands</a></li>
  1958. </ul></li>
  1959. <li><a id="toc-movie-1" href="#movie-1">40.3 movie</a>
  1960. <ul class="toc-numbered-mark">
  1961. <li><a id="toc-Examples-193" href="#Examples-193">40.3.1 Examples</a></li>
  1962. <li><a id="toc-Commands-166" href="#Commands-166">40.3.2 Commands</a></li>
  1963. </ul></li>
  1964. </ul></li>
  1965. <li><a id="toc-External-libraries" href="#External-libraries">41 External libraries</a>
  1966. <ul class="toc-numbered-mark">
  1967. <li><a id="toc-Alliance-for-Open-Media-_0028AOM_0029" href="#Alliance-for-Open-Media-_0028AOM_0029">41.1 Alliance for Open Media (AOM)</a></li>
  1968. <li><a id="toc-AMD-AMF_002fVCE" href="#AMD-AMF_002fVCE">41.2 AMD AMF/VCE</a></li>
  1969. <li><a id="toc-AviSynth" href="#AviSynth">41.3 AviSynth</a></li>
  1970. <li><a id="toc-Chromaprint" href="#Chromaprint">41.4 Chromaprint</a></li>
  1971. <li><a id="toc-codec2" href="#codec2">41.5 codec2</a></li>
  1972. <li><a id="toc-dav1d" href="#dav1d">41.6 dav1d</a></li>
  1973. <li><a id="toc-davs2" href="#davs2">41.7 davs2</a></li>
  1974. <li><a id="toc-uavs3d" href="#uavs3d">41.8 uavs3d</a></li>
  1975. <li><a id="toc-Game-Music-Emu" href="#Game-Music-Emu">41.9 Game Music Emu</a></li>
  1976. <li><a id="toc-Intel-QuickSync-Video" href="#Intel-QuickSync-Video">41.10 Intel QuickSync Video</a></li>
  1977. <li><a id="toc-Kvazaar" href="#Kvazaar">41.11 Kvazaar</a></li>
  1978. <li><a id="toc-LAME" href="#LAME">41.12 LAME</a></li>
  1979. <li><a id="toc-libilbc-1" href="#libilbc-1">41.13 libilbc</a></li>
  1980. <li><a id="toc-libjxl" href="#libjxl">41.14 libjxl</a></li>
  1981. <li><a id="toc-libvpx" href="#libvpx">41.15 libvpx</a></li>
  1982. <li><a id="toc-ModPlug" href="#ModPlug">41.16 ModPlug</a></li>
  1983. <li><a id="toc-OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries" href="#OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries">41.17 OpenCORE, VisualOn, and Fraunhofer libraries</a>
  1984. <ul class="toc-numbered-mark">
  1985. <li><a id="toc-OpenCORE-AMR" href="#OpenCORE-AMR">41.17.1 OpenCORE AMR</a></li>
  1986. <li><a id="toc-VisualOn-AMR_002dWB-encoder-library" href="#VisualOn-AMR_002dWB-encoder-library">41.17.2 VisualOn AMR-WB encoder library</a></li>
  1987. <li><a id="toc-Fraunhofer-AAC-library" href="#Fraunhofer-AAC-library">41.17.3 Fraunhofer AAC library</a></li>
  1988. </ul></li>
  1989. <li><a id="toc-OpenH264" href="#OpenH264">41.18 OpenH264</a></li>
  1990. <li><a id="toc-OpenJPEG" href="#OpenJPEG">41.19 OpenJPEG</a></li>
  1991. <li><a id="toc-rav1e" href="#rav1e">41.20 rav1e</a></li>
  1992. <li><a id="toc-SVT_002dAV1" href="#SVT_002dAV1">41.21 SVT-AV1</a></li>
  1993. <li><a id="toc-TwoLAME" href="#TwoLAME">41.22 TwoLAME</a></li>
  1994. <li><a id="toc-VapourSynth" href="#VapourSynth">41.23 VapourSynth</a></li>
  1995. <li><a id="toc-x264" href="#x264">41.24 x264</a></li>
  1996. <li><a id="toc-x265" href="#x265">41.25 x265</a></li>
  1997. <li><a id="toc-xavs" href="#xavs">41.26 xavs</a></li>
  1998. <li><a id="toc-xavs2" href="#xavs2">41.27 xavs2</a></li>
  1999. <li><a id="toc-eXtra_002dfast-Essential-Video-Encoder-_0028XEVE_0029" href="#eXtra_002dfast-Essential-Video-Encoder-_0028XEVE_0029">41.28 eXtra-fast Essential Video Encoder (XEVE)</a></li>
  2000. <li><a id="toc-eXtra_002dfast-Essential-Video-Decoder-_0028XEVD_0029" href="#eXtra_002dfast-Essential-Video-Decoder-_0028XEVD_0029">41.29 eXtra-fast Essential Video Decoder (XEVD)</a></li>
  2001. <li><a id="toc-ZVBI" href="#ZVBI">41.30 ZVBI</a></li>
  2002. </ul></li>
  2003. <li><a id="toc-Supported-File-Formats_002c-Codecs-or-Features" href="#Supported-File-Formats_002c-Codecs-or-Features">42 Supported File Formats, Codecs or Features</a>
  2004. <ul class="toc-numbered-mark">
  2005. <li><a id="toc-File-Formats" href="#File-Formats">42.1 File Formats</a></li>
  2006. <li><a id="toc-Image-Formats" href="#Image-Formats">42.2 Image Formats</a></li>
  2007. <li><a id="toc-Video-Codecs" href="#Video-Codecs">42.3 Video Codecs</a></li>
  2008. <li><a id="toc-Audio-Codecs" href="#Audio-Codecs">42.4 Audio Codecs</a></li>
  2009. <li><a id="toc-Subtitle-Formats" href="#Subtitle-Formats">42.5 Subtitle Formats</a></li>
  2010. <li><a id="toc-Network-Protocols" href="#Network-Protocols">42.6 Network Protocols</a></li>
  2011. <li><a id="toc-Input_002fOutput-Devices" href="#Input_002fOutput-Devices">42.7 Input/Output Devices</a></li>
  2012. <li><a id="toc-Timecode-1" href="#Timecode-1">42.8 Timecode</a></li>
  2013. </ul></li>
  2014. <li><a id="toc-See-Also" href="#See-Also">43 See Also</a></li>
  2015. <li><a id="toc-Authors" href="#Authors">44 Authors</a></li>
  2016. </ul>
  2017. </div>
  2018. </div>
  2019. <ul class="mini-toc">
  2020. <li><a href="#Synopsis" accesskey="1">Synopsis</a></li>
  2021. <li><a href="#Description" accesskey="2">Description</a></li>
  2022. <li><a href="#Options" accesskey="3">Options</a></li>
  2023. <li><a href="#Writers" accesskey="4">Writers</a></li>
  2024. <li><a href="#Timecode" accesskey="5">Timecode</a></li>
  2025. <li><a href="#Syntax" accesskey="6">Syntax</a></li>
  2026. <li><a href="#Expression-Evaluation" accesskey="7">Expression Evaluation</a></li>
  2027. <li><a href="#Codec-Options" accesskey="8">Codec Options</a></li>
  2028. <li><a href="#Decoders" accesskey="9">Decoders</a></li>
  2029. <li><a href="#Video-Decoders">Video Decoders</a></li>
  2030. <li><a href="#Audio-Decoders">Audio Decoders</a></li>
  2031. <li><a href="#Subtitles-Decoders">Subtitles Decoders</a></li>
  2032. <li><a href="#Bitstream-Filters">Bitstream Filters</a></li>
  2033. <li><a href="#Format-Options">Format Options</a></li>
  2034. <li><a href="#Demuxers">Demuxers</a></li>
  2035. <li><a href="#Metadata">Metadata</a></li>
  2036. <li><a href="#Protocol-Options">Protocol Options</a></li>
  2037. <li><a href="#Protocols">Protocols</a></li>
  2038. <li><a href="#Device-Options">Device Options</a></li>
  2039. <li><a href="#Input-Devices">Input Devices</a></li>
  2040. <li><a href="#Resampler-Options">Resampler Options</a></li>
  2041. <li><a href="#Scaler-Options">Scaler Options</a></li>
  2042. <li><a href="#Filtering-Introduction">Filtering Introduction</a></li>
  2043. <li><a href="#graph2dot">graph2dot</a></li>
  2044. <li><a href="#Filtergraph-description">Filtergraph description</a></li>
  2045. <li><a href="#Timeline-editing">Timeline editing</a></li>
  2046. <li><a href="#Changing-options-at-runtime-with-a-command">Changing options at runtime with a command</a></li>
  2047. <li><a href="#Options-for-filters-with-several-inputs-_0028framesync_0029">Options for filters with several inputs (framesync)</a></li>
  2048. <li><a href="#Audio-Filters">Audio Filters</a></li>
  2049. <li><a href="#Audio-Sources">Audio Sources</a></li>
  2050. <li><a href="#Audio-Sinks">Audio Sinks</a></li>
  2051. <li><a href="#Video-Filters">Video Filters</a></li>
  2052. <li><a href="#OpenCL-Video-Filters">OpenCL Video Filters</a></li>
  2053. <li><a href="#VAAPI-Video-Filters">VAAPI Video Filters</a></li>
  2054. <li><a href="#Vulkan-Video-Filters">Vulkan Video Filters</a></li>
  2055. <li><a href="#QSV-Video-Filters">QSV Video Filters</a></li>
  2056. <li><a href="#Video-Sources">Video Sources</a></li>
  2057. <li><a href="#Video-Sinks">Video Sinks</a></li>
  2058. <li><a href="#Multimedia-Filters">Multimedia Filters</a></li>
  2059. <li><a href="#Multimedia-Sources">Multimedia Sources</a></li>
  2060. <li><a href="#External-libraries">External libraries</a></li>
  2061. <li><a href="#Supported-File-Formats_002c-Codecs-or-Features">Supported File Formats, Codecs or Features</a></li>
  2062. <li><a href="#See-Also">See Also</a></li>
  2063. <li><a href="#Authors">Authors</a></li>
  2064. </ul>
  2065. <div class="chapter-level-extent" id="Synopsis">
  2066. <h2 class="chapter"><span>1 Synopsis<a class="copiable-link" href="#Synopsis"> &para;</a></span></h2>
  2067. <p>ffprobe [<var class="var">options</var>] <samp class="file">input_url</samp>
  2068. </p>
  2069. </div>
  2070. <div class="chapter-level-extent" id="Description">
  2071. <h2 class="chapter"><span>2 Description<a class="copiable-link" href="#Description"> &para;</a></span></h2>
  2072. <p>ffprobe gathers information from multimedia streams and prints it in
  2073. human- and machine-readable fashion.
  2074. </p>
  2075. <p>For example it can be used to check the format of the container used
  2076. by a multimedia stream and the format and type of each media stream
  2077. contained in it.
  2078. </p>
  2079. <p>If a url is specified in input, ffprobe will try to open and
  2080. probe the url content. If the url cannot be opened or recognized as
  2081. a multimedia file, a positive exit code is returned.
  2082. </p>
  2083. <p>If no output is specified as output with <samp class="option">o</samp> ffprobe will write
  2084. to stdout.
  2085. </p>
  2086. <p>ffprobe may be employed both as a standalone application or in
  2087. combination with a textual filter, which may perform more
  2088. sophisticated processing, e.g. statistical processing or plotting.
  2089. </p>
  2090. <p>Options are used to list some of the formats supported by ffprobe or
  2091. for specifying which information to display, and for setting how
  2092. ffprobe will show it.
  2093. </p>
  2094. <p>ffprobe output is designed to be easily parsable by a textual filter,
  2095. and consists of one or more sections of a form defined by the selected
  2096. writer, which is specified by the <samp class="option">output_format</samp> option.
  2097. </p>
  2098. <p>Sections may contain other nested sections, and are identified by a
  2099. name (which may be shared by other sections), and an unique
  2100. name. See the output of <samp class="option">sections</samp>.
  2101. </p>
  2102. <p>Metadata tags stored in the container or in the streams are recognized
  2103. and printed in the corresponding &quot;FORMAT&quot;, &quot;STREAM&quot;, &quot;STREAM_GROUP_STREAM&quot;
  2104. or &quot;PROGRAM_STREAM&quot; section.
  2105. </p>
  2106. </div>
  2107. <div class="chapter-level-extent" id="Options">
  2108. <h2 class="chapter"><span>3 Options<a class="copiable-link" href="#Options"> &para;</a></span></h2>
  2109. <p>All the numerical options, if not specified otherwise, accept a string
  2110. representing a number as input, which may be followed by one of the SI
  2111. unit prefixes, for example: &rsquo;K&rsquo;, &rsquo;M&rsquo;, or &rsquo;G&rsquo;.
  2112. </p>
  2113. <p>If &rsquo;i&rsquo; is appended to the SI unit prefix, the complete prefix will be
  2114. interpreted as a unit prefix for binary multiples, which are based on
  2115. powers of 1024 instead of powers of 1000. Appending &rsquo;B&rsquo; to the SI unit
  2116. prefix multiplies the value by 8. This allows using, for example:
  2117. &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as number suffixes.
  2118. </p>
  2119. <p>Options which do not take arguments are boolean options, and set the
  2120. corresponding value to true. They can be set to false by prefixing
  2121. the option name with &quot;no&quot;. For example using &quot;-nofoo&quot;
  2122. will set the boolean option with name &quot;foo&quot; to false.
  2123. </p>
  2124. <p>Options that take arguments support a special syntax where the argument given on
  2125. the command line is interpreted as a path to the file from which the actual
  2126. argument value is loaded. To use this feature, add a forward slash &rsquo;/&rsquo;
  2127. immediately before the option name (after the leading dash). E.g.
  2128. </p><div class="example">
  2129. <pre class="example-preformatted">ffmpeg -i INPUT -/filter:v filter.script OUTPUT
  2130. </pre></div>
  2131. <p>will load a filtergraph description from the file named <samp class="file">filter.script</samp>.
  2132. </p>
  2133. <a class="anchor" id="Stream-specifiers"></a><ul class="mini-toc">
  2134. <li><a href="#Stream-specifiers-1" accesskey="1">Stream specifiers</a></li>
  2135. <li><a href="#Generic-options" accesskey="2">Generic options</a></li>
  2136. <li><a href="#AVOptions" accesskey="3">AVOptions</a></li>
  2137. <li><a href="#Main-options" accesskey="4">Main options</a></li>
  2138. </ul>
  2139. <div class="section-level-extent" id="Stream-specifiers-1">
  2140. <h3 class="section"><span>3.1 Stream specifiers<a class="copiable-link" href="#Stream-specifiers-1"> &para;</a></span></h3>
  2141. <p>Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
  2142. are used to precisely specify which stream(s) a given option belongs to.
  2143. </p>
  2144. <p>A stream specifier is a string generally appended to the option name and
  2145. separated from it by a colon. E.g. <code class="code">-codec:a:1 ac3</code> contains the
  2146. <code class="code">a:1</code> stream specifier, which matches the second audio stream. Therefore, it
  2147. would select the ac3 codec for the second audio stream.
  2148. </p>
  2149. <p>A stream specifier can match several streams, so that the option is applied to all
  2150. of them. E.g. the stream specifier in <code class="code">-b:a 128k</code> matches all audio
  2151. streams.
  2152. </p>
  2153. <p>An empty stream specifier matches all streams. For example, <code class="code">-codec copy</code>
  2154. or <code class="code">-codec: copy</code> would copy all the streams without reencoding.
  2155. </p>
  2156. <p>Possible forms of stream specifiers are:
  2157. </p><dl class="table">
  2158. <dt><samp class="option"><var class="var">stream_index</var></samp></dt>
  2159. <dd><p>Matches the stream with this index. E.g. <code class="code">-threads:1 4</code> would set the
  2160. thread count for the second stream to 4. If <var class="var">stream_index</var> is used as an
  2161. additional stream specifier (see below), then it selects stream number
  2162. <var class="var">stream_index</var> from the matching streams. Stream numbering is based on the
  2163. order of the streams as detected by libavformat except when a stream group
  2164. specifier or program ID is also specified. In this case it is based on the
  2165. ordering of the streams in the group or program.
  2166. </p></dd>
  2167. <dt><samp class="option"><var class="var">stream_type</var>[:<var class="var">additional_stream_specifier</var>]</samp></dt>
  2168. <dd><p><var class="var">stream_type</var> is one of following: &rsquo;v&rsquo; or &rsquo;V&rsquo; for video, &rsquo;a&rsquo; for audio, &rsquo;s&rsquo;
  2169. for subtitle, &rsquo;d&rsquo; for data, and &rsquo;t&rsquo; for attachments. &rsquo;v&rsquo; matches all video
  2170. streams, &rsquo;V&rsquo; only matches video streams which are not attached pictures, video
  2171. thumbnails or cover arts. If <var class="var">additional_stream_specifier</var> is used, then
  2172. it matches streams which both have this type and match the
  2173. <var class="var">additional_stream_specifier</var>. Otherwise, it matches all streams of the
  2174. specified type.
  2175. </p></dd>
  2176. <dt><samp class="option">g:<var class="var">group_specifier</var>[:<var class="var">additional_stream_specifier</var>]</samp></dt>
  2177. <dd><p>Matches streams which are in the group with the specifier <var class="var">group_specifier</var>.
  2178. if <var class="var">additional_stream_specifier</var> is used, then it matches streams which both
  2179. are part of the group and match the <var class="var">additional_stream_specifier</var>.
  2180. <var class="var">group_specifier</var> may be one of the following:
  2181. </p><dl class="table">
  2182. <dt><samp class="option"><var class="var">group_index</var></samp></dt>
  2183. <dd><p>Match the stream with this group index.
  2184. </p></dd>
  2185. <dt><samp class="option">#<var class="var">group_id</var> or i:<var class="var">group_id</var></samp></dt>
  2186. <dd><p>Match the stream with this group id.
  2187. </p></dd>
  2188. </dl>
  2189. </dd>
  2190. <dt><samp class="option">p:<var class="var">program_id</var>[:<var class="var">additional_stream_specifier</var>]</samp></dt>
  2191. <dd><p>Matches streams which are in the program with the id <var class="var">program_id</var>. If
  2192. <var class="var">additional_stream_specifier</var> is used, then it matches streams which both
  2193. are part of the program and match the <var class="var">additional_stream_specifier</var>.
  2194. </p>
  2195. </dd>
  2196. <dt><samp class="option">#<var class="var">stream_id</var> or i:<var class="var">stream_id</var></samp></dt>
  2197. <dd><p>Match the stream by stream id (e.g. PID in MPEG-TS container).
  2198. </p></dd>
  2199. <dt><samp class="option">m:<var class="var">key</var>[:<var class="var">value</var>]</samp></dt>
  2200. <dd><p>Matches streams with the metadata tag <var class="var">key</var> having the specified value. If
  2201. <var class="var">value</var> is not given, matches streams that contain the given tag with any
  2202. value.
  2203. </p></dd>
  2204. <dt><samp class="option">u</samp></dt>
  2205. <dd><p>Matches streams with usable configuration, the codec must be defined and the
  2206. essential information such as video dimension or audio sample rate must be present.
  2207. </p>
  2208. <p>Note that in <code class="command">ffmpeg</code>, matching by metadata will only work properly for
  2209. input files.
  2210. </p></dd>
  2211. </dl>
  2212. </div>
  2213. <div class="section-level-extent" id="Generic-options">
  2214. <h3 class="section"><span>3.2 Generic options<a class="copiable-link" href="#Generic-options"> &para;</a></span></h3>
  2215. <p>These options are shared amongst the ff* tools.
  2216. </p>
  2217. <dl class="table">
  2218. <dt><samp class="option">-L</samp></dt>
  2219. <dd><p>Show license.
  2220. </p>
  2221. </dd>
  2222. <dt><samp class="option">-h, -?, -help, --help [<var class="var">arg</var>]</samp></dt>
  2223. <dd><p>Show help. An optional parameter may be specified to print help about a specific
  2224. item. If no argument is specified, only basic (non advanced) tool
  2225. options are shown.
  2226. </p>
  2227. <p>Possible values of <var class="var">arg</var> are:
  2228. </p><dl class="table">
  2229. <dt><samp class="option">long</samp></dt>
  2230. <dd><p>Print advanced tool options in addition to the basic tool options.
  2231. </p>
  2232. </dd>
  2233. <dt><samp class="option">full</samp></dt>
  2234. <dd><p>Print complete list of options, including shared and private options
  2235. for encoders, decoders, demuxers, muxers, filters, etc.
  2236. </p>
  2237. </dd>
  2238. <dt><samp class="option">decoder=<var class="var">decoder_name</var></samp></dt>
  2239. <dd><p>Print detailed information about the decoder named <var class="var">decoder_name</var>. Use the
  2240. <samp class="option">-decoders</samp> option to get a list of all decoders.
  2241. </p>
  2242. </dd>
  2243. <dt><samp class="option">encoder=<var class="var">encoder_name</var></samp></dt>
  2244. <dd><p>Print detailed information about the encoder named <var class="var">encoder_name</var>. Use the
  2245. <samp class="option">-encoders</samp> option to get a list of all encoders.
  2246. </p>
  2247. </dd>
  2248. <dt><samp class="option">demuxer=<var class="var">demuxer_name</var></samp></dt>
  2249. <dd><p>Print detailed information about the demuxer named <var class="var">demuxer_name</var>. Use the
  2250. <samp class="option">-formats</samp> option to get a list of all demuxers and muxers.
  2251. </p>
  2252. </dd>
  2253. <dt><samp class="option">muxer=<var class="var">muxer_name</var></samp></dt>
  2254. <dd><p>Print detailed information about the muxer named <var class="var">muxer_name</var>. Use the
  2255. <samp class="option">-formats</samp> option to get a list of all muxers and demuxers.
  2256. </p>
  2257. </dd>
  2258. <dt><samp class="option">filter=<var class="var">filter_name</var></samp></dt>
  2259. <dd><p>Print detailed information about the filter named <var class="var">filter_name</var>. Use the
  2260. <samp class="option">-filters</samp> option to get a list of all filters.
  2261. </p>
  2262. </dd>
  2263. <dt><samp class="option">bsf=<var class="var">bitstream_filter_name</var></samp></dt>
  2264. <dd><p>Print detailed information about the bitstream filter named <var class="var">bitstream_filter_name</var>.
  2265. Use the <samp class="option">-bsfs</samp> option to get a list of all bitstream filters.
  2266. </p>
  2267. </dd>
  2268. <dt><samp class="option">protocol=<var class="var">protocol_name</var></samp></dt>
  2269. <dd><p>Print detailed information about the protocol named <var class="var">protocol_name</var>.
  2270. Use the <samp class="option">-protocols</samp> option to get a list of all protocols.
  2271. </p></dd>
  2272. </dl>
  2273. </dd>
  2274. <dt><samp class="option">-version</samp></dt>
  2275. <dd><p>Show version.
  2276. </p>
  2277. </dd>
  2278. <dt><samp class="option">-buildconf</samp></dt>
  2279. <dd><p>Show the build configuration, one option per line.
  2280. </p>
  2281. </dd>
  2282. <dt><samp class="option">-formats</samp></dt>
  2283. <dd><p>Show available formats (including devices).
  2284. </p>
  2285. </dd>
  2286. <dt><samp class="option">-demuxers</samp></dt>
  2287. <dd><p>Show available demuxers.
  2288. </p>
  2289. </dd>
  2290. <dt><samp class="option">-muxers</samp></dt>
  2291. <dd><p>Show available muxers.
  2292. </p>
  2293. </dd>
  2294. <dt><samp class="option">-devices</samp></dt>
  2295. <dd><p>Show available devices.
  2296. </p>
  2297. </dd>
  2298. <dt><samp class="option">-codecs</samp></dt>
  2299. <dd><p>Show all codecs known to libavcodec.
  2300. </p>
  2301. <p>Note that the term &rsquo;codec&rsquo; is used throughout this documentation as a shortcut
  2302. for what is more correctly called a media bitstream format.
  2303. </p>
  2304. </dd>
  2305. <dt><samp class="option">-decoders</samp></dt>
  2306. <dd><p>Show available decoders.
  2307. </p>
  2308. </dd>
  2309. <dt><samp class="option">-encoders</samp></dt>
  2310. <dd><p>Show all available encoders.
  2311. </p>
  2312. </dd>
  2313. <dt><samp class="option">-bsfs</samp></dt>
  2314. <dd><p>Show available bitstream filters.
  2315. </p>
  2316. </dd>
  2317. <dt><samp class="option">-protocols</samp></dt>
  2318. <dd><p>Show available protocols.
  2319. </p>
  2320. </dd>
  2321. <dt><samp class="option">-filters</samp></dt>
  2322. <dd><p>Show available libavfilter filters.
  2323. </p>
  2324. </dd>
  2325. <dt><samp class="option">-pix_fmts</samp></dt>
  2326. <dd><p>Show available pixel formats.
  2327. </p>
  2328. </dd>
  2329. <dt><samp class="option">-sample_fmts</samp></dt>
  2330. <dd><p>Show available sample formats.
  2331. </p>
  2332. </dd>
  2333. <dt><samp class="option">-layouts</samp></dt>
  2334. <dd><p>Show channel names and standard channel layouts.
  2335. </p>
  2336. </dd>
  2337. <dt><samp class="option">-dispositions</samp></dt>
  2338. <dd><p>Show stream dispositions.
  2339. </p>
  2340. </dd>
  2341. <dt><samp class="option">-colors</samp></dt>
  2342. <dd><p>Show recognized color names.
  2343. </p>
  2344. </dd>
  2345. <dt><samp class="option">-sources <var class="var">device</var>[,<var class="var">opt1</var>=<var class="var">val1</var>[,<var class="var">opt2</var>=<var class="var">val2</var>]...]</samp></dt>
  2346. <dd><p>Show autodetected sources of the input device.
  2347. Some devices may provide system-dependent source names that cannot be autodetected.
  2348. The returned list cannot be assumed to be always complete.
  2349. </p><div class="example">
  2350. <pre class="example-preformatted">ffmpeg -sources pulse,server=192.168.0.4
  2351. </pre></div>
  2352. </dd>
  2353. <dt><samp class="option">-sinks <var class="var">device</var>[,<var class="var">opt1</var>=<var class="var">val1</var>[,<var class="var">opt2</var>=<var class="var">val2</var>]...]</samp></dt>
  2354. <dd><p>Show autodetected sinks of the output device.
  2355. Some devices may provide system-dependent sink names that cannot be autodetected.
  2356. The returned list cannot be assumed to be always complete.
  2357. </p><div class="example">
  2358. <pre class="example-preformatted">ffmpeg -sinks pulse,server=192.168.0.4
  2359. </pre></div>
  2360. </dd>
  2361. <dt><samp class="option">-loglevel [<var class="var">flags</var>+]<var class="var">loglevel</var> | -v [<var class="var">flags</var>+]<var class="var">loglevel</var></samp></dt>
  2362. <dd><p>Set logging level and flags used by the library.
  2363. </p>
  2364. <p>The optional <var class="var">flags</var> prefix can consist of the following values:
  2365. </p><dl class="table">
  2366. <dt>&lsquo;<samp class="samp">repeat</samp>&rsquo;</dt>
  2367. <dd><p>Indicates that repeated log output should not be compressed to the first line
  2368. and the &quot;Last message repeated n times&quot; line will be omitted.
  2369. </p></dd>
  2370. <dt>&lsquo;<samp class="samp">level</samp>&rsquo;</dt>
  2371. <dd><p>Indicates that log output should add a <code class="code">[level]</code> prefix to each message
  2372. line. This can be used as an alternative to log coloring, e.g. when dumping the
  2373. log to file.
  2374. </p></dd>
  2375. </dl>
  2376. <p>Flags can also be used alone by adding a &rsquo;+&rsquo;/&rsquo;-&rsquo; prefix to set/reset a single
  2377. flag without affecting other <var class="var">flags</var> or changing <var class="var">loglevel</var>. When
  2378. setting both <var class="var">flags</var> and <var class="var">loglevel</var>, a &rsquo;+&rsquo; separator is expected
  2379. between the last <var class="var">flags</var> value and before <var class="var">loglevel</var>.
  2380. </p>
  2381. <p><var class="var">loglevel</var> is a string or a number containing one of the following values:
  2382. </p><dl class="table">
  2383. <dt>&lsquo;<samp class="samp">quiet, -8</samp>&rsquo;</dt>
  2384. <dd><p>Show nothing at all; be silent.
  2385. </p></dd>
  2386. <dt>&lsquo;<samp class="samp">panic, 0</samp>&rsquo;</dt>
  2387. <dd><p>Only show fatal errors which could lead the process to crash, such as
  2388. an assertion failure. This is not currently used for anything.
  2389. </p></dd>
  2390. <dt>&lsquo;<samp class="samp">fatal, 8</samp>&rsquo;</dt>
  2391. <dd><p>Only show fatal errors. These are errors after which the process absolutely
  2392. cannot continue.
  2393. </p></dd>
  2394. <dt>&lsquo;<samp class="samp">error, 16</samp>&rsquo;</dt>
  2395. <dd><p>Show all errors, including ones which can be recovered from.
  2396. </p></dd>
  2397. <dt>&lsquo;<samp class="samp">warning, 24</samp>&rsquo;</dt>
  2398. <dd><p>Show all warnings and errors. Any message related to possibly
  2399. incorrect or unexpected events will be shown.
  2400. </p></dd>
  2401. <dt>&lsquo;<samp class="samp">info, 32</samp>&rsquo;</dt>
  2402. <dd><p>Show informative messages during processing. This is in addition to
  2403. warnings and errors. This is the default value.
  2404. </p></dd>
  2405. <dt>&lsquo;<samp class="samp">verbose, 40</samp>&rsquo;</dt>
  2406. <dd><p>Same as <code class="code">info</code>, except more verbose.
  2407. </p></dd>
  2408. <dt>&lsquo;<samp class="samp">debug, 48</samp>&rsquo;</dt>
  2409. <dd><p>Show everything, including debugging information.
  2410. </p></dd>
  2411. <dt>&lsquo;<samp class="samp">trace, 56</samp>&rsquo;</dt>
  2412. </dl>
  2413. <p>For example to enable repeated log output, add the <code class="code">level</code> prefix, and set
  2414. <var class="var">loglevel</var> to <code class="code">verbose</code>:
  2415. </p><div class="example">
  2416. <pre class="example-preformatted">ffmpeg -loglevel repeat+level+verbose -i input output
  2417. </pre></div>
  2418. <p>Another example that enables repeated log output without affecting current
  2419. state of <code class="code">level</code> prefix flag or <var class="var">loglevel</var>:
  2420. </p><div class="example">
  2421. <pre class="example-preformatted">ffmpeg [...] -loglevel +repeat
  2422. </pre></div>
  2423. <p>By default the program logs to stderr. If coloring is supported by the
  2424. terminal, colors are used to mark errors and warnings. Log coloring
  2425. can be disabled setting the environment variable
  2426. <code class="env">AV_LOG_FORCE_NOCOLOR</code>, or can be forced setting
  2427. the environment variable <code class="env">AV_LOG_FORCE_COLOR</code>.
  2428. </p>
  2429. </dd>
  2430. <dt><samp class="option">-report</samp></dt>
  2431. <dd><p>Dump full command line and log output to a file named
  2432. <code class="code"><var class="var">program</var>-<var class="var">YYYYMMDD</var>-<var class="var">HHMMSS</var>.log</code> in the current
  2433. directory.
  2434. This file can be useful for bug reports.
  2435. It also implies <code class="code">-loglevel debug</code>.
  2436. </p>
  2437. <p>Setting the environment variable <code class="env">FFREPORT</code> to any value has the
  2438. same effect. If the value is a &rsquo;:&rsquo;-separated key=value sequence, these
  2439. options will affect the report; option values must be escaped if they
  2440. contain special characters or the options delimiter &rsquo;:&rsquo; (see the
  2441. &ldquo;Quoting and escaping&rdquo; section in the ffmpeg-utils manual).
  2442. </p>
  2443. <p>The following options are recognized:
  2444. </p><dl class="table">
  2445. <dt><samp class="option">file</samp></dt>
  2446. <dd><p>set the file name to use for the report; <code class="code">%p</code> is expanded to the name
  2447. of the program, <code class="code">%t</code> is expanded to a timestamp, <code class="code">%%</code> is expanded
  2448. to a plain <code class="code">%</code>
  2449. </p></dd>
  2450. <dt><samp class="option">level</samp></dt>
  2451. <dd><p>set the log verbosity level using a numerical value (see <code class="code">-loglevel</code>).
  2452. </p></dd>
  2453. </dl>
  2454. <p>For example, to output a report to a file named <samp class="file">ffreport.log</samp>
  2455. using a log level of <code class="code">32</code> (alias for log level <code class="code">info</code>):
  2456. </p>
  2457. <div class="example">
  2458. <pre class="example-preformatted">FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
  2459. </pre></div>
  2460. <p>Errors in parsing the environment variable are not fatal, and will not
  2461. appear in the report.
  2462. </p>
  2463. </dd>
  2464. <dt><samp class="option">-hide_banner</samp></dt>
  2465. <dd><p>Suppress printing banner.
  2466. </p>
  2467. <p>All FFmpeg tools will normally show a copyright notice, build options
  2468. and library versions. This option can be used to suppress printing
  2469. this information.
  2470. </p>
  2471. </dd>
  2472. <dt><samp class="option">-cpuflags flags (<em class="emph">global</em>)</samp></dt>
  2473. <dd><p>Allows setting and clearing cpu flags. This option is intended
  2474. for testing. Do not use it unless you know what you&rsquo;re doing.
  2475. </p><div class="example">
  2476. <pre class="example-preformatted">ffmpeg -cpuflags -sse+mmx ...
  2477. ffmpeg -cpuflags mmx ...
  2478. ffmpeg -cpuflags 0 ...
  2479. </pre></div>
  2480. <p>Possible flags for this option are:
  2481. </p><dl class="table">
  2482. <dt>&lsquo;<samp class="samp">x86</samp>&rsquo;</dt>
  2483. <dd><dl class="table">
  2484. <dt>&lsquo;<samp class="samp">mmx</samp>&rsquo;</dt>
  2485. <dt>&lsquo;<samp class="samp">mmxext</samp>&rsquo;</dt>
  2486. <dt>&lsquo;<samp class="samp">sse</samp>&rsquo;</dt>
  2487. <dt>&lsquo;<samp class="samp">sse2</samp>&rsquo;</dt>
  2488. <dt>&lsquo;<samp class="samp">sse2slow</samp>&rsquo;</dt>
  2489. <dt>&lsquo;<samp class="samp">sse3</samp>&rsquo;</dt>
  2490. <dt>&lsquo;<samp class="samp">sse3slow</samp>&rsquo;</dt>
  2491. <dt>&lsquo;<samp class="samp">ssse3</samp>&rsquo;</dt>
  2492. <dt>&lsquo;<samp class="samp">atom</samp>&rsquo;</dt>
  2493. <dt>&lsquo;<samp class="samp">sse4.1</samp>&rsquo;</dt>
  2494. <dt>&lsquo;<samp class="samp">sse4.2</samp>&rsquo;</dt>
  2495. <dt>&lsquo;<samp class="samp">avx</samp>&rsquo;</dt>
  2496. <dt>&lsquo;<samp class="samp">avx2</samp>&rsquo;</dt>
  2497. <dt>&lsquo;<samp class="samp">xop</samp>&rsquo;</dt>
  2498. <dt>&lsquo;<samp class="samp">fma3</samp>&rsquo;</dt>
  2499. <dt>&lsquo;<samp class="samp">fma4</samp>&rsquo;</dt>
  2500. <dt>&lsquo;<samp class="samp">3dnow</samp>&rsquo;</dt>
  2501. <dt>&lsquo;<samp class="samp">3dnowext</samp>&rsquo;</dt>
  2502. <dt>&lsquo;<samp class="samp">bmi1</samp>&rsquo;</dt>
  2503. <dt>&lsquo;<samp class="samp">bmi2</samp>&rsquo;</dt>
  2504. <dt>&lsquo;<samp class="samp">cmov</samp>&rsquo;</dt>
  2505. </dl>
  2506. </dd>
  2507. <dt>&lsquo;<samp class="samp">ARM</samp>&rsquo;</dt>
  2508. <dd><dl class="table">
  2509. <dt>&lsquo;<samp class="samp">armv5te</samp>&rsquo;</dt>
  2510. <dt>&lsquo;<samp class="samp">armv6</samp>&rsquo;</dt>
  2511. <dt>&lsquo;<samp class="samp">armv6t2</samp>&rsquo;</dt>
  2512. <dt>&lsquo;<samp class="samp">vfp</samp>&rsquo;</dt>
  2513. <dt>&lsquo;<samp class="samp">vfpv3</samp>&rsquo;</dt>
  2514. <dt>&lsquo;<samp class="samp">neon</samp>&rsquo;</dt>
  2515. <dt>&lsquo;<samp class="samp">setend</samp>&rsquo;</dt>
  2516. </dl>
  2517. </dd>
  2518. <dt>&lsquo;<samp class="samp">AArch64</samp>&rsquo;</dt>
  2519. <dd><dl class="table">
  2520. <dt>&lsquo;<samp class="samp">armv8</samp>&rsquo;</dt>
  2521. <dt>&lsquo;<samp class="samp">vfp</samp>&rsquo;</dt>
  2522. <dt>&lsquo;<samp class="samp">neon</samp>&rsquo;</dt>
  2523. </dl>
  2524. </dd>
  2525. <dt>&lsquo;<samp class="samp">PowerPC</samp>&rsquo;</dt>
  2526. <dd><dl class="table">
  2527. <dt>&lsquo;<samp class="samp">altivec</samp>&rsquo;</dt>
  2528. </dl>
  2529. </dd>
  2530. <dt>&lsquo;<samp class="samp">Specific Processors</samp>&rsquo;</dt>
  2531. <dd><dl class="table">
  2532. <dt>&lsquo;<samp class="samp">pentium2</samp>&rsquo;</dt>
  2533. <dt>&lsquo;<samp class="samp">pentium3</samp>&rsquo;</dt>
  2534. <dt>&lsquo;<samp class="samp">pentium4</samp>&rsquo;</dt>
  2535. <dt>&lsquo;<samp class="samp">k6</samp>&rsquo;</dt>
  2536. <dt>&lsquo;<samp class="samp">k62</samp>&rsquo;</dt>
  2537. <dt>&lsquo;<samp class="samp">athlon</samp>&rsquo;</dt>
  2538. <dt>&lsquo;<samp class="samp">athlonxp</samp>&rsquo;</dt>
  2539. <dt>&lsquo;<samp class="samp">k8</samp>&rsquo;</dt>
  2540. </dl>
  2541. </dd>
  2542. </dl>
  2543. </dd>
  2544. <dt><samp class="option">-cpucount <var class="var">count</var> (<em class="emph">global</em>)</samp></dt>
  2545. <dd><p>Override detection of CPU count. This option is intended
  2546. for testing. Do not use it unless you know what you&rsquo;re doing.
  2547. </p><div class="example">
  2548. <pre class="example-preformatted">ffmpeg -cpucount 2
  2549. </pre></div>
  2550. </dd>
  2551. <dt><samp class="option">-max_alloc <var class="var">bytes</var></samp></dt>
  2552. <dd><p>Set the maximum size limit for allocating a block on the heap by ffmpeg&rsquo;s
  2553. family of malloc functions. Exercise <strong class="strong">extreme caution</strong> when using
  2554. this option. Don&rsquo;t use if you do not understand the full consequence of doing so.
  2555. Default is INT_MAX.
  2556. </p></dd>
  2557. </dl>
  2558. </div>
  2559. <div class="section-level-extent" id="AVOptions">
  2560. <h3 class="section"><span>3.3 AVOptions<a class="copiable-link" href="#AVOptions"> &para;</a></span></h3>
  2561. <p>These options are provided directly by the libavformat, libavdevice and
  2562. libavcodec libraries. To see the list of available AVOptions, use the
  2563. <samp class="option">-help</samp> option. They are separated into two categories:
  2564. </p><dl class="table">
  2565. <dt><samp class="option">generic</samp></dt>
  2566. <dd><p>These options can be set for any container, codec or device. Generic options
  2567. are listed under AVFormatContext options for containers/devices and under
  2568. AVCodecContext options for codecs.
  2569. </p></dd>
  2570. <dt><samp class="option">private</samp></dt>
  2571. <dd><p>These options are specific to the given container, device or codec. Private
  2572. options are listed under their corresponding containers/devices/codecs.
  2573. </p></dd>
  2574. </dl>
  2575. <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  2576. an MP3 file, use the <samp class="option">id3v2_version</samp> private option of the MP3
  2577. muxer:
  2578. </p><div class="example">
  2579. <pre class="example-preformatted">ffmpeg -i input.flac -id3v2_version 3 out.mp3
  2580. </pre></div>
  2581. <p>All codec AVOptions are per-stream, and thus a stream specifier
  2582. should be attached to them:
  2583. </p><div class="example">
  2584. <pre class="example-preformatted">ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:1 2 -c:a:1 aac -b:2 128k out.mp4
  2585. </pre></div>
  2586. <p>In the above example, a multichannel audio stream is mapped twice for output.
  2587. The first instance is encoded with codec ac3 and bitrate 640k.
  2588. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using
  2589. absolute index of the output stream.
  2590. </p>
  2591. <p>Note: the <samp class="option">-nooption</samp> syntax cannot be used for boolean
  2592. AVOptions, use <samp class="option">-option 0</samp>/<samp class="option">-option 1</samp>.
  2593. </p>
  2594. <p>Note: the old undocumented way of specifying per-stream AVOptions by
  2595. prepending v/a/s to the options name is now obsolete and will be
  2596. removed soon.
  2597. </p>
  2598. </div>
  2599. <div class="section-level-extent" id="Main-options">
  2600. <h3 class="section"><span>3.4 Main options<a class="copiable-link" href="#Main-options"> &para;</a></span></h3>
  2601. <dl class="table">
  2602. <dt><samp class="option">-f <var class="var">format</var></samp></dt>
  2603. <dd><p>Force format to use.
  2604. </p>
  2605. </dd>
  2606. <dt><samp class="option">-unit</samp></dt>
  2607. <dd><p>Show the unit of the displayed values.
  2608. </p>
  2609. </dd>
  2610. <dt><samp class="option">-prefix</samp></dt>
  2611. <dd><p>Use SI prefixes for the displayed values.
  2612. Unless the &quot;-byte_binary_prefix&quot; option is used all the prefixes
  2613. are decimal.
  2614. </p>
  2615. </dd>
  2616. <dt><samp class="option">-byte_binary_prefix</samp></dt>
  2617. <dd><p>Force the use of binary prefixes for byte values.
  2618. </p>
  2619. </dd>
  2620. <dt><samp class="option">-sexagesimal</samp></dt>
  2621. <dd><p>Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
  2622. </p>
  2623. </dd>
  2624. <dt><samp class="option">-pretty</samp></dt>
  2625. <dd><p>Prettify the format of the displayed values, it corresponds to the
  2626. options &quot;-unit -prefix -byte_binary_prefix -sexagesimal&quot;.
  2627. </p>
  2628. </dd>
  2629. <dt><samp class="option">-output_format, -of, -print_format <var class="var">writer_name</var>[=<var class="var">writer_options</var>]</samp></dt>
  2630. <dd><p>Set the output printing format.
  2631. </p>
  2632. <p><var class="var">writer_name</var> specifies the name of the writer, and
  2633. <var class="var">writer_options</var> specifies the options to be passed to the writer.
  2634. </p>
  2635. <p>For example for printing the output in JSON format, specify:
  2636. </p><div class="example">
  2637. <pre class="example-preformatted">-output_format json
  2638. </pre></div>
  2639. <p>For more details on the available output printing formats, see the
  2640. Writers section below.
  2641. </p>
  2642. </dd>
  2643. <dt><samp class="option">-sections</samp></dt>
  2644. <dd><p>Print sections structure and section information, and exit. The output
  2645. is not meant to be parsed by a machine.
  2646. </p>
  2647. </dd>
  2648. <dt><samp class="option">-select_streams <var class="var">stream_specifier</var></samp></dt>
  2649. <dd><p>Select only the streams specified by <var class="var">stream_specifier</var>. This
  2650. option affects only the options related to streams
  2651. (e.g. <code class="code">show_streams</code>, <code class="code">show_packets</code>, etc.).
  2652. </p>
  2653. <p>For example to show only audio streams, you can use the command:
  2654. </p><div class="example">
  2655. <pre class="example-preformatted">ffprobe -show_streams -select_streams a INPUT
  2656. </pre></div>
  2657. <p>To show only video packets belonging to the video stream with index 1:
  2658. </p><div class="example">
  2659. <pre class="example-preformatted">ffprobe -show_packets -select_streams v:1 INPUT
  2660. </pre></div>
  2661. </dd>
  2662. <dt><samp class="option">-show_data</samp></dt>
  2663. <dd><p>Show payload data, as a hexadecimal and ASCII dump. Coupled with
  2664. <samp class="option">-show_packets</samp>, it will dump the packets&rsquo; data. Coupled with
  2665. <samp class="option">-show_streams</samp>, it will dump the codec extradata.
  2666. </p>
  2667. <p>The dump is printed as the &quot;data&quot; field. It may contain newlines.
  2668. </p>
  2669. </dd>
  2670. <dt><samp class="option">-show_data_hash <var class="var">algorithm</var></samp></dt>
  2671. <dd><p>Show a hash of payload data, for packets with <samp class="option">-show_packets</samp> and for
  2672. codec extradata with <samp class="option">-show_streams</samp>.
  2673. </p>
  2674. </dd>
  2675. <dt><samp class="option">-show_error</samp></dt>
  2676. <dd><p>Show information about the error found when trying to probe the input.
  2677. </p>
  2678. <p>The error information is printed within a section with name &quot;ERROR&quot;.
  2679. </p>
  2680. </dd>
  2681. <dt><samp class="option">-show_format</samp></dt>
  2682. <dd><p>Show information about the container format of the input multimedia
  2683. stream.
  2684. </p>
  2685. <p>All the container format information is printed within a section with
  2686. name &quot;FORMAT&quot;.
  2687. </p>
  2688. </dd>
  2689. <dt><samp class="option">-show_format_entry <var class="var">name</var></samp></dt>
  2690. <dd><p>Like <samp class="option">-show_format</samp>, but only prints the specified entry of the
  2691. container format information, rather than all. This option may be given more
  2692. than once, then all specified entries will be shown.
  2693. </p>
  2694. <p>This option is deprecated, use <code class="code">show_entries</code> instead.
  2695. </p>
  2696. </dd>
  2697. <dt><samp class="option">-show_entries <var class="var">section_entries</var></samp></dt>
  2698. <dd><p>Set list of entries to show.
  2699. </p>
  2700. <p>Entries are specified according to the following
  2701. syntax. <var class="var">section_entries</var> contains a list of section entries
  2702. separated by <code class="code">:</code>. Each section entry is composed by a section
  2703. name (or unique name), optionally followed by a list of entries local
  2704. to that section, separated by <code class="code">,</code>.
  2705. </p>
  2706. <p>If section name is specified but is followed by no <code class="code">=</code>, all
  2707. entries are printed to output, together with all the contained
  2708. sections. Otherwise only the entries specified in the local section
  2709. entries list are printed. In particular, if <code class="code">=</code> is specified but
  2710. the list of local entries is empty, then no entries will be shown for
  2711. that section.
  2712. </p>
  2713. <p>Note that the order of specification of the local section entries is
  2714. not honored in the output, and the usual display order will be
  2715. retained.
  2716. </p>
  2717. <p>The formal syntax is given by:
  2718. </p><div class="example">
  2719. <pre class="example-preformatted"><var class="var">LOCAL_SECTION_ENTRIES</var> ::= <var class="var">SECTION_ENTRY_NAME</var>[,<var class="var">LOCAL_SECTION_ENTRIES</var>]
  2720. <var class="var">SECTION_ENTRY</var> ::= <var class="var">SECTION_NAME</var>[=[<var class="var">LOCAL_SECTION_ENTRIES</var>]]
  2721. <var class="var">SECTION_ENTRIES</var> ::= <var class="var">SECTION_ENTRY</var>[:<var class="var">SECTION_ENTRIES</var>]
  2722. </pre></div>
  2723. <p>For example, to show only the index and type of each stream, and the PTS
  2724. time, duration time, and stream index of the packets, you can specify
  2725. the argument:
  2726. </p><div class="example">
  2727. <pre class="example-preformatted">packet=pts_time,duration_time,stream_index : stream=index,codec_type
  2728. </pre></div>
  2729. <p>To show all the entries in the section &quot;format&quot;, but only the codec
  2730. type in the section &quot;stream&quot;, specify the argument:
  2731. </p><div class="example">
  2732. <pre class="example-preformatted">format : stream=codec_type
  2733. </pre></div>
  2734. <p>To show all the tags in the stream and format sections:
  2735. </p><div class="example">
  2736. <pre class="example-preformatted">stream_tags : format_tags
  2737. </pre></div>
  2738. <p>To show only the <code class="code">title</code> tag (if available) in the stream
  2739. sections:
  2740. </p><div class="example">
  2741. <pre class="example-preformatted">stream_tags=title
  2742. </pre></div>
  2743. </dd>
  2744. <dt><samp class="option">-show_packets</samp></dt>
  2745. <dd><p>Show information about each packet contained in the input multimedia
  2746. stream.
  2747. </p>
  2748. <p>The information for each single packet is printed within a dedicated
  2749. section with name &quot;PACKET&quot;.
  2750. </p>
  2751. </dd>
  2752. <dt><samp class="option">-show_frames</samp></dt>
  2753. <dd><p>Show information about each frame and subtitle contained in the input
  2754. multimedia stream.
  2755. </p>
  2756. <p>The information for each single frame is printed within a dedicated
  2757. section with name &quot;FRAME&quot; or &quot;SUBTITLE&quot;.
  2758. </p>
  2759. </dd>
  2760. <dt><samp class="option">-show_log <var class="var">loglevel</var></samp></dt>
  2761. <dd><p>Show logging information from the decoder about each frame according to
  2762. the value set in <var class="var">loglevel</var>, (see <code class="code">-loglevel</code>). This option requires <code class="code">-show_frames</code>.
  2763. </p>
  2764. <p>The information for each log message is printed within a dedicated
  2765. section with name &quot;LOG&quot;.
  2766. </p>
  2767. </dd>
  2768. <dt><samp class="option">-show_streams</samp></dt>
  2769. <dd><p>Show information about each media stream contained in the input
  2770. multimedia stream.
  2771. </p>
  2772. <p>Each media stream information is printed within a dedicated section
  2773. with name &quot;STREAM&quot;.
  2774. </p>
  2775. </dd>
  2776. <dt><samp class="option">-show_programs</samp></dt>
  2777. <dd><p>Show information about programs and their streams contained in the input
  2778. multimedia stream.
  2779. </p>
  2780. <p>Each media stream information is printed within a dedicated section
  2781. with name &quot;PROGRAM_STREAM&quot;.
  2782. </p>
  2783. </dd>
  2784. <dt><samp class="option">-show_stream_groups</samp></dt>
  2785. <dd><p>Show information about stream groups and their streams contained in the
  2786. input multimedia stream.
  2787. </p>
  2788. <p>Each media stream information is printed within a dedicated section
  2789. with name &quot;STREAM_GROUP_STREAM&quot;.
  2790. </p>
  2791. </dd>
  2792. <dt><samp class="option">-show_chapters</samp></dt>
  2793. <dd><p>Show information about chapters stored in the format.
  2794. </p>
  2795. <p>Each chapter is printed within a dedicated section with name &quot;CHAPTER&quot;.
  2796. </p>
  2797. </dd>
  2798. <dt><samp class="option">-count_frames</samp></dt>
  2799. <dd><p>Count the number of frames per stream and report it in the
  2800. corresponding stream section.
  2801. </p>
  2802. </dd>
  2803. <dt><samp class="option">-count_packets</samp></dt>
  2804. <dd><p>Count the number of packets per stream and report it in the
  2805. corresponding stream section.
  2806. </p>
  2807. </dd>
  2808. <dt><samp class="option">-read_intervals <var class="var">read_intervals</var></samp></dt>
  2809. <dd>
  2810. <p>Read only the specified intervals. <var class="var">read_intervals</var> must be a
  2811. sequence of interval specifications separated by &quot;,&quot;.
  2812. <code class="command">ffprobe</code> will seek to the interval starting point, and will
  2813. continue reading from that.
  2814. </p>
  2815. <p>Each interval is specified by two optional parts, separated by &quot;%&quot;.
  2816. </p>
  2817. <p>The first part specifies the interval start position. It is
  2818. interpreted as an absolute position, or as a relative offset from the
  2819. current position if it is preceded by the &quot;+&quot; character. If this first
  2820. part is not specified, no seeking will be performed when reading this
  2821. interval.
  2822. </p>
  2823. <p>The second part specifies the interval end position. It is interpreted
  2824. as an absolute position, or as a relative offset from the current
  2825. position if it is preceded by the &quot;+&quot; character. If the offset
  2826. specification starts with &quot;#&quot;, it is interpreted as the number of
  2827. packets to read (not including the flushing packets) from the interval
  2828. start. If no second part is specified, the program will read until the
  2829. end of the input.
  2830. </p>
  2831. <p>Note that seeking is not accurate, thus the actual interval start
  2832. point may be different from the specified position. Also, when an
  2833. interval duration is specified, the absolute end time will be computed
  2834. by adding the duration to the interval start point found by seeking
  2835. the file, rather than to the specified start value.
  2836. </p>
  2837. <p>The formal syntax is given by:
  2838. </p><div class="example">
  2839. <pre class="example-preformatted"><var class="var">INTERVAL</var> ::= [<var class="var">START</var>|+<var class="var">START_OFFSET</var>][%[<var class="var">END</var>|+<var class="var">END_OFFSET</var>]]
  2840. <var class="var">INTERVALS</var> ::= <var class="var">INTERVAL</var>[,<var class="var">INTERVALS</var>]
  2841. </pre></div>
  2842. <p>A few examples follow.
  2843. </p><ul class="itemize mark-bullet">
  2844. <li>Seek to time 10, read packets until 20 seconds after the found seek
  2845. point, then seek to position <code class="code">01:30</code> (1 minute and thirty
  2846. seconds) and read packets until position <code class="code">01:45</code>.
  2847. <div class="example">
  2848. <pre class="example-preformatted">10%+20,01:30%01:45
  2849. </pre></div>
  2850. </li><li>Read only 42 packets after seeking to position <code class="code">01:23</code>:
  2851. <div class="example">
  2852. <pre class="example-preformatted">01:23%+#42
  2853. </pre></div>
  2854. </li><li>Read only the first 20 seconds from the start:
  2855. <div class="example">
  2856. <pre class="example-preformatted">%+20
  2857. </pre></div>
  2858. </li><li>Read from the start until position <code class="code">02:30</code>:
  2859. <div class="example">
  2860. <pre class="example-preformatted">%02:30
  2861. </pre></div>
  2862. </li></ul>
  2863. </dd>
  2864. <dt><samp class="option">-show_private_data, -private</samp></dt>
  2865. <dd><p>Show private data, that is data depending on the format of the
  2866. particular shown element.
  2867. This option is enabled by default, but you may need to disable it
  2868. for specific uses, for example when creating XSD-compliant XML output.
  2869. </p>
  2870. </dd>
  2871. <dt><samp class="option">-show_program_version</samp></dt>
  2872. <dd><p>Show information related to program version.
  2873. </p>
  2874. <p>Version information is printed within a section with name
  2875. &quot;PROGRAM_VERSION&quot;.
  2876. </p>
  2877. </dd>
  2878. <dt><samp class="option">-show_library_versions</samp></dt>
  2879. <dd><p>Show information related to library versions.
  2880. </p>
  2881. <p>Version information for each library is printed within a section with
  2882. name &quot;LIBRARY_VERSION&quot;.
  2883. </p>
  2884. </dd>
  2885. <dt><samp class="option">-show_versions</samp></dt>
  2886. <dd><p>Show information related to program and library versions. This is the
  2887. equivalent of setting both <samp class="option">-show_program_version</samp> and
  2888. <samp class="option">-show_library_versions</samp> options.
  2889. </p>
  2890. </dd>
  2891. <dt><samp class="option">-show_pixel_formats</samp></dt>
  2892. <dd><p>Show information about all pixel formats supported by FFmpeg.
  2893. </p>
  2894. <p>Pixel format information for each format is printed within a section
  2895. with name &quot;PIXEL_FORMAT&quot;.
  2896. </p>
  2897. </dd>
  2898. <dt><samp class="option">-show_optional_fields <var class="var">value</var></samp></dt>
  2899. <dd><p>Some writers viz. JSON and XML, omit the printing of fields with invalid or non-applicable values,
  2900. while other writers always print them. This option enables one to control this behaviour.
  2901. Valid values are <code class="code">always</code>/<code class="code">1</code>, <code class="code">never</code>/<code class="code">0</code> and <code class="code">auto</code>/<code class="code">-1</code>.
  2902. Default is <var class="var">auto</var>.
  2903. </p>
  2904. </dd>
  2905. <dt><samp class="option">-bitexact</samp></dt>
  2906. <dd><p>Force bitexact output, useful to produce output which is not dependent
  2907. on the specific build.
  2908. </p>
  2909. </dd>
  2910. <dt><samp class="option">-i <var class="var">input_url</var></samp></dt>
  2911. <dd><p>Read <var class="var">input_url</var>.
  2912. </p>
  2913. </dd>
  2914. <dt><samp class="option">-o <var class="var">output_url</var></samp></dt>
  2915. <dd><p>Write output to <var class="var">output_url</var>. If not specified, the output is sent
  2916. to stdout.
  2917. </p>
  2918. </dd>
  2919. </dl>
  2920. </div>
  2921. </div>
  2922. <div class="chapter-level-extent" id="Writers">
  2923. <h2 class="chapter"><span>4 Writers<a class="copiable-link" href="#Writers"> &para;</a></span></h2>
  2924. <p>A writer defines the output format adopted by <code class="command">ffprobe</code>, and will be
  2925. used for printing all the parts of the output.
  2926. </p>
  2927. <p>A writer may accept one or more arguments, which specify the options
  2928. to adopt. The options are specified as a list of <var class="var">key</var>=<var class="var">value</var>
  2929. pairs, separated by &quot;:&quot;.
  2930. </p>
  2931. <p>All writers support the following options:
  2932. </p>
  2933. <dl class="table">
  2934. <dt><samp class="option">string_validation, sv</samp></dt>
  2935. <dd><p>Set string validation mode.
  2936. </p>
  2937. <p>The following values are accepted.
  2938. </p><dl class="table">
  2939. <dt>&lsquo;<samp class="samp">fail</samp>&rsquo;</dt>
  2940. <dd><p>The writer will fail immediately in case an invalid string (UTF-8)
  2941. sequence or code point is found in the input. This is especially
  2942. useful to validate input metadata.
  2943. </p>
  2944. </dd>
  2945. <dt>&lsquo;<samp class="samp">ignore</samp>&rsquo;</dt>
  2946. <dd><p>Any validation error will be ignored. This will result in possibly
  2947. broken output, especially with the json or xml writer.
  2948. </p>
  2949. </dd>
  2950. <dt>&lsquo;<samp class="samp">replace</samp>&rsquo;</dt>
  2951. <dd><p>The writer will substitute invalid UTF-8 sequences or code points with
  2952. the string specified with the <samp class="option">string_validation_replacement</samp>.
  2953. </p></dd>
  2954. </dl>
  2955. <p>Default value is &lsquo;<samp class="samp">replace</samp>&rsquo;.
  2956. </p>
  2957. </dd>
  2958. <dt><samp class="option">string_validation_replacement, svr</samp></dt>
  2959. <dd><p>Set replacement string to use in case <samp class="option">string_validation</samp> is
  2960. set to &lsquo;<samp class="samp">replace</samp>&rsquo;.
  2961. </p>
  2962. <p>In case the option is not specified, the writer will assume the empty
  2963. string, that is it will remove the invalid sequences from the input
  2964. strings.
  2965. </p></dd>
  2966. </dl>
  2967. <p>A description of the currently available writers follows.
  2968. </p>
  2969. <ul class="mini-toc">
  2970. <li><a href="#default" accesskey="1">default</a></li>
  2971. <li><a href="#compact_002c-csv" accesskey="2">compact, csv</a></li>
  2972. <li><a href="#flat" accesskey="3">flat</a></li>
  2973. <li><a href="#ini" accesskey="4">ini</a></li>
  2974. <li><a href="#json" accesskey="5">json</a></li>
  2975. <li><a href="#xml" accesskey="6">xml</a></li>
  2976. </ul>
  2977. <div class="section-level-extent" id="default">
  2978. <h3 class="section"><span>4.1 default<a class="copiable-link" href="#default"> &para;</a></span></h3>
  2979. <p>Default format.
  2980. </p>
  2981. <p>Print each section in the form:
  2982. </p><div class="example">
  2983. <pre class="example-preformatted">[SECTION]
  2984. key1=val1
  2985. ...
  2986. keyN=valN
  2987. [/SECTION]
  2988. </pre></div>
  2989. <p>Metadata tags are printed as a line in the corresponding FORMAT, STREAM,
  2990. STREAM_GROUP_STREAM or PROGRAM_STREAM section, and are prefixed by the
  2991. string &quot;TAG:&quot;.
  2992. </p>
  2993. <p>A description of the accepted options follows.
  2994. </p>
  2995. <dl class="table">
  2996. <dt><samp class="option">nokey, nk</samp></dt>
  2997. <dd><p>If set to 1 specify not to print the key of each field. Default value
  2998. is 0.
  2999. </p>
  3000. </dd>
  3001. <dt><samp class="option">noprint_wrappers, nw</samp></dt>
  3002. <dd><p>If set to 1 specify not to print the section header and footer.
  3003. Default value is 0.
  3004. </p></dd>
  3005. </dl>
  3006. </div>
  3007. <div class="section-level-extent" id="compact_002c-csv">
  3008. <h3 class="section"><span>4.2 compact, csv<a class="copiable-link" href="#compact_002c-csv"> &para;</a></span></h3>
  3009. <p>Compact and CSV format.
  3010. </p>
  3011. <p>The <code class="code">csv</code> writer is equivalent to <code class="code">compact</code>, but supports
  3012. different defaults.
  3013. </p>
  3014. <p>Each section is printed on a single line.
  3015. If no option is specified, the output has the form:
  3016. </p><div class="example">
  3017. <pre class="example-preformatted">section|key1=val1| ... |keyN=valN
  3018. </pre></div>
  3019. <p>Metadata tags are printed in the corresponding &quot;format&quot; or &quot;stream&quot;
  3020. section. A metadata tag key, if printed, is prefixed by the string
  3021. &quot;tag:&quot;.
  3022. </p>
  3023. <p>The description of the accepted options follows.
  3024. </p>
  3025. <dl class="table">
  3026. <dt><samp class="option">item_sep, s</samp></dt>
  3027. <dd><p>Specify the character to use for separating fields in the output line.
  3028. It must be a single printable character, it is &quot;|&quot; by default (&quot;,&quot; for
  3029. the <code class="code">csv</code> writer).
  3030. </p>
  3031. </dd>
  3032. <dt><samp class="option">nokey, nk</samp></dt>
  3033. <dd><p>If set to 1 specify not to print the key of each field. Its default
  3034. value is 0 (1 for the <code class="code">csv</code> writer).
  3035. </p>
  3036. </dd>
  3037. <dt><samp class="option">escape, e</samp></dt>
  3038. <dd><p>Set the escape mode to use, default to &quot;c&quot; (&quot;csv&quot; for the <code class="code">csv</code>
  3039. writer).
  3040. </p>
  3041. <p>It can assume one of the following values:
  3042. </p><dl class="table">
  3043. <dt><samp class="option">c</samp></dt>
  3044. <dd><p>Perform C-like escaping. Strings containing a newline (&lsquo;<samp class="samp">\n</samp>&rsquo;), carriage
  3045. return (&lsquo;<samp class="samp">\r</samp>&rsquo;), a tab (&lsquo;<samp class="samp">\t</samp>&rsquo;), a form feed (&lsquo;<samp class="samp">\f</samp>&rsquo;), the escaping
  3046. character (&lsquo;<samp class="samp">\</samp>&rsquo;) or the item separator character <var class="var">SEP</var> are escaped
  3047. using C-like fashioned escaping, so that a newline is converted to the
  3048. sequence &lsquo;<samp class="samp">\n</samp>&rsquo;, a carriage return to &lsquo;<samp class="samp">\r</samp>&rsquo;, &lsquo;<samp class="samp">\</samp>&rsquo; to &lsquo;<samp class="samp">\\</samp>&rsquo; and
  3049. the separator <var class="var">SEP</var> is converted to &lsquo;<samp class="samp">\<var class="var">SEP</var></samp>&rsquo;.
  3050. </p>
  3051. </dd>
  3052. <dt><samp class="option">csv</samp></dt>
  3053. <dd><p>Perform CSV-like escaping, as described in RFC4180. Strings
  3054. containing a newline (&lsquo;<samp class="samp">\n</samp>&rsquo;), a carriage return (&lsquo;<samp class="samp">\r</samp>&rsquo;), a double quote
  3055. (&lsquo;<samp class="samp">&quot;</samp>&rsquo;), or <var class="var">SEP</var> are enclosed in double-quotes.
  3056. </p>
  3057. </dd>
  3058. <dt><samp class="option">none</samp></dt>
  3059. <dd><p>Perform no escaping.
  3060. </p></dd>
  3061. </dl>
  3062. </dd>
  3063. <dt><samp class="option">print_section, p</samp></dt>
  3064. <dd><p>Print the section name at the beginning of each line if the value is
  3065. <code class="code">1</code>, disable it with value set to <code class="code">0</code>. Default value is
  3066. <code class="code">1</code>.
  3067. </p>
  3068. </dd>
  3069. </dl>
  3070. </div>
  3071. <div class="section-level-extent" id="flat">
  3072. <h3 class="section"><span>4.3 flat<a class="copiable-link" href="#flat"> &para;</a></span></h3>
  3073. <p>Flat format.
  3074. </p>
  3075. <p>A free-form output where each line contains an explicit key=value, such as
  3076. &quot;streams.stream.3.tags.foo=bar&quot;. The output is shell escaped, so it can be
  3077. directly embedded in sh scripts as long as the separator character is an
  3078. alphanumeric character or an underscore (see <var class="var">sep_char</var> option).
  3079. </p>
  3080. <p>The description of the accepted options follows.
  3081. </p>
  3082. <dl class="table">
  3083. <dt><samp class="option">sep_char, s</samp></dt>
  3084. <dd><p>Separator character used to separate the chapter, the section name, IDs and
  3085. potential tags in the printed field key.
  3086. </p>
  3087. <p>Default value is &lsquo;<samp class="samp">.</samp>&rsquo;.
  3088. </p>
  3089. </dd>
  3090. <dt><samp class="option">hierarchical, h</samp></dt>
  3091. <dd><p>Specify if the section name specification should be hierarchical. If
  3092. set to 1, and if there is more than one section in the current
  3093. chapter, the section name will be prefixed by the name of the
  3094. chapter. A value of 0 will disable this behavior.
  3095. </p>
  3096. <p>Default value is 1.
  3097. </p></dd>
  3098. </dl>
  3099. </div>
  3100. <div class="section-level-extent" id="ini">
  3101. <h3 class="section"><span>4.4 ini<a class="copiable-link" href="#ini"> &para;</a></span></h3>
  3102. <p>INI format output.
  3103. </p>
  3104. <p>Print output in an INI based format.
  3105. </p>
  3106. <p>The following conventions are adopted:
  3107. </p>
  3108. <ul class="itemize mark-bullet">
  3109. <li>all key and values are UTF-8
  3110. </li><li>&lsquo;<samp class="samp">.</samp>&rsquo; is the subgroup separator
  3111. </li><li>newline, &lsquo;<samp class="samp">\t</samp>&rsquo;, &lsquo;<samp class="samp">\f</samp>&rsquo;, &lsquo;<samp class="samp">\b</samp>&rsquo; and the following characters are
  3112. escaped
  3113. </li><li>&lsquo;<samp class="samp">\</samp>&rsquo; is the escape character
  3114. </li><li>&lsquo;<samp class="samp">#</samp>&rsquo; is the comment indicator
  3115. </li><li>&lsquo;<samp class="samp">=</samp>&rsquo; is the key/value separator
  3116. </li><li>&lsquo;<samp class="samp">:</samp>&rsquo; is not used but usually parsed as key/value separator
  3117. </li></ul>
  3118. <p>This writer accepts options as a list of <var class="var">key</var>=<var class="var">value</var> pairs,
  3119. separated by &lsquo;<samp class="samp">:</samp>&rsquo;.
  3120. </p>
  3121. <p>The description of the accepted options follows.
  3122. </p>
  3123. <dl class="table">
  3124. <dt><samp class="option">hierarchical, h</samp></dt>
  3125. <dd><p>Specify if the section name specification should be hierarchical. If
  3126. set to 1, and if there is more than one section in the current
  3127. chapter, the section name will be prefixed by the name of the
  3128. chapter. A value of 0 will disable this behavior.
  3129. </p>
  3130. <p>Default value is 1.
  3131. </p></dd>
  3132. </dl>
  3133. </div>
  3134. <div class="section-level-extent" id="json">
  3135. <h3 class="section"><span>4.5 json<a class="copiable-link" href="#json"> &para;</a></span></h3>
  3136. <p>JSON based format.
  3137. </p>
  3138. <p>Each section is printed using JSON notation.
  3139. </p>
  3140. <p>The description of the accepted options follows.
  3141. </p>
  3142. <dl class="table">
  3143. <dt><samp class="option">compact, c</samp></dt>
  3144. <dd><p>If set to 1 enable compact output, that is each section will be
  3145. printed on a single line. Default value is 0.
  3146. </p></dd>
  3147. </dl>
  3148. <p>For more information about JSON, see <a class="url" href="http://www.json.org/">http://www.json.org/</a>.
  3149. </p>
  3150. </div>
  3151. <div class="section-level-extent" id="xml">
  3152. <h3 class="section"><span>4.6 xml<a class="copiable-link" href="#xml"> &para;</a></span></h3>
  3153. <p>XML based format.
  3154. </p>
  3155. <p>The XML output is described in the XML schema description file
  3156. <samp class="file">ffprobe.xsd</samp> installed in the FFmpeg datadir.
  3157. </p>
  3158. <p>An updated version of the schema can be retrieved at the url
  3159. <a class="url" href="http://www.ffmpeg.org/schema/ffprobe.xsd">http://www.ffmpeg.org/schema/ffprobe.xsd</a>, which redirects to the
  3160. latest schema committed into the FFmpeg development source code tree.
  3161. </p>
  3162. <p>Note that the output issued will be compliant to the
  3163. <samp class="file">ffprobe.xsd</samp> schema only when no special global output options
  3164. (<samp class="option">unit</samp>, <samp class="option">prefix</samp>, <samp class="option">byte_binary_prefix</samp>,
  3165. <samp class="option">sexagesimal</samp> etc.) are specified.
  3166. </p>
  3167. <p>The description of the accepted options follows.
  3168. </p>
  3169. <dl class="table">
  3170. <dt><samp class="option">fully_qualified, q</samp></dt>
  3171. <dd><p>If set to 1 specify if the output should be fully qualified. Default
  3172. value is 0.
  3173. This is required for generating an XML file which can be validated
  3174. through an XSD file.
  3175. </p>
  3176. </dd>
  3177. <dt><samp class="option">xsd_strict, x</samp></dt>
  3178. <dd><p>If set to 1 perform more checks for ensuring that the output is XSD
  3179. compliant. Default value is 0.
  3180. This option automatically sets <samp class="option">fully_qualified</samp> to 1.
  3181. </p></dd>
  3182. </dl>
  3183. <p>For more information about the XML format, see
  3184. <a class="url" href="https://www.w3.org/XML/">https://www.w3.org/XML/</a>.
  3185. </p>
  3186. </div>
  3187. </div>
  3188. <div class="chapter-level-extent" id="Timecode">
  3189. <h2 class="chapter"><span>5 Timecode<a class="copiable-link" href="#Timecode"> &para;</a></span></h2>
  3190. <p><code class="command">ffprobe</code> supports Timecode extraction:
  3191. </p>
  3192. <ul class="itemize mark-bullet">
  3193. <li>MPEG1/2 timecode is extracted from the GOP, and is available in the video
  3194. stream details (<samp class="option">-show_streams</samp>, see <var class="var">timecode</var>).
  3195. </li><li>MOV timecode is extracted from tmcd track, so is available in the tmcd
  3196. stream metadata (<samp class="option">-show_streams</samp>, see <var class="var">TAG:timecode</var>).
  3197. </li><li>DV, GXF and AVI timecodes are available in format metadata
  3198. (<samp class="option">-show_format</samp>, see <var class="var">TAG:timecode</var>).
  3199. </li></ul>
  3200. </div>
  3201. <div class="chapter-level-extent" id="Syntax">
  3202. <h2 class="chapter"><span>6 Syntax<a class="copiable-link" href="#Syntax"> &para;</a></span></h2>
  3203. <p>This section documents the syntax and formats employed by the FFmpeg
  3204. libraries and tools.
  3205. </p>
  3206. <a class="anchor" id="quoting_005fand_005fescaping"></a><ul class="mini-toc">
  3207. <li><a href="#Quoting-and-escaping" accesskey="1">Quoting and escaping</a></li>
  3208. <li><a href="#Date" accesskey="2">Date</a></li>
  3209. <li><a href="#Time-duration" accesskey="3">Time duration</a></li>
  3210. <li><a href="#Video-size" accesskey="4">Video size</a></li>
  3211. <li><a href="#Video-rate" accesskey="5">Video rate</a></li>
  3212. <li><a href="#Ratio" accesskey="6">Ratio</a></li>
  3213. <li><a href="#Color" accesskey="7">Color</a></li>
  3214. <li><a href="#Channel-Layout" accesskey="8">Channel Layout</a></li>
  3215. </ul>
  3216. <div class="section-level-extent" id="Quoting-and-escaping">
  3217. <h3 class="section"><span>6.1 Quoting and escaping<a class="copiable-link" href="#Quoting-and-escaping"> &para;</a></span></h3>
  3218. <p>FFmpeg adopts the following quoting and escaping mechanism, unless
  3219. explicitly specified. The following rules are applied:
  3220. </p>
  3221. <ul class="itemize mark-bullet">
  3222. <li>&lsquo;<samp class="samp">'</samp>&rsquo; and &lsquo;<samp class="samp">\</samp>&rsquo; are special characters (respectively used for
  3223. quoting and escaping). In addition to them, there might be other
  3224. special characters depending on the specific syntax where the escaping
  3225. and quoting are employed.
  3226. </li><li>A special character is escaped by prefixing it with a &lsquo;<samp class="samp">\</samp>&rsquo;.
  3227. </li><li>All characters enclosed between &lsquo;<samp class="samp">''</samp>&rsquo; are included literally in the
  3228. parsed string. The quote character &lsquo;<samp class="samp">'</samp>&rsquo; itself cannot be quoted,
  3229. so you may need to close the quote and escape it.
  3230. </li><li>Leading and trailing whitespaces, unless escaped or quoted, are
  3231. removed from the parsed string.
  3232. </li></ul>
  3233. <p>Note that you may need to add a second level of escaping when using
  3234. the command line or a script, which depends on the syntax of the
  3235. adopted shell language.
  3236. </p>
  3237. <p>The function <code class="code">av_get_token</code> defined in
  3238. <samp class="file">libavutil/avstring.h</samp> can be used to parse a token quoted or
  3239. escaped according to the rules defined above.
  3240. </p>
  3241. <p>The tool <samp class="file">tools/ffescape</samp> in the FFmpeg source tree can be used
  3242. to automatically quote or escape a string in a script.
  3243. </p>
  3244. <ul class="mini-toc">
  3245. <li><a href="#Examples" accesskey="1">Examples</a></li>
  3246. </ul>
  3247. <div class="subsection-level-extent" id="Examples">
  3248. <h4 class="subsection"><span>6.1.1 Examples<a class="copiable-link" href="#Examples"> &para;</a></span></h4>
  3249. <ul class="itemize mark-bullet">
  3250. <li>Escape the string <code class="code">Crime d'Amour</code> containing the <code class="code">'</code> special
  3251. character:
  3252. <div class="example">
  3253. <pre class="example-preformatted">Crime d\'Amour
  3254. </pre></div>
  3255. </li><li>The string above contains a quote, so the <code class="code">'</code> needs to be escaped
  3256. when quoting it:
  3257. <div class="example">
  3258. <pre class="example-preformatted">'Crime d'\''Amour'
  3259. </pre></div>
  3260. </li><li>Include leading or trailing whitespaces using quoting:
  3261. <div class="example">
  3262. <pre class="example-preformatted">' this string starts and ends with whitespaces '
  3263. </pre></div>
  3264. </li><li>Escaping and quoting can be mixed together:
  3265. <div class="example">
  3266. <pre class="example-preformatted">' The string '\'string\'' is a string '
  3267. </pre></div>
  3268. </li><li>To include a literal &lsquo;<samp class="samp">\</samp>&rsquo; you can use either escaping or quoting:
  3269. <div class="example">
  3270. <pre class="example-preformatted">'c:\foo' can be written as c:\\foo
  3271. </pre></div>
  3272. </li></ul>
  3273. <a class="anchor" id="date-syntax"></a></div>
  3274. </div>
  3275. <div class="section-level-extent" id="Date">
  3276. <h3 class="section"><span>6.2 Date<a class="copiable-link" href="#Date"> &para;</a></span></h3>
  3277. <p>The accepted syntax is:
  3278. </p><div class="example">
  3279. <pre class="example-preformatted">[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
  3280. now
  3281. </pre></div>
  3282. <p>If the value is &quot;now&quot; it takes the current time.
  3283. </p>
  3284. <p>Time is local time unless Z is appended, in which case it is
  3285. interpreted as UTC.
  3286. If the year-month-day part is not specified it takes the current
  3287. year-month-day.
  3288. </p>
  3289. <a class="anchor" id="time-duration-syntax"></a></div>
  3290. <div class="section-level-extent" id="Time-duration">
  3291. <h3 class="section"><span>6.3 Time duration<a class="copiable-link" href="#Time-duration"> &para;</a></span></h3>
  3292. <p>There are two accepted syntaxes for expressing time duration.
  3293. </p>
  3294. <div class="example">
  3295. <pre class="example-preformatted">[-][<var class="var">HH</var>:]<var class="var">MM</var>:<var class="var">SS</var>[.<var class="var">m</var>...]
  3296. </pre></div>
  3297. <p><var class="var">HH</var> expresses the number of hours, <var class="var">MM</var> the number of minutes
  3298. for a maximum of 2 digits, and <var class="var">SS</var> the number of seconds for a
  3299. maximum of 2 digits. The <var class="var">m</var> at the end expresses decimal value for
  3300. <var class="var">SS</var>.
  3301. </p>
  3302. <p><em class="emph">or</em>
  3303. </p>
  3304. <div class="example">
  3305. <pre class="example-preformatted">[-]<var class="var">S</var>+[.<var class="var">m</var>...][s|ms|us]
  3306. </pre></div>
  3307. <p><var class="var">S</var> expresses the number of seconds, with the optional decimal part
  3308. <var class="var">m</var>. The optional literal suffixes &lsquo;<samp class="samp">s</samp>&rsquo;, &lsquo;<samp class="samp">ms</samp>&rsquo; or &lsquo;<samp class="samp">us</samp>&rsquo;
  3309. indicate to interpret the value as seconds, milliseconds or microseconds,
  3310. respectively.
  3311. </p>
  3312. <p>In both expressions, the optional &lsquo;<samp class="samp">-</samp>&rsquo; indicates negative duration.
  3313. </p>
  3314. <ul class="mini-toc">
  3315. <li><a href="#Examples-1" accesskey="1">Examples</a></li>
  3316. </ul>
  3317. <div class="subsection-level-extent" id="Examples-1">
  3318. <h4 class="subsection"><span>6.3.1 Examples<a class="copiable-link" href="#Examples-1"> &para;</a></span></h4>
  3319. <p>The following examples are all valid time duration:
  3320. </p>
  3321. <dl class="table">
  3322. <dt>&lsquo;<samp class="samp">55</samp>&rsquo;</dt>
  3323. <dd><p>55 seconds
  3324. </p>
  3325. </dd>
  3326. <dt>&lsquo;<samp class="samp">0.2</samp>&rsquo;</dt>
  3327. <dd><p>0.2 seconds
  3328. </p>
  3329. </dd>
  3330. <dt>&lsquo;<samp class="samp">200ms</samp>&rsquo;</dt>
  3331. <dd><p>200 milliseconds, that&rsquo;s 0.2s
  3332. </p>
  3333. </dd>
  3334. <dt>&lsquo;<samp class="samp">200000us</samp>&rsquo;</dt>
  3335. <dd><p>200000 microseconds, that&rsquo;s 0.2s
  3336. </p>
  3337. </dd>
  3338. <dt>&lsquo;<samp class="samp">12:03:45</samp>&rsquo;</dt>
  3339. <dd><p>12 hours, 03 minutes and 45 seconds
  3340. </p>
  3341. </dd>
  3342. <dt>&lsquo;<samp class="samp">23.189</samp>&rsquo;</dt>
  3343. <dd><p>23.189 seconds
  3344. </p></dd>
  3345. </dl>
  3346. <a class="anchor" id="video-size-syntax"></a></div>
  3347. </div>
  3348. <div class="section-level-extent" id="Video-size">
  3349. <h3 class="section"><span>6.4 Video size<a class="copiable-link" href="#Video-size"> &para;</a></span></h3>
  3350. <p>Specify the size of the sourced video, it may be a string of the form
  3351. <var class="var">width</var>x<var class="var">height</var>, or the name of a size abbreviation.
  3352. </p>
  3353. <p>The following abbreviations are recognized:
  3354. </p><dl class="table">
  3355. <dt>&lsquo;<samp class="samp">ntsc</samp>&rsquo;</dt>
  3356. <dd><p>720x480
  3357. </p></dd>
  3358. <dt>&lsquo;<samp class="samp">pal</samp>&rsquo;</dt>
  3359. <dd><p>720x576
  3360. </p></dd>
  3361. <dt>&lsquo;<samp class="samp">qntsc</samp>&rsquo;</dt>
  3362. <dd><p>352x240
  3363. </p></dd>
  3364. <dt>&lsquo;<samp class="samp">qpal</samp>&rsquo;</dt>
  3365. <dd><p>352x288
  3366. </p></dd>
  3367. <dt>&lsquo;<samp class="samp">sntsc</samp>&rsquo;</dt>
  3368. <dd><p>640x480
  3369. </p></dd>
  3370. <dt>&lsquo;<samp class="samp">spal</samp>&rsquo;</dt>
  3371. <dd><p>768x576
  3372. </p></dd>
  3373. <dt>&lsquo;<samp class="samp">film</samp>&rsquo;</dt>
  3374. <dd><p>352x240
  3375. </p></dd>
  3376. <dt>&lsquo;<samp class="samp">ntsc-film</samp>&rsquo;</dt>
  3377. <dd><p>352x240
  3378. </p></dd>
  3379. <dt>&lsquo;<samp class="samp">sqcif</samp>&rsquo;</dt>
  3380. <dd><p>128x96
  3381. </p></dd>
  3382. <dt>&lsquo;<samp class="samp">qcif</samp>&rsquo;</dt>
  3383. <dd><p>176x144
  3384. </p></dd>
  3385. <dt>&lsquo;<samp class="samp">cif</samp>&rsquo;</dt>
  3386. <dd><p>352x288
  3387. </p></dd>
  3388. <dt>&lsquo;<samp class="samp">4cif</samp>&rsquo;</dt>
  3389. <dd><p>704x576
  3390. </p></dd>
  3391. <dt>&lsquo;<samp class="samp">16cif</samp>&rsquo;</dt>
  3392. <dd><p>1408x1152
  3393. </p></dd>
  3394. <dt>&lsquo;<samp class="samp">qqvga</samp>&rsquo;</dt>
  3395. <dd><p>160x120
  3396. </p></dd>
  3397. <dt>&lsquo;<samp class="samp">qvga</samp>&rsquo;</dt>
  3398. <dd><p>320x240
  3399. </p></dd>
  3400. <dt>&lsquo;<samp class="samp">vga</samp>&rsquo;</dt>
  3401. <dd><p>640x480
  3402. </p></dd>
  3403. <dt>&lsquo;<samp class="samp">svga</samp>&rsquo;</dt>
  3404. <dd><p>800x600
  3405. </p></dd>
  3406. <dt>&lsquo;<samp class="samp">xga</samp>&rsquo;</dt>
  3407. <dd><p>1024x768
  3408. </p></dd>
  3409. <dt>&lsquo;<samp class="samp">uxga</samp>&rsquo;</dt>
  3410. <dd><p>1600x1200
  3411. </p></dd>
  3412. <dt>&lsquo;<samp class="samp">qxga</samp>&rsquo;</dt>
  3413. <dd><p>2048x1536
  3414. </p></dd>
  3415. <dt>&lsquo;<samp class="samp">sxga</samp>&rsquo;</dt>
  3416. <dd><p>1280x1024
  3417. </p></dd>
  3418. <dt>&lsquo;<samp class="samp">qsxga</samp>&rsquo;</dt>
  3419. <dd><p>2560x2048
  3420. </p></dd>
  3421. <dt>&lsquo;<samp class="samp">hsxga</samp>&rsquo;</dt>
  3422. <dd><p>5120x4096
  3423. </p></dd>
  3424. <dt>&lsquo;<samp class="samp">wvga</samp>&rsquo;</dt>
  3425. <dd><p>852x480
  3426. </p></dd>
  3427. <dt>&lsquo;<samp class="samp">wxga</samp>&rsquo;</dt>
  3428. <dd><p>1366x768
  3429. </p></dd>
  3430. <dt>&lsquo;<samp class="samp">wsxga</samp>&rsquo;</dt>
  3431. <dd><p>1600x1024
  3432. </p></dd>
  3433. <dt>&lsquo;<samp class="samp">wuxga</samp>&rsquo;</dt>
  3434. <dd><p>1920x1200
  3435. </p></dd>
  3436. <dt>&lsquo;<samp class="samp">woxga</samp>&rsquo;</dt>
  3437. <dd><p>2560x1600
  3438. </p></dd>
  3439. <dt>&lsquo;<samp class="samp">wqsxga</samp>&rsquo;</dt>
  3440. <dd><p>3200x2048
  3441. </p></dd>
  3442. <dt>&lsquo;<samp class="samp">wquxga</samp>&rsquo;</dt>
  3443. <dd><p>3840x2400
  3444. </p></dd>
  3445. <dt>&lsquo;<samp class="samp">whsxga</samp>&rsquo;</dt>
  3446. <dd><p>6400x4096
  3447. </p></dd>
  3448. <dt>&lsquo;<samp class="samp">whuxga</samp>&rsquo;</dt>
  3449. <dd><p>7680x4800
  3450. </p></dd>
  3451. <dt>&lsquo;<samp class="samp">cga</samp>&rsquo;</dt>
  3452. <dd><p>320x200
  3453. </p></dd>
  3454. <dt>&lsquo;<samp class="samp">ega</samp>&rsquo;</dt>
  3455. <dd><p>640x350
  3456. </p></dd>
  3457. <dt>&lsquo;<samp class="samp">hd480</samp>&rsquo;</dt>
  3458. <dd><p>852x480
  3459. </p></dd>
  3460. <dt>&lsquo;<samp class="samp">hd720</samp>&rsquo;</dt>
  3461. <dd><p>1280x720
  3462. </p></dd>
  3463. <dt>&lsquo;<samp class="samp">hd1080</samp>&rsquo;</dt>
  3464. <dd><p>1920x1080
  3465. </p></dd>
  3466. <dt>&lsquo;<samp class="samp">2k</samp>&rsquo;</dt>
  3467. <dd><p>2048x1080
  3468. </p></dd>
  3469. <dt>&lsquo;<samp class="samp">2kflat</samp>&rsquo;</dt>
  3470. <dd><p>1998x1080
  3471. </p></dd>
  3472. <dt>&lsquo;<samp class="samp">2kscope</samp>&rsquo;</dt>
  3473. <dd><p>2048x858
  3474. </p></dd>
  3475. <dt>&lsquo;<samp class="samp">4k</samp>&rsquo;</dt>
  3476. <dd><p>4096x2160
  3477. </p></dd>
  3478. <dt>&lsquo;<samp class="samp">4kflat</samp>&rsquo;</dt>
  3479. <dd><p>3996x2160
  3480. </p></dd>
  3481. <dt>&lsquo;<samp class="samp">4kscope</samp>&rsquo;</dt>
  3482. <dd><p>4096x1716
  3483. </p></dd>
  3484. <dt>&lsquo;<samp class="samp">nhd</samp>&rsquo;</dt>
  3485. <dd><p>640x360
  3486. </p></dd>
  3487. <dt>&lsquo;<samp class="samp">hqvga</samp>&rsquo;</dt>
  3488. <dd><p>240x160
  3489. </p></dd>
  3490. <dt>&lsquo;<samp class="samp">wqvga</samp>&rsquo;</dt>
  3491. <dd><p>400x240
  3492. </p></dd>
  3493. <dt>&lsquo;<samp class="samp">fwqvga</samp>&rsquo;</dt>
  3494. <dd><p>432x240
  3495. </p></dd>
  3496. <dt>&lsquo;<samp class="samp">hvga</samp>&rsquo;</dt>
  3497. <dd><p>480x320
  3498. </p></dd>
  3499. <dt>&lsquo;<samp class="samp">qhd</samp>&rsquo;</dt>
  3500. <dd><p>960x540
  3501. </p></dd>
  3502. <dt>&lsquo;<samp class="samp">2kdci</samp>&rsquo;</dt>
  3503. <dd><p>2048x1080
  3504. </p></dd>
  3505. <dt>&lsquo;<samp class="samp">4kdci</samp>&rsquo;</dt>
  3506. <dd><p>4096x2160
  3507. </p></dd>
  3508. <dt>&lsquo;<samp class="samp">uhd2160</samp>&rsquo;</dt>
  3509. <dd><p>3840x2160
  3510. </p></dd>
  3511. <dt>&lsquo;<samp class="samp">uhd4320</samp>&rsquo;</dt>
  3512. <dd><p>7680x4320
  3513. </p></dd>
  3514. </dl>
  3515. <a class="anchor" id="video-rate-syntax"></a></div>
  3516. <div class="section-level-extent" id="Video-rate">
  3517. <h3 class="section"><span>6.5 Video rate<a class="copiable-link" href="#Video-rate"> &para;</a></span></h3>
  3518. <p>Specify the frame rate of a video, expressed as the number of frames
  3519. generated per second. It has to be a string in the format
  3520. <var class="var">frame_rate_num</var>/<var class="var">frame_rate_den</var>, an integer number, a float
  3521. number or a valid video frame rate abbreviation.
  3522. </p>
  3523. <p>The following abbreviations are recognized:
  3524. </p><dl class="table">
  3525. <dt>&lsquo;<samp class="samp">ntsc</samp>&rsquo;</dt>
  3526. <dd><p>30000/1001
  3527. </p></dd>
  3528. <dt>&lsquo;<samp class="samp">pal</samp>&rsquo;</dt>
  3529. <dd><p>25/1
  3530. </p></dd>
  3531. <dt>&lsquo;<samp class="samp">qntsc</samp>&rsquo;</dt>
  3532. <dd><p>30000/1001
  3533. </p></dd>
  3534. <dt>&lsquo;<samp class="samp">qpal</samp>&rsquo;</dt>
  3535. <dd><p>25/1
  3536. </p></dd>
  3537. <dt>&lsquo;<samp class="samp">sntsc</samp>&rsquo;</dt>
  3538. <dd><p>30000/1001
  3539. </p></dd>
  3540. <dt>&lsquo;<samp class="samp">spal</samp>&rsquo;</dt>
  3541. <dd><p>25/1
  3542. </p></dd>
  3543. <dt>&lsquo;<samp class="samp">film</samp>&rsquo;</dt>
  3544. <dd><p>24/1
  3545. </p></dd>
  3546. <dt>&lsquo;<samp class="samp">ntsc-film</samp>&rsquo;</dt>
  3547. <dd><p>24000/1001
  3548. </p></dd>
  3549. </dl>
  3550. <a class="anchor" id="ratio-syntax"></a></div>
  3551. <div class="section-level-extent" id="Ratio">
  3552. <h3 class="section"><span>6.6 Ratio<a class="copiable-link" href="#Ratio"> &para;</a></span></h3>
  3553. <p>A ratio can be expressed as an expression, or in the form
  3554. <var class="var">numerator</var>:<var class="var">denominator</var>.
  3555. </p>
  3556. <p>Note that a ratio with infinite (1/0) or negative value is
  3557. considered valid, so you should check on the returned value if you
  3558. want to exclude those values.
  3559. </p>
  3560. <p>The undefined value can be expressed using the &quot;0:0&quot; string.
  3561. </p>
  3562. <a class="anchor" id="color-syntax"></a></div>
  3563. <div class="section-level-extent" id="Color">
  3564. <h3 class="section"><span>6.7 Color<a class="copiable-link" href="#Color"> &para;</a></span></h3>
  3565. <p>It can be the name of a color as defined below (case insensitive match) or a
  3566. <code class="code">[0x|#]RRGGBB[AA]</code> sequence, possibly followed by @ and a string
  3567. representing the alpha component.
  3568. </p>
  3569. <p>The alpha component may be a string composed by &quot;0x&quot; followed by an
  3570. hexadecimal number or a decimal number between 0.0 and 1.0, which
  3571. represents the opacity value (&lsquo;<samp class="samp">0x00</samp>&rsquo; or &lsquo;<samp class="samp">0.0</samp>&rsquo; means completely
  3572. transparent, &lsquo;<samp class="samp">0xff</samp>&rsquo; or &lsquo;<samp class="samp">1.0</samp>&rsquo; completely opaque). If the alpha
  3573. component is not specified then &lsquo;<samp class="samp">0xff</samp>&rsquo; is assumed.
  3574. </p>
  3575. <p>The string &lsquo;<samp class="samp">random</samp>&rsquo; will result in a random color.
  3576. </p>
  3577. <p>The following names of colors are recognized:
  3578. </p><dl class="table">
  3579. <dt>&lsquo;<samp class="samp">AliceBlue</samp>&rsquo;</dt>
  3580. <dd><p>0xF0F8FF
  3581. </p></dd>
  3582. <dt>&lsquo;<samp class="samp">AntiqueWhite</samp>&rsquo;</dt>
  3583. <dd><p>0xFAEBD7
  3584. </p></dd>
  3585. <dt>&lsquo;<samp class="samp">Aqua</samp>&rsquo;</dt>
  3586. <dd><p>0x00FFFF
  3587. </p></dd>
  3588. <dt>&lsquo;<samp class="samp">Aquamarine</samp>&rsquo;</dt>
  3589. <dd><p>0x7FFFD4
  3590. </p></dd>
  3591. <dt>&lsquo;<samp class="samp">Azure</samp>&rsquo;</dt>
  3592. <dd><p>0xF0FFFF
  3593. </p></dd>
  3594. <dt>&lsquo;<samp class="samp">Beige</samp>&rsquo;</dt>
  3595. <dd><p>0xF5F5DC
  3596. </p></dd>
  3597. <dt>&lsquo;<samp class="samp">Bisque</samp>&rsquo;</dt>
  3598. <dd><p>0xFFE4C4
  3599. </p></dd>
  3600. <dt>&lsquo;<samp class="samp">Black</samp>&rsquo;</dt>
  3601. <dd><p>0x000000
  3602. </p></dd>
  3603. <dt>&lsquo;<samp class="samp">BlanchedAlmond</samp>&rsquo;</dt>
  3604. <dd><p>0xFFEBCD
  3605. </p></dd>
  3606. <dt>&lsquo;<samp class="samp">Blue</samp>&rsquo;</dt>
  3607. <dd><p>0x0000FF
  3608. </p></dd>
  3609. <dt>&lsquo;<samp class="samp">BlueViolet</samp>&rsquo;</dt>
  3610. <dd><p>0x8A2BE2
  3611. </p></dd>
  3612. <dt>&lsquo;<samp class="samp">Brown</samp>&rsquo;</dt>
  3613. <dd><p>0xA52A2A
  3614. </p></dd>
  3615. <dt>&lsquo;<samp class="samp">BurlyWood</samp>&rsquo;</dt>
  3616. <dd><p>0xDEB887
  3617. </p></dd>
  3618. <dt>&lsquo;<samp class="samp">CadetBlue</samp>&rsquo;</dt>
  3619. <dd><p>0x5F9EA0
  3620. </p></dd>
  3621. <dt>&lsquo;<samp class="samp">Chartreuse</samp>&rsquo;</dt>
  3622. <dd><p>0x7FFF00
  3623. </p></dd>
  3624. <dt>&lsquo;<samp class="samp">Chocolate</samp>&rsquo;</dt>
  3625. <dd><p>0xD2691E
  3626. </p></dd>
  3627. <dt>&lsquo;<samp class="samp">Coral</samp>&rsquo;</dt>
  3628. <dd><p>0xFF7F50
  3629. </p></dd>
  3630. <dt>&lsquo;<samp class="samp">CornflowerBlue</samp>&rsquo;</dt>
  3631. <dd><p>0x6495ED
  3632. </p></dd>
  3633. <dt>&lsquo;<samp class="samp">Cornsilk</samp>&rsquo;</dt>
  3634. <dd><p>0xFFF8DC
  3635. </p></dd>
  3636. <dt>&lsquo;<samp class="samp">Crimson</samp>&rsquo;</dt>
  3637. <dd><p>0xDC143C
  3638. </p></dd>
  3639. <dt>&lsquo;<samp class="samp">Cyan</samp>&rsquo;</dt>
  3640. <dd><p>0x00FFFF
  3641. </p></dd>
  3642. <dt>&lsquo;<samp class="samp">DarkBlue</samp>&rsquo;</dt>
  3643. <dd><p>0x00008B
  3644. </p></dd>
  3645. <dt>&lsquo;<samp class="samp">DarkCyan</samp>&rsquo;</dt>
  3646. <dd><p>0x008B8B
  3647. </p></dd>
  3648. <dt>&lsquo;<samp class="samp">DarkGoldenRod</samp>&rsquo;</dt>
  3649. <dd><p>0xB8860B
  3650. </p></dd>
  3651. <dt>&lsquo;<samp class="samp">DarkGray</samp>&rsquo;</dt>
  3652. <dd><p>0xA9A9A9
  3653. </p></dd>
  3654. <dt>&lsquo;<samp class="samp">DarkGreen</samp>&rsquo;</dt>
  3655. <dd><p>0x006400
  3656. </p></dd>
  3657. <dt>&lsquo;<samp class="samp">DarkKhaki</samp>&rsquo;</dt>
  3658. <dd><p>0xBDB76B
  3659. </p></dd>
  3660. <dt>&lsquo;<samp class="samp">DarkMagenta</samp>&rsquo;</dt>
  3661. <dd><p>0x8B008B
  3662. </p></dd>
  3663. <dt>&lsquo;<samp class="samp">DarkOliveGreen</samp>&rsquo;</dt>
  3664. <dd><p>0x556B2F
  3665. </p></dd>
  3666. <dt>&lsquo;<samp class="samp">Darkorange</samp>&rsquo;</dt>
  3667. <dd><p>0xFF8C00
  3668. </p></dd>
  3669. <dt>&lsquo;<samp class="samp">DarkOrchid</samp>&rsquo;</dt>
  3670. <dd><p>0x9932CC
  3671. </p></dd>
  3672. <dt>&lsquo;<samp class="samp">DarkRed</samp>&rsquo;</dt>
  3673. <dd><p>0x8B0000
  3674. </p></dd>
  3675. <dt>&lsquo;<samp class="samp">DarkSalmon</samp>&rsquo;</dt>
  3676. <dd><p>0xE9967A
  3677. </p></dd>
  3678. <dt>&lsquo;<samp class="samp">DarkSeaGreen</samp>&rsquo;</dt>
  3679. <dd><p>0x8FBC8F
  3680. </p></dd>
  3681. <dt>&lsquo;<samp class="samp">DarkSlateBlue</samp>&rsquo;</dt>
  3682. <dd><p>0x483D8B
  3683. </p></dd>
  3684. <dt>&lsquo;<samp class="samp">DarkSlateGray</samp>&rsquo;</dt>
  3685. <dd><p>0x2F4F4F
  3686. </p></dd>
  3687. <dt>&lsquo;<samp class="samp">DarkTurquoise</samp>&rsquo;</dt>
  3688. <dd><p>0x00CED1
  3689. </p></dd>
  3690. <dt>&lsquo;<samp class="samp">DarkViolet</samp>&rsquo;</dt>
  3691. <dd><p>0x9400D3
  3692. </p></dd>
  3693. <dt>&lsquo;<samp class="samp">DeepPink</samp>&rsquo;</dt>
  3694. <dd><p>0xFF1493
  3695. </p></dd>
  3696. <dt>&lsquo;<samp class="samp">DeepSkyBlue</samp>&rsquo;</dt>
  3697. <dd><p>0x00BFFF
  3698. </p></dd>
  3699. <dt>&lsquo;<samp class="samp">DimGray</samp>&rsquo;</dt>
  3700. <dd><p>0x696969
  3701. </p></dd>
  3702. <dt>&lsquo;<samp class="samp">DodgerBlue</samp>&rsquo;</dt>
  3703. <dd><p>0x1E90FF
  3704. </p></dd>
  3705. <dt>&lsquo;<samp class="samp">FireBrick</samp>&rsquo;</dt>
  3706. <dd><p>0xB22222
  3707. </p></dd>
  3708. <dt>&lsquo;<samp class="samp">FloralWhite</samp>&rsquo;</dt>
  3709. <dd><p>0xFFFAF0
  3710. </p></dd>
  3711. <dt>&lsquo;<samp class="samp">ForestGreen</samp>&rsquo;</dt>
  3712. <dd><p>0x228B22
  3713. </p></dd>
  3714. <dt>&lsquo;<samp class="samp">Fuchsia</samp>&rsquo;</dt>
  3715. <dd><p>0xFF00FF
  3716. </p></dd>
  3717. <dt>&lsquo;<samp class="samp">Gainsboro</samp>&rsquo;</dt>
  3718. <dd><p>0xDCDCDC
  3719. </p></dd>
  3720. <dt>&lsquo;<samp class="samp">GhostWhite</samp>&rsquo;</dt>
  3721. <dd><p>0xF8F8FF
  3722. </p></dd>
  3723. <dt>&lsquo;<samp class="samp">Gold</samp>&rsquo;</dt>
  3724. <dd><p>0xFFD700
  3725. </p></dd>
  3726. <dt>&lsquo;<samp class="samp">GoldenRod</samp>&rsquo;</dt>
  3727. <dd><p>0xDAA520
  3728. </p></dd>
  3729. <dt>&lsquo;<samp class="samp">Gray</samp>&rsquo;</dt>
  3730. <dd><p>0x808080
  3731. </p></dd>
  3732. <dt>&lsquo;<samp class="samp">Green</samp>&rsquo;</dt>
  3733. <dd><p>0x008000
  3734. </p></dd>
  3735. <dt>&lsquo;<samp class="samp">GreenYellow</samp>&rsquo;</dt>
  3736. <dd><p>0xADFF2F
  3737. </p></dd>
  3738. <dt>&lsquo;<samp class="samp">HoneyDew</samp>&rsquo;</dt>
  3739. <dd><p>0xF0FFF0
  3740. </p></dd>
  3741. <dt>&lsquo;<samp class="samp">HotPink</samp>&rsquo;</dt>
  3742. <dd><p>0xFF69B4
  3743. </p></dd>
  3744. <dt>&lsquo;<samp class="samp">IndianRed</samp>&rsquo;</dt>
  3745. <dd><p>0xCD5C5C
  3746. </p></dd>
  3747. <dt>&lsquo;<samp class="samp">Indigo</samp>&rsquo;</dt>
  3748. <dd><p>0x4B0082
  3749. </p></dd>
  3750. <dt>&lsquo;<samp class="samp">Ivory</samp>&rsquo;</dt>
  3751. <dd><p>0xFFFFF0
  3752. </p></dd>
  3753. <dt>&lsquo;<samp class="samp">Khaki</samp>&rsquo;</dt>
  3754. <dd><p>0xF0E68C
  3755. </p></dd>
  3756. <dt>&lsquo;<samp class="samp">Lavender</samp>&rsquo;</dt>
  3757. <dd><p>0xE6E6FA
  3758. </p></dd>
  3759. <dt>&lsquo;<samp class="samp">LavenderBlush</samp>&rsquo;</dt>
  3760. <dd><p>0xFFF0F5
  3761. </p></dd>
  3762. <dt>&lsquo;<samp class="samp">LawnGreen</samp>&rsquo;</dt>
  3763. <dd><p>0x7CFC00
  3764. </p></dd>
  3765. <dt>&lsquo;<samp class="samp">LemonChiffon</samp>&rsquo;</dt>
  3766. <dd><p>0xFFFACD
  3767. </p></dd>
  3768. <dt>&lsquo;<samp class="samp">LightBlue</samp>&rsquo;</dt>
  3769. <dd><p>0xADD8E6
  3770. </p></dd>
  3771. <dt>&lsquo;<samp class="samp">LightCoral</samp>&rsquo;</dt>
  3772. <dd><p>0xF08080
  3773. </p></dd>
  3774. <dt>&lsquo;<samp class="samp">LightCyan</samp>&rsquo;</dt>
  3775. <dd><p>0xE0FFFF
  3776. </p></dd>
  3777. <dt>&lsquo;<samp class="samp">LightGoldenRodYellow</samp>&rsquo;</dt>
  3778. <dd><p>0xFAFAD2
  3779. </p></dd>
  3780. <dt>&lsquo;<samp class="samp">LightGreen</samp>&rsquo;</dt>
  3781. <dd><p>0x90EE90
  3782. </p></dd>
  3783. <dt>&lsquo;<samp class="samp">LightGrey</samp>&rsquo;</dt>
  3784. <dd><p>0xD3D3D3
  3785. </p></dd>
  3786. <dt>&lsquo;<samp class="samp">LightPink</samp>&rsquo;</dt>
  3787. <dd><p>0xFFB6C1
  3788. </p></dd>
  3789. <dt>&lsquo;<samp class="samp">LightSalmon</samp>&rsquo;</dt>
  3790. <dd><p>0xFFA07A
  3791. </p></dd>
  3792. <dt>&lsquo;<samp class="samp">LightSeaGreen</samp>&rsquo;</dt>
  3793. <dd><p>0x20B2AA
  3794. </p></dd>
  3795. <dt>&lsquo;<samp class="samp">LightSkyBlue</samp>&rsquo;</dt>
  3796. <dd><p>0x87CEFA
  3797. </p></dd>
  3798. <dt>&lsquo;<samp class="samp">LightSlateGray</samp>&rsquo;</dt>
  3799. <dd><p>0x778899
  3800. </p></dd>
  3801. <dt>&lsquo;<samp class="samp">LightSteelBlue</samp>&rsquo;</dt>
  3802. <dd><p>0xB0C4DE
  3803. </p></dd>
  3804. <dt>&lsquo;<samp class="samp">LightYellow</samp>&rsquo;</dt>
  3805. <dd><p>0xFFFFE0
  3806. </p></dd>
  3807. <dt>&lsquo;<samp class="samp">Lime</samp>&rsquo;</dt>
  3808. <dd><p>0x00FF00
  3809. </p></dd>
  3810. <dt>&lsquo;<samp class="samp">LimeGreen</samp>&rsquo;</dt>
  3811. <dd><p>0x32CD32
  3812. </p></dd>
  3813. <dt>&lsquo;<samp class="samp">Linen</samp>&rsquo;</dt>
  3814. <dd><p>0xFAF0E6
  3815. </p></dd>
  3816. <dt>&lsquo;<samp class="samp">Magenta</samp>&rsquo;</dt>
  3817. <dd><p>0xFF00FF
  3818. </p></dd>
  3819. <dt>&lsquo;<samp class="samp">Maroon</samp>&rsquo;</dt>
  3820. <dd><p>0x800000
  3821. </p></dd>
  3822. <dt>&lsquo;<samp class="samp">MediumAquaMarine</samp>&rsquo;</dt>
  3823. <dd><p>0x66CDAA
  3824. </p></dd>
  3825. <dt>&lsquo;<samp class="samp">MediumBlue</samp>&rsquo;</dt>
  3826. <dd><p>0x0000CD
  3827. </p></dd>
  3828. <dt>&lsquo;<samp class="samp">MediumOrchid</samp>&rsquo;</dt>
  3829. <dd><p>0xBA55D3
  3830. </p></dd>
  3831. <dt>&lsquo;<samp class="samp">MediumPurple</samp>&rsquo;</dt>
  3832. <dd><p>0x9370D8
  3833. </p></dd>
  3834. <dt>&lsquo;<samp class="samp">MediumSeaGreen</samp>&rsquo;</dt>
  3835. <dd><p>0x3CB371
  3836. </p></dd>
  3837. <dt>&lsquo;<samp class="samp">MediumSlateBlue</samp>&rsquo;</dt>
  3838. <dd><p>0x7B68EE
  3839. </p></dd>
  3840. <dt>&lsquo;<samp class="samp">MediumSpringGreen</samp>&rsquo;</dt>
  3841. <dd><p>0x00FA9A
  3842. </p></dd>
  3843. <dt>&lsquo;<samp class="samp">MediumTurquoise</samp>&rsquo;</dt>
  3844. <dd><p>0x48D1CC
  3845. </p></dd>
  3846. <dt>&lsquo;<samp class="samp">MediumVioletRed</samp>&rsquo;</dt>
  3847. <dd><p>0xC71585
  3848. </p></dd>
  3849. <dt>&lsquo;<samp class="samp">MidnightBlue</samp>&rsquo;</dt>
  3850. <dd><p>0x191970
  3851. </p></dd>
  3852. <dt>&lsquo;<samp class="samp">MintCream</samp>&rsquo;</dt>
  3853. <dd><p>0xF5FFFA
  3854. </p></dd>
  3855. <dt>&lsquo;<samp class="samp">MistyRose</samp>&rsquo;</dt>
  3856. <dd><p>0xFFE4E1
  3857. </p></dd>
  3858. <dt>&lsquo;<samp class="samp">Moccasin</samp>&rsquo;</dt>
  3859. <dd><p>0xFFE4B5
  3860. </p></dd>
  3861. <dt>&lsquo;<samp class="samp">NavajoWhite</samp>&rsquo;</dt>
  3862. <dd><p>0xFFDEAD
  3863. </p></dd>
  3864. <dt>&lsquo;<samp class="samp">Navy</samp>&rsquo;</dt>
  3865. <dd><p>0x000080
  3866. </p></dd>
  3867. <dt>&lsquo;<samp class="samp">OldLace</samp>&rsquo;</dt>
  3868. <dd><p>0xFDF5E6
  3869. </p></dd>
  3870. <dt>&lsquo;<samp class="samp">Olive</samp>&rsquo;</dt>
  3871. <dd><p>0x808000
  3872. </p></dd>
  3873. <dt>&lsquo;<samp class="samp">OliveDrab</samp>&rsquo;</dt>
  3874. <dd><p>0x6B8E23
  3875. </p></dd>
  3876. <dt>&lsquo;<samp class="samp">Orange</samp>&rsquo;</dt>
  3877. <dd><p>0xFFA500
  3878. </p></dd>
  3879. <dt>&lsquo;<samp class="samp">OrangeRed</samp>&rsquo;</dt>
  3880. <dd><p>0xFF4500
  3881. </p></dd>
  3882. <dt>&lsquo;<samp class="samp">Orchid</samp>&rsquo;</dt>
  3883. <dd><p>0xDA70D6
  3884. </p></dd>
  3885. <dt>&lsquo;<samp class="samp">PaleGoldenRod</samp>&rsquo;</dt>
  3886. <dd><p>0xEEE8AA
  3887. </p></dd>
  3888. <dt>&lsquo;<samp class="samp">PaleGreen</samp>&rsquo;</dt>
  3889. <dd><p>0x98FB98
  3890. </p></dd>
  3891. <dt>&lsquo;<samp class="samp">PaleTurquoise</samp>&rsquo;</dt>
  3892. <dd><p>0xAFEEEE
  3893. </p></dd>
  3894. <dt>&lsquo;<samp class="samp">PaleVioletRed</samp>&rsquo;</dt>
  3895. <dd><p>0xD87093
  3896. </p></dd>
  3897. <dt>&lsquo;<samp class="samp">PapayaWhip</samp>&rsquo;</dt>
  3898. <dd><p>0xFFEFD5
  3899. </p></dd>
  3900. <dt>&lsquo;<samp class="samp">PeachPuff</samp>&rsquo;</dt>
  3901. <dd><p>0xFFDAB9
  3902. </p></dd>
  3903. <dt>&lsquo;<samp class="samp">Peru</samp>&rsquo;</dt>
  3904. <dd><p>0xCD853F
  3905. </p></dd>
  3906. <dt>&lsquo;<samp class="samp">Pink</samp>&rsquo;</dt>
  3907. <dd><p>0xFFC0CB
  3908. </p></dd>
  3909. <dt>&lsquo;<samp class="samp">Plum</samp>&rsquo;</dt>
  3910. <dd><p>0xDDA0DD
  3911. </p></dd>
  3912. <dt>&lsquo;<samp class="samp">PowderBlue</samp>&rsquo;</dt>
  3913. <dd><p>0xB0E0E6
  3914. </p></dd>
  3915. <dt>&lsquo;<samp class="samp">Purple</samp>&rsquo;</dt>
  3916. <dd><p>0x800080
  3917. </p></dd>
  3918. <dt>&lsquo;<samp class="samp">Red</samp>&rsquo;</dt>
  3919. <dd><p>0xFF0000
  3920. </p></dd>
  3921. <dt>&lsquo;<samp class="samp">RosyBrown</samp>&rsquo;</dt>
  3922. <dd><p>0xBC8F8F
  3923. </p></dd>
  3924. <dt>&lsquo;<samp class="samp">RoyalBlue</samp>&rsquo;</dt>
  3925. <dd><p>0x4169E1
  3926. </p></dd>
  3927. <dt>&lsquo;<samp class="samp">SaddleBrown</samp>&rsquo;</dt>
  3928. <dd><p>0x8B4513
  3929. </p></dd>
  3930. <dt>&lsquo;<samp class="samp">Salmon</samp>&rsquo;</dt>
  3931. <dd><p>0xFA8072
  3932. </p></dd>
  3933. <dt>&lsquo;<samp class="samp">SandyBrown</samp>&rsquo;</dt>
  3934. <dd><p>0xF4A460
  3935. </p></dd>
  3936. <dt>&lsquo;<samp class="samp">SeaGreen</samp>&rsquo;</dt>
  3937. <dd><p>0x2E8B57
  3938. </p></dd>
  3939. <dt>&lsquo;<samp class="samp">SeaShell</samp>&rsquo;</dt>
  3940. <dd><p>0xFFF5EE
  3941. </p></dd>
  3942. <dt>&lsquo;<samp class="samp">Sienna</samp>&rsquo;</dt>
  3943. <dd><p>0xA0522D
  3944. </p></dd>
  3945. <dt>&lsquo;<samp class="samp">Silver</samp>&rsquo;</dt>
  3946. <dd><p>0xC0C0C0
  3947. </p></dd>
  3948. <dt>&lsquo;<samp class="samp">SkyBlue</samp>&rsquo;</dt>
  3949. <dd><p>0x87CEEB
  3950. </p></dd>
  3951. <dt>&lsquo;<samp class="samp">SlateBlue</samp>&rsquo;</dt>
  3952. <dd><p>0x6A5ACD
  3953. </p></dd>
  3954. <dt>&lsquo;<samp class="samp">SlateGray</samp>&rsquo;</dt>
  3955. <dd><p>0x708090
  3956. </p></dd>
  3957. <dt>&lsquo;<samp class="samp">Snow</samp>&rsquo;</dt>
  3958. <dd><p>0xFFFAFA
  3959. </p></dd>
  3960. <dt>&lsquo;<samp class="samp">SpringGreen</samp>&rsquo;</dt>
  3961. <dd><p>0x00FF7F
  3962. </p></dd>
  3963. <dt>&lsquo;<samp class="samp">SteelBlue</samp>&rsquo;</dt>
  3964. <dd><p>0x4682B4
  3965. </p></dd>
  3966. <dt>&lsquo;<samp class="samp">Tan</samp>&rsquo;</dt>
  3967. <dd><p>0xD2B48C
  3968. </p></dd>
  3969. <dt>&lsquo;<samp class="samp">Teal</samp>&rsquo;</dt>
  3970. <dd><p>0x008080
  3971. </p></dd>
  3972. <dt>&lsquo;<samp class="samp">Thistle</samp>&rsquo;</dt>
  3973. <dd><p>0xD8BFD8
  3974. </p></dd>
  3975. <dt>&lsquo;<samp class="samp">Tomato</samp>&rsquo;</dt>
  3976. <dd><p>0xFF6347
  3977. </p></dd>
  3978. <dt>&lsquo;<samp class="samp">Turquoise</samp>&rsquo;</dt>
  3979. <dd><p>0x40E0D0
  3980. </p></dd>
  3981. <dt>&lsquo;<samp class="samp">Violet</samp>&rsquo;</dt>
  3982. <dd><p>0xEE82EE
  3983. </p></dd>
  3984. <dt>&lsquo;<samp class="samp">Wheat</samp>&rsquo;</dt>
  3985. <dd><p>0xF5DEB3
  3986. </p></dd>
  3987. <dt>&lsquo;<samp class="samp">White</samp>&rsquo;</dt>
  3988. <dd><p>0xFFFFFF
  3989. </p></dd>
  3990. <dt>&lsquo;<samp class="samp">WhiteSmoke</samp>&rsquo;</dt>
  3991. <dd><p>0xF5F5F5
  3992. </p></dd>
  3993. <dt>&lsquo;<samp class="samp">Yellow</samp>&rsquo;</dt>
  3994. <dd><p>0xFFFF00
  3995. </p></dd>
  3996. <dt>&lsquo;<samp class="samp">YellowGreen</samp>&rsquo;</dt>
  3997. <dd><p>0x9ACD32
  3998. </p></dd>
  3999. </dl>
  4000. <a class="anchor" id="channel-layout-syntax"></a></div>
  4001. <div class="section-level-extent" id="Channel-Layout">
  4002. <h3 class="section"><span>6.8 Channel Layout<a class="copiable-link" href="#Channel-Layout"> &para;</a></span></h3>
  4003. <p>A channel layout specifies the spatial disposition of the channels in
  4004. a multi-channel audio stream. To specify a channel layout, FFmpeg
  4005. makes use of a special syntax.
  4006. </p>
  4007. <p>Individual channels are identified by an id, as given by the table
  4008. below:
  4009. </p><dl class="table">
  4010. <dt>&lsquo;<samp class="samp">FL</samp>&rsquo;</dt>
  4011. <dd><p>front left
  4012. </p></dd>
  4013. <dt>&lsquo;<samp class="samp">FR</samp>&rsquo;</dt>
  4014. <dd><p>front right
  4015. </p></dd>
  4016. <dt>&lsquo;<samp class="samp">FC</samp>&rsquo;</dt>
  4017. <dd><p>front center
  4018. </p></dd>
  4019. <dt>&lsquo;<samp class="samp">LFE</samp>&rsquo;</dt>
  4020. <dd><p>low frequency
  4021. </p></dd>
  4022. <dt>&lsquo;<samp class="samp">BL</samp>&rsquo;</dt>
  4023. <dd><p>back left
  4024. </p></dd>
  4025. <dt>&lsquo;<samp class="samp">BR</samp>&rsquo;</dt>
  4026. <dd><p>back right
  4027. </p></dd>
  4028. <dt>&lsquo;<samp class="samp">FLC</samp>&rsquo;</dt>
  4029. <dd><p>front left-of-center
  4030. </p></dd>
  4031. <dt>&lsquo;<samp class="samp">FRC</samp>&rsquo;</dt>
  4032. <dd><p>front right-of-center
  4033. </p></dd>
  4034. <dt>&lsquo;<samp class="samp">BC</samp>&rsquo;</dt>
  4035. <dd><p>back center
  4036. </p></dd>
  4037. <dt>&lsquo;<samp class="samp">SL</samp>&rsquo;</dt>
  4038. <dd><p>side left
  4039. </p></dd>
  4040. <dt>&lsquo;<samp class="samp">SR</samp>&rsquo;</dt>
  4041. <dd><p>side right
  4042. </p></dd>
  4043. <dt>&lsquo;<samp class="samp">TC</samp>&rsquo;</dt>
  4044. <dd><p>top center
  4045. </p></dd>
  4046. <dt>&lsquo;<samp class="samp">TFL</samp>&rsquo;</dt>
  4047. <dd><p>top front left
  4048. </p></dd>
  4049. <dt>&lsquo;<samp class="samp">TFC</samp>&rsquo;</dt>
  4050. <dd><p>top front center
  4051. </p></dd>
  4052. <dt>&lsquo;<samp class="samp">TFR</samp>&rsquo;</dt>
  4053. <dd><p>top front right
  4054. </p></dd>
  4055. <dt>&lsquo;<samp class="samp">TBL</samp>&rsquo;</dt>
  4056. <dd><p>top back left
  4057. </p></dd>
  4058. <dt>&lsquo;<samp class="samp">TBC</samp>&rsquo;</dt>
  4059. <dd><p>top back center
  4060. </p></dd>
  4061. <dt>&lsquo;<samp class="samp">TBR</samp>&rsquo;</dt>
  4062. <dd><p>top back right
  4063. </p></dd>
  4064. <dt>&lsquo;<samp class="samp">DL</samp>&rsquo;</dt>
  4065. <dd><p>downmix left
  4066. </p></dd>
  4067. <dt>&lsquo;<samp class="samp">DR</samp>&rsquo;</dt>
  4068. <dd><p>downmix right
  4069. </p></dd>
  4070. <dt>&lsquo;<samp class="samp">WL</samp>&rsquo;</dt>
  4071. <dd><p>wide left
  4072. </p></dd>
  4073. <dt>&lsquo;<samp class="samp">WR</samp>&rsquo;</dt>
  4074. <dd><p>wide right
  4075. </p></dd>
  4076. <dt>&lsquo;<samp class="samp">SDL</samp>&rsquo;</dt>
  4077. <dd><p>surround direct left
  4078. </p></dd>
  4079. <dt>&lsquo;<samp class="samp">SDR</samp>&rsquo;</dt>
  4080. <dd><p>surround direct right
  4081. </p></dd>
  4082. <dt>&lsquo;<samp class="samp">LFE2</samp>&rsquo;</dt>
  4083. <dd><p>low frequency 2
  4084. </p></dd>
  4085. </dl>
  4086. <p>Standard channel layout compositions can be specified by using the
  4087. following identifiers:
  4088. </p><dl class="table">
  4089. <dt>&lsquo;<samp class="samp">mono</samp>&rsquo;</dt>
  4090. <dd><p>FC
  4091. </p></dd>
  4092. <dt>&lsquo;<samp class="samp">stereo</samp>&rsquo;</dt>
  4093. <dd><p>FL+FR
  4094. </p></dd>
  4095. <dt>&lsquo;<samp class="samp">2.1</samp>&rsquo;</dt>
  4096. <dd><p>FL+FR+LFE
  4097. </p></dd>
  4098. <dt>&lsquo;<samp class="samp">3.0</samp>&rsquo;</dt>
  4099. <dd><p>FL+FR+FC
  4100. </p></dd>
  4101. <dt>&lsquo;<samp class="samp">3.0(back)</samp>&rsquo;</dt>
  4102. <dd><p>FL+FR+BC
  4103. </p></dd>
  4104. <dt>&lsquo;<samp class="samp">4.0</samp>&rsquo;</dt>
  4105. <dd><p>FL+FR+FC+BC
  4106. </p></dd>
  4107. <dt>&lsquo;<samp class="samp">quad</samp>&rsquo;</dt>
  4108. <dd><p>FL+FR+BL+BR
  4109. </p></dd>
  4110. <dt>&lsquo;<samp class="samp">quad(side)</samp>&rsquo;</dt>
  4111. <dd><p>FL+FR+SL+SR
  4112. </p></dd>
  4113. <dt>&lsquo;<samp class="samp">3.1</samp>&rsquo;</dt>
  4114. <dd><p>FL+FR+FC+LFE
  4115. </p></dd>
  4116. <dt>&lsquo;<samp class="samp">5.0</samp>&rsquo;</dt>
  4117. <dd><p>FL+FR+FC+BL+BR
  4118. </p></dd>
  4119. <dt>&lsquo;<samp class="samp">5.0(side)</samp>&rsquo;</dt>
  4120. <dd><p>FL+FR+FC+SL+SR
  4121. </p></dd>
  4122. <dt>&lsquo;<samp class="samp">4.1</samp>&rsquo;</dt>
  4123. <dd><p>FL+FR+FC+LFE+BC
  4124. </p></dd>
  4125. <dt>&lsquo;<samp class="samp">5.1</samp>&rsquo;</dt>
  4126. <dd><p>FL+FR+FC+LFE+BL+BR
  4127. </p></dd>
  4128. <dt>&lsquo;<samp class="samp">5.1(side)</samp>&rsquo;</dt>
  4129. <dd><p>FL+FR+FC+LFE+SL+SR
  4130. </p></dd>
  4131. <dt>&lsquo;<samp class="samp">6.0</samp>&rsquo;</dt>
  4132. <dd><p>FL+FR+FC+BC+SL+SR
  4133. </p></dd>
  4134. <dt>&lsquo;<samp class="samp">6.0(front)</samp>&rsquo;</dt>
  4135. <dd><p>FL+FR+FLC+FRC+SL+SR
  4136. </p></dd>
  4137. <dt>&lsquo;<samp class="samp">3.1.2</samp>&rsquo;</dt>
  4138. <dd><p>FL+FR+FC+LFE+TFL+TFR
  4139. </p></dd>
  4140. <dt>&lsquo;<samp class="samp">hexagonal</samp>&rsquo;</dt>
  4141. <dd><p>FL+FR+FC+BL+BR+BC
  4142. </p></dd>
  4143. <dt>&lsquo;<samp class="samp">6.1</samp>&rsquo;</dt>
  4144. <dd><p>FL+FR+FC+LFE+BC+SL+SR
  4145. </p></dd>
  4146. <dt>&lsquo;<samp class="samp">6.1</samp>&rsquo;</dt>
  4147. <dd><p>FL+FR+FC+LFE+BL+BR+BC
  4148. </p></dd>
  4149. <dt>&lsquo;<samp class="samp">6.1(front)</samp>&rsquo;</dt>
  4150. <dd><p>FL+FR+LFE+FLC+FRC+SL+SR
  4151. </p></dd>
  4152. <dt>&lsquo;<samp class="samp">7.0</samp>&rsquo;</dt>
  4153. <dd><p>FL+FR+FC+BL+BR+SL+SR
  4154. </p></dd>
  4155. <dt>&lsquo;<samp class="samp">7.0(front)</samp>&rsquo;</dt>
  4156. <dd><p>FL+FR+FC+FLC+FRC+SL+SR
  4157. </p></dd>
  4158. <dt>&lsquo;<samp class="samp">7.1</samp>&rsquo;</dt>
  4159. <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR
  4160. </p></dd>
  4161. <dt>&lsquo;<samp class="samp">7.1(wide)</samp>&rsquo;</dt>
  4162. <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC
  4163. </p></dd>
  4164. <dt>&lsquo;<samp class="samp">7.1(wide-side)</samp>&rsquo;</dt>
  4165. <dd><p>FL+FR+FC+LFE+FLC+FRC+SL+SR
  4166. </p></dd>
  4167. <dt>&lsquo;<samp class="samp">5.1.2</samp>&rsquo;</dt>
  4168. <dd><p>FL+FR+FC+LFE+BL+BR+TFL+TFR
  4169. </p></dd>
  4170. <dt>&lsquo;<samp class="samp">octagonal</samp>&rsquo;</dt>
  4171. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR
  4172. </p></dd>
  4173. <dt>&lsquo;<samp class="samp">cube</samp>&rsquo;</dt>
  4174. <dd><p>FL+FR+BL+BR+TFL+TFR+TBL+TBR
  4175. </p></dd>
  4176. <dt>&lsquo;<samp class="samp">5.1.4</samp>&rsquo;</dt>
  4177. <dd><p>FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR
  4178. </p></dd>
  4179. <dt>&lsquo;<samp class="samp">7.1.2</samp>&rsquo;</dt>
  4180. <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR
  4181. </p></dd>
  4182. <dt>&lsquo;<samp class="samp">7.1.4</samp>&rsquo;</dt>
  4183. <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBL+TBR
  4184. </p></dd>
  4185. <dt>&lsquo;<samp class="samp">7.2.3</samp>&rsquo;</dt>
  4186. <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBC+LFE2
  4187. </p></dd>
  4188. <dt>&lsquo;<samp class="samp">9.1.4</samp>&rsquo;</dt>
  4189. <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC+SL+SR+TFL+TFR+TBL+TBR
  4190. </p></dd>
  4191. <dt>&lsquo;<samp class="samp">hexadecagonal</samp>&rsquo;</dt>
  4192. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
  4193. </p></dd>
  4194. <dt>&lsquo;<samp class="samp">downmix</samp>&rsquo;</dt>
  4195. <dd><p>DL+DR
  4196. </p></dd>
  4197. <dt>&lsquo;<samp class="samp">22.2</samp>&rsquo;</dt>
  4198. <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR
  4199. </p></dd>
  4200. </dl>
  4201. <p>A custom channel layout can be specified as a sequence of terms, separated by &rsquo;+&rsquo;.
  4202. Each term can be:
  4203. </p><ul class="itemize mark-bullet">
  4204. <li>the name of a single channel (e.g. &lsquo;<samp class="samp">FL</samp>&rsquo;, &lsquo;<samp class="samp">FR</samp>&rsquo;, &lsquo;<samp class="samp">FC</samp>&rsquo;, &lsquo;<samp class="samp">LFE</samp>&rsquo;, etc.),
  4205. each optionally containing a custom name after a &rsquo;@&rsquo;, (e.g. &lsquo;<samp class="samp">FL@Left</samp>&rsquo;,
  4206. &lsquo;<samp class="samp">FR@Right</samp>&rsquo;, &lsquo;<samp class="samp">FC@Center</samp>&rsquo;, &lsquo;<samp class="samp">LFE@Low_Frequency</samp>&rsquo;, etc.)
  4207. </li></ul>
  4208. <p>A standard channel layout can be specified by the following:
  4209. </p><ul class="itemize mark-bullet">
  4210. <li>the name of a single channel (e.g. &lsquo;<samp class="samp">FL</samp>&rsquo;, &lsquo;<samp class="samp">FR</samp>&rsquo;, &lsquo;<samp class="samp">FC</samp>&rsquo;, &lsquo;<samp class="samp">LFE</samp>&rsquo;, etc.)
  4211. </li><li>the name of a standard channel layout (e.g. &lsquo;<samp class="samp">mono</samp>&rsquo;,
  4212. &lsquo;<samp class="samp">stereo</samp>&rsquo;, &lsquo;<samp class="samp">4.0</samp>&rsquo;, &lsquo;<samp class="samp">quad</samp>&rsquo;, &lsquo;<samp class="samp">5.0</samp>&rsquo;, etc.)
  4213. </li><li>a number of channels, in decimal, followed by &rsquo;c&rsquo;, yielding the default channel
  4214. layout for that number of channels (see the function
  4215. <code class="code">av_channel_layout_default</code>). Note that not all channel counts have a
  4216. default layout.
  4217. </li><li>a number of channels, in decimal, followed by &rsquo;C&rsquo;, yielding an unknown channel
  4218. layout with the specified number of channels. Note that not all channel layout
  4219. specification strings support unknown channel layouts.
  4220. </li><li>a channel layout mask, in hexadecimal starting with &quot;0x&quot; (see the
  4221. <code class="code">AV_CH_*</code> macros in <samp class="file">libavutil/channel_layout.h</samp>.
  4222. </li></ul>
  4223. <p>Before libavutil version 53 the trailing character &quot;c&quot; to specify a number of
  4224. channels was optional, but now it is required, while a channel layout mask can
  4225. also be specified as a decimal number (if and only if not followed by &quot;c&quot; or &quot;C&quot;).
  4226. </p>
  4227. <p>See also the function <code class="code">av_channel_layout_from_string</code> defined in
  4228. <samp class="file">libavutil/channel_layout.h</samp>.
  4229. </p>
  4230. </div>
  4231. </div>
  4232. <div class="chapter-level-extent" id="Expression-Evaluation">
  4233. <h2 class="chapter"><span>7 Expression Evaluation<a class="copiable-link" href="#Expression-Evaluation"> &para;</a></span></h2>
  4234. <p>When evaluating an arithmetic expression, FFmpeg uses an internal
  4235. formula evaluator, implemented through the <samp class="file">libavutil/eval.h</samp>
  4236. interface.
  4237. </p>
  4238. <p>An expression may contain unary, binary operators, constants, and
  4239. functions.
  4240. </p>
  4241. <p>Two expressions <var class="var">expr1</var> and <var class="var">expr2</var> can be combined to form
  4242. another expression &quot;<var class="var">expr1</var>;<var class="var">expr2</var>&quot;.
  4243. <var class="var">expr1</var> and <var class="var">expr2</var> are evaluated in turn, and the new
  4244. expression evaluates to the value of <var class="var">expr2</var>.
  4245. </p>
  4246. <p>The following binary operators are available: <code class="code">+</code>, <code class="code">-</code>,
  4247. <code class="code">*</code>, <code class="code">/</code>, <code class="code">^</code>.
  4248. </p>
  4249. <p>The following unary operators are available: <code class="code">+</code>, <code class="code">-</code>.
  4250. </p>
  4251. <p>The following functions are available:
  4252. </p><dl class="table">
  4253. <dt><samp class="option">abs(x)</samp></dt>
  4254. <dd><p>Compute absolute value of <var class="var">x</var>.
  4255. </p>
  4256. </dd>
  4257. <dt><samp class="option">acos(x)</samp></dt>
  4258. <dd><p>Compute arccosine of <var class="var">x</var>.
  4259. </p>
  4260. </dd>
  4261. <dt><samp class="option">asin(x)</samp></dt>
  4262. <dd><p>Compute arcsine of <var class="var">x</var>.
  4263. </p>
  4264. </dd>
  4265. <dt><samp class="option">atan(x)</samp></dt>
  4266. <dd><p>Compute arctangent of <var class="var">x</var>.
  4267. </p>
  4268. </dd>
  4269. <dt><samp class="option">atan2(y, x)</samp></dt>
  4270. <dd><p>Compute principal value of the arc tangent of <var class="var">y</var>/<var class="var">x</var>.
  4271. </p>
  4272. </dd>
  4273. <dt><samp class="option">between(x, min, max)</samp></dt>
  4274. <dd><p>Return 1 if <var class="var">x</var> is greater than or equal to <var class="var">min</var> and lesser than or
  4275. equal to <var class="var">max</var>, 0 otherwise.
  4276. </p>
  4277. </dd>
  4278. <dt><samp class="option">bitand(x, y)</samp></dt>
  4279. <dt><samp class="option">bitor(x, y)</samp></dt>
  4280. <dd><p>Compute bitwise and/or operation on <var class="var">x</var> and <var class="var">y</var>.
  4281. </p>
  4282. <p>The results of the evaluation of <var class="var">x</var> and <var class="var">y</var> are converted to
  4283. integers before executing the bitwise operation.
  4284. </p>
  4285. <p>Note that both the conversion to integer and the conversion back to
  4286. floating point can lose precision. Beware of unexpected results for
  4287. large numbers (usually 2^53 and larger).
  4288. </p>
  4289. </dd>
  4290. <dt><samp class="option">ceil(expr)</samp></dt>
  4291. <dd><p>Round the value of expression <var class="var">expr</var> upwards to the nearest
  4292. integer. For example, &quot;ceil(1.5)&quot; is &quot;2.0&quot;.
  4293. </p>
  4294. </dd>
  4295. <dt><samp class="option">clip(x, min, max)</samp></dt>
  4296. <dd><p>Return the value of <var class="var">x</var> clipped between <var class="var">min</var> and <var class="var">max</var>.
  4297. </p>
  4298. </dd>
  4299. <dt><samp class="option">cos(x)</samp></dt>
  4300. <dd><p>Compute cosine of <var class="var">x</var>.
  4301. </p>
  4302. </dd>
  4303. <dt><samp class="option">cosh(x)</samp></dt>
  4304. <dd><p>Compute hyperbolic cosine of <var class="var">x</var>.
  4305. </p>
  4306. </dd>
  4307. <dt><samp class="option">eq(x, y)</samp></dt>
  4308. <dd><p>Return 1 if <var class="var">x</var> and <var class="var">y</var> are equivalent, 0 otherwise.
  4309. </p>
  4310. </dd>
  4311. <dt><samp class="option">exp(x)</samp></dt>
  4312. <dd><p>Compute exponential of <var class="var">x</var> (with base <code class="code">e</code>, the Euler&rsquo;s number).
  4313. </p>
  4314. </dd>
  4315. <dt><samp class="option">floor(expr)</samp></dt>
  4316. <dd><p>Round the value of expression <var class="var">expr</var> downwards to the nearest
  4317. integer. For example, &quot;floor(-1.5)&quot; is &quot;-2.0&quot;.
  4318. </p>
  4319. </dd>
  4320. <dt><samp class="option">gauss(x)</samp></dt>
  4321. <dd><p>Compute Gauss function of <var class="var">x</var>, corresponding to
  4322. <code class="code">exp(-x*x/2) / sqrt(2*PI)</code>.
  4323. </p>
  4324. </dd>
  4325. <dt><samp class="option">gcd(x, y)</samp></dt>
  4326. <dd><p>Return the greatest common divisor of <var class="var">x</var> and <var class="var">y</var>. If both <var class="var">x</var> and
  4327. <var class="var">y</var> are 0 or either or both are less than zero then behavior is undefined.
  4328. </p>
  4329. </dd>
  4330. <dt><samp class="option">gt(x, y)</samp></dt>
  4331. <dd><p>Return 1 if <var class="var">x</var> is greater than <var class="var">y</var>, 0 otherwise.
  4332. </p>
  4333. </dd>
  4334. <dt><samp class="option">gte(x, y)</samp></dt>
  4335. <dd><p>Return 1 if <var class="var">x</var> is greater than or equal to <var class="var">y</var>, 0 otherwise.
  4336. </p>
  4337. </dd>
  4338. <dt><samp class="option">hypot(x, y)</samp></dt>
  4339. <dd><p>This function is similar to the C function with the same name; it returns
  4340. &quot;sqrt(<var class="var">x</var>*<var class="var">x</var> + <var class="var">y</var>*<var class="var">y</var>)&quot;, the length of the hypotenuse of a
  4341. right triangle with sides of length <var class="var">x</var> and <var class="var">y</var>, or the distance of the
  4342. point (<var class="var">x</var>, <var class="var">y</var>) from the origin.
  4343. </p>
  4344. </dd>
  4345. <dt><samp class="option">if(x, y)</samp></dt>
  4346. <dd><p>Evaluate <var class="var">x</var>, and if the result is non-zero return the result of
  4347. the evaluation of <var class="var">y</var>, return 0 otherwise.
  4348. </p>
  4349. </dd>
  4350. <dt><samp class="option">if(x, y, z)</samp></dt>
  4351. <dd><p>Evaluate <var class="var">x</var>, and if the result is non-zero return the evaluation
  4352. result of <var class="var">y</var>, otherwise the evaluation result of <var class="var">z</var>.
  4353. </p>
  4354. </dd>
  4355. <dt><samp class="option">ifnot(x, y)</samp></dt>
  4356. <dd><p>Evaluate <var class="var">x</var>, and if the result is zero return the result of the
  4357. evaluation of <var class="var">y</var>, return 0 otherwise.
  4358. </p>
  4359. </dd>
  4360. <dt><samp class="option">ifnot(x, y, z)</samp></dt>
  4361. <dd><p>Evaluate <var class="var">x</var>, and if the result is zero return the evaluation
  4362. result of <var class="var">y</var>, otherwise the evaluation result of <var class="var">z</var>.
  4363. </p>
  4364. </dd>
  4365. <dt><samp class="option">isinf(x)</samp></dt>
  4366. <dd><p>Return 1.0 if <var class="var">x</var> is +/-INFINITY, 0.0 otherwise.
  4367. </p>
  4368. </dd>
  4369. <dt><samp class="option">isnan(x)</samp></dt>
  4370. <dd><p>Return 1.0 if <var class="var">x</var> is NAN, 0.0 otherwise.
  4371. </p>
  4372. </dd>
  4373. <dt><samp class="option">ld(var)</samp></dt>
  4374. <dd><p>Load the value of the internal variable with number
  4375. <var class="var">var</var>, which was previously stored with st(<var class="var">var</var>, <var class="var">expr</var>).
  4376. The function returns the loaded value.
  4377. </p>
  4378. </dd>
  4379. <dt><samp class="option">lerp(x, y, z)</samp></dt>
  4380. <dd><p>Return linear interpolation between <var class="var">x</var> and <var class="var">y</var> by amount of <var class="var">z</var>.
  4381. </p>
  4382. </dd>
  4383. <dt><samp class="option">log(x)</samp></dt>
  4384. <dd><p>Compute natural logarithm of <var class="var">x</var>.
  4385. </p>
  4386. </dd>
  4387. <dt><samp class="option">lt(x, y)</samp></dt>
  4388. <dd><p>Return 1 if <var class="var">x</var> is lesser than <var class="var">y</var>, 0 otherwise.
  4389. </p>
  4390. </dd>
  4391. <dt><samp class="option">lte(x, y)</samp></dt>
  4392. <dd><p>Return 1 if <var class="var">x</var> is lesser than or equal to <var class="var">y</var>, 0 otherwise.
  4393. </p>
  4394. </dd>
  4395. <dt><samp class="option">max(x, y)</samp></dt>
  4396. <dd><p>Return the maximum between <var class="var">x</var> and <var class="var">y</var>.
  4397. </p>
  4398. </dd>
  4399. <dt><samp class="option">min(x, y)</samp></dt>
  4400. <dd><p>Return the minimum between <var class="var">x</var> and <var class="var">y</var>.
  4401. </p>
  4402. </dd>
  4403. <dt><samp class="option">mod(x, y)</samp></dt>
  4404. <dd><p>Compute the remainder of division of <var class="var">x</var> by <var class="var">y</var>.
  4405. </p>
  4406. </dd>
  4407. <dt><samp class="option">not(expr)</samp></dt>
  4408. <dd><p>Return 1.0 if <var class="var">expr</var> is zero, 0.0 otherwise.
  4409. </p>
  4410. </dd>
  4411. <dt><samp class="option">pow(x, y)</samp></dt>
  4412. <dd><p>Compute the power of <var class="var">x</var> elevated <var class="var">y</var>, it is equivalent to
  4413. &quot;(<var class="var">x</var>)^(<var class="var">y</var>)&quot;.
  4414. </p>
  4415. </dd>
  4416. <dt><samp class="option">print(t)</samp></dt>
  4417. <dt><samp class="option">print(t, l)</samp></dt>
  4418. <dd><p>Print the value of expression <var class="var">t</var> with loglevel <var class="var">l</var>. If
  4419. <var class="var">l</var> is not specified then a default log level is used.
  4420. Returns the value of the expression printed.
  4421. </p>
  4422. <p>Prints t with loglevel l
  4423. </p>
  4424. </dd>
  4425. <dt><samp class="option">random(idx)</samp></dt>
  4426. <dd><p>Return a pseudo random value between 0.0 and 1.0. <var class="var">idx</var> is the
  4427. index of the internal variable which will be used to save the
  4428. seed/state.
  4429. </p>
  4430. </dd>
  4431. <dt><samp class="option">randomi(idx, min, max)</samp></dt>
  4432. <dd><p>Return a pseudo random value in the interval between <var class="var">min</var> and
  4433. <var class="var">max</var>. <var class="var">idx</var> is the index of the internal variable which will
  4434. be used to save the seed/state.
  4435. </p>
  4436. </dd>
  4437. <dt><samp class="option">root(expr, max)</samp></dt>
  4438. <dd><p>Find an input value for which the function represented by <var class="var">expr</var>
  4439. with argument <var class="var">ld(0)</var> is 0 in the interval 0..<var class="var">max</var>.
  4440. </p>
  4441. <p>The expression in <var class="var">expr</var> must denote a continuous function or the
  4442. result is undefined.
  4443. </p>
  4444. <p><var class="var">ld(0)</var> is used to represent the function input value, which means
  4445. that the given expression will be evaluated multiple times with
  4446. various input values that the expression can access through
  4447. <code class="code">ld(0)</code>. When the expression evaluates to 0 then the
  4448. corresponding input value will be returned.
  4449. </p>
  4450. </dd>
  4451. <dt><samp class="option">round(expr)</samp></dt>
  4452. <dd><p>Round the value of expression <var class="var">expr</var> to the nearest integer. For example, &quot;round(1.5)&quot; is &quot;2.0&quot;.
  4453. </p>
  4454. </dd>
  4455. <dt><samp class="option">sgn(x)</samp></dt>
  4456. <dd><p>Compute sign of <var class="var">x</var>.
  4457. </p>
  4458. </dd>
  4459. <dt><samp class="option">sin(x)</samp></dt>
  4460. <dd><p>Compute sine of <var class="var">x</var>.
  4461. </p>
  4462. </dd>
  4463. <dt><samp class="option">sinh(x)</samp></dt>
  4464. <dd><p>Compute hyperbolic sine of <var class="var">x</var>.
  4465. </p>
  4466. </dd>
  4467. <dt><samp class="option">sqrt(expr)</samp></dt>
  4468. <dd><p>Compute the square root of <var class="var">expr</var>. This is equivalent to
  4469. &quot;(<var class="var">expr</var>)^.5&quot;.
  4470. </p>
  4471. </dd>
  4472. <dt><samp class="option">squish(x)</samp></dt>
  4473. <dd><p>Compute expression <code class="code">1/(1 + exp(4*x))</code>.
  4474. </p>
  4475. </dd>
  4476. <dt><samp class="option">st(var, expr)</samp></dt>
  4477. <dd><p>Store the value of the expression <var class="var">expr</var> in an internal
  4478. variable. <var class="var">var</var> specifies the number of the variable where to
  4479. store the value, and it is a value ranging from 0 to 9. The function
  4480. returns the value stored in the internal variable.
  4481. Note, Variables are currently not shared between expressions.
  4482. </p>
  4483. </dd>
  4484. <dt><samp class="option">tan(x)</samp></dt>
  4485. <dd><p>Compute tangent of <var class="var">x</var>.
  4486. </p>
  4487. </dd>
  4488. <dt><samp class="option">tanh(x)</samp></dt>
  4489. <dd><p>Compute hyperbolic tangent of <var class="var">x</var>.
  4490. </p>
  4491. </dd>
  4492. <dt><samp class="option">taylor(expr, x)</samp></dt>
  4493. <dt><samp class="option">taylor(expr, x, id)</samp></dt>
  4494. <dd><p>Evaluate a Taylor series at <var class="var">x</var>, given an expression representing
  4495. the <code class="code">ld(id)</code>-th derivative of a function at 0.
  4496. </p>
  4497. <p>When the series does not converge the result is undefined.
  4498. </p>
  4499. <p><var class="var">ld(id)</var> is used to represent the derivative order in <var class="var">expr</var>,
  4500. which means that the given expression will be evaluated multiple times
  4501. with various input values that the expression can access through
  4502. <code class="code">ld(id)</code>. If <var class="var">id</var> is not specified then 0 is assumed.
  4503. </p>
  4504. <p>Note, when you have the derivatives at y instead of 0,
  4505. <code class="code">taylor(expr, x-y)</code> can be used.
  4506. </p>
  4507. </dd>
  4508. <dt><samp class="option">time(0)</samp></dt>
  4509. <dd><p>Return the current (wallclock) time in seconds.
  4510. </p>
  4511. </dd>
  4512. <dt><samp class="option">trunc(expr)</samp></dt>
  4513. <dd><p>Round the value of expression <var class="var">expr</var> towards zero to the nearest
  4514. integer. For example, &quot;trunc(-1.5)&quot; is &quot;-1.0&quot;.
  4515. </p>
  4516. </dd>
  4517. <dt><samp class="option">while(cond, expr)</samp></dt>
  4518. <dd><p>Evaluate expression <var class="var">expr</var> while the expression <var class="var">cond</var> is
  4519. non-zero, and returns the value of the last <var class="var">expr</var> evaluation, or
  4520. NAN if <var class="var">cond</var> was always false.
  4521. </p></dd>
  4522. </dl>
  4523. <p>The following constants are available:
  4524. </p><dl class="table">
  4525. <dt><samp class="option">PI</samp></dt>
  4526. <dd><p>area of the unit disc, approximately 3.14
  4527. </p></dd>
  4528. <dt><samp class="option">E</samp></dt>
  4529. <dd><p>exp(1) (Euler&rsquo;s number), approximately 2.718
  4530. </p></dd>
  4531. <dt><samp class="option">PHI</samp></dt>
  4532. <dd><p>golden ratio (1+sqrt(5))/2, approximately 1.618
  4533. </p></dd>
  4534. </dl>
  4535. <p>Assuming that an expression is considered &quot;true&quot; if it has a non-zero
  4536. value, note that:
  4537. </p>
  4538. <p><code class="code">*</code> works like AND
  4539. </p>
  4540. <p><code class="code">+</code> works like OR
  4541. </p>
  4542. <p>For example the construct:
  4543. </p><div class="example">
  4544. <pre class="example-preformatted">if (A AND B) then C
  4545. </pre></div>
  4546. <p>is equivalent to:
  4547. </p><div class="example">
  4548. <pre class="example-preformatted">if(A*B, C)
  4549. </pre></div>
  4550. <p>In your C code, you can extend the list of unary and binary functions,
  4551. and define recognized constants, so that they are available for your
  4552. expressions.
  4553. </p>
  4554. <p>The evaluator also recognizes the International System unit prefixes.
  4555. If &rsquo;i&rsquo; is appended after the prefix, binary prefixes are used, which
  4556. are based on powers of 1024 instead of powers of 1000.
  4557. The &rsquo;B&rsquo; postfix multiplies the value by 8, and can be appended after a
  4558. unit prefix or used alone. This allows using for example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;,
  4559. &rsquo;G&rsquo; and &rsquo;B&rsquo; as number postfix.
  4560. </p>
  4561. <p>The list of available International System prefixes follows, with
  4562. indication of the corresponding powers of 10 and of 2.
  4563. </p><dl class="table">
  4564. <dt><samp class="option">y</samp></dt>
  4565. <dd><p>10^-24 / 2^-80
  4566. </p></dd>
  4567. <dt><samp class="option">z</samp></dt>
  4568. <dd><p>10^-21 / 2^-70
  4569. </p></dd>
  4570. <dt><samp class="option">a</samp></dt>
  4571. <dd><p>10^-18 / 2^-60
  4572. </p></dd>
  4573. <dt><samp class="option">f</samp></dt>
  4574. <dd><p>10^-15 / 2^-50
  4575. </p></dd>
  4576. <dt><samp class="option">p</samp></dt>
  4577. <dd><p>10^-12 / 2^-40
  4578. </p></dd>
  4579. <dt><samp class="option">n</samp></dt>
  4580. <dd><p>10^-9 / 2^-30
  4581. </p></dd>
  4582. <dt><samp class="option">u</samp></dt>
  4583. <dd><p>10^-6 / 2^-20
  4584. </p></dd>
  4585. <dt><samp class="option">m</samp></dt>
  4586. <dd><p>10^-3 / 2^-10
  4587. </p></dd>
  4588. <dt><samp class="option">c</samp></dt>
  4589. <dd><p>10^-2
  4590. </p></dd>
  4591. <dt><samp class="option">d</samp></dt>
  4592. <dd><p>10^-1
  4593. </p></dd>
  4594. <dt><samp class="option">h</samp></dt>
  4595. <dd><p>10^2
  4596. </p></dd>
  4597. <dt><samp class="option">k</samp></dt>
  4598. <dd><p>10^3 / 2^10
  4599. </p></dd>
  4600. <dt><samp class="option">K</samp></dt>
  4601. <dd><p>10^3 / 2^10
  4602. </p></dd>
  4603. <dt><samp class="option">M</samp></dt>
  4604. <dd><p>10^6 / 2^20
  4605. </p></dd>
  4606. <dt><samp class="option">G</samp></dt>
  4607. <dd><p>10^9 / 2^30
  4608. </p></dd>
  4609. <dt><samp class="option">T</samp></dt>
  4610. <dd><p>10^12 / 2^40
  4611. </p></dd>
  4612. <dt><samp class="option">P</samp></dt>
  4613. <dd><p>10^15 / 2^50
  4614. </p></dd>
  4615. <dt><samp class="option">E</samp></dt>
  4616. <dd><p>10^18 / 2^60
  4617. </p></dd>
  4618. <dt><samp class="option">Z</samp></dt>
  4619. <dd><p>10^21 / 2^70
  4620. </p></dd>
  4621. <dt><samp class="option">Y</samp></dt>
  4622. <dd><p>10^24 / 2^80
  4623. </p></dd>
  4624. </dl>
  4625. <a class="anchor" id="codec_002doptions"></a></div>
  4626. <div class="chapter-level-extent" id="Codec-Options">
  4627. <h2 class="chapter"><span>8 Codec Options<a class="copiable-link" href="#Codec-Options"> &para;</a></span></h2>
  4628. <p>libavcodec provides some generic global options, which can be set on
  4629. all the encoders and decoders. In addition, each codec may support
  4630. so-called private options, which are specific for a given codec.
  4631. </p>
  4632. <p>Sometimes, a global option may only affect a specific kind of codec,
  4633. and may be nonsensical or ignored by another, so you need to be aware
  4634. of the meaning of the specified options. Also some options are
  4635. meant only for decoding or encoding.
  4636. </p>
  4637. <p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the
  4638. FFmpeg tools, or by setting the value explicitly in the
  4639. <code class="code">AVCodecContext</code> options or using the <samp class="file">libavutil/opt.h</samp> API
  4640. for programmatic use.
  4641. </p>
  4642. <p>The list of supported options follow:
  4643. </p>
  4644. <dl class="table">
  4645. <dt><samp class="option">b <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  4646. <dd><p>Set bitrate in bits/s. Default value is 200K.
  4647. </p>
  4648. </dd>
  4649. <dt><samp class="option">ab <var class="var">integer</var> (<em class="emph">encoding,audio</em>)</samp></dt>
  4650. <dd><p>Set audio bitrate (in bits/s). Default value is 128K.
  4651. </p>
  4652. </dd>
  4653. <dt><samp class="option">bt <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4654. <dd><p>Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
  4655. tolerance specifies how far ratecontrol is willing to deviate from the
  4656. target average bitrate value. This is not related to min/max
  4657. bitrate. Lowering tolerance too much has an adverse effect on quality.
  4658. </p>
  4659. </dd>
  4660. <dt><samp class="option">flags <var class="var">flags</var> (<em class="emph">decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  4661. <dd><p>Set generic flags.
  4662. </p>
  4663. <p>Possible values:
  4664. </p><dl class="table">
  4665. <dt>&lsquo;<samp class="samp">mv4</samp>&rsquo;</dt>
  4666. <dd><p>Use four motion vector by macroblock (mpeg4).
  4667. </p></dd>
  4668. <dt>&lsquo;<samp class="samp">qpel</samp>&rsquo;</dt>
  4669. <dd><p>Use 1/4 pel motion compensation.
  4670. </p></dd>
  4671. <dt>&lsquo;<samp class="samp">loop</samp>&rsquo;</dt>
  4672. <dd><p>Use loop filter.
  4673. </p></dd>
  4674. <dt>&lsquo;<samp class="samp">qscale</samp>&rsquo;</dt>
  4675. <dd><p>Use fixed qscale.
  4676. </p></dd>
  4677. <dt>&lsquo;<samp class="samp">pass1</samp>&rsquo;</dt>
  4678. <dd><p>Use internal 2pass ratecontrol in first pass mode.
  4679. </p></dd>
  4680. <dt>&lsquo;<samp class="samp">pass2</samp>&rsquo;</dt>
  4681. <dd><p>Use internal 2pass ratecontrol in second pass mode.
  4682. </p></dd>
  4683. <dt>&lsquo;<samp class="samp">gray</samp>&rsquo;</dt>
  4684. <dd><p>Only decode/encode grayscale.
  4685. </p></dd>
  4686. <dt>&lsquo;<samp class="samp">psnr</samp>&rsquo;</dt>
  4687. <dd><p>Set error[?] variables during encoding.
  4688. </p></dd>
  4689. <dt>&lsquo;<samp class="samp">truncated</samp>&rsquo;</dt>
  4690. <dd><p>Input bitstream might be randomly truncated.
  4691. </p></dd>
  4692. <dt>&lsquo;<samp class="samp">drop_changed</samp>&rsquo;</dt>
  4693. <dd><p>Don&rsquo;t output frames whose parameters differ from first decoded frame in stream.
  4694. Error AVERROR_INPUT_CHANGED is returned when a frame is dropped.
  4695. </p>
  4696. </dd>
  4697. <dt>&lsquo;<samp class="samp">ildct</samp>&rsquo;</dt>
  4698. <dd><p>Use interlaced DCT.
  4699. </p></dd>
  4700. <dt>&lsquo;<samp class="samp">low_delay</samp>&rsquo;</dt>
  4701. <dd><p>Force low delay.
  4702. </p></dd>
  4703. <dt>&lsquo;<samp class="samp">global_header</samp>&rsquo;</dt>
  4704. <dd><p>Place global headers in extradata instead of every keyframe.
  4705. </p></dd>
  4706. <dt>&lsquo;<samp class="samp">bitexact</samp>&rsquo;</dt>
  4707. <dd><p>Only write platform-, build- and time-independent data. (except (I)DCT).
  4708. This ensures that file and data checksums are reproducible and match between
  4709. platforms. Its primary use is for regression testing.
  4710. </p></dd>
  4711. <dt>&lsquo;<samp class="samp">aic</samp>&rsquo;</dt>
  4712. <dd><p>Apply H263 advanced intra coding / mpeg4 ac prediction.
  4713. </p></dd>
  4714. <dt>&lsquo;<samp class="samp">ilme</samp>&rsquo;</dt>
  4715. <dd><p>Apply interlaced motion estimation.
  4716. </p></dd>
  4717. <dt>&lsquo;<samp class="samp">cgop</samp>&rsquo;</dt>
  4718. <dd><p>Use closed gop.
  4719. </p></dd>
  4720. <dt>&lsquo;<samp class="samp">output_corrupt</samp>&rsquo;</dt>
  4721. <dd><p>Output even potentially corrupted frames.
  4722. </p></dd>
  4723. </dl>
  4724. </dd>
  4725. <dt><samp class="option">time_base <var class="var">rational number</var></samp></dt>
  4726. <dd><p>Set codec time base.
  4727. </p>
  4728. <p>It is the fundamental unit of time (in seconds) in terms of which
  4729. frame timestamps are represented. For fixed-fps content, timebase
  4730. should be <code class="code">1 / frame_rate</code> and timestamp increments should be
  4731. identically 1.
  4732. </p>
  4733. </dd>
  4734. <dt><samp class="option">g <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4735. <dd><p>Set the group of picture (GOP) size. Default value is 12.
  4736. </p>
  4737. </dd>
  4738. <dt><samp class="option">ar <var class="var">integer</var> (<em class="emph">decoding/encoding,audio</em>)</samp></dt>
  4739. <dd><p>Set audio sampling rate (in Hz).
  4740. </p>
  4741. </dd>
  4742. <dt><samp class="option">ac <var class="var">integer</var> (<em class="emph">decoding/encoding,audio</em>)</samp></dt>
  4743. <dd><p>Set number of audio channels.
  4744. </p>
  4745. </dd>
  4746. <dt><samp class="option">cutoff <var class="var">integer</var> (<em class="emph">encoding,audio</em>)</samp></dt>
  4747. <dd><p>Set cutoff bandwidth. (Supported only by selected encoders, see
  4748. their respective documentation sections.)
  4749. </p>
  4750. </dd>
  4751. <dt><samp class="option">frame_size <var class="var">integer</var> (<em class="emph">encoding,audio</em>)</samp></dt>
  4752. <dd><p>Set audio frame size.
  4753. </p>
  4754. <p>Each submitted frame except the last must contain exactly frame_size
  4755. samples per channel. May be 0 when the codec has
  4756. CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
  4757. restricted. It is set by some decoders to indicate constant frame
  4758. size.
  4759. </p>
  4760. </dd>
  4761. <dt><samp class="option">frame_number <var class="var">integer</var></samp></dt>
  4762. <dd><p>Set the frame number.
  4763. </p>
  4764. </dd>
  4765. <dt><samp class="option">delay <var class="var">integer</var></samp></dt>
  4766. <dt><samp class="option">qcomp <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4767. <dd><p>Set video quantizer scale compression (VBR). It is used as a constant
  4768. in the ratecontrol equation. Recommended range for default rc_eq:
  4769. 0.0-1.0.
  4770. </p>
  4771. </dd>
  4772. <dt><samp class="option">qblur <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4773. <dd><p>Set video quantizer scale blur (VBR).
  4774. </p>
  4775. </dd>
  4776. <dt><samp class="option">qmin <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4777. <dd><p>Set min video quantizer scale (VBR). Must be included between -1 and
  4778. 69, default value is 2.
  4779. </p>
  4780. </dd>
  4781. <dt><samp class="option">qmax <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4782. <dd><p>Set max video quantizer scale (VBR). Must be included between -1 and
  4783. 1024, default value is 31.
  4784. </p>
  4785. </dd>
  4786. <dt><samp class="option">qdiff <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4787. <dd><p>Set max difference between the quantizer scale (VBR).
  4788. </p>
  4789. </dd>
  4790. <dt><samp class="option">bf <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4791. <dd><p>Set max number of B frames between non-B-frames.
  4792. </p>
  4793. <p>Must be an integer between -1 and 16. 0 means that B-frames are
  4794. disabled. If a value of -1 is used, it will choose an automatic value
  4795. depending on the encoder.
  4796. </p>
  4797. <p>Default value is 0.
  4798. </p>
  4799. </dd>
  4800. <dt><samp class="option">b_qfactor <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4801. <dd><p>Set qp factor between P and B frames.
  4802. </p>
  4803. </dd>
  4804. <dt><samp class="option">codec_tag <var class="var">integer</var></samp></dt>
  4805. <dt><samp class="option">bug <var class="var">flags</var> (<em class="emph">decoding,video</em>)</samp></dt>
  4806. <dd><p>Workaround not auto detected encoder bugs.
  4807. </p>
  4808. <p>Possible values:
  4809. </p><dl class="table">
  4810. <dt>&lsquo;<samp class="samp">autodetect</samp>&rsquo;</dt>
  4811. <dt>&lsquo;<samp class="samp">xvid_ilace</samp>&rsquo;</dt>
  4812. <dd><p>Xvid interlacing bug (autodetected if fourcc==XVIX)
  4813. </p></dd>
  4814. <dt>&lsquo;<samp class="samp">ump4</samp>&rsquo;</dt>
  4815. <dd><p>(autodetected if fourcc==UMP4)
  4816. </p></dd>
  4817. <dt>&lsquo;<samp class="samp">no_padding</samp>&rsquo;</dt>
  4818. <dd><p>padding bug (autodetected)
  4819. </p></dd>
  4820. <dt>&lsquo;<samp class="samp">amv</samp>&rsquo;</dt>
  4821. <dt>&lsquo;<samp class="samp">qpel_chroma</samp>&rsquo;</dt>
  4822. <dt>&lsquo;<samp class="samp">std_qpel</samp>&rsquo;</dt>
  4823. <dd><p>old standard qpel (autodetected per fourcc/version)
  4824. </p></dd>
  4825. <dt>&lsquo;<samp class="samp">qpel_chroma2</samp>&rsquo;</dt>
  4826. <dt>&lsquo;<samp class="samp">direct_blocksize</samp>&rsquo;</dt>
  4827. <dd><p>direct-qpel-blocksize bug (autodetected per fourcc/version)
  4828. </p></dd>
  4829. <dt>&lsquo;<samp class="samp">edge</samp>&rsquo;</dt>
  4830. <dd><p>edge padding bug (autodetected per fourcc/version)
  4831. </p></dd>
  4832. <dt>&lsquo;<samp class="samp">hpel_chroma</samp>&rsquo;</dt>
  4833. <dt>&lsquo;<samp class="samp">dc_clip</samp>&rsquo;</dt>
  4834. <dt>&lsquo;<samp class="samp">ms</samp>&rsquo;</dt>
  4835. <dd><p>Workaround various bugs in microsoft broken decoders.
  4836. </p></dd>
  4837. <dt>&lsquo;<samp class="samp">trunc</samp>&rsquo;</dt>
  4838. <dd><p>trancated frames
  4839. </p></dd>
  4840. </dl>
  4841. </dd>
  4842. <dt><samp class="option">strict <var class="var">integer</var> (<em class="emph">decoding/encoding,audio,video</em>)</samp></dt>
  4843. <dd><p>Specify how strictly to follow the standards.
  4844. </p>
  4845. <p>Possible values:
  4846. </p><dl class="table">
  4847. <dt>&lsquo;<samp class="samp">very</samp>&rsquo;</dt>
  4848. <dd><p>strictly conform to an older more strict version of the spec or reference software
  4849. </p></dd>
  4850. <dt>&lsquo;<samp class="samp">strict</samp>&rsquo;</dt>
  4851. <dd><p>strictly conform to all the things in the spec no matter what consequences
  4852. </p></dd>
  4853. <dt>&lsquo;<samp class="samp">normal</samp>&rsquo;</dt>
  4854. <dt>&lsquo;<samp class="samp">unofficial</samp>&rsquo;</dt>
  4855. <dd><p>allow unofficial extensions
  4856. </p></dd>
  4857. <dt>&lsquo;<samp class="samp">experimental</samp>&rsquo;</dt>
  4858. <dd><p>allow non standardized experimental things, experimental
  4859. (unfinished/work in progress/not well tested) decoders and encoders.
  4860. Note: experimental decoders can pose a security risk, do not use this for
  4861. decoding untrusted input.
  4862. </p></dd>
  4863. </dl>
  4864. </dd>
  4865. <dt><samp class="option">b_qoffset <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4866. <dd><p>Set QP offset between P and B frames.
  4867. </p>
  4868. </dd>
  4869. <dt><samp class="option">err_detect <var class="var">flags</var> (<em class="emph">decoding,audio,video</em>)</samp></dt>
  4870. <dd><p>Set error detection flags.
  4871. </p>
  4872. <p>Possible values:
  4873. </p><dl class="table">
  4874. <dt>&lsquo;<samp class="samp">crccheck</samp>&rsquo;</dt>
  4875. <dd><p>verify embedded CRCs
  4876. </p></dd>
  4877. <dt>&lsquo;<samp class="samp">bitstream</samp>&rsquo;</dt>
  4878. <dd><p>detect bitstream specification deviations
  4879. </p></dd>
  4880. <dt>&lsquo;<samp class="samp">buffer</samp>&rsquo;</dt>
  4881. <dd><p>detect improper bitstream length
  4882. </p></dd>
  4883. <dt>&lsquo;<samp class="samp">explode</samp>&rsquo;</dt>
  4884. <dd><p>abort decoding on minor error detection
  4885. </p></dd>
  4886. <dt>&lsquo;<samp class="samp">ignore_err</samp>&rsquo;</dt>
  4887. <dd><p>ignore decoding errors, and continue decoding.
  4888. This is useful if you want to analyze the content of a video and thus want
  4889. everything to be decoded no matter what. This option will not result in a video
  4890. that is pleasing to watch in case of errors.
  4891. </p></dd>
  4892. <dt>&lsquo;<samp class="samp">careful</samp>&rsquo;</dt>
  4893. <dd><p>consider things that violate the spec and have not been seen in the wild as errors
  4894. </p></dd>
  4895. <dt>&lsquo;<samp class="samp">compliant</samp>&rsquo;</dt>
  4896. <dd><p>consider all spec non compliancies as errors
  4897. </p></dd>
  4898. <dt>&lsquo;<samp class="samp">aggressive</samp>&rsquo;</dt>
  4899. <dd><p>consider things that a sane encoder should not do as an error
  4900. </p></dd>
  4901. </dl>
  4902. </dd>
  4903. <dt><samp class="option">has_b_frames <var class="var">integer</var></samp></dt>
  4904. <dt><samp class="option">block_align <var class="var">integer</var></samp></dt>
  4905. <dt><samp class="option">rc_override_count <var class="var">integer</var></samp></dt>
  4906. <dt><samp class="option">maxrate <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  4907. <dd><p>Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
  4908. </p>
  4909. </dd>
  4910. <dt><samp class="option">minrate <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  4911. <dd><p>Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
  4912. encode. It is of little use elsewise.
  4913. </p>
  4914. </dd>
  4915. <dt><samp class="option">bufsize <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  4916. <dd><p>Set ratecontrol buffer size (in bits).
  4917. </p>
  4918. </dd>
  4919. <dt><samp class="option">i_qfactor <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4920. <dd><p>Set QP factor between P and I frames.
  4921. </p>
  4922. </dd>
  4923. <dt><samp class="option">i_qoffset <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4924. <dd><p>Set QP offset between P and I frames.
  4925. </p>
  4926. </dd>
  4927. <dt><samp class="option">dct <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4928. <dd><p>Set DCT algorithm.
  4929. </p>
  4930. <p>Possible values:
  4931. </p><dl class="table">
  4932. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  4933. <dd><p>autoselect a good one (default)
  4934. </p></dd>
  4935. <dt>&lsquo;<samp class="samp">fastint</samp>&rsquo;</dt>
  4936. <dd><p>fast integer
  4937. </p></dd>
  4938. <dt>&lsquo;<samp class="samp">int</samp>&rsquo;</dt>
  4939. <dd><p>accurate integer
  4940. </p></dd>
  4941. <dt>&lsquo;<samp class="samp">mmx</samp>&rsquo;</dt>
  4942. <dt>&lsquo;<samp class="samp">altivec</samp>&rsquo;</dt>
  4943. <dt>&lsquo;<samp class="samp">faan</samp>&rsquo;</dt>
  4944. <dd><p>floating point AAN DCT
  4945. </p></dd>
  4946. </dl>
  4947. </dd>
  4948. <dt><samp class="option">lumi_mask <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4949. <dd><p>Compress bright areas stronger than medium ones.
  4950. </p>
  4951. </dd>
  4952. <dt><samp class="option">tcplx_mask <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4953. <dd><p>Set temporal complexity masking.
  4954. </p>
  4955. </dd>
  4956. <dt><samp class="option">scplx_mask <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4957. <dd><p>Set spatial complexity masking.
  4958. </p>
  4959. </dd>
  4960. <dt><samp class="option">p_mask <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4961. <dd><p>Set inter masking.
  4962. </p>
  4963. </dd>
  4964. <dt><samp class="option">dark_mask <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  4965. <dd><p>Compress dark areas stronger than medium ones.
  4966. </p>
  4967. </dd>
  4968. <dt><samp class="option">idct <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  4969. <dd><p>Select IDCT implementation.
  4970. </p>
  4971. <p>Possible values:
  4972. </p><dl class="table">
  4973. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  4974. <dt>&lsquo;<samp class="samp">int</samp>&rsquo;</dt>
  4975. <dt>&lsquo;<samp class="samp">simple</samp>&rsquo;</dt>
  4976. <dt>&lsquo;<samp class="samp">simplemmx</samp>&rsquo;</dt>
  4977. <dt>&lsquo;<samp class="samp">simpleauto</samp>&rsquo;</dt>
  4978. <dd><p>Automatically pick a IDCT compatible with the simple one
  4979. </p>
  4980. </dd>
  4981. <dt>&lsquo;<samp class="samp">arm</samp>&rsquo;</dt>
  4982. <dt>&lsquo;<samp class="samp">altivec</samp>&rsquo;</dt>
  4983. <dt>&lsquo;<samp class="samp">sh4</samp>&rsquo;</dt>
  4984. <dt>&lsquo;<samp class="samp">simplearm</samp>&rsquo;</dt>
  4985. <dt>&lsquo;<samp class="samp">simplearmv5te</samp>&rsquo;</dt>
  4986. <dt>&lsquo;<samp class="samp">simplearmv6</samp>&rsquo;</dt>
  4987. <dt>&lsquo;<samp class="samp">simpleneon</samp>&rsquo;</dt>
  4988. <dt>&lsquo;<samp class="samp">xvid</samp>&rsquo;</dt>
  4989. <dt>&lsquo;<samp class="samp">faani</samp>&rsquo;</dt>
  4990. <dd><p>floating point AAN IDCT
  4991. </p></dd>
  4992. </dl>
  4993. </dd>
  4994. <dt><samp class="option">slice_count <var class="var">integer</var></samp></dt>
  4995. <dt><samp class="option">ec <var class="var">flags</var> (<em class="emph">decoding,video</em>)</samp></dt>
  4996. <dd><p>Set error concealment strategy.
  4997. </p>
  4998. <p>Possible values:
  4999. </p><dl class="table">
  5000. <dt>&lsquo;<samp class="samp">guess_mvs</samp>&rsquo;</dt>
  5001. <dd><p>iterative motion vector (MV) search (slow)
  5002. </p></dd>
  5003. <dt>&lsquo;<samp class="samp">deblock</samp>&rsquo;</dt>
  5004. <dd><p>use strong deblock filter for damaged MBs
  5005. </p></dd>
  5006. <dt>&lsquo;<samp class="samp">favor_inter</samp>&rsquo;</dt>
  5007. <dd><p>favor predicting from the previous frame instead of the current
  5008. </p></dd>
  5009. </dl>
  5010. </dd>
  5011. <dt><samp class="option">bits_per_coded_sample <var class="var">integer</var></samp></dt>
  5012. <dt><samp class="option">aspect <var class="var">rational number</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5013. <dd><p>Set sample aspect ratio.
  5014. </p>
  5015. </dd>
  5016. <dt><samp class="option">sar <var class="var">rational number</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5017. <dd><p>Set sample aspect ratio. Alias to <var class="var">aspect</var>.
  5018. </p>
  5019. </dd>
  5020. <dt><samp class="option">debug <var class="var">flags</var> (<em class="emph">decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  5021. <dd><p>Print specific debug info.
  5022. </p>
  5023. <p>Possible values:
  5024. </p><dl class="table">
  5025. <dt>&lsquo;<samp class="samp">pict</samp>&rsquo;</dt>
  5026. <dd><p>picture info
  5027. </p></dd>
  5028. <dt>&lsquo;<samp class="samp">rc</samp>&rsquo;</dt>
  5029. <dd><p>rate control
  5030. </p></dd>
  5031. <dt>&lsquo;<samp class="samp">bitstream</samp>&rsquo;</dt>
  5032. <dt>&lsquo;<samp class="samp">mb_type</samp>&rsquo;</dt>
  5033. <dd><p>macroblock (MB) type
  5034. </p></dd>
  5035. <dt>&lsquo;<samp class="samp">qp</samp>&rsquo;</dt>
  5036. <dd><p>per-block quantization parameter (QP)
  5037. </p></dd>
  5038. <dt>&lsquo;<samp class="samp">dct_coeff</samp>&rsquo;</dt>
  5039. <dt>&lsquo;<samp class="samp">green_metadata</samp>&rsquo;</dt>
  5040. <dd><p>display complexity metadata for the upcoming frame, GoP or for a given duration.
  5041. </p>
  5042. </dd>
  5043. <dt>&lsquo;<samp class="samp">skip</samp>&rsquo;</dt>
  5044. <dt>&lsquo;<samp class="samp">startcode</samp>&rsquo;</dt>
  5045. <dt>&lsquo;<samp class="samp">er</samp>&rsquo;</dt>
  5046. <dd><p>error recognition
  5047. </p></dd>
  5048. <dt>&lsquo;<samp class="samp">mmco</samp>&rsquo;</dt>
  5049. <dd><p>memory management control operations (H.264)
  5050. </p></dd>
  5051. <dt>&lsquo;<samp class="samp">bugs</samp>&rsquo;</dt>
  5052. <dt>&lsquo;<samp class="samp">buffers</samp>&rsquo;</dt>
  5053. <dd><p>picture buffer allocations
  5054. </p></dd>
  5055. <dt>&lsquo;<samp class="samp">thread_ops</samp>&rsquo;</dt>
  5056. <dd><p>threading operations
  5057. </p></dd>
  5058. <dt>&lsquo;<samp class="samp">nomc</samp>&rsquo;</dt>
  5059. <dd><p>skip motion compensation
  5060. </p></dd>
  5061. </dl>
  5062. </dd>
  5063. <dt><samp class="option">cmp <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5064. <dd><p>Set full pel me compare function.
  5065. </p>
  5066. <p>Possible values:
  5067. </p><dl class="table">
  5068. <dt>&lsquo;<samp class="samp">sad</samp>&rsquo;</dt>
  5069. <dd><p>sum of absolute differences, fast (default)
  5070. </p></dd>
  5071. <dt>&lsquo;<samp class="samp">sse</samp>&rsquo;</dt>
  5072. <dd><p>sum of squared errors
  5073. </p></dd>
  5074. <dt>&lsquo;<samp class="samp">satd</samp>&rsquo;</dt>
  5075. <dd><p>sum of absolute Hadamard transformed differences
  5076. </p></dd>
  5077. <dt>&lsquo;<samp class="samp">dct</samp>&rsquo;</dt>
  5078. <dd><p>sum of absolute DCT transformed differences
  5079. </p></dd>
  5080. <dt>&lsquo;<samp class="samp">psnr</samp>&rsquo;</dt>
  5081. <dd><p>sum of squared quantization errors (avoid, low quality)
  5082. </p></dd>
  5083. <dt>&lsquo;<samp class="samp">bit</samp>&rsquo;</dt>
  5084. <dd><p>number of bits needed for the block
  5085. </p></dd>
  5086. <dt>&lsquo;<samp class="samp">rd</samp>&rsquo;</dt>
  5087. <dd><p>rate distortion optimal, slow
  5088. </p></dd>
  5089. <dt>&lsquo;<samp class="samp">zero</samp>&rsquo;</dt>
  5090. <dd><p>0
  5091. </p></dd>
  5092. <dt>&lsquo;<samp class="samp">vsad</samp>&rsquo;</dt>
  5093. <dd><p>sum of absolute vertical differences
  5094. </p></dd>
  5095. <dt>&lsquo;<samp class="samp">vsse</samp>&rsquo;</dt>
  5096. <dd><p>sum of squared vertical differences
  5097. </p></dd>
  5098. <dt>&lsquo;<samp class="samp">nsse</samp>&rsquo;</dt>
  5099. <dd><p>noise preserving sum of squared differences
  5100. </p></dd>
  5101. <dt>&lsquo;<samp class="samp">w53</samp>&rsquo;</dt>
  5102. <dd><p>5/3 wavelet, only used in snow
  5103. </p></dd>
  5104. <dt>&lsquo;<samp class="samp">w97</samp>&rsquo;</dt>
  5105. <dd><p>9/7 wavelet, only used in snow
  5106. </p></dd>
  5107. <dt>&lsquo;<samp class="samp">dctmax</samp>&rsquo;</dt>
  5108. <dt>&lsquo;<samp class="samp">chroma</samp>&rsquo;</dt>
  5109. </dl>
  5110. </dd>
  5111. <dt><samp class="option">subcmp <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5112. <dd><p>Set sub pel me compare function.
  5113. </p>
  5114. <p>Possible values:
  5115. </p><dl class="table">
  5116. <dt>&lsquo;<samp class="samp">sad</samp>&rsquo;</dt>
  5117. <dd><p>sum of absolute differences, fast (default)
  5118. </p></dd>
  5119. <dt>&lsquo;<samp class="samp">sse</samp>&rsquo;</dt>
  5120. <dd><p>sum of squared errors
  5121. </p></dd>
  5122. <dt>&lsquo;<samp class="samp">satd</samp>&rsquo;</dt>
  5123. <dd><p>sum of absolute Hadamard transformed differences
  5124. </p></dd>
  5125. <dt>&lsquo;<samp class="samp">dct</samp>&rsquo;</dt>
  5126. <dd><p>sum of absolute DCT transformed differences
  5127. </p></dd>
  5128. <dt>&lsquo;<samp class="samp">psnr</samp>&rsquo;</dt>
  5129. <dd><p>sum of squared quantization errors (avoid, low quality)
  5130. </p></dd>
  5131. <dt>&lsquo;<samp class="samp">bit</samp>&rsquo;</dt>
  5132. <dd><p>number of bits needed for the block
  5133. </p></dd>
  5134. <dt>&lsquo;<samp class="samp">rd</samp>&rsquo;</dt>
  5135. <dd><p>rate distortion optimal, slow
  5136. </p></dd>
  5137. <dt>&lsquo;<samp class="samp">zero</samp>&rsquo;</dt>
  5138. <dd><p>0
  5139. </p></dd>
  5140. <dt>&lsquo;<samp class="samp">vsad</samp>&rsquo;</dt>
  5141. <dd><p>sum of absolute vertical differences
  5142. </p></dd>
  5143. <dt>&lsquo;<samp class="samp">vsse</samp>&rsquo;</dt>
  5144. <dd><p>sum of squared vertical differences
  5145. </p></dd>
  5146. <dt>&lsquo;<samp class="samp">nsse</samp>&rsquo;</dt>
  5147. <dd><p>noise preserving sum of squared differences
  5148. </p></dd>
  5149. <dt>&lsquo;<samp class="samp">w53</samp>&rsquo;</dt>
  5150. <dd><p>5/3 wavelet, only used in snow
  5151. </p></dd>
  5152. <dt>&lsquo;<samp class="samp">w97</samp>&rsquo;</dt>
  5153. <dd><p>9/7 wavelet, only used in snow
  5154. </p></dd>
  5155. <dt>&lsquo;<samp class="samp">dctmax</samp>&rsquo;</dt>
  5156. <dt>&lsquo;<samp class="samp">chroma</samp>&rsquo;</dt>
  5157. </dl>
  5158. </dd>
  5159. <dt><samp class="option">mbcmp <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5160. <dd><p>Set macroblock compare function.
  5161. </p>
  5162. <p>Possible values:
  5163. </p><dl class="table">
  5164. <dt>&lsquo;<samp class="samp">sad</samp>&rsquo;</dt>
  5165. <dd><p>sum of absolute differences, fast (default)
  5166. </p></dd>
  5167. <dt>&lsquo;<samp class="samp">sse</samp>&rsquo;</dt>
  5168. <dd><p>sum of squared errors
  5169. </p></dd>
  5170. <dt>&lsquo;<samp class="samp">satd</samp>&rsquo;</dt>
  5171. <dd><p>sum of absolute Hadamard transformed differences
  5172. </p></dd>
  5173. <dt>&lsquo;<samp class="samp">dct</samp>&rsquo;</dt>
  5174. <dd><p>sum of absolute DCT transformed differences
  5175. </p></dd>
  5176. <dt>&lsquo;<samp class="samp">psnr</samp>&rsquo;</dt>
  5177. <dd><p>sum of squared quantization errors (avoid, low quality)
  5178. </p></dd>
  5179. <dt>&lsquo;<samp class="samp">bit</samp>&rsquo;</dt>
  5180. <dd><p>number of bits needed for the block
  5181. </p></dd>
  5182. <dt>&lsquo;<samp class="samp">rd</samp>&rsquo;</dt>
  5183. <dd><p>rate distortion optimal, slow
  5184. </p></dd>
  5185. <dt>&lsquo;<samp class="samp">zero</samp>&rsquo;</dt>
  5186. <dd><p>0
  5187. </p></dd>
  5188. <dt>&lsquo;<samp class="samp">vsad</samp>&rsquo;</dt>
  5189. <dd><p>sum of absolute vertical differences
  5190. </p></dd>
  5191. <dt>&lsquo;<samp class="samp">vsse</samp>&rsquo;</dt>
  5192. <dd><p>sum of squared vertical differences
  5193. </p></dd>
  5194. <dt>&lsquo;<samp class="samp">nsse</samp>&rsquo;</dt>
  5195. <dd><p>noise preserving sum of squared differences
  5196. </p></dd>
  5197. <dt>&lsquo;<samp class="samp">w53</samp>&rsquo;</dt>
  5198. <dd><p>5/3 wavelet, only used in snow
  5199. </p></dd>
  5200. <dt>&lsquo;<samp class="samp">w97</samp>&rsquo;</dt>
  5201. <dd><p>9/7 wavelet, only used in snow
  5202. </p></dd>
  5203. <dt>&lsquo;<samp class="samp">dctmax</samp>&rsquo;</dt>
  5204. <dt>&lsquo;<samp class="samp">chroma</samp>&rsquo;</dt>
  5205. </dl>
  5206. </dd>
  5207. <dt><samp class="option">ildctcmp <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5208. <dd><p>Set interlaced dct compare function.
  5209. </p>
  5210. <p>Possible values:
  5211. </p><dl class="table">
  5212. <dt>&lsquo;<samp class="samp">sad</samp>&rsquo;</dt>
  5213. <dd><p>sum of absolute differences, fast (default)
  5214. </p></dd>
  5215. <dt>&lsquo;<samp class="samp">sse</samp>&rsquo;</dt>
  5216. <dd><p>sum of squared errors
  5217. </p></dd>
  5218. <dt>&lsquo;<samp class="samp">satd</samp>&rsquo;</dt>
  5219. <dd><p>sum of absolute Hadamard transformed differences
  5220. </p></dd>
  5221. <dt>&lsquo;<samp class="samp">dct</samp>&rsquo;</dt>
  5222. <dd><p>sum of absolute DCT transformed differences
  5223. </p></dd>
  5224. <dt>&lsquo;<samp class="samp">psnr</samp>&rsquo;</dt>
  5225. <dd><p>sum of squared quantization errors (avoid, low quality)
  5226. </p></dd>
  5227. <dt>&lsquo;<samp class="samp">bit</samp>&rsquo;</dt>
  5228. <dd><p>number of bits needed for the block
  5229. </p></dd>
  5230. <dt>&lsquo;<samp class="samp">rd</samp>&rsquo;</dt>
  5231. <dd><p>rate distortion optimal, slow
  5232. </p></dd>
  5233. <dt>&lsquo;<samp class="samp">zero</samp>&rsquo;</dt>
  5234. <dd><p>0
  5235. </p></dd>
  5236. <dt>&lsquo;<samp class="samp">vsad</samp>&rsquo;</dt>
  5237. <dd><p>sum of absolute vertical differences
  5238. </p></dd>
  5239. <dt>&lsquo;<samp class="samp">vsse</samp>&rsquo;</dt>
  5240. <dd><p>sum of squared vertical differences
  5241. </p></dd>
  5242. <dt>&lsquo;<samp class="samp">nsse</samp>&rsquo;</dt>
  5243. <dd><p>noise preserving sum of squared differences
  5244. </p></dd>
  5245. <dt>&lsquo;<samp class="samp">w53</samp>&rsquo;</dt>
  5246. <dd><p>5/3 wavelet, only used in snow
  5247. </p></dd>
  5248. <dt>&lsquo;<samp class="samp">w97</samp>&rsquo;</dt>
  5249. <dd><p>9/7 wavelet, only used in snow
  5250. </p></dd>
  5251. <dt>&lsquo;<samp class="samp">dctmax</samp>&rsquo;</dt>
  5252. <dt>&lsquo;<samp class="samp">chroma</samp>&rsquo;</dt>
  5253. </dl>
  5254. </dd>
  5255. <dt><samp class="option">dia_size <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5256. <dd><p>Set diamond type &amp; size for motion estimation.
  5257. </p><dl class="table">
  5258. <dt>&lsquo;<samp class="samp">(1024, INT_MAX)</samp>&rsquo;</dt>
  5259. <dd><p>full motion estimation(slowest)
  5260. </p></dd>
  5261. <dt>&lsquo;<samp class="samp">(768, 1024]</samp>&rsquo;</dt>
  5262. <dd><p>umh motion estimation
  5263. </p></dd>
  5264. <dt>&lsquo;<samp class="samp">(512, 768]</samp>&rsquo;</dt>
  5265. <dd><p>hex motion estimation
  5266. </p></dd>
  5267. <dt>&lsquo;<samp class="samp">(256, 512]</samp>&rsquo;</dt>
  5268. <dd><p>l2s diamond motion estimation
  5269. </p></dd>
  5270. <dt>&lsquo;<samp class="samp">[2,256]</samp>&rsquo;</dt>
  5271. <dd><p>var diamond motion estimation
  5272. </p></dd>
  5273. <dt>&lsquo;<samp class="samp">(-1, 2)</samp>&rsquo;</dt>
  5274. <dd><p>small diamond motion estimation
  5275. </p></dd>
  5276. <dt>&lsquo;<samp class="samp">-1</samp>&rsquo;</dt>
  5277. <dd><p>funny diamond motion estimation
  5278. </p></dd>
  5279. <dt>&lsquo;<samp class="samp">(INT_MIN, -1)</samp>&rsquo;</dt>
  5280. <dd><p>sab diamond motion estimation
  5281. </p></dd>
  5282. </dl>
  5283. </dd>
  5284. <dt><samp class="option">last_pred <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5285. <dd><p>Set amount of motion predictors from the previous frame.
  5286. </p>
  5287. </dd>
  5288. <dt><samp class="option">precmp <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5289. <dd><p>Set pre motion estimation compare function.
  5290. </p>
  5291. <p>Possible values:
  5292. </p><dl class="table">
  5293. <dt>&lsquo;<samp class="samp">sad</samp>&rsquo;</dt>
  5294. <dd><p>sum of absolute differences, fast (default)
  5295. </p></dd>
  5296. <dt>&lsquo;<samp class="samp">sse</samp>&rsquo;</dt>
  5297. <dd><p>sum of squared errors
  5298. </p></dd>
  5299. <dt>&lsquo;<samp class="samp">satd</samp>&rsquo;</dt>
  5300. <dd><p>sum of absolute Hadamard transformed differences
  5301. </p></dd>
  5302. <dt>&lsquo;<samp class="samp">dct</samp>&rsquo;</dt>
  5303. <dd><p>sum of absolute DCT transformed differences
  5304. </p></dd>
  5305. <dt>&lsquo;<samp class="samp">psnr</samp>&rsquo;</dt>
  5306. <dd><p>sum of squared quantization errors (avoid, low quality)
  5307. </p></dd>
  5308. <dt>&lsquo;<samp class="samp">bit</samp>&rsquo;</dt>
  5309. <dd><p>number of bits needed for the block
  5310. </p></dd>
  5311. <dt>&lsquo;<samp class="samp">rd</samp>&rsquo;</dt>
  5312. <dd><p>rate distortion optimal, slow
  5313. </p></dd>
  5314. <dt>&lsquo;<samp class="samp">zero</samp>&rsquo;</dt>
  5315. <dd><p>0
  5316. </p></dd>
  5317. <dt>&lsquo;<samp class="samp">vsad</samp>&rsquo;</dt>
  5318. <dd><p>sum of absolute vertical differences
  5319. </p></dd>
  5320. <dt>&lsquo;<samp class="samp">vsse</samp>&rsquo;</dt>
  5321. <dd><p>sum of squared vertical differences
  5322. </p></dd>
  5323. <dt>&lsquo;<samp class="samp">nsse</samp>&rsquo;</dt>
  5324. <dd><p>noise preserving sum of squared differences
  5325. </p></dd>
  5326. <dt>&lsquo;<samp class="samp">w53</samp>&rsquo;</dt>
  5327. <dd><p>5/3 wavelet, only used in snow
  5328. </p></dd>
  5329. <dt>&lsquo;<samp class="samp">w97</samp>&rsquo;</dt>
  5330. <dd><p>9/7 wavelet, only used in snow
  5331. </p></dd>
  5332. <dt>&lsquo;<samp class="samp">dctmax</samp>&rsquo;</dt>
  5333. <dt>&lsquo;<samp class="samp">chroma</samp>&rsquo;</dt>
  5334. </dl>
  5335. </dd>
  5336. <dt><samp class="option">pre_dia_size <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5337. <dd><p>Set diamond type &amp; size for motion estimation pre-pass.
  5338. </p>
  5339. </dd>
  5340. <dt><samp class="option">subq <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5341. <dd><p>Set sub pel motion estimation quality.
  5342. </p>
  5343. </dd>
  5344. <dt><samp class="option">me_range <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5345. <dd><p>Set limit motion vectors range (1023 for DivX player).
  5346. </p>
  5347. </dd>
  5348. <dt><samp class="option">global_quality <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  5349. <dt><samp class="option">slice_flags <var class="var">integer</var></samp></dt>
  5350. <dt><samp class="option">mbd <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5351. <dd><p>Set macroblock decision algorithm (high quality mode).
  5352. </p>
  5353. <p>Possible values:
  5354. </p><dl class="table">
  5355. <dt>&lsquo;<samp class="samp">simple</samp>&rsquo;</dt>
  5356. <dd><p>use mbcmp (default)
  5357. </p></dd>
  5358. <dt>&lsquo;<samp class="samp">bits</samp>&rsquo;</dt>
  5359. <dd><p>use fewest bits
  5360. </p></dd>
  5361. <dt>&lsquo;<samp class="samp">rd</samp>&rsquo;</dt>
  5362. <dd><p>use best rate distortion
  5363. </p></dd>
  5364. </dl>
  5365. </dd>
  5366. <dt><samp class="option">rc_init_occupancy <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5367. <dd><p>Set number of bits which should be loaded into the rc buffer before
  5368. decoding starts.
  5369. </p>
  5370. </dd>
  5371. <dt><samp class="option">flags2 <var class="var">flags</var> (<em class="emph">decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  5372. <dd>
  5373. <p>Possible values:
  5374. </p><dl class="table">
  5375. <dt>&lsquo;<samp class="samp">fast</samp>&rsquo;</dt>
  5376. <dd><p>Allow non spec compliant speedup tricks.
  5377. </p></dd>
  5378. <dt>&lsquo;<samp class="samp">noout</samp>&rsquo;</dt>
  5379. <dd><p>Skip bitstream encoding.
  5380. </p></dd>
  5381. <dt>&lsquo;<samp class="samp">ignorecrop</samp>&rsquo;</dt>
  5382. <dd><p>Ignore cropping information from sps.
  5383. </p></dd>
  5384. <dt>&lsquo;<samp class="samp">local_header</samp>&rsquo;</dt>
  5385. <dd><p>Place global headers at every keyframe instead of in extradata.
  5386. </p></dd>
  5387. <dt>&lsquo;<samp class="samp">chunks</samp>&rsquo;</dt>
  5388. <dd><p>Frame data might be split into multiple chunks.
  5389. </p></dd>
  5390. <dt>&lsquo;<samp class="samp">showall</samp>&rsquo;</dt>
  5391. <dd><p>Show all frames before the first keyframe.
  5392. </p></dd>
  5393. <dt>&lsquo;<samp class="samp">export_mvs</samp>&rsquo;</dt>
  5394. <dd><p>Export motion vectors into frame side-data (see <code class="code">AV_FRAME_DATA_MOTION_VECTORS</code>)
  5395. for codecs that support it. See also <samp class="file">doc/examples/export_mvs.c</samp>.
  5396. </p></dd>
  5397. <dt>&lsquo;<samp class="samp">skip_manual</samp>&rsquo;</dt>
  5398. <dd><p>Do not skip samples and export skip information as frame side data.
  5399. </p></dd>
  5400. <dt>&lsquo;<samp class="samp">ass_ro_flush_noop</samp>&rsquo;</dt>
  5401. <dd><p>Do not reset ASS ReadOrder field on flush.
  5402. </p></dd>
  5403. <dt>&lsquo;<samp class="samp">icc_profiles</samp>&rsquo;</dt>
  5404. <dd><p>Generate/parse embedded ICC profiles from/to colorimetry tags.
  5405. </p></dd>
  5406. </dl>
  5407. </dd>
  5408. <dt><samp class="option">export_side_data <var class="var">flags</var> (<em class="emph">decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  5409. <dd>
  5410. <p>Possible values:
  5411. </p><dl class="table">
  5412. <dt>&lsquo;<samp class="samp">mvs</samp>&rsquo;</dt>
  5413. <dd><p>Export motion vectors into frame side-data (see <code class="code">AV_FRAME_DATA_MOTION_VECTORS</code>)
  5414. for codecs that support it. See also <samp class="file">doc/examples/export_mvs.c</samp>.
  5415. </p></dd>
  5416. <dt>&lsquo;<samp class="samp">prft</samp>&rsquo;</dt>
  5417. <dd><p>Export encoder Producer Reference Time into packet side-data (see <code class="code">AV_PKT_DATA_PRFT</code>)
  5418. for codecs that support it.
  5419. </p></dd>
  5420. <dt>&lsquo;<samp class="samp">venc_params</samp>&rsquo;</dt>
  5421. <dd><p>Export video encoding parameters through frame side data (see <code class="code">AV_FRAME_DATA_VIDEO_ENC_PARAMS</code>)
  5422. for codecs that support it. At present, those are H.264 and VP9.
  5423. </p></dd>
  5424. <dt>&lsquo;<samp class="samp">film_grain</samp>&rsquo;</dt>
  5425. <dd><p>Export film grain parameters through frame side data (see <code class="code">AV_FRAME_DATA_FILM_GRAIN_PARAMS</code>).
  5426. Supported at present by AV1 decoders.
  5427. </p></dd>
  5428. </dl>
  5429. </dd>
  5430. <dt><samp class="option">threads <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5431. <dd><p>Set the number of threads to be used, in case the selected codec
  5432. implementation supports multi-threading.
  5433. </p>
  5434. <p>Possible values:
  5435. </p><dl class="table">
  5436. <dt>&lsquo;<samp class="samp">auto, 0</samp>&rsquo;</dt>
  5437. <dd><p>automatically select the number of threads to set
  5438. </p></dd>
  5439. </dl>
  5440. <p>Default value is &lsquo;<samp class="samp">auto</samp>&rsquo;.
  5441. </p>
  5442. </dd>
  5443. <dt><samp class="option">dc <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5444. <dd><p>Set intra_dc_precision.
  5445. </p>
  5446. </dd>
  5447. <dt><samp class="option">nssew <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5448. <dd><p>Set nsse weight.
  5449. </p>
  5450. </dd>
  5451. <dt><samp class="option">skip_top <var class="var">integer</var> (<em class="emph">decoding,video</em>)</samp></dt>
  5452. <dd><p>Set number of macroblock rows at the top which are skipped.
  5453. </p>
  5454. </dd>
  5455. <dt><samp class="option">skip_bottom <var class="var">integer</var> (<em class="emph">decoding,video</em>)</samp></dt>
  5456. <dd><p>Set number of macroblock rows at the bottom which are skipped.
  5457. </p>
  5458. </dd>
  5459. <dt><samp class="option">profile <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  5460. <dd>
  5461. <p>Set encoder codec profile. Default value is &lsquo;<samp class="samp">unknown</samp>&rsquo;. Encoder specific
  5462. profiles are documented in the relevant encoder documentation.
  5463. </p>
  5464. </dd>
  5465. <dt><samp class="option">level <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  5466. <dd>
  5467. <p>Set the encoder level. This level depends on the specific codec, and
  5468. might correspond to the profile level. It is set by default to
  5469. &lsquo;<samp class="samp">unknown</samp>&rsquo;.
  5470. </p>
  5471. <p>Possible values:
  5472. </p><dl class="table">
  5473. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  5474. </dl>
  5475. </dd>
  5476. <dt><samp class="option">lowres <var class="var">integer</var> (<em class="emph">decoding,audio,video</em>)</samp></dt>
  5477. <dd><p>Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
  5478. </p>
  5479. </dd>
  5480. <dt><samp class="option">mblmin <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5481. <dd><p>Set min macroblock lagrange factor (VBR).
  5482. </p>
  5483. </dd>
  5484. <dt><samp class="option">mblmax <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5485. <dd><p>Set max macroblock lagrange factor (VBR).
  5486. </p>
  5487. </dd>
  5488. <dt><samp class="option">skip_loop_filter <var class="var">integer</var> (<em class="emph">decoding,video</em>)</samp></dt>
  5489. <dt><samp class="option">skip_idct <var class="var">integer</var> (<em class="emph">decoding,video</em>)</samp></dt>
  5490. <dt><samp class="option">skip_frame <var class="var">integer</var> (<em class="emph">decoding,video</em>)</samp></dt>
  5491. <dd>
  5492. <p>Make decoder discard processing depending on the frame type selected
  5493. by the option value.
  5494. </p>
  5495. <p><samp class="option">skip_loop_filter</samp> skips frame loop filtering, <samp class="option">skip_idct</samp>
  5496. skips frame IDCT/dequantization, <samp class="option">skip_frame</samp> skips decoding.
  5497. </p>
  5498. <p>Possible values:
  5499. </p><dl class="table">
  5500. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  5501. <dd><p>Discard no frame.
  5502. </p>
  5503. </dd>
  5504. <dt>&lsquo;<samp class="samp">default</samp>&rsquo;</dt>
  5505. <dd><p>Discard useless frames like 0-sized frames.
  5506. </p>
  5507. </dd>
  5508. <dt>&lsquo;<samp class="samp">noref</samp>&rsquo;</dt>
  5509. <dd><p>Discard all non-reference frames.
  5510. </p>
  5511. </dd>
  5512. <dt>&lsquo;<samp class="samp">bidir</samp>&rsquo;</dt>
  5513. <dd><p>Discard all bidirectional frames.
  5514. </p>
  5515. </dd>
  5516. <dt>&lsquo;<samp class="samp">nokey</samp>&rsquo;</dt>
  5517. <dd><p>Discard all frames excepts keyframes.
  5518. </p>
  5519. </dd>
  5520. <dt>&lsquo;<samp class="samp">nointra</samp>&rsquo;</dt>
  5521. <dd><p>Discard all frames except I frames.
  5522. </p>
  5523. </dd>
  5524. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  5525. <dd><p>Discard all frames.
  5526. </p></dd>
  5527. </dl>
  5528. <p>Default value is &lsquo;<samp class="samp">default</samp>&rsquo;.
  5529. </p>
  5530. </dd>
  5531. <dt><samp class="option">bidir_refine <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5532. <dd><p>Refine the two motion vectors used in bidirectional macroblocks.
  5533. </p>
  5534. </dd>
  5535. <dt><samp class="option">keyint_min <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5536. <dd><p>Set minimum interval between IDR-frames.
  5537. </p>
  5538. </dd>
  5539. <dt><samp class="option">refs <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5540. <dd><p>Set reference frames to consider for motion compensation.
  5541. </p>
  5542. </dd>
  5543. <dt><samp class="option">trellis <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  5544. <dd><p>Set rate-distortion optimal quantization.
  5545. </p>
  5546. </dd>
  5547. <dt><samp class="option">mv0_threshold <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5548. <dt><samp class="option">compression_level <var class="var">integer</var> (<em class="emph">encoding,audio,video</em>)</samp></dt>
  5549. <dt><samp class="option">bits_per_raw_sample <var class="var">integer</var></samp></dt>
  5550. <dt><samp class="option">channel_layout <var class="var">integer</var> (<em class="emph">decoding/encoding,audio</em>)</samp></dt>
  5551. <dd><p>See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#channel-layout-syntax">the Channel Layout section in the ffmpeg-utils(1) manual</a>
  5552. for the required syntax.
  5553. </p>
  5554. </dd>
  5555. <dt><samp class="option">rc_max_vbv_use <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5556. <dt><samp class="option">rc_min_vbv_use <var class="var">float</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5557. <dt><samp class="option">color_primaries <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5558. <dd><p>Possible values:
  5559. </p><dl class="table">
  5560. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  5561. <dd><p>BT.709
  5562. </p></dd>
  5563. <dt>&lsquo;<samp class="samp">bt470m</samp>&rsquo;</dt>
  5564. <dd><p>BT.470 M
  5565. </p></dd>
  5566. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  5567. <dd><p>BT.470 BG
  5568. </p></dd>
  5569. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  5570. <dd><p>SMPTE 170 M
  5571. </p></dd>
  5572. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  5573. <dd><p>SMPTE 240 M
  5574. </p></dd>
  5575. <dt>&lsquo;<samp class="samp">film</samp>&rsquo;</dt>
  5576. <dd><p>Film
  5577. </p></dd>
  5578. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  5579. <dd><p>BT.2020
  5580. </p></dd>
  5581. <dt>&lsquo;<samp class="samp">smpte428</samp>&rsquo;</dt>
  5582. <dt>&lsquo;<samp class="samp">smpte428_1</samp>&rsquo;</dt>
  5583. <dd><p>SMPTE ST 428-1
  5584. </p></dd>
  5585. <dt>&lsquo;<samp class="samp">smpte431</samp>&rsquo;</dt>
  5586. <dd><p>SMPTE 431-2
  5587. </p></dd>
  5588. <dt>&lsquo;<samp class="samp">smpte432</samp>&rsquo;</dt>
  5589. <dd><p>SMPTE 432-1
  5590. </p></dd>
  5591. <dt>&lsquo;<samp class="samp">jedec-p22</samp>&rsquo;</dt>
  5592. <dd><p>JEDEC P22
  5593. </p></dd>
  5594. </dl>
  5595. </dd>
  5596. <dt><samp class="option">color_trc <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5597. <dd><p>Possible values:
  5598. </p><dl class="table">
  5599. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  5600. <dd><p>BT.709
  5601. </p></dd>
  5602. <dt>&lsquo;<samp class="samp">gamma22</samp>&rsquo;</dt>
  5603. <dd><p>BT.470 M
  5604. </p></dd>
  5605. <dt>&lsquo;<samp class="samp">gamma28</samp>&rsquo;</dt>
  5606. <dd><p>BT.470 BG
  5607. </p></dd>
  5608. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  5609. <dd><p>SMPTE 170 M
  5610. </p></dd>
  5611. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  5612. <dd><p>SMPTE 240 M
  5613. </p></dd>
  5614. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  5615. <dd><p>Linear
  5616. </p></dd>
  5617. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  5618. <dt>&lsquo;<samp class="samp">log100</samp>&rsquo;</dt>
  5619. <dd><p>Log
  5620. </p></dd>
  5621. <dt>&lsquo;<samp class="samp">log_sqrt</samp>&rsquo;</dt>
  5622. <dt>&lsquo;<samp class="samp">log316</samp>&rsquo;</dt>
  5623. <dd><p>Log square root
  5624. </p></dd>
  5625. <dt>&lsquo;<samp class="samp">iec61966_2_4</samp>&rsquo;</dt>
  5626. <dt>&lsquo;<samp class="samp">iec61966-2-4</samp>&rsquo;</dt>
  5627. <dd><p>IEC 61966-2-4
  5628. </p></dd>
  5629. <dt>&lsquo;<samp class="samp">bt1361</samp>&rsquo;</dt>
  5630. <dt>&lsquo;<samp class="samp">bt1361e</samp>&rsquo;</dt>
  5631. <dd><p>BT.1361
  5632. </p></dd>
  5633. <dt>&lsquo;<samp class="samp">iec61966_2_1</samp>&rsquo;</dt>
  5634. <dt>&lsquo;<samp class="samp">iec61966-2-1</samp>&rsquo;</dt>
  5635. <dd><p>IEC 61966-2-1
  5636. </p></dd>
  5637. <dt>&lsquo;<samp class="samp">bt2020_10</samp>&rsquo;</dt>
  5638. <dt>&lsquo;<samp class="samp">bt2020_10bit</samp>&rsquo;</dt>
  5639. <dd><p>BT.2020 - 10 bit
  5640. </p></dd>
  5641. <dt>&lsquo;<samp class="samp">bt2020_12</samp>&rsquo;</dt>
  5642. <dt>&lsquo;<samp class="samp">bt2020_12bit</samp>&rsquo;</dt>
  5643. <dd><p>BT.2020 - 12 bit
  5644. </p></dd>
  5645. <dt>&lsquo;<samp class="samp">smpte2084</samp>&rsquo;</dt>
  5646. <dd><p>SMPTE ST 2084
  5647. </p></dd>
  5648. <dt>&lsquo;<samp class="samp">smpte428</samp>&rsquo;</dt>
  5649. <dt>&lsquo;<samp class="samp">smpte428_1</samp>&rsquo;</dt>
  5650. <dd><p>SMPTE ST 428-1
  5651. </p></dd>
  5652. <dt>&lsquo;<samp class="samp">arib-std-b67</samp>&rsquo;</dt>
  5653. <dd><p>ARIB STD-B67
  5654. </p></dd>
  5655. </dl>
  5656. </dd>
  5657. <dt><samp class="option">colorspace <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5658. <dd><p>Possible values:
  5659. </p><dl class="table">
  5660. <dt>&lsquo;<samp class="samp">rgb</samp>&rsquo;</dt>
  5661. <dd><p>RGB
  5662. </p></dd>
  5663. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  5664. <dd><p>BT.709
  5665. </p></dd>
  5666. <dt>&lsquo;<samp class="samp">fcc</samp>&rsquo;</dt>
  5667. <dd><p>FCC
  5668. </p></dd>
  5669. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  5670. <dd><p>BT.470 BG
  5671. </p></dd>
  5672. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  5673. <dd><p>SMPTE 170 M
  5674. </p></dd>
  5675. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  5676. <dd><p>SMPTE 240 M
  5677. </p></dd>
  5678. <dt>&lsquo;<samp class="samp">ycocg</samp>&rsquo;</dt>
  5679. <dd><p>YCOCG
  5680. </p></dd>
  5681. <dt>&lsquo;<samp class="samp">bt2020nc</samp>&rsquo;</dt>
  5682. <dt>&lsquo;<samp class="samp">bt2020_ncl</samp>&rsquo;</dt>
  5683. <dd><p>BT.2020 NCL
  5684. </p></dd>
  5685. <dt>&lsquo;<samp class="samp">bt2020c</samp>&rsquo;</dt>
  5686. <dt>&lsquo;<samp class="samp">bt2020_cl</samp>&rsquo;</dt>
  5687. <dd><p>BT.2020 CL
  5688. </p></dd>
  5689. <dt>&lsquo;<samp class="samp">smpte2085</samp>&rsquo;</dt>
  5690. <dd><p>SMPTE 2085
  5691. </p></dd>
  5692. <dt>&lsquo;<samp class="samp">chroma-derived-nc</samp>&rsquo;</dt>
  5693. <dd><p>Chroma-derived NCL
  5694. </p></dd>
  5695. <dt>&lsquo;<samp class="samp">chroma-derived-c</samp>&rsquo;</dt>
  5696. <dd><p>Chroma-derived CL
  5697. </p></dd>
  5698. <dt>&lsquo;<samp class="samp">ictcp</samp>&rsquo;</dt>
  5699. <dd><p>ICtCp
  5700. </p></dd>
  5701. </dl>
  5702. </dd>
  5703. <dt><samp class="option">color_range <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5704. <dd><p>If used as input parameter, it serves as a hint to the decoder, which
  5705. color_range the input has.
  5706. Possible values:
  5707. </p><dl class="table">
  5708. <dt>&lsquo;<samp class="samp">tv</samp>&rsquo;</dt>
  5709. <dt>&lsquo;<samp class="samp">mpeg</samp>&rsquo;</dt>
  5710. <dt>&lsquo;<samp class="samp">limited</samp>&rsquo;</dt>
  5711. <dd><p>MPEG (219*2^(n-8))
  5712. </p></dd>
  5713. <dt>&lsquo;<samp class="samp">pc</samp>&rsquo;</dt>
  5714. <dt>&lsquo;<samp class="samp">jpeg</samp>&rsquo;</dt>
  5715. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  5716. <dd><p>JPEG (2^n-1)
  5717. </p></dd>
  5718. </dl>
  5719. </dd>
  5720. <dt><samp class="option">chroma_sample_location <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5721. <dd><p>Possible values:
  5722. </p><dl class="table">
  5723. <dt>&lsquo;<samp class="samp">left</samp>&rsquo;</dt>
  5724. <dt>&lsquo;<samp class="samp">center</samp>&rsquo;</dt>
  5725. <dt>&lsquo;<samp class="samp">topleft</samp>&rsquo;</dt>
  5726. <dt>&lsquo;<samp class="samp">top</samp>&rsquo;</dt>
  5727. <dt>&lsquo;<samp class="samp">bottomleft</samp>&rsquo;</dt>
  5728. <dt>&lsquo;<samp class="samp">bottom</samp>&rsquo;</dt>
  5729. </dl>
  5730. </dd>
  5731. <dt><samp class="option">log_level_offset <var class="var">integer</var></samp></dt>
  5732. <dd><p>Set the log level offset.
  5733. </p>
  5734. </dd>
  5735. <dt><samp class="option">slices <var class="var">integer</var> (<em class="emph">encoding,video</em>)</samp></dt>
  5736. <dd><p>Number of slices, used in parallelized encoding.
  5737. </p>
  5738. </dd>
  5739. <dt><samp class="option">thread_type <var class="var">flags</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5740. <dd><p>Select which multithreading methods to use.
  5741. </p>
  5742. <p>Use of &lsquo;<samp class="samp">frame</samp>&rsquo; will increase decoding delay by one frame per
  5743. thread, so clients which cannot provide future frames should not use
  5744. it.
  5745. </p>
  5746. <p>Possible values:
  5747. </p><dl class="table">
  5748. <dt>&lsquo;<samp class="samp">slice</samp>&rsquo;</dt>
  5749. <dd><p>Decode more than one part of a single frame at once.
  5750. </p>
  5751. <p>Multithreading using slices works only when the video was encoded with
  5752. slices.
  5753. </p>
  5754. </dd>
  5755. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  5756. <dd><p>Decode more than one frame at once.
  5757. </p></dd>
  5758. </dl>
  5759. <p>Default value is &lsquo;<samp class="samp">slice+frame</samp>&rsquo;.
  5760. </p>
  5761. </dd>
  5762. <dt><samp class="option">audio_service_type <var class="var">integer</var> (<em class="emph">encoding,audio</em>)</samp></dt>
  5763. <dd><p>Set audio service type.
  5764. </p>
  5765. <p>Possible values:
  5766. </p><dl class="table">
  5767. <dt>&lsquo;<samp class="samp">ma</samp>&rsquo;</dt>
  5768. <dd><p>Main Audio Service
  5769. </p></dd>
  5770. <dt>&lsquo;<samp class="samp">ef</samp>&rsquo;</dt>
  5771. <dd><p>Effects
  5772. </p></dd>
  5773. <dt>&lsquo;<samp class="samp">vi</samp>&rsquo;</dt>
  5774. <dd><p>Visually Impaired
  5775. </p></dd>
  5776. <dt>&lsquo;<samp class="samp">hi</samp>&rsquo;</dt>
  5777. <dd><p>Hearing Impaired
  5778. </p></dd>
  5779. <dt>&lsquo;<samp class="samp">di</samp>&rsquo;</dt>
  5780. <dd><p>Dialogue
  5781. </p></dd>
  5782. <dt>&lsquo;<samp class="samp">co</samp>&rsquo;</dt>
  5783. <dd><p>Commentary
  5784. </p></dd>
  5785. <dt>&lsquo;<samp class="samp">em</samp>&rsquo;</dt>
  5786. <dd><p>Emergency
  5787. </p></dd>
  5788. <dt>&lsquo;<samp class="samp">vo</samp>&rsquo;</dt>
  5789. <dd><p>Voice Over
  5790. </p></dd>
  5791. <dt>&lsquo;<samp class="samp">ka</samp>&rsquo;</dt>
  5792. <dd><p>Karaoke
  5793. </p></dd>
  5794. </dl>
  5795. </dd>
  5796. <dt><samp class="option">request_sample_fmt <var class="var">sample_fmt</var> (<em class="emph">decoding,audio</em>)</samp></dt>
  5797. <dd><p>Set sample format audio decoders should prefer. Default value is
  5798. <code class="code">none</code>.
  5799. </p>
  5800. </dd>
  5801. <dt><samp class="option">pkt_timebase <var class="var">rational number</var></samp></dt>
  5802. <dt><samp class="option">sub_charenc <var class="var">encoding</var> (<em class="emph">decoding,subtitles</em>)</samp></dt>
  5803. <dd><p>Set the input subtitles character encoding.
  5804. </p>
  5805. </dd>
  5806. <dt><samp class="option">field_order <var class="var">field_order</var> (<em class="emph">video</em>)</samp></dt>
  5807. <dd><p>Set/override the field order of the video.
  5808. Possible values:
  5809. </p><dl class="table">
  5810. <dt>&lsquo;<samp class="samp">progressive</samp>&rsquo;</dt>
  5811. <dd><p>Progressive video
  5812. </p></dd>
  5813. <dt>&lsquo;<samp class="samp">tt</samp>&rsquo;</dt>
  5814. <dd><p>Interlaced video, top field coded and displayed first
  5815. </p></dd>
  5816. <dt>&lsquo;<samp class="samp">bb</samp>&rsquo;</dt>
  5817. <dd><p>Interlaced video, bottom field coded and displayed first
  5818. </p></dd>
  5819. <dt>&lsquo;<samp class="samp">tb</samp>&rsquo;</dt>
  5820. <dd><p>Interlaced video, top coded first, bottom displayed first
  5821. </p></dd>
  5822. <dt>&lsquo;<samp class="samp">bt</samp>&rsquo;</dt>
  5823. <dd><p>Interlaced video, bottom coded first, top displayed first
  5824. </p></dd>
  5825. </dl>
  5826. </dd>
  5827. <dt><samp class="option">skip_alpha <var class="var">bool</var> (<em class="emph">decoding,video</em>)</samp></dt>
  5828. <dd><p>Set to 1 to disable processing alpha (transparency). This works like the
  5829. &lsquo;<samp class="samp">gray</samp>&rsquo; flag in the <samp class="option">flags</samp> option which skips chroma information
  5830. instead of alpha. Default is 0.
  5831. </p>
  5832. </dd>
  5833. <dt><samp class="option">codec_whitelist <var class="var">list</var> (<em class="emph">input</em>)</samp></dt>
  5834. <dd><p>&quot;,&quot; separated list of allowed decoders. By default all are allowed.
  5835. </p>
  5836. </dd>
  5837. <dt><samp class="option">dump_separator <var class="var">string</var> (<em class="emph">input</em>)</samp></dt>
  5838. <dd><p>Separator used to separate the fields printed on the command line about the
  5839. Stream parameters.
  5840. For example, to separate the fields with newlines and indentation:
  5841. </p><div class="example">
  5842. <pre class="example-preformatted">ffprobe -dump_separator &quot;
  5843. &quot; -i ~/videos/matrixbench_mpeg2.mpg
  5844. </pre></div>
  5845. </dd>
  5846. <dt><samp class="option">max_pixels <var class="var">integer</var> (<em class="emph">decoding/encoding,video</em>)</samp></dt>
  5847. <dd><p>Maximum number of pixels per image. This value can be used to avoid out of
  5848. memory failures due to large images.
  5849. </p>
  5850. </dd>
  5851. <dt><samp class="option">apply_cropping <var class="var">bool</var> (<em class="emph">decoding,video</em>)</samp></dt>
  5852. <dd><p>Enable cropping if cropping parameters are multiples of the required
  5853. alignment for the left and top parameters. If the alignment is not met the
  5854. cropping will be partially applied to maintain alignment.
  5855. Default is 1 (enabled).
  5856. Note: The required alignment depends on if <code class="code">AV_CODEC_FLAG_UNALIGNED</code> is set and the
  5857. CPU. <code class="code">AV_CODEC_FLAG_UNALIGNED</code> cannot be changed from the command line. Also hardware
  5858. decoders will not apply left/top Cropping.
  5859. </p>
  5860. </dd>
  5861. </dl>
  5862. </div>
  5863. <div class="chapter-level-extent" id="Decoders">
  5864. <h2 class="chapter"><span>9 Decoders<a class="copiable-link" href="#Decoders"> &para;</a></span></h2>
  5865. <p>Decoders are configured elements in FFmpeg which allow the decoding of
  5866. multimedia streams.
  5867. </p>
  5868. <p>When you configure your FFmpeg build, all the supported native decoders
  5869. are enabled by default. Decoders requiring an external library must be enabled
  5870. manually via the corresponding <code class="code">--enable-lib</code> option. You can list all
  5871. available decoders using the configure option <code class="code">--list-decoders</code>.
  5872. </p>
  5873. <p>You can disable all the decoders with the configure option
  5874. <code class="code">--disable-decoders</code> and selectively enable / disable single decoders
  5875. with the options <code class="code">--enable-decoder=<var class="var">DECODER</var></code> /
  5876. <code class="code">--disable-decoder=<var class="var">DECODER</var></code>.
  5877. </p>
  5878. <p>The option <code class="code">-decoders</code> of the ff* tools will display the list of
  5879. enabled decoders.
  5880. </p>
  5881. </div>
  5882. <div class="chapter-level-extent" id="Video-Decoders">
  5883. <h2 class="chapter"><span>10 Video Decoders<a class="copiable-link" href="#Video-Decoders"> &para;</a></span></h2>
  5884. <p>A description of some of the currently available video decoders
  5885. follows.
  5886. </p>
  5887. <ul class="mini-toc">
  5888. <li><a href="#av1" accesskey="1">av1</a></li>
  5889. <li><a href="#rawvideo" accesskey="2">rawvideo</a></li>
  5890. <li><a href="#libdav1d" accesskey="3">libdav1d</a></li>
  5891. <li><a href="#libdavs2" accesskey="4">libdavs2</a></li>
  5892. <li><a href="#libuavs3d" accesskey="5">libuavs3d</a></li>
  5893. <li><a href="#libxevd" accesskey="6">libxevd</a></li>
  5894. <li><a href="#QSV-Decoders" accesskey="7">QSV Decoders</a></li>
  5895. <li><a href="#v210" accesskey="8">v210</a></li>
  5896. </ul>
  5897. <div class="section-level-extent" id="av1">
  5898. <h3 class="section"><span>10.1 av1<a class="copiable-link" href="#av1"> &para;</a></span></h3>
  5899. <p>AOMedia Video 1 (AV1) decoder.
  5900. </p>
  5901. <ul class="mini-toc">
  5902. <li><a href="#Options-1" accesskey="1">Options</a></li>
  5903. </ul>
  5904. <div class="subsection-level-extent" id="Options-1">
  5905. <h4 class="subsection"><span>10.1.1 Options<a class="copiable-link" href="#Options-1"> &para;</a></span></h4>
  5906. <dl class="table">
  5907. <dt><samp class="option">operating_point</samp></dt>
  5908. <dd><p>Select an operating point of a scalable AV1 bitstream (0 - 31). Default is 0.
  5909. </p>
  5910. </dd>
  5911. </dl>
  5912. </div>
  5913. </div>
  5914. <div class="section-level-extent" id="rawvideo">
  5915. <h3 class="section"><span>10.2 rawvideo<a class="copiable-link" href="#rawvideo"> &para;</a></span></h3>
  5916. <p>Raw video decoder.
  5917. </p>
  5918. <p>This decoder decodes rawvideo streams.
  5919. </p>
  5920. <ul class="mini-toc">
  5921. <li><a href="#Options-2" accesskey="1">Options</a></li>
  5922. </ul>
  5923. <div class="subsection-level-extent" id="Options-2">
  5924. <h4 class="subsection"><span>10.2.1 Options<a class="copiable-link" href="#Options-2"> &para;</a></span></h4>
  5925. <dl class="table">
  5926. <dt><samp class="option">top <var class="var">top_field_first</var></samp></dt>
  5927. <dd><p>Specify the assumed field type of the input video.
  5928. </p><dl class="table">
  5929. <dt><samp class="option">-1</samp></dt>
  5930. <dd><p>the video is assumed to be progressive (default)
  5931. </p></dd>
  5932. <dt><samp class="option">0</samp></dt>
  5933. <dd><p>bottom-field-first is assumed
  5934. </p></dd>
  5935. <dt><samp class="option">1</samp></dt>
  5936. <dd><p>top-field-first is assumed
  5937. </p></dd>
  5938. </dl>
  5939. </dd>
  5940. </dl>
  5941. </div>
  5942. </div>
  5943. <div class="section-level-extent" id="libdav1d">
  5944. <h3 class="section"><span>10.3 libdav1d<a class="copiable-link" href="#libdav1d"> &para;</a></span></h3>
  5945. <p>dav1d AV1 decoder.
  5946. </p>
  5947. <p>libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
  5948. Requires the presence of the libdav1d headers and library during configuration.
  5949. You need to explicitly configure the build with <code class="code">--enable-libdav1d</code>.
  5950. </p>
  5951. <ul class="mini-toc">
  5952. <li><a href="#Options-3" accesskey="1">Options</a></li>
  5953. </ul>
  5954. <div class="subsection-level-extent" id="Options-3">
  5955. <h4 class="subsection"><span>10.3.1 Options<a class="copiable-link" href="#Options-3"> &para;</a></span></h4>
  5956. <p>The following options are supported by the libdav1d wrapper.
  5957. </p>
  5958. <dl class="table">
  5959. <dt><samp class="option">framethreads</samp></dt>
  5960. <dd><p>Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
  5961. This option is deprecated for libdav1d &gt;= 1.0 and will be removed in the future. Use the
  5962. option <code class="code">max_frame_delay</code> and the global option <code class="code">threads</code> instead.
  5963. </p>
  5964. </dd>
  5965. <dt><samp class="option">tilethreads</samp></dt>
  5966. <dd><p>Set amount of tile threads to use during decoding. The default value is 0 (autodetect).
  5967. This option is deprecated for libdav1d &gt;= 1.0 and will be removed in the future. Use the
  5968. global option <code class="code">threads</code> instead.
  5969. </p>
  5970. </dd>
  5971. <dt><samp class="option">max_frame_delay</samp></dt>
  5972. <dd><p>Set max amount of frames the decoder may buffer internally. The default value is 0
  5973. (autodetect).
  5974. </p>
  5975. </dd>
  5976. <dt><samp class="option">filmgrain</samp></dt>
  5977. <dd><p>Apply film grain to the decoded video if present in the bitstream. Defaults to the
  5978. internal default of the library.
  5979. This option is deprecated and will be removed in the future. See the global option
  5980. <code class="code">export_side_data</code> to export Film Grain parameters instead of applying it.
  5981. </p>
  5982. </dd>
  5983. <dt><samp class="option">oppoint</samp></dt>
  5984. <dd><p>Select an operating point of a scalable AV1 bitstream (0 - 31). Defaults to the
  5985. internal default of the library.
  5986. </p>
  5987. </dd>
  5988. <dt><samp class="option">alllayers</samp></dt>
  5989. <dd><p>Output all spatial layers of a scalable AV1 bitstream. The default value is false.
  5990. </p>
  5991. </dd>
  5992. </dl>
  5993. </div>
  5994. </div>
  5995. <div class="section-level-extent" id="libdavs2">
  5996. <h3 class="section"><span>10.4 libdavs2<a class="copiable-link" href="#libdavs2"> &para;</a></span></h3>
  5997. <p>AVS2-P2/IEEE1857.4 video decoder wrapper.
  5998. </p>
  5999. <p>This decoder allows libavcodec to decode AVS2 streams with davs2 library.
  6000. </p>
  6001. </div>
  6002. <div class="section-level-extent" id="libuavs3d">
  6003. <h3 class="section"><span>10.5 libuavs3d<a class="copiable-link" href="#libuavs3d"> &para;</a></span></h3>
  6004. <p>AVS3-P2/IEEE1857.10 video decoder.
  6005. </p>
  6006. <p>libuavs3d allows libavcodec to decode AVS3 streams.
  6007. Requires the presence of the libuavs3d headers and library during configuration.
  6008. You need to explicitly configure the build with <code class="code">--enable-libuavs3d</code>.
  6009. </p>
  6010. <ul class="mini-toc">
  6011. <li><a href="#Options-4" accesskey="1">Options</a></li>
  6012. </ul>
  6013. <div class="subsection-level-extent" id="Options-4">
  6014. <h4 class="subsection"><span>10.5.1 Options<a class="copiable-link" href="#Options-4"> &para;</a></span></h4>
  6015. <p>The following option is supported by the libuavs3d wrapper.
  6016. </p>
  6017. <dl class="table">
  6018. <dt><samp class="option">frame_threads</samp></dt>
  6019. <dd><p>Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
  6020. </p>
  6021. </dd>
  6022. </dl>
  6023. </div>
  6024. </div>
  6025. <div class="section-level-extent" id="libxevd">
  6026. <h3 class="section"><span>10.6 libxevd<a class="copiable-link" href="#libxevd"> &para;</a></span></h3>
  6027. <p>eXtra-fast Essential Video Decoder (XEVD) MPEG-5 EVC decoder wrapper.
  6028. </p>
  6029. <p>This decoder requires the presence of the libxevd headers and library
  6030. during configuration. You need to explicitly configure the build with
  6031. <samp class="option">--enable-libxevd</samp>.
  6032. </p>
  6033. <p>The xevd project website is at <a class="url" href="https://github.com/mpeg5/xevd">https://github.com/mpeg5/xevd</a>.
  6034. </p>
  6035. <ul class="mini-toc">
  6036. <li><a href="#Options-5" accesskey="1">Options</a></li>
  6037. </ul>
  6038. <div class="subsection-level-extent" id="Options-5">
  6039. <h4 class="subsection"><span>10.6.1 Options<a class="copiable-link" href="#Options-5"> &para;</a></span></h4>
  6040. <p>The following options are supported by the libxevd wrapper.
  6041. The xevd-equivalent options or values are listed in parentheses for easy migration.
  6042. </p>
  6043. <p>To get a more accurate and extensive documentation of the libxevd options,
  6044. invoke the command <code class="code">xevd_app --help</code> or consult the libxevd documentation.
  6045. </p>
  6046. <dl class="table">
  6047. <dt><samp class="option">threads (<em class="emph">threads</em>)</samp></dt>
  6048. <dd><p>Force to use a specific number of threads
  6049. </p>
  6050. </dd>
  6051. </dl>
  6052. </div>
  6053. </div>
  6054. <div class="section-level-extent" id="QSV-Decoders">
  6055. <h3 class="section"><span>10.7 QSV Decoders<a class="copiable-link" href="#QSV-Decoders"> &para;</a></span></h3>
  6056. <p>The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC,
  6057. JPEG/MJPEG, VP8, VP9, AV1).
  6058. </p>
  6059. <ul class="mini-toc">
  6060. <li><a href="#Common-Options" accesskey="1">Common Options</a></li>
  6061. <li><a href="#HEVC-Options" accesskey="2">HEVC Options</a></li>
  6062. </ul>
  6063. <div class="subsection-level-extent" id="Common-Options">
  6064. <h4 class="subsection"><span>10.7.1 Common Options<a class="copiable-link" href="#Common-Options"> &para;</a></span></h4>
  6065. <p>The following options are supported by all qsv decoders.
  6066. </p>
  6067. <dl class="table">
  6068. <dt><samp class="option"><var class="var">async_depth</var></samp></dt>
  6069. <dd><p>Internal parallelization depth, the higher the value the higher the latency.
  6070. </p>
  6071. </dd>
  6072. <dt><samp class="option"><var class="var">gpu_copy</var></samp></dt>
  6073. <dd><p>A GPU-accelerated copy between video and system memory
  6074. </p><dl class="table">
  6075. <dt>&lsquo;<samp class="samp">default</samp>&rsquo;</dt>
  6076. <dt>&lsquo;<samp class="samp">on</samp>&rsquo;</dt>
  6077. <dt>&lsquo;<samp class="samp">off</samp>&rsquo;</dt>
  6078. </dl>
  6079. </dd>
  6080. </dl>
  6081. </div>
  6082. <div class="subsection-level-extent" id="HEVC-Options">
  6083. <h4 class="subsection"><span>10.7.2 HEVC Options<a class="copiable-link" href="#HEVC-Options"> &para;</a></span></h4>
  6084. <p>Extra options for hevc_qsv.
  6085. </p>
  6086. <dl class="table">
  6087. <dt><samp class="option"><var class="var">load_plugin</var></samp></dt>
  6088. <dd><p>A user plugin to load in an internal session
  6089. </p><dl class="table">
  6090. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  6091. <dt>&lsquo;<samp class="samp">hevc_sw</samp>&rsquo;</dt>
  6092. <dt>&lsquo;<samp class="samp">hevc_hw</samp>&rsquo;</dt>
  6093. </dl>
  6094. </dd>
  6095. <dt><samp class="option"><var class="var">load_plugins</var></samp></dt>
  6096. <dd><p>A :-separate list of hexadecimal plugin UIDs to load in an internal session
  6097. </p>
  6098. </dd>
  6099. </dl>
  6100. </div>
  6101. </div>
  6102. <div class="section-level-extent" id="v210">
  6103. <h3 class="section"><span>10.8 v210<a class="copiable-link" href="#v210"> &para;</a></span></h3>
  6104. <p>Uncompressed 4:2:2 10-bit decoder.
  6105. </p>
  6106. <ul class="mini-toc">
  6107. <li><a href="#Options-6" accesskey="1">Options</a></li>
  6108. </ul>
  6109. <div class="subsection-level-extent" id="Options-6">
  6110. <h4 class="subsection"><span>10.8.1 Options<a class="copiable-link" href="#Options-6"> &para;</a></span></h4>
  6111. <dl class="table">
  6112. <dt><samp class="option">custom_stride</samp></dt>
  6113. <dd><p>Set the line size of the v210 data in bytes. The default value is 0
  6114. (autodetect). You can use the special -1 value for a strideless v210 as seen in
  6115. BOXX files.
  6116. </p>
  6117. </dd>
  6118. </dl>
  6119. </div>
  6120. </div>
  6121. </div>
  6122. <div class="chapter-level-extent" id="Audio-Decoders">
  6123. <h2 class="chapter"><span>11 Audio Decoders<a class="copiable-link" href="#Audio-Decoders"> &para;</a></span></h2>
  6124. <p>A description of some of the currently available audio decoders
  6125. follows.
  6126. </p>
  6127. <ul class="mini-toc">
  6128. <li><a href="#ac3" accesskey="1">ac3</a></li>
  6129. <li><a href="#flac" accesskey="2">flac</a></li>
  6130. <li><a href="#ffwavesynth" accesskey="3">ffwavesynth</a></li>
  6131. <li><a href="#libcelt" accesskey="4">libcelt</a></li>
  6132. <li><a href="#libgsm" accesskey="5">libgsm</a></li>
  6133. <li><a href="#libilbc" accesskey="6">libilbc</a></li>
  6134. <li><a href="#libopencore_002damrnb" accesskey="7">libopencore-amrnb</a></li>
  6135. <li><a href="#libopencore_002damrwb" accesskey="8">libopencore-amrwb</a></li>
  6136. <li><a href="#libopus" accesskey="9">libopus</a></li>
  6137. </ul>
  6138. <div class="section-level-extent" id="ac3">
  6139. <h3 class="section"><span>11.1 ac3<a class="copiable-link" href="#ac3"> &para;</a></span></h3>
  6140. <p>AC-3 audio decoder.
  6141. </p>
  6142. <p>This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
  6143. the undocumented RealAudio 3 (a.k.a. dnet).
  6144. </p>
  6145. <ul class="mini-toc">
  6146. <li><a href="#AC_002d3-Decoder-Options" accesskey="1">AC-3 Decoder Options</a></li>
  6147. </ul>
  6148. <div class="subsection-level-extent" id="AC_002d3-Decoder-Options">
  6149. <h4 class="subsection"><span>11.1.1 AC-3 Decoder Options<a class="copiable-link" href="#AC_002d3-Decoder-Options"> &para;</a></span></h4>
  6150. <dl class="table">
  6151. <dt><samp class="option">-drc_scale <var class="var">value</var></samp></dt>
  6152. <dd><p>Dynamic Range Scale Factor. The factor to apply to dynamic range values
  6153. from the AC-3 stream. This factor is applied exponentially. The default value is 1.
  6154. There are 3 notable scale factor ranges:
  6155. </p><dl class="table">
  6156. <dt><samp class="option">drc_scale == 0</samp></dt>
  6157. <dd><p>DRC disabled. Produces full range audio.
  6158. </p></dd>
  6159. <dt><samp class="option">0 &lt; drc_scale &lt;= 1</samp></dt>
  6160. <dd><p>DRC enabled. Applies a fraction of the stream DRC value.
  6161. Audio reproduction is between full range and full compression.
  6162. </p></dd>
  6163. <dt><samp class="option">drc_scale &gt; 1</samp></dt>
  6164. <dd><p>DRC enabled. Applies drc_scale asymmetrically.
  6165. Loud sounds are fully compressed. Soft sounds are enhanced.
  6166. </p></dd>
  6167. </dl>
  6168. </dd>
  6169. </dl>
  6170. </div>
  6171. </div>
  6172. <div class="section-level-extent" id="flac">
  6173. <h3 class="section"><span>11.2 flac<a class="copiable-link" href="#flac"> &para;</a></span></h3>
  6174. <p>FLAC audio decoder.
  6175. </p>
  6176. <p>This decoder aims to implement the complete FLAC specification from Xiph.
  6177. </p>
  6178. <ul class="mini-toc">
  6179. <li><a href="#FLAC-Decoder-options" accesskey="1">FLAC Decoder options</a></li>
  6180. </ul>
  6181. <div class="subsection-level-extent" id="FLAC-Decoder-options">
  6182. <h4 class="subsection"><span>11.2.1 FLAC Decoder options<a class="copiable-link" href="#FLAC-Decoder-options"> &para;</a></span></h4>
  6183. <dl class="table">
  6184. <dt><samp class="option">-use_buggy_lpc</samp></dt>
  6185. <dd><p>The lavc FLAC encoder used to produce buggy streams with high lpc values
  6186. (like the default value). This option makes it possible to decode such streams
  6187. correctly by using lavc&rsquo;s old buggy lpc logic for decoding.
  6188. </p>
  6189. </dd>
  6190. </dl>
  6191. </div>
  6192. </div>
  6193. <div class="section-level-extent" id="ffwavesynth">
  6194. <h3 class="section"><span>11.3 ffwavesynth<a class="copiable-link" href="#ffwavesynth"> &para;</a></span></h3>
  6195. <p>Internal wave synthesizer.
  6196. </p>
  6197. <p>This decoder generates wave patterns according to predefined sequences. Its
  6198. use is purely internal and the format of the data it accepts is not publicly
  6199. documented.
  6200. </p>
  6201. </div>
  6202. <div class="section-level-extent" id="libcelt">
  6203. <h3 class="section"><span>11.4 libcelt<a class="copiable-link" href="#libcelt"> &para;</a></span></h3>
  6204. <p>libcelt decoder wrapper.
  6205. </p>
  6206. <p>libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
  6207. Requires the presence of the libcelt headers and library during configuration.
  6208. You need to explicitly configure the build with <code class="code">--enable-libcelt</code>.
  6209. </p>
  6210. </div>
  6211. <div class="section-level-extent" id="libgsm">
  6212. <h3 class="section"><span>11.5 libgsm<a class="copiable-link" href="#libgsm"> &para;</a></span></h3>
  6213. <p>libgsm decoder wrapper.
  6214. </p>
  6215. <p>libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
  6216. the presence of the libgsm headers and library during configuration. You need
  6217. to explicitly configure the build with <code class="code">--enable-libgsm</code>.
  6218. </p>
  6219. <p>This decoder supports both the ordinary GSM and the Microsoft variant.
  6220. </p>
  6221. </div>
  6222. <div class="section-level-extent" id="libilbc">
  6223. <h3 class="section"><span>11.6 libilbc<a class="copiable-link" href="#libilbc"> &para;</a></span></h3>
  6224. <p>libilbc decoder wrapper.
  6225. </p>
  6226. <p>libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
  6227. audio codec. Requires the presence of the libilbc headers and library during
  6228. configuration. You need to explicitly configure the build with
  6229. <code class="code">--enable-libilbc</code>.
  6230. </p>
  6231. <ul class="mini-toc">
  6232. <li><a href="#Options-7" accesskey="1">Options</a></li>
  6233. </ul>
  6234. <div class="subsection-level-extent" id="Options-7">
  6235. <h4 class="subsection"><span>11.6.1 Options<a class="copiable-link" href="#Options-7"> &para;</a></span></h4>
  6236. <p>The following option is supported by the libilbc wrapper.
  6237. </p>
  6238. <dl class="table">
  6239. <dt><samp class="option">enhance</samp></dt>
  6240. <dd>
  6241. <p>Enable the enhancement of the decoded audio when set to 1. The default
  6242. value is 0 (disabled).
  6243. </p>
  6244. </dd>
  6245. </dl>
  6246. </div>
  6247. </div>
  6248. <div class="section-level-extent" id="libopencore_002damrnb">
  6249. <h3 class="section"><span>11.7 libopencore-amrnb<a class="copiable-link" href="#libopencore_002damrnb"> &para;</a></span></h3>
  6250. <p>libopencore-amrnb decoder wrapper.
  6251. </p>
  6252. <p>libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
  6253. Narrowband audio codec. Using it requires the presence of the
  6254. libopencore-amrnb headers and library during configuration. You need to
  6255. explicitly configure the build with <code class="code">--enable-libopencore-amrnb</code>.
  6256. </p>
  6257. <p>An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
  6258. without this library.
  6259. </p>
  6260. </div>
  6261. <div class="section-level-extent" id="libopencore_002damrwb">
  6262. <h3 class="section"><span>11.8 libopencore-amrwb<a class="copiable-link" href="#libopencore_002damrwb"> &para;</a></span></h3>
  6263. <p>libopencore-amrwb decoder wrapper.
  6264. </p>
  6265. <p>libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
  6266. Wideband audio codec. Using it requires the presence of the
  6267. libopencore-amrwb headers and library during configuration. You need to
  6268. explicitly configure the build with <code class="code">--enable-libopencore-amrwb</code>.
  6269. </p>
  6270. <p>An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
  6271. without this library.
  6272. </p>
  6273. </div>
  6274. <div class="section-level-extent" id="libopus">
  6275. <h3 class="section"><span>11.9 libopus<a class="copiable-link" href="#libopus"> &para;</a></span></h3>
  6276. <p>libopus decoder wrapper.
  6277. </p>
  6278. <p>libopus allows libavcodec to decode the Opus Interactive Audio Codec.
  6279. Requires the presence of the libopus headers and library during
  6280. configuration. You need to explicitly configure the build with
  6281. <code class="code">--enable-libopus</code>.
  6282. </p>
  6283. <p>An FFmpeg native decoder for Opus exists, so users can decode Opus
  6284. without this library.
  6285. </p>
  6286. </div>
  6287. </div>
  6288. <div class="chapter-level-extent" id="Subtitles-Decoders">
  6289. <h2 class="chapter"><span>12 Subtitles Decoders<a class="copiable-link" href="#Subtitles-Decoders"> &para;</a></span></h2>
  6290. <ul class="mini-toc">
  6291. <li><a href="#libaribb24" accesskey="1">libaribb24</a></li>
  6292. <li><a href="#libaribcaption" accesskey="2">libaribcaption</a></li>
  6293. <li><a href="#dvbsub" accesskey="3">dvbsub</a></li>
  6294. <li><a href="#dvdsub" accesskey="4">dvdsub</a></li>
  6295. <li><a href="#libzvbi_002dteletext" accesskey="5">libzvbi-teletext</a></li>
  6296. </ul>
  6297. <div class="section-level-extent" id="libaribb24">
  6298. <h3 class="section"><span>12.1 libaribb24<a class="copiable-link" href="#libaribb24"> &para;</a></span></h3>
  6299. <p>ARIB STD-B24 caption decoder.
  6300. </p>
  6301. <p>Implements profiles A and C of the ARIB STD-B24 standard.
  6302. </p>
  6303. <ul class="mini-toc">
  6304. <li><a href="#libaribb24-Decoder-Options" accesskey="1">libaribb24 Decoder Options</a></li>
  6305. </ul>
  6306. <div class="subsection-level-extent" id="libaribb24-Decoder-Options">
  6307. <h4 class="subsection"><span>12.1.1 libaribb24 Decoder Options<a class="copiable-link" href="#libaribb24-Decoder-Options"> &para;</a></span></h4>
  6308. <dl class="table">
  6309. <dt><samp class="option">-aribb24-base-path <var class="var">path</var></samp></dt>
  6310. <dd><p>Sets the base path for the libaribb24 library. This is utilized for reading of
  6311. configuration files (for custom unicode conversions), and for dumping of
  6312. non-text symbols as images under that location.
  6313. </p>
  6314. <p>Unset by default.
  6315. </p>
  6316. </dd>
  6317. <dt><samp class="option">-aribb24-skip-ruby-text <var class="var">boolean</var></samp></dt>
  6318. <dd><p>Tells the decoder wrapper to skip text blocks that contain half-height ruby
  6319. text.
  6320. </p>
  6321. <p>Enabled by default.
  6322. </p>
  6323. </dd>
  6324. </dl>
  6325. </div>
  6326. </div>
  6327. <div class="section-level-extent" id="libaribcaption">
  6328. <h3 class="section"><span>12.2 libaribcaption<a class="copiable-link" href="#libaribcaption"> &para;</a></span></h3>
  6329. <p>Yet another ARIB STD-B24 caption decoder using external <em class="dfn">libaribcaption</em>
  6330. library.
  6331. </p>
  6332. <p>Implements profiles A and C of the Japanse ARIB STD-B24 standard,
  6333. Brazilian ABNT NBR 15606-1, and Philippines version of ISDB-T.
  6334. </p>
  6335. <p>Requires the presence of the libaribcaption headers and library
  6336. (<a class="url" href="https://github.com/xqq/libaribcaption">https://github.com/xqq/libaribcaption</a>) during configuration.
  6337. You need to explicitly configure the build with <code class="code">--enable-libaribcaption</code>.
  6338. If both <em class="dfn">libaribb24</em> and <em class="dfn">libaribcaption</em> are enabled, <em class="dfn">libaribcaption</em>
  6339. decoder precedes.
  6340. </p>
  6341. <ul class="mini-toc">
  6342. <li><a href="#libaribcaption-Decoder-Options" accesskey="1">libaribcaption Decoder Options</a></li>
  6343. <li><a href="#libaribcaption-decoder-usage-examples" accesskey="2">libaribcaption decoder usage examples</a></li>
  6344. </ul>
  6345. <div class="subsection-level-extent" id="libaribcaption-Decoder-Options">
  6346. <h4 class="subsection"><span>12.2.1 libaribcaption Decoder Options<a class="copiable-link" href="#libaribcaption-Decoder-Options"> &para;</a></span></h4>
  6347. <dl class="table">
  6348. <dt><samp class="option">-sub_type <var class="var">subtitle_type</var></samp></dt>
  6349. <dd><p>Specifies the format of the decoded subtitles.
  6350. </p>
  6351. <dl class="table">
  6352. <dt>&lsquo;<samp class="samp">bitmap</samp>&rsquo;</dt>
  6353. <dd><p>Graphical image.
  6354. </p></dd>
  6355. <dt>&lsquo;<samp class="samp">ass</samp>&rsquo;</dt>
  6356. <dd><p>ASS formatted text.
  6357. </p></dd>
  6358. <dt>&lsquo;<samp class="samp">text</samp>&rsquo;</dt>
  6359. <dd><p>Simple text based output without formatting.
  6360. </p></dd>
  6361. </dl>
  6362. <p>The default is <em class="dfn">ass</em> as same as <em class="dfn">libaribb24</em> decoder.
  6363. Some present players (e.g., <em class="dfn">mpv</em>) expect ASS format for ARIB caption.
  6364. </p>
  6365. </dd>
  6366. <dt><samp class="option">-caption_encoding <var class="var">encoding_scheme</var></samp></dt>
  6367. <dd><p>Specifies the encoding scheme of input subtitle text.
  6368. </p>
  6369. <dl class="table">
  6370. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  6371. <dd><p>Automatically detect text encoding (default).
  6372. </p></dd>
  6373. <dt>&lsquo;<samp class="samp">jis</samp>&rsquo;</dt>
  6374. <dd><p>8bit-char JIS encoding defined in ARIB STD B24.
  6375. This encoding used in Japan for ISDB captions.
  6376. </p></dd>
  6377. <dt>&lsquo;<samp class="samp">utf8</samp>&rsquo;</dt>
  6378. <dd><p>UTF-8 encoding defined in ARIB STD B24.
  6379. This encoding is used in Philippines for ISDB-T captions.
  6380. </p></dd>
  6381. <dt>&lsquo;<samp class="samp">latin</samp>&rsquo;</dt>
  6382. <dd><p>Latin character encoding defined in ABNT NBR 15606-1.
  6383. This encoding is used in South America for SBTVD / ISDB-Tb captions.
  6384. </p></dd>
  6385. </dl>
  6386. </dd>
  6387. <dt><samp class="option">-font <var class="var">font_name[,font_name2,...]</var></samp></dt>
  6388. <dd><p>Specify comma-separated list of font family names to be used for <em class="dfn">bitmap</em>
  6389. or <em class="dfn">ass</em> type subtitle rendering.
  6390. Only first font name is used for <em class="dfn">ass</em> type subtitle.
  6391. </p>
  6392. <p>If not specified, use internaly defined default font family.
  6393. </p>
  6394. </dd>
  6395. <dt><samp class="option">-ass_single_rect <var class="var">boolean</var></samp></dt>
  6396. <dd><p>ARIB STD-B24 specifies that some captions may be displayed at different
  6397. positions at a time (multi-rectangle subtitle).
  6398. Since some players (e.g., old <em class="dfn">mpv</em>) can&rsquo;t handle multiple ASS rectangles
  6399. in a single AVSubtitle, or multiple ASS rectangles of indeterminate duration
  6400. with the same start timestamp, this option can change the behavior so that
  6401. all the texts are displayed in a single ASS rectangle.
  6402. </p>
  6403. <p>The default is <var class="var">false</var>.
  6404. </p>
  6405. <p>If your player cannot handle AVSubtitles with multiple ASS rectangles properly,
  6406. set this option to <var class="var">true</var> or define <code class="env">ASS_SINGLE_RECT=1</code> to change
  6407. default behavior at compilation.
  6408. </p>
  6409. </dd>
  6410. <dt><samp class="option">-force_outline_text <var class="var">boolean</var></samp></dt>
  6411. <dd><p>Specify whether always render outline text for all characters regardless of
  6412. the indication by charactor style.
  6413. </p>
  6414. <p>The default is <var class="var">false</var>.
  6415. </p>
  6416. </dd>
  6417. <dt><samp class="option">-outline_width <var class="var">number</var> (0.0 - 3.0)</samp></dt>
  6418. <dd><p>Specify width for outline text, in dots (relative).
  6419. </p>
  6420. <p>The default is <var class="var">1.5</var>.
  6421. </p>
  6422. </dd>
  6423. <dt><samp class="option">-ignore_background <var class="var">boolean</var></samp></dt>
  6424. <dd><p>Specify whether to ignore background color rendering.
  6425. </p>
  6426. <p>The default is <var class="var">false</var>.
  6427. </p>
  6428. </dd>
  6429. <dt><samp class="option">-ignore_ruby <var class="var">boolean</var></samp></dt>
  6430. <dd><p>Specify whether to ignore rendering for ruby-like (furigana) characters.
  6431. </p>
  6432. <p>The default is <var class="var">false</var>.
  6433. </p>
  6434. </dd>
  6435. <dt><samp class="option">-replace_drcs <var class="var">boolean</var></samp></dt>
  6436. <dd><p>Specify whether to render replaced DRCS characters as Unicode characters.
  6437. </p>
  6438. <p>The default is <var class="var">true</var>.
  6439. </p>
  6440. </dd>
  6441. <dt><samp class="option">-replace_msz_ascii <var class="var">boolean</var></samp></dt>
  6442. <dd><p>Specify whether to replace MSZ (Middle Size; half width) fullwidth
  6443. alphanumerics with halfwidth alphanumerics.
  6444. </p>
  6445. <p>The default is <var class="var">true</var>.
  6446. </p>
  6447. </dd>
  6448. <dt><samp class="option">-replace_msz_japanese <var class="var">boolean</var></samp></dt>
  6449. <dd><p>Specify whether to replace some MSZ (Middle Size; half width) fullwidth
  6450. japanese special characters with halfwidth ones.
  6451. </p>
  6452. <p>The default is <var class="var">true</var>.
  6453. </p>
  6454. </dd>
  6455. <dt><samp class="option">-replace_msz_glyph <var class="var">boolean</var></samp></dt>
  6456. <dd><p>Specify whether to replace MSZ (Middle Size; half width) characters
  6457. with halfwidth glyphs if the fonts supports it.
  6458. This option works under FreeType or DirectWrite renderer
  6459. with Adobe-Japan1 compliant fonts.
  6460. e.g., IBM Plex Sans JP, Morisawa BIZ UDGothic, Morisawa BIZ UDMincho,
  6461. Yu Gothic, Yu Mincho, and Meiryo.
  6462. </p>
  6463. <p>The default is <var class="var">true</var>.
  6464. </p>
  6465. </dd>
  6466. <dt><samp class="option">-canvas_size <var class="var">image_size</var></samp></dt>
  6467. <dd><p>Specify the resolution of the canvas to render subtitles to; usually, this
  6468. should be frame size of input video.
  6469. This only applies when <code class="code">-subtitle_type</code> is set to <var class="var">bitmap</var>.
  6470. </p>
  6471. <p>The libaribcaption decoder assumes input frame size for bitmap rendering as below:
  6472. </p><ol class="enumerate">
  6473. <li> PROFILE_A : 1440 x 1080 with SAR (PAR) 4:3
  6474. </li><li> PROFILE_C : 320 x 180 with SAR (PAR) 1:1
  6475. </li></ol>
  6476. <p>If actual frame size of input video does not match above assumption,
  6477. the rendered captions may be distorted.
  6478. To make the captions undistorted, add <code class="code">-canvas_size</code> option to specify
  6479. actual input video size.
  6480. </p>
  6481. <p>Note that the <code class="code">-canvas_size</code> option is not required for video with
  6482. different size but same aspect ratio.
  6483. In such cases, the caption will be stretched or shrunk to actual video size
  6484. if <code class="code">-canvas_size</code> option is not specified.
  6485. If <code class="code">-canvas_size</code> option is specified with different size,
  6486. the caption will be stretched or shrunk as specified size with calculated SAR.
  6487. </p>
  6488. </dd>
  6489. </dl>
  6490. </div>
  6491. <div class="subsection-level-extent" id="libaribcaption-decoder-usage-examples">
  6492. <h4 class="subsection"><span>12.2.2 libaribcaption decoder usage examples<a class="copiable-link" href="#libaribcaption-decoder-usage-examples"> &para;</a></span></h4>
  6493. <p>Display MPEG-TS file with ARIB subtitle by <code class="code">ffplay</code> tool:
  6494. </p><div class="example">
  6495. <pre class="example-preformatted">ffplay -sub_type bitmap MPEG.TS
  6496. </pre></div>
  6497. <p>Display MPEG-TS file with input frame size 1920x1080 by <code class="code">ffplay</code> tool:
  6498. </p><div class="example">
  6499. <pre class="example-preformatted">ffplay -sub_type bitmap -canvas_size 1920x1080 MPEG.TS
  6500. </pre></div>
  6501. <p>Embed ARIB subtitle in transcoded video:
  6502. </p><div class="example">
  6503. <pre class="example-preformatted">ffmpeg -sub_type bitmap -i src.m2t -filter_complex &quot;[0:v][0:s]overlay&quot; -vcodec h264 dest.mp4
  6504. </pre></div>
  6505. </div>
  6506. </div>
  6507. <div class="section-level-extent" id="dvbsub">
  6508. <h3 class="section"><span>12.3 dvbsub<a class="copiable-link" href="#dvbsub"> &para;</a></span></h3>
  6509. <ul class="mini-toc">
  6510. <li><a href="#Options-8" accesskey="1">Options</a></li>
  6511. </ul>
  6512. <div class="subsection-level-extent" id="Options-8">
  6513. <h4 class="subsection"><span>12.3.1 Options<a class="copiable-link" href="#Options-8"> &para;</a></span></h4>
  6514. <dl class="table">
  6515. <dt><samp class="option">compute_clut</samp></dt>
  6516. <dd><dl class="table">
  6517. <dt><samp class="option">-2</samp></dt>
  6518. <dd><p>Compute clut once if no matching CLUT is in the stream.
  6519. </p></dd>
  6520. <dt><samp class="option">-1</samp></dt>
  6521. <dd><p>Compute clut if no matching CLUT is in the stream.
  6522. </p></dd>
  6523. <dt><samp class="option">0</samp></dt>
  6524. <dd><p>Never compute CLUT
  6525. </p></dd>
  6526. <dt><samp class="option">1</samp></dt>
  6527. <dd><p>Always compute CLUT and override the one provided in the stream.
  6528. </p></dd>
  6529. </dl>
  6530. </dd>
  6531. <dt><samp class="option">dvb_substream</samp></dt>
  6532. <dd><p>Selects the dvb substream, or all substreams if -1 which is default.
  6533. </p>
  6534. </dd>
  6535. </dl>
  6536. </div>
  6537. </div>
  6538. <div class="section-level-extent" id="dvdsub">
  6539. <h3 class="section"><span>12.4 dvdsub<a class="copiable-link" href="#dvdsub"> &para;</a></span></h3>
  6540. <p>This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
  6541. also be found in VobSub file pairs and in some Matroska files.
  6542. </p>
  6543. <ul class="mini-toc">
  6544. <li><a href="#Options-9" accesskey="1">Options</a></li>
  6545. </ul>
  6546. <div class="subsection-level-extent" id="Options-9">
  6547. <h4 class="subsection"><span>12.4.1 Options<a class="copiable-link" href="#Options-9"> &para;</a></span></h4>
  6548. <dl class="table">
  6549. <dt><samp class="option">palette</samp></dt>
  6550. <dd><p>Specify the global palette used by the bitmaps. When stored in VobSub, the
  6551. palette is normally specified in the index file; in Matroska, the palette is
  6552. stored in the codec extra-data in the same format as in VobSub. In DVDs, the
  6553. palette is stored in the IFO file, and therefore not available when reading
  6554. from dumped VOB files.
  6555. </p>
  6556. <p>The format for this option is a string containing 16 24-bits hexadecimal
  6557. numbers (without 0x prefix) separated by commas, for example <code class="code">0d00ee,
  6558. ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
  6559. 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b</code>.
  6560. </p>
  6561. </dd>
  6562. <dt><samp class="option">ifo_palette</samp></dt>
  6563. <dd><p>Specify the IFO file from which the global palette is obtained.
  6564. (experimental)
  6565. </p>
  6566. </dd>
  6567. <dt><samp class="option">forced_subs_only</samp></dt>
  6568. <dd><p>Only decode subtitle entries marked as forced. Some titles have forced
  6569. and non-forced subtitles in the same track. Setting this flag to <code class="code">1</code>
  6570. will only keep the forced subtitles. Default value is <code class="code">0</code>.
  6571. </p></dd>
  6572. </dl>
  6573. </div>
  6574. </div>
  6575. <div class="section-level-extent" id="libzvbi_002dteletext">
  6576. <h3 class="section"><span>12.5 libzvbi-teletext<a class="copiable-link" href="#libzvbi_002dteletext"> &para;</a></span></h3>
  6577. <p>Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
  6578. subtitles. Requires the presence of the libzvbi headers and library during
  6579. configuration. You need to explicitly configure the build with
  6580. <code class="code">--enable-libzvbi</code>.
  6581. </p>
  6582. <ul class="mini-toc">
  6583. <li><a href="#Options-10" accesskey="1">Options</a></li>
  6584. </ul>
  6585. <div class="subsection-level-extent" id="Options-10">
  6586. <h4 class="subsection"><span>12.5.1 Options<a class="copiable-link" href="#Options-10"> &para;</a></span></h4>
  6587. <dl class="table">
  6588. <dt><samp class="option">txt_page</samp></dt>
  6589. <dd><p>List of teletext page numbers to decode. Pages that do not match the specified
  6590. list are dropped. You may use the special <code class="code">*</code> string to match all pages,
  6591. or <code class="code">subtitle</code> to match all subtitle pages.
  6592. Default value is *.
  6593. </p></dd>
  6594. <dt><samp class="option">txt_default_region</samp></dt>
  6595. <dd><p>Set default character set used for decoding, a value between 0 and 87 (see
  6596. ETS 300 706, Section 15, Table 32). Default value is -1, which does not
  6597. override the libzvbi default. This option is needed for some legacy level 1.0
  6598. transmissions which cannot signal the proper charset.
  6599. </p></dd>
  6600. <dt><samp class="option">txt_chop_top</samp></dt>
  6601. <dd><p>Discards the top teletext line. Default value is 1.
  6602. </p></dd>
  6603. <dt><samp class="option">txt_format</samp></dt>
  6604. <dd><p>Specifies the format of the decoded subtitles.
  6605. </p><dl class="table">
  6606. <dt><samp class="option">bitmap</samp></dt>
  6607. <dd><p>The default format, you should use this for teletext pages, because certain
  6608. graphics and colors cannot be expressed in simple text or even ASS.
  6609. </p></dd>
  6610. <dt><samp class="option">text</samp></dt>
  6611. <dd><p>Simple text based output without formatting.
  6612. </p></dd>
  6613. <dt><samp class="option">ass</samp></dt>
  6614. <dd><p>Formatted ASS output, subtitle pages and teletext pages are returned in
  6615. different styles, subtitle pages are stripped down to text, but an effort is
  6616. made to keep the text alignment and the formatting.
  6617. </p></dd>
  6618. </dl>
  6619. </dd>
  6620. <dt><samp class="option">txt_left</samp></dt>
  6621. <dd><p>X offset of generated bitmaps, default is 0.
  6622. </p></dd>
  6623. <dt><samp class="option">txt_top</samp></dt>
  6624. <dd><p>Y offset of generated bitmaps, default is 0.
  6625. </p></dd>
  6626. <dt><samp class="option">txt_chop_spaces</samp></dt>
  6627. <dd><p>Chops leading and trailing spaces and removes empty lines from the generated
  6628. text. This option is useful for teletext based subtitles where empty spaces may
  6629. be present at the start or at the end of the lines or empty lines may be
  6630. present between the subtitle lines because of double-sized teletext characters.
  6631. Default value is 1.
  6632. </p></dd>
  6633. <dt><samp class="option">txt_duration</samp></dt>
  6634. <dd><p>Sets the display duration of the decoded teletext pages or subtitles in
  6635. milliseconds. Default value is -1 which means infinity or until the next
  6636. subtitle event comes.
  6637. </p></dd>
  6638. <dt><samp class="option">txt_transparent</samp></dt>
  6639. <dd><p>Force transparent background of the generated teletext bitmaps. Default value
  6640. is 0 which means an opaque background.
  6641. </p></dd>
  6642. <dt><samp class="option">txt_opacity</samp></dt>
  6643. <dd><p>Sets the opacity (0-255) of the teletext background. If
  6644. <samp class="option">txt_transparent</samp> is not set, it only affects characters between a start
  6645. box and an end box, typically subtitles. Default value is 0 if
  6646. <samp class="option">txt_transparent</samp> is set, 255 otherwise.
  6647. </p>
  6648. </dd>
  6649. </dl>
  6650. </div>
  6651. </div>
  6652. </div>
  6653. <div class="chapter-level-extent" id="Bitstream-Filters">
  6654. <h2 class="chapter"><span>13 Bitstream Filters<a class="copiable-link" href="#Bitstream-Filters"> &para;</a></span></h2>
  6655. <p>When you configure your FFmpeg build, all the supported bitstream
  6656. filters are enabled by default. You can list all available ones using
  6657. the configure option <code class="code">--list-bsfs</code>.
  6658. </p>
  6659. <p>You can disable all the bitstream filters using the configure option
  6660. <code class="code">--disable-bsfs</code>, and selectively enable any bitstream filter using
  6661. the option <code class="code">--enable-bsf=BSF</code>, or you can disable a particular
  6662. bitstream filter using the option <code class="code">--disable-bsf=BSF</code>.
  6663. </p>
  6664. <p>The option <code class="code">-bsfs</code> of the ff* tools will display the list of
  6665. all the supported bitstream filters included in your build.
  6666. </p>
  6667. <p>The ff* tools have a -bsf option applied per stream, taking a
  6668. comma-separated list of filters, whose parameters follow the filter
  6669. name after a &rsquo;=&rsquo;.
  6670. </p>
  6671. <div class="example">
  6672. <pre class="example-preformatted">ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
  6673. </pre></div>
  6674. <p>Below is a description of the currently available bitstream filters,
  6675. with their parameters, if any.
  6676. </p>
  6677. <ul class="mini-toc">
  6678. <li><a href="#aac_005fadtstoasc" accesskey="1">aac_adtstoasc</a></li>
  6679. <li><a href="#av1_005fmetadata" accesskey="2">av1_metadata</a></li>
  6680. <li><a href="#chomp" accesskey="3">chomp</a></li>
  6681. <li><a href="#dca_005fcore" accesskey="4">dca_core</a></li>
  6682. <li><a href="#dump_005fextra" accesskey="5">dump_extra</a></li>
  6683. <li><a href="#dv_005ferror_005fmarker" accesskey="6">dv_error_marker</a></li>
  6684. <li><a href="#eac3_005fcore" accesskey="7">eac3_core</a></li>
  6685. <li><a href="#extract_005fextradata" accesskey="8">extract_extradata</a></li>
  6686. <li><a href="#filter_005funits" accesskey="9">filter_units</a></li>
  6687. <li><a href="#hapqa_005fextract">hapqa_extract</a></li>
  6688. <li><a href="#h264_005fmetadata">h264_metadata</a></li>
  6689. <li><a href="#h264_005fmp4toannexb">h264_mp4toannexb</a></li>
  6690. <li><a href="#h264_005fredundant_005fpps">h264_redundant_pps</a></li>
  6691. <li><a href="#hevc_005fmetadata">hevc_metadata</a></li>
  6692. <li><a href="#hevc_005fmp4toannexb">hevc_mp4toannexb</a></li>
  6693. <li><a href="#imxdump">imxdump</a></li>
  6694. <li><a href="#mjpeg2jpeg">mjpeg2jpeg</a></li>
  6695. <li><a href="#mjpegadump">mjpegadump</a></li>
  6696. <li><a href="#mov2textsub-1">mov2textsub</a></li>
  6697. <li><a href="#mpeg2_005fmetadata">mpeg2_metadata</a></li>
  6698. <li><a href="#mpeg4_005funpack_005fbframes">mpeg4_unpack_bframes</a></li>
  6699. <li><a href="#noise">noise</a></li>
  6700. <li><a href="#null">null</a></li>
  6701. <li><a href="#pcm_005frechunk">pcm_rechunk</a></li>
  6702. <li><a href="#pgs_005fframe_005fmerge">pgs_frame_merge</a></li>
  6703. <li><a href="#prores_005fmetadata">prores_metadata</a></li>
  6704. <li><a href="#remove_005fextra">remove_extra</a></li>
  6705. <li><a href="#setts">setts</a></li>
  6706. <li><a href="#showinfo">showinfo</a></li>
  6707. <li><a href="#text2movsub-1">text2movsub</a></li>
  6708. <li><a href="#trace_005fheaders">trace_headers</a></li>
  6709. <li><a href="#truehd_005fcore">truehd_core</a></li>
  6710. <li><a href="#vp9_005fmetadata">vp9_metadata</a></li>
  6711. <li><a href="#vp9_005fsuperframe">vp9_superframe</a></li>
  6712. <li><a href="#vp9_005fsuperframe_005fsplit">vp9_superframe_split</a></li>
  6713. <li><a href="#vp9_005fraw_005freorder">vp9_raw_reorder</a></li>
  6714. </ul>
  6715. <div class="section-level-extent" id="aac_005fadtstoasc">
  6716. <h3 class="section"><span>13.1 aac_adtstoasc<a class="copiable-link" href="#aac_005fadtstoasc"> &para;</a></span></h3>
  6717. <p>Convert MPEG-2/4 AAC ADTS to an MPEG-4 Audio Specific Configuration
  6718. bitstream.
  6719. </p>
  6720. <p>This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4
  6721. ADTS header and removes the ADTS header.
  6722. </p>
  6723. <p>This filter is required for example when copying an AAC stream from a
  6724. raw ADTS AAC or an MPEG-TS container to MP4A-LATM, to an FLV file, or
  6725. to MOV/MP4 files and related formats such as 3GP or M4A. Please note
  6726. that it is auto-inserted for MP4A-LATM and MOV/MP4 and related formats.
  6727. </p>
  6728. </div>
  6729. <div class="section-level-extent" id="av1_005fmetadata">
  6730. <h3 class="section"><span>13.2 av1_metadata<a class="copiable-link" href="#av1_005fmetadata"> &para;</a></span></h3>
  6731. <p>Modify metadata embedded in an AV1 stream.
  6732. </p>
  6733. <dl class="table">
  6734. <dt><samp class="option">td</samp></dt>
  6735. <dd><p>Insert or remove temporal delimiter OBUs in all temporal units of the
  6736. stream.
  6737. </p>
  6738. <dl class="table">
  6739. <dt>&lsquo;<samp class="samp">insert</samp>&rsquo;</dt>
  6740. <dd><p>Insert a TD at the beginning of every TU which does not already have one.
  6741. </p></dd>
  6742. <dt>&lsquo;<samp class="samp">remove</samp>&rsquo;</dt>
  6743. <dd><p>Remove the TD from the beginning of every TU which has one.
  6744. </p></dd>
  6745. </dl>
  6746. </dd>
  6747. <dt><samp class="option">color_primaries</samp></dt>
  6748. <dt><samp class="option">transfer_characteristics</samp></dt>
  6749. <dt><samp class="option">matrix_coefficients</samp></dt>
  6750. <dd><p>Set the color description fields in the stream (see AV1 section 6.4.2).
  6751. </p>
  6752. </dd>
  6753. <dt><samp class="option">color_range</samp></dt>
  6754. <dd><p>Set the color range in the stream (see AV1 section 6.4.2; note that
  6755. this cannot be set for streams using BT.709 primaries, sRGB transfer
  6756. characteristic and identity (RGB) matrix coefficients).
  6757. </p><dl class="table">
  6758. <dt>&lsquo;<samp class="samp">tv</samp>&rsquo;</dt>
  6759. <dd><p>Limited range.
  6760. </p></dd>
  6761. <dt>&lsquo;<samp class="samp">pc</samp>&rsquo;</dt>
  6762. <dd><p>Full range.
  6763. </p></dd>
  6764. </dl>
  6765. </dd>
  6766. <dt><samp class="option">chroma_sample_position</samp></dt>
  6767. <dd><p>Set the chroma sample location in the stream (see AV1 section 6.4.2).
  6768. This can only be set for 4:2:0 streams.
  6769. </p>
  6770. <dl class="table">
  6771. <dt>&lsquo;<samp class="samp">vertical</samp>&rsquo;</dt>
  6772. <dd><p>Left position (matching the default in MPEG-2 and H.264).
  6773. </p></dd>
  6774. <dt>&lsquo;<samp class="samp">colocated</samp>&rsquo;</dt>
  6775. <dd><p>Top-left position.
  6776. </p></dd>
  6777. </dl>
  6778. </dd>
  6779. <dt><samp class="option">tick_rate</samp></dt>
  6780. <dd><p>Set the tick rate (<em class="emph">time_scale / num_units_in_display_tick</em>) in
  6781. the timing info in the sequence header.
  6782. </p></dd>
  6783. <dt><samp class="option">num_ticks_per_picture</samp></dt>
  6784. <dd><p>Set the number of ticks in each picture, to indicate that the stream
  6785. has a fixed framerate. Ignored if <samp class="option">tick_rate</samp> is not also set.
  6786. </p>
  6787. </dd>
  6788. <dt><samp class="option">delete_padding</samp></dt>
  6789. <dd><p>Deletes Padding OBUs.
  6790. </p>
  6791. </dd>
  6792. </dl>
  6793. </div>
  6794. <div class="section-level-extent" id="chomp">
  6795. <h3 class="section"><span>13.3 chomp<a class="copiable-link" href="#chomp"> &para;</a></span></h3>
  6796. <p>Remove zero padding at the end of a packet.
  6797. </p>
  6798. </div>
  6799. <div class="section-level-extent" id="dca_005fcore">
  6800. <h3 class="section"><span>13.4 dca_core<a class="copiable-link" href="#dca_005fcore"> &para;</a></span></h3>
  6801. <p>Extract the core from a DCA/DTS stream, dropping extensions such as
  6802. DTS-HD.
  6803. </p>
  6804. </div>
  6805. <div class="section-level-extent" id="dump_005fextra">
  6806. <h3 class="section"><span>13.5 dump_extra<a class="copiable-link" href="#dump_005fextra"> &para;</a></span></h3>
  6807. <p>Add extradata to the beginning of the filtered packets except when
  6808. said packets already exactly begin with the extradata that is intended
  6809. to be added.
  6810. </p>
  6811. <dl class="table">
  6812. <dt><samp class="option">freq</samp></dt>
  6813. <dd><p>The additional argument specifies which packets should be filtered.
  6814. It accepts the values:
  6815. </p><dl class="table">
  6816. <dt>&lsquo;<samp class="samp">k</samp>&rsquo;</dt>
  6817. <dt>&lsquo;<samp class="samp">keyframe</samp>&rsquo;</dt>
  6818. <dd><p>add extradata to all key packets
  6819. </p>
  6820. </dd>
  6821. <dt>&lsquo;<samp class="samp">e</samp>&rsquo;</dt>
  6822. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  6823. <dd><p>add extradata to all packets
  6824. </p></dd>
  6825. </dl>
  6826. </dd>
  6827. </dl>
  6828. <p>If not specified it is assumed &lsquo;<samp class="samp">k</samp>&rsquo;.
  6829. </p>
  6830. <p>For example the following <code class="command">ffmpeg</code> command forces a global
  6831. header (thus disabling individual packet headers) in the H.264 packets
  6832. generated by the <code class="code">libx264</code> encoder, but corrects them by adding
  6833. the header stored in extradata to the key packets:
  6834. </p><div class="example">
  6835. <pre class="example-preformatted">ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
  6836. </pre></div>
  6837. </div>
  6838. <div class="section-level-extent" id="dv_005ferror_005fmarker">
  6839. <h3 class="section"><span>13.6 dv_error_marker<a class="copiable-link" href="#dv_005ferror_005fmarker"> &para;</a></span></h3>
  6840. <p>Blocks in DV which are marked as damaged are replaced by blocks of the specified color.
  6841. </p>
  6842. <dl class="table">
  6843. <dt><samp class="option">color</samp></dt>
  6844. <dd><p>The color to replace damaged blocks by
  6845. </p></dd>
  6846. <dt><samp class="option">sta</samp></dt>
  6847. <dd><p>A 16 bit mask which specifies which of the 16 possible error status values are
  6848. to be replaced by colored blocks. 0xFFFE is the default which replaces all non 0
  6849. error status values.
  6850. </p><dl class="table">
  6851. <dt>&lsquo;<samp class="samp">ok</samp>&rsquo;</dt>
  6852. <dd><p>No error, no concealment
  6853. </p></dd>
  6854. <dt>&lsquo;<samp class="samp">err</samp>&rsquo;</dt>
  6855. <dd><p>Error, No concealment
  6856. </p></dd>
  6857. <dt>&lsquo;<samp class="samp">res</samp>&rsquo;</dt>
  6858. <dd><p>Reserved
  6859. </p></dd>
  6860. <dt>&lsquo;<samp class="samp">notok</samp>&rsquo;</dt>
  6861. <dd><p>Error or concealment
  6862. </p></dd>
  6863. <dt>&lsquo;<samp class="samp">notres</samp>&rsquo;</dt>
  6864. <dd><p>Not reserved
  6865. </p></dd>
  6866. <dt>&lsquo;<samp class="samp">Aa, Ba, Ca, Ab, Bb, Cb, A, B, C, a, b, erri, erru</samp>&rsquo;</dt>
  6867. <dd><p>The specific error status code
  6868. </p></dd>
  6869. </dl>
  6870. <p>see page 44-46 or section 5.5 of
  6871. <a class="url" href="http://web.archive.org/web/20060927044735/http://www.smpte.org/smpte_store/standards/pdf/s314m.pdf">http://web.archive.org/web/20060927044735/http://www.smpte.org/smpte_store/standards/pdf/s314m.pdf</a>
  6872. </p>
  6873. </dd>
  6874. </dl>
  6875. </div>
  6876. <div class="section-level-extent" id="eac3_005fcore">
  6877. <h3 class="section"><span>13.7 eac3_core<a class="copiable-link" href="#eac3_005fcore"> &para;</a></span></h3>
  6878. <p>Extract the core from a E-AC-3 stream, dropping extra channels.
  6879. </p>
  6880. </div>
  6881. <div class="section-level-extent" id="extract_005fextradata">
  6882. <h3 class="section"><span>13.8 extract_extradata<a class="copiable-link" href="#extract_005fextradata"> &para;</a></span></h3>
  6883. <p>Extract the in-band extradata.
  6884. </p>
  6885. <p>Certain codecs allow the long-term headers (e.g. MPEG-2 sequence headers,
  6886. or H.264/HEVC (VPS/)SPS/PPS) to be transmitted either &quot;in-band&quot; (i.e. as a part
  6887. of the bitstream containing the coded frames) or &quot;out of band&quot; (e.g. on the
  6888. container level). This latter form is called &quot;extradata&quot; in FFmpeg terminology.
  6889. </p>
  6890. <p>This bitstream filter detects the in-band headers and makes them available as
  6891. extradata.
  6892. </p>
  6893. <dl class="table">
  6894. <dt><samp class="option">remove</samp></dt>
  6895. <dd><p>When this option is enabled, the long-term headers are removed from the
  6896. bitstream after extraction.
  6897. </p></dd>
  6898. </dl>
  6899. </div>
  6900. <div class="section-level-extent" id="filter_005funits">
  6901. <h3 class="section"><span>13.9 filter_units<a class="copiable-link" href="#filter_005funits"> &para;</a></span></h3>
  6902. <p>Remove units with types in or not in a given set from the stream.
  6903. </p>
  6904. <dl class="table">
  6905. <dt><samp class="option">pass_types</samp></dt>
  6906. <dd><p>List of unit types or ranges of unit types to pass through while removing
  6907. all others. This is specified as a &rsquo;|&rsquo;-separated list of unit type values
  6908. or ranges of values with &rsquo;-&rsquo;.
  6909. </p>
  6910. </dd>
  6911. <dt><samp class="option">remove_types</samp></dt>
  6912. <dd><p>Identical to <samp class="option">pass_types</samp>, except the units in the given set
  6913. removed and all others passed through.
  6914. </p></dd>
  6915. </dl>
  6916. <p>The types used by pass_types and remove_types correspond to NAL unit types
  6917. (nal_unit_type) in H.264, HEVC and H.266 (see Table 7-1 in the H.264
  6918. and HEVC specifications or Table 5 in the H.266 specification), to
  6919. marker values for JPEG (without 0xFF prefix) and to start codes without
  6920. start code prefix (i.e. the byte following the 0x000001) for MPEG-2.
  6921. For VP8 and VP9, every unit has type zero.
  6922. </p>
  6923. <p>Extradata is unchanged by this transformation, but note that if the stream
  6924. contains inline parameter sets then the output may be unusable if they are
  6925. removed.
  6926. </p>
  6927. <p>For example, to remove all non-VCL NAL units from an H.264 stream:
  6928. </p><div class="example">
  6929. <pre class="example-preformatted">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT
  6930. </pre></div>
  6931. <p>To remove all AUDs, SEI and filler from an H.265 stream:
  6932. </p><div class="example">
  6933. <pre class="example-preformatted">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
  6934. </pre></div>
  6935. <p>To remove all user data from a MPEG-2 stream, including Closed Captions:
  6936. </p><div class="example">
  6937. <pre class="example-preformatted">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=178' OUTPUT
  6938. </pre></div>
  6939. <p>To remove all SEI from a H264 stream, including Closed Captions:
  6940. </p><div class="example">
  6941. <pre class="example-preformatted">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=6' OUTPUT
  6942. </pre></div>
  6943. <p>To remove all prefix and suffix SEI from a HEVC stream, including Closed Captions and dynamic HDR:
  6944. </p><div class="example">
  6945. <pre class="example-preformatted">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=39|40' OUTPUT
  6946. </pre></div>
  6947. </div>
  6948. <div class="section-level-extent" id="hapqa_005fextract">
  6949. <h3 class="section"><span>13.10 hapqa_extract<a class="copiable-link" href="#hapqa_005fextract"> &para;</a></span></h3>
  6950. <p>Extract Rgb or Alpha part of an HAPQA file, without recompression, in order to create an HAPQ or an HAPAlphaOnly file.
  6951. </p>
  6952. <dl class="table">
  6953. <dt><samp class="option">texture</samp></dt>
  6954. <dd><p>Specifies the texture to keep.
  6955. </p>
  6956. <dl class="table">
  6957. <dt><samp class="option">color</samp></dt>
  6958. <dt><samp class="option">alpha</samp></dt>
  6959. </dl>
  6960. </dd>
  6961. </dl>
  6962. <p>Convert HAPQA to HAPQ
  6963. </p><div class="example">
  6964. <pre class="example-preformatted">ffmpeg -i hapqa_inputfile.mov -c copy -bsf:v hapqa_extract=texture=color -tag:v HapY -metadata:s:v:0 encoder=&quot;HAPQ&quot; hapq_file.mov
  6965. </pre></div>
  6966. <p>Convert HAPQA to HAPAlphaOnly
  6967. </p><div class="example">
  6968. <pre class="example-preformatted">ffmpeg -i hapqa_inputfile.mov -c copy -bsf:v hapqa_extract=texture=alpha -tag:v HapA -metadata:s:v:0 encoder=&quot;HAPAlpha Only&quot; hapalphaonly_file.mov
  6969. </pre></div>
  6970. </div>
  6971. <div class="section-level-extent" id="h264_005fmetadata">
  6972. <h3 class="section"><span>13.11 h264_metadata<a class="copiable-link" href="#h264_005fmetadata"> &para;</a></span></h3>
  6973. <p>Modify metadata embedded in an H.264 stream.
  6974. </p>
  6975. <dl class="table">
  6976. <dt><samp class="option">aud</samp></dt>
  6977. <dd><p>Insert or remove AUD NAL units in all access units of the stream.
  6978. </p>
  6979. <dl class="table">
  6980. <dt>&lsquo;<samp class="samp">pass</samp>&rsquo;</dt>
  6981. <dt>&lsquo;<samp class="samp">insert</samp>&rsquo;</dt>
  6982. <dt>&lsquo;<samp class="samp">remove</samp>&rsquo;</dt>
  6983. </dl>
  6984. <p>Default is pass.
  6985. </p>
  6986. </dd>
  6987. <dt><samp class="option">sample_aspect_ratio</samp></dt>
  6988. <dd><p>Set the sample aspect ratio of the stream in the VUI parameters.
  6989. See H.264 table E-1.
  6990. </p>
  6991. </dd>
  6992. <dt><samp class="option">overscan_appropriate_flag</samp></dt>
  6993. <dd><p>Set whether the stream is suitable for display using overscan
  6994. or not (see H.264 section E.2.1).
  6995. </p>
  6996. </dd>
  6997. <dt><samp class="option">video_format</samp></dt>
  6998. <dt><samp class="option">video_full_range_flag</samp></dt>
  6999. <dd><p>Set the video format in the stream (see H.264 section E.2.1 and
  7000. table E-2).
  7001. </p>
  7002. </dd>
  7003. <dt><samp class="option">colour_primaries</samp></dt>
  7004. <dt><samp class="option">transfer_characteristics</samp></dt>
  7005. <dt><samp class="option">matrix_coefficients</samp></dt>
  7006. <dd><p>Set the colour description in the stream (see H.264 section E.2.1
  7007. and tables E-3, E-4 and E-5).
  7008. </p>
  7009. </dd>
  7010. <dt><samp class="option">chroma_sample_loc_type</samp></dt>
  7011. <dd><p>Set the chroma sample location in the stream (see H.264 section
  7012. E.2.1 and figure E-1).
  7013. </p>
  7014. </dd>
  7015. <dt><samp class="option">tick_rate</samp></dt>
  7016. <dd><p>Set the tick rate (time_scale / num_units_in_tick) in the VUI
  7017. parameters. This is the smallest time unit representable in the
  7018. stream, and in many cases represents the field rate of the stream
  7019. (double the frame rate).
  7020. </p></dd>
  7021. <dt><samp class="option">fixed_frame_rate_flag</samp></dt>
  7022. <dd><p>Set whether the stream has fixed framerate - typically this indicates
  7023. that the framerate is exactly half the tick rate, but the exact
  7024. meaning is dependent on interlacing and the picture structure (see
  7025. H.264 section E.2.1 and table E-6).
  7026. </p></dd>
  7027. <dt><samp class="option">zero_new_constraint_set_flags</samp></dt>
  7028. <dd><p>Zero constraint_set4_flag and constraint_set5_flag in the SPS. These
  7029. bits were reserved in a previous version of the H.264 spec, and thus
  7030. some hardware decoders require these to be zero. The result of zeroing
  7031. this is still a valid bitstream.
  7032. </p>
  7033. </dd>
  7034. <dt><samp class="option">crop_left</samp></dt>
  7035. <dt><samp class="option">crop_right</samp></dt>
  7036. <dt><samp class="option">crop_top</samp></dt>
  7037. <dt><samp class="option">crop_bottom</samp></dt>
  7038. <dd><p>Set the frame cropping offsets in the SPS. These values will replace
  7039. the current ones if the stream is already cropped.
  7040. </p>
  7041. <p>These fields are set in pixels. Note that some sizes may not be
  7042. representable if the chroma is subsampled or the stream is interlaced
  7043. (see H.264 section 7.4.2.1.1).
  7044. </p>
  7045. </dd>
  7046. <dt><samp class="option">sei_user_data</samp></dt>
  7047. <dd><p>Insert a string as SEI unregistered user data. The argument must
  7048. be of the form <em class="emph">UUID+string</em>, where the UUID is as hex digits
  7049. possibly separated by hyphens, and the string can be anything.
  7050. </p>
  7051. <p>For example, &lsquo;<samp class="samp">086f3693-b7b3-4f2c-9653-21492feee5b8+hello</samp>&rsquo; will
  7052. insert the string &ldquo;hello&rdquo; associated with the given UUID.
  7053. </p>
  7054. </dd>
  7055. <dt><samp class="option">delete_filler</samp></dt>
  7056. <dd><p>Deletes both filler NAL units and filler SEI messages.
  7057. </p>
  7058. </dd>
  7059. <dt><samp class="option">display_orientation</samp></dt>
  7060. <dd><p>Insert, extract or remove Display orientation SEI messages.
  7061. See H.264 section D.1.27 and D.2.27 for syntax and semantics.
  7062. </p>
  7063. <dl class="table">
  7064. <dt>&lsquo;<samp class="samp">pass</samp>&rsquo;</dt>
  7065. <dt>&lsquo;<samp class="samp">insert</samp>&rsquo;</dt>
  7066. <dt>&lsquo;<samp class="samp">remove</samp>&rsquo;</dt>
  7067. <dt>&lsquo;<samp class="samp">extract</samp>&rsquo;</dt>
  7068. </dl>
  7069. <p>Default is pass.
  7070. </p>
  7071. <p>Insert mode works in conjunction with <code class="code">rotate</code> and <code class="code">flip</code> options.
  7072. Any pre-existing Display orientation messages will be removed in insert or remove mode.
  7073. Extract mode attaches the display matrix to the packet as side data.
  7074. </p>
  7075. </dd>
  7076. <dt><samp class="option">rotate</samp></dt>
  7077. <dd><p>Set rotation in display orientation SEI (anticlockwise angle in degrees).
  7078. Range is -360 to +360. Default is NaN.
  7079. </p>
  7080. </dd>
  7081. <dt><samp class="option">flip</samp></dt>
  7082. <dd><p>Set flip in display orientation SEI.
  7083. </p>
  7084. <dl class="table">
  7085. <dt>&lsquo;<samp class="samp">horizontal</samp>&rsquo;</dt>
  7086. <dt>&lsquo;<samp class="samp">vertical</samp>&rsquo;</dt>
  7087. </dl>
  7088. <p>Default is unset.
  7089. </p>
  7090. </dd>
  7091. <dt><samp class="option">level</samp></dt>
  7092. <dd><p>Set the level in the SPS. Refer to H.264 section A.3 and tables A-1
  7093. to A-5.
  7094. </p>
  7095. <p>The argument must be the name of a level (for example, &lsquo;<samp class="samp">4.2</samp>&rsquo;), a
  7096. level_idc value (for example, &lsquo;<samp class="samp">42</samp>&rsquo;), or the special name &lsquo;<samp class="samp">auto</samp>&rsquo;
  7097. indicating that the filter should attempt to guess the level from the
  7098. input stream properties.
  7099. </p>
  7100. </dd>
  7101. </dl>
  7102. </div>
  7103. <div class="section-level-extent" id="h264_005fmp4toannexb">
  7104. <h3 class="section"><span>13.12 h264_mp4toannexb<a class="copiable-link" href="#h264_005fmp4toannexb"> &para;</a></span></h3>
  7105. <p>Convert an H.264 bitstream from length prefixed mode to start code
  7106. prefixed mode (as defined in the Annex B of the ITU-T H.264
  7107. specification).
  7108. </p>
  7109. <p>This is required by some streaming formats, typically the MPEG-2
  7110. transport stream format (muxer <code class="code">mpegts</code>).
  7111. </p>
  7112. <p>For example to remux an MP4 file containing an H.264 stream to mpegts
  7113. format with <code class="command">ffmpeg</code>, you can use the command:
  7114. </p>
  7115. <div class="example">
  7116. <pre class="example-preformatted">ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
  7117. </pre></div>
  7118. <p>Please note that this filter is auto-inserted for MPEG-TS (muxer
  7119. <code class="code">mpegts</code>) and raw H.264 (muxer <code class="code">h264</code>) output formats.
  7120. </p>
  7121. </div>
  7122. <div class="section-level-extent" id="h264_005fredundant_005fpps">
  7123. <h3 class="section"><span>13.13 h264_redundant_pps<a class="copiable-link" href="#h264_005fredundant_005fpps"> &para;</a></span></h3>
  7124. <p>This applies a specific fixup to some Blu-ray streams which contain
  7125. redundant PPSs modifying irrelevant parameters of the stream which
  7126. confuse other transformations which require correct extradata.
  7127. </p>
  7128. </div>
  7129. <div class="section-level-extent" id="hevc_005fmetadata">
  7130. <h3 class="section"><span>13.14 hevc_metadata<a class="copiable-link" href="#hevc_005fmetadata"> &para;</a></span></h3>
  7131. <p>Modify metadata embedded in an HEVC stream.
  7132. </p>
  7133. <dl class="table">
  7134. <dt><samp class="option">aud</samp></dt>
  7135. <dd><p>Insert or remove AUD NAL units in all access units of the stream.
  7136. </p>
  7137. <dl class="table">
  7138. <dt>&lsquo;<samp class="samp">insert</samp>&rsquo;</dt>
  7139. <dt>&lsquo;<samp class="samp">remove</samp>&rsquo;</dt>
  7140. </dl>
  7141. </dd>
  7142. <dt><samp class="option">sample_aspect_ratio</samp></dt>
  7143. <dd><p>Set the sample aspect ratio in the stream in the VUI parameters.
  7144. </p>
  7145. </dd>
  7146. <dt><samp class="option">video_format</samp></dt>
  7147. <dt><samp class="option">video_full_range_flag</samp></dt>
  7148. <dd><p>Set the video format in the stream (see H.265 section E.3.1 and
  7149. table E.2).
  7150. </p>
  7151. </dd>
  7152. <dt><samp class="option">colour_primaries</samp></dt>
  7153. <dt><samp class="option">transfer_characteristics</samp></dt>
  7154. <dt><samp class="option">matrix_coefficients</samp></dt>
  7155. <dd><p>Set the colour description in the stream (see H.265 section E.3.1
  7156. and tables E.3, E.4 and E.5).
  7157. </p>
  7158. </dd>
  7159. <dt><samp class="option">chroma_sample_loc_type</samp></dt>
  7160. <dd><p>Set the chroma sample location in the stream (see H.265 section
  7161. E.3.1 and figure E.1).
  7162. </p>
  7163. </dd>
  7164. <dt><samp class="option">tick_rate</samp></dt>
  7165. <dd><p>Set the tick rate in the VPS and VUI parameters (time_scale /
  7166. num_units_in_tick). Combined with <samp class="option">num_ticks_poc_diff_one</samp>, this can
  7167. set a constant framerate in the stream. Note that it is likely to be
  7168. overridden by container parameters when the stream is in a container.
  7169. </p>
  7170. </dd>
  7171. <dt><samp class="option">num_ticks_poc_diff_one</samp></dt>
  7172. <dd><p>Set poc_proportional_to_timing_flag in VPS and VUI and use this value
  7173. to set num_ticks_poc_diff_one_minus1 (see H.265 sections 7.4.3.1 and
  7174. E.3.1). Ignored if <samp class="option">tick_rate</samp> is not also set.
  7175. </p>
  7176. </dd>
  7177. <dt><samp class="option">crop_left</samp></dt>
  7178. <dt><samp class="option">crop_right</samp></dt>
  7179. <dt><samp class="option">crop_top</samp></dt>
  7180. <dt><samp class="option">crop_bottom</samp></dt>
  7181. <dd><p>Set the conformance window cropping offsets in the SPS. These values
  7182. will replace the current ones if the stream is already cropped.
  7183. </p>
  7184. <p>These fields are set in pixels. Note that some sizes may not be
  7185. representable if the chroma is subsampled (H.265 section 7.4.3.2.1).
  7186. </p>
  7187. </dd>
  7188. <dt><samp class="option">level</samp></dt>
  7189. <dd><p>Set the level in the VPS and SPS. See H.265 section A.4 and tables
  7190. A.6 and A.7.
  7191. </p>
  7192. <p>The argument must be the name of a level (for example, &lsquo;<samp class="samp">5.1</samp>&rsquo;), a
  7193. <em class="emph">general_level_idc</em> value (for example, &lsquo;<samp class="samp">153</samp>&rsquo; for level 5.1),
  7194. or the special name &lsquo;<samp class="samp">auto</samp>&rsquo; indicating that the filter should
  7195. attempt to guess the level from the input stream properties.
  7196. </p>
  7197. </dd>
  7198. </dl>
  7199. </div>
  7200. <div class="section-level-extent" id="hevc_005fmp4toannexb">
  7201. <h3 class="section"><span>13.15 hevc_mp4toannexb<a class="copiable-link" href="#hevc_005fmp4toannexb"> &para;</a></span></h3>
  7202. <p>Convert an HEVC/H.265 bitstream from length prefixed mode to start code
  7203. prefixed mode (as defined in the Annex B of the ITU-T H.265
  7204. specification).
  7205. </p>
  7206. <p>This is required by some streaming formats, typically the MPEG-2
  7207. transport stream format (muxer <code class="code">mpegts</code>).
  7208. </p>
  7209. <p>For example to remux an MP4 file containing an HEVC stream to mpegts
  7210. format with <code class="command">ffmpeg</code>, you can use the command:
  7211. </p>
  7212. <div class="example">
  7213. <pre class="example-preformatted">ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
  7214. </pre></div>
  7215. <p>Please note that this filter is auto-inserted for MPEG-TS (muxer
  7216. <code class="code">mpegts</code>) and raw HEVC/H.265 (muxer <code class="code">h265</code> or
  7217. <code class="code">hevc</code>) output formats.
  7218. </p>
  7219. </div>
  7220. <div class="section-level-extent" id="imxdump">
  7221. <h3 class="section"><span>13.16 imxdump<a class="copiable-link" href="#imxdump"> &para;</a></span></h3>
  7222. <p>Modifies the bitstream to fit in MOV and to be usable by the Final Cut
  7223. Pro decoder. This filter only applies to the mpeg2video codec, and is
  7224. likely not needed for Final Cut Pro 7 and newer with the appropriate
  7225. <samp class="option">-tag:v</samp>.
  7226. </p>
  7227. <p>For example, to remux 30 MB/sec NTSC IMX to MOV:
  7228. </p>
  7229. <div class="example">
  7230. <pre class="example-preformatted">ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
  7231. </pre></div>
  7232. </div>
  7233. <div class="section-level-extent" id="mjpeg2jpeg">
  7234. <h3 class="section"><span>13.17 mjpeg2jpeg<a class="copiable-link" href="#mjpeg2jpeg"> &para;</a></span></h3>
  7235. <p>Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
  7236. </p>
  7237. <p>MJPEG is a video codec wherein each video frame is essentially a
  7238. JPEG image. The individual frames can be extracted without loss,
  7239. e.g. by
  7240. </p>
  7241. <div class="example">
  7242. <pre class="example-preformatted">ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
  7243. </pre></div>
  7244. <p>Unfortunately, these chunks are incomplete JPEG images, because
  7245. they lack the DHT segment required for decoding. Quoting from
  7246. <a class="url" href="http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml">http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml</a>:
  7247. </p>
  7248. <p>Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
  7249. commented that &quot;MJPEG, or at least the MJPEG in AVIs having the
  7250. MJPG fourcc, is restricted JPEG with a fixed &ndash; and *omitted* &ndash;
  7251. Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2,
  7252. and it must use basic Huffman encoding, not arithmetic or
  7253. progressive. . . . You can indeed extract the MJPEG frames and
  7254. decode them with a regular JPEG decoder, but you have to prepend
  7255. the DHT segment to them, or else the decoder won&rsquo;t have any idea
  7256. how to decompress the data. The exact table necessary is given in
  7257. the OpenDML spec.&quot;
  7258. </p>
  7259. <p>This bitstream filter patches the header of frames extracted from an MJPEG
  7260. stream (carrying the AVI1 header ID and lacking a DHT segment) to
  7261. produce fully qualified JPEG images.
  7262. </p>
  7263. <div class="example">
  7264. <pre class="example-preformatted">ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
  7265. exiftran -i -9 frame*.jpg
  7266. ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
  7267. </pre></div>
  7268. </div>
  7269. <div class="section-level-extent" id="mjpegadump">
  7270. <h3 class="section"><span>13.18 mjpegadump<a class="copiable-link" href="#mjpegadump"> &para;</a></span></h3>
  7271. <p>Add an MJPEG A header to the bitstream, to enable decoding by
  7272. Quicktime.
  7273. </p>
  7274. <a class="anchor" id="mov2textsub"></a></div>
  7275. <div class="section-level-extent" id="mov2textsub-1">
  7276. <h3 class="section"><span>13.19 mov2textsub<a class="copiable-link" href="#mov2textsub-1"> &para;</a></span></h3>
  7277. <p>Extract a representable text file from MOV subtitles, stripping the
  7278. metadata header from each subtitle packet.
  7279. </p>
  7280. <p>See also the <a class="ref" href="#text2movsub">text2movsub</a> filter.
  7281. </p>
  7282. </div>
  7283. <div class="section-level-extent" id="mpeg2_005fmetadata">
  7284. <h3 class="section"><span>13.20 mpeg2_metadata<a class="copiable-link" href="#mpeg2_005fmetadata"> &para;</a></span></h3>
  7285. <p>Modify metadata embedded in an MPEG-2 stream.
  7286. </p>
  7287. <dl class="table">
  7288. <dt><samp class="option">display_aspect_ratio</samp></dt>
  7289. <dd><p>Set the display aspect ratio in the stream.
  7290. </p>
  7291. <p>The following fixed values are supported:
  7292. </p><dl class="table">
  7293. <dt><samp class="option">4/3</samp></dt>
  7294. <dt><samp class="option">16/9</samp></dt>
  7295. <dt><samp class="option">221/100</samp></dt>
  7296. </dl>
  7297. <p>Any other value will result in square pixels being signalled instead
  7298. (see H.262 section 6.3.3 and table 6-3).
  7299. </p>
  7300. </dd>
  7301. <dt><samp class="option">frame_rate</samp></dt>
  7302. <dd><p>Set the frame rate in the stream. This is constructed from a table
  7303. of known values combined with a small multiplier and divisor - if
  7304. the supplied value is not exactly representable, the nearest
  7305. representable value will be used instead (see H.262 section 6.3.3
  7306. and table 6-4).
  7307. </p>
  7308. </dd>
  7309. <dt><samp class="option">video_format</samp></dt>
  7310. <dd><p>Set the video format in the stream (see H.262 section 6.3.6 and
  7311. table 6-6).
  7312. </p>
  7313. </dd>
  7314. <dt><samp class="option">colour_primaries</samp></dt>
  7315. <dt><samp class="option">transfer_characteristics</samp></dt>
  7316. <dt><samp class="option">matrix_coefficients</samp></dt>
  7317. <dd><p>Set the colour description in the stream (see H.262 section 6.3.6
  7318. and tables 6-7, 6-8 and 6-9).
  7319. </p>
  7320. </dd>
  7321. </dl>
  7322. </div>
  7323. <div class="section-level-extent" id="mpeg4_005funpack_005fbframes">
  7324. <h3 class="section"><span>13.21 mpeg4_unpack_bframes<a class="copiable-link" href="#mpeg4_005funpack_005fbframes"> &para;</a></span></h3>
  7325. <p>Unpack DivX-style packed B-frames.
  7326. </p>
  7327. <p>DivX-style packed B-frames are not valid MPEG-4 and were only a
  7328. workaround for the broken Video for Windows subsystem.
  7329. They use more space, can cause minor AV sync issues, require more
  7330. CPU power to decode (unless the player has some decoded picture queue
  7331. to compensate the 2,0,2,0 frame per packet style) and cause
  7332. trouble if copied into a standard container like mp4 or mpeg-ps/ts,
  7333. because MPEG-4 decoders may not be able to decode them, since they are
  7334. not valid MPEG-4.
  7335. </p>
  7336. <p>For example to fix an AVI file containing an MPEG-4 stream with
  7337. DivX-style packed B-frames using <code class="command">ffmpeg</code>, you can use the command:
  7338. </p>
  7339. <div class="example">
  7340. <pre class="example-preformatted">ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
  7341. </pre></div>
  7342. </div>
  7343. <div class="section-level-extent" id="noise">
  7344. <h3 class="section"><span>13.22 noise<a class="copiable-link" href="#noise"> &para;</a></span></h3>
  7345. <p>Damages the contents of packets or simply drops them without damaging the
  7346. container. Can be used for fuzzing or testing error resilience/concealment.
  7347. </p>
  7348. <p>Parameters:
  7349. </p><dl class="table">
  7350. <dt><samp class="option">amount</samp></dt>
  7351. <dd><p>Accepts an expression whose evaluation per-packet determines how often bytes in that
  7352. packet will be modified. A value below 0 will result in a variable frequency.
  7353. Default is 0 which results in no modification. However, if neither amount nor drop is specified,
  7354. amount will be set to <var class="var">-1</var>. See below for accepted variables.
  7355. </p></dd>
  7356. <dt><samp class="option">drop</samp></dt>
  7357. <dd><p>Accepts an expression evaluated per-packet whose value determines whether that packet is dropped.
  7358. Evaluation to a positive value results in the packet being dropped. Evaluation to a negative
  7359. value results in a variable chance of it being dropped, roughly inverse in proportion to the magnitude
  7360. of the value. Default is 0 which results in no drops. See below for accepted variables.
  7361. </p></dd>
  7362. <dt><samp class="option">dropamount</samp></dt>
  7363. <dd><p>Accepts a non-negative integer, which assigns a variable chance of it being dropped, roughly inverse
  7364. in proportion to the value. Default is 0 which results in no drops. This option is kept for backwards
  7365. compatibility and is equivalent to setting drop to a negative value with the same magnitude
  7366. i.e. <code class="code">dropamount=4</code> is the same as <code class="code">drop=-4</code>. Ignored if drop is also specified.
  7367. </p></dd>
  7368. </dl>
  7369. <p>Both <code class="code">amount</code> and <code class="code">drop</code> accept expressions containing the following variables:
  7370. </p>
  7371. <dl class="table">
  7372. <dt>&lsquo;<samp class="samp">n</samp>&rsquo;</dt>
  7373. <dd><p>The index of the packet, starting from zero.
  7374. </p></dd>
  7375. <dt>&lsquo;<samp class="samp">tb</samp>&rsquo;</dt>
  7376. <dd><p>The timebase for packet timestamps.
  7377. </p></dd>
  7378. <dt>&lsquo;<samp class="samp">pts</samp>&rsquo;</dt>
  7379. <dd><p>Packet presentation timestamp.
  7380. </p></dd>
  7381. <dt>&lsquo;<samp class="samp">dts</samp>&rsquo;</dt>
  7382. <dd><p>Packet decoding timestamp.
  7383. </p></dd>
  7384. <dt>&lsquo;<samp class="samp">nopts</samp>&rsquo;</dt>
  7385. <dd><p>Constant representing AV_NOPTS_VALUE.
  7386. </p></dd>
  7387. <dt>&lsquo;<samp class="samp">startpts</samp>&rsquo;</dt>
  7388. <dd><p>First non-AV_NOPTS_VALUE PTS seen in the stream.
  7389. </p></dd>
  7390. <dt>&lsquo;<samp class="samp">startdts</samp>&rsquo;</dt>
  7391. <dd><p>First non-AV_NOPTS_VALUE DTS seen in the stream.
  7392. </p></dd>
  7393. <dt>&lsquo;<samp class="samp">duration</samp>&rsquo;</dt>
  7394. <dt>&lsquo;<samp class="samp">d</samp>&rsquo;</dt>
  7395. <dd><p>Packet duration, in timebase units.
  7396. </p></dd>
  7397. <dt>&lsquo;<samp class="samp">pos</samp>&rsquo;</dt>
  7398. <dd><p>Packet position in input; may be -1 when unknown or not set.
  7399. </p></dd>
  7400. <dt>&lsquo;<samp class="samp">size</samp>&rsquo;</dt>
  7401. <dd><p>Packet size, in bytes.
  7402. </p></dd>
  7403. <dt>&lsquo;<samp class="samp">key</samp>&rsquo;</dt>
  7404. <dd><p>Whether packet is marked as a keyframe.
  7405. </p></dd>
  7406. <dt>&lsquo;<samp class="samp">state</samp>&rsquo;</dt>
  7407. <dd><p>A pseudo random integer, primarily derived from the content of packet payload.
  7408. </p></dd>
  7409. </dl>
  7410. <ul class="mini-toc">
  7411. <li><a href="#Examples-2" accesskey="1">Examples</a></li>
  7412. </ul>
  7413. <div class="subsection-level-extent" id="Examples-2">
  7414. <h4 class="subsection"><span>13.22.1 Examples<a class="copiable-link" href="#Examples-2"> &para;</a></span></h4>
  7415. <p>Apply modification to every byte but don&rsquo;t drop any packets.
  7416. </p><div class="example">
  7417. <pre class="example-preformatted">ffmpeg -i INPUT -c copy -bsf noise=1 output.mkv
  7418. </pre></div>
  7419. <p>Drop every video packet not marked as a keyframe after timestamp 30s but do not
  7420. modify any of the remaining packets.
  7421. </p><div class="example">
  7422. <pre class="example-preformatted">ffmpeg -i INPUT -c copy -bsf:v noise=drop='gt(t\,30)*not(key)' output.mkv
  7423. </pre></div>
  7424. <p>Drop one second of audio every 10 seconds and add some random noise to the rest.
  7425. </p><div class="example">
  7426. <pre class="example-preformatted">ffmpeg -i INPUT -c copy -bsf:a noise=amount=-1:drop='between(mod(t\,10)\,9\,10)' output.mkv
  7427. </pre></div>
  7428. </div>
  7429. </div>
  7430. <div class="section-level-extent" id="null">
  7431. <h3 class="section"><span>13.23 null<a class="copiable-link" href="#null"> &para;</a></span></h3>
  7432. <p>This bitstream filter passes the packets through unchanged.
  7433. </p>
  7434. </div>
  7435. <div class="section-level-extent" id="pcm_005frechunk">
  7436. <h3 class="section"><span>13.24 pcm_rechunk<a class="copiable-link" href="#pcm_005frechunk"> &para;</a></span></h3>
  7437. <p>Repacketize PCM audio to a fixed number of samples per packet or a fixed packet
  7438. rate per second. This is similar to the <a data-manual="ffmpeg-filters" href="ffmpeg-filters.html#asetnsamples">asetnsamples audio
  7439. filter</a> but works on audio packets instead of audio frames.
  7440. </p>
  7441. <dl class="table">
  7442. <dt><samp class="option">nb_out_samples, n</samp></dt>
  7443. <dd><p>Set the number of samples per each output audio packet. The number is intended
  7444. as the number of samples <em class="emph">per each channel</em>. Default value is 1024.
  7445. </p>
  7446. </dd>
  7447. <dt><samp class="option">pad, p</samp></dt>
  7448. <dd><p>If set to 1, the filter will pad the last audio packet with silence, so that it
  7449. will contain the same number of samples (or roughly the same number of samples,
  7450. see <samp class="option">frame_rate</samp>) as the previous ones. Default value is 1.
  7451. </p>
  7452. </dd>
  7453. <dt><samp class="option">frame_rate, r</samp></dt>
  7454. <dd><p>This option makes the filter output a fixed number of packets per second instead
  7455. of a fixed number of samples per packet. If the audio sample rate is not
  7456. divisible by the frame rate then the number of samples will not be constant but
  7457. will vary slightly so that each packet will start as close to the frame
  7458. boundary as possible. Using this option has precedence over <samp class="option">nb_out_samples</samp>.
  7459. </p></dd>
  7460. </dl>
  7461. <p>You can generate the well known 1602-1601-1602-1601-1602 pattern of 48kHz audio
  7462. for NTSC frame rate using the <samp class="option">frame_rate</samp> option.
  7463. </p><div class="example">
  7464. <pre class="example-preformatted">ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
  7465. </pre></div>
  7466. </div>
  7467. <div class="section-level-extent" id="pgs_005fframe_005fmerge">
  7468. <h3 class="section"><span>13.25 pgs_frame_merge<a class="copiable-link" href="#pgs_005fframe_005fmerge"> &para;</a></span></h3>
  7469. <p>Merge a sequence of PGS Subtitle segments ending with an &quot;end of display set&quot;
  7470. segment into a single packet.
  7471. </p>
  7472. <p>This is required by some containers that support PGS subtitles
  7473. (muxer <code class="code">matroska</code>).
  7474. </p>
  7475. </div>
  7476. <div class="section-level-extent" id="prores_005fmetadata">
  7477. <h3 class="section"><span>13.26 prores_metadata<a class="copiable-link" href="#prores_005fmetadata"> &para;</a></span></h3>
  7478. <p>Modify color property metadata embedded in prores stream.
  7479. </p>
  7480. <dl class="table">
  7481. <dt><samp class="option">color_primaries</samp></dt>
  7482. <dd><p>Set the color primaries.
  7483. Available values are:
  7484. </p>
  7485. <dl class="table">
  7486. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  7487. <dd><p>Keep the same color primaries property (default).
  7488. </p>
  7489. </dd>
  7490. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  7491. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  7492. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  7493. <dd><p>BT601 625
  7494. </p>
  7495. </dd>
  7496. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  7497. <dd><p>BT601 525
  7498. </p>
  7499. </dd>
  7500. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  7501. <dt>&lsquo;<samp class="samp">smpte431</samp>&rsquo;</dt>
  7502. <dd><p>DCI P3
  7503. </p>
  7504. </dd>
  7505. <dt>&lsquo;<samp class="samp">smpte432</samp>&rsquo;</dt>
  7506. <dd><p>P3 D65
  7507. </p>
  7508. </dd>
  7509. </dl>
  7510. </dd>
  7511. <dt><samp class="option">transfer_characteristics</samp></dt>
  7512. <dd><p>Set the color transfer.
  7513. Available values are:
  7514. </p>
  7515. <dl class="table">
  7516. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  7517. <dd><p>Keep the same transfer characteristics property (default).
  7518. </p>
  7519. </dd>
  7520. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  7521. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  7522. <dd><p>BT 601, BT 709, BT 2020
  7523. </p></dd>
  7524. <dt>&lsquo;<samp class="samp">smpte2084</samp>&rsquo;</dt>
  7525. <dd><p>SMPTE ST 2084
  7526. </p></dd>
  7527. <dt>&lsquo;<samp class="samp">arib-std-b67</samp>&rsquo;</dt>
  7528. <dd><p>ARIB STD-B67
  7529. </p></dd>
  7530. </dl>
  7531. </dd>
  7532. <dt><samp class="option">matrix_coefficients</samp></dt>
  7533. <dd><p>Set the matrix coefficient.
  7534. Available values are:
  7535. </p>
  7536. <dl class="table">
  7537. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  7538. <dd><p>Keep the same colorspace property (default).
  7539. </p>
  7540. </dd>
  7541. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  7542. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  7543. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  7544. <dd><p>BT 601
  7545. </p>
  7546. </dd>
  7547. <dt>&lsquo;<samp class="samp">bt2020nc</samp>&rsquo;</dt>
  7548. </dl>
  7549. </dd>
  7550. </dl>
  7551. <p>Set Rec709 colorspace for each frame of the file
  7552. </p><div class="example">
  7553. <pre class="example-preformatted">ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
  7554. </pre></div>
  7555. <p>Set Hybrid Log-Gamma parameters for each frame of the file
  7556. </p><div class="example">
  7557. <pre class="example-preformatted">ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov
  7558. </pre></div>
  7559. </div>
  7560. <div class="section-level-extent" id="remove_005fextra">
  7561. <h3 class="section"><span>13.27 remove_extra<a class="copiable-link" href="#remove_005fextra"> &para;</a></span></h3>
  7562. <p>Remove extradata from packets.
  7563. </p>
  7564. <p>It accepts the following parameter:
  7565. </p><dl class="table">
  7566. <dt><samp class="option">freq</samp></dt>
  7567. <dd><p>Set which frame types to remove extradata from.
  7568. </p>
  7569. <dl class="table">
  7570. <dt>&lsquo;<samp class="samp">k</samp>&rsquo;</dt>
  7571. <dd><p>Remove extradata from non-keyframes only.
  7572. </p>
  7573. </dd>
  7574. <dt>&lsquo;<samp class="samp">keyframe</samp>&rsquo;</dt>
  7575. <dd><p>Remove extradata from keyframes only.
  7576. </p>
  7577. </dd>
  7578. <dt>&lsquo;<samp class="samp">e, all</samp>&rsquo;</dt>
  7579. <dd><p>Remove extradata from all frames.
  7580. </p>
  7581. </dd>
  7582. </dl>
  7583. </dd>
  7584. </dl>
  7585. </div>
  7586. <div class="section-level-extent" id="setts">
  7587. <h3 class="section"><span>13.28 setts<a class="copiable-link" href="#setts"> &para;</a></span></h3>
  7588. <p>Set PTS and DTS in packets.
  7589. </p>
  7590. <p>It accepts the following parameters:
  7591. </p><dl class="table">
  7592. <dt><samp class="option">ts</samp></dt>
  7593. <dt><samp class="option">pts</samp></dt>
  7594. <dt><samp class="option">dts</samp></dt>
  7595. <dd><p>Set expressions for PTS, DTS or both.
  7596. </p></dd>
  7597. <dt><samp class="option">duration</samp></dt>
  7598. <dd><p>Set expression for duration.
  7599. </p></dd>
  7600. <dt><samp class="option">time_base</samp></dt>
  7601. <dd><p>Set output time base.
  7602. </p></dd>
  7603. </dl>
  7604. <p>The expressions are evaluated through the eval API and can contain the following
  7605. constants:
  7606. </p>
  7607. <dl class="table">
  7608. <dt><samp class="option">N</samp></dt>
  7609. <dd><p>The count of the input packet. Starting from 0.
  7610. </p>
  7611. </dd>
  7612. <dt><samp class="option">TS</samp></dt>
  7613. <dd><p>The demux timestamp in input in case of <code class="code">ts</code> or <code class="code">dts</code> option or presentation
  7614. timestamp in case of <code class="code">pts</code> option.
  7615. </p>
  7616. </dd>
  7617. <dt><samp class="option">POS</samp></dt>
  7618. <dd><p>The original position in the file of the packet, or undefined if undefined
  7619. for the current packet
  7620. </p>
  7621. </dd>
  7622. <dt><samp class="option">DTS</samp></dt>
  7623. <dd><p>The demux timestamp in input.
  7624. </p>
  7625. </dd>
  7626. <dt><samp class="option">PTS</samp></dt>
  7627. <dd><p>The presentation timestamp in input.
  7628. </p>
  7629. </dd>
  7630. <dt><samp class="option">DURATION</samp></dt>
  7631. <dd><p>The duration in input.
  7632. </p>
  7633. </dd>
  7634. <dt><samp class="option">STARTDTS</samp></dt>
  7635. <dd><p>The DTS of the first packet.
  7636. </p>
  7637. </dd>
  7638. <dt><samp class="option">STARTPTS</samp></dt>
  7639. <dd><p>The PTS of the first packet.
  7640. </p>
  7641. </dd>
  7642. <dt><samp class="option">PREV_INDTS</samp></dt>
  7643. <dd><p>The previous input DTS.
  7644. </p>
  7645. </dd>
  7646. <dt><samp class="option">PREV_INPTS</samp></dt>
  7647. <dd><p>The previous input PTS.
  7648. </p>
  7649. </dd>
  7650. <dt><samp class="option">PREV_INDURATION</samp></dt>
  7651. <dd><p>The previous input duration.
  7652. </p>
  7653. </dd>
  7654. <dt><samp class="option">PREV_OUTDTS</samp></dt>
  7655. <dd><p>The previous output DTS.
  7656. </p>
  7657. </dd>
  7658. <dt><samp class="option">PREV_OUTPTS</samp></dt>
  7659. <dd><p>The previous output PTS.
  7660. </p>
  7661. </dd>
  7662. <dt><samp class="option">PREV_OUTDURATION</samp></dt>
  7663. <dd><p>The previous output duration.
  7664. </p>
  7665. </dd>
  7666. <dt><samp class="option">NEXT_DTS</samp></dt>
  7667. <dd><p>The next input DTS.
  7668. </p>
  7669. </dd>
  7670. <dt><samp class="option">NEXT_PTS</samp></dt>
  7671. <dd><p>The next input PTS.
  7672. </p>
  7673. </dd>
  7674. <dt><samp class="option">NEXT_DURATION</samp></dt>
  7675. <dd><p>The next input duration.
  7676. </p>
  7677. </dd>
  7678. <dt><samp class="option">TB</samp></dt>
  7679. <dd><p>The timebase of stream packet belongs.
  7680. </p>
  7681. </dd>
  7682. <dt><samp class="option">TB_OUT</samp></dt>
  7683. <dd><p>The output timebase.
  7684. </p>
  7685. </dd>
  7686. <dt><samp class="option">SR</samp></dt>
  7687. <dd><p>The sample rate of stream packet belongs.
  7688. </p>
  7689. </dd>
  7690. <dt><samp class="option">NOPTS</samp></dt>
  7691. <dd><p>The AV_NOPTS_VALUE constant.
  7692. </p></dd>
  7693. </dl>
  7694. <p>For example, to set PTS equal to DTS (not recommended if B-frames are involved):
  7695. </p><div class="example">
  7696. <pre class="example-preformatted">ffmpeg -i INPUT -c:a copy -bsf:a setts=pts=DTS out.mkv
  7697. </pre></div>
  7698. </div>
  7699. <div class="section-level-extent" id="showinfo">
  7700. <h3 class="section"><span>13.29 showinfo<a class="copiable-link" href="#showinfo"> &para;</a></span></h3>
  7701. <p>Log basic packet information. Mainly useful for testing, debugging,
  7702. and development.
  7703. </p>
  7704. <a class="anchor" id="text2movsub"></a></div>
  7705. <div class="section-level-extent" id="text2movsub-1">
  7706. <h3 class="section"><span>13.30 text2movsub<a class="copiable-link" href="#text2movsub-1"> &para;</a></span></h3>
  7707. <p>Convert text subtitles to MOV subtitles (as used by the <code class="code">mov_text</code>
  7708. codec) with metadata headers.
  7709. </p>
  7710. <p>See also the <a class="ref" href="#mov2textsub">mov2textsub</a> filter.
  7711. </p>
  7712. </div>
  7713. <div class="section-level-extent" id="trace_005fheaders">
  7714. <h3 class="section"><span>13.31 trace_headers<a class="copiable-link" href="#trace_005fheaders"> &para;</a></span></h3>
  7715. <p>Log trace output containing all syntax elements in the coded stream
  7716. headers (everything above the level of individual coded blocks).
  7717. This can be useful for debugging low-level stream issues.
  7718. </p>
  7719. <p>Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending
  7720. on the build only a subset of these may be available.
  7721. </p>
  7722. </div>
  7723. <div class="section-level-extent" id="truehd_005fcore">
  7724. <h3 class="section"><span>13.32 truehd_core<a class="copiable-link" href="#truehd_005fcore"> &para;</a></span></h3>
  7725. <p>Extract the core from a TrueHD stream, dropping ATMOS data.
  7726. </p>
  7727. </div>
  7728. <div class="section-level-extent" id="vp9_005fmetadata">
  7729. <h3 class="section"><span>13.33 vp9_metadata<a class="copiable-link" href="#vp9_005fmetadata"> &para;</a></span></h3>
  7730. <p>Modify metadata embedded in a VP9 stream.
  7731. </p>
  7732. <dl class="table">
  7733. <dt><samp class="option">color_space</samp></dt>
  7734. <dd><p>Set the color space value in the frame header. Note that any frame
  7735. set to RGB will be implicitly set to PC range and that RGB is
  7736. incompatible with profiles 0 and 2.
  7737. </p><dl class="table">
  7738. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  7739. <dt>&lsquo;<samp class="samp">bt601</samp>&rsquo;</dt>
  7740. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  7741. <dt>&lsquo;<samp class="samp">smpte170</samp>&rsquo;</dt>
  7742. <dt>&lsquo;<samp class="samp">smpte240</samp>&rsquo;</dt>
  7743. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  7744. <dt>&lsquo;<samp class="samp">rgb</samp>&rsquo;</dt>
  7745. </dl>
  7746. </dd>
  7747. <dt><samp class="option">color_range</samp></dt>
  7748. <dd><p>Set the color range value in the frame header. Note that any value
  7749. imposed by the color space will take precedence over this value.
  7750. </p><dl class="table">
  7751. <dt>&lsquo;<samp class="samp">tv</samp>&rsquo;</dt>
  7752. <dt>&lsquo;<samp class="samp">pc</samp>&rsquo;</dt>
  7753. </dl>
  7754. </dd>
  7755. </dl>
  7756. </div>
  7757. <div class="section-level-extent" id="vp9_005fsuperframe">
  7758. <h3 class="section"><span>13.34 vp9_superframe<a class="copiable-link" href="#vp9_005fsuperframe"> &para;</a></span></h3>
  7759. <p>Merge VP9 invisible (alt-ref) frames back into VP9 superframes. This
  7760. fixes merging of split/segmented VP9 streams where the alt-ref frame
  7761. was split from its visible counterpart.
  7762. </p>
  7763. </div>
  7764. <div class="section-level-extent" id="vp9_005fsuperframe_005fsplit">
  7765. <h3 class="section"><span>13.35 vp9_superframe_split<a class="copiable-link" href="#vp9_005fsuperframe_005fsplit"> &para;</a></span></h3>
  7766. <p>Split VP9 superframes into single frames.
  7767. </p>
  7768. </div>
  7769. <div class="section-level-extent" id="vp9_005fraw_005freorder">
  7770. <h3 class="section"><span>13.36 vp9_raw_reorder<a class="copiable-link" href="#vp9_005fraw_005freorder"> &para;</a></span></h3>
  7771. <p>Given a VP9 stream with correct timestamps but possibly out of order,
  7772. insert additional show-existing-frame packets to correct the ordering.
  7773. </p>
  7774. </div>
  7775. </div>
  7776. <div class="chapter-level-extent" id="Format-Options">
  7777. <h2 class="chapter"><span>14 Format Options<a class="copiable-link" href="#Format-Options"> &para;</a></span></h2>
  7778. <p>The libavformat library provides some generic global options, which
  7779. can be set on all the muxers and demuxers. In addition each muxer or
  7780. demuxer may support so-called private options, which are specific for
  7781. that component.
  7782. </p>
  7783. <p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the
  7784. FFmpeg tools, or by setting the value explicitly in the
  7785. <code class="code">AVFormatContext</code> options or using the <samp class="file">libavutil/opt.h</samp> API
  7786. for programmatic use.
  7787. </p>
  7788. <p>The list of supported options follows:
  7789. </p>
  7790. <dl class="table">
  7791. <dt><samp class="option">avioflags <var class="var">flags</var> (<em class="emph">input/output</em>)</samp></dt>
  7792. <dd><p>Possible values:
  7793. </p><dl class="table">
  7794. <dt>&lsquo;<samp class="samp">direct</samp>&rsquo;</dt>
  7795. <dd><p>Reduce buffering.
  7796. </p></dd>
  7797. </dl>
  7798. </dd>
  7799. <dt><samp class="option">probesize <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7800. <dd><p>Set probing size in bytes, i.e. the size of the data to analyze to get
  7801. stream information. A higher value will enable detecting more
  7802. information in case it is dispersed into the stream, but will increase
  7803. latency. Must be an integer not lesser than 32. It is 5000000 by default.
  7804. </p>
  7805. </dd>
  7806. <dt><samp class="option">max_probe_packets <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7807. <dd><p>Set the maximum number of buffered packets when probing a codec.
  7808. Default is 2500 packets.
  7809. </p>
  7810. </dd>
  7811. <dt><samp class="option">packetsize <var class="var">integer</var> (<em class="emph">output</em>)</samp></dt>
  7812. <dd><p>Set packet size.
  7813. </p>
  7814. </dd>
  7815. <dt><samp class="option">fflags <var class="var">flags</var></samp></dt>
  7816. <dd><p>Set format flags. Some are implemented for a limited number of formats.
  7817. </p>
  7818. <p>Possible values for input files:
  7819. </p><dl class="table">
  7820. <dt>&lsquo;<samp class="samp">discardcorrupt</samp>&rsquo;</dt>
  7821. <dd><p>Discard corrupted packets.
  7822. </p></dd>
  7823. <dt>&lsquo;<samp class="samp">fastseek</samp>&rsquo;</dt>
  7824. <dd><p>Enable fast, but inaccurate seeks for some formats.
  7825. </p></dd>
  7826. <dt>&lsquo;<samp class="samp">genpts</samp>&rsquo;</dt>
  7827. <dd><p>Generate missing PTS if DTS is present.
  7828. </p></dd>
  7829. <dt>&lsquo;<samp class="samp">igndts</samp>&rsquo;</dt>
  7830. <dd><p>Ignore DTS if PTS is also set. In case the PTS is set, the DTS value
  7831. is set to NOPTS. This is ignored when the <code class="code">nofillin</code> flag is set.
  7832. </p></dd>
  7833. <dt>&lsquo;<samp class="samp">ignidx</samp>&rsquo;</dt>
  7834. <dd><p>Ignore index.
  7835. </p></dd>
  7836. <dt>&lsquo;<samp class="samp">nobuffer</samp>&rsquo;</dt>
  7837. <dd><p>Reduce the latency introduced by buffering during initial input streams analysis.
  7838. </p></dd>
  7839. <dt>&lsquo;<samp class="samp">nofillin</samp>&rsquo;</dt>
  7840. <dd><p>Do not fill in missing values in packet fields that can be exactly calculated.
  7841. </p></dd>
  7842. <dt>&lsquo;<samp class="samp">noparse</samp>&rsquo;</dt>
  7843. <dd><p>Disable AVParsers, this needs <code class="code">+nofillin</code> too.
  7844. </p></dd>
  7845. <dt>&lsquo;<samp class="samp">sortdts</samp>&rsquo;</dt>
  7846. <dd><p>Try to interleave output packets by DTS. At present, available only for AVIs with an index.
  7847. </p></dd>
  7848. </dl>
  7849. <p>Possible values for output files:
  7850. </p><dl class="table">
  7851. <dt>&lsquo;<samp class="samp">autobsf</samp>&rsquo;</dt>
  7852. <dd><p>Automatically apply bitstream filters as required by the output format. Enabled by default.
  7853. </p></dd>
  7854. <dt>&lsquo;<samp class="samp">bitexact</samp>&rsquo;</dt>
  7855. <dd><p>Only write platform-, build- and time-independent data.
  7856. This ensures that file and data checksums are reproducible and match between
  7857. platforms. Its primary use is for regression testing.
  7858. </p></dd>
  7859. <dt>&lsquo;<samp class="samp">flush_packets</samp>&rsquo;</dt>
  7860. <dd><p>Write out packets immediately.
  7861. </p></dd>
  7862. <dt>&lsquo;<samp class="samp">shortest</samp>&rsquo;</dt>
  7863. <dd><p>Stop muxing at the end of the shortest stream.
  7864. It may be needed to increase max_interleave_delta to avoid flushing the longer
  7865. streams before EOF.
  7866. </p></dd>
  7867. </dl>
  7868. </dd>
  7869. <dt><samp class="option">seek2any <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7870. <dd><p>Allow seeking to non-keyframes on demuxer level when supported if set to 1.
  7871. Default is 0.
  7872. </p>
  7873. </dd>
  7874. <dt><samp class="option">analyzeduration <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7875. <dd><p>Specify how many microseconds are analyzed to probe the input. A
  7876. higher value will enable detecting more accurate information, but will
  7877. increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
  7878. </p>
  7879. </dd>
  7880. <dt><samp class="option">cryptokey <var class="var">hexadecimal string</var> (<em class="emph">input</em>)</samp></dt>
  7881. <dd><p>Set decryption key.
  7882. </p>
  7883. </dd>
  7884. <dt><samp class="option">indexmem <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7885. <dd><p>Set max memory used for timestamp index (per stream).
  7886. </p>
  7887. </dd>
  7888. <dt><samp class="option">rtbufsize <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7889. <dd><p>Set max memory used for buffering real-time frames.
  7890. </p>
  7891. </dd>
  7892. <dt><samp class="option">fdebug <var class="var">flags</var> (<em class="emph">input/output</em>)</samp></dt>
  7893. <dd><p>Print specific debug info.
  7894. </p>
  7895. <p>Possible values:
  7896. </p><dl class="table">
  7897. <dt>&lsquo;<samp class="samp">ts</samp>&rsquo;</dt>
  7898. </dl>
  7899. </dd>
  7900. <dt><samp class="option">max_delay <var class="var">integer</var> (<em class="emph">input/output</em>)</samp></dt>
  7901. <dd><p>Set maximum muxing or demuxing delay in microseconds.
  7902. </p>
  7903. </dd>
  7904. <dt><samp class="option">fpsprobesize <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7905. <dd><p>Set number of frames used to probe fps.
  7906. </p>
  7907. </dd>
  7908. <dt><samp class="option">audio_preload <var class="var">integer</var> (<em class="emph">output</em>)</samp></dt>
  7909. <dd><p>Set microseconds by which audio packets should be interleaved earlier.
  7910. </p>
  7911. </dd>
  7912. <dt><samp class="option">chunk_duration <var class="var">integer</var> (<em class="emph">output</em>)</samp></dt>
  7913. <dd><p>Set microseconds for each chunk.
  7914. </p>
  7915. </dd>
  7916. <dt><samp class="option">chunk_size <var class="var">integer</var> (<em class="emph">output</em>)</samp></dt>
  7917. <dd><p>Set size in bytes for each chunk.
  7918. </p>
  7919. </dd>
  7920. <dt><samp class="option">err_detect, f_err_detect <var class="var">flags</var> (<em class="emph">input</em>)</samp></dt>
  7921. <dd><p>Set error detection flags. <code class="code">f_err_detect</code> is deprecated and
  7922. should be used only via the <code class="command">ffmpeg</code> tool.
  7923. </p>
  7924. <p>Possible values:
  7925. </p><dl class="table">
  7926. <dt>&lsquo;<samp class="samp">crccheck</samp>&rsquo;</dt>
  7927. <dd><p>Verify embedded CRCs.
  7928. </p></dd>
  7929. <dt>&lsquo;<samp class="samp">bitstream</samp>&rsquo;</dt>
  7930. <dd><p>Detect bitstream specification deviations.
  7931. </p></dd>
  7932. <dt>&lsquo;<samp class="samp">buffer</samp>&rsquo;</dt>
  7933. <dd><p>Detect improper bitstream length.
  7934. </p></dd>
  7935. <dt>&lsquo;<samp class="samp">explode</samp>&rsquo;</dt>
  7936. <dd><p>Abort decoding on minor error detection.
  7937. </p></dd>
  7938. <dt>&lsquo;<samp class="samp">careful</samp>&rsquo;</dt>
  7939. <dd><p>Consider things that violate the spec and have not been seen in the
  7940. wild as errors.
  7941. </p></dd>
  7942. <dt>&lsquo;<samp class="samp">compliant</samp>&rsquo;</dt>
  7943. <dd><p>Consider all spec non compliancies as errors.
  7944. </p></dd>
  7945. <dt>&lsquo;<samp class="samp">aggressive</samp>&rsquo;</dt>
  7946. <dd><p>Consider things that a sane encoder should not do as an error.
  7947. </p></dd>
  7948. </dl>
  7949. </dd>
  7950. <dt><samp class="option">max_interleave_delta <var class="var">integer</var> (<em class="emph">output</em>)</samp></dt>
  7951. <dd><p>Set maximum buffering duration for interleaving. The duration is
  7952. expressed in microseconds, and defaults to 10000000 (10 seconds).
  7953. </p>
  7954. <p>To ensure all the streams are interleaved correctly, libavformat will
  7955. wait until it has at least one packet for each stream before actually
  7956. writing any packets to the output file. When some streams are
  7957. &quot;sparse&quot; (i.e. there are large gaps between successive packets), this
  7958. can result in excessive buffering.
  7959. </p>
  7960. <p>This field specifies the maximum difference between the timestamps of the
  7961. first and the last packet in the muxing queue, above which libavformat
  7962. will output a packet regardless of whether it has queued a packet for all
  7963. the streams.
  7964. </p>
  7965. <p>If set to 0, libavformat will continue buffering packets until it has
  7966. a packet for each stream, regardless of the maximum timestamp
  7967. difference between the buffered packets.
  7968. </p>
  7969. </dd>
  7970. <dt><samp class="option">use_wallclock_as_timestamps <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  7971. <dd><p>Use wallclock as timestamps if set to 1. Default is 0.
  7972. </p>
  7973. </dd>
  7974. <dt><samp class="option">avoid_negative_ts <var class="var">integer</var> (<em class="emph">output</em>)</samp></dt>
  7975. <dd>
  7976. <p>Possible values:
  7977. </p><dl class="table">
  7978. <dt>&lsquo;<samp class="samp">make_non_negative</samp>&rsquo;</dt>
  7979. <dd><p>Shift timestamps to make them non-negative.
  7980. Also note that this affects only leading negative timestamps, and not
  7981. non-monotonic negative timestamps.
  7982. </p></dd>
  7983. <dt>&lsquo;<samp class="samp">make_zero</samp>&rsquo;</dt>
  7984. <dd><p>Shift timestamps so that the first timestamp is 0.
  7985. </p></dd>
  7986. <dt>&lsquo;<samp class="samp">auto (default)</samp>&rsquo;</dt>
  7987. <dd><p>Enables shifting when required by the target format.
  7988. </p></dd>
  7989. <dt>&lsquo;<samp class="samp">disabled</samp>&rsquo;</dt>
  7990. <dd><p>Disables shifting of timestamp.
  7991. </p></dd>
  7992. </dl>
  7993. <p>When shifting is enabled, all output timestamps are shifted by the
  7994. same amount. Audio, video, and subtitles desynching and relative
  7995. timestamp differences are preserved compared to how they would have
  7996. been without shifting.
  7997. </p>
  7998. </dd>
  7999. <dt><samp class="option">skip_initial_bytes <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  8000. <dd><p>Set number of bytes to skip before reading header and frames if set to 1.
  8001. Default is 0.
  8002. </p>
  8003. </dd>
  8004. <dt><samp class="option">correct_ts_overflow <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  8005. <dd><p>Correct single timestamp overflows if set to 1. Default is 1.
  8006. </p>
  8007. </dd>
  8008. <dt><samp class="option">flush_packets <var class="var">integer</var> (<em class="emph">output</em>)</samp></dt>
  8009. <dd><p>Flush the underlying I/O stream after each packet. Default is -1 (auto), which
  8010. means that the underlying protocol will decide, 1 enables it, and has the
  8011. effect of reducing the latency, 0 disables it and may increase IO throughput in
  8012. some cases.
  8013. </p>
  8014. </dd>
  8015. <dt><samp class="option">output_ts_offset <var class="var">offset</var> (<em class="emph">output</em>)</samp></dt>
  8016. <dd><p>Set the output time offset.
  8017. </p>
  8018. <p><var class="var">offset</var> must be a time duration specification,
  8019. see <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>.
  8020. </p>
  8021. <p>The offset is added by the muxer to the output timestamps.
  8022. </p>
  8023. <p>Specifying a positive offset means that the corresponding streams are
  8024. delayed bt the time duration specified in <var class="var">offset</var>. Default value
  8025. is <code class="code">0</code> (meaning that no offset is applied).
  8026. </p>
  8027. </dd>
  8028. <dt><samp class="option">format_whitelist <var class="var">list</var> (<em class="emph">input</em>)</samp></dt>
  8029. <dd><p>&quot;,&quot; separated list of allowed demuxers. By default all are allowed.
  8030. </p>
  8031. </dd>
  8032. <dt><samp class="option">dump_separator <var class="var">string</var> (<em class="emph">input</em>)</samp></dt>
  8033. <dd><p>Separator used to separate the fields printed on the command line about the
  8034. Stream parameters.
  8035. For example, to separate the fields with newlines and indentation:
  8036. </p><div class="example">
  8037. <pre class="example-preformatted">ffprobe -dump_separator &quot;
  8038. &quot; -i ~/videos/matrixbench_mpeg2.mpg
  8039. </pre></div>
  8040. </dd>
  8041. <dt><samp class="option">max_streams <var class="var">integer</var> (<em class="emph">input</em>)</samp></dt>
  8042. <dd><p>Specifies the maximum number of streams. This can be used to reject files that
  8043. would require too many resources due to a large number of streams.
  8044. </p>
  8045. </dd>
  8046. <dt><samp class="option">skip_estimate_duration_from_pts <var class="var">bool</var> (<em class="emph">input</em>)</samp></dt>
  8047. <dd><p>Skip estimation of input duration when calculated using PTS.
  8048. At present, applicable for MPEG-PS and MPEG-TS.
  8049. </p>
  8050. </dd>
  8051. <dt><samp class="option">strict, f_strict <var class="var">integer</var> (<em class="emph">input/output</em>)</samp></dt>
  8052. <dd><p>Specify how strictly to follow the standards. <code class="code">f_strict</code> is deprecated and
  8053. should be used only via the <code class="command">ffmpeg</code> tool.
  8054. </p>
  8055. <p>Possible values:
  8056. </p><dl class="table">
  8057. <dt>&lsquo;<samp class="samp">very</samp>&rsquo;</dt>
  8058. <dd><p>strictly conform to an older more strict version of the spec or reference software
  8059. </p></dd>
  8060. <dt>&lsquo;<samp class="samp">strict</samp>&rsquo;</dt>
  8061. <dd><p>strictly conform to all the things in the spec no matter what consequences
  8062. </p></dd>
  8063. <dt>&lsquo;<samp class="samp">normal</samp>&rsquo;</dt>
  8064. <dt>&lsquo;<samp class="samp">unofficial</samp>&rsquo;</dt>
  8065. <dd><p>allow unofficial extensions
  8066. </p></dd>
  8067. <dt>&lsquo;<samp class="samp">experimental</samp>&rsquo;</dt>
  8068. <dd><p>allow non standardized experimental things, experimental
  8069. (unfinished/work in progress/not well tested) decoders and encoders.
  8070. Note: experimental decoders can pose a security risk, do not use this for
  8071. decoding untrusted input.
  8072. </p></dd>
  8073. </dl>
  8074. </dd>
  8075. </dl>
  8076. <a class="anchor" id="Format-stream-specifiers"></a><ul class="mini-toc">
  8077. <li><a href="#Format-stream-specifiers-1" accesskey="1">Format stream specifiers</a></li>
  8078. </ul>
  8079. <div class="section-level-extent" id="Format-stream-specifiers-1">
  8080. <h3 class="section"><span>14.1 Format stream specifiers<a class="copiable-link" href="#Format-stream-specifiers-1"> &para;</a></span></h3>
  8081. <p>Format stream specifiers allow selection of one or more streams that
  8082. match specific properties.
  8083. </p>
  8084. <p>The exact semantics of stream specifiers is defined by the
  8085. <code class="code">avformat_match_stream_specifier()</code> function declared in the
  8086. <samp class="file">libavformat/avformat.h</samp> header and documented in the
  8087. <a data-manual="ffmpeg" href="ffmpeg.html#Stream-specifiers">Stream specifiers section in the ffmpeg(1) manual</a>.
  8088. </p>
  8089. </div>
  8090. </div>
  8091. <div class="chapter-level-extent" id="Demuxers">
  8092. <h2 class="chapter"><span>15 Demuxers<a class="copiable-link" href="#Demuxers"> &para;</a></span></h2>
  8093. <p>Demuxers are configured elements in FFmpeg that can read the
  8094. multimedia streams from a particular type of file.
  8095. </p>
  8096. <p>When you configure your FFmpeg build, all the supported demuxers
  8097. are enabled by default. You can list all available ones using the
  8098. configure option <code class="code">--list-demuxers</code>.
  8099. </p>
  8100. <p>You can disable all the demuxers using the configure option
  8101. <code class="code">--disable-demuxers</code>, and selectively enable a single demuxer with
  8102. the option <code class="code">--enable-demuxer=<var class="var">DEMUXER</var></code>, or disable it
  8103. with the option <code class="code">--disable-demuxer=<var class="var">DEMUXER</var></code>.
  8104. </p>
  8105. <p>The option <code class="code">-demuxers</code> of the ff* tools will display the list of
  8106. enabled demuxers. Use <code class="code">-formats</code> to view a combined list of
  8107. enabled demuxers and muxers.
  8108. </p>
  8109. <p>The description of some of the currently available demuxers follows.
  8110. </p>
  8111. <ul class="mini-toc">
  8112. <li><a href="#aa" accesskey="1">aa</a></li>
  8113. <li><a href="#aac" accesskey="2">aac</a></li>
  8114. <li><a href="#apng" accesskey="3">apng</a></li>
  8115. <li><a href="#asf" accesskey="4">asf</a></li>
  8116. <li><a href="#concat-1" accesskey="5">concat</a></li>
  8117. <li><a href="#dash" accesskey="6">dash</a></li>
  8118. <li><a href="#dvdvideo" accesskey="7">dvdvideo</a></li>
  8119. <li><a href="#ea" accesskey="8">ea</a></li>
  8120. <li><a href="#imf" accesskey="9">imf</a></li>
  8121. <li><a href="#flv_002c-live_005fflv_002c-kux">flv, live_flv, kux</a></li>
  8122. <li><a href="#gif">gif</a></li>
  8123. <li><a href="#hls">hls</a></li>
  8124. <li><a href="#image2">image2</a></li>
  8125. <li><a href="#libgme">libgme</a></li>
  8126. <li><a href="#libmodplug">libmodplug</a></li>
  8127. <li><a href="#libopenmpt">libopenmpt</a></li>
  8128. <li><a href="#mov_002fmp4_002f3gp">mov/mp4/3gp</a></li>
  8129. <li><a href="#mpegts">mpegts</a></li>
  8130. <li><a href="#mpjpeg">mpjpeg</a></li>
  8131. <li><a href="#rawvideo-1">rawvideo</a></li>
  8132. <li><a href="#sbg">sbg</a></li>
  8133. <li><a href="#tedcaptions">tedcaptions</a></li>
  8134. <li><a href="#vapoursynth">vapoursynth</a></li>
  8135. <li><a href="#w64">w64</a></li>
  8136. <li><a href="#wav-1">wav</a></li>
  8137. </ul>
  8138. <div class="section-level-extent" id="aa">
  8139. <h3 class="section"><span>15.1 aa<a class="copiable-link" href="#aa"> &para;</a></span></h3>
  8140. <p>Audible Format 2, 3, and 4 demuxer.
  8141. </p>
  8142. <p>This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files.
  8143. </p>
  8144. </div>
  8145. <div class="section-level-extent" id="aac">
  8146. <h3 class="section"><span>15.2 aac<a class="copiable-link" href="#aac"> &para;</a></span></h3>
  8147. <p>Raw Audio Data Transport Stream AAC demuxer.
  8148. </p>
  8149. <p>This demuxer is used to demux an ADTS input containing a single AAC stream
  8150. alongwith any ID3v1/2 or APE tags in it.
  8151. </p>
  8152. </div>
  8153. <div class="section-level-extent" id="apng">
  8154. <h3 class="section"><span>15.3 apng<a class="copiable-link" href="#apng"> &para;</a></span></h3>
  8155. <p>Animated Portable Network Graphics demuxer.
  8156. </p>
  8157. <p>This demuxer is used to demux APNG files.
  8158. All headers, but the PNG signature, up to (but not including) the first
  8159. fcTL chunk are transmitted as extradata.
  8160. Frames are then split as being all the chunks between two fcTL ones, or
  8161. between the last fcTL and IEND chunks.
  8162. </p>
  8163. <dl class="table">
  8164. <dt><samp class="option">-ignore_loop <var class="var">bool</var></samp></dt>
  8165. <dd><p>Ignore the loop variable in the file if set. Default is enabled.
  8166. </p>
  8167. </dd>
  8168. <dt><samp class="option">-max_fps <var class="var">int</var></samp></dt>
  8169. <dd><p>Maximum framerate in frames per second. Default of 0 imposes no limit.
  8170. </p>
  8171. </dd>
  8172. <dt><samp class="option">-default_fps <var class="var">int</var></samp></dt>
  8173. <dd><p>Default framerate in frames per second when none is specified in the file
  8174. (0 meaning as fast as possible). Default is 15.
  8175. </p>
  8176. </dd>
  8177. </dl>
  8178. </div>
  8179. <div class="section-level-extent" id="asf">
  8180. <h3 class="section"><span>15.4 asf<a class="copiable-link" href="#asf"> &para;</a></span></h3>
  8181. <p>Advanced Systems Format demuxer.
  8182. </p>
  8183. <p>This demuxer is used to demux ASF files and MMS network streams.
  8184. </p>
  8185. <dl class="table">
  8186. <dt><samp class="option">-no_resync_search <var class="var">bool</var></samp></dt>
  8187. <dd><p>Do not try to resynchronize by looking for a certain optional start code.
  8188. </p></dd>
  8189. </dl>
  8190. <a class="anchor" id="concat"></a></div>
  8191. <div class="section-level-extent" id="concat-1">
  8192. <h3 class="section"><span>15.5 concat<a class="copiable-link" href="#concat-1"> &para;</a></span></h3>
  8193. <p>Virtual concatenation script demuxer.
  8194. </p>
  8195. <p>This demuxer reads a list of files and other directives from a text file and
  8196. demuxes them one after the other, as if all their packets had been muxed
  8197. together.
  8198. </p>
  8199. <p>The timestamps in the files are adjusted so that the first file starts at 0
  8200. and each next file starts where the previous one finishes. Note that it is
  8201. done globally and may cause gaps if all streams do not have exactly the same
  8202. length.
  8203. </p>
  8204. <p>All files must have the same streams (same codecs, same time base, etc.).
  8205. </p>
  8206. <p>The duration of each file is used to adjust the timestamps of the next file:
  8207. if the duration is incorrect (because it was computed using the bit-rate or
  8208. because the file is truncated, for example), it can cause artifacts. The
  8209. <code class="code">duration</code> directive can be used to override the duration stored in
  8210. each file.
  8211. </p>
  8212. <ul class="mini-toc">
  8213. <li><a href="#Syntax-1" accesskey="1">Syntax</a></li>
  8214. <li><a href="#Options-11" accesskey="2">Options</a></li>
  8215. <li><a href="#Examples-3" accesskey="3">Examples</a></li>
  8216. </ul>
  8217. <div class="subsection-level-extent" id="Syntax-1">
  8218. <h4 class="subsection"><span>15.5.1 Syntax<a class="copiable-link" href="#Syntax-1"> &para;</a></span></h4>
  8219. <p>The script is a text file in extended-ASCII, with one directive per line.
  8220. Empty lines, leading spaces and lines starting with &rsquo;#&rsquo; are ignored. The
  8221. following directive is recognized:
  8222. </p>
  8223. <dl class="table">
  8224. <dt><samp class="option"><code class="code">file <var class="var">path</var></code></samp></dt>
  8225. <dd><p>Path to a file to read; special characters and spaces must be escaped with
  8226. backslash or single quotes.
  8227. </p>
  8228. <p>All subsequent file-related directives apply to that file.
  8229. </p>
  8230. </dd>
  8231. <dt><samp class="option"><code class="code">ffconcat version 1.0</code></samp></dt>
  8232. <dd><p>Identify the script type and version.
  8233. </p>
  8234. <p>To make FFmpeg recognize the format automatically, this directive must
  8235. appear exactly as is (no extra space or byte-order-mark) on the very first
  8236. line of the script.
  8237. </p>
  8238. </dd>
  8239. <dt><samp class="option"><code class="code">duration <var class="var">dur</var></code></samp></dt>
  8240. <dd><p>Duration of the file. This information can be specified from the file;
  8241. specifying it here may be more efficient or help if the information from the
  8242. file is not available or accurate.
  8243. </p>
  8244. <p>If the duration is set for all files, then it is possible to seek in the
  8245. whole concatenated video.
  8246. </p>
  8247. </dd>
  8248. <dt><samp class="option"><code class="code">inpoint <var class="var">timestamp</var></code></samp></dt>
  8249. <dd><p>In point of the file. When the demuxer opens the file it instantly seeks to the
  8250. specified timestamp. Seeking is done so that all streams can be presented
  8251. successfully at In point.
  8252. </p>
  8253. <p>This directive works best with intra frame codecs, because for non-intra frame
  8254. ones you will usually get extra packets before the actual In point and the
  8255. decoded content will most likely contain frames before In point too.
  8256. </p>
  8257. <p>For each file, packets before the file In point will have timestamps less than
  8258. the calculated start timestamp of the file (negative in case of the first
  8259. file), and the duration of the files (if not specified by the <code class="code">duration</code>
  8260. directive) will be reduced based on their specified In point.
  8261. </p>
  8262. <p>Because of potential packets before the specified In point, packet timestamps
  8263. may overlap between two concatenated files.
  8264. </p>
  8265. </dd>
  8266. <dt><samp class="option"><code class="code">outpoint <var class="var">timestamp</var></code></samp></dt>
  8267. <dd><p>Out point of the file. When the demuxer reaches the specified decoding
  8268. timestamp in any of the streams, it handles it as an end of file condition and
  8269. skips the current and all the remaining packets from all streams.
  8270. </p>
  8271. <p>Out point is exclusive, which means that the demuxer will not output packets
  8272. with a decoding timestamp greater or equal to Out point.
  8273. </p>
  8274. <p>This directive works best with intra frame codecs and formats where all streams
  8275. are tightly interleaved. For non-intra frame codecs you will usually get
  8276. additional packets with presentation timestamp after Out point therefore the
  8277. decoded content will most likely contain frames after Out point too. If your
  8278. streams are not tightly interleaved you may not get all the packets from all
  8279. streams before Out point and you may only will be able to decode the earliest
  8280. stream until Out point.
  8281. </p>
  8282. <p>The duration of the files (if not specified by the <code class="code">duration</code>
  8283. directive) will be reduced based on their specified Out point.
  8284. </p>
  8285. </dd>
  8286. <dt><samp class="option"><code class="code">file_packet_metadata <var class="var">key=value</var></code></samp></dt>
  8287. <dd><p>Metadata of the packets of the file. The specified metadata will be set for
  8288. each file packet. You can specify this directive multiple times to add multiple
  8289. metadata entries.
  8290. This directive is deprecated, use <code class="code">file_packet_meta</code> instead.
  8291. </p>
  8292. </dd>
  8293. <dt><samp class="option"><code class="code">file_packet_meta <var class="var">key</var> <var class="var">value</var></code></samp></dt>
  8294. <dd><p>Metadata of the packets of the file. The specified metadata will be set for
  8295. each file packet. You can specify this directive multiple times to add multiple
  8296. metadata entries.
  8297. </p>
  8298. </dd>
  8299. <dt><samp class="option"><code class="code">option <var class="var">key</var> <var class="var">value</var></code></samp></dt>
  8300. <dd><p>Option to access, open and probe the file.
  8301. Can be present multiple times.
  8302. </p>
  8303. </dd>
  8304. <dt><samp class="option"><code class="code">stream</code></samp></dt>
  8305. <dd><p>Introduce a stream in the virtual file.
  8306. All subsequent stream-related directives apply to the last introduced
  8307. stream.
  8308. Some streams properties must be set in order to allow identifying the
  8309. matching streams in the subfiles.
  8310. If no streams are defined in the script, the streams from the first file are
  8311. copied.
  8312. </p>
  8313. </dd>
  8314. <dt><samp class="option"><code class="code">exact_stream_id <var class="var">id</var></code></samp></dt>
  8315. <dd><p>Set the id of the stream.
  8316. If this directive is given, the string with the corresponding id in the
  8317. subfiles will be used.
  8318. This is especially useful for MPEG-PS (VOB) files, where the order of the
  8319. streams is not reliable.
  8320. </p>
  8321. </dd>
  8322. <dt><samp class="option"><code class="code">stream_meta <var class="var">key</var> <var class="var">value</var></code></samp></dt>
  8323. <dd><p>Metadata for the stream.
  8324. Can be present multiple times.
  8325. </p>
  8326. </dd>
  8327. <dt><samp class="option"><code class="code">stream_codec <var class="var">value</var></code></samp></dt>
  8328. <dd><p>Codec for the stream.
  8329. </p>
  8330. </dd>
  8331. <dt><samp class="option"><code class="code">stream_extradata <var class="var">hex_string</var></code></samp></dt>
  8332. <dd><p>Extradata for the string, encoded in hexadecimal.
  8333. </p>
  8334. </dd>
  8335. <dt><samp class="option"><code class="code">chapter <var class="var">id</var> <var class="var">start</var> <var class="var">end</var></code></samp></dt>
  8336. <dd><p>Add a chapter. <var class="var">id</var> is an unique identifier, possibly small and
  8337. consecutive.
  8338. </p>
  8339. </dd>
  8340. </dl>
  8341. </div>
  8342. <div class="subsection-level-extent" id="Options-11">
  8343. <h4 class="subsection"><span>15.5.2 Options<a class="copiable-link" href="#Options-11"> &para;</a></span></h4>
  8344. <p>This demuxer accepts the following option:
  8345. </p>
  8346. <dl class="table">
  8347. <dt><samp class="option">safe</samp></dt>
  8348. <dd><p>If set to 1, reject unsafe file paths and directives.
  8349. A file path is considered safe if it
  8350. does not contain a protocol specification and is relative and all components
  8351. only contain characters from the portable character set (letters, digits,
  8352. period, underscore and hyphen) and have no period at the beginning of a
  8353. component.
  8354. </p>
  8355. <p>If set to 0, any file name is accepted.
  8356. </p>
  8357. <p>The default is 1.
  8358. </p>
  8359. </dd>
  8360. <dt><samp class="option">auto_convert</samp></dt>
  8361. <dd><p>If set to 1, try to perform automatic conversions on packet data to make the
  8362. streams concatenable.
  8363. The default is 1.
  8364. </p>
  8365. <p>Currently, the only conversion is adding the h264_mp4toannexb bitstream
  8366. filter to H.264 streams in MP4 format. This is necessary in particular if
  8367. there are resolution changes.
  8368. </p>
  8369. </dd>
  8370. <dt><samp class="option">segment_time_metadata</samp></dt>
  8371. <dd><p>If set to 1, every packet will contain the <var class="var">lavf.concat.start_time</var> and the
  8372. <var class="var">lavf.concat.duration</var> packet metadata values which are the start_time and
  8373. the duration of the respective file segments in the concatenated output
  8374. expressed in microseconds. The duration metadata is only set if it is known
  8375. based on the concat file.
  8376. The default is 0.
  8377. </p>
  8378. </dd>
  8379. </dl>
  8380. </div>
  8381. <div class="subsection-level-extent" id="Examples-3">
  8382. <h4 class="subsection"><span>15.5.3 Examples<a class="copiable-link" href="#Examples-3"> &para;</a></span></h4>
  8383. <ul class="itemize mark-bullet">
  8384. <li>Use absolute filenames and include some comments:
  8385. <div class="example">
  8386. <pre class="example-preformatted"># my first filename
  8387. file /mnt/share/file-1.wav
  8388. # my second filename including whitespace
  8389. file '/mnt/share/file 2.wav'
  8390. # my third filename including whitespace plus single quote
  8391. file '/mnt/share/file 3'\''.wav'
  8392. </pre></div>
  8393. </li><li>Allow for input format auto-probing, use safe filenames and set the duration of
  8394. the first file:
  8395. <div class="example">
  8396. <pre class="example-preformatted">ffconcat version 1.0
  8397. file file-1.wav
  8398. duration 20.0
  8399. file subdir/file-2.wav
  8400. </pre></div>
  8401. </li></ul>
  8402. </div>
  8403. </div>
  8404. <div class="section-level-extent" id="dash">
  8405. <h3 class="section"><span>15.6 dash<a class="copiable-link" href="#dash"> &para;</a></span></h3>
  8406. <p>Dynamic Adaptive Streaming over HTTP demuxer.
  8407. </p>
  8408. <p>This demuxer presents all AVStreams found in the manifest.
  8409. By setting the discard flags on AVStreams the caller can decide
  8410. which streams to actually receive.
  8411. Each stream mirrors the <code class="code">id</code> and <code class="code">bandwidth</code> properties from the
  8412. <code class="code">&lt;Representation&gt;</code> as metadata keys named &quot;id&quot; and &quot;variant_bitrate&quot; respectively.
  8413. </p>
  8414. <ul class="mini-toc">
  8415. <li><a href="#Options-12" accesskey="1">Options</a></li>
  8416. </ul>
  8417. <div class="subsection-level-extent" id="Options-12">
  8418. <h4 class="subsection"><span>15.6.1 Options<a class="copiable-link" href="#Options-12"> &para;</a></span></h4>
  8419. <p>This demuxer accepts the following option:
  8420. </p>
  8421. <dl class="table">
  8422. <dt><samp class="option">cenc_decryption_key</samp></dt>
  8423. <dd><p>16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
  8424. </p>
  8425. </dd>
  8426. </dl>
  8427. </div>
  8428. </div>
  8429. <div class="section-level-extent" id="dvdvideo">
  8430. <h3 class="section"><span>15.7 dvdvideo<a class="copiable-link" href="#dvdvideo"> &para;</a></span></h3>
  8431. <p>DVD-Video demuxer, powered by libdvdnav and libdvdread.
  8432. </p>
  8433. <p>Can directly ingest DVD titles, specifically sequential PGCs, into
  8434. a conversion pipeline. Menu assets, such as background video or audio,
  8435. can also be demuxed given the menu&rsquo;s coordinates (at best effort).
  8436. Seeking is not supported at this time.
  8437. </p>
  8438. <p>Block devices (DVD drives), ISO files, and directory structures are accepted.
  8439. Activate with <code class="code">-f dvdvideo</code> in front of one of these inputs.
  8440. </p>
  8441. <p>This demuxer does NOT have decryption code of any kind. You are on your own
  8442. working with encrypted DVDs, and should not expect support on the matter.
  8443. </p>
  8444. <p>Underlying playback is handled by libdvdnav, and structure parsing by libdvdread.
  8445. FFmpeg must be built with GPL library support available as well as the
  8446. configure switches <code class="code">--enable-libdvdnav</code> and <code class="code">--enable-libdvdread</code>.
  8447. </p>
  8448. <p>You will need to provide either the desired &quot;title number&quot; or exact PGC/PG coordinates.
  8449. Many open-source DVD players and tools can aid in providing this information.
  8450. If not specified, the demuxer will default to title 1 which works for many discs.
  8451. However, due to the flexibility of the format, it is recommended to check manually.
  8452. There are many discs that are authored strangely or with invalid headers.
  8453. </p>
  8454. <p>If the input is a real DVD drive, please note that there are some drives which may
  8455. silently fail on reading bad sectors from the disc, returning random bits instead
  8456. which is effectively corrupt data. This is especially prominent on aging or rotting discs.
  8457. A second pass and integrity checks would be needed to detect the corruption.
  8458. This is not an FFmpeg issue.
  8459. </p>
  8460. <ul class="mini-toc">
  8461. <li><a href="#Background" accesskey="1">Background</a></li>
  8462. <li><a href="#Options-13" accesskey="2">Options</a></li>
  8463. <li><a href="#Examples-4" accesskey="3">Examples</a></li>
  8464. </ul>
  8465. <div class="subsection-level-extent" id="Background">
  8466. <h4 class="subsection"><span>15.7.1 Background<a class="copiable-link" href="#Background"> &para;</a></span></h4>
  8467. <p>DVD-Video is not a directly accessible, linear container format in the
  8468. traditional sense. Instead, it allows for complex and programmatic playback of
  8469. carefully muxed MPEG-PS streams that are stored in headerless VOB files.
  8470. To the end-user, these streams are known simply as &quot;titles&quot;, but the actual
  8471. logical playback sequence is defined by one or more &quot;PGCs&quot;, or Program Group Chains,
  8472. within the title. The PGC is in turn comprised of multiple &quot;PGs&quot;, or Programs&quot;,
  8473. which are the actual video segments (and for a typical video feature, sequentially
  8474. ordered). The PGC structure, along with stream layout and metadata, are stored in
  8475. IFO files that need to be parsed. PGCs can be thought of as playlists in easier terms.
  8476. </p>
  8477. <p>An actual DVD player relies on user GUI interaction via menus and an internal VM
  8478. to drive the direction of demuxing. Generally, the user would either navigate (via menus)
  8479. or automatically be redirected to the PGC of their choice. During this process and
  8480. the subsequent playback, the DVD player&rsquo;s internal VM also maintains a state and
  8481. executes instructions that can create jumps to different sectors during playback.
  8482. This is why libdvdnav is involved, as a linear read of the MPEG-PS blobs on the
  8483. disc (VOBs) is not enough to produce the right sequence in many cases.
  8484. </p>
  8485. <p>There are many other DVD structures (a long subject) that will not be discussed here.
  8486. NAV packets, in particular, are handled by this demuxer to build accurate timing
  8487. but not emitted as a stream. For a good high-level understanding, refer to:
  8488. <a class="url" href="https://code.videolan.org/videolan/libdvdnav/-/blob/master/doc/dvd_structures">https://code.videolan.org/videolan/libdvdnav/-/blob/master/doc/dvd_structures</a>
  8489. </p>
  8490. </div>
  8491. <div class="subsection-level-extent" id="Options-13">
  8492. <h4 class="subsection"><span>15.7.2 Options<a class="copiable-link" href="#Options-13"> &para;</a></span></h4>
  8493. <p>This demuxer accepts the following options:
  8494. </p>
  8495. <dl class="table">
  8496. <dt><samp class="option">title <var class="var">int</var></samp></dt>
  8497. <dd><p>The title number to play. Must be set if <samp class="option">pgc</samp> and <samp class="option">pg</samp> are not set.
  8498. Not applicable to menus.
  8499. Default is 0 (auto), which currently only selects the first available title (title 1)
  8500. and notifies the user about the implications.
  8501. </p>
  8502. </dd>
  8503. <dt><samp class="option">chapter_start <var class="var">int</var></samp></dt>
  8504. <dd><p>The chapter, or PTT (part-of-title), number to start at. Not applicable to menus.
  8505. Default is 1.
  8506. </p>
  8507. </dd>
  8508. <dt><samp class="option">chapter_end <var class="var">int</var></samp></dt>
  8509. <dd><p>The chapter, or PTT (part-of-title), number to end at. Not applicable to menus.
  8510. Default is 0, which is a special value to signal end at the last possible chapter.
  8511. </p>
  8512. </dd>
  8513. <dt><samp class="option">angle <var class="var">int</var></samp></dt>
  8514. <dd><p>The video angle number, referring to what is essentially an additional
  8515. video stream that is composed from alternate frames interleaved in the VOBs.
  8516. Not applicable to menus.
  8517. Default is 1.
  8518. </p>
  8519. </dd>
  8520. <dt><samp class="option">region <var class="var">int</var></samp></dt>
  8521. <dd><p>The region code to use for playback. Some discs may use this to default playback
  8522. at a particular angle in different regions. This option will not affect the region code
  8523. of a real DVD drive, if used as an input. Not applicable to menus.
  8524. Default is 0, &quot;world&quot;.
  8525. </p>
  8526. </dd>
  8527. <dt><samp class="option">menu <var class="var">bool</var></samp></dt>
  8528. <dd><p>Demux menu assets instead of navigating a title. Requires exact coordinates
  8529. of the menu (<samp class="option">menu_lu</samp>, <samp class="option">menu_vts</samp>, <samp class="option">pgc</samp>, <samp class="option">pg</samp>).
  8530. Default is false.
  8531. </p>
  8532. </dd>
  8533. <dt><samp class="option">menu_lu <var class="var">int</var></samp></dt>
  8534. <dd><p>The menu language to demux. In DVD, menus are grouped by language.
  8535. Default is 0, the first language unit.
  8536. </p>
  8537. </dd>
  8538. <dt><samp class="option">menu_vts <var class="var">int</var></samp></dt>
  8539. <dd><p>The VTS where the menu lives, or 0 if it is a VMG menu (root-level).
  8540. Default is 0, VMG menu.
  8541. </p>
  8542. </dd>
  8543. <dt><samp class="option">pgc <var class="var">int</var></samp></dt>
  8544. <dd><p>The entry PGC to start playback, in conjunction with <samp class="option">pg</samp>.
  8545. Alternative to setting <samp class="option">title</samp>.
  8546. Chapter markers are not supported at this time.
  8547. Must be explicitly set for menus.
  8548. Default is 0, automatically resolve from value of <samp class="option">title</samp>.
  8549. </p>
  8550. </dd>
  8551. <dt><samp class="option">pg <var class="var">int</var></samp></dt>
  8552. <dd><p>The entry PG to start playback, in conjunction with <samp class="option">pgc</samp>.
  8553. Alternative to setting <samp class="option">title</samp>.
  8554. Chapter markers are not supported at this time.
  8555. Default is 0, automatically resolve from value of <samp class="option">title</samp>, or
  8556. start from the beginning (PG 1) of the menu.
  8557. </p>
  8558. </dd>
  8559. <dt><samp class="option">preindex <var class="var">bool</var></samp></dt>
  8560. <dd><p>Enable this to have accurate chapter (PTT) markers and duration measurement,
  8561. which requires a slow second pass read in order to index the chapter marker
  8562. timestamps from NAV packets. This is non-ideal extra work for real optical drives.
  8563. It is recommended and faster to use this option with a backup of the DVD structure
  8564. stored on a hard drive. Not compatible with <samp class="option">pgc</samp> and <samp class="option">pg</samp>.
  8565. Not applicable to menus.
  8566. Default is 0, false.
  8567. </p>
  8568. </dd>
  8569. <dt><samp class="option">trim <var class="var">bool</var></samp></dt>
  8570. <dd><p>Skip padding cells (i.e. cells shorter than 1 second) from the beginning.
  8571. There exist many discs with filler segments at the beginning of the PGC,
  8572. often with junk data intended for controlling a real DVD player&rsquo;s
  8573. buffering speed and with no other material data value.
  8574. Not applicable to menus.
  8575. Default is 1, true.
  8576. </p>
  8577. </dd>
  8578. </dl>
  8579. </div>
  8580. <div class="subsection-level-extent" id="Examples-4">
  8581. <h4 class="subsection"><span>15.7.3 Examples<a class="copiable-link" href="#Examples-4"> &para;</a></span></h4>
  8582. <ul class="itemize mark-bullet">
  8583. <li>Open title 3 from a given DVD structure:
  8584. <div class="example">
  8585. <pre class="example-preformatted">ffmpeg -f dvdvideo -title 3 -i &lt;path to DVD&gt; ...
  8586. </pre></div>
  8587. </li><li>Open chapters 3-6 from title 1 from a given DVD structure:
  8588. <div class="example">
  8589. <pre class="example-preformatted">ffmpeg -f dvdvideo -chapter_start 3 -chapter_end 6 -title 1 -i &lt;path to DVD&gt; ...
  8590. </pre></div>
  8591. </li><li>Open only chapter 5 from title 1 from a given DVD structure:
  8592. <div class="example">
  8593. <pre class="example-preformatted">ffmpeg -f dvdvideo -chapter_start 5 -chapter_end 5 -title 1 -i &lt;path to DVD&gt; ...
  8594. </pre></div>
  8595. </li><li>Demux menu with language 1 from VTS 1, PGC 1, starting at PG 1:
  8596. <div class="example">
  8597. <pre class="example-preformatted">ffmpeg -f dvdvideo -menu 1 -menu_lu 1 -menu_vts 1 -pgc 1 -pg 1 -i &lt;path to DVD&gt; ...
  8598. </pre></div>
  8599. </li></ul>
  8600. </div>
  8601. </div>
  8602. <div class="section-level-extent" id="ea">
  8603. <h3 class="section"><span>15.8 ea<a class="copiable-link" href="#ea"> &para;</a></span></h3>
  8604. <p>Electronic Arts Multimedia format demuxer.
  8605. </p>
  8606. <p>This format is used by various Electronic Arts games.
  8607. </p>
  8608. <ul class="mini-toc">
  8609. <li><a href="#Options-14" accesskey="1">Options</a></li>
  8610. </ul>
  8611. <div class="subsection-level-extent" id="Options-14">
  8612. <h4 class="subsection"><span>15.8.1 Options<a class="copiable-link" href="#Options-14"> &para;</a></span></h4>
  8613. <dl class="table">
  8614. <dt><samp class="option">merge_alpha <var class="var">bool</var></samp></dt>
  8615. <dd>
  8616. <p>Normally the VP6 alpha channel (if exists) is returned as a secondary video
  8617. stream, by setting this option you can make the demuxer return a single video
  8618. stream which contains the alpha channel in addition to the ordinary video.
  8619. </p>
  8620. </dd>
  8621. </dl>
  8622. </div>
  8623. </div>
  8624. <div class="section-level-extent" id="imf">
  8625. <h3 class="section"><span>15.9 imf<a class="copiable-link" href="#imf"> &para;</a></span></h3>
  8626. <p>Interoperable Master Format demuxer.
  8627. </p>
  8628. <p>This demuxer presents audio and video streams found in an IMF Composition, as
  8629. specified in <a class="url" href="https://doi.org/10.5594/SMPTE.ST2067-2.2020">SMPTE ST 2067-2</a>.
  8630. </p>
  8631. <div class="example">
  8632. <pre class="example-preformatted">ffmpeg [-assetmaps &lt;path of ASSETMAP1&gt;,&lt;path of ASSETMAP2&gt;,...] -i &lt;path of CPL&gt; ...
  8633. </pre></div>
  8634. <p>If <code class="code">-assetmaps</code> is not specified, the demuxer looks for a file called
  8635. <samp class="file">ASSETMAP.xml</samp> in the same directory as the CPL.
  8636. </p>
  8637. </div>
  8638. <div class="section-level-extent" id="flv_002c-live_005fflv_002c-kux">
  8639. <h3 class="section"><span>15.10 flv, live_flv, kux<a class="copiable-link" href="#flv_002c-live_005fflv_002c-kux"> &para;</a></span></h3>
  8640. <p>Adobe Flash Video Format demuxer.
  8641. </p>
  8642. <p>This demuxer is used to demux FLV files and RTMP network streams. In case of live network streams, if you force format, you may use live_flv option instead of flv to survive timestamp discontinuities.
  8643. KUX is a flv variant used on the Youku platform.
  8644. </p>
  8645. <div class="example">
  8646. <pre class="example-preformatted">ffmpeg -f flv -i myfile.flv ...
  8647. ffmpeg -f live_flv -i rtmp://&lt;any.server&gt;/anything/key ....
  8648. </pre></div>
  8649. <dl class="table">
  8650. <dt><samp class="option">-flv_metadata <var class="var">bool</var></samp></dt>
  8651. <dd><p>Allocate the streams according to the onMetaData array content.
  8652. </p>
  8653. </dd>
  8654. <dt><samp class="option">-flv_ignore_prevtag <var class="var">bool</var></samp></dt>
  8655. <dd><p>Ignore the size of previous tag value.
  8656. </p>
  8657. </dd>
  8658. <dt><samp class="option">-flv_full_metadata <var class="var">bool</var></samp></dt>
  8659. <dd><p>Output all context of the onMetadata.
  8660. </p></dd>
  8661. </dl>
  8662. </div>
  8663. <div class="section-level-extent" id="gif">
  8664. <h3 class="section"><span>15.11 gif<a class="copiable-link" href="#gif"> &para;</a></span></h3>
  8665. <p>Animated GIF demuxer.
  8666. </p>
  8667. <p>It accepts the following options:
  8668. </p>
  8669. <dl class="table">
  8670. <dt><samp class="option">min_delay</samp></dt>
  8671. <dd><p>Set the minimum valid delay between frames in hundredths of seconds.
  8672. Range is 0 to 6000. Default value is 2.
  8673. </p>
  8674. </dd>
  8675. <dt><samp class="option">max_gif_delay</samp></dt>
  8676. <dd><p>Set the maximum valid delay between frames in hundredth of seconds.
  8677. Range is 0 to 65535. Default value is 65535 (nearly eleven minutes),
  8678. the maximum value allowed by the specification.
  8679. </p>
  8680. </dd>
  8681. <dt><samp class="option">default_delay</samp></dt>
  8682. <dd><p>Set the default delay between frames in hundredths of seconds.
  8683. Range is 0 to 6000. Default value is 10.
  8684. </p>
  8685. </dd>
  8686. <dt><samp class="option">ignore_loop</samp></dt>
  8687. <dd><p>GIF files can contain information to loop a certain number of times (or
  8688. infinitely). If <samp class="option">ignore_loop</samp> is set to 1, then the loop setting
  8689. from the input will be ignored and looping will not occur. If set to 0,
  8690. then looping will occur and will cycle the number of times according to
  8691. the GIF. Default value is 1.
  8692. </p></dd>
  8693. </dl>
  8694. <p>For example, with the overlay filter, place an infinitely looping GIF
  8695. over another video:
  8696. </p><div class="example">
  8697. <pre class="example-preformatted">ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv
  8698. </pre></div>
  8699. <p>Note that in the above example the shortest option for overlay filter is
  8700. used to end the output video at the length of the shortest input file,
  8701. which in this case is <samp class="file">input.mp4</samp> as the GIF in this example loops
  8702. infinitely.
  8703. </p>
  8704. </div>
  8705. <div class="section-level-extent" id="hls">
  8706. <h3 class="section"><span>15.12 hls<a class="copiable-link" href="#hls"> &para;</a></span></h3>
  8707. <p>HLS demuxer
  8708. </p>
  8709. <p>Apple HTTP Live Streaming demuxer.
  8710. </p>
  8711. <p>This demuxer presents all AVStreams from all variant streams.
  8712. The id field is set to the bitrate variant index number. By setting
  8713. the discard flags on AVStreams (by pressing &rsquo;a&rsquo; or &rsquo;v&rsquo; in ffplay),
  8714. the caller can decide which variant streams to actually receive.
  8715. The total bitrate of the variant that the stream belongs to is
  8716. available in a metadata key named &quot;variant_bitrate&quot;.
  8717. </p>
  8718. <p>It accepts the following options:
  8719. </p>
  8720. <dl class="table">
  8721. <dt><samp class="option">live_start_index</samp></dt>
  8722. <dd><p>segment index to start live streams at (negative values are from the end).
  8723. </p>
  8724. </dd>
  8725. <dt><samp class="option">prefer_x_start</samp></dt>
  8726. <dd><p>prefer to use #EXT-X-START if it&rsquo;s in playlist instead of live_start_index.
  8727. </p>
  8728. </dd>
  8729. <dt><samp class="option">allowed_extensions</samp></dt>
  8730. <dd><p>&rsquo;,&rsquo; separated list of file extensions that hls is allowed to access.
  8731. </p>
  8732. </dd>
  8733. <dt><samp class="option">max_reload</samp></dt>
  8734. <dd><p>Maximum number of times a insufficient list is attempted to be reloaded.
  8735. Default value is 1000.
  8736. </p>
  8737. </dd>
  8738. <dt><samp class="option">m3u8_hold_counters</samp></dt>
  8739. <dd><p>The maximum number of times to load m3u8 when it refreshes without new segments.
  8740. Default value is 1000.
  8741. </p>
  8742. </dd>
  8743. <dt><samp class="option">http_persistent</samp></dt>
  8744. <dd><p>Use persistent HTTP connections. Applicable only for HTTP streams.
  8745. Enabled by default.
  8746. </p>
  8747. </dd>
  8748. <dt><samp class="option">http_multiple</samp></dt>
  8749. <dd><p>Use multiple HTTP connections for downloading HTTP segments.
  8750. Enabled by default for HTTP/1.1 servers.
  8751. </p>
  8752. </dd>
  8753. <dt><samp class="option">http_seekable</samp></dt>
  8754. <dd><p>Use HTTP partial requests for downloading HTTP segments.
  8755. 0 = disable, 1 = enable, -1 = auto, Default is auto.
  8756. </p>
  8757. </dd>
  8758. <dt><samp class="option">seg_format_options</samp></dt>
  8759. <dd><p>Set options for the demuxer of media segments using a list of key=value pairs separated by <code class="code">:</code>.
  8760. </p>
  8761. </dd>
  8762. <dt><samp class="option">seg_max_retry</samp></dt>
  8763. <dd><p>Maximum number of times to reload a segment on error, useful when segment skip on network error is not desired.
  8764. Default value is 0.
  8765. </p></dd>
  8766. </dl>
  8767. </div>
  8768. <div class="section-level-extent" id="image2">
  8769. <h3 class="section"><span>15.13 image2<a class="copiable-link" href="#image2"> &para;</a></span></h3>
  8770. <p>Image file demuxer.
  8771. </p>
  8772. <p>This demuxer reads from a list of image files specified by a pattern.
  8773. The syntax and meaning of the pattern is specified by the
  8774. option <var class="var">pattern_type</var>.
  8775. </p>
  8776. <p>The pattern may contain a suffix which is used to automatically
  8777. determine the format of the images contained in the files.
  8778. </p>
  8779. <p>The size, the pixel format, and the format of each image must be the
  8780. same for all the files in the sequence.
  8781. </p>
  8782. <p>This demuxer accepts the following options:
  8783. </p><dl class="table">
  8784. <dt><samp class="option">framerate</samp></dt>
  8785. <dd><p>Set the frame rate for the video stream. It defaults to 25.
  8786. </p></dd>
  8787. <dt><samp class="option">loop</samp></dt>
  8788. <dd><p>If set to 1, loop over the input. Default value is 0.
  8789. </p></dd>
  8790. <dt><samp class="option">pattern_type</samp></dt>
  8791. <dd><p>Select the pattern type used to interpret the provided filename.
  8792. </p>
  8793. <p><var class="var">pattern_type</var> accepts one of the following values.
  8794. </p><dl class="table">
  8795. <dt><samp class="option">none</samp></dt>
  8796. <dd><p>Disable pattern matching, therefore the video will only contain the specified
  8797. image. You should use this option if you do not want to create sequences from
  8798. multiple images and your filenames may contain special pattern characters.
  8799. </p></dd>
  8800. <dt><samp class="option">sequence</samp></dt>
  8801. <dd><p>Select a sequence pattern type, used to specify a sequence of files
  8802. indexed by sequential numbers.
  8803. </p>
  8804. <p>A sequence pattern may contain the string &quot;%d&quot; or &quot;%0<var class="var">N</var>d&quot;, which
  8805. specifies the position of the characters representing a sequential
  8806. number in each filename matched by the pattern. If the form
  8807. &quot;%d0<var class="var">N</var>d&quot; is used, the string representing the number in each
  8808. filename is 0-padded and <var class="var">N</var> is the total number of 0-padded
  8809. digits representing the number. The literal character &rsquo;%&rsquo; can be
  8810. specified in the pattern with the string &quot;%%&quot;.
  8811. </p>
  8812. <p>If the sequence pattern contains &quot;%d&quot; or &quot;%0<var class="var">N</var>d&quot;, the first filename of
  8813. the file list specified by the pattern must contain a number
  8814. inclusively contained between <var class="var">start_number</var> and
  8815. <var class="var">start_number</var>+<var class="var">start_number_range</var>-1, and all the following
  8816. numbers must be sequential.
  8817. </p>
  8818. <p>For example the pattern &quot;img-%03d.bmp&quot; will match a sequence of
  8819. filenames of the form <samp class="file">img-001.bmp</samp>, <samp class="file">img-002.bmp</samp>, ...,
  8820. <samp class="file">img-010.bmp</samp>, etc.; the pattern &quot;i%%m%%g-%d.jpg&quot; will match a
  8821. sequence of filenames of the form <samp class="file">i%m%g-1.jpg</samp>,
  8822. <samp class="file">i%m%g-2.jpg</samp>, ..., <samp class="file">i%m%g-10.jpg</samp>, etc.
  8823. </p>
  8824. <p>Note that the pattern must not necessarily contain &quot;%d&quot; or
  8825. &quot;%0<var class="var">N</var>d&quot;, for example to convert a single image file
  8826. <samp class="file">img.jpeg</samp> you can employ the command:
  8827. </p><div class="example">
  8828. <pre class="example-preformatted">ffmpeg -i img.jpeg img.png
  8829. </pre></div>
  8830. </dd>
  8831. <dt><samp class="option">glob</samp></dt>
  8832. <dd><p>Select a glob wildcard pattern type.
  8833. </p>
  8834. <p>The pattern is interpreted like a <code class="code">glob()</code> pattern. This is only
  8835. selectable if libavformat was compiled with globbing support.
  8836. </p>
  8837. </dd>
  8838. <dt><samp class="option">glob_sequence <em class="emph">(deprecated, will be removed)</em></samp></dt>
  8839. <dd><p>Select a mixed glob wildcard/sequence pattern.
  8840. </p>
  8841. <p>If your version of libavformat was compiled with globbing support, and
  8842. the provided pattern contains at least one glob meta character among
  8843. <code class="code">%*?[]{}</code> that is preceded by an unescaped &quot;%&quot;, the pattern is
  8844. interpreted like a <code class="code">glob()</code> pattern, otherwise it is interpreted
  8845. like a sequence pattern.
  8846. </p>
  8847. <p>All glob special characters <code class="code">%*?[]{}</code> must be prefixed
  8848. with &quot;%&quot;. To escape a literal &quot;%&quot; you shall use &quot;%%&quot;.
  8849. </p>
  8850. <p>For example the pattern <code class="code">foo-%*.jpeg</code> will match all the
  8851. filenames prefixed by &quot;foo-&quot; and terminating with &quot;.jpeg&quot;, and
  8852. <code class="code">foo-%?%?%?.jpeg</code> will match all the filenames prefixed with
  8853. &quot;foo-&quot;, followed by a sequence of three characters, and terminating
  8854. with &quot;.jpeg&quot;.
  8855. </p>
  8856. <p>This pattern type is deprecated in favor of <var class="var">glob</var> and
  8857. <var class="var">sequence</var>.
  8858. </p></dd>
  8859. </dl>
  8860. <p>Default value is <var class="var">glob_sequence</var>.
  8861. </p></dd>
  8862. <dt><samp class="option">pixel_format</samp></dt>
  8863. <dd><p>Set the pixel format of the images to read. If not specified the pixel
  8864. format is guessed from the first image file in the sequence.
  8865. </p></dd>
  8866. <dt><samp class="option">start_number</samp></dt>
  8867. <dd><p>Set the index of the file matched by the image file pattern to start
  8868. to read from. Default value is 0.
  8869. </p></dd>
  8870. <dt><samp class="option">start_number_range</samp></dt>
  8871. <dd><p>Set the index interval range to check when looking for the first image
  8872. file in the sequence, starting from <var class="var">start_number</var>. Default value
  8873. is 5.
  8874. </p></dd>
  8875. <dt><samp class="option">ts_from_file</samp></dt>
  8876. <dd><p>If set to 1, will set frame timestamp to modification time of image file. Note
  8877. that monotonity of timestamps is not provided: images go in the same order as
  8878. without this option. Default value is 0.
  8879. If set to 2, will set frame timestamp to the modification time of the image file in
  8880. nanosecond precision.
  8881. </p></dd>
  8882. <dt><samp class="option">video_size</samp></dt>
  8883. <dd><p>Set the video size of the images to read. If not specified the video
  8884. size is guessed from the first image file in the sequence.
  8885. </p></dd>
  8886. <dt><samp class="option">export_path_metadata</samp></dt>
  8887. <dd><p>If set to 1, will add two extra fields to the metadata found in input, making them
  8888. also available for other filters (see <var class="var">drawtext</var> filter for examples). Default
  8889. value is 0. The extra fields are described below:
  8890. </p><dl class="table">
  8891. <dt><samp class="option">lavf.image2dec.source_path</samp></dt>
  8892. <dd><p>Corresponds to the full path to the input file being read.
  8893. </p></dd>
  8894. <dt><samp class="option">lavf.image2dec.source_basename</samp></dt>
  8895. <dd><p>Corresponds to the name of the file being read.
  8896. </p></dd>
  8897. </dl>
  8898. </dd>
  8899. </dl>
  8900. <ul class="mini-toc">
  8901. <li><a href="#Examples-5" accesskey="1">Examples</a></li>
  8902. </ul>
  8903. <div class="subsection-level-extent" id="Examples-5">
  8904. <h4 class="subsection"><span>15.13.1 Examples<a class="copiable-link" href="#Examples-5"> &para;</a></span></h4>
  8905. <ul class="itemize mark-bullet">
  8906. <li>Use <code class="command">ffmpeg</code> for creating a video from the images in the file
  8907. sequence <samp class="file">img-001.jpeg</samp>, <samp class="file">img-002.jpeg</samp>, ..., assuming an
  8908. input frame rate of 10 frames per second:
  8909. <div class="example">
  8910. <pre class="example-preformatted">ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
  8911. </pre></div>
  8912. </li><li>As above, but start by reading from a file with index 100 in the sequence:
  8913. <div class="example">
  8914. <pre class="example-preformatted">ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
  8915. </pre></div>
  8916. </li><li>Read images matching the &quot;*.png&quot; glob pattern , that is all the files
  8917. terminating with the &quot;.png&quot; suffix:
  8918. <div class="example">
  8919. <pre class="example-preformatted">ffmpeg -framerate 10 -pattern_type glob -i &quot;*.png&quot; out.mkv
  8920. </pre></div>
  8921. </li></ul>
  8922. </div>
  8923. </div>
  8924. <div class="section-level-extent" id="libgme">
  8925. <h3 class="section"><span>15.14 libgme<a class="copiable-link" href="#libgme"> &para;</a></span></h3>
  8926. <p>The Game Music Emu library is a collection of video game music file emulators.
  8927. </p>
  8928. <p>See <a class="url" href="https://bitbucket.org/mpyne/game-music-emu/overview">https://bitbucket.org/mpyne/game-music-emu/overview</a> for more information.
  8929. </p>
  8930. <p>It accepts the following options:
  8931. </p>
  8932. <dl class="table">
  8933. <dt><samp class="option">track_index</samp></dt>
  8934. <dd><p>Set the index of which track to demux. The demuxer can only export one track.
  8935. Track indexes start at 0. Default is to pick the first track. Number of tracks
  8936. is exported as <var class="var">tracks</var> metadata entry.
  8937. </p>
  8938. </dd>
  8939. <dt><samp class="option">sample_rate</samp></dt>
  8940. <dd><p>Set the sampling rate of the exported track. Range is 1000 to 999999. Default is 44100.
  8941. </p>
  8942. </dd>
  8943. <dt><samp class="option">max_size <em class="emph">(bytes)</em></samp></dt>
  8944. <dd><p>The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size,
  8945. which in turn, acts as a ceiling for the size of files that can be read.
  8946. Default is 50 MiB.
  8947. </p>
  8948. </dd>
  8949. </dl>
  8950. </div>
  8951. <div class="section-level-extent" id="libmodplug">
  8952. <h3 class="section"><span>15.15 libmodplug<a class="copiable-link" href="#libmodplug"> &para;</a></span></h3>
  8953. <p>ModPlug based module demuxer
  8954. </p>
  8955. <p>See <a class="url" href="https://github.com/Konstanty/libmodplug">https://github.com/Konstanty/libmodplug</a>
  8956. </p>
  8957. <p>It will export one 2-channel 16-bit 44.1 kHz audio stream.
  8958. Optionally, a <code class="code">pal8</code> 16-color video stream can be exported with or without printed metadata.
  8959. </p>
  8960. <p>It accepts the following options:
  8961. </p>
  8962. <dl class="table">
  8963. <dt><samp class="option">noise_reduction</samp></dt>
  8964. <dd><p>Apply a simple low-pass filter. Can be 1 (on) or 0 (off). Default is 0.
  8965. </p>
  8966. </dd>
  8967. <dt><samp class="option">reverb_depth</samp></dt>
  8968. <dd><p>Set amount of reverb. Range 0-100. Default is 0.
  8969. </p>
  8970. </dd>
  8971. <dt><samp class="option">reverb_delay</samp></dt>
  8972. <dd><p>Set delay in ms, clamped to 40-250 ms. Default is 0.
  8973. </p>
  8974. </dd>
  8975. <dt><samp class="option">bass_amount</samp></dt>
  8976. <dd><p>Apply bass expansion a.k.a. XBass or megabass. Range is 0 (quiet) to 100 (loud). Default is 0.
  8977. </p>
  8978. </dd>
  8979. <dt><samp class="option">bass_range</samp></dt>
  8980. <dd><p>Set cutoff i.e. upper-bound for bass frequencies. Range is 10-100 Hz. Default is 0.
  8981. </p>
  8982. </dd>
  8983. <dt><samp class="option">surround_depth</samp></dt>
  8984. <dd><p>Apply a Dolby Pro-Logic surround effect. Range is 0 (quiet) to 100 (heavy). Default is 0.
  8985. </p>
  8986. </dd>
  8987. <dt><samp class="option">surround_delay</samp></dt>
  8988. <dd><p>Set surround delay in ms, clamped to 5-40 ms. Default is 0.
  8989. </p>
  8990. </dd>
  8991. <dt><samp class="option">max_size</samp></dt>
  8992. <dd><p>The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size,
  8993. which in turn, acts as a ceiling for the size of files that can be read. Range is 0 to 100 MiB.
  8994. 0 removes buffer size limit (not recommended). Default is 5 MiB.
  8995. </p>
  8996. </dd>
  8997. <dt><samp class="option">video_stream_expr</samp></dt>
  8998. <dd><p>String which is evaluated using the eval API to assign colors to the generated video stream.
  8999. Variables which can be used are <code class="code">x</code>, <code class="code">y</code>, <code class="code">w</code>, <code class="code">h</code>, <code class="code">t</code>, <code class="code">speed</code>,
  9000. <code class="code">tempo</code>, <code class="code">order</code>, <code class="code">pattern</code> and <code class="code">row</code>.
  9001. </p>
  9002. </dd>
  9003. <dt><samp class="option">video_stream</samp></dt>
  9004. <dd><p>Generate video stream. Can be 1 (on) or 0 (off). Default is 0.
  9005. </p>
  9006. </dd>
  9007. <dt><samp class="option">video_stream_w</samp></dt>
  9008. <dd><p>Set video frame width in &rsquo;chars&rsquo; where one char indicates 8 pixels. Range is 20-512. Default is 30.
  9009. </p>
  9010. </dd>
  9011. <dt><samp class="option">video_stream_h</samp></dt>
  9012. <dd><p>Set video frame height in &rsquo;chars&rsquo; where one char indicates 8 pixels. Range is 20-512. Default is 30.
  9013. </p>
  9014. </dd>
  9015. <dt><samp class="option">video_stream_ptxt</samp></dt>
  9016. <dd><p>Print metadata on video stream. Includes <code class="code">speed</code>, <code class="code">tempo</code>, <code class="code">order</code>, <code class="code">pattern</code>,
  9017. <code class="code">row</code> and <code class="code">ts</code> (time in ms). Can be 1 (on) or 0 (off). Default is 1.
  9018. </p>
  9019. </dd>
  9020. </dl>
  9021. </div>
  9022. <div class="section-level-extent" id="libopenmpt">
  9023. <h3 class="section"><span>15.16 libopenmpt<a class="copiable-link" href="#libopenmpt"> &para;</a></span></h3>
  9024. <p>libopenmpt based module demuxer
  9025. </p>
  9026. <p>See <a class="url" href="https://lib.openmpt.org/libopenmpt/">https://lib.openmpt.org/libopenmpt/</a> for more information.
  9027. </p>
  9028. <p>Some files have multiple subsongs (tracks) this can be set with the <samp class="option">subsong</samp>
  9029. option.
  9030. </p>
  9031. <p>It accepts the following options:
  9032. </p>
  9033. <dl class="table">
  9034. <dt><samp class="option">subsong</samp></dt>
  9035. <dd><p>Set the subsong index. This can be either &rsquo;all&rsquo;, &rsquo;auto&rsquo;, or the index of the
  9036. subsong. Subsong indexes start at 0. The default is &rsquo;auto&rsquo;.
  9037. </p>
  9038. <p>The default value is to let libopenmpt choose.
  9039. </p>
  9040. </dd>
  9041. <dt><samp class="option">layout</samp></dt>
  9042. <dd><p>Set the channel layout. Valid values are 1, 2, and 4 channel layouts.
  9043. The default value is STEREO.
  9044. </p>
  9045. </dd>
  9046. <dt><samp class="option">sample_rate</samp></dt>
  9047. <dd><p>Set the sample rate for libopenmpt to output.
  9048. Range is from 1000 to INT_MAX. The value default is 48000.
  9049. </p></dd>
  9050. </dl>
  9051. </div>
  9052. <div class="section-level-extent" id="mov_002fmp4_002f3gp">
  9053. <h3 class="section"><span>15.17 mov/mp4/3gp<a class="copiable-link" href="#mov_002fmp4_002f3gp"> &para;</a></span></h3>
  9054. <p>Demuxer for Quicktime File Format &amp; ISO/IEC Base Media File Format (ISO/IEC 14496-12 or MPEG-4 Part 12, ISO/IEC 15444-12 or JPEG 2000 Part 12).
  9055. </p>
  9056. <p>Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism, ismv, isma, f4v
  9057. </p>
  9058. <ul class="mini-toc">
  9059. <li><a href="#Options-15" accesskey="1">Options</a></li>
  9060. <li><a href="#Audible-AAX" accesskey="2">Audible AAX</a></li>
  9061. </ul>
  9062. <div class="subsection-level-extent" id="Options-15">
  9063. <h4 class="subsection"><span>15.17.1 Options<a class="copiable-link" href="#Options-15"> &para;</a></span></h4>
  9064. <p>This demuxer accepts the following options:
  9065. </p><dl class="table">
  9066. <dt><samp class="option">enable_drefs</samp></dt>
  9067. <dd><p>Enable loading of external tracks, disabled by default.
  9068. Enabling this can theoretically leak information in some use cases.
  9069. </p>
  9070. </dd>
  9071. <dt><samp class="option">use_absolute_path</samp></dt>
  9072. <dd><p>Allows loading of external tracks via absolute paths, disabled by default.
  9073. Enabling this poses a security risk. It should only be enabled if the source
  9074. is known to be non-malicious.
  9075. </p>
  9076. </dd>
  9077. <dt><samp class="option">seek_streams_individually</samp></dt>
  9078. <dd><p>When seeking, identify the closest point in each stream individually and demux packets in
  9079. that stream from identified point. This can lead to a different sequence of packets compared
  9080. to demuxing linearly from the beginning. Default is true.
  9081. </p>
  9082. </dd>
  9083. <dt><samp class="option">ignore_editlist</samp></dt>
  9084. <dd><p>Ignore any edit list atoms. The demuxer, by default, modifies the stream index to reflect the
  9085. timeline described by the edit list. Default is false.
  9086. </p>
  9087. </dd>
  9088. <dt><samp class="option">advanced_editlist</samp></dt>
  9089. <dd><p>Modify the stream index to reflect the timeline described by the edit list. <code class="code">ignore_editlist</code>
  9090. must be set to false for this option to be effective.
  9091. If both <code class="code">ignore_editlist</code> and this option are set to false, then only the
  9092. start of the stream index is modified to reflect initial dwell time or starting timestamp
  9093. described by the edit list. Default is true.
  9094. </p>
  9095. </dd>
  9096. <dt><samp class="option">ignore_chapters</samp></dt>
  9097. <dd><p>Don&rsquo;t parse chapters. This includes GoPro &rsquo;HiLight&rsquo; tags/moments. Note that chapters are
  9098. only parsed when input is seekable. Default is false.
  9099. </p>
  9100. </dd>
  9101. <dt><samp class="option">use_mfra_for</samp></dt>
  9102. <dd><p>For seekable fragmented input, set fragment&rsquo;s starting timestamp from media fragment random access box, if present.
  9103. </p>
  9104. <p>Following options are available:
  9105. </p><dl class="table">
  9106. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  9107. <dd><p>Auto-detect whether to set mfra timestamps as PTS or DTS <em class="emph">(default)</em>
  9108. </p>
  9109. </dd>
  9110. <dt>&lsquo;<samp class="samp">dts</samp>&rsquo;</dt>
  9111. <dd><p>Set mfra timestamps as DTS
  9112. </p>
  9113. </dd>
  9114. <dt>&lsquo;<samp class="samp">pts</samp>&rsquo;</dt>
  9115. <dd><p>Set mfra timestamps as PTS
  9116. </p>
  9117. </dd>
  9118. <dt>&lsquo;<samp class="samp">0</samp>&rsquo;</dt>
  9119. <dd><p>Don&rsquo;t use mfra box to set timestamps
  9120. </p></dd>
  9121. </dl>
  9122. </dd>
  9123. <dt><samp class="option">use_tfdt</samp></dt>
  9124. <dd><p>For fragmented input, set fragment&rsquo;s starting timestamp to <code class="code">baseMediaDecodeTime</code> from the <code class="code">tfdt</code> box.
  9125. Default is enabled, which will prefer to use the <code class="code">tfdt</code> box to set DTS. Disable to use the <code class="code">earliest_presentation_time</code> from the <code class="code">sidx</code> box.
  9126. In either case, the timestamp from the <code class="code">mfra</code> box will be used if it&rsquo;s available and <code class="code">use_mfra_for</code> is
  9127. set to pts or dts.
  9128. </p>
  9129. </dd>
  9130. <dt><samp class="option">export_all</samp></dt>
  9131. <dd><p>Export unrecognized boxes within the <var class="var">udta</var> box as metadata entries. The first four
  9132. characters of the box type are set as the key. Default is false.
  9133. </p>
  9134. </dd>
  9135. <dt><samp class="option">export_xmp</samp></dt>
  9136. <dd><p>Export entire contents of <var class="var">XMP_</var> box and <var class="var">uuid</var> box as a string with key <code class="code">xmp</code>. Note that
  9137. if <code class="code">export_all</code> is set and this option isn&rsquo;t, the contents of <var class="var">XMP_</var> box are still exported
  9138. but with key <code class="code">XMP_</code>. Default is false.
  9139. </p>
  9140. </dd>
  9141. <dt><samp class="option">activation_bytes</samp></dt>
  9142. <dd><p>4-byte key required to decrypt Audible AAX and AAX+ files. See Audible AAX subsection below.
  9143. </p>
  9144. </dd>
  9145. <dt><samp class="option">audible_fixed_key</samp></dt>
  9146. <dd><p>Fixed key used for handling Audible AAX/AAX+ files. It has been pre-set so should not be necessary to
  9147. specify.
  9148. </p>
  9149. </dd>
  9150. <dt><samp class="option">decryption_key</samp></dt>
  9151. <dd><p>16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
  9152. </p>
  9153. </dd>
  9154. <dt><samp class="option">max_stts_delta</samp></dt>
  9155. <dd><p>Very high sample deltas written in a trak&rsquo;s stts box may occasionally be intended but usually they are written in
  9156. error or used to store a negative value for dts correction when treated as signed 32-bit integers. This option lets
  9157. the user set an upper limit, beyond which the delta is clamped to 1. Values greater than the limit if negative when
  9158. cast to int32 are used to adjust onward dts.
  9159. </p>
  9160. <p>Unit is the track time scale. Range is 0 to UINT_MAX. Default is <code class="code">UINT_MAX - 48000*10</code> which allows up to
  9161. a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of <code class="code">uint32</code> range.
  9162. </p>
  9163. </dd>
  9164. <dt><samp class="option">interleaved_read</samp></dt>
  9165. <dd><p>Interleave packets from multiple tracks at demuxer level. For badly interleaved files, this prevents playback issues
  9166. caused by large gaps between packets in different tracks, as MOV/MP4 do not have packet placement requirements.
  9167. However, this can cause excessive seeking on very badly interleaved files, due to seeking between tracks, so disabling
  9168. it may prevent I/O issues, at the expense of playback.
  9169. </p>
  9170. </dd>
  9171. </dl>
  9172. </div>
  9173. <div class="subsection-level-extent" id="Audible-AAX">
  9174. <h4 class="subsection"><span>15.17.2 Audible AAX<a class="copiable-link" href="#Audible-AAX"> &para;</a></span></h4>
  9175. <p>Audible AAX files are encrypted M4B files, and they can be decrypted by specifying a 4 byte activation secret.
  9176. </p><div class="example">
  9177. <pre class="example-preformatted">ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
  9178. </pre></div>
  9179. </div>
  9180. </div>
  9181. <div class="section-level-extent" id="mpegts">
  9182. <h3 class="section"><span>15.18 mpegts<a class="copiable-link" href="#mpegts"> &para;</a></span></h3>
  9183. <p>MPEG-2 transport stream demuxer.
  9184. </p>
  9185. <p>This demuxer accepts the following options:
  9186. </p><dl class="table">
  9187. <dt><samp class="option">resync_size</samp></dt>
  9188. <dd><p>Set size limit for looking up a new synchronization. Default value is
  9189. 65536.
  9190. </p>
  9191. </dd>
  9192. <dt><samp class="option">skip_unknown_pmt</samp></dt>
  9193. <dd><p>Skip PMTs for programs not defined in the PAT. Default value is 0.
  9194. </p>
  9195. </dd>
  9196. <dt><samp class="option">fix_teletext_pts</samp></dt>
  9197. <dd><p>Override teletext packet PTS and DTS values with the timestamps calculated
  9198. from the PCR of the first program which the teletext stream is part of and is
  9199. not discarded. Default value is 1, set this option to 0 if you want your
  9200. teletext packet PTS and DTS values untouched.
  9201. </p>
  9202. </dd>
  9203. <dt><samp class="option">ts_packetsize</samp></dt>
  9204. <dd><p>Output option carrying the raw packet size in bytes.
  9205. Show the detected raw packet size, cannot be set by the user.
  9206. </p>
  9207. </dd>
  9208. <dt><samp class="option">scan_all_pmts</samp></dt>
  9209. <dd><p>Scan and combine all PMTs. The value is an integer with value from -1
  9210. to 1 (-1 means automatic setting, 1 means enabled, 0 means
  9211. disabled). Default value is -1.
  9212. </p>
  9213. </dd>
  9214. <dt><samp class="option">merge_pmt_versions</samp></dt>
  9215. <dd><p>Re-use existing streams when a PMT&rsquo;s version is updated and elementary
  9216. streams move to different PIDs. Default value is 0.
  9217. </p>
  9218. </dd>
  9219. <dt><samp class="option">max_packet_size</samp></dt>
  9220. <dd><p>Set maximum size, in bytes, of packet emitted by the demuxer. Payloads above this size
  9221. are split across multiple packets. Range is 1 to INT_MAX/2. Default is 204800 bytes.
  9222. </p></dd>
  9223. </dl>
  9224. </div>
  9225. <div class="section-level-extent" id="mpjpeg">
  9226. <h3 class="section"><span>15.19 mpjpeg<a class="copiable-link" href="#mpjpeg"> &para;</a></span></h3>
  9227. <p>MJPEG encapsulated in multi-part MIME demuxer.
  9228. </p>
  9229. <p>This demuxer allows reading of MJPEG, where each frame is represented as a part of
  9230. multipart/x-mixed-replace stream.
  9231. </p><dl class="table">
  9232. <dt><samp class="option">strict_mime_boundary</samp></dt>
  9233. <dd><p>Default implementation applies a relaxed standard to multi-part MIME boundary detection,
  9234. to prevent regression with numerous existing endpoints not generating a proper MIME
  9235. MJPEG stream. Turning this option on by setting it to 1 will result in a stricter check
  9236. of the boundary value.
  9237. </p></dd>
  9238. </dl>
  9239. </div>
  9240. <div class="section-level-extent" id="rawvideo-1">
  9241. <h3 class="section"><span>15.20 rawvideo<a class="copiable-link" href="#rawvideo-1"> &para;</a></span></h3>
  9242. <p>Raw video demuxer.
  9243. </p>
  9244. <p>This demuxer allows one to read raw video data. Since there is no header
  9245. specifying the assumed video parameters, the user must specify them
  9246. in order to be able to decode the data correctly.
  9247. </p>
  9248. <p>This demuxer accepts the following options:
  9249. </p><dl class="table">
  9250. <dt><samp class="option">framerate</samp></dt>
  9251. <dd><p>Set input video frame rate. Default value is 25.
  9252. </p>
  9253. </dd>
  9254. <dt><samp class="option">pixel_format</samp></dt>
  9255. <dd><p>Set the input video pixel format. Default value is <code class="code">yuv420p</code>.
  9256. </p>
  9257. </dd>
  9258. <dt><samp class="option">video_size</samp></dt>
  9259. <dd><p>Set the input video size. This value must be specified explicitly.
  9260. </p></dd>
  9261. </dl>
  9262. <p>For example to read a rawvideo file <samp class="file">input.raw</samp> with
  9263. <code class="command">ffplay</code>, assuming a pixel format of <code class="code">rgb24</code>, a video
  9264. size of <code class="code">320x240</code>, and a frame rate of 10 images per second, use
  9265. the command:
  9266. </p><div class="example">
  9267. <pre class="example-preformatted">ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw
  9268. </pre></div>
  9269. </div>
  9270. <div class="section-level-extent" id="sbg">
  9271. <h3 class="section"><span>15.21 sbg<a class="copiable-link" href="#sbg"> &para;</a></span></h3>
  9272. <p>SBaGen script demuxer.
  9273. </p>
  9274. <p>This demuxer reads the script language used by SBaGen
  9275. <a class="url" href="http://uazu.net/sbagen/">http://uazu.net/sbagen/</a> to generate binaural beats sessions. A SBG
  9276. script looks like that:
  9277. </p><div class="example">
  9278. <pre class="example-preformatted">-SE
  9279. a: 300-2.5/3 440+4.5/0
  9280. b: 300-2.5/0 440+4.5/3
  9281. off: -
  9282. NOW == a
  9283. +0:07:00 == b
  9284. +0:14:00 == a
  9285. +0:21:00 == b
  9286. +0:30:00 off
  9287. </pre></div>
  9288. <p>A SBG script can mix absolute and relative timestamps. If the script uses
  9289. either only absolute timestamps (including the script start time) or only
  9290. relative ones, then its layout is fixed, and the conversion is
  9291. straightforward. On the other hand, if the script mixes both kind of
  9292. timestamps, then the <var class="var">NOW</var> reference for relative timestamps will be
  9293. taken from the current time of day at the time the script is read, and the
  9294. script layout will be frozen according to that reference. That means that if
  9295. the script is directly played, the actual times will match the absolute
  9296. timestamps up to the sound controller&rsquo;s clock accuracy, but if the user
  9297. somehow pauses the playback or seeks, all times will be shifted accordingly.
  9298. </p>
  9299. </div>
  9300. <div class="section-level-extent" id="tedcaptions">
  9301. <h3 class="section"><span>15.22 tedcaptions<a class="copiable-link" href="#tedcaptions"> &para;</a></span></h3>
  9302. <p>JSON captions used for <a class="url" href="http://www.ted.com/">TED Talks</a>.
  9303. </p>
  9304. <p>TED does not provide links to the captions, but they can be guessed from the
  9305. page. The file <samp class="file">tools/bookmarklets.html</samp> from the FFmpeg source tree
  9306. contains a bookmarklet to expose them.
  9307. </p>
  9308. <p>This demuxer accepts the following option:
  9309. </p><dl class="table">
  9310. <dt><samp class="option">start_time</samp></dt>
  9311. <dd><p>Set the start time of the TED talk, in milliseconds. The default is 15000
  9312. (15s). It is used to sync the captions with the downloadable videos, because
  9313. they include a 15s intro.
  9314. </p></dd>
  9315. </dl>
  9316. <p>Example: convert the captions to a format most players understand:
  9317. </p><div class="example">
  9318. <pre class="example-preformatted">ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt
  9319. </pre></div>
  9320. </div>
  9321. <div class="section-level-extent" id="vapoursynth">
  9322. <h3 class="section"><span>15.23 vapoursynth<a class="copiable-link" href="#vapoursynth"> &para;</a></span></h3>
  9323. <p>Vapoursynth wrapper.
  9324. </p>
  9325. <p>Due to security concerns, Vapoursynth scripts will not
  9326. be autodetected so the input format has to be forced. For ff* CLI tools,
  9327. add <code class="code">-f vapoursynth</code> before the input <code class="code">-i yourscript.vpy</code>.
  9328. </p>
  9329. <p>This demuxer accepts the following option:
  9330. </p><dl class="table">
  9331. <dt><samp class="option">max_script_size</samp></dt>
  9332. <dd><p>The demuxer buffers the entire script into memory. Adjust this value to set the maximum buffer size,
  9333. which in turn, acts as a ceiling for the size of scripts that can be read.
  9334. Default is 1 MiB.
  9335. </p></dd>
  9336. </dl>
  9337. </div>
  9338. <div class="section-level-extent" id="w64">
  9339. <h3 class="section"><span>15.24 w64<a class="copiable-link" href="#w64"> &para;</a></span></h3>
  9340. <p>Sony Wave64 Audio demuxer.
  9341. </p>
  9342. <p>This demuxer accepts the following options:
  9343. </p><dl class="table">
  9344. <dt><samp class="option">max_size</samp></dt>
  9345. <dd><p>See the same option for the <a class="ref" href="#wav">wav</a> demuxer.
  9346. </p></dd>
  9347. </dl>
  9348. <a class="anchor" id="wav"></a></div>
  9349. <div class="section-level-extent" id="wav-1">
  9350. <h3 class="section"><span>15.25 wav<a class="copiable-link" href="#wav-1"> &para;</a></span></h3>
  9351. <p>RIFF Wave Audio demuxer.
  9352. </p>
  9353. <p>This demuxer accepts the following options:
  9354. </p><dl class="table">
  9355. <dt><samp class="option">max_size</samp></dt>
  9356. <dd><p>Specify the maximum packet size in bytes for the demuxed packets. By default
  9357. this is set to 0, which means that a sensible value is chosen based on the
  9358. input format.
  9359. </p></dd>
  9360. </dl>
  9361. <a class="anchor" id="metadata"></a></div>
  9362. </div>
  9363. <div class="chapter-level-extent" id="Metadata">
  9364. <h2 class="chapter"><span>16 Metadata<a class="copiable-link" href="#Metadata"> &para;</a></span></h2>
  9365. <p>FFmpeg is able to dump metadata from media files into a simple UTF-8-encoded
  9366. INI-like text file and then load it back using the metadata muxer/demuxer.
  9367. </p>
  9368. <p>The file format is as follows:
  9369. </p><ol class="enumerate">
  9370. <li> A file consists of a header and a number of metadata tags divided into sections,
  9371. each on its own line.
  9372. </li><li> The header is a &lsquo;<samp class="samp">;FFMETADATA</samp>&rsquo; string, followed by a version number (now 1).
  9373. </li><li> Metadata tags are of the form &lsquo;<samp class="samp">key=value</samp>&rsquo;
  9374. </li><li> Immediately after header follows global metadata
  9375. </li><li> After global metadata there may be sections with per-stream/per-chapter
  9376. metadata.
  9377. </li><li> A section starts with the section name in uppercase (i.e. STREAM or CHAPTER) in
  9378. brackets (&lsquo;<samp class="samp">[</samp>&rsquo;, &lsquo;<samp class="samp">]</samp>&rsquo;) and ends with next section or end of file.
  9379. </li><li> At the beginning of a chapter section there may be an optional timebase to be
  9380. used for start/end values. It must be in form
  9381. &lsquo;<samp class="samp">TIMEBASE=<var class="var">num</var>/<var class="var">den</var></samp>&rsquo;, where <var class="var">num</var> and <var class="var">den</var> are
  9382. integers. If the timebase is missing then start/end times are assumed to
  9383. be in nanoseconds.
  9384. <p>Next a chapter section must contain chapter start and end times in form
  9385. &lsquo;<samp class="samp">START=<var class="var">num</var></samp>&rsquo;, &lsquo;<samp class="samp">END=<var class="var">num</var></samp>&rsquo;, where <var class="var">num</var> is a positive
  9386. integer.
  9387. </p>
  9388. </li><li> Empty lines and lines starting with &lsquo;<samp class="samp">;</samp>&rsquo; or &lsquo;<samp class="samp">#</samp>&rsquo; are ignored.
  9389. </li><li> Metadata keys or values containing special characters (&lsquo;<samp class="samp">=</samp>&rsquo;, &lsquo;<samp class="samp">;</samp>&rsquo;,
  9390. &lsquo;<samp class="samp">#</samp>&rsquo;, &lsquo;<samp class="samp">\</samp>&rsquo; and a newline) must be escaped with a backslash &lsquo;<samp class="samp">\</samp>&rsquo;.
  9391. </li><li> Note that whitespace in metadata (e.g. &lsquo;<samp class="samp">foo = bar</samp>&rsquo;) is considered to be
  9392. a part of the tag (in the example above key is &lsquo;<samp class="samp">foo </samp>&rsquo;, value is
  9393. &lsquo;<samp class="samp"> bar</samp>&rsquo;).
  9394. </li></ol>
  9395. <p>A ffmetadata file might look like this:
  9396. </p><div class="example">
  9397. <pre class="example-preformatted">;FFMETADATA1
  9398. title=bike\\shed
  9399. ;this is a comment
  9400. artist=FFmpeg troll team
  9401. [CHAPTER]
  9402. TIMEBASE=1/1000
  9403. START=0
  9404. #chapter ends at 0:01:00
  9405. END=60000
  9406. title=chapter \#1
  9407. [STREAM]
  9408. title=multi\
  9409. line
  9410. </pre></div>
  9411. <p>By using the ffmetadata muxer and demuxer it is possible to extract
  9412. metadata from an input file to an ffmetadata file, and then transcode
  9413. the file into an output file with the edited ffmetadata file.
  9414. </p>
  9415. <p>Extracting an ffmetadata file with <samp class="file">ffmpeg</samp> goes as follows:
  9416. </p><div class="example">
  9417. <pre class="example-preformatted">ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE
  9418. </pre></div>
  9419. <p>Reinserting edited metadata information from the FFMETADATAFILE file can
  9420. be done as:
  9421. </p><div class="example">
  9422. <pre class="example-preformatted">ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
  9423. </pre></div>
  9424. </div>
  9425. <div class="chapter-level-extent" id="Protocol-Options">
  9426. <h2 class="chapter"><span>17 Protocol Options<a class="copiable-link" href="#Protocol-Options"> &para;</a></span></h2>
  9427. <p>The libavformat library provides some generic global options, which
  9428. can be set on all the protocols. In addition each protocol may support
  9429. so-called private options, which are specific for that component.
  9430. </p>
  9431. <p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the
  9432. FFmpeg tools, or by setting the value explicitly in the
  9433. <code class="code">AVFormatContext</code> options or using the <samp class="file">libavutil/opt.h</samp> API
  9434. for programmatic use.
  9435. </p>
  9436. <p>The list of supported options follows:
  9437. </p>
  9438. <dl class="table">
  9439. <dt><samp class="option">protocol_whitelist <var class="var">list</var> (<em class="emph">input</em>)</samp></dt>
  9440. <dd><p>Set a &quot;,&quot;-separated list of allowed protocols. &quot;ALL&quot; matches all protocols. Protocols
  9441. prefixed by &quot;-&quot; are disabled.
  9442. All protocols are allowed by default but protocols used by an another
  9443. protocol (nested protocols) are restricted to a per protocol subset.
  9444. </p></dd>
  9445. </dl>
  9446. </div>
  9447. <div class="chapter-level-extent" id="Protocols">
  9448. <h2 class="chapter"><span>18 Protocols<a class="copiable-link" href="#Protocols"> &para;</a></span></h2>
  9449. <p>Protocols are configured elements in FFmpeg that enable access to
  9450. resources that require specific protocols.
  9451. </p>
  9452. <p>When you configure your FFmpeg build, all the supported protocols are
  9453. enabled by default. You can list all available ones using the
  9454. configure option &quot;&ndash;list-protocols&quot;.
  9455. </p>
  9456. <p>You can disable all the protocols using the configure option
  9457. &quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
  9458. option &quot;&ndash;enable-protocol=<var class="var">PROTOCOL</var>&quot;, or you can disable a
  9459. particular protocol using the option
  9460. &quot;&ndash;disable-protocol=<var class="var">PROTOCOL</var>&quot;.
  9461. </p>
  9462. <p>The option &quot;-protocols&quot; of the ff* tools will display the list of
  9463. supported protocols.
  9464. </p>
  9465. <p>All protocols accept the following options:
  9466. </p>
  9467. <dl class="table">
  9468. <dt><samp class="option">rw_timeout</samp></dt>
  9469. <dd><p>Maximum time to wait for (network) read/write operations to complete,
  9470. in microseconds.
  9471. </p></dd>
  9472. </dl>
  9473. <p>A description of the currently available protocols follows.
  9474. </p>
  9475. <ul class="mini-toc">
  9476. <li><a href="#amqp" accesskey="1">amqp</a></li>
  9477. <li><a href="#async" accesskey="2">async</a></li>
  9478. <li><a href="#bluray" accesskey="3">bluray</a></li>
  9479. <li><a href="#cache" accesskey="4">cache</a></li>
  9480. <li><a href="#concat-2" accesskey="5">concat</a></li>
  9481. <li><a href="#concatf" accesskey="6">concatf</a></li>
  9482. <li><a href="#crypto" accesskey="7">crypto</a></li>
  9483. <li><a href="#data" accesskey="8">data</a></li>
  9484. <li><a href="#fd" accesskey="9">fd</a></li>
  9485. <li><a href="#file">file</a></li>
  9486. <li><a href="#ftp">ftp</a></li>
  9487. <li><a href="#gopher">gopher</a></li>
  9488. <li><a href="#gophers">gophers</a></li>
  9489. <li><a href="#hls-1">hls</a></li>
  9490. <li><a href="#http">http</a></li>
  9491. <li><a href="#Icecast">Icecast</a></li>
  9492. <li><a href="#ipfs">ipfs</a></li>
  9493. <li><a href="#mmst">mmst</a></li>
  9494. <li><a href="#mmsh">mmsh</a></li>
  9495. <li><a href="#md5">md5</a></li>
  9496. <li><a href="#pipe">pipe</a></li>
  9497. <li><a href="#prompeg">prompeg</a></li>
  9498. <li><a href="#rist">rist</a></li>
  9499. <li><a href="#rtmp">rtmp</a></li>
  9500. <li><a href="#rtmpe">rtmpe</a></li>
  9501. <li><a href="#rtmps">rtmps</a></li>
  9502. <li><a href="#rtmpt">rtmpt</a></li>
  9503. <li><a href="#rtmpte">rtmpte</a></li>
  9504. <li><a href="#rtmpts">rtmpts</a></li>
  9505. <li><a href="#libsmbclient">libsmbclient</a></li>
  9506. <li><a href="#libssh">libssh</a></li>
  9507. <li><a href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
  9508. <li><a href="#rtp">rtp</a></li>
  9509. <li><a href="#rtsp">rtsp</a></li>
  9510. <li><a href="#sap">sap</a></li>
  9511. <li><a href="#sctp">sctp</a></li>
  9512. <li><a href="#srt">srt</a></li>
  9513. <li><a href="#srtp">srtp</a></li>
  9514. <li><a href="#subfile">subfile</a></li>
  9515. <li><a href="#tee">tee</a></li>
  9516. <li><a href="#tcp">tcp</a></li>
  9517. <li><a href="#tls">tls</a></li>
  9518. <li><a href="#udp">udp</a></li>
  9519. <li><a href="#unix">unix</a></li>
  9520. <li><a href="#zmq">zmq</a></li>
  9521. </ul>
  9522. <div class="section-level-extent" id="amqp">
  9523. <h3 class="section"><span>18.1 amqp<a class="copiable-link" href="#amqp"> &para;</a></span></h3>
  9524. <p>Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker based
  9525. publish-subscribe communication protocol.
  9526. </p>
  9527. <p>FFmpeg must be compiled with &ndash;enable-librabbitmq to support AMQP. A separate
  9528. AMQP broker must also be run. An example open-source AMQP broker is RabbitMQ.
  9529. </p>
  9530. <p>After starting the broker, an FFmpeg client may stream data to the broker using
  9531. the command:
  9532. </p>
  9533. <div class="example">
  9534. <pre class="example-preformatted">ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost]
  9535. </pre></div>
  9536. <p>Where hostname and port (default is 5672) is the address of the broker. The
  9537. client may also set a user/password for authentication. The default for both
  9538. fields is &quot;guest&quot;. Name of virtual host on broker can be set with vhost. The
  9539. default value is &quot;/&quot;.
  9540. </p>
  9541. <p>Muliple subscribers may stream from the broker using the command:
  9542. </p><div class="example">
  9543. <pre class="example-preformatted">ffplay amqp://[[user]:[password]@]hostname[:port][/vhost]
  9544. </pre></div>
  9545. <p>In RabbitMQ all data published to the broker flows through a specific exchange,
  9546. and each subscribing client has an assigned queue/buffer. When a packet arrives
  9547. at an exchange, it may be copied to a client&rsquo;s queue depending on the exchange
  9548. and routing_key fields.
  9549. </p>
  9550. <p>The following options are supported:
  9551. </p>
  9552. <dl class="table">
  9553. <dt><samp class="option">exchange</samp></dt>
  9554. <dd><p>Sets the exchange to use on the broker. RabbitMQ has several predefined
  9555. exchanges: &quot;amq.direct&quot; is the default exchange, where the publisher and
  9556. subscriber must have a matching routing_key; &quot;amq.fanout&quot; is the same as a
  9557. broadcast operation (i.e. the data is forwarded to all queues on the fanout
  9558. exchange independent of the routing_key); and &quot;amq.topic&quot; is similar to
  9559. &quot;amq.direct&quot;, but allows for more complex pattern matching (refer to the RabbitMQ
  9560. documentation).
  9561. </p>
  9562. </dd>
  9563. <dt><samp class="option">routing_key</samp></dt>
  9564. <dd><p>Sets the routing key. The default value is &quot;amqp&quot;. The routing key is used on
  9565. the &quot;amq.direct&quot; and &quot;amq.topic&quot; exchanges to decide whether packets are written
  9566. to the queue of a subscriber.
  9567. </p>
  9568. </dd>
  9569. <dt><samp class="option">pkt_size</samp></dt>
  9570. <dd><p>Maximum size of each packet sent/received to the broker. Default is 131072.
  9571. Minimum is 4096 and max is any large value (representable by an int). When
  9572. receiving packets, this sets an internal buffer size in FFmpeg. It should be
  9573. equal to or greater than the size of the published packets to the broker. Otherwise
  9574. the received message may be truncated causing decoding errors.
  9575. </p>
  9576. </dd>
  9577. <dt><samp class="option">connection_timeout</samp></dt>
  9578. <dd><p>The timeout in seconds during the initial connection to the broker. The
  9579. default value is rw_timeout, or 5 seconds if rw_timeout is not set.
  9580. </p>
  9581. </dd>
  9582. <dt><samp class="option">delivery_mode <var class="var">mode</var></samp></dt>
  9583. <dd><p>Sets the delivery mode of each message sent to broker.
  9584. The following values are accepted:
  9585. </p><dl class="table">
  9586. <dt>&lsquo;<samp class="samp">persistent</samp>&rsquo;</dt>
  9587. <dd><p>Delivery mode set to &quot;persistent&quot; (2). This is the default value.
  9588. Messages may be written to the broker&rsquo;s disk depending on its setup.
  9589. </p>
  9590. </dd>
  9591. <dt>&lsquo;<samp class="samp">non-persistent</samp>&rsquo;</dt>
  9592. <dd><p>Delivery mode set to &quot;non-persistent&quot; (1).
  9593. Messages will stay in broker&rsquo;s memory unless the broker is under memory
  9594. pressure.
  9595. </p>
  9596. </dd>
  9597. </dl>
  9598. </dd>
  9599. </dl>
  9600. </div>
  9601. <div class="section-level-extent" id="async">
  9602. <h3 class="section"><span>18.2 async<a class="copiable-link" href="#async"> &para;</a></span></h3>
  9603. <p>Asynchronous data filling wrapper for input stream.
  9604. </p>
  9605. <p>Fill data in a background thread, to decouple I/O operation from demux thread.
  9606. </p>
  9607. <div class="example">
  9608. <pre class="example-preformatted">async:<var class="var">URL</var>
  9609. async:http://host/resource
  9610. async:cache:http://host/resource
  9611. </pre></div>
  9612. </div>
  9613. <div class="section-level-extent" id="bluray">
  9614. <h3 class="section"><span>18.3 bluray<a class="copiable-link" href="#bluray"> &para;</a></span></h3>
  9615. <p>Read BluRay playlist.
  9616. </p>
  9617. <p>The accepted options are:
  9618. </p><dl class="table">
  9619. <dt><samp class="option">angle</samp></dt>
  9620. <dd><p>BluRay angle
  9621. </p>
  9622. </dd>
  9623. <dt><samp class="option">chapter</samp></dt>
  9624. <dd><p>Start chapter (1...N)
  9625. </p>
  9626. </dd>
  9627. <dt><samp class="option">playlist</samp></dt>
  9628. <dd><p>Playlist to read (BDMV/PLAYLIST/?????.mpls)
  9629. </p>
  9630. </dd>
  9631. </dl>
  9632. <p>Examples:
  9633. </p>
  9634. <p>Read longest playlist from BluRay mounted to /mnt/bluray:
  9635. </p><div class="example">
  9636. <pre class="example-preformatted">bluray:/mnt/bluray
  9637. </pre></div>
  9638. <p>Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
  9639. </p><div class="example">
  9640. <pre class="example-preformatted">-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
  9641. </pre></div>
  9642. </div>
  9643. <div class="section-level-extent" id="cache">
  9644. <h3 class="section"><span>18.4 cache<a class="copiable-link" href="#cache"> &para;</a></span></h3>
  9645. <p>Caching wrapper for input stream.
  9646. </p>
  9647. <p>Cache the input stream to temporary file. It brings seeking capability to live streams.
  9648. </p>
  9649. <p>The accepted options are:
  9650. </p><dl class="table">
  9651. <dt><samp class="option">read_ahead_limit</samp></dt>
  9652. <dd><p>Amount in bytes that may be read ahead when seeking isn&rsquo;t supported. Range is -1 to INT_MAX.
  9653. -1 for unlimited. Default is 65536.
  9654. </p>
  9655. </dd>
  9656. </dl>
  9657. <p>URL Syntax is
  9658. </p><div class="example">
  9659. <pre class="example-preformatted">cache:<var class="var">URL</var>
  9660. </pre></div>
  9661. </div>
  9662. <div class="section-level-extent" id="concat-2">
  9663. <h3 class="section"><span>18.5 concat<a class="copiable-link" href="#concat-2"> &para;</a></span></h3>
  9664. <p>Physical concatenation protocol.
  9665. </p>
  9666. <p>Read and seek from many resources in sequence as if they were
  9667. a unique resource.
  9668. </p>
  9669. <p>A URL accepted by this protocol has the syntax:
  9670. </p><div class="example">
  9671. <pre class="example-preformatted">concat:<var class="var">URL1</var>|<var class="var">URL2</var>|...|<var class="var">URLN</var>
  9672. </pre></div>
  9673. <p>where <var class="var">URL1</var>, <var class="var">URL2</var>, ..., <var class="var">URLN</var> are the urls of the
  9674. resource to be concatenated, each one possibly specifying a distinct
  9675. protocol.
  9676. </p>
  9677. <p>For example to read a sequence of files <samp class="file">split1.mpeg</samp>,
  9678. <samp class="file">split2.mpeg</samp>, <samp class="file">split3.mpeg</samp> with <code class="command">ffplay</code> use the
  9679. command:
  9680. </p><div class="example">
  9681. <pre class="example-preformatted">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
  9682. </pre></div>
  9683. <p>Note that you may need to escape the character &quot;|&quot; which is special for
  9684. many shells.
  9685. </p>
  9686. </div>
  9687. <div class="section-level-extent" id="concatf">
  9688. <h3 class="section"><span>18.6 concatf<a class="copiable-link" href="#concatf"> &para;</a></span></h3>
  9689. <p>Physical concatenation protocol using a line break delimited list of
  9690. resources.
  9691. </p>
  9692. <p>Read and seek from many resources in sequence as if they were
  9693. a unique resource.
  9694. </p>
  9695. <p>A URL accepted by this protocol has the syntax:
  9696. </p><div class="example">
  9697. <pre class="example-preformatted">concatf:<var class="var">URL</var>
  9698. </pre></div>
  9699. <p>where <var class="var">URL</var> is the url containing a line break delimited list of
  9700. resources to be concatenated, each one possibly specifying a distinct
  9701. protocol. Special characters must be escaped with backslash or single
  9702. quotes. See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#quoting_005fand_005fescaping">the &quot;Quoting and escaping&quot;
  9703. section in the ffmpeg-utils(1) manual</a>.
  9704. </p>
  9705. <p>For example to read a sequence of files <samp class="file">split1.mpeg</samp>,
  9706. <samp class="file">split2.mpeg</samp>, <samp class="file">split3.mpeg</samp> listed in separate lines within
  9707. a file <samp class="file">split.txt</samp> with <code class="command">ffplay</code> use the command:
  9708. </p><div class="example">
  9709. <pre class="example-preformatted">ffplay concatf:split.txt
  9710. </pre></div>
  9711. <p>Where <samp class="file">split.txt</samp> contains the lines:
  9712. </p><div class="example">
  9713. <pre class="example-preformatted">split1.mpeg
  9714. split2.mpeg
  9715. split3.mpeg
  9716. </pre></div>
  9717. </div>
  9718. <div class="section-level-extent" id="crypto">
  9719. <h3 class="section"><span>18.7 crypto<a class="copiable-link" href="#crypto"> &para;</a></span></h3>
  9720. <p>AES-encrypted stream reading protocol.
  9721. </p>
  9722. <p>The accepted options are:
  9723. </p><dl class="table">
  9724. <dt><samp class="option">key</samp></dt>
  9725. <dd><p>Set the AES decryption key binary block from given hexadecimal representation.
  9726. </p>
  9727. </dd>
  9728. <dt><samp class="option">iv</samp></dt>
  9729. <dd><p>Set the AES decryption initialization vector binary block from given hexadecimal representation.
  9730. </p></dd>
  9731. </dl>
  9732. <p>Accepted URL formats:
  9733. </p><div class="example">
  9734. <pre class="example-preformatted">crypto:<var class="var">URL</var>
  9735. crypto+<var class="var">URL</var>
  9736. </pre></div>
  9737. </div>
  9738. <div class="section-level-extent" id="data">
  9739. <h3 class="section"><span>18.8 data<a class="copiable-link" href="#data"> &para;</a></span></h3>
  9740. <p>Data in-line in the URI. See <a class="url" href="http://en.wikipedia.org/wiki/Data_URI_scheme">http://en.wikipedia.org/wiki/Data_URI_scheme</a>.
  9741. </p>
  9742. <p>For example, to convert a GIF file given inline with <code class="command">ffmpeg</code>:
  9743. </p><div class="example">
  9744. <pre class="example-preformatted">ffmpeg -i &quot;data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=&quot; smiley.png
  9745. </pre></div>
  9746. </div>
  9747. <div class="section-level-extent" id="fd">
  9748. <h3 class="section"><span>18.9 fd<a class="copiable-link" href="#fd"> &para;</a></span></h3>
  9749. <p>File descriptor access protocol.
  9750. </p>
  9751. <p>The accepted syntax is:
  9752. </p><div class="example">
  9753. <pre class="example-preformatted">fd: -fd <var class="var">file_descriptor</var>
  9754. </pre></div>
  9755. <p>If <samp class="option">fd</samp> is not specified, by default the stdout file descriptor will be
  9756. used for writing, stdin for reading. Unlike the pipe protocol, fd protocol has
  9757. seek support if it corresponding to a regular file. fd protocol doesn&rsquo;t support
  9758. pass file descriptor via URL for security.
  9759. </p>
  9760. <p>This protocol accepts the following options:
  9761. </p>
  9762. <dl class="table">
  9763. <dt><samp class="option">blocksize</samp></dt>
  9764. <dd><p>Set I/O operation maximum block size, in bytes. Default value is
  9765. <code class="code">INT_MAX</code>, which results in not limiting the requested block size.
  9766. Setting this value reasonably low improves user termination request reaction
  9767. time, which is valuable if data transmission is slow.
  9768. </p>
  9769. </dd>
  9770. <dt><samp class="option">fd</samp></dt>
  9771. <dd><p>Set file descriptor.
  9772. </p></dd>
  9773. </dl>
  9774. </div>
  9775. <div class="section-level-extent" id="file">
  9776. <h3 class="section"><span>18.10 file<a class="copiable-link" href="#file"> &para;</a></span></h3>
  9777. <p>File access protocol.
  9778. </p>
  9779. <p>Read from or write to a file.
  9780. </p>
  9781. <p>A file URL can have the form:
  9782. </p><div class="example">
  9783. <pre class="example-preformatted">file:<var class="var">filename</var>
  9784. </pre></div>
  9785. <p>where <var class="var">filename</var> is the path of the file to read.
  9786. </p>
  9787. <p>An URL that does not have a protocol prefix will be assumed to be a
  9788. file URL. Depending on the build, an URL that looks like a Windows
  9789. path with the drive letter at the beginning will also be assumed to be
  9790. a file URL (usually not the case in builds for unix-like systems).
  9791. </p>
  9792. <p>For example to read from a file <samp class="file">input.mpeg</samp> with <code class="command">ffmpeg</code>
  9793. use the command:
  9794. </p><div class="example">
  9795. <pre class="example-preformatted">ffmpeg -i file:input.mpeg output.mpeg
  9796. </pre></div>
  9797. <p>This protocol accepts the following options:
  9798. </p>
  9799. <dl class="table">
  9800. <dt><samp class="option">truncate</samp></dt>
  9801. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  9802. truncating. Default value is 1.
  9803. </p>
  9804. </dd>
  9805. <dt><samp class="option">blocksize</samp></dt>
  9806. <dd><p>Set I/O operation maximum block size, in bytes. Default value is
  9807. <code class="code">INT_MAX</code>, which results in not limiting the requested block size.
  9808. Setting this value reasonably low improves user termination request reaction
  9809. time, which is valuable for files on slow medium.
  9810. </p>
  9811. </dd>
  9812. <dt><samp class="option">follow</samp></dt>
  9813. <dd><p>If set to 1, the protocol will retry reading at the end of the file, allowing
  9814. reading files that still are being written. In order for this to terminate,
  9815. you either need to use the rw_timeout option, or use the interrupt callback
  9816. (for API users).
  9817. </p>
  9818. </dd>
  9819. <dt><samp class="option">seekable</samp></dt>
  9820. <dd><p>Controls if seekability is advertised on the file. 0 means non-seekable, -1
  9821. means auto (seekable for normal files, non-seekable for named pipes).
  9822. </p>
  9823. <p>Many demuxers handle seekable and non-seekable resources differently,
  9824. overriding this might speed up opening certain files at the cost of losing some
  9825. features (e.g. accurate seeking).
  9826. </p></dd>
  9827. </dl>
  9828. </div>
  9829. <div class="section-level-extent" id="ftp">
  9830. <h3 class="section"><span>18.11 ftp<a class="copiable-link" href="#ftp"> &para;</a></span></h3>
  9831. <p>FTP (File Transfer Protocol).
  9832. </p>
  9833. <p>Read from or write to remote resources using FTP protocol.
  9834. </p>
  9835. <p>Following syntax is required.
  9836. </p><div class="example">
  9837. <pre class="example-preformatted">ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  9838. </pre></div>
  9839. <p>This protocol accepts the following options.
  9840. </p>
  9841. <dl class="table">
  9842. <dt><samp class="option">timeout</samp></dt>
  9843. <dd><p>Set timeout in microseconds of socket I/O operations used by the underlying low level
  9844. operation. By default it is set to -1, which means that the timeout is
  9845. not specified.
  9846. </p>
  9847. </dd>
  9848. <dt><samp class="option">ftp-user</samp></dt>
  9849. <dd><p>Set a user to be used for authenticating to the FTP server. This is overridden by the
  9850. user in the FTP URL.
  9851. </p>
  9852. </dd>
  9853. <dt><samp class="option">ftp-password</samp></dt>
  9854. <dd><p>Set a password to be used for authenticating to the FTP server. This is overridden by
  9855. the password in the FTP URL, or by <samp class="option">ftp-anonymous-password</samp> if no user is set.
  9856. </p>
  9857. </dd>
  9858. <dt><samp class="option">ftp-anonymous-password</samp></dt>
  9859. <dd><p>Password used when login as anonymous user. Typically an e-mail address
  9860. should be used.
  9861. </p>
  9862. </dd>
  9863. <dt><samp class="option">ftp-write-seekable</samp></dt>
  9864. <dd><p>Control seekability of connection during encoding. If set to 1 the
  9865. resource is supposed to be seekable, if set to 0 it is assumed not
  9866. to be seekable. Default value is 0.
  9867. </p></dd>
  9868. </dl>
  9869. <p>NOTE: Protocol can be used as output, but it is recommended to not do
  9870. it, unless special care is taken (tests, customized server configuration
  9871. etc.). Different FTP servers behave in different way during seek
  9872. operation. ff* tools may produce incomplete content due to server limitations.
  9873. </p>
  9874. </div>
  9875. <div class="section-level-extent" id="gopher">
  9876. <h3 class="section"><span>18.12 gopher<a class="copiable-link" href="#gopher"> &para;</a></span></h3>
  9877. <p>Gopher protocol.
  9878. </p>
  9879. </div>
  9880. <div class="section-level-extent" id="gophers">
  9881. <h3 class="section"><span>18.13 gophers<a class="copiable-link" href="#gophers"> &para;</a></span></h3>
  9882. <p>Gophers protocol.
  9883. </p>
  9884. <p>The Gopher protocol with TLS encapsulation.
  9885. </p>
  9886. </div>
  9887. <div class="section-level-extent" id="hls-1">
  9888. <h3 class="section"><span>18.14 hls<a class="copiable-link" href="#hls-1"> &para;</a></span></h3>
  9889. <p>Read Apple HTTP Live Streaming compliant segmented stream as
  9890. a uniform one. The M3U8 playlists describing the segments can be
  9891. remote HTTP resources or local files, accessed using the standard
  9892. file protocol.
  9893. The nested protocol is declared by specifying
  9894. &quot;+<var class="var">proto</var>&quot; after the hls URI scheme name, where <var class="var">proto</var>
  9895. is either &quot;file&quot; or &quot;http&quot;.
  9896. </p>
  9897. <div class="example">
  9898. <pre class="example-preformatted">hls+http://host/path/to/remote/resource.m3u8
  9899. hls+file://path/to/local/resource.m3u8
  9900. </pre></div>
  9901. <p>Using this protocol is discouraged - the hls demuxer should work
  9902. just as well (if not, please report the issues) and is more complete.
  9903. To use the hls demuxer instead, simply use the direct URLs to the
  9904. m3u8 files.
  9905. </p>
  9906. </div>
  9907. <div class="section-level-extent" id="http">
  9908. <h3 class="section"><span>18.15 http<a class="copiable-link" href="#http"> &para;</a></span></h3>
  9909. <p>HTTP (Hyper Text Transfer Protocol).
  9910. </p>
  9911. <p>This protocol accepts the following options:
  9912. </p>
  9913. <dl class="table">
  9914. <dt><samp class="option">seekable</samp></dt>
  9915. <dd><p>Control seekability of connection. If set to 1 the resource is
  9916. supposed to be seekable, if set to 0 it is assumed not to be seekable,
  9917. if set to -1 it will try to autodetect if it is seekable. Default
  9918. value is -1.
  9919. </p>
  9920. </dd>
  9921. <dt><samp class="option">chunked_post</samp></dt>
  9922. <dd><p>If set to 1 use chunked Transfer-Encoding for posts, default is 1.
  9923. </p>
  9924. </dd>
  9925. <dt><samp class="option">content_type</samp></dt>
  9926. <dd><p>Set a specific content type for the POST messages or for listen mode.
  9927. </p>
  9928. </dd>
  9929. <dt><samp class="option">http_proxy</samp></dt>
  9930. <dd><p>set HTTP proxy to tunnel through e.g. http://example.com:1234
  9931. </p>
  9932. </dd>
  9933. <dt><samp class="option">headers</samp></dt>
  9934. <dd><p>Set custom HTTP headers, can override built in default headers. The
  9935. value must be a string encoding the headers.
  9936. </p>
  9937. </dd>
  9938. <dt><samp class="option">multiple_requests</samp></dt>
  9939. <dd><p>Use persistent connections if set to 1, default is 0.
  9940. </p>
  9941. </dd>
  9942. <dt><samp class="option">post_data</samp></dt>
  9943. <dd><p>Set custom HTTP post data.
  9944. </p>
  9945. </dd>
  9946. <dt><samp class="option">referer</samp></dt>
  9947. <dd><p>Set the Referer header. Include &rsquo;Referer: URL&rsquo; header in HTTP request.
  9948. </p>
  9949. </dd>
  9950. <dt><samp class="option">user_agent</samp></dt>
  9951. <dd><p>Override the User-Agent header. If not specified the protocol will use a
  9952. string describing the libavformat build. (&quot;Lavf/&lt;version&gt;&quot;)
  9953. </p>
  9954. </dd>
  9955. <dt><samp class="option">reconnect_at_eof</samp></dt>
  9956. <dd><p>If set then eof is treated like an error and causes reconnection, this is useful
  9957. for live / endless streams.
  9958. </p>
  9959. </dd>
  9960. <dt><samp class="option">reconnect_streamed</samp></dt>
  9961. <dd><p>If set then even streamed/non seekable streams will be reconnected on errors.
  9962. </p>
  9963. </dd>
  9964. <dt><samp class="option">reconnect_on_network_error</samp></dt>
  9965. <dd><p>Reconnect automatically in case of TCP/TLS errors during connect.
  9966. </p>
  9967. </dd>
  9968. <dt><samp class="option">reconnect_on_http_error</samp></dt>
  9969. <dd><p>A comma separated list of HTTP status codes to reconnect on. The list can
  9970. include specific status codes (e.g. &rsquo;503&rsquo;) or the strings &rsquo;4xx&rsquo; / &rsquo;5xx&rsquo;.
  9971. </p>
  9972. </dd>
  9973. <dt><samp class="option">reconnect_delay_max</samp></dt>
  9974. <dd><p>Sets the maximum delay in seconds after which to give up reconnecting
  9975. </p>
  9976. </dd>
  9977. <dt><samp class="option">mime_type</samp></dt>
  9978. <dd><p>Export the MIME type.
  9979. </p>
  9980. </dd>
  9981. <dt><samp class="option">http_version</samp></dt>
  9982. <dd><p>Exports the HTTP response version number. Usually &quot;1.0&quot; or &quot;1.1&quot;.
  9983. </p>
  9984. </dd>
  9985. <dt><samp class="option">icy</samp></dt>
  9986. <dd><p>If set to 1 request ICY (SHOUTcast) metadata from the server. If the server
  9987. supports this, the metadata has to be retrieved by the application by reading
  9988. the <samp class="option">icy_metadata_headers</samp> and <samp class="option">icy_metadata_packet</samp> options.
  9989. The default is 1.
  9990. </p>
  9991. </dd>
  9992. <dt><samp class="option">icy_metadata_headers</samp></dt>
  9993. <dd><p>If the server supports ICY metadata, this contains the ICY-specific HTTP reply
  9994. headers, separated by newline characters.
  9995. </p>
  9996. </dd>
  9997. <dt><samp class="option">icy_metadata_packet</samp></dt>
  9998. <dd><p>If the server supports ICY metadata, and <samp class="option">icy</samp> was set to 1, this
  9999. contains the last non-empty metadata packet sent by the server. It should be
  10000. polled in regular intervals by applications interested in mid-stream metadata
  10001. updates.
  10002. </p>
  10003. </dd>
  10004. <dt><samp class="option">cookies</samp></dt>
  10005. <dd><p>Set the cookies to be sent in future requests. The format of each cookie is the
  10006. same as the value of a Set-Cookie HTTP response field. Multiple cookies can be
  10007. delimited by a newline character.
  10008. </p>
  10009. </dd>
  10010. <dt><samp class="option">offset</samp></dt>
  10011. <dd><p>Set initial byte offset.
  10012. </p>
  10013. </dd>
  10014. <dt><samp class="option">end_offset</samp></dt>
  10015. <dd><p>Try to limit the request to bytes preceding this offset.
  10016. </p>
  10017. </dd>
  10018. <dt><samp class="option">method</samp></dt>
  10019. <dd><p>When used as a client option it sets the HTTP method for the request.
  10020. </p>
  10021. <p>When used as a server option it sets the HTTP method that is going to be
  10022. expected from the client(s).
  10023. If the expected and the received HTTP method do not match the client will
  10024. be given a Bad Request response.
  10025. When unset the HTTP method is not checked for now. This will be replaced by
  10026. autodetection in the future.
  10027. </p>
  10028. </dd>
  10029. <dt><samp class="option">listen</samp></dt>
  10030. <dd><p>If set to 1 enables experimental HTTP server. This can be used to send data when
  10031. used as an output option, or read data from a client with HTTP POST when used as
  10032. an input option.
  10033. If set to 2 enables experimental multi-client HTTP server. This is not yet implemented
  10034. in ffmpeg.c and thus must not be used as a command line option.
  10035. </p><div class="example">
  10036. <pre class="example-preformatted"># Server side (sending):
  10037. ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<var class="var">server</var>:<var class="var">port</var>
  10038. # Client side (receiving):
  10039. ffmpeg -i http://<var class="var">server</var>:<var class="var">port</var> -c copy somefile.ogg
  10040. # Client can also be done with wget:
  10041. wget http://<var class="var">server</var>:<var class="var">port</var> -O somefile.ogg
  10042. # Server side (receiving):
  10043. ffmpeg -listen 1 -i http://<var class="var">server</var>:<var class="var">port</var> -c copy somefile.ogg
  10044. # Client side (sending):
  10045. ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<var class="var">server</var>:<var class="var">port</var>
  10046. # Client can also be done with wget:
  10047. wget --post-file=somefile.ogg http://<var class="var">server</var>:<var class="var">port</var>
  10048. </pre></div>
  10049. </dd>
  10050. <dt><samp class="option">send_expect_100</samp></dt>
  10051. <dd><p>Send an Expect: 100-continue header for POST. If set to 1 it will send, if set
  10052. to 0 it won&rsquo;t, if set to -1 it will try to send if it is applicable. Default
  10053. value is -1.
  10054. </p>
  10055. </dd>
  10056. <dt><samp class="option">auth_type</samp></dt>
  10057. <dd>
  10058. <p>Set HTTP authentication type. No option for Digest, since this method requires
  10059. getting nonce parameters from the server first and can&rsquo;t be used straight away like
  10060. Basic.
  10061. </p>
  10062. <dl class="table">
  10063. <dt><samp class="option">none</samp></dt>
  10064. <dd><p>Choose the HTTP authentication type automatically. This is the default.
  10065. </p></dd>
  10066. <dt><samp class="option">basic</samp></dt>
  10067. <dd>
  10068. <p>Choose the HTTP basic authentication.
  10069. </p>
  10070. <p>Basic authentication sends a Base64-encoded string that contains a user name and password
  10071. for the client. Base64 is not a form of encryption and should be considered the same as
  10072. sending the user name and password in clear text (Base64 is a reversible encoding).
  10073. If a resource needs to be protected, strongly consider using an authentication scheme
  10074. other than basic authentication. HTTPS/TLS should be used with basic authentication.
  10075. Without these additional security enhancements, basic authentication should not be used
  10076. to protect sensitive or valuable information.
  10077. </p></dd>
  10078. </dl>
  10079. </dd>
  10080. </dl>
  10081. <ul class="mini-toc">
  10082. <li><a href="#HTTP-Cookies" accesskey="1">HTTP Cookies</a></li>
  10083. </ul>
  10084. <div class="subsection-level-extent" id="HTTP-Cookies">
  10085. <h4 class="subsection"><span>18.15.1 HTTP Cookies<a class="copiable-link" href="#HTTP-Cookies"> &para;</a></span></h4>
  10086. <p>Some HTTP requests will be denied unless cookie values are passed in with the
  10087. request. The <samp class="option">cookies</samp> option allows these cookies to be specified. At
  10088. the very least, each cookie must specify a value along with a path and domain.
  10089. HTTP requests that match both the domain and path will automatically include the
  10090. cookie value in the HTTP Cookie header field. Multiple cookies can be delimited
  10091. by a newline.
  10092. </p>
  10093. <p>The required syntax to play a stream specifying a cookie is:
  10094. </p><div class="example">
  10095. <pre class="example-preformatted">ffplay -cookies &quot;nlqptid=nltid=tsn; path=/; domain=somedomain.com;&quot; http://somedomain.com/somestream.m3u8
  10096. </pre></div>
  10097. </div>
  10098. </div>
  10099. <div class="section-level-extent" id="Icecast">
  10100. <h3 class="section"><span>18.16 Icecast<a class="copiable-link" href="#Icecast"> &para;</a></span></h3>
  10101. <p>Icecast protocol (stream to Icecast servers)
  10102. </p>
  10103. <p>This protocol accepts the following options:
  10104. </p>
  10105. <dl class="table">
  10106. <dt><samp class="option">ice_genre</samp></dt>
  10107. <dd><p>Set the stream genre.
  10108. </p>
  10109. </dd>
  10110. <dt><samp class="option">ice_name</samp></dt>
  10111. <dd><p>Set the stream name.
  10112. </p>
  10113. </dd>
  10114. <dt><samp class="option">ice_description</samp></dt>
  10115. <dd><p>Set the stream description.
  10116. </p>
  10117. </dd>
  10118. <dt><samp class="option">ice_url</samp></dt>
  10119. <dd><p>Set the stream website URL.
  10120. </p>
  10121. </dd>
  10122. <dt><samp class="option">ice_public</samp></dt>
  10123. <dd><p>Set if the stream should be public.
  10124. The default is 0 (not public).
  10125. </p>
  10126. </dd>
  10127. <dt><samp class="option">user_agent</samp></dt>
  10128. <dd><p>Override the User-Agent header. If not specified a string of the form
  10129. &quot;Lavf/&lt;version&gt;&quot; will be used.
  10130. </p>
  10131. </dd>
  10132. <dt><samp class="option">password</samp></dt>
  10133. <dd><p>Set the Icecast mountpoint password.
  10134. </p>
  10135. </dd>
  10136. <dt><samp class="option">content_type</samp></dt>
  10137. <dd><p>Set the stream content type. This must be set if it is different from
  10138. audio/mpeg.
  10139. </p>
  10140. </dd>
  10141. <dt><samp class="option">legacy_icecast</samp></dt>
  10142. <dd><p>This enables support for Icecast versions &lt; 2.4.0, that do not support the
  10143. HTTP PUT method but the SOURCE method.
  10144. </p>
  10145. </dd>
  10146. <dt><samp class="option">tls</samp></dt>
  10147. <dd><p>Establish a TLS (HTTPS) connection to Icecast.
  10148. </p>
  10149. </dd>
  10150. </dl>
  10151. <div class="example">
  10152. <pre class="example-preformatted">icecast://[<var class="var">username</var>[:<var class="var">password</var>]@]<var class="var">server</var>:<var class="var">port</var>/<var class="var">mountpoint</var>
  10153. </pre></div>
  10154. </div>
  10155. <div class="section-level-extent" id="ipfs">
  10156. <h3 class="section"><span>18.17 ipfs<a class="copiable-link" href="#ipfs"> &para;</a></span></h3>
  10157. <p>InterPlanetary File System (IPFS) protocol support. One can access files stored
  10158. on the IPFS network through so-called gateways. These are http(s) endpoints.
  10159. This protocol wraps the IPFS native protocols (ipfs:// and ipns://) to be sent
  10160. to such a gateway. Users can (and should) host their own node which means this
  10161. protocol will use one&rsquo;s local gateway to access files on the IPFS network.
  10162. </p>
  10163. <p>This protocol accepts the following options:
  10164. </p>
  10165. <dl class="table">
  10166. <dt><samp class="option">gateway</samp></dt>
  10167. <dd><p>Defines the gateway to use. When not set, the protocol will first try
  10168. locating the local gateway by looking at <code class="code">$IPFS_GATEWAY</code>, <code class="code">$IPFS_PATH</code>
  10169. and <code class="code">$HOME/.ipfs/</code>, in that order.
  10170. </p>
  10171. </dd>
  10172. </dl>
  10173. <p>One can use this protocol in 2 ways. Using IPFS:
  10174. </p><div class="example">
  10175. <pre class="example-preformatted">ffplay ipfs://&lt;hash&gt;
  10176. </pre></div>
  10177. <p>Or the IPNS protocol (IPNS is mutable IPFS):
  10178. </p><div class="example">
  10179. <pre class="example-preformatted">ffplay ipns://&lt;hash&gt;
  10180. </pre></div>
  10181. </div>
  10182. <div class="section-level-extent" id="mmst">
  10183. <h3 class="section"><span>18.18 mmst<a class="copiable-link" href="#mmst"> &para;</a></span></h3>
  10184. <p>MMS (Microsoft Media Server) protocol over TCP.
  10185. </p>
  10186. </div>
  10187. <div class="section-level-extent" id="mmsh">
  10188. <h3 class="section"><span>18.19 mmsh<a class="copiable-link" href="#mmsh"> &para;</a></span></h3>
  10189. <p>MMS (Microsoft Media Server) protocol over HTTP.
  10190. </p>
  10191. <p>The required syntax is:
  10192. </p><div class="example">
  10193. <pre class="example-preformatted">mmsh://<var class="var">server</var>[:<var class="var">port</var>][/<var class="var">app</var>][/<var class="var">playpath</var>]
  10194. </pre></div>
  10195. </div>
  10196. <div class="section-level-extent" id="md5">
  10197. <h3 class="section"><span>18.20 md5<a class="copiable-link" href="#md5"> &para;</a></span></h3>
  10198. <p>MD5 output protocol.
  10199. </p>
  10200. <p>Computes the MD5 hash of the data to be written, and on close writes
  10201. this to the designated output or stdout if none is specified. It can
  10202. be used to test muxers without writing an actual file.
  10203. </p>
  10204. <p>Some examples follow.
  10205. </p><div class="example">
  10206. <pre class="example-preformatted"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
  10207. ffmpeg -i input.flv -f avi -y md5:output.avi.md5
  10208. # Write the MD5 hash of the encoded AVI file to stdout.
  10209. ffmpeg -i input.flv -f avi -y md5:
  10210. </pre></div>
  10211. <p>Note that some formats (typically MOV) require the output protocol to
  10212. be seekable, so they will fail with the MD5 output protocol.
  10213. </p>
  10214. </div>
  10215. <div class="section-level-extent" id="pipe">
  10216. <h3 class="section"><span>18.21 pipe<a class="copiable-link" href="#pipe"> &para;</a></span></h3>
  10217. <p>UNIX pipe access protocol.
  10218. </p>
  10219. <p>Read and write from UNIX pipes.
  10220. </p>
  10221. <p>The accepted syntax is:
  10222. </p><div class="example">
  10223. <pre class="example-preformatted">pipe:[<var class="var">number</var>]
  10224. </pre></div>
  10225. <p>If <samp class="option">fd</samp> isn&rsquo;t specified, <var class="var">number</var> is the number corresponding to the file descriptor of the
  10226. pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If <var class="var">number</var>
  10227. is not specified, by default the stdout file descriptor will be used
  10228. for writing, stdin for reading.
  10229. </p>
  10230. <p>For example to read from stdin with <code class="command">ffmpeg</code>:
  10231. </p><div class="example">
  10232. <pre class="example-preformatted">cat test.wav | ffmpeg -i pipe:0
  10233. # ...this is the same as...
  10234. cat test.wav | ffmpeg -i pipe:
  10235. </pre></div>
  10236. <p>For writing to stdout with <code class="command">ffmpeg</code>:
  10237. </p><div class="example">
  10238. <pre class="example-preformatted">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
  10239. # ...this is the same as...
  10240. ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
  10241. </pre></div>
  10242. <p>This protocol accepts the following options:
  10243. </p>
  10244. <dl class="table">
  10245. <dt><samp class="option">blocksize</samp></dt>
  10246. <dd><p>Set I/O operation maximum block size, in bytes. Default value is
  10247. <code class="code">INT_MAX</code>, which results in not limiting the requested block size.
  10248. Setting this value reasonably low improves user termination request reaction
  10249. time, which is valuable if data transmission is slow.
  10250. </p></dd>
  10251. <dt><samp class="option">fd</samp></dt>
  10252. <dd><p>Set file descriptor.
  10253. </p></dd>
  10254. </dl>
  10255. <p>Note that some formats (typically MOV), require the output protocol to
  10256. be seekable, so they will fail with the pipe output protocol.
  10257. </p>
  10258. </div>
  10259. <div class="section-level-extent" id="prompeg">
  10260. <h3 class="section"><span>18.22 prompeg<a class="copiable-link" href="#prompeg"> &para;</a></span></h3>
  10261. <p>Pro-MPEG Code of Practice #3 Release 2 FEC protocol.
  10262. </p>
  10263. <p>The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction mechanism
  10264. for MPEG-2 Transport Streams sent over RTP.
  10265. </p>
  10266. <p>This protocol must be used in conjunction with the <code class="code">rtp_mpegts</code> muxer and
  10267. the <code class="code">rtp</code> protocol.
  10268. </p>
  10269. <p>The required syntax is:
  10270. </p><div class="example">
  10271. <pre class="example-preformatted">-f rtp_mpegts -fec prompeg=<var class="var">option</var>=<var class="var">val</var>... rtp://<var class="var">hostname</var>:<var class="var">port</var>
  10272. </pre></div>
  10273. <p>The destination UDP ports are <code class="code">port + 2</code> for the column FEC stream
  10274. and <code class="code">port + 4</code> for the row FEC stream.
  10275. </p>
  10276. <p>This protocol accepts the following options:
  10277. </p><dl class="table">
  10278. <dt><samp class="option">l=<var class="var">n</var></samp></dt>
  10279. <dd><p>The number of columns (4-20, LxD &lt;= 100)
  10280. </p>
  10281. </dd>
  10282. <dt><samp class="option">d=<var class="var">n</var></samp></dt>
  10283. <dd><p>The number of rows (4-20, LxD &lt;= 100)
  10284. </p>
  10285. </dd>
  10286. </dl>
  10287. <p>Example usage:
  10288. </p>
  10289. <div class="example">
  10290. <pre class="example-preformatted">-f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<var class="var">hostname</var>:<var class="var">port</var>
  10291. </pre></div>
  10292. </div>
  10293. <div class="section-level-extent" id="rist">
  10294. <h3 class="section"><span>18.23 rist<a class="copiable-link" href="#rist"> &para;</a></span></h3>
  10295. <p>Reliable Internet Streaming Transport protocol
  10296. </p>
  10297. <p>The accepted options are:
  10298. </p><dl class="table">
  10299. <dt><samp class="option">rist_profile</samp></dt>
  10300. <dd><p>Supported values:
  10301. </p><dl class="table">
  10302. <dt>&lsquo;<samp class="samp">simple</samp>&rsquo;</dt>
  10303. <dt>&lsquo;<samp class="samp">main</samp>&rsquo;</dt>
  10304. <dd><p>This one is default.
  10305. </p></dd>
  10306. <dt>&lsquo;<samp class="samp">advanced</samp>&rsquo;</dt>
  10307. </dl>
  10308. </dd>
  10309. <dt><samp class="option">buffer_size</samp></dt>
  10310. <dd><p>Set internal RIST buffer size in milliseconds for retransmission of data.
  10311. Default value is 0 which means the librist default (1 sec). Maximum value is 30
  10312. seconds.
  10313. </p>
  10314. </dd>
  10315. <dt><samp class="option">fifo_size</samp></dt>
  10316. <dd><p>Size of the librist receiver output fifo in number of packets. This must be a
  10317. power of 2.
  10318. Defaults to 8192 (vs the librist default of 1024).
  10319. </p>
  10320. </dd>
  10321. <dt><samp class="option">overrun_nonfatal=<var class="var">1|0</var></samp></dt>
  10322. <dd><p>Survive in case of librist fifo buffer overrun. Default value is 0.
  10323. </p>
  10324. </dd>
  10325. <dt><samp class="option">pkt_size</samp></dt>
  10326. <dd><p>Set maximum packet size for sending data. 1316 by default.
  10327. </p>
  10328. </dd>
  10329. <dt><samp class="option">log_level</samp></dt>
  10330. <dd><p>Set loglevel for RIST logging messages. You only need to set this if you
  10331. explicitly want to enable debug level messages or packet loss simulation,
  10332. otherwise the regular loglevel is respected.
  10333. </p>
  10334. </dd>
  10335. <dt><samp class="option">secret</samp></dt>
  10336. <dd><p>Set override of encryption secret, by default is unset.
  10337. </p>
  10338. </dd>
  10339. <dt><samp class="option">encryption</samp></dt>
  10340. <dd><p>Set encryption type, by default is disabled.
  10341. Acceptable values are 128 and 256.
  10342. </p></dd>
  10343. </dl>
  10344. </div>
  10345. <div class="section-level-extent" id="rtmp">
  10346. <h3 class="section"><span>18.24 rtmp<a class="copiable-link" href="#rtmp"> &para;</a></span></h3>
  10347. <p>Real-Time Messaging Protocol.
  10348. </p>
  10349. <p>The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
  10350. content across a TCP/IP network.
  10351. </p>
  10352. <p>The required syntax is:
  10353. </p><div class="example">
  10354. <pre class="example-preformatted">rtmp://[<var class="var">username</var>:<var class="var">password</var>@]<var class="var">server</var>[:<var class="var">port</var>][/<var class="var">app</var>][/<var class="var">instance</var>][/<var class="var">playpath</var>]
  10355. </pre></div>
  10356. <p>The accepted parameters are:
  10357. </p><dl class="table">
  10358. <dt><samp class="option">username</samp></dt>
  10359. <dd><p>An optional username (mostly for publishing).
  10360. </p>
  10361. </dd>
  10362. <dt><samp class="option">password</samp></dt>
  10363. <dd><p>An optional password (mostly for publishing).
  10364. </p>
  10365. </dd>
  10366. <dt><samp class="option">server</samp></dt>
  10367. <dd><p>The address of the RTMP server.
  10368. </p>
  10369. </dd>
  10370. <dt><samp class="option">port</samp></dt>
  10371. <dd><p>The number of the TCP port to use (by default is 1935).
  10372. </p>
  10373. </dd>
  10374. <dt><samp class="option">app</samp></dt>
  10375. <dd><p>It is the name of the application to access. It usually corresponds to
  10376. the path where the application is installed on the RTMP server
  10377. (e.g. <samp class="file">/ondemand/</samp>, <samp class="file">/flash/live/</samp>, etc.). You can override
  10378. the value parsed from the URI through the <code class="code">rtmp_app</code> option, too.
  10379. </p>
  10380. </dd>
  10381. <dt><samp class="option">playpath</samp></dt>
  10382. <dd><p>It is the path or name of the resource to play with reference to the
  10383. application specified in <var class="var">app</var>, may be prefixed by &quot;mp4:&quot;. You
  10384. can override the value parsed from the URI through the <code class="code">rtmp_playpath</code>
  10385. option, too.
  10386. </p>
  10387. </dd>
  10388. <dt><samp class="option">listen</samp></dt>
  10389. <dd><p>Act as a server, listening for an incoming connection.
  10390. </p>
  10391. </dd>
  10392. <dt><samp class="option">timeout</samp></dt>
  10393. <dd><p>Maximum time to wait for the incoming connection. Implies listen.
  10394. </p></dd>
  10395. </dl>
  10396. <p>Additionally, the following parameters can be set via command line options
  10397. (or in code via <code class="code">AVOption</code>s):
  10398. </p><dl class="table">
  10399. <dt><samp class="option">rtmp_app</samp></dt>
  10400. <dd><p>Name of application to connect on the RTMP server. This option
  10401. overrides the parameter specified in the URI.
  10402. </p>
  10403. </dd>
  10404. <dt><samp class="option">rtmp_buffer</samp></dt>
  10405. <dd><p>Set the client buffer time in milliseconds. The default is 3000.
  10406. </p>
  10407. </dd>
  10408. <dt><samp class="option">rtmp_conn</samp></dt>
  10409. <dd><p>Extra arbitrary AMF connection parameters, parsed from a string,
  10410. e.g. like <code class="code">B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0</code>.
  10411. Each value is prefixed by a single character denoting the type,
  10412. B for Boolean, N for number, S for string, O for object, or Z for null,
  10413. followed by a colon. For Booleans the data must be either 0 or 1 for
  10414. FALSE or TRUE, respectively. Likewise for Objects the data must be 0 or
  10415. 1 to end or begin an object, respectively. Data items in subobjects may
  10416. be named, by prefixing the type with &rsquo;N&rsquo; and specifying the name before
  10417. the value (i.e. <code class="code">NB:myFlag:1</code>). This option may be used multiple
  10418. times to construct arbitrary AMF sequences.
  10419. </p>
  10420. </dd>
  10421. <dt><samp class="option">rtmp_enhanced_codecs</samp></dt>
  10422. <dd><p>Specify the list of codecs the client advertises to support in an
  10423. enhanced RTMP stream. This option should be set to a comma separated
  10424. list of fourcc values, like <code class="code">hvc1,av01,vp09</code> for multiple codecs
  10425. or <code class="code">hvc1</code> for only one codec. The specified list will be presented
  10426. in the &quot;fourCcLive&quot; property of the Connect Command Message.
  10427. </p>
  10428. </dd>
  10429. <dt><samp class="option">rtmp_flashver</samp></dt>
  10430. <dd><p>Version of the Flash plugin used to run the SWF player. The default
  10431. is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;
  10432. &lt;libavformat version&gt;).)
  10433. </p>
  10434. </dd>
  10435. <dt><samp class="option">rtmp_flush_interval</samp></dt>
  10436. <dd><p>Number of packets flushed in the same request (RTMPT only). The default
  10437. is 10.
  10438. </p>
  10439. </dd>
  10440. <dt><samp class="option">rtmp_live</samp></dt>
  10441. <dd><p>Specify that the media is a live stream. No resuming or seeking in
  10442. live streams is possible. The default value is <code class="code">any</code>, which means the
  10443. subscriber first tries to play the live stream specified in the
  10444. playpath. If a live stream of that name is not found, it plays the
  10445. recorded stream. The other possible values are <code class="code">live</code> and
  10446. <code class="code">recorded</code>.
  10447. </p>
  10448. </dd>
  10449. <dt><samp class="option">rtmp_pageurl</samp></dt>
  10450. <dd><p>URL of the web page in which the media was embedded. By default no
  10451. value will be sent.
  10452. </p>
  10453. </dd>
  10454. <dt><samp class="option">rtmp_playpath</samp></dt>
  10455. <dd><p>Stream identifier to play or to publish. This option overrides the
  10456. parameter specified in the URI.
  10457. </p>
  10458. </dd>
  10459. <dt><samp class="option">rtmp_subscribe</samp></dt>
  10460. <dd><p>Name of live stream to subscribe to. By default no value will be sent.
  10461. It is only sent if the option is specified or if rtmp_live
  10462. is set to live.
  10463. </p>
  10464. </dd>
  10465. <dt><samp class="option">rtmp_swfhash</samp></dt>
  10466. <dd><p>SHA256 hash of the decompressed SWF file (32 bytes).
  10467. </p>
  10468. </dd>
  10469. <dt><samp class="option">rtmp_swfsize</samp></dt>
  10470. <dd><p>Size of the decompressed SWF file, required for SWFVerification.
  10471. </p>
  10472. </dd>
  10473. <dt><samp class="option">rtmp_swfurl</samp></dt>
  10474. <dd><p>URL of the SWF player for the media. By default no value will be sent.
  10475. </p>
  10476. </dd>
  10477. <dt><samp class="option">rtmp_swfverify</samp></dt>
  10478. <dd><p>URL to player swf file, compute hash/size automatically.
  10479. </p>
  10480. </dd>
  10481. <dt><samp class="option">rtmp_tcurl</samp></dt>
  10482. <dd><p>URL of the target stream. Defaults to proto://host[:port]/app.
  10483. </p>
  10484. </dd>
  10485. <dt><samp class="option">tcp_nodelay=<var class="var">1|0</var></samp></dt>
  10486. <dd><p>Set TCP_NODELAY to disable Nagle&rsquo;s algorithm. Default value is 0.
  10487. </p>
  10488. <p><em class="emph">Remark: Writing to the socket is currently not optimized to minimize system calls and reduces the efficiency / effect of TCP_NODELAY.</em>
  10489. </p>
  10490. </dd>
  10491. </dl>
  10492. <p>For example to read with <code class="command">ffplay</code> a multimedia resource named
  10493. &quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
  10494. </p><div class="example">
  10495. <pre class="example-preformatted">ffplay rtmp://myserver/vod/sample
  10496. </pre></div>
  10497. <p>To publish to a password protected server, passing the playpath and
  10498. app names separately:
  10499. </p><div class="example">
  10500. <pre class="example-preformatted">ffmpeg -re -i &lt;input&gt; -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
  10501. </pre></div>
  10502. </div>
  10503. <div class="section-level-extent" id="rtmpe">
  10504. <h3 class="section"><span>18.25 rtmpe<a class="copiable-link" href="#rtmpe"> &para;</a></span></h3>
  10505. <p>Encrypted Real-Time Messaging Protocol.
  10506. </p>
  10507. <p>The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
  10508. streaming multimedia content within standard cryptographic primitives,
  10509. consisting of Diffie-Hellman key exchange and HMACSHA256, generating
  10510. a pair of RC4 keys.
  10511. </p>
  10512. </div>
  10513. <div class="section-level-extent" id="rtmps">
  10514. <h3 class="section"><span>18.26 rtmps<a class="copiable-link" href="#rtmps"> &para;</a></span></h3>
  10515. <p>Real-Time Messaging Protocol over a secure SSL connection.
  10516. </p>
  10517. <p>The Real-Time Messaging Protocol (RTMPS) is used for streaming
  10518. multimedia content across an encrypted connection.
  10519. </p>
  10520. </div>
  10521. <div class="section-level-extent" id="rtmpt">
  10522. <h3 class="section"><span>18.27 rtmpt<a class="copiable-link" href="#rtmpt"> &para;</a></span></h3>
  10523. <p>Real-Time Messaging Protocol tunneled through HTTP.
  10524. </p>
  10525. <p>The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
  10526. for streaming multimedia content within HTTP requests to traverse
  10527. firewalls.
  10528. </p>
  10529. </div>
  10530. <div class="section-level-extent" id="rtmpte">
  10531. <h3 class="section"><span>18.28 rtmpte<a class="copiable-link" href="#rtmpte"> &para;</a></span></h3>
  10532. <p>Encrypted Real-Time Messaging Protocol tunneled through HTTP.
  10533. </p>
  10534. <p>The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
  10535. is used for streaming multimedia content within HTTP requests to traverse
  10536. firewalls.
  10537. </p>
  10538. </div>
  10539. <div class="section-level-extent" id="rtmpts">
  10540. <h3 class="section"><span>18.29 rtmpts<a class="copiable-link" href="#rtmpts"> &para;</a></span></h3>
  10541. <p>Real-Time Messaging Protocol tunneled through HTTPS.
  10542. </p>
  10543. <p>The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
  10544. for streaming multimedia content within HTTPS requests to traverse
  10545. firewalls.
  10546. </p>
  10547. </div>
  10548. <div class="section-level-extent" id="libsmbclient">
  10549. <h3 class="section"><span>18.30 libsmbclient<a class="copiable-link" href="#libsmbclient"> &para;</a></span></h3>
  10550. <p>libsmbclient permits one to manipulate CIFS/SMB network resources.
  10551. </p>
  10552. <p>Following syntax is required.
  10553. </p>
  10554. <div class="example">
  10555. <pre class="example-preformatted">smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
  10556. </pre></div>
  10557. <p>This protocol accepts the following options.
  10558. </p>
  10559. <dl class="table">
  10560. <dt><samp class="option">timeout</samp></dt>
  10561. <dd><p>Set timeout in milliseconds of socket I/O operations used by the underlying
  10562. low level operation. By default it is set to -1, which means that the timeout
  10563. is not specified.
  10564. </p>
  10565. </dd>
  10566. <dt><samp class="option">truncate</samp></dt>
  10567. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  10568. truncating. Default value is 1.
  10569. </p>
  10570. </dd>
  10571. <dt><samp class="option">workgroup</samp></dt>
  10572. <dd><p>Set the workgroup used for making connections. By default workgroup is not specified.
  10573. </p>
  10574. </dd>
  10575. </dl>
  10576. <p>For more information see: <a class="url" href="http://www.samba.org/">http://www.samba.org/</a>.
  10577. </p>
  10578. </div>
  10579. <div class="section-level-extent" id="libssh">
  10580. <h3 class="section"><span>18.31 libssh<a class="copiable-link" href="#libssh"> &para;</a></span></h3>
  10581. <p>Secure File Transfer Protocol via libssh
  10582. </p>
  10583. <p>Read from or write to remote resources using SFTP protocol.
  10584. </p>
  10585. <p>Following syntax is required.
  10586. </p>
  10587. <div class="example">
  10588. <pre class="example-preformatted">sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  10589. </pre></div>
  10590. <p>This protocol accepts the following options.
  10591. </p>
  10592. <dl class="table">
  10593. <dt><samp class="option">timeout</samp></dt>
  10594. <dd><p>Set timeout of socket I/O operations used by the underlying low level
  10595. operation. By default it is set to -1, which means that the timeout
  10596. is not specified.
  10597. </p>
  10598. </dd>
  10599. <dt><samp class="option">truncate</samp></dt>
  10600. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  10601. truncating. Default value is 1.
  10602. </p>
  10603. </dd>
  10604. <dt><samp class="option">private_key</samp></dt>
  10605. <dd><p>Specify the path of the file containing private key to use during authorization.
  10606. By default libssh searches for keys in the <samp class="file">~/.ssh/</samp> directory.
  10607. </p>
  10608. </dd>
  10609. </dl>
  10610. <p>Example: Play a file stored on remote server.
  10611. </p>
  10612. <div class="example">
  10613. <pre class="example-preformatted">ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
  10614. </pre></div>
  10615. </div>
  10616. <div class="section-level-extent" id="librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">
  10617. <h3 class="section"><span>18.32 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte<a class="copiable-link" href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"> &para;</a></span></h3>
  10618. <p>Real-Time Messaging Protocol and its variants supported through
  10619. librtmp.
  10620. </p>
  10621. <p>Requires the presence of the librtmp headers and library during
  10622. configuration. You need to explicitly configure the build with
  10623. &quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
  10624. protocol.
  10625. </p>
  10626. <p>This protocol provides most client functions and a few server
  10627. functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
  10628. encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
  10629. variants of these encrypted types (RTMPTE, RTMPTS).
  10630. </p>
  10631. <p>The required syntax is:
  10632. </p><div class="example">
  10633. <pre class="example-preformatted"><var class="var">rtmp_proto</var>://<var class="var">server</var>[:<var class="var">port</var>][/<var class="var">app</var>][/<var class="var">playpath</var>] <var class="var">options</var>
  10634. </pre></div>
  10635. <p>where <var class="var">rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
  10636. &quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
  10637. <var class="var">server</var>, <var class="var">port</var>, <var class="var">app</var> and <var class="var">playpath</var> have the same
  10638. meaning as specified for the RTMP native protocol.
  10639. <var class="var">options</var> contains a list of space-separated options of the form
  10640. <var class="var">key</var>=<var class="var">val</var>.
  10641. </p>
  10642. <p>See the librtmp manual page (man 3 librtmp) for more information.
  10643. </p>
  10644. <p>For example, to stream a file in real-time to an RTMP server using
  10645. <code class="command">ffmpeg</code>:
  10646. </p><div class="example">
  10647. <pre class="example-preformatted">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
  10648. </pre></div>
  10649. <p>To play the same stream using <code class="command">ffplay</code>:
  10650. </p><div class="example">
  10651. <pre class="example-preformatted">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
  10652. </pre></div>
  10653. </div>
  10654. <div class="section-level-extent" id="rtp">
  10655. <h3 class="section"><span>18.33 rtp<a class="copiable-link" href="#rtp"> &para;</a></span></h3>
  10656. <p>Real-time Transport Protocol.
  10657. </p>
  10658. <p>The required syntax for an RTP URL is:
  10659. rtp://<var class="var">hostname</var>[:<var class="var">port</var>][?<var class="var">option</var>=<var class="var">val</var>...]
  10660. </p>
  10661. <p><var class="var">port</var> specifies the RTP port to use.
  10662. </p>
  10663. <p>The following URL options are supported:
  10664. </p>
  10665. <dl class="table">
  10666. <dt><samp class="option">ttl=<var class="var">n</var></samp></dt>
  10667. <dd><p>Set the TTL (Time-To-Live) value (for multicast only).
  10668. </p>
  10669. </dd>
  10670. <dt><samp class="option">rtcpport=<var class="var">n</var></samp></dt>
  10671. <dd><p>Set the remote RTCP port to <var class="var">n</var>.
  10672. </p>
  10673. </dd>
  10674. <dt><samp class="option">localrtpport=<var class="var">n</var></samp></dt>
  10675. <dd><p>Set the local RTP port to <var class="var">n</var>.
  10676. </p>
  10677. </dd>
  10678. <dt><samp class="option">localrtcpport=<var class="var">n</var>'</samp></dt>
  10679. <dd><p>Set the local RTCP port to <var class="var">n</var>.
  10680. </p>
  10681. </dd>
  10682. <dt><samp class="option">pkt_size=<var class="var">n</var></samp></dt>
  10683. <dd><p>Set max packet size (in bytes) to <var class="var">n</var>.
  10684. </p>
  10685. </dd>
  10686. <dt><samp class="option">buffer_size=<var class="var">size</var></samp></dt>
  10687. <dd><p>Set the maximum UDP socket buffer size in bytes.
  10688. </p>
  10689. </dd>
  10690. <dt><samp class="option">connect=0|1</samp></dt>
  10691. <dd><p>Do a <code class="code">connect()</code> on the UDP socket (if set to 1) or not (if set
  10692. to 0).
  10693. </p>
  10694. </dd>
  10695. <dt><samp class="option">sources=<var class="var">ip</var>[,<var class="var">ip</var>]</samp></dt>
  10696. <dd><p>List allowed source IP addresses.
  10697. </p>
  10698. </dd>
  10699. <dt><samp class="option">block=<var class="var">ip</var>[,<var class="var">ip</var>]</samp></dt>
  10700. <dd><p>List disallowed (blocked) source IP addresses.
  10701. </p>
  10702. </dd>
  10703. <dt><samp class="option">write_to_source=0|1</samp></dt>
  10704. <dd><p>Send packets to the source address of the latest received packet (if
  10705. set to 1) or to a default remote address (if set to 0).
  10706. </p>
  10707. </dd>
  10708. <dt><samp class="option">localport=<var class="var">n</var></samp></dt>
  10709. <dd><p>Set the local RTP port to <var class="var">n</var>.
  10710. </p>
  10711. </dd>
  10712. <dt><samp class="option">localaddr=<var class="var">addr</var></samp></dt>
  10713. <dd><p>Local IP address of a network interface used for sending packets or joining
  10714. multicast groups.
  10715. </p>
  10716. </dd>
  10717. <dt><samp class="option">timeout=<var class="var">n</var></samp></dt>
  10718. <dd><p>Set timeout (in microseconds) of socket I/O operations to <var class="var">n</var>.
  10719. </p>
  10720. <p>This is a deprecated option. Instead, <samp class="option">localrtpport</samp> should be
  10721. used.
  10722. </p>
  10723. </dd>
  10724. </dl>
  10725. <p>Important notes:
  10726. </p>
  10727. <ol class="enumerate">
  10728. <li> If <samp class="option">rtcpport</samp> is not set the RTCP port will be set to the RTP
  10729. port value plus 1.
  10730. </li><li> If <samp class="option">localrtpport</samp> (the local RTP port) is not set any available
  10731. port will be used for the local RTP and RTCP ports.
  10732. </li><li> If <samp class="option">localrtcpport</samp> (the local RTCP port) is not set it will be
  10733. set to the local RTP port value plus 1.
  10734. </li></ol>
  10735. </div>
  10736. <div class="section-level-extent" id="rtsp">
  10737. <h3 class="section"><span>18.34 rtsp<a class="copiable-link" href="#rtsp"> &para;</a></span></h3>
  10738. <p>Real-Time Streaming Protocol.
  10739. </p>
  10740. <p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
  10741. and muxer. The demuxer supports both normal RTSP (with data transferred
  10742. over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
  10743. data transferred over RDT).
  10744. </p>
  10745. <p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
  10746. supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
  10747. <a class="uref" href="https://github.com/revmischa/rtsp-server">RTSP server</a>).
  10748. </p>
  10749. <p>The required syntax for a RTSP url is:
  10750. </p><div class="example">
  10751. <pre class="example-preformatted">rtsp://<var class="var">hostname</var>[:<var class="var">port</var>]/<var class="var">path</var>
  10752. </pre></div>
  10753. <p>Options can be set on the <code class="command">ffmpeg</code>/<code class="command">ffplay</code> command
  10754. line, or set in code via <code class="code">AVOption</code>s or in
  10755. <code class="code">avformat_open_input</code>.
  10756. </p>
  10757. <ul class="mini-toc">
  10758. <li><a href="#Muxer" accesskey="1">Muxer</a></li>
  10759. <li><a href="#Demuxer" accesskey="2">Demuxer</a></li>
  10760. <li><a href="#Examples-6" accesskey="3">Examples</a></li>
  10761. </ul>
  10762. <div class="subsection-level-extent" id="Muxer">
  10763. <h4 class="subsection"><span>18.34.1 Muxer<a class="copiable-link" href="#Muxer"> &para;</a></span></h4>
  10764. <p>The following options are supported.
  10765. </p>
  10766. <dl class="table">
  10767. <dt><samp class="option">rtsp_transport</samp></dt>
  10768. <dd><p>Set RTSP transport protocols.
  10769. </p>
  10770. <p>It accepts the following values:
  10771. </p><dl class="table">
  10772. <dt>&lsquo;<samp class="samp">udp</samp>&rsquo;</dt>
  10773. <dd><p>Use UDP as lower transport protocol.
  10774. </p>
  10775. </dd>
  10776. <dt>&lsquo;<samp class="samp">tcp</samp>&rsquo;</dt>
  10777. <dd><p>Use TCP (interleaving within the RTSP control channel) as lower
  10778. transport protocol.
  10779. </p></dd>
  10780. </dl>
  10781. <p>Default value is &lsquo;<samp class="samp">0</samp>&rsquo;.
  10782. </p>
  10783. </dd>
  10784. <dt><samp class="option">rtsp_flags</samp></dt>
  10785. <dd><p>Set RTSP flags.
  10786. </p>
  10787. <p>The following values are accepted:
  10788. </p><dl class="table">
  10789. <dt>&lsquo;<samp class="samp">latm</samp>&rsquo;</dt>
  10790. <dd><p>Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC.
  10791. </p></dd>
  10792. <dt>&lsquo;<samp class="samp">rfc2190</samp>&rsquo;</dt>
  10793. <dd><p>Use RFC 2190 packetization instead of RFC 4629 for H.263.
  10794. </p></dd>
  10795. <dt>&lsquo;<samp class="samp">skip_rtcp</samp>&rsquo;</dt>
  10796. <dd><p>Don&rsquo;t send RTCP sender reports.
  10797. </p></dd>
  10798. <dt>&lsquo;<samp class="samp">h264_mode0</samp>&rsquo;</dt>
  10799. <dd><p>Use mode 0 for H.264 in RTP.
  10800. </p></dd>
  10801. <dt>&lsquo;<samp class="samp">send_bye</samp>&rsquo;</dt>
  10802. <dd><p>Send RTCP BYE packets when finishing.
  10803. </p></dd>
  10804. </dl>
  10805. <p>Default value is &lsquo;<samp class="samp">0</samp>&rsquo;.
  10806. </p>
  10807. </dd>
  10808. <dt><samp class="option">min_port</samp></dt>
  10809. <dd><p>Set minimum local UDP port. Default value is 5000.
  10810. </p>
  10811. </dd>
  10812. <dt><samp class="option">max_port</samp></dt>
  10813. <dd><p>Set maximum local UDP port. Default value is 65000.
  10814. </p>
  10815. </dd>
  10816. <dt><samp class="option">buffer_size</samp></dt>
  10817. <dd><p>Set the maximum socket buffer size in bytes.
  10818. </p>
  10819. </dd>
  10820. <dt><samp class="option">pkt_size</samp></dt>
  10821. <dd><p>Set max send packet size (in bytes). Default value is 1472.
  10822. </p></dd>
  10823. </dl>
  10824. </div>
  10825. <div class="subsection-level-extent" id="Demuxer">
  10826. <h4 class="subsection"><span>18.34.2 Demuxer<a class="copiable-link" href="#Demuxer"> &para;</a></span></h4>
  10827. <p>The following options are supported.
  10828. </p>
  10829. <dl class="table">
  10830. <dt><samp class="option">initial_pause</samp></dt>
  10831. <dd><p>Do not start playing the stream immediately if set to 1. Default value
  10832. is 0.
  10833. </p>
  10834. </dd>
  10835. <dt><samp class="option">rtsp_transport</samp></dt>
  10836. <dd><p>Set RTSP transport protocols.
  10837. </p>
  10838. <p>It accepts the following values:
  10839. </p><dl class="table">
  10840. <dt>&lsquo;<samp class="samp">udp</samp>&rsquo;</dt>
  10841. <dd><p>Use UDP as lower transport protocol.
  10842. </p>
  10843. </dd>
  10844. <dt>&lsquo;<samp class="samp">tcp</samp>&rsquo;</dt>
  10845. <dd><p>Use TCP (interleaving within the RTSP control channel) as lower
  10846. transport protocol.
  10847. </p>
  10848. </dd>
  10849. <dt>&lsquo;<samp class="samp">udp_multicast</samp>&rsquo;</dt>
  10850. <dd><p>Use UDP multicast as lower transport protocol.
  10851. </p>
  10852. </dd>
  10853. <dt>&lsquo;<samp class="samp">http</samp>&rsquo;</dt>
  10854. <dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
  10855. passing proxies.
  10856. </p>
  10857. </dd>
  10858. <dt>&lsquo;<samp class="samp">https</samp>&rsquo;</dt>
  10859. <dd><p>Use HTTPs tunneling as lower transport protocol, which is useful for
  10860. passing proxies and widely used for security consideration.
  10861. </p></dd>
  10862. </dl>
  10863. <p>Multiple lower transport protocols may be specified, in that case they are
  10864. tried one at a time (if the setup of one fails, the next one is tried).
  10865. For the muxer, only the &lsquo;<samp class="samp">tcp</samp>&rsquo; and &lsquo;<samp class="samp">udp</samp>&rsquo; options are supported.
  10866. </p>
  10867. </dd>
  10868. <dt><samp class="option">rtsp_flags</samp></dt>
  10869. <dd><p>Set RTSP flags.
  10870. </p>
  10871. <p>The following values are accepted:
  10872. </p><dl class="table">
  10873. <dt>&lsquo;<samp class="samp">filter_src</samp>&rsquo;</dt>
  10874. <dd><p>Accept packets only from negotiated peer address and port.
  10875. </p></dd>
  10876. <dt>&lsquo;<samp class="samp">listen</samp>&rsquo;</dt>
  10877. <dd><p>Act as a server, listening for an incoming connection.
  10878. </p></dd>
  10879. <dt>&lsquo;<samp class="samp">prefer_tcp</samp>&rsquo;</dt>
  10880. <dd><p>Try TCP for RTP transport first, if TCP is available as RTSP RTP transport.
  10881. </p></dd>
  10882. <dt>&lsquo;<samp class="samp">satip_raw</samp>&rsquo;</dt>
  10883. <dd><p>Export raw MPEG-TS stream instead of demuxing. The flag will simply write out
  10884. the raw stream, with the original PAT/PMT/PIDs intact.
  10885. </p></dd>
  10886. </dl>
  10887. <p>Default value is &lsquo;<samp class="samp">none</samp>&rsquo;.
  10888. </p>
  10889. </dd>
  10890. <dt><samp class="option">allowed_media_types</samp></dt>
  10891. <dd><p>Set media types to accept from the server.
  10892. </p>
  10893. <p>The following flags are accepted:
  10894. </p><dl class="table">
  10895. <dt>&lsquo;<samp class="samp">video</samp>&rsquo;</dt>
  10896. <dt>&lsquo;<samp class="samp">audio</samp>&rsquo;</dt>
  10897. <dt>&lsquo;<samp class="samp">data</samp>&rsquo;</dt>
  10898. <dt>&lsquo;<samp class="samp">subtitle</samp>&rsquo;</dt>
  10899. </dl>
  10900. <p>By default it accepts all media types.
  10901. </p>
  10902. </dd>
  10903. <dt><samp class="option">min_port</samp></dt>
  10904. <dd><p>Set minimum local UDP port. Default value is 5000.
  10905. </p>
  10906. </dd>
  10907. <dt><samp class="option">max_port</samp></dt>
  10908. <dd><p>Set maximum local UDP port. Default value is 65000.
  10909. </p>
  10910. </dd>
  10911. <dt><samp class="option">listen_timeout</samp></dt>
  10912. <dd><p>Set maximum timeout (in seconds) to establish an initial connection. Setting
  10913. <samp class="option">listen_timeout</samp> &gt; 0 sets <samp class="option">rtsp_flags</samp> to &lsquo;<samp class="samp">listen</samp>&rsquo;. Default is -1
  10914. which means an infinite timeout when &lsquo;<samp class="samp">listen</samp>&rsquo; mode is set.
  10915. </p>
  10916. </dd>
  10917. <dt><samp class="option">reorder_queue_size</samp></dt>
  10918. <dd><p>Set number of packets to buffer for handling of reordered packets.
  10919. </p>
  10920. </dd>
  10921. <dt><samp class="option">timeout</samp></dt>
  10922. <dd><p>Set socket TCP I/O timeout in microseconds.
  10923. </p>
  10924. </dd>
  10925. <dt><samp class="option">user_agent</samp></dt>
  10926. <dd><p>Override User-Agent header. If not specified, it defaults to the
  10927. libavformat identifier string.
  10928. </p>
  10929. </dd>
  10930. <dt><samp class="option">buffer_size</samp></dt>
  10931. <dd><p>Set the maximum socket buffer size in bytes.
  10932. </p></dd>
  10933. </dl>
  10934. <p>When receiving data over UDP, the demuxer tries to reorder received packets
  10935. (since they may arrive out of order, or packets may get lost totally). This
  10936. can be disabled by setting the maximum demuxing delay to zero (via
  10937. the <code class="code">max_delay</code> field of AVFormatContext).
  10938. </p>
  10939. <p>When watching multi-bitrate Real-RTSP streams with <code class="command">ffplay</code>, the
  10940. streams to display can be chosen with <code class="code">-vst</code> <var class="var">n</var> and
  10941. <code class="code">-ast</code> <var class="var">n</var> for video and audio respectively, and can be switched
  10942. on the fly by pressing <code class="code">v</code> and <code class="code">a</code>.
  10943. </p>
  10944. </div>
  10945. <div class="subsection-level-extent" id="Examples-6">
  10946. <h4 class="subsection"><span>18.34.3 Examples<a class="copiable-link" href="#Examples-6"> &para;</a></span></h4>
  10947. <p>The following examples all make use of the <code class="command">ffplay</code> and
  10948. <code class="command">ffmpeg</code> tools.
  10949. </p>
  10950. <ul class="itemize mark-bullet">
  10951. <li>Watch a stream over UDP, with a max reordering delay of 0.5 seconds:
  10952. <div class="example">
  10953. <pre class="example-preformatted">ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
  10954. </pre></div>
  10955. </li><li>Watch a stream tunneled over HTTP:
  10956. <div class="example">
  10957. <pre class="example-preformatted">ffplay -rtsp_transport http rtsp://server/video.mp4
  10958. </pre></div>
  10959. </li><li>Send a stream in realtime to a RTSP server, for others to watch:
  10960. <div class="example">
  10961. <pre class="example-preformatted">ffmpeg -re -i <var class="var">input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
  10962. </pre></div>
  10963. </li><li>Receive a stream in realtime:
  10964. <div class="example">
  10965. <pre class="example-preformatted">ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <var class="var">output</var>
  10966. </pre></div>
  10967. </li></ul>
  10968. </div>
  10969. </div>
  10970. <div class="section-level-extent" id="sap">
  10971. <h3 class="section"><span>18.35 sap<a class="copiable-link" href="#sap"> &para;</a></span></h3>
  10972. <p>Session Announcement Protocol (RFC 2974). This is not technically a
  10973. protocol handler in libavformat, it is a muxer and demuxer.
  10974. It is used for signalling of RTP streams, by announcing the SDP for the
  10975. streams regularly on a separate port.
  10976. </p>
  10977. <ul class="mini-toc">
  10978. <li><a href="#Muxer-1" accesskey="1">Muxer</a></li>
  10979. <li><a href="#Demuxer-1" accesskey="2">Demuxer</a></li>
  10980. </ul>
  10981. <div class="subsection-level-extent" id="Muxer-1">
  10982. <h4 class="subsection"><span>18.35.1 Muxer<a class="copiable-link" href="#Muxer-1"> &para;</a></span></h4>
  10983. <p>The syntax for a SAP url given to the muxer is:
  10984. </p><div class="example">
  10985. <pre class="example-preformatted">sap://<var class="var">destination</var>[:<var class="var">port</var>][?<var class="var">options</var>]
  10986. </pre></div>
  10987. <p>The RTP packets are sent to <var class="var">destination</var> on port <var class="var">port</var>,
  10988. or to port 5004 if no port is specified.
  10989. <var class="var">options</var> is a <code class="code">&amp;</code>-separated list. The following options
  10990. are supported:
  10991. </p>
  10992. <dl class="table">
  10993. <dt><samp class="option">announce_addr=<var class="var">address</var></samp></dt>
  10994. <dd><p>Specify the destination IP address for sending the announcements to.
  10995. If omitted, the announcements are sent to the commonly used SAP
  10996. announcement multicast address 224.2.127.254 (sap.mcast.net), or
  10997. ff0e::2:7ffe if <var class="var">destination</var> is an IPv6 address.
  10998. </p>
  10999. </dd>
  11000. <dt><samp class="option">announce_port=<var class="var">port</var></samp></dt>
  11001. <dd><p>Specify the port to send the announcements on, defaults to
  11002. 9875 if not specified.
  11003. </p>
  11004. </dd>
  11005. <dt><samp class="option">ttl=<var class="var">ttl</var></samp></dt>
  11006. <dd><p>Specify the time to live value for the announcements and RTP packets,
  11007. defaults to 255.
  11008. </p>
  11009. </dd>
  11010. <dt><samp class="option">same_port=<var class="var">0|1</var></samp></dt>
  11011. <dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
  11012. default), all streams are sent on unique ports, with each stream on a
  11013. port 2 numbers higher than the previous.
  11014. VLC/Live555 requires this to be set to 1, to be able to receive the stream.
  11015. The RTP stack in libavformat for receiving requires all streams to be sent
  11016. on unique ports.
  11017. </p></dd>
  11018. </dl>
  11019. <p>Example command lines follow.
  11020. </p>
  11021. <p>To broadcast a stream on the local subnet, for watching in VLC:
  11022. </p>
  11023. <div class="example">
  11024. <pre class="example-preformatted">ffmpeg -re -i <var class="var">input</var> -f sap sap://224.0.0.255?same_port=1
  11025. </pre></div>
  11026. <p>Similarly, for watching in <code class="command">ffplay</code>:
  11027. </p>
  11028. <div class="example">
  11029. <pre class="example-preformatted">ffmpeg -re -i <var class="var">input</var> -f sap sap://224.0.0.255
  11030. </pre></div>
  11031. <p>And for watching in <code class="command">ffplay</code>, over IPv6:
  11032. </p>
  11033. <div class="example">
  11034. <pre class="example-preformatted">ffmpeg -re -i <var class="var">input</var> -f sap sap://[ff0e::1:2:3:4]
  11035. </pre></div>
  11036. </div>
  11037. <div class="subsection-level-extent" id="Demuxer-1">
  11038. <h4 class="subsection"><span>18.35.2 Demuxer<a class="copiable-link" href="#Demuxer-1"> &para;</a></span></h4>
  11039. <p>The syntax for a SAP url given to the demuxer is:
  11040. </p><div class="example">
  11041. <pre class="example-preformatted">sap://[<var class="var">address</var>][:<var class="var">port</var>]
  11042. </pre></div>
  11043. <p><var class="var">address</var> is the multicast address to listen for announcements on,
  11044. if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var class="var">port</var>
  11045. is the port that is listened on, 9875 if omitted.
  11046. </p>
  11047. <p>The demuxers listens for announcements on the given address and port.
  11048. Once an announcement is received, it tries to receive that particular stream.
  11049. </p>
  11050. <p>Example command lines follow.
  11051. </p>
  11052. <p>To play back the first stream announced on the normal SAP multicast address:
  11053. </p>
  11054. <div class="example">
  11055. <pre class="example-preformatted">ffplay sap://
  11056. </pre></div>
  11057. <p>To play back the first stream announced on one the default IPv6 SAP multicast address:
  11058. </p>
  11059. <div class="example">
  11060. <pre class="example-preformatted">ffplay sap://[ff0e::2:7ffe]
  11061. </pre></div>
  11062. </div>
  11063. </div>
  11064. <div class="section-level-extent" id="sctp">
  11065. <h3 class="section"><span>18.36 sctp<a class="copiable-link" href="#sctp"> &para;</a></span></h3>
  11066. <p>Stream Control Transmission Protocol.
  11067. </p>
  11068. <p>The accepted URL syntax is:
  11069. </p><div class="example">
  11070. <pre class="example-preformatted">sctp://<var class="var">host</var>:<var class="var">port</var>[?<var class="var">options</var>]
  11071. </pre></div>
  11072. <p>The protocol accepts the following options:
  11073. </p><dl class="table">
  11074. <dt><samp class="option">listen</samp></dt>
  11075. <dd><p>If set to any value, listen for an incoming connection. Outgoing connection is done by default.
  11076. </p>
  11077. </dd>
  11078. <dt><samp class="option">max_streams</samp></dt>
  11079. <dd><p>Set the maximum number of streams. By default no limit is set.
  11080. </p></dd>
  11081. </dl>
  11082. </div>
  11083. <div class="section-level-extent" id="srt">
  11084. <h3 class="section"><span>18.37 srt<a class="copiable-link" href="#srt"> &para;</a></span></h3>
  11085. <p>Haivision Secure Reliable Transport Protocol via libsrt.
  11086. </p>
  11087. <p>The supported syntax for a SRT URL is:
  11088. </p><div class="example">
  11089. <pre class="example-preformatted">srt://<var class="var">hostname</var>:<var class="var">port</var>[?<var class="var">options</var>]
  11090. </pre></div>
  11091. <p><var class="var">options</var> contains a list of &amp;-separated options of the form
  11092. <var class="var">key</var>=<var class="var">val</var>.
  11093. </p>
  11094. <p>or
  11095. </p>
  11096. <div class="example">
  11097. <pre class="example-preformatted"><var class="var">options</var> srt://<var class="var">hostname</var>:<var class="var">port</var>
  11098. </pre></div>
  11099. <p><var class="var">options</var> contains a list of &rsquo;-<var class="var">key</var> <var class="var">val</var>&rsquo;
  11100. options.
  11101. </p>
  11102. <p>This protocol accepts the following options.
  11103. </p>
  11104. <dl class="table">
  11105. <dt><samp class="option">connect_timeout=<var class="var">milliseconds</var></samp></dt>
  11106. <dd><p>Connection timeout; SRT cannot connect for RTT &gt; 1500 msec
  11107. (2 handshake exchanges) with the default connect timeout of
  11108. 3 seconds. This option applies to the caller and rendezvous
  11109. connection modes. The connect timeout is 10 times the value
  11110. set for the rendezvous mode (which can be used as a
  11111. workaround for this connection problem with earlier versions).
  11112. </p>
  11113. </dd>
  11114. <dt><samp class="option">ffs=<var class="var">bytes</var></samp></dt>
  11115. <dd><p>Flight Flag Size (Window Size), in bytes. FFS is actually an
  11116. internal parameter and you should set it to not less than
  11117. <samp class="option">recv_buffer_size</samp> and <samp class="option">mss</samp>. The default value
  11118. is relatively large, therefore unless you set a very large receiver buffer,
  11119. you do not need to change this option. Default value is 25600.
  11120. </p>
  11121. </dd>
  11122. <dt><samp class="option">inputbw=<var class="var">bytes/seconds</var></samp></dt>
  11123. <dd><p>Sender nominal input rate, in bytes per seconds. Used along with
  11124. <samp class="option">oheadbw</samp>, when <samp class="option">maxbw</samp> is set to relative (0), to
  11125. calculate maximum sending rate when recovery packets are sent
  11126. along with the main media stream:
  11127. <samp class="option">inputbw</samp> * (100 + <samp class="option">oheadbw</samp>) / 100
  11128. if <samp class="option">inputbw</samp> is not set while <samp class="option">maxbw</samp> is set to
  11129. relative (0), the actual input rate is evaluated inside
  11130. the library. Default value is 0.
  11131. </p>
  11132. </dd>
  11133. <dt><samp class="option">iptos=<var class="var">tos</var></samp></dt>
  11134. <dd><p>IP Type of Service. Applies to sender only. Default value is 0xB8.
  11135. </p>
  11136. </dd>
  11137. <dt><samp class="option">ipttl=<var class="var">ttl</var></samp></dt>
  11138. <dd><p>IP Time To Live. Applies to sender only. Default value is 64.
  11139. </p>
  11140. </dd>
  11141. <dt><samp class="option">latency=<var class="var">microseconds</var></samp></dt>
  11142. <dd><p>Timestamp-based Packet Delivery Delay.
  11143. Used to absorb bursts of missed packet retransmissions.
  11144. This flag sets both <samp class="option">rcvlatency</samp> and <samp class="option">peerlatency</samp>
  11145. to the same value. Note that prior to version 1.3.0
  11146. this is the only flag to set the latency, however
  11147. this is effectively equivalent to setting <samp class="option">peerlatency</samp>,
  11148. when side is sender and <samp class="option">rcvlatency</samp>
  11149. when side is receiver, and the bidirectional stream
  11150. sending is not supported.
  11151. </p>
  11152. </dd>
  11153. <dt><samp class="option">listen_timeout=<var class="var">microseconds</var></samp></dt>
  11154. <dd><p>Set socket listen timeout.
  11155. </p>
  11156. </dd>
  11157. <dt><samp class="option">maxbw=<var class="var">bytes/seconds</var></samp></dt>
  11158. <dd><p>Maximum sending bandwidth, in bytes per seconds.
  11159. -1 infinite (CSRTCC limit is 30mbps)
  11160. 0 relative to input rate (see <samp class="option">inputbw</samp>)
  11161. &gt;0 absolute limit value
  11162. Default value is 0 (relative)
  11163. </p>
  11164. </dd>
  11165. <dt><samp class="option">mode=<var class="var">caller|listener|rendezvous</var></samp></dt>
  11166. <dd><p>Connection mode.
  11167. <samp class="option">caller</samp> opens client connection.
  11168. <samp class="option">listener</samp> starts server to listen for incoming connections.
  11169. <samp class="option">rendezvous</samp> use Rendez-Vous connection mode.
  11170. Default value is caller.
  11171. </p>
  11172. </dd>
  11173. <dt><samp class="option">mss=<var class="var">bytes</var></samp></dt>
  11174. <dd><p>Maximum Segment Size, in bytes. Used for buffer allocation
  11175. and rate calculation using a packet counter assuming fully
  11176. filled packets. The smallest MSS between the peers is
  11177. used. This is 1500 by default in the overall internet.
  11178. This is the maximum size of the UDP packet and can be
  11179. only decreased, unless you have some unusual dedicated
  11180. network settings. Default value is 1500.
  11181. </p>
  11182. </dd>
  11183. <dt><samp class="option">nakreport=<var class="var">1|0</var></samp></dt>
  11184. <dd><p>If set to 1, Receiver will send &lsquo;UMSG_LOSSREPORT&lsquo; messages
  11185. periodically until a lost packet is retransmitted or
  11186. intentionally dropped. Default value is 1.
  11187. </p>
  11188. </dd>
  11189. <dt><samp class="option">oheadbw=<var class="var">percents</var></samp></dt>
  11190. <dd><p>Recovery bandwidth overhead above input rate, in percents.
  11191. See <samp class="option">inputbw</samp>. Default value is 25%.
  11192. </p>
  11193. </dd>
  11194. <dt><samp class="option">passphrase=<var class="var">string</var></samp></dt>
  11195. <dd><p>HaiCrypt Encryption/Decryption Passphrase string, length
  11196. from 10 to 79 characters. The passphrase is the shared
  11197. secret between the sender and the receiver. It is used
  11198. to generate the Key Encrypting Key using PBKDF2
  11199. (Password-Based Key Derivation Function). It is used
  11200. only if <samp class="option">pbkeylen</samp> is non-zero. It is used on
  11201. the receiver only if the received data is encrypted.
  11202. The configured passphrase cannot be recovered (write-only).
  11203. </p>
  11204. </dd>
  11205. <dt><samp class="option">enforced_encryption=<var class="var">1|0</var></samp></dt>
  11206. <dd><p>If true, both connection parties must have the same password
  11207. set (including empty, that is, with no encryption). If the
  11208. password doesn&rsquo;t match or only one side is unencrypted,
  11209. the connection is rejected. Default is true.
  11210. </p>
  11211. </dd>
  11212. <dt><samp class="option">kmrefreshrate=<var class="var">packets</var></samp></dt>
  11213. <dd><p>The number of packets to be transmitted after which the
  11214. encryption key is switched to a new key. Default is -1.
  11215. -1 means auto (0x1000000 in srt library). The range for
  11216. this option is integers in the 0 - <code class="code">INT_MAX</code>.
  11217. </p>
  11218. </dd>
  11219. <dt><samp class="option">kmpreannounce=<var class="var">packets</var></samp></dt>
  11220. <dd><p>The interval between when a new encryption key is sent and
  11221. when switchover occurs. This value also applies to the
  11222. subsequent interval between when switchover occurs and
  11223. when the old encryption key is decommissioned. Default is -1.
  11224. -1 means auto (0x1000 in srt library). The range for
  11225. this option is integers in the 0 - <code class="code">INT_MAX</code>.
  11226. </p>
  11227. </dd>
  11228. <dt><samp class="option">snddropdelay=<var class="var">microseconds</var></samp></dt>
  11229. <dd><p>The sender&rsquo;s extra delay before dropping packets. This delay is
  11230. added to the default drop delay time interval value.
  11231. </p>
  11232. <p>Special value -1: Do not drop packets on the sender at all.
  11233. </p>
  11234. </dd>
  11235. <dt><samp class="option">payload_size=<var class="var">bytes</var></samp></dt>
  11236. <dd><p>Sets the maximum declared size of a packet transferred
  11237. during the single call to the sending function in Live
  11238. mode. Use 0 if this value isn&rsquo;t used (which is default in
  11239. file mode).
  11240. Default is -1 (automatic), which typically means MPEG-TS;
  11241. if you are going to use SRT
  11242. to send any different kind of payload, such as, for example,
  11243. wrapping a live stream in very small frames, then you can
  11244. use a bigger maximum frame size, though not greater than
  11245. 1456 bytes.
  11246. </p>
  11247. </dd>
  11248. <dt><samp class="option">pkt_size=<var class="var">bytes</var></samp></dt>
  11249. <dd><p>Alias for &lsquo;<samp class="samp">payload_size</samp>&rsquo;.
  11250. </p>
  11251. </dd>
  11252. <dt><samp class="option">peerlatency=<var class="var">microseconds</var></samp></dt>
  11253. <dd><p>The latency value (as described in <samp class="option">rcvlatency</samp>) that is
  11254. set by the sender side as a minimum value for the receiver.
  11255. </p>
  11256. </dd>
  11257. <dt><samp class="option">pbkeylen=<var class="var">bytes</var></samp></dt>
  11258. <dd><p>Sender encryption key length, in bytes.
  11259. Only can be set to 0, 16, 24 and 32.
  11260. Enable sender encryption if not 0.
  11261. Not required on receiver (set to 0),
  11262. key size obtained from sender in HaiCrypt handshake.
  11263. Default value is 0.
  11264. </p>
  11265. </dd>
  11266. <dt><samp class="option">rcvlatency=<var class="var">microseconds</var></samp></dt>
  11267. <dd><p>The time that should elapse since the moment when the
  11268. packet was sent and the moment when it&rsquo;s delivered to
  11269. the receiver application in the receiving function.
  11270. This time should be a buffer time large enough to cover
  11271. the time spent for sending, unexpectedly extended RTT
  11272. time, and the time needed to retransmit the lost UDP
  11273. packet. The effective latency value will be the maximum
  11274. of this options&rsquo; value and the value of <samp class="option">peerlatency</samp>
  11275. set by the peer side. Before version 1.3.0 this option
  11276. is only available as <samp class="option">latency</samp>.
  11277. </p>
  11278. </dd>
  11279. <dt><samp class="option">recv_buffer_size=<var class="var">bytes</var></samp></dt>
  11280. <dd><p>Set UDP receive buffer size, expressed in bytes.
  11281. </p>
  11282. </dd>
  11283. <dt><samp class="option">send_buffer_size=<var class="var">bytes</var></samp></dt>
  11284. <dd><p>Set UDP send buffer size, expressed in bytes.
  11285. </p>
  11286. </dd>
  11287. <dt><samp class="option">timeout=<var class="var">microseconds</var></samp></dt>
  11288. <dd><p>Set raise error timeouts for read, write and connect operations. Note that the
  11289. SRT library has internal timeouts which can be controlled separately, the
  11290. value set here is only a cap on those.
  11291. </p>
  11292. </dd>
  11293. <dt><samp class="option">tlpktdrop=<var class="var">1|0</var></samp></dt>
  11294. <dd><p>Too-late Packet Drop. When enabled on receiver, it skips
  11295. missing packets that have not been delivered in time and
  11296. delivers the following packets to the application when
  11297. their time-to-play has come. It also sends a fake ACK to
  11298. the sender. When enabled on sender and enabled on the
  11299. receiving peer, the sender drops the older packets that
  11300. have no chance of being delivered in time. It was
  11301. automatically enabled in the sender if the receiver
  11302. supports it.
  11303. </p>
  11304. </dd>
  11305. <dt><samp class="option">sndbuf=<var class="var">bytes</var></samp></dt>
  11306. <dd><p>Set send buffer size, expressed in bytes.
  11307. </p>
  11308. </dd>
  11309. <dt><samp class="option">rcvbuf=<var class="var">bytes</var></samp></dt>
  11310. <dd><p>Set receive buffer size, expressed in bytes.
  11311. </p>
  11312. <p>Receive buffer must not be greater than <samp class="option">ffs</samp>.
  11313. </p>
  11314. </dd>
  11315. <dt><samp class="option">lossmaxttl=<var class="var">packets</var></samp></dt>
  11316. <dd><p>The value up to which the Reorder Tolerance may grow. When
  11317. Reorder Tolerance is &gt; 0, then packet loss report is delayed
  11318. until that number of packets come in. Reorder Tolerance
  11319. increases every time a &quot;belated&quot; packet has come, but it
  11320. wasn&rsquo;t due to retransmission (that is, when UDP packets tend
  11321. to come out of order), with the difference between the latest
  11322. sequence and this packet&rsquo;s sequence, and not more than the
  11323. value of this option. By default it&rsquo;s 0, which means that this
  11324. mechanism is turned off, and the loss report is always sent
  11325. immediately upon experiencing a &quot;gap&quot; in sequences.
  11326. </p>
  11327. </dd>
  11328. <dt><samp class="option">minversion</samp></dt>
  11329. <dd><p>The minimum SRT version that is required from the peer. A connection
  11330. to a peer that does not satisfy the minimum version requirement
  11331. will be rejected.
  11332. </p>
  11333. <p>The version format in hex is 0xXXYYZZ for x.y.z in human readable
  11334. form.
  11335. </p>
  11336. </dd>
  11337. <dt><samp class="option">streamid=<var class="var">string</var></samp></dt>
  11338. <dd><p>A string limited to 512 characters that can be set on the socket prior
  11339. to connecting. This stream ID will be able to be retrieved by the
  11340. listener side from the socket that is returned from srt_accept and
  11341. was connected by a socket with that set stream ID. SRT does not enforce
  11342. any special interpretation of the contents of this string.
  11343. This option doesn’t make sense in Rendezvous connection; the result
  11344. might be that simply one side will override the value from the other
  11345. side and it’s the matter of luck which one would win
  11346. </p>
  11347. </dd>
  11348. <dt><samp class="option">srt_streamid=<var class="var">string</var></samp></dt>
  11349. <dd><p>Alias for &lsquo;<samp class="samp">streamid</samp>&rsquo; to avoid conflict with ffmpeg command line option.
  11350. </p>
  11351. </dd>
  11352. <dt><samp class="option">smoother=<var class="var">live|file</var></samp></dt>
  11353. <dd><p>The type of Smoother used for the transmission for that socket, which
  11354. is responsible for the transmission and congestion control. The Smoother
  11355. type must be exactly the same on both connecting parties, otherwise
  11356. the connection is rejected.
  11357. </p>
  11358. </dd>
  11359. <dt><samp class="option">messageapi=<var class="var">1|0</var></samp></dt>
  11360. <dd><p>When set, this socket uses the Message API, otherwise it uses Buffer
  11361. API. Note that in live mode (see <samp class="option">transtype</samp>) there’s only
  11362. message API available. In File mode you can chose to use one of two modes:
  11363. </p>
  11364. <p>Stream API (default, when this option is false). In this mode you may
  11365. send as many data as you wish with one sending instruction, or even use
  11366. dedicated functions that read directly from a file. The internal facility
  11367. will take care of any speed and congestion control. When receiving, you
  11368. can also receive as many data as desired, the data not extracted will be
  11369. waiting for the next call. There is no boundary between data portions in
  11370. the Stream mode.
  11371. </p>
  11372. <p>Message API. In this mode your single sending instruction passes exactly
  11373. one piece of data that has boundaries (a message). Contrary to Live mode,
  11374. this message may span across multiple UDP packets and the only size
  11375. limitation is that it shall fit as a whole in the sending buffer. The
  11376. receiver shall use as large buffer as necessary to receive the message,
  11377. otherwise the message will not be given up. When the message is not
  11378. complete (not all packets received or there was a packet loss) it will
  11379. not be given up.
  11380. </p>
  11381. </dd>
  11382. <dt><samp class="option">transtype=<var class="var">live|file</var></samp></dt>
  11383. <dd><p>Sets the transmission type for the socket, in particular, setting this
  11384. option sets multiple other parameters to their default values as required
  11385. for a particular transmission type.
  11386. </p>
  11387. <p>live: Set options as for live transmission. In this mode, you should
  11388. send by one sending instruction only so many data that fit in one UDP packet,
  11389. and limited to the value defined first in <samp class="option">payload_size</samp> (1316 is
  11390. default in this mode). There is no speed control in this mode, only the
  11391. bandwidth control, if configured, in order to not exceed the bandwidth with
  11392. the overhead transmission (retransmitted and control packets).
  11393. </p>
  11394. <p>file: Set options as for non-live transmission. See <samp class="option">messageapi</samp>
  11395. for further explanations
  11396. </p>
  11397. </dd>
  11398. <dt><samp class="option">linger=<var class="var">seconds</var></samp></dt>
  11399. <dd><p>The number of seconds that the socket waits for unsent data when closing.
  11400. Default is -1. -1 means auto (off with 0 seconds in live mode, on with 180
  11401. seconds in file mode). The range for this option is integers in the
  11402. 0 - <code class="code">INT_MAX</code>.
  11403. </p>
  11404. </dd>
  11405. <dt><samp class="option">tsbpd=<var class="var">1|0</var></samp></dt>
  11406. <dd><p>When true, use Timestamp-based Packet Delivery mode. The default behavior
  11407. depends on the transmission type: enabled in live mode, disabled in file
  11408. mode.
  11409. </p>
  11410. </dd>
  11411. </dl>
  11412. <p>For more information see: <a class="url" href="https://github.com/Haivision/srt">https://github.com/Haivision/srt</a>.
  11413. </p>
  11414. </div>
  11415. <div class="section-level-extent" id="srtp">
  11416. <h3 class="section"><span>18.38 srtp<a class="copiable-link" href="#srtp"> &para;</a></span></h3>
  11417. <p>Secure Real-time Transport Protocol.
  11418. </p>
  11419. <p>The accepted options are:
  11420. </p><dl class="table">
  11421. <dt><samp class="option">srtp_in_suite</samp></dt>
  11422. <dt><samp class="option">srtp_out_suite</samp></dt>
  11423. <dd><p>Select input and output encoding suites.
  11424. </p>
  11425. <p>Supported values:
  11426. </p><dl class="table">
  11427. <dt>&lsquo;<samp class="samp">AES_CM_128_HMAC_SHA1_80</samp>&rsquo;</dt>
  11428. <dt>&lsquo;<samp class="samp">SRTP_AES128_CM_HMAC_SHA1_80</samp>&rsquo;</dt>
  11429. <dt>&lsquo;<samp class="samp">AES_CM_128_HMAC_SHA1_32</samp>&rsquo;</dt>
  11430. <dt>&lsquo;<samp class="samp">SRTP_AES128_CM_HMAC_SHA1_32</samp>&rsquo;</dt>
  11431. </dl>
  11432. </dd>
  11433. <dt><samp class="option">srtp_in_params</samp></dt>
  11434. <dt><samp class="option">srtp_out_params</samp></dt>
  11435. <dd><p>Set input and output encoding parameters, which are expressed by a
  11436. base64-encoded representation of a binary block. The first 16 bytes of
  11437. this binary block are used as master key, the following 14 bytes are
  11438. used as master salt.
  11439. </p></dd>
  11440. </dl>
  11441. </div>
  11442. <div class="section-level-extent" id="subfile">
  11443. <h3 class="section"><span>18.39 subfile<a class="copiable-link" href="#subfile"> &para;</a></span></h3>
  11444. <p>Virtually extract a segment of a file or another stream.
  11445. The underlying stream must be seekable.
  11446. </p>
  11447. <p>Accepted options:
  11448. </p><dl class="table">
  11449. <dt><samp class="option">start</samp></dt>
  11450. <dd><p>Start offset of the extracted segment, in bytes.
  11451. </p></dd>
  11452. <dt><samp class="option">end</samp></dt>
  11453. <dd><p>End offset of the extracted segment, in bytes.
  11454. If set to 0, extract till end of file.
  11455. </p></dd>
  11456. </dl>
  11457. <p>Examples:
  11458. </p>
  11459. <p>Extract a chapter from a DVD VOB file (start and end sectors obtained
  11460. externally and multiplied by 2048):
  11461. </p><div class="example">
  11462. <pre class="example-preformatted">subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
  11463. </pre></div>
  11464. <p>Play an AVI file directly from a TAR archive:
  11465. </p><div class="example">
  11466. <pre class="example-preformatted">subfile,,start,183241728,end,366490624,,:archive.tar
  11467. </pre></div>
  11468. <p>Play a MPEG-TS file from start offset till end:
  11469. </p><div class="example">
  11470. <pre class="example-preformatted">subfile,,start,32815239,end,0,,:video.ts
  11471. </pre></div>
  11472. </div>
  11473. <div class="section-level-extent" id="tee">
  11474. <h3 class="section"><span>18.40 tee<a class="copiable-link" href="#tee"> &para;</a></span></h3>
  11475. <p>Writes the output to multiple protocols. The individual outputs are separated
  11476. by |
  11477. </p>
  11478. <div class="example">
  11479. <pre class="example-preformatted">tee:file://path/to/local/this.avi|file://path/to/local/that.avi
  11480. </pre></div>
  11481. </div>
  11482. <div class="section-level-extent" id="tcp">
  11483. <h3 class="section"><span>18.41 tcp<a class="copiable-link" href="#tcp"> &para;</a></span></h3>
  11484. <p>Transmission Control Protocol.
  11485. </p>
  11486. <p>The required syntax for a TCP url is:
  11487. </p><div class="example">
  11488. <pre class="example-preformatted">tcp://<var class="var">hostname</var>:<var class="var">port</var>[?<var class="var">options</var>]
  11489. </pre></div>
  11490. <p><var class="var">options</var> contains a list of &amp;-separated options of the form
  11491. <var class="var">key</var>=<var class="var">val</var>.
  11492. </p>
  11493. <p>The list of supported options follows.
  11494. </p>
  11495. <dl class="table">
  11496. <dt><samp class="option">listen=<var class="var">2|1|0</var></samp></dt>
  11497. <dd><p>Listen for an incoming connection. 0 disables listen, 1 enables listen in
  11498. single client mode, 2 enables listen in multi-client mode. Default value is 0.
  11499. </p>
  11500. </dd>
  11501. <dt><samp class="option">local_addr=<var class="var">addr</var></samp></dt>
  11502. <dd><p>Local IP address of a network interface used for tcp socket connect.
  11503. </p>
  11504. </dd>
  11505. <dt><samp class="option">local_port=<var class="var">port</var></samp></dt>
  11506. <dd><p>Local port used for tcp socket connect.
  11507. </p>
  11508. </dd>
  11509. <dt><samp class="option">timeout=<var class="var">microseconds</var></samp></dt>
  11510. <dd><p>Set raise error timeout, expressed in microseconds.
  11511. </p>
  11512. <p>This option is only relevant in read mode: if no data arrived in more
  11513. than this time interval, raise error.
  11514. </p>
  11515. </dd>
  11516. <dt><samp class="option">listen_timeout=<var class="var">milliseconds</var></samp></dt>
  11517. <dd><p>Set listen timeout, expressed in milliseconds.
  11518. </p>
  11519. </dd>
  11520. <dt><samp class="option">recv_buffer_size=<var class="var">bytes</var></samp></dt>
  11521. <dd><p>Set receive buffer size, expressed bytes.
  11522. </p>
  11523. </dd>
  11524. <dt><samp class="option">send_buffer_size=<var class="var">bytes</var></samp></dt>
  11525. <dd><p>Set send buffer size, expressed bytes.
  11526. </p>
  11527. </dd>
  11528. <dt><samp class="option">tcp_nodelay=<var class="var">1|0</var></samp></dt>
  11529. <dd><p>Set TCP_NODELAY to disable Nagle&rsquo;s algorithm. Default value is 0.
  11530. </p>
  11531. <p><em class="emph">Remark: Writing to the socket is currently not optimized to minimize system calls and reduces the efficiency / effect of TCP_NODELAY.</em>
  11532. </p>
  11533. </dd>
  11534. <dt><samp class="option">tcp_mss=<var class="var">bytes</var></samp></dt>
  11535. <dd><p>Set maximum segment size for outgoing TCP packets, expressed in bytes.
  11536. </p></dd>
  11537. </dl>
  11538. <p>The following example shows how to setup a listening TCP connection
  11539. with <code class="command">ffmpeg</code>, which is then accessed with <code class="command">ffplay</code>:
  11540. </p><div class="example">
  11541. <pre class="example-preformatted">ffmpeg -i <var class="var">input</var> -f <var class="var">format</var> tcp://<var class="var">hostname</var>:<var class="var">port</var>?listen
  11542. ffplay tcp://<var class="var">hostname</var>:<var class="var">port</var>
  11543. </pre></div>
  11544. </div>
  11545. <div class="section-level-extent" id="tls">
  11546. <h3 class="section"><span>18.42 tls<a class="copiable-link" href="#tls"> &para;</a></span></h3>
  11547. <p>Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
  11548. </p>
  11549. <p>The required syntax for a TLS/SSL url is:
  11550. </p><div class="example">
  11551. <pre class="example-preformatted">tls://<var class="var">hostname</var>:<var class="var">port</var>[?<var class="var">options</var>]
  11552. </pre></div>
  11553. <p>The following parameters can be set via command line options
  11554. (or in code via <code class="code">AVOption</code>s):
  11555. </p>
  11556. <dl class="table">
  11557. <dt><samp class="option">ca_file, cafile=<var class="var">filename</var></samp></dt>
  11558. <dd><p>A file containing certificate authority (CA) root certificates to treat
  11559. as trusted. If the linked TLS library contains a default this might not
  11560. need to be specified for verification to work, but not all libraries and
  11561. setups have defaults built in.
  11562. The file must be in OpenSSL PEM format.
  11563. </p>
  11564. </dd>
  11565. <dt><samp class="option">tls_verify=<var class="var">1|0</var></samp></dt>
  11566. <dd><p>If enabled, try to verify the peer that we are communicating with.
  11567. Note, if using OpenSSL, this currently only makes sure that the
  11568. peer certificate is signed by one of the root certificates in the CA
  11569. database, but it does not validate that the certificate actually
  11570. matches the host name we are trying to connect to. (With other backends,
  11571. the host name is validated as well.)
  11572. </p>
  11573. <p>This is disabled by default since it requires a CA database to be
  11574. provided by the caller in many cases.
  11575. </p>
  11576. </dd>
  11577. <dt><samp class="option">cert_file, cert=<var class="var">filename</var></samp></dt>
  11578. <dd><p>A file containing a certificate to use in the handshake with the peer.
  11579. (When operating as server, in listen mode, this is more often required
  11580. by the peer, while client certificates only are mandated in certain
  11581. setups.)
  11582. </p>
  11583. </dd>
  11584. <dt><samp class="option">key_file, key=<var class="var">filename</var></samp></dt>
  11585. <dd><p>A file containing the private key for the certificate.
  11586. </p>
  11587. </dd>
  11588. <dt><samp class="option">listen=<var class="var">1|0</var></samp></dt>
  11589. <dd><p>If enabled, listen for connections on the provided port, and assume
  11590. the server role in the handshake instead of the client role.
  11591. </p>
  11592. </dd>
  11593. <dt><samp class="option">http_proxy</samp></dt>
  11594. <dd><p>The HTTP proxy to tunnel through, e.g. <code class="code">http://example.com:1234</code>.
  11595. The proxy must support the CONNECT method.
  11596. </p>
  11597. </dd>
  11598. </dl>
  11599. <p>Example command lines:
  11600. </p>
  11601. <p>To create a TLS/SSL server that serves an input stream.
  11602. </p>
  11603. <div class="example">
  11604. <pre class="example-preformatted">ffmpeg -i <var class="var">input</var> -f <var class="var">format</var> tls://<var class="var">hostname</var>:<var class="var">port</var>?listen&amp;cert=<var class="var">server.crt</var>&amp;key=<var class="var">server.key</var>
  11605. </pre></div>
  11606. <p>To play back a stream from the TLS/SSL server using <code class="command">ffplay</code>:
  11607. </p>
  11608. <div class="example">
  11609. <pre class="example-preformatted">ffplay tls://<var class="var">hostname</var>:<var class="var">port</var>
  11610. </pre></div>
  11611. </div>
  11612. <div class="section-level-extent" id="udp">
  11613. <h3 class="section"><span>18.43 udp<a class="copiable-link" href="#udp"> &para;</a></span></h3>
  11614. <p>User Datagram Protocol.
  11615. </p>
  11616. <p>The required syntax for an UDP URL is:
  11617. </p><div class="example">
  11618. <pre class="example-preformatted">udp://<var class="var">hostname</var>:<var class="var">port</var>[?<var class="var">options</var>]
  11619. </pre></div>
  11620. <p><var class="var">options</var> contains a list of &amp;-separated options of the form <var class="var">key</var>=<var class="var">val</var>.
  11621. </p>
  11622. <p>In case threading is enabled on the system, a circular buffer is used
  11623. to store the incoming data, which allows one to reduce loss of data due to
  11624. UDP socket buffer overruns. The <var class="var">fifo_size</var> and
  11625. <var class="var">overrun_nonfatal</var> options are related to this buffer.
  11626. </p>
  11627. <p>The list of supported options follows.
  11628. </p>
  11629. <dl class="table">
  11630. <dt><samp class="option">buffer_size=<var class="var">size</var></samp></dt>
  11631. <dd><p>Set the UDP maximum socket buffer size in bytes. This is used to set either
  11632. the receive or send buffer size, depending on what the socket is used for.
  11633. Default is 32 KB for output, 384 KB for input. See also <var class="var">fifo_size</var>.
  11634. </p>
  11635. </dd>
  11636. <dt><samp class="option">bitrate=<var class="var">bitrate</var></samp></dt>
  11637. <dd><p>If set to nonzero, the output will have the specified constant bitrate if the
  11638. input has enough packets to sustain it.
  11639. </p>
  11640. </dd>
  11641. <dt><samp class="option">burst_bits=<var class="var">bits</var></samp></dt>
  11642. <dd><p>When using <var class="var">bitrate</var> this specifies the maximum number of bits in
  11643. packet bursts.
  11644. </p>
  11645. </dd>
  11646. <dt><samp class="option">localport=<var class="var">port</var></samp></dt>
  11647. <dd><p>Override the local UDP port to bind with.
  11648. </p>
  11649. </dd>
  11650. <dt><samp class="option">localaddr=<var class="var">addr</var></samp></dt>
  11651. <dd><p>Local IP address of a network interface used for sending packets or joining
  11652. multicast groups.
  11653. </p>
  11654. </dd>
  11655. <dt><samp class="option">pkt_size=<var class="var">size</var></samp></dt>
  11656. <dd><p>Set the size in bytes of UDP packets.
  11657. </p>
  11658. </dd>
  11659. <dt><samp class="option">reuse=<var class="var">1|0</var></samp></dt>
  11660. <dd><p>Explicitly allow or disallow reusing UDP sockets.
  11661. </p>
  11662. </dd>
  11663. <dt><samp class="option">ttl=<var class="var">ttl</var></samp></dt>
  11664. <dd><p>Set the time to live value (for multicast only).
  11665. </p>
  11666. </dd>
  11667. <dt><samp class="option">connect=<var class="var">1|0</var></samp></dt>
  11668. <dd><p>Initialize the UDP socket with <code class="code">connect()</code>. In this case, the
  11669. destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
  11670. If the destination address isn&rsquo;t known at the start, this option can
  11671. be specified in ff_udp_set_remote_url, too.
  11672. This allows finding out the source address for the packets with getsockname,
  11673. and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
  11674. unreachable&quot; is received.
  11675. For receiving, this gives the benefit of only receiving packets from
  11676. the specified peer address/port.
  11677. </p>
  11678. </dd>
  11679. <dt><samp class="option">sources=<var class="var">address</var>[,<var class="var">address</var>]</samp></dt>
  11680. <dd><p>Only receive packets sent from the specified addresses. In case of multicast,
  11681. also subscribe to multicast traffic coming from these addresses only.
  11682. </p>
  11683. </dd>
  11684. <dt><samp class="option">block=<var class="var">address</var>[,<var class="var">address</var>]</samp></dt>
  11685. <dd><p>Ignore packets sent from the specified addresses. In case of multicast, also
  11686. exclude the source addresses in the multicast subscription.
  11687. </p>
  11688. </dd>
  11689. <dt><samp class="option">fifo_size=<var class="var">units</var></samp></dt>
  11690. <dd><p>Set the UDP receiving circular buffer size, expressed as a number of
  11691. packets with size of 188 bytes. If not specified defaults to 7*4096.
  11692. </p>
  11693. </dd>
  11694. <dt><samp class="option">overrun_nonfatal=<var class="var">1|0</var></samp></dt>
  11695. <dd><p>Survive in case of UDP receiving circular buffer overrun. Default
  11696. value is 0.
  11697. </p>
  11698. </dd>
  11699. <dt><samp class="option">timeout=<var class="var">microseconds</var></samp></dt>
  11700. <dd><p>Set raise error timeout, expressed in microseconds.
  11701. </p>
  11702. <p>This option is only relevant in read mode: if no data arrived in more
  11703. than this time interval, raise error.
  11704. </p>
  11705. </dd>
  11706. <dt><samp class="option">broadcast=<var class="var">1|0</var></samp></dt>
  11707. <dd><p>Explicitly allow or disallow UDP broadcasting.
  11708. </p>
  11709. <p>Note that broadcasting may not work properly on networks having
  11710. a broadcast storm protection.
  11711. </p></dd>
  11712. </dl>
  11713. <ul class="mini-toc">
  11714. <li><a href="#Examples-7" accesskey="1">Examples</a></li>
  11715. </ul>
  11716. <div class="subsection-level-extent" id="Examples-7">
  11717. <h4 class="subsection"><span>18.43.1 Examples<a class="copiable-link" href="#Examples-7"> &para;</a></span></h4>
  11718. <ul class="itemize mark-bullet">
  11719. <li>Use <code class="command">ffmpeg</code> to stream over UDP to a remote endpoint:
  11720. <div class="example">
  11721. <pre class="example-preformatted">ffmpeg -i <var class="var">input</var> -f <var class="var">format</var> udp://<var class="var">hostname</var>:<var class="var">port</var>
  11722. </pre></div>
  11723. </li><li>Use <code class="command">ffmpeg</code> to stream in mpegts format over UDP using 188
  11724. sized UDP packets, using a large input buffer:
  11725. <div class="example">
  11726. <pre class="example-preformatted">ffmpeg -i <var class="var">input</var> -f mpegts udp://<var class="var">hostname</var>:<var class="var">port</var>?pkt_size=188&amp;buffer_size=65535
  11727. </pre></div>
  11728. </li><li>Use <code class="command">ffmpeg</code> to receive over UDP from a remote endpoint:
  11729. <div class="example">
  11730. <pre class="example-preformatted">ffmpeg -i udp://[<var class="var">multicast-address</var>]:<var class="var">port</var> ...
  11731. </pre></div>
  11732. </li></ul>
  11733. </div>
  11734. </div>
  11735. <div class="section-level-extent" id="unix">
  11736. <h3 class="section"><span>18.44 unix<a class="copiable-link" href="#unix"> &para;</a></span></h3>
  11737. <p>Unix local socket
  11738. </p>
  11739. <p>The required syntax for a Unix socket URL is:
  11740. </p>
  11741. <div class="example">
  11742. <pre class="example-preformatted">unix://<var class="var">filepath</var>
  11743. </pre></div>
  11744. <p>The following parameters can be set via command line options
  11745. (or in code via <code class="code">AVOption</code>s):
  11746. </p>
  11747. <dl class="table">
  11748. <dt><samp class="option">timeout</samp></dt>
  11749. <dd><p>Timeout in ms.
  11750. </p></dd>
  11751. <dt><samp class="option">listen</samp></dt>
  11752. <dd><p>Create the Unix socket in listening mode.
  11753. </p></dd>
  11754. </dl>
  11755. </div>
  11756. <div class="section-level-extent" id="zmq">
  11757. <h3 class="section"><span>18.45 zmq<a class="copiable-link" href="#zmq"> &para;</a></span></h3>
  11758. <p>ZeroMQ asynchronous messaging using the libzmq library.
  11759. </p>
  11760. <p>This library supports unicast streaming to multiple clients without relying on
  11761. an external server.
  11762. </p>
  11763. <p>The required syntax for streaming or connecting to a stream is:
  11764. </p><div class="example">
  11765. <pre class="example-preformatted">zmq:tcp://ip-address:port
  11766. </pre></div>
  11767. <p>Example:
  11768. Create a localhost stream on port 5555:
  11769. </p><div class="example">
  11770. <pre class="example-preformatted">ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555
  11771. </pre></div>
  11772. <p>Multiple clients may connect to the stream using:
  11773. </p><div class="example">
  11774. <pre class="example-preformatted">ffplay zmq:tcp://127.0.0.1:5555
  11775. </pre></div>
  11776. <p>Streaming to multiple clients is implemented using a ZeroMQ Pub-Sub pattern.
  11777. The server side binds to a port and publishes data. Clients connect to the
  11778. server (via IP address/port) and subscribe to the stream. The order in which
  11779. the server and client start generally does not matter.
  11780. </p>
  11781. <p>ffmpeg must be compiled with the &ndash;enable-libzmq option to support
  11782. this protocol.
  11783. </p>
  11784. <p>Options can be set on the <code class="command">ffmpeg</code>/<code class="command">ffplay</code> command
  11785. line. The following options are supported:
  11786. </p>
  11787. <dl class="table">
  11788. <dt><samp class="option">pkt_size</samp></dt>
  11789. <dd><p>Forces the maximum packet size for sending/receiving data. The default value is
  11790. 131,072 bytes. On the server side, this sets the maximum size of sent packets
  11791. via ZeroMQ. On the clients, it sets an internal buffer size for receiving
  11792. packets. Note that pkt_size on the clients should be equal to or greater than
  11793. pkt_size on the server. Otherwise the received message may be truncated causing
  11794. decoding errors.
  11795. </p>
  11796. </dd>
  11797. </dl>
  11798. </div>
  11799. </div>
  11800. <div class="chapter-level-extent" id="Device-Options">
  11801. <h2 class="chapter"><span>19 Device Options<a class="copiable-link" href="#Device-Options"> &para;</a></span></h2>
  11802. <p>The libavdevice library provides the same interface as
  11803. libavformat. Namely, an input device is considered like a demuxer, and
  11804. an output device like a muxer, and the interface and generic device
  11805. options are the same provided by libavformat (see the ffmpeg-formats
  11806. manual).
  11807. </p>
  11808. <p>In addition each input or output device may support so-called private
  11809. options, which are specific for that component.
  11810. </p>
  11811. <p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the
  11812. FFmpeg tools, or by setting the value explicitly in the device
  11813. <code class="code">AVFormatContext</code> options or using the <samp class="file">libavutil/opt.h</samp> API
  11814. for programmatic use.
  11815. </p>
  11816. </div>
  11817. <div class="chapter-level-extent" id="Input-Devices">
  11818. <h2 class="chapter"><span>20 Input Devices<a class="copiable-link" href="#Input-Devices"> &para;</a></span></h2>
  11819. <p>Input devices are configured elements in FFmpeg which enable accessing
  11820. the data coming from a multimedia device attached to your system.
  11821. </p>
  11822. <p>When you configure your FFmpeg build, all the supported input devices
  11823. are enabled by default. You can list all available ones using the
  11824. configure option &quot;&ndash;list-indevs&quot;.
  11825. </p>
  11826. <p>You can disable all the input devices using the configure option
  11827. &quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
  11828. option &quot;&ndash;enable-indev=<var class="var">INDEV</var>&quot;, or you can disable a particular
  11829. input device using the option &quot;&ndash;disable-indev=<var class="var">INDEV</var>&quot;.
  11830. </p>
  11831. <p>The option &quot;-devices&quot; of the ff* tools will display the list of
  11832. supported input devices.
  11833. </p>
  11834. <p>A description of the currently available input devices follows.
  11835. </p>
  11836. <ul class="mini-toc">
  11837. <li><a href="#alsa" accesskey="1">alsa</a></li>
  11838. <li><a href="#android_005fcamera" accesskey="2">android_camera</a></li>
  11839. <li><a href="#avfoundation" accesskey="3">avfoundation</a></li>
  11840. <li><a href="#bktr" accesskey="4">bktr</a></li>
  11841. <li><a href="#decklink" accesskey="5">decklink</a></li>
  11842. <li><a href="#dshow" accesskey="6">dshow</a></li>
  11843. <li><a href="#fbdev" accesskey="7">fbdev</a></li>
  11844. <li><a href="#gdigrab" accesskey="8">gdigrab</a></li>
  11845. <li><a href="#iec61883" accesskey="9">iec61883</a></li>
  11846. <li><a href="#jack">jack</a></li>
  11847. <li><a href="#kmsgrab">kmsgrab</a></li>
  11848. <li><a href="#lavfi">lavfi</a></li>
  11849. <li><a href="#libcdio">libcdio</a></li>
  11850. <li><a href="#libdc1394">libdc1394</a></li>
  11851. <li><a href="#openal">openal</a></li>
  11852. <li><a href="#oss">oss</a></li>
  11853. <li><a href="#pulse">pulse</a></li>
  11854. <li><a href="#sndio">sndio</a></li>
  11855. <li><a href="#video4linux2_002c-v4l2">video4linux2, v4l2</a></li>
  11856. <li><a href="#vfwcap">vfwcap</a></li>
  11857. <li><a href="#x11grab">x11grab</a></li>
  11858. </ul>
  11859. <div class="section-level-extent" id="alsa">
  11860. <h3 class="section"><span>20.1 alsa<a class="copiable-link" href="#alsa"> &para;</a></span></h3>
  11861. <p>ALSA (Advanced Linux Sound Architecture) input device.
  11862. </p>
  11863. <p>To enable this input device during configuration you need libasound
  11864. installed on your system.
  11865. </p>
  11866. <p>This device allows capturing from an ALSA device. The name of the
  11867. device to capture has to be an ALSA card identifier.
  11868. </p>
  11869. <p>An ALSA identifier has the syntax:
  11870. </p><div class="example">
  11871. <pre class="example-preformatted">hw:<var class="var">CARD</var>[,<var class="var">DEV</var>[,<var class="var">SUBDEV</var>]]
  11872. </pre></div>
  11873. <p>where the <var class="var">DEV</var> and <var class="var">SUBDEV</var> components are optional.
  11874. </p>
  11875. <p>The three arguments (in order: <var class="var">CARD</var>,<var class="var">DEV</var>,<var class="var">SUBDEV</var>)
  11876. specify card number or identifier, device number and subdevice number
  11877. (-1 means any).
  11878. </p>
  11879. <p>To see the list of cards currently recognized by your system check the
  11880. files <samp class="file">/proc/asound/cards</samp> and <samp class="file">/proc/asound/devices</samp>.
  11881. </p>
  11882. <p>For example to capture with <code class="command">ffmpeg</code> from an ALSA device with
  11883. card id 0, you may run the command:
  11884. </p><div class="example">
  11885. <pre class="example-preformatted">ffmpeg -f alsa -i hw:0 alsaout.wav
  11886. </pre></div>
  11887. <p>For more information see:
  11888. <a class="url" href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
  11889. </p>
  11890. <ul class="mini-toc">
  11891. <li><a href="#Options-16" accesskey="1">Options</a></li>
  11892. </ul>
  11893. <div class="subsection-level-extent" id="Options-16">
  11894. <h4 class="subsection"><span>20.1.1 Options<a class="copiable-link" href="#Options-16"> &para;</a></span></h4>
  11895. <dl class="table">
  11896. <dt><samp class="option">sample_rate</samp></dt>
  11897. <dd><p>Set the sample rate in Hz. Default is 48000.
  11898. </p>
  11899. </dd>
  11900. <dt><samp class="option">channels</samp></dt>
  11901. <dd><p>Set the number of channels. Default is 2.
  11902. </p>
  11903. </dd>
  11904. </dl>
  11905. </div>
  11906. </div>
  11907. <div class="section-level-extent" id="android_005fcamera">
  11908. <h3 class="section"><span>20.2 android_camera<a class="copiable-link" href="#android_005fcamera"> &para;</a></span></h3>
  11909. <p>Android camera input device.
  11910. </p>
  11911. <p>This input devices uses the Android Camera2 NDK API which is
  11912. available on devices with API level 24+. The availability of
  11913. android_camera is autodetected during configuration.
  11914. </p>
  11915. <p>This device allows capturing from all cameras on an Android device,
  11916. which are integrated into the Camera2 NDK API.
  11917. </p>
  11918. <p>The available cameras are enumerated internally and can be selected
  11919. with the <var class="var">camera_index</var> parameter. The input file string is
  11920. discarded.
  11921. </p>
  11922. <p>Generally the back facing camera has index 0 while the front facing
  11923. camera has index 1.
  11924. </p>
  11925. <ul class="mini-toc">
  11926. <li><a href="#Options-17" accesskey="1">Options</a></li>
  11927. </ul>
  11928. <div class="subsection-level-extent" id="Options-17">
  11929. <h4 class="subsection"><span>20.2.1 Options<a class="copiable-link" href="#Options-17"> &para;</a></span></h4>
  11930. <dl class="table">
  11931. <dt><samp class="option">video_size</samp></dt>
  11932. <dd><p>Set the video size given as a string such as 640x480 or hd720.
  11933. Falls back to the first available configuration reported by
  11934. Android if requested video size is not available or by default.
  11935. </p>
  11936. </dd>
  11937. <dt><samp class="option">framerate</samp></dt>
  11938. <dd><p>Set the video framerate.
  11939. Falls back to the first available configuration reported by
  11940. Android if requested framerate is not available or by default (-1).
  11941. </p>
  11942. </dd>
  11943. <dt><samp class="option">camera_index</samp></dt>
  11944. <dd><p>Set the index of the camera to use. Default is 0.
  11945. </p>
  11946. </dd>
  11947. <dt><samp class="option">input_queue_size</samp></dt>
  11948. <dd><p>Set the maximum number of frames to buffer. Default is 5.
  11949. </p>
  11950. </dd>
  11951. </dl>
  11952. </div>
  11953. </div>
  11954. <div class="section-level-extent" id="avfoundation">
  11955. <h3 class="section"><span>20.3 avfoundation<a class="copiable-link" href="#avfoundation"> &para;</a></span></h3>
  11956. <p>AVFoundation input device.
  11957. </p>
  11958. <p>AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX &gt;= 10.7 as well as on iOS.
  11959. </p>
  11960. <p>The input filename has to be given in the following syntax:
  11961. </p><div class="example">
  11962. <pre class="example-preformatted">-i &quot;[[VIDEO]:[AUDIO]]&quot;
  11963. </pre></div>
  11964. <p>The first entry selects the video input while the latter selects the audio input.
  11965. The stream has to be specified by the device name or the device index as shown by the device list.
  11966. Alternatively, the video and/or audio input device can be chosen by index using the
  11967. <samp class="option">
  11968. -video_device_index &lt;INDEX&gt;
  11969. </samp>
  11970. and/or
  11971. <samp class="option">
  11972. -audio_device_index &lt;INDEX&gt;
  11973. </samp>
  11974. , overriding any
  11975. device name or index given in the input filename.
  11976. </p>
  11977. <p>All available devices can be enumerated by using <samp class="option">-list_devices true</samp>, listing
  11978. all device names and corresponding indices.
  11979. </p>
  11980. <p>There are two device name aliases:
  11981. </p><dl class="table">
  11982. <dt><code class="code">default</code></dt>
  11983. <dd><p>Select the AVFoundation default device of the corresponding type.
  11984. </p>
  11985. </dd>
  11986. <dt><code class="code">none</code></dt>
  11987. <dd><p>Do not record the corresponding media type.
  11988. This is equivalent to specifying an empty device name or index.
  11989. </p>
  11990. </dd>
  11991. </dl>
  11992. <ul class="mini-toc">
  11993. <li><a href="#Options-18" accesskey="1">Options</a></li>
  11994. <li><a href="#Examples-8" accesskey="2">Examples</a></li>
  11995. </ul>
  11996. <div class="subsection-level-extent" id="Options-18">
  11997. <h4 class="subsection"><span>20.3.1 Options<a class="copiable-link" href="#Options-18"> &para;</a></span></h4>
  11998. <p>AVFoundation supports the following options:
  11999. </p>
  12000. <dl class="table">
  12001. <dt><samp class="option">-list_devices &lt;TRUE|FALSE&gt;</samp></dt>
  12002. <dd><p>If set to true, a list of all available input devices is given showing all
  12003. device names and indices.
  12004. </p>
  12005. </dd>
  12006. <dt><samp class="option">-video_device_index &lt;INDEX&gt;</samp></dt>
  12007. <dd><p>Specify the video device by its index. Overrides anything given in the input filename.
  12008. </p>
  12009. </dd>
  12010. <dt><samp class="option">-audio_device_index &lt;INDEX&gt;</samp></dt>
  12011. <dd><p>Specify the audio device by its index. Overrides anything given in the input filename.
  12012. </p>
  12013. </dd>
  12014. <dt><samp class="option">-pixel_format &lt;FORMAT&gt;</samp></dt>
  12015. <dd><p>Request the video device to use a specific pixel format.
  12016. If the specified format is not supported, a list of available formats is given
  12017. and the first one in this list is used instead. Available pixel formats are:
  12018. <code class="code">monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
  12019. bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,
  12020. yuv420p, nv12, yuyv422, gray</code>
  12021. </p>
  12022. </dd>
  12023. <dt><samp class="option">-framerate</samp></dt>
  12024. <dd><p>Set the grabbing frame rate. Default is <code class="code">ntsc</code>, corresponding to a
  12025. frame rate of <code class="code">30000/1001</code>.
  12026. </p>
  12027. </dd>
  12028. <dt><samp class="option">-video_size</samp></dt>
  12029. <dd><p>Set the video frame size.
  12030. </p>
  12031. </dd>
  12032. <dt><samp class="option">-capture_cursor</samp></dt>
  12033. <dd><p>Capture the mouse pointer. Default is 0.
  12034. </p>
  12035. </dd>
  12036. <dt><samp class="option">-capture_mouse_clicks</samp></dt>
  12037. <dd><p>Capture the screen mouse clicks. Default is 0.
  12038. </p>
  12039. </dd>
  12040. <dt><samp class="option">-capture_raw_data</samp></dt>
  12041. <dd><p>Capture the raw device data. Default is 0.
  12042. Using this option may result in receiving the underlying data delivered to the AVFoundation framework. E.g. for muxed devices that sends raw DV data to the framework (like tape-based camcorders), setting this option to false results in extracted video frames captured in the designated pixel format only. Setting this option to true results in receiving the raw DV stream untouched.
  12043. </p></dd>
  12044. </dl>
  12045. </div>
  12046. <div class="subsection-level-extent" id="Examples-8">
  12047. <h4 class="subsection"><span>20.3.2 Examples<a class="copiable-link" href="#Examples-8"> &para;</a></span></h4>
  12048. <ul class="itemize mark-bullet">
  12049. <li>Print the list of AVFoundation supported devices and exit:
  12050. <div class="example">
  12051. <pre class="example-preformatted">$ ffmpeg -f avfoundation -list_devices true -i &quot;&quot;
  12052. </pre></div>
  12053. </li><li>Record video from video device 0 and audio from audio device 0 into out.avi:
  12054. <div class="example">
  12055. <pre class="example-preformatted">$ ffmpeg -f avfoundation -i &quot;0:0&quot; out.avi
  12056. </pre></div>
  12057. </li><li>Record video from video device 2 and audio from audio device 1 into out.avi:
  12058. <div class="example">
  12059. <pre class="example-preformatted">$ ffmpeg -f avfoundation -video_device_index 2 -i &quot;:1&quot; out.avi
  12060. </pre></div>
  12061. </li><li>Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:
  12062. <div class="example">
  12063. <pre class="example-preformatted">$ ffmpeg -f avfoundation -pixel_format bgr0 -i &quot;default:none&quot; out.avi
  12064. </pre></div>
  12065. </li><li>Record raw DV data from a suitable input device and write the output into out.dv:
  12066. <div class="example">
  12067. <pre class="example-preformatted">$ ffmpeg -f avfoundation -capture_raw_data true -i &quot;zr100:none&quot; out.dv
  12068. </pre></div>
  12069. </li></ul>
  12070. </div>
  12071. </div>
  12072. <div class="section-level-extent" id="bktr">
  12073. <h3 class="section"><span>20.4 bktr<a class="copiable-link" href="#bktr"> &para;</a></span></h3>
  12074. <p>BSD video input device. Deprecated and will be removed - please contact
  12075. the developers if you are interested in maintaining it.
  12076. </p>
  12077. <ul class="mini-toc">
  12078. <li><a href="#Options-19" accesskey="1">Options</a></li>
  12079. </ul>
  12080. <div class="subsection-level-extent" id="Options-19">
  12081. <h4 class="subsection"><span>20.4.1 Options<a class="copiable-link" href="#Options-19"> &para;</a></span></h4>
  12082. <dl class="table">
  12083. <dt><samp class="option">framerate</samp></dt>
  12084. <dd><p>Set the frame rate.
  12085. </p>
  12086. </dd>
  12087. <dt><samp class="option">video_size</samp></dt>
  12088. <dd><p>Set the video frame size. Default is <code class="code">vga</code>.
  12089. </p>
  12090. </dd>
  12091. <dt><samp class="option">standard</samp></dt>
  12092. <dd>
  12093. <p>Available values are:
  12094. </p><dl class="table">
  12095. <dt>&lsquo;<samp class="samp">pal</samp>&rsquo;</dt>
  12096. <dt>&lsquo;<samp class="samp">ntsc</samp>&rsquo;</dt>
  12097. <dt>&lsquo;<samp class="samp">secam</samp>&rsquo;</dt>
  12098. <dt>&lsquo;<samp class="samp">paln</samp>&rsquo;</dt>
  12099. <dt>&lsquo;<samp class="samp">palm</samp>&rsquo;</dt>
  12100. <dt>&lsquo;<samp class="samp">ntscj</samp>&rsquo;</dt>
  12101. </dl>
  12102. </dd>
  12103. </dl>
  12104. </div>
  12105. </div>
  12106. <div class="section-level-extent" id="decklink">
  12107. <h3 class="section"><span>20.5 decklink<a class="copiable-link" href="#decklink"> &para;</a></span></h3>
  12108. <p>The decklink input device provides capture capabilities for Blackmagic
  12109. DeckLink devices.
  12110. </p>
  12111. <p>To enable this input device, you need the Blackmagic DeckLink SDK and you
  12112. need to configure with the appropriate <code class="code">--extra-cflags</code>
  12113. and <code class="code">--extra-ldflags</code>.
  12114. On Windows, you need to run the IDL files through <code class="command">widl</code>.
  12115. </p>
  12116. <p>DeckLink is very picky about the formats it supports. Pixel format of the
  12117. input can be set with <samp class="option">raw_format</samp>.
  12118. Framerate and video size must be determined for your device with
  12119. <code class="command">-list_formats 1</code>. Audio sample rate is always 48 kHz and the number
  12120. of channels can be 2, 8 or 16. Note that all audio channels are bundled in one single
  12121. audio track.
  12122. </p>
  12123. <ul class="mini-toc">
  12124. <li><a href="#Options-20" accesskey="1">Options</a></li>
  12125. <li><a href="#Examples-9" accesskey="2">Examples</a></li>
  12126. </ul>
  12127. <div class="subsection-level-extent" id="Options-20">
  12128. <h4 class="subsection"><span>20.5.1 Options<a class="copiable-link" href="#Options-20"> &para;</a></span></h4>
  12129. <dl class="table">
  12130. <dt><samp class="option">list_devices</samp></dt>
  12131. <dd><p>If set to <samp class="option">true</samp>, print a list of devices and exit.
  12132. Defaults to <samp class="option">false</samp>. This option is deprecated, please use the
  12133. <code class="code">-sources</code> option of ffmpeg to list the available input devices.
  12134. </p>
  12135. </dd>
  12136. <dt><samp class="option">list_formats</samp></dt>
  12137. <dd><p>If set to <samp class="option">true</samp>, print a list of supported formats and exit.
  12138. Defaults to <samp class="option">false</samp>.
  12139. </p>
  12140. </dd>
  12141. <dt><samp class="option">format_code &lt;FourCC&gt;</samp></dt>
  12142. <dd><p>This sets the input video format to the format given by the FourCC. To see
  12143. the supported values of your device(s) use <samp class="option">list_formats</samp>.
  12144. Note that there is a FourCC <samp class="option">'pal '</samp> that can also be used
  12145. as <samp class="option">pal</samp> (3 letters).
  12146. Default behavior is autodetection of the input video format, if the hardware
  12147. supports it.
  12148. </p>
  12149. </dd>
  12150. <dt><samp class="option">raw_format</samp></dt>
  12151. <dd><p>Set the pixel format of the captured video.
  12152. Available values are:
  12153. </p><dl class="table">
  12154. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  12155. <dd>
  12156. <p>This is the default which means 8-bit YUV 422 or 8-bit ARGB if format
  12157. autodetection is used, 8-bit YUV 422 otherwise.
  12158. </p>
  12159. </dd>
  12160. <dt>&lsquo;<samp class="samp">uyvy422</samp>&rsquo;</dt>
  12161. <dd>
  12162. <p>8-bit YUV 422.
  12163. </p>
  12164. </dd>
  12165. <dt>&lsquo;<samp class="samp">yuv422p10</samp>&rsquo;</dt>
  12166. <dd>
  12167. <p>10-bit YUV 422.
  12168. </p>
  12169. </dd>
  12170. <dt>&lsquo;<samp class="samp">argb</samp>&rsquo;</dt>
  12171. <dd>
  12172. <p>8-bit RGB.
  12173. </p>
  12174. </dd>
  12175. <dt>&lsquo;<samp class="samp">bgra</samp>&rsquo;</dt>
  12176. <dd>
  12177. <p>8-bit RGB.
  12178. </p>
  12179. </dd>
  12180. <dt>&lsquo;<samp class="samp">rgb10</samp>&rsquo;</dt>
  12181. <dd>
  12182. <p>10-bit RGB.
  12183. </p>
  12184. </dd>
  12185. </dl>
  12186. </dd>
  12187. <dt><samp class="option">teletext_lines</samp></dt>
  12188. <dd><p>If set to nonzero, an additional teletext stream will be captured from the
  12189. vertical ancillary data. Both SD PAL (576i) and HD (1080i or 1080p)
  12190. sources are supported. In case of HD sources, OP47 packets are decoded.
  12191. </p>
  12192. <p>This option is a bitmask of the SD PAL VBI lines captured, specifically lines 6
  12193. to 22, and lines 318 to 335. Line 6 is the LSB in the mask. Selected lines
  12194. which do not contain teletext information will be ignored. You can use the
  12195. special <samp class="option">all</samp> constant to select all possible lines, or
  12196. <samp class="option">standard</samp> to skip lines 6, 318 and 319, which are not compatible with
  12197. all receivers.
  12198. </p>
  12199. <p>For SD sources, ffmpeg needs to be compiled with <code class="code">--enable-libzvbi</code>. For
  12200. HD sources, on older (pre-4K) DeckLink card models you have to capture in 10
  12201. bit mode.
  12202. </p>
  12203. </dd>
  12204. <dt><samp class="option">channels</samp></dt>
  12205. <dd><p>Defines number of audio channels to capture. Must be &lsquo;<samp class="samp">2</samp>&rsquo;, &lsquo;<samp class="samp">8</samp>&rsquo; or &lsquo;<samp class="samp">16</samp>&rsquo;.
  12206. Defaults to &lsquo;<samp class="samp">2</samp>&rsquo;.
  12207. </p>
  12208. </dd>
  12209. <dt><samp class="option">duplex_mode</samp></dt>
  12210. <dd><p>Sets the decklink device duplex/profile mode. Must be &lsquo;<samp class="samp">unset</samp>&rsquo;, &lsquo;<samp class="samp">half</samp>&rsquo;, &lsquo;<samp class="samp">full</samp>&rsquo;,
  12211. &lsquo;<samp class="samp">one_sub_device_full</samp>&rsquo;, &lsquo;<samp class="samp">one_sub_device_half</samp>&rsquo;, &lsquo;<samp class="samp">two_sub_device_full</samp>&rsquo;,
  12212. &lsquo;<samp class="samp">four_sub_device_half</samp>&rsquo;
  12213. Defaults to &lsquo;<samp class="samp">unset</samp>&rsquo;.
  12214. </p>
  12215. <p>Note: DeckLink SDK 11.0 have replaced the duplex property by a profile property.
  12216. For the DeckLink Duo 2 and DeckLink Quad 2, a profile is shared between any 2
  12217. sub-devices that utilize the same connectors. For the DeckLink 8K Pro, a profile
  12218. is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles.
  12219. </p>
  12220. <p>Valid profile modes for DeckLink 8K Pro(with DeckLink SDK &gt;= 11.0):
  12221. &lsquo;<samp class="samp">one_sub_device_full</samp>&rsquo;, &lsquo;<samp class="samp">one_sub_device_half</samp>&rsquo;, &lsquo;<samp class="samp">two_sub_device_full</samp>&rsquo;,
  12222. &lsquo;<samp class="samp">four_sub_device_half</samp>&rsquo;
  12223. </p>
  12224. <p>Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2:
  12225. &lsquo;<samp class="samp">half</samp>&rsquo;, &lsquo;<samp class="samp">full</samp>&rsquo;
  12226. </p>
  12227. </dd>
  12228. <dt><samp class="option">timecode_format</samp></dt>
  12229. <dd><p>Timecode type to include in the frame and video stream metadata. Must be
  12230. &lsquo;<samp class="samp">none</samp>&rsquo;, &lsquo;<samp class="samp">rp188vitc</samp>&rsquo;, &lsquo;<samp class="samp">rp188vitc2</samp>&rsquo;, &lsquo;<samp class="samp">rp188ltc</samp>&rsquo;,
  12231. &lsquo;<samp class="samp">rp188hfr</samp>&rsquo;, &lsquo;<samp class="samp">rp188any</samp>&rsquo;, &lsquo;<samp class="samp">vitc</samp>&rsquo;, &lsquo;<samp class="samp">vitc2</samp>&rsquo;, or &lsquo;<samp class="samp">serial</samp>&rsquo;.
  12232. Defaults to &lsquo;<samp class="samp">none</samp>&rsquo; (not included).
  12233. </p>
  12234. <p>In order to properly support 50/60 fps timecodes, the ordering of the queried
  12235. timecode types for &lsquo;<samp class="samp">rp188any</samp>&rsquo; is HFR, VITC1, VITC2 and LTC for &gt;30 fps
  12236. content. Note that this is slightly different to the ordering used by the
  12237. DeckLink API, which is HFR, VITC1, LTC, VITC2.
  12238. </p>
  12239. </dd>
  12240. <dt><samp class="option">video_input</samp></dt>
  12241. <dd><p>Sets the video input source. Must be &lsquo;<samp class="samp">unset</samp>&rsquo;, &lsquo;<samp class="samp">sdi</samp>&rsquo;, &lsquo;<samp class="samp">hdmi</samp>&rsquo;,
  12242. &lsquo;<samp class="samp">optical_sdi</samp>&rsquo;, &lsquo;<samp class="samp">component</samp>&rsquo;, &lsquo;<samp class="samp">composite</samp>&rsquo; or &lsquo;<samp class="samp">s_video</samp>&rsquo;.
  12243. Defaults to &lsquo;<samp class="samp">unset</samp>&rsquo;.
  12244. </p>
  12245. </dd>
  12246. <dt><samp class="option">audio_input</samp></dt>
  12247. <dd><p>Sets the audio input source. Must be &lsquo;<samp class="samp">unset</samp>&rsquo;, &lsquo;<samp class="samp">embedded</samp>&rsquo;,
  12248. &lsquo;<samp class="samp">aes_ebu</samp>&rsquo;, &lsquo;<samp class="samp">analog</samp>&rsquo;, &lsquo;<samp class="samp">analog_xlr</samp>&rsquo;, &lsquo;<samp class="samp">analog_rca</samp>&rsquo; or
  12249. &lsquo;<samp class="samp">microphone</samp>&rsquo;. Defaults to &lsquo;<samp class="samp">unset</samp>&rsquo;.
  12250. </p>
  12251. </dd>
  12252. <dt><samp class="option">video_pts</samp></dt>
  12253. <dd><p>Sets the video packet timestamp source. Must be &lsquo;<samp class="samp">video</samp>&rsquo;, &lsquo;<samp class="samp">audio</samp>&rsquo;,
  12254. &lsquo;<samp class="samp">reference</samp>&rsquo;, &lsquo;<samp class="samp">wallclock</samp>&rsquo; or &lsquo;<samp class="samp">abs_wallclock</samp>&rsquo;.
  12255. Defaults to &lsquo;<samp class="samp">video</samp>&rsquo;.
  12256. </p>
  12257. </dd>
  12258. <dt><samp class="option">audio_pts</samp></dt>
  12259. <dd><p>Sets the audio packet timestamp source. Must be &lsquo;<samp class="samp">video</samp>&rsquo;, &lsquo;<samp class="samp">audio</samp>&rsquo;,
  12260. &lsquo;<samp class="samp">reference</samp>&rsquo;, &lsquo;<samp class="samp">wallclock</samp>&rsquo; or &lsquo;<samp class="samp">abs_wallclock</samp>&rsquo;.
  12261. Defaults to &lsquo;<samp class="samp">audio</samp>&rsquo;.
  12262. </p>
  12263. </dd>
  12264. <dt><samp class="option">draw_bars</samp></dt>
  12265. <dd><p>If set to &lsquo;<samp class="samp">true</samp>&rsquo;, color bars are drawn in the event of a signal loss.
  12266. Defaults to &lsquo;<samp class="samp">true</samp>&rsquo;.
  12267. </p>
  12268. </dd>
  12269. <dt><samp class="option">queue_size</samp></dt>
  12270. <dd><p>Sets maximum input buffer size in bytes. If the buffering reaches this value,
  12271. incoming frames will be dropped.
  12272. Defaults to &lsquo;<samp class="samp">1073741824</samp>&rsquo;.
  12273. </p>
  12274. </dd>
  12275. <dt><samp class="option">audio_depth</samp></dt>
  12276. <dd><p>Sets the audio sample bit depth. Must be &lsquo;<samp class="samp">16</samp>&rsquo; or &lsquo;<samp class="samp">32</samp>&rsquo;.
  12277. Defaults to &lsquo;<samp class="samp">16</samp>&rsquo;.
  12278. </p>
  12279. </dd>
  12280. <dt><samp class="option">decklink_copyts</samp></dt>
  12281. <dd><p>If set to <samp class="option">true</samp>, timestamps are forwarded as they are without removing
  12282. the initial offset.
  12283. Defaults to <samp class="option">false</samp>.
  12284. </p>
  12285. </dd>
  12286. <dt><samp class="option">timestamp_align</samp></dt>
  12287. <dd><p>Capture start time alignment in seconds. If set to nonzero, input frames are
  12288. dropped till the system timestamp aligns with configured value.
  12289. Alignment difference of up to one frame duration is tolerated.
  12290. This is useful for maintaining input synchronization across N different
  12291. hardware devices deployed for &rsquo;N-way&rsquo; redundancy. The system time of different
  12292. hardware devices should be synchronized with protocols such as NTP or PTP,
  12293. before using this option.
  12294. Note that this method is not foolproof. In some border cases input
  12295. synchronization may not happen due to thread scheduling jitters in the OS.
  12296. Either sync could go wrong by 1 frame or in a rarer case
  12297. <samp class="option">timestamp_align</samp> seconds.
  12298. Defaults to &lsquo;<samp class="samp">0</samp>&rsquo;.
  12299. </p>
  12300. </dd>
  12301. <dt><samp class="option">wait_for_tc (<em class="emph">bool</em>)</samp></dt>
  12302. <dd><p>Drop frames till a frame with timecode is received. Sometimes serial timecode
  12303. isn&rsquo;t received with the first input frame. If that happens, the stored stream
  12304. timecode will be inaccurate. If this option is set to <samp class="option">true</samp>, input frames
  12305. are dropped till a frame with timecode is received.
  12306. Option <var class="var">timecode_format</var> must be specified.
  12307. Defaults to <samp class="option">false</samp>.
  12308. </p>
  12309. </dd>
  12310. <dt><samp class="option">enable_klv(<em class="emph">bool</em>)</samp></dt>
  12311. <dd><p>If set to <samp class="option">true</samp>, extracts KLV data from VANC and outputs KLV packets.
  12312. KLV VANC packets are joined based on MID and PSC fields and aggregated into
  12313. one KLV packet.
  12314. Defaults to <samp class="option">false</samp>.
  12315. </p>
  12316. </dd>
  12317. </dl>
  12318. </div>
  12319. <div class="subsection-level-extent" id="Examples-9">
  12320. <h4 class="subsection"><span>20.5.2 Examples<a class="copiable-link" href="#Examples-9"> &para;</a></span></h4>
  12321. <ul class="itemize mark-bullet">
  12322. <li>List input devices:
  12323. <div class="example">
  12324. <pre class="example-preformatted">ffmpeg -sources decklink
  12325. </pre></div>
  12326. </li><li>List supported formats:
  12327. <div class="example">
  12328. <pre class="example-preformatted">ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
  12329. </pre></div>
  12330. </li><li>Capture video clip at 1080i50:
  12331. <div class="example">
  12332. <pre class="example-preformatted">ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi
  12333. </pre></div>
  12334. </li><li>Capture video clip at 1080i50 10 bit:
  12335. <div class="example">
  12336. <pre class="example-preformatted">ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
  12337. </pre></div>
  12338. </li><li>Capture video clip at 1080i50 with 16 audio channels:
  12339. <div class="example">
  12340. <pre class="example-preformatted">ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
  12341. </pre></div>
  12342. </li></ul>
  12343. </div>
  12344. </div>
  12345. <div class="section-level-extent" id="dshow">
  12346. <h3 class="section"><span>20.6 dshow<a class="copiable-link" href="#dshow"> &para;</a></span></h3>
  12347. <p>Windows DirectShow input device.
  12348. </p>
  12349. <p>DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
  12350. Currently only audio and video devices are supported.
  12351. </p>
  12352. <p>Multiple devices may be opened as separate inputs, but they may also be
  12353. opened on the same input, which should improve synchronism between them.
  12354. </p>
  12355. <p>The input name should be in the format:
  12356. </p>
  12357. <div class="example">
  12358. <pre class="example-preformatted"><var class="var">TYPE</var>=<var class="var">NAME</var>[:<var class="var">TYPE</var>=<var class="var">NAME</var>]
  12359. </pre></div>
  12360. <p>where <var class="var">TYPE</var> can be either <var class="var">audio</var> or <var class="var">video</var>,
  12361. and <var class="var">NAME</var> is the device&rsquo;s name or alternative name..
  12362. </p>
  12363. <ul class="mini-toc">
  12364. <li><a href="#Options-21" accesskey="1">Options</a></li>
  12365. <li><a href="#Examples-10" accesskey="2">Examples</a></li>
  12366. </ul>
  12367. <div class="subsection-level-extent" id="Options-21">
  12368. <h4 class="subsection"><span>20.6.1 Options<a class="copiable-link" href="#Options-21"> &para;</a></span></h4>
  12369. <p>If no options are specified, the device&rsquo;s defaults are used.
  12370. If the device does not support the requested options, it will
  12371. fail to open.
  12372. </p>
  12373. <dl class="table">
  12374. <dt><samp class="option">video_size</samp></dt>
  12375. <dd><p>Set the video size in the captured video.
  12376. </p>
  12377. </dd>
  12378. <dt><samp class="option">framerate</samp></dt>
  12379. <dd><p>Set the frame rate in the captured video.
  12380. </p>
  12381. </dd>
  12382. <dt><samp class="option">sample_rate</samp></dt>
  12383. <dd><p>Set the sample rate (in Hz) of the captured audio.
  12384. </p>
  12385. </dd>
  12386. <dt><samp class="option">sample_size</samp></dt>
  12387. <dd><p>Set the sample size (in bits) of the captured audio.
  12388. </p>
  12389. </dd>
  12390. <dt><samp class="option">channels</samp></dt>
  12391. <dd><p>Set the number of channels in the captured audio.
  12392. </p>
  12393. </dd>
  12394. <dt><samp class="option">list_devices</samp></dt>
  12395. <dd><p>If set to <samp class="option">true</samp>, print a list of devices and exit.
  12396. </p>
  12397. </dd>
  12398. <dt><samp class="option">list_options</samp></dt>
  12399. <dd><p>If set to <samp class="option">true</samp>, print a list of selected device&rsquo;s options
  12400. and exit.
  12401. </p>
  12402. </dd>
  12403. <dt><samp class="option">video_device_number</samp></dt>
  12404. <dd><p>Set video device number for devices with the same name (starts at 0,
  12405. defaults to 0).
  12406. </p>
  12407. </dd>
  12408. <dt><samp class="option">audio_device_number</samp></dt>
  12409. <dd><p>Set audio device number for devices with the same name (starts at 0,
  12410. defaults to 0).
  12411. </p>
  12412. </dd>
  12413. <dt><samp class="option">pixel_format</samp></dt>
  12414. <dd><p>Select pixel format to be used by DirectShow. This may only be set when
  12415. the video codec is not set or set to rawvideo.
  12416. </p>
  12417. </dd>
  12418. <dt><samp class="option">audio_buffer_size</samp></dt>
  12419. <dd><p>Set audio device buffer size in milliseconds (which can directly
  12420. impact latency, depending on the device).
  12421. Defaults to using the audio device&rsquo;s
  12422. default buffer size (typically some multiple of 500ms).
  12423. Setting this value too low can degrade performance.
  12424. See also
  12425. <a class="url" href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx</a>
  12426. </p>
  12427. </dd>
  12428. <dt><samp class="option">video_pin_name</samp></dt>
  12429. <dd><p>Select video capture pin to use by name or alternative name.
  12430. </p>
  12431. </dd>
  12432. <dt><samp class="option">audio_pin_name</samp></dt>
  12433. <dd><p>Select audio capture pin to use by name or alternative name.
  12434. </p>
  12435. </dd>
  12436. <dt><samp class="option">crossbar_video_input_pin_number</samp></dt>
  12437. <dd><p>Select video input pin number for crossbar device. This will be
  12438. routed to the crossbar device&rsquo;s Video Decoder output pin.
  12439. Note that changing this value can affect future invocations
  12440. (sets a new default) until system reboot occurs.
  12441. </p>
  12442. </dd>
  12443. <dt><samp class="option">crossbar_audio_input_pin_number</samp></dt>
  12444. <dd><p>Select audio input pin number for crossbar device. This will be
  12445. routed to the crossbar device&rsquo;s Audio Decoder output pin.
  12446. Note that changing this value can affect future invocations
  12447. (sets a new default) until system reboot occurs.
  12448. </p>
  12449. </dd>
  12450. <dt><samp class="option">show_video_device_dialog</samp></dt>
  12451. <dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display dialog
  12452. to the end user, allowing them to change video filter properties
  12453. and configurations manually.
  12454. Note that for crossbar devices, adjusting values in this dialog
  12455. may be needed at times to toggle between PAL (25 fps) and NTSC (29.97)
  12456. input frame rates, sizes, interlacing, etc. Changing these values can
  12457. enable different scan rates/frame rates and avoiding green bars at
  12458. the bottom, flickering scan lines, etc.
  12459. Note that with some devices, changing these properties can also affect future
  12460. invocations (sets new defaults) until system reboot occurs.
  12461. </p>
  12462. </dd>
  12463. <dt><samp class="option">show_audio_device_dialog</samp></dt>
  12464. <dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display dialog
  12465. to the end user, allowing them to change audio filter properties
  12466. and configurations manually.
  12467. </p>
  12468. </dd>
  12469. <dt><samp class="option">show_video_crossbar_connection_dialog</samp></dt>
  12470. <dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display
  12471. dialog to the end user, allowing them to manually
  12472. modify crossbar pin routings, when it opens a video device.
  12473. </p>
  12474. </dd>
  12475. <dt><samp class="option">show_audio_crossbar_connection_dialog</samp></dt>
  12476. <dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display
  12477. dialog to the end user, allowing them to manually
  12478. modify crossbar pin routings, when it opens an audio device.
  12479. </p>
  12480. </dd>
  12481. <dt><samp class="option">show_analog_tv_tuner_dialog</samp></dt>
  12482. <dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display
  12483. dialog to the end user, allowing them to manually
  12484. modify TV channels and frequencies.
  12485. </p>
  12486. </dd>
  12487. <dt><samp class="option">show_analog_tv_tuner_audio_dialog</samp></dt>
  12488. <dd><p>If set to <samp class="option">true</samp>, before capture starts, popup a display
  12489. dialog to the end user, allowing them to manually
  12490. modify TV audio (like mono vs. stereo, Language A,B or C).
  12491. </p>
  12492. </dd>
  12493. <dt><samp class="option">audio_device_load</samp></dt>
  12494. <dd><p>Load an audio capture filter device from file instead of searching
  12495. it by name. It may load additional parameters too, if the filter
  12496. supports the serialization of its properties to.
  12497. To use this an audio capture source has to be specified, but it can
  12498. be anything even fake one.
  12499. </p>
  12500. </dd>
  12501. <dt><samp class="option">audio_device_save</samp></dt>
  12502. <dd><p>Save the currently used audio capture filter device and its
  12503. parameters (if the filter supports it) to a file.
  12504. If a file with the same name exists it will be overwritten.
  12505. </p>
  12506. </dd>
  12507. <dt><samp class="option">video_device_load</samp></dt>
  12508. <dd><p>Load a video capture filter device from file instead of searching
  12509. it by name. It may load additional parameters too, if the filter
  12510. supports the serialization of its properties to.
  12511. To use this a video capture source has to be specified, but it can
  12512. be anything even fake one.
  12513. </p>
  12514. </dd>
  12515. <dt><samp class="option">video_device_save</samp></dt>
  12516. <dd><p>Save the currently used video capture filter device and its
  12517. parameters (if the filter supports it) to a file.
  12518. If a file with the same name exists it will be overwritten.
  12519. </p>
  12520. </dd>
  12521. <dt><samp class="option">use_video_device_timestamps</samp></dt>
  12522. <dd><p>If set to <samp class="option">false</samp>, the timestamp for video frames will be
  12523. derived from the wallclock instead of the timestamp provided by
  12524. the capture device. This allows working around devices that
  12525. provide unreliable timestamps.
  12526. </p>
  12527. </dd>
  12528. </dl>
  12529. </div>
  12530. <div class="subsection-level-extent" id="Examples-10">
  12531. <h4 class="subsection"><span>20.6.2 Examples<a class="copiable-link" href="#Examples-10"> &para;</a></span></h4>
  12532. <ul class="itemize mark-bullet">
  12533. <li>Print the list of DirectShow supported devices and exit:
  12534. <div class="example">
  12535. <pre class="example-preformatted">$ ffmpeg -list_devices true -f dshow -i dummy
  12536. </pre></div>
  12537. </li><li>Open video device <var class="var">Camera</var>:
  12538. <div class="example">
  12539. <pre class="example-preformatted">$ ffmpeg -f dshow -i video=&quot;Camera&quot;
  12540. </pre></div>
  12541. </li><li>Open second video device with name <var class="var">Camera</var>:
  12542. <div class="example">
  12543. <pre class="example-preformatted">$ ffmpeg -f dshow -video_device_number 1 -i video=&quot;Camera&quot;
  12544. </pre></div>
  12545. </li><li>Open video device <var class="var">Camera</var> and audio device <var class="var">Microphone</var>:
  12546. <div class="example">
  12547. <pre class="example-preformatted">$ ffmpeg -f dshow -i video=&quot;Camera&quot;:audio=&quot;Microphone&quot;
  12548. </pre></div>
  12549. </li><li>Print the list of supported options in selected device and exit:
  12550. <div class="example">
  12551. <pre class="example-preformatted">$ ffmpeg -list_options true -f dshow -i video=&quot;Camera&quot;
  12552. </pre></div>
  12553. </li><li>Specify pin names to capture by name or alternative name, specify alternative device name:
  12554. <div class="example">
  12555. <pre class="example-preformatted">$ ffmpeg -f dshow -audio_pin_name &quot;Audio Out&quot; -video_pin_name 2 -i video=video=&quot;@device_pnp_\\?\pci#ven_1a0a&amp;dev_6200&amp;subsys_62021461&amp;rev_01#4&amp;e2c7dd6&amp;0&amp;00e1#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6}&quot;:audio=&quot;Microphone&quot;
  12556. </pre></div>
  12557. </li><li>Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:
  12558. <div class="example">
  12559. <pre class="example-preformatted">$ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
  12560. -crossbar_audio_input_pin_number 3 -i video=&quot;AVerMedia BDA Analog Capture&quot;:audio=&quot;AVerMedia BDA Analog Capture&quot;
  12561. </pre></div>
  12562. </li></ul>
  12563. </div>
  12564. </div>
  12565. <div class="section-level-extent" id="fbdev">
  12566. <h3 class="section"><span>20.7 fbdev<a class="copiable-link" href="#fbdev"> &para;</a></span></h3>
  12567. <p>Linux framebuffer input device.
  12568. </p>
  12569. <p>The Linux framebuffer is a graphic hardware-independent abstraction
  12570. layer to show graphics on a computer monitor, typically on the
  12571. console. It is accessed through a file device node, usually
  12572. <samp class="file">/dev/fb0</samp>.
  12573. </p>
  12574. <p>For more detailed information read the file
  12575. Documentation/fb/framebuffer.txt included in the Linux source tree.
  12576. </p>
  12577. <p>See also <a class="url" href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
  12578. </p>
  12579. <p>To record from the framebuffer device <samp class="file">/dev/fb0</samp> with
  12580. <code class="command">ffmpeg</code>:
  12581. </p><div class="example">
  12582. <pre class="example-preformatted">ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
  12583. </pre></div>
  12584. <p>You can take a single screenshot image with the command:
  12585. </p><div class="example">
  12586. <pre class="example-preformatted">ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
  12587. </pre></div>
  12588. <ul class="mini-toc">
  12589. <li><a href="#Options-22" accesskey="1">Options</a></li>
  12590. </ul>
  12591. <div class="subsection-level-extent" id="Options-22">
  12592. <h4 class="subsection"><span>20.7.1 Options<a class="copiable-link" href="#Options-22"> &para;</a></span></h4>
  12593. <dl class="table">
  12594. <dt><samp class="option">framerate</samp></dt>
  12595. <dd><p>Set the frame rate. Default is 25.
  12596. </p>
  12597. </dd>
  12598. </dl>
  12599. </div>
  12600. </div>
  12601. <div class="section-level-extent" id="gdigrab">
  12602. <h3 class="section"><span>20.8 gdigrab<a class="copiable-link" href="#gdigrab"> &para;</a></span></h3>
  12603. <p>Win32 GDI-based screen capture device.
  12604. </p>
  12605. <p>This device allows you to capture a region of the display on Windows.
  12606. </p>
  12607. <p>Amongst options for the imput filenames are such elements as:
  12608. </p><div class="example">
  12609. <pre class="example-preformatted">desktop
  12610. </pre></div>
  12611. <p>or
  12612. </p><div class="example">
  12613. <pre class="example-preformatted">title=<var class="var">window_title</var>
  12614. </pre></div>
  12615. <p>or
  12616. </p><div class="example">
  12617. <pre class="example-preformatted">hwnd=<var class="var">window_hwnd</var>
  12618. </pre></div>
  12619. <p>The first option will capture the entire desktop, or a fixed region of the
  12620. desktop. The second and third options will instead capture the contents of a single
  12621. window, regardless of its position on the screen.
  12622. </p>
  12623. <p>For example, to grab the entire desktop using <code class="command">ffmpeg</code>:
  12624. </p><div class="example">
  12625. <pre class="example-preformatted">ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
  12626. </pre></div>
  12627. <p>Grab a 640x480 region at position <code class="code">10,20</code>:
  12628. </p><div class="example">
  12629. <pre class="example-preformatted">ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
  12630. </pre></div>
  12631. <p>Grab the contents of the window named &quot;Calculator&quot;
  12632. </p><div class="example">
  12633. <pre class="example-preformatted">ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
  12634. </pre></div>
  12635. <ul class="mini-toc">
  12636. <li><a href="#Options-23" accesskey="1">Options</a></li>
  12637. </ul>
  12638. <div class="subsection-level-extent" id="Options-23">
  12639. <h4 class="subsection"><span>20.8.1 Options<a class="copiable-link" href="#Options-23"> &para;</a></span></h4>
  12640. <dl class="table">
  12641. <dt><samp class="option">draw_mouse</samp></dt>
  12642. <dd><p>Specify whether to draw the mouse pointer. Use the value <code class="code">0</code> to
  12643. not draw the pointer. Default value is <code class="code">1</code>.
  12644. </p>
  12645. </dd>
  12646. <dt><samp class="option">framerate</samp></dt>
  12647. <dd><p>Set the grabbing frame rate. Default value is <code class="code">ntsc</code>,
  12648. corresponding to a frame rate of <code class="code">30000/1001</code>.
  12649. </p>
  12650. </dd>
  12651. <dt><samp class="option">show_region</samp></dt>
  12652. <dd><p>Show grabbed region on screen.
  12653. </p>
  12654. <p>If <var class="var">show_region</var> is specified with <code class="code">1</code>, then the grabbing
  12655. region will be indicated on screen. With this option, it is easy to
  12656. know what is being grabbed if only a portion of the screen is grabbed.
  12657. </p>
  12658. <p>Note that <var class="var">show_region</var> is incompatible with grabbing the contents
  12659. of a single window.
  12660. </p>
  12661. <p>For example:
  12662. </p><div class="example">
  12663. <pre class="example-preformatted">ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
  12664. </pre></div>
  12665. </dd>
  12666. <dt><samp class="option">video_size</samp></dt>
  12667. <dd><p>Set the video frame size. The default is to capture the full screen if <samp class="file">desktop</samp> is selected, or the full window size if <samp class="file">title=<var class="var">window_title</var></samp> is selected.
  12668. </p>
  12669. </dd>
  12670. <dt><samp class="option">offset_x</samp></dt>
  12671. <dd><p>When capturing a region with <var class="var">video_size</var>, set the distance from the left edge of the screen or desktop.
  12672. </p>
  12673. <p>Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned to the left of your primary monitor, you will need to use a negative <var class="var">offset_x</var> value to move the region to that monitor.
  12674. </p>
  12675. </dd>
  12676. <dt><samp class="option">offset_y</samp></dt>
  12677. <dd><p>When capturing a region with <var class="var">video_size</var>, set the distance from the top edge of the screen or desktop.
  12678. </p>
  12679. <p>Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned above your primary monitor, you will need to use a negative <var class="var">offset_y</var> value to move the region to that monitor.
  12680. </p>
  12681. </dd>
  12682. </dl>
  12683. </div>
  12684. </div>
  12685. <div class="section-level-extent" id="iec61883">
  12686. <h3 class="section"><span>20.9 iec61883<a class="copiable-link" href="#iec61883"> &para;</a></span></h3>
  12687. <p>FireWire DV/HDV input device using libiec61883.
  12688. </p>
  12689. <p>To enable this input device, you need libiec61883, libraw1394 and
  12690. libavc1394 installed on your system. Use the configure option
  12691. <code class="code">--enable-libiec61883</code> to compile with the device enabled.
  12692. </p>
  12693. <p>The iec61883 capture device supports capturing from a video device
  12694. connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
  12695. FireWire stack (juju). This is the default DV/HDV input method in Linux
  12696. Kernel 2.6.37 and later, since the old FireWire stack was removed.
  12697. </p>
  12698. <p>Specify the FireWire port to be used as input file, or &quot;auto&quot;
  12699. to choose the first port connected.
  12700. </p>
  12701. <ul class="mini-toc">
  12702. <li><a href="#Options-24" accesskey="1">Options</a></li>
  12703. <li><a href="#Examples-11" accesskey="2">Examples</a></li>
  12704. </ul>
  12705. <div class="subsection-level-extent" id="Options-24">
  12706. <h4 class="subsection"><span>20.9.1 Options<a class="copiable-link" href="#Options-24"> &para;</a></span></h4>
  12707. <dl class="table">
  12708. <dt><samp class="option">dvtype</samp></dt>
  12709. <dd><p>Override autodetection of DV/HDV. This should only be used if auto
  12710. detection does not work, or if usage of a different device type
  12711. should be prohibited. Treating a DV device as HDV (or vice versa) will
  12712. not work and result in undefined behavior.
  12713. The values <samp class="option">auto</samp>, <samp class="option">dv</samp> and <samp class="option">hdv</samp> are supported.
  12714. </p>
  12715. </dd>
  12716. <dt><samp class="option">dvbuffer</samp></dt>
  12717. <dd><p>Set maximum size of buffer for incoming data, in frames. For DV, this
  12718. is an exact value. For HDV, it is not frame exact, since HDV does
  12719. not have a fixed frame size.
  12720. </p>
  12721. </dd>
  12722. <dt><samp class="option">dvguid</samp></dt>
  12723. <dd><p>Select the capture device by specifying its GUID. Capturing will only
  12724. be performed from the specified device and fails if no device with the
  12725. given GUID is found. This is useful to select the input if multiple
  12726. devices are connected at the same time.
  12727. Look at /sys/bus/firewire/devices to find out the GUIDs.
  12728. </p>
  12729. </dd>
  12730. </dl>
  12731. </div>
  12732. <div class="subsection-level-extent" id="Examples-11">
  12733. <h4 class="subsection"><span>20.9.2 Examples<a class="copiable-link" href="#Examples-11"> &para;</a></span></h4>
  12734. <ul class="itemize mark-bullet">
  12735. <li>Grab and show the input of a FireWire DV/HDV device.
  12736. <div class="example">
  12737. <pre class="example-preformatted">ffplay -f iec61883 -i auto
  12738. </pre></div>
  12739. </li><li>Grab and record the input of a FireWire DV/HDV device,
  12740. using a packet buffer of 100000 packets if the source is HDV.
  12741. <div class="example">
  12742. <pre class="example-preformatted">ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
  12743. </pre></div>
  12744. </li></ul>
  12745. </div>
  12746. </div>
  12747. <div class="section-level-extent" id="jack">
  12748. <h3 class="section"><span>20.10 jack<a class="copiable-link" href="#jack"> &para;</a></span></h3>
  12749. <p>JACK input device.
  12750. </p>
  12751. <p>To enable this input device during configuration you need libjack
  12752. installed on your system.
  12753. </p>
  12754. <p>A JACK input device creates one or more JACK writable clients, one for
  12755. each audio channel, with name <var class="var">client_name</var>:input_<var class="var">N</var>, where
  12756. <var class="var">client_name</var> is the name provided by the application, and <var class="var">N</var>
  12757. is a number which identifies the channel.
  12758. Each writable client will send the acquired data to the FFmpeg input
  12759. device.
  12760. </p>
  12761. <p>Once you have created one or more JACK readable clients, you need to
  12762. connect them to one or more JACK writable clients.
  12763. </p>
  12764. <p>To connect or disconnect JACK clients you can use the <code class="command">jack_connect</code>
  12765. and <code class="command">jack_disconnect</code> programs, or do it through a graphical interface,
  12766. for example with <code class="command">qjackctl</code>.
  12767. </p>
  12768. <p>To list the JACK clients and their properties you can invoke the command
  12769. <code class="command">jack_lsp</code>.
  12770. </p>
  12771. <p>Follows an example which shows how to capture a JACK readable client
  12772. with <code class="command">ffmpeg</code>.
  12773. </p><div class="example">
  12774. <pre class="example-preformatted"># Create a JACK writable client with name &quot;ffmpeg&quot;.
  12775. $ ffmpeg -f jack -i ffmpeg -y out.wav
  12776. # Start the sample jack_metro readable client.
  12777. $ jack_metro -b 120 -d 0.2 -f 4000
  12778. # List the current JACK clients.
  12779. $ jack_lsp -c
  12780. system:capture_1
  12781. system:capture_2
  12782. system:playback_1
  12783. system:playback_2
  12784. ffmpeg:input_1
  12785. metro:120_bpm
  12786. # Connect metro to the ffmpeg writable client.
  12787. $ jack_connect metro:120_bpm ffmpeg:input_1
  12788. </pre></div>
  12789. <p>For more information read:
  12790. <a class="url" href="http://jackaudio.org/">http://jackaudio.org/</a>
  12791. </p>
  12792. <ul class="mini-toc">
  12793. <li><a href="#Options-25" accesskey="1">Options</a></li>
  12794. </ul>
  12795. <div class="subsection-level-extent" id="Options-25">
  12796. <h4 class="subsection"><span>20.10.1 Options<a class="copiable-link" href="#Options-25"> &para;</a></span></h4>
  12797. <dl class="table">
  12798. <dt><samp class="option">channels</samp></dt>
  12799. <dd><p>Set the number of channels. Default is 2.
  12800. </p>
  12801. </dd>
  12802. </dl>
  12803. </div>
  12804. </div>
  12805. <div class="section-level-extent" id="kmsgrab">
  12806. <h3 class="section"><span>20.11 kmsgrab<a class="copiable-link" href="#kmsgrab"> &para;</a></span></h3>
  12807. <p>KMS video input device.
  12808. </p>
  12809. <p>Captures the KMS scanout framebuffer associated with a specified CRTC or plane as a
  12810. DRM object that can be passed to other hardware functions.
  12811. </p>
  12812. <p>Requires either DRM master or CAP_SYS_ADMIN to run.
  12813. </p>
  12814. <p>If you don&rsquo;t understand what all of that means, you probably don&rsquo;t want this. Look at
  12815. <samp class="option">x11grab</samp> instead.
  12816. </p>
  12817. <ul class="mini-toc">
  12818. <li><a href="#Options-26" accesskey="1">Options</a></li>
  12819. <li><a href="#Examples-12" accesskey="2">Examples</a></li>
  12820. </ul>
  12821. <div class="subsection-level-extent" id="Options-26">
  12822. <h4 class="subsection"><span>20.11.1 Options<a class="copiable-link" href="#Options-26"> &para;</a></span></h4>
  12823. <dl class="table">
  12824. <dt><samp class="option">device</samp></dt>
  12825. <dd><p>DRM device to capture on. Defaults to <samp class="option">/dev/dri/card0</samp>.
  12826. </p>
  12827. </dd>
  12828. <dt><samp class="option">format</samp></dt>
  12829. <dd><p>Pixel format of the framebuffer. This can be autodetected if you are running Linux 5.7
  12830. or later, but needs to be provided for earlier versions. Defaults to <samp class="option">bgr0</samp>,
  12831. which is the most common format used by the Linux console and Xorg X server.
  12832. </p>
  12833. </dd>
  12834. <dt><samp class="option">format_modifier</samp></dt>
  12835. <dd><p>Format modifier to signal on output frames. This is necessary to import correctly into
  12836. some APIs. It can be autodetected if you are running Linux 5.7 or later, but will need
  12837. to be provided explicitly when needed in earlier versions. See the libdrm documentation
  12838. for possible values.
  12839. </p>
  12840. </dd>
  12841. <dt><samp class="option">crtc_id</samp></dt>
  12842. <dd><p>KMS CRTC ID to define the capture source. The first active plane on the given CRTC
  12843. will be used.
  12844. </p>
  12845. </dd>
  12846. <dt><samp class="option">plane_id</samp></dt>
  12847. <dd><p>KMS plane ID to define the capture source. Defaults to the first active plane found if
  12848. neither <samp class="option">crtc_id</samp> nor <samp class="option">plane_id</samp> are specified.
  12849. </p>
  12850. </dd>
  12851. <dt><samp class="option">framerate</samp></dt>
  12852. <dd><p>Framerate to capture at. This is not synchronised to any page flipping or framebuffer
  12853. changes - it just defines the interval at which the framebuffer is sampled. Sampling
  12854. faster than the framebuffer update rate will generate independent frames with the same
  12855. content. Defaults to <code class="code">30</code>.
  12856. </p>
  12857. </dd>
  12858. </dl>
  12859. </div>
  12860. <div class="subsection-level-extent" id="Examples-12">
  12861. <h4 class="subsection"><span>20.11.2 Examples<a class="copiable-link" href="#Examples-12"> &para;</a></span></h4>
  12862. <ul class="itemize mark-bullet">
  12863. <li>Capture from the first active plane, download the result to normal frames and encode.
  12864. This will only work if the framebuffer is both linear and mappable - if not, the result
  12865. may be scrambled or fail to download.
  12866. <div class="example">
  12867. <pre class="example-preformatted">ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
  12868. </pre></div>
  12869. </li><li>Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and encode as H.264.
  12870. <div class="example">
  12871. <pre class="example-preformatted">ffmpeg -crtc_id 42 -framerate 60 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi output.mp4
  12872. </pre></div>
  12873. </li><li>To capture only part of a plane the output can be cropped - this can be used to capture
  12874. a single window, as long as it has a known absolute position and size. For example, to
  12875. capture and encode the middle quarter of a 1920x1080 plane:
  12876. <div class="example">
  12877. <pre class="example-preformatted">ffmpeg -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,crop=960:540:480:270,scale_vaapi=960:540:nv12' -c:v h264_vaapi output.mp4
  12878. </pre></div>
  12879. </li></ul>
  12880. </div>
  12881. </div>
  12882. <div class="section-level-extent" id="lavfi">
  12883. <h3 class="section"><span>20.12 lavfi<a class="copiable-link" href="#lavfi"> &para;</a></span></h3>
  12884. <p>Libavfilter input virtual device.
  12885. </p>
  12886. <p>This input device reads data from the open output pads of a libavfilter
  12887. filtergraph.
  12888. </p>
  12889. <p>For each filtergraph open output, the input device will create a
  12890. corresponding stream which is mapped to the generated output.
  12891. The filtergraph is specified through the option <samp class="option">graph</samp>.
  12892. </p>
  12893. <ul class="mini-toc">
  12894. <li><a href="#Options-27" accesskey="1">Options</a></li>
  12895. <li><a href="#Examples-13" accesskey="2">Examples</a></li>
  12896. </ul>
  12897. <div class="subsection-level-extent" id="Options-27">
  12898. <h4 class="subsection"><span>20.12.1 Options<a class="copiable-link" href="#Options-27"> &para;</a></span></h4>
  12899. <dl class="table">
  12900. <dt><samp class="option">graph</samp></dt>
  12901. <dd><p>Specify the filtergraph to use as input. Each video open output must be
  12902. labelled by a unique string of the form &quot;out<var class="var">N</var>&quot;, where <var class="var">N</var> is a
  12903. number starting from 0 corresponding to the mapped input stream
  12904. generated by the device.
  12905. The first unlabelled output is automatically assigned to the &quot;out0&quot;
  12906. label, but all the others need to be specified explicitly.
  12907. </p>
  12908. <p>The suffix &quot;+subcc&quot; can be appended to the output label to create an extra
  12909. stream with the closed captions packets attached to that output
  12910. (experimental; only for EIA-608 / CEA-708 for now).
  12911. The subcc streams are created after all the normal streams, in the order of
  12912. the corresponding stream.
  12913. For example, if there is &quot;out19+subcc&quot;, &quot;out7+subcc&quot; and up to &quot;out42&quot;, the
  12914. stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19.
  12915. </p>
  12916. <p>If not specified defaults to the filename specified for the input
  12917. device.
  12918. </p>
  12919. </dd>
  12920. <dt><samp class="option">graph_file</samp></dt>
  12921. <dd><p>Set the filename of the filtergraph to be read and sent to the other
  12922. filters. Syntax of the filtergraph is the same as the one specified by
  12923. the option <var class="var">graph</var>.
  12924. </p>
  12925. </dd>
  12926. <dt><samp class="option">dumpgraph</samp></dt>
  12927. <dd><p>Dump graph to stderr.
  12928. </p>
  12929. </dd>
  12930. </dl>
  12931. </div>
  12932. <div class="subsection-level-extent" id="Examples-13">
  12933. <h4 class="subsection"><span>20.12.2 Examples<a class="copiable-link" href="#Examples-13"> &para;</a></span></h4>
  12934. <ul class="itemize mark-bullet">
  12935. <li>Create a color video stream and play it back with <code class="command">ffplay</code>:
  12936. <div class="example">
  12937. <pre class="example-preformatted">ffplay -f lavfi -graph &quot;color=c=pink [out0]&quot; dummy
  12938. </pre></div>
  12939. </li><li>As the previous example, but use filename for specifying the graph
  12940. description, and omit the &quot;out0&quot; label:
  12941. <div class="example">
  12942. <pre class="example-preformatted">ffplay -f lavfi color=c=pink
  12943. </pre></div>
  12944. </li><li>Create three different video test filtered sources and play them:
  12945. <div class="example">
  12946. <pre class="example-preformatted">ffplay -f lavfi -graph &quot;testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]&quot; test3
  12947. </pre></div>
  12948. </li><li>Read an audio stream from a file using the amovie source and play it
  12949. back with <code class="command">ffplay</code>:
  12950. <div class="example">
  12951. <pre class="example-preformatted">ffplay -f lavfi &quot;amovie=test.wav&quot;
  12952. </pre></div>
  12953. </li><li>Read an audio stream and a video stream and play it back with
  12954. <code class="command">ffplay</code>:
  12955. <div class="example">
  12956. <pre class="example-preformatted">ffplay -f lavfi &quot;movie=test.avi[out0];amovie=test.wav[out1]&quot;
  12957. </pre></div>
  12958. </li><li>Dump decoded frames to images and closed captions to a file (experimental):
  12959. <div class="example">
  12960. <pre class="example-preformatted">ffmpeg -f lavfi -i &quot;movie=test.ts[out0+subcc]&quot; -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
  12961. </pre></div>
  12962. </li></ul>
  12963. </div>
  12964. </div>
  12965. <div class="section-level-extent" id="libcdio">
  12966. <h3 class="section"><span>20.13 libcdio<a class="copiable-link" href="#libcdio"> &para;</a></span></h3>
  12967. <p>Audio-CD input device based on libcdio.
  12968. </p>
  12969. <p>To enable this input device during configuration you need libcdio
  12970. installed on your system. It requires the configure option
  12971. <code class="code">--enable-libcdio</code>.
  12972. </p>
  12973. <p>This device allows playing and grabbing from an Audio-CD.
  12974. </p>
  12975. <p>For example to copy with <code class="command">ffmpeg</code> the entire Audio-CD in <samp class="file">/dev/sr0</samp>,
  12976. you may run the command:
  12977. </p><div class="example">
  12978. <pre class="example-preformatted">ffmpeg -f libcdio -i /dev/sr0 cd.wav
  12979. </pre></div>
  12980. <ul class="mini-toc">
  12981. <li><a href="#Options-28" accesskey="1">Options</a></li>
  12982. </ul>
  12983. <div class="subsection-level-extent" id="Options-28">
  12984. <h4 class="subsection"><span>20.13.1 Options<a class="copiable-link" href="#Options-28"> &para;</a></span></h4>
  12985. <dl class="table">
  12986. <dt><samp class="option">speed</samp></dt>
  12987. <dd><p>Set drive reading speed. Default value is 0.
  12988. </p>
  12989. <p>The speed is specified CD-ROM speed units. The speed is set through
  12990. the libcdio <code class="code">cdio_cddap_speed_set</code> function. On many CD-ROM
  12991. drives, specifying a value too large will result in using the fastest
  12992. speed.
  12993. </p>
  12994. </dd>
  12995. <dt><samp class="option">paranoia_mode</samp></dt>
  12996. <dd><p>Set paranoia recovery mode flags. It accepts one of the following values:
  12997. </p>
  12998. <dl class="table">
  12999. <dt>&lsquo;<samp class="samp">disable</samp>&rsquo;</dt>
  13000. <dt>&lsquo;<samp class="samp">verify</samp>&rsquo;</dt>
  13001. <dt>&lsquo;<samp class="samp">overlap</samp>&rsquo;</dt>
  13002. <dt>&lsquo;<samp class="samp">neverskip</samp>&rsquo;</dt>
  13003. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  13004. </dl>
  13005. <p>Default value is &lsquo;<samp class="samp">disable</samp>&rsquo;.
  13006. </p>
  13007. <p>For more information about the available recovery modes, consult the
  13008. paranoia project documentation.
  13009. </p></dd>
  13010. </dl>
  13011. </div>
  13012. </div>
  13013. <div class="section-level-extent" id="libdc1394">
  13014. <h3 class="section"><span>20.14 libdc1394<a class="copiable-link" href="#libdc1394"> &para;</a></span></h3>
  13015. <p>IIDC1394 input device, based on libdc1394 and libraw1394.
  13016. </p>
  13017. <p>Requires the configure option <code class="code">--enable-libdc1394</code>.
  13018. </p>
  13019. <ul class="mini-toc">
  13020. <li><a href="#Options-29" accesskey="1">Options</a></li>
  13021. </ul>
  13022. <div class="subsection-level-extent" id="Options-29">
  13023. <h4 class="subsection"><span>20.14.1 Options<a class="copiable-link" href="#Options-29"> &para;</a></span></h4>
  13024. <dl class="table">
  13025. <dt><samp class="option">framerate</samp></dt>
  13026. <dd><p>Set the frame rate. Default is <code class="code">ntsc</code>, corresponding to a frame
  13027. rate of <code class="code">30000/1001</code>.
  13028. </p>
  13029. </dd>
  13030. <dt><samp class="option">pixel_format</samp></dt>
  13031. <dd><p>Select the pixel format. Default is <code class="code">uyvy422</code>.
  13032. </p>
  13033. </dd>
  13034. <dt><samp class="option">video_size</samp></dt>
  13035. <dd><p>Set the video size given as a string such as <code class="code">640x480</code> or <code class="code">hd720</code>.
  13036. Default is <code class="code">qvga</code>.
  13037. </p></dd>
  13038. </dl>
  13039. </div>
  13040. </div>
  13041. <div class="section-level-extent" id="openal">
  13042. <h3 class="section"><span>20.15 openal<a class="copiable-link" href="#openal"> &para;</a></span></h3>
  13043. <p>The OpenAL input device provides audio capture on all systems with a
  13044. working OpenAL 1.1 implementation.
  13045. </p>
  13046. <p>To enable this input device during configuration, you need OpenAL
  13047. headers and libraries installed on your system, and need to configure
  13048. FFmpeg with <code class="code">--enable-openal</code>.
  13049. </p>
  13050. <p>OpenAL headers and libraries should be provided as part of your OpenAL
  13051. implementation, or as an additional download (an SDK). Depending on your
  13052. installation you may need to specify additional flags via the
  13053. <code class="code">--extra-cflags</code> and <code class="code">--extra-ldflags</code> for allowing the build
  13054. system to locate the OpenAL headers and libraries.
  13055. </p>
  13056. <p>An incomplete list of OpenAL implementations follows:
  13057. </p>
  13058. <dl class="table">
  13059. <dt><strong class="strong">Creative</strong></dt>
  13060. <dd><p>The official Windows implementation, providing hardware acceleration
  13061. with supported devices and software fallback.
  13062. See <a class="url" href="http://openal.org/">http://openal.org/</a>.
  13063. </p></dd>
  13064. <dt><strong class="strong">OpenAL Soft</strong></dt>
  13065. <dd><p>Portable, open source (LGPL) software implementation. Includes
  13066. backends for the most common sound APIs on the Windows, Linux,
  13067. Solaris, and BSD operating systems.
  13068. See <a class="url" href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
  13069. </p></dd>
  13070. <dt><strong class="strong">Apple</strong></dt>
  13071. <dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
  13072. See <a class="url" href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
  13073. </p></dd>
  13074. </dl>
  13075. <p>This device allows one to capture from an audio input device handled
  13076. through OpenAL.
  13077. </p>
  13078. <p>You need to specify the name of the device to capture in the provided
  13079. filename. If the empty string is provided, the device will
  13080. automatically select the default device. You can get the list of the
  13081. supported devices by using the option <var class="var">list_devices</var>.
  13082. </p>
  13083. <ul class="mini-toc">
  13084. <li><a href="#Options-30" accesskey="1">Options</a></li>
  13085. <li><a href="#Examples-14" accesskey="2">Examples</a></li>
  13086. </ul>
  13087. <div class="subsection-level-extent" id="Options-30">
  13088. <h4 class="subsection"><span>20.15.1 Options<a class="copiable-link" href="#Options-30"> &para;</a></span></h4>
  13089. <dl class="table">
  13090. <dt><samp class="option">channels</samp></dt>
  13091. <dd><p>Set the number of channels in the captured audio. Only the values
  13092. <samp class="option">1</samp> (monaural) and <samp class="option">2</samp> (stereo) are currently supported.
  13093. Defaults to <samp class="option">2</samp>.
  13094. </p>
  13095. </dd>
  13096. <dt><samp class="option">sample_size</samp></dt>
  13097. <dd><p>Set the sample size (in bits) of the captured audio. Only the values
  13098. <samp class="option">8</samp> and <samp class="option">16</samp> are currently supported. Defaults to
  13099. <samp class="option">16</samp>.
  13100. </p>
  13101. </dd>
  13102. <dt><samp class="option">sample_rate</samp></dt>
  13103. <dd><p>Set the sample rate (in Hz) of the captured audio.
  13104. Defaults to <samp class="option">44.1k</samp>.
  13105. </p>
  13106. </dd>
  13107. <dt><samp class="option">list_devices</samp></dt>
  13108. <dd><p>If set to <samp class="option">true</samp>, print a list of devices and exit.
  13109. Defaults to <samp class="option">false</samp>.
  13110. </p>
  13111. </dd>
  13112. </dl>
  13113. </div>
  13114. <div class="subsection-level-extent" id="Examples-14">
  13115. <h4 class="subsection"><span>20.15.2 Examples<a class="copiable-link" href="#Examples-14"> &para;</a></span></h4>
  13116. <p>Print the list of OpenAL supported devices and exit:
  13117. </p><div class="example">
  13118. <pre class="example-preformatted">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
  13119. </pre></div>
  13120. <p>Capture from the OpenAL device <samp class="file">DR-BT101 via PulseAudio</samp>:
  13121. </p><div class="example">
  13122. <pre class="example-preformatted">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
  13123. </pre></div>
  13124. <p>Capture from the default device (note the empty string &rdquo; as filename):
  13125. </p><div class="example">
  13126. <pre class="example-preformatted">$ ffmpeg -f openal -i '' out.ogg
  13127. </pre></div>
  13128. <p>Capture from two devices simultaneously, writing to two different files,
  13129. within the same <code class="command">ffmpeg</code> command:
  13130. </p><div class="example">
  13131. <pre class="example-preformatted">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
  13132. </pre></div>
  13133. <p>Note: not all OpenAL implementations support multiple simultaneous capture -
  13134. try the latest OpenAL Soft if the above does not work.
  13135. </p>
  13136. </div>
  13137. </div>
  13138. <div class="section-level-extent" id="oss">
  13139. <h3 class="section"><span>20.16 oss<a class="copiable-link" href="#oss"> &para;</a></span></h3>
  13140. <p>Open Sound System input device.
  13141. </p>
  13142. <p>The filename to provide to the input device is the device node
  13143. representing the OSS input device, and is usually set to
  13144. <samp class="file">/dev/dsp</samp>.
  13145. </p>
  13146. <p>For example to grab from <samp class="file">/dev/dsp</samp> using <code class="command">ffmpeg</code> use the
  13147. command:
  13148. </p><div class="example">
  13149. <pre class="example-preformatted">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
  13150. </pre></div>
  13151. <p>For more information about OSS see:
  13152. <a class="url" href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
  13153. </p>
  13154. <ul class="mini-toc">
  13155. <li><a href="#Options-31" accesskey="1">Options</a></li>
  13156. </ul>
  13157. <div class="subsection-level-extent" id="Options-31">
  13158. <h4 class="subsection"><span>20.16.1 Options<a class="copiable-link" href="#Options-31"> &para;</a></span></h4>
  13159. <dl class="table">
  13160. <dt><samp class="option">sample_rate</samp></dt>
  13161. <dd><p>Set the sample rate in Hz. Default is 48000.
  13162. </p>
  13163. </dd>
  13164. <dt><samp class="option">channels</samp></dt>
  13165. <dd><p>Set the number of channels. Default is 2.
  13166. </p>
  13167. </dd>
  13168. </dl>
  13169. </div>
  13170. </div>
  13171. <div class="section-level-extent" id="pulse">
  13172. <h3 class="section"><span>20.17 pulse<a class="copiable-link" href="#pulse"> &para;</a></span></h3>
  13173. <p>PulseAudio input device.
  13174. </p>
  13175. <p>To enable this output device you need to configure FFmpeg with <code class="code">--enable-libpulse</code>.
  13176. </p>
  13177. <p>The filename to provide to the input device is a source device or the
  13178. string &quot;default&quot;
  13179. </p>
  13180. <p>To list the PulseAudio source devices and their properties you can invoke
  13181. the command <code class="command">pactl list sources</code>.
  13182. </p>
  13183. <p>More information about PulseAudio can be found on <a class="url" href="http://www.pulseaudio.org">http://www.pulseaudio.org</a>.
  13184. </p>
  13185. <ul class="mini-toc">
  13186. <li><a href="#Options-32" accesskey="1">Options</a></li>
  13187. <li><a href="#Examples-15" accesskey="2">Examples</a></li>
  13188. </ul>
  13189. <div class="subsection-level-extent" id="Options-32">
  13190. <h4 class="subsection"><span>20.17.1 Options<a class="copiable-link" href="#Options-32"> &para;</a></span></h4>
  13191. <dl class="table">
  13192. <dt><samp class="option">server</samp></dt>
  13193. <dd><p>Connect to a specific PulseAudio server, specified by an IP address.
  13194. Default server is used when not provided.
  13195. </p>
  13196. </dd>
  13197. <dt><samp class="option">name</samp></dt>
  13198. <dd><p>Specify the application name PulseAudio will use when showing active clients,
  13199. by default it is the <code class="code">LIBAVFORMAT_IDENT</code> string.
  13200. </p>
  13201. </dd>
  13202. <dt><samp class="option">stream_name</samp></dt>
  13203. <dd><p>Specify the stream name PulseAudio will use when showing active streams,
  13204. by default it is &quot;record&quot;.
  13205. </p>
  13206. </dd>
  13207. <dt><samp class="option">sample_rate</samp></dt>
  13208. <dd><p>Specify the samplerate in Hz, by default 48kHz is used.
  13209. </p>
  13210. </dd>
  13211. <dt><samp class="option">channels</samp></dt>
  13212. <dd><p>Specify the channels in use, by default 2 (stereo) is set.
  13213. </p>
  13214. </dd>
  13215. <dt><samp class="option">frame_size</samp></dt>
  13216. <dd><p>This option does nothing and is deprecated.
  13217. </p>
  13218. </dd>
  13219. <dt><samp class="option">fragment_size</samp></dt>
  13220. <dd><p>Specify the size in bytes of the minimal buffering fragment in PulseAudio, it
  13221. will affect the audio latency. By default it is set to 50 ms amount of data.
  13222. </p>
  13223. </dd>
  13224. <dt><samp class="option">wallclock</samp></dt>
  13225. <dd><p>Set the initial PTS using the current time. Default is 1.
  13226. </p>
  13227. </dd>
  13228. </dl>
  13229. </div>
  13230. <div class="subsection-level-extent" id="Examples-15">
  13231. <h4 class="subsection"><span>20.17.2 Examples<a class="copiable-link" href="#Examples-15"> &para;</a></span></h4>
  13232. <p>Record a stream from default device:
  13233. </p><div class="example">
  13234. <pre class="example-preformatted">ffmpeg -f pulse -i default /tmp/pulse.wav
  13235. </pre></div>
  13236. </div>
  13237. </div>
  13238. <div class="section-level-extent" id="sndio">
  13239. <h3 class="section"><span>20.18 sndio<a class="copiable-link" href="#sndio"> &para;</a></span></h3>
  13240. <p>sndio input device.
  13241. </p>
  13242. <p>To enable this input device during configuration you need libsndio
  13243. installed on your system.
  13244. </p>
  13245. <p>The filename to provide to the input device is the device node
  13246. representing the sndio input device, and is usually set to
  13247. <samp class="file">/dev/audio0</samp>.
  13248. </p>
  13249. <p>For example to grab from <samp class="file">/dev/audio0</samp> using <code class="command">ffmpeg</code> use the
  13250. command:
  13251. </p><div class="example">
  13252. <pre class="example-preformatted">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
  13253. </pre></div>
  13254. <ul class="mini-toc">
  13255. <li><a href="#Options-33" accesskey="1">Options</a></li>
  13256. </ul>
  13257. <div class="subsection-level-extent" id="Options-33">
  13258. <h4 class="subsection"><span>20.18.1 Options<a class="copiable-link" href="#Options-33"> &para;</a></span></h4>
  13259. <dl class="table">
  13260. <dt><samp class="option">sample_rate</samp></dt>
  13261. <dd><p>Set the sample rate in Hz. Default is 48000.
  13262. </p>
  13263. </dd>
  13264. <dt><samp class="option">channels</samp></dt>
  13265. <dd><p>Set the number of channels. Default is 2.
  13266. </p>
  13267. </dd>
  13268. </dl>
  13269. </div>
  13270. </div>
  13271. <div class="section-level-extent" id="video4linux2_002c-v4l2">
  13272. <h3 class="section"><span>20.19 video4linux2, v4l2<a class="copiable-link" href="#video4linux2_002c-v4l2"> &para;</a></span></h3>
  13273. <p>Video4Linux2 input video device.
  13274. </p>
  13275. <p>&quot;v4l2&quot; can be used as alias for &quot;video4linux2&quot;.
  13276. </p>
  13277. <p>If FFmpeg is built with v4l-utils support (by using the
  13278. <code class="code">--enable-libv4l2</code> configure option), it is possible to use it with the
  13279. <code class="code">-use_libv4l2</code> input device option.
  13280. </p>
  13281. <p>The name of the device to grab is a file device node, usually Linux
  13282. systems tend to automatically create such nodes when the device
  13283. (e.g. an USB webcam) is plugged into the system, and has a name of the
  13284. kind <samp class="file">/dev/video<var class="var">N</var></samp>, where <var class="var">N</var> is a number associated to
  13285. the device.
  13286. </p>
  13287. <p>Video4Linux2 devices usually support a limited set of
  13288. <var class="var">width</var>x<var class="var">height</var> sizes and frame rates. You can check which are
  13289. supported using <code class="command">-list_formats all</code> for Video4Linux2 devices.
  13290. Some devices, like TV cards, support one or more standards. It is possible
  13291. to list all the supported standards using <code class="command">-list_standards all</code>.
  13292. </p>
  13293. <p>The time base for the timestamps is 1 microsecond. Depending on the kernel
  13294. version and configuration, the timestamps may be derived from the real time
  13295. clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
  13296. boot time, unaffected by NTP or manual changes to the clock). The
  13297. <samp class="option">-timestamps abs</samp> or <samp class="option">-ts abs</samp> option can be used to force
  13298. conversion into the real time clock.
  13299. </p>
  13300. <p>Some usage examples of the video4linux2 device with <code class="command">ffmpeg</code>
  13301. and <code class="command">ffplay</code>:
  13302. </p><ul class="itemize mark-bullet">
  13303. <li>List supported formats for a video4linux2 device:
  13304. <div class="example">
  13305. <pre class="example-preformatted">ffplay -f video4linux2 -list_formats all /dev/video0
  13306. </pre></div>
  13307. </li><li>Grab and show the input of a video4linux2 device:
  13308. <div class="example">
  13309. <pre class="example-preformatted">ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
  13310. </pre></div>
  13311. </li><li>Grab and record the input of a video4linux2 device, leave the
  13312. frame rate and size as previously set:
  13313. <div class="example">
  13314. <pre class="example-preformatted">ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
  13315. </pre></div>
  13316. </li></ul>
  13317. <p>For more information about Video4Linux, check <a class="url" href="http://linuxtv.org/">http://linuxtv.org/</a>.
  13318. </p>
  13319. <ul class="mini-toc">
  13320. <li><a href="#Options-34" accesskey="1">Options</a></li>
  13321. </ul>
  13322. <div class="subsection-level-extent" id="Options-34">
  13323. <h4 class="subsection"><span>20.19.1 Options<a class="copiable-link" href="#Options-34"> &para;</a></span></h4>
  13324. <dl class="table">
  13325. <dt><samp class="option">standard</samp></dt>
  13326. <dd><p>Set the standard. Must be the name of a supported standard. To get a
  13327. list of the supported standards, use the <samp class="option">list_standards</samp>
  13328. option.
  13329. </p>
  13330. </dd>
  13331. <dt><samp class="option">channel</samp></dt>
  13332. <dd><p>Set the input channel number. Default to -1, which means using the
  13333. previously selected channel.
  13334. </p>
  13335. </dd>
  13336. <dt><samp class="option">video_size</samp></dt>
  13337. <dd><p>Set the video frame size. The argument must be a string in the form
  13338. <var class="var">WIDTH</var>x<var class="var">HEIGHT</var> or a valid size abbreviation.
  13339. </p>
  13340. </dd>
  13341. <dt><samp class="option">pixel_format</samp></dt>
  13342. <dd><p>Select the pixel format (only valid for raw video input).
  13343. </p>
  13344. </dd>
  13345. <dt><samp class="option">input_format</samp></dt>
  13346. <dd><p>Set the preferred pixel format (for raw video) or a codec name.
  13347. This option allows one to select the input format, when several are
  13348. available.
  13349. </p>
  13350. </dd>
  13351. <dt><samp class="option">framerate</samp></dt>
  13352. <dd><p>Set the preferred video frame rate.
  13353. </p>
  13354. </dd>
  13355. <dt><samp class="option">list_formats</samp></dt>
  13356. <dd><p>List available formats (supported pixel formats, codecs, and frame
  13357. sizes) and exit.
  13358. </p>
  13359. <p>Available values are:
  13360. </p><dl class="table">
  13361. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  13362. <dd><p>Show all available (compressed and non-compressed) formats.
  13363. </p>
  13364. </dd>
  13365. <dt>&lsquo;<samp class="samp">raw</samp>&rsquo;</dt>
  13366. <dd><p>Show only raw video (non-compressed) formats.
  13367. </p>
  13368. </dd>
  13369. <dt>&lsquo;<samp class="samp">compressed</samp>&rsquo;</dt>
  13370. <dd><p>Show only compressed formats.
  13371. </p></dd>
  13372. </dl>
  13373. </dd>
  13374. <dt><samp class="option">list_standards</samp></dt>
  13375. <dd><p>List supported standards and exit.
  13376. </p>
  13377. <p>Available values are:
  13378. </p><dl class="table">
  13379. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  13380. <dd><p>Show all supported standards.
  13381. </p></dd>
  13382. </dl>
  13383. </dd>
  13384. <dt><samp class="option">timestamps, ts</samp></dt>
  13385. <dd><p>Set type of timestamps for grabbed frames.
  13386. </p>
  13387. <p>Available values are:
  13388. </p><dl class="table">
  13389. <dt>&lsquo;<samp class="samp">default</samp>&rsquo;</dt>
  13390. <dd><p>Use timestamps from the kernel.
  13391. </p>
  13392. </dd>
  13393. <dt>&lsquo;<samp class="samp">abs</samp>&rsquo;</dt>
  13394. <dd><p>Use absolute timestamps (wall clock).
  13395. </p>
  13396. </dd>
  13397. <dt>&lsquo;<samp class="samp">mono2abs</samp>&rsquo;</dt>
  13398. <dd><p>Force conversion from monotonic to absolute timestamps.
  13399. </p></dd>
  13400. </dl>
  13401. <p>Default value is <code class="code">default</code>.
  13402. </p>
  13403. </dd>
  13404. <dt><samp class="option">use_libv4l2</samp></dt>
  13405. <dd><p>Use libv4l2 (v4l-utils) conversion functions. Default is 0.
  13406. </p>
  13407. </dd>
  13408. </dl>
  13409. </div>
  13410. </div>
  13411. <div class="section-level-extent" id="vfwcap">
  13412. <h3 class="section"><span>20.20 vfwcap<a class="copiable-link" href="#vfwcap"> &para;</a></span></h3>
  13413. <p>VfW (Video for Windows) capture input device.
  13414. </p>
  13415. <p>The filename passed as input is the capture driver number, ranging from
  13416. 0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
  13417. other filename will be interpreted as device number 0.
  13418. </p>
  13419. <ul class="mini-toc">
  13420. <li><a href="#Options-35" accesskey="1">Options</a></li>
  13421. </ul>
  13422. <div class="subsection-level-extent" id="Options-35">
  13423. <h4 class="subsection"><span>20.20.1 Options<a class="copiable-link" href="#Options-35"> &para;</a></span></h4>
  13424. <dl class="table">
  13425. <dt><samp class="option">video_size</samp></dt>
  13426. <dd><p>Set the video frame size.
  13427. </p>
  13428. </dd>
  13429. <dt><samp class="option">framerate</samp></dt>
  13430. <dd><p>Set the grabbing frame rate. Default value is <code class="code">ntsc</code>,
  13431. corresponding to a frame rate of <code class="code">30000/1001</code>.
  13432. </p>
  13433. </dd>
  13434. </dl>
  13435. </div>
  13436. </div>
  13437. <div class="section-level-extent" id="x11grab">
  13438. <h3 class="section"><span>20.21 x11grab<a class="copiable-link" href="#x11grab"> &para;</a></span></h3>
  13439. <p>X11 video input device.
  13440. </p>
  13441. <p>To enable this input device during configuration you need libxcb
  13442. installed on your system. It will be automatically detected during
  13443. configuration.
  13444. </p>
  13445. <p>This device allows one to capture a region of an X11 display.
  13446. </p>
  13447. <p>The filename passed as input has the syntax:
  13448. </p><div class="example">
  13449. <pre class="example-preformatted">[<var class="var">hostname</var>]:<var class="var">display_number</var>.<var class="var">screen_number</var>[+<var class="var">x_offset</var>,<var class="var">y_offset</var>]
  13450. </pre></div>
  13451. <p><var class="var">hostname</var>:<var class="var">display_number</var>.<var class="var">screen_number</var> specifies the
  13452. X11 display name of the screen to grab from. <var class="var">hostname</var> can be
  13453. omitted, and defaults to &quot;localhost&quot;. The environment variable
  13454. <code class="env">DISPLAY</code> contains the default display name.
  13455. </p>
  13456. <p><var class="var">x_offset</var> and <var class="var">y_offset</var> specify the offsets of the grabbed
  13457. area with respect to the top-left border of the X11 screen. They
  13458. default to 0.
  13459. </p>
  13460. <p>Check the X11 documentation (e.g. <code class="command">man X</code>) for more detailed
  13461. information.
  13462. </p>
  13463. <p>Use the <code class="command">xdpyinfo</code> program for getting basic information about
  13464. the properties of your X11 display (e.g. grep for &quot;name&quot; or
  13465. &quot;dimensions&quot;).
  13466. </p>
  13467. <p>For example to grab from <samp class="file">:0.0</samp> using <code class="command">ffmpeg</code>:
  13468. </p><div class="example">
  13469. <pre class="example-preformatted">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
  13470. </pre></div>
  13471. <p>Grab at position <code class="code">10,20</code>:
  13472. </p><div class="example">
  13473. <pre class="example-preformatted">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  13474. </pre></div>
  13475. <ul class="mini-toc">
  13476. <li><a href="#Options-36" accesskey="1">Options</a></li>
  13477. </ul>
  13478. <div class="subsection-level-extent" id="Options-36">
  13479. <h4 class="subsection"><span>20.21.1 Options<a class="copiable-link" href="#Options-36"> &para;</a></span></h4>
  13480. <dl class="table">
  13481. <dt><samp class="option">select_region</samp></dt>
  13482. <dd><p>Specify whether to select the grabbing area graphically using the pointer.
  13483. A value of <code class="code">1</code> prompts the user to select the grabbing area graphically
  13484. by clicking and dragging. A single click with no dragging will select the
  13485. whole screen. A region with zero width or height will also select the whole
  13486. screen. This option overwrites the <var class="var">video_size</var>, <var class="var">grab_x</var>, and
  13487. <var class="var">grab_y</var> options. Default value is <code class="code">0</code>.
  13488. </p>
  13489. </dd>
  13490. <dt><samp class="option">draw_mouse</samp></dt>
  13491. <dd><p>Specify whether to draw the mouse pointer. A value of <code class="code">0</code> specifies
  13492. not to draw the pointer. Default value is <code class="code">1</code>.
  13493. </p>
  13494. </dd>
  13495. <dt><samp class="option">follow_mouse</samp></dt>
  13496. <dd><p>Make the grabbed area follow the mouse. The argument can be
  13497. <code class="code">centered</code> or a number of pixels <var class="var">PIXELS</var>.
  13498. </p>
  13499. <p>When it is specified with &quot;centered&quot;, the grabbing region follows the mouse
  13500. pointer and keeps the pointer at the center of region; otherwise, the region
  13501. follows only when the mouse pointer reaches within <var class="var">PIXELS</var> (greater than
  13502. zero) to the edge of region.
  13503. </p>
  13504. <p>For example:
  13505. </p><div class="example">
  13506. <pre class="example-preformatted">ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
  13507. </pre></div>
  13508. <p>To follow only when the mouse pointer reaches within 100 pixels to edge:
  13509. </p><div class="example">
  13510. <pre class="example-preformatted">ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
  13511. </pre></div>
  13512. </dd>
  13513. <dt><samp class="option">framerate</samp></dt>
  13514. <dd><p>Set the grabbing frame rate. Default value is <code class="code">ntsc</code>,
  13515. corresponding to a frame rate of <code class="code">30000/1001</code>.
  13516. </p>
  13517. </dd>
  13518. <dt><samp class="option">show_region</samp></dt>
  13519. <dd><p>Show grabbed region on screen.
  13520. </p>
  13521. <p>If <var class="var">show_region</var> is specified with <code class="code">1</code>, then the grabbing
  13522. region will be indicated on screen. With this option, it is easy to
  13523. know what is being grabbed if only a portion of the screen is grabbed.
  13524. </p>
  13525. </dd>
  13526. <dt><samp class="option">region_border</samp></dt>
  13527. <dd><p>Set the region border thickness if <samp class="option">-show_region 1</samp> is used.
  13528. Range is 1 to 128 and default is 3 (XCB-based x11grab only).
  13529. </p>
  13530. <p>For example:
  13531. </p><div class="example">
  13532. <pre class="example-preformatted">ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  13533. </pre></div>
  13534. <p>With <var class="var">follow_mouse</var>:
  13535. </p><div class="example">
  13536. <pre class="example-preformatted">ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
  13537. </pre></div>
  13538. </dd>
  13539. <dt><samp class="option">window_id</samp></dt>
  13540. <dd><p>Grab this window, instead of the whole screen. Default value is 0, which maps to
  13541. the whole screen (root window).
  13542. </p>
  13543. <p>The id of a window can be found using the <code class="command">xwininfo</code> program, possibly with options -tree and
  13544. -root.
  13545. </p>
  13546. <p>If the window is later enlarged, the new area is not recorded. Video ends when
  13547. the window is closed, unmapped (i.e., iconified) or shrunk beyond the video
  13548. size (which defaults to the initial window size).
  13549. </p>
  13550. <p>This option disables options <samp class="option">follow_mouse</samp> and <samp class="option">select_region</samp>.
  13551. </p>
  13552. </dd>
  13553. <dt><samp class="option">video_size</samp></dt>
  13554. <dd><p>Set the video frame size. Default is the full desktop or window.
  13555. </p>
  13556. </dd>
  13557. <dt><samp class="option">grab_x</samp></dt>
  13558. <dt><samp class="option">grab_y</samp></dt>
  13559. <dd><p>Set the grabbing region coordinates. They are expressed as offset from
  13560. the top left corner of the X11 window and correspond to the
  13561. <var class="var">x_offset</var> and <var class="var">y_offset</var> parameters in the device name. The
  13562. default value for both options is 0.
  13563. </p></dd>
  13564. </dl>
  13565. </div>
  13566. </div>
  13567. </div>
  13568. <div class="chapter-level-extent" id="Resampler-Options">
  13569. <h2 class="chapter"><span>21 Resampler Options<a class="copiable-link" href="#Resampler-Options"> &para;</a></span></h2>
  13570. <p>The audio resampler supports the following named options.
  13571. </p>
  13572. <p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the
  13573. FFmpeg tools, <var class="var">option</var>=<var class="var">value</var> for the aresample filter,
  13574. by setting the value explicitly in the
  13575. <code class="code">SwrContext</code> options or using the <samp class="file">libavutil/opt.h</samp> API for
  13576. programmatic use.
  13577. </p>
  13578. <dl class="table">
  13579. <dt><samp class="option">uchl, used_chlayout</samp></dt>
  13580. <dd><p>Set used input channel layout. Default is unset. This option is
  13581. only used for special remapping.
  13582. </p>
  13583. </dd>
  13584. <dt><samp class="option">isr, in_sample_rate</samp></dt>
  13585. <dd><p>Set the input sample rate. Default value is 0.
  13586. </p>
  13587. </dd>
  13588. <dt><samp class="option">osr, out_sample_rate</samp></dt>
  13589. <dd><p>Set the output sample rate. Default value is 0.
  13590. </p>
  13591. </dd>
  13592. <dt><samp class="option">isf, in_sample_fmt</samp></dt>
  13593. <dd><p>Specify the input sample format. It is set by default to <code class="code">none</code>.
  13594. </p>
  13595. </dd>
  13596. <dt><samp class="option">osf, out_sample_fmt</samp></dt>
  13597. <dd><p>Specify the output sample format. It is set by default to <code class="code">none</code>.
  13598. </p>
  13599. </dd>
  13600. <dt><samp class="option">tsf, internal_sample_fmt</samp></dt>
  13601. <dd><p>Set the internal sample format. Default value is <code class="code">none</code>.
  13602. This will automatically be chosen when it is not explicitly set.
  13603. </p>
  13604. </dd>
  13605. <dt><samp class="option">ichl, in_chlayout</samp></dt>
  13606. <dt><samp class="option">ochl, out_chlayout</samp></dt>
  13607. <dd><p>Set the input/output channel layout.
  13608. </p>
  13609. <p>See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#channel-layout-syntax">the Channel Layout section in the ffmpeg-utils(1) manual</a>
  13610. for the required syntax.
  13611. </p>
  13612. </dd>
  13613. <dt><samp class="option">clev, center_mix_level</samp></dt>
  13614. <dd><p>Set the center mix level. It is a value expressed in deciBel, and must be
  13615. in the interval [-32,32].
  13616. </p>
  13617. </dd>
  13618. <dt><samp class="option">slev, surround_mix_level</samp></dt>
  13619. <dd><p>Set the surround mix level. It is a value expressed in deciBel, and must
  13620. be in the interval [-32,32].
  13621. </p>
  13622. </dd>
  13623. <dt><samp class="option">lfe_mix_level</samp></dt>
  13624. <dd><p>Set LFE mix into non LFE level. It is used when there is a LFE input but no
  13625. LFE output. It is a value expressed in deciBel, and must
  13626. be in the interval [-32,32].
  13627. </p>
  13628. </dd>
  13629. <dt><samp class="option">rmvol, rematrix_volume</samp></dt>
  13630. <dd><p>Set rematrix volume. Default value is 1.0.
  13631. </p>
  13632. </dd>
  13633. <dt><samp class="option">rematrix_maxval</samp></dt>
  13634. <dd><p>Set maximum output value for rematrixing.
  13635. This can be used to prevent clipping vs. preventing volume reduction.
  13636. A value of 1.0 prevents clipping.
  13637. </p>
  13638. </dd>
  13639. <dt><samp class="option">flags, swr_flags</samp></dt>
  13640. <dd><p>Set flags used by the converter. Default value is 0.
  13641. </p>
  13642. <p>It supports the following individual flags:
  13643. </p><dl class="table">
  13644. <dt><samp class="option">res</samp></dt>
  13645. <dd><p>force resampling, this flag forces resampling to be used even when the
  13646. input and output sample rates match.
  13647. </p></dd>
  13648. </dl>
  13649. </dd>
  13650. <dt><samp class="option">dither_scale</samp></dt>
  13651. <dd><p>Set the dither scale. Default value is 1.
  13652. </p>
  13653. </dd>
  13654. <dt><samp class="option">dither_method</samp></dt>
  13655. <dd><p>Set dither method. Default value is 0.
  13656. </p>
  13657. <p>Supported values:
  13658. </p><dl class="table">
  13659. <dt>&lsquo;<samp class="samp">rectangular</samp>&rsquo;</dt>
  13660. <dd><p>select rectangular dither
  13661. </p></dd>
  13662. <dt>&lsquo;<samp class="samp">triangular</samp>&rsquo;</dt>
  13663. <dd><p>select triangular dither
  13664. </p></dd>
  13665. <dt>&lsquo;<samp class="samp">triangular_hp</samp>&rsquo;</dt>
  13666. <dd><p>select triangular dither with high pass
  13667. </p></dd>
  13668. <dt>&lsquo;<samp class="samp">lipshitz</samp>&rsquo;</dt>
  13669. <dd><p>select Lipshitz noise shaping dither.
  13670. </p></dd>
  13671. <dt>&lsquo;<samp class="samp">shibata</samp>&rsquo;</dt>
  13672. <dd><p>select Shibata noise shaping dither.
  13673. </p></dd>
  13674. <dt>&lsquo;<samp class="samp">low_shibata</samp>&rsquo;</dt>
  13675. <dd><p>select low Shibata noise shaping dither.
  13676. </p></dd>
  13677. <dt>&lsquo;<samp class="samp">high_shibata</samp>&rsquo;</dt>
  13678. <dd><p>select high Shibata noise shaping dither.
  13679. </p></dd>
  13680. <dt>&lsquo;<samp class="samp">f_weighted</samp>&rsquo;</dt>
  13681. <dd><p>select f-weighted noise shaping dither
  13682. </p></dd>
  13683. <dt>&lsquo;<samp class="samp">modified_e_weighted</samp>&rsquo;</dt>
  13684. <dd><p>select modified-e-weighted noise shaping dither
  13685. </p></dd>
  13686. <dt>&lsquo;<samp class="samp">improved_e_weighted</samp>&rsquo;</dt>
  13687. <dd><p>select improved-e-weighted noise shaping dither
  13688. </p>
  13689. </dd>
  13690. </dl>
  13691. </dd>
  13692. <dt><samp class="option">resampler</samp></dt>
  13693. <dd><p>Set resampling engine. Default value is swr.
  13694. </p>
  13695. <p>Supported values:
  13696. </p><dl class="table">
  13697. <dt>&lsquo;<samp class="samp">swr</samp>&rsquo;</dt>
  13698. <dd><p>select the native SW Resampler; filter options precision and cheby are not
  13699. applicable in this case.
  13700. </p></dd>
  13701. <dt>&lsquo;<samp class="samp">soxr</samp>&rsquo;</dt>
  13702. <dd><p>select the SoX Resampler (where available); compensation, and filter options
  13703. filter_size, phase_shift, exact_rational, filter_type &amp; kaiser_beta, are not
  13704. applicable in this case.
  13705. </p></dd>
  13706. </dl>
  13707. </dd>
  13708. <dt><samp class="option">filter_size</samp></dt>
  13709. <dd><p>For swr only, set resampling filter size, default value is 32.
  13710. </p>
  13711. </dd>
  13712. <dt><samp class="option">phase_shift</samp></dt>
  13713. <dd><p>For swr only, set resampling phase shift, default value is 10, and must be in
  13714. the interval [0,30].
  13715. </p>
  13716. </dd>
  13717. <dt><samp class="option">linear_interp</samp></dt>
  13718. <dd><p>Use linear interpolation when enabled (the default). Disable it if you want
  13719. to preserve speed instead of quality when exact_rational fails.
  13720. </p>
  13721. </dd>
  13722. <dt><samp class="option">exact_rational</samp></dt>
  13723. <dd><p>For swr only, when enabled, try to use exact phase_count based on input and
  13724. output sample rate. However, if it is larger than <code class="code">1 &lt;&lt; phase_shift</code>,
  13725. the phase_count will be <code class="code">1 &lt;&lt; phase_shift</code> as fallback. Default is enabled.
  13726. </p>
  13727. </dd>
  13728. <dt><samp class="option">cutoff</samp></dt>
  13729. <dd><p>Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
  13730. value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
  13731. (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
  13732. </p>
  13733. </dd>
  13734. <dt><samp class="option">precision</samp></dt>
  13735. <dd><p>For soxr only, the precision in bits to which the resampled signal will be
  13736. calculated. The default value of 20 (which, with suitable dithering, is
  13737. appropriate for a destination bit-depth of 16) gives SoX&rsquo;s &rsquo;High Quality&rsquo;; a
  13738. value of 28 gives SoX&rsquo;s &rsquo;Very High Quality&rsquo;.
  13739. </p>
  13740. </dd>
  13741. <dt><samp class="option">cheby</samp></dt>
  13742. <dd><p>For soxr only, selects passband rolloff none (Chebyshev) &amp; higher-precision
  13743. approximation for &rsquo;irrational&rsquo; ratios. Default value is 0.
  13744. </p>
  13745. </dd>
  13746. <dt><samp class="option">async</samp></dt>
  13747. <dd><p>For swr only, simple 1 parameter audio sync to timestamps using stretching,
  13748. squeezing, filling and trimming. Setting this to 1 will enable filling and
  13749. trimming, larger values represent the maximum amount in samples that the data
  13750. may be stretched or squeezed for each second.
  13751. Default value is 0, thus no compensation is applied to make the samples match
  13752. the audio timestamps.
  13753. </p>
  13754. </dd>
  13755. <dt><samp class="option">first_pts</samp></dt>
  13756. <dd><p>For swr only, assume the first pts should be this value. The time unit is 1 / sample rate.
  13757. This allows for padding/trimming at the start of stream. By default, no
  13758. assumption is made about the first frame&rsquo;s expected pts, so no padding or
  13759. trimming is done. For example, this could be set to 0 to pad the beginning with
  13760. silence if an audio stream starts after the video stream or to trim any samples
  13761. with a negative pts due to encoder delay.
  13762. </p>
  13763. </dd>
  13764. <dt><samp class="option">min_comp</samp></dt>
  13765. <dd><p>For swr only, set the minimum difference between timestamps and audio data (in
  13766. seconds) to trigger stretching/squeezing/filling or trimming of the
  13767. data to make it match the timestamps. The default is that
  13768. stretching/squeezing/filling and trimming is disabled
  13769. (<samp class="option">min_comp</samp> = <code class="code">FLT_MAX</code>).
  13770. </p>
  13771. </dd>
  13772. <dt><samp class="option">min_hard_comp</samp></dt>
  13773. <dd><p>For swr only, set the minimum difference between timestamps and audio data (in
  13774. seconds) to trigger adding/dropping samples to make it match the
  13775. timestamps. This option effectively is a threshold to select between
  13776. hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
  13777. all compensation is by default disabled through <samp class="option">min_comp</samp>.
  13778. The default is 0.1.
  13779. </p>
  13780. </dd>
  13781. <dt><samp class="option">comp_duration</samp></dt>
  13782. <dd><p>For swr only, set duration (in seconds) over which data is stretched/squeezed
  13783. to make it match the timestamps. Must be a non-negative double float value,
  13784. default value is 1.0.
  13785. </p>
  13786. </dd>
  13787. <dt><samp class="option">max_soft_comp</samp></dt>
  13788. <dd><p>For swr only, set maximum factor by which data is stretched/squeezed to make it
  13789. match the timestamps. Must be a non-negative double float value, default value
  13790. is 0.
  13791. </p>
  13792. </dd>
  13793. <dt><samp class="option">matrix_encoding</samp></dt>
  13794. <dd><p>Select matrixed stereo encoding.
  13795. </p>
  13796. <p>It accepts the following values:
  13797. </p><dl class="table">
  13798. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  13799. <dd><p>select none
  13800. </p></dd>
  13801. <dt>&lsquo;<samp class="samp">dolby</samp>&rsquo;</dt>
  13802. <dd><p>select Dolby
  13803. </p></dd>
  13804. <dt>&lsquo;<samp class="samp">dplii</samp>&rsquo;</dt>
  13805. <dd><p>select Dolby Pro Logic II
  13806. </p></dd>
  13807. </dl>
  13808. <p>Default value is <code class="code">none</code>.
  13809. </p>
  13810. </dd>
  13811. <dt><samp class="option">filter_type</samp></dt>
  13812. <dd><p>For swr only, select resampling filter type. This only affects resampling
  13813. operations.
  13814. </p>
  13815. <p>It accepts the following values:
  13816. </p><dl class="table">
  13817. <dt>&lsquo;<samp class="samp">cubic</samp>&rsquo;</dt>
  13818. <dd><p>select cubic
  13819. </p></dd>
  13820. <dt>&lsquo;<samp class="samp">blackman_nuttall</samp>&rsquo;</dt>
  13821. <dd><p>select Blackman Nuttall windowed sinc
  13822. </p></dd>
  13823. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  13824. <dd><p>select Kaiser windowed sinc
  13825. </p></dd>
  13826. </dl>
  13827. </dd>
  13828. <dt><samp class="option">kaiser_beta</samp></dt>
  13829. <dd><p>For swr only, set Kaiser window beta value. Must be a double float value in the
  13830. interval [2,16], default value is 9.
  13831. </p>
  13832. </dd>
  13833. <dt><samp class="option">output_sample_bits</samp></dt>
  13834. <dd><p>For swr only, set number of used output sample bits for dithering. Must be an integer in the
  13835. interval [0,64], default value is 0, which means it&rsquo;s not used.
  13836. </p>
  13837. </dd>
  13838. </dl>
  13839. <a class="anchor" id="scaler_005foptions"></a></div>
  13840. <div class="chapter-level-extent" id="Scaler-Options">
  13841. <h2 class="chapter"><span>22 Scaler Options<a class="copiable-link" href="#Scaler-Options"> &para;</a></span></h2>
  13842. <p>The video scaler supports the following named options.
  13843. </p>
  13844. <p>Options may be set by specifying -<var class="var">option</var> <var class="var">value</var> in the
  13845. FFmpeg tools, with a few API-only exceptions noted below.
  13846. For programmatic use, they can be set explicitly in the
  13847. <code class="code">SwsContext</code> options or through the <samp class="file">libavutil/opt.h</samp> API.
  13848. </p>
  13849. <dl class="table">
  13850. <dd>
  13851. <a class="anchor" id="sws_005fflags"></a></dd>
  13852. <dt><samp class="option">sws_flags</samp></dt>
  13853. <dd><p>Set the scaler flags. This is also used to set the scaling
  13854. algorithm. Only a single algorithm should be selected. Default
  13855. value is &lsquo;<samp class="samp">bicubic</samp>&rsquo;.
  13856. </p>
  13857. <p>It accepts the following values:
  13858. </p><dl class="table">
  13859. <dt>&lsquo;<samp class="samp">fast_bilinear</samp>&rsquo;</dt>
  13860. <dd><p>Select fast bilinear scaling algorithm.
  13861. </p>
  13862. </dd>
  13863. <dt>&lsquo;<samp class="samp">bilinear</samp>&rsquo;</dt>
  13864. <dd><p>Select bilinear scaling algorithm.
  13865. </p>
  13866. </dd>
  13867. <dt>&lsquo;<samp class="samp">bicubic</samp>&rsquo;</dt>
  13868. <dd><p>Select bicubic scaling algorithm.
  13869. </p>
  13870. </dd>
  13871. <dt>&lsquo;<samp class="samp">experimental</samp>&rsquo;</dt>
  13872. <dd><p>Select experimental scaling algorithm.
  13873. </p>
  13874. </dd>
  13875. <dt>&lsquo;<samp class="samp">neighbor</samp>&rsquo;</dt>
  13876. <dd><p>Select nearest neighbor rescaling algorithm.
  13877. </p>
  13878. </dd>
  13879. <dt>&lsquo;<samp class="samp">area</samp>&rsquo;</dt>
  13880. <dd><p>Select averaging area rescaling algorithm.
  13881. </p>
  13882. </dd>
  13883. <dt>&lsquo;<samp class="samp">bicublin</samp>&rsquo;</dt>
  13884. <dd><p>Select bicubic scaling algorithm for the luma component, bilinear for
  13885. chroma components.
  13886. </p>
  13887. </dd>
  13888. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  13889. <dd><p>Select Gaussian rescaling algorithm.
  13890. </p>
  13891. </dd>
  13892. <dt>&lsquo;<samp class="samp">sinc</samp>&rsquo;</dt>
  13893. <dd><p>Select sinc rescaling algorithm.
  13894. </p>
  13895. </dd>
  13896. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  13897. <dd><p>Select Lanczos rescaling algorithm. The default width (alpha) is 3 and can be
  13898. changed by setting <code class="code">param0</code>.
  13899. </p>
  13900. </dd>
  13901. <dt>&lsquo;<samp class="samp">spline</samp>&rsquo;</dt>
  13902. <dd><p>Select natural bicubic spline rescaling algorithm.
  13903. </p>
  13904. </dd>
  13905. <dt>&lsquo;<samp class="samp">print_info</samp>&rsquo;</dt>
  13906. <dd><p>Enable printing/debug logging.
  13907. </p>
  13908. </dd>
  13909. <dt>&lsquo;<samp class="samp">accurate_rnd</samp>&rsquo;</dt>
  13910. <dd><p>Enable accurate rounding.
  13911. </p>
  13912. </dd>
  13913. <dt>&lsquo;<samp class="samp">full_chroma_int</samp>&rsquo;</dt>
  13914. <dd><p>Enable full chroma interpolation.
  13915. </p>
  13916. </dd>
  13917. <dt>&lsquo;<samp class="samp">full_chroma_inp</samp>&rsquo;</dt>
  13918. <dd><p>Select full chroma input.
  13919. </p>
  13920. </dd>
  13921. <dt>&lsquo;<samp class="samp">bitexact</samp>&rsquo;</dt>
  13922. <dd><p>Enable bitexact output.
  13923. </p></dd>
  13924. </dl>
  13925. </dd>
  13926. <dt><samp class="option">srcw <var class="var">(API only)</var></samp></dt>
  13927. <dd><p>Set source width.
  13928. </p>
  13929. </dd>
  13930. <dt><samp class="option">srch <var class="var">(API only)</var></samp></dt>
  13931. <dd><p>Set source height.
  13932. </p>
  13933. </dd>
  13934. <dt><samp class="option">dstw <var class="var">(API only)</var></samp></dt>
  13935. <dd><p>Set destination width.
  13936. </p>
  13937. </dd>
  13938. <dt><samp class="option">dsth <var class="var">(API only)</var></samp></dt>
  13939. <dd><p>Set destination height.
  13940. </p>
  13941. </dd>
  13942. <dt><samp class="option">src_format <var class="var">(API only)</var></samp></dt>
  13943. <dd><p>Set source pixel format (must be expressed as an integer).
  13944. </p>
  13945. </dd>
  13946. <dt><samp class="option">dst_format <var class="var">(API only)</var></samp></dt>
  13947. <dd><p>Set destination pixel format (must be expressed as an integer).
  13948. </p>
  13949. </dd>
  13950. <dt><samp class="option">src_range <var class="var">(boolean)</var></samp></dt>
  13951. <dd><p>If value is set to <code class="code">1</code>, indicates source is full range. Default value is
  13952. <code class="code">0</code>, which indicates source is limited range.
  13953. </p>
  13954. </dd>
  13955. <dt><samp class="option">dst_range <var class="var">(boolean)</var></samp></dt>
  13956. <dd><p>If value is set to <code class="code">1</code>, enable full range for destination. Default value
  13957. is <code class="code">0</code>, which enables limited range.
  13958. </p>
  13959. <a class="anchor" id="sws_005fparams"></a></dd>
  13960. <dt><samp class="option">param0, param1</samp></dt>
  13961. <dd><p>Set scaling algorithm parameters. The specified values are specific of
  13962. some scaling algorithms and ignored by others. The specified values
  13963. are floating point number values.
  13964. </p>
  13965. </dd>
  13966. <dt><samp class="option">sws_dither</samp></dt>
  13967. <dd><p>Set the dithering algorithm. Accepts one of the following
  13968. values. Default value is &lsquo;<samp class="samp">auto</samp>&rsquo;.
  13969. </p>
  13970. <dl class="table">
  13971. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  13972. <dd><p>automatic choice
  13973. </p>
  13974. </dd>
  13975. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  13976. <dd><p>no dithering
  13977. </p>
  13978. </dd>
  13979. <dt>&lsquo;<samp class="samp">bayer</samp>&rsquo;</dt>
  13980. <dd><p>bayer dither
  13981. </p>
  13982. </dd>
  13983. <dt>&lsquo;<samp class="samp">ed</samp>&rsquo;</dt>
  13984. <dd><p>error diffusion dither
  13985. </p>
  13986. </dd>
  13987. <dt>&lsquo;<samp class="samp">a_dither</samp>&rsquo;</dt>
  13988. <dd><p>arithmetic dither, based using addition
  13989. </p>
  13990. </dd>
  13991. <dt>&lsquo;<samp class="samp">x_dither</samp>&rsquo;</dt>
  13992. <dd><p>arithmetic dither, based using xor (more random/less apparent patterning that
  13993. a_dither).
  13994. </p>
  13995. </dd>
  13996. </dl>
  13997. </dd>
  13998. <dt><samp class="option">alphablend</samp></dt>
  13999. <dd><p>Set the alpha blending to use when the input has alpha but the output does not.
  14000. Default value is &lsquo;<samp class="samp">none</samp>&rsquo;.
  14001. </p>
  14002. <dl class="table">
  14003. <dt>&lsquo;<samp class="samp">uniform_color</samp>&rsquo;</dt>
  14004. <dd><p>Blend onto a uniform background color
  14005. </p>
  14006. </dd>
  14007. <dt>&lsquo;<samp class="samp">checkerboard</samp>&rsquo;</dt>
  14008. <dd><p>Blend onto a checkerboard
  14009. </p>
  14010. </dd>
  14011. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  14012. <dd><p>No blending
  14013. </p>
  14014. </dd>
  14015. </dl>
  14016. </dd>
  14017. </dl>
  14018. </div>
  14019. <div class="chapter-level-extent" id="Filtering-Introduction">
  14020. <h2 class="chapter"><span>23 Filtering Introduction<a class="copiable-link" href="#Filtering-Introduction"> &para;</a></span></h2>
  14021. <p>Filtering in FFmpeg is enabled through the libavfilter library.
  14022. </p>
  14023. <p>In libavfilter, a filter can have multiple inputs and multiple
  14024. outputs.
  14025. To illustrate the sorts of things that are possible, we consider the
  14026. following filtergraph.
  14027. </p>
  14028. <pre class="verbatim"> [main]
  14029. input --&gt; split ---------------------&gt; overlay --&gt; output
  14030. | ^
  14031. |[tmp] [flip]|
  14032. +-----&gt; crop --&gt; vflip -------+
  14033. </pre>
  14034. <p>This filtergraph splits the input stream in two streams, then sends one
  14035. stream through the crop filter and the vflip filter, before merging it
  14036. back with the other stream by overlaying it on top. You can use the
  14037. following command to achieve this:
  14038. </p>
  14039. <div class="example">
  14040. <pre class="example-preformatted">ffmpeg -i INPUT -vf &quot;split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2&quot; OUTPUT
  14041. </pre></div>
  14042. <p>The result will be that the top half of the video is mirrored
  14043. onto the bottom half of the output video.
  14044. </p>
  14045. <p>Filters in the same linear chain are separated by commas, and distinct
  14046. linear chains of filters are separated by semicolons. In our example,
  14047. <var class="var">crop,vflip</var> are in one linear chain, <var class="var">split</var> and
  14048. <var class="var">overlay</var> are separately in another. The points where the linear
  14049. chains join are labelled by names enclosed in square brackets. In the
  14050. example, the split filter generates two outputs that are associated to
  14051. the labels <var class="var">[main]</var> and <var class="var">[tmp]</var>.
  14052. </p>
  14053. <p>The stream sent to the second output of <var class="var">split</var>, labelled as
  14054. <var class="var">[tmp]</var>, is processed through the <var class="var">crop</var> filter, which crops
  14055. away the lower half part of the video, and then vertically flipped. The
  14056. <var class="var">overlay</var> filter takes in input the first unchanged output of the
  14057. split filter (which was labelled as <var class="var">[main]</var>), and overlay on its
  14058. lower half the output generated by the <var class="var">crop,vflip</var> filterchain.
  14059. </p>
  14060. <p>Some filters take in input a list of parameters: they are specified
  14061. after the filter name and an equal sign, and are separated from each other
  14062. by a colon.
  14063. </p>
  14064. <p>There exist so-called <var class="var">source filters</var> that do not have an
  14065. audio/video input, and <var class="var">sink filters</var> that will not have audio/video
  14066. output.
  14067. </p>
  14068. </div>
  14069. <div class="chapter-level-extent" id="graph2dot">
  14070. <h2 class="chapter"><span>24 graph2dot<a class="copiable-link" href="#graph2dot"> &para;</a></span></h2>
  14071. <p>The <samp class="file">graph2dot</samp> program included in the FFmpeg <samp class="file">tools</samp>
  14072. directory can be used to parse a filtergraph description and issue a
  14073. corresponding textual representation in the dot language.
  14074. </p>
  14075. <p>Invoke the command:
  14076. </p><div class="example">
  14077. <pre class="example-preformatted">graph2dot -h
  14078. </pre></div>
  14079. <p>to see how to use <samp class="file">graph2dot</samp>.
  14080. </p>
  14081. <p>You can then pass the dot description to the <samp class="file">dot</samp> program (from
  14082. the graphviz suite of programs) and obtain a graphical representation
  14083. of the filtergraph.
  14084. </p>
  14085. <p>For example the sequence of commands:
  14086. </p><div class="example">
  14087. <pre class="example-preformatted">echo <var class="var">GRAPH_DESCRIPTION</var> | \
  14088. tools/graph2dot -o graph.tmp &amp;&amp; \
  14089. dot -Tpng graph.tmp -o graph.png &amp;&amp; \
  14090. display graph.png
  14091. </pre></div>
  14092. <p>can be used to create and display an image representing the graph
  14093. described by the <var class="var">GRAPH_DESCRIPTION</var> string. Note that this string must be
  14094. a complete self-contained graph, with its inputs and outputs explicitly defined.
  14095. For example if your command line is of the form:
  14096. </p><div class="example">
  14097. <pre class="example-preformatted">ffmpeg -i infile -vf scale=640:360 outfile
  14098. </pre></div>
  14099. <p>your <var class="var">GRAPH_DESCRIPTION</var> string will need to be of the form:
  14100. </p><div class="example">
  14101. <pre class="example-preformatted">nullsrc,scale=640:360,nullsink
  14102. </pre></div>
  14103. <p>you may also need to set the <var class="var">nullsrc</var> parameters and add a <var class="var">format</var>
  14104. filter in order to simulate a specific input file.
  14105. </p>
  14106. </div>
  14107. <div class="chapter-level-extent" id="Filtergraph-description">
  14108. <h2 class="chapter"><span>25 Filtergraph description<a class="copiable-link" href="#Filtergraph-description"> &para;</a></span></h2>
  14109. <p>A filtergraph is a directed graph of connected filters. It can contain
  14110. cycles, and there can be multiple links between a pair of
  14111. filters. Each link has one input pad on one side connecting it to one
  14112. filter from which it takes its input, and one output pad on the other
  14113. side connecting it to one filter accepting its output.
  14114. </p>
  14115. <p>Each filter in a filtergraph is an instance of a filter class
  14116. registered in the application, which defines the features and the
  14117. number of input and output pads of the filter.
  14118. </p>
  14119. <p>A filter with no input pads is called a &quot;source&quot;, and a filter with no
  14120. output pads is called a &quot;sink&quot;.
  14121. </p>
  14122. <a class="anchor" id="Filtergraph-syntax"></a><ul class="mini-toc">
  14123. <li><a href="#Filtergraph-syntax-1" accesskey="1">Filtergraph syntax</a></li>
  14124. <li><a href="#Notes-on-filtergraph-escaping" accesskey="2">Notes on filtergraph escaping</a></li>
  14125. </ul>
  14126. <div class="section-level-extent" id="Filtergraph-syntax-1">
  14127. <h3 class="section"><span>25.1 Filtergraph syntax<a class="copiable-link" href="#Filtergraph-syntax-1"> &para;</a></span></h3>
  14128. <p>A filtergraph has a textual representation, which is recognized by the
  14129. <samp class="option">-filter</samp>/<samp class="option">-vf</samp>/<samp class="option">-af</samp> and
  14130. <samp class="option">-filter_complex</samp> options in <code class="command">ffmpeg</code> and
  14131. <samp class="option">-vf</samp>/<samp class="option">-af</samp> in <code class="command">ffplay</code>, and by the
  14132. <code class="code">avfilter_graph_parse_ptr()</code> function defined in
  14133. <samp class="file">libavfilter/avfilter.h</samp>.
  14134. </p>
  14135. <p>A filterchain consists of a sequence of connected filters, each one
  14136. connected to the previous one in the sequence. A filterchain is
  14137. represented by a list of &quot;,&quot;-separated filter descriptions.
  14138. </p>
  14139. <p>A filtergraph consists of a sequence of filterchains. A sequence of
  14140. filterchains is represented by a list of &quot;;&quot;-separated filterchain
  14141. descriptions.
  14142. </p>
  14143. <p>A filter is represented by a string of the form:
  14144. [<var class="var">in_link_1</var>]...[<var class="var">in_link_N</var>]<var class="var">filter_name</var>@<var class="var">id</var>=<var class="var">arguments</var>[<var class="var">out_link_1</var>]...[<var class="var">out_link_M</var>]
  14145. </p>
  14146. <p><var class="var">filter_name</var> is the name of the filter class of which the
  14147. described filter is an instance of, and has to be the name of one of
  14148. the filter classes registered in the program optionally followed by &quot;@<var class="var">id</var>&quot;.
  14149. The name of the filter class is optionally followed by a string
  14150. &quot;=<var class="var">arguments</var>&quot;.
  14151. </p>
  14152. <p><var class="var">arguments</var> is a string which contains the parameters used to
  14153. initialize the filter instance. It may have one of two forms:
  14154. </p><ul class="itemize mark-bullet">
  14155. <li>A &rsquo;:&rsquo;-separated list of <var class="var">key=value</var> pairs.
  14156. </li><li>A &rsquo;:&rsquo;-separated list of <var class="var">value</var>. In this case, the keys are assumed to be
  14157. the option names in the order they are declared. E.g. the <code class="code">fade</code> filter
  14158. declares three options in this order &ndash; <samp class="option">type</samp>, <samp class="option">start_frame</samp> and
  14159. <samp class="option">nb_frames</samp>. Then the parameter list <var class="var">in:0:30</var> means that the value
  14160. <var class="var">in</var> is assigned to the option <samp class="option">type</samp>, <var class="var">0</var> to
  14161. <samp class="option">start_frame</samp> and <var class="var">30</var> to <samp class="option">nb_frames</samp>.
  14162. </li><li>A &rsquo;:&rsquo;-separated list of mixed direct <var class="var">value</var> and long <var class="var">key=value</var>
  14163. pairs. The direct <var class="var">value</var> must precede the <var class="var">key=value</var> pairs, and
  14164. follow the same constraints order of the previous point. The following
  14165. <var class="var">key=value</var> pairs can be set in any preferred order.
  14166. </li></ul>
  14167. <p>If the option value itself is a list of items (e.g. the <code class="code">format</code> filter
  14168. takes a list of pixel formats), the items in the list are usually separated by
  14169. &lsquo;<samp class="samp">|</samp>&rsquo;.
  14170. </p>
  14171. <p>The list of arguments can be quoted using the character &lsquo;<samp class="samp">'</samp>&rsquo; as initial
  14172. and ending mark, and the character &lsquo;<samp class="samp">\</samp>&rsquo; for escaping the characters
  14173. within the quoted text; otherwise the argument string is considered
  14174. terminated when the next special character (belonging to the set
  14175. &lsquo;<samp class="samp">[]=;,</samp>&rsquo;) is encountered.
  14176. </p>
  14177. <p>A special syntax implemented in the <code class="command">ffmpeg</code> CLI tool allows loading
  14178. option values from files. This is done be prepending a slash &rsquo;/&rsquo; to the option
  14179. name, then the supplied value is interpreted as a path from which the actual
  14180. value is loaded. E.g.
  14181. </p><div class="example">
  14182. <pre class="example-preformatted">ffmpeg -i &lt;INPUT&gt; -vf drawtext=/text=/tmp/some_text &lt;OUTPUT&gt;
  14183. </pre></div>
  14184. <p>will load the text to be drawn from <samp class="file">/tmp/some_text</samp>. API users wishing to
  14185. implement a similar feature should use the <code class="code">avfilter_graph_segment_*()</code>
  14186. functions together with custom IO code.
  14187. </p>
  14188. <p>The name and arguments of the filter are optionally preceded and
  14189. followed by a list of link labels.
  14190. A link label allows one to name a link and associate it to a filter output
  14191. or input pad. The preceding labels <var class="var">in_link_1</var>
  14192. ... <var class="var">in_link_N</var>, are associated to the filter input pads,
  14193. the following labels <var class="var">out_link_1</var> ... <var class="var">out_link_M</var>, are
  14194. associated to the output pads.
  14195. </p>
  14196. <p>When two link labels with the same name are found in the
  14197. filtergraph, a link between the corresponding input and output pad is
  14198. created.
  14199. </p>
  14200. <p>If an output pad is not labelled, it is linked by default to the first
  14201. unlabelled input pad of the next filter in the filterchain.
  14202. For example in the filterchain
  14203. </p><div class="example">
  14204. <pre class="example-preformatted">nullsrc, split[L1], [L2]overlay, nullsink
  14205. </pre></div>
  14206. <p>the split filter instance has two output pads, and the overlay filter
  14207. instance two input pads. The first output pad of split is labelled
  14208. &quot;L1&quot;, the first input pad of overlay is labelled &quot;L2&quot;, and the second
  14209. output pad of split is linked to the second input pad of overlay,
  14210. which are both unlabelled.
  14211. </p>
  14212. <p>In a filter description, if the input label of the first filter is not
  14213. specified, &quot;in&quot; is assumed; if the output label of the last filter is not
  14214. specified, &quot;out&quot; is assumed.
  14215. </p>
  14216. <p>In a complete filterchain all the unlabelled filter input and output
  14217. pads must be connected. A filtergraph is considered valid if all the
  14218. filter input and output pads of all the filterchains are connected.
  14219. </p>
  14220. <p>Leading and trailing whitespaces (space, tabs, or line feeds) separating tokens
  14221. in the filtergraph specification are ignored. This means that the filtergraph
  14222. can be expressed using empty lines and spaces to improve redability.
  14223. </p>
  14224. <p>For example, the filtergraph:
  14225. </p><div class="example">
  14226. <pre class="example-preformatted">testsrc,split[L1],hflip[L2];[L1][L2] hstack
  14227. </pre></div>
  14228. <p>can be represented as:
  14229. </p><div class="example">
  14230. <pre class="example-preformatted">testsrc,
  14231. split [L1], hflip [L2];
  14232. [L1][L2] hstack
  14233. </pre></div>
  14234. <p>Libavfilter will automatically insert <a class="ref" href="#scale">scale</a> filters where format
  14235. conversion is required. It is possible to specify swscale flags
  14236. for those automatically inserted scalers by prepending
  14237. <code class="code">sws_flags=<var class="var">flags</var>;</code>
  14238. to the filtergraph description.
  14239. </p>
  14240. <p>Here is a BNF description of the filtergraph syntax:
  14241. </p><div class="example">
  14242. <pre class="example-preformatted"><var class="var">NAME</var> ::= sequence of alphanumeric characters and '_'
  14243. <var class="var">FILTER_NAME</var> ::= <var class="var">NAME</var>[&quot;@&quot;<var class="var">NAME</var>]
  14244. <var class="var">LINKLABEL</var> ::= &quot;[&quot; <var class="var">NAME</var> &quot;]&quot;
  14245. <var class="var">LINKLABELS</var> ::= <var class="var">LINKLABEL</var> [<var class="var">LINKLABELS</var>]
  14246. <var class="var">FILTER_ARGUMENTS</var> ::= sequence of chars (possibly quoted)
  14247. <var class="var">FILTER</var> ::= [<var class="var">LINKLABELS</var>] <var class="var">FILTER_NAME</var> [&quot;=&quot; <var class="var">FILTER_ARGUMENTS</var>] [<var class="var">LINKLABELS</var>]
  14248. <var class="var">FILTERCHAIN</var> ::= <var class="var">FILTER</var> [,<var class="var">FILTERCHAIN</var>]
  14249. <var class="var">FILTERGRAPH</var> ::= [sws_flags=<var class="var">flags</var>;] <var class="var">FILTERCHAIN</var> [;<var class="var">FILTERGRAPH</var>]
  14250. </pre></div>
  14251. <a class="anchor" id="filtergraph-escaping"></a></div>
  14252. <div class="section-level-extent" id="Notes-on-filtergraph-escaping">
  14253. <h3 class="section"><span>25.2 Notes on filtergraph escaping<a class="copiable-link" href="#Notes-on-filtergraph-escaping"> &para;</a></span></h3>
  14254. <p>Filtergraph description composition entails several levels of
  14255. escaping. See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#quoting_005fand_005fescaping">the &quot;Quoting and escaping&quot;
  14256. section in the ffmpeg-utils(1) manual</a> for more
  14257. information about the employed escaping procedure.
  14258. </p>
  14259. <p>A first level escaping affects the content of each filter option
  14260. value, which may contain the special character <code class="code">:</code> used to
  14261. separate values, or one of the escaping characters <code class="code">\'</code>.
  14262. </p>
  14263. <p>A second level escaping affects the whole filter description, which
  14264. may contain the escaping characters <code class="code">\'</code> or the special
  14265. characters <code class="code">[],;</code> used by the filtergraph description.
  14266. </p>
  14267. <p>Finally, when you specify a filtergraph on a shell commandline, you
  14268. need to perform a third level escaping for the shell special
  14269. characters contained within it.
  14270. </p>
  14271. <p>For example, consider the following string to be embedded in
  14272. the <a class="ref" href="#drawtext">drawtext</a> filter description <samp class="option">text</samp> value:
  14273. </p><div class="example">
  14274. <pre class="example-preformatted">this is a 'string': may contain one, or more, special characters
  14275. </pre></div>
  14276. <p>This string contains the <code class="code">'</code> special escaping character, and the
  14277. <code class="code">:</code> special character, so it needs to be escaped in this way:
  14278. </p><div class="example">
  14279. <pre class="example-preformatted">text=this is a \'string\'\: may contain one, or more, special characters
  14280. </pre></div>
  14281. <p>A second level of escaping is required when embedding the filter
  14282. description in a filtergraph description, in order to escape all the
  14283. filtergraph special characters. Thus the example above becomes:
  14284. </p><div class="example">
  14285. <pre class="example-preformatted">drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
  14286. </pre></div>
  14287. <p>(note that in addition to the <code class="code">\'</code> escaping special characters,
  14288. also <code class="code">,</code> needs to be escaped).
  14289. </p>
  14290. <p>Finally an additional level of escaping is needed when writing the
  14291. filtergraph description in a shell command, which depends on the
  14292. escaping rules of the adopted shell. For example, assuming that
  14293. <code class="code">\</code> is special and needs to be escaped with another <code class="code">\</code>, the
  14294. previous string will finally result in:
  14295. </p><div class="example">
  14296. <pre class="example-preformatted">-vf &quot;drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters&quot;
  14297. </pre></div>
  14298. <p>In order to avoid cumbersome escaping when using a commandline tool accepting a
  14299. filter specification as input, it is advisable to avoid direct inclusion of the
  14300. filter or options specification in the shell.
  14301. </p>
  14302. <p>For example, in case of the <a class="ref" href="#drawtext">drawtext filter</a>, you might prefer to
  14303. use the <samp class="option">textfile</samp> option in place of <samp class="option">text</samp> to specify the text
  14304. to render.
  14305. </p>
  14306. </div>
  14307. </div>
  14308. <div class="chapter-level-extent" id="Timeline-editing">
  14309. <h2 class="chapter"><span>26 Timeline editing<a class="copiable-link" href="#Timeline-editing"> &para;</a></span></h2>
  14310. <p>Some filters support a generic <samp class="option">enable</samp> option. For the filters
  14311. supporting timeline editing, this option can be set to an expression which is
  14312. evaluated before sending a frame to the filter. If the evaluation is non-zero,
  14313. the filter will be enabled, otherwise the frame will be sent unchanged to the
  14314. next filter in the filtergraph.
  14315. </p>
  14316. <p>The expression accepts the following values:
  14317. </p><dl class="table">
  14318. <dt>&lsquo;<samp class="samp">t</samp>&rsquo;</dt>
  14319. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  14320. </p>
  14321. </dd>
  14322. <dt>&lsquo;<samp class="samp">n</samp>&rsquo;</dt>
  14323. <dd><p>sequential number of the input frame, starting from 0
  14324. </p>
  14325. </dd>
  14326. <dt>&lsquo;<samp class="samp">pos</samp>&rsquo;</dt>
  14327. <dd><p>the position in the file of the input frame, NAN if unknown; deprecated, do
  14328. not use
  14329. </p>
  14330. </dd>
  14331. <dt>&lsquo;<samp class="samp">w</samp>&rsquo;</dt>
  14332. <dt>&lsquo;<samp class="samp">h</samp>&rsquo;</dt>
  14333. <dd><p>width and height of the input frame if video
  14334. </p></dd>
  14335. </dl>
  14336. <p>Additionally, these filters support an <samp class="option">enable</samp> command that can be used
  14337. to re-define the expression.
  14338. </p>
  14339. <p>Like any other filtering option, the <samp class="option">enable</samp> option follows the same
  14340. rules.
  14341. </p>
  14342. <p>For example, to enable a blur filter (<a class="ref" href="#smartblur">smartblur</a>) from 10 seconds to 3
  14343. minutes, and a <a class="ref" href="#curves">curves</a> filter starting at 3 seconds:
  14344. </p><div class="example">
  14345. <pre class="example-preformatted">smartblur = enable='between(t,10,3*60)',
  14346. curves = enable='gte(t,3)' : preset=cross_process
  14347. </pre></div>
  14348. <p>See <code class="code">ffmpeg -filters</code> to view which filters have timeline support.
  14349. </p>
  14350. <a class="anchor" id="commands"></a></div>
  14351. <div class="chapter-level-extent" id="Changing-options-at-runtime-with-a-command">
  14352. <h2 class="chapter"><span>27 Changing options at runtime with a command<a class="copiable-link" href="#Changing-options-at-runtime-with-a-command"> &para;</a></span></h2>
  14353. <p>Some options can be changed during the operation of the filter using
  14354. a command. These options are marked &rsquo;T&rsquo; on the output of
  14355. <code class="command">ffmpeg</code> <samp class="option">-h filter=&lt;name of filter&gt;</samp>.
  14356. The name of the command is the name of the option and the argument is
  14357. the new value.
  14358. </p>
  14359. <a class="anchor" id="framesync"></a></div>
  14360. <div class="chapter-level-extent" id="Options-for-filters-with-several-inputs-_0028framesync_0029">
  14361. <h2 class="chapter"><span>28 Options for filters with several inputs (framesync)<a class="copiable-link" href="#Options-for-filters-with-several-inputs-_0028framesync_0029"> &para;</a></span></h2>
  14362. <p>Some filters with several inputs support a common set of options.
  14363. These options can only be set by name, not with the short notation.
  14364. </p>
  14365. <dl class="table">
  14366. <dt><samp class="option">eof_action</samp></dt>
  14367. <dd><p>The action to take when EOF is encountered on the secondary input; it accepts
  14368. one of the following values:
  14369. </p>
  14370. <dl class="table">
  14371. <dt><samp class="option">repeat</samp></dt>
  14372. <dd><p>Repeat the last frame (the default).
  14373. </p></dd>
  14374. <dt><samp class="option">endall</samp></dt>
  14375. <dd><p>End both streams.
  14376. </p></dd>
  14377. <dt><samp class="option">pass</samp></dt>
  14378. <dd><p>Pass the main input through.
  14379. </p></dd>
  14380. </dl>
  14381. </dd>
  14382. <dt><samp class="option">shortest</samp></dt>
  14383. <dd><p>If set to 1, force the output to terminate when the shortest input
  14384. terminates. Default value is 0.
  14385. </p>
  14386. </dd>
  14387. <dt><samp class="option">repeatlast</samp></dt>
  14388. <dd><p>If set to 1, force the filter to extend the last frame of secondary streams
  14389. until the end of the primary stream. A value of 0 disables this behavior.
  14390. Default value is 1.
  14391. </p>
  14392. </dd>
  14393. <dt><samp class="option">ts_sync_mode</samp></dt>
  14394. <dd><p>How strictly to sync streams based on secondary input timestamps; it accepts
  14395. one of the following values:
  14396. </p>
  14397. <dl class="table">
  14398. <dt><samp class="option">default</samp></dt>
  14399. <dd><p>Frame from secondary input with the nearest lower or equal timestamp to the
  14400. primary input frame.
  14401. </p></dd>
  14402. <dt><samp class="option">nearest</samp></dt>
  14403. <dd><p>Frame from secondary input with the absolute nearest timestamp to the primary
  14404. input frame.
  14405. </p></dd>
  14406. </dl>
  14407. </dd>
  14408. </dl>
  14409. </div>
  14410. <div class="chapter-level-extent" id="Audio-Filters">
  14411. <h2 class="chapter"><span>29 Audio Filters<a class="copiable-link" href="#Audio-Filters"> &para;</a></span></h2>
  14412. <p>When you configure your FFmpeg build, you can disable any of the
  14413. existing filters using <code class="code">--disable-filters</code>.
  14414. The configure output will show the audio filters included in your
  14415. build.
  14416. </p>
  14417. <p>Below is a description of the currently available audio filters.
  14418. </p>
  14419. <ul class="mini-toc">
  14420. <li><a href="#aap" accesskey="1">aap</a></li>
  14421. <li><a href="#acompressor" accesskey="2">acompressor</a></li>
  14422. <li><a href="#acontrast" accesskey="3">acontrast</a></li>
  14423. <li><a href="#acopy" accesskey="4">acopy</a></li>
  14424. <li><a href="#acrossfade" accesskey="5">acrossfade</a></li>
  14425. <li><a href="#acrossover" accesskey="6">acrossover</a></li>
  14426. <li><a href="#acrusher" accesskey="7">acrusher</a></li>
  14427. <li><a href="#acue" accesskey="8">acue</a></li>
  14428. <li><a href="#adeclick" accesskey="9">adeclick</a></li>
  14429. <li><a href="#adeclip">adeclip</a></li>
  14430. <li><a href="#adecorrelate">adecorrelate</a></li>
  14431. <li><a href="#adelay">adelay</a></li>
  14432. <li><a href="#adenorm">adenorm</a></li>
  14433. <li><a href="#aderivative_002c-aintegral">aderivative, aintegral</a></li>
  14434. <li><a href="#adrc">adrc</a></li>
  14435. <li><a href="#adynamicequalizer">adynamicequalizer</a></li>
  14436. <li><a href="#adynamicsmooth">adynamicsmooth</a></li>
  14437. <li><a href="#aecho">aecho</a></li>
  14438. <li><a href="#aemphasis">aemphasis</a></li>
  14439. <li><a href="#aeval">aeval</a></li>
  14440. <li><a href="#aexciter">aexciter</a></li>
  14441. <li><a href="#afade-1">afade</a></li>
  14442. <li><a href="#afftdn">afftdn</a></li>
  14443. <li><a href="#afftfilt">afftfilt</a></li>
  14444. <li><a href="#afir-1">afir</a></li>
  14445. <li><a href="#aformat-1">aformat</a></li>
  14446. <li><a href="#afreqshift">afreqshift</a></li>
  14447. <li><a href="#afwtdn">afwtdn</a></li>
  14448. <li><a href="#agate">agate</a></li>
  14449. <li><a href="#aiir">aiir</a></li>
  14450. <li><a href="#alimiter">alimiter</a></li>
  14451. <li><a href="#allpass">allpass</a></li>
  14452. <li><a href="#aloop">aloop</a></li>
  14453. <li><a href="#amerge-1">amerge</a></li>
  14454. <li><a href="#amix">amix</a></li>
  14455. <li><a href="#amultiply">amultiply</a></li>
  14456. <li><a href="#anequalizer">anequalizer</a></li>
  14457. <li><a href="#anlmdn">anlmdn</a></li>
  14458. <li><a href="#anlmf_002c-anlms">anlmf, anlms</a></li>
  14459. <li><a href="#anull">anull</a></li>
  14460. <li><a href="#apad">apad</a></li>
  14461. <li><a href="#aphaser">aphaser</a></li>
  14462. <li><a href="#aphaseshift">aphaseshift</a></li>
  14463. <li><a href="#apsnr">apsnr</a></li>
  14464. <li><a href="#apsyclip">apsyclip</a></li>
  14465. <li><a href="#apulsator">apulsator</a></li>
  14466. <li><a href="#aresample-1">aresample</a></li>
  14467. <li><a href="#areverse">areverse</a></li>
  14468. <li><a href="#arls">arls</a></li>
  14469. <li><a href="#arnndn">arnndn</a></li>
  14470. <li><a href="#asdr">asdr</a></li>
  14471. <li><a href="#asetnsamples">asetnsamples</a></li>
  14472. <li><a href="#asetrate">asetrate</a></li>
  14473. <li><a href="#ashowinfo">ashowinfo</a></li>
  14474. <li><a href="#asisdr">asisdr</a></li>
  14475. <li><a href="#asoftclip">asoftclip</a></li>
  14476. <li><a href="#aspectralstats">aspectralstats</a></li>
  14477. <li><a href="#asr">asr</a></li>
  14478. <li><a href="#astats-1">astats</a></li>
  14479. <li><a href="#asubboost">asubboost</a></li>
  14480. <li><a href="#asubcut">asubcut</a></li>
  14481. <li><a href="#asupercut">asupercut</a></li>
  14482. <li><a href="#asuperpass">asuperpass</a></li>
  14483. <li><a href="#asuperstop">asuperstop</a></li>
  14484. <li><a href="#atempo">atempo</a></li>
  14485. <li><a href="#atilt">atilt</a></li>
  14486. <li><a href="#atrim">atrim</a></li>
  14487. <li><a href="#axcorrelate">axcorrelate</a></li>
  14488. <li><a href="#bandpass">bandpass</a></li>
  14489. <li><a href="#bandreject">bandreject</a></li>
  14490. <li><a href="#bass_002c-lowshelf">bass, lowshelf</a></li>
  14491. <li><a href="#biquad">biquad</a></li>
  14492. <li><a href="#bs2b">bs2b</a></li>
  14493. <li><a href="#channelmap">channelmap</a></li>
  14494. <li><a href="#channelsplit">channelsplit</a></li>
  14495. <li><a href="#chorus">chorus</a></li>
  14496. <li><a href="#compand">compand</a></li>
  14497. <li><a href="#compensationdelay">compensationdelay</a></li>
  14498. <li><a href="#crossfeed">crossfeed</a></li>
  14499. <li><a href="#crystalizer">crystalizer</a></li>
  14500. <li><a href="#dcshift">dcshift</a></li>
  14501. <li><a href="#deesser">deesser</a></li>
  14502. <li><a href="#dialoguenhance">dialoguenhance</a></li>
  14503. <li><a href="#drmeter">drmeter</a></li>
  14504. <li><a href="#dynaudnorm">dynaudnorm</a></li>
  14505. <li><a href="#earwax">earwax</a></li>
  14506. <li><a href="#equalizer">equalizer</a></li>
  14507. <li><a href="#extrastereo">extrastereo</a></li>
  14508. <li><a href="#firequalizer">firequalizer</a></li>
  14509. <li><a href="#flanger">flanger</a></li>
  14510. <li><a href="#haas">haas</a></li>
  14511. <li><a href="#hdcd">hdcd</a></li>
  14512. <li><a href="#headphone">headphone</a></li>
  14513. <li><a href="#highpass">highpass</a></li>
  14514. <li><a href="#join">join</a></li>
  14515. <li><a href="#ladspa">ladspa</a></li>
  14516. <li><a href="#loudnorm">loudnorm</a></li>
  14517. <li><a href="#lowpass">lowpass</a></li>
  14518. <li><a href="#lv2">lv2</a></li>
  14519. <li><a href="#mcompand">mcompand</a></li>
  14520. <li><a href="#pan-1">pan</a></li>
  14521. <li><a href="#replaygain">replaygain</a></li>
  14522. <li><a href="#resample">resample</a></li>
  14523. <li><a href="#rubberband">rubberband</a></li>
  14524. <li><a href="#sidechaincompress">sidechaincompress</a></li>
  14525. <li><a href="#sidechaingate">sidechaingate</a></li>
  14526. <li><a href="#silencedetect">silencedetect</a></li>
  14527. <li><a href="#silenceremove">silenceremove</a></li>
  14528. <li><a href="#sofalizer">sofalizer</a></li>
  14529. <li><a href="#speechnorm">speechnorm</a></li>
  14530. <li><a href="#stereotools">stereotools</a></li>
  14531. <li><a href="#stereowiden">stereowiden</a></li>
  14532. <li><a href="#superequalizer">superequalizer</a></li>
  14533. <li><a href="#surround">surround</a></li>
  14534. <li><a href="#tiltshelf">tiltshelf</a></li>
  14535. <li><a href="#treble_002c-highshelf">treble, highshelf</a></li>
  14536. <li><a href="#tremolo">tremolo</a></li>
  14537. <li><a href="#vibrato">vibrato</a></li>
  14538. <li><a href="#virtualbass">virtualbass</a></li>
  14539. <li><a href="#volume">volume</a></li>
  14540. <li><a href="#volumedetect">volumedetect</a></li>
  14541. </ul>
  14542. <div class="section-level-extent" id="aap">
  14543. <h3 class="section"><span>29.1 aap<a class="copiable-link" href="#aap"> &para;</a></span></h3>
  14544. <p>Apply Affine Projection algorithm to the first audio stream using the second audio stream.
  14545. </p>
  14546. <p>This adaptive filter is used to estimate unknown audio based on multiple input audio samples.
  14547. Affine projection algorithm can make trade-offs between computation complexity with convergence speed.
  14548. </p>
  14549. <p>A description of the accepted options follows.
  14550. </p>
  14551. <dl class="table">
  14552. <dt><samp class="option">order</samp></dt>
  14553. <dd><p>Set the filter order.
  14554. </p>
  14555. </dd>
  14556. <dt><samp class="option">projection</samp></dt>
  14557. <dd><p>Set the projection order.
  14558. </p>
  14559. </dd>
  14560. <dt><samp class="option">mu</samp></dt>
  14561. <dd><p>Set the filter mu.
  14562. </p>
  14563. </dd>
  14564. <dt><samp class="option">delta</samp></dt>
  14565. <dd><p>Set the coefficient to initialize internal covariance matrix.
  14566. </p>
  14567. </dd>
  14568. <dt><samp class="option">out_mode</samp></dt>
  14569. <dd><p>Set the filter output samples. It accepts the following values:
  14570. </p><dl class="table">
  14571. <dt><samp class="option">i</samp></dt>
  14572. <dd><p>Pass the 1st input.
  14573. </p>
  14574. </dd>
  14575. <dt><samp class="option">d</samp></dt>
  14576. <dd><p>Pass the 2nd input.
  14577. </p>
  14578. </dd>
  14579. <dt><samp class="option">o</samp></dt>
  14580. <dd><p>Pass difference between desired, 2nd input and error signal estimate.
  14581. </p>
  14582. </dd>
  14583. <dt><samp class="option">n</samp></dt>
  14584. <dd><p>Pass difference between input, 1st input and error signal estimate.
  14585. </p>
  14586. </dd>
  14587. <dt><samp class="option">e</samp></dt>
  14588. <dd><p>Pass error signal estimated samples.
  14589. </p>
  14590. <p>Default value is <var class="var">o</var>.
  14591. </p></dd>
  14592. </dl>
  14593. </dd>
  14594. <dt><samp class="option">precision</samp></dt>
  14595. <dd><p>Set which precision to use when processing samples.
  14596. </p>
  14597. <dl class="table">
  14598. <dt><samp class="option">auto</samp></dt>
  14599. <dd><p>Auto pick internal sample format depending on other filters.
  14600. </p>
  14601. </dd>
  14602. <dt><samp class="option">float</samp></dt>
  14603. <dd><p>Always use single-floating point precision sample format.
  14604. </p>
  14605. </dd>
  14606. <dt><samp class="option">double</samp></dt>
  14607. <dd><p>Always use double-floating point precision sample format.
  14608. </p></dd>
  14609. </dl>
  14610. </dd>
  14611. </dl>
  14612. </div>
  14613. <div class="section-level-extent" id="acompressor">
  14614. <h3 class="section"><span>29.2 acompressor<a class="copiable-link" href="#acompressor"> &para;</a></span></h3>
  14615. <p>A compressor is mainly used to reduce the dynamic range of a signal.
  14616. Especially modern music is mostly compressed at a high ratio to
  14617. improve the overall loudness. It&rsquo;s done to get the highest attention
  14618. of a listener, &quot;fatten&quot; the sound and bring more &quot;power&quot; to the track.
  14619. If a signal is compressed too much it may sound dull or &quot;dead&quot;
  14620. afterwards or it may start to &quot;pump&quot; (which could be a powerful effect
  14621. but can also destroy a track completely).
  14622. The right compression is the key to reach a professional sound and is
  14623. the high art of mixing and mastering. Because of its complex settings
  14624. it may take a long time to get the right feeling for this kind of effect.
  14625. </p>
  14626. <p>Compression is done by detecting the volume above a chosen level
  14627. <code class="code">threshold</code> and dividing it by the factor set with <code class="code">ratio</code>.
  14628. So if you set the threshold to -12dB and your signal reaches -6dB a ratio
  14629. of 2:1 will result in a signal at -9dB. Because an exact manipulation of
  14630. the signal would cause distortion of the waveform the reduction can be
  14631. levelled over the time. This is done by setting &quot;Attack&quot; and &quot;Release&quot;.
  14632. <code class="code">attack</code> determines how long the signal has to rise above the threshold
  14633. before any reduction will occur and <code class="code">release</code> sets the time the signal
  14634. has to fall below the threshold to reduce the reduction again. Shorter signals
  14635. than the chosen attack time will be left untouched.
  14636. The overall reduction of the signal can be made up afterwards with the
  14637. <code class="code">makeup</code> setting. So compressing the peaks of a signal about 6dB and
  14638. raising the makeup to this level results in a signal twice as loud than the
  14639. source. To gain a softer entry in the compression the <code class="code">knee</code> flattens the
  14640. hard edge at the threshold in the range of the chosen decibels.
  14641. </p>
  14642. <p>The filter accepts the following options:
  14643. </p>
  14644. <dl class="table">
  14645. <dt><samp class="option">level_in</samp></dt>
  14646. <dd><p>Set input gain. Default is 1. Range is between 0.015625 and 64.
  14647. </p>
  14648. </dd>
  14649. <dt><samp class="option">mode</samp></dt>
  14650. <dd><p>Set mode of compressor operation. Can be <code class="code">upward</code> or <code class="code">downward</code>.
  14651. Default is <code class="code">downward</code>.
  14652. </p>
  14653. </dd>
  14654. <dt><samp class="option">threshold</samp></dt>
  14655. <dd><p>If a signal of stream rises above this level it will affect the gain
  14656. reduction.
  14657. By default it is 0.125. Range is between 0.00097563 and 1.
  14658. </p>
  14659. </dd>
  14660. <dt><samp class="option">ratio</samp></dt>
  14661. <dd><p>Set a ratio by which the signal is reduced. 1:2 means that if the level
  14662. rose 4dB above the threshold, it will be only 2dB above after the reduction.
  14663. Default is 2. Range is between 1 and 20.
  14664. </p>
  14665. </dd>
  14666. <dt><samp class="option">attack</samp></dt>
  14667. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  14668. reduction starts. Default is 20. Range is between 0.01 and 2000.
  14669. </p>
  14670. </dd>
  14671. <dt><samp class="option">release</samp></dt>
  14672. <dd><p>Amount of milliseconds the signal has to fall below the threshold before
  14673. reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
  14674. </p>
  14675. </dd>
  14676. <dt><samp class="option">makeup</samp></dt>
  14677. <dd><p>Set the amount by how much signal will be amplified after processing.
  14678. Default is 1. Range is from 1 to 64.
  14679. </p>
  14680. </dd>
  14681. <dt><samp class="option">knee</samp></dt>
  14682. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  14683. Default is 2.82843. Range is between 1 and 8.
  14684. </p>
  14685. </dd>
  14686. <dt><samp class="option">link</samp></dt>
  14687. <dd><p>Choose if the <code class="code">average</code> level between all channels of input stream
  14688. or the louder(<code class="code">maximum</code>) channel of input stream affects the
  14689. reduction. Default is <code class="code">average</code>.
  14690. </p>
  14691. </dd>
  14692. <dt><samp class="option">detection</samp></dt>
  14693. <dd><p>Should the exact signal be taken in case of <code class="code">peak</code> or an RMS one in case
  14694. of <code class="code">rms</code>. Default is <code class="code">rms</code> which is mostly smoother.
  14695. </p>
  14696. </dd>
  14697. <dt><samp class="option">mix</samp></dt>
  14698. <dd><p>How much to use compressed signal in output. Default is 1.
  14699. Range is between 0 and 1.
  14700. </p></dd>
  14701. </dl>
  14702. <ul class="mini-toc">
  14703. <li><a href="#Commands" accesskey="1">Commands</a></li>
  14704. </ul>
  14705. <div class="subsection-level-extent" id="Commands">
  14706. <h4 class="subsection"><span>29.2.1 Commands<a class="copiable-link" href="#Commands"> &para;</a></span></h4>
  14707. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  14708. </p>
  14709. </div>
  14710. </div>
  14711. <div class="section-level-extent" id="acontrast">
  14712. <h3 class="section"><span>29.3 acontrast<a class="copiable-link" href="#acontrast"> &para;</a></span></h3>
  14713. <p>Simple audio dynamic range compression/expansion filter.
  14714. </p>
  14715. <p>The filter accepts the following options:
  14716. </p>
  14717. <dl class="table">
  14718. <dt><samp class="option">contrast</samp></dt>
  14719. <dd><p>Set contrast. Default is 33. Allowed range is between 0 and 100.
  14720. </p></dd>
  14721. </dl>
  14722. </div>
  14723. <div class="section-level-extent" id="acopy">
  14724. <h3 class="section"><span>29.4 acopy<a class="copiable-link" href="#acopy"> &para;</a></span></h3>
  14725. <p>Copy the input audio source unchanged to the output. This is mainly useful for
  14726. testing purposes.
  14727. </p>
  14728. </div>
  14729. <div class="section-level-extent" id="acrossfade">
  14730. <h3 class="section"><span>29.5 acrossfade<a class="copiable-link" href="#acrossfade"> &para;</a></span></h3>
  14731. <p>Apply cross fade from one input audio stream to another input audio stream.
  14732. The cross fade is applied for specified duration near the end of first stream.
  14733. </p>
  14734. <p>The filter accepts the following options:
  14735. </p>
  14736. <dl class="table">
  14737. <dt><samp class="option">nb_samples, ns</samp></dt>
  14738. <dd><p>Specify the number of samples for which the cross fade effect has to last.
  14739. At the end of the cross fade effect the first input audio will be completely
  14740. silent. Default is 44100.
  14741. </p>
  14742. </dd>
  14743. <dt><samp class="option">duration, d</samp></dt>
  14744. <dd><p>Specify the duration of the cross fade effect. See
  14745. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  14746. for the accepted syntax.
  14747. By default the duration is determined by <var class="var">nb_samples</var>.
  14748. If set this option is used instead of <var class="var">nb_samples</var>.
  14749. </p>
  14750. </dd>
  14751. <dt><samp class="option">overlap, o</samp></dt>
  14752. <dd><p>Should first stream end overlap with second stream start. Default is enabled.
  14753. </p>
  14754. </dd>
  14755. <dt><samp class="option">curve1</samp></dt>
  14756. <dd><p>Set curve for cross fade transition for first stream.
  14757. </p>
  14758. </dd>
  14759. <dt><samp class="option">curve2</samp></dt>
  14760. <dd><p>Set curve for cross fade transition for second stream.
  14761. </p>
  14762. <p>For description of available curve types see <a class="ref" href="#afade">afade</a> filter description.
  14763. </p></dd>
  14764. </dl>
  14765. <ul class="mini-toc">
  14766. <li><a href="#Examples-16" accesskey="1">Examples</a></li>
  14767. </ul>
  14768. <div class="subsection-level-extent" id="Examples-16">
  14769. <h4 class="subsection"><span>29.5.1 Examples<a class="copiable-link" href="#Examples-16"> &para;</a></span></h4>
  14770. <ul class="itemize mark-bullet">
  14771. <li>Cross fade from one input to another:
  14772. <div class="example">
  14773. <pre class="example-preformatted">ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
  14774. </pre></div>
  14775. </li><li>Cross fade from one input to another but without overlapping:
  14776. <div class="example">
  14777. <pre class="example-preformatted">ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
  14778. </pre></div>
  14779. </li></ul>
  14780. </div>
  14781. </div>
  14782. <div class="section-level-extent" id="acrossover">
  14783. <h3 class="section"><span>29.6 acrossover<a class="copiable-link" href="#acrossover"> &para;</a></span></h3>
  14784. <p>Split audio stream into several bands.
  14785. </p>
  14786. <p>This filter splits audio stream into two or more frequency ranges.
  14787. Summing all streams back will give flat output.
  14788. </p>
  14789. <p>The filter accepts the following options:
  14790. </p>
  14791. <dl class="table">
  14792. <dt><samp class="option">split</samp></dt>
  14793. <dd><p>Set split frequencies. Those must be positive and increasing.
  14794. </p>
  14795. </dd>
  14796. <dt><samp class="option">order</samp></dt>
  14797. <dd><p>Set filter order for each band split. This controls filter roll-off or steepness
  14798. of filter transfer function.
  14799. Available values are:
  14800. </p>
  14801. <dl class="table">
  14802. <dt>&lsquo;<samp class="samp">2nd</samp>&rsquo;</dt>
  14803. <dd><p>12 dB per octave.
  14804. </p></dd>
  14805. <dt>&lsquo;<samp class="samp">4th</samp>&rsquo;</dt>
  14806. <dd><p>24 dB per octave.
  14807. </p></dd>
  14808. <dt>&lsquo;<samp class="samp">6th</samp>&rsquo;</dt>
  14809. <dd><p>36 dB per octave.
  14810. </p></dd>
  14811. <dt>&lsquo;<samp class="samp">8th</samp>&rsquo;</dt>
  14812. <dd><p>48 dB per octave.
  14813. </p></dd>
  14814. <dt>&lsquo;<samp class="samp">10th</samp>&rsquo;</dt>
  14815. <dd><p>60 dB per octave.
  14816. </p></dd>
  14817. <dt>&lsquo;<samp class="samp">12th</samp>&rsquo;</dt>
  14818. <dd><p>72 dB per octave.
  14819. </p></dd>
  14820. <dt>&lsquo;<samp class="samp">14th</samp>&rsquo;</dt>
  14821. <dd><p>84 dB per octave.
  14822. </p></dd>
  14823. <dt>&lsquo;<samp class="samp">16th</samp>&rsquo;</dt>
  14824. <dd><p>96 dB per octave.
  14825. </p></dd>
  14826. <dt>&lsquo;<samp class="samp">18th</samp>&rsquo;</dt>
  14827. <dd><p>108 dB per octave.
  14828. </p></dd>
  14829. <dt>&lsquo;<samp class="samp">20th</samp>&rsquo;</dt>
  14830. <dd><p>120 dB per octave.
  14831. </p></dd>
  14832. </dl>
  14833. <p>Default is <var class="var">4th</var>.
  14834. </p>
  14835. </dd>
  14836. <dt><samp class="option">level</samp></dt>
  14837. <dd><p>Set input gain level. Allowed range is from 0 to 1. Default value is 1.
  14838. </p>
  14839. </dd>
  14840. <dt><samp class="option">gains</samp></dt>
  14841. <dd><p>Set output gain for each band. Default value is 1 for all bands.
  14842. </p>
  14843. </dd>
  14844. <dt><samp class="option">precision</samp></dt>
  14845. <dd><p>Set which precision to use when processing samples.
  14846. </p>
  14847. <dl class="table">
  14848. <dt><samp class="option">auto</samp></dt>
  14849. <dd><p>Auto pick internal sample format depending on other filters.
  14850. </p>
  14851. </dd>
  14852. <dt><samp class="option">float</samp></dt>
  14853. <dd><p>Always use single-floating point precision sample format.
  14854. </p>
  14855. </dd>
  14856. <dt><samp class="option">double</samp></dt>
  14857. <dd><p>Always use double-floating point precision sample format.
  14858. </p></dd>
  14859. </dl>
  14860. <p>Default value is <code class="code">auto</code>.
  14861. </p></dd>
  14862. </dl>
  14863. <ul class="mini-toc">
  14864. <li><a href="#Examples-17" accesskey="1">Examples</a></li>
  14865. </ul>
  14866. <div class="subsection-level-extent" id="Examples-17">
  14867. <h4 class="subsection"><span>29.6.1 Examples<a class="copiable-link" href="#Examples-17"> &para;</a></span></h4>
  14868. <ul class="itemize mark-bullet">
  14869. <li>Split input audio stream into two bands (low and high) with split frequency of 1500 Hz,
  14870. each band will be in separate stream:
  14871. <div class="example">
  14872. <pre class="example-preformatted">ffmpeg -i in.flac -filter_complex 'acrossover=split=1500[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
  14873. </pre></div>
  14874. </li><li>Same as above, but with higher filter order:
  14875. <div class="example">
  14876. <pre class="example-preformatted">ffmpeg -i in.flac -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
  14877. </pre></div>
  14878. </li><li>Same as above, but also with additional middle band (frequencies between 1500 and 8000):
  14879. <div class="example">
  14880. <pre class="example-preformatted">ffmpeg -i in.flac -filter_complex 'acrossover=split=1500 8000:order=8th[LOW][MID][HIGH]' -map '[LOW]' low.wav -map '[MID]' mid.wav -map '[HIGH]' high.wav
  14881. </pre></div>
  14882. </li></ul>
  14883. </div>
  14884. </div>
  14885. <div class="section-level-extent" id="acrusher">
  14886. <h3 class="section"><span>29.7 acrusher<a class="copiable-link" href="#acrusher"> &para;</a></span></h3>
  14887. <p>Reduce audio bit resolution.
  14888. </p>
  14889. <p>This filter is bit crusher with enhanced functionality. A bit crusher
  14890. is used to audibly reduce number of bits an audio signal is sampled
  14891. with. This doesn&rsquo;t change the bit depth at all, it just produces the
  14892. effect. Material reduced in bit depth sounds more harsh and &quot;digital&quot;.
  14893. This filter is able to even round to continuous values instead of discrete
  14894. bit depths.
  14895. Additionally it has a D/C offset which results in different crushing of
  14896. the lower and the upper half of the signal.
  14897. An Anti-Aliasing setting is able to produce &quot;softer&quot; crushing sounds.
  14898. </p>
  14899. <p>Another feature of this filter is the logarithmic mode.
  14900. This setting switches from linear distances between bits to logarithmic ones.
  14901. The result is a much more &quot;natural&quot; sounding crusher which doesn&rsquo;t gate low
  14902. signals for example. The human ear has a logarithmic perception,
  14903. so this kind of crushing is much more pleasant.
  14904. Logarithmic crushing is also able to get anti-aliased.
  14905. </p>
  14906. <p>The filter accepts the following options:
  14907. </p>
  14908. <dl class="table">
  14909. <dt><samp class="option">level_in</samp></dt>
  14910. <dd><p>Set level in.
  14911. </p>
  14912. </dd>
  14913. <dt><samp class="option">level_out</samp></dt>
  14914. <dd><p>Set level out.
  14915. </p>
  14916. </dd>
  14917. <dt><samp class="option">bits</samp></dt>
  14918. <dd><p>Set bit reduction.
  14919. </p>
  14920. </dd>
  14921. <dt><samp class="option">mix</samp></dt>
  14922. <dd><p>Set mixing amount.
  14923. </p>
  14924. </dd>
  14925. <dt><samp class="option">mode</samp></dt>
  14926. <dd><p>Can be linear: <code class="code">lin</code> or logarithmic: <code class="code">log</code>.
  14927. </p>
  14928. </dd>
  14929. <dt><samp class="option">dc</samp></dt>
  14930. <dd><p>Set DC.
  14931. </p>
  14932. </dd>
  14933. <dt><samp class="option">aa</samp></dt>
  14934. <dd><p>Set anti-aliasing.
  14935. </p>
  14936. </dd>
  14937. <dt><samp class="option">samples</samp></dt>
  14938. <dd><p>Set sample reduction.
  14939. </p>
  14940. </dd>
  14941. <dt><samp class="option">lfo</samp></dt>
  14942. <dd><p>Enable LFO. By default disabled.
  14943. </p>
  14944. </dd>
  14945. <dt><samp class="option">lforange</samp></dt>
  14946. <dd><p>Set LFO range.
  14947. </p>
  14948. </dd>
  14949. <dt><samp class="option">lforate</samp></dt>
  14950. <dd><p>Set LFO rate.
  14951. </p></dd>
  14952. </dl>
  14953. <ul class="mini-toc">
  14954. <li><a href="#Commands-1" accesskey="1">Commands</a></li>
  14955. </ul>
  14956. <div class="subsection-level-extent" id="Commands-1">
  14957. <h4 class="subsection"><span>29.7.1 Commands<a class="copiable-link" href="#Commands-1"> &para;</a></span></h4>
  14958. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  14959. </p>
  14960. </div>
  14961. </div>
  14962. <div class="section-level-extent" id="acue">
  14963. <h3 class="section"><span>29.8 acue<a class="copiable-link" href="#acue"> &para;</a></span></h3>
  14964. <p>Delay audio filtering until a given wallclock timestamp. See the <a class="ref" href="#cue">cue</a>
  14965. filter.
  14966. </p>
  14967. </div>
  14968. <div class="section-level-extent" id="adeclick">
  14969. <h3 class="section"><span>29.9 adeclick<a class="copiable-link" href="#adeclick"> &para;</a></span></h3>
  14970. <p>Remove impulsive noise from input audio.
  14971. </p>
  14972. <p>Samples detected as impulsive noise are replaced by interpolated samples using
  14973. autoregressive modelling.
  14974. </p>
  14975. <dl class="table">
  14976. <dt><samp class="option">window, w</samp></dt>
  14977. <dd><p>Set window size, in milliseconds. Allowed range is from <code class="code">10</code> to
  14978. <code class="code">100</code>. Default value is <code class="code">55</code> milliseconds.
  14979. This sets size of window which will be processed at once.
  14980. </p>
  14981. </dd>
  14982. <dt><samp class="option">overlap, o</samp></dt>
  14983. <dd><p>Set window overlap, in percentage of window size. Allowed range is from
  14984. <code class="code">50</code> to <code class="code">95</code>. Default value is <code class="code">75</code> percent.
  14985. Setting this to a very high value increases impulsive noise removal but makes
  14986. whole process much slower.
  14987. </p>
  14988. </dd>
  14989. <dt><samp class="option">arorder, a</samp></dt>
  14990. <dd><p>Set autoregression order, in percentage of window size. Allowed range is from
  14991. <code class="code">0</code> to <code class="code">25</code>. Default value is <code class="code">2</code> percent. This option also
  14992. controls quality of interpolated samples using neighbour good samples.
  14993. </p>
  14994. </dd>
  14995. <dt><samp class="option">threshold, t</samp></dt>
  14996. <dd><p>Set threshold value. Allowed range is from <code class="code">1</code> to <code class="code">100</code>.
  14997. Default value is <code class="code">2</code>.
  14998. This controls the strength of impulsive noise which is going to be removed.
  14999. The lower value, the more samples will be detected as impulsive noise.
  15000. </p>
  15001. </dd>
  15002. <dt><samp class="option">burst, b</samp></dt>
  15003. <dd><p>Set burst fusion, in percentage of window size. Allowed range is <code class="code">0</code> to
  15004. <code class="code">10</code>. Default value is <code class="code">2</code>.
  15005. If any two samples detected as noise are spaced less than this value then any
  15006. sample between those two samples will be also detected as noise.
  15007. </p>
  15008. </dd>
  15009. <dt><samp class="option">method, m</samp></dt>
  15010. <dd><p>Set overlap method.
  15011. </p>
  15012. <p>It accepts the following values:
  15013. </p><dl class="table">
  15014. <dt><samp class="option">add, a</samp></dt>
  15015. <dd><p>Select overlap-add method. Even not interpolated samples are slightly
  15016. changed with this method.
  15017. </p>
  15018. </dd>
  15019. <dt><samp class="option">save, s</samp></dt>
  15020. <dd><p>Select overlap-save method. Not interpolated samples remain unchanged.
  15021. </p></dd>
  15022. </dl>
  15023. <p>Default value is <code class="code">a</code>.
  15024. </p></dd>
  15025. </dl>
  15026. </div>
  15027. <div class="section-level-extent" id="adeclip">
  15028. <h3 class="section"><span>29.10 adeclip<a class="copiable-link" href="#adeclip"> &para;</a></span></h3>
  15029. <p>Remove clipped samples from input audio.
  15030. </p>
  15031. <p>Samples detected as clipped are replaced by interpolated samples using
  15032. autoregressive modelling.
  15033. </p>
  15034. <dl class="table">
  15035. <dt><samp class="option">window, w</samp></dt>
  15036. <dd><p>Set window size, in milliseconds. Allowed range is from <code class="code">10</code> to <code class="code">100</code>.
  15037. Default value is <code class="code">55</code> milliseconds.
  15038. This sets size of window which will be processed at once.
  15039. </p>
  15040. </dd>
  15041. <dt><samp class="option">overlap, o</samp></dt>
  15042. <dd><p>Set window overlap, in percentage of window size. Allowed range is from <code class="code">50</code>
  15043. to <code class="code">95</code>. Default value is <code class="code">75</code> percent.
  15044. </p>
  15045. </dd>
  15046. <dt><samp class="option">arorder, a</samp></dt>
  15047. <dd><p>Set autoregression order, in percentage of window size. Allowed range is from
  15048. <code class="code">0</code> to <code class="code">25</code>. Default value is <code class="code">8</code> percent. This option also controls
  15049. quality of interpolated samples using neighbour good samples.
  15050. </p>
  15051. </dd>
  15052. <dt><samp class="option">threshold, t</samp></dt>
  15053. <dd><p>Set threshold value. Allowed range is from <code class="code">1</code> to <code class="code">100</code>.
  15054. Default value is <code class="code">10</code>. Higher values make clip detection less aggressive.
  15055. </p>
  15056. </dd>
  15057. <dt><samp class="option">hsize, n</samp></dt>
  15058. <dd><p>Set size of histogram used to detect clips. Allowed range is from <code class="code">100</code> to <code class="code">9999</code>.
  15059. Default value is <code class="code">1000</code>. Higher values make clip detection less aggressive.
  15060. </p>
  15061. </dd>
  15062. <dt><samp class="option">method, m</samp></dt>
  15063. <dd><p>Set overlap method.
  15064. </p>
  15065. <p>It accepts the following values:
  15066. </p><dl class="table">
  15067. <dt><samp class="option">add, a</samp></dt>
  15068. <dd><p>Select overlap-add method. Even not interpolated samples are slightly changed
  15069. with this method.
  15070. </p>
  15071. </dd>
  15072. <dt><samp class="option">save, s</samp></dt>
  15073. <dd><p>Select overlap-save method. Not interpolated samples remain unchanged.
  15074. </p></dd>
  15075. </dl>
  15076. <p>Default value is <code class="code">a</code>.
  15077. </p></dd>
  15078. </dl>
  15079. </div>
  15080. <div class="section-level-extent" id="adecorrelate">
  15081. <h3 class="section"><span>29.11 adecorrelate<a class="copiable-link" href="#adecorrelate"> &para;</a></span></h3>
  15082. <p>Apply decorrelation to input audio stream.
  15083. </p>
  15084. <p>The filter accepts the following options:
  15085. </p>
  15086. <dl class="table">
  15087. <dt><samp class="option">stages</samp></dt>
  15088. <dd><p>Set decorrelation stages of filtering. Allowed
  15089. range is from 1 to 16. Default value is 6.
  15090. </p>
  15091. </dd>
  15092. <dt><samp class="option">seed</samp></dt>
  15093. <dd><p>Set random seed used for setting delay in samples across channels.
  15094. </p></dd>
  15095. </dl>
  15096. </div>
  15097. <div class="section-level-extent" id="adelay">
  15098. <h3 class="section"><span>29.12 adelay<a class="copiable-link" href="#adelay"> &para;</a></span></h3>
  15099. <p>Delay one or more audio channels.
  15100. </p>
  15101. <p>Samples in delayed channel are filled with silence.
  15102. </p>
  15103. <p>The filter accepts the following option:
  15104. </p>
  15105. <dl class="table">
  15106. <dt><samp class="option">delays</samp></dt>
  15107. <dd><p>Set list of delays in milliseconds for each channel separated by &rsquo;|&rsquo;.
  15108. Unused delays will be silently ignored. If number of given delays is
  15109. smaller than number of channels all remaining channels will not be delayed.
  15110. If you want to delay exact number of samples, append &rsquo;S&rsquo; to number.
  15111. If you want instead to delay in seconds, append &rsquo;s&rsquo; to number.
  15112. </p>
  15113. </dd>
  15114. <dt><samp class="option">all</samp></dt>
  15115. <dd><p>Use last set delay for all remaining channels. By default is disabled.
  15116. This option if enabled changes how option <code class="code">delays</code> is interpreted.
  15117. </p></dd>
  15118. </dl>
  15119. <ul class="mini-toc">
  15120. <li><a href="#Examples-18" accesskey="1">Examples</a></li>
  15121. </ul>
  15122. <div class="subsection-level-extent" id="Examples-18">
  15123. <h4 class="subsection"><span>29.12.1 Examples<a class="copiable-link" href="#Examples-18"> &para;</a></span></h4>
  15124. <ul class="itemize mark-bullet">
  15125. <li>Delay first channel by 1.5 seconds, the third channel by 0.5 seconds and leave
  15126. the second channel (and any other channels that may be present) unchanged.
  15127. <div class="example">
  15128. <pre class="example-preformatted">adelay=1500|0|500
  15129. </pre></div>
  15130. </li><li>Delay second channel by 500 samples, the third channel by 700 samples and leave
  15131. the first channel (and any other channels that may be present) unchanged.
  15132. <div class="example">
  15133. <pre class="example-preformatted">adelay=0|500S|700S
  15134. </pre></div>
  15135. </li><li>Delay all channels by same number of samples:
  15136. <div class="example">
  15137. <pre class="example-preformatted">adelay=delays=64S:all=1
  15138. </pre></div>
  15139. </li></ul>
  15140. </div>
  15141. </div>
  15142. <div class="section-level-extent" id="adenorm">
  15143. <h3 class="section"><span>29.13 adenorm<a class="copiable-link" href="#adenorm"> &para;</a></span></h3>
  15144. <p>Remedy denormals in audio by adding extremely low-level noise.
  15145. </p>
  15146. <p>This filter shall be placed before any filter that can produce denormals.
  15147. </p>
  15148. <p>A description of the accepted parameters follows.
  15149. </p>
  15150. <dl class="table">
  15151. <dt><samp class="option">level</samp></dt>
  15152. <dd><p>Set level of added noise in dB. Default is <code class="code">-351</code>.
  15153. Allowed range is from -451 to -90.
  15154. </p>
  15155. </dd>
  15156. <dt><samp class="option">type</samp></dt>
  15157. <dd><p>Set type of added noise.
  15158. </p>
  15159. <dl class="table">
  15160. <dt><samp class="option">dc</samp></dt>
  15161. <dd><p>Add DC signal.
  15162. </p></dd>
  15163. <dt><samp class="option">ac</samp></dt>
  15164. <dd><p>Add AC signal.
  15165. </p></dd>
  15166. <dt><samp class="option">square</samp></dt>
  15167. <dd><p>Add square signal.
  15168. </p></dd>
  15169. <dt><samp class="option">pulse</samp></dt>
  15170. <dd><p>Add pulse signal.
  15171. </p></dd>
  15172. </dl>
  15173. <p>Default is <code class="code">dc</code>.
  15174. </p></dd>
  15175. </dl>
  15176. <ul class="mini-toc">
  15177. <li><a href="#Commands-2" accesskey="1">Commands</a></li>
  15178. </ul>
  15179. <div class="subsection-level-extent" id="Commands-2">
  15180. <h4 class="subsection"><span>29.13.1 Commands<a class="copiable-link" href="#Commands-2"> &para;</a></span></h4>
  15181. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  15182. </p>
  15183. </div>
  15184. </div>
  15185. <div class="section-level-extent" id="aderivative_002c-aintegral">
  15186. <h3 class="section"><span>29.14 aderivative, aintegral<a class="copiable-link" href="#aderivative_002c-aintegral"> &para;</a></span></h3>
  15187. <p>Compute derivative/integral of audio stream.
  15188. </p>
  15189. <p>Applying both filters one after another produces original audio.
  15190. </p>
  15191. </div>
  15192. <div class="section-level-extent" id="adrc">
  15193. <h3 class="section"><span>29.15 adrc<a class="copiable-link" href="#adrc"> &para;</a></span></h3>
  15194. <p>Apply spectral dynamic range controller filter to input audio stream.
  15195. </p>
  15196. <p>A description of the accepted options follows.
  15197. </p>
  15198. <dl class="table">
  15199. <dt><samp class="option">transfer</samp></dt>
  15200. <dd><p>Set the transfer expression.
  15201. </p>
  15202. <p>The expression can contain the following constants:
  15203. </p>
  15204. <dl class="table">
  15205. <dt><samp class="option">ch</samp></dt>
  15206. <dd><p>current channel number
  15207. </p>
  15208. </dd>
  15209. <dt><samp class="option">sn</samp></dt>
  15210. <dd><p>current sample number
  15211. </p>
  15212. </dd>
  15213. <dt><samp class="option">nb_channels</samp></dt>
  15214. <dd><p>number of channels
  15215. </p>
  15216. </dd>
  15217. <dt><samp class="option">t</samp></dt>
  15218. <dd><p>timestamp expressed in seconds
  15219. </p>
  15220. </dd>
  15221. <dt><samp class="option">sr</samp></dt>
  15222. <dd><p>sample rate
  15223. </p>
  15224. </dd>
  15225. <dt><samp class="option">p</samp></dt>
  15226. <dd><p>current frequency power value, in dB
  15227. </p>
  15228. </dd>
  15229. <dt><samp class="option">f</samp></dt>
  15230. <dd><p>current frequency in Hz
  15231. </p></dd>
  15232. </dl>
  15233. <p>Default value is <code class="code">p</code>.
  15234. </p>
  15235. </dd>
  15236. <dt><samp class="option">attack</samp></dt>
  15237. <dd><p>Set the attack in milliseconds. Default is <code class="code">50</code> milliseconds.
  15238. Allowed range is from 1 to 1000 milliseconds.
  15239. </p></dd>
  15240. <dt><samp class="option">release</samp></dt>
  15241. <dd><p>Set the release in milliseconds. Default is <code class="code">100</code> milliseconds.
  15242. Allowed range is from 5 to 2000 milliseconds.
  15243. </p></dd>
  15244. <dt><samp class="option">channels</samp></dt>
  15245. <dd><p>Set which channels to filter, by default <code class="code">all</code> channels in audio stream are filtered.
  15246. </p></dd>
  15247. </dl>
  15248. <ul class="mini-toc">
  15249. <li><a href="#Commands-3" accesskey="1">Commands</a></li>
  15250. <li><a href="#Examples-19" accesskey="2">Examples</a></li>
  15251. </ul>
  15252. <div class="subsection-level-extent" id="Commands-3">
  15253. <h4 class="subsection"><span>29.15.1 Commands<a class="copiable-link" href="#Commands-3"> &para;</a></span></h4>
  15254. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  15255. </p>
  15256. </div>
  15257. <div class="subsection-level-extent" id="Examples-19">
  15258. <h4 class="subsection"><span>29.15.2 Examples<a class="copiable-link" href="#Examples-19"> &para;</a></span></h4>
  15259. <ul class="itemize mark-bullet">
  15260. <li>Apply spectral compression to all frequencies with threshold of -50 dB and 1:6 ratio:
  15261. <div class="example">
  15262. <pre class="example-preformatted">adrc=transfer='if(gt(p,-50),-50+(p-(-50))/6,p)':attack=50:release=100
  15263. </pre></div>
  15264. </li><li>Similar to above but with 1:2 ratio and filtering only front center channel:
  15265. <div class="example">
  15266. <pre class="example-preformatted">adrc=transfer='if(gt(p,-50),-50+(p-(-50))/2,p)':attack=50:release=100:channels=FC
  15267. </pre></div>
  15268. </li><li>Apply spectral noise gate to all frequencies with threshold of -85 dB and with short attack time and short release time:
  15269. <div class="example">
  15270. <pre class="example-preformatted">adrc=transfer='if(lte(p,-85),p-800,p)':attack=1:release=5
  15271. </pre></div>
  15272. </li><li>Apply spectral expansion to all frequencies with threshold of -10 dB and 1:2 ratio:
  15273. <div class="example">
  15274. <pre class="example-preformatted">adrc=transfer='if(lt(p,-10),-10+(p-(-10))*2,p)':attack=50:release=100
  15275. </pre></div>
  15276. </li><li>Apply limiter to max -60 dB to all frequencies, with attack of 2 ms and release of 10 ms:
  15277. <div class="example">
  15278. <pre class="example-preformatted">adrc=transfer='min(p,-60)':attack=2:release=10
  15279. </pre></div>
  15280. </li></ul>
  15281. </div>
  15282. </div>
  15283. <div class="section-level-extent" id="adynamicequalizer">
  15284. <h3 class="section"><span>29.16 adynamicequalizer<a class="copiable-link" href="#adynamicequalizer"> &para;</a></span></h3>
  15285. <p>Apply dynamic equalization to input audio stream.
  15286. </p>
  15287. <p>A description of the accepted options follows.
  15288. </p>
  15289. <dl class="table">
  15290. <dt><samp class="option">threshold</samp></dt>
  15291. <dd><p>Set the detection threshold used to trigger equalization.
  15292. Threshold detection is using detection filter.
  15293. Default value is 0. Allowed range is from 0 to 100.
  15294. </p>
  15295. </dd>
  15296. <dt><samp class="option">dfrequency</samp></dt>
  15297. <dd><p>Set the detection frequency in Hz used for detection filter used to trigger equalization.
  15298. Default value is 1000 Hz. Allowed range is between 2 and 1000000 Hz.
  15299. </p>
  15300. </dd>
  15301. <dt><samp class="option">dqfactor</samp></dt>
  15302. <dd><p>Set the detection resonance factor for detection filter used to trigger equalization.
  15303. Default value is 1. Allowed range is from 0.001 to 1000.
  15304. </p>
  15305. </dd>
  15306. <dt><samp class="option">tfrequency</samp></dt>
  15307. <dd><p>Set the target frequency of equalization filter.
  15308. Default value is 1000 Hz. Allowed range is between 2 and 1000000 Hz.
  15309. </p>
  15310. </dd>
  15311. <dt><samp class="option">tqfactor</samp></dt>
  15312. <dd><p>Set the target resonance factor for target equalization filter.
  15313. Default value is 1. Allowed range is from 0.001 to 1000.
  15314. </p>
  15315. </dd>
  15316. <dt><samp class="option">attack</samp></dt>
  15317. <dd><p>Set the amount of milliseconds the signal from detection has to rise above
  15318. the detection threshold before equalization starts.
  15319. Default is 20. Allowed range is between 1 and 2000.
  15320. </p>
  15321. </dd>
  15322. <dt><samp class="option">release</samp></dt>
  15323. <dd><p>Set the amount of milliseconds the signal from detection has to fall below the
  15324. detection threshold before equalization ends.
  15325. Default is 200. Allowed range is between 1 and 2000.
  15326. </p>
  15327. </dd>
  15328. <dt><samp class="option">ratio</samp></dt>
  15329. <dd><p>Set the ratio by which the equalization gain is raised.
  15330. Default is 1. Allowed range is between 0 and 30.
  15331. </p>
  15332. </dd>
  15333. <dt><samp class="option">makeup</samp></dt>
  15334. <dd><p>Set the makeup offset by which the equalization gain is raised.
  15335. Default is 0. Allowed range is between 0 and 100.
  15336. </p>
  15337. </dd>
  15338. <dt><samp class="option">range</samp></dt>
  15339. <dd><p>Set the max allowed cut/boost amount. Default is 50.
  15340. Allowed range is from 1 to 200.
  15341. </p>
  15342. </dd>
  15343. <dt><samp class="option">mode</samp></dt>
  15344. <dd><p>Set the mode of filter operation, can be one of the following:
  15345. </p>
  15346. <dl class="table">
  15347. <dt>&lsquo;<samp class="samp">listen</samp>&rsquo;</dt>
  15348. <dd><p>Output only isolated detection signal.
  15349. </p></dd>
  15350. <dt>&lsquo;<samp class="samp">cutbelow</samp>&rsquo;</dt>
  15351. <dd><p>Cut frequencies below detection threshold.
  15352. </p></dd>
  15353. <dt>&lsquo;<samp class="samp">cutabove</samp>&rsquo;</dt>
  15354. <dd><p>Cut frequencies above detection threshold.
  15355. </p></dd>
  15356. <dt>&lsquo;<samp class="samp">boostbelow</samp>&rsquo;</dt>
  15357. <dd><p>Boost frequencies below detection threshold.
  15358. </p></dd>
  15359. <dt>&lsquo;<samp class="samp">boostabove</samp>&rsquo;</dt>
  15360. <dd><p>Boost frequencies above detection threshold.
  15361. </p></dd>
  15362. </dl>
  15363. <p>Default mode is &lsquo;<samp class="samp">cutbelow</samp>&rsquo;.
  15364. </p>
  15365. </dd>
  15366. <dt><samp class="option">dftype</samp></dt>
  15367. <dd><p>Set the type of detection filter, can be one of the following:
  15368. </p>
  15369. <dl class="table">
  15370. <dt>&lsquo;<samp class="samp">bandpass</samp>&rsquo;</dt>
  15371. <dt>&lsquo;<samp class="samp">lowpass</samp>&rsquo;</dt>
  15372. <dt>&lsquo;<samp class="samp">highpass</samp>&rsquo;</dt>
  15373. <dt>&lsquo;<samp class="samp">peak</samp>&rsquo;</dt>
  15374. </dl>
  15375. <p>Default type is &lsquo;<samp class="samp">bandpass</samp>&rsquo;.
  15376. </p>
  15377. </dd>
  15378. <dt><samp class="option">tftype</samp></dt>
  15379. <dd><p>Set the type of target filter, can be one of the following:
  15380. </p>
  15381. <dl class="table">
  15382. <dt>&lsquo;<samp class="samp">bell</samp>&rsquo;</dt>
  15383. <dt>&lsquo;<samp class="samp">lowshelf</samp>&rsquo;</dt>
  15384. <dt>&lsquo;<samp class="samp">highshelf</samp>&rsquo;</dt>
  15385. </dl>
  15386. <p>Default type is &lsquo;<samp class="samp">bell</samp>&rsquo;.
  15387. </p>
  15388. </dd>
  15389. <dt><samp class="option">auto</samp></dt>
  15390. <dd><p>Automatically gather threshold from detection filter. By default
  15391. is &lsquo;<samp class="samp">disabled</samp>&rsquo;.
  15392. This option is useful to detect threshold in certain time frame of
  15393. input audio stream, in such case option value is changed at runtime.
  15394. </p>
  15395. <p>Available values are:
  15396. </p><dl class="table">
  15397. <dt>&lsquo;<samp class="samp">disabled</samp>&rsquo;</dt>
  15398. <dd><p>Disable using automatically gathered threshold value.
  15399. </p></dd>
  15400. <dt>&lsquo;<samp class="samp">off</samp>&rsquo;</dt>
  15401. <dd><p>Stop picking threshold value.
  15402. </p></dd>
  15403. <dt>&lsquo;<samp class="samp">on</samp>&rsquo;</dt>
  15404. <dd><p>Start picking threshold value.
  15405. </p></dd>
  15406. <dt>&lsquo;<samp class="samp">adaptive</samp>&rsquo;</dt>
  15407. <dd><p>Adaptively pick threshold value, by calculating sliding window entropy.
  15408. </p></dd>
  15409. </dl>
  15410. </dd>
  15411. <dt><samp class="option">precision</samp></dt>
  15412. <dd><p>Set which precision to use when processing samples.
  15413. </p>
  15414. <dl class="table">
  15415. <dt><samp class="option">auto</samp></dt>
  15416. <dd><p>Auto pick internal sample format depending on other filters.
  15417. </p>
  15418. </dd>
  15419. <dt><samp class="option">float</samp></dt>
  15420. <dd><p>Always use single-floating point precision sample format.
  15421. </p>
  15422. </dd>
  15423. <dt><samp class="option">double</samp></dt>
  15424. <dd><p>Always use double-floating point precision sample format.
  15425. </p></dd>
  15426. </dl>
  15427. </dd>
  15428. </dl>
  15429. <ul class="mini-toc">
  15430. <li><a href="#Commands-4" accesskey="1">Commands</a></li>
  15431. </ul>
  15432. <div class="subsection-level-extent" id="Commands-4">
  15433. <h4 class="subsection"><span>29.16.1 Commands<a class="copiable-link" href="#Commands-4"> &para;</a></span></h4>
  15434. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  15435. </p>
  15436. </div>
  15437. </div>
  15438. <div class="section-level-extent" id="adynamicsmooth">
  15439. <h3 class="section"><span>29.17 adynamicsmooth<a class="copiable-link" href="#adynamicsmooth"> &para;</a></span></h3>
  15440. <p>Apply dynamic smoothing to input audio stream.
  15441. </p>
  15442. <p>A description of the accepted options follows.
  15443. </p>
  15444. <dl class="table">
  15445. <dt><samp class="option">sensitivity</samp></dt>
  15446. <dd><p>Set an amount of sensitivity to frequency fluctations. Default is 2.
  15447. Allowed range is from 0 to 1e+06.
  15448. </p>
  15449. </dd>
  15450. <dt><samp class="option">basefreq</samp></dt>
  15451. <dd><p>Set a base frequency for smoothing. Default value is 22050.
  15452. Allowed range is from 2 to 1e+06.
  15453. </p></dd>
  15454. </dl>
  15455. <ul class="mini-toc">
  15456. <li><a href="#Commands-5" accesskey="1">Commands</a></li>
  15457. </ul>
  15458. <div class="subsection-level-extent" id="Commands-5">
  15459. <h4 class="subsection"><span>29.17.1 Commands<a class="copiable-link" href="#Commands-5"> &para;</a></span></h4>
  15460. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  15461. </p>
  15462. </div>
  15463. </div>
  15464. <div class="section-level-extent" id="aecho">
  15465. <h3 class="section"><span>29.18 aecho<a class="copiable-link" href="#aecho"> &para;</a></span></h3>
  15466. <p>Apply echoing to the input audio.
  15467. </p>
  15468. <p>Echoes are reflected sound and can occur naturally amongst mountains
  15469. (and sometimes large buildings) when talking or shouting; digital echo
  15470. effects emulate this behaviour and are often used to help fill out the
  15471. sound of a single instrument or vocal. The time difference between the
  15472. original signal and the reflection is the <code class="code">delay</code>, and the
  15473. loudness of the reflected signal is the <code class="code">decay</code>.
  15474. Multiple echoes can have different delays and decays.
  15475. </p>
  15476. <p>A description of the accepted parameters follows.
  15477. </p>
  15478. <dl class="table">
  15479. <dt><samp class="option">in_gain</samp></dt>
  15480. <dd><p>Set input gain of reflected signal. Default is <code class="code">0.6</code>.
  15481. </p>
  15482. </dd>
  15483. <dt><samp class="option">out_gain</samp></dt>
  15484. <dd><p>Set output gain of reflected signal. Default is <code class="code">0.3</code>.
  15485. </p>
  15486. </dd>
  15487. <dt><samp class="option">delays</samp></dt>
  15488. <dd><p>Set list of time intervals in milliseconds between original signal and reflections
  15489. separated by &rsquo;|&rsquo;. Allowed range for each <code class="code">delay</code> is <code class="code">(0 - 90000.0]</code>.
  15490. Default is <code class="code">1000</code>.
  15491. </p>
  15492. </dd>
  15493. <dt><samp class="option">decays</samp></dt>
  15494. <dd><p>Set list of loudness of reflected signals separated by &rsquo;|&rsquo;.
  15495. Allowed range for each <code class="code">decay</code> is <code class="code">(0 - 1.0]</code>.
  15496. Default is <code class="code">0.5</code>.
  15497. </p></dd>
  15498. </dl>
  15499. <ul class="mini-toc">
  15500. <li><a href="#Examples-20" accesskey="1">Examples</a></li>
  15501. </ul>
  15502. <div class="subsection-level-extent" id="Examples-20">
  15503. <h4 class="subsection"><span>29.18.1 Examples<a class="copiable-link" href="#Examples-20"> &para;</a></span></h4>
  15504. <ul class="itemize mark-bullet">
  15505. <li>Make it sound as if there are twice as many instruments as are actually playing:
  15506. <div class="example">
  15507. <pre class="example-preformatted">aecho=0.8:0.88:60:0.4
  15508. </pre></div>
  15509. </li><li>If delay is very short, then it sounds like a (metallic) robot playing music:
  15510. <div class="example">
  15511. <pre class="example-preformatted">aecho=0.8:0.88:6:0.4
  15512. </pre></div>
  15513. </li><li>A longer delay will sound like an open air concert in the mountains:
  15514. <div class="example">
  15515. <pre class="example-preformatted">aecho=0.8:0.9:1000:0.3
  15516. </pre></div>
  15517. </li><li>Same as above but with one more mountain:
  15518. <div class="example">
  15519. <pre class="example-preformatted">aecho=0.8:0.9:1000|1800:0.3|0.25
  15520. </pre></div>
  15521. </li></ul>
  15522. </div>
  15523. </div>
  15524. <div class="section-level-extent" id="aemphasis">
  15525. <h3 class="section"><span>29.19 aemphasis<a class="copiable-link" href="#aemphasis"> &para;</a></span></h3>
  15526. <p>Audio emphasis filter creates or restores material directly taken from LPs or
  15527. emphased CDs with different filter curves. E.g. to store music on vinyl the
  15528. signal has to be altered by a filter first to even out the disadvantages of
  15529. this recording medium.
  15530. Once the material is played back the inverse filter has to be applied to
  15531. restore the distortion of the frequency response.
  15532. </p>
  15533. <p>The filter accepts the following options:
  15534. </p>
  15535. <dl class="table">
  15536. <dt><samp class="option">level_in</samp></dt>
  15537. <dd><p>Set input gain.
  15538. </p>
  15539. </dd>
  15540. <dt><samp class="option">level_out</samp></dt>
  15541. <dd><p>Set output gain.
  15542. </p>
  15543. </dd>
  15544. <dt><samp class="option">mode</samp></dt>
  15545. <dd><p>Set filter mode. For restoring material use <code class="code">reproduction</code> mode, otherwise
  15546. use <code class="code">production</code> mode. Default is <code class="code">reproduction</code> mode.
  15547. </p>
  15548. </dd>
  15549. <dt><samp class="option">type</samp></dt>
  15550. <dd><p>Set filter type. Selects medium. Can be one of the following:
  15551. </p>
  15552. <dl class="table">
  15553. <dt><samp class="option">col</samp></dt>
  15554. <dd><p>select Columbia.
  15555. </p></dd>
  15556. <dt><samp class="option">emi</samp></dt>
  15557. <dd><p>select EMI.
  15558. </p></dd>
  15559. <dt><samp class="option">bsi</samp></dt>
  15560. <dd><p>select BSI (78RPM).
  15561. </p></dd>
  15562. <dt><samp class="option">riaa</samp></dt>
  15563. <dd><p>select RIAA.
  15564. </p></dd>
  15565. <dt><samp class="option">cd</samp></dt>
  15566. <dd><p>select Compact Disc (CD).
  15567. </p></dd>
  15568. <dt><samp class="option">50fm</samp></dt>
  15569. <dd><p>select 50µs (FM).
  15570. </p></dd>
  15571. <dt><samp class="option">75fm</samp></dt>
  15572. <dd><p>select 75µs (FM).
  15573. </p></dd>
  15574. <dt><samp class="option">50kf</samp></dt>
  15575. <dd><p>select 50µs (FM-KF).
  15576. </p></dd>
  15577. <dt><samp class="option">75kf</samp></dt>
  15578. <dd><p>select 75µs (FM-KF).
  15579. </p></dd>
  15580. </dl>
  15581. </dd>
  15582. </dl>
  15583. <ul class="mini-toc">
  15584. <li><a href="#Commands-6" accesskey="1">Commands</a></li>
  15585. </ul>
  15586. <div class="subsection-level-extent" id="Commands-6">
  15587. <h4 class="subsection"><span>29.19.1 Commands<a class="copiable-link" href="#Commands-6"> &para;</a></span></h4>
  15588. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  15589. </p>
  15590. </div>
  15591. </div>
  15592. <div class="section-level-extent" id="aeval">
  15593. <h3 class="section"><span>29.20 aeval<a class="copiable-link" href="#aeval"> &para;</a></span></h3>
  15594. <p>Modify an audio signal according to the specified expressions.
  15595. </p>
  15596. <p>This filter accepts one or more expressions (one for each channel),
  15597. which are evaluated and used to modify a corresponding audio signal.
  15598. </p>
  15599. <p>It accepts the following parameters:
  15600. </p>
  15601. <dl class="table">
  15602. <dt><samp class="option">exprs</samp></dt>
  15603. <dd><p>Set the &rsquo;|&rsquo;-separated expressions list for each separate channel. If
  15604. the number of input channels is greater than the number of
  15605. expressions, the last specified expression is used for the remaining
  15606. output channels.
  15607. </p>
  15608. </dd>
  15609. <dt><samp class="option">channel_layout, c</samp></dt>
  15610. <dd><p>Set output channel layout. If not specified, the channel layout is
  15611. specified by the number of expressions. If set to &lsquo;<samp class="samp">same</samp>&rsquo;, it will
  15612. use by default the same input channel layout.
  15613. </p></dd>
  15614. </dl>
  15615. <p>Each expression in <var class="var">exprs</var> can contain the following constants and functions:
  15616. </p>
  15617. <dl class="table">
  15618. <dt><samp class="option">ch</samp></dt>
  15619. <dd><p>channel number of the current expression
  15620. </p>
  15621. </dd>
  15622. <dt><samp class="option">n</samp></dt>
  15623. <dd><p>number of the evaluated sample, starting from 0
  15624. </p>
  15625. </dd>
  15626. <dt><samp class="option">s</samp></dt>
  15627. <dd><p>sample rate
  15628. </p>
  15629. </dd>
  15630. <dt><samp class="option">t</samp></dt>
  15631. <dd><p>time of the evaluated sample expressed in seconds
  15632. </p>
  15633. </dd>
  15634. <dt><samp class="option">nb_in_channels</samp></dt>
  15635. <dt><samp class="option">nb_out_channels</samp></dt>
  15636. <dd><p>input and output number of channels
  15637. </p>
  15638. </dd>
  15639. <dt><samp class="option">val(CH)</samp></dt>
  15640. <dd><p>the value of input channel with number <var class="var">CH</var>
  15641. </p></dd>
  15642. </dl>
  15643. <p>Note: this filter is slow. For faster processing you should use a
  15644. dedicated filter.
  15645. </p>
  15646. <ul class="mini-toc">
  15647. <li><a href="#Examples-21" accesskey="1">Examples</a></li>
  15648. </ul>
  15649. <div class="subsection-level-extent" id="Examples-21">
  15650. <h4 class="subsection"><span>29.20.1 Examples<a class="copiable-link" href="#Examples-21"> &para;</a></span></h4>
  15651. <ul class="itemize mark-bullet">
  15652. <li>Half volume:
  15653. <div class="example">
  15654. <pre class="example-preformatted">aeval=val(ch)/2:c=same
  15655. </pre></div>
  15656. </li><li>Invert phase of the second channel:
  15657. <div class="example">
  15658. <pre class="example-preformatted">aeval=val(0)|-val(1)
  15659. </pre></div>
  15660. </li></ul>
  15661. </div>
  15662. </div>
  15663. <div class="section-level-extent" id="aexciter">
  15664. <h3 class="section"><span>29.21 aexciter<a class="copiable-link" href="#aexciter"> &para;</a></span></h3>
  15665. <p>An exciter is used to produce high sound that is not present in the
  15666. original signal. This is done by creating harmonic distortions of the
  15667. signal which are restricted in range and added to the original signal.
  15668. An Exciter raises the upper end of an audio signal without simply raising
  15669. the higher frequencies like an equalizer would do to create a more
  15670. &quot;crisp&quot; or &quot;brilliant&quot; sound.
  15671. </p>
  15672. <p>The filter accepts the following options:
  15673. </p>
  15674. <dl class="table">
  15675. <dt><samp class="option">level_in</samp></dt>
  15676. <dd><p>Set input level prior processing of signal.
  15677. Allowed range is from 0 to 64.
  15678. Default value is 1.
  15679. </p>
  15680. </dd>
  15681. <dt><samp class="option">level_out</samp></dt>
  15682. <dd><p>Set output level after processing of signal.
  15683. Allowed range is from 0 to 64.
  15684. Default value is 1.
  15685. </p>
  15686. </dd>
  15687. <dt><samp class="option">amount</samp></dt>
  15688. <dd><p>Set the amount of harmonics added to original signal.
  15689. Allowed range is from 0 to 64.
  15690. Default value is 1.
  15691. </p>
  15692. </dd>
  15693. <dt><samp class="option">drive</samp></dt>
  15694. <dd><p>Set the amount of newly created harmonics.
  15695. Allowed range is from 0.1 to 10.
  15696. Default value is 8.5.
  15697. </p>
  15698. </dd>
  15699. <dt><samp class="option">blend</samp></dt>
  15700. <dd><p>Set the octave of newly created harmonics.
  15701. Allowed range is from -10 to 10.
  15702. Default value is 0.
  15703. </p>
  15704. </dd>
  15705. <dt><samp class="option">freq</samp></dt>
  15706. <dd><p>Set the lower frequency limit of producing harmonics in Hz.
  15707. Allowed range is from 2000 to 12000 Hz.
  15708. Default is 7500 Hz.
  15709. </p>
  15710. </dd>
  15711. <dt><samp class="option">ceil</samp></dt>
  15712. <dd><p>Set the upper frequency limit of producing harmonics.
  15713. Allowed range is from 9999 to 20000 Hz.
  15714. If value is lower than 10000 Hz no limit is applied.
  15715. </p>
  15716. </dd>
  15717. <dt><samp class="option">listen</samp></dt>
  15718. <dd><p>Mute the original signal and output only added harmonics.
  15719. By default is disabled.
  15720. </p></dd>
  15721. </dl>
  15722. <ul class="mini-toc">
  15723. <li><a href="#Commands-7" accesskey="1">Commands</a></li>
  15724. </ul>
  15725. <div class="subsection-level-extent" id="Commands-7">
  15726. <h4 class="subsection"><span>29.21.1 Commands<a class="copiable-link" href="#Commands-7"> &para;</a></span></h4>
  15727. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  15728. </p>
  15729. <a class="anchor" id="afade"></a></div>
  15730. </div>
  15731. <div class="section-level-extent" id="afade-1">
  15732. <h3 class="section"><span>29.22 afade<a class="copiable-link" href="#afade-1"> &para;</a></span></h3>
  15733. <p>Apply fade-in/out effect to input audio.
  15734. </p>
  15735. <p>A description of the accepted parameters follows.
  15736. </p>
  15737. <dl class="table">
  15738. <dt><samp class="option">type, t</samp></dt>
  15739. <dd><p>Specify the effect type, can be either <code class="code">in</code> for fade-in, or
  15740. <code class="code">out</code> for a fade-out effect. Default is <code class="code">in</code>.
  15741. </p>
  15742. </dd>
  15743. <dt><samp class="option">start_sample, ss</samp></dt>
  15744. <dd><p>Specify the number of the start sample for starting to apply the fade
  15745. effect. Default is 0.
  15746. </p>
  15747. </dd>
  15748. <dt><samp class="option">nb_samples, ns</samp></dt>
  15749. <dd><p>Specify the number of samples for which the fade effect has to last. At
  15750. the end of the fade-in effect the output audio will have the same
  15751. volume as the input audio, at the end of the fade-out transition
  15752. the output audio will be silence. Default is 44100.
  15753. </p>
  15754. </dd>
  15755. <dt><samp class="option">start_time, st</samp></dt>
  15756. <dd><p>Specify the start time of the fade effect. Default is 0.
  15757. The value must be specified as a time duration; see
  15758. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  15759. for the accepted syntax.
  15760. If set this option is used instead of <var class="var">start_sample</var>.
  15761. </p>
  15762. </dd>
  15763. <dt><samp class="option">duration, d</samp></dt>
  15764. <dd><p>Specify the duration of the fade effect. See
  15765. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  15766. for the accepted syntax.
  15767. At the end of the fade-in effect the output audio will have the same
  15768. volume as the input audio, at the end of the fade-out transition
  15769. the output audio will be silence.
  15770. By default the duration is determined by <var class="var">nb_samples</var>.
  15771. If set this option is used instead of <var class="var">nb_samples</var>.
  15772. </p>
  15773. </dd>
  15774. <dt><samp class="option">curve</samp></dt>
  15775. <dd><p>Set curve for fade transition.
  15776. </p>
  15777. <p>It accepts the following values:
  15778. </p><dl class="table">
  15779. <dt><samp class="option">tri</samp></dt>
  15780. <dd><p>select triangular, linear slope (default)
  15781. </p></dd>
  15782. <dt><samp class="option">qsin</samp></dt>
  15783. <dd><p>select quarter of sine wave
  15784. </p></dd>
  15785. <dt><samp class="option">hsin</samp></dt>
  15786. <dd><p>select half of sine wave
  15787. </p></dd>
  15788. <dt><samp class="option">esin</samp></dt>
  15789. <dd><p>select exponential sine wave
  15790. </p></dd>
  15791. <dt><samp class="option">log</samp></dt>
  15792. <dd><p>select logarithmic
  15793. </p></dd>
  15794. <dt><samp class="option">ipar</samp></dt>
  15795. <dd><p>select inverted parabola
  15796. </p></dd>
  15797. <dt><samp class="option">qua</samp></dt>
  15798. <dd><p>select quadratic
  15799. </p></dd>
  15800. <dt><samp class="option">cub</samp></dt>
  15801. <dd><p>select cubic
  15802. </p></dd>
  15803. <dt><samp class="option">squ</samp></dt>
  15804. <dd><p>select square root
  15805. </p></dd>
  15806. <dt><samp class="option">cbr</samp></dt>
  15807. <dd><p>select cubic root
  15808. </p></dd>
  15809. <dt><samp class="option">par</samp></dt>
  15810. <dd><p>select parabola
  15811. </p></dd>
  15812. <dt><samp class="option">exp</samp></dt>
  15813. <dd><p>select exponential
  15814. </p></dd>
  15815. <dt><samp class="option">iqsin</samp></dt>
  15816. <dd><p>select inverted quarter of sine wave
  15817. </p></dd>
  15818. <dt><samp class="option">ihsin</samp></dt>
  15819. <dd><p>select inverted half of sine wave
  15820. </p></dd>
  15821. <dt><samp class="option">dese</samp></dt>
  15822. <dd><p>select double-exponential seat
  15823. </p></dd>
  15824. <dt><samp class="option">desi</samp></dt>
  15825. <dd><p>select double-exponential sigmoid
  15826. </p></dd>
  15827. <dt><samp class="option">losi</samp></dt>
  15828. <dd><p>select logistic sigmoid
  15829. </p></dd>
  15830. <dt><samp class="option">sinc</samp></dt>
  15831. <dd><p>select sine cardinal function
  15832. </p></dd>
  15833. <dt><samp class="option">isinc</samp></dt>
  15834. <dd><p>select inverted sine cardinal function
  15835. </p></dd>
  15836. <dt><samp class="option">quat</samp></dt>
  15837. <dd><p>select quartic
  15838. </p></dd>
  15839. <dt><samp class="option">quatr</samp></dt>
  15840. <dd><p>select quartic root
  15841. </p></dd>
  15842. <dt><samp class="option">qsin2</samp></dt>
  15843. <dd><p>select squared quarter of sine wave
  15844. </p></dd>
  15845. <dt><samp class="option">hsin2</samp></dt>
  15846. <dd><p>select squared half of sine wave
  15847. </p></dd>
  15848. <dt><samp class="option">nofade</samp></dt>
  15849. <dd><p>no fade applied
  15850. </p></dd>
  15851. </dl>
  15852. </dd>
  15853. <dt><samp class="option">silence</samp></dt>
  15854. <dd><p>Set the initial gain for fade-in or final gain for fade-out.
  15855. Default value is <code class="code">0.0</code>.
  15856. </p>
  15857. </dd>
  15858. <dt><samp class="option">unity</samp></dt>
  15859. <dd><p>Set the initial gain for fade-out or final gain for fade-in.
  15860. Default value is <code class="code">1.0</code>.
  15861. </p></dd>
  15862. </dl>
  15863. <ul class="mini-toc">
  15864. <li><a href="#Commands-8" accesskey="1">Commands</a></li>
  15865. <li><a href="#Examples-22" accesskey="2">Examples</a></li>
  15866. </ul>
  15867. <div class="subsection-level-extent" id="Commands-8">
  15868. <h4 class="subsection"><span>29.22.1 Commands<a class="copiable-link" href="#Commands-8"> &para;</a></span></h4>
  15869. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  15870. </p>
  15871. </div>
  15872. <div class="subsection-level-extent" id="Examples-22">
  15873. <h4 class="subsection"><span>29.22.2 Examples<a class="copiable-link" href="#Examples-22"> &para;</a></span></h4>
  15874. <ul class="itemize mark-bullet">
  15875. <li>Fade in first 15 seconds of audio:
  15876. <div class="example">
  15877. <pre class="example-preformatted">afade=t=in:ss=0:d=15
  15878. </pre></div>
  15879. </li><li>Fade out last 25 seconds of a 900 seconds audio:
  15880. <div class="example">
  15881. <pre class="example-preformatted">afade=t=out:st=875:d=25
  15882. </pre></div>
  15883. </li></ul>
  15884. </div>
  15885. </div>
  15886. <div class="section-level-extent" id="afftdn">
  15887. <h3 class="section"><span>29.23 afftdn<a class="copiable-link" href="#afftdn"> &para;</a></span></h3>
  15888. <p>Denoise audio samples with FFT.
  15889. </p>
  15890. <p>A description of the accepted parameters follows.
  15891. </p>
  15892. <dl class="table">
  15893. <dt><samp class="option">noise_reduction, nr</samp></dt>
  15894. <dd><p>Set the noise reduction in dB, allowed range is 0.01 to 97.
  15895. Default value is 12 dB.
  15896. </p>
  15897. </dd>
  15898. <dt><samp class="option">noise_floor, nf</samp></dt>
  15899. <dd><p>Set the noise floor in dB, allowed range is -80 to -20.
  15900. Default value is -50 dB.
  15901. </p>
  15902. </dd>
  15903. <dt><samp class="option">noise_type, nt</samp></dt>
  15904. <dd><p>Set the noise type.
  15905. </p>
  15906. <p>It accepts the following values:
  15907. </p><dl class="table">
  15908. <dt><samp class="option">white, w</samp></dt>
  15909. <dd><p>Select white noise.
  15910. </p>
  15911. </dd>
  15912. <dt><samp class="option">vinyl, v</samp></dt>
  15913. <dd><p>Select vinyl noise.
  15914. </p>
  15915. </dd>
  15916. <dt><samp class="option">shellac, s</samp></dt>
  15917. <dd><p>Select shellac noise.
  15918. </p>
  15919. </dd>
  15920. <dt><samp class="option">custom, c</samp></dt>
  15921. <dd><p>Select custom noise, defined in <code class="code">bn</code> option.
  15922. </p>
  15923. <p>Default value is white noise.
  15924. </p></dd>
  15925. </dl>
  15926. </dd>
  15927. <dt><samp class="option">band_noise, bn</samp></dt>
  15928. <dd><p>Set custom band noise profile for every one of 15 bands.
  15929. Bands are separated by &rsquo; &rsquo; or &rsquo;|&rsquo;.
  15930. </p>
  15931. </dd>
  15932. <dt><samp class="option">residual_floor, rf</samp></dt>
  15933. <dd><p>Set the residual floor in dB, allowed range is -80 to -20.
  15934. Default value is -38 dB.
  15935. </p>
  15936. </dd>
  15937. <dt><samp class="option">track_noise, tn</samp></dt>
  15938. <dd><p>Enable noise floor tracking. By default is disabled.
  15939. With this enabled, noise floor is automatically adjusted.
  15940. </p>
  15941. </dd>
  15942. <dt><samp class="option">track_residual, tr</samp></dt>
  15943. <dd><p>Enable residual tracking. By default is disabled.
  15944. </p>
  15945. </dd>
  15946. <dt><samp class="option">output_mode, om</samp></dt>
  15947. <dd><p>Set the output mode.
  15948. </p>
  15949. <p>It accepts the following values:
  15950. </p><dl class="table">
  15951. <dt><samp class="option">input, i</samp></dt>
  15952. <dd><p>Pass input unchanged.
  15953. </p>
  15954. </dd>
  15955. <dt><samp class="option">output, o</samp></dt>
  15956. <dd><p>Pass noise filtered out.
  15957. </p>
  15958. </dd>
  15959. <dt><samp class="option">noise, n</samp></dt>
  15960. <dd><p>Pass only noise.
  15961. </p>
  15962. <p>Default value is <var class="var">output</var>.
  15963. </p></dd>
  15964. </dl>
  15965. </dd>
  15966. <dt><samp class="option">adaptivity, ad</samp></dt>
  15967. <dd><p>Set the adaptivity factor, used how fast to adapt gains adjustments per
  15968. each frequency bin. Value <var class="var">0</var> enables instant adaptation, while higher values
  15969. react much slower.
  15970. Allowed range is from <var class="var">0</var> to <var class="var">1</var>. Default value is <var class="var">0.5</var>.
  15971. </p>
  15972. </dd>
  15973. <dt><samp class="option">floor_offset, fo</samp></dt>
  15974. <dd><p>Set the noise floor offset factor. This option is used to adjust offset applied to measured
  15975. noise floor. It is only effective when noise floor tracking is enabled.
  15976. Allowed range is from <var class="var">-2.0</var> to <var class="var">2.0</var>. Default value is <var class="var">1.0</var>.
  15977. </p>
  15978. </dd>
  15979. <dt><samp class="option">noise_link, nl</samp></dt>
  15980. <dd><p>Set the noise link used for multichannel audio.
  15981. </p>
  15982. <p>It accepts the following values:
  15983. </p><dl class="table">
  15984. <dt><samp class="option">none</samp></dt>
  15985. <dd><p>Use unchanged channel&rsquo;s noise floor.
  15986. </p>
  15987. </dd>
  15988. <dt><samp class="option">min</samp></dt>
  15989. <dd><p>Use measured min noise floor of all channels.
  15990. </p>
  15991. </dd>
  15992. <dt><samp class="option">max</samp></dt>
  15993. <dd><p>Use measured max noise floor of all channels.
  15994. </p>
  15995. </dd>
  15996. <dt><samp class="option">average</samp></dt>
  15997. <dd><p>Use measured average noise floor of all channels.
  15998. </p>
  15999. <p>Default value is <var class="var">min</var>.
  16000. </p></dd>
  16001. </dl>
  16002. </dd>
  16003. <dt><samp class="option">band_multiplier, bm</samp></dt>
  16004. <dd><p>Set the band multiplier factor, used how much to spread bands across frequency bins.
  16005. Allowed range is from <var class="var">0.2</var> to <var class="var">5</var>. Default value is <var class="var">1.25</var>.
  16006. </p>
  16007. </dd>
  16008. <dt><samp class="option">sample_noise, sn</samp></dt>
  16009. <dd><p>Toggle capturing and measurement of noise profile from input audio.
  16010. </p>
  16011. <p>It accepts the following values:
  16012. </p><dl class="table">
  16013. <dt><samp class="option">start, begin</samp></dt>
  16014. <dd><p>Start sample noise capture.
  16015. </p>
  16016. </dd>
  16017. <dt><samp class="option">stop, end</samp></dt>
  16018. <dd><p>Stop sample noise capture and measure new noise band profile.
  16019. </p>
  16020. <p>Default value is <code class="code">none</code>.
  16021. </p></dd>
  16022. </dl>
  16023. </dd>
  16024. <dt><samp class="option">gain_smooth, gs</samp></dt>
  16025. <dd><p>Set gain smooth spatial radius, used to smooth gains applied to each frequency bin.
  16026. Useful to reduce random music noise artefacts.
  16027. Higher values increases smoothing of gains.
  16028. Allowed range is from <code class="code">0</code> to <code class="code">50</code>.
  16029. Default value is <code class="code">0</code>.
  16030. </p></dd>
  16031. </dl>
  16032. <ul class="mini-toc">
  16033. <li><a href="#Commands-9" accesskey="1">Commands</a></li>
  16034. <li><a href="#Examples-23" accesskey="2">Examples</a></li>
  16035. </ul>
  16036. <div class="subsection-level-extent" id="Commands-9">
  16037. <h4 class="subsection"><span>29.23.1 Commands<a class="copiable-link" href="#Commands-9"> &para;</a></span></h4>
  16038. <p>This filter supports the some above mentioned options as <a class="ref" href="#commands">commands</a>.
  16039. </p>
  16040. </div>
  16041. <div class="subsection-level-extent" id="Examples-23">
  16042. <h4 class="subsection"><span>29.23.2 Examples<a class="copiable-link" href="#Examples-23"> &para;</a></span></h4>
  16043. <ul class="itemize mark-bullet">
  16044. <li>Reduce white noise by 10dB, and use previously measured noise floor of -40dB:
  16045. <div class="example">
  16046. <pre class="example-preformatted">afftdn=nr=10:nf=-40
  16047. </pre></div>
  16048. </li><li>Reduce white noise by 10dB, also set initial noise floor to -80dB and enable automatic
  16049. tracking of noise floor so noise floor will gradually change during processing:
  16050. <div class="example">
  16051. <pre class="example-preformatted">afftdn=nr=10:nf=-80:tn=1
  16052. </pre></div>
  16053. </li><li>Reduce noise by 20dB, using noise floor of -40dB and using commands to take noise profile
  16054. of first 0.4 seconds of input audio:
  16055. <div class="example">
  16056. <pre class="example-preformatted">asendcmd=0.0 afftdn sn start,asendcmd=0.4 afftdn sn stop,afftdn=nr=20:nf=-40
  16057. </pre></div>
  16058. </li></ul>
  16059. </div>
  16060. </div>
  16061. <div class="section-level-extent" id="afftfilt">
  16062. <h3 class="section"><span>29.24 afftfilt<a class="copiable-link" href="#afftfilt"> &para;</a></span></h3>
  16063. <p>Apply arbitrary expressions to samples in frequency domain.
  16064. </p>
  16065. <dl class="table">
  16066. <dt><samp class="option">real</samp></dt>
  16067. <dd><p>Set frequency domain real expression for each separate channel separated
  16068. by &rsquo;|&rsquo;. Default is &quot;re&quot;.
  16069. If the number of input channels is greater than the number of
  16070. expressions, the last specified expression is used for the remaining
  16071. output channels.
  16072. </p>
  16073. </dd>
  16074. <dt><samp class="option">imag</samp></dt>
  16075. <dd><p>Set frequency domain imaginary expression for each separate channel
  16076. separated by &rsquo;|&rsquo;. Default is &quot;im&quot;.
  16077. </p>
  16078. <p>Each expression in <var class="var">real</var> and <var class="var">imag</var> can contain the following
  16079. constants and functions:
  16080. </p>
  16081. <dl class="table">
  16082. <dt><samp class="option">sr</samp></dt>
  16083. <dd><p>sample rate
  16084. </p>
  16085. </dd>
  16086. <dt><samp class="option">b</samp></dt>
  16087. <dd><p>current frequency bin number
  16088. </p>
  16089. </dd>
  16090. <dt><samp class="option">nb</samp></dt>
  16091. <dd><p>number of available bins
  16092. </p>
  16093. </dd>
  16094. <dt><samp class="option">ch</samp></dt>
  16095. <dd><p>channel number of the current expression
  16096. </p>
  16097. </dd>
  16098. <dt><samp class="option">chs</samp></dt>
  16099. <dd><p>number of channels
  16100. </p>
  16101. </dd>
  16102. <dt><samp class="option">pts</samp></dt>
  16103. <dd><p>current frame pts
  16104. </p>
  16105. </dd>
  16106. <dt><samp class="option">re</samp></dt>
  16107. <dd><p>current real part of frequency bin of current channel
  16108. </p>
  16109. </dd>
  16110. <dt><samp class="option">im</samp></dt>
  16111. <dd><p>current imaginary part of frequency bin of current channel
  16112. </p>
  16113. </dd>
  16114. <dt><samp class="option">real(b, ch)</samp></dt>
  16115. <dd><p>Return the value of real part of frequency bin at location (<var class="var">bin</var>,<var class="var">channel</var>)
  16116. </p>
  16117. </dd>
  16118. <dt><samp class="option">imag(b, ch)</samp></dt>
  16119. <dd><p>Return the value of imaginary part of frequency bin at location (<var class="var">bin</var>,<var class="var">channel</var>)
  16120. </p></dd>
  16121. </dl>
  16122. </dd>
  16123. <dt><samp class="option">win_size</samp></dt>
  16124. <dd><p>Set window size. Allowed range is from 16 to 131072.
  16125. Default is <code class="code">4096</code>
  16126. </p>
  16127. </dd>
  16128. <dt><samp class="option">win_func</samp></dt>
  16129. <dd><p>Set window function.
  16130. </p>
  16131. <p>It accepts the following values:
  16132. </p><dl class="table">
  16133. <dt>&lsquo;<samp class="samp">rect</samp>&rsquo;</dt>
  16134. <dt>&lsquo;<samp class="samp">bartlett</samp>&rsquo;</dt>
  16135. <dt>&lsquo;<samp class="samp">hann, hanning</samp>&rsquo;</dt>
  16136. <dt>&lsquo;<samp class="samp">hamming</samp>&rsquo;</dt>
  16137. <dt>&lsquo;<samp class="samp">blackman</samp>&rsquo;</dt>
  16138. <dt>&lsquo;<samp class="samp">welch</samp>&rsquo;</dt>
  16139. <dt>&lsquo;<samp class="samp">flattop</samp>&rsquo;</dt>
  16140. <dt>&lsquo;<samp class="samp">bharris</samp>&rsquo;</dt>
  16141. <dt>&lsquo;<samp class="samp">bnuttall</samp>&rsquo;</dt>
  16142. <dt>&lsquo;<samp class="samp">bhann</samp>&rsquo;</dt>
  16143. <dt>&lsquo;<samp class="samp">sine</samp>&rsquo;</dt>
  16144. <dt>&lsquo;<samp class="samp">nuttall</samp>&rsquo;</dt>
  16145. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  16146. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  16147. <dt>&lsquo;<samp class="samp">tukey</samp>&rsquo;</dt>
  16148. <dt>&lsquo;<samp class="samp">dolph</samp>&rsquo;</dt>
  16149. <dt>&lsquo;<samp class="samp">cauchy</samp>&rsquo;</dt>
  16150. <dt>&lsquo;<samp class="samp">parzen</samp>&rsquo;</dt>
  16151. <dt>&lsquo;<samp class="samp">poisson</samp>&rsquo;</dt>
  16152. <dt>&lsquo;<samp class="samp">bohman</samp>&rsquo;</dt>
  16153. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  16154. </dl>
  16155. <p>Default is <code class="code">hann</code>.
  16156. </p>
  16157. </dd>
  16158. <dt><samp class="option">overlap</samp></dt>
  16159. <dd><p>Set window overlap. If set to 1, the recommended overlap for selected
  16160. window function will be picked. Default is <code class="code">0.75</code>.
  16161. </p></dd>
  16162. </dl>
  16163. <ul class="mini-toc">
  16164. <li><a href="#Examples-24" accesskey="1">Examples</a></li>
  16165. </ul>
  16166. <div class="subsection-level-extent" id="Examples-24">
  16167. <h4 class="subsection"><span>29.24.1 Examples<a class="copiable-link" href="#Examples-24"> &para;</a></span></h4>
  16168. <ul class="itemize mark-bullet">
  16169. <li>Leave almost only low frequencies in audio:
  16170. <div class="example">
  16171. <pre class="example-preformatted">afftfilt=&quot;'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'&quot;
  16172. </pre></div>
  16173. </li><li>Apply robotize effect:
  16174. <div class="example">
  16175. <pre class="example-preformatted">afftfilt=&quot;real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75&quot;
  16176. </pre></div>
  16177. </li><li>Apply whisper effect:
  16178. <div class="example">
  16179. <pre class="example-preformatted">afftfilt=&quot;real='hypot(re,im)*cos((random(0)*2-1)*2*3.14)':imag='hypot(re,im)*sin((random(1)*2-1)*2*3.14)':win_size=128:overlap=0.8&quot;
  16180. </pre></div>
  16181. </li><li>Apply phase shift:
  16182. <div class="example">
  16183. <pre class="example-preformatted">afftfilt=&quot;real=re*cos(1)-im*sin(1):imag=re*sin(1)+im*cos(1)&quot;
  16184. </pre></div>
  16185. </li></ul>
  16186. <a class="anchor" id="afir"></a></div>
  16187. </div>
  16188. <div class="section-level-extent" id="afir-1">
  16189. <h3 class="section"><span>29.25 afir<a class="copiable-link" href="#afir-1"> &para;</a></span></h3>
  16190. <p>Apply an arbitrary Finite Impulse Response filter.
  16191. </p>
  16192. <p>This filter is designed for applying long FIR filters,
  16193. up to 60 seconds long.
  16194. </p>
  16195. <p>It can be used as component for digital crossover filters,
  16196. room equalization, cross talk cancellation, wavefield synthesis,
  16197. auralization, ambiophonics, ambisonics and spatialization.
  16198. </p>
  16199. <p>This filter uses the streams higher than first one as FIR coefficients.
  16200. If the non-first stream holds a single channel, it will be used
  16201. for all input channels in the first stream, otherwise
  16202. the number of channels in the non-first stream must be same as
  16203. the number of channels in the first stream.
  16204. </p>
  16205. <p>It accepts the following parameters:
  16206. </p>
  16207. <dl class="table">
  16208. <dt><samp class="option">dry</samp></dt>
  16209. <dd><p>Set dry gain. This sets input gain.
  16210. </p>
  16211. </dd>
  16212. <dt><samp class="option">wet</samp></dt>
  16213. <dd><p>Set wet gain. This sets final output gain.
  16214. </p>
  16215. </dd>
  16216. <dt><samp class="option">length</samp></dt>
  16217. <dd><p>Set Impulse Response filter length. Default is 1, which means whole IR is processed.
  16218. </p>
  16219. </dd>
  16220. <dt><samp class="option">gtype</samp></dt>
  16221. <dd><p>This option is deprecated, and does nothing.
  16222. </p>
  16223. </dd>
  16224. <dt><samp class="option">irnorm</samp></dt>
  16225. <dd><p>Set norm to be applied to IR coefficients before filtering.
  16226. Allowed range is from <var class="var">-1</var> to <var class="var">2</var>.
  16227. IR coefficients are normalized with calculated vector norm set by this option.
  16228. For negative values, no norm is calculated, and IR coefficients are not modified at all.
  16229. Default is <var class="var">1</var>.
  16230. </p>
  16231. </dd>
  16232. <dt><samp class="option">irlink</samp></dt>
  16233. <dd><p>For multichannel IR if this option is set to <var class="var">true</var>, all IR channels will be
  16234. normalized with maximal measured gain of all IR channels coefficients as set by <code class="code">irnorm</code> option.
  16235. When disabled, all IR coefficients in each IR channel will be normalized independently.
  16236. Default is <var class="var">true</var>.
  16237. </p>
  16238. </dd>
  16239. <dt><samp class="option">irgain</samp></dt>
  16240. <dd><p>Set gain to be applied to IR coefficients before filtering.
  16241. Allowed range is 0 to 1. This gain is applied after any gain applied with <var class="var">irnorm</var> option.
  16242. </p>
  16243. </dd>
  16244. <dt><samp class="option">irfmt</samp></dt>
  16245. <dd><p>Set format of IR stream. Can be <code class="code">mono</code> or <code class="code">input</code>.
  16246. Default is <code class="code">input</code>.
  16247. </p>
  16248. </dd>
  16249. <dt><samp class="option">maxir</samp></dt>
  16250. <dd><p>Set max allowed Impulse Response filter duration in seconds. Default is 30 seconds.
  16251. Allowed range is 0.1 to 60 seconds.
  16252. </p>
  16253. </dd>
  16254. <dt><samp class="option">response</samp></dt>
  16255. <dd><p>This option is deprecated, and does nothing.
  16256. </p>
  16257. </dd>
  16258. <dt><samp class="option">channel</samp></dt>
  16259. <dd><p>This option is deprecated, and does nothing.
  16260. </p>
  16261. </dd>
  16262. <dt><samp class="option">size</samp></dt>
  16263. <dd><p>This option is deprecated, and does nothing.
  16264. </p>
  16265. </dd>
  16266. <dt><samp class="option">rate</samp></dt>
  16267. <dd><p>This option is deprecated, and does nothing.
  16268. </p>
  16269. </dd>
  16270. <dt><samp class="option">minp</samp></dt>
  16271. <dd><p>Set minimal partition size used for convolution. Default is <var class="var">8192</var>.
  16272. Allowed range is from <var class="var">1</var> to <var class="var">65536</var>.
  16273. Lower values decreases latency at cost of higher CPU usage.
  16274. </p>
  16275. </dd>
  16276. <dt><samp class="option">maxp</samp></dt>
  16277. <dd><p>Set maximal partition size used for convolution. Default is <var class="var">8192</var>.
  16278. Allowed range is from <var class="var">8</var> to <var class="var">65536</var>.
  16279. Lower values may increase CPU usage.
  16280. </p>
  16281. </dd>
  16282. <dt><samp class="option">nbirs</samp></dt>
  16283. <dd><p>Set number of input impulse responses streams which will be switchable at runtime.
  16284. Allowed range is from <var class="var">1</var> to <var class="var">32</var>. Default is <var class="var">1</var>.
  16285. </p>
  16286. </dd>
  16287. <dt><samp class="option">ir</samp></dt>
  16288. <dd><p>Set IR stream which will be used for convolution, starting from <var class="var">0</var>, should always be
  16289. lower than supplied value by <code class="code">nbirs</code> option. Default is <var class="var">0</var>.
  16290. This option can be changed at runtime via <a class="ref" href="#commands">commands</a>.
  16291. </p>
  16292. </dd>
  16293. <dt><samp class="option">precision</samp></dt>
  16294. <dd><p>Set which precision to use when processing samples.
  16295. </p>
  16296. <dl class="table">
  16297. <dt><samp class="option">auto</samp></dt>
  16298. <dd><p>Auto pick internal sample format depending on other filters.
  16299. </p>
  16300. </dd>
  16301. <dt><samp class="option">float</samp></dt>
  16302. <dd><p>Always use single-floating point precision sample format.
  16303. </p>
  16304. </dd>
  16305. <dt><samp class="option">double</samp></dt>
  16306. <dd><p>Always use double-floating point precision sample format.
  16307. </p></dd>
  16308. </dl>
  16309. <p>Default value is auto.
  16310. </p>
  16311. </dd>
  16312. <dt><samp class="option">irload</samp></dt>
  16313. <dd><p>Set when to load IR stream. Can be <code class="code">init</code> or <code class="code">access</code>.
  16314. First one load and prepares all IRs on initialization, second one
  16315. once on first access of specific IR.
  16316. Default is <code class="code">init</code>.
  16317. </p></dd>
  16318. </dl>
  16319. <ul class="mini-toc">
  16320. <li><a href="#Examples-25" accesskey="1">Examples</a></li>
  16321. </ul>
  16322. <div class="subsection-level-extent" id="Examples-25">
  16323. <h4 class="subsection"><span>29.25.1 Examples<a class="copiable-link" href="#Examples-25"> &para;</a></span></h4>
  16324. <ul class="itemize mark-bullet">
  16325. <li>Apply reverb to stream using mono IR file as second input, complete command using ffmpeg:
  16326. <div class="example">
  16327. <pre class="example-preformatted">ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
  16328. </pre></div>
  16329. </li><li>Apply true stereo processing given input stereo stream, and two stereo impulse responses for left and right channel,
  16330. the impulse response files are files with names l_ir.wav and r_ir.wav, and setting irnorm option value:
  16331. <div class="example">
  16332. <pre class="example-preformatted">&quot;pan=4C|c0=FL|c1=FL|c2=FR|c3=FR[a];amovie=l_ir.wav[LIR];amovie=r_ir.wav[RIR];[LIR][RIR]amerge[ir];[a][ir]afir=irfmt=input:irnorm=1.2,pan=stereo|FL&lt;c0+c2|FR&lt;c1+c3&quot;
  16333. </pre></div>
  16334. </li><li>Similar to above example, but with <code class="code">irgain</code> explicitly set to estimated value and with <code class="code">irnorm</code> disabled:
  16335. <div class="example">
  16336. <pre class="example-preformatted">&quot;pan=4C|c0=FL|c1=FL|c2=FR|c3=FR[a];amovie=l_ir.wav[LIR];amovie=r_ir.wav[RIR];[LIR][RIR]amerge[ir];[a][ir]afir=irfmt=input:irgain=-5dB:irnom=-1,pan=stereo|FL&lt;c0+c2|FR&lt;c1+c3&quot;
  16337. </pre></div>
  16338. </li></ul>
  16339. <a class="anchor" id="aformat"></a></div>
  16340. </div>
  16341. <div class="section-level-extent" id="aformat-1">
  16342. <h3 class="section"><span>29.26 aformat<a class="copiable-link" href="#aformat-1"> &para;</a></span></h3>
  16343. <p>Set output format constraints for the input audio. The framework will
  16344. negotiate the most appropriate format to minimize conversions.
  16345. </p>
  16346. <p>It accepts the following parameters:
  16347. </p><dl class="table">
  16348. <dt><samp class="option">sample_fmts, f</samp></dt>
  16349. <dd><p>A &rsquo;|&rsquo;-separated list of requested sample formats.
  16350. </p>
  16351. </dd>
  16352. <dt><samp class="option">sample_rates, r</samp></dt>
  16353. <dd><p>A &rsquo;|&rsquo;-separated list of requested sample rates.
  16354. </p>
  16355. </dd>
  16356. <dt><samp class="option">channel_layouts, cl</samp></dt>
  16357. <dd><p>A &rsquo;|&rsquo;-separated list of requested channel layouts.
  16358. </p>
  16359. <p>See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#channel-layout-syntax">the Channel Layout section in the ffmpeg-utils(1) manual</a>
  16360. for the required syntax.
  16361. </p></dd>
  16362. </dl>
  16363. <p>If a parameter is omitted, all values are allowed.
  16364. </p>
  16365. <p>Force the output to either unsigned 8-bit or signed 16-bit stereo
  16366. </p><div class="example">
  16367. <pre class="example-preformatted">aformat=sample_fmts=u8|s16:channel_layouts=stereo
  16368. </pre></div>
  16369. </div>
  16370. <div class="section-level-extent" id="afreqshift">
  16371. <h3 class="section"><span>29.27 afreqshift<a class="copiable-link" href="#afreqshift"> &para;</a></span></h3>
  16372. <p>Apply frequency shift to input audio samples.
  16373. </p>
  16374. <p>The filter accepts the following options:
  16375. </p>
  16376. <dl class="table">
  16377. <dt><samp class="option">shift</samp></dt>
  16378. <dd><p>Specify frequency shift. Allowed range is -INT_MAX to INT_MAX.
  16379. Default value is 0.0.
  16380. </p>
  16381. </dd>
  16382. <dt><samp class="option">level</samp></dt>
  16383. <dd><p>Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
  16384. Default value is 1.0.
  16385. </p>
  16386. </dd>
  16387. <dt><samp class="option">order</samp></dt>
  16388. <dd><p>Set filter order used for filtering. Allowed range is from 1 to 16.
  16389. Default value is 8.
  16390. </p></dd>
  16391. </dl>
  16392. <ul class="mini-toc">
  16393. <li><a href="#Commands-10" accesskey="1">Commands</a></li>
  16394. </ul>
  16395. <div class="subsection-level-extent" id="Commands-10">
  16396. <h4 class="subsection"><span>29.27.1 Commands<a class="copiable-link" href="#Commands-10"> &para;</a></span></h4>
  16397. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  16398. </p>
  16399. </div>
  16400. </div>
  16401. <div class="section-level-extent" id="afwtdn">
  16402. <h3 class="section"><span>29.28 afwtdn<a class="copiable-link" href="#afwtdn"> &para;</a></span></h3>
  16403. <p>Reduce broadband noise from input samples using Wavelets.
  16404. </p>
  16405. <p>A description of the accepted options follows.
  16406. </p>
  16407. <dl class="table">
  16408. <dt><samp class="option">sigma</samp></dt>
  16409. <dd><p>Set the noise sigma, allowed range is from 0 to 1.
  16410. Default value is 0.
  16411. This option controls strength of denoising applied to input samples.
  16412. Most useful way to set this option is via decibels, eg. -45dB.
  16413. </p>
  16414. </dd>
  16415. <dt><samp class="option">levels</samp></dt>
  16416. <dd><p>Set the number of wavelet levels of decomposition.
  16417. Allowed range is from 1 to 12.
  16418. Default value is 10.
  16419. Setting this too low make denoising performance very poor.
  16420. </p>
  16421. </dd>
  16422. <dt><samp class="option">wavet</samp></dt>
  16423. <dd><p>Set wavelet type for decomposition of input frame.
  16424. They are sorted by number of coefficients, from lowest to highest.
  16425. More coefficients means worse filtering speed, but overall better quality.
  16426. Available wavelets are:
  16427. </p>
  16428. <dl class="table">
  16429. <dt>&lsquo;<samp class="samp">sym2</samp>&rsquo;</dt>
  16430. <dt>&lsquo;<samp class="samp">sym4</samp>&rsquo;</dt>
  16431. <dt>&lsquo;<samp class="samp">rbior68</samp>&rsquo;</dt>
  16432. <dt>&lsquo;<samp class="samp">deb10</samp>&rsquo;</dt>
  16433. <dt>&lsquo;<samp class="samp">sym10</samp>&rsquo;</dt>
  16434. <dt>&lsquo;<samp class="samp">coif5</samp>&rsquo;</dt>
  16435. <dt>&lsquo;<samp class="samp">bl3</samp>&rsquo;</dt>
  16436. </dl>
  16437. </dd>
  16438. <dt><samp class="option">percent</samp></dt>
  16439. <dd><p>Set percent of full denoising. Allowed range is from 0 to 100 percent.
  16440. Default value is 85 percent or partial denoising.
  16441. </p>
  16442. </dd>
  16443. <dt><samp class="option">profile</samp></dt>
  16444. <dd><p>If enabled, first input frame will be used as noise profile.
  16445. If first frame samples contain non-noise performance will be very poor.
  16446. </p>
  16447. </dd>
  16448. <dt><samp class="option">adaptive</samp></dt>
  16449. <dd><p>If enabled, input frames are analyzed for presence of noise.
  16450. If noise is detected with high possibility then input frame profile will be
  16451. used for processing following frames, until new noise frame is detected.
  16452. </p>
  16453. </dd>
  16454. <dt><samp class="option">samples</samp></dt>
  16455. <dd><p>Set size of single frame in number of samples. Allowed range is from 512 to
  16456. 65536. Default frame size is 8192 samples.
  16457. </p>
  16458. </dd>
  16459. <dt><samp class="option">softness</samp></dt>
  16460. <dd><p>Set softness applied inside thresholding function. Allowed range is from 0 to
  16461. 10. Default softness is 1.
  16462. </p></dd>
  16463. </dl>
  16464. <ul class="mini-toc">
  16465. <li><a href="#Commands-11" accesskey="1">Commands</a></li>
  16466. </ul>
  16467. <div class="subsection-level-extent" id="Commands-11">
  16468. <h4 class="subsection"><span>29.28.1 Commands<a class="copiable-link" href="#Commands-11"> &para;</a></span></h4>
  16469. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  16470. </p>
  16471. </div>
  16472. </div>
  16473. <div class="section-level-extent" id="agate">
  16474. <h3 class="section"><span>29.29 agate<a class="copiable-link" href="#agate"> &para;</a></span></h3>
  16475. <p>A gate is mainly used to reduce lower parts of a signal. This kind of signal
  16476. processing reduces disturbing noise between useful signals.
  16477. </p>
  16478. <p>Gating is done by detecting the volume below a chosen level <var class="var">threshold</var>
  16479. and dividing it by the factor set with <var class="var">ratio</var>. The bottom of the noise
  16480. floor is set via <var class="var">range</var>. Because an exact manipulation of the signal
  16481. would cause distortion of the waveform the reduction can be levelled over
  16482. time. This is done by setting <var class="var">attack</var> and <var class="var">release</var>.
  16483. </p>
  16484. <p><var class="var">attack</var> determines how long the signal has to fall below the threshold
  16485. before any reduction will occur and <var class="var">release</var> sets the time the signal
  16486. has to rise above the threshold to reduce the reduction again.
  16487. Shorter signals than the chosen attack time will be left untouched.
  16488. </p>
  16489. <dl class="table">
  16490. <dt><samp class="option">level_in</samp></dt>
  16491. <dd><p>Set input level before filtering.
  16492. Default is 1. Allowed range is from 0.015625 to 64.
  16493. </p>
  16494. </dd>
  16495. <dt><samp class="option">mode</samp></dt>
  16496. <dd><p>Set the mode of operation. Can be <code class="code">upward</code> or <code class="code">downward</code>.
  16497. Default is <code class="code">downward</code>. If set to <code class="code">upward</code> mode, higher parts of signal
  16498. will be amplified, expanding dynamic range in upward direction.
  16499. Otherwise, in case of <code class="code">downward</code> lower parts of signal will be reduced.
  16500. </p>
  16501. </dd>
  16502. <dt><samp class="option">range</samp></dt>
  16503. <dd><p>Set the level of gain reduction when the signal is below the threshold.
  16504. Default is 0.06125. Allowed range is from 0 to 1.
  16505. Setting this to 0 disables reduction and then filter behaves like expander.
  16506. </p>
  16507. </dd>
  16508. <dt><samp class="option">threshold</samp></dt>
  16509. <dd><p>If a signal rises above this level the gain reduction is released.
  16510. Default is 0.125. Allowed range is from 0 to 1.
  16511. </p>
  16512. </dd>
  16513. <dt><samp class="option">ratio</samp></dt>
  16514. <dd><p>Set a ratio by which the signal is reduced.
  16515. Default is 2. Allowed range is from 1 to 9000.
  16516. </p>
  16517. </dd>
  16518. <dt><samp class="option">attack</samp></dt>
  16519. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  16520. reduction stops.
  16521. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
  16522. </p>
  16523. </dd>
  16524. <dt><samp class="option">release</samp></dt>
  16525. <dd><p>Amount of milliseconds the signal has to fall below the threshold before the
  16526. reduction is increased again. Default is 250 milliseconds.
  16527. Allowed range is from 0.01 to 9000.
  16528. </p>
  16529. </dd>
  16530. <dt><samp class="option">makeup</samp></dt>
  16531. <dd><p>Set amount of amplification of signal after processing.
  16532. Default is 1. Allowed range is from 1 to 64.
  16533. </p>
  16534. </dd>
  16535. <dt><samp class="option">knee</samp></dt>
  16536. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  16537. Default is 2.828427125. Allowed range is from 1 to 8.
  16538. </p>
  16539. </dd>
  16540. <dt><samp class="option">detection</samp></dt>
  16541. <dd><p>Choose if exact signal should be taken for detection or an RMS like one.
  16542. Default is <code class="code">rms</code>. Can be <code class="code">peak</code> or <code class="code">rms</code>.
  16543. </p>
  16544. </dd>
  16545. <dt><samp class="option">link</samp></dt>
  16546. <dd><p>Choose if the average level between all channels or the louder channel affects
  16547. the reduction.
  16548. Default is <code class="code">average</code>. Can be <code class="code">average</code> or <code class="code">maximum</code>.
  16549. </p></dd>
  16550. </dl>
  16551. <ul class="mini-toc">
  16552. <li><a href="#Commands-12" accesskey="1">Commands</a></li>
  16553. </ul>
  16554. <div class="subsection-level-extent" id="Commands-12">
  16555. <h4 class="subsection"><span>29.29.1 Commands<a class="copiable-link" href="#Commands-12"> &para;</a></span></h4>
  16556. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  16557. </p>
  16558. </div>
  16559. </div>
  16560. <div class="section-level-extent" id="aiir">
  16561. <h3 class="section"><span>29.30 aiir<a class="copiable-link" href="#aiir"> &para;</a></span></h3>
  16562. <p>Apply an arbitrary Infinite Impulse Response filter.
  16563. </p>
  16564. <p>It accepts the following parameters:
  16565. </p>
  16566. <dl class="table">
  16567. <dt><samp class="option">zeros, z</samp></dt>
  16568. <dd><p>Set B/numerator/zeros/reflection coefficients.
  16569. </p>
  16570. </dd>
  16571. <dt><samp class="option">poles, p</samp></dt>
  16572. <dd><p>Set A/denominator/poles/ladder coefficients.
  16573. </p>
  16574. </dd>
  16575. <dt><samp class="option">gains, k</samp></dt>
  16576. <dd><p>Set channels gains.
  16577. </p>
  16578. </dd>
  16579. <dt><samp class="option">dry_gain</samp></dt>
  16580. <dd><p>Set input gain.
  16581. </p>
  16582. </dd>
  16583. <dt><samp class="option">wet_gain</samp></dt>
  16584. <dd><p>Set output gain.
  16585. </p>
  16586. </dd>
  16587. <dt><samp class="option">format, f</samp></dt>
  16588. <dd><p>Set coefficients format.
  16589. </p>
  16590. <dl class="table">
  16591. <dt>&lsquo;<samp class="samp">ll</samp>&rsquo;</dt>
  16592. <dd><p>lattice-ladder function
  16593. </p></dd>
  16594. <dt>&lsquo;<samp class="samp">sf</samp>&rsquo;</dt>
  16595. <dd><p>analog transfer function
  16596. </p></dd>
  16597. <dt>&lsquo;<samp class="samp">tf</samp>&rsquo;</dt>
  16598. <dd><p>digital transfer function
  16599. </p></dd>
  16600. <dt>&lsquo;<samp class="samp">zp</samp>&rsquo;</dt>
  16601. <dd><p>Z-plane zeros/poles, cartesian (default)
  16602. </p></dd>
  16603. <dt>&lsquo;<samp class="samp">pr</samp>&rsquo;</dt>
  16604. <dd><p>Z-plane zeros/poles, polar radians
  16605. </p></dd>
  16606. <dt>&lsquo;<samp class="samp">pd</samp>&rsquo;</dt>
  16607. <dd><p>Z-plane zeros/poles, polar degrees
  16608. </p></dd>
  16609. <dt>&lsquo;<samp class="samp">sp</samp>&rsquo;</dt>
  16610. <dd><p>S-plane zeros/poles
  16611. </p></dd>
  16612. </dl>
  16613. </dd>
  16614. <dt><samp class="option">process, r</samp></dt>
  16615. <dd><p>Set type of processing.
  16616. </p>
  16617. <dl class="table">
  16618. <dt>&lsquo;<samp class="samp">d</samp>&rsquo;</dt>
  16619. <dd><p>direct processing
  16620. </p></dd>
  16621. <dt>&lsquo;<samp class="samp">s</samp>&rsquo;</dt>
  16622. <dd><p>serial processing
  16623. </p></dd>
  16624. <dt>&lsquo;<samp class="samp">p</samp>&rsquo;</dt>
  16625. <dd><p>parallel processing
  16626. </p></dd>
  16627. </dl>
  16628. </dd>
  16629. <dt><samp class="option">precision, e</samp></dt>
  16630. <dd><p>Set filtering precision.
  16631. </p>
  16632. <dl class="table">
  16633. <dt>&lsquo;<samp class="samp">dbl</samp>&rsquo;</dt>
  16634. <dd><p>double-precision floating-point (default)
  16635. </p></dd>
  16636. <dt>&lsquo;<samp class="samp">flt</samp>&rsquo;</dt>
  16637. <dd><p>single-precision floating-point
  16638. </p></dd>
  16639. <dt>&lsquo;<samp class="samp">i32</samp>&rsquo;</dt>
  16640. <dd><p>32-bit integers
  16641. </p></dd>
  16642. <dt>&lsquo;<samp class="samp">i16</samp>&rsquo;</dt>
  16643. <dd><p>16-bit integers
  16644. </p></dd>
  16645. </dl>
  16646. </dd>
  16647. <dt><samp class="option">normalize, n</samp></dt>
  16648. <dd><p>Normalize filter coefficients, by default is enabled.
  16649. Enabling it will normalize magnitude response at DC to 0dB.
  16650. </p>
  16651. </dd>
  16652. <dt><samp class="option">mix</samp></dt>
  16653. <dd><p>How much to use filtered signal in output. Default is 1.
  16654. Range is between 0 and 1.
  16655. </p>
  16656. </dd>
  16657. <dt><samp class="option">response</samp></dt>
  16658. <dd><p>Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
  16659. By default it is disabled.
  16660. </p>
  16661. </dd>
  16662. <dt><samp class="option">channel</samp></dt>
  16663. <dd><p>Set for which IR channel to display frequency response. By default is first channel
  16664. displayed. This option is used only when <var class="var">response</var> is enabled.
  16665. </p>
  16666. </dd>
  16667. <dt><samp class="option">size</samp></dt>
  16668. <dd><p>Set video stream size. This option is used only when <var class="var">response</var> is enabled.
  16669. </p></dd>
  16670. </dl>
  16671. <p>Coefficients in <code class="code">tf</code> and <code class="code">sf</code> format are separated by spaces and are in ascending
  16672. order.
  16673. </p>
  16674. <p>Coefficients in <code class="code">zp</code> format are separated by spaces and order of coefficients
  16675. doesn&rsquo;t matter. Coefficients in <code class="code">zp</code> format are complex numbers with <var class="var">i</var>
  16676. imaginary unit.
  16677. </p>
  16678. <p>Different coefficients and gains can be provided for every channel, in such case
  16679. use &rsquo;|&rsquo; to separate coefficients or gains. Last provided coefficients will be
  16680. used for all remaining channels.
  16681. </p>
  16682. <ul class="mini-toc">
  16683. <li><a href="#Examples-26" accesskey="1">Examples</a></li>
  16684. </ul>
  16685. <div class="subsection-level-extent" id="Examples-26">
  16686. <h4 class="subsection"><span>29.30.1 Examples<a class="copiable-link" href="#Examples-26"> &para;</a></span></h4>
  16687. <ul class="itemize mark-bullet">
  16688. <li>Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample rate:
  16689. <div class="example">
  16690. <pre class="example-preformatted">aiir=k=1:z=7.957584807809675810E-1 -2.575128568908332300 3.674839853930788710 -2.57512875289799137 7.957586296317130880E-1:p=1 -2.86950072432325953 3.63022088054647218 -2.28075678147272232 6.361362326477423500E-1:f=tf:r=d
  16691. </pre></div>
  16692. </li><li>Same as above but in <code class="code">zp</code> format:
  16693. <div class="example">
  16694. <pre class="example-preformatted">aiir=k=0.79575848078096756:z=0.80918701+0.58773007i 0.80918701-0.58773007i 0.80884700+0.58784055i 0.80884700-0.58784055i:p=0.63892345+0.59951235i 0.63892345-0.59951235i 0.79582691+0.44198673i 0.79582691-0.44198673i:f=zp:r=s
  16695. </pre></div>
  16696. </li><li>Apply 3-rd order analog normalized Butterworth low-pass filter, using analog transfer function format:
  16697. <div class="example">
  16698. <pre class="example-preformatted">aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
  16699. </pre></div>
  16700. </li></ul>
  16701. </div>
  16702. </div>
  16703. <div class="section-level-extent" id="alimiter">
  16704. <h3 class="section"><span>29.31 alimiter<a class="copiable-link" href="#alimiter"> &para;</a></span></h3>
  16705. <p>The limiter prevents an input signal from rising over a desired threshold.
  16706. This limiter uses lookahead technology to prevent your signal from distorting.
  16707. It means that there is a small delay after the signal is processed. Keep in mind
  16708. that the delay it produces is the attack time you set.
  16709. </p>
  16710. <p>The filter accepts the following options:
  16711. </p>
  16712. <dl class="table">
  16713. <dt><samp class="option">level_in</samp></dt>
  16714. <dd><p>Set input gain. Default is 1.
  16715. </p>
  16716. </dd>
  16717. <dt><samp class="option">level_out</samp></dt>
  16718. <dd><p>Set output gain. Default is 1.
  16719. </p>
  16720. </dd>
  16721. <dt><samp class="option">limit</samp></dt>
  16722. <dd><p>Don&rsquo;t let signals above this level pass the limiter. Default is 1.
  16723. </p>
  16724. </dd>
  16725. <dt><samp class="option">attack</samp></dt>
  16726. <dd><p>The limiter will reach its attenuation level in this amount of time in
  16727. milliseconds. Default is 5 milliseconds.
  16728. </p>
  16729. </dd>
  16730. <dt><samp class="option">release</samp></dt>
  16731. <dd><p>Come back from limiting to attenuation 1.0 in this amount of milliseconds.
  16732. Default is 50 milliseconds.
  16733. </p>
  16734. </dd>
  16735. <dt><samp class="option">asc</samp></dt>
  16736. <dd><p>When gain reduction is always needed ASC takes care of releasing to an
  16737. average reduction level rather than reaching a reduction of 0 in the release
  16738. time.
  16739. </p>
  16740. </dd>
  16741. <dt><samp class="option">asc_level</samp></dt>
  16742. <dd><p>Select how much the release time is affected by ASC, 0 means nearly no changes
  16743. in release time while 1 produces higher release times.
  16744. </p>
  16745. </dd>
  16746. <dt><samp class="option">level</samp></dt>
  16747. <dd><p>Auto level output signal. Default is enabled.
  16748. This normalizes audio back to 0dB if enabled.
  16749. </p>
  16750. </dd>
  16751. <dt><samp class="option">latency</samp></dt>
  16752. <dd><p>Compensate the delay introduced by using the lookahead buffer set with attack
  16753. parameter. Also flush the valid audio data in the lookahead buffer when the
  16754. stream hits EOF.
  16755. </p></dd>
  16756. </dl>
  16757. <p>Depending on picked setting it is recommended to upsample input 2x or 4x times
  16758. with <a class="ref" href="#aresample">aresample</a> before applying this filter.
  16759. </p>
  16760. </div>
  16761. <div class="section-level-extent" id="allpass">
  16762. <h3 class="section"><span>29.32 allpass<a class="copiable-link" href="#allpass"> &para;</a></span></h3>
  16763. <p>Apply a two-pole all-pass filter with central frequency (in Hz)
  16764. <var class="var">frequency</var>, and filter-width <var class="var">width</var>.
  16765. An all-pass filter changes the audio&rsquo;s frequency to phase relationship
  16766. without changing its frequency to amplitude relationship.
  16767. </p>
  16768. <p>The filter accepts the following options:
  16769. </p>
  16770. <dl class="table">
  16771. <dt><samp class="option">frequency, f</samp></dt>
  16772. <dd><p>Set frequency in Hz.
  16773. </p>
  16774. </dd>
  16775. <dt><samp class="option">width_type, t</samp></dt>
  16776. <dd><p>Set method to specify band-width of filter.
  16777. </p><dl class="table">
  16778. <dt><samp class="option">h</samp></dt>
  16779. <dd><p>Hz
  16780. </p></dd>
  16781. <dt><samp class="option">q</samp></dt>
  16782. <dd><p>Q-Factor
  16783. </p></dd>
  16784. <dt><samp class="option">o</samp></dt>
  16785. <dd><p>octave
  16786. </p></dd>
  16787. <dt><samp class="option">s</samp></dt>
  16788. <dd><p>slope
  16789. </p></dd>
  16790. <dt><samp class="option">k</samp></dt>
  16791. <dd><p>kHz
  16792. </p></dd>
  16793. </dl>
  16794. </dd>
  16795. <dt><samp class="option">width, w</samp></dt>
  16796. <dd><p>Specify the band-width of a filter in width_type units.
  16797. </p>
  16798. </dd>
  16799. <dt><samp class="option">mix, m</samp></dt>
  16800. <dd><p>How much to use filtered signal in output. Default is 1.
  16801. Range is between 0 and 1.
  16802. </p>
  16803. </dd>
  16804. <dt><samp class="option">channels, c</samp></dt>
  16805. <dd><p>Specify which channels to filter, by default all available are filtered.
  16806. </p>
  16807. </dd>
  16808. <dt><samp class="option">normalize, n</samp></dt>
  16809. <dd><p>Normalize biquad coefficients, by default is disabled.
  16810. Enabling it will normalize magnitude response at DC to 0dB.
  16811. </p>
  16812. </dd>
  16813. <dt><samp class="option">order, o</samp></dt>
  16814. <dd><p>Set the filter order, can be 1 or 2. Default is 2.
  16815. </p>
  16816. </dd>
  16817. <dt><samp class="option">transform, a</samp></dt>
  16818. <dd><p>Set transform type of IIR filter.
  16819. </p><dl class="table">
  16820. <dt><samp class="option">di</samp></dt>
  16821. <dt><samp class="option">dii</samp></dt>
  16822. <dt><samp class="option">tdi</samp></dt>
  16823. <dt><samp class="option">tdii</samp></dt>
  16824. <dt><samp class="option">latt</samp></dt>
  16825. <dt><samp class="option">svf</samp></dt>
  16826. <dt><samp class="option">zdf</samp></dt>
  16827. </dl>
  16828. </dd>
  16829. <dt><samp class="option">precision, r</samp></dt>
  16830. <dd><p>Set precision of filtering.
  16831. </p><dl class="table">
  16832. <dt><samp class="option">auto</samp></dt>
  16833. <dd><p>Pick automatic sample format depending on surround filters.
  16834. </p></dd>
  16835. <dt><samp class="option">s16</samp></dt>
  16836. <dd><p>Always use signed 16-bit.
  16837. </p></dd>
  16838. <dt><samp class="option">s32</samp></dt>
  16839. <dd><p>Always use signed 32-bit.
  16840. </p></dd>
  16841. <dt><samp class="option">f32</samp></dt>
  16842. <dd><p>Always use float 32-bit.
  16843. </p></dd>
  16844. <dt><samp class="option">f64</samp></dt>
  16845. <dd><p>Always use float 64-bit.
  16846. </p></dd>
  16847. </dl>
  16848. </dd>
  16849. </dl>
  16850. <ul class="mini-toc">
  16851. <li><a href="#Commands-13" accesskey="1">Commands</a></li>
  16852. </ul>
  16853. <div class="subsection-level-extent" id="Commands-13">
  16854. <h4 class="subsection"><span>29.32.1 Commands<a class="copiable-link" href="#Commands-13"> &para;</a></span></h4>
  16855. <p>This filter supports the following commands:
  16856. </p><dl class="table">
  16857. <dt><samp class="option">frequency, f</samp></dt>
  16858. <dd><p>Change allpass frequency.
  16859. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  16860. </p>
  16861. </dd>
  16862. <dt><samp class="option">width_type, t</samp></dt>
  16863. <dd><p>Change allpass width_type.
  16864. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  16865. </p>
  16866. </dd>
  16867. <dt><samp class="option">width, w</samp></dt>
  16868. <dd><p>Change allpass width.
  16869. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  16870. </p>
  16871. </dd>
  16872. <dt><samp class="option">mix, m</samp></dt>
  16873. <dd><p>Change allpass mix.
  16874. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  16875. </p></dd>
  16876. </dl>
  16877. </div>
  16878. </div>
  16879. <div class="section-level-extent" id="aloop">
  16880. <h3 class="section"><span>29.33 aloop<a class="copiable-link" href="#aloop"> &para;</a></span></h3>
  16881. <p>Loop audio samples.
  16882. </p>
  16883. <p>The filter accepts the following options:
  16884. </p>
  16885. <dl class="table">
  16886. <dt><samp class="option">loop</samp></dt>
  16887. <dd><p>Set the number of loops. Setting this value to -1 will result in infinite loops.
  16888. Default is 0.
  16889. </p>
  16890. </dd>
  16891. <dt><samp class="option">size</samp></dt>
  16892. <dd><p>Set maximal number of samples. Default is 0.
  16893. </p>
  16894. </dd>
  16895. <dt><samp class="option">start</samp></dt>
  16896. <dd><p>Set first sample of loop. Default is 0.
  16897. </p>
  16898. </dd>
  16899. <dt><samp class="option">time</samp></dt>
  16900. <dd><p>Set the time of loop start in seconds.
  16901. Only used if option named <var class="var">start</var> is set to <code class="code">-1</code>.
  16902. </p></dd>
  16903. </dl>
  16904. <a class="anchor" id="amerge"></a></div>
  16905. <div class="section-level-extent" id="amerge-1">
  16906. <h3 class="section"><span>29.34 amerge<a class="copiable-link" href="#amerge-1"> &para;</a></span></h3>
  16907. <p>Merge two or more audio streams into a single multi-channel stream.
  16908. </p>
  16909. <p>The filter accepts the following options:
  16910. </p>
  16911. <dl class="table">
  16912. <dt><samp class="option">inputs</samp></dt>
  16913. <dd><p>Set the number of inputs. Default is 2.
  16914. </p>
  16915. </dd>
  16916. </dl>
  16917. <p>If the channel layouts of the inputs are disjoint, and therefore compatible,
  16918. the channel layout of the output will be set accordingly and the channels
  16919. will be reordered as necessary. If the channel layouts of the inputs are not
  16920. disjoint, the output will have all the channels of the first input then all
  16921. the channels of the second input, in that order, and the channel layout of
  16922. the output will be the default value corresponding to the total number of
  16923. channels.
  16924. </p>
  16925. <p>For example, if the first input is in 2.1 (FL+FR+LF) and the second input
  16926. is FC+BL+BR, then the output will be in 5.1, with the channels in the
  16927. following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the
  16928. first input, b1 is the first channel of the second input).
  16929. </p>
  16930. <p>On the other hand, if both input are in stereo, the output channels will be
  16931. in the default order: a1, a2, b1, b2, and the channel layout will be
  16932. arbitrarily set to 4.0, which may or may not be the expected value.
  16933. </p>
  16934. <p>All inputs must have the same sample rate, and format.
  16935. </p>
  16936. <p>If inputs do not have the same duration, the output will stop with the
  16937. shortest.
  16938. </p>
  16939. <ul class="mini-toc">
  16940. <li><a href="#Examples-27" accesskey="1">Examples</a></li>
  16941. </ul>
  16942. <div class="subsection-level-extent" id="Examples-27">
  16943. <h4 class="subsection"><span>29.34.1 Examples<a class="copiable-link" href="#Examples-27"> &para;</a></span></h4>
  16944. <ul class="itemize mark-bullet">
  16945. <li>Merge two mono files into a stereo stream:
  16946. <div class="example">
  16947. <pre class="example-preformatted">amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
  16948. </pre></div>
  16949. </li><li>Multiple merges assuming 1 video stream and 6 audio streams in <samp class="file">input.mkv</samp>:
  16950. <div class="example">
  16951. <pre class="example-preformatted">ffmpeg -i input.mkv -filter_complex &quot;[0:1][0:2][0:3][0:4][0:5][0:6] amerge=inputs=6&quot; -c:a pcm_s16le output.mkv
  16952. </pre></div>
  16953. </li></ul>
  16954. </div>
  16955. </div>
  16956. <div class="section-level-extent" id="amix">
  16957. <h3 class="section"><span>29.35 amix<a class="copiable-link" href="#amix"> &para;</a></span></h3>
  16958. <p>Mixes multiple audio inputs into a single output.
  16959. </p>
  16960. <p>Note that this filter only supports float samples (the <var class="var">amerge</var>
  16961. and <var class="var">pan</var> audio filters support many formats). If the <var class="var">amix</var>
  16962. input has integer samples then <a class="ref" href="#aresample">aresample</a> will be automatically
  16963. inserted to perform the conversion to float samples.
  16964. </p>
  16965. <p>It accepts the following parameters:
  16966. </p><dl class="table">
  16967. <dt><samp class="option">inputs</samp></dt>
  16968. <dd><p>The number of inputs. If unspecified, it defaults to 2.
  16969. </p>
  16970. </dd>
  16971. <dt><samp class="option">duration</samp></dt>
  16972. <dd><p>How to determine the end-of-stream.
  16973. </p><dl class="table">
  16974. <dt><samp class="option">longest</samp></dt>
  16975. <dd><p>The duration of the longest input. (default)
  16976. </p>
  16977. </dd>
  16978. <dt><samp class="option">shortest</samp></dt>
  16979. <dd><p>The duration of the shortest input.
  16980. </p>
  16981. </dd>
  16982. <dt><samp class="option">first</samp></dt>
  16983. <dd><p>The duration of the first input.
  16984. </p>
  16985. </dd>
  16986. </dl>
  16987. </dd>
  16988. <dt><samp class="option">dropout_transition</samp></dt>
  16989. <dd><p>The transition time, in seconds, for volume renormalization when an input
  16990. stream ends. The default value is 2 seconds.
  16991. </p>
  16992. </dd>
  16993. <dt><samp class="option">weights</samp></dt>
  16994. <dd><p>Specify weight of each input audio stream as a sequence of numbers separated
  16995. by a space. If fewer weights are specified compared to number of inputs, the
  16996. last weight is assigned to the remaining inputs.
  16997. Default weight for each input is 1.
  16998. </p>
  16999. </dd>
  17000. <dt><samp class="option">normalize</samp></dt>
  17001. <dd><p>Always scale inputs instead of only doing summation of samples.
  17002. Beware of heavy clipping if inputs are not normalized prior or after filtering
  17003. by this filter if this option is disabled. By default is enabled.
  17004. </p></dd>
  17005. </dl>
  17006. <ul class="mini-toc">
  17007. <li><a href="#Examples-28" accesskey="1">Examples</a></li>
  17008. <li><a href="#Commands-14" accesskey="2">Commands</a></li>
  17009. </ul>
  17010. <div class="subsection-level-extent" id="Examples-28">
  17011. <h4 class="subsection"><span>29.35.1 Examples<a class="copiable-link" href="#Examples-28"> &para;</a></span></h4>
  17012. <ul class="itemize mark-bullet">
  17013. <li>This will mix 3 input audio streams to a single output with the same duration as the
  17014. first input and a dropout transition time of 3 seconds:
  17015. <div class="example">
  17016. <pre class="example-preformatted">ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
  17017. </pre></div>
  17018. </li><li>This will mix one vocal and one music input audio stream to a single output with the same duration as the
  17019. longest input. The music will have quarter the weight as the vocals, and the inputs are not normalized:
  17020. <div class="example">
  17021. <pre class="example-preformatted">ffmpeg -i VOCALS -i MUSIC -filter_complex amix=inputs=2:duration=longest:dropout_transition=0:weights=&quot;1 0.25&quot;:normalize=0 OUTPUT
  17022. </pre></div>
  17023. </li></ul>
  17024. </div>
  17025. <div class="subsection-level-extent" id="Commands-14">
  17026. <h4 class="subsection"><span>29.35.2 Commands<a class="copiable-link" href="#Commands-14"> &para;</a></span></h4>
  17027. <p>This filter supports the following commands:
  17028. </p><dl class="table">
  17029. <dt><samp class="option">weights</samp></dt>
  17030. <dt><samp class="option">normalize</samp></dt>
  17031. <dd><p>Syntax is same as option with same name.
  17032. </p></dd>
  17033. </dl>
  17034. </div>
  17035. </div>
  17036. <div class="section-level-extent" id="amultiply">
  17037. <h3 class="section"><span>29.36 amultiply<a class="copiable-link" href="#amultiply"> &para;</a></span></h3>
  17038. <p>Multiply first audio stream with second audio stream and store result
  17039. in output audio stream. Multiplication is done by multiplying each
  17040. sample from first stream with sample at same position from second stream.
  17041. </p>
  17042. <p>With this element-wise multiplication one can create amplitude fades and
  17043. amplitude modulations.
  17044. </p>
  17045. </div>
  17046. <div class="section-level-extent" id="anequalizer">
  17047. <h3 class="section"><span>29.37 anequalizer<a class="copiable-link" href="#anequalizer"> &para;</a></span></h3>
  17048. <p>High-order parametric multiband equalizer for each channel.
  17049. </p>
  17050. <p>It accepts the following parameters:
  17051. </p><dl class="table">
  17052. <dt><samp class="option">params</samp></dt>
  17053. <dd>
  17054. <p>This option string is in format:
  17055. &quot;c<var class="var">chn</var> f=<var class="var">cf</var> w=<var class="var">w</var> g=<var class="var">g</var> t=<var class="var">f</var> | ...&quot;
  17056. Each equalizer band is separated by &rsquo;|&rsquo;.
  17057. </p>
  17058. <dl class="table">
  17059. <dt><samp class="option">chn</samp></dt>
  17060. <dd><p>Set channel number to which equalization will be applied.
  17061. If input doesn&rsquo;t have that channel the entry is ignored.
  17062. </p>
  17063. </dd>
  17064. <dt><samp class="option">f</samp></dt>
  17065. <dd><p>Set central frequency for band.
  17066. If input doesn&rsquo;t have that frequency the entry is ignored.
  17067. </p>
  17068. </dd>
  17069. <dt><samp class="option">w</samp></dt>
  17070. <dd><p>Set band width in Hertz.
  17071. </p>
  17072. </dd>
  17073. <dt><samp class="option">g</samp></dt>
  17074. <dd><p>Set band gain in dB.
  17075. </p>
  17076. </dd>
  17077. <dt><samp class="option">t</samp></dt>
  17078. <dd><p>Set filter type for band, optional, can be:
  17079. </p>
  17080. <dl class="table">
  17081. <dt>&lsquo;<samp class="samp">0</samp>&rsquo;</dt>
  17082. <dd><p>Butterworth, this is default.
  17083. </p>
  17084. </dd>
  17085. <dt>&lsquo;<samp class="samp">1</samp>&rsquo;</dt>
  17086. <dd><p>Chebyshev type 1.
  17087. </p>
  17088. </dd>
  17089. <dt>&lsquo;<samp class="samp">2</samp>&rsquo;</dt>
  17090. <dd><p>Chebyshev type 2.
  17091. </p></dd>
  17092. </dl>
  17093. </dd>
  17094. </dl>
  17095. </dd>
  17096. <dt><samp class="option">curves</samp></dt>
  17097. <dd><p>With this option activated frequency response of anequalizer is displayed
  17098. in video stream.
  17099. </p>
  17100. </dd>
  17101. <dt><samp class="option">size</samp></dt>
  17102. <dd><p>Set video stream size. Only useful if curves option is activated.
  17103. </p>
  17104. </dd>
  17105. <dt><samp class="option">mgain</samp></dt>
  17106. <dd><p>Set max gain that will be displayed. Only useful if curves option is activated.
  17107. Setting this to a reasonable value makes it possible to display gain which is derived from
  17108. neighbour bands which are too close to each other and thus produce higher gain
  17109. when both are activated.
  17110. </p>
  17111. </dd>
  17112. <dt><samp class="option">fscale</samp></dt>
  17113. <dd><p>Set frequency scale used to draw frequency response in video output.
  17114. Can be linear or logarithmic. Default is logarithmic.
  17115. </p>
  17116. </dd>
  17117. <dt><samp class="option">colors</samp></dt>
  17118. <dd><p>Set color for each channel curve which is going to be displayed in video stream.
  17119. This is list of color names separated by space or by &rsquo;|&rsquo;.
  17120. Unrecognised or missing colors will be replaced by white color.
  17121. </p></dd>
  17122. </dl>
  17123. <ul class="mini-toc">
  17124. <li><a href="#Examples-29" accesskey="1">Examples</a></li>
  17125. <li><a href="#Commands-15" accesskey="2">Commands</a></li>
  17126. </ul>
  17127. <div class="subsection-level-extent" id="Examples-29">
  17128. <h4 class="subsection"><span>29.37.1 Examples<a class="copiable-link" href="#Examples-29"> &para;</a></span></h4>
  17129. <ul class="itemize mark-bullet">
  17130. <li>Lower gain by 10 of central frequency 200Hz and width 100 Hz
  17131. for first 2 channels using Chebyshev type 1 filter:
  17132. <div class="example">
  17133. <pre class="example-preformatted">anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
  17134. </pre></div>
  17135. </li></ul>
  17136. </div>
  17137. <div class="subsection-level-extent" id="Commands-15">
  17138. <h4 class="subsection"><span>29.37.2 Commands<a class="copiable-link" href="#Commands-15"> &para;</a></span></h4>
  17139. <p>This filter supports the following commands:
  17140. </p><dl class="table">
  17141. <dt><samp class="option">change</samp></dt>
  17142. <dd><p>Alter existing filter parameters.
  17143. Syntax for the commands is : &quot;<var class="var">fN</var>|f=<var class="var">freq</var>|w=<var class="var">width</var>|g=<var class="var">gain</var>&quot;
  17144. </p>
  17145. <p><var class="var">fN</var> is existing filter number, starting from 0, if no such filter is available
  17146. error is returned.
  17147. <var class="var">freq</var> set new frequency parameter.
  17148. <var class="var">width</var> set new width parameter in Hertz.
  17149. <var class="var">gain</var> set new gain parameter in dB.
  17150. </p>
  17151. <p>Full filter invocation with asendcmd may look like this:
  17152. asendcmd=c=&rsquo;4.0 anequalizer change 0|f=200|w=50|g=1&rsquo;,anequalizer=...
  17153. </p></dd>
  17154. </dl>
  17155. </div>
  17156. </div>
  17157. <div class="section-level-extent" id="anlmdn">
  17158. <h3 class="section"><span>29.38 anlmdn<a class="copiable-link" href="#anlmdn"> &para;</a></span></h3>
  17159. <p>Reduce broadband noise in audio samples using Non-Local Means algorithm.
  17160. </p>
  17161. <p>Each sample is adjusted by looking for other samples with similar contexts. This
  17162. context similarity is defined by comparing their surrounding patches of size
  17163. <samp class="option">p</samp>. Patches are searched in an area of <samp class="option">r</samp> around the sample.
  17164. </p>
  17165. <p>The filter accepts the following options:
  17166. </p>
  17167. <dl class="table">
  17168. <dt><samp class="option">strength, s</samp></dt>
  17169. <dd><p>Set denoising strength. Allowed range is from 0.00001 to 10000. Default value is 0.00001.
  17170. </p>
  17171. </dd>
  17172. <dt><samp class="option">patch, p</samp></dt>
  17173. <dd><p>Set patch radius duration. Allowed range is from 1 to 100 milliseconds.
  17174. Default value is 2 milliseconds.
  17175. </p>
  17176. </dd>
  17177. <dt><samp class="option">research, r</samp></dt>
  17178. <dd><p>Set research radius duration. Allowed range is from 2 to 300 milliseconds.
  17179. Default value is 6 milliseconds.
  17180. </p>
  17181. </dd>
  17182. <dt><samp class="option">output, o</samp></dt>
  17183. <dd><p>Set the output mode.
  17184. </p>
  17185. <p>It accepts the following values:
  17186. </p><dl class="table">
  17187. <dt><samp class="option">i</samp></dt>
  17188. <dd><p>Pass input unchanged.
  17189. </p>
  17190. </dd>
  17191. <dt><samp class="option">o</samp></dt>
  17192. <dd><p>Pass noise filtered out.
  17193. </p>
  17194. </dd>
  17195. <dt><samp class="option">n</samp></dt>
  17196. <dd><p>Pass only noise.
  17197. </p>
  17198. <p>Default value is <var class="var">o</var>.
  17199. </p></dd>
  17200. </dl>
  17201. </dd>
  17202. <dt><samp class="option">smooth, m</samp></dt>
  17203. <dd><p>Set smooth factor. Default value is <var class="var">11</var>. Allowed range is from <var class="var">1</var> to <var class="var">1000</var>.
  17204. </p></dd>
  17205. </dl>
  17206. <ul class="mini-toc">
  17207. <li><a href="#Commands-16" accesskey="1">Commands</a></li>
  17208. </ul>
  17209. <div class="subsection-level-extent" id="Commands-16">
  17210. <h4 class="subsection"><span>29.38.1 Commands<a class="copiable-link" href="#Commands-16"> &para;</a></span></h4>
  17211. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  17212. </p>
  17213. </div>
  17214. </div>
  17215. <div class="section-level-extent" id="anlmf_002c-anlms">
  17216. <h3 class="section"><span>29.39 anlmf, anlms<a class="copiable-link" href="#anlmf_002c-anlms"> &para;</a></span></h3>
  17217. <p>Apply Normalized Least-Mean-(Squares|Fourth) algorithm to the first audio stream using the second audio stream.
  17218. </p>
  17219. <p>This adaptive filter is used to mimic a desired filter by finding the filter coefficients that
  17220. relate to producing the least mean square of the error signal (difference between the desired,
  17221. 2nd input audio stream and the actual signal, the 1st input audio stream).
  17222. </p>
  17223. <p>A description of the accepted options follows.
  17224. </p>
  17225. <dl class="table">
  17226. <dt><samp class="option">order</samp></dt>
  17227. <dd><p>Set filter order.
  17228. </p>
  17229. </dd>
  17230. <dt><samp class="option">mu</samp></dt>
  17231. <dd><p>Set filter mu.
  17232. </p>
  17233. </dd>
  17234. <dt><samp class="option">eps</samp></dt>
  17235. <dd><p>Set the filter eps.
  17236. </p>
  17237. </dd>
  17238. <dt><samp class="option">leakage</samp></dt>
  17239. <dd><p>Set the filter leakage.
  17240. </p>
  17241. </dd>
  17242. <dt><samp class="option">out_mode</samp></dt>
  17243. <dd><p>It accepts the following values:
  17244. </p><dl class="table">
  17245. <dt><samp class="option">i</samp></dt>
  17246. <dd><p>Pass the 1st input.
  17247. </p>
  17248. </dd>
  17249. <dt><samp class="option">d</samp></dt>
  17250. <dd><p>Pass the 2nd input.
  17251. </p>
  17252. </dd>
  17253. <dt><samp class="option">o</samp></dt>
  17254. <dd><p>Pass difference between desired, 2nd input and error signal estimate.
  17255. </p>
  17256. </dd>
  17257. <dt><samp class="option">n</samp></dt>
  17258. <dd><p>Pass difference between input, 1st input and error signal estimate.
  17259. </p>
  17260. </dd>
  17261. <dt><samp class="option">e</samp></dt>
  17262. <dd><p>Pass error signal estimated samples.
  17263. </p>
  17264. <p>Default value is <var class="var">o</var>.
  17265. </p></dd>
  17266. </dl>
  17267. </dd>
  17268. <dt><samp class="option">precision</samp></dt>
  17269. <dd><p>Set which precision to use when processing samples.
  17270. </p>
  17271. <dl class="table">
  17272. <dt><samp class="option">auto</samp></dt>
  17273. <dd><p>Auto pick internal sample format depending on other filters.
  17274. </p>
  17275. </dd>
  17276. <dt><samp class="option">float</samp></dt>
  17277. <dd><p>Always use single-floating point precision sample format.
  17278. </p>
  17279. </dd>
  17280. <dt><samp class="option">double</samp></dt>
  17281. <dd><p>Always use double-floating point precision sample format.
  17282. </p></dd>
  17283. </dl>
  17284. </dd>
  17285. </dl>
  17286. <ul class="mini-toc">
  17287. <li><a href="#Examples-30" accesskey="1">Examples</a></li>
  17288. <li><a href="#Commands-17" accesskey="2">Commands</a></li>
  17289. </ul>
  17290. <div class="subsection-level-extent" id="Examples-30">
  17291. <h4 class="subsection"><span>29.39.1 Examples<a class="copiable-link" href="#Examples-30"> &para;</a></span></h4>
  17292. <ul class="itemize mark-bullet">
  17293. <li>One of many usages of this filter is noise reduction, input audio is filtered
  17294. with same samples that are delayed by fixed amount, one such example for stereo audio is:
  17295. <div class="example">
  17296. <pre class="example-preformatted">asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
  17297. </pre></div>
  17298. </li></ul>
  17299. </div>
  17300. <div class="subsection-level-extent" id="Commands-17">
  17301. <h4 class="subsection"><span>29.39.2 Commands<a class="copiable-link" href="#Commands-17"> &para;</a></span></h4>
  17302. <p>This filter supports the same commands as options, excluding option <code class="code">order</code>.
  17303. </p>
  17304. </div>
  17305. </div>
  17306. <div class="section-level-extent" id="anull">
  17307. <h3 class="section"><span>29.40 anull<a class="copiable-link" href="#anull"> &para;</a></span></h3>
  17308. <p>Pass the audio source unchanged to the output.
  17309. </p>
  17310. </div>
  17311. <div class="section-level-extent" id="apad">
  17312. <h3 class="section"><span>29.41 apad<a class="copiable-link" href="#apad"> &para;</a></span></h3>
  17313. <p>Pad the end of an audio stream with silence.
  17314. </p>
  17315. <p>This can be used together with <code class="command">ffmpeg</code> <samp class="option">-shortest</samp> to
  17316. extend audio streams to the same length as the video stream.
  17317. </p>
  17318. <p>A description of the accepted options follows.
  17319. </p>
  17320. <dl class="table">
  17321. <dt><samp class="option">packet_size</samp></dt>
  17322. <dd><p>Set silence packet size. Default value is 4096.
  17323. </p>
  17324. </dd>
  17325. <dt><samp class="option">pad_len</samp></dt>
  17326. <dd><p>Set the number of samples of silence to add to the end. After the
  17327. value is reached, the stream is terminated. This option is mutually
  17328. exclusive with <samp class="option">whole_len</samp>.
  17329. </p>
  17330. </dd>
  17331. <dt><samp class="option">whole_len</samp></dt>
  17332. <dd><p>Set the minimum total number of samples in the output audio stream. If
  17333. the value is longer than the input audio length, silence is added to
  17334. the end, until the value is reached. This option is mutually exclusive
  17335. with <samp class="option">pad_len</samp>.
  17336. </p>
  17337. </dd>
  17338. <dt><samp class="option">pad_dur</samp></dt>
  17339. <dd><p>Specify the duration of samples of silence to add. See
  17340. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  17341. for the accepted syntax. Used only if set to non-negative value.
  17342. </p>
  17343. </dd>
  17344. <dt><samp class="option">whole_dur</samp></dt>
  17345. <dd><p>Specify the minimum total duration in the output audio stream. See
  17346. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  17347. for the accepted syntax. Used only if set to non-negative value. If the value is longer than
  17348. the input audio length, silence is added to the end, until the value is reached.
  17349. This option is mutually exclusive with <samp class="option">pad_dur</samp>
  17350. </p></dd>
  17351. </dl>
  17352. <p>If neither the <samp class="option">pad_len</samp> nor the <samp class="option">whole_len</samp> nor <samp class="option">pad_dur</samp>
  17353. nor <samp class="option">whole_dur</samp> option is set, the filter will add silence to the end of
  17354. the input stream indefinitely.
  17355. </p>
  17356. <p>Note that for ffmpeg 4.4 and earlier a zero <samp class="option">pad_dur</samp> or
  17357. <samp class="option">whole_dur</samp> also caused the filter to add silence indefinitely.
  17358. </p>
  17359. <ul class="mini-toc">
  17360. <li><a href="#Examples-31" accesskey="1">Examples</a></li>
  17361. </ul>
  17362. <div class="subsection-level-extent" id="Examples-31">
  17363. <h4 class="subsection"><span>29.41.1 Examples<a class="copiable-link" href="#Examples-31"> &para;</a></span></h4>
  17364. <ul class="itemize mark-bullet">
  17365. <li>Add 1024 samples of silence to the end of the input:
  17366. <div class="example">
  17367. <pre class="example-preformatted">apad=pad_len=1024
  17368. </pre></div>
  17369. </li><li>Make sure the audio output will contain at least 10000 samples, pad
  17370. the input with silence if required:
  17371. <div class="example">
  17372. <pre class="example-preformatted">apad=whole_len=10000
  17373. </pre></div>
  17374. </li><li>Use <code class="command">ffmpeg</code> to pad the audio input with silence, so that the
  17375. video stream will always result the shortest and will be converted
  17376. until the end in the output file when using the <samp class="option">shortest</samp>
  17377. option:
  17378. <div class="example">
  17379. <pre class="example-preformatted">ffmpeg -i VIDEO -i AUDIO -filter_complex &quot;[1:0]apad&quot; -shortest OUTPUT
  17380. </pre></div>
  17381. </li></ul>
  17382. </div>
  17383. </div>
  17384. <div class="section-level-extent" id="aphaser">
  17385. <h3 class="section"><span>29.42 aphaser<a class="copiable-link" href="#aphaser"> &para;</a></span></h3>
  17386. <p>Add a phasing effect to the input audio.
  17387. </p>
  17388. <p>A phaser filter creates series of peaks and troughs in the frequency spectrum.
  17389. The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect.
  17390. </p>
  17391. <p>A description of the accepted parameters follows.
  17392. </p>
  17393. <dl class="table">
  17394. <dt><samp class="option">in_gain</samp></dt>
  17395. <dd><p>Set input gain. Default is 0.4.
  17396. </p>
  17397. </dd>
  17398. <dt><samp class="option">out_gain</samp></dt>
  17399. <dd><p>Set output gain. Default is 0.74
  17400. </p>
  17401. </dd>
  17402. <dt><samp class="option">delay</samp></dt>
  17403. <dd><p>Set delay in milliseconds. Default is 3.0.
  17404. </p>
  17405. </dd>
  17406. <dt><samp class="option">decay</samp></dt>
  17407. <dd><p>Set decay. Default is 0.4.
  17408. </p>
  17409. </dd>
  17410. <dt><samp class="option">speed</samp></dt>
  17411. <dd><p>Set modulation speed in Hz. Default is 0.5.
  17412. </p>
  17413. </dd>
  17414. <dt><samp class="option">type</samp></dt>
  17415. <dd><p>Set modulation type. Default is triangular.
  17416. </p>
  17417. <p>It accepts the following values:
  17418. </p><dl class="table">
  17419. <dt>&lsquo;<samp class="samp">triangular, t</samp>&rsquo;</dt>
  17420. <dt>&lsquo;<samp class="samp">sinusoidal, s</samp>&rsquo;</dt>
  17421. </dl>
  17422. </dd>
  17423. </dl>
  17424. </div>
  17425. <div class="section-level-extent" id="aphaseshift">
  17426. <h3 class="section"><span>29.43 aphaseshift<a class="copiable-link" href="#aphaseshift"> &para;</a></span></h3>
  17427. <p>Apply phase shift to input audio samples.
  17428. </p>
  17429. <p>The filter accepts the following options:
  17430. </p>
  17431. <dl class="table">
  17432. <dt><samp class="option">shift</samp></dt>
  17433. <dd><p>Specify phase shift. Allowed range is from -1.0 to 1.0.
  17434. Default value is 0.0.
  17435. </p>
  17436. </dd>
  17437. <dt><samp class="option">level</samp></dt>
  17438. <dd><p>Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
  17439. Default value is 1.0.
  17440. </p>
  17441. </dd>
  17442. <dt><samp class="option">order</samp></dt>
  17443. <dd><p>Set filter order used for filtering. Allowed range is from 1 to 16.
  17444. Default value is 8.
  17445. </p></dd>
  17446. </dl>
  17447. <ul class="mini-toc">
  17448. <li><a href="#Commands-18" accesskey="1">Commands</a></li>
  17449. </ul>
  17450. <div class="subsection-level-extent" id="Commands-18">
  17451. <h4 class="subsection"><span>29.43.1 Commands<a class="copiable-link" href="#Commands-18"> &para;</a></span></h4>
  17452. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  17453. </p>
  17454. </div>
  17455. </div>
  17456. <div class="section-level-extent" id="apsnr">
  17457. <h3 class="section"><span>29.44 apsnr<a class="copiable-link" href="#apsnr"> &para;</a></span></h3>
  17458. <p>Measure Audio Peak Signal-to-Noise Ratio.
  17459. </p>
  17460. <p>This filter takes two audio streams for input, and outputs first
  17461. audio stream.
  17462. Results are in dB per channel at end of either input.
  17463. </p>
  17464. </div>
  17465. <div class="section-level-extent" id="apsyclip">
  17466. <h3 class="section"><span>29.45 apsyclip<a class="copiable-link" href="#apsyclip"> &para;</a></span></h3>
  17467. <p>Apply Psychoacoustic clipper to input audio stream.
  17468. </p>
  17469. <p>The filter accepts the following options:
  17470. </p>
  17471. <dl class="table">
  17472. <dt><samp class="option">level_in</samp></dt>
  17473. <dd><p>Set input gain. By default it is 1. Range is [0.015625 - 64].
  17474. </p>
  17475. </dd>
  17476. <dt><samp class="option">level_out</samp></dt>
  17477. <dd><p>Set output gain. By default it is 1. Range is [0.015625 - 64].
  17478. </p>
  17479. </dd>
  17480. <dt><samp class="option">clip</samp></dt>
  17481. <dd><p>Set the clipping start value. Default value is 0dBFS or 1.
  17482. </p>
  17483. </dd>
  17484. <dt><samp class="option">diff</samp></dt>
  17485. <dd><p>Output only difference samples, useful to hear introduced distortions.
  17486. By default is disabled.
  17487. </p>
  17488. </dd>
  17489. <dt><samp class="option">adaptive</samp></dt>
  17490. <dd><p>Set strength of adaptive distortion applied. Default value is 0.5.
  17491. Allowed range is from 0 to 1.
  17492. </p>
  17493. </dd>
  17494. <dt><samp class="option">iterations</samp></dt>
  17495. <dd><p>Set number of iterations of psychoacoustic clipper.
  17496. Allowed range is from 1 to 20. Default value is 10.
  17497. </p>
  17498. </dd>
  17499. <dt><samp class="option">level</samp></dt>
  17500. <dd><p>Auto level output signal. Default is disabled.
  17501. This normalizes audio back to 0dBFS if enabled.
  17502. </p></dd>
  17503. </dl>
  17504. <ul class="mini-toc">
  17505. <li><a href="#Commands-19" accesskey="1">Commands</a></li>
  17506. </ul>
  17507. <div class="subsection-level-extent" id="Commands-19">
  17508. <h4 class="subsection"><span>29.45.1 Commands<a class="copiable-link" href="#Commands-19"> &para;</a></span></h4>
  17509. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  17510. </p>
  17511. </div>
  17512. </div>
  17513. <div class="section-level-extent" id="apulsator">
  17514. <h3 class="section"><span>29.46 apulsator<a class="copiable-link" href="#apulsator"> &para;</a></span></h3>
  17515. <p>Audio pulsator is something between an autopanner and a tremolo.
  17516. But it can produce funny stereo effects as well. Pulsator changes the volume
  17517. of the left and right channel based on a LFO (low frequency oscillator) with
  17518. different waveforms and shifted phases.
  17519. This filter have the ability to define an offset between left and right
  17520. channel. An offset of 0 means that both LFO shapes match each other.
  17521. The left and right channel are altered equally - a conventional tremolo.
  17522. An offset of 50% means that the shape of the right channel is exactly shifted
  17523. in phase (or moved backwards about half of the frequency) - pulsator acts as
  17524. an autopanner. At 1 both curves match again. Every setting in between moves the
  17525. phase shift gapless between all stages and produces some &quot;bypassing&quot; sounds with
  17526. sine and triangle waveforms. The more you set the offset near 1 (starting from
  17527. the 0.5) the faster the signal passes from the left to the right speaker.
  17528. </p>
  17529. <p>The filter accepts the following options:
  17530. </p>
  17531. <dl class="table">
  17532. <dt><samp class="option">level_in</samp></dt>
  17533. <dd><p>Set input gain. By default it is 1. Range is [0.015625 - 64].
  17534. </p>
  17535. </dd>
  17536. <dt><samp class="option">level_out</samp></dt>
  17537. <dd><p>Set output gain. By default it is 1. Range is [0.015625 - 64].
  17538. </p>
  17539. </dd>
  17540. <dt><samp class="option">mode</samp></dt>
  17541. <dd><p>Set waveform shape the LFO will use. Can be one of: sine, triangle, square,
  17542. sawup or sawdown. Default is sine.
  17543. </p>
  17544. </dd>
  17545. <dt><samp class="option">amount</samp></dt>
  17546. <dd><p>Set modulation. Define how much of original signal is affected by the LFO.
  17547. </p>
  17548. </dd>
  17549. <dt><samp class="option">offset_l</samp></dt>
  17550. <dd><p>Set left channel offset. Default is 0. Allowed range is [0 - 1].
  17551. </p>
  17552. </dd>
  17553. <dt><samp class="option">offset_r</samp></dt>
  17554. <dd><p>Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
  17555. </p>
  17556. </dd>
  17557. <dt><samp class="option">width</samp></dt>
  17558. <dd><p>Set pulse width. Default is 1. Allowed range is [0 - 2].
  17559. </p>
  17560. </dd>
  17561. <dt><samp class="option">timing</samp></dt>
  17562. <dd><p>Set possible timing mode. Can be one of: bpm, ms or hz. Default is hz.
  17563. </p>
  17564. </dd>
  17565. <dt><samp class="option">bpm</samp></dt>
  17566. <dd><p>Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if timing
  17567. is set to bpm.
  17568. </p>
  17569. </dd>
  17570. <dt><samp class="option">ms</samp></dt>
  17571. <dd><p>Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if timing
  17572. is set to ms.
  17573. </p>
  17574. </dd>
  17575. <dt><samp class="option">hz</samp></dt>
  17576. <dd><p>Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100]. Only used
  17577. if timing is set to hz.
  17578. </p></dd>
  17579. </dl>
  17580. <a class="anchor" id="aresample"></a></div>
  17581. <div class="section-level-extent" id="aresample-1">
  17582. <h3 class="section"><span>29.47 aresample<a class="copiable-link" href="#aresample-1"> &para;</a></span></h3>
  17583. <p>Resample the input audio to the specified parameters, using the
  17584. libswresample library. If none are specified then the filter will
  17585. automatically convert between its input and output.
  17586. </p>
  17587. <p>This filter is also able to stretch/squeeze the audio data to make it match
  17588. the timestamps or to inject silence / cut out audio to make it match the
  17589. timestamps, do a combination of both or do neither.
  17590. </p>
  17591. <p>The filter accepts the syntax
  17592. [<var class="var">sample_rate</var>:]<var class="var">resampler_options</var>, where <var class="var">sample_rate</var>
  17593. expresses a sample rate and <var class="var">resampler_options</var> is a list of
  17594. <var class="var">key</var>=<var class="var">value</var> pairs, separated by &quot;:&quot;. See the
  17595. <a data-manual="ffmpeg-resampler" href="ffmpeg-resampler.html#Resampler-Options">&quot;Resampler Options&quot; section in the
  17596. ffmpeg-resampler(1) manual</a>
  17597. for the complete list of supported options.
  17598. </p>
  17599. <ul class="mini-toc">
  17600. <li><a href="#Examples-32" accesskey="1">Examples</a></li>
  17601. </ul>
  17602. <div class="subsection-level-extent" id="Examples-32">
  17603. <h4 class="subsection"><span>29.47.1 Examples<a class="copiable-link" href="#Examples-32"> &para;</a></span></h4>
  17604. <ul class="itemize mark-bullet">
  17605. <li>Resample the input audio to 44100Hz:
  17606. <div class="example">
  17607. <pre class="example-preformatted">aresample=44100
  17608. </pre></div>
  17609. </li><li>Stretch/squeeze samples to the given timestamps, with a maximum of 1000
  17610. samples per second compensation:
  17611. <div class="example">
  17612. <pre class="example-preformatted">aresample=async=1000
  17613. </pre></div>
  17614. </li></ul>
  17615. </div>
  17616. </div>
  17617. <div class="section-level-extent" id="areverse">
  17618. <h3 class="section"><span>29.48 areverse<a class="copiable-link" href="#areverse"> &para;</a></span></h3>
  17619. <p>Reverse an audio clip.
  17620. </p>
  17621. <p>Warning: This filter requires memory to buffer the entire clip, so trimming
  17622. is suggested.
  17623. </p>
  17624. <ul class="mini-toc">
  17625. <li><a href="#Examples-33" accesskey="1">Examples</a></li>
  17626. </ul>
  17627. <div class="subsection-level-extent" id="Examples-33">
  17628. <h4 class="subsection"><span>29.48.1 Examples<a class="copiable-link" href="#Examples-33"> &para;</a></span></h4>
  17629. <ul class="itemize mark-bullet">
  17630. <li>Take the first 5 seconds of a clip, and reverse it.
  17631. <div class="example">
  17632. <pre class="example-preformatted">atrim=end=5,areverse
  17633. </pre></div>
  17634. </li></ul>
  17635. </div>
  17636. </div>
  17637. <div class="section-level-extent" id="arls">
  17638. <h3 class="section"><span>29.49 arls<a class="copiable-link" href="#arls"> &para;</a></span></h3>
  17639. <p>Apply Recursive Least Squares algorithm to the first audio stream using the second audio stream.
  17640. </p>
  17641. <p>This adaptive filter is used to mimic a desired filter by recursively finding the filter coefficients that
  17642. relate to producing the minimal weighted linear least squares cost function of the error signal (difference
  17643. between the desired, 2nd input audio stream and the actual signal, the 1st input audio stream).
  17644. </p>
  17645. <p>A description of the accepted options follows.
  17646. </p>
  17647. <dl class="table">
  17648. <dt><samp class="option">order</samp></dt>
  17649. <dd><p>Set the filter order.
  17650. </p>
  17651. </dd>
  17652. <dt><samp class="option">lambda</samp></dt>
  17653. <dd><p>Set the forgetting factor.
  17654. </p>
  17655. </dd>
  17656. <dt><samp class="option">delta</samp></dt>
  17657. <dd><p>Set the coefficient to initialize internal covariance matrix.
  17658. </p>
  17659. </dd>
  17660. <dt><samp class="option">out_mode</samp></dt>
  17661. <dd><p>Set the filter output samples. It accepts the following values:
  17662. </p><dl class="table">
  17663. <dt><samp class="option">i</samp></dt>
  17664. <dd><p>Pass the 1st input.
  17665. </p>
  17666. </dd>
  17667. <dt><samp class="option">d</samp></dt>
  17668. <dd><p>Pass the 2nd input.
  17669. </p>
  17670. </dd>
  17671. <dt><samp class="option">o</samp></dt>
  17672. <dd><p>Pass difference between desired, 2nd input and error signal estimate.
  17673. </p>
  17674. </dd>
  17675. <dt><samp class="option">n</samp></dt>
  17676. <dd><p>Pass difference between input, 1st input and error signal estimate.
  17677. </p>
  17678. </dd>
  17679. <dt><samp class="option">e</samp></dt>
  17680. <dd><p>Pass error signal estimated samples.
  17681. </p>
  17682. <p>Default value is <var class="var">o</var>.
  17683. </p></dd>
  17684. </dl>
  17685. </dd>
  17686. <dt><samp class="option">precision</samp></dt>
  17687. <dd><p>Set which precision to use when processing samples.
  17688. </p>
  17689. <dl class="table">
  17690. <dt><samp class="option">auto</samp></dt>
  17691. <dd><p>Auto pick internal sample format depending on other filters.
  17692. </p>
  17693. </dd>
  17694. <dt><samp class="option">float</samp></dt>
  17695. <dd><p>Always use single-floating point precision sample format.
  17696. </p>
  17697. </dd>
  17698. <dt><samp class="option">double</samp></dt>
  17699. <dd><p>Always use double-floating point precision sample format.
  17700. </p></dd>
  17701. </dl>
  17702. </dd>
  17703. </dl>
  17704. </div>
  17705. <div class="section-level-extent" id="arnndn">
  17706. <h3 class="section"><span>29.50 arnndn<a class="copiable-link" href="#arnndn"> &para;</a></span></h3>
  17707. <p>Reduce noise from speech using Recurrent Neural Networks.
  17708. </p>
  17709. <p>This filter accepts the following options:
  17710. </p>
  17711. <dl class="table">
  17712. <dt><samp class="option">model, m</samp></dt>
  17713. <dd><p>Set train model file to load. This option is always required.
  17714. </p>
  17715. </dd>
  17716. <dt><samp class="option">mix</samp></dt>
  17717. <dd><p>Set how much to mix filtered samples into final output.
  17718. Allowed range is from -1 to 1. Default value is 1.
  17719. Negative values are special, they set how much to keep filtered noise
  17720. in the final filter output. Set this option to -1 to hear actual
  17721. noise removed from input signal.
  17722. </p></dd>
  17723. </dl>
  17724. <ul class="mini-toc">
  17725. <li><a href="#Commands-20" accesskey="1">Commands</a></li>
  17726. </ul>
  17727. <div class="subsection-level-extent" id="Commands-20">
  17728. <h4 class="subsection"><span>29.50.1 Commands<a class="copiable-link" href="#Commands-20"> &para;</a></span></h4>
  17729. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  17730. </p>
  17731. </div>
  17732. </div>
  17733. <div class="section-level-extent" id="asdr">
  17734. <h3 class="section"><span>29.51 asdr<a class="copiable-link" href="#asdr"> &para;</a></span></h3>
  17735. <p>Measure Audio Signal-to-Distortion Ratio.
  17736. </p>
  17737. <p>This filter takes two audio streams for input, and outputs first
  17738. audio stream.
  17739. Results are in dB per channel at end of either input.
  17740. </p>
  17741. </div>
  17742. <div class="section-level-extent" id="asetnsamples">
  17743. <h3 class="section"><span>29.52 asetnsamples<a class="copiable-link" href="#asetnsamples"> &para;</a></span></h3>
  17744. <p>Set the number of samples per each output audio frame.
  17745. </p>
  17746. <p>The last output packet may contain a different number of samples, as
  17747. the filter will flush all the remaining samples when the input audio
  17748. signals its end.
  17749. </p>
  17750. <p>The filter accepts the following options:
  17751. </p>
  17752. <dl class="table">
  17753. <dt><samp class="option">nb_out_samples, n</samp></dt>
  17754. <dd><p>Set the number of frames per each output audio frame. The number is
  17755. intended as the number of samples <em class="emph">per each channel</em>.
  17756. Default value is 1024.
  17757. </p>
  17758. </dd>
  17759. <dt><samp class="option">pad, p</samp></dt>
  17760. <dd><p>If set to 1, the filter will pad the last audio frame with zeroes, so
  17761. that the last frame will contain the same number of samples as the
  17762. previous ones. Default value is 1.
  17763. </p></dd>
  17764. </dl>
  17765. <p>For example, to set the number of per-frame samples to 1234 and
  17766. disable padding for the last frame, use:
  17767. </p><div class="example">
  17768. <pre class="example-preformatted">asetnsamples=n=1234:p=0
  17769. </pre></div>
  17770. </div>
  17771. <div class="section-level-extent" id="asetrate">
  17772. <h3 class="section"><span>29.53 asetrate<a class="copiable-link" href="#asetrate"> &para;</a></span></h3>
  17773. <p>Set the sample rate without altering the PCM data.
  17774. This will result in a change of speed and pitch.
  17775. </p>
  17776. <p>The filter accepts the following options:
  17777. </p>
  17778. <dl class="table">
  17779. <dt><samp class="option">sample_rate, r</samp></dt>
  17780. <dd><p>Set the output sample rate. Default is 44100 Hz.
  17781. </p></dd>
  17782. </dl>
  17783. </div>
  17784. <div class="section-level-extent" id="ashowinfo">
  17785. <h3 class="section"><span>29.54 ashowinfo<a class="copiable-link" href="#ashowinfo"> &para;</a></span></h3>
  17786. <p>Show a line containing various information for each input audio frame.
  17787. The input audio is not modified.
  17788. </p>
  17789. <p>The shown line contains a sequence of key/value pairs of the form
  17790. <var class="var">key</var>:<var class="var">value</var>.
  17791. </p>
  17792. <p>The following values are shown in the output:
  17793. </p>
  17794. <dl class="table">
  17795. <dt><samp class="option">n</samp></dt>
  17796. <dd><p>The (sequential) number of the input frame, starting from 0.
  17797. </p>
  17798. </dd>
  17799. <dt><samp class="option">pts</samp></dt>
  17800. <dd><p>The presentation timestamp of the input frame, in time base units; the time base
  17801. depends on the filter input pad, and is usually 1/<var class="var">sample_rate</var>.
  17802. </p>
  17803. </dd>
  17804. <dt><samp class="option">pts_time</samp></dt>
  17805. <dd><p>The presentation timestamp of the input frame in seconds.
  17806. </p>
  17807. </dd>
  17808. <dt><samp class="option">fmt</samp></dt>
  17809. <dd><p>The sample format.
  17810. </p>
  17811. </dd>
  17812. <dt><samp class="option">chlayout</samp></dt>
  17813. <dd><p>The channel layout.
  17814. </p>
  17815. </dd>
  17816. <dt><samp class="option">rate</samp></dt>
  17817. <dd><p>The sample rate for the audio frame.
  17818. </p>
  17819. </dd>
  17820. <dt><samp class="option">nb_samples</samp></dt>
  17821. <dd><p>The number of samples (per channel) in the frame.
  17822. </p>
  17823. </dd>
  17824. <dt><samp class="option">checksum</samp></dt>
  17825. <dd><p>The Adler-32 checksum (printed in hexadecimal) of the audio data. For planar
  17826. audio, the data is treated as if all the planes were concatenated.
  17827. </p>
  17828. </dd>
  17829. <dt><samp class="option">plane_checksums</samp></dt>
  17830. <dd><p>A list of Adler-32 checksums for each data plane.
  17831. </p></dd>
  17832. </dl>
  17833. </div>
  17834. <div class="section-level-extent" id="asisdr">
  17835. <h3 class="section"><span>29.55 asisdr<a class="copiable-link" href="#asisdr"> &para;</a></span></h3>
  17836. <p>Measure Audio Scaled-Invariant Signal-to-Distortion Ratio.
  17837. </p>
  17838. <p>This filter takes two audio streams for input, and outputs first
  17839. audio stream.
  17840. Results are in dB per channel at end of either input.
  17841. </p>
  17842. </div>
  17843. <div class="section-level-extent" id="asoftclip">
  17844. <h3 class="section"><span>29.56 asoftclip<a class="copiable-link" href="#asoftclip"> &para;</a></span></h3>
  17845. <p>Apply audio soft clipping.
  17846. </p>
  17847. <p>Soft clipping is a type of distortion effect where the amplitude of a signal is saturated
  17848. along a smooth curve, rather than the abrupt shape of hard-clipping.
  17849. </p>
  17850. <p>This filter accepts the following options:
  17851. </p>
  17852. <dl class="table">
  17853. <dt><samp class="option">type</samp></dt>
  17854. <dd><p>Set type of soft-clipping.
  17855. </p>
  17856. <p>It accepts the following values:
  17857. </p><dl class="table">
  17858. <dt><samp class="option">hard</samp></dt>
  17859. <dt><samp class="option">tanh</samp></dt>
  17860. <dt><samp class="option">atan</samp></dt>
  17861. <dt><samp class="option">cubic</samp></dt>
  17862. <dt><samp class="option">exp</samp></dt>
  17863. <dt><samp class="option">alg</samp></dt>
  17864. <dt><samp class="option">quintic</samp></dt>
  17865. <dt><samp class="option">sin</samp></dt>
  17866. <dt><samp class="option">erf</samp></dt>
  17867. </dl>
  17868. </dd>
  17869. <dt><samp class="option">threshold</samp></dt>
  17870. <dd><p>Set threshold from where to start clipping. Default value is 0dB or 1.
  17871. </p>
  17872. </dd>
  17873. <dt><samp class="option">output</samp></dt>
  17874. <dd><p>Set gain applied to output. Default value is 0dB or 1.
  17875. </p>
  17876. </dd>
  17877. <dt><samp class="option">param</samp></dt>
  17878. <dd><p>Set additional parameter which controls sigmoid function.
  17879. </p>
  17880. </dd>
  17881. <dt><samp class="option">oversample</samp></dt>
  17882. <dd><p>Set oversampling factor.
  17883. </p></dd>
  17884. </dl>
  17885. <ul class="mini-toc">
  17886. <li><a href="#Commands-21" accesskey="1">Commands</a></li>
  17887. </ul>
  17888. <div class="subsection-level-extent" id="Commands-21">
  17889. <h4 class="subsection"><span>29.56.1 Commands<a class="copiable-link" href="#Commands-21"> &para;</a></span></h4>
  17890. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  17891. </p>
  17892. </div>
  17893. </div>
  17894. <div class="section-level-extent" id="aspectralstats">
  17895. <h3 class="section"><span>29.57 aspectralstats<a class="copiable-link" href="#aspectralstats"> &para;</a></span></h3>
  17896. <p>Display frequency domain statistical information about the audio channels.
  17897. Statistics are calculated and stored as metadata for each audio channel and for each audio frame.
  17898. </p>
  17899. <p>It accepts the following option:
  17900. </p><dl class="table">
  17901. <dt><samp class="option">win_size</samp></dt>
  17902. <dd><p>Set the window length in samples. Default value is 2048.
  17903. Allowed range is from 32 to 65536.
  17904. </p>
  17905. </dd>
  17906. <dt><samp class="option">win_func</samp></dt>
  17907. <dd><p>Set window function.
  17908. </p>
  17909. <p>It accepts the following values:
  17910. </p><dl class="table">
  17911. <dt>&lsquo;<samp class="samp">rect</samp>&rsquo;</dt>
  17912. <dt>&lsquo;<samp class="samp">bartlett</samp>&rsquo;</dt>
  17913. <dt>&lsquo;<samp class="samp">hann, hanning</samp>&rsquo;</dt>
  17914. <dt>&lsquo;<samp class="samp">hamming</samp>&rsquo;</dt>
  17915. <dt>&lsquo;<samp class="samp">blackman</samp>&rsquo;</dt>
  17916. <dt>&lsquo;<samp class="samp">welch</samp>&rsquo;</dt>
  17917. <dt>&lsquo;<samp class="samp">flattop</samp>&rsquo;</dt>
  17918. <dt>&lsquo;<samp class="samp">bharris</samp>&rsquo;</dt>
  17919. <dt>&lsquo;<samp class="samp">bnuttall</samp>&rsquo;</dt>
  17920. <dt>&lsquo;<samp class="samp">bhann</samp>&rsquo;</dt>
  17921. <dt>&lsquo;<samp class="samp">sine</samp>&rsquo;</dt>
  17922. <dt>&lsquo;<samp class="samp">nuttall</samp>&rsquo;</dt>
  17923. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  17924. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  17925. <dt>&lsquo;<samp class="samp">tukey</samp>&rsquo;</dt>
  17926. <dt>&lsquo;<samp class="samp">dolph</samp>&rsquo;</dt>
  17927. <dt>&lsquo;<samp class="samp">cauchy</samp>&rsquo;</dt>
  17928. <dt>&lsquo;<samp class="samp">parzen</samp>&rsquo;</dt>
  17929. <dt>&lsquo;<samp class="samp">poisson</samp>&rsquo;</dt>
  17930. <dt>&lsquo;<samp class="samp">bohman</samp>&rsquo;</dt>
  17931. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  17932. </dl>
  17933. <p>Default is <code class="code">hann</code>.
  17934. </p>
  17935. </dd>
  17936. <dt><samp class="option">overlap</samp></dt>
  17937. <dd><p>Set window overlap. Allowed range is from <code class="code">0</code>
  17938. to <code class="code">1</code>. Default value is <code class="code">0.5</code>.
  17939. </p>
  17940. </dd>
  17941. <dt><samp class="option">measure</samp></dt>
  17942. <dd><p>Select the parameters which are measured. The metadata keys can
  17943. be used as flags, default is <samp class="option">all</samp> which measures everything.
  17944. <samp class="option">none</samp> disables all measurement.
  17945. </p></dd>
  17946. </dl>
  17947. <p>A list of each metadata key follows:
  17948. </p>
  17949. <dl class="table">
  17950. <dt><samp class="option">mean</samp></dt>
  17951. <dt><samp class="option">variance</samp></dt>
  17952. <dt><samp class="option">centroid</samp></dt>
  17953. <dt><samp class="option">spread</samp></dt>
  17954. <dt><samp class="option">skewness</samp></dt>
  17955. <dt><samp class="option">kurtosis</samp></dt>
  17956. <dt><samp class="option">entropy</samp></dt>
  17957. <dt><samp class="option">flatness</samp></dt>
  17958. <dt><samp class="option">crest</samp></dt>
  17959. <dt><samp class="option">flux</samp></dt>
  17960. <dt><samp class="option">slope</samp></dt>
  17961. <dt><samp class="option">decrease</samp></dt>
  17962. <dt><samp class="option">rolloff</samp></dt>
  17963. </dl>
  17964. </div>
  17965. <div class="section-level-extent" id="asr">
  17966. <h3 class="section"><span>29.58 asr<a class="copiable-link" href="#asr"> &para;</a></span></h3>
  17967. <p>Automatic Speech Recognition
  17968. </p>
  17969. <p>This filter uses PocketSphinx for speech recognition. To enable
  17970. compilation of this filter, you need to configure FFmpeg with
  17971. <code class="code">--enable-pocketsphinx</code>.
  17972. </p>
  17973. <p>It accepts the following options:
  17974. </p>
  17975. <dl class="table">
  17976. <dt><samp class="option">rate</samp></dt>
  17977. <dd><p>Set sampling rate of input audio. Defaults is <code class="code">16000</code>.
  17978. This need to match speech models, otherwise one will get poor results.
  17979. </p>
  17980. </dd>
  17981. <dt><samp class="option">hmm</samp></dt>
  17982. <dd><p>Set dictionary containing acoustic model files.
  17983. </p>
  17984. </dd>
  17985. <dt><samp class="option">dict</samp></dt>
  17986. <dd><p>Set pronunciation dictionary.
  17987. </p>
  17988. </dd>
  17989. <dt><samp class="option">lm</samp></dt>
  17990. <dd><p>Set language model file.
  17991. </p>
  17992. </dd>
  17993. <dt><samp class="option">lmctl</samp></dt>
  17994. <dd><p>Set language model set.
  17995. </p>
  17996. </dd>
  17997. <dt><samp class="option">lmname</samp></dt>
  17998. <dd><p>Set which language model to use.
  17999. </p>
  18000. </dd>
  18001. <dt><samp class="option">logfn</samp></dt>
  18002. <dd><p>Set output for log messages.
  18003. </p></dd>
  18004. </dl>
  18005. <p>The filter exports recognized speech as the frame metadata <code class="code">lavfi.asr.text</code>.
  18006. </p>
  18007. <a class="anchor" id="astats"></a></div>
  18008. <div class="section-level-extent" id="astats-1">
  18009. <h3 class="section"><span>29.59 astats<a class="copiable-link" href="#astats-1"> &para;</a></span></h3>
  18010. <p>Display time domain statistical information about the audio channels.
  18011. Statistics are calculated and displayed for each audio channel and,
  18012. where applicable, an overall figure is also given.
  18013. </p>
  18014. <p>It accepts the following option:
  18015. </p><dl class="table">
  18016. <dt><samp class="option">length</samp></dt>
  18017. <dd><p>Short window length in seconds, used for peak and trough RMS measurement.
  18018. Default is <code class="code">0.05</code> (50 milliseconds). Allowed range is <code class="code">[0 - 10]</code>.
  18019. </p>
  18020. </dd>
  18021. <dt><samp class="option">metadata</samp></dt>
  18022. <dd>
  18023. <p>Set metadata injection. All the metadata keys are prefixed with <code class="code">lavfi.astats.X</code>,
  18024. where <code class="code">X</code> is channel number starting from 1 or string <code class="code">Overall</code>. Default is
  18025. disabled.
  18026. </p>
  18027. <p>Available keys for each channel are:
  18028. <var class="var">Bit_depth</var>
  18029. <var class="var">Crest_factor</var>
  18030. <var class="var">DC_offset</var>
  18031. <var class="var">Dynamic_range</var>
  18032. <var class="var">Entropy</var>
  18033. <var class="var">Flat_factor</var>
  18034. <var class="var">Max_difference</var>
  18035. <var class="var">Max_level</var>
  18036. <var class="var">Mean_difference</var>
  18037. <var class="var">Min_difference</var>
  18038. <var class="var">Min_level</var>
  18039. <var class="var">Noise_floor</var>
  18040. <var class="var">Noise_floor_count</var>
  18041. <var class="var">Number_of_Infs</var>
  18042. <var class="var">Number_of_NaNs</var>
  18043. <var class="var">Number_of_denormals</var>
  18044. <var class="var">Peak_count</var>
  18045. <var class="var">Abs_Peak_count</var>
  18046. <var class="var">Peak_level</var>
  18047. <var class="var">RMS_difference</var>
  18048. <var class="var">RMS_peak</var>
  18049. <var class="var">RMS_trough</var>
  18050. <var class="var">Zero_crossings</var>
  18051. <var class="var">Zero_crossings_rate</var>
  18052. </p>
  18053. <p>and for <code class="code">Overall</code>:
  18054. <var class="var">Bit_depth</var>
  18055. <var class="var">DC_offset</var>
  18056. <var class="var">Entropy</var>
  18057. <var class="var">Flat_factor</var>
  18058. <var class="var">Max_difference</var>
  18059. <var class="var">Max_level</var>
  18060. <var class="var">Mean_difference</var>
  18061. <var class="var">Min_difference</var>
  18062. <var class="var">Min_level</var>
  18063. <var class="var">Noise_floor</var>
  18064. <var class="var">Noise_floor_count</var>
  18065. <var class="var">Number_of_Infs</var>
  18066. <var class="var">Number_of_NaNs</var>
  18067. <var class="var">Number_of_denormals</var>
  18068. <var class="var">Number_of_samples</var>
  18069. <var class="var">Peak_count</var>
  18070. <var class="var">Abs_Peak_count</var>
  18071. <var class="var">Peak_level</var>
  18072. <var class="var">RMS_difference</var>
  18073. <var class="var">RMS_level</var>
  18074. <var class="var">RMS_peak</var>
  18075. <var class="var">RMS_trough</var>
  18076. </p>
  18077. <p>For example, a full key looks like <code class="code">lavfi.astats.1.DC_offset</code> or
  18078. <code class="code">lavfi.astats.Overall.Peak_count</code>.
  18079. </p>
  18080. <p>Read below for the description of the keys.
  18081. </p>
  18082. </dd>
  18083. <dt><samp class="option">reset</samp></dt>
  18084. <dd><p>Set the number of frames over which cumulative stats are calculated before
  18085. being reset. Default is disabled.
  18086. </p>
  18087. </dd>
  18088. <dt><samp class="option">measure_perchannel</samp></dt>
  18089. <dd><p>Select the parameters which are measured per channel. The metadata keys can
  18090. be used as flags, default is <samp class="option">all</samp> which measures everything.
  18091. <samp class="option">none</samp> disables all per channel measurement.
  18092. </p>
  18093. </dd>
  18094. <dt><samp class="option">measure_overall</samp></dt>
  18095. <dd><p>Select the parameters which are measured overall. The metadata keys can
  18096. be used as flags, default is <samp class="option">all</samp> which measures everything.
  18097. <samp class="option">none</samp> disables all overall measurement.
  18098. </p>
  18099. </dd>
  18100. </dl>
  18101. <p>A description of the measure keys follow:
  18102. </p>
  18103. <dl class="table">
  18104. <dt><samp class="option">none</samp></dt>
  18105. <dd><p>no measures
  18106. </p>
  18107. </dd>
  18108. <dt><samp class="option">all</samp></dt>
  18109. <dd><p>all measures
  18110. </p>
  18111. </dd>
  18112. <dt><samp class="option">Bit_depth</samp></dt>
  18113. <dd><p>overall bit depth of audio, i.e. number of bits used for each sample
  18114. </p>
  18115. </dd>
  18116. <dt><samp class="option">Crest_factor</samp></dt>
  18117. <dd><p>standard ratio of peak to RMS level (note: not in dB)
  18118. </p>
  18119. </dd>
  18120. <dt><samp class="option">DC_offset</samp></dt>
  18121. <dd><p>mean amplitude displacement from zero
  18122. </p>
  18123. </dd>
  18124. <dt><samp class="option">Dynamic_range</samp></dt>
  18125. <dd><p>measured dynamic range of audio in dB
  18126. </p>
  18127. </dd>
  18128. <dt><samp class="option">Entropy</samp></dt>
  18129. <dd><p>entropy measured across whole audio, entropy of value near 1.0 is typically measured for white noise
  18130. </p>
  18131. </dd>
  18132. <dt><samp class="option">Flat_factor</samp></dt>
  18133. <dd><p>flatness (i.e. consecutive samples with the same value) of the signal at its peak levels
  18134. (i.e. either <var class="var">Min_level</var> or <var class="var">Max_level</var>)
  18135. </p>
  18136. </dd>
  18137. <dt><samp class="option">Max_difference</samp></dt>
  18138. <dd><p>maximal difference between two consecutive samples
  18139. </p>
  18140. </dd>
  18141. <dt><samp class="option">Max_level</samp></dt>
  18142. <dd><p>maximal sample level
  18143. </p>
  18144. </dd>
  18145. <dt><samp class="option">Mean_difference</samp></dt>
  18146. <dd><p>mean difference between two consecutive samples, i.e. the average of each difference between two consecutive samples
  18147. </p>
  18148. </dd>
  18149. <dt><samp class="option">Min_difference</samp></dt>
  18150. <dd><p>minimal difference between two consecutive samples
  18151. </p>
  18152. </dd>
  18153. <dt><samp class="option">Min_level</samp></dt>
  18154. <dd><p>minimal sample level
  18155. </p>
  18156. </dd>
  18157. <dt><samp class="option">Noise_floor</samp></dt>
  18158. <dd><p>minimum local peak measured in dBFS over a short window
  18159. </p>
  18160. </dd>
  18161. <dt><samp class="option">Noise_floor_count</samp></dt>
  18162. <dd><p>number of occasions (not the number of samples) that the signal attained
  18163. <var class="var">Noise floor</var>
  18164. </p>
  18165. </dd>
  18166. <dt><samp class="option">Number_of_Infs</samp></dt>
  18167. <dd><p>number of samples with an infinite value
  18168. </p>
  18169. </dd>
  18170. <dt><samp class="option">Number_of_NaNs</samp></dt>
  18171. <dd><p>number of samples with a NaN (not a number) value
  18172. </p>
  18173. </dd>
  18174. <dt><samp class="option">Number_of_denormals</samp></dt>
  18175. <dd><p>number of samples with a subnormal value
  18176. </p>
  18177. </dd>
  18178. <dt><samp class="option">Number_of_samples</samp></dt>
  18179. <dd><p>number of samples
  18180. </p>
  18181. </dd>
  18182. <dt><samp class="option">Peak_count</samp></dt>
  18183. <dd><p>number of occasions (not the number of samples) that the signal attained either
  18184. <var class="var">Min_level</var> or <var class="var">Max_level</var>
  18185. </p>
  18186. </dd>
  18187. <dt><samp class="option">Abs_Peak_count</samp></dt>
  18188. <dd><p>number of occasions that the absolute samples taken from the signal attained
  18189. max absolute value of <var class="var">Min_level</var> and <var class="var">Max_level</var>
  18190. </p>
  18191. </dd>
  18192. <dt><samp class="option">Peak_level</samp></dt>
  18193. <dd><p>standard peak level measured in dBFS
  18194. </p>
  18195. </dd>
  18196. <dt><samp class="option">RMS_difference</samp></dt>
  18197. <dd><p>Root Mean Square difference between two consecutive samples
  18198. </p>
  18199. </dd>
  18200. <dt><samp class="option">RMS_level</samp></dt>
  18201. <dd><p>standard RMS level measured in dBFS
  18202. </p>
  18203. </dd>
  18204. <dt><samp class="option">RMS_peak</samp></dt>
  18205. <dt><samp class="option">RMS_trough</samp></dt>
  18206. <dd><p>peak and trough values for RMS level measured over a short window,
  18207. measured in dBFS.
  18208. </p>
  18209. </dd>
  18210. <dt><samp class="option">Zero crossings</samp></dt>
  18211. <dd><p>number of points where the waveform crosses the zero level axis
  18212. </p>
  18213. </dd>
  18214. <dt><samp class="option">Zero crossings rate</samp></dt>
  18215. <dd><p>rate of Zero crossings and number of audio samples
  18216. </p></dd>
  18217. </dl>
  18218. </div>
  18219. <div class="section-level-extent" id="asubboost">
  18220. <h3 class="section"><span>29.60 asubboost<a class="copiable-link" href="#asubboost"> &para;</a></span></h3>
  18221. <p>Boost subwoofer frequencies.
  18222. </p>
  18223. <p>The filter accepts the following options:
  18224. </p>
  18225. <dl class="table">
  18226. <dt><samp class="option">dry</samp></dt>
  18227. <dd><p>Set dry gain, how much of original signal is kept. Allowed range is from 0 to 1.
  18228. Default value is 1.0.
  18229. </p>
  18230. </dd>
  18231. <dt><samp class="option">wet</samp></dt>
  18232. <dd><p>Set wet gain, how much of filtered signal is kept. Allowed range is from 0 to 1.
  18233. Default value is 1.0.
  18234. </p>
  18235. </dd>
  18236. <dt><samp class="option">boost</samp></dt>
  18237. <dd><p>Set max boost factor. Allowed range is from 1 to 12. Default value is 2.
  18238. </p>
  18239. </dd>
  18240. <dt><samp class="option">decay</samp></dt>
  18241. <dd><p>Set delay line decay gain value. Allowed range is from 0 to 1.
  18242. Default value is 0.0.
  18243. </p>
  18244. </dd>
  18245. <dt><samp class="option">feedback</samp></dt>
  18246. <dd><p>Set delay line feedback gain value. Allowed range is from 0 to 1.
  18247. Default value is 0.9.
  18248. </p>
  18249. </dd>
  18250. <dt><samp class="option">cutoff</samp></dt>
  18251. <dd><p>Set cutoff frequency in Hertz. Allowed range is 50 to 900.
  18252. Default value is 100.
  18253. </p>
  18254. </dd>
  18255. <dt><samp class="option">slope</samp></dt>
  18256. <dd><p>Set slope amount for cutoff frequency. Allowed range is 0.0001 to 1.
  18257. Default value is 0.5.
  18258. </p>
  18259. </dd>
  18260. <dt><samp class="option">delay</samp></dt>
  18261. <dd><p>Set delay. Allowed range is from 1 to 100.
  18262. Default value is 20.
  18263. </p>
  18264. </dd>
  18265. <dt><samp class="option">channels</samp></dt>
  18266. <dd><p>Set the channels to process. Default value is all available.
  18267. </p></dd>
  18268. </dl>
  18269. <ul class="mini-toc">
  18270. <li><a href="#Commands-22" accesskey="1">Commands</a></li>
  18271. </ul>
  18272. <div class="subsection-level-extent" id="Commands-22">
  18273. <h4 class="subsection"><span>29.60.1 Commands<a class="copiable-link" href="#Commands-22"> &para;</a></span></h4>
  18274. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  18275. </p>
  18276. </div>
  18277. </div>
  18278. <div class="section-level-extent" id="asubcut">
  18279. <h3 class="section"><span>29.61 asubcut<a class="copiable-link" href="#asubcut"> &para;</a></span></h3>
  18280. <p>Cut subwoofer frequencies.
  18281. </p>
  18282. <p>This filter allows to set custom, steeper
  18283. roll off than highpass filter, and thus is able to more attenuate
  18284. frequency content in stop-band.
  18285. </p>
  18286. <p>The filter accepts the following options:
  18287. </p>
  18288. <dl class="table">
  18289. <dt><samp class="option">cutoff</samp></dt>
  18290. <dd><p>Set cutoff frequency in Hertz. Allowed range is 2 to 200.
  18291. Default value is 20.
  18292. </p>
  18293. </dd>
  18294. <dt><samp class="option">order</samp></dt>
  18295. <dd><p>Set filter order. Available values are from 3 to 20.
  18296. Default value is 10.
  18297. </p>
  18298. </dd>
  18299. <dt><samp class="option">level</samp></dt>
  18300. <dd><p>Set input gain level. Allowed range is from 0 to 1. Default value is 1.
  18301. </p></dd>
  18302. </dl>
  18303. <ul class="mini-toc">
  18304. <li><a href="#Commands-23" accesskey="1">Commands</a></li>
  18305. </ul>
  18306. <div class="subsection-level-extent" id="Commands-23">
  18307. <h4 class="subsection"><span>29.61.1 Commands<a class="copiable-link" href="#Commands-23"> &para;</a></span></h4>
  18308. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  18309. </p>
  18310. </div>
  18311. </div>
  18312. <div class="section-level-extent" id="asupercut">
  18313. <h3 class="section"><span>29.62 asupercut<a class="copiable-link" href="#asupercut"> &para;</a></span></h3>
  18314. <p>Cut super frequencies.
  18315. </p>
  18316. <p>The filter accepts the following options:
  18317. </p>
  18318. <dl class="table">
  18319. <dt><samp class="option">cutoff</samp></dt>
  18320. <dd><p>Set cutoff frequency in Hertz. Allowed range is 20000 to 192000.
  18321. Default value is 20000.
  18322. </p>
  18323. </dd>
  18324. <dt><samp class="option">order</samp></dt>
  18325. <dd><p>Set filter order. Available values are from 3 to 20.
  18326. Default value is 10.
  18327. </p>
  18328. </dd>
  18329. <dt><samp class="option">level</samp></dt>
  18330. <dd><p>Set input gain level. Allowed range is from 0 to 1. Default value is 1.
  18331. </p></dd>
  18332. </dl>
  18333. <ul class="mini-toc">
  18334. <li><a href="#Commands-24" accesskey="1">Commands</a></li>
  18335. </ul>
  18336. <div class="subsection-level-extent" id="Commands-24">
  18337. <h4 class="subsection"><span>29.62.1 Commands<a class="copiable-link" href="#Commands-24"> &para;</a></span></h4>
  18338. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  18339. </p>
  18340. </div>
  18341. </div>
  18342. <div class="section-level-extent" id="asuperpass">
  18343. <h3 class="section"><span>29.63 asuperpass<a class="copiable-link" href="#asuperpass"> &para;</a></span></h3>
  18344. <p>Apply high order Butterworth band-pass filter.
  18345. </p>
  18346. <p>The filter accepts the following options:
  18347. </p>
  18348. <dl class="table">
  18349. <dt><samp class="option">centerf</samp></dt>
  18350. <dd><p>Set center frequency in Hertz. Allowed range is 2 to 999999.
  18351. Default value is 1000.
  18352. </p>
  18353. </dd>
  18354. <dt><samp class="option">order</samp></dt>
  18355. <dd><p>Set filter order. Available values are from 4 to 20.
  18356. Default value is 4.
  18357. </p>
  18358. </dd>
  18359. <dt><samp class="option">qfactor</samp></dt>
  18360. <dd><p>Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1.
  18361. </p>
  18362. </dd>
  18363. <dt><samp class="option">level</samp></dt>
  18364. <dd><p>Set input gain level. Allowed range is from 0 to 2. Default value is 1.
  18365. </p></dd>
  18366. </dl>
  18367. <ul class="mini-toc">
  18368. <li><a href="#Commands-25" accesskey="1">Commands</a></li>
  18369. </ul>
  18370. <div class="subsection-level-extent" id="Commands-25">
  18371. <h4 class="subsection"><span>29.63.1 Commands<a class="copiable-link" href="#Commands-25"> &para;</a></span></h4>
  18372. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  18373. </p>
  18374. </div>
  18375. </div>
  18376. <div class="section-level-extent" id="asuperstop">
  18377. <h3 class="section"><span>29.64 asuperstop<a class="copiable-link" href="#asuperstop"> &para;</a></span></h3>
  18378. <p>Apply high order Butterworth band-stop filter.
  18379. </p>
  18380. <p>The filter accepts the following options:
  18381. </p>
  18382. <dl class="table">
  18383. <dt><samp class="option">centerf</samp></dt>
  18384. <dd><p>Set center frequency in Hertz. Allowed range is 2 to 999999.
  18385. Default value is 1000.
  18386. </p>
  18387. </dd>
  18388. <dt><samp class="option">order</samp></dt>
  18389. <dd><p>Set filter order. Available values are from 4 to 20.
  18390. Default value is 4.
  18391. </p>
  18392. </dd>
  18393. <dt><samp class="option">qfactor</samp></dt>
  18394. <dd><p>Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1.
  18395. </p>
  18396. </dd>
  18397. <dt><samp class="option">level</samp></dt>
  18398. <dd><p>Set input gain level. Allowed range is from 0 to 2. Default value is 1.
  18399. </p></dd>
  18400. </dl>
  18401. <ul class="mini-toc">
  18402. <li><a href="#Commands-26" accesskey="1">Commands</a></li>
  18403. </ul>
  18404. <div class="subsection-level-extent" id="Commands-26">
  18405. <h4 class="subsection"><span>29.64.1 Commands<a class="copiable-link" href="#Commands-26"> &para;</a></span></h4>
  18406. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  18407. </p>
  18408. </div>
  18409. </div>
  18410. <div class="section-level-extent" id="atempo">
  18411. <h3 class="section"><span>29.65 atempo<a class="copiable-link" href="#atempo"> &para;</a></span></h3>
  18412. <p>Adjust audio tempo.
  18413. </p>
  18414. <p>The filter accepts exactly one parameter, the audio tempo. If not
  18415. specified then the filter will assume nominal 1.0 tempo. Tempo must
  18416. be in the [0.5, 100.0] range.
  18417. </p>
  18418. <p>Note that tempo greater than 2 will skip some samples rather than
  18419. blend them in. If for any reason this is a concern it is always
  18420. possible to daisy-chain several instances of atempo to achieve the
  18421. desired product tempo.
  18422. </p>
  18423. <ul class="mini-toc">
  18424. <li><a href="#Examples-34" accesskey="1">Examples</a></li>
  18425. <li><a href="#Commands-27" accesskey="2">Commands</a></li>
  18426. </ul>
  18427. <div class="subsection-level-extent" id="Examples-34">
  18428. <h4 class="subsection"><span>29.65.1 Examples<a class="copiable-link" href="#Examples-34"> &para;</a></span></h4>
  18429. <ul class="itemize mark-bullet">
  18430. <li>Slow down audio to 80% tempo:
  18431. <div class="example">
  18432. <pre class="example-preformatted">atempo=0.8
  18433. </pre></div>
  18434. </li><li>To speed up audio to 300% tempo:
  18435. <div class="example">
  18436. <pre class="example-preformatted">atempo=3
  18437. </pre></div>
  18438. </li><li>To speed up audio to 300% tempo by daisy-chaining two atempo instances:
  18439. <div class="example">
  18440. <pre class="example-preformatted">atempo=sqrt(3),atempo=sqrt(3)
  18441. </pre></div>
  18442. </li></ul>
  18443. </div>
  18444. <div class="subsection-level-extent" id="Commands-27">
  18445. <h4 class="subsection"><span>29.65.2 Commands<a class="copiable-link" href="#Commands-27"> &para;</a></span></h4>
  18446. <p>This filter supports the following commands:
  18447. </p><dl class="table">
  18448. <dt><samp class="option">tempo</samp></dt>
  18449. <dd><p>Change filter tempo scale factor.
  18450. Syntax for the command is : &quot;<var class="var">tempo</var>&quot;
  18451. </p></dd>
  18452. </dl>
  18453. </div>
  18454. </div>
  18455. <div class="section-level-extent" id="atilt">
  18456. <h3 class="section"><span>29.66 atilt<a class="copiable-link" href="#atilt"> &para;</a></span></h3>
  18457. <p>Apply spectral tilt filter to audio stream.
  18458. </p>
  18459. <p>This filter apply any spectral roll-off slope over any specified frequency band.
  18460. </p>
  18461. <p>The filter accepts the following options:
  18462. </p>
  18463. <dl class="table">
  18464. <dt><samp class="option">freq</samp></dt>
  18465. <dd><p>Set central frequency of tilt in Hz. Default is 10000 Hz.
  18466. </p>
  18467. </dd>
  18468. <dt><samp class="option">slope</samp></dt>
  18469. <dd><p>Set slope direction of tilt. Default is 0. Allowed range is from -1 to 1.
  18470. </p>
  18471. </dd>
  18472. <dt><samp class="option">width</samp></dt>
  18473. <dd><p>Set width of tilt. Default is 1000. Allowed range is from 100 to 10000.
  18474. </p>
  18475. </dd>
  18476. <dt><samp class="option">order</samp></dt>
  18477. <dd><p>Set order of tilt filter.
  18478. </p>
  18479. </dd>
  18480. <dt><samp class="option">level</samp></dt>
  18481. <dd><p>Set input volume level. Allowed range is from 0 to 4.
  18482. Default is 1.
  18483. </p></dd>
  18484. </dl>
  18485. <ul class="mini-toc">
  18486. <li><a href="#Commands-28" accesskey="1">Commands</a></li>
  18487. </ul>
  18488. <div class="subsection-level-extent" id="Commands-28">
  18489. <h4 class="subsection"><span>29.66.1 Commands<a class="copiable-link" href="#Commands-28"> &para;</a></span></h4>
  18490. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  18491. </p>
  18492. </div>
  18493. </div>
  18494. <div class="section-level-extent" id="atrim">
  18495. <h3 class="section"><span>29.67 atrim<a class="copiable-link" href="#atrim"> &para;</a></span></h3>
  18496. <p>Trim the input so that the output contains one continuous subpart of the input.
  18497. </p>
  18498. <p>It accepts the following parameters:
  18499. </p><dl class="table">
  18500. <dt><samp class="option">start</samp></dt>
  18501. <dd><p>Timestamp (in seconds) of the start of the section to keep. I.e. the audio
  18502. sample with the timestamp <var class="var">start</var> will be the first sample in the output.
  18503. </p>
  18504. </dd>
  18505. <dt><samp class="option">end</samp></dt>
  18506. <dd><p>Specify time of the first audio sample that will be dropped, i.e. the
  18507. audio sample immediately preceding the one with the timestamp <var class="var">end</var> will be
  18508. the last sample in the output.
  18509. </p>
  18510. </dd>
  18511. <dt><samp class="option">start_pts</samp></dt>
  18512. <dd><p>Same as <var class="var">start</var>, except this option sets the start timestamp in samples
  18513. instead of seconds.
  18514. </p>
  18515. </dd>
  18516. <dt><samp class="option">end_pts</samp></dt>
  18517. <dd><p>Same as <var class="var">end</var>, except this option sets the end timestamp in samples instead
  18518. of seconds.
  18519. </p>
  18520. </dd>
  18521. <dt><samp class="option">duration</samp></dt>
  18522. <dd><p>The maximum duration of the output in seconds.
  18523. </p>
  18524. </dd>
  18525. <dt><samp class="option">start_sample</samp></dt>
  18526. <dd><p>The number of the first sample that should be output.
  18527. </p>
  18528. </dd>
  18529. <dt><samp class="option">end_sample</samp></dt>
  18530. <dd><p>The number of the first sample that should be dropped.
  18531. </p></dd>
  18532. </dl>
  18533. <p><samp class="option">start</samp>, <samp class="option">end</samp>, and <samp class="option">duration</samp> are expressed as time
  18534. duration specifications; see
  18535. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>.
  18536. </p>
  18537. <p>Note that the first two sets of the start/end options and the <samp class="option">duration</samp>
  18538. option look at the frame timestamp, while the _sample options simply count the
  18539. samples that pass through the filter. So start/end_pts and start/end_sample will
  18540. give different results when the timestamps are wrong, inexact or do not start at
  18541. zero. Also note that this filter does not modify the timestamps. If you wish
  18542. to have the output timestamps start at zero, insert the asetpts filter after the
  18543. atrim filter.
  18544. </p>
  18545. <p>If multiple start or end options are set, this filter tries to be greedy and
  18546. keep all samples that match at least one of the specified constraints. To keep
  18547. only the part that matches all the constraints at once, chain multiple atrim
  18548. filters.
  18549. </p>
  18550. <p>The defaults are such that all the input is kept. So it is possible to set e.g.
  18551. just the end values to keep everything before the specified time.
  18552. </p>
  18553. <p>Examples:
  18554. </p><ul class="itemize mark-bullet">
  18555. <li>Drop everything except the second minute of input:
  18556. <div class="example">
  18557. <pre class="example-preformatted">ffmpeg -i INPUT -af atrim=60:120
  18558. </pre></div>
  18559. </li><li>Keep only the first 1000 samples:
  18560. <div class="example">
  18561. <pre class="example-preformatted">ffmpeg -i INPUT -af atrim=end_sample=1000
  18562. </pre></div>
  18563. </li></ul>
  18564. </div>
  18565. <div class="section-level-extent" id="axcorrelate">
  18566. <h3 class="section"><span>29.68 axcorrelate<a class="copiable-link" href="#axcorrelate"> &para;</a></span></h3>
  18567. <p>Calculate normalized windowed cross-correlation between two input audio streams.
  18568. </p>
  18569. <p>Resulted samples are always between -1 and 1 inclusive.
  18570. If result is 1 it means two input samples are highly correlated in that selected segment.
  18571. Result 0 means they are not correlated at all.
  18572. If result is -1 it means two input samples are out of phase, which means they cancel each
  18573. other.
  18574. </p>
  18575. <p>The filter accepts the following options:
  18576. </p>
  18577. <dl class="table">
  18578. <dt><samp class="option">size</samp></dt>
  18579. <dd><p>Set size of segment over which cross-correlation is calculated.
  18580. Default is 256. Allowed range is from 2 to 131072.
  18581. </p>
  18582. </dd>
  18583. <dt><samp class="option">algo</samp></dt>
  18584. <dd><p>Set algorithm for cross-correlation. Can be <code class="code">slow</code> or <code class="code">fast</code> or <code class="code">best</code>.
  18585. Default is <code class="code">best</code>. Fast algorithm assumes mean values over any given segment
  18586. are always zero and thus need much less calculations to make.
  18587. This is generally not true, but is valid for typical audio streams.
  18588. </p></dd>
  18589. </dl>
  18590. <ul class="mini-toc">
  18591. <li><a href="#Examples-35" accesskey="1">Examples</a></li>
  18592. </ul>
  18593. <div class="subsection-level-extent" id="Examples-35">
  18594. <h4 class="subsection"><span>29.68.1 Examples<a class="copiable-link" href="#Examples-35"> &para;</a></span></h4>
  18595. <ul class="itemize mark-bullet">
  18596. <li>Calculate correlation between channels in stereo audio stream:
  18597. <div class="example">
  18598. <pre class="example-preformatted">ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
  18599. </pre></div>
  18600. </li></ul>
  18601. </div>
  18602. </div>
  18603. <div class="section-level-extent" id="bandpass">
  18604. <h3 class="section"><span>29.69 bandpass<a class="copiable-link" href="#bandpass"> &para;</a></span></h3>
  18605. <p>Apply a two-pole Butterworth band-pass filter with central
  18606. frequency <var class="var">frequency</var>, and (3dB-point) band-width width.
  18607. The <var class="var">csg</var> option selects a constant skirt gain (peak gain = Q)
  18608. instead of the default: constant 0dB peak gain.
  18609. The filter roll off at 6dB per octave (20dB per decade).
  18610. </p>
  18611. <p>The filter accepts the following options:
  18612. </p>
  18613. <dl class="table">
  18614. <dt><samp class="option">frequency, f</samp></dt>
  18615. <dd><p>Set the filter&rsquo;s central frequency. Default is <code class="code">3000</code>.
  18616. </p>
  18617. </dd>
  18618. <dt><samp class="option">csg</samp></dt>
  18619. <dd><p>Constant skirt gain if set to 1. Defaults to 0.
  18620. </p>
  18621. </dd>
  18622. <dt><samp class="option">width_type, t</samp></dt>
  18623. <dd><p>Set method to specify band-width of filter.
  18624. </p><dl class="table">
  18625. <dt><samp class="option">h</samp></dt>
  18626. <dd><p>Hz
  18627. </p></dd>
  18628. <dt><samp class="option">q</samp></dt>
  18629. <dd><p>Q-Factor
  18630. </p></dd>
  18631. <dt><samp class="option">o</samp></dt>
  18632. <dd><p>octave
  18633. </p></dd>
  18634. <dt><samp class="option">s</samp></dt>
  18635. <dd><p>slope
  18636. </p></dd>
  18637. <dt><samp class="option">k</samp></dt>
  18638. <dd><p>kHz
  18639. </p></dd>
  18640. </dl>
  18641. </dd>
  18642. <dt><samp class="option">width, w</samp></dt>
  18643. <dd><p>Specify the band-width of a filter in width_type units.
  18644. </p>
  18645. </dd>
  18646. <dt><samp class="option">mix, m</samp></dt>
  18647. <dd><p>How much to use filtered signal in output. Default is 1.
  18648. Range is between 0 and 1.
  18649. </p>
  18650. </dd>
  18651. <dt><samp class="option">channels, c</samp></dt>
  18652. <dd><p>Specify which channels to filter, by default all available are filtered.
  18653. </p>
  18654. </dd>
  18655. <dt><samp class="option">normalize, n</samp></dt>
  18656. <dd><p>Normalize biquad coefficients, by default is disabled.
  18657. Enabling it will normalize magnitude response at DC to 0dB.
  18658. </p>
  18659. </dd>
  18660. <dt><samp class="option">transform, a</samp></dt>
  18661. <dd><p>Set transform type of IIR filter.
  18662. </p><dl class="table">
  18663. <dt><samp class="option">di</samp></dt>
  18664. <dt><samp class="option">dii</samp></dt>
  18665. <dt><samp class="option">tdi</samp></dt>
  18666. <dt><samp class="option">tdii</samp></dt>
  18667. <dt><samp class="option">latt</samp></dt>
  18668. <dt><samp class="option">svf</samp></dt>
  18669. <dt><samp class="option">zdf</samp></dt>
  18670. </dl>
  18671. </dd>
  18672. <dt><samp class="option">precision, r</samp></dt>
  18673. <dd><p>Set precision of filtering.
  18674. </p><dl class="table">
  18675. <dt><samp class="option">auto</samp></dt>
  18676. <dd><p>Pick automatic sample format depending on surround filters.
  18677. </p></dd>
  18678. <dt><samp class="option">s16</samp></dt>
  18679. <dd><p>Always use signed 16-bit.
  18680. </p></dd>
  18681. <dt><samp class="option">s32</samp></dt>
  18682. <dd><p>Always use signed 32-bit.
  18683. </p></dd>
  18684. <dt><samp class="option">f32</samp></dt>
  18685. <dd><p>Always use float 32-bit.
  18686. </p></dd>
  18687. <dt><samp class="option">f64</samp></dt>
  18688. <dd><p>Always use float 64-bit.
  18689. </p></dd>
  18690. </dl>
  18691. </dd>
  18692. <dt><samp class="option">block_size, b</samp></dt>
  18693. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  18694. value (higher than impulse response length truncated when reaches near zero values) filtering
  18695. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  18696. </p>
  18697. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  18698. </p></dd>
  18699. </dl>
  18700. <ul class="mini-toc">
  18701. <li><a href="#Commands-29" accesskey="1">Commands</a></li>
  18702. </ul>
  18703. <div class="subsection-level-extent" id="Commands-29">
  18704. <h4 class="subsection"><span>29.69.1 Commands<a class="copiable-link" href="#Commands-29"> &para;</a></span></h4>
  18705. <p>This filter supports the following commands:
  18706. </p><dl class="table">
  18707. <dt><samp class="option">frequency, f</samp></dt>
  18708. <dd><p>Change bandpass frequency.
  18709. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  18710. </p>
  18711. </dd>
  18712. <dt><samp class="option">width_type, t</samp></dt>
  18713. <dd><p>Change bandpass width_type.
  18714. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  18715. </p>
  18716. </dd>
  18717. <dt><samp class="option">width, w</samp></dt>
  18718. <dd><p>Change bandpass width.
  18719. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  18720. </p>
  18721. </dd>
  18722. <dt><samp class="option">mix, m</samp></dt>
  18723. <dd><p>Change bandpass mix.
  18724. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  18725. </p></dd>
  18726. </dl>
  18727. </div>
  18728. </div>
  18729. <div class="section-level-extent" id="bandreject">
  18730. <h3 class="section"><span>29.70 bandreject<a class="copiable-link" href="#bandreject"> &para;</a></span></h3>
  18731. <p>Apply a two-pole Butterworth band-reject filter with central
  18732. frequency <var class="var">frequency</var>, and (3dB-point) band-width <var class="var">width</var>.
  18733. The filter roll off at 6dB per octave (20dB per decade).
  18734. </p>
  18735. <p>The filter accepts the following options:
  18736. </p>
  18737. <dl class="table">
  18738. <dt><samp class="option">frequency, f</samp></dt>
  18739. <dd><p>Set the filter&rsquo;s central frequency. Default is <code class="code">3000</code>.
  18740. </p>
  18741. </dd>
  18742. <dt><samp class="option">width_type, t</samp></dt>
  18743. <dd><p>Set method to specify band-width of filter.
  18744. </p><dl class="table">
  18745. <dt><samp class="option">h</samp></dt>
  18746. <dd><p>Hz
  18747. </p></dd>
  18748. <dt><samp class="option">q</samp></dt>
  18749. <dd><p>Q-Factor
  18750. </p></dd>
  18751. <dt><samp class="option">o</samp></dt>
  18752. <dd><p>octave
  18753. </p></dd>
  18754. <dt><samp class="option">s</samp></dt>
  18755. <dd><p>slope
  18756. </p></dd>
  18757. <dt><samp class="option">k</samp></dt>
  18758. <dd><p>kHz
  18759. </p></dd>
  18760. </dl>
  18761. </dd>
  18762. <dt><samp class="option">width, w</samp></dt>
  18763. <dd><p>Specify the band-width of a filter in width_type units.
  18764. </p>
  18765. </dd>
  18766. <dt><samp class="option">mix, m</samp></dt>
  18767. <dd><p>How much to use filtered signal in output. Default is 1.
  18768. Range is between 0 and 1.
  18769. </p>
  18770. </dd>
  18771. <dt><samp class="option">channels, c</samp></dt>
  18772. <dd><p>Specify which channels to filter, by default all available are filtered.
  18773. </p>
  18774. </dd>
  18775. <dt><samp class="option">normalize, n</samp></dt>
  18776. <dd><p>Normalize biquad coefficients, by default is disabled.
  18777. Enabling it will normalize magnitude response at DC to 0dB.
  18778. </p>
  18779. </dd>
  18780. <dt><samp class="option">transform, a</samp></dt>
  18781. <dd><p>Set transform type of IIR filter.
  18782. </p><dl class="table">
  18783. <dt><samp class="option">di</samp></dt>
  18784. <dt><samp class="option">dii</samp></dt>
  18785. <dt><samp class="option">tdi</samp></dt>
  18786. <dt><samp class="option">tdii</samp></dt>
  18787. <dt><samp class="option">latt</samp></dt>
  18788. <dt><samp class="option">svf</samp></dt>
  18789. <dt><samp class="option">zdf</samp></dt>
  18790. </dl>
  18791. </dd>
  18792. <dt><samp class="option">precision, r</samp></dt>
  18793. <dd><p>Set precision of filtering.
  18794. </p><dl class="table">
  18795. <dt><samp class="option">auto</samp></dt>
  18796. <dd><p>Pick automatic sample format depending on surround filters.
  18797. </p></dd>
  18798. <dt><samp class="option">s16</samp></dt>
  18799. <dd><p>Always use signed 16-bit.
  18800. </p></dd>
  18801. <dt><samp class="option">s32</samp></dt>
  18802. <dd><p>Always use signed 32-bit.
  18803. </p></dd>
  18804. <dt><samp class="option">f32</samp></dt>
  18805. <dd><p>Always use float 32-bit.
  18806. </p></dd>
  18807. <dt><samp class="option">f64</samp></dt>
  18808. <dd><p>Always use float 64-bit.
  18809. </p></dd>
  18810. </dl>
  18811. </dd>
  18812. <dt><samp class="option">block_size, b</samp></dt>
  18813. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  18814. value (higher than impulse response length truncated when reaches near zero values) filtering
  18815. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  18816. </p>
  18817. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  18818. </p></dd>
  18819. </dl>
  18820. <ul class="mini-toc">
  18821. <li><a href="#Commands-30" accesskey="1">Commands</a></li>
  18822. </ul>
  18823. <div class="subsection-level-extent" id="Commands-30">
  18824. <h4 class="subsection"><span>29.70.1 Commands<a class="copiable-link" href="#Commands-30"> &para;</a></span></h4>
  18825. <p>This filter supports the following commands:
  18826. </p><dl class="table">
  18827. <dt><samp class="option">frequency, f</samp></dt>
  18828. <dd><p>Change bandreject frequency.
  18829. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  18830. </p>
  18831. </dd>
  18832. <dt><samp class="option">width_type, t</samp></dt>
  18833. <dd><p>Change bandreject width_type.
  18834. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  18835. </p>
  18836. </dd>
  18837. <dt><samp class="option">width, w</samp></dt>
  18838. <dd><p>Change bandreject width.
  18839. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  18840. </p>
  18841. </dd>
  18842. <dt><samp class="option">mix, m</samp></dt>
  18843. <dd><p>Change bandreject mix.
  18844. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  18845. </p></dd>
  18846. </dl>
  18847. </div>
  18848. </div>
  18849. <div class="section-level-extent" id="bass_002c-lowshelf">
  18850. <h3 class="section"><span>29.71 bass, lowshelf<a class="copiable-link" href="#bass_002c-lowshelf"> &para;</a></span></h3>
  18851. <p>Boost or cut the bass (lower) frequencies of the audio using a two-pole
  18852. shelving filter with a response similar to that of a standard
  18853. hi-fi&rsquo;s tone-controls. This is also known as shelving equalisation (EQ).
  18854. </p>
  18855. <p>The filter accepts the following options:
  18856. </p>
  18857. <dl class="table">
  18858. <dt><samp class="option">gain, g</samp></dt>
  18859. <dd><p>Give the gain at 0 Hz. Its useful range is about -20
  18860. (for a large cut) to +20 (for a large boost).
  18861. Beware of clipping when using a positive gain.
  18862. </p>
  18863. </dd>
  18864. <dt><samp class="option">frequency, f</samp></dt>
  18865. <dd><p>Set the filter&rsquo;s central frequency and so can be used
  18866. to extend or reduce the frequency range to be boosted or cut.
  18867. The default value is <code class="code">100</code> Hz.
  18868. </p>
  18869. </dd>
  18870. <dt><samp class="option">width_type, t</samp></dt>
  18871. <dd><p>Set method to specify band-width of filter.
  18872. </p><dl class="table">
  18873. <dt><samp class="option">h</samp></dt>
  18874. <dd><p>Hz
  18875. </p></dd>
  18876. <dt><samp class="option">q</samp></dt>
  18877. <dd><p>Q-Factor
  18878. </p></dd>
  18879. <dt><samp class="option">o</samp></dt>
  18880. <dd><p>octave
  18881. </p></dd>
  18882. <dt><samp class="option">s</samp></dt>
  18883. <dd><p>slope
  18884. </p></dd>
  18885. <dt><samp class="option">k</samp></dt>
  18886. <dd><p>kHz
  18887. </p></dd>
  18888. </dl>
  18889. </dd>
  18890. <dt><samp class="option">width, w</samp></dt>
  18891. <dd><p>Determine how steep is the filter&rsquo;s shelf transition.
  18892. </p>
  18893. </dd>
  18894. <dt><samp class="option">poles, p</samp></dt>
  18895. <dd><p>Set number of poles. Default is 2.
  18896. </p>
  18897. </dd>
  18898. <dt><samp class="option">mix, m</samp></dt>
  18899. <dd><p>How much to use filtered signal in output. Default is 1.
  18900. Range is between 0 and 1.
  18901. </p>
  18902. </dd>
  18903. <dt><samp class="option">channels, c</samp></dt>
  18904. <dd><p>Specify which channels to filter, by default all available are filtered.
  18905. </p>
  18906. </dd>
  18907. <dt><samp class="option">normalize, n</samp></dt>
  18908. <dd><p>Normalize biquad coefficients, by default is disabled.
  18909. Enabling it will normalize magnitude response at DC to 0dB.
  18910. </p>
  18911. </dd>
  18912. <dt><samp class="option">transform, a</samp></dt>
  18913. <dd><p>Set transform type of IIR filter.
  18914. </p><dl class="table">
  18915. <dt><samp class="option">di</samp></dt>
  18916. <dt><samp class="option">dii</samp></dt>
  18917. <dt><samp class="option">tdi</samp></dt>
  18918. <dt><samp class="option">tdii</samp></dt>
  18919. <dt><samp class="option">latt</samp></dt>
  18920. <dt><samp class="option">svf</samp></dt>
  18921. <dt><samp class="option">zdf</samp></dt>
  18922. </dl>
  18923. </dd>
  18924. <dt><samp class="option">precision, r</samp></dt>
  18925. <dd><p>Set precision of filtering.
  18926. </p><dl class="table">
  18927. <dt><samp class="option">auto</samp></dt>
  18928. <dd><p>Pick automatic sample format depending on surround filters.
  18929. </p></dd>
  18930. <dt><samp class="option">s16</samp></dt>
  18931. <dd><p>Always use signed 16-bit.
  18932. </p></dd>
  18933. <dt><samp class="option">s32</samp></dt>
  18934. <dd><p>Always use signed 32-bit.
  18935. </p></dd>
  18936. <dt><samp class="option">f32</samp></dt>
  18937. <dd><p>Always use float 32-bit.
  18938. </p></dd>
  18939. <dt><samp class="option">f64</samp></dt>
  18940. <dd><p>Always use float 64-bit.
  18941. </p></dd>
  18942. </dl>
  18943. </dd>
  18944. <dt><samp class="option">block_size, b</samp></dt>
  18945. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  18946. value (higher than impulse response length truncated when reaches near zero values) filtering
  18947. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  18948. </p>
  18949. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  18950. </p></dd>
  18951. </dl>
  18952. <ul class="mini-toc">
  18953. <li><a href="#Commands-31" accesskey="1">Commands</a></li>
  18954. </ul>
  18955. <div class="subsection-level-extent" id="Commands-31">
  18956. <h4 class="subsection"><span>29.71.1 Commands<a class="copiable-link" href="#Commands-31"> &para;</a></span></h4>
  18957. <p>This filter supports the following commands:
  18958. </p><dl class="table">
  18959. <dt><samp class="option">frequency, f</samp></dt>
  18960. <dd><p>Change bass frequency.
  18961. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  18962. </p>
  18963. </dd>
  18964. <dt><samp class="option">width_type, t</samp></dt>
  18965. <dd><p>Change bass width_type.
  18966. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  18967. </p>
  18968. </dd>
  18969. <dt><samp class="option">width, w</samp></dt>
  18970. <dd><p>Change bass width.
  18971. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  18972. </p>
  18973. </dd>
  18974. <dt><samp class="option">gain, g</samp></dt>
  18975. <dd><p>Change bass gain.
  18976. Syntax for the command is : &quot;<var class="var">gain</var>&quot;
  18977. </p>
  18978. </dd>
  18979. <dt><samp class="option">mix, m</samp></dt>
  18980. <dd><p>Change bass mix.
  18981. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  18982. </p></dd>
  18983. </dl>
  18984. </div>
  18985. </div>
  18986. <div class="section-level-extent" id="biquad">
  18987. <h3 class="section"><span>29.72 biquad<a class="copiable-link" href="#biquad"> &para;</a></span></h3>
  18988. <p>Apply a biquad IIR filter with the given coefficients.
  18989. Where <var class="var">b0</var>, <var class="var">b1</var>, <var class="var">b2</var> and <var class="var">a0</var>, <var class="var">a1</var>, <var class="var">a2</var>
  18990. are the numerator and denominator coefficients respectively.
  18991. and <var class="var">channels</var>, <var class="var">c</var> specify which channels to filter, by default all
  18992. available are filtered.
  18993. </p>
  18994. <ul class="mini-toc">
  18995. <li><a href="#Commands-32" accesskey="1">Commands</a></li>
  18996. </ul>
  18997. <div class="subsection-level-extent" id="Commands-32">
  18998. <h4 class="subsection"><span>29.72.1 Commands<a class="copiable-link" href="#Commands-32"> &para;</a></span></h4>
  18999. <p>This filter supports the following commands:
  19000. </p><dl class="table">
  19001. <dt><samp class="option">a0</samp></dt>
  19002. <dt><samp class="option">a1</samp></dt>
  19003. <dt><samp class="option">a2</samp></dt>
  19004. <dt><samp class="option">b0</samp></dt>
  19005. <dt><samp class="option">b1</samp></dt>
  19006. <dt><samp class="option">b2</samp></dt>
  19007. <dd><p>Change biquad parameter.
  19008. Syntax for the command is : &quot;<var class="var">value</var>&quot;
  19009. </p>
  19010. </dd>
  19011. <dt><samp class="option">mix, m</samp></dt>
  19012. <dd><p>How much to use filtered signal in output. Default is 1.
  19013. Range is between 0 and 1.
  19014. </p>
  19015. </dd>
  19016. <dt><samp class="option">channels, c</samp></dt>
  19017. <dd><p>Specify which channels to filter, by default all available are filtered.
  19018. </p>
  19019. </dd>
  19020. <dt><samp class="option">normalize, n</samp></dt>
  19021. <dd><p>Normalize biquad coefficients, by default is disabled.
  19022. Enabling it will normalize magnitude response at DC to 0dB.
  19023. </p>
  19024. </dd>
  19025. <dt><samp class="option">transform, a</samp></dt>
  19026. <dd><p>Set transform type of IIR filter.
  19027. </p><dl class="table">
  19028. <dt><samp class="option">di</samp></dt>
  19029. <dt><samp class="option">dii</samp></dt>
  19030. <dt><samp class="option">tdi</samp></dt>
  19031. <dt><samp class="option">tdii</samp></dt>
  19032. <dt><samp class="option">latt</samp></dt>
  19033. <dt><samp class="option">svf</samp></dt>
  19034. <dt><samp class="option">zdf</samp></dt>
  19035. </dl>
  19036. </dd>
  19037. <dt><samp class="option">precision, r</samp></dt>
  19038. <dd><p>Set precision of filtering.
  19039. </p><dl class="table">
  19040. <dt><samp class="option">auto</samp></dt>
  19041. <dd><p>Pick automatic sample format depending on surround filters.
  19042. </p></dd>
  19043. <dt><samp class="option">s16</samp></dt>
  19044. <dd><p>Always use signed 16-bit.
  19045. </p></dd>
  19046. <dt><samp class="option">s32</samp></dt>
  19047. <dd><p>Always use signed 32-bit.
  19048. </p></dd>
  19049. <dt><samp class="option">f32</samp></dt>
  19050. <dd><p>Always use float 32-bit.
  19051. </p></dd>
  19052. <dt><samp class="option">f64</samp></dt>
  19053. <dd><p>Always use float 64-bit.
  19054. </p></dd>
  19055. </dl>
  19056. </dd>
  19057. <dt><samp class="option">block_size, b</samp></dt>
  19058. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  19059. value (higher than impulse response length truncated when reaches near zero values) filtering
  19060. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  19061. </p>
  19062. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  19063. </p></dd>
  19064. </dl>
  19065. </div>
  19066. </div>
  19067. <div class="section-level-extent" id="bs2b">
  19068. <h3 class="section"><span>29.73 bs2b<a class="copiable-link" href="#bs2b"> &para;</a></span></h3>
  19069. <p>Bauer stereo to binaural transformation, which improves headphone listening of
  19070. stereo audio records.
  19071. </p>
  19072. <p>To enable compilation of this filter you need to configure FFmpeg with
  19073. <code class="code">--enable-libbs2b</code>.
  19074. </p>
  19075. <p>It accepts the following parameters:
  19076. </p><dl class="table">
  19077. <dt><samp class="option">profile</samp></dt>
  19078. <dd><p>Pre-defined crossfeed level.
  19079. </p><dl class="table">
  19080. <dt><samp class="option">default</samp></dt>
  19081. <dd><p>Default level (fcut=700, feed=50).
  19082. </p>
  19083. </dd>
  19084. <dt><samp class="option">cmoy</samp></dt>
  19085. <dd><p>Chu Moy circuit (fcut=700, feed=60).
  19086. </p>
  19087. </dd>
  19088. <dt><samp class="option">jmeier</samp></dt>
  19089. <dd><p>Jan Meier circuit (fcut=650, feed=95).
  19090. </p>
  19091. </dd>
  19092. </dl>
  19093. </dd>
  19094. <dt><samp class="option">fcut</samp></dt>
  19095. <dd><p>Cut frequency (in Hz).
  19096. </p>
  19097. </dd>
  19098. <dt><samp class="option">feed</samp></dt>
  19099. <dd><p>Feed level (in Hz).
  19100. </p>
  19101. </dd>
  19102. </dl>
  19103. </div>
  19104. <div class="section-level-extent" id="channelmap">
  19105. <h3 class="section"><span>29.74 channelmap<a class="copiable-link" href="#channelmap"> &para;</a></span></h3>
  19106. <p>Remap input channels to new locations.
  19107. </p>
  19108. <p>It accepts the following parameters:
  19109. </p><dl class="table">
  19110. <dt><samp class="option">map</samp></dt>
  19111. <dd><p>Map channels from input to output. The argument is a &rsquo;|&rsquo;-separated list of
  19112. mappings, each in the <code class="code"><var class="var">in_channel</var>-<var class="var">out_channel</var></code> or
  19113. <code class="code"><var class="var">in_channel</var></code> form. <var class="var">in_channel</var> can be either the name of the
  19114. input channel (e.g. FL for front left) or its index in the input channel
  19115. layout. <var class="var">out_channel</var> is the name of the output channel or its index in the
  19116. output channel layout. If <var class="var">out_channel</var> is not given then it is implicitly
  19117. an index, starting with zero and increasing by one for each mapping. Mixing
  19118. different types of mappings is not allowed and will result in a parse error.
  19119. </p>
  19120. </dd>
  19121. <dt><samp class="option">channel_layout</samp></dt>
  19122. <dd><p>The channel layout of the output stream. If not specified, then filter will
  19123. guess it based on the <var class="var">out_channel</var> names or the number of mappings.
  19124. Guessed layouts will not necessarily contain channels in the order of the
  19125. mappings.
  19126. </p></dd>
  19127. </dl>
  19128. <p>If no mapping is present, the filter will implicitly map input channels to
  19129. output channels, preserving indices.
  19130. </p>
  19131. <ul class="mini-toc">
  19132. <li><a href="#Examples-36" accesskey="1">Examples</a></li>
  19133. </ul>
  19134. <div class="subsection-level-extent" id="Examples-36">
  19135. <h4 class="subsection"><span>29.74.1 Examples<a class="copiable-link" href="#Examples-36"> &para;</a></span></h4>
  19136. <ul class="itemize mark-bullet">
  19137. <li>For example, assuming a 5.1+downmix input MOV file,
  19138. <div class="example">
  19139. <pre class="example-preformatted">ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
  19140. </pre></div>
  19141. <p>will create an output WAV file tagged as stereo from the downmix channels of
  19142. the input.
  19143. </p>
  19144. </li><li>To fix a 5.1 WAV improperly encoded in AAC&rsquo;s native channel order
  19145. <div class="example">
  19146. <pre class="example-preformatted">ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
  19147. </pre></div>
  19148. </li></ul>
  19149. </div>
  19150. </div>
  19151. <div class="section-level-extent" id="channelsplit">
  19152. <h3 class="section"><span>29.75 channelsplit<a class="copiable-link" href="#channelsplit"> &para;</a></span></h3>
  19153. <p>Split each channel from an input audio stream into a separate output stream.
  19154. </p>
  19155. <p>It accepts the following parameters:
  19156. </p><dl class="table">
  19157. <dt><samp class="option">channel_layout</samp></dt>
  19158. <dd><p>The channel layout of the input stream. The default is &quot;stereo&quot;.
  19159. </p></dd>
  19160. <dt><samp class="option">channels</samp></dt>
  19161. <dd><p>A channel layout describing the channels to be extracted as separate output streams
  19162. or &quot;all&quot; to extract each input channel as a separate stream. The default is &quot;all&quot;.
  19163. </p>
  19164. <p>Choosing channels not present in channel layout in the input will result in an error.
  19165. </p></dd>
  19166. </dl>
  19167. <ul class="mini-toc">
  19168. <li><a href="#Examples-37" accesskey="1">Examples</a></li>
  19169. </ul>
  19170. <div class="subsection-level-extent" id="Examples-37">
  19171. <h4 class="subsection"><span>29.75.1 Examples<a class="copiable-link" href="#Examples-37"> &para;</a></span></h4>
  19172. <ul class="itemize mark-bullet">
  19173. <li>For example, assuming a stereo input MP3 file,
  19174. <div class="example">
  19175. <pre class="example-preformatted">ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
  19176. </pre></div>
  19177. <p>will create an output Matroska file with two audio streams, one containing only
  19178. the left channel and the other the right channel.
  19179. </p>
  19180. </li><li>Split a 5.1 WAV file into per-channel files:
  19181. <div class="example">
  19182. <pre class="example-preformatted">ffmpeg -i in.wav -filter_complex
  19183. 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
  19184. -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
  19185. front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
  19186. side_right.wav
  19187. </pre></div>
  19188. </li><li>Extract only LFE from a 5.1 WAV file:
  19189. <div class="example">
  19190. <pre class="example-preformatted">ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
  19191. -map '[LFE]' lfe.wav
  19192. </pre></div>
  19193. </li></ul>
  19194. </div>
  19195. </div>
  19196. <div class="section-level-extent" id="chorus">
  19197. <h3 class="section"><span>29.76 chorus<a class="copiable-link" href="#chorus"> &para;</a></span></h3>
  19198. <p>Add a chorus effect to the audio.
  19199. </p>
  19200. <p>Can make a single vocal sound like a chorus, but can also be applied to instrumentation.
  19201. </p>
  19202. <p>Chorus resembles an echo effect with a short delay, but whereas with echo the delay is
  19203. constant, with chorus, it is varied using using sinusoidal or triangular modulation.
  19204. The modulation depth defines the range the modulated delay is played before or after
  19205. the delay. Hence the delayed sound will sound slower or faster, that is the delayed
  19206. sound tuned around the original one, like in a chorus where some vocals are slightly
  19207. off key.
  19208. </p>
  19209. <p>It accepts the following parameters:
  19210. </p><dl class="table">
  19211. <dt><samp class="option">in_gain</samp></dt>
  19212. <dd><p>Set input gain. Default is 0.4.
  19213. </p>
  19214. </dd>
  19215. <dt><samp class="option">out_gain</samp></dt>
  19216. <dd><p>Set output gain. Default is 0.4.
  19217. </p>
  19218. </dd>
  19219. <dt><samp class="option">delays</samp></dt>
  19220. <dd><p>Set delays. A typical delay is around 40ms to 60ms.
  19221. </p>
  19222. </dd>
  19223. <dt><samp class="option">decays</samp></dt>
  19224. <dd><p>Set decays.
  19225. </p>
  19226. </dd>
  19227. <dt><samp class="option">speeds</samp></dt>
  19228. <dd><p>Set speeds.
  19229. </p>
  19230. </dd>
  19231. <dt><samp class="option">depths</samp></dt>
  19232. <dd><p>Set depths.
  19233. </p></dd>
  19234. </dl>
  19235. <ul class="mini-toc">
  19236. <li><a href="#Examples-38" accesskey="1">Examples</a></li>
  19237. </ul>
  19238. <div class="subsection-level-extent" id="Examples-38">
  19239. <h4 class="subsection"><span>29.76.1 Examples<a class="copiable-link" href="#Examples-38"> &para;</a></span></h4>
  19240. <ul class="itemize mark-bullet">
  19241. <li>A single delay:
  19242. <div class="example">
  19243. <pre class="example-preformatted">chorus=0.7:0.9:55:0.4:0.25:2
  19244. </pre></div>
  19245. </li><li>Two delays:
  19246. <div class="example">
  19247. <pre class="example-preformatted">chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
  19248. </pre></div>
  19249. </li><li>Fuller sounding chorus with three delays:
  19250. <div class="example">
  19251. <pre class="example-preformatted">chorus=0.5:0.9:50|60|40:0.4|0.32|0.3:0.25|0.4|0.3:2|2.3|1.3
  19252. </pre></div>
  19253. </li></ul>
  19254. </div>
  19255. </div>
  19256. <div class="section-level-extent" id="compand">
  19257. <h3 class="section"><span>29.77 compand<a class="copiable-link" href="#compand"> &para;</a></span></h3>
  19258. <p>Compress or expand the audio&rsquo;s dynamic range.
  19259. </p>
  19260. <p>It accepts the following parameters:
  19261. </p>
  19262. <dl class="table">
  19263. <dt><samp class="option">attacks</samp></dt>
  19264. <dt><samp class="option">decays</samp></dt>
  19265. <dd><p>A list of times in seconds for each channel over which the instantaneous level
  19266. of the input signal is averaged to determine its volume. <var class="var">attacks</var> refers to
  19267. increase of volume and <var class="var">decays</var> refers to decrease of volume. For most
  19268. situations, the attack time (response to the audio getting louder) should be
  19269. shorter than the decay time, because the human ear is more sensitive to sudden
  19270. loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and
  19271. a typical value for decay is 0.8 seconds.
  19272. If specified number of attacks &amp; decays is lower than number of channels, the last
  19273. set attack/decay will be used for all remaining channels.
  19274. </p>
  19275. </dd>
  19276. <dt><samp class="option">points</samp></dt>
  19277. <dd><p>A list of points for the transfer function, specified in dB relative to the
  19278. maximum possible signal amplitude. Each key points list must be defined using
  19279. the following syntax: <code class="code">x0/y0|x1/y1|x2/y2|....</code> or
  19280. <code class="code">x0/y0 x1/y1 x2/y2 ....</code>
  19281. </p>
  19282. <p>The input values must be in strictly increasing order but the transfer function
  19283. does not have to be monotonically rising. The point <code class="code">0/0</code> is assumed but
  19284. may be overridden (by <code class="code">0/out-dBn</code>). Typical values for the transfer
  19285. function are <code class="code">-70/-70|-60/-20|1/0</code>.
  19286. </p>
  19287. </dd>
  19288. <dt><samp class="option">soft-knee</samp></dt>
  19289. <dd><p>Set the curve radius in dB for all joints. It defaults to 0.01.
  19290. </p>
  19291. </dd>
  19292. <dt><samp class="option">gain</samp></dt>
  19293. <dd><p>Set the additional gain in dB to be applied at all points on the transfer
  19294. function. This allows for easy adjustment of the overall gain.
  19295. It defaults to 0.
  19296. </p>
  19297. </dd>
  19298. <dt><samp class="option">volume</samp></dt>
  19299. <dd><p>Set an initial volume, in dB, to be assumed for each channel when filtering
  19300. starts. This permits the user to supply a nominal level initially, so that, for
  19301. example, a very large gain is not applied to initial signal levels before the
  19302. companding has begun to operate. A typical value for audio which is initially
  19303. quiet is -90 dB. It defaults to 0.
  19304. </p>
  19305. </dd>
  19306. <dt><samp class="option">delay</samp></dt>
  19307. <dd><p>Set a delay, in seconds. The input audio is analyzed immediately, but audio is
  19308. delayed before being fed to the volume adjuster. Specifying a delay
  19309. approximately equal to the attack/decay times allows the filter to effectively
  19310. operate in predictive rather than reactive mode. It defaults to 0.
  19311. </p>
  19312. </dd>
  19313. </dl>
  19314. <ul class="mini-toc">
  19315. <li><a href="#Examples-39" accesskey="1">Examples</a></li>
  19316. </ul>
  19317. <div class="subsection-level-extent" id="Examples-39">
  19318. <h4 class="subsection"><span>29.77.1 Examples<a class="copiable-link" href="#Examples-39"> &para;</a></span></h4>
  19319. <ul class="itemize mark-bullet">
  19320. <li>Make music with both quiet and loud passages suitable for listening to in a
  19321. noisy environment:
  19322. <div class="example">
  19323. <pre class="example-preformatted">compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
  19324. </pre></div>
  19325. <p>Another example for audio with whisper and explosion parts:
  19326. </p><div class="example">
  19327. <pre class="example-preformatted">compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
  19328. </pre></div>
  19329. </li><li>A noise gate for when the noise is at a lower level than the signal:
  19330. <div class="example">
  19331. <pre class="example-preformatted">compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
  19332. </pre></div>
  19333. </li><li>Here is another noise gate, this time for when the noise is at a higher level
  19334. than the signal (making it, in some ways, similar to squelch):
  19335. <div class="example">
  19336. <pre class="example-preformatted">compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
  19337. </pre></div>
  19338. </li><li>2:1 compression starting at -6dB:
  19339. <div class="example">
  19340. <pre class="example-preformatted">compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
  19341. </pre></div>
  19342. </li><li>2:1 compression starting at -9dB:
  19343. <div class="example">
  19344. <pre class="example-preformatted">compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
  19345. </pre></div>
  19346. </li><li>2:1 compression starting at -12dB:
  19347. <div class="example">
  19348. <pre class="example-preformatted">compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
  19349. </pre></div>
  19350. </li><li>2:1 compression starting at -18dB:
  19351. <div class="example">
  19352. <pre class="example-preformatted">compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
  19353. </pre></div>
  19354. </li><li>3:1 compression starting at -15dB:
  19355. <div class="example">
  19356. <pre class="example-preformatted">compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
  19357. </pre></div>
  19358. </li><li>Compressor/Gate:
  19359. <div class="example">
  19360. <pre class="example-preformatted">compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
  19361. </pre></div>
  19362. </li><li>Expander:
  19363. <div class="example">
  19364. <pre class="example-preformatted">compand=attacks=0:points=-80/-169|-54/-80|-49.5/-64.6|-41.1/-41.1|-25.8/-15|-10.8/-4.5|0/0|20/8.3
  19365. </pre></div>
  19366. </li><li>Hard limiter at -6dB:
  19367. <div class="example">
  19368. <pre class="example-preformatted">compand=attacks=0:points=-80/-80|-6/-6|20/-6
  19369. </pre></div>
  19370. </li><li>Hard limiter at -12dB:
  19371. <div class="example">
  19372. <pre class="example-preformatted">compand=attacks=0:points=-80/-80|-12/-12|20/-12
  19373. </pre></div>
  19374. </li><li>Hard noise gate at -35 dB:
  19375. <div class="example">
  19376. <pre class="example-preformatted">compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
  19377. </pre></div>
  19378. </li><li>Soft limiter:
  19379. <div class="example">
  19380. <pre class="example-preformatted">compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
  19381. </pre></div>
  19382. </li></ul>
  19383. </div>
  19384. </div>
  19385. <div class="section-level-extent" id="compensationdelay">
  19386. <h3 class="section"><span>29.78 compensationdelay<a class="copiable-link" href="#compensationdelay"> &para;</a></span></h3>
  19387. <p>Compensation Delay Line is a metric based delay to compensate differing
  19388. positions of microphones or speakers.
  19389. </p>
  19390. <p>For example, you have recorded guitar with two microphones placed in
  19391. different locations. Because the front of sound wave has fixed speed in
  19392. normal conditions, the phasing of microphones can vary and depends on
  19393. their location and interposition. The best sound mix can be achieved when
  19394. these microphones are in phase (synchronized). Note that a distance of
  19395. ~30 cm between microphones makes one microphone capture the signal in
  19396. antiphase to the other microphone. That makes the final mix sound moody.
  19397. This filter helps to solve phasing problems by adding different delays
  19398. to each microphone track and make them synchronized.
  19399. </p>
  19400. <p>The best result can be reached when you take one track as base and
  19401. synchronize other tracks one by one with it.
  19402. Remember that synchronization/delay tolerance depends on sample rate, too.
  19403. Higher sample rates will give more tolerance.
  19404. </p>
  19405. <p>The filter accepts the following parameters:
  19406. </p>
  19407. <dl class="table">
  19408. <dt><samp class="option">mm</samp></dt>
  19409. <dd><p>Set millimeters distance. This is compensation distance for fine tuning.
  19410. Default is 0.
  19411. </p>
  19412. </dd>
  19413. <dt><samp class="option">cm</samp></dt>
  19414. <dd><p>Set cm distance. This is compensation distance for tightening distance setup.
  19415. Default is 0.
  19416. </p>
  19417. </dd>
  19418. <dt><samp class="option">m</samp></dt>
  19419. <dd><p>Set meters distance. This is compensation distance for hard distance setup.
  19420. Default is 0.
  19421. </p>
  19422. </dd>
  19423. <dt><samp class="option">dry</samp></dt>
  19424. <dd><p>Set dry amount. Amount of unprocessed (dry) signal.
  19425. Default is 0.
  19426. </p>
  19427. </dd>
  19428. <dt><samp class="option">wet</samp></dt>
  19429. <dd><p>Set wet amount. Amount of processed (wet) signal.
  19430. Default is 1.
  19431. </p>
  19432. </dd>
  19433. <dt><samp class="option">temp</samp></dt>
  19434. <dd><p>Set temperature in degrees Celsius. This is the temperature of the environment.
  19435. Default is 20.
  19436. </p></dd>
  19437. </dl>
  19438. <ul class="mini-toc">
  19439. <li><a href="#Commands-33" accesskey="1">Commands</a></li>
  19440. </ul>
  19441. <div class="subsection-level-extent" id="Commands-33">
  19442. <h4 class="subsection"><span>29.78.1 Commands<a class="copiable-link" href="#Commands-33"> &para;</a></span></h4>
  19443. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  19444. </p>
  19445. </div>
  19446. </div>
  19447. <div class="section-level-extent" id="crossfeed">
  19448. <h3 class="section"><span>29.79 crossfeed<a class="copiable-link" href="#crossfeed"> &para;</a></span></h3>
  19449. <p>Apply headphone crossfeed filter.
  19450. </p>
  19451. <p>Crossfeed is the process of blending the left and right channels of stereo
  19452. audio recording.
  19453. It is mainly used to reduce extreme stereo separation of low frequencies.
  19454. </p>
  19455. <p>The intent is to produce more speaker like sound to the listener.
  19456. </p>
  19457. <p>The filter accepts the following options:
  19458. </p>
  19459. <dl class="table">
  19460. <dt><samp class="option">strength</samp></dt>
  19461. <dd><p>Set strength of crossfeed. Default is 0.2. Allowed range is from 0 to 1.
  19462. This sets gain of low shelf filter for side part of stereo image.
  19463. Default is -6dB. Max allowed is -30db when strength is set to 1.
  19464. </p>
  19465. </dd>
  19466. <dt><samp class="option">range</samp></dt>
  19467. <dd><p>Set soundstage wideness. Default is 0.5. Allowed range is from 0 to 1.
  19468. This sets cut off frequency of low shelf filter. Default is cut off near
  19469. 1550 Hz. With range set to 1 cut off frequency is set to 2100 Hz.
  19470. </p>
  19471. </dd>
  19472. <dt><samp class="option">slope</samp></dt>
  19473. <dd><p>Set curve slope of low shelf filter. Default is 0.5.
  19474. Allowed range is from 0.01 to 1.
  19475. </p>
  19476. </dd>
  19477. <dt><samp class="option">level_in</samp></dt>
  19478. <dd><p>Set input gain. Default is 0.9.
  19479. </p>
  19480. </dd>
  19481. <dt><samp class="option">level_out</samp></dt>
  19482. <dd><p>Set output gain. Default is 1.
  19483. </p>
  19484. </dd>
  19485. <dt><samp class="option">block_size</samp></dt>
  19486. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  19487. value (higher than impulse response length truncated when reaches near zero values) filtering
  19488. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  19489. </p>
  19490. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  19491. </p></dd>
  19492. </dl>
  19493. <ul class="mini-toc">
  19494. <li><a href="#Commands-34" accesskey="1">Commands</a></li>
  19495. </ul>
  19496. <div class="subsection-level-extent" id="Commands-34">
  19497. <h4 class="subsection"><span>29.79.1 Commands<a class="copiable-link" href="#Commands-34"> &para;</a></span></h4>
  19498. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  19499. </p>
  19500. </div>
  19501. </div>
  19502. <div class="section-level-extent" id="crystalizer">
  19503. <h3 class="section"><span>29.80 crystalizer<a class="copiable-link" href="#crystalizer"> &para;</a></span></h3>
  19504. <p>Simple algorithm for audio noise sharpening.
  19505. </p>
  19506. <p>This filter linearly increases differences between each audio sample.
  19507. </p>
  19508. <p>The filter accepts the following options:
  19509. </p>
  19510. <dl class="table">
  19511. <dt><samp class="option">i</samp></dt>
  19512. <dd><p>Sets the intensity of effect (default: 2.0). Must be in range between -10.0 to 0
  19513. (unchanged sound) to 10.0 (maximum effect).
  19514. To inverse filtering use negative value.
  19515. </p>
  19516. </dd>
  19517. <dt><samp class="option">c</samp></dt>
  19518. <dd><p>Enable clipping. By default is enabled.
  19519. </p></dd>
  19520. </dl>
  19521. <ul class="mini-toc">
  19522. <li><a href="#Commands-35" accesskey="1">Commands</a></li>
  19523. </ul>
  19524. <div class="subsection-level-extent" id="Commands-35">
  19525. <h4 class="subsection"><span>29.80.1 Commands<a class="copiable-link" href="#Commands-35"> &para;</a></span></h4>
  19526. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  19527. </p>
  19528. </div>
  19529. </div>
  19530. <div class="section-level-extent" id="dcshift">
  19531. <h3 class="section"><span>29.81 dcshift<a class="copiable-link" href="#dcshift"> &para;</a></span></h3>
  19532. <p>Apply a DC shift to the audio.
  19533. </p>
  19534. <p>This can be useful to remove a DC offset (caused perhaps by a hardware problem
  19535. in the recording chain) from the audio. The effect of a DC offset is reduced
  19536. headroom and hence volume. The <a class="ref" href="#astats">astats</a> filter can be used to determine if
  19537. a signal has a DC offset.
  19538. </p>
  19539. <dl class="table">
  19540. <dt><samp class="option">shift</samp></dt>
  19541. <dd><p>Set the DC shift, allowed range is [-1, 1]. It indicates the amount to shift
  19542. the audio.
  19543. </p>
  19544. </dd>
  19545. <dt><samp class="option">limitergain</samp></dt>
  19546. <dd><p>Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is
  19547. used to prevent clipping.
  19548. </p></dd>
  19549. </dl>
  19550. </div>
  19551. <div class="section-level-extent" id="deesser">
  19552. <h3 class="section"><span>29.82 deesser<a class="copiable-link" href="#deesser"> &para;</a></span></h3>
  19553. <p>Apply de-essing to the audio samples.
  19554. </p>
  19555. <dl class="table">
  19556. <dt><samp class="option">i</samp></dt>
  19557. <dd><p>Set intensity for triggering de-essing. Allowed range is from 0 to 1.
  19558. Default is 0.
  19559. </p>
  19560. </dd>
  19561. <dt><samp class="option">m</samp></dt>
  19562. <dd><p>Set amount of ducking on treble part of sound. Allowed range is from 0 to 1.
  19563. Default is 0.5.
  19564. </p>
  19565. </dd>
  19566. <dt><samp class="option">f</samp></dt>
  19567. <dd><p>How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1.
  19568. Default is 0.5.
  19569. </p>
  19570. </dd>
  19571. <dt><samp class="option">s</samp></dt>
  19572. <dd><p>Set the output mode.
  19573. </p>
  19574. <p>It accepts the following values:
  19575. </p><dl class="table">
  19576. <dt><samp class="option">i</samp></dt>
  19577. <dd><p>Pass input unchanged.
  19578. </p>
  19579. </dd>
  19580. <dt><samp class="option">o</samp></dt>
  19581. <dd><p>Pass ess filtered out.
  19582. </p>
  19583. </dd>
  19584. <dt><samp class="option">e</samp></dt>
  19585. <dd><p>Pass only ess.
  19586. </p>
  19587. <p>Default value is <var class="var">o</var>.
  19588. </p></dd>
  19589. </dl>
  19590. </dd>
  19591. </dl>
  19592. </div>
  19593. <div class="section-level-extent" id="dialoguenhance">
  19594. <h3 class="section"><span>29.83 dialoguenhance<a class="copiable-link" href="#dialoguenhance"> &para;</a></span></h3>
  19595. <p>Enhance dialogue in stereo audio.
  19596. </p>
  19597. <p>This filter accepts stereo input and produce surround (3.0) channels output.
  19598. The newly produced front center channel have enhanced speech dialogue originally
  19599. available in both stereo channels.
  19600. This filter outputs front left and front right channels same as available in stereo input.
  19601. </p>
  19602. <p>The filter accepts the following options:
  19603. </p>
  19604. <dl class="table">
  19605. <dt><samp class="option">original</samp></dt>
  19606. <dd><p>Set the original center factor to keep in front center channel output.
  19607. Allowed range is from 0 to 1. Default value is 1.
  19608. </p>
  19609. </dd>
  19610. <dt><samp class="option">enhance</samp></dt>
  19611. <dd><p>Set the dialogue enhance factor to put in front center channel output.
  19612. Allowed range is from 0 to 3. Default value is 1.
  19613. </p>
  19614. </dd>
  19615. <dt><samp class="option">voice</samp></dt>
  19616. <dd><p>Set the voice detection factor.
  19617. Allowed range is from 2 to 32. Default value is 2.
  19618. </p></dd>
  19619. </dl>
  19620. <ul class="mini-toc">
  19621. <li><a href="#Commands-36" accesskey="1">Commands</a></li>
  19622. </ul>
  19623. <div class="subsection-level-extent" id="Commands-36">
  19624. <h4 class="subsection"><span>29.83.1 Commands<a class="copiable-link" href="#Commands-36"> &para;</a></span></h4>
  19625. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  19626. </p>
  19627. </div>
  19628. </div>
  19629. <div class="section-level-extent" id="drmeter">
  19630. <h3 class="section"><span>29.84 drmeter<a class="copiable-link" href="#drmeter"> &para;</a></span></h3>
  19631. <p>Measure audio dynamic range.
  19632. </p>
  19633. <p>DR values of 14 and higher is found in very dynamic material. DR of 8 to 13
  19634. is found in transition material. And anything less that 8 have very poor dynamics
  19635. and is very compressed.
  19636. </p>
  19637. <p>The filter accepts the following options:
  19638. </p>
  19639. <dl class="table">
  19640. <dt><samp class="option">length</samp></dt>
  19641. <dd><p>Set window length in seconds used to split audio into segments of equal length.
  19642. Default is 3 seconds.
  19643. </p></dd>
  19644. </dl>
  19645. </div>
  19646. <div class="section-level-extent" id="dynaudnorm">
  19647. <h3 class="section"><span>29.85 dynaudnorm<a class="copiable-link" href="#dynaudnorm"> &para;</a></span></h3>
  19648. <p>Dynamic Audio Normalizer.
  19649. </p>
  19650. <p>This filter applies a certain amount of gain to the input audio in order
  19651. to bring its peak magnitude to a target level (e.g. 0 dBFS). However, in
  19652. contrast to more &quot;simple&quot; normalization algorithms, the Dynamic Audio
  19653. Normalizer *dynamically* re-adjusts the gain factor to the input audio.
  19654. This allows for applying extra gain to the &quot;quiet&quot; sections of the audio
  19655. while avoiding distortions or clipping the &quot;loud&quot; sections. In other words:
  19656. The Dynamic Audio Normalizer will &quot;even out&quot; the volume of quiet and loud
  19657. sections, in the sense that the volume of each section is brought to the
  19658. same target level. Note, however, that the Dynamic Audio Normalizer achieves
  19659. this goal *without* applying &quot;dynamic range compressing&quot;. It will retain 100%
  19660. of the dynamic range *within* each section of the audio file.
  19661. </p>
  19662. <dl class="table">
  19663. <dt><samp class="option">framelen, f</samp></dt>
  19664. <dd><p>Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.
  19665. Default is 500 milliseconds.
  19666. The Dynamic Audio Normalizer processes the input audio in small chunks,
  19667. referred to as frames. This is required, because a peak magnitude has no
  19668. meaning for just a single sample value. Instead, we need to determine the
  19669. peak magnitude for a contiguous sequence of sample values. While a &quot;standard&quot;
  19670. normalizer would simply use the peak magnitude of the complete file, the
  19671. Dynamic Audio Normalizer determines the peak magnitude individually for each
  19672. frame. The length of a frame is specified in milliseconds. By default, the
  19673. Dynamic Audio Normalizer uses a frame length of 500 milliseconds, which has
  19674. been found to give good results with most files.
  19675. Note that the exact frame length, in number of samples, will be determined
  19676. automatically, based on the sampling rate of the individual input audio file.
  19677. </p>
  19678. </dd>
  19679. <dt><samp class="option">gausssize, g</samp></dt>
  19680. <dd><p>Set the Gaussian filter window size. In range from 3 to 301, must be odd
  19681. number. Default is 31.
  19682. Probably the most important parameter of the Dynamic Audio Normalizer is the
  19683. <code class="code">window size</code> of the Gaussian smoothing filter. The filter&rsquo;s window size
  19684. is specified in frames, centered around the current frame. For the sake of
  19685. simplicity, this must be an odd number. Consequently, the default value of 31
  19686. takes into account the current frame, as well as the 15 preceding frames and
  19687. the 15 subsequent frames. Using a larger window results in a stronger
  19688. smoothing effect and thus in less gain variation, i.e. slower gain
  19689. adaptation. Conversely, using a smaller window results in a weaker smoothing
  19690. effect and thus in more gain variation, i.e. faster gain adaptation.
  19691. In other words, the more you increase this value, the more the Dynamic Audio
  19692. Normalizer will behave like a &quot;traditional&quot; normalization filter. On the
  19693. contrary, the more you decrease this value, the more the Dynamic Audio
  19694. Normalizer will behave like a dynamic range compressor.
  19695. </p>
  19696. </dd>
  19697. <dt><samp class="option">peak, p</samp></dt>
  19698. <dd><p>Set the target peak value. This specifies the highest permissible magnitude
  19699. level for the normalized audio input. This filter will try to approach the
  19700. target peak magnitude as closely as possible, but at the same time it also
  19701. makes sure that the normalized signal will never exceed the peak magnitude.
  19702. A frame&rsquo;s maximum local gain factor is imposed directly by the target peak
  19703. magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.
  19704. It is not recommended to go above this value.
  19705. </p>
  19706. </dd>
  19707. <dt><samp class="option">maxgain, m</samp></dt>
  19708. <dd><p>Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.
  19709. The Dynamic Audio Normalizer determines the maximum possible (local) gain
  19710. factor for each input frame, i.e. the maximum gain factor that does not
  19711. result in clipping or distortion. The maximum gain factor is determined by
  19712. the frame&rsquo;s highest magnitude sample. However, the Dynamic Audio Normalizer
  19713. additionally bounds the frame&rsquo;s maximum gain factor by a predetermined
  19714. (global) maximum gain factor. This is done in order to avoid excessive gain
  19715. factors in &quot;silent&quot; or almost silent frames. By default, the maximum gain
  19716. factor is 10.0, For most inputs the default value should be sufficient and
  19717. it usually is not recommended to increase this value. Though, for input
  19718. with an extremely low overall volume level, it may be necessary to allow even
  19719. higher gain factors. Note, however, that the Dynamic Audio Normalizer does
  19720. not simply apply a &quot;hard&quot; threshold (i.e. cut off values above the threshold).
  19721. Instead, a &quot;sigmoid&quot; threshold function will be applied. This way, the
  19722. gain factors will smoothly approach the threshold value, but never exceed that
  19723. value.
  19724. </p>
  19725. </dd>
  19726. <dt><samp class="option">targetrms, r</samp></dt>
  19727. <dd><p>Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.
  19728. By default, the Dynamic Audio Normalizer performs &quot;peak&quot; normalization.
  19729. This means that the maximum local gain factor for each frame is defined
  19730. (only) by the frame&rsquo;s highest magnitude sample. This way, the samples can
  19731. be amplified as much as possible without exceeding the maximum signal
  19732. level, i.e. without clipping. Optionally, however, the Dynamic Audio
  19733. Normalizer can also take into account the frame&rsquo;s root mean square,
  19734. abbreviated RMS. In electrical engineering, the RMS is commonly used to
  19735. determine the power of a time-varying signal. It is therefore considered
  19736. that the RMS is a better approximation of the &quot;perceived loudness&quot; than
  19737. just looking at the signal&rsquo;s peak magnitude. Consequently, by adjusting all
  19738. frames to a constant RMS value, a uniform &quot;perceived loudness&quot; can be
  19739. established. If a target RMS value has been specified, a frame&rsquo;s local gain
  19740. factor is defined as the factor that would result in exactly that RMS value.
  19741. Note, however, that the maximum local gain factor is still restricted by the
  19742. frame&rsquo;s highest magnitude sample, in order to prevent clipping.
  19743. </p>
  19744. </dd>
  19745. <dt><samp class="option">coupling, n</samp></dt>
  19746. <dd><p>Enable channels coupling. By default is enabled.
  19747. By default, the Dynamic Audio Normalizer will amplify all channels by the same
  19748. amount. This means the same gain factor will be applied to all channels, i.e.
  19749. the maximum possible gain factor is determined by the &quot;loudest&quot; channel.
  19750. However, in some recordings, it may happen that the volume of the different
  19751. channels is uneven, e.g. one channel may be &quot;quieter&quot; than the other one(s).
  19752. In this case, this option can be used to disable the channel coupling. This way,
  19753. the gain factor will be determined independently for each channel, depending
  19754. only on the individual channel&rsquo;s highest magnitude sample. This allows for
  19755. harmonizing the volume of the different channels.
  19756. </p>
  19757. </dd>
  19758. <dt><samp class="option">correctdc, c</samp></dt>
  19759. <dd><p>Enable DC bias correction. By default is disabled.
  19760. An audio signal (in the time domain) is a sequence of sample values.
  19761. In the Dynamic Audio Normalizer these sample values are represented in the
  19762. -1.0 to 1.0 range, regardless of the original input format. Normally, the
  19763. audio signal, or &quot;waveform&quot;, should be centered around the zero point.
  19764. That means if we calculate the mean value of all samples in a file, or in a
  19765. single frame, then the result should be 0.0 or at least very close to that
  19766. value. If, however, there is a significant deviation of the mean value from
  19767. 0.0, in either positive or negative direction, this is referred to as a
  19768. DC bias or DC offset. Since a DC bias is clearly undesirable, the Dynamic
  19769. Audio Normalizer provides optional DC bias correction.
  19770. With DC bias correction enabled, the Dynamic Audio Normalizer will determine
  19771. the mean value, or &quot;DC correction&quot; offset, of each input frame and subtract
  19772. that value from all of the frame&rsquo;s sample values which ensures those samples
  19773. are centered around 0.0 again. Also, in order to avoid &quot;gaps&quot; at the frame
  19774. boundaries, the DC correction offset values will be interpolated smoothly
  19775. between neighbouring frames.
  19776. </p>
  19777. </dd>
  19778. <dt><samp class="option">altboundary, b</samp></dt>
  19779. <dd><p>Enable alternative boundary mode. By default is disabled.
  19780. The Dynamic Audio Normalizer takes into account a certain neighbourhood
  19781. around each frame. This includes the preceding frames as well as the
  19782. subsequent frames. However, for the &quot;boundary&quot; frames, located at the very
  19783. beginning and at the very end of the audio file, not all neighbouring
  19784. frames are available. In particular, for the first few frames in the audio
  19785. file, the preceding frames are not known. And, similarly, for the last few
  19786. frames in the audio file, the subsequent frames are not known. Thus, the
  19787. question arises which gain factors should be assumed for the missing frames
  19788. in the &quot;boundary&quot; region. The Dynamic Audio Normalizer implements two modes
  19789. to deal with this situation. The default boundary mode assumes a gain factor
  19790. of exactly 1.0 for the missing frames, resulting in a smooth &quot;fade in&quot; and
  19791. &quot;fade out&quot; at the beginning and at the end of the input, respectively.
  19792. </p>
  19793. </dd>
  19794. <dt><samp class="option">compress, s</samp></dt>
  19795. <dd><p>Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
  19796. By default, the Dynamic Audio Normalizer does not apply &quot;traditional&quot;
  19797. compression. This means that signal peaks will not be pruned and thus the
  19798. full dynamic range will be retained within each local neighbourhood. However,
  19799. in some cases it may be desirable to combine the Dynamic Audio Normalizer&rsquo;s
  19800. normalization algorithm with a more &quot;traditional&quot; compression.
  19801. For this purpose, the Dynamic Audio Normalizer provides an optional compression
  19802. (thresholding) function. If (and only if) the compression feature is enabled,
  19803. all input frames will be processed by a soft knee thresholding function prior
  19804. to the actual normalization process. Put simply, the thresholding function is
  19805. going to prune all samples whose magnitude exceeds a certain threshold value.
  19806. However, the Dynamic Audio Normalizer does not simply apply a fixed threshold
  19807. value. Instead, the threshold value will be adjusted for each individual
  19808. frame.
  19809. In general, smaller parameters result in stronger compression, and vice versa.
  19810. Values below 3.0 are not recommended, because audible distortion may appear.
  19811. </p>
  19812. </dd>
  19813. <dt><samp class="option">threshold, t</samp></dt>
  19814. <dd><p>Set the target threshold value. This specifies the lowest permissible
  19815. magnitude level for the audio input which will be normalized.
  19816. If input frame volume is above this value frame will be normalized.
  19817. Otherwise frame may not be normalized at all. The default value is set
  19818. to 0, which means all input frames will be normalized.
  19819. This option is mostly useful if digital noise is not wanted to be amplified.
  19820. </p>
  19821. </dd>
  19822. <dt><samp class="option">channels, h</samp></dt>
  19823. <dd><p>Specify which channels to filter, by default all available channels are filtered.
  19824. </p>
  19825. </dd>
  19826. <dt><samp class="option">overlap, o</samp></dt>
  19827. <dd><p>Specify overlap for frames. If set to 0 (default) no frame overlapping is done.
  19828. Using &gt;0 and &lt;1 values will make less conservative gain adjustments, like
  19829. when framelen option is set to smaller value, if framelen option value is
  19830. compensated for non-zero overlap then gain adjustments will be smoother across time
  19831. compared to zero overlap case.
  19832. </p>
  19833. </dd>
  19834. <dt><samp class="option">curve, v</samp></dt>
  19835. <dd><p>Specify the peak mapping curve expression which is going to be used when calculating
  19836. gain applied to frames. The max output frame gain will still be limited by other
  19837. options mentioned previously for this filter.
  19838. </p>
  19839. <p>The expression can contain the following constants:
  19840. </p>
  19841. <dl class="table">
  19842. <dt><samp class="option">ch</samp></dt>
  19843. <dd><p>current channel number
  19844. </p>
  19845. </dd>
  19846. <dt><samp class="option">sn</samp></dt>
  19847. <dd><p>current sample number
  19848. </p>
  19849. </dd>
  19850. <dt><samp class="option">nb_channels</samp></dt>
  19851. <dd><p>number of channels
  19852. </p>
  19853. </dd>
  19854. <dt><samp class="option">t</samp></dt>
  19855. <dd><p>timestamp expressed in seconds
  19856. </p>
  19857. </dd>
  19858. <dt><samp class="option">sr</samp></dt>
  19859. <dd><p>sample rate
  19860. </p>
  19861. </dd>
  19862. <dt><samp class="option">p</samp></dt>
  19863. <dd><p>current frame peak value
  19864. </p></dd>
  19865. </dl>
  19866. </dd>
  19867. </dl>
  19868. <ul class="mini-toc">
  19869. <li><a href="#Commands-37" accesskey="1">Commands</a></li>
  19870. </ul>
  19871. <div class="subsection-level-extent" id="Commands-37">
  19872. <h4 class="subsection"><span>29.85.1 Commands<a class="copiable-link" href="#Commands-37"> &para;</a></span></h4>
  19873. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  19874. </p>
  19875. </div>
  19876. </div>
  19877. <div class="section-level-extent" id="earwax">
  19878. <h3 class="section"><span>29.86 earwax<a class="copiable-link" href="#earwax"> &para;</a></span></h3>
  19879. <p>Make audio easier to listen to on headphones.
  19880. </p>
  19881. <p>This filter adds &lsquo;cues&rsquo; to 44.1kHz stereo (i.e. audio CD format) audio
  19882. so that when listened to on headphones the stereo image is moved from
  19883. inside your head (standard for headphones) to outside and in front of
  19884. the listener (standard for speakers).
  19885. </p>
  19886. <p>Ported from SoX.
  19887. </p>
  19888. </div>
  19889. <div class="section-level-extent" id="equalizer">
  19890. <h3 class="section"><span>29.87 equalizer<a class="copiable-link" href="#equalizer"> &para;</a></span></h3>
  19891. <p>Apply a two-pole peaking equalisation (EQ) filter. With this
  19892. filter, the signal-level at and around a selected frequency can
  19893. be increased or decreased, whilst (unlike bandpass and bandreject
  19894. filters) that at all other frequencies is unchanged.
  19895. </p>
  19896. <p>In order to produce complex equalisation curves, this filter can
  19897. be given several times, each with a different central frequency.
  19898. </p>
  19899. <p>The filter accepts the following options:
  19900. </p>
  19901. <dl class="table">
  19902. <dt><samp class="option">frequency, f</samp></dt>
  19903. <dd><p>Set the filter&rsquo;s central frequency in Hz.
  19904. </p>
  19905. </dd>
  19906. <dt><samp class="option">width_type, t</samp></dt>
  19907. <dd><p>Set method to specify band-width of filter.
  19908. </p><dl class="table">
  19909. <dt><samp class="option">h</samp></dt>
  19910. <dd><p>Hz
  19911. </p></dd>
  19912. <dt><samp class="option">q</samp></dt>
  19913. <dd><p>Q-Factor
  19914. </p></dd>
  19915. <dt><samp class="option">o</samp></dt>
  19916. <dd><p>octave
  19917. </p></dd>
  19918. <dt><samp class="option">s</samp></dt>
  19919. <dd><p>slope
  19920. </p></dd>
  19921. <dt><samp class="option">k</samp></dt>
  19922. <dd><p>kHz
  19923. </p></dd>
  19924. </dl>
  19925. </dd>
  19926. <dt><samp class="option">width, w</samp></dt>
  19927. <dd><p>Specify the band-width of a filter in width_type units.
  19928. </p>
  19929. </dd>
  19930. <dt><samp class="option">gain, g</samp></dt>
  19931. <dd><p>Set the required gain or attenuation in dB.
  19932. Beware of clipping when using a positive gain.
  19933. </p>
  19934. </dd>
  19935. <dt><samp class="option">mix, m</samp></dt>
  19936. <dd><p>How much to use filtered signal in output. Default is 1.
  19937. Range is between 0 and 1.
  19938. </p>
  19939. </dd>
  19940. <dt><samp class="option">channels, c</samp></dt>
  19941. <dd><p>Specify which channels to filter, by default all available are filtered.
  19942. </p>
  19943. </dd>
  19944. <dt><samp class="option">normalize, n</samp></dt>
  19945. <dd><p>Normalize biquad coefficients, by default is disabled.
  19946. Enabling it will normalize magnitude response at DC to 0dB.
  19947. </p>
  19948. </dd>
  19949. <dt><samp class="option">transform, a</samp></dt>
  19950. <dd><p>Set transform type of IIR filter.
  19951. </p><dl class="table">
  19952. <dt><samp class="option">di</samp></dt>
  19953. <dt><samp class="option">dii</samp></dt>
  19954. <dt><samp class="option">tdi</samp></dt>
  19955. <dt><samp class="option">tdii</samp></dt>
  19956. <dt><samp class="option">latt</samp></dt>
  19957. <dt><samp class="option">svf</samp></dt>
  19958. <dt><samp class="option">zdf</samp></dt>
  19959. </dl>
  19960. </dd>
  19961. <dt><samp class="option">precision, r</samp></dt>
  19962. <dd><p>Set precision of filtering.
  19963. </p><dl class="table">
  19964. <dt><samp class="option">auto</samp></dt>
  19965. <dd><p>Pick automatic sample format depending on surround filters.
  19966. </p></dd>
  19967. <dt><samp class="option">s16</samp></dt>
  19968. <dd><p>Always use signed 16-bit.
  19969. </p></dd>
  19970. <dt><samp class="option">s32</samp></dt>
  19971. <dd><p>Always use signed 32-bit.
  19972. </p></dd>
  19973. <dt><samp class="option">f32</samp></dt>
  19974. <dd><p>Always use float 32-bit.
  19975. </p></dd>
  19976. <dt><samp class="option">f64</samp></dt>
  19977. <dd><p>Always use float 64-bit.
  19978. </p></dd>
  19979. </dl>
  19980. </dd>
  19981. <dt><samp class="option">block_size, b</samp></dt>
  19982. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  19983. value (higher than impulse response length truncated when reaches near zero values) filtering
  19984. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  19985. </p>
  19986. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  19987. </p></dd>
  19988. </dl>
  19989. <ul class="mini-toc">
  19990. <li><a href="#Examples-40" accesskey="1">Examples</a></li>
  19991. <li><a href="#Commands-38" accesskey="2">Commands</a></li>
  19992. </ul>
  19993. <div class="subsection-level-extent" id="Examples-40">
  19994. <h4 class="subsection"><span>29.87.1 Examples<a class="copiable-link" href="#Examples-40"> &para;</a></span></h4>
  19995. <ul class="itemize mark-bullet">
  19996. <li>Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
  19997. <div class="example">
  19998. <pre class="example-preformatted">equalizer=f=1000:t=h:width=200:g=-10
  19999. </pre></div>
  20000. </li><li>Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz with Q 2:
  20001. <div class="example">
  20002. <pre class="example-preformatted">equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
  20003. </pre></div>
  20004. </li></ul>
  20005. </div>
  20006. <div class="subsection-level-extent" id="Commands-38">
  20007. <h4 class="subsection"><span>29.87.2 Commands<a class="copiable-link" href="#Commands-38"> &para;</a></span></h4>
  20008. <p>This filter supports the following commands:
  20009. </p><dl class="table">
  20010. <dt><samp class="option">frequency, f</samp></dt>
  20011. <dd><p>Change equalizer frequency.
  20012. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  20013. </p>
  20014. </dd>
  20015. <dt><samp class="option">width_type, t</samp></dt>
  20016. <dd><p>Change equalizer width_type.
  20017. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  20018. </p>
  20019. </dd>
  20020. <dt><samp class="option">width, w</samp></dt>
  20021. <dd><p>Change equalizer width.
  20022. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  20023. </p>
  20024. </dd>
  20025. <dt><samp class="option">gain, g</samp></dt>
  20026. <dd><p>Change equalizer gain.
  20027. Syntax for the command is : &quot;<var class="var">gain</var>&quot;
  20028. </p>
  20029. </dd>
  20030. <dt><samp class="option">mix, m</samp></dt>
  20031. <dd><p>Change equalizer mix.
  20032. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  20033. </p></dd>
  20034. </dl>
  20035. </div>
  20036. </div>
  20037. <div class="section-level-extent" id="extrastereo">
  20038. <h3 class="section"><span>29.88 extrastereo<a class="copiable-link" href="#extrastereo"> &para;</a></span></h3>
  20039. <p>Linearly increases the difference between left and right channels which
  20040. adds some sort of &quot;live&quot; effect to playback.
  20041. </p>
  20042. <p>The filter accepts the following options:
  20043. </p>
  20044. <dl class="table">
  20045. <dt><samp class="option">m</samp></dt>
  20046. <dd><p>Sets the difference coefficient (default: 2.5). 0.0 means mono sound
  20047. (average of both channels), with 1.0 sound will be unchanged, with
  20048. -1.0 left and right channels will be swapped.
  20049. </p>
  20050. </dd>
  20051. <dt><samp class="option">c</samp></dt>
  20052. <dd><p>Enable clipping. By default is enabled.
  20053. </p></dd>
  20054. </dl>
  20055. <ul class="mini-toc">
  20056. <li><a href="#Commands-39" accesskey="1">Commands</a></li>
  20057. </ul>
  20058. <div class="subsection-level-extent" id="Commands-39">
  20059. <h4 class="subsection"><span>29.88.1 Commands<a class="copiable-link" href="#Commands-39"> &para;</a></span></h4>
  20060. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  20061. </p>
  20062. </div>
  20063. </div>
  20064. <div class="section-level-extent" id="firequalizer">
  20065. <h3 class="section"><span>29.89 firequalizer<a class="copiable-link" href="#firequalizer"> &para;</a></span></h3>
  20066. <p>Apply FIR Equalization using arbitrary frequency response.
  20067. </p>
  20068. <p>The filter accepts the following option:
  20069. </p>
  20070. <dl class="table">
  20071. <dt><samp class="option">gain</samp></dt>
  20072. <dd><p>Set gain curve equation (in dB). The expression can contain variables:
  20073. </p><dl class="table">
  20074. <dt><samp class="option">f</samp></dt>
  20075. <dd><p>the evaluated frequency
  20076. </p></dd>
  20077. <dt><samp class="option">sr</samp></dt>
  20078. <dd><p>sample rate
  20079. </p></dd>
  20080. <dt><samp class="option">ch</samp></dt>
  20081. <dd><p>channel number, set to 0 when multichannels evaluation is disabled
  20082. </p></dd>
  20083. <dt><samp class="option">chid</samp></dt>
  20084. <dd><p>channel id, see libavutil/channel_layout.h, set to the first channel id when
  20085. multichannels evaluation is disabled
  20086. </p></dd>
  20087. <dt><samp class="option">chs</samp></dt>
  20088. <dd><p>number of channels
  20089. </p></dd>
  20090. <dt><samp class="option">chlayout</samp></dt>
  20091. <dd><p>channel_layout, see libavutil/channel_layout.h
  20092. </p>
  20093. </dd>
  20094. </dl>
  20095. <p>and functions:
  20096. </p><dl class="table">
  20097. <dt><samp class="option">gain_interpolate(f)</samp></dt>
  20098. <dd><p>interpolate gain on frequency f based on gain_entry
  20099. </p></dd>
  20100. <dt><samp class="option">cubic_interpolate(f)</samp></dt>
  20101. <dd><p>same as gain_interpolate, but smoother
  20102. </p></dd>
  20103. </dl>
  20104. <p>This option is also available as command. Default is <code class="code">gain_interpolate(f)</code>.
  20105. </p>
  20106. </dd>
  20107. <dt><samp class="option">gain_entry</samp></dt>
  20108. <dd><p>Set gain entry for gain_interpolate function. The expression can
  20109. contain functions:
  20110. </p><dl class="table">
  20111. <dt><samp class="option">entry(f, g)</samp></dt>
  20112. <dd><p>store gain entry at frequency f with value g
  20113. </p></dd>
  20114. </dl>
  20115. <p>This option is also available as command.
  20116. </p>
  20117. </dd>
  20118. <dt><samp class="option">delay</samp></dt>
  20119. <dd><p>Set filter delay in seconds. Higher value means more accurate.
  20120. Default is <code class="code">0.01</code>.
  20121. </p>
  20122. </dd>
  20123. <dt><samp class="option">accuracy</samp></dt>
  20124. <dd><p>Set filter accuracy in Hz. Lower value means more accurate.
  20125. Default is <code class="code">5</code>.
  20126. </p>
  20127. </dd>
  20128. <dt><samp class="option">wfunc</samp></dt>
  20129. <dd><p>Set window function. Acceptable values are:
  20130. </p><dl class="table">
  20131. <dt><samp class="option">rectangular</samp></dt>
  20132. <dd><p>rectangular window, useful when gain curve is already smooth
  20133. </p></dd>
  20134. <dt><samp class="option">hann</samp></dt>
  20135. <dd><p>hann window (default)
  20136. </p></dd>
  20137. <dt><samp class="option">hamming</samp></dt>
  20138. <dd><p>hamming window
  20139. </p></dd>
  20140. <dt><samp class="option">blackman</samp></dt>
  20141. <dd><p>blackman window
  20142. </p></dd>
  20143. <dt><samp class="option">nuttall3</samp></dt>
  20144. <dd><p>3-terms continuous 1st derivative nuttall window
  20145. </p></dd>
  20146. <dt><samp class="option">mnuttall3</samp></dt>
  20147. <dd><p>minimum 3-terms discontinuous nuttall window
  20148. </p></dd>
  20149. <dt><samp class="option">nuttall</samp></dt>
  20150. <dd><p>4-terms continuous 1st derivative nuttall window
  20151. </p></dd>
  20152. <dt><samp class="option">bnuttall</samp></dt>
  20153. <dd><p>minimum 4-terms discontinuous nuttall (blackman-nuttall) window
  20154. </p></dd>
  20155. <dt><samp class="option">bharris</samp></dt>
  20156. <dd><p>blackman-harris window
  20157. </p></dd>
  20158. <dt><samp class="option">tukey</samp></dt>
  20159. <dd><p>tukey window
  20160. </p></dd>
  20161. </dl>
  20162. </dd>
  20163. <dt><samp class="option">fixed</samp></dt>
  20164. <dd><p>If enabled, use fixed number of audio samples. This improves speed when
  20165. filtering with large delay. Default is disabled.
  20166. </p>
  20167. </dd>
  20168. <dt><samp class="option">multi</samp></dt>
  20169. <dd><p>Enable multichannels evaluation on gain. Default is disabled.
  20170. </p>
  20171. </dd>
  20172. <dt><samp class="option">zero_phase</samp></dt>
  20173. <dd><p>Enable zero phase mode by subtracting timestamp to compensate delay.
  20174. Default is disabled.
  20175. </p>
  20176. </dd>
  20177. <dt><samp class="option">scale</samp></dt>
  20178. <dd><p>Set scale used by gain. Acceptable values are:
  20179. </p><dl class="table">
  20180. <dt><samp class="option">linlin</samp></dt>
  20181. <dd><p>linear frequency, linear gain
  20182. </p></dd>
  20183. <dt><samp class="option">linlog</samp></dt>
  20184. <dd><p>linear frequency, logarithmic (in dB) gain (default)
  20185. </p></dd>
  20186. <dt><samp class="option">loglin</samp></dt>
  20187. <dd><p>logarithmic (in octave scale where 20 Hz is 0) frequency, linear gain
  20188. </p></dd>
  20189. <dt><samp class="option">loglog</samp></dt>
  20190. <dd><p>logarithmic frequency, logarithmic gain
  20191. </p></dd>
  20192. </dl>
  20193. </dd>
  20194. <dt><samp class="option">dumpfile</samp></dt>
  20195. <dd><p>Set file for dumping, suitable for gnuplot.
  20196. </p>
  20197. </dd>
  20198. <dt><samp class="option">dumpscale</samp></dt>
  20199. <dd><p>Set scale for dumpfile. Acceptable values are same with scale option.
  20200. Default is linlog.
  20201. </p>
  20202. </dd>
  20203. <dt><samp class="option">fft2</samp></dt>
  20204. <dd><p>Enable 2-channel convolution using complex FFT. This improves speed significantly.
  20205. Default is disabled.
  20206. </p>
  20207. </dd>
  20208. <dt><samp class="option">min_phase</samp></dt>
  20209. <dd><p>Enable minimum phase impulse response. Default is disabled.
  20210. </p></dd>
  20211. </dl>
  20212. <ul class="mini-toc">
  20213. <li><a href="#Examples-41" accesskey="1">Examples</a></li>
  20214. </ul>
  20215. <div class="subsection-level-extent" id="Examples-41">
  20216. <h4 class="subsection"><span>29.89.1 Examples<a class="copiable-link" href="#Examples-41"> &para;</a></span></h4>
  20217. <ul class="itemize mark-bullet">
  20218. <li>lowpass at 1000 Hz:
  20219. <div class="example">
  20220. <pre class="example-preformatted">firequalizer=gain='if(lt(f,1000), 0, -INF)'
  20221. </pre></div>
  20222. </li><li>lowpass at 1000 Hz with gain_entry:
  20223. <div class="example">
  20224. <pre class="example-preformatted">firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
  20225. </pre></div>
  20226. </li><li>custom equalization:
  20227. <div class="example">
  20228. <pre class="example-preformatted">firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
  20229. </pre></div>
  20230. </li><li>higher delay with zero phase to compensate delay:
  20231. <div class="example">
  20232. <pre class="example-preformatted">firequalizer=delay=0.1:fixed=on:zero_phase=on
  20233. </pre></div>
  20234. </li><li>lowpass on left channel, highpass on right channel:
  20235. <div class="example">
  20236. <pre class="example-preformatted">firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
  20237. :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
  20238. </pre></div>
  20239. </li></ul>
  20240. </div>
  20241. </div>
  20242. <div class="section-level-extent" id="flanger">
  20243. <h3 class="section"><span>29.90 flanger<a class="copiable-link" href="#flanger"> &para;</a></span></h3>
  20244. <p>Apply a flanging effect to the audio.
  20245. </p>
  20246. <p>The filter accepts the following options:
  20247. </p>
  20248. <dl class="table">
  20249. <dt><samp class="option">delay</samp></dt>
  20250. <dd><p>Set base delay in milliseconds. Range from 0 to 30. Default value is 0.
  20251. </p>
  20252. </dd>
  20253. <dt><samp class="option">depth</samp></dt>
  20254. <dd><p>Set added sweep delay in milliseconds. Range from 0 to 10. Default value is 2.
  20255. </p>
  20256. </dd>
  20257. <dt><samp class="option">regen</samp></dt>
  20258. <dd><p>Set percentage regeneration (delayed signal feedback). Range from -95 to 95.
  20259. Default value is 0.
  20260. </p>
  20261. </dd>
  20262. <dt><samp class="option">width</samp></dt>
  20263. <dd><p>Set percentage of delayed signal mixed with original. Range from 0 to 100.
  20264. Default value is 71.
  20265. </p>
  20266. </dd>
  20267. <dt><samp class="option">speed</samp></dt>
  20268. <dd><p>Set sweeps per second (Hz). Range from 0.1 to 10. Default value is 0.5.
  20269. </p>
  20270. </dd>
  20271. <dt><samp class="option">shape</samp></dt>
  20272. <dd><p>Set swept wave shape, can be <var class="var">triangular</var> or <var class="var">sinusoidal</var>.
  20273. Default value is <var class="var">sinusoidal</var>.
  20274. </p>
  20275. </dd>
  20276. <dt><samp class="option">phase</samp></dt>
  20277. <dd><p>Set swept wave percentage-shift for multi channel. Range from 0 to 100.
  20278. Default value is 25.
  20279. </p>
  20280. </dd>
  20281. <dt><samp class="option">interp</samp></dt>
  20282. <dd><p>Set delay-line interpolation, <var class="var">linear</var> or <var class="var">quadratic</var>.
  20283. Default is <var class="var">linear</var>.
  20284. </p></dd>
  20285. </dl>
  20286. </div>
  20287. <div class="section-level-extent" id="haas">
  20288. <h3 class="section"><span>29.91 haas<a class="copiable-link" href="#haas"> &para;</a></span></h3>
  20289. <p>Apply Haas effect to audio.
  20290. </p>
  20291. <p>Note that this makes most sense to apply on mono signals.
  20292. With this filter applied to mono signals it give some directionality and
  20293. stretches its stereo image.
  20294. </p>
  20295. <p>The filter accepts the following options:
  20296. </p>
  20297. <dl class="table">
  20298. <dt><samp class="option">level_in</samp></dt>
  20299. <dd><p>Set input level. By default is <var class="var">1</var>, or 0dB
  20300. </p>
  20301. </dd>
  20302. <dt><samp class="option">level_out</samp></dt>
  20303. <dd><p>Set output level. By default is <var class="var">1</var>, or 0dB.
  20304. </p>
  20305. </dd>
  20306. <dt><samp class="option">side_gain</samp></dt>
  20307. <dd><p>Set gain applied to side part of signal. By default is <var class="var">1</var>.
  20308. </p>
  20309. </dd>
  20310. <dt><samp class="option">middle_source</samp></dt>
  20311. <dd><p>Set kind of middle source. Can be one of the following:
  20312. </p>
  20313. <dl class="table">
  20314. <dt>&lsquo;<samp class="samp">left</samp>&rsquo;</dt>
  20315. <dd><p>Pick left channel.
  20316. </p>
  20317. </dd>
  20318. <dt>&lsquo;<samp class="samp">right</samp>&rsquo;</dt>
  20319. <dd><p>Pick right channel.
  20320. </p>
  20321. </dd>
  20322. <dt>&lsquo;<samp class="samp">mid</samp>&rsquo;</dt>
  20323. <dd><p>Pick middle part signal of stereo image.
  20324. </p>
  20325. </dd>
  20326. <dt>&lsquo;<samp class="samp">side</samp>&rsquo;</dt>
  20327. <dd><p>Pick side part signal of stereo image.
  20328. </p></dd>
  20329. </dl>
  20330. </dd>
  20331. <dt><samp class="option">middle_phase</samp></dt>
  20332. <dd><p>Change middle phase. By default is disabled.
  20333. </p>
  20334. </dd>
  20335. <dt><samp class="option">left_delay</samp></dt>
  20336. <dd><p>Set left channel delay. By default is <var class="var">2.05</var> milliseconds.
  20337. </p>
  20338. </dd>
  20339. <dt><samp class="option">left_balance</samp></dt>
  20340. <dd><p>Set left channel balance. By default is <var class="var">-1</var>.
  20341. </p>
  20342. </dd>
  20343. <dt><samp class="option">left_gain</samp></dt>
  20344. <dd><p>Set left channel gain. By default is <var class="var">1</var>.
  20345. </p>
  20346. </dd>
  20347. <dt><samp class="option">left_phase</samp></dt>
  20348. <dd><p>Change left phase. By default is disabled.
  20349. </p>
  20350. </dd>
  20351. <dt><samp class="option">right_delay</samp></dt>
  20352. <dd><p>Set right channel delay. By defaults is <var class="var">2.12</var> milliseconds.
  20353. </p>
  20354. </dd>
  20355. <dt><samp class="option">right_balance</samp></dt>
  20356. <dd><p>Set right channel balance. By default is <var class="var">1</var>.
  20357. </p>
  20358. </dd>
  20359. <dt><samp class="option">right_gain</samp></dt>
  20360. <dd><p>Set right channel gain. By default is <var class="var">1</var>.
  20361. </p>
  20362. </dd>
  20363. <dt><samp class="option">right_phase</samp></dt>
  20364. <dd><p>Change right phase. By default is enabled.
  20365. </p></dd>
  20366. </dl>
  20367. </div>
  20368. <div class="section-level-extent" id="hdcd">
  20369. <h3 class="section"><span>29.92 hdcd<a class="copiable-link" href="#hdcd"> &para;</a></span></h3>
  20370. <p>Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with
  20371. embedded HDCD codes is expanded into a 20-bit PCM stream.
  20372. </p>
  20373. <p>The filter supports the Peak Extend and Low-level Gain Adjustment features
  20374. of HDCD, and detects the Transient Filter flag.
  20375. </p>
  20376. <div class="example">
  20377. <pre class="example-preformatted">ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
  20378. </pre></div>
  20379. <p>When using the filter with wav, note the default encoding for wav is 16-bit,
  20380. so the resulting 20-bit stream will be truncated back to 16-bit. Use something
  20381. like <code class="command">-acodec pcm_s24le</code> after the filter to get 24-bit PCM output.
  20382. </p><div class="example">
  20383. <pre class="example-preformatted">ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
  20384. ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
  20385. </pre></div>
  20386. <p>The filter accepts the following options:
  20387. </p>
  20388. <dl class="table">
  20389. <dt><samp class="option">disable_autoconvert</samp></dt>
  20390. <dd><p>Disable any automatic format conversion or resampling in the filter graph.
  20391. </p>
  20392. </dd>
  20393. <dt><samp class="option">process_stereo</samp></dt>
  20394. <dd><p>Process the stereo channels together. If target_gain does not match between
  20395. channels, consider it invalid and use the last valid target_gain.
  20396. </p>
  20397. </dd>
  20398. <dt><samp class="option">cdt_ms</samp></dt>
  20399. <dd><p>Set the code detect timer period in ms.
  20400. </p>
  20401. </dd>
  20402. <dt><samp class="option">force_pe</samp></dt>
  20403. <dd><p>Always extend peaks above -3dBFS even if PE isn&rsquo;t signaled.
  20404. </p>
  20405. </dd>
  20406. <dt><samp class="option">analyze_mode</samp></dt>
  20407. <dd><p>Replace audio with a solid tone and adjust the amplitude to signal some
  20408. specific aspect of the decoding process. The output file can be loaded in
  20409. an audio editor alongside the original to aid analysis.
  20410. </p>
  20411. <p><code class="code">analyze_mode=pe:force_pe=true</code> can be used to see all samples above the PE level.
  20412. </p>
  20413. <p>Modes are:
  20414. </p><dl class="table">
  20415. <dt>&lsquo;<samp class="samp">0, off</samp>&rsquo;</dt>
  20416. <dd><p>Disabled
  20417. </p></dd>
  20418. <dt>&lsquo;<samp class="samp">1, lle</samp>&rsquo;</dt>
  20419. <dd><p>Gain adjustment level at each sample
  20420. </p></dd>
  20421. <dt>&lsquo;<samp class="samp">2, pe</samp>&rsquo;</dt>
  20422. <dd><p>Samples where peak extend occurs
  20423. </p></dd>
  20424. <dt>&lsquo;<samp class="samp">3, cdt</samp>&rsquo;</dt>
  20425. <dd><p>Samples where the code detect timer is active
  20426. </p></dd>
  20427. <dt>&lsquo;<samp class="samp">4, tgm</samp>&rsquo;</dt>
  20428. <dd><p>Samples where the target gain does not match between channels
  20429. </p></dd>
  20430. </dl>
  20431. </dd>
  20432. </dl>
  20433. </div>
  20434. <div class="section-level-extent" id="headphone">
  20435. <h3 class="section"><span>29.93 headphone<a class="copiable-link" href="#headphone"> &para;</a></span></h3>
  20436. <p>Apply head-related transfer functions (HRTFs) to create virtual
  20437. loudspeakers around the user for binaural listening via headphones.
  20438. The HRIRs are provided via additional streams, for each channel
  20439. one stereo input stream is needed.
  20440. </p>
  20441. <p>The filter accepts the following options:
  20442. </p>
  20443. <dl class="table">
  20444. <dt><samp class="option">map</samp></dt>
  20445. <dd><p>Set mapping of input streams for convolution.
  20446. The argument is a &rsquo;|&rsquo;-separated list of channel names in order as they
  20447. are given as additional stream inputs for filter.
  20448. This also specify number of input streams. Number of input streams
  20449. must be not less than number of channels in first stream plus one.
  20450. </p>
  20451. </dd>
  20452. <dt><samp class="option">gain</samp></dt>
  20453. <dd><p>Set gain applied to audio. Value is in dB. Default is 0.
  20454. </p>
  20455. </dd>
  20456. <dt><samp class="option">type</samp></dt>
  20457. <dd><p>Set processing type. Can be <var class="var">time</var> or <var class="var">freq</var>. <var class="var">time</var> is
  20458. processing audio in time domain which is slow.
  20459. <var class="var">freq</var> is processing audio in frequency domain which is fast.
  20460. Default is <var class="var">freq</var>.
  20461. </p>
  20462. </dd>
  20463. <dt><samp class="option">lfe</samp></dt>
  20464. <dd><p>Set custom gain for LFE channels. Value is in dB. Default is 0.
  20465. </p>
  20466. </dd>
  20467. <dt><samp class="option">size</samp></dt>
  20468. <dd><p>Set size of frame in number of samples which will be processed at once.
  20469. Default value is <var class="var">1024</var>. Allowed range is from 1024 to 96000.
  20470. </p>
  20471. </dd>
  20472. <dt><samp class="option">hrir</samp></dt>
  20473. <dd><p>Set format of hrir stream.
  20474. Default value is <var class="var">stereo</var>. Alternative value is <var class="var">multich</var>.
  20475. If value is set to <var class="var">stereo</var>, number of additional streams should
  20476. be greater or equal to number of input channels in first input stream.
  20477. Also each additional stream should have stereo number of channels.
  20478. If value is set to <var class="var">multich</var>, number of additional streams should
  20479. be exactly one. Also number of input channels of additional stream
  20480. should be equal or greater than twice number of channels of first input
  20481. stream.
  20482. </p></dd>
  20483. </dl>
  20484. <ul class="mini-toc">
  20485. <li><a href="#Examples-42" accesskey="1">Examples</a></li>
  20486. </ul>
  20487. <div class="subsection-level-extent" id="Examples-42">
  20488. <h4 class="subsection"><span>29.93.1 Examples<a class="copiable-link" href="#Examples-42"> &para;</a></span></h4>
  20489. <ul class="itemize mark-bullet">
  20490. <li>Full example using wav files as coefficients with amovie filters for 7.1 downmix,
  20491. each amovie filter use stereo file with IR coefficients as input.
  20492. The files give coefficients for each position of virtual loudspeaker:
  20493. <div class="example">
  20494. <pre class="example-preformatted">ffmpeg -i input.wav
  20495. -filter_complex &quot;amovie=azi_270_ele_0_DFC.wav[sr];amovie=azi_90_ele_0_DFC.wav[sl];amovie=azi_225_ele_0_DFC.wav[br];amovie=azi_135_ele_0_DFC.wav[bl];amovie=azi_0_ele_0_DFC.wav,asplit[fc][lfe];amovie=azi_35_ele_0_DFC.wav[fl];amovie=azi_325_ele_0_DFC.wav[fr];[0:a][fl][fr][fc][lfe][bl][br][sl][sr]headphone=FL|FR|FC|LFE|BL|BR|SL|SR&quot;
  20496. output.wav
  20497. </pre></div>
  20498. </li><li>Full example using wav files as coefficients with amovie filters for 7.1 downmix,
  20499. but now in <var class="var">multich</var> <var class="var">hrir</var> format.
  20500. <div class="example">
  20501. <pre class="example-preformatted">ffmpeg -i input.wav -filter_complex &quot;amovie=minp.wav[hrirs];[0:a][hrirs]headphone=map=FL|FR|FC|LFE|BL|BR|SL|SR:hrir=multich&quot;
  20502. output.wav
  20503. </pre></div>
  20504. </li></ul>
  20505. </div>
  20506. </div>
  20507. <div class="section-level-extent" id="highpass">
  20508. <h3 class="section"><span>29.94 highpass<a class="copiable-link" href="#highpass"> &para;</a></span></h3>
  20509. <p>Apply a high-pass filter with 3dB point frequency.
  20510. The filter can be either single-pole, or double-pole (the default).
  20511. The filter roll off at 6dB per pole per octave (20dB per pole per decade).
  20512. </p>
  20513. <p>The filter accepts the following options:
  20514. </p>
  20515. <dl class="table">
  20516. <dt><samp class="option">frequency, f</samp></dt>
  20517. <dd><p>Set frequency in Hz. Default is 3000.
  20518. </p>
  20519. </dd>
  20520. <dt><samp class="option">poles, p</samp></dt>
  20521. <dd><p>Set number of poles. Default is 2.
  20522. </p>
  20523. </dd>
  20524. <dt><samp class="option">width_type, t</samp></dt>
  20525. <dd><p>Set method to specify band-width of filter.
  20526. </p><dl class="table">
  20527. <dt><samp class="option">h</samp></dt>
  20528. <dd><p>Hz
  20529. </p></dd>
  20530. <dt><samp class="option">q</samp></dt>
  20531. <dd><p>Q-Factor
  20532. </p></dd>
  20533. <dt><samp class="option">o</samp></dt>
  20534. <dd><p>octave
  20535. </p></dd>
  20536. <dt><samp class="option">s</samp></dt>
  20537. <dd><p>slope
  20538. </p></dd>
  20539. <dt><samp class="option">k</samp></dt>
  20540. <dd><p>kHz
  20541. </p></dd>
  20542. </dl>
  20543. </dd>
  20544. <dt><samp class="option">width, w</samp></dt>
  20545. <dd><p>Specify the band-width of a filter in width_type units.
  20546. Applies only to double-pole filter.
  20547. The default is 0.707q and gives a Butterworth response.
  20548. </p>
  20549. </dd>
  20550. <dt><samp class="option">mix, m</samp></dt>
  20551. <dd><p>How much to use filtered signal in output. Default is 1.
  20552. Range is between 0 and 1.
  20553. </p>
  20554. </dd>
  20555. <dt><samp class="option">channels, c</samp></dt>
  20556. <dd><p>Specify which channels to filter, by default all available are filtered.
  20557. </p>
  20558. </dd>
  20559. <dt><samp class="option">normalize, n</samp></dt>
  20560. <dd><p>Normalize biquad coefficients, by default is disabled.
  20561. Enabling it will normalize magnitude response at DC to 0dB.
  20562. </p>
  20563. </dd>
  20564. <dt><samp class="option">transform, a</samp></dt>
  20565. <dd><p>Set transform type of IIR filter.
  20566. </p><dl class="table">
  20567. <dt><samp class="option">di</samp></dt>
  20568. <dt><samp class="option">dii</samp></dt>
  20569. <dt><samp class="option">tdi</samp></dt>
  20570. <dt><samp class="option">tdii</samp></dt>
  20571. <dt><samp class="option">latt</samp></dt>
  20572. <dt><samp class="option">svf</samp></dt>
  20573. <dt><samp class="option">zdf</samp></dt>
  20574. </dl>
  20575. </dd>
  20576. <dt><samp class="option">precision, r</samp></dt>
  20577. <dd><p>Set precision of filtering.
  20578. </p><dl class="table">
  20579. <dt><samp class="option">auto</samp></dt>
  20580. <dd><p>Pick automatic sample format depending on surround filters.
  20581. </p></dd>
  20582. <dt><samp class="option">s16</samp></dt>
  20583. <dd><p>Always use signed 16-bit.
  20584. </p></dd>
  20585. <dt><samp class="option">s32</samp></dt>
  20586. <dd><p>Always use signed 32-bit.
  20587. </p></dd>
  20588. <dt><samp class="option">f32</samp></dt>
  20589. <dd><p>Always use float 32-bit.
  20590. </p></dd>
  20591. <dt><samp class="option">f64</samp></dt>
  20592. <dd><p>Always use float 64-bit.
  20593. </p></dd>
  20594. </dl>
  20595. </dd>
  20596. <dt><samp class="option">block_size, b</samp></dt>
  20597. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  20598. value (higher than impulse response length truncated when reaches near zero values) filtering
  20599. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  20600. </p>
  20601. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  20602. </p></dd>
  20603. </dl>
  20604. <ul class="mini-toc">
  20605. <li><a href="#Commands-40" accesskey="1">Commands</a></li>
  20606. </ul>
  20607. <div class="subsection-level-extent" id="Commands-40">
  20608. <h4 class="subsection"><span>29.94.1 Commands<a class="copiable-link" href="#Commands-40"> &para;</a></span></h4>
  20609. <p>This filter supports the following commands:
  20610. </p><dl class="table">
  20611. <dt><samp class="option">frequency, f</samp></dt>
  20612. <dd><p>Change highpass frequency.
  20613. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  20614. </p>
  20615. </dd>
  20616. <dt><samp class="option">width_type, t</samp></dt>
  20617. <dd><p>Change highpass width_type.
  20618. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  20619. </p>
  20620. </dd>
  20621. <dt><samp class="option">width, w</samp></dt>
  20622. <dd><p>Change highpass width.
  20623. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  20624. </p>
  20625. </dd>
  20626. <dt><samp class="option">mix, m</samp></dt>
  20627. <dd><p>Change highpass mix.
  20628. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  20629. </p></dd>
  20630. </dl>
  20631. </div>
  20632. </div>
  20633. <div class="section-level-extent" id="join">
  20634. <h3 class="section"><span>29.95 join<a class="copiable-link" href="#join"> &para;</a></span></h3>
  20635. <p>Join multiple input streams into one multi-channel stream.
  20636. </p>
  20637. <p>It accepts the following parameters:
  20638. </p><dl class="table">
  20639. <dt><samp class="option">inputs</samp></dt>
  20640. <dd><p>The number of input streams. It defaults to 2.
  20641. </p>
  20642. </dd>
  20643. <dt><samp class="option">channel_layout</samp></dt>
  20644. <dd><p>The desired output channel layout. It defaults to stereo.
  20645. </p>
  20646. </dd>
  20647. <dt><samp class="option">map</samp></dt>
  20648. <dd><p>Map channels from inputs to output. The argument is a &rsquo;|&rsquo;-separated list of
  20649. mappings, each in the <code class="code"><var class="var">input_idx</var>.<var class="var">in_channel</var>-<var class="var">out_channel</var></code>
  20650. form. <var class="var">input_idx</var> is the 0-based index of the input stream. <var class="var">in_channel</var>
  20651. can be either the name of the input channel (e.g. FL for front left) or its
  20652. index in the specified input stream. <var class="var">out_channel</var> is the name of the output
  20653. channel.
  20654. </p></dd>
  20655. </dl>
  20656. <p>The filter will attempt to guess the mappings when they are not specified
  20657. explicitly. It does so by first trying to find an unused matching input channel
  20658. and if that fails it picks the first unused input channel.
  20659. </p>
  20660. <p>Join 3 inputs (with properly set channel layouts):
  20661. </p><div class="example">
  20662. <pre class="example-preformatted">ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
  20663. </pre></div>
  20664. <p>Build a 5.1 output from 6 single-channel streams:
  20665. </p><div class="example">
  20666. <pre class="example-preformatted">ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
  20667. 'join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-SL|4.0-SR|5.0-LFE'
  20668. out
  20669. </pre></div>
  20670. </div>
  20671. <div class="section-level-extent" id="ladspa">
  20672. <h3 class="section"><span>29.96 ladspa<a class="copiable-link" href="#ladspa"> &para;</a></span></h3>
  20673. <p>Load a LADSPA (Linux Audio Developer&rsquo;s Simple Plugin API) plugin.
  20674. </p>
  20675. <p>To enable compilation of this filter you need to configure FFmpeg with
  20676. <code class="code">--enable-ladspa</code>.
  20677. </p>
  20678. <dl class="table">
  20679. <dt><samp class="option">file, f</samp></dt>
  20680. <dd><p>Specifies the name of LADSPA plugin library to load. If the environment
  20681. variable <code class="env">LADSPA_PATH</code> is defined, the LADSPA plugin is searched in
  20682. each one of the directories specified by the colon separated list in
  20683. <code class="env">LADSPA_PATH</code>, otherwise in the standard LADSPA paths, which are in
  20684. this order: <samp class="file">HOME/.ladspa/lib/</samp>, <samp class="file">/usr/local/lib/ladspa/</samp>,
  20685. <samp class="file">/usr/lib/ladspa/</samp>.
  20686. </p>
  20687. </dd>
  20688. <dt><samp class="option">plugin, p</samp></dt>
  20689. <dd><p>Specifies the plugin within the library. Some libraries contain only
  20690. one plugin, but others contain many of them. If this is not set filter
  20691. will list all available plugins within the specified library.
  20692. </p>
  20693. </dd>
  20694. <dt><samp class="option">controls, c</samp></dt>
  20695. <dd><p>Set the &rsquo;|&rsquo; separated list of controls which are zero or more floating point
  20696. values that determine the behavior of the loaded plugin (for example delay,
  20697. threshold or gain).
  20698. Controls need to be defined using the following syntax:
  20699. c0=<var class="var">value0</var>|c1=<var class="var">value1</var>|c2=<var class="var">value2</var>|..., where
  20700. <var class="var">valuei</var> is the value set on the <var class="var">i</var>-th control.
  20701. Alternatively they can be also defined using the following syntax:
  20702. <var class="var">value0</var>|<var class="var">value1</var>|<var class="var">value2</var>|..., where
  20703. <var class="var">valuei</var> is the value set on the <var class="var">i</var>-th control.
  20704. If <samp class="option">controls</samp> is set to <code class="code">help</code>, all available controls and
  20705. their valid ranges are printed.
  20706. </p>
  20707. </dd>
  20708. <dt><samp class="option">sample_rate, s</samp></dt>
  20709. <dd><p>Specify the sample rate, default to 44100. Only used if plugin have
  20710. zero inputs.
  20711. </p>
  20712. </dd>
  20713. <dt><samp class="option">nb_samples, n</samp></dt>
  20714. <dd><p>Set the number of samples per channel per each output frame, default
  20715. is 1024. Only used if plugin have zero inputs.
  20716. </p>
  20717. </dd>
  20718. <dt><samp class="option">duration, d</samp></dt>
  20719. <dd><p>Set the minimum duration of the sourced audio. See
  20720. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  20721. for the accepted syntax.
  20722. Note that the resulting duration may be greater than the specified duration,
  20723. as the generated audio is always cut at the end of a complete frame.
  20724. If not specified, or the expressed duration is negative, the audio is
  20725. supposed to be generated forever.
  20726. Only used if plugin have zero inputs.
  20727. </p>
  20728. </dd>
  20729. <dt><samp class="option">latency, l</samp></dt>
  20730. <dd><p>Enable latency compensation, by default is disabled.
  20731. Only used if plugin have inputs.
  20732. </p></dd>
  20733. </dl>
  20734. <ul class="mini-toc">
  20735. <li><a href="#Examples-43" accesskey="1">Examples</a></li>
  20736. <li><a href="#Commands-41" accesskey="2">Commands</a></li>
  20737. </ul>
  20738. <div class="subsection-level-extent" id="Examples-43">
  20739. <h4 class="subsection"><span>29.96.1 Examples<a class="copiable-link" href="#Examples-43"> &para;</a></span></h4>
  20740. <ul class="itemize mark-bullet">
  20741. <li>List all available plugins within amp (LADSPA example plugin) library:
  20742. <div class="example">
  20743. <pre class="example-preformatted">ladspa=file=amp
  20744. </pre></div>
  20745. </li><li>List all available controls and their valid ranges for <code class="code">vcf_notch</code>
  20746. plugin from <code class="code">VCF</code> library:
  20747. <div class="example">
  20748. <pre class="example-preformatted">ladspa=f=vcf:p=vcf_notch:c=help
  20749. </pre></div>
  20750. </li><li>Simulate low quality audio equipment using <code class="code">Computer Music Toolkit</code> (CMT)
  20751. plugin library:
  20752. <div class="example">
  20753. <pre class="example-preformatted">ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
  20754. </pre></div>
  20755. </li><li>Add reverberation to the audio using TAP-plugins
  20756. (Tom&rsquo;s Audio Processing plugins):
  20757. <div class="example">
  20758. <pre class="example-preformatted">ladspa=file=tap_reverb:tap_reverb
  20759. </pre></div>
  20760. </li><li>Generate white noise, with 0.2 amplitude:
  20761. <div class="example">
  20762. <pre class="example-preformatted">ladspa=file=cmt:noise_source_white:c=c0=.2
  20763. </pre></div>
  20764. </li><li>Generate 20 bpm clicks using plugin <code class="code">C* Click - Metronome</code> from the
  20765. <code class="code">C* Audio Plugin Suite</code> (CAPS) library:
  20766. <div class="example">
  20767. <pre class="example-preformatted">ladspa=file=caps:Click:c=c1=20'
  20768. </pre></div>
  20769. </li><li>Apply <code class="code">C* Eq10X2 - Stereo 10-band equaliser</code> effect:
  20770. <div class="example">
  20771. <pre class="example-preformatted">ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
  20772. </pre></div>
  20773. </li><li>Increase volume by 20dB using fast lookahead limiter from Steve Harris
  20774. <code class="code">SWH Plugins</code> collection:
  20775. <div class="example">
  20776. <pre class="example-preformatted">ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
  20777. </pre></div>
  20778. </li><li>Attenuate low frequencies using Multiband EQ from Steve Harris
  20779. <code class="code">SWH Plugins</code> collection:
  20780. <div class="example">
  20781. <pre class="example-preformatted">ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
  20782. </pre></div>
  20783. </li><li>Reduce stereo image using <code class="code">Narrower</code> from the <code class="code">C* Audio Plugin Suite</code>
  20784. (CAPS) library:
  20785. <div class="example">
  20786. <pre class="example-preformatted">ladspa=caps:Narrower
  20787. </pre></div>
  20788. </li><li>Another white noise, now using <code class="code">C* Audio Plugin Suite</code> (CAPS) library:
  20789. <div class="example">
  20790. <pre class="example-preformatted">ladspa=caps:White:.2
  20791. </pre></div>
  20792. </li><li>Some fractal noise, using <code class="code">C* Audio Plugin Suite</code> (CAPS) library:
  20793. <div class="example">
  20794. <pre class="example-preformatted">ladspa=caps:Fractal:c=c1=1
  20795. </pre></div>
  20796. </li><li>Dynamic volume normalization using <code class="code">VLevel</code> plugin:
  20797. <div class="example">
  20798. <pre class="example-preformatted">ladspa=vlevel-ladspa:vlevel_mono
  20799. </pre></div>
  20800. </li></ul>
  20801. </div>
  20802. <div class="subsection-level-extent" id="Commands-41">
  20803. <h4 class="subsection"><span>29.96.2 Commands<a class="copiable-link" href="#Commands-41"> &para;</a></span></h4>
  20804. <p>This filter supports the following commands:
  20805. </p><dl class="table">
  20806. <dt><samp class="option">cN</samp></dt>
  20807. <dd><p>Modify the <var class="var">N</var>-th control value.
  20808. </p>
  20809. <p>If the specified value is not valid, it is ignored and prior one is kept.
  20810. </p></dd>
  20811. </dl>
  20812. </div>
  20813. </div>
  20814. <div class="section-level-extent" id="loudnorm">
  20815. <h3 class="section"><span>29.97 loudnorm<a class="copiable-link" href="#loudnorm"> &para;</a></span></h3>
  20816. <p>EBU R128 loudness normalization. Includes both dynamic and linear normalization modes.
  20817. Support for both single pass (livestreams, files) and double pass (files) modes.
  20818. This algorithm can target IL, LRA, and maximum true peak. In dynamic mode, to accurately
  20819. detect true peaks, the audio stream will be upsampled to 192 kHz.
  20820. Use the <code class="code">-ar</code> option or <code class="code">aresample</code> filter to explicitly set an output sample rate.
  20821. </p>
  20822. <p>The filter accepts the following options:
  20823. </p>
  20824. <dl class="table">
  20825. <dt><samp class="option">I, i</samp></dt>
  20826. <dd><p>Set integrated loudness target.
  20827. Range is -70.0 - -5.0. Default value is -24.0.
  20828. </p>
  20829. </dd>
  20830. <dt><samp class="option">LRA, lra</samp></dt>
  20831. <dd><p>Set loudness range target.
  20832. Range is 1.0 - 50.0. Default value is 7.0.
  20833. </p>
  20834. </dd>
  20835. <dt><samp class="option">TP, tp</samp></dt>
  20836. <dd><p>Set maximum true peak.
  20837. Range is -9.0 - +0.0. Default value is -2.0.
  20838. </p>
  20839. </dd>
  20840. <dt><samp class="option">measured_I, measured_i</samp></dt>
  20841. <dd><p>Measured IL of input file.
  20842. Range is -99.0 - +0.0.
  20843. </p>
  20844. </dd>
  20845. <dt><samp class="option">measured_LRA, measured_lra</samp></dt>
  20846. <dd><p>Measured LRA of input file.
  20847. Range is 0.0 - 99.0.
  20848. </p>
  20849. </dd>
  20850. <dt><samp class="option">measured_TP, measured_tp</samp></dt>
  20851. <dd><p>Measured true peak of input file.
  20852. Range is -99.0 - +99.0.
  20853. </p>
  20854. </dd>
  20855. <dt><samp class="option">measured_thresh</samp></dt>
  20856. <dd><p>Measured threshold of input file.
  20857. Range is -99.0 - +0.0.
  20858. </p>
  20859. </dd>
  20860. <dt><samp class="option">offset</samp></dt>
  20861. <dd><p>Set offset gain. Gain is applied before the true-peak limiter.
  20862. Range is -99.0 - +99.0. Default is +0.0.
  20863. </p>
  20864. </dd>
  20865. <dt><samp class="option">linear</samp></dt>
  20866. <dd><p>Normalize by linearly scaling the source audio.
  20867. <code class="code">measured_I</code>, <code class="code">measured_LRA</code>, <code class="code">measured_TP</code>,
  20868. and <code class="code">measured_thresh</code> must all be specified. Target LRA shouldn&rsquo;t
  20869. be lower than source LRA and the change in integrated loudness shouldn&rsquo;t
  20870. result in a true peak which exceeds the target TP. If any of these
  20871. conditions aren&rsquo;t met, normalization mode will revert to <var class="var">dynamic</var>.
  20872. Options are <code class="code">true</code> or <code class="code">false</code>. Default is <code class="code">true</code>.
  20873. </p>
  20874. </dd>
  20875. <dt><samp class="option">dual_mono</samp></dt>
  20876. <dd><p>Treat mono input files as &quot;dual-mono&quot;. If a mono file is intended for playback
  20877. on a stereo system, its EBU R128 measurement will be perceptually incorrect.
  20878. If set to <code class="code">true</code>, this option will compensate for this effect.
  20879. Multi-channel input files are not affected by this option.
  20880. Options are true or false. Default is false.
  20881. </p>
  20882. </dd>
  20883. <dt><samp class="option">print_format</samp></dt>
  20884. <dd><p>Set print format for stats. Options are summary, json, or none.
  20885. Default value is none.
  20886. </p></dd>
  20887. </dl>
  20888. </div>
  20889. <div class="section-level-extent" id="lowpass">
  20890. <h3 class="section"><span>29.98 lowpass<a class="copiable-link" href="#lowpass"> &para;</a></span></h3>
  20891. <p>Apply a low-pass filter with 3dB point frequency.
  20892. The filter can be either single-pole or double-pole (the default).
  20893. The filter roll off at 6dB per pole per octave (20dB per pole per decade).
  20894. </p>
  20895. <p>The filter accepts the following options:
  20896. </p>
  20897. <dl class="table">
  20898. <dt><samp class="option">frequency, f</samp></dt>
  20899. <dd><p>Set frequency in Hz. Default is 500.
  20900. </p>
  20901. </dd>
  20902. <dt><samp class="option">poles, p</samp></dt>
  20903. <dd><p>Set number of poles. Default is 2.
  20904. </p>
  20905. </dd>
  20906. <dt><samp class="option">width_type, t</samp></dt>
  20907. <dd><p>Set method to specify band-width of filter.
  20908. </p><dl class="table">
  20909. <dt><samp class="option">h</samp></dt>
  20910. <dd><p>Hz
  20911. </p></dd>
  20912. <dt><samp class="option">q</samp></dt>
  20913. <dd><p>Q-Factor
  20914. </p></dd>
  20915. <dt><samp class="option">o</samp></dt>
  20916. <dd><p>octave
  20917. </p></dd>
  20918. <dt><samp class="option">s</samp></dt>
  20919. <dd><p>slope
  20920. </p></dd>
  20921. <dt><samp class="option">k</samp></dt>
  20922. <dd><p>kHz
  20923. </p></dd>
  20924. </dl>
  20925. </dd>
  20926. <dt><samp class="option">width, w</samp></dt>
  20927. <dd><p>Specify the band-width of a filter in width_type units.
  20928. Applies only to double-pole filter.
  20929. The default is 0.707q and gives a Butterworth response.
  20930. </p>
  20931. </dd>
  20932. <dt><samp class="option">mix, m</samp></dt>
  20933. <dd><p>How much to use filtered signal in output. Default is 1.
  20934. Range is between 0 and 1.
  20935. </p>
  20936. </dd>
  20937. <dt><samp class="option">channels, c</samp></dt>
  20938. <dd><p>Specify which channels to filter, by default all available are filtered.
  20939. </p>
  20940. </dd>
  20941. <dt><samp class="option">normalize, n</samp></dt>
  20942. <dd><p>Normalize biquad coefficients, by default is disabled.
  20943. Enabling it will normalize magnitude response at DC to 0dB.
  20944. </p>
  20945. </dd>
  20946. <dt><samp class="option">transform, a</samp></dt>
  20947. <dd><p>Set transform type of IIR filter.
  20948. </p><dl class="table">
  20949. <dt><samp class="option">di</samp></dt>
  20950. <dt><samp class="option">dii</samp></dt>
  20951. <dt><samp class="option">tdi</samp></dt>
  20952. <dt><samp class="option">tdii</samp></dt>
  20953. <dt><samp class="option">latt</samp></dt>
  20954. <dt><samp class="option">svf</samp></dt>
  20955. <dt><samp class="option">zdf</samp></dt>
  20956. </dl>
  20957. </dd>
  20958. <dt><samp class="option">precision, r</samp></dt>
  20959. <dd><p>Set precision of filtering.
  20960. </p><dl class="table">
  20961. <dt><samp class="option">auto</samp></dt>
  20962. <dd><p>Pick automatic sample format depending on surround filters.
  20963. </p></dd>
  20964. <dt><samp class="option">s16</samp></dt>
  20965. <dd><p>Always use signed 16-bit.
  20966. </p></dd>
  20967. <dt><samp class="option">s32</samp></dt>
  20968. <dd><p>Always use signed 32-bit.
  20969. </p></dd>
  20970. <dt><samp class="option">f32</samp></dt>
  20971. <dd><p>Always use float 32-bit.
  20972. </p></dd>
  20973. <dt><samp class="option">f64</samp></dt>
  20974. <dd><p>Always use float 64-bit.
  20975. </p></dd>
  20976. </dl>
  20977. </dd>
  20978. <dt><samp class="option">block_size, b</samp></dt>
  20979. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  20980. value (higher than impulse response length truncated when reaches near zero values) filtering
  20981. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  20982. </p>
  20983. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  20984. </p></dd>
  20985. </dl>
  20986. <ul class="mini-toc">
  20987. <li><a href="#Examples-44" accesskey="1">Examples</a></li>
  20988. <li><a href="#Commands-42" accesskey="2">Commands</a></li>
  20989. </ul>
  20990. <div class="subsection-level-extent" id="Examples-44">
  20991. <h4 class="subsection"><span>29.98.1 Examples<a class="copiable-link" href="#Examples-44"> &para;</a></span></h4>
  20992. <ul class="itemize mark-bullet">
  20993. <li>Lowpass only LFE channel, it LFE is not present it does nothing:
  20994. <div class="example">
  20995. <pre class="example-preformatted">lowpass=c=LFE
  20996. </pre></div>
  20997. </li></ul>
  20998. </div>
  20999. <div class="subsection-level-extent" id="Commands-42">
  21000. <h4 class="subsection"><span>29.98.2 Commands<a class="copiable-link" href="#Commands-42"> &para;</a></span></h4>
  21001. <p>This filter supports the following commands:
  21002. </p><dl class="table">
  21003. <dt><samp class="option">frequency, f</samp></dt>
  21004. <dd><p>Change lowpass frequency.
  21005. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  21006. </p>
  21007. </dd>
  21008. <dt><samp class="option">width_type, t</samp></dt>
  21009. <dd><p>Change lowpass width_type.
  21010. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  21011. </p>
  21012. </dd>
  21013. <dt><samp class="option">width, w</samp></dt>
  21014. <dd><p>Change lowpass width.
  21015. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  21016. </p>
  21017. </dd>
  21018. <dt><samp class="option">mix, m</samp></dt>
  21019. <dd><p>Change lowpass mix.
  21020. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  21021. </p></dd>
  21022. </dl>
  21023. </div>
  21024. </div>
  21025. <div class="section-level-extent" id="lv2">
  21026. <h3 class="section"><span>29.99 lv2<a class="copiable-link" href="#lv2"> &para;</a></span></h3>
  21027. <p>Load a LV2 (LADSPA Version 2) plugin.
  21028. </p>
  21029. <p>To enable compilation of this filter you need to configure FFmpeg with
  21030. <code class="code">--enable-lv2</code>.
  21031. </p>
  21032. <dl class="table">
  21033. <dt><samp class="option">plugin, p</samp></dt>
  21034. <dd><p>Specifies the plugin URI. You may need to escape &rsquo;:&rsquo;.
  21035. </p>
  21036. </dd>
  21037. <dt><samp class="option">controls, c</samp></dt>
  21038. <dd><p>Set the &rsquo;|&rsquo; separated list of controls which are zero or more floating point
  21039. values that determine the behavior of the loaded plugin (for example delay,
  21040. threshold or gain).
  21041. If <samp class="option">controls</samp> is set to <code class="code">help</code>, all available controls and
  21042. their valid ranges are printed.
  21043. </p>
  21044. </dd>
  21045. <dt><samp class="option">sample_rate, s</samp></dt>
  21046. <dd><p>Specify the sample rate, default to 44100. Only used if plugin have
  21047. zero inputs.
  21048. </p>
  21049. </dd>
  21050. <dt><samp class="option">nb_samples, n</samp></dt>
  21051. <dd><p>Set the number of samples per channel per each output frame, default
  21052. is 1024. Only used if plugin have zero inputs.
  21053. </p>
  21054. </dd>
  21055. <dt><samp class="option">duration, d</samp></dt>
  21056. <dd><p>Set the minimum duration of the sourced audio. See
  21057. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  21058. for the accepted syntax.
  21059. Note that the resulting duration may be greater than the specified duration,
  21060. as the generated audio is always cut at the end of a complete frame.
  21061. If not specified, or the expressed duration is negative, the audio is
  21062. supposed to be generated forever.
  21063. Only used if plugin have zero inputs.
  21064. </p></dd>
  21065. </dl>
  21066. <ul class="mini-toc">
  21067. <li><a href="#Examples-45" accesskey="1">Examples</a></li>
  21068. <li><a href="#Commands-43" accesskey="2">Commands</a></li>
  21069. </ul>
  21070. <div class="subsection-level-extent" id="Examples-45">
  21071. <h4 class="subsection"><span>29.99.1 Examples<a class="copiable-link" href="#Examples-45"> &para;</a></span></h4>
  21072. <ul class="itemize mark-bullet">
  21073. <li>Apply bass enhancer plugin from Calf:
  21074. <div class="example">
  21075. <pre class="example-preformatted">lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
  21076. </pre></div>
  21077. </li><li>Apply vinyl plugin from Calf:
  21078. <div class="example">
  21079. <pre class="example-preformatted">lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
  21080. </pre></div>
  21081. </li><li>Apply bit crusher plugin from ArtyFX:
  21082. <div class="example">
  21083. <pre class="example-preformatted">lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
  21084. </pre></div>
  21085. </li></ul>
  21086. </div>
  21087. <div class="subsection-level-extent" id="Commands-43">
  21088. <h4 class="subsection"><span>29.99.2 Commands<a class="copiable-link" href="#Commands-43"> &para;</a></span></h4>
  21089. <p>This filter supports all options that are exported by plugin as commands.
  21090. </p>
  21091. </div>
  21092. </div>
  21093. <div class="section-level-extent" id="mcompand">
  21094. <h3 class="section"><span>29.100 mcompand<a class="copiable-link" href="#mcompand"> &para;</a></span></h3>
  21095. <p>Multiband Compress or expand the audio&rsquo;s dynamic range.
  21096. </p>
  21097. <p>The input audio is divided into bands using 4th order Linkwitz-Riley IIRs.
  21098. This is akin to the crossover of a loudspeaker, and results in flat frequency
  21099. response when absent compander action.
  21100. </p>
  21101. <p>It accepts the following parameters:
  21102. </p>
  21103. <dl class="table">
  21104. <dt><samp class="option">args</samp></dt>
  21105. <dd><p>This option syntax is:
  21106. attack,decay,[attack,decay..] soft-knee points crossover_frequency [delay [initial_volume [gain]]] | attack,decay ...
  21107. For explanation of each item refer to compand filter documentation.
  21108. </p></dd>
  21109. </dl>
  21110. <a class="anchor" id="pan"></a></div>
  21111. <div class="section-level-extent" id="pan-1">
  21112. <h3 class="section"><span>29.101 pan<a class="copiable-link" href="#pan-1"> &para;</a></span></h3>
  21113. <p>Mix channels with specific gain levels. The filter accepts the output
  21114. channel layout followed by a set of channels definitions.
  21115. </p>
  21116. <p>This filter is also designed to efficiently remap the channels of an audio
  21117. stream.
  21118. </p>
  21119. <p>The filter accepts parameters of the form:
  21120. &quot;<var class="var">l</var>|<var class="var">outdef</var>|<var class="var">outdef</var>|...&quot;
  21121. </p>
  21122. <dl class="table">
  21123. <dt><samp class="option">l</samp></dt>
  21124. <dd><p>output channel layout or number of channels
  21125. </p>
  21126. </dd>
  21127. <dt><samp class="option">outdef</samp></dt>
  21128. <dd><p>output channel specification, of the form:
  21129. &quot;<var class="var">out_name</var>=[<var class="var">gain</var>*]<var class="var">in_name</var>[(+-)[<var class="var">gain</var>*]<var class="var">in_name</var>...]&quot;
  21130. </p>
  21131. </dd>
  21132. <dt><samp class="option">out_name</samp></dt>
  21133. <dd><p>output channel to define, either a channel name (FL, FR, etc.) or a channel
  21134. number (c0, c1, etc.)
  21135. </p>
  21136. </dd>
  21137. <dt><samp class="option">gain</samp></dt>
  21138. <dd><p>multiplicative coefficient for the channel, 1 leaving the volume unchanged
  21139. </p>
  21140. </dd>
  21141. <dt><samp class="option">in_name</samp></dt>
  21142. <dd><p>input channel to use, see out_name for details; it is not possible to mix
  21143. named and numbered input channels
  21144. </p></dd>
  21145. </dl>
  21146. <p>If the &lsquo;=&rsquo; in a channel specification is replaced by &lsquo;&lt;&rsquo;, then the gains for
  21147. that specification will be renormalized so that the total is 1, thus
  21148. avoiding clipping noise.
  21149. </p>
  21150. <ul class="mini-toc">
  21151. <li><a href="#Mixing-examples" accesskey="1">Mixing examples</a></li>
  21152. <li><a href="#Remapping-examples" accesskey="2">Remapping examples</a></li>
  21153. </ul>
  21154. <div class="subsection-level-extent" id="Mixing-examples">
  21155. <h4 class="subsection"><span>29.101.1 Mixing examples<a class="copiable-link" href="#Mixing-examples"> &para;</a></span></h4>
  21156. <p>For example, if you want to down-mix from stereo to mono, but with a bigger
  21157. factor for the left channel:
  21158. </p><div class="example">
  21159. <pre class="example-preformatted">pan=1c|c0=0.9*c0+0.1*c1
  21160. </pre></div>
  21161. <p>A customized down-mix to stereo that works automatically for 3-, 4-, 5- and
  21162. 7-channels surround:
  21163. </p><div class="example">
  21164. <pre class="example-preformatted">pan=stereo| FL &lt; FL + 0.5*FC + 0.6*BL + 0.6*SL | FR &lt; FR + 0.5*FC + 0.6*BR + 0.6*SR
  21165. </pre></div>
  21166. <p>Note that <code class="command">ffmpeg</code> integrates a default down-mix (and up-mix) system
  21167. that should be preferred (see &quot;-ac&quot; option) unless you have very specific
  21168. needs.
  21169. </p>
  21170. </div>
  21171. <div class="subsection-level-extent" id="Remapping-examples">
  21172. <h4 class="subsection"><span>29.101.2 Remapping examples<a class="copiable-link" href="#Remapping-examples"> &para;</a></span></h4>
  21173. <p>The channel remapping will be effective if, and only if:
  21174. </p>
  21175. <ul class="itemize mark-bullet">
  21176. <li>gain coefficients are zeroes or ones,
  21177. </li><li>only one input per channel output,
  21178. </li></ul>
  21179. <p>If all these conditions are satisfied, the filter will notify the user (&quot;Pure
  21180. channel mapping detected&quot;), and use an optimized and lossless method to do the
  21181. remapping.
  21182. </p>
  21183. <p>For example, if you have a 5.1 source and want a stereo audio stream by
  21184. dropping the extra channels:
  21185. </p><div class="example">
  21186. <pre class="example-preformatted">pan=&quot;stereo| c0=FL | c1=FR&quot;
  21187. </pre></div>
  21188. <p>Given the same source, you can also switch front left and front right channels
  21189. and keep the input channel layout:
  21190. </p><div class="example">
  21191. <pre class="example-preformatted">pan=&quot;5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5&quot;
  21192. </pre></div>
  21193. <p>If the input is a stereo audio stream, you can mute the front left channel (and
  21194. still keep the stereo channel layout) with:
  21195. </p><div class="example">
  21196. <pre class="example-preformatted">pan=&quot;stereo|c1=c1&quot;
  21197. </pre></div>
  21198. <p>Still with a stereo audio stream input, you can copy the right channel in both
  21199. front left and right:
  21200. </p><div class="example">
  21201. <pre class="example-preformatted">pan=&quot;stereo| c0=FR | c1=FR&quot;
  21202. </pre></div>
  21203. </div>
  21204. </div>
  21205. <div class="section-level-extent" id="replaygain">
  21206. <h3 class="section"><span>29.102 replaygain<a class="copiable-link" href="#replaygain"> &para;</a></span></h3>
  21207. <p>ReplayGain scanner filter. This filter takes an audio stream as an input and
  21208. outputs it unchanged.
  21209. At end of filtering it displays <code class="code">track_gain</code> and <code class="code">track_peak</code>.
  21210. </p>
  21211. <p>The filter accepts the following exported read-only options:
  21212. </p>
  21213. <dl class="table">
  21214. <dt><samp class="option">track_gain</samp></dt>
  21215. <dd><p>Exported track gain in dB at end of stream.
  21216. </p>
  21217. </dd>
  21218. <dt><samp class="option">track_peak</samp></dt>
  21219. <dd><p>Exported track peak at end of stream.
  21220. </p></dd>
  21221. </dl>
  21222. </div>
  21223. <div class="section-level-extent" id="resample">
  21224. <h3 class="section"><span>29.103 resample<a class="copiable-link" href="#resample"> &para;</a></span></h3>
  21225. <p>Convert the audio sample format, sample rate and channel layout. It is
  21226. not meant to be used directly.
  21227. </p>
  21228. </div>
  21229. <div class="section-level-extent" id="rubberband">
  21230. <h3 class="section"><span>29.104 rubberband<a class="copiable-link" href="#rubberband"> &para;</a></span></h3>
  21231. <p>Apply time-stretching and pitch-shifting with librubberband.
  21232. </p>
  21233. <p>To enable compilation of this filter, you need to configure FFmpeg with
  21234. <code class="code">--enable-librubberband</code>.
  21235. </p>
  21236. <p>The filter accepts the following options:
  21237. </p>
  21238. <dl class="table">
  21239. <dt><samp class="option">tempo</samp></dt>
  21240. <dd><p>Set tempo scale factor.
  21241. </p>
  21242. </dd>
  21243. <dt><samp class="option">pitch</samp></dt>
  21244. <dd><p>Set pitch scale factor.
  21245. </p>
  21246. </dd>
  21247. <dt><samp class="option">transients</samp></dt>
  21248. <dd><p>Set transients detector.
  21249. Possible values are:
  21250. </p><dl class="table">
  21251. <dt><var class="var">crisp</var></dt>
  21252. <dt><var class="var">mixed</var></dt>
  21253. <dt><var class="var">smooth</var></dt>
  21254. </dl>
  21255. </dd>
  21256. <dt><samp class="option">detector</samp></dt>
  21257. <dd><p>Set detector.
  21258. Possible values are:
  21259. </p><dl class="table">
  21260. <dt><var class="var">compound</var></dt>
  21261. <dt><var class="var">percussive</var></dt>
  21262. <dt><var class="var">soft</var></dt>
  21263. </dl>
  21264. </dd>
  21265. <dt><samp class="option">phase</samp></dt>
  21266. <dd><p>Set phase.
  21267. Possible values are:
  21268. </p><dl class="table">
  21269. <dt><var class="var">laminar</var></dt>
  21270. <dt><var class="var">independent</var></dt>
  21271. </dl>
  21272. </dd>
  21273. <dt><samp class="option">window</samp></dt>
  21274. <dd><p>Set processing window size.
  21275. Possible values are:
  21276. </p><dl class="table">
  21277. <dt><var class="var">standard</var></dt>
  21278. <dt><var class="var">short</var></dt>
  21279. <dt><var class="var">long</var></dt>
  21280. </dl>
  21281. </dd>
  21282. <dt><samp class="option">smoothing</samp></dt>
  21283. <dd><p>Set smoothing.
  21284. Possible values are:
  21285. </p><dl class="table">
  21286. <dt><var class="var">off</var></dt>
  21287. <dt><var class="var">on</var></dt>
  21288. </dl>
  21289. </dd>
  21290. <dt><samp class="option">formant</samp></dt>
  21291. <dd><p>Enable formant preservation when shift pitching.
  21292. Possible values are:
  21293. </p><dl class="table">
  21294. <dt><var class="var">shifted</var></dt>
  21295. <dt><var class="var">preserved</var></dt>
  21296. </dl>
  21297. </dd>
  21298. <dt><samp class="option">pitchq</samp></dt>
  21299. <dd><p>Set pitch quality.
  21300. Possible values are:
  21301. </p><dl class="table">
  21302. <dt><var class="var">quality</var></dt>
  21303. <dt><var class="var">speed</var></dt>
  21304. <dt><var class="var">consistency</var></dt>
  21305. </dl>
  21306. </dd>
  21307. <dt><samp class="option">channels</samp></dt>
  21308. <dd><p>Set channels.
  21309. Possible values are:
  21310. </p><dl class="table">
  21311. <dt><var class="var">apart</var></dt>
  21312. <dt><var class="var">together</var></dt>
  21313. </dl>
  21314. </dd>
  21315. </dl>
  21316. <ul class="mini-toc">
  21317. <li><a href="#Commands-44" accesskey="1">Commands</a></li>
  21318. </ul>
  21319. <div class="subsection-level-extent" id="Commands-44">
  21320. <h4 class="subsection"><span>29.104.1 Commands<a class="copiable-link" href="#Commands-44"> &para;</a></span></h4>
  21321. <p>This filter supports the following commands:
  21322. </p><dl class="table">
  21323. <dt><samp class="option">tempo</samp></dt>
  21324. <dd><p>Change filter tempo scale factor.
  21325. Syntax for the command is : &quot;<var class="var">tempo</var>&quot;
  21326. </p>
  21327. </dd>
  21328. <dt><samp class="option">pitch</samp></dt>
  21329. <dd><p>Change filter pitch scale factor.
  21330. Syntax for the command is : &quot;<var class="var">pitch</var>&quot;
  21331. </p></dd>
  21332. </dl>
  21333. </div>
  21334. </div>
  21335. <div class="section-level-extent" id="sidechaincompress">
  21336. <h3 class="section"><span>29.105 sidechaincompress<a class="copiable-link" href="#sidechaincompress"> &para;</a></span></h3>
  21337. <p>This filter acts like normal compressor but has the ability to compress
  21338. detected signal using second input signal.
  21339. It needs two input streams and returns one output stream.
  21340. First input stream will be processed depending on second stream signal.
  21341. The filtered signal then can be filtered with other filters in later stages of
  21342. processing. See <a class="ref" href="#pan">pan</a> and <a class="ref" href="#amerge">amerge</a> filter.
  21343. </p>
  21344. <p>The filter accepts the following options:
  21345. </p>
  21346. <dl class="table">
  21347. <dt><samp class="option">level_in</samp></dt>
  21348. <dd><p>Set input gain. Default is 1. Range is between 0.015625 and 64.
  21349. </p>
  21350. </dd>
  21351. <dt><samp class="option">mode</samp></dt>
  21352. <dd><p>Set mode of compressor operation. Can be <code class="code">upward</code> or <code class="code">downward</code>.
  21353. Default is <code class="code">downward</code>.
  21354. </p>
  21355. </dd>
  21356. <dt><samp class="option">threshold</samp></dt>
  21357. <dd><p>If a signal of second stream raises above this level it will affect the gain
  21358. reduction of first stream.
  21359. By default is 0.125. Range is between 0.00097563 and 1.
  21360. </p>
  21361. </dd>
  21362. <dt><samp class="option">ratio</samp></dt>
  21363. <dd><p>Set a ratio about which the signal is reduced. 1:2 means that if the level
  21364. raised 4dB above the threshold, it will be only 2dB above after the reduction.
  21365. Default is 2. Range is between 1 and 20.
  21366. </p>
  21367. </dd>
  21368. <dt><samp class="option">attack</samp></dt>
  21369. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  21370. reduction starts. Default is 20. Range is between 0.01 and 2000.
  21371. </p>
  21372. </dd>
  21373. <dt><samp class="option">release</samp></dt>
  21374. <dd><p>Amount of milliseconds the signal has to fall below the threshold before
  21375. reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
  21376. </p>
  21377. </dd>
  21378. <dt><samp class="option">makeup</samp></dt>
  21379. <dd><p>Set the amount by how much signal will be amplified after processing.
  21380. Default is 1. Range is from 1 to 64.
  21381. </p>
  21382. </dd>
  21383. <dt><samp class="option">knee</samp></dt>
  21384. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  21385. Default is 2.82843. Range is between 1 and 8.
  21386. </p>
  21387. </dd>
  21388. <dt><samp class="option">link</samp></dt>
  21389. <dd><p>Choose if the <code class="code">average</code> level between all channels of side-chain stream
  21390. or the louder(<code class="code">maximum</code>) channel of side-chain stream affects the
  21391. reduction. Default is <code class="code">average</code>.
  21392. </p>
  21393. </dd>
  21394. <dt><samp class="option">detection</samp></dt>
  21395. <dd><p>Should the exact signal be taken in case of <code class="code">peak</code> or an RMS one in case
  21396. of <code class="code">rms</code>. Default is <code class="code">rms</code> which is mainly smoother.
  21397. </p>
  21398. </dd>
  21399. <dt><samp class="option">level_sc</samp></dt>
  21400. <dd><p>Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
  21401. </p>
  21402. </dd>
  21403. <dt><samp class="option">mix</samp></dt>
  21404. <dd><p>How much to use compressed signal in output. Default is 1.
  21405. Range is between 0 and 1.
  21406. </p></dd>
  21407. </dl>
  21408. <ul class="mini-toc">
  21409. <li><a href="#Commands-45" accesskey="1">Commands</a></li>
  21410. <li><a href="#Examples-46" accesskey="2">Examples</a></li>
  21411. </ul>
  21412. <div class="subsection-level-extent" id="Commands-45">
  21413. <h4 class="subsection"><span>29.105.1 Commands<a class="copiable-link" href="#Commands-45"> &para;</a></span></h4>
  21414. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  21415. </p>
  21416. </div>
  21417. <div class="subsection-level-extent" id="Examples-46">
  21418. <h4 class="subsection"><span>29.105.2 Examples<a class="copiable-link" href="#Examples-46"> &para;</a></span></h4>
  21419. <ul class="itemize mark-bullet">
  21420. <li>Full ffmpeg example taking 2 audio inputs, 1st input to be compressed
  21421. depending on the signal of 2nd input and later compressed signal to be
  21422. merged with 2nd input:
  21423. <div class="example">
  21424. <pre class="example-preformatted">ffmpeg -i main.flac -i sidechain.flac -filter_complex &quot;[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge&quot;
  21425. </pre></div>
  21426. </li></ul>
  21427. </div>
  21428. </div>
  21429. <div class="section-level-extent" id="sidechaingate">
  21430. <h3 class="section"><span>29.106 sidechaingate<a class="copiable-link" href="#sidechaingate"> &para;</a></span></h3>
  21431. <p>A sidechain gate acts like a normal (wideband) gate but has the ability to
  21432. filter the detected signal before sending it to the gain reduction stage.
  21433. Normally a gate uses the full range signal to detect a level above the
  21434. threshold.
  21435. For example: If you cut all lower frequencies from your sidechain signal
  21436. the gate will decrease the volume of your track only if not enough highs
  21437. appear. With this technique you are able to reduce the resonation of a
  21438. natural drum or remove &quot;rumbling&quot; of muted strokes from a heavily distorted
  21439. guitar.
  21440. It needs two input streams and returns one output stream.
  21441. First input stream will be processed depending on second stream signal.
  21442. </p>
  21443. <p>The filter accepts the following options:
  21444. </p>
  21445. <dl class="table">
  21446. <dt><samp class="option">level_in</samp></dt>
  21447. <dd><p>Set input level before filtering.
  21448. Default is 1. Allowed range is from 0.015625 to 64.
  21449. </p>
  21450. </dd>
  21451. <dt><samp class="option">mode</samp></dt>
  21452. <dd><p>Set the mode of operation. Can be <code class="code">upward</code> or <code class="code">downward</code>.
  21453. Default is <code class="code">downward</code>. If set to <code class="code">upward</code> mode, higher parts of signal
  21454. will be amplified, expanding dynamic range in upward direction.
  21455. Otherwise, in case of <code class="code">downward</code> lower parts of signal will be reduced.
  21456. </p>
  21457. </dd>
  21458. <dt><samp class="option">range</samp></dt>
  21459. <dd><p>Set the level of gain reduction when the signal is below the threshold.
  21460. Default is 0.06125. Allowed range is from 0 to 1.
  21461. Setting this to 0 disables reduction and then filter behaves like expander.
  21462. </p>
  21463. </dd>
  21464. <dt><samp class="option">threshold</samp></dt>
  21465. <dd><p>If a signal rises above this level the gain reduction is released.
  21466. Default is 0.125. Allowed range is from 0 to 1.
  21467. </p>
  21468. </dd>
  21469. <dt><samp class="option">ratio</samp></dt>
  21470. <dd><p>Set a ratio about which the signal is reduced.
  21471. Default is 2. Allowed range is from 1 to 9000.
  21472. </p>
  21473. </dd>
  21474. <dt><samp class="option">attack</samp></dt>
  21475. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  21476. reduction stops.
  21477. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
  21478. </p>
  21479. </dd>
  21480. <dt><samp class="option">release</samp></dt>
  21481. <dd><p>Amount of milliseconds the signal has to fall below the threshold before the
  21482. reduction is increased again. Default is 250 milliseconds.
  21483. Allowed range is from 0.01 to 9000.
  21484. </p>
  21485. </dd>
  21486. <dt><samp class="option">makeup</samp></dt>
  21487. <dd><p>Set amount of amplification of signal after processing.
  21488. Default is 1. Allowed range is from 1 to 64.
  21489. </p>
  21490. </dd>
  21491. <dt><samp class="option">knee</samp></dt>
  21492. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  21493. Default is 2.828427125. Allowed range is from 1 to 8.
  21494. </p>
  21495. </dd>
  21496. <dt><samp class="option">detection</samp></dt>
  21497. <dd><p>Choose if exact signal should be taken for detection or an RMS like one.
  21498. Default is rms. Can be peak or rms.
  21499. </p>
  21500. </dd>
  21501. <dt><samp class="option">link</samp></dt>
  21502. <dd><p>Choose if the average level between all channels or the louder channel affects
  21503. the reduction.
  21504. Default is average. Can be average or maximum.
  21505. </p>
  21506. </dd>
  21507. <dt><samp class="option">level_sc</samp></dt>
  21508. <dd><p>Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
  21509. </p></dd>
  21510. </dl>
  21511. <ul class="mini-toc">
  21512. <li><a href="#Commands-46" accesskey="1">Commands</a></li>
  21513. </ul>
  21514. <div class="subsection-level-extent" id="Commands-46">
  21515. <h4 class="subsection"><span>29.106.1 Commands<a class="copiable-link" href="#Commands-46"> &para;</a></span></h4>
  21516. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  21517. </p>
  21518. </div>
  21519. </div>
  21520. <div class="section-level-extent" id="silencedetect">
  21521. <h3 class="section"><span>29.107 silencedetect<a class="copiable-link" href="#silencedetect"> &para;</a></span></h3>
  21522. <p>Detect silence in an audio stream.
  21523. </p>
  21524. <p>This filter logs a message when it detects that the input audio volume is less
  21525. or equal to a noise tolerance value for a duration greater or equal to the
  21526. minimum detected noise duration.
  21527. </p>
  21528. <p>The printed times and duration are expressed in seconds. The
  21529. <code class="code">lavfi.silence_start</code> or <code class="code">lavfi.silence_start.X</code> metadata key
  21530. is set on the first frame whose timestamp equals or exceeds the detection
  21531. duration and it contains the timestamp of the first frame of the silence.
  21532. </p>
  21533. <p>The <code class="code">lavfi.silence_duration</code> or <code class="code">lavfi.silence_duration.X</code>
  21534. and <code class="code">lavfi.silence_end</code> or <code class="code">lavfi.silence_end.X</code> metadata
  21535. keys are set on the first frame after the silence. If <samp class="option">mono</samp> is
  21536. enabled, and each channel is evaluated separately, the <code class="code">.X</code>
  21537. suffixed keys are used, and <code class="code">X</code> corresponds to the channel number.
  21538. </p>
  21539. <p>The filter accepts the following options:
  21540. </p>
  21541. <dl class="table">
  21542. <dt><samp class="option">noise, n</samp></dt>
  21543. <dd><p>Set noise tolerance. Can be specified in dB (in case &quot;dB&quot; is appended to the
  21544. specified value) or amplitude ratio. Default is -60dB, or 0.001.
  21545. </p>
  21546. </dd>
  21547. <dt><samp class="option">duration, d</samp></dt>
  21548. <dd><p>Set silence duration until notification (default is 2 seconds). See
  21549. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  21550. for the accepted syntax.
  21551. </p>
  21552. </dd>
  21553. <dt><samp class="option">mono, m</samp></dt>
  21554. <dd><p>Process each channel separately, instead of combined. By default is disabled.
  21555. </p></dd>
  21556. </dl>
  21557. <ul class="mini-toc">
  21558. <li><a href="#Examples-47" accesskey="1">Examples</a></li>
  21559. </ul>
  21560. <div class="subsection-level-extent" id="Examples-47">
  21561. <h4 class="subsection"><span>29.107.1 Examples<a class="copiable-link" href="#Examples-47"> &para;</a></span></h4>
  21562. <ul class="itemize mark-bullet">
  21563. <li>Detect 5 seconds of silence with -50dB noise tolerance:
  21564. <div class="example">
  21565. <pre class="example-preformatted">silencedetect=n=-50dB:d=5
  21566. </pre></div>
  21567. </li><li>Complete example with <code class="command">ffmpeg</code> to detect silence with 0.0001 noise
  21568. tolerance in <samp class="file">silence.mp3</samp>:
  21569. <div class="example">
  21570. <pre class="example-preformatted">ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
  21571. </pre></div>
  21572. </li></ul>
  21573. </div>
  21574. </div>
  21575. <div class="section-level-extent" id="silenceremove">
  21576. <h3 class="section"><span>29.108 silenceremove<a class="copiable-link" href="#silenceremove"> &para;</a></span></h3>
  21577. <p>Remove silence from the beginning, middle or end of the audio.
  21578. </p>
  21579. <p>The filter accepts the following options:
  21580. </p>
  21581. <dl class="table">
  21582. <dt><samp class="option">start_periods</samp></dt>
  21583. <dd><p>This value is used to indicate if audio should be trimmed at beginning of
  21584. the audio. A value of zero indicates no silence should be trimmed from the
  21585. beginning. When specifying a non-zero value, it trims audio up until it
  21586. finds non-silence. Normally, when trimming silence from beginning of audio
  21587. the <var class="var">start_periods</var> will be <code class="code">1</code> but it can be increased to higher
  21588. values to trim all audio up to specific count of non-silence periods.
  21589. Default value is <code class="code">0</code>.
  21590. </p>
  21591. </dd>
  21592. <dt><samp class="option">start_duration</samp></dt>
  21593. <dd><p>Specify the amount of time that non-silence must be detected before it stops
  21594. trimming audio. By increasing the duration, bursts of noises can be treated
  21595. as silence and trimmed off. Default value is <code class="code">0</code>.
  21596. </p>
  21597. </dd>
  21598. <dt><samp class="option">start_threshold</samp></dt>
  21599. <dd><p>This indicates what sample value should be treated as silence. For digital
  21600. audio, a value of <code class="code">0</code> may be fine but for audio recorded from analog,
  21601. you may wish to increase the value to account for background noise.
  21602. Can be specified in dB (in case &quot;dB&quot; is appended to the specified value)
  21603. or amplitude ratio. Default value is <code class="code">0</code>.
  21604. </p>
  21605. </dd>
  21606. <dt><samp class="option">start_silence</samp></dt>
  21607. <dd><p>Specify max duration of silence at beginning that will be kept after
  21608. trimming. Default is 0, which is equal to trimming all samples detected
  21609. as silence.
  21610. </p>
  21611. </dd>
  21612. <dt><samp class="option">start_mode</samp></dt>
  21613. <dd><p>Specify mode of detection of silence end at start of multi-channel audio.
  21614. Can be <var class="var">any</var> or <var class="var">all</var>. Default is <var class="var">any</var>.
  21615. With <var class="var">any</var>, any sample from any channel that is detected as non-silence
  21616. will trigger end of silence trimming at start of audio stream.
  21617. With <var class="var">all</var>, only if every sample from every channel is detected as non-silence
  21618. will trigger end of silence trimming at start of audio stream, limited usage.
  21619. </p>
  21620. </dd>
  21621. <dt><samp class="option">stop_periods</samp></dt>
  21622. <dd><p>Set the count for trimming silence from the end of audio. When specifying a
  21623. positive value, it trims audio after it finds specified silence period.
  21624. To remove silence from the middle of a file, specify a <var class="var">stop_periods</var>
  21625. that is negative. This value is then treated as a positive value and is
  21626. used to indicate the effect should restart processing as specified by
  21627. <var class="var">stop_periods</var>, making it suitable for removing periods of silence
  21628. in the middle of the audio.
  21629. Default value is <code class="code">0</code>.
  21630. </p>
  21631. </dd>
  21632. <dt><samp class="option">stop_duration</samp></dt>
  21633. <dd><p>Specify a duration of silence that must exist before audio is not copied any
  21634. more. By specifying a higher duration, silence that is wanted can be left in
  21635. the audio.
  21636. Default value is <code class="code">0</code>.
  21637. </p>
  21638. </dd>
  21639. <dt><samp class="option">stop_threshold</samp></dt>
  21640. <dd><p>This is the same as <samp class="option">start_threshold</samp> but for trimming silence from
  21641. the end of audio.
  21642. Can be specified in dB (in case &quot;dB&quot; is appended to the specified value)
  21643. or amplitude ratio. Default value is <code class="code">0</code>.
  21644. </p>
  21645. </dd>
  21646. <dt><samp class="option">stop_silence</samp></dt>
  21647. <dd><p>Specify max duration of silence at end that will be kept after
  21648. trimming. Default is 0, which is equal to trimming all samples detected
  21649. as silence.
  21650. </p>
  21651. </dd>
  21652. <dt><samp class="option">stop_mode</samp></dt>
  21653. <dd><p>Specify mode of detection of silence start after start of multi-channel audio.
  21654. Can be <var class="var">any</var> or <var class="var">all</var>. Default is <var class="var">all</var>.
  21655. With <var class="var">any</var>, any sample from any channel that is detected as silence
  21656. will trigger start of silence trimming after start of audio stream, limited usage.
  21657. With <var class="var">all</var>, only if every sample from every channel is detected as silence
  21658. will trigger start of silence trimming after start of audio stream.
  21659. </p>
  21660. </dd>
  21661. <dt><samp class="option">detection</samp></dt>
  21662. <dd><p>Set how is silence detected.
  21663. </p><dl class="table">
  21664. <dt><samp class="option">avg</samp></dt>
  21665. <dd><p>Mean of absolute values of samples in moving window.
  21666. </p></dd>
  21667. <dt><samp class="option">rms</samp></dt>
  21668. <dd><p>Root squared mean of absolute values of samples in moving window.
  21669. </p></dd>
  21670. <dt><samp class="option">peak</samp></dt>
  21671. <dd><p>Maximum of absolute values of samples in moving window.
  21672. </p></dd>
  21673. <dt><samp class="option">median</samp></dt>
  21674. <dd><p>Median of absolute values of samples in moving window.
  21675. </p></dd>
  21676. <dt><samp class="option">ptp</samp></dt>
  21677. <dd><p>Absolute of max peak to min peak difference of samples in moving window.
  21678. </p></dd>
  21679. <dt><samp class="option">dev</samp></dt>
  21680. <dd><p>Standard deviation of values of samples in moving window.
  21681. </p></dd>
  21682. </dl>
  21683. <p>Default value is <code class="code">rms</code>.
  21684. </p>
  21685. </dd>
  21686. <dt><samp class="option">window</samp></dt>
  21687. <dd><p>Set duration in number of seconds used to calculate size of window in number
  21688. of samples for detecting silence. Using <code class="code">0</code> will effectively disable
  21689. any windowing and use only single sample per channel for silence detection.
  21690. In that case it may be needed to also set <samp class="option">start_silence</samp> and/or
  21691. <samp class="option">stop_silence</samp> to nonzero values with also <samp class="option">start_duration</samp> and/or
  21692. <samp class="option">stop_duration</samp> to nonzero values.
  21693. Default value is <code class="code">0.02</code>. Allowed range is from <code class="code">0</code> to <code class="code">10</code>.
  21694. </p>
  21695. </dd>
  21696. <dt><samp class="option">timestamp</samp></dt>
  21697. <dd><p>Set processing mode of every audio frame output timestamp.
  21698. </p><dl class="table">
  21699. <dt><samp class="option">write</samp></dt>
  21700. <dd><p>Full timestamps rewrite, keep only the start time for the first output frame.
  21701. </p></dd>
  21702. <dt><samp class="option">copy</samp></dt>
  21703. <dd><p>Non-dropped frames are left with same timestamp as input audio frame.
  21704. </p></dd>
  21705. </dl>
  21706. <p>Defaults value is <code class="code">write</code>.
  21707. </p></dd>
  21708. </dl>
  21709. <ul class="mini-toc">
  21710. <li><a href="#Examples-48" accesskey="1">Examples</a></li>
  21711. <li><a href="#Commands-47" accesskey="2">Commands</a></li>
  21712. </ul>
  21713. <div class="subsection-level-extent" id="Examples-48">
  21714. <h4 class="subsection"><span>29.108.1 Examples<a class="copiable-link" href="#Examples-48"> &para;</a></span></h4>
  21715. <ul class="itemize mark-bullet">
  21716. <li>The following example shows how this filter can be used to start a recording
  21717. that does not contain the delay at the start which usually occurs between
  21718. pressing the record button and the start of the performance:
  21719. <div class="example">
  21720. <pre class="example-preformatted">silenceremove=start_periods=1:start_duration=5:start_threshold=0.02
  21721. </pre></div>
  21722. </li><li>Trim all silence encountered from beginning to end where there is more than 1
  21723. second of silence in audio:
  21724. <div class="example">
  21725. <pre class="example-preformatted">silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
  21726. </pre></div>
  21727. </li><li>Trim all digital silence samples, using peak detection, from beginning to end
  21728. where there is more than 0 samples of digital silence in audio and digital
  21729. silence is detected in all channels at same positions in stream:
  21730. <div class="example">
  21731. <pre class="example-preformatted">silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
  21732. </pre></div>
  21733. </li><li>Trim every 2nd encountered silence period from beginning to end where there is
  21734. more than 1 second of silence per silence period in audio:
  21735. <div class="example">
  21736. <pre class="example-preformatted">silenceremove=stop_periods=-2:stop_duration=1:stop_threshold=-90dB
  21737. </pre></div>
  21738. </li><li>Similar as above, but keep maximum of 0.5 seconds of silence from each trimmed period:
  21739. <div class="example">
  21740. <pre class="example-preformatted">silenceremove=stop_periods=-2:stop_duration=1:stop_threshold=-90dB:stop_silence=0.5
  21741. </pre></div>
  21742. </li><li>Similar as above, but keep maximum of 1.5 seconds of silence from start of audio:
  21743. <div class="example">
  21744. <pre class="example-preformatted">silenceremove=stop_periods=-2:stop_duration=1:stop_threshold=-90dB:stop_silence=0.5:start_periods=1:start_duration=1:start_silence=1.5:stop_threshold=-90dB
  21745. </pre></div>
  21746. </li></ul>
  21747. </div>
  21748. <div class="subsection-level-extent" id="Commands-47">
  21749. <h4 class="subsection"><span>29.108.2 Commands<a class="copiable-link" href="#Commands-47"> &para;</a></span></h4>
  21750. <p>This filter supports some above options as <a class="ref" href="#commands">commands</a>.
  21751. </p>
  21752. </div>
  21753. </div>
  21754. <div class="section-level-extent" id="sofalizer">
  21755. <h3 class="section"><span>29.109 sofalizer<a class="copiable-link" href="#sofalizer"> &para;</a></span></h3>
  21756. <p>SOFAlizer uses head-related transfer functions (HRTFs) to create virtual
  21757. loudspeakers around the user for binaural listening via headphones (audio
  21758. formats up to 9 channels supported).
  21759. The HRTFs are stored in SOFA files (see <a class="url" href="http://www.sofacoustics.org/">http://www.sofacoustics.org/</a> for a database).
  21760. SOFAlizer is developed at the Acoustics Research Institute (ARI) of the
  21761. Austrian Academy of Sciences.
  21762. </p>
  21763. <p>To enable compilation of this filter you need to configure FFmpeg with
  21764. <code class="code">--enable-libmysofa</code>.
  21765. </p>
  21766. <p>The filter accepts the following options:
  21767. </p>
  21768. <dl class="table">
  21769. <dt><samp class="option">sofa</samp></dt>
  21770. <dd><p>Set the SOFA file used for rendering.
  21771. </p>
  21772. </dd>
  21773. <dt><samp class="option">gain</samp></dt>
  21774. <dd><p>Set gain applied to audio. Value is in dB. Default is 0.
  21775. </p>
  21776. </dd>
  21777. <dt><samp class="option">rotation</samp></dt>
  21778. <dd><p>Set rotation of virtual loudspeakers in deg. Default is 0.
  21779. </p>
  21780. </dd>
  21781. <dt><samp class="option">elevation</samp></dt>
  21782. <dd><p>Set elevation of virtual speakers in deg. Default is 0.
  21783. </p>
  21784. </dd>
  21785. <dt><samp class="option">radius</samp></dt>
  21786. <dd><p>Set distance in meters between loudspeakers and the listener with near-field
  21787. HRTFs. Default is 1.
  21788. </p>
  21789. </dd>
  21790. <dt><samp class="option">type</samp></dt>
  21791. <dd><p>Set processing type. Can be <var class="var">time</var> or <var class="var">freq</var>. <var class="var">time</var> is
  21792. processing audio in time domain which is slow.
  21793. <var class="var">freq</var> is processing audio in frequency domain which is fast.
  21794. Default is <var class="var">freq</var>.
  21795. </p>
  21796. </dd>
  21797. <dt><samp class="option">speakers</samp></dt>
  21798. <dd><p>Set custom positions of virtual loudspeakers. Syntax for this option is:
  21799. &lt;CH&gt; &lt;AZIM&gt; &lt;ELEV&gt;[|&lt;CH&gt; &lt;AZIM&gt; &lt;ELEV&gt;|...].
  21800. Each virtual loudspeaker is described with short channel name following with
  21801. azimuth and elevation in degrees.
  21802. Each virtual loudspeaker description is separated by &rsquo;|&rsquo;.
  21803. For example to override front left and front right channel positions use:
  21804. &rsquo;speakers=FL 45 15|FR 345 15&rsquo;.
  21805. Descriptions with unrecognised channel names are ignored.
  21806. </p>
  21807. </dd>
  21808. <dt><samp class="option">lfegain</samp></dt>
  21809. <dd><p>Set custom gain for LFE channels. Value is in dB. Default is 0.
  21810. </p>
  21811. </dd>
  21812. <dt><samp class="option">framesize</samp></dt>
  21813. <dd><p>Set custom frame size in number of samples. Default is 1024.
  21814. Allowed range is from 1024 to 96000. Only used if option &lsquo;<samp class="samp">type</samp>&rsquo;
  21815. is set to <var class="var">freq</var>.
  21816. </p>
  21817. </dd>
  21818. <dt><samp class="option">normalize</samp></dt>
  21819. <dd><p>Should all IRs be normalized upon importing SOFA file.
  21820. By default is enabled.
  21821. </p>
  21822. </dd>
  21823. <dt><samp class="option">interpolate</samp></dt>
  21824. <dd><p>Should nearest IRs be interpolated with neighbor IRs if exact position
  21825. does not match. By default is disabled.
  21826. </p>
  21827. </dd>
  21828. <dt><samp class="option">minphase</samp></dt>
  21829. <dd><p>Minphase all IRs upon loading of SOFA file. By default is disabled.
  21830. </p>
  21831. </dd>
  21832. <dt><samp class="option">anglestep</samp></dt>
  21833. <dd><p>Set neighbor search angle step. Only used if option <var class="var">interpolate</var> is enabled.
  21834. </p>
  21835. </dd>
  21836. <dt><samp class="option">radstep</samp></dt>
  21837. <dd><p>Set neighbor search radius step. Only used if option <var class="var">interpolate</var> is enabled.
  21838. </p></dd>
  21839. </dl>
  21840. <ul class="mini-toc">
  21841. <li><a href="#Examples-49" accesskey="1">Examples</a></li>
  21842. </ul>
  21843. <div class="subsection-level-extent" id="Examples-49">
  21844. <h4 class="subsection"><span>29.109.1 Examples<a class="copiable-link" href="#Examples-49"> &para;</a></span></h4>
  21845. <ul class="itemize mark-bullet">
  21846. <li>Using ClubFritz6 sofa file:
  21847. <div class="example">
  21848. <pre class="example-preformatted">sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1
  21849. </pre></div>
  21850. </li><li>Using ClubFritz12 sofa file and bigger radius with small rotation:
  21851. <div class="example">
  21852. <pre class="example-preformatted">sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5
  21853. </pre></div>
  21854. </li><li>Similar as above but with custom speaker positions for front left, front right, back left and back right
  21855. and also with custom gain:
  21856. <div class="example">
  21857. <pre class="example-preformatted">&quot;sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=2:speakers=FL 45|FR 315|BL 135|BR 225:gain=28&quot;
  21858. </pre></div>
  21859. </li></ul>
  21860. </div>
  21861. </div>
  21862. <div class="section-level-extent" id="speechnorm">
  21863. <h3 class="section"><span>29.110 speechnorm<a class="copiable-link" href="#speechnorm"> &para;</a></span></h3>
  21864. <p>Speech Normalizer.
  21865. </p>
  21866. <p>This filter expands or compresses each half-cycle of audio samples
  21867. (local set of samples all above or all below zero and between two nearest zero crossings) depending
  21868. on threshold value, so audio reaches target peak value under conditions controlled by below options.
  21869. </p>
  21870. <p>The filter accepts the following options:
  21871. </p>
  21872. <dl class="table">
  21873. <dt><samp class="option">peak, p</samp></dt>
  21874. <dd><p>Set the expansion target peak value. This specifies the highest allowed absolute amplitude
  21875. level for the normalized audio input. Default value is 0.95. Allowed range is from 0.0 to 1.0.
  21876. </p>
  21877. </dd>
  21878. <dt><samp class="option">expansion, e</samp></dt>
  21879. <dd><p>Set the maximum expansion factor. Allowed range is from 1.0 to 50.0. Default value is 2.0.
  21880. This option controls maximum local half-cycle of samples expansion. The maximum expansion
  21881. would be such that local peak value reaches target peak value but never to surpass it and that
  21882. ratio between new and previous peak value does not surpass this option value.
  21883. </p>
  21884. </dd>
  21885. <dt><samp class="option">compression, c</samp></dt>
  21886. <dd><p>Set the maximum compression factor. Allowed range is from 1.0 to 50.0. Default value is 2.0.
  21887. This option controls maximum local half-cycle of samples compression. This option is used
  21888. only if <samp class="option">threshold</samp> option is set to value greater than 0.0, then in such cases
  21889. when local peak is lower or same as value set by <samp class="option">threshold</samp> all samples belonging to
  21890. that peak&rsquo;s half-cycle will be compressed by current compression factor.
  21891. </p>
  21892. </dd>
  21893. <dt><samp class="option">threshold, t</samp></dt>
  21894. <dd><p>Set the threshold value. Default value is 0.0. Allowed range is from 0.0 to 1.0.
  21895. This option specifies which half-cycles of samples will be compressed and which will be expanded.
  21896. Any half-cycle samples with their local peak value below or same as this option value will be
  21897. compressed by current compression factor, otherwise, if greater than threshold value they will be
  21898. expanded with expansion factor so that it could reach peak target value but never surpass it.
  21899. </p>
  21900. </dd>
  21901. <dt><samp class="option">raise, r</samp></dt>
  21902. <dd><p>Set the expansion raising amount per each half-cycle of samples. Default value is 0.001.
  21903. Allowed range is from 0.0 to 1.0. This controls how fast expansion factor is raised per
  21904. each new half-cycle until it reaches <samp class="option">expansion</samp> value.
  21905. Setting this options too high may lead to distortions.
  21906. </p>
  21907. </dd>
  21908. <dt><samp class="option">fall, f</samp></dt>
  21909. <dd><p>Set the compression raising amount per each half-cycle of samples. Default value is 0.001.
  21910. Allowed range is from 0.0 to 1.0. This controls how fast compression factor is raised per
  21911. each new half-cycle until it reaches <samp class="option">compression</samp> value.
  21912. </p>
  21913. </dd>
  21914. <dt><samp class="option">channels, h</samp></dt>
  21915. <dd><p>Specify which channels to filter, by default all available channels are filtered.
  21916. </p>
  21917. </dd>
  21918. <dt><samp class="option">invert, i</samp></dt>
  21919. <dd><p>Enable inverted filtering, by default is disabled. This inverts interpretation of <samp class="option">threshold</samp>
  21920. option. When enabled any half-cycle of samples with their local peak value below or same as
  21921. <samp class="option">threshold</samp> option will be expanded otherwise it will be compressed.
  21922. </p>
  21923. </dd>
  21924. <dt><samp class="option">link, l</samp></dt>
  21925. <dd><p>Link channels when calculating gain applied to each filtered channel sample, by default is disabled.
  21926. When disabled each filtered channel gain calculation is independent, otherwise when this option
  21927. is enabled the minimum of all possible gains for each filtered channel is used.
  21928. </p>
  21929. </dd>
  21930. <dt><samp class="option">rms, m</samp></dt>
  21931. <dd><p>Set the expansion target RMS value. This specifies the highest allowed RMS level for the normalized
  21932. audio input. Default value is 0.0, thus disabled. Allowed range is from 0.0 to 1.0.
  21933. </p></dd>
  21934. </dl>
  21935. <ul class="mini-toc">
  21936. <li><a href="#Commands-48" accesskey="1">Commands</a></li>
  21937. <li><a href="#Examples-50" accesskey="2">Examples</a></li>
  21938. </ul>
  21939. <div class="subsection-level-extent" id="Commands-48">
  21940. <h4 class="subsection"><span>29.110.1 Commands<a class="copiable-link" href="#Commands-48"> &para;</a></span></h4>
  21941. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  21942. </p>
  21943. </div>
  21944. <div class="subsection-level-extent" id="Examples-50">
  21945. <h4 class="subsection"><span>29.110.2 Examples<a class="copiable-link" href="#Examples-50"> &para;</a></span></h4>
  21946. <ul class="itemize mark-bullet">
  21947. <li>Weak and slow amplification:
  21948. <div class="example">
  21949. <pre class="example-preformatted">speechnorm=e=3:r=0.00001:l=1
  21950. </pre></div>
  21951. </li><li>Moderate and slow amplification:
  21952. <div class="example">
  21953. <pre class="example-preformatted">speechnorm=e=6.25:r=0.00001:l=1
  21954. </pre></div>
  21955. </li><li>Strong and fast amplification:
  21956. <div class="example">
  21957. <pre class="example-preformatted">speechnorm=e=12.5:r=0.0001:l=1
  21958. </pre></div>
  21959. </li><li>Very strong and fast amplification:
  21960. <div class="example">
  21961. <pre class="example-preformatted">speechnorm=e=25:r=0.0001:l=1
  21962. </pre></div>
  21963. </li><li>Extreme and fast amplification:
  21964. <div class="example">
  21965. <pre class="example-preformatted">speechnorm=e=50:r=0.0001:l=1
  21966. </pre></div>
  21967. </li></ul>
  21968. </div>
  21969. </div>
  21970. <div class="section-level-extent" id="stereotools">
  21971. <h3 class="section"><span>29.111 stereotools<a class="copiable-link" href="#stereotools"> &para;</a></span></h3>
  21972. <p>This filter has some handy utilities to manage stereo signals, for converting
  21973. M/S stereo recordings to L/R signal while having control over the parameters
  21974. or spreading the stereo image of master track.
  21975. </p>
  21976. <p>The filter accepts the following options:
  21977. </p>
  21978. <dl class="table">
  21979. <dt><samp class="option">level_in</samp></dt>
  21980. <dd><p>Set input level before filtering for both channels. Defaults is 1.
  21981. Allowed range is from 0.015625 to 64.
  21982. </p>
  21983. </dd>
  21984. <dt><samp class="option">level_out</samp></dt>
  21985. <dd><p>Set output level after filtering for both channels. Defaults is 1.
  21986. Allowed range is from 0.015625 to 64.
  21987. </p>
  21988. </dd>
  21989. <dt><samp class="option">balance_in</samp></dt>
  21990. <dd><p>Set input balance between both channels. Default is 0.
  21991. Allowed range is from -1 to 1.
  21992. </p>
  21993. </dd>
  21994. <dt><samp class="option">balance_out</samp></dt>
  21995. <dd><p>Set output balance between both channels. Default is 0.
  21996. Allowed range is from -1 to 1.
  21997. </p>
  21998. </dd>
  21999. <dt><samp class="option">softclip</samp></dt>
  22000. <dd><p>Enable softclipping. Results in analog distortion instead of harsh digital 0dB
  22001. clipping. Disabled by default.
  22002. </p>
  22003. </dd>
  22004. <dt><samp class="option">mutel</samp></dt>
  22005. <dd><p>Mute the left channel. Disabled by default.
  22006. </p>
  22007. </dd>
  22008. <dt><samp class="option">muter</samp></dt>
  22009. <dd><p>Mute the right channel. Disabled by default.
  22010. </p>
  22011. </dd>
  22012. <dt><samp class="option">phasel</samp></dt>
  22013. <dd><p>Change the phase of the left channel. Disabled by default.
  22014. </p>
  22015. </dd>
  22016. <dt><samp class="option">phaser</samp></dt>
  22017. <dd><p>Change the phase of the right channel. Disabled by default.
  22018. </p>
  22019. </dd>
  22020. <dt><samp class="option">mode</samp></dt>
  22021. <dd><p>Set stereo mode. Available values are:
  22022. </p>
  22023. <dl class="table">
  22024. <dt>&lsquo;<samp class="samp">lr&gt;lr</samp>&rsquo;</dt>
  22025. <dd><p>Left/Right to Left/Right, this is default.
  22026. </p>
  22027. </dd>
  22028. <dt>&lsquo;<samp class="samp">lr&gt;ms</samp>&rsquo;</dt>
  22029. <dd><p>Left/Right to Mid/Side.
  22030. </p>
  22031. </dd>
  22032. <dt>&lsquo;<samp class="samp">ms&gt;lr</samp>&rsquo;</dt>
  22033. <dd><p>Mid/Side to Left/Right.
  22034. </p>
  22035. </dd>
  22036. <dt>&lsquo;<samp class="samp">lr&gt;ll</samp>&rsquo;</dt>
  22037. <dd><p>Left/Right to Left/Left.
  22038. </p>
  22039. </dd>
  22040. <dt>&lsquo;<samp class="samp">lr&gt;rr</samp>&rsquo;</dt>
  22041. <dd><p>Left/Right to Right/Right.
  22042. </p>
  22043. </dd>
  22044. <dt>&lsquo;<samp class="samp">lr&gt;l+r</samp>&rsquo;</dt>
  22045. <dd><p>Left/Right to Left + Right.
  22046. </p>
  22047. </dd>
  22048. <dt>&lsquo;<samp class="samp">lr&gt;rl</samp>&rsquo;</dt>
  22049. <dd><p>Left/Right to Right/Left.
  22050. </p>
  22051. </dd>
  22052. <dt>&lsquo;<samp class="samp">ms&gt;ll</samp>&rsquo;</dt>
  22053. <dd><p>Mid/Side to Left/Left.
  22054. </p>
  22055. </dd>
  22056. <dt>&lsquo;<samp class="samp">ms&gt;rr</samp>&rsquo;</dt>
  22057. <dd><p>Mid/Side to Right/Right.
  22058. </p>
  22059. </dd>
  22060. <dt>&lsquo;<samp class="samp">ms&gt;rl</samp>&rsquo;</dt>
  22061. <dd><p>Mid/Side to Right/Left.
  22062. </p>
  22063. </dd>
  22064. <dt>&lsquo;<samp class="samp">lr&gt;l-r</samp>&rsquo;</dt>
  22065. <dd><p>Left/Right to Left - Right.
  22066. </p></dd>
  22067. </dl>
  22068. </dd>
  22069. <dt><samp class="option">slev</samp></dt>
  22070. <dd><p>Set level of side signal. Default is 1.
  22071. Allowed range is from 0.015625 to 64.
  22072. </p>
  22073. </dd>
  22074. <dt><samp class="option">sbal</samp></dt>
  22075. <dd><p>Set balance of side signal. Default is 0.
  22076. Allowed range is from -1 to 1.
  22077. </p>
  22078. </dd>
  22079. <dt><samp class="option">mlev</samp></dt>
  22080. <dd><p>Set level of the middle signal. Default is 1.
  22081. Allowed range is from 0.015625 to 64.
  22082. </p>
  22083. </dd>
  22084. <dt><samp class="option">mpan</samp></dt>
  22085. <dd><p>Set middle signal pan. Default is 0. Allowed range is from -1 to 1.
  22086. </p>
  22087. </dd>
  22088. <dt><samp class="option">base</samp></dt>
  22089. <dd><p>Set stereo base between mono and inversed channels. Default is 0.
  22090. Allowed range is from -1 to 1.
  22091. </p>
  22092. </dd>
  22093. <dt><samp class="option">delay</samp></dt>
  22094. <dd><p>Set delay in milliseconds how much to delay left from right channel and
  22095. vice versa. Default is 0. Allowed range is from -20 to 20.
  22096. </p>
  22097. </dd>
  22098. <dt><samp class="option">sclevel</samp></dt>
  22099. <dd><p>Set S/C level. Default is 1. Allowed range is from 1 to 100.
  22100. </p>
  22101. </dd>
  22102. <dt><samp class="option">phase</samp></dt>
  22103. <dd><p>Set the stereo phase in degrees. Default is 0. Allowed range is from 0 to 360.
  22104. </p>
  22105. </dd>
  22106. <dt><samp class="option">bmode_in, bmode_out</samp></dt>
  22107. <dd><p>Set balance mode for balance_in/balance_out option.
  22108. </p>
  22109. <p>Can be one of the following:
  22110. </p>
  22111. <dl class="table">
  22112. <dt>&lsquo;<samp class="samp">balance</samp>&rsquo;</dt>
  22113. <dd><p>Classic balance mode. Attenuate one channel at time.
  22114. Gain is raised up to 1.
  22115. </p>
  22116. </dd>
  22117. <dt>&lsquo;<samp class="samp">amplitude</samp>&rsquo;</dt>
  22118. <dd><p>Similar as classic mode above but gain is raised up to 2.
  22119. </p>
  22120. </dd>
  22121. <dt>&lsquo;<samp class="samp">power</samp>&rsquo;</dt>
  22122. <dd><p>Equal power distribution, from -6dB to +6dB range.
  22123. </p></dd>
  22124. </dl>
  22125. </dd>
  22126. </dl>
  22127. <ul class="mini-toc">
  22128. <li><a href="#Commands-49" accesskey="1">Commands</a></li>
  22129. <li><a href="#Examples-51" accesskey="2">Examples</a></li>
  22130. </ul>
  22131. <div class="subsection-level-extent" id="Commands-49">
  22132. <h4 class="subsection"><span>29.111.1 Commands<a class="copiable-link" href="#Commands-49"> &para;</a></span></h4>
  22133. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  22134. </p>
  22135. </div>
  22136. <div class="subsection-level-extent" id="Examples-51">
  22137. <h4 class="subsection"><span>29.111.2 Examples<a class="copiable-link" href="#Examples-51"> &para;</a></span></h4>
  22138. <ul class="itemize mark-bullet">
  22139. <li>Apply karaoke like effect:
  22140. <div class="example">
  22141. <pre class="example-preformatted">stereotools=mlev=0.015625
  22142. </pre></div>
  22143. </li><li>Convert M/S signal to L/R:
  22144. <div class="example">
  22145. <pre class="example-preformatted">&quot;stereotools=mode=ms&gt;lr&quot;
  22146. </pre></div>
  22147. </li></ul>
  22148. </div>
  22149. </div>
  22150. <div class="section-level-extent" id="stereowiden">
  22151. <h3 class="section"><span>29.112 stereowiden<a class="copiable-link" href="#stereowiden"> &para;</a></span></h3>
  22152. <p>This filter enhance the stereo effect by suppressing signal common to both
  22153. channels and by delaying the signal of left into right and vice versa,
  22154. thereby widening the stereo effect.
  22155. </p>
  22156. <p>The filter accepts the following options:
  22157. </p>
  22158. <dl class="table">
  22159. <dt><samp class="option">delay</samp></dt>
  22160. <dd><p>Time in milliseconds of the delay of left signal into right and vice versa.
  22161. Default is 20 milliseconds.
  22162. </p>
  22163. </dd>
  22164. <dt><samp class="option">feedback</samp></dt>
  22165. <dd><p>Amount of gain in delayed signal into right and vice versa. Gives a delay
  22166. effect of left signal in right output and vice versa which gives widening
  22167. effect. Default is 0.3.
  22168. </p>
  22169. </dd>
  22170. <dt><samp class="option">crossfeed</samp></dt>
  22171. <dd><p>Cross feed of left into right with inverted phase. This helps in suppressing
  22172. the mono. If the value is 1 it will cancel all the signal common to both
  22173. channels. Default is 0.3.
  22174. </p>
  22175. </dd>
  22176. <dt><samp class="option">drymix</samp></dt>
  22177. <dd><p>Set level of input signal of original channel. Default is 0.8.
  22178. </p></dd>
  22179. </dl>
  22180. <ul class="mini-toc">
  22181. <li><a href="#Commands-50" accesskey="1">Commands</a></li>
  22182. </ul>
  22183. <div class="subsection-level-extent" id="Commands-50">
  22184. <h4 class="subsection"><span>29.112.1 Commands<a class="copiable-link" href="#Commands-50"> &para;</a></span></h4>
  22185. <p>This filter supports the all above options except <code class="code">delay</code> as <a class="ref" href="#commands">commands</a>.
  22186. </p>
  22187. </div>
  22188. </div>
  22189. <div class="section-level-extent" id="superequalizer">
  22190. <h3 class="section"><span>29.113 superequalizer<a class="copiable-link" href="#superequalizer"> &para;</a></span></h3>
  22191. <p>Apply 18 band equalizer.
  22192. </p>
  22193. <p>The filter accepts the following options:
  22194. </p><dl class="table">
  22195. <dt><samp class="option">1b</samp></dt>
  22196. <dd><p>Set 65Hz band gain.
  22197. </p></dd>
  22198. <dt><samp class="option">2b</samp></dt>
  22199. <dd><p>Set 92Hz band gain.
  22200. </p></dd>
  22201. <dt><samp class="option">3b</samp></dt>
  22202. <dd><p>Set 131Hz band gain.
  22203. </p></dd>
  22204. <dt><samp class="option">4b</samp></dt>
  22205. <dd><p>Set 185Hz band gain.
  22206. </p></dd>
  22207. <dt><samp class="option">5b</samp></dt>
  22208. <dd><p>Set 262Hz band gain.
  22209. </p></dd>
  22210. <dt><samp class="option">6b</samp></dt>
  22211. <dd><p>Set 370Hz band gain.
  22212. </p></dd>
  22213. <dt><samp class="option">7b</samp></dt>
  22214. <dd><p>Set 523Hz band gain.
  22215. </p></dd>
  22216. <dt><samp class="option">8b</samp></dt>
  22217. <dd><p>Set 740Hz band gain.
  22218. </p></dd>
  22219. <dt><samp class="option">9b</samp></dt>
  22220. <dd><p>Set 1047Hz band gain.
  22221. </p></dd>
  22222. <dt><samp class="option">10b</samp></dt>
  22223. <dd><p>Set 1480Hz band gain.
  22224. </p></dd>
  22225. <dt><samp class="option">11b</samp></dt>
  22226. <dd><p>Set 2093Hz band gain.
  22227. </p></dd>
  22228. <dt><samp class="option">12b</samp></dt>
  22229. <dd><p>Set 2960Hz band gain.
  22230. </p></dd>
  22231. <dt><samp class="option">13b</samp></dt>
  22232. <dd><p>Set 4186Hz band gain.
  22233. </p></dd>
  22234. <dt><samp class="option">14b</samp></dt>
  22235. <dd><p>Set 5920Hz band gain.
  22236. </p></dd>
  22237. <dt><samp class="option">15b</samp></dt>
  22238. <dd><p>Set 8372Hz band gain.
  22239. </p></dd>
  22240. <dt><samp class="option">16b</samp></dt>
  22241. <dd><p>Set 11840Hz band gain.
  22242. </p></dd>
  22243. <dt><samp class="option">17b</samp></dt>
  22244. <dd><p>Set 16744Hz band gain.
  22245. </p></dd>
  22246. <dt><samp class="option">18b</samp></dt>
  22247. <dd><p>Set 20000Hz band gain.
  22248. </p></dd>
  22249. </dl>
  22250. </div>
  22251. <div class="section-level-extent" id="surround">
  22252. <h3 class="section"><span>29.114 surround<a class="copiable-link" href="#surround"> &para;</a></span></h3>
  22253. <p>Apply audio surround upmix filter.
  22254. </p>
  22255. <p>This filter allows to produce multichannel output from audio stream.
  22256. </p>
  22257. <p>The filter accepts the following options:
  22258. </p>
  22259. <dl class="table">
  22260. <dt><samp class="option">chl_out</samp></dt>
  22261. <dd><p>Set output channel layout. By default, this is <var class="var">5.1</var>.
  22262. </p>
  22263. <p>See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#channel-layout-syntax">the Channel Layout section in the ffmpeg-utils(1) manual</a>
  22264. for the required syntax.
  22265. </p>
  22266. </dd>
  22267. <dt><samp class="option">chl_in</samp></dt>
  22268. <dd><p>Set input channel layout. By default, this is <var class="var">stereo</var>.
  22269. </p>
  22270. <p>See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#channel-layout-syntax">the Channel Layout section in the ffmpeg-utils(1) manual</a>
  22271. for the required syntax.
  22272. </p>
  22273. </dd>
  22274. <dt><samp class="option">level_in</samp></dt>
  22275. <dd><p>Set input volume level. By default, this is <var class="var">1</var>.
  22276. </p>
  22277. </dd>
  22278. <dt><samp class="option">level_out</samp></dt>
  22279. <dd><p>Set output volume level. By default, this is <var class="var">1</var>.
  22280. </p>
  22281. </dd>
  22282. <dt><samp class="option">lfe</samp></dt>
  22283. <dd><p>Enable LFE channel output if output channel layout has it. By default, this is enabled.
  22284. </p>
  22285. </dd>
  22286. <dt><samp class="option">lfe_low</samp></dt>
  22287. <dd><p>Set LFE low cut off frequency. By default, this is <var class="var">128</var> Hz.
  22288. </p>
  22289. </dd>
  22290. <dt><samp class="option">lfe_high</samp></dt>
  22291. <dd><p>Set LFE high cut off frequency. By default, this is <var class="var">256</var> Hz.
  22292. </p>
  22293. </dd>
  22294. <dt><samp class="option">lfe_mode</samp></dt>
  22295. <dd><p>Set LFE mode, can be <var class="var">add</var> or <var class="var">sub</var>. Default is <var class="var">add</var>.
  22296. In <var class="var">add</var> mode, LFE channel is created from input audio and added to output.
  22297. In <var class="var">sub</var> mode, LFE channel is created from input audio and added to output but
  22298. also all non-LFE output channels are subtracted with output LFE channel.
  22299. </p>
  22300. </dd>
  22301. <dt><samp class="option">smooth</samp></dt>
  22302. <dd><p>Set temporal smoothness strength, used to gradually change factors when transforming
  22303. stereo sound in time. Allowed range is from <var class="var">0.0</var> to <var class="var">1.0</var>.
  22304. Useful to improve output quality with <var class="var">focus</var> option values greater than <var class="var">0.0</var>.
  22305. Default is <var class="var">0.0</var>. Only values inside this range and without edges are effective.
  22306. </p>
  22307. </dd>
  22308. <dt><samp class="option">angle</samp></dt>
  22309. <dd><p>Set angle of stereo surround transform, Allowed range is from <var class="var">0</var> to <var class="var">360</var>.
  22310. Default is <var class="var">90</var>.
  22311. </p>
  22312. </dd>
  22313. <dt><samp class="option">focus</samp></dt>
  22314. <dd><p>Set focus of stereo surround transform, Allowed range is from <var class="var">-1</var> to <var class="var">1</var>.
  22315. Default is <var class="var">0</var>.
  22316. </p>
  22317. </dd>
  22318. <dt><samp class="option">fc_in</samp></dt>
  22319. <dd><p>Set front center input volume. By default, this is <var class="var">1</var>.
  22320. </p>
  22321. </dd>
  22322. <dt><samp class="option">fc_out</samp></dt>
  22323. <dd><p>Set front center output volume. By default, this is <var class="var">1</var>.
  22324. </p>
  22325. </dd>
  22326. <dt><samp class="option">fl_in</samp></dt>
  22327. <dd><p>Set front left input volume. By default, this is <var class="var">1</var>.
  22328. </p>
  22329. </dd>
  22330. <dt><samp class="option">fl_out</samp></dt>
  22331. <dd><p>Set front left output volume. By default, this is <var class="var">1</var>.
  22332. </p>
  22333. </dd>
  22334. <dt><samp class="option">fr_in</samp></dt>
  22335. <dd><p>Set front right input volume. By default, this is <var class="var">1</var>.
  22336. </p>
  22337. </dd>
  22338. <dt><samp class="option">fr_out</samp></dt>
  22339. <dd><p>Set front right output volume. By default, this is <var class="var">1</var>.
  22340. </p>
  22341. </dd>
  22342. <dt><samp class="option">sl_in</samp></dt>
  22343. <dd><p>Set side left input volume. By default, this is <var class="var">1</var>.
  22344. </p>
  22345. </dd>
  22346. <dt><samp class="option">sl_out</samp></dt>
  22347. <dd><p>Set side left output volume. By default, this is <var class="var">1</var>.
  22348. </p>
  22349. </dd>
  22350. <dt><samp class="option">sr_in</samp></dt>
  22351. <dd><p>Set side right input volume. By default, this is <var class="var">1</var>.
  22352. </p>
  22353. </dd>
  22354. <dt><samp class="option">sr_out</samp></dt>
  22355. <dd><p>Set side right output volume. By default, this is <var class="var">1</var>.
  22356. </p>
  22357. </dd>
  22358. <dt><samp class="option">bl_in</samp></dt>
  22359. <dd><p>Set back left input volume. By default, this is <var class="var">1</var>.
  22360. </p>
  22361. </dd>
  22362. <dt><samp class="option">bl_out</samp></dt>
  22363. <dd><p>Set back left output volume. By default, this is <var class="var">1</var>.
  22364. </p>
  22365. </dd>
  22366. <dt><samp class="option">br_in</samp></dt>
  22367. <dd><p>Set back right input volume. By default, this is <var class="var">1</var>.
  22368. </p>
  22369. </dd>
  22370. <dt><samp class="option">br_out</samp></dt>
  22371. <dd><p>Set back right output volume. By default, this is <var class="var">1</var>.
  22372. </p>
  22373. </dd>
  22374. <dt><samp class="option">bc_in</samp></dt>
  22375. <dd><p>Set back center input volume. By default, this is <var class="var">1</var>.
  22376. </p>
  22377. </dd>
  22378. <dt><samp class="option">bc_out</samp></dt>
  22379. <dd><p>Set back center output volume. By default, this is <var class="var">1</var>.
  22380. </p>
  22381. </dd>
  22382. <dt><samp class="option">lfe_in</samp></dt>
  22383. <dd><p>Set LFE input volume. By default, this is <var class="var">1</var>.
  22384. </p>
  22385. </dd>
  22386. <dt><samp class="option">lfe_out</samp></dt>
  22387. <dd><p>Set LFE output volume. By default, this is <var class="var">1</var>.
  22388. </p>
  22389. </dd>
  22390. <dt><samp class="option">allx</samp></dt>
  22391. <dd><p>Set spread usage of stereo image across X axis for all channels.
  22392. Allowed range is from <var class="var">-1</var> to <var class="var">15</var>.
  22393. By default this value is negative <var class="var">-1</var>, and thus unused.
  22394. </p>
  22395. </dd>
  22396. <dt><samp class="option">ally</samp></dt>
  22397. <dd><p>Set spread usage of stereo image across Y axis for all channels.
  22398. Allowed range is from <var class="var">-1</var> to <var class="var">15</var>.
  22399. By default this value is negative <var class="var">-1</var>, and thus unused.
  22400. </p>
  22401. </dd>
  22402. <dt><samp class="option">fcx, flx, frx, blx, brx, slx, srx, bcx</samp></dt>
  22403. <dd><p>Set spread usage of stereo image across X axis for each channel.
  22404. Allowed range is from <var class="var">0.06</var> to <var class="var">15</var>.
  22405. By default this value is <var class="var">0.5</var>.
  22406. </p>
  22407. </dd>
  22408. <dt><samp class="option">fcy, fly, fry, bly, bry, sly, sry, bcy</samp></dt>
  22409. <dd><p>Set spread usage of stereo image across Y axis for each channel.
  22410. Allowed range is from <var class="var">0.06</var> to <var class="var">15</var>.
  22411. By default this value is <var class="var">0.5</var>.
  22412. </p>
  22413. </dd>
  22414. <dt><samp class="option">win_size</samp></dt>
  22415. <dd><p>Set window size. Allowed range is from <var class="var">1024</var> to <var class="var">65536</var>. Default size is <var class="var">4096</var>.
  22416. </p>
  22417. </dd>
  22418. <dt><samp class="option">win_func</samp></dt>
  22419. <dd><p>Set window function.
  22420. </p>
  22421. <p>It accepts the following values:
  22422. </p><dl class="table">
  22423. <dt>&lsquo;<samp class="samp">rect</samp>&rsquo;</dt>
  22424. <dt>&lsquo;<samp class="samp">bartlett</samp>&rsquo;</dt>
  22425. <dt>&lsquo;<samp class="samp">hann, hanning</samp>&rsquo;</dt>
  22426. <dt>&lsquo;<samp class="samp">hamming</samp>&rsquo;</dt>
  22427. <dt>&lsquo;<samp class="samp">blackman</samp>&rsquo;</dt>
  22428. <dt>&lsquo;<samp class="samp">welch</samp>&rsquo;</dt>
  22429. <dt>&lsquo;<samp class="samp">flattop</samp>&rsquo;</dt>
  22430. <dt>&lsquo;<samp class="samp">bharris</samp>&rsquo;</dt>
  22431. <dt>&lsquo;<samp class="samp">bnuttall</samp>&rsquo;</dt>
  22432. <dt>&lsquo;<samp class="samp">bhann</samp>&rsquo;</dt>
  22433. <dt>&lsquo;<samp class="samp">sine</samp>&rsquo;</dt>
  22434. <dt>&lsquo;<samp class="samp">nuttall</samp>&rsquo;</dt>
  22435. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  22436. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  22437. <dt>&lsquo;<samp class="samp">tukey</samp>&rsquo;</dt>
  22438. <dt>&lsquo;<samp class="samp">dolph</samp>&rsquo;</dt>
  22439. <dt>&lsquo;<samp class="samp">cauchy</samp>&rsquo;</dt>
  22440. <dt>&lsquo;<samp class="samp">parzen</samp>&rsquo;</dt>
  22441. <dt>&lsquo;<samp class="samp">poisson</samp>&rsquo;</dt>
  22442. <dt>&lsquo;<samp class="samp">bohman</samp>&rsquo;</dt>
  22443. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  22444. </dl>
  22445. <p>Default is <code class="code">hann</code>.
  22446. </p>
  22447. </dd>
  22448. <dt><samp class="option">overlap</samp></dt>
  22449. <dd><p>Set window overlap. If set to 1, the recommended overlap for selected
  22450. window function will be picked. Default is <code class="code">0.5</code>.
  22451. </p></dd>
  22452. </dl>
  22453. </div>
  22454. <div class="section-level-extent" id="tiltshelf">
  22455. <h3 class="section"><span>29.115 tiltshelf<a class="copiable-link" href="#tiltshelf"> &para;</a></span></h3>
  22456. <p>Boost or cut the lower frequencies and cut or boost higher frequencies
  22457. of the audio using a two-pole shelving filter with a response similar to
  22458. that of a standard hi-fi&rsquo;s tone-controls.
  22459. This is also known as shelving equalisation (EQ).
  22460. </p>
  22461. <p>The filter accepts the following options:
  22462. </p>
  22463. <dl class="table">
  22464. <dt><samp class="option">gain, g</samp></dt>
  22465. <dd><p>Give the gain at 0 Hz. Its useful range is about -20
  22466. (for a large cut) to +20 (for a large boost).
  22467. Beware of clipping when using a positive gain.
  22468. </p>
  22469. </dd>
  22470. <dt><samp class="option">frequency, f</samp></dt>
  22471. <dd><p>Set the filter&rsquo;s central frequency and so can be used
  22472. to extend or reduce the frequency range to be boosted or cut.
  22473. The default value is <code class="code">3000</code> Hz.
  22474. </p>
  22475. </dd>
  22476. <dt><samp class="option">width_type, t</samp></dt>
  22477. <dd><p>Set method to specify band-width of filter.
  22478. </p><dl class="table">
  22479. <dt><samp class="option">h</samp></dt>
  22480. <dd><p>Hz
  22481. </p></dd>
  22482. <dt><samp class="option">q</samp></dt>
  22483. <dd><p>Q-Factor
  22484. </p></dd>
  22485. <dt><samp class="option">o</samp></dt>
  22486. <dd><p>octave
  22487. </p></dd>
  22488. <dt><samp class="option">s</samp></dt>
  22489. <dd><p>slope
  22490. </p></dd>
  22491. <dt><samp class="option">k</samp></dt>
  22492. <dd><p>kHz
  22493. </p></dd>
  22494. </dl>
  22495. </dd>
  22496. <dt><samp class="option">width, w</samp></dt>
  22497. <dd><p>Determine how steep is the filter&rsquo;s shelf transition.
  22498. </p>
  22499. </dd>
  22500. <dt><samp class="option">poles, p</samp></dt>
  22501. <dd><p>Set number of poles. Default is 2.
  22502. </p>
  22503. </dd>
  22504. <dt><samp class="option">mix, m</samp></dt>
  22505. <dd><p>How much to use filtered signal in output. Default is 1.
  22506. Range is between 0 and 1.
  22507. </p>
  22508. </dd>
  22509. <dt><samp class="option">channels, c</samp></dt>
  22510. <dd><p>Specify which channels to filter, by default all available are filtered.
  22511. </p>
  22512. </dd>
  22513. <dt><samp class="option">normalize, n</samp></dt>
  22514. <dd><p>Normalize biquad coefficients, by default is disabled.
  22515. Enabling it will normalize magnitude response at DC to 0dB.
  22516. </p>
  22517. </dd>
  22518. <dt><samp class="option">transform, a</samp></dt>
  22519. <dd><p>Set transform type of IIR filter.
  22520. </p><dl class="table">
  22521. <dt><samp class="option">di</samp></dt>
  22522. <dt><samp class="option">dii</samp></dt>
  22523. <dt><samp class="option">tdi</samp></dt>
  22524. <dt><samp class="option">tdii</samp></dt>
  22525. <dt><samp class="option">latt</samp></dt>
  22526. <dt><samp class="option">svf</samp></dt>
  22527. <dt><samp class="option">zdf</samp></dt>
  22528. </dl>
  22529. </dd>
  22530. <dt><samp class="option">precision, r</samp></dt>
  22531. <dd><p>Set precision of filtering.
  22532. </p><dl class="table">
  22533. <dt><samp class="option">auto</samp></dt>
  22534. <dd><p>Pick automatic sample format depending on surround filters.
  22535. </p></dd>
  22536. <dt><samp class="option">s16</samp></dt>
  22537. <dd><p>Always use signed 16-bit.
  22538. </p></dd>
  22539. <dt><samp class="option">s32</samp></dt>
  22540. <dd><p>Always use signed 32-bit.
  22541. </p></dd>
  22542. <dt><samp class="option">f32</samp></dt>
  22543. <dd><p>Always use float 32-bit.
  22544. </p></dd>
  22545. <dt><samp class="option">f64</samp></dt>
  22546. <dd><p>Always use float 64-bit.
  22547. </p></dd>
  22548. </dl>
  22549. </dd>
  22550. <dt><samp class="option">block_size, b</samp></dt>
  22551. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  22552. value (higher than impulse response length truncated when reaches near zero values) filtering
  22553. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  22554. </p>
  22555. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  22556. </p></dd>
  22557. </dl>
  22558. <ul class="mini-toc">
  22559. <li><a href="#Commands-51" accesskey="1">Commands</a></li>
  22560. </ul>
  22561. <div class="subsection-level-extent" id="Commands-51">
  22562. <h4 class="subsection"><span>29.115.1 Commands<a class="copiable-link" href="#Commands-51"> &para;</a></span></h4>
  22563. <p>This filter supports some options as <a class="ref" href="#commands">commands</a>.
  22564. </p>
  22565. </div>
  22566. </div>
  22567. <div class="section-level-extent" id="treble_002c-highshelf">
  22568. <h3 class="section"><span>29.116 treble, highshelf<a class="copiable-link" href="#treble_002c-highshelf"> &para;</a></span></h3>
  22569. <p>Boost or cut treble (upper) frequencies of the audio using a two-pole
  22570. shelving filter with a response similar to that of a standard
  22571. hi-fi&rsquo;s tone-controls. This is also known as shelving equalisation (EQ).
  22572. </p>
  22573. <p>The filter accepts the following options:
  22574. </p>
  22575. <dl class="table">
  22576. <dt><samp class="option">gain, g</samp></dt>
  22577. <dd><p>Give the gain at whichever is the lower of ~22 kHz and the
  22578. Nyquist frequency. Its useful range is about -20 (for a large cut)
  22579. to +20 (for a large boost). Beware of clipping when using a positive gain.
  22580. </p>
  22581. </dd>
  22582. <dt><samp class="option">frequency, f</samp></dt>
  22583. <dd><p>Set the filter&rsquo;s central frequency and so can be used
  22584. to extend or reduce the frequency range to be boosted or cut.
  22585. The default value is <code class="code">3000</code> Hz.
  22586. </p>
  22587. </dd>
  22588. <dt><samp class="option">width_type, t</samp></dt>
  22589. <dd><p>Set method to specify band-width of filter.
  22590. </p><dl class="table">
  22591. <dt><samp class="option">h</samp></dt>
  22592. <dd><p>Hz
  22593. </p></dd>
  22594. <dt><samp class="option">q</samp></dt>
  22595. <dd><p>Q-Factor
  22596. </p></dd>
  22597. <dt><samp class="option">o</samp></dt>
  22598. <dd><p>octave
  22599. </p></dd>
  22600. <dt><samp class="option">s</samp></dt>
  22601. <dd><p>slope
  22602. </p></dd>
  22603. <dt><samp class="option">k</samp></dt>
  22604. <dd><p>kHz
  22605. </p></dd>
  22606. </dl>
  22607. </dd>
  22608. <dt><samp class="option">width, w</samp></dt>
  22609. <dd><p>Determine how steep is the filter&rsquo;s shelf transition.
  22610. </p>
  22611. </dd>
  22612. <dt><samp class="option">poles, p</samp></dt>
  22613. <dd><p>Set number of poles. Default is 2.
  22614. </p>
  22615. </dd>
  22616. <dt><samp class="option">mix, m</samp></dt>
  22617. <dd><p>How much to use filtered signal in output. Default is 1.
  22618. Range is between 0 and 1.
  22619. </p>
  22620. </dd>
  22621. <dt><samp class="option">channels, c</samp></dt>
  22622. <dd><p>Specify which channels to filter, by default all available are filtered.
  22623. </p>
  22624. </dd>
  22625. <dt><samp class="option">normalize, n</samp></dt>
  22626. <dd><p>Normalize biquad coefficients, by default is disabled.
  22627. Enabling it will normalize magnitude response at DC to 0dB.
  22628. </p>
  22629. </dd>
  22630. <dt><samp class="option">transform, a</samp></dt>
  22631. <dd><p>Set transform type of IIR filter.
  22632. </p><dl class="table">
  22633. <dt><samp class="option">di</samp></dt>
  22634. <dt><samp class="option">dii</samp></dt>
  22635. <dt><samp class="option">tdi</samp></dt>
  22636. <dt><samp class="option">tdii</samp></dt>
  22637. <dt><samp class="option">latt</samp></dt>
  22638. <dt><samp class="option">svf</samp></dt>
  22639. <dt><samp class="option">zdf</samp></dt>
  22640. </dl>
  22641. </dd>
  22642. <dt><samp class="option">precision, r</samp></dt>
  22643. <dd><p>Set precision of filtering.
  22644. </p><dl class="table">
  22645. <dt><samp class="option">auto</samp></dt>
  22646. <dd><p>Pick automatic sample format depending on surround filters.
  22647. </p></dd>
  22648. <dt><samp class="option">s16</samp></dt>
  22649. <dd><p>Always use signed 16-bit.
  22650. </p></dd>
  22651. <dt><samp class="option">s32</samp></dt>
  22652. <dd><p>Always use signed 32-bit.
  22653. </p></dd>
  22654. <dt><samp class="option">f32</samp></dt>
  22655. <dd><p>Always use float 32-bit.
  22656. </p></dd>
  22657. <dt><samp class="option">f64</samp></dt>
  22658. <dd><p>Always use float 64-bit.
  22659. </p></dd>
  22660. </dl>
  22661. </dd>
  22662. <dt><samp class="option">block_size, b</samp></dt>
  22663. <dd><p>Set block size used for reverse IIR processing. If this value is set to high enough
  22664. value (higher than impulse response length truncated when reaches near zero values) filtering
  22665. will become linear phase otherwise if not big enough it will just produce nasty artifacts.
  22666. </p>
  22667. <p>Note that filter delay will be exactly this many samples when set to non-zero value.
  22668. </p></dd>
  22669. </dl>
  22670. <ul class="mini-toc">
  22671. <li><a href="#Commands-52" accesskey="1">Commands</a></li>
  22672. </ul>
  22673. <div class="subsection-level-extent" id="Commands-52">
  22674. <h4 class="subsection"><span>29.116.1 Commands<a class="copiable-link" href="#Commands-52"> &para;</a></span></h4>
  22675. <p>This filter supports the following commands:
  22676. </p><dl class="table">
  22677. <dt><samp class="option">frequency, f</samp></dt>
  22678. <dd><p>Change treble frequency.
  22679. Syntax for the command is : &quot;<var class="var">frequency</var>&quot;
  22680. </p>
  22681. </dd>
  22682. <dt><samp class="option">width_type, t</samp></dt>
  22683. <dd><p>Change treble width_type.
  22684. Syntax for the command is : &quot;<var class="var">width_type</var>&quot;
  22685. </p>
  22686. </dd>
  22687. <dt><samp class="option">width, w</samp></dt>
  22688. <dd><p>Change treble width.
  22689. Syntax for the command is : &quot;<var class="var">width</var>&quot;
  22690. </p>
  22691. </dd>
  22692. <dt><samp class="option">gain, g</samp></dt>
  22693. <dd><p>Change treble gain.
  22694. Syntax for the command is : &quot;<var class="var">gain</var>&quot;
  22695. </p>
  22696. </dd>
  22697. <dt><samp class="option">mix, m</samp></dt>
  22698. <dd><p>Change treble mix.
  22699. Syntax for the command is : &quot;<var class="var">mix</var>&quot;
  22700. </p></dd>
  22701. </dl>
  22702. </div>
  22703. </div>
  22704. <div class="section-level-extent" id="tremolo">
  22705. <h3 class="section"><span>29.117 tremolo<a class="copiable-link" href="#tremolo"> &para;</a></span></h3>
  22706. <p>Sinusoidal amplitude modulation.
  22707. </p>
  22708. <p>The filter accepts the following options:
  22709. </p>
  22710. <dl class="table">
  22711. <dt><samp class="option">f</samp></dt>
  22712. <dd><p>Modulation frequency in Hertz. Modulation frequencies in the subharmonic range
  22713. (20 Hz or lower) will result in a tremolo effect.
  22714. This filter may also be used as a ring modulator by specifying
  22715. a modulation frequency higher than 20 Hz.
  22716. Range is 0.1 - 20000.0. Default value is 5.0 Hz.
  22717. </p>
  22718. </dd>
  22719. <dt><samp class="option">d</samp></dt>
  22720. <dd><p>Depth of modulation as a percentage. Range is 0.0 - 1.0.
  22721. Default value is 0.5.
  22722. </p></dd>
  22723. </dl>
  22724. </div>
  22725. <div class="section-level-extent" id="vibrato">
  22726. <h3 class="section"><span>29.118 vibrato<a class="copiable-link" href="#vibrato"> &para;</a></span></h3>
  22727. <p>Sinusoidal phase modulation.
  22728. </p>
  22729. <p>The filter accepts the following options:
  22730. </p>
  22731. <dl class="table">
  22732. <dt><samp class="option">f</samp></dt>
  22733. <dd><p>Modulation frequency in Hertz.
  22734. Range is 0.1 - 20000.0. Default value is 5.0 Hz.
  22735. </p>
  22736. </dd>
  22737. <dt><samp class="option">d</samp></dt>
  22738. <dd><p>Depth of modulation as a percentage. Range is 0.0 - 1.0.
  22739. Default value is 0.5.
  22740. </p></dd>
  22741. </dl>
  22742. </div>
  22743. <div class="section-level-extent" id="virtualbass">
  22744. <h3 class="section"><span>29.119 virtualbass<a class="copiable-link" href="#virtualbass"> &para;</a></span></h3>
  22745. <p>Apply audio Virtual Bass filter.
  22746. </p>
  22747. <p>This filter accepts stereo input and produce stereo with LFE (2.1) channels output.
  22748. The newly produced LFE channel have enhanced virtual bass originally obtained from both stereo channels.
  22749. This filter outputs front left and front right channels unchanged as available in stereo input.
  22750. </p>
  22751. <p>The filter accepts the following options:
  22752. </p>
  22753. <dl class="table">
  22754. <dt><samp class="option">cutoff</samp></dt>
  22755. <dd><p>Set the virtual bass cutoff frequency. Default value is 250 Hz.
  22756. Allowed range is from 100 to 500 Hz.
  22757. </p>
  22758. </dd>
  22759. <dt><samp class="option">strength</samp></dt>
  22760. <dd><p>Set the virtual bass strength. Allowed range is from 0.5 to 3.
  22761. Default value is 3.
  22762. </p></dd>
  22763. </dl>
  22764. </div>
  22765. <div class="section-level-extent" id="volume">
  22766. <h3 class="section"><span>29.120 volume<a class="copiable-link" href="#volume"> &para;</a></span></h3>
  22767. <p>Adjust the input audio volume.
  22768. </p>
  22769. <p>It accepts the following parameters:
  22770. </p><dl class="table">
  22771. <dt><samp class="option">volume</samp></dt>
  22772. <dd><p>Set audio volume expression.
  22773. </p>
  22774. <p>Output values are clipped to the maximum value.
  22775. </p>
  22776. <p>The output audio volume is given by the relation:
  22777. </p><div class="example">
  22778. <pre class="example-preformatted"><var class="var">output_volume</var> = <var class="var">volume</var> * <var class="var">input_volume</var>
  22779. </pre></div>
  22780. <p>The default value for <var class="var">volume</var> is &quot;1.0&quot;.
  22781. </p>
  22782. </dd>
  22783. <dt><samp class="option">precision</samp></dt>
  22784. <dd><p>This parameter represents the mathematical precision.
  22785. </p>
  22786. <p>It determines which input sample formats will be allowed, which affects the
  22787. precision of the volume scaling.
  22788. </p>
  22789. <dl class="table">
  22790. <dt><samp class="option">fixed</samp></dt>
  22791. <dd><p>8-bit fixed-point; this limits input sample format to U8, S16, and S32.
  22792. </p></dd>
  22793. <dt><samp class="option">float</samp></dt>
  22794. <dd><p>32-bit floating-point; this limits input sample format to FLT. (default)
  22795. </p></dd>
  22796. <dt><samp class="option">double</samp></dt>
  22797. <dd><p>64-bit floating-point; this limits input sample format to DBL.
  22798. </p></dd>
  22799. </dl>
  22800. </dd>
  22801. <dt><samp class="option">replaygain</samp></dt>
  22802. <dd><p>Choose the behaviour on encountering ReplayGain side data in input frames.
  22803. </p>
  22804. <dl class="table">
  22805. <dt><samp class="option">drop</samp></dt>
  22806. <dd><p>Remove ReplayGain side data, ignoring its contents (the default).
  22807. </p>
  22808. </dd>
  22809. <dt><samp class="option">ignore</samp></dt>
  22810. <dd><p>Ignore ReplayGain side data, but leave it in the frame.
  22811. </p>
  22812. </dd>
  22813. <dt><samp class="option">track</samp></dt>
  22814. <dd><p>Prefer the track gain, if present.
  22815. </p>
  22816. </dd>
  22817. <dt><samp class="option">album</samp></dt>
  22818. <dd><p>Prefer the album gain, if present.
  22819. </p></dd>
  22820. </dl>
  22821. </dd>
  22822. <dt><samp class="option">replaygain_preamp</samp></dt>
  22823. <dd><p>Pre-amplification gain in dB to apply to the selected replaygain gain.
  22824. </p>
  22825. <p>Default value for <var class="var">replaygain_preamp</var> is 0.0.
  22826. </p>
  22827. </dd>
  22828. <dt><samp class="option">replaygain_noclip</samp></dt>
  22829. <dd><p>Prevent clipping by limiting the gain applied.
  22830. </p>
  22831. <p>Default value for <var class="var">replaygain_noclip</var> is 1.
  22832. </p>
  22833. </dd>
  22834. <dt><samp class="option">eval</samp></dt>
  22835. <dd><p>Set when the volume expression is evaluated.
  22836. </p>
  22837. <p>It accepts the following values:
  22838. </p><dl class="table">
  22839. <dt>&lsquo;<samp class="samp">once</samp>&rsquo;</dt>
  22840. <dd><p>only evaluate expression once during the filter initialization, or
  22841. when the &lsquo;<samp class="samp">volume</samp>&rsquo; command is sent
  22842. </p>
  22843. </dd>
  22844. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  22845. <dd><p>evaluate expression for each incoming frame
  22846. </p></dd>
  22847. </dl>
  22848. <p>Default value is &lsquo;<samp class="samp">once</samp>&rsquo;.
  22849. </p></dd>
  22850. </dl>
  22851. <p>The volume expression can contain the following parameters.
  22852. </p>
  22853. <dl class="table">
  22854. <dt><samp class="option">n</samp></dt>
  22855. <dd><p>frame number (starting at zero)
  22856. </p></dd>
  22857. <dt><samp class="option">nb_channels</samp></dt>
  22858. <dd><p>number of channels
  22859. </p></dd>
  22860. <dt><samp class="option">nb_consumed_samples</samp></dt>
  22861. <dd><p>number of samples consumed by the filter
  22862. </p></dd>
  22863. <dt><samp class="option">nb_samples</samp></dt>
  22864. <dd><p>number of samples in the current frame
  22865. </p></dd>
  22866. <dt><samp class="option">pos</samp></dt>
  22867. <dd><p>original frame position in the file; deprecated, do not use
  22868. </p></dd>
  22869. <dt><samp class="option">pts</samp></dt>
  22870. <dd><p>frame PTS
  22871. </p></dd>
  22872. <dt><samp class="option">sample_rate</samp></dt>
  22873. <dd><p>sample rate
  22874. </p></dd>
  22875. <dt><samp class="option">startpts</samp></dt>
  22876. <dd><p>PTS at start of stream
  22877. </p></dd>
  22878. <dt><samp class="option">startt</samp></dt>
  22879. <dd><p>time at start of stream
  22880. </p></dd>
  22881. <dt><samp class="option">t</samp></dt>
  22882. <dd><p>frame time
  22883. </p></dd>
  22884. <dt><samp class="option">tb</samp></dt>
  22885. <dd><p>timestamp timebase
  22886. </p></dd>
  22887. <dt><samp class="option">volume</samp></dt>
  22888. <dd><p>last set volume value
  22889. </p></dd>
  22890. </dl>
  22891. <p>Note that when <samp class="option">eval</samp> is set to &lsquo;<samp class="samp">once</samp>&rsquo; only the
  22892. <var class="var">sample_rate</var> and <var class="var">tb</var> variables are available, all other
  22893. variables will evaluate to NAN.
  22894. </p>
  22895. <ul class="mini-toc">
  22896. <li><a href="#Commands-53" accesskey="1">Commands</a></li>
  22897. <li><a href="#Examples-52" accesskey="2">Examples</a></li>
  22898. </ul>
  22899. <div class="subsection-level-extent" id="Commands-53">
  22900. <h4 class="subsection"><span>29.120.1 Commands<a class="copiable-link" href="#Commands-53"> &para;</a></span></h4>
  22901. <p>This filter supports the following commands:
  22902. </p><dl class="table">
  22903. <dt><samp class="option">volume</samp></dt>
  22904. <dd><p>Modify the volume expression.
  22905. The command accepts the same syntax of the corresponding option.
  22906. </p>
  22907. <p>If the specified expression is not valid, it is kept at its current
  22908. value.
  22909. </p></dd>
  22910. </dl>
  22911. </div>
  22912. <div class="subsection-level-extent" id="Examples-52">
  22913. <h4 class="subsection"><span>29.120.2 Examples<a class="copiable-link" href="#Examples-52"> &para;</a></span></h4>
  22914. <ul class="itemize mark-bullet">
  22915. <li>Halve the input audio volume:
  22916. <div class="example">
  22917. <pre class="example-preformatted">volume=volume=0.5
  22918. volume=volume=1/2
  22919. volume=volume=-6.0206dB
  22920. </pre></div>
  22921. <p>In all the above example the named key for <samp class="option">volume</samp> can be
  22922. omitted, for example like in:
  22923. </p><div class="example">
  22924. <pre class="example-preformatted">volume=0.5
  22925. </pre></div>
  22926. </li><li>Increase input audio power by 6 decibels using fixed-point precision:
  22927. <div class="example">
  22928. <pre class="example-preformatted">volume=volume=6dB:precision=fixed
  22929. </pre></div>
  22930. </li><li>Fade volume after time 10 with an annihilation period of 5 seconds:
  22931. <div class="example">
  22932. <pre class="example-preformatted">volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame
  22933. </pre></div>
  22934. </li></ul>
  22935. </div>
  22936. </div>
  22937. <div class="section-level-extent" id="volumedetect">
  22938. <h3 class="section"><span>29.121 volumedetect<a class="copiable-link" href="#volumedetect"> &para;</a></span></h3>
  22939. <p>Detect the volume of the input video.
  22940. </p>
  22941. <p>The filter has no parameters. It supports only 16-bit signed integer samples,
  22942. so the input will be converted when needed. Statistics about the volume will
  22943. be printed in the log when the input stream end is reached.
  22944. </p>
  22945. <p>In particular it will show the mean volume (root mean square), maximum
  22946. volume (on a per-sample basis), and the beginning of a histogram of the
  22947. registered volume values (from the maximum value to a cumulated 1/1000 of
  22948. the samples).
  22949. </p>
  22950. <p>All volumes are in decibels relative to the maximum PCM value.
  22951. </p>
  22952. <ul class="mini-toc">
  22953. <li><a href="#Examples-53" accesskey="1">Examples</a></li>
  22954. </ul>
  22955. <div class="subsection-level-extent" id="Examples-53">
  22956. <h4 class="subsection"><span>29.121.1 Examples<a class="copiable-link" href="#Examples-53"> &para;</a></span></h4>
  22957. <p>Here is an excerpt of the output:
  22958. </p><div class="example">
  22959. <pre class="example-preformatted">[Parsed_volumedetect_0 &nbsp;0xa23120] mean_volume: -27 dB
  22960. [Parsed_volumedetect_0 &nbsp;0xa23120] max_volume: -4 dB
  22961. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_4db: 6
  22962. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_5db: 62
  22963. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_6db: 286
  22964. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_7db: 1042
  22965. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_8db: 2551
  22966. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_9db: 4609
  22967. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_10db: 8409
  22968. </pre></div>
  22969. <p>It means that:
  22970. </p><ul class="itemize mark-bullet">
  22971. <li>The mean square energy is approximately -27 dB, or 10^-2.7.
  22972. </li><li>The largest sample is at -4 dB, or more precisely between -4 dB and -5 dB.
  22973. </li><li>There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc.
  22974. </li></ul>
  22975. <p>In other words, raising the volume by +4 dB does not cause any clipping,
  22976. raising it by +5 dB causes clipping for 6 samples, etc.
  22977. </p>
  22978. </div>
  22979. </div>
  22980. </div>
  22981. <div class="chapter-level-extent" id="Audio-Sources">
  22982. <h2 class="chapter"><span>30 Audio Sources<a class="copiable-link" href="#Audio-Sources"> &para;</a></span></h2>
  22983. <p>Below is a description of the currently available audio sources.
  22984. </p>
  22985. <ul class="mini-toc">
  22986. <li><a href="#abuffer" accesskey="1">abuffer</a></li>
  22987. <li><a href="#aevalsrc" accesskey="2">aevalsrc</a></li>
  22988. <li><a href="#afdelaysrc" accesskey="3">afdelaysrc</a></li>
  22989. <li><a href="#afireqsrc" accesskey="4">afireqsrc</a></li>
  22990. <li><a href="#afirsrc" accesskey="5">afirsrc</a></li>
  22991. <li><a href="#anullsrc" accesskey="6">anullsrc</a></li>
  22992. <li><a href="#flite" accesskey="7">flite</a></li>
  22993. <li><a href="#anoisesrc" accesskey="8">anoisesrc</a></li>
  22994. <li><a href="#hilbert" accesskey="9">hilbert</a></li>
  22995. <li><a href="#sinc">sinc</a></li>
  22996. <li><a href="#sine">sine</a></li>
  22997. </ul>
  22998. <div class="section-level-extent" id="abuffer">
  22999. <h3 class="section"><span>30.1 abuffer<a class="copiable-link" href="#abuffer"> &para;</a></span></h3>
  23000. <p>Buffer audio frames, and make them available to the filter chain.
  23001. </p>
  23002. <p>This source is mainly intended for a programmatic use, in particular
  23003. through the interface defined in <samp class="file">libavfilter/buffersrc.h</samp>.
  23004. </p>
  23005. <p>It accepts the following parameters:
  23006. </p><dl class="table">
  23007. <dt><samp class="option">time_base</samp></dt>
  23008. <dd><p>The timebase which will be used for timestamps of submitted frames. It must be
  23009. either a floating-point number or in <var class="var">numerator</var>/<var class="var">denominator</var> form.
  23010. </p>
  23011. </dd>
  23012. <dt><samp class="option">sample_rate</samp></dt>
  23013. <dd><p>The sample rate of the incoming audio buffers.
  23014. </p>
  23015. </dd>
  23016. <dt><samp class="option">sample_fmt</samp></dt>
  23017. <dd><p>The sample format of the incoming audio buffers.
  23018. Either a sample format name or its corresponding integer representation from
  23019. the enum AVSampleFormat in <samp class="file">libavutil/samplefmt.h</samp>
  23020. </p>
  23021. </dd>
  23022. <dt><samp class="option">channel_layout</samp></dt>
  23023. <dd><p>The channel layout of the incoming audio buffers.
  23024. Either a channel layout name from channel_layout_map in
  23025. <samp class="file">libavutil/channel_layout.c</samp> or its corresponding integer representation
  23026. from the AV_CH_LAYOUT_* macros in <samp class="file">libavutil/channel_layout.h</samp>
  23027. </p>
  23028. </dd>
  23029. <dt><samp class="option">channels</samp></dt>
  23030. <dd><p>The number of channels of the incoming audio buffers.
  23031. If both <var class="var">channels</var> and <var class="var">channel_layout</var> are specified, then they
  23032. must be consistent.
  23033. </p>
  23034. </dd>
  23035. </dl>
  23036. <ul class="mini-toc">
  23037. <li><a href="#Examples-54" accesskey="1">Examples</a></li>
  23038. </ul>
  23039. <div class="subsection-level-extent" id="Examples-54">
  23040. <h4 class="subsection"><span>30.1.1 Examples<a class="copiable-link" href="#Examples-54"> &para;</a></span></h4>
  23041. <div class="example">
  23042. <pre class="example-preformatted">abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
  23043. </pre></div>
  23044. <p>will instruct the source to accept planar 16bit signed stereo at 44100Hz.
  23045. Since the sample format with name &quot;s16p&quot; corresponds to the number
  23046. 6 and the &quot;stereo&quot; channel layout corresponds to the value 0x3, this is
  23047. equivalent to:
  23048. </p><div class="example">
  23049. <pre class="example-preformatted">abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
  23050. </pre></div>
  23051. </div>
  23052. </div>
  23053. <div class="section-level-extent" id="aevalsrc">
  23054. <h3 class="section"><span>30.2 aevalsrc<a class="copiable-link" href="#aevalsrc"> &para;</a></span></h3>
  23055. <p>Generate an audio signal specified by an expression.
  23056. </p>
  23057. <p>This source accepts in input one or more expressions (one for each
  23058. channel), which are evaluated and used to generate a corresponding
  23059. audio signal.
  23060. </p>
  23061. <p>This source accepts the following options:
  23062. </p>
  23063. <dl class="table">
  23064. <dt><samp class="option">exprs</samp></dt>
  23065. <dd><p>Set the &rsquo;|&rsquo;-separated expressions list for each separate channel. In case the
  23066. <samp class="option">channel_layout</samp> option is not specified, the selected channel layout
  23067. depends on the number of provided expressions. Otherwise the last
  23068. specified expression is applied to the remaining output channels.
  23069. </p>
  23070. </dd>
  23071. <dt><samp class="option">channel_layout, c</samp></dt>
  23072. <dd><p>Set the channel layout. The number of channels in the specified layout
  23073. must be equal to the number of specified expressions.
  23074. </p>
  23075. </dd>
  23076. <dt><samp class="option">duration, d</samp></dt>
  23077. <dd><p>Set the minimum duration of the sourced audio. See
  23078. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  23079. for the accepted syntax.
  23080. Note that the resulting duration may be greater than the specified
  23081. duration, as the generated audio is always cut at the end of a
  23082. complete frame.
  23083. </p>
  23084. <p>If not specified, or the expressed duration is negative, the audio is
  23085. supposed to be generated forever.
  23086. </p>
  23087. </dd>
  23088. <dt><samp class="option">nb_samples, n</samp></dt>
  23089. <dd><p>Set the number of samples per channel per each output frame,
  23090. default to 1024.
  23091. </p>
  23092. </dd>
  23093. <dt><samp class="option">sample_rate, s</samp></dt>
  23094. <dd><p>Specify the sample rate, default to 44100.
  23095. </p></dd>
  23096. </dl>
  23097. <p>Each expression in <var class="var">exprs</var> can contain the following constants:
  23098. </p>
  23099. <dl class="table">
  23100. <dt><samp class="option">n</samp></dt>
  23101. <dd><p>number of the evaluated sample, starting from 0
  23102. </p>
  23103. </dd>
  23104. <dt><samp class="option">t</samp></dt>
  23105. <dd><p>time of the evaluated sample expressed in seconds, starting from 0
  23106. </p>
  23107. </dd>
  23108. <dt><samp class="option">s</samp></dt>
  23109. <dd><p>sample rate
  23110. </p>
  23111. </dd>
  23112. </dl>
  23113. <ul class="mini-toc">
  23114. <li><a href="#Examples-55" accesskey="1">Examples</a></li>
  23115. </ul>
  23116. <div class="subsection-level-extent" id="Examples-55">
  23117. <h4 class="subsection"><span>30.2.1 Examples<a class="copiable-link" href="#Examples-55"> &para;</a></span></h4>
  23118. <ul class="itemize mark-bullet">
  23119. <li>Generate silence:
  23120. <div class="example">
  23121. <pre class="example-preformatted">aevalsrc=0
  23122. </pre></div>
  23123. </li><li>Generate a sin signal with frequency of 440 Hz, set sample rate to
  23124. 8000 Hz:
  23125. <div class="example">
  23126. <pre class="example-preformatted">aevalsrc=&quot;sin(440*2*PI*t):s=8000&quot;
  23127. </pre></div>
  23128. </li><li>Generate a two channels signal, specify the channel layout (Front
  23129. Center + Back Center) explicitly:
  23130. <div class="example">
  23131. <pre class="example-preformatted">aevalsrc=&quot;sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC&quot;
  23132. </pre></div>
  23133. </li><li>Generate white noise:
  23134. <div class="example">
  23135. <pre class="example-preformatted">aevalsrc=&quot;-2+random(0)&quot;
  23136. </pre></div>
  23137. </li><li>Generate an amplitude modulated signal:
  23138. <div class="example">
  23139. <pre class="example-preformatted">aevalsrc=&quot;sin(10*2*PI*t)*sin(880*2*PI*t)&quot;
  23140. </pre></div>
  23141. </li><li>Generate 2.5 Hz binaural beats on a 360 Hz carrier:
  23142. <div class="example">
  23143. <pre class="example-preformatted">aevalsrc=&quot;0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)&quot;
  23144. </pre></div>
  23145. </li></ul>
  23146. </div>
  23147. </div>
  23148. <div class="section-level-extent" id="afdelaysrc">
  23149. <h3 class="section"><span>30.3 afdelaysrc<a class="copiable-link" href="#afdelaysrc"> &para;</a></span></h3>
  23150. <p>Generate a fractional delay FIR coefficients.
  23151. </p>
  23152. <p>The resulting stream can be used with <a class="ref" href="#afir">afir</a> filter for filtering the audio signal.
  23153. </p>
  23154. <p>The filter accepts the following options:
  23155. </p>
  23156. <dl class="table">
  23157. <dt><samp class="option">delay, d</samp></dt>
  23158. <dd><p>Set the fractional delay. Default is 0.
  23159. </p>
  23160. </dd>
  23161. <dt><samp class="option">sample_rate, r</samp></dt>
  23162. <dd><p>Set the sample rate, default is 44100.
  23163. </p>
  23164. </dd>
  23165. <dt><samp class="option">nb_samples, n</samp></dt>
  23166. <dd><p>Set the number of samples per each frame. Default is 1024.
  23167. </p>
  23168. </dd>
  23169. <dt><samp class="option">taps, t</samp></dt>
  23170. <dd><p>Set the number of filter coefficients in output audio stream.
  23171. Default value is 0.
  23172. </p>
  23173. </dd>
  23174. <dt><samp class="option">channel_layout, c</samp></dt>
  23175. <dd><p>Specifies the channel layout, and can be a string representing a channel layout.
  23176. The default value of <var class="var">channel_layout</var> is &quot;stereo&quot;.
  23177. </p></dd>
  23178. </dl>
  23179. </div>
  23180. <div class="section-level-extent" id="afireqsrc">
  23181. <h3 class="section"><span>30.4 afireqsrc<a class="copiable-link" href="#afireqsrc"> &para;</a></span></h3>
  23182. <p>Generate a FIR equalizer coefficients.
  23183. </p>
  23184. <p>The resulting stream can be used with <a class="ref" href="#afir">afir</a> filter for filtering the audio signal.
  23185. </p>
  23186. <p>The filter accepts the following options:
  23187. </p>
  23188. <dl class="table">
  23189. <dt><samp class="option">preset, p</samp></dt>
  23190. <dd><p>Set equalizer preset.
  23191. Default preset is <code class="code">flat</code>.
  23192. </p>
  23193. <p>Available presets are:
  23194. </p><dl class="table">
  23195. <dt>&lsquo;<samp class="samp">custom</samp>&rsquo;</dt>
  23196. <dt>&lsquo;<samp class="samp">flat</samp>&rsquo;</dt>
  23197. <dt>&lsquo;<samp class="samp">acoustic</samp>&rsquo;</dt>
  23198. <dt>&lsquo;<samp class="samp">bass</samp>&rsquo;</dt>
  23199. <dt>&lsquo;<samp class="samp">beats</samp>&rsquo;</dt>
  23200. <dt>&lsquo;<samp class="samp">classic</samp>&rsquo;</dt>
  23201. <dt>&lsquo;<samp class="samp">clear</samp>&rsquo;</dt>
  23202. <dt>&lsquo;<samp class="samp">deep bass</samp>&rsquo;</dt>
  23203. <dt>&lsquo;<samp class="samp">dubstep</samp>&rsquo;</dt>
  23204. <dt>&lsquo;<samp class="samp">electronic</samp>&rsquo;</dt>
  23205. <dt>&lsquo;<samp class="samp">hard-style</samp>&rsquo;</dt>
  23206. <dt>&lsquo;<samp class="samp">hip-hop</samp>&rsquo;</dt>
  23207. <dt>&lsquo;<samp class="samp">jazz</samp>&rsquo;</dt>
  23208. <dt>&lsquo;<samp class="samp">metal</samp>&rsquo;</dt>
  23209. <dt>&lsquo;<samp class="samp">movie</samp>&rsquo;</dt>
  23210. <dt>&lsquo;<samp class="samp">pop</samp>&rsquo;</dt>
  23211. <dt>&lsquo;<samp class="samp">r&amp;b</samp>&rsquo;</dt>
  23212. <dt>&lsquo;<samp class="samp">rock</samp>&rsquo;</dt>
  23213. <dt>&lsquo;<samp class="samp">vocal booster</samp>&rsquo;</dt>
  23214. </dl>
  23215. </dd>
  23216. <dt><samp class="option">gains, g</samp></dt>
  23217. <dd><p>Set custom gains for each band. Only used if the preset option is set to <code class="code">custom</code>.
  23218. Gains are separated by white spaces and each gain is set in dBFS.
  23219. Default is <code class="code">0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</code>.
  23220. </p>
  23221. </dd>
  23222. <dt><samp class="option">bands, b</samp></dt>
  23223. <dd><p>Set the custom bands from where custon equalizer gains are set.
  23224. This must be in strictly increasing order. Only used if the preset option is set to <code class="code">custom</code>.
  23225. Bands are separated by white spaces and each band represent frequency in Hz.
  23226. Default is <code class="code">25 40 63 100 160 250 400 630 1000 1600 2500 4000 6300 10000 16000 24000</code>.
  23227. </p>
  23228. </dd>
  23229. <dt><samp class="option">taps, t</samp></dt>
  23230. <dd><p>Set number of filter coefficients in output audio stream.
  23231. Default value is <code class="code">4096</code>.
  23232. </p>
  23233. </dd>
  23234. <dt><samp class="option">sample_rate, r</samp></dt>
  23235. <dd><p>Set sample rate of output audio stream, default is <code class="code">44100</code>.
  23236. </p>
  23237. </dd>
  23238. <dt><samp class="option">nb_samples, n</samp></dt>
  23239. <dd><p>Set number of samples per each frame in output audio stream. Default is <code class="code">1024</code>.
  23240. </p>
  23241. </dd>
  23242. <dt><samp class="option">interp, i</samp></dt>
  23243. <dd><p>Set interpolation method for FIR equalizer coefficients. Can be <code class="code">linear</code> or <code class="code">cubic</code>.
  23244. </p>
  23245. </dd>
  23246. <dt><samp class="option">phase, h</samp></dt>
  23247. <dd><p>Set phase type of FIR filter. Can be <code class="code">linear</code> or <code class="code">min</code>: minimum-phase.
  23248. Default is minimum-phase filter.
  23249. </p></dd>
  23250. </dl>
  23251. </div>
  23252. <div class="section-level-extent" id="afirsrc">
  23253. <h3 class="section"><span>30.5 afirsrc<a class="copiable-link" href="#afirsrc"> &para;</a></span></h3>
  23254. <p>Generate a FIR coefficients using frequency sampling method.
  23255. </p>
  23256. <p>The resulting stream can be used with <a class="ref" href="#afir">afir</a> filter for filtering the audio signal.
  23257. </p>
  23258. <p>The filter accepts the following options:
  23259. </p>
  23260. <dl class="table">
  23261. <dt><samp class="option">taps, t</samp></dt>
  23262. <dd><p>Set number of filter coefficients in output audio stream.
  23263. Default value is 1025.
  23264. </p>
  23265. </dd>
  23266. <dt><samp class="option">frequency, f</samp></dt>
  23267. <dd><p>Set frequency points from where magnitude and phase are set.
  23268. This must be in non decreasing order, and first element must be 0, while last element
  23269. must be 1. Elements are separated by white spaces.
  23270. </p>
  23271. </dd>
  23272. <dt><samp class="option">magnitude, m</samp></dt>
  23273. <dd><p>Set magnitude value for every frequency point set by <samp class="option">frequency</samp>.
  23274. Number of values must be same as number of frequency points.
  23275. Values are separated by white spaces.
  23276. </p>
  23277. </dd>
  23278. <dt><samp class="option">phase, p</samp></dt>
  23279. <dd><p>Set phase value for every frequency point set by <samp class="option">frequency</samp>.
  23280. Number of values must be same as number of frequency points.
  23281. Values are separated by white spaces.
  23282. </p>
  23283. </dd>
  23284. <dt><samp class="option">sample_rate, r</samp></dt>
  23285. <dd><p>Set sample rate, default is 44100.
  23286. </p>
  23287. </dd>
  23288. <dt><samp class="option">nb_samples, n</samp></dt>
  23289. <dd><p>Set number of samples per each frame. Default is 1024.
  23290. </p>
  23291. </dd>
  23292. <dt><samp class="option">win_func, w</samp></dt>
  23293. <dd><p>Set window function. Default is blackman.
  23294. </p></dd>
  23295. </dl>
  23296. </div>
  23297. <div class="section-level-extent" id="anullsrc">
  23298. <h3 class="section"><span>30.6 anullsrc<a class="copiable-link" href="#anullsrc"> &para;</a></span></h3>
  23299. <p>The null audio source, return unprocessed audio frames. It is mainly useful
  23300. as a template and to be employed in analysis / debugging tools, or as
  23301. the source for filters which ignore the input data (for example the sox
  23302. synth filter).
  23303. </p>
  23304. <p>This source accepts the following options:
  23305. </p>
  23306. <dl class="table">
  23307. <dt><samp class="option">channel_layout, cl</samp></dt>
  23308. <dd>
  23309. <p>Specifies the channel layout, and can be either an integer or a string
  23310. representing a channel layout. The default value of <var class="var">channel_layout</var>
  23311. is &quot;stereo&quot;.
  23312. </p>
  23313. <p>Check the channel_layout_map definition in
  23314. <samp class="file">libavutil/channel_layout.c</samp> for the mapping between strings and
  23315. channel layout values.
  23316. </p>
  23317. </dd>
  23318. <dt><samp class="option">sample_rate, r</samp></dt>
  23319. <dd><p>Specifies the sample rate, and defaults to 44100.
  23320. </p>
  23321. </dd>
  23322. <dt><samp class="option">nb_samples, n</samp></dt>
  23323. <dd><p>Set the number of samples per requested frames.
  23324. </p>
  23325. </dd>
  23326. <dt><samp class="option">duration, d</samp></dt>
  23327. <dd><p>Set the duration of the sourced audio. See
  23328. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  23329. for the accepted syntax.
  23330. </p>
  23331. <p>If not specified, or the expressed duration is negative, the audio is
  23332. supposed to be generated forever.
  23333. </p></dd>
  23334. </dl>
  23335. <ul class="mini-toc">
  23336. <li><a href="#Examples-56" accesskey="1">Examples</a></li>
  23337. </ul>
  23338. <div class="subsection-level-extent" id="Examples-56">
  23339. <h4 class="subsection"><span>30.6.1 Examples<a class="copiable-link" href="#Examples-56"> &para;</a></span></h4>
  23340. <ul class="itemize mark-bullet">
  23341. <li>Set the sample rate to 48000 Hz and the channel layout to AV_CH_LAYOUT_MONO.
  23342. <div class="example">
  23343. <pre class="example-preformatted">anullsrc=r=48000:cl=4
  23344. </pre></div>
  23345. </li><li>Do the same operation with a more obvious syntax:
  23346. <div class="example">
  23347. <pre class="example-preformatted">anullsrc=r=48000:cl=mono
  23348. </pre></div>
  23349. </li></ul>
  23350. <p>All the parameters need to be explicitly defined.
  23351. </p>
  23352. </div>
  23353. </div>
  23354. <div class="section-level-extent" id="flite">
  23355. <h3 class="section"><span>30.7 flite<a class="copiable-link" href="#flite"> &para;</a></span></h3>
  23356. <p>Synthesize a voice utterance using the libflite library.
  23357. </p>
  23358. <p>To enable compilation of this filter you need to configure FFmpeg with
  23359. <code class="code">--enable-libflite</code>.
  23360. </p>
  23361. <p>Note that versions of the flite library prior to 2.0 are not thread-safe.
  23362. </p>
  23363. <p>The filter accepts the following options:
  23364. </p>
  23365. <dl class="table">
  23366. <dt><samp class="option">list_voices</samp></dt>
  23367. <dd><p>If set to 1, list the names of the available voices and exit
  23368. immediately. Default value is 0.
  23369. </p>
  23370. </dd>
  23371. <dt><samp class="option">nb_samples, n</samp></dt>
  23372. <dd><p>Set the maximum number of samples per frame. Default value is 512.
  23373. </p>
  23374. </dd>
  23375. <dt><samp class="option">textfile</samp></dt>
  23376. <dd><p>Set the filename containing the text to speak.
  23377. </p>
  23378. </dd>
  23379. <dt><samp class="option">text</samp></dt>
  23380. <dd><p>Set the text to speak.
  23381. </p>
  23382. </dd>
  23383. <dt><samp class="option">voice, v</samp></dt>
  23384. <dd><p>Set the voice to use for the speech synthesis. Default value is
  23385. <code class="code">kal</code>. See also the <var class="var">list_voices</var> option.
  23386. </p></dd>
  23387. </dl>
  23388. <ul class="mini-toc">
  23389. <li><a href="#Examples-57" accesskey="1">Examples</a></li>
  23390. </ul>
  23391. <div class="subsection-level-extent" id="Examples-57">
  23392. <h4 class="subsection"><span>30.7.1 Examples<a class="copiable-link" href="#Examples-57"> &para;</a></span></h4>
  23393. <ul class="itemize mark-bullet">
  23394. <li>Read from file <samp class="file">speech.txt</samp>, and synthesize the text using the
  23395. standard flite voice:
  23396. <div class="example">
  23397. <pre class="example-preformatted">flite=textfile=speech.txt
  23398. </pre></div>
  23399. </li><li>Read the specified text selecting the <code class="code">slt</code> voice:
  23400. <div class="example">
  23401. <pre class="example-preformatted">flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
  23402. </pre></div>
  23403. </li><li>Input text to ffmpeg:
  23404. <div class="example">
  23405. <pre class="example-preformatted">ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
  23406. </pre></div>
  23407. </li><li>Make <samp class="file">ffplay</samp> speak the specified text, using <code class="code">flite</code> and
  23408. the <code class="code">lavfi</code> device:
  23409. <div class="example">
  23410. <pre class="example-preformatted">ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
  23411. </pre></div>
  23412. </li></ul>
  23413. <p>For more information about libflite, check:
  23414. <a class="url" href="http://www.festvox.org/flite/">http://www.festvox.org/flite/</a>
  23415. </p>
  23416. </div>
  23417. </div>
  23418. <div class="section-level-extent" id="anoisesrc">
  23419. <h3 class="section"><span>30.8 anoisesrc<a class="copiable-link" href="#anoisesrc"> &para;</a></span></h3>
  23420. <p>Generate a noise audio signal.
  23421. </p>
  23422. <p>The filter accepts the following options:
  23423. </p>
  23424. <dl class="table">
  23425. <dt><samp class="option">sample_rate, r</samp></dt>
  23426. <dd><p>Specify the sample rate. Default value is 48000 Hz.
  23427. </p>
  23428. </dd>
  23429. <dt><samp class="option">amplitude, a</samp></dt>
  23430. <dd><p>Specify the amplitude (0.0 - 1.0) of the generated audio stream. Default value
  23431. is 1.0.
  23432. </p>
  23433. </dd>
  23434. <dt><samp class="option">duration, d</samp></dt>
  23435. <dd><p>Specify the duration of the generated audio stream. Not specifying this option
  23436. results in noise with an infinite length.
  23437. </p>
  23438. </dd>
  23439. <dt><samp class="option">color, colour, c</samp></dt>
  23440. <dd><p>Specify the color of noise. Available noise colors are white, pink, brown,
  23441. blue, violet and velvet. Default color is white.
  23442. </p>
  23443. </dd>
  23444. <dt><samp class="option">seed, s</samp></dt>
  23445. <dd><p>Specify a value used to seed the PRNG.
  23446. </p>
  23447. </dd>
  23448. <dt><samp class="option">nb_samples, n</samp></dt>
  23449. <dd><p>Set the number of samples per each output frame, default is 1024.
  23450. </p>
  23451. </dd>
  23452. <dt><samp class="option">density</samp></dt>
  23453. <dd><p>Set the density (0.0 - 1.0) for the velvet noise generator, default is 0.05.
  23454. </p></dd>
  23455. </dl>
  23456. <ul class="mini-toc">
  23457. <li><a href="#Examples-58" accesskey="1">Examples</a></li>
  23458. </ul>
  23459. <div class="subsection-level-extent" id="Examples-58">
  23460. <h4 class="subsection"><span>30.8.1 Examples<a class="copiable-link" href="#Examples-58"> &para;</a></span></h4>
  23461. <ul class="itemize mark-bullet">
  23462. <li>Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate and an amplitude of 0.5:
  23463. <div class="example">
  23464. <pre class="example-preformatted">anoisesrc=d=60:c=pink:r=44100:a=0.5
  23465. </pre></div>
  23466. </li></ul>
  23467. </div>
  23468. </div>
  23469. <div class="section-level-extent" id="hilbert">
  23470. <h3 class="section"><span>30.9 hilbert<a class="copiable-link" href="#hilbert"> &para;</a></span></h3>
  23471. <p>Generate odd-tap Hilbert transform FIR coefficients.
  23472. </p>
  23473. <p>The resulting stream can be used with <a class="ref" href="#afir">afir</a> filter for phase-shifting
  23474. the signal by 90 degrees.
  23475. </p>
  23476. <p>This is used in many matrix coding schemes and for analytic signal generation.
  23477. The process is often written as a multiplication by i (or j), the imaginary unit.
  23478. </p>
  23479. <p>The filter accepts the following options:
  23480. </p>
  23481. <dl class="table">
  23482. <dt><samp class="option">sample_rate, s</samp></dt>
  23483. <dd><p>Set sample rate, default is 44100.
  23484. </p>
  23485. </dd>
  23486. <dt><samp class="option">taps, t</samp></dt>
  23487. <dd><p>Set length of FIR filter, default is 22051.
  23488. </p>
  23489. </dd>
  23490. <dt><samp class="option">nb_samples, n</samp></dt>
  23491. <dd><p>Set number of samples per each frame.
  23492. </p>
  23493. </dd>
  23494. <dt><samp class="option">win_func, w</samp></dt>
  23495. <dd><p>Set window function to be used when generating FIR coefficients.
  23496. </p></dd>
  23497. </dl>
  23498. </div>
  23499. <div class="section-level-extent" id="sinc">
  23500. <h3 class="section"><span>30.10 sinc<a class="copiable-link" href="#sinc"> &para;</a></span></h3>
  23501. <p>Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.
  23502. </p>
  23503. <p>The resulting stream can be used with <a class="ref" href="#afir">afir</a> filter for filtering the audio signal.
  23504. </p>
  23505. <p>The filter accepts the following options:
  23506. </p>
  23507. <dl class="table">
  23508. <dt><samp class="option">sample_rate, r</samp></dt>
  23509. <dd><p>Set sample rate, default is 44100.
  23510. </p>
  23511. </dd>
  23512. <dt><samp class="option">nb_samples, n</samp></dt>
  23513. <dd><p>Set number of samples per each frame. Default is 1024.
  23514. </p>
  23515. </dd>
  23516. <dt><samp class="option">hp</samp></dt>
  23517. <dd><p>Set high-pass frequency. Default is 0.
  23518. </p>
  23519. </dd>
  23520. <dt><samp class="option">lp</samp></dt>
  23521. <dd><p>Set low-pass frequency. Default is 0.
  23522. If high-pass frequency is lower than low-pass frequency and low-pass frequency
  23523. is higher than 0 then filter will create band-pass filter coefficients,
  23524. otherwise band-reject filter coefficients.
  23525. </p>
  23526. </dd>
  23527. <dt><samp class="option">phase</samp></dt>
  23528. <dd><p>Set filter phase response. Default is 50. Allowed range is from 0 to 100.
  23529. </p>
  23530. </dd>
  23531. <dt><samp class="option">beta</samp></dt>
  23532. <dd><p>Set Kaiser window beta.
  23533. </p>
  23534. </dd>
  23535. <dt><samp class="option">att</samp></dt>
  23536. <dd><p>Set stop-band attenuation. Default is 120dB, allowed range is from 40 to 180 dB.
  23537. </p>
  23538. </dd>
  23539. <dt><samp class="option">round</samp></dt>
  23540. <dd><p>Enable rounding, by default is disabled.
  23541. </p>
  23542. </dd>
  23543. <dt><samp class="option">hptaps</samp></dt>
  23544. <dd><p>Set number of taps for high-pass filter.
  23545. </p>
  23546. </dd>
  23547. <dt><samp class="option">lptaps</samp></dt>
  23548. <dd><p>Set number of taps for low-pass filter.
  23549. </p></dd>
  23550. </dl>
  23551. </div>
  23552. <div class="section-level-extent" id="sine">
  23553. <h3 class="section"><span>30.11 sine<a class="copiable-link" href="#sine"> &para;</a></span></h3>
  23554. <p>Generate an audio signal made of a sine wave with amplitude 1/8.
  23555. </p>
  23556. <p>The audio signal is bit-exact.
  23557. </p>
  23558. <p>The filter accepts the following options:
  23559. </p>
  23560. <dl class="table">
  23561. <dt><samp class="option">frequency, f</samp></dt>
  23562. <dd><p>Set the carrier frequency. Default is 440 Hz.
  23563. </p>
  23564. </dd>
  23565. <dt><samp class="option">beep_factor, b</samp></dt>
  23566. <dd><p>Enable a periodic beep every second with frequency <var class="var">beep_factor</var> times
  23567. the carrier frequency. Default is 0, meaning the beep is disabled.
  23568. </p>
  23569. </dd>
  23570. <dt><samp class="option">sample_rate, r</samp></dt>
  23571. <dd><p>Specify the sample rate, default is 44100.
  23572. </p>
  23573. </dd>
  23574. <dt><samp class="option">duration, d</samp></dt>
  23575. <dd><p>Specify the duration of the generated audio stream.
  23576. </p>
  23577. </dd>
  23578. <dt><samp class="option">samples_per_frame</samp></dt>
  23579. <dd><p>Set the number of samples per output frame.
  23580. </p>
  23581. <p>The expression can contain the following constants:
  23582. </p>
  23583. <dl class="table">
  23584. <dt><samp class="option">n</samp></dt>
  23585. <dd><p>The (sequential) number of the output audio frame, starting from 0.
  23586. </p>
  23587. </dd>
  23588. <dt><samp class="option">pts</samp></dt>
  23589. <dd><p>The PTS (Presentation TimeStamp) of the output audio frame,
  23590. expressed in <var class="var">TB</var> units.
  23591. </p>
  23592. </dd>
  23593. <dt><samp class="option">t</samp></dt>
  23594. <dd><p>The PTS of the output audio frame, expressed in seconds.
  23595. </p>
  23596. </dd>
  23597. <dt><samp class="option">TB</samp></dt>
  23598. <dd><p>The timebase of the output audio frames.
  23599. </p></dd>
  23600. </dl>
  23601. <p>Default is <code class="code">1024</code>.
  23602. </p></dd>
  23603. </dl>
  23604. <ul class="mini-toc">
  23605. <li><a href="#Examples-59" accesskey="1">Examples</a></li>
  23606. </ul>
  23607. <div class="subsection-level-extent" id="Examples-59">
  23608. <h4 class="subsection"><span>30.11.1 Examples<a class="copiable-link" href="#Examples-59"> &para;</a></span></h4>
  23609. <ul class="itemize mark-bullet">
  23610. <li>Generate a simple 440 Hz sine wave:
  23611. <div class="example">
  23612. <pre class="example-preformatted">sine
  23613. </pre></div>
  23614. </li><li>Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5 seconds:
  23615. <div class="example">
  23616. <pre class="example-preformatted">sine=220:4:d=5
  23617. sine=f=220:b=4:d=5
  23618. sine=frequency=220:beep_factor=4:duration=5
  23619. </pre></div>
  23620. </li><li>Generate a 1 kHz sine wave following <code class="code">1602,1601,1602,1601,1602</code> NTSC
  23621. pattern:
  23622. <div class="example">
  23623. <pre class="example-preformatted">sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
  23624. </pre></div>
  23625. </li></ul>
  23626. </div>
  23627. </div>
  23628. </div>
  23629. <div class="chapter-level-extent" id="Audio-Sinks">
  23630. <h2 class="chapter"><span>31 Audio Sinks<a class="copiable-link" href="#Audio-Sinks"> &para;</a></span></h2>
  23631. <p>Below is a description of the currently available audio sinks.
  23632. </p>
  23633. <ul class="mini-toc">
  23634. <li><a href="#abuffersink" accesskey="1">abuffersink</a></li>
  23635. <li><a href="#anullsink" accesskey="2">anullsink</a></li>
  23636. </ul>
  23637. <div class="section-level-extent" id="abuffersink">
  23638. <h3 class="section"><span>31.1 abuffersink<a class="copiable-link" href="#abuffersink"> &para;</a></span></h3>
  23639. <p>Buffer audio frames, and make them available to the end of filter chain.
  23640. </p>
  23641. <p>This sink is mainly intended for programmatic use, in particular
  23642. through the interface defined in <samp class="file">libavfilter/buffersink.h</samp>
  23643. or the options system.
  23644. </p>
  23645. <p>It accepts a pointer to an AVABufferSinkContext structure, which
  23646. defines the incoming buffers&rsquo; formats, to be passed as the opaque
  23647. parameter to <code class="code">avfilter_init_filter</code> for initialization.
  23648. </p></div>
  23649. <div class="section-level-extent" id="anullsink">
  23650. <h3 class="section"><span>31.2 anullsink<a class="copiable-link" href="#anullsink"> &para;</a></span></h3>
  23651. <p>Null audio sink; do absolutely nothing with the input audio. It is
  23652. mainly useful as a template and for use in analysis / debugging
  23653. tools.
  23654. </p>
  23655. </div>
  23656. </div>
  23657. <div class="chapter-level-extent" id="Video-Filters">
  23658. <h2 class="chapter"><span>32 Video Filters<a class="copiable-link" href="#Video-Filters"> &para;</a></span></h2>
  23659. <p>When you configure your FFmpeg build, you can disable any of the
  23660. existing filters using <code class="code">--disable-filters</code>.
  23661. The configure output will show the video filters included in your
  23662. build.
  23663. </p>
  23664. <p>Below is a description of the currently available video filters.
  23665. </p>
  23666. <ul class="mini-toc">
  23667. <li><a href="#addroi" accesskey="1">addroi</a></li>
  23668. <li><a href="#alphaextract" accesskey="2">alphaextract</a></li>
  23669. <li><a href="#alphamerge" accesskey="3">alphamerge</a></li>
  23670. <li><a href="#amplify" accesskey="4">amplify</a></li>
  23671. <li><a href="#ass" accesskey="5">ass</a></li>
  23672. <li><a href="#atadenoise" accesskey="6">atadenoise</a></li>
  23673. <li><a href="#avgblur" accesskey="7">avgblur</a></li>
  23674. <li><a href="#backgroundkey" accesskey="8">backgroundkey</a></li>
  23675. <li><a href="#bbox" accesskey="9">bbox</a></li>
  23676. <li><a href="#bilateral">bilateral</a></li>
  23677. <li><a href="#bilateral_005fcuda">bilateral_cuda</a></li>
  23678. <li><a href="#bitplanenoise">bitplanenoise</a></li>
  23679. <li><a href="#blackdetect">blackdetect</a></li>
  23680. <li><a href="#blackframe">blackframe</a></li>
  23681. <li><a href="#blend-1">blend</a></li>
  23682. <li><a href="#blockdetect-1">blockdetect</a></li>
  23683. <li><a href="#blurdetect-1">blurdetect</a></li>
  23684. <li><a href="#bm3d">bm3d</a></li>
  23685. <li><a href="#boxblur">boxblur</a></li>
  23686. <li><a href="#bwdif-1">bwdif</a></li>
  23687. <li><a href="#bwdif_005fcuda">bwdif_cuda</a></li>
  23688. <li><a href="#ccrepack">ccrepack</a></li>
  23689. <li><a href="#cas">cas</a></li>
  23690. <li><a href="#chromahold">chromahold</a></li>
  23691. <li><a href="#chromakey-1">chromakey</a></li>
  23692. <li><a href="#chromakey_005fcuda">chromakey_cuda</a></li>
  23693. <li><a href="#chromanr">chromanr</a></li>
  23694. <li><a href="#chromashift">chromashift</a></li>
  23695. <li><a href="#ciescope">ciescope</a></li>
  23696. <li><a href="#codecview">codecview</a></li>
  23697. <li><a href="#colorbalance">colorbalance</a></li>
  23698. <li><a href="#colorcontrast">colorcontrast</a></li>
  23699. <li><a href="#colorcorrect">colorcorrect</a></li>
  23700. <li><a href="#colorchannelmixer">colorchannelmixer</a></li>
  23701. <li><a href="#colorize">colorize</a></li>
  23702. <li><a href="#colorkey">colorkey</a></li>
  23703. <li><a href="#colorhold">colorhold</a></li>
  23704. <li><a href="#colorlevels">colorlevels</a></li>
  23705. <li><a href="#colormap">colormap</a></li>
  23706. <li><a href="#colormatrix">colormatrix</a></li>
  23707. <li><a href="#colorspace">colorspace</a></li>
  23708. <li><a href="#colorspace_005fcuda">colorspace_cuda</a></li>
  23709. <li><a href="#colortemperature">colortemperature</a></li>
  23710. <li><a href="#convolution">convolution</a></li>
  23711. <li><a href="#convolve">convolve</a></li>
  23712. <li><a href="#copy">copy</a></li>
  23713. <li><a href="#coreimage-1">coreimage</a></li>
  23714. <li><a href="#corr">corr</a></li>
  23715. <li><a href="#cover_005frect">cover_rect</a></li>
  23716. <li><a href="#crop">crop</a></li>
  23717. <li><a href="#cropdetect">cropdetect</a></li>
  23718. <li><a href="#cue-1">cue</a></li>
  23719. <li><a href="#curves-1">curves</a></li>
  23720. <li><a href="#datascope">datascope</a></li>
  23721. <li><a href="#dblur">dblur</a></li>
  23722. <li><a href="#dctdnoiz">dctdnoiz</a></li>
  23723. <li><a href="#deband">deband</a></li>
  23724. <li><a href="#deblock">deblock</a></li>
  23725. <li><a href="#decimate-1">decimate</a></li>
  23726. <li><a href="#deconvolve">deconvolve</a></li>
  23727. <li><a href="#dedot">dedot</a></li>
  23728. <li><a href="#deflate">deflate</a></li>
  23729. <li><a href="#deflicker">deflicker</a></li>
  23730. <li><a href="#dejudder">dejudder</a></li>
  23731. <li><a href="#delogo">delogo</a></li>
  23732. <li><a href="#derain-1">derain</a></li>
  23733. <li><a href="#deshake">deshake</a></li>
  23734. <li><a href="#despill">despill</a></li>
  23735. <li><a href="#detelecine">detelecine</a></li>
  23736. <li><a href="#dilation-1">dilation</a></li>
  23737. <li><a href="#displace">displace</a></li>
  23738. <li><a href="#dnn_005fclassify">dnn_classify</a></li>
  23739. <li><a href="#dnn_005fdetect">dnn_detect</a></li>
  23740. <li><a href="#dnn_005fprocessing-1">dnn_processing</a></li>
  23741. <li><a href="#drawbox">drawbox</a></li>
  23742. <li><a href="#drawgraph-1">drawgraph</a></li>
  23743. <li><a href="#drawgrid">drawgrid</a></li>
  23744. <li><a href="#drawtext-1">drawtext</a></li>
  23745. <li><a href="#edgedetect">edgedetect</a></li>
  23746. <li><a href="#elbg">elbg</a></li>
  23747. <li><a href="#entropy">entropy</a></li>
  23748. <li><a href="#epx">epx</a></li>
  23749. <li><a href="#eq">eq</a></li>
  23750. <li><a href="#erosion-1">erosion</a></li>
  23751. <li><a href="#estdif">estdif</a></li>
  23752. <li><a href="#exposure">exposure</a></li>
  23753. <li><a href="#extractplanes">extractplanes</a></li>
  23754. <li><a href="#fade">fade</a></li>
  23755. <li><a href="#feedback">feedback</a></li>
  23756. <li><a href="#fftdnoiz">fftdnoiz</a></li>
  23757. <li><a href="#fftfilt">fftfilt</a></li>
  23758. <li><a href="#field">field</a></li>
  23759. <li><a href="#fieldhint">fieldhint</a></li>
  23760. <li><a href="#fieldmatch">fieldmatch</a></li>
  23761. <li><a href="#fieldorder">fieldorder</a></li>
  23762. <li><a href="#fillborders">fillborders</a></li>
  23763. <li><a href="#find_005frect">find_rect</a></li>
  23764. <li><a href="#floodfill">floodfill</a></li>
  23765. <li><a href="#format-1">format</a></li>
  23766. <li><a href="#fps-1">fps</a></li>
  23767. <li><a href="#framepack">framepack</a></li>
  23768. <li><a href="#framerate">framerate</a></li>
  23769. <li><a href="#framestep">framestep</a></li>
  23770. <li><a href="#freezedetect">freezedetect</a></li>
  23771. <li><a href="#freezeframes">freezeframes</a></li>
  23772. <li><a href="#frei0r-1">frei0r</a></li>
  23773. <li><a href="#fspp">fspp</a></li>
  23774. <li><a href="#fsync-1">fsync</a></li>
  23775. <li><a href="#gblur">gblur</a></li>
  23776. <li><a href="#geq">geq</a></li>
  23777. <li><a href="#gradfun">gradfun</a></li>
  23778. <li><a href="#graphmonitor-1">graphmonitor</a></li>
  23779. <li><a href="#grayworld">grayworld</a></li>
  23780. <li><a href="#greyedge">greyedge</a></li>
  23781. <li><a href="#guided">guided</a></li>
  23782. <li><a href="#haldclut-1">haldclut</a></li>
  23783. <li><a href="#hflip">hflip</a></li>
  23784. <li><a href="#histeq">histeq</a></li>
  23785. <li><a href="#histogram-1">histogram</a></li>
  23786. <li><a href="#hqdn3d-1">hqdn3d</a></li>
  23787. <li><a href="#hwdownload-1">hwdownload</a></li>
  23788. <li><a href="#hwmap">hwmap</a></li>
  23789. <li><a href="#hwupload-1">hwupload</a></li>
  23790. <li><a href="#hwupload_005fcuda-1">hwupload_cuda</a></li>
  23791. <li><a href="#hqx">hqx</a></li>
  23792. <li><a href="#hstack-1">hstack</a></li>
  23793. <li><a href="#hsvhold">hsvhold</a></li>
  23794. <li><a href="#hsvkey">hsvkey</a></li>
  23795. <li><a href="#hue">hue</a></li>
  23796. <li><a href="#huesaturation">huesaturation</a></li>
  23797. <li><a href="#hysteresis">hysteresis</a></li>
  23798. <li><a href="#iccdetect">iccdetect</a></li>
  23799. <li><a href="#iccgen">iccgen</a></li>
  23800. <li><a href="#identity">identity</a></li>
  23801. <li><a href="#idet">idet</a></li>
  23802. <li><a href="#il">il</a></li>
  23803. <li><a href="#inflate">inflate</a></li>
  23804. <li><a href="#interlace">interlace</a></li>
  23805. <li><a href="#kerndeint">kerndeint</a></li>
  23806. <li><a href="#kirsch">kirsch</a></li>
  23807. <li><a href="#lagfun">lagfun</a></li>
  23808. <li><a href="#lenscorrection">lenscorrection</a></li>
  23809. <li><a href="#lensfun">lensfun</a></li>
  23810. <li><a href="#libplacebo">libplacebo</a></li>
  23811. <li><a href="#libvmaf-1">libvmaf</a></li>
  23812. <li><a href="#libvmaf_005fcuda">libvmaf_cuda</a></li>
  23813. <li><a href="#limitdiff">limitdiff</a></li>
  23814. <li><a href="#limiter">limiter</a></li>
  23815. <li><a href="#loop">loop</a></li>
  23816. <li><a href="#lut1d">lut1d</a></li>
  23817. <li><a href="#lut3d-1">lut3d</a></li>
  23818. <li><a href="#lumakey">lumakey</a></li>
  23819. <li><a href="#lut_002c-lutrgb_002c-lutyuv">lut, lutrgb, lutyuv</a></li>
  23820. <li><a href="#lut2_002c-tlut2">lut2, tlut2</a></li>
  23821. <li><a href="#maskedclamp">maskedclamp</a></li>
  23822. <li><a href="#maskedmax">maskedmax</a></li>
  23823. <li><a href="#maskedmerge">maskedmerge</a></li>
  23824. <li><a href="#maskedmin">maskedmin</a></li>
  23825. <li><a href="#maskedthreshold">maskedthreshold</a></li>
  23826. <li><a href="#maskfun">maskfun</a></li>
  23827. <li><a href="#mcdeint">mcdeint</a></li>
  23828. <li><a href="#median">median</a></li>
  23829. <li><a href="#mergeplanes">mergeplanes</a></li>
  23830. <li><a href="#mestimate">mestimate</a></li>
  23831. <li><a href="#midequalizer">midequalizer</a></li>
  23832. <li><a href="#minterpolate">minterpolate</a></li>
  23833. <li><a href="#mix">mix</a></li>
  23834. <li><a href="#monochrome">monochrome</a></li>
  23835. <li><a href="#morpho">morpho</a></li>
  23836. <li><a href="#mpdecimate">mpdecimate</a></li>
  23837. <li><a href="#msad">msad</a></li>
  23838. <li><a href="#multiply">multiply</a></li>
  23839. <li><a href="#negate">negate</a></li>
  23840. <li><a href="#nlmeans-1">nlmeans</a></li>
  23841. <li><a href="#nnedi">nnedi</a></li>
  23842. <li><a href="#noformat">noformat</a></li>
  23843. <li><a href="#noise-1">noise</a></li>
  23844. <li><a href="#normalize">normalize</a></li>
  23845. <li><a href="#null-1">null</a></li>
  23846. <li><a href="#ocr">ocr</a></li>
  23847. <li><a href="#ocv">ocv</a></li>
  23848. <li><a href="#oscilloscope">oscilloscope</a></li>
  23849. <li><a href="#overlay-1">overlay</a></li>
  23850. <li><a href="#overlay_005fcuda-1">overlay_cuda</a></li>
  23851. <li><a href="#owdenoise">owdenoise</a></li>
  23852. <li><a href="#pad-1">pad</a></li>
  23853. <li><a href="#palettegen-1">palettegen</a></li>
  23854. <li><a href="#paletteuse">paletteuse</a></li>
  23855. <li><a href="#perspective">perspective</a></li>
  23856. <li><a href="#phase">phase</a></li>
  23857. <li><a href="#photosensitivity">photosensitivity</a></li>
  23858. <li><a href="#pixdesctest">pixdesctest</a></li>
  23859. <li><a href="#pixelize">pixelize</a></li>
  23860. <li><a href="#pixscope">pixscope</a></li>
  23861. <li><a href="#pp">pp</a></li>
  23862. <li><a href="#pp7">pp7</a></li>
  23863. <li><a href="#premultiply">premultiply</a></li>
  23864. <li><a href="#prewitt">prewitt</a></li>
  23865. <li><a href="#pseudocolor">pseudocolor</a></li>
  23866. <li><a href="#psnr">psnr</a></li>
  23867. <li><a href="#pullup-1">pullup</a></li>
  23868. <li><a href="#qp">qp</a></li>
  23869. <li><a href="#qrencode">qrencode</a></li>
  23870. <li><a href="#quirc">quirc</a></li>
  23871. <li><a href="#random">random</a></li>
  23872. <li><a href="#readeia608">readeia608</a></li>
  23873. <li><a href="#readvitc">readvitc</a></li>
  23874. <li><a href="#remap">remap</a></li>
  23875. <li><a href="#removegrain">removegrain</a></li>
  23876. <li><a href="#removelogo">removelogo</a></li>
  23877. <li><a href="#repeatfields">repeatfields</a></li>
  23878. <li><a href="#reverse">reverse</a></li>
  23879. <li><a href="#rgbashift">rgbashift</a></li>
  23880. <li><a href="#roberts">roberts</a></li>
  23881. <li><a href="#rotate">rotate</a></li>
  23882. <li><a href="#sab">sab</a></li>
  23883. <li><a href="#scale-1">scale</a></li>
  23884. <li><a href="#scale_005fcuda-1">scale_cuda</a></li>
  23885. <li><a href="#scale_005fnpp-1">scale_npp</a></li>
  23886. <li><a href="#scale2ref">scale2ref</a></li>
  23887. <li><a href="#scale2ref_005fnpp">scale2ref_npp</a></li>
  23888. <li><a href="#scale_005fvt">scale_vt</a></li>
  23889. <li><a href="#scharr">scharr</a></li>
  23890. <li><a href="#scroll">scroll</a></li>
  23891. <li><a href="#scdet-1">scdet</a></li>
  23892. <li><a href="#selectivecolor-1">selectivecolor</a></li>
  23893. <li><a href="#separatefields-1">separatefields</a></li>
  23894. <li><a href="#setdar_002c-setsar">setdar, setsar</a></li>
  23895. <li><a href="#setfield-1">setfield</a></li>
  23896. <li><a href="#setparams-1">setparams</a></li>
  23897. <li><a href="#sharpen_005fnpp">sharpen_npp</a></li>
  23898. <li><a href="#shear">shear</a></li>
  23899. <li><a href="#showinfo-1">showinfo</a></li>
  23900. <li><a href="#showpalette">showpalette</a></li>
  23901. <li><a href="#shuffleframes">shuffleframes</a></li>
  23902. <li><a href="#shufflepixels">shufflepixels</a></li>
  23903. <li><a href="#shuffleplanes">shuffleplanes</a></li>
  23904. <li><a href="#signalstats-1">signalstats</a></li>
  23905. <li><a href="#signature-1">signature</a></li>
  23906. <li><a href="#siti-1">siti</a></li>
  23907. <li><a href="#smartblur-1">smartblur</a></li>
  23908. <li><a href="#sobel">sobel</a></li>
  23909. <li><a href="#spp-1">spp</a></li>
  23910. <li><a href="#sr-1">sr</a></li>
  23911. <li><a href="#ssim">ssim</a></li>
  23912. <li><a href="#stereo3d">stereo3d</a></li>
  23913. <li><a href="#streamselect_002c-astreamselect">streamselect, astreamselect</a></li>
  23914. <li><a href="#subtitles-1">subtitles</a></li>
  23915. <li><a href="#super2xsai">super2xsai</a></li>
  23916. <li><a href="#swaprect">swaprect</a></li>
  23917. <li><a href="#swapuv">swapuv</a></li>
  23918. <li><a href="#tblend">tblend</a></li>
  23919. <li><a href="#telecine">telecine</a></li>
  23920. <li><a href="#thistogram">thistogram</a></li>
  23921. <li><a href="#threshold">threshold</a></li>
  23922. <li><a href="#thumbnail">thumbnail</a></li>
  23923. <li><a href="#tile-1">tile</a></li>
  23924. <li><a href="#tiltandshift">tiltandshift</a></li>
  23925. <li><a href="#tinterlace">tinterlace</a></li>
  23926. <li><a href="#tmedian">tmedian</a></li>
  23927. <li><a href="#tmidequalizer">tmidequalizer</a></li>
  23928. <li><a href="#tmix">tmix</a></li>
  23929. <li><a href="#tonemap-1">tonemap</a></li>
  23930. <li><a href="#tpad">tpad</a></li>
  23931. <li><a href="#transpose-1">transpose</a></li>
  23932. <li><a href="#transpose_005fnpp">transpose_npp</a></li>
  23933. <li><a href="#trim">trim</a></li>
  23934. <li><a href="#unpremultiply">unpremultiply</a></li>
  23935. <li><a href="#unsharp-1">unsharp</a></li>
  23936. <li><a href="#untile-1">untile</a></li>
  23937. <li><a href="#uspp">uspp</a></li>
  23938. <li><a href="#v360">v360</a></li>
  23939. <li><a href="#vaguedenoiser">vaguedenoiser</a></li>
  23940. <li><a href="#varblur">varblur</a></li>
  23941. <li><a href="#vectorscope">vectorscope</a></li>
  23942. <li><a href="#vidstabdetect-1">vidstabdetect</a></li>
  23943. <li><a href="#vidstabtransform-1">vidstabtransform</a></li>
  23944. <li><a href="#vflip">vflip</a></li>
  23945. <li><a href="#vfrdet">vfrdet</a></li>
  23946. <li><a href="#vibrance">vibrance</a></li>
  23947. <li><a href="#vif">vif</a></li>
  23948. <li><a href="#vignette-1">vignette</a></li>
  23949. <li><a href="#vmafmotion">vmafmotion</a></li>
  23950. <li><a href="#vstack-1">vstack</a></li>
  23951. <li><a href="#w3fdif">w3fdif</a></li>
  23952. <li><a href="#waveform">waveform</a></li>
  23953. <li><a href="#weave_002c-doubleweave">weave, doubleweave</a></li>
  23954. <li><a href="#xbr">xbr</a></li>
  23955. <li><a href="#xcorrelate">xcorrelate</a></li>
  23956. <li><a href="#xfade">xfade</a></li>
  23957. <li><a href="#xmedian">xmedian</a></li>
  23958. <li><a href="#xstack-1">xstack</a></li>
  23959. <li><a href="#yadif-1">yadif</a></li>
  23960. <li><a href="#yadif_005fcuda">yadif_cuda</a></li>
  23961. <li><a href="#yaepblur">yaepblur</a></li>
  23962. <li><a href="#zoompan">zoompan</a></li>
  23963. <li><a href="#zscale-1">zscale</a></li>
  23964. </ul>
  23965. <div class="section-level-extent" id="addroi">
  23966. <h3 class="section"><span>32.1 addroi<a class="copiable-link" href="#addroi"> &para;</a></span></h3>
  23967. <p>Mark a region of interest in a video frame.
  23968. </p>
  23969. <p>The frame data is passed through unchanged, but metadata is attached
  23970. to the frame indicating regions of interest which can affect the
  23971. behaviour of later encoding. Multiple regions can be marked by
  23972. applying the filter multiple times.
  23973. </p>
  23974. <dl class="table">
  23975. <dt><samp class="option">x</samp></dt>
  23976. <dd><p>Region distance in pixels from the left edge of the frame.
  23977. </p></dd>
  23978. <dt><samp class="option">y</samp></dt>
  23979. <dd><p>Region distance in pixels from the top edge of the frame.
  23980. </p></dd>
  23981. <dt><samp class="option">w</samp></dt>
  23982. <dd><p>Region width in pixels.
  23983. </p></dd>
  23984. <dt><samp class="option">h</samp></dt>
  23985. <dd><p>Region height in pixels.
  23986. </p>
  23987. <p>The parameters <var class="var">x</var>, <var class="var">y</var>, <var class="var">w</var> and <var class="var">h</var> are expressions,
  23988. and may contain the following variables:
  23989. </p><dl class="table">
  23990. <dt><samp class="option">iw</samp></dt>
  23991. <dd><p>Width of the input frame.
  23992. </p></dd>
  23993. <dt><samp class="option">ih</samp></dt>
  23994. <dd><p>Height of the input frame.
  23995. </p></dd>
  23996. </dl>
  23997. </dd>
  23998. <dt><samp class="option">qoffset</samp></dt>
  23999. <dd><p>Quantisation offset to apply within the region.
  24000. </p>
  24001. <p>This must be a real value in the range -1 to +1. A value of zero
  24002. indicates no quality change. A negative value asks for better quality
  24003. (less quantisation), while a positive value asks for worse quality
  24004. (greater quantisation).
  24005. </p>
  24006. <p>The range is calibrated so that the extreme values indicate the
  24007. largest possible offset - if the rest of the frame is encoded with the
  24008. worst possible quality, an offset of -1 indicates that this region
  24009. should be encoded with the best possible quality anyway. Intermediate
  24010. values are then interpolated in some codec-dependent way.
  24011. </p>
  24012. <p>For example, in 10-bit H.264 the quantisation parameter varies between
  24013. -12 and 51. A typical qoffset value of -1/10 therefore indicates that
  24014. this region should be encoded with a QP around one-tenth of the full
  24015. range better than the rest of the frame. So, if most of the frame
  24016. were to be encoded with a QP of around 30, this region would get a QP
  24017. of around 24 (an offset of approximately -1/10 * (51 - -12) = -6.3).
  24018. An extreme value of -1 would indicate that this region should be
  24019. encoded with the best possible quality regardless of the treatment of
  24020. the rest of the frame - that is, should be encoded at a QP of -12.
  24021. </p></dd>
  24022. <dt><samp class="option">clear</samp></dt>
  24023. <dd><p>If set to true, remove any existing regions of interest marked on the
  24024. frame before adding the new one.
  24025. </p></dd>
  24026. </dl>
  24027. <ul class="mini-toc">
  24028. <li><a href="#Examples-60" accesskey="1">Examples</a></li>
  24029. </ul>
  24030. <div class="subsection-level-extent" id="Examples-60">
  24031. <h4 class="subsection"><span>32.1.1 Examples<a class="copiable-link" href="#Examples-60"> &para;</a></span></h4>
  24032. <ul class="itemize mark-bullet">
  24033. <li>Mark the centre quarter of the frame as interesting.
  24034. <div class="example">
  24035. <pre class="example-preformatted">addroi=iw/4:ih/4:iw/2:ih/2:-1/10
  24036. </pre></div>
  24037. </li><li>Mark the 100-pixel-wide region on the left edge of the frame as very
  24038. uninteresting (to be encoded at much lower quality than the rest of
  24039. the frame).
  24040. <div class="example">
  24041. <pre class="example-preformatted">addroi=0:0:100:ih:+1/5
  24042. </pre></div>
  24043. </li></ul>
  24044. </div>
  24045. </div>
  24046. <div class="section-level-extent" id="alphaextract">
  24047. <h3 class="section"><span>32.2 alphaextract<a class="copiable-link" href="#alphaextract"> &para;</a></span></h3>
  24048. <p>Extract the alpha component from the input as a grayscale video. This
  24049. is especially useful with the <var class="var">alphamerge</var> filter.
  24050. </p>
  24051. </div>
  24052. <div class="section-level-extent" id="alphamerge">
  24053. <h3 class="section"><span>32.3 alphamerge<a class="copiable-link" href="#alphamerge"> &para;</a></span></h3>
  24054. <p>Add or replace the alpha component of the primary input with the
  24055. grayscale value of a second input. This is intended for use with
  24056. <var class="var">alphaextract</var> to allow the transmission or storage of frame
  24057. sequences that have alpha in a format that doesn&rsquo;t support an alpha
  24058. channel.
  24059. </p>
  24060. <p>For example, to reconstruct full frames from a normal YUV-encoded video
  24061. and a separate video created with <var class="var">alphaextract</var>, you might use:
  24062. </p><div class="example">
  24063. <pre class="example-preformatted">movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
  24064. </pre></div>
  24065. </div>
  24066. <div class="section-level-extent" id="amplify">
  24067. <h3 class="section"><span>32.4 amplify<a class="copiable-link" href="#amplify"> &para;</a></span></h3>
  24068. <p>Amplify differences between current pixel and pixels of adjacent frames in
  24069. same pixel location.
  24070. </p>
  24071. <p>This filter accepts the following options:
  24072. </p>
  24073. <dl class="table">
  24074. <dt><samp class="option">radius</samp></dt>
  24075. <dd><p>Set frame radius. Default is 2. Allowed range is from 1 to 63.
  24076. For example radius of 3 will instruct filter to calculate average of 7 frames.
  24077. </p>
  24078. </dd>
  24079. <dt><samp class="option">factor</samp></dt>
  24080. <dd><p>Set factor to amplify difference. Default is 2. Allowed range is from 0 to 65535.
  24081. </p>
  24082. </dd>
  24083. <dt><samp class="option">threshold</samp></dt>
  24084. <dd><p>Set threshold for difference amplification. Any difference greater or equal to
  24085. this value will not alter source pixel. Default is 10.
  24086. Allowed range is from 0 to 65535.
  24087. </p>
  24088. </dd>
  24089. <dt><samp class="option">tolerance</samp></dt>
  24090. <dd><p>Set tolerance for difference amplification. Any difference lower to
  24091. this value will not alter source pixel. Default is 0.
  24092. Allowed range is from 0 to 65535.
  24093. </p>
  24094. </dd>
  24095. <dt><samp class="option">low</samp></dt>
  24096. <dd><p>Set lower limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535.
  24097. This option controls maximum possible value that will decrease source pixel value.
  24098. </p>
  24099. </dd>
  24100. <dt><samp class="option">high</samp></dt>
  24101. <dd><p>Set high limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535.
  24102. This option controls maximum possible value that will increase source pixel value.
  24103. </p>
  24104. </dd>
  24105. <dt><samp class="option">planes</samp></dt>
  24106. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  24107. </p></dd>
  24108. </dl>
  24109. <ul class="mini-toc">
  24110. <li><a href="#Commands-54" accesskey="1">Commands</a></li>
  24111. </ul>
  24112. <div class="subsection-level-extent" id="Commands-54">
  24113. <h4 class="subsection"><span>32.4.1 Commands<a class="copiable-link" href="#Commands-54"> &para;</a></span></h4>
  24114. <p>This filter supports the following <a class="ref" href="#commands">commands</a> that corresponds to option of same name:
  24115. </p><dl class="table">
  24116. <dt><samp class="option">factor</samp></dt>
  24117. <dt><samp class="option">threshold</samp></dt>
  24118. <dt><samp class="option">tolerance</samp></dt>
  24119. <dt><samp class="option">low</samp></dt>
  24120. <dt><samp class="option">high</samp></dt>
  24121. <dt><samp class="option">planes</samp></dt>
  24122. </dl>
  24123. </div>
  24124. </div>
  24125. <div class="section-level-extent" id="ass">
  24126. <h3 class="section"><span>32.5 ass<a class="copiable-link" href="#ass"> &para;</a></span></h3>
  24127. <p>Same as the <a class="ref" href="#subtitles">subtitles</a> filter, except that it doesn&rsquo;t require libavcodec
  24128. and libavformat to work. On the other hand, it is limited to ASS (Advanced
  24129. Substation Alpha) subtitles files.
  24130. </p>
  24131. <p>This filter accepts the following option in addition to the common options from
  24132. the <a class="ref" href="#subtitles">subtitles</a> filter:
  24133. </p>
  24134. <dl class="table">
  24135. <dt><samp class="option">shaping</samp></dt>
  24136. <dd><p>Set the shaping engine
  24137. </p>
  24138. <p>Available values are:
  24139. </p><dl class="table">
  24140. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  24141. <dd><p>The default libass shaping engine, which is the best available.
  24142. </p></dd>
  24143. <dt>&lsquo;<samp class="samp">simple</samp>&rsquo;</dt>
  24144. <dd><p>Fast, font-agnostic shaper that can do only substitutions
  24145. </p></dd>
  24146. <dt>&lsquo;<samp class="samp">complex</samp>&rsquo;</dt>
  24147. <dd><p>Slower shaper using OpenType for substitutions and positioning
  24148. </p></dd>
  24149. </dl>
  24150. <p>The default is <code class="code">auto</code>.
  24151. </p></dd>
  24152. </dl>
  24153. </div>
  24154. <div class="section-level-extent" id="atadenoise">
  24155. <h3 class="section"><span>32.6 atadenoise<a class="copiable-link" href="#atadenoise"> &para;</a></span></h3>
  24156. <p>Apply an Adaptive Temporal Averaging Denoiser to the video input.
  24157. </p>
  24158. <p>The filter accepts the following options:
  24159. </p>
  24160. <dl class="table">
  24161. <dt><samp class="option">0a</samp></dt>
  24162. <dd><p>Set threshold A for 1st plane. Default is 0.02.
  24163. Valid range is 0 to 0.3.
  24164. </p>
  24165. </dd>
  24166. <dt><samp class="option">0b</samp></dt>
  24167. <dd><p>Set threshold B for 1st plane. Default is 0.04.
  24168. Valid range is 0 to 5.
  24169. </p>
  24170. </dd>
  24171. <dt><samp class="option">1a</samp></dt>
  24172. <dd><p>Set threshold A for 2nd plane. Default is 0.02.
  24173. Valid range is 0 to 0.3.
  24174. </p>
  24175. </dd>
  24176. <dt><samp class="option">1b</samp></dt>
  24177. <dd><p>Set threshold B for 2nd plane. Default is 0.04.
  24178. Valid range is 0 to 5.
  24179. </p>
  24180. </dd>
  24181. <dt><samp class="option">2a</samp></dt>
  24182. <dd><p>Set threshold A for 3rd plane. Default is 0.02.
  24183. Valid range is 0 to 0.3.
  24184. </p>
  24185. </dd>
  24186. <dt><samp class="option">2b</samp></dt>
  24187. <dd><p>Set threshold B for 3rd plane. Default is 0.04.
  24188. Valid range is 0 to 5.
  24189. </p>
  24190. <p>Threshold A is designed to react on abrupt changes in the input signal and
  24191. threshold B is designed to react on continuous changes in the input signal.
  24192. </p>
  24193. </dd>
  24194. <dt><samp class="option">s</samp></dt>
  24195. <dd><p>Set number of frames filter will use for averaging. Default is 9. Must be odd
  24196. number in range [5, 129].
  24197. </p>
  24198. </dd>
  24199. <dt><samp class="option">p</samp></dt>
  24200. <dd><p>Set what planes of frame filter will use for averaging. Default is all.
  24201. </p>
  24202. </dd>
  24203. <dt><samp class="option">a</samp></dt>
  24204. <dd><p>Set what variant of algorithm filter will use for averaging. Default is <code class="code">p</code> parallel.
  24205. Alternatively can be set to <code class="code">s</code> serial.
  24206. </p>
  24207. <p>Parallel can be faster then serial, while other way around is never true.
  24208. Parallel will abort early on first change being greater then thresholds, while serial
  24209. will continue processing other side of frames if they are equal or below thresholds.
  24210. </p>
  24211. </dd>
  24212. <dt><samp class="option">0s</samp></dt>
  24213. <dt><samp class="option">1s</samp></dt>
  24214. <dt><samp class="option">2s</samp></dt>
  24215. <dd><p>Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
  24216. Valid range is from 0 to 32767.
  24217. This options controls weight for each pixel in radius defined by size.
  24218. Default value means every pixel have same weight.
  24219. Setting this option to 0 effectively disables filtering.
  24220. </p></dd>
  24221. </dl>
  24222. <ul class="mini-toc">
  24223. <li><a href="#Commands-55" accesskey="1">Commands</a></li>
  24224. </ul>
  24225. <div class="subsection-level-extent" id="Commands-55">
  24226. <h4 class="subsection"><span>32.6.1 Commands<a class="copiable-link" href="#Commands-55"> &para;</a></span></h4>
  24227. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options except option <code class="code">s</code>.
  24228. The command accepts the same syntax of the corresponding option.
  24229. </p>
  24230. </div>
  24231. </div>
  24232. <div class="section-level-extent" id="avgblur">
  24233. <h3 class="section"><span>32.7 avgblur<a class="copiable-link" href="#avgblur"> &para;</a></span></h3>
  24234. <p>Apply average blur filter.
  24235. </p>
  24236. <p>The filter accepts the following options:
  24237. </p>
  24238. <dl class="table">
  24239. <dt><samp class="option">sizeX</samp></dt>
  24240. <dd><p>Set horizontal radius size.
  24241. </p>
  24242. </dd>
  24243. <dt><samp class="option">planes</samp></dt>
  24244. <dd><p>Set which planes to filter. By default all planes are filtered.
  24245. </p>
  24246. </dd>
  24247. <dt><samp class="option">sizeY</samp></dt>
  24248. <dd><p>Set vertical radius size, if zero it will be same as <code class="code">sizeX</code>.
  24249. Default is <code class="code">0</code>.
  24250. </p></dd>
  24251. </dl>
  24252. <ul class="mini-toc">
  24253. <li><a href="#Commands-56" accesskey="1">Commands</a></li>
  24254. </ul>
  24255. <div class="subsection-level-extent" id="Commands-56">
  24256. <h4 class="subsection"><span>32.7.1 Commands<a class="copiable-link" href="#Commands-56"> &para;</a></span></h4>
  24257. <p>This filter supports same commands as options.
  24258. The command accepts the same syntax of the corresponding option.
  24259. </p>
  24260. <p>If the specified expression is not valid, it is kept at its current
  24261. value.
  24262. </p>
  24263. </div>
  24264. </div>
  24265. <div class="section-level-extent" id="backgroundkey">
  24266. <h3 class="section"><span>32.8 backgroundkey<a class="copiable-link" href="#backgroundkey"> &para;</a></span></h3>
  24267. <p>Turns a static background into transparency.
  24268. </p>
  24269. <p>The filter accepts the following option:
  24270. </p>
  24271. <dl class="table">
  24272. <dt><samp class="option">threshold</samp></dt>
  24273. <dd><p>Threshold for scene change detection.
  24274. </p></dd>
  24275. <dt><samp class="option">similarity</samp></dt>
  24276. <dd><p>Similarity percentage with the background.
  24277. </p></dd>
  24278. <dt><samp class="option">blend</samp></dt>
  24279. <dd><p>Set the blend amount for pixels that are not similar.
  24280. </p></dd>
  24281. </dl>
  24282. <ul class="mini-toc">
  24283. <li><a href="#Commands-57" accesskey="1">Commands</a></li>
  24284. </ul>
  24285. <div class="subsection-level-extent" id="Commands-57">
  24286. <h4 class="subsection"><span>32.8.1 Commands<a class="copiable-link" href="#Commands-57"> &para;</a></span></h4>
  24287. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  24288. </p>
  24289. </div>
  24290. </div>
  24291. <div class="section-level-extent" id="bbox">
  24292. <h3 class="section"><span>32.9 bbox<a class="copiable-link" href="#bbox"> &para;</a></span></h3>
  24293. <p>Compute the bounding box for the non-black pixels in the input frame
  24294. luma plane.
  24295. </p>
  24296. <p>This filter computes the bounding box containing all the pixels with a
  24297. luma value greater than the minimum allowed value.
  24298. The parameters describing the bounding box are printed on the filter
  24299. log.
  24300. </p>
  24301. <p>The filter accepts the following option:
  24302. </p>
  24303. <dl class="table">
  24304. <dt><samp class="option">min_val</samp></dt>
  24305. <dd><p>Set the minimal luma value. Default is <code class="code">16</code>.
  24306. </p></dd>
  24307. </dl>
  24308. <ul class="mini-toc">
  24309. <li><a href="#Commands-58" accesskey="1">Commands</a></li>
  24310. </ul>
  24311. <div class="subsection-level-extent" id="Commands-58">
  24312. <h4 class="subsection"><span>32.9.1 Commands<a class="copiable-link" href="#Commands-58"> &para;</a></span></h4>
  24313. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  24314. </p>
  24315. </div>
  24316. </div>
  24317. <div class="section-level-extent" id="bilateral">
  24318. <h3 class="section"><span>32.10 bilateral<a class="copiable-link" href="#bilateral"> &para;</a></span></h3>
  24319. <p>Apply bilateral filter, spatial smoothing while preserving edges.
  24320. </p>
  24321. <p>The filter accepts the following options:
  24322. </p><dl class="table">
  24323. <dt><samp class="option">sigmaS</samp></dt>
  24324. <dd><p>Set sigma of gaussian function to calculate spatial weight.
  24325. Allowed range is 0 to 512. Default is 0.1.
  24326. </p>
  24327. </dd>
  24328. <dt><samp class="option">sigmaR</samp></dt>
  24329. <dd><p>Set sigma of gaussian function to calculate range weight.
  24330. Allowed range is 0 to 1. Default is 0.1.
  24331. </p>
  24332. </dd>
  24333. <dt><samp class="option">planes</samp></dt>
  24334. <dd><p>Set planes to filter. Default is first only.
  24335. </p></dd>
  24336. </dl>
  24337. <ul class="mini-toc">
  24338. <li><a href="#Commands-59" accesskey="1">Commands</a></li>
  24339. </ul>
  24340. <div class="subsection-level-extent" id="Commands-59">
  24341. <h4 class="subsection"><span>32.10.1 Commands<a class="copiable-link" href="#Commands-59"> &para;</a></span></h4>
  24342. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  24343. </p>
  24344. </div>
  24345. </div>
  24346. <div class="section-level-extent" id="bilateral_005fcuda">
  24347. <h3 class="section"><span>32.11 bilateral_cuda<a class="copiable-link" href="#bilateral_005fcuda"> &para;</a></span></h3>
  24348. <p>CUDA accelerated bilateral filter, an edge preserving filter.
  24349. This filter is mathematically accurate thanks to the use of GPU acceleration.
  24350. For best output quality, use one to one chroma subsampling, i.e. yuv444p format.
  24351. </p>
  24352. <p>The filter accepts the following options:
  24353. </p><dl class="table">
  24354. <dt><samp class="option">sigmaS</samp></dt>
  24355. <dd><p>Set sigma of gaussian function to calculate spatial weight, also called sigma space.
  24356. Allowed range is 0.1 to 512. Default is 0.1.
  24357. </p>
  24358. </dd>
  24359. <dt><samp class="option">sigmaR</samp></dt>
  24360. <dd><p>Set sigma of gaussian function to calculate color range weight, also called sigma color.
  24361. Allowed range is 0.1 to 512. Default is 0.1.
  24362. </p>
  24363. </dd>
  24364. <dt><samp class="option">window_size</samp></dt>
  24365. <dd><p>Set window size of the bilateral function to determine the number of neighbours to loop on.
  24366. If the number entered is even, one will be added automatically.
  24367. Allowed range is 1 to 255. Default is 1.
  24368. </p></dd>
  24369. </dl>
  24370. <ul class="mini-toc">
  24371. <li><a href="#Examples-61" accesskey="1">Examples</a></li>
  24372. </ul>
  24373. <div class="subsection-level-extent" id="Examples-61">
  24374. <h4 class="subsection"><span>32.11.1 Examples<a class="copiable-link" href="#Examples-61"> &para;</a></span></h4>
  24375. <ul class="itemize mark-bullet">
  24376. <li>Apply the bilateral filter on a video.
  24377. <div class="example">
  24378. <pre class="example-preformatted">./ffmpeg -v verbose \
  24379. -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 \
  24380. -init_hw_device cuda \
  24381. -filter_complex \
  24382. &quot; \
  24383. [0:v]scale_cuda=format=yuv444p[scaled_video];
  24384. [scaled_video]bilateral_cuda=window_size=9:sigmaS=3.0:sigmaR=50.0&quot; \
  24385. -an -sn -c:v h264_nvenc -cq 20 out.mp4
  24386. </pre></div>
  24387. </li></ul>
  24388. </div>
  24389. </div>
  24390. <div class="section-level-extent" id="bitplanenoise">
  24391. <h3 class="section"><span>32.12 bitplanenoise<a class="copiable-link" href="#bitplanenoise"> &para;</a></span></h3>
  24392. <p>Show and measure bit plane noise.
  24393. </p>
  24394. <p>The filter accepts the following options:
  24395. </p>
  24396. <dl class="table">
  24397. <dt><samp class="option">bitplane</samp></dt>
  24398. <dd><p>Set which plane to analyze. Default is <code class="code">1</code>.
  24399. </p>
  24400. </dd>
  24401. <dt><samp class="option">filter</samp></dt>
  24402. <dd><p>Filter out noisy pixels from <code class="code">bitplane</code> set above.
  24403. Default is disabled.
  24404. </p></dd>
  24405. </dl>
  24406. </div>
  24407. <div class="section-level-extent" id="blackdetect">
  24408. <h3 class="section"><span>32.13 blackdetect<a class="copiable-link" href="#blackdetect"> &para;</a></span></h3>
  24409. <p>Detect video intervals that are (almost) completely black. Can be
  24410. useful to detect chapter transitions, commercials, or invalid
  24411. recordings.
  24412. </p>
  24413. <p>The filter outputs its detection analysis to both the log as well as
  24414. frame metadata. If a black segment of at least the specified minimum
  24415. duration is found, a line with the start and end timestamps as well
  24416. as duration is printed to the log with level <code class="code">info</code>. In addition,
  24417. a log line with level <code class="code">debug</code> is printed per frame showing the
  24418. black amount detected for that frame.
  24419. </p>
  24420. <p>The filter also attaches metadata to the first frame of a black
  24421. segment with key <code class="code">lavfi.black_start</code> and to the first frame
  24422. after the black segment ends with key <code class="code">lavfi.black_end</code>. The
  24423. value is the frame&rsquo;s timestamp. This metadata is added regardless
  24424. of the minimum duration specified.
  24425. </p>
  24426. <p>The filter accepts the following options:
  24427. </p>
  24428. <dl class="table">
  24429. <dt><samp class="option">black_min_duration, d</samp></dt>
  24430. <dd><p>Set the minimum detected black duration expressed in seconds. It must
  24431. be a non-negative floating point number.
  24432. </p>
  24433. <p>Default value is 2.0.
  24434. </p>
  24435. </dd>
  24436. <dt><samp class="option">picture_black_ratio_th, pic_th</samp></dt>
  24437. <dd><p>Set the threshold for considering a picture &quot;black&quot;.
  24438. Express the minimum value for the ratio:
  24439. </p><div class="example">
  24440. <pre class="example-preformatted"><var class="var">nb_black_pixels</var> / <var class="var">nb_pixels</var>
  24441. </pre></div>
  24442. <p>for which a picture is considered black.
  24443. Default value is 0.98.
  24444. </p>
  24445. </dd>
  24446. <dt><samp class="option">pixel_black_th, pix_th</samp></dt>
  24447. <dd><p>Set the threshold for considering a pixel &quot;black&quot;.
  24448. </p>
  24449. <p>The threshold expresses the maximum pixel luma value for which a
  24450. pixel is considered &quot;black&quot;. The provided value is scaled according to
  24451. the following equation:
  24452. </p><div class="example">
  24453. <pre class="example-preformatted"><var class="var">absolute_threshold</var> = <var class="var">luma_minimum_value</var> + <var class="var">pixel_black_th</var> * <var class="var">luma_range_size</var>
  24454. </pre></div>
  24455. <p><var class="var">luma_range_size</var> and <var class="var">luma_minimum_value</var> depend on
  24456. the input video format, the range is [0-255] for YUV full-range
  24457. formats and [16-235] for YUV non full-range formats.
  24458. </p>
  24459. <p>Default value is 0.10.
  24460. </p></dd>
  24461. </dl>
  24462. <p>The following example sets the maximum pixel threshold to the minimum
  24463. value, and detects only black intervals of 2 or more seconds:
  24464. </p><div class="example">
  24465. <pre class="example-preformatted">blackdetect=d=2:pix_th=0.00
  24466. </pre></div>
  24467. </div>
  24468. <div class="section-level-extent" id="blackframe">
  24469. <h3 class="section"><span>32.14 blackframe<a class="copiable-link" href="#blackframe"> &para;</a></span></h3>
  24470. <p>Detect frames that are (almost) completely black. Can be useful to
  24471. detect chapter transitions or commercials. Output lines consist of
  24472. the frame number of the detected frame, the percentage of blackness,
  24473. the position in the file if known or -1 and the timestamp in seconds.
  24474. </p>
  24475. <p>In order to display the output lines, you need to set the loglevel at
  24476. least to the AV_LOG_INFO value.
  24477. </p>
  24478. <p>This filter exports frame metadata <code class="code">lavfi.blackframe.pblack</code>.
  24479. The value represents the percentage of pixels in the picture that
  24480. are below the threshold value.
  24481. </p>
  24482. <p>It accepts the following parameters:
  24483. </p>
  24484. <dl class="table">
  24485. <dt><samp class="option">amount</samp></dt>
  24486. <dd><p>The percentage of the pixels that have to be below the threshold; it defaults to
  24487. <code class="code">98</code>.
  24488. </p>
  24489. </dd>
  24490. <dt><samp class="option">threshold, thresh</samp></dt>
  24491. <dd><p>The threshold below which a pixel value is considered black; it defaults to
  24492. <code class="code">32</code>.
  24493. </p>
  24494. </dd>
  24495. </dl>
  24496. <a class="anchor" id="blend"></a></div>
  24497. <div class="section-level-extent" id="blend-1">
  24498. <h3 class="section"><span>32.15 blend<a class="copiable-link" href="#blend-1"> &para;</a></span></h3>
  24499. <p>Blend two video frames into each other.
  24500. </p>
  24501. <p>The <code class="code">blend</code> filter takes two input streams and outputs one
  24502. stream, the first input is the &quot;top&quot; layer and second input is
  24503. &quot;bottom&quot; layer. By default, the output terminates when the longest input terminates.
  24504. </p>
  24505. <p>The <code class="code">tblend</code> (time blend) filter takes two consecutive frames
  24506. from one single stream, and outputs the result obtained by blending
  24507. the new frame on top of the old frame.
  24508. </p>
  24509. <p>A description of the accepted options follows.
  24510. </p>
  24511. <dl class="table">
  24512. <dt><samp class="option">c0_mode</samp></dt>
  24513. <dt><samp class="option">c1_mode</samp></dt>
  24514. <dt><samp class="option">c2_mode</samp></dt>
  24515. <dt><samp class="option">c3_mode</samp></dt>
  24516. <dt><samp class="option">all_mode</samp></dt>
  24517. <dd><p>Set blend mode for specific pixel component or all pixel components in case
  24518. of <var class="var">all_mode</var>. Default value is <code class="code">normal</code>.
  24519. </p>
  24520. <p>Available values for component modes are:
  24521. </p><dl class="table">
  24522. <dt>&lsquo;<samp class="samp">addition</samp>&rsquo;</dt>
  24523. <dt>&lsquo;<samp class="samp">and</samp>&rsquo;</dt>
  24524. <dt>&lsquo;<samp class="samp">average</samp>&rsquo;</dt>
  24525. <dt>&lsquo;<samp class="samp">bleach</samp>&rsquo;</dt>
  24526. <dt>&lsquo;<samp class="samp">burn</samp>&rsquo;</dt>
  24527. <dt>&lsquo;<samp class="samp">darken</samp>&rsquo;</dt>
  24528. <dt>&lsquo;<samp class="samp">difference</samp>&rsquo;</dt>
  24529. <dt>&lsquo;<samp class="samp">divide</samp>&rsquo;</dt>
  24530. <dt>&lsquo;<samp class="samp">dodge</samp>&rsquo;</dt>
  24531. <dt>&lsquo;<samp class="samp">exclusion</samp>&rsquo;</dt>
  24532. <dt>&lsquo;<samp class="samp">extremity</samp>&rsquo;</dt>
  24533. <dt>&lsquo;<samp class="samp">freeze</samp>&rsquo;</dt>
  24534. <dt>&lsquo;<samp class="samp">geometric</samp>&rsquo;</dt>
  24535. <dt>&lsquo;<samp class="samp">glow</samp>&rsquo;</dt>
  24536. <dt>&lsquo;<samp class="samp">grainextract</samp>&rsquo;</dt>
  24537. <dt>&lsquo;<samp class="samp">grainmerge</samp>&rsquo;</dt>
  24538. <dt>&lsquo;<samp class="samp">hardlight</samp>&rsquo;</dt>
  24539. <dt>&lsquo;<samp class="samp">hardmix</samp>&rsquo;</dt>
  24540. <dt>&lsquo;<samp class="samp">hardoverlay</samp>&rsquo;</dt>
  24541. <dt>&lsquo;<samp class="samp">harmonic</samp>&rsquo;</dt>
  24542. <dt>&lsquo;<samp class="samp">heat</samp>&rsquo;</dt>
  24543. <dt>&lsquo;<samp class="samp">interpolate</samp>&rsquo;</dt>
  24544. <dt>&lsquo;<samp class="samp">lighten</samp>&rsquo;</dt>
  24545. <dt>&lsquo;<samp class="samp">linearlight</samp>&rsquo;</dt>
  24546. <dt>&lsquo;<samp class="samp">multiply</samp>&rsquo;</dt>
  24547. <dt>&lsquo;<samp class="samp">multiply128</samp>&rsquo;</dt>
  24548. <dt>&lsquo;<samp class="samp">negation</samp>&rsquo;</dt>
  24549. <dt>&lsquo;<samp class="samp">normal</samp>&rsquo;</dt>
  24550. <dt>&lsquo;<samp class="samp">or</samp>&rsquo;</dt>
  24551. <dt>&lsquo;<samp class="samp">overlay</samp>&rsquo;</dt>
  24552. <dt>&lsquo;<samp class="samp">phoenix</samp>&rsquo;</dt>
  24553. <dt>&lsquo;<samp class="samp">pinlight</samp>&rsquo;</dt>
  24554. <dt>&lsquo;<samp class="samp">reflect</samp>&rsquo;</dt>
  24555. <dt>&lsquo;<samp class="samp">screen</samp>&rsquo;</dt>
  24556. <dt>&lsquo;<samp class="samp">softdifference</samp>&rsquo;</dt>
  24557. <dt>&lsquo;<samp class="samp">softlight</samp>&rsquo;</dt>
  24558. <dt>&lsquo;<samp class="samp">stain</samp>&rsquo;</dt>
  24559. <dt>&lsquo;<samp class="samp">subtract</samp>&rsquo;</dt>
  24560. <dt>&lsquo;<samp class="samp">vividlight</samp>&rsquo;</dt>
  24561. <dt>&lsquo;<samp class="samp">xor</samp>&rsquo;</dt>
  24562. </dl>
  24563. </dd>
  24564. <dt><samp class="option">c0_opacity</samp></dt>
  24565. <dt><samp class="option">c1_opacity</samp></dt>
  24566. <dt><samp class="option">c2_opacity</samp></dt>
  24567. <dt><samp class="option">c3_opacity</samp></dt>
  24568. <dt><samp class="option">all_opacity</samp></dt>
  24569. <dd><p>Set blend opacity for specific pixel component or all pixel components in case
  24570. of <var class="var">all_opacity</var>. Only used in combination with pixel component blend modes.
  24571. </p>
  24572. </dd>
  24573. <dt><samp class="option">c0_expr</samp></dt>
  24574. <dt><samp class="option">c1_expr</samp></dt>
  24575. <dt><samp class="option">c2_expr</samp></dt>
  24576. <dt><samp class="option">c3_expr</samp></dt>
  24577. <dt><samp class="option">all_expr</samp></dt>
  24578. <dd><p>Set blend expression for specific pixel component or all pixel components in case
  24579. of <var class="var">all_expr</var>. Note that related mode options will be ignored if those are set.
  24580. </p>
  24581. <p>The expressions can use the following variables:
  24582. </p>
  24583. <dl class="table">
  24584. <dt><samp class="option">N</samp></dt>
  24585. <dd><p>The sequential number of the filtered frame, starting from <code class="code">0</code>.
  24586. </p>
  24587. </dd>
  24588. <dt><samp class="option">X</samp></dt>
  24589. <dt><samp class="option">Y</samp></dt>
  24590. <dd><p>the coordinates of the current sample
  24591. </p>
  24592. </dd>
  24593. <dt><samp class="option">W</samp></dt>
  24594. <dt><samp class="option">H</samp></dt>
  24595. <dd><p>the width and height of currently filtered plane
  24596. </p>
  24597. </dd>
  24598. <dt><samp class="option">SW</samp></dt>
  24599. <dt><samp class="option">SH</samp></dt>
  24600. <dd><p>Width and height scale for the plane being filtered. It is the
  24601. ratio between the dimensions of the current plane to the luma plane,
  24602. e.g. for a <code class="code">yuv420p</code> frame, the values are <code class="code">1,1</code> for
  24603. the luma plane and <code class="code">0.5,0.5</code> for the chroma planes.
  24604. </p>
  24605. </dd>
  24606. <dt><samp class="option">T</samp></dt>
  24607. <dd><p>Time of the current frame, expressed in seconds.
  24608. </p>
  24609. </dd>
  24610. <dt><samp class="option">TOP, A</samp></dt>
  24611. <dd><p>Value of pixel component at current location for first video frame (top layer).
  24612. </p>
  24613. </dd>
  24614. <dt><samp class="option">BOTTOM, B</samp></dt>
  24615. <dd><p>Value of pixel component at current location for second video frame (bottom layer).
  24616. </p></dd>
  24617. </dl>
  24618. </dd>
  24619. </dl>
  24620. <p>The <code class="code">blend</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  24621. </p>
  24622. <ul class="mini-toc">
  24623. <li><a href="#Examples-62" accesskey="1">Examples</a></li>
  24624. <li><a href="#Commands-60" accesskey="2">Commands</a></li>
  24625. </ul>
  24626. <div class="subsection-level-extent" id="Examples-62">
  24627. <h4 class="subsection"><span>32.15.1 Examples<a class="copiable-link" href="#Examples-62"> &para;</a></span></h4>
  24628. <ul class="itemize mark-bullet">
  24629. <li>Apply transition from bottom layer to top layer in first 10 seconds:
  24630. <div class="example">
  24631. <pre class="example-preformatted">blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))'
  24632. </pre></div>
  24633. </li><li>Apply linear horizontal transition from top layer to bottom layer:
  24634. <div class="example">
  24635. <pre class="example-preformatted">blend=all_expr='A*(X/W)+B*(1-X/W)'
  24636. </pre></div>
  24637. </li><li>Apply 1x1 checkerboard effect:
  24638. <div class="example">
  24639. <pre class="example-preformatted">blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)'
  24640. </pre></div>
  24641. </li><li>Apply uncover left effect:
  24642. <div class="example">
  24643. <pre class="example-preformatted">blend=all_expr='if(gte(N*SW+X,W),A,B)'
  24644. </pre></div>
  24645. </li><li>Apply uncover down effect:
  24646. <div class="example">
  24647. <pre class="example-preformatted">blend=all_expr='if(gte(Y-N*SH,0),A,B)'
  24648. </pre></div>
  24649. </li><li>Apply uncover up-left effect:
  24650. <div class="example">
  24651. <pre class="example-preformatted">blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
  24652. </pre></div>
  24653. </li><li>Split diagonally video and shows top and bottom layer on each side:
  24654. <div class="example">
  24655. <pre class="example-preformatted">blend=all_expr='if(gt(X,Y*(W/H)),A,B)'
  24656. </pre></div>
  24657. </li><li>Display differences between the current and the previous frame:
  24658. <div class="example">
  24659. <pre class="example-preformatted">tblend=all_mode=grainextract
  24660. </pre></div>
  24661. </li></ul>
  24662. </div>
  24663. <div class="subsection-level-extent" id="Commands-60">
  24664. <h4 class="subsection"><span>32.15.2 Commands<a class="copiable-link" href="#Commands-60"> &para;</a></span></h4>
  24665. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  24666. </p>
  24667. <a class="anchor" id="blockdetect"></a></div>
  24668. </div>
  24669. <div class="section-level-extent" id="blockdetect-1">
  24670. <h3 class="section"><span>32.16 blockdetect<a class="copiable-link" href="#blockdetect-1"> &para;</a></span></h3>
  24671. <p>Determines blockiness of frames without altering the input frames.
  24672. </p>
  24673. <p>Based on Remco Muijs and Ihor Kirenko: &quot;A no-reference blocking artifact measure for adaptive video processing.&quot; 2005 13th European signal processing conference.
  24674. </p>
  24675. <p>The filter accepts the following options:
  24676. </p>
  24677. <dl class="table">
  24678. <dt><samp class="option">period_min</samp></dt>
  24679. <dt><samp class="option">period_max</samp></dt>
  24680. <dd><p>Set minimum and maximum values for determining pixel grids (periods).
  24681. Default values are [3,24].
  24682. </p>
  24683. </dd>
  24684. <dt><samp class="option">planes</samp></dt>
  24685. <dd><p>Set planes to filter. Default is first only.
  24686. </p></dd>
  24687. </dl>
  24688. <ul class="mini-toc">
  24689. <li><a href="#Examples-63" accesskey="1">Examples</a></li>
  24690. </ul>
  24691. <div class="subsection-level-extent" id="Examples-63">
  24692. <h4 class="subsection"><span>32.16.1 Examples<a class="copiable-link" href="#Examples-63"> &para;</a></span></h4>
  24693. <ul class="itemize mark-bullet">
  24694. <li>Determine blockiness for the first plane and search for periods within [8,32]:
  24695. <div class="example">
  24696. <pre class="example-preformatted">blockdetect=period_min=8:period_max=32:planes=1
  24697. </pre></div>
  24698. </li></ul>
  24699. <a class="anchor" id="blurdetect"></a></div>
  24700. </div>
  24701. <div class="section-level-extent" id="blurdetect-1">
  24702. <h3 class="section"><span>32.17 blurdetect<a class="copiable-link" href="#blurdetect-1"> &para;</a></span></h3>
  24703. <p>Determines blurriness of frames without altering the input frames.
  24704. </p>
  24705. <p>Based on Marziliano, Pina, et al. &quot;A no-reference perceptual blur metric.&quot;
  24706. Allows for a block-based abbreviation.
  24707. </p>
  24708. <p>The filter accepts the following options:
  24709. </p>
  24710. <dl class="table">
  24711. <dt><samp class="option">low</samp></dt>
  24712. <dt><samp class="option">high</samp></dt>
  24713. <dd><p>Set low and high threshold values used by the Canny thresholding
  24714. algorithm.
  24715. </p>
  24716. <p>The high threshold selects the &quot;strong&quot; edge pixels, which are then
  24717. connected through 8-connectivity with the &quot;weak&quot; edge pixels selected
  24718. by the low threshold.
  24719. </p>
  24720. <p><var class="var">low</var> and <var class="var">high</var> threshold values must be chosen in the range
  24721. [0,1], and <var class="var">low</var> should be lesser or equal to <var class="var">high</var>.
  24722. </p>
  24723. <p>Default value for <var class="var">low</var> is <code class="code">20/255</code>, and default value for <var class="var">high</var>
  24724. is <code class="code">50/255</code>.
  24725. </p>
  24726. </dd>
  24727. <dt><samp class="option">radius</samp></dt>
  24728. <dd><p>Define the radius to search around an edge pixel for local maxima.
  24729. </p>
  24730. </dd>
  24731. <dt><samp class="option">block_pct</samp></dt>
  24732. <dd><p>Determine blurriness only for the most significant blocks, given in percentage.
  24733. </p>
  24734. </dd>
  24735. <dt><samp class="option">block_width</samp></dt>
  24736. <dd><p>Determine blurriness for blocks of width <var class="var">block_width</var>. If set to any value smaller 1, no blocks are used and the whole image is processed as one no matter of <var class="var">block_height</var>.
  24737. </p>
  24738. </dd>
  24739. <dt><samp class="option">block_height</samp></dt>
  24740. <dd><p>Determine blurriness for blocks of height <var class="var">block_height</var>. If set to any value smaller 1, no blocks are used and the whole image is processed as one no matter of <var class="var">block_width</var>.
  24741. </p>
  24742. </dd>
  24743. <dt><samp class="option">planes</samp></dt>
  24744. <dd><p>Set planes to filter. Default is first only.
  24745. </p></dd>
  24746. </dl>
  24747. <ul class="mini-toc">
  24748. <li><a href="#Examples-64" accesskey="1">Examples</a></li>
  24749. </ul>
  24750. <div class="subsection-level-extent" id="Examples-64">
  24751. <h4 class="subsection"><span>32.17.1 Examples<a class="copiable-link" href="#Examples-64"> &para;</a></span></h4>
  24752. <ul class="itemize mark-bullet">
  24753. <li>Determine blur for 80% of most significant 32x32 blocks:
  24754. <div class="example">
  24755. <pre class="example-preformatted">blurdetect=block_width=32:block_height=32:block_pct=80
  24756. </pre></div>
  24757. </li></ul>
  24758. </div>
  24759. </div>
  24760. <div class="section-level-extent" id="bm3d">
  24761. <h3 class="section"><span>32.18 bm3d<a class="copiable-link" href="#bm3d"> &para;</a></span></h3>
  24762. <p>Denoise frames using Block-Matching 3D algorithm.
  24763. </p>
  24764. <p>The filter accepts the following options.
  24765. </p>
  24766. <dl class="table">
  24767. <dt><samp class="option">sigma</samp></dt>
  24768. <dd><p>Set denoising strength. Default value is 1.
  24769. Allowed range is from 0 to 999.9.
  24770. The denoising algorithm is very sensitive to sigma, so adjust it
  24771. according to the source.
  24772. </p>
  24773. </dd>
  24774. <dt><samp class="option">block</samp></dt>
  24775. <dd><p>Set local patch size. This sets dimensions in 2D.
  24776. </p>
  24777. </dd>
  24778. <dt><samp class="option">bstep</samp></dt>
  24779. <dd><p>Set sliding step for processing blocks. Default value is 4.
  24780. Allowed range is from 1 to 64.
  24781. Smaller values allows processing more reference blocks and is slower.
  24782. </p>
  24783. </dd>
  24784. <dt><samp class="option">group</samp></dt>
  24785. <dd><p>Set maximal number of similar blocks for 3rd dimension. Default value is 1.
  24786. When set to 1, no block matching is done. Larger values allows more blocks
  24787. in single group.
  24788. Allowed range is from 1 to 256.
  24789. </p>
  24790. </dd>
  24791. <dt><samp class="option">range</samp></dt>
  24792. <dd><p>Set radius for search block matching. Default is 9.
  24793. Allowed range is from 1 to INT32_MAX.
  24794. </p>
  24795. </dd>
  24796. <dt><samp class="option">mstep</samp></dt>
  24797. <dd><p>Set step between two search locations for block matching. Default is 1.
  24798. Allowed range is from 1 to 64. Smaller is slower.
  24799. </p>
  24800. </dd>
  24801. <dt><samp class="option">thmse</samp></dt>
  24802. <dd><p>Set threshold of mean square error for block matching. Valid range is 0 to
  24803. INT32_MAX.
  24804. </p>
  24805. </dd>
  24806. <dt><samp class="option">hdthr</samp></dt>
  24807. <dd><p>Set thresholding parameter for hard thresholding in 3D transformed domain.
  24808. Larger values results in stronger hard-thresholding filtering in frequency
  24809. domain.
  24810. </p>
  24811. </dd>
  24812. <dt><samp class="option">estim</samp></dt>
  24813. <dd><p>Set filtering estimation mode. Can be <code class="code">basic</code> or <code class="code">final</code>.
  24814. Default is <code class="code">basic</code>.
  24815. </p>
  24816. </dd>
  24817. <dt><samp class="option">ref</samp></dt>
  24818. <dd><p>If enabled, filter will use 2nd stream for block matching.
  24819. Default is disabled for <code class="code">basic</code> value of <var class="var">estim</var> option,
  24820. and always enabled if value of <var class="var">estim</var> is <code class="code">final</code>.
  24821. </p>
  24822. </dd>
  24823. <dt><samp class="option">planes</samp></dt>
  24824. <dd><p>Set planes to filter. Default is all available except alpha.
  24825. </p></dd>
  24826. </dl>
  24827. <ul class="mini-toc">
  24828. <li><a href="#Examples-65" accesskey="1">Examples</a></li>
  24829. </ul>
  24830. <div class="subsection-level-extent" id="Examples-65">
  24831. <h4 class="subsection"><span>32.18.1 Examples<a class="copiable-link" href="#Examples-65"> &para;</a></span></h4>
  24832. <ul class="itemize mark-bullet">
  24833. <li>Basic filtering with bm3d:
  24834. <div class="example">
  24835. <pre class="example-preformatted">bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic
  24836. </pre></div>
  24837. </li><li>Same as above, but filtering only luma:
  24838. <div class="example">
  24839. <pre class="example-preformatted">bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1
  24840. </pre></div>
  24841. </li><li>Same as above, but with both estimation modes:
  24842. <div class="example">
  24843. <pre class="example-preformatted">split[a][b],[a]bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic[a],[b][a]bm3d=sigma=3:block=4:bstep=2:group=16:estim=final:ref=1
  24844. </pre></div>
  24845. </li><li>Same as above, but prefilter with <a class="ref" href="#nlmeans">nlmeans</a> filter instead:
  24846. <div class="example">
  24847. <pre class="example-preformatted">split[a][b],[a]nlmeans=s=3:r=7:p=3[a],[b][a]bm3d=sigma=3:block=4:bstep=2:group=16:estim=final:ref=1
  24848. </pre></div>
  24849. </li></ul>
  24850. </div>
  24851. </div>
  24852. <div class="section-level-extent" id="boxblur">
  24853. <h3 class="section"><span>32.19 boxblur<a class="copiable-link" href="#boxblur"> &para;</a></span></h3>
  24854. <p>Apply a boxblur algorithm to the input video.
  24855. </p>
  24856. <p>It accepts the following parameters:
  24857. </p>
  24858. <dl class="table">
  24859. <dt><samp class="option">luma_radius, lr</samp></dt>
  24860. <dt><samp class="option">luma_power, lp</samp></dt>
  24861. <dt><samp class="option">chroma_radius, cr</samp></dt>
  24862. <dt><samp class="option">chroma_power, cp</samp></dt>
  24863. <dt><samp class="option">alpha_radius, ar</samp></dt>
  24864. <dt><samp class="option">alpha_power, ap</samp></dt>
  24865. </dl>
  24866. <p>A description of the accepted options follows.
  24867. </p>
  24868. <dl class="table">
  24869. <dt><samp class="option">luma_radius, lr</samp></dt>
  24870. <dt><samp class="option">chroma_radius, cr</samp></dt>
  24871. <dt><samp class="option">alpha_radius, ar</samp></dt>
  24872. <dd><p>Set an expression for the box radius in pixels used for blurring the
  24873. corresponding input plane.
  24874. </p>
  24875. <p>The radius value must be a non-negative number, and must not be
  24876. greater than the value of the expression <code class="code">min(w,h)/2</code> for the
  24877. luma and alpha planes, and of <code class="code">min(cw,ch)/2</code> for the chroma
  24878. planes.
  24879. </p>
  24880. <p>Default value for <samp class="option">luma_radius</samp> is &quot;2&quot;. If not specified,
  24881. <samp class="option">chroma_radius</samp> and <samp class="option">alpha_radius</samp> default to the
  24882. corresponding value set for <samp class="option">luma_radius</samp>.
  24883. </p>
  24884. <p>The expressions can contain the following constants:
  24885. </p><dl class="table">
  24886. <dt><samp class="option">w</samp></dt>
  24887. <dt><samp class="option">h</samp></dt>
  24888. <dd><p>The input width and height in pixels.
  24889. </p>
  24890. </dd>
  24891. <dt><samp class="option">cw</samp></dt>
  24892. <dt><samp class="option">ch</samp></dt>
  24893. <dd><p>The input chroma image width and height in pixels.
  24894. </p>
  24895. </dd>
  24896. <dt><samp class="option">hsub</samp></dt>
  24897. <dt><samp class="option">vsub</samp></dt>
  24898. <dd><p>The horizontal and vertical chroma subsample values. For example, for the
  24899. pixel format &quot;yuv422p&quot;, <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  24900. </p></dd>
  24901. </dl>
  24902. </dd>
  24903. <dt><samp class="option">luma_power, lp</samp></dt>
  24904. <dt><samp class="option">chroma_power, cp</samp></dt>
  24905. <dt><samp class="option">alpha_power, ap</samp></dt>
  24906. <dd><p>Specify how many times the boxblur filter is applied to the
  24907. corresponding plane.
  24908. </p>
  24909. <p>Default value for <samp class="option">luma_power</samp> is 2. If not specified,
  24910. <samp class="option">chroma_power</samp> and <samp class="option">alpha_power</samp> default to the
  24911. corresponding value set for <samp class="option">luma_power</samp>.
  24912. </p>
  24913. <p>A value of 0 will disable the effect.
  24914. </p></dd>
  24915. </dl>
  24916. <ul class="mini-toc">
  24917. <li><a href="#Examples-66" accesskey="1">Examples</a></li>
  24918. </ul>
  24919. <div class="subsection-level-extent" id="Examples-66">
  24920. <h4 class="subsection"><span>32.19.1 Examples<a class="copiable-link" href="#Examples-66"> &para;</a></span></h4>
  24921. <ul class="itemize mark-bullet">
  24922. <li>Apply a boxblur filter with the luma, chroma, and alpha radii
  24923. set to 2:
  24924. <div class="example">
  24925. <pre class="example-preformatted">boxblur=luma_radius=2:luma_power=1
  24926. boxblur=2:1
  24927. </pre></div>
  24928. </li><li>Set the luma radius to 2, and alpha and chroma radius to 0:
  24929. <div class="example">
  24930. <pre class="example-preformatted">boxblur=2:1:cr=0:ar=0
  24931. </pre></div>
  24932. </li><li>Set the luma and chroma radii to a fraction of the video dimension:
  24933. <div class="example">
  24934. <pre class="example-preformatted">boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1
  24935. </pre></div>
  24936. </li></ul>
  24937. <a class="anchor" id="bwdif"></a></div>
  24938. </div>
  24939. <div class="section-level-extent" id="bwdif-1">
  24940. <h3 class="section"><span>32.20 bwdif<a class="copiable-link" href="#bwdif-1"> &para;</a></span></h3>
  24941. <p>Deinterlace the input video (&quot;bwdif&quot; stands for &quot;Bob Weaver
  24942. Deinterlacing Filter&quot;).
  24943. </p>
  24944. <p>Motion adaptive deinterlacing based on yadif with the use of w3fdif and cubic
  24945. interpolation algorithms.
  24946. It accepts the following parameters:
  24947. </p>
  24948. <dl class="table">
  24949. <dt><samp class="option">mode</samp></dt>
  24950. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  24951. </p>
  24952. <dl class="table">
  24953. <dt><samp class="option">0, send_frame</samp></dt>
  24954. <dd><p>Output one frame for each frame.
  24955. </p></dd>
  24956. <dt><samp class="option">1, send_field</samp></dt>
  24957. <dd><p>Output one frame for each field.
  24958. </p></dd>
  24959. </dl>
  24960. <p>The default value is <code class="code">send_field</code>.
  24961. </p>
  24962. </dd>
  24963. <dt><samp class="option">parity</samp></dt>
  24964. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  24965. of the following values:
  24966. </p>
  24967. <dl class="table">
  24968. <dt><samp class="option">0, tff</samp></dt>
  24969. <dd><p>Assume the top field is first.
  24970. </p></dd>
  24971. <dt><samp class="option">1, bff</samp></dt>
  24972. <dd><p>Assume the bottom field is first.
  24973. </p></dd>
  24974. <dt><samp class="option">-1, auto</samp></dt>
  24975. <dd><p>Enable automatic detection of field parity.
  24976. </p></dd>
  24977. </dl>
  24978. <p>The default value is <code class="code">auto</code>.
  24979. If the interlacing is unknown or the decoder does not export this information,
  24980. top field first will be assumed.
  24981. </p>
  24982. </dd>
  24983. <dt><samp class="option">deint</samp></dt>
  24984. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  24985. values:
  24986. </p>
  24987. <dl class="table">
  24988. <dt><samp class="option">0, all</samp></dt>
  24989. <dd><p>Deinterlace all frames.
  24990. </p></dd>
  24991. <dt><samp class="option">1, interlaced</samp></dt>
  24992. <dd><p>Only deinterlace frames marked as interlaced.
  24993. </p></dd>
  24994. </dl>
  24995. <p>The default value is <code class="code">all</code>.
  24996. </p></dd>
  24997. </dl>
  24998. </div>
  24999. <div class="section-level-extent" id="bwdif_005fcuda">
  25000. <h3 class="section"><span>32.21 bwdif_cuda<a class="copiable-link" href="#bwdif_005fcuda"> &para;</a></span></h3>
  25001. <p>Deinterlace the input video using the <a class="ref" href="#bwdif">bwdif</a> algorithm, but implemented
  25002. in CUDA so that it can work as part of a GPU accelerated pipeline with nvdec
  25003. and/or nvenc.
  25004. </p>
  25005. <p>It accepts the following parameters:
  25006. </p>
  25007. <dl class="table">
  25008. <dt><samp class="option">mode</samp></dt>
  25009. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  25010. </p>
  25011. <dl class="table">
  25012. <dt><samp class="option">0, send_frame</samp></dt>
  25013. <dd><p>Output one frame for each frame.
  25014. </p></dd>
  25015. <dt><samp class="option">1, send_field</samp></dt>
  25016. <dd><p>Output one frame for each field.
  25017. </p></dd>
  25018. </dl>
  25019. <p>The default value is <code class="code">send_field</code>.
  25020. </p>
  25021. </dd>
  25022. <dt><samp class="option">parity</samp></dt>
  25023. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  25024. of the following values:
  25025. </p>
  25026. <dl class="table">
  25027. <dt><samp class="option">0, tff</samp></dt>
  25028. <dd><p>Assume the top field is first.
  25029. </p></dd>
  25030. <dt><samp class="option">1, bff</samp></dt>
  25031. <dd><p>Assume the bottom field is first.
  25032. </p></dd>
  25033. <dt><samp class="option">-1, auto</samp></dt>
  25034. <dd><p>Enable automatic detection of field parity.
  25035. </p></dd>
  25036. </dl>
  25037. <p>The default value is <code class="code">auto</code>.
  25038. If the interlacing is unknown or the decoder does not export this information,
  25039. top field first will be assumed.
  25040. </p>
  25041. </dd>
  25042. <dt><samp class="option">deint</samp></dt>
  25043. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  25044. values:
  25045. </p>
  25046. <dl class="table">
  25047. <dt><samp class="option">0, all</samp></dt>
  25048. <dd><p>Deinterlace all frames.
  25049. </p></dd>
  25050. <dt><samp class="option">1, interlaced</samp></dt>
  25051. <dd><p>Only deinterlace frames marked as interlaced.
  25052. </p></dd>
  25053. </dl>
  25054. <p>The default value is <code class="code">all</code>.
  25055. </p></dd>
  25056. </dl>
  25057. </div>
  25058. <div class="section-level-extent" id="ccrepack">
  25059. <h3 class="section"><span>32.22 ccrepack<a class="copiable-link" href="#ccrepack"> &para;</a></span></h3>
  25060. <p>Repack CEA-708 closed captioning side data
  25061. </p>
  25062. <p>This filter fixes various issues seen with commerical encoders
  25063. related to upstream malformed CEA-708 payloads, specifically
  25064. incorrect number of tuples (wrong cc_count for the target FPS),
  25065. and incorrect ordering of tuples (i.e. the CEA-608 tuples are not at
  25066. the first entries in the payload).
  25067. </p>
  25068. </div>
  25069. <div class="section-level-extent" id="cas">
  25070. <h3 class="section"><span>32.23 cas<a class="copiable-link" href="#cas"> &para;</a></span></h3>
  25071. <p>Apply Contrast Adaptive Sharpen filter to video stream.
  25072. </p>
  25073. <p>The filter accepts the following options:
  25074. </p>
  25075. <dl class="table">
  25076. <dt><samp class="option">strength</samp></dt>
  25077. <dd><p>Set the sharpening strength. Default value is 0.
  25078. </p>
  25079. </dd>
  25080. <dt><samp class="option">planes</samp></dt>
  25081. <dd><p>Set planes to filter. Default value is to filter all
  25082. planes except alpha plane.
  25083. </p></dd>
  25084. </dl>
  25085. <ul class="mini-toc">
  25086. <li><a href="#Commands-61" accesskey="1">Commands</a></li>
  25087. </ul>
  25088. <div class="subsection-level-extent" id="Commands-61">
  25089. <h4 class="subsection"><span>32.23.1 Commands<a class="copiable-link" href="#Commands-61"> &para;</a></span></h4>
  25090. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  25091. </p>
  25092. </div>
  25093. </div>
  25094. <div class="section-level-extent" id="chromahold">
  25095. <h3 class="section"><span>32.24 chromahold<a class="copiable-link" href="#chromahold"> &para;</a></span></h3>
  25096. <p>Remove all color information for all colors except for certain one.
  25097. </p>
  25098. <p>The filter accepts the following options:
  25099. </p>
  25100. <dl class="table">
  25101. <dt><samp class="option">color</samp></dt>
  25102. <dd><p>The color which will not be replaced with neutral chroma.
  25103. </p>
  25104. </dd>
  25105. <dt><samp class="option">similarity</samp></dt>
  25106. <dd><p>Similarity percentage with the above color.
  25107. 0.01 matches only the exact key color, while 1.0 matches everything.
  25108. </p>
  25109. </dd>
  25110. <dt><samp class="option">blend</samp></dt>
  25111. <dd><p>Blend percentage.
  25112. 0.0 makes pixels either fully gray, or not gray at all.
  25113. Higher values result in more preserved color.
  25114. </p>
  25115. </dd>
  25116. <dt><samp class="option">yuv</samp></dt>
  25117. <dd><p>Signals that the color passed is already in YUV instead of RGB.
  25118. </p>
  25119. <p>Literal colors like &quot;green&quot; or &quot;red&quot; don&rsquo;t make sense with this enabled anymore.
  25120. This can be used to pass exact YUV values as hexadecimal numbers.
  25121. </p></dd>
  25122. </dl>
  25123. <ul class="mini-toc">
  25124. <li><a href="#Commands-62" accesskey="1">Commands</a></li>
  25125. </ul>
  25126. <div class="subsection-level-extent" id="Commands-62">
  25127. <h4 class="subsection"><span>32.24.1 Commands<a class="copiable-link" href="#Commands-62"> &para;</a></span></h4>
  25128. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  25129. The command accepts the same syntax of the corresponding option.
  25130. </p>
  25131. <p>If the specified expression is not valid, it is kept at its current
  25132. value.
  25133. </p>
  25134. <a class="anchor" id="chromakey"></a></div>
  25135. </div>
  25136. <div class="section-level-extent" id="chromakey-1">
  25137. <h3 class="section"><span>32.25 chromakey<a class="copiable-link" href="#chromakey-1"> &para;</a></span></h3>
  25138. <p>YUV colorspace color/chroma keying.
  25139. </p>
  25140. <p>The filter accepts the following options:
  25141. </p>
  25142. <dl class="table">
  25143. <dt><samp class="option">color</samp></dt>
  25144. <dd><p>The color which will be replaced with transparency.
  25145. </p>
  25146. </dd>
  25147. <dt><samp class="option">similarity</samp></dt>
  25148. <dd><p>Similarity percentage with the key color.
  25149. </p>
  25150. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  25151. </p>
  25152. </dd>
  25153. <dt><samp class="option">blend</samp></dt>
  25154. <dd><p>Blend percentage.
  25155. </p>
  25156. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  25157. </p>
  25158. <p>Higher values result in semi-transparent pixels, with a higher transparency
  25159. the more similar the pixels color is to the key color.
  25160. </p>
  25161. </dd>
  25162. <dt><samp class="option">yuv</samp></dt>
  25163. <dd><p>Signals that the color passed is already in YUV instead of RGB.
  25164. </p>
  25165. <p>Literal colors like &quot;green&quot; or &quot;red&quot; don&rsquo;t make sense with this enabled anymore.
  25166. This can be used to pass exact YUV values as hexadecimal numbers.
  25167. </p></dd>
  25168. </dl>
  25169. <ul class="mini-toc">
  25170. <li><a href="#Commands-63" accesskey="1">Commands</a></li>
  25171. <li><a href="#Examples-67" accesskey="2">Examples</a></li>
  25172. </ul>
  25173. <div class="subsection-level-extent" id="Commands-63">
  25174. <h4 class="subsection"><span>32.25.1 Commands<a class="copiable-link" href="#Commands-63"> &para;</a></span></h4>
  25175. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  25176. The command accepts the same syntax of the corresponding option.
  25177. </p>
  25178. <p>If the specified expression is not valid, it is kept at its current
  25179. value.
  25180. </p>
  25181. </div>
  25182. <div class="subsection-level-extent" id="Examples-67">
  25183. <h4 class="subsection"><span>32.25.2 Examples<a class="copiable-link" href="#Examples-67"> &para;</a></span></h4>
  25184. <ul class="itemize mark-bullet">
  25185. <li>Make every green pixel in the input image transparent:
  25186. <div class="example">
  25187. <pre class="example-preformatted">ffmpeg -i input.png -vf chromakey=green out.png
  25188. </pre></div>
  25189. </li><li>Overlay a greenscreen-video on top of a static black background.
  25190. <div class="example">
  25191. <pre class="example-preformatted">ffmpeg -f lavfi -i color=c=black:s=1280x720 -i video.mp4 -shortest -filter_complex &quot;[1:v]chromakey=0x70de77:0.1:0.2[ckout];[0:v][ckout]overlay[out]&quot; -map &quot;[out]&quot; output.mkv
  25192. </pre></div>
  25193. </li></ul>
  25194. </div>
  25195. </div>
  25196. <div class="section-level-extent" id="chromakey_005fcuda">
  25197. <h3 class="section"><span>32.26 chromakey_cuda<a class="copiable-link" href="#chromakey_005fcuda"> &para;</a></span></h3>
  25198. <p>CUDA accelerated YUV colorspace color/chroma keying.
  25199. </p>
  25200. <p>This filter works like normal chromakey filter but operates on CUDA frames.
  25201. for more details and parameters see <a class="ref" href="#chromakey">chromakey</a>.
  25202. </p>
  25203. <ul class="mini-toc">
  25204. <li><a href="#Examples-68" accesskey="1">Examples</a></li>
  25205. </ul>
  25206. <div class="subsection-level-extent" id="Examples-68">
  25207. <h4 class="subsection"><span>32.26.1 Examples<a class="copiable-link" href="#Examples-68"> &para;</a></span></h4>
  25208. <ul class="itemize mark-bullet">
  25209. <li>Make all the green pixels in the input video transparent and use it as an overlay for another video:
  25210. <div class="example">
  25211. <pre class="example-preformatted">./ffmpeg \
  25212. -hwaccel cuda -hwaccel_output_format cuda -i input_green.mp4 \
  25213. -hwaccel cuda -hwaccel_output_format cuda -i base_video.mp4 \
  25214. -init_hw_device cuda \
  25215. -filter_complex \
  25216. &quot; \
  25217. [0:v]chromakey_cuda=0x25302D:0.1:0.12:1[overlay_video]; \
  25218. [1:v]scale_cuda=format=yuv420p[base]; \
  25219. [base][overlay_video]overlay_cuda&quot; \
  25220. -an -sn -c:v h264_nvenc -cq 20 output.mp4
  25221. </pre></div>
  25222. </li><li>Process two software sources, explicitly uploading the frames:
  25223. <div class="example">
  25224. <pre class="example-preformatted">./ffmpeg -init_hw_device cuda=cuda -filter_hw_device cuda \
  25225. -f lavfi -i color=size=800x600:color=white,format=yuv420p \
  25226. -f lavfi -i yuvtestsrc=size=200x200,format=yuv420p \
  25227. -filter_complex \
  25228. &quot; \
  25229. [0]hwupload[under]; \
  25230. [1]hwupload,chromakey_cuda=green:0.1:0.12[over]; \
  25231. [under][over]overlay_cuda&quot; \
  25232. -c:v hevc_nvenc -cq 18 -preset slow output.mp4
  25233. </pre></div>
  25234. </li></ul>
  25235. </div>
  25236. </div>
  25237. <div class="section-level-extent" id="chromanr">
  25238. <h3 class="section"><span>32.27 chromanr<a class="copiable-link" href="#chromanr"> &para;</a></span></h3>
  25239. <p>Reduce chrominance noise.
  25240. </p>
  25241. <p>The filter accepts the following options:
  25242. </p>
  25243. <dl class="table">
  25244. <dt><samp class="option">thres</samp></dt>
  25245. <dd><p>Set threshold for averaging chrominance values.
  25246. Sum of absolute difference of Y, U and V pixel components of current
  25247. pixel and neighbour pixels lower than this threshold will be used in
  25248. averaging. Luma component is left unchanged and is copied to output.
  25249. Default value is 30. Allowed range is from 1 to 200.
  25250. </p>
  25251. </dd>
  25252. <dt><samp class="option">sizew</samp></dt>
  25253. <dd><p>Set horizontal radius of rectangle used for averaging.
  25254. Allowed range is from 1 to 100. Default value is 5.
  25255. </p>
  25256. </dd>
  25257. <dt><samp class="option">sizeh</samp></dt>
  25258. <dd><p>Set vertical radius of rectangle used for averaging.
  25259. Allowed range is from 1 to 100. Default value is 5.
  25260. </p>
  25261. </dd>
  25262. <dt><samp class="option">stepw</samp></dt>
  25263. <dd><p>Set horizontal step when averaging. Default value is 1.
  25264. Allowed range is from 1 to 50.
  25265. Mostly useful to speed-up filtering.
  25266. </p>
  25267. </dd>
  25268. <dt><samp class="option">steph</samp></dt>
  25269. <dd><p>Set vertical step when averaging. Default value is 1.
  25270. Allowed range is from 1 to 50.
  25271. Mostly useful to speed-up filtering.
  25272. </p>
  25273. </dd>
  25274. <dt><samp class="option">threy</samp></dt>
  25275. <dd><p>Set Y threshold for averaging chrominance values.
  25276. Set finer control for max allowed difference between Y components
  25277. of current pixel and neigbour pixels.
  25278. Default value is 200. Allowed range is from 1 to 200.
  25279. </p>
  25280. </dd>
  25281. <dt><samp class="option">threu</samp></dt>
  25282. <dd><p>Set U threshold for averaging chrominance values.
  25283. Set finer control for max allowed difference between U components
  25284. of current pixel and neigbour pixels.
  25285. Default value is 200. Allowed range is from 1 to 200.
  25286. </p>
  25287. </dd>
  25288. <dt><samp class="option">threv</samp></dt>
  25289. <dd><p>Set V threshold for averaging chrominance values.
  25290. Set finer control for max allowed difference between V components
  25291. of current pixel and neigbour pixels.
  25292. Default value is 200. Allowed range is from 1 to 200.
  25293. </p>
  25294. </dd>
  25295. <dt><samp class="option">distance</samp></dt>
  25296. <dd><p>Set distance type used in calculations.
  25297. </p>
  25298. <dl class="table">
  25299. <dt>&lsquo;<samp class="samp">manhattan</samp>&rsquo;</dt>
  25300. <dd><p>Absolute difference.
  25301. </p></dd>
  25302. <dt>&lsquo;<samp class="samp">euclidean</samp>&rsquo;</dt>
  25303. <dd><p>Difference squared.
  25304. </p></dd>
  25305. </dl>
  25306. <p>Default distance type is manhattan.
  25307. </p></dd>
  25308. </dl>
  25309. <ul class="mini-toc">
  25310. <li><a href="#Commands-64" accesskey="1">Commands</a></li>
  25311. </ul>
  25312. <div class="subsection-level-extent" id="Commands-64">
  25313. <h4 class="subsection"><span>32.27.1 Commands<a class="copiable-link" href="#Commands-64"> &para;</a></span></h4>
  25314. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  25315. The command accepts the same syntax of the corresponding option.
  25316. </p>
  25317. </div>
  25318. </div>
  25319. <div class="section-level-extent" id="chromashift">
  25320. <h3 class="section"><span>32.28 chromashift<a class="copiable-link" href="#chromashift"> &para;</a></span></h3>
  25321. <p>Shift chroma pixels horizontally and/or vertically.
  25322. </p>
  25323. <p>The filter accepts the following options:
  25324. </p><dl class="table">
  25325. <dt><samp class="option">cbh</samp></dt>
  25326. <dd><p>Set amount to shift chroma-blue horizontally.
  25327. </p></dd>
  25328. <dt><samp class="option">cbv</samp></dt>
  25329. <dd><p>Set amount to shift chroma-blue vertically.
  25330. </p></dd>
  25331. <dt><samp class="option">crh</samp></dt>
  25332. <dd><p>Set amount to shift chroma-red horizontally.
  25333. </p></dd>
  25334. <dt><samp class="option">crv</samp></dt>
  25335. <dd><p>Set amount to shift chroma-red vertically.
  25336. </p></dd>
  25337. <dt><samp class="option">edge</samp></dt>
  25338. <dd><p>Set edge mode, can be <var class="var">smear</var>, default, or <var class="var">warp</var>.
  25339. </p></dd>
  25340. </dl>
  25341. <ul class="mini-toc">
  25342. <li><a href="#Commands-65" accesskey="1">Commands</a></li>
  25343. </ul>
  25344. <div class="subsection-level-extent" id="Commands-65">
  25345. <h4 class="subsection"><span>32.28.1 Commands<a class="copiable-link" href="#Commands-65"> &para;</a></span></h4>
  25346. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  25347. </p>
  25348. </div>
  25349. </div>
  25350. <div class="section-level-extent" id="ciescope">
  25351. <h3 class="section"><span>32.29 ciescope<a class="copiable-link" href="#ciescope"> &para;</a></span></h3>
  25352. <p>Display CIE color diagram with pixels overlaid onto it.
  25353. </p>
  25354. <p>The filter accepts the following options:
  25355. </p>
  25356. <dl class="table">
  25357. <dt><samp class="option">system</samp></dt>
  25358. <dd><p>Set color system.
  25359. </p>
  25360. <dl class="table">
  25361. <dt>&lsquo;<samp class="samp">ntsc, 470m</samp>&rsquo;</dt>
  25362. <dt>&lsquo;<samp class="samp">ebu, 470bg</samp>&rsquo;</dt>
  25363. <dt>&lsquo;<samp class="samp">smpte</samp>&rsquo;</dt>
  25364. <dt>&lsquo;<samp class="samp">240m</samp>&rsquo;</dt>
  25365. <dt>&lsquo;<samp class="samp">apple</samp>&rsquo;</dt>
  25366. <dt>&lsquo;<samp class="samp">widergb</samp>&rsquo;</dt>
  25367. <dt>&lsquo;<samp class="samp">cie1931</samp>&rsquo;</dt>
  25368. <dt>&lsquo;<samp class="samp">rec709, hdtv</samp>&rsquo;</dt>
  25369. <dt>&lsquo;<samp class="samp">uhdtv, rec2020</samp>&rsquo;</dt>
  25370. <dt>&lsquo;<samp class="samp">dcip3</samp>&rsquo;</dt>
  25371. </dl>
  25372. </dd>
  25373. <dt><samp class="option">cie</samp></dt>
  25374. <dd><p>Set CIE system.
  25375. </p>
  25376. <dl class="table">
  25377. <dt>&lsquo;<samp class="samp">xyy</samp>&rsquo;</dt>
  25378. <dt>&lsquo;<samp class="samp">ucs</samp>&rsquo;</dt>
  25379. <dt>&lsquo;<samp class="samp">luv</samp>&rsquo;</dt>
  25380. </dl>
  25381. </dd>
  25382. <dt><samp class="option">gamuts</samp></dt>
  25383. <dd><p>Set what gamuts to draw.
  25384. </p>
  25385. <p>See <code class="code">system</code> option for available values.
  25386. </p>
  25387. </dd>
  25388. <dt><samp class="option">size, s</samp></dt>
  25389. <dd><p>Set ciescope size, by default set to 512.
  25390. </p>
  25391. </dd>
  25392. <dt><samp class="option">intensity, i</samp></dt>
  25393. <dd><p>Set intensity used to map input pixel values to CIE diagram.
  25394. </p>
  25395. </dd>
  25396. <dt><samp class="option">contrast</samp></dt>
  25397. <dd><p>Set contrast used to draw tongue colors that are out of active color system gamut.
  25398. </p>
  25399. </dd>
  25400. <dt><samp class="option">corrgamma</samp></dt>
  25401. <dd><p>Correct gamma displayed on scope, by default enabled.
  25402. </p>
  25403. </dd>
  25404. <dt><samp class="option">showwhite</samp></dt>
  25405. <dd><p>Show white point on CIE diagram, by default disabled.
  25406. </p>
  25407. </dd>
  25408. <dt><samp class="option">gamma</samp></dt>
  25409. <dd><p>Set input gamma. Used only with XYZ input color space.
  25410. </p>
  25411. </dd>
  25412. <dt><samp class="option">fill</samp></dt>
  25413. <dd><p>Fill with CIE colors. By default is enabled.
  25414. </p></dd>
  25415. </dl>
  25416. </div>
  25417. <div class="section-level-extent" id="codecview">
  25418. <h3 class="section"><span>32.30 codecview<a class="copiable-link" href="#codecview"> &para;</a></span></h3>
  25419. <p>Visualize information exported by some codecs.
  25420. </p>
  25421. <p>Some codecs can export information through frames using side-data or other
  25422. means. For example, some MPEG based codecs export motion vectors through the
  25423. <var class="var">export_mvs</var> flag in the codec <samp class="option">flags2</samp> option.
  25424. </p>
  25425. <p>The filter accepts the following option:
  25426. </p>
  25427. <dl class="table">
  25428. <dt><samp class="option">block</samp></dt>
  25429. <dd><p>Display block partition structure using the luma plane.
  25430. </p>
  25431. </dd>
  25432. <dt><samp class="option">mv</samp></dt>
  25433. <dd><p>Set motion vectors to visualize.
  25434. </p>
  25435. <p>Available flags for <var class="var">mv</var> are:
  25436. </p>
  25437. <dl class="table">
  25438. <dt>&lsquo;<samp class="samp">pf</samp>&rsquo;</dt>
  25439. <dd><p>forward predicted MVs of P-frames
  25440. </p></dd>
  25441. <dt>&lsquo;<samp class="samp">bf</samp>&rsquo;</dt>
  25442. <dd><p>forward predicted MVs of B-frames
  25443. </p></dd>
  25444. <dt>&lsquo;<samp class="samp">bb</samp>&rsquo;</dt>
  25445. <dd><p>backward predicted MVs of B-frames
  25446. </p></dd>
  25447. </dl>
  25448. </dd>
  25449. <dt><samp class="option">qp</samp></dt>
  25450. <dd><p>Display quantization parameters using the chroma planes.
  25451. </p>
  25452. </dd>
  25453. <dt><samp class="option">mv_type, mvt</samp></dt>
  25454. <dd><p>Set motion vectors type to visualize. Includes MVs from all frames unless specified by <var class="var">frame_type</var> option.
  25455. </p>
  25456. <p>Available flags for <var class="var">mv_type</var> are:
  25457. </p>
  25458. <dl class="table">
  25459. <dt>&lsquo;<samp class="samp">fp</samp>&rsquo;</dt>
  25460. <dd><p>forward predicted MVs
  25461. </p></dd>
  25462. <dt>&lsquo;<samp class="samp">bp</samp>&rsquo;</dt>
  25463. <dd><p>backward predicted MVs
  25464. </p></dd>
  25465. </dl>
  25466. </dd>
  25467. <dt><samp class="option">frame_type, ft</samp></dt>
  25468. <dd><p>Set frame type to visualize motion vectors of.
  25469. </p>
  25470. <p>Available flags for <var class="var">frame_type</var> are:
  25471. </p>
  25472. <dl class="table">
  25473. <dt>&lsquo;<samp class="samp">if</samp>&rsquo;</dt>
  25474. <dd><p>intra-coded frames (I-frames)
  25475. </p></dd>
  25476. <dt>&lsquo;<samp class="samp">pf</samp>&rsquo;</dt>
  25477. <dd><p>predicted frames (P-frames)
  25478. </p></dd>
  25479. <dt>&lsquo;<samp class="samp">bf</samp>&rsquo;</dt>
  25480. <dd><p>bi-directionally predicted frames (B-frames)
  25481. </p></dd>
  25482. </dl>
  25483. </dd>
  25484. </dl>
  25485. <ul class="mini-toc">
  25486. <li><a href="#Examples-69" accesskey="1">Examples</a></li>
  25487. </ul>
  25488. <div class="subsection-level-extent" id="Examples-69">
  25489. <h4 class="subsection"><span>32.30.1 Examples<a class="copiable-link" href="#Examples-69"> &para;</a></span></h4>
  25490. <ul class="itemize mark-bullet">
  25491. <li>Visualize forward predicted MVs of all frames using <code class="command">ffplay</code>:
  25492. <div class="example">
  25493. <pre class="example-preformatted">ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
  25494. </pre></div>
  25495. </li><li>Visualize multi-directionals MVs of P and B-Frames using <code class="command">ffplay</code>:
  25496. <div class="example">
  25497. <pre class="example-preformatted">ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
  25498. </pre></div>
  25499. </li></ul>
  25500. </div>
  25501. </div>
  25502. <div class="section-level-extent" id="colorbalance">
  25503. <h3 class="section"><span>32.31 colorbalance<a class="copiable-link" href="#colorbalance"> &para;</a></span></h3>
  25504. <p>Modify intensity of primary colors (red, green and blue) of input frames.
  25505. </p>
  25506. <p>The filter allows an input frame to be adjusted in the shadows, midtones or highlights
  25507. regions for the red-cyan, green-magenta or blue-yellow balance.
  25508. </p>
  25509. <p>A positive adjustment value shifts the balance towards the primary color, a negative
  25510. value towards the complementary color.
  25511. </p>
  25512. <p>The filter accepts the following options:
  25513. </p>
  25514. <dl class="table">
  25515. <dt><samp class="option">rs</samp></dt>
  25516. <dt><samp class="option">gs</samp></dt>
  25517. <dt><samp class="option">bs</samp></dt>
  25518. <dd><p>Adjust red, green and blue shadows (darkest pixels).
  25519. </p>
  25520. </dd>
  25521. <dt><samp class="option">rm</samp></dt>
  25522. <dt><samp class="option">gm</samp></dt>
  25523. <dt><samp class="option">bm</samp></dt>
  25524. <dd><p>Adjust red, green and blue midtones (medium pixels).
  25525. </p>
  25526. </dd>
  25527. <dt><samp class="option">rh</samp></dt>
  25528. <dt><samp class="option">gh</samp></dt>
  25529. <dt><samp class="option">bh</samp></dt>
  25530. <dd><p>Adjust red, green and blue highlights (brightest pixels).
  25531. </p>
  25532. <p>Allowed ranges for options are <code class="code">[-1.0, 1.0]</code>. Defaults are <code class="code">0</code>.
  25533. </p>
  25534. </dd>
  25535. <dt><samp class="option">pl</samp></dt>
  25536. <dd><p>Preserve lightness when changing color balance. Default is disabled.
  25537. </p></dd>
  25538. </dl>
  25539. <ul class="mini-toc">
  25540. <li><a href="#Examples-70" accesskey="1">Examples</a></li>
  25541. <li><a href="#Commands-66" accesskey="2">Commands</a></li>
  25542. </ul>
  25543. <div class="subsection-level-extent" id="Examples-70">
  25544. <h4 class="subsection"><span>32.31.1 Examples<a class="copiable-link" href="#Examples-70"> &para;</a></span></h4>
  25545. <ul class="itemize mark-bullet">
  25546. <li>Add red color cast to shadows:
  25547. <div class="example">
  25548. <pre class="example-preformatted">colorbalance=rs=.3
  25549. </pre></div>
  25550. </li></ul>
  25551. </div>
  25552. <div class="subsection-level-extent" id="Commands-66">
  25553. <h4 class="subsection"><span>32.31.2 Commands<a class="copiable-link" href="#Commands-66"> &para;</a></span></h4>
  25554. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  25555. </p>
  25556. </div>
  25557. </div>
  25558. <div class="section-level-extent" id="colorcontrast">
  25559. <h3 class="section"><span>32.32 colorcontrast<a class="copiable-link" href="#colorcontrast"> &para;</a></span></h3>
  25560. <p>Adjust color contrast between RGB components.
  25561. </p>
  25562. <p>The filter accepts the following options:
  25563. </p>
  25564. <dl class="table">
  25565. <dt><samp class="option">rc</samp></dt>
  25566. <dd><p>Set the red-cyan contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
  25567. </p>
  25568. </dd>
  25569. <dt><samp class="option">gm</samp></dt>
  25570. <dd><p>Set the green-magenta contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
  25571. </p>
  25572. </dd>
  25573. <dt><samp class="option">by</samp></dt>
  25574. <dd><p>Set the blue-yellow contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
  25575. </p>
  25576. </dd>
  25577. <dt><samp class="option">rcw</samp></dt>
  25578. <dt><samp class="option">gmw</samp></dt>
  25579. <dt><samp class="option">byw</samp></dt>
  25580. <dd><p>Set the weight of each <code class="code">rc</code>, <code class="code">gm</code>, <code class="code">by</code> option value. Default value is 0.0.
  25581. Allowed range is from 0.0 to 1.0. If all weights are 0.0 filtering is disabled.
  25582. </p>
  25583. </dd>
  25584. <dt><samp class="option">pl</samp></dt>
  25585. <dd><p>Set the amount of preserving lightness. Default value is 0.0. Allowed range is from 0.0 to 1.0.
  25586. </p></dd>
  25587. </dl>
  25588. <ul class="mini-toc">
  25589. <li><a href="#Commands-67" accesskey="1">Commands</a></li>
  25590. </ul>
  25591. <div class="subsection-level-extent" id="Commands-67">
  25592. <h4 class="subsection"><span>32.32.1 Commands<a class="copiable-link" href="#Commands-67"> &para;</a></span></h4>
  25593. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  25594. </p>
  25595. </div>
  25596. </div>
  25597. <div class="section-level-extent" id="colorcorrect">
  25598. <h3 class="section"><span>32.33 colorcorrect<a class="copiable-link" href="#colorcorrect"> &para;</a></span></h3>
  25599. <p>Adjust color white balance selectively for blacks and whites.
  25600. This filter operates in YUV colorspace.
  25601. </p>
  25602. <p>The filter accepts the following options:
  25603. </p>
  25604. <dl class="table">
  25605. <dt><samp class="option">rl</samp></dt>
  25606. <dd><p>Set the red shadow spot. Allowed range is from -1.0 to 1.0.
  25607. Default value is 0.
  25608. </p>
  25609. </dd>
  25610. <dt><samp class="option">bl</samp></dt>
  25611. <dd><p>Set the blue shadow spot. Allowed range is from -1.0 to 1.0.
  25612. Default value is 0.
  25613. </p>
  25614. </dd>
  25615. <dt><samp class="option">rh</samp></dt>
  25616. <dd><p>Set the red highlight spot. Allowed range is from -1.0 to 1.0.
  25617. Default value is 0.
  25618. </p>
  25619. </dd>
  25620. <dt><samp class="option">bh</samp></dt>
  25621. <dd><p>Set the blue highlight spot. Allowed range is from -1.0 to 1.0.
  25622. Default value is 0.
  25623. </p>
  25624. </dd>
  25625. <dt><samp class="option">saturation</samp></dt>
  25626. <dd><p>Set the amount of saturation. Allowed range is from -3.0 to 3.0.
  25627. Default value is 1.
  25628. </p>
  25629. </dd>
  25630. <dt><samp class="option">analyze</samp></dt>
  25631. <dd><p>If set to anything other than <code class="code">manual</code> it will analyze every frame and use derived
  25632. parameters for filtering output frame.
  25633. </p>
  25634. <p>Possible values are:
  25635. </p><dl class="table">
  25636. <dt>&lsquo;<samp class="samp">manual</samp>&rsquo;</dt>
  25637. <dt>&lsquo;<samp class="samp">average</samp>&rsquo;</dt>
  25638. <dt>&lsquo;<samp class="samp">minmax</samp>&rsquo;</dt>
  25639. <dt>&lsquo;<samp class="samp">median</samp>&rsquo;</dt>
  25640. </dl>
  25641. <p>Default value is <code class="code">manual</code>.
  25642. </p></dd>
  25643. </dl>
  25644. <ul class="mini-toc">
  25645. <li><a href="#Commands-68" accesskey="1">Commands</a></li>
  25646. </ul>
  25647. <div class="subsection-level-extent" id="Commands-68">
  25648. <h4 class="subsection"><span>32.33.1 Commands<a class="copiable-link" href="#Commands-68"> &para;</a></span></h4>
  25649. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  25650. </p>
  25651. </div>
  25652. </div>
  25653. <div class="section-level-extent" id="colorchannelmixer">
  25654. <h3 class="section"><span>32.34 colorchannelmixer<a class="copiable-link" href="#colorchannelmixer"> &para;</a></span></h3>
  25655. <p>Adjust video input frames by re-mixing color channels.
  25656. </p>
  25657. <p>This filter modifies a color channel by adding the values associated to
  25658. the other channels of the same pixels. For example if the value to
  25659. modify is red, the output value will be:
  25660. </p><div class="example">
  25661. <pre class="example-preformatted"><var class="var">red</var>=<var class="var">red</var>*<var class="var">rr</var> + <var class="var">blue</var>*<var class="var">rb</var> + <var class="var">green</var>*<var class="var">rg</var> + <var class="var">alpha</var>*<var class="var">ra</var>
  25662. </pre></div>
  25663. <p>The filter accepts the following options:
  25664. </p>
  25665. <dl class="table">
  25666. <dt><samp class="option">rr</samp></dt>
  25667. <dt><samp class="option">rg</samp></dt>
  25668. <dt><samp class="option">rb</samp></dt>
  25669. <dt><samp class="option">ra</samp></dt>
  25670. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output red channel.
  25671. Default is <code class="code">1</code> for <var class="var">rr</var>, and <code class="code">0</code> for <var class="var">rg</var>, <var class="var">rb</var> and <var class="var">ra</var>.
  25672. </p>
  25673. </dd>
  25674. <dt><samp class="option">gr</samp></dt>
  25675. <dt><samp class="option">gg</samp></dt>
  25676. <dt><samp class="option">gb</samp></dt>
  25677. <dt><samp class="option">ga</samp></dt>
  25678. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output green channel.
  25679. Default is <code class="code">1</code> for <var class="var">gg</var>, and <code class="code">0</code> for <var class="var">gr</var>, <var class="var">gb</var> and <var class="var">ga</var>.
  25680. </p>
  25681. </dd>
  25682. <dt><samp class="option">br</samp></dt>
  25683. <dt><samp class="option">bg</samp></dt>
  25684. <dt><samp class="option">bb</samp></dt>
  25685. <dt><samp class="option">ba</samp></dt>
  25686. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output blue channel.
  25687. Default is <code class="code">1</code> for <var class="var">bb</var>, and <code class="code">0</code> for <var class="var">br</var>, <var class="var">bg</var> and <var class="var">ba</var>.
  25688. </p>
  25689. </dd>
  25690. <dt><samp class="option">ar</samp></dt>
  25691. <dt><samp class="option">ag</samp></dt>
  25692. <dt><samp class="option">ab</samp></dt>
  25693. <dt><samp class="option">aa</samp></dt>
  25694. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output alpha channel.
  25695. Default is <code class="code">1</code> for <var class="var">aa</var>, and <code class="code">0</code> for <var class="var">ar</var>, <var class="var">ag</var> and <var class="var">ab</var>.
  25696. </p>
  25697. <p>Allowed ranges for options are <code class="code">[-2.0, 2.0]</code>.
  25698. </p>
  25699. </dd>
  25700. <dt><samp class="option">pc</samp></dt>
  25701. <dd><p>Set preserve color mode. The accepted values are:
  25702. </p><dl class="table">
  25703. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  25704. <dd><p>Disable color preserving, this is default.
  25705. </p></dd>
  25706. <dt>&lsquo;<samp class="samp">lum</samp>&rsquo;</dt>
  25707. <dd><p>Preserve luminance.
  25708. </p></dd>
  25709. <dt>&lsquo;<samp class="samp">max</samp>&rsquo;</dt>
  25710. <dd><p>Preserve max value of RGB triplet.
  25711. </p></dd>
  25712. <dt>&lsquo;<samp class="samp">avg</samp>&rsquo;</dt>
  25713. <dd><p>Preserve average value of RGB triplet.
  25714. </p></dd>
  25715. <dt>&lsquo;<samp class="samp">sum</samp>&rsquo;</dt>
  25716. <dd><p>Preserve sum value of RGB triplet.
  25717. </p></dd>
  25718. <dt>&lsquo;<samp class="samp">nrm</samp>&rsquo;</dt>
  25719. <dd><p>Preserve normalized value of RGB triplet.
  25720. </p></dd>
  25721. <dt>&lsquo;<samp class="samp">pwr</samp>&rsquo;</dt>
  25722. <dd><p>Preserve power value of RGB triplet.
  25723. </p></dd>
  25724. </dl>
  25725. </dd>
  25726. <dt><samp class="option">pa</samp></dt>
  25727. <dd><p>Set the preserve color amount when changing colors. Allowed range is from <code class="code">[0.0, 1.0]</code>.
  25728. Default is <code class="code">0.0</code>, thus disabled.
  25729. </p></dd>
  25730. </dl>
  25731. <ul class="mini-toc">
  25732. <li><a href="#Examples-71" accesskey="1">Examples</a></li>
  25733. <li><a href="#Commands-69" accesskey="2">Commands</a></li>
  25734. </ul>
  25735. <div class="subsection-level-extent" id="Examples-71">
  25736. <h4 class="subsection"><span>32.34.1 Examples<a class="copiable-link" href="#Examples-71"> &para;</a></span></h4>
  25737. <ul class="itemize mark-bullet">
  25738. <li>Convert source to grayscale:
  25739. <div class="example">
  25740. <pre class="example-preformatted">colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
  25741. </pre></div>
  25742. </li><li>Simulate sepia tones:
  25743. <div class="example">
  25744. <pre class="example-preformatted">colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
  25745. </pre></div>
  25746. </li></ul>
  25747. </div>
  25748. <div class="subsection-level-extent" id="Commands-69">
  25749. <h4 class="subsection"><span>32.34.2 Commands<a class="copiable-link" href="#Commands-69"> &para;</a></span></h4>
  25750. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  25751. </p>
  25752. </div>
  25753. </div>
  25754. <div class="section-level-extent" id="colorize">
  25755. <h3 class="section"><span>32.35 colorize<a class="copiable-link" href="#colorize"> &para;</a></span></h3>
  25756. <p>Overlay a solid color on the video stream.
  25757. </p>
  25758. <p>The filter accepts the following options:
  25759. </p>
  25760. <dl class="table">
  25761. <dt><samp class="option">hue</samp></dt>
  25762. <dd><p>Set the color hue. Allowed range is from 0 to 360.
  25763. Default value is 0.
  25764. </p>
  25765. </dd>
  25766. <dt><samp class="option">saturation</samp></dt>
  25767. <dd><p>Set the color saturation. Allowed range is from 0 to 1.
  25768. Default value is 0.5.
  25769. </p>
  25770. </dd>
  25771. <dt><samp class="option">lightness</samp></dt>
  25772. <dd><p>Set the color lightness. Allowed range is from 0 to 1.
  25773. Default value is 0.5.
  25774. </p>
  25775. </dd>
  25776. <dt><samp class="option">mix</samp></dt>
  25777. <dd><p>Set the mix of source lightness. By default is set to 1.0.
  25778. Allowed range is from 0.0 to 1.0.
  25779. </p></dd>
  25780. </dl>
  25781. <ul class="mini-toc">
  25782. <li><a href="#Commands-70" accesskey="1">Commands</a></li>
  25783. </ul>
  25784. <div class="subsection-level-extent" id="Commands-70">
  25785. <h4 class="subsection"><span>32.35.1 Commands<a class="copiable-link" href="#Commands-70"> &para;</a></span></h4>
  25786. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  25787. </p>
  25788. </div>
  25789. </div>
  25790. <div class="section-level-extent" id="colorkey">
  25791. <h3 class="section"><span>32.36 colorkey<a class="copiable-link" href="#colorkey"> &para;</a></span></h3>
  25792. <p>RGB colorspace color keying.
  25793. This filter operates on 8-bit RGB format frames by setting the alpha component of each pixel
  25794. which falls within the similarity radius of the key color to 0. The alpha value for pixels outside
  25795. the similarity radius depends on the value of the blend option.
  25796. </p>
  25797. <p>The filter accepts the following options:
  25798. </p>
  25799. <dl class="table">
  25800. <dt><samp class="option">color</samp></dt>
  25801. <dd><p>Set the color for which alpha will be set to 0 (full transparency).
  25802. See <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  25803. Default is <code class="code">black</code>.
  25804. </p>
  25805. </dd>
  25806. <dt><samp class="option">similarity</samp></dt>
  25807. <dd><p>Set the radius from the key color within which other colors also have full transparency.
  25808. The computed distance is related to the unit fractional distance in 3D space between the RGB values
  25809. of the key color and the pixel&rsquo;s color. Range is 0.01 to 1.0. 0.01 matches within a very small radius
  25810. around the exact key color, while 1.0 matches everything.
  25811. Default is <code class="code">0.01</code>.
  25812. </p>
  25813. </dd>
  25814. <dt><samp class="option">blend</samp></dt>
  25815. <dd><p>Set how the alpha value for pixels that fall outside the similarity radius is computed.
  25816. 0.0 makes pixels either fully transparent or fully opaque.
  25817. Higher values result in semi-transparent pixels, with greater transparency
  25818. the more similar the pixel color is to the key color.
  25819. Range is 0.0 to 1.0. Default is <code class="code">0.0</code>.
  25820. </p></dd>
  25821. </dl>
  25822. <ul class="mini-toc">
  25823. <li><a href="#Examples-72" accesskey="1">Examples</a></li>
  25824. <li><a href="#Commands-71" accesskey="2">Commands</a></li>
  25825. </ul>
  25826. <div class="subsection-level-extent" id="Examples-72">
  25827. <h4 class="subsection"><span>32.36.1 Examples<a class="copiable-link" href="#Examples-72"> &para;</a></span></h4>
  25828. <ul class="itemize mark-bullet">
  25829. <li>Make every green pixel in the input image transparent:
  25830. <div class="example">
  25831. <pre class="example-preformatted">ffmpeg -i input.png -vf colorkey=green out.png
  25832. </pre></div>
  25833. </li><li>Overlay a greenscreen-video on top of a static background image.
  25834. <div class="example">
  25835. <pre class="example-preformatted">ffmpeg -i background.png -i video.mp4 -filter_complex &quot;[1:v]colorkey=0x3BBD1E:0.3:0.2[ckout];[0:v][ckout]overlay[out]&quot; -map &quot;[out]&quot; output.flv
  25836. </pre></div>
  25837. </li></ul>
  25838. </div>
  25839. <div class="subsection-level-extent" id="Commands-71">
  25840. <h4 class="subsection"><span>32.36.2 Commands<a class="copiable-link" href="#Commands-71"> &para;</a></span></h4>
  25841. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  25842. The command accepts the same syntax of the corresponding option.
  25843. </p>
  25844. <p>If the specified expression is not valid, it is kept at its current
  25845. value.
  25846. </p>
  25847. </div>
  25848. </div>
  25849. <div class="section-level-extent" id="colorhold">
  25850. <h3 class="section"><span>32.37 colorhold<a class="copiable-link" href="#colorhold"> &para;</a></span></h3>
  25851. <p>Remove all color information for all RGB colors except for certain one.
  25852. </p>
  25853. <p>The filter accepts the following options:
  25854. </p>
  25855. <dl class="table">
  25856. <dt><samp class="option">color</samp></dt>
  25857. <dd><p>The color which will not be replaced with neutral gray.
  25858. </p>
  25859. </dd>
  25860. <dt><samp class="option">similarity</samp></dt>
  25861. <dd><p>Similarity percentage with the above color.
  25862. 0.01 matches only the exact key color, while 1.0 matches everything.
  25863. </p>
  25864. </dd>
  25865. <dt><samp class="option">blend</samp></dt>
  25866. <dd><p>Blend percentage. 0.0 makes pixels fully gray.
  25867. Higher values result in more preserved color.
  25868. </p></dd>
  25869. </dl>
  25870. <ul class="mini-toc">
  25871. <li><a href="#Commands-72" accesskey="1">Commands</a></li>
  25872. </ul>
  25873. <div class="subsection-level-extent" id="Commands-72">
  25874. <h4 class="subsection"><span>32.37.1 Commands<a class="copiable-link" href="#Commands-72"> &para;</a></span></h4>
  25875. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  25876. The command accepts the same syntax of the corresponding option.
  25877. </p>
  25878. <p>If the specified expression is not valid, it is kept at its current
  25879. value.
  25880. </p>
  25881. </div>
  25882. </div>
  25883. <div class="section-level-extent" id="colorlevels">
  25884. <h3 class="section"><span>32.38 colorlevels<a class="copiable-link" href="#colorlevels"> &para;</a></span></h3>
  25885. <p>Adjust video input frames using levels.
  25886. </p>
  25887. <p>The filter accepts the following options:
  25888. </p>
  25889. <dl class="table">
  25890. <dt><samp class="option">rimin</samp></dt>
  25891. <dt><samp class="option">gimin</samp></dt>
  25892. <dt><samp class="option">bimin</samp></dt>
  25893. <dt><samp class="option">aimin</samp></dt>
  25894. <dd><p>Adjust red, green, blue and alpha input black point.
  25895. Allowed ranges for options are <code class="code">[-1.0, 1.0]</code>. Defaults are <code class="code">0</code>.
  25896. </p>
  25897. </dd>
  25898. <dt><samp class="option">rimax</samp></dt>
  25899. <dt><samp class="option">gimax</samp></dt>
  25900. <dt><samp class="option">bimax</samp></dt>
  25901. <dt><samp class="option">aimax</samp></dt>
  25902. <dd><p>Adjust red, green, blue and alpha input white point.
  25903. Allowed ranges for options are <code class="code">[-1.0, 1.0]</code>. Defaults are <code class="code">1</code>.
  25904. </p>
  25905. <p>Input levels are used to lighten highlights (bright tones), darken shadows
  25906. (dark tones), change the balance of bright and dark tones.
  25907. </p>
  25908. </dd>
  25909. <dt><samp class="option">romin</samp></dt>
  25910. <dt><samp class="option">gomin</samp></dt>
  25911. <dt><samp class="option">bomin</samp></dt>
  25912. <dt><samp class="option">aomin</samp></dt>
  25913. <dd><p>Adjust red, green, blue and alpha output black point.
  25914. Allowed ranges for options are <code class="code">[0, 1.0]</code>. Defaults are <code class="code">0</code>.
  25915. </p>
  25916. </dd>
  25917. <dt><samp class="option">romax</samp></dt>
  25918. <dt><samp class="option">gomax</samp></dt>
  25919. <dt><samp class="option">bomax</samp></dt>
  25920. <dt><samp class="option">aomax</samp></dt>
  25921. <dd><p>Adjust red, green, blue and alpha output white point.
  25922. Allowed ranges for options are <code class="code">[0, 1.0]</code>. Defaults are <code class="code">1</code>.
  25923. </p>
  25924. <p>Output levels allows manual selection of a constrained output level range.
  25925. </p>
  25926. </dd>
  25927. <dt><samp class="option">preserve</samp></dt>
  25928. <dd><p>Set preserve color mode. The accepted values are:
  25929. </p><dl class="table">
  25930. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  25931. <dd><p>Disable color preserving, this is default.
  25932. </p></dd>
  25933. <dt>&lsquo;<samp class="samp">lum</samp>&rsquo;</dt>
  25934. <dd><p>Preserve luminance.
  25935. </p></dd>
  25936. <dt>&lsquo;<samp class="samp">max</samp>&rsquo;</dt>
  25937. <dd><p>Preserve max value of RGB triplet.
  25938. </p></dd>
  25939. <dt>&lsquo;<samp class="samp">avg</samp>&rsquo;</dt>
  25940. <dd><p>Preserve average value of RGB triplet.
  25941. </p></dd>
  25942. <dt>&lsquo;<samp class="samp">sum</samp>&rsquo;</dt>
  25943. <dd><p>Preserve sum value of RGB triplet.
  25944. </p></dd>
  25945. <dt>&lsquo;<samp class="samp">nrm</samp>&rsquo;</dt>
  25946. <dd><p>Preserve normalized value of RGB triplet.
  25947. </p></dd>
  25948. <dt>&lsquo;<samp class="samp">pwr</samp>&rsquo;</dt>
  25949. <dd><p>Preserve power value of RGB triplet.
  25950. </p></dd>
  25951. </dl>
  25952. </dd>
  25953. </dl>
  25954. <ul class="mini-toc">
  25955. <li><a href="#Examples-73" accesskey="1">Examples</a></li>
  25956. <li><a href="#Commands-73" accesskey="2">Commands</a></li>
  25957. </ul>
  25958. <div class="subsection-level-extent" id="Examples-73">
  25959. <h4 class="subsection"><span>32.38.1 Examples<a class="copiable-link" href="#Examples-73"> &para;</a></span></h4>
  25960. <ul class="itemize mark-bullet">
  25961. <li>Make video output darker:
  25962. <div class="example">
  25963. <pre class="example-preformatted">colorlevels=rimin=0.058:gimin=0.058:bimin=0.058
  25964. </pre></div>
  25965. </li><li>Increase contrast:
  25966. <div class="example">
  25967. <pre class="example-preformatted">colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96
  25968. </pre></div>
  25969. </li><li>Make video output lighter:
  25970. <div class="example">
  25971. <pre class="example-preformatted">colorlevels=rimax=0.902:gimax=0.902:bimax=0.902
  25972. </pre></div>
  25973. </li><li>Increase brightness:
  25974. <div class="example">
  25975. <pre class="example-preformatted">colorlevels=romin=0.5:gomin=0.5:bomin=0.5
  25976. </pre></div>
  25977. </li></ul>
  25978. </div>
  25979. <div class="subsection-level-extent" id="Commands-73">
  25980. <h4 class="subsection"><span>32.38.2 Commands<a class="copiable-link" href="#Commands-73"> &para;</a></span></h4>
  25981. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  25982. </p>
  25983. </div>
  25984. </div>
  25985. <div class="section-level-extent" id="colormap">
  25986. <h3 class="section"><span>32.39 colormap<a class="copiable-link" href="#colormap"> &para;</a></span></h3>
  25987. <p>Apply custom color maps to video stream.
  25988. </p>
  25989. <p>This filter needs three input video streams.
  25990. First stream is video stream that is going to be filtered out.
  25991. Second and third video stream specify color patches for source
  25992. color to target color mapping.
  25993. </p>
  25994. <p>The filter accepts the following options:
  25995. </p>
  25996. <dl class="table">
  25997. <dt><samp class="option">patch_size</samp></dt>
  25998. <dd><p>Set the source and target video stream patch size in pixels.
  25999. </p>
  26000. </dd>
  26001. <dt><samp class="option">nb_patches</samp></dt>
  26002. <dd><p>Set the max number of used patches from source and target video stream.
  26003. Default value is number of patches available in additional video streams.
  26004. Max allowed number of patches is <code class="code">64</code>.
  26005. </p>
  26006. </dd>
  26007. <dt><samp class="option">type</samp></dt>
  26008. <dd><p>Set the adjustments used for target colors. Can be <code class="code">relative</code> or <code class="code">absolute</code>.
  26009. Defaults is <code class="code">absolute</code>.
  26010. </p>
  26011. </dd>
  26012. <dt><samp class="option">kernel</samp></dt>
  26013. <dd><p>Set the kernel used to measure color differences between mapped colors.
  26014. </p>
  26015. <p>The accepted values are:
  26016. </p><dl class="table">
  26017. <dt>&lsquo;<samp class="samp">euclidean</samp>&rsquo;</dt>
  26018. <dt>&lsquo;<samp class="samp">weuclidean</samp>&rsquo;</dt>
  26019. </dl>
  26020. <p>Default is <code class="code">euclidean</code>.
  26021. </p></dd>
  26022. </dl>
  26023. </div>
  26024. <div class="section-level-extent" id="colormatrix">
  26025. <h3 class="section"><span>32.40 colormatrix<a class="copiable-link" href="#colormatrix"> &para;</a></span></h3>
  26026. <p>Convert color matrix.
  26027. </p>
  26028. <p>The filter accepts the following options:
  26029. </p>
  26030. <dl class="table">
  26031. <dt><samp class="option">src</samp></dt>
  26032. <dt><samp class="option">dst</samp></dt>
  26033. <dd><p>Specify the source and destination color matrix. Both values must be
  26034. specified.
  26035. </p>
  26036. <p>The accepted values are:
  26037. </p><dl class="table">
  26038. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  26039. <dd><p>BT.709
  26040. </p>
  26041. </dd>
  26042. <dt>&lsquo;<samp class="samp">fcc</samp>&rsquo;</dt>
  26043. <dd><p>FCC
  26044. </p>
  26045. </dd>
  26046. <dt>&lsquo;<samp class="samp">bt601</samp>&rsquo;</dt>
  26047. <dd><p>BT.601
  26048. </p>
  26049. </dd>
  26050. <dt>&lsquo;<samp class="samp">bt470</samp>&rsquo;</dt>
  26051. <dd><p>BT.470
  26052. </p>
  26053. </dd>
  26054. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  26055. <dd><p>BT.470BG
  26056. </p>
  26057. </dd>
  26058. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  26059. <dd><p>SMPTE-170M
  26060. </p>
  26061. </dd>
  26062. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  26063. <dd><p>SMPTE-240M
  26064. </p>
  26065. </dd>
  26066. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  26067. <dd><p>BT.2020
  26068. </p></dd>
  26069. </dl>
  26070. </dd>
  26071. </dl>
  26072. <p>For example to convert from BT.601 to SMPTE-240M, use the command:
  26073. </p><div class="example">
  26074. <pre class="example-preformatted">colormatrix=bt601:smpte240m
  26075. </pre></div>
  26076. </div>
  26077. <div class="section-level-extent" id="colorspace">
  26078. <h3 class="section"><span>32.41 colorspace<a class="copiable-link" href="#colorspace"> &para;</a></span></h3>
  26079. <p>Convert colorspace, transfer characteristics or color primaries.
  26080. Input video needs to have an even size.
  26081. </p>
  26082. <p>The filter accepts the following options:
  26083. </p>
  26084. <dl class="table">
  26085. <dd><a class="anchor" id="all"></a></dd>
  26086. <dt><samp class="option">all</samp></dt>
  26087. <dd><p>Specify all color properties at once.
  26088. </p>
  26089. <p>The accepted values are:
  26090. </p><dl class="table">
  26091. <dt>&lsquo;<samp class="samp">bt470m</samp>&rsquo;</dt>
  26092. <dd><p>BT.470M
  26093. </p>
  26094. </dd>
  26095. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  26096. <dd><p>BT.470BG
  26097. </p>
  26098. </dd>
  26099. <dt>&lsquo;<samp class="samp">bt601-6-525</samp>&rsquo;</dt>
  26100. <dd><p>BT.601-6 525
  26101. </p>
  26102. </dd>
  26103. <dt>&lsquo;<samp class="samp">bt601-6-625</samp>&rsquo;</dt>
  26104. <dd><p>BT.601-6 625
  26105. </p>
  26106. </dd>
  26107. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  26108. <dd><p>BT.709
  26109. </p>
  26110. </dd>
  26111. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  26112. <dd><p>SMPTE-170M
  26113. </p>
  26114. </dd>
  26115. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  26116. <dd><p>SMPTE-240M
  26117. </p>
  26118. </dd>
  26119. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  26120. <dd><p>BT.2020
  26121. </p>
  26122. </dd>
  26123. </dl>
  26124. <a class="anchor" id="space"></a></dd>
  26125. <dt><samp class="option">space</samp></dt>
  26126. <dd><p>Specify output colorspace.
  26127. </p>
  26128. <p>The accepted values are:
  26129. </p><dl class="table">
  26130. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  26131. <dd><p>BT.709
  26132. </p>
  26133. </dd>
  26134. <dt>&lsquo;<samp class="samp">fcc</samp>&rsquo;</dt>
  26135. <dd><p>FCC
  26136. </p>
  26137. </dd>
  26138. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  26139. <dd><p>BT.470BG or BT.601-6 625
  26140. </p>
  26141. </dd>
  26142. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  26143. <dd><p>SMPTE-170M or BT.601-6 525
  26144. </p>
  26145. </dd>
  26146. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  26147. <dd><p>SMPTE-240M
  26148. </p>
  26149. </dd>
  26150. <dt>&lsquo;<samp class="samp">ycgco</samp>&rsquo;</dt>
  26151. <dd><p>YCgCo
  26152. </p>
  26153. </dd>
  26154. <dt>&lsquo;<samp class="samp">bt2020ncl</samp>&rsquo;</dt>
  26155. <dd><p>BT.2020 with non-constant luminance
  26156. </p>
  26157. </dd>
  26158. </dl>
  26159. <a class="anchor" id="trc"></a></dd>
  26160. <dt><samp class="option">trc</samp></dt>
  26161. <dd><p>Specify output transfer characteristics.
  26162. </p>
  26163. <p>The accepted values are:
  26164. </p><dl class="table">
  26165. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  26166. <dd><p>BT.709
  26167. </p>
  26168. </dd>
  26169. <dt>&lsquo;<samp class="samp">bt470m</samp>&rsquo;</dt>
  26170. <dd><p>BT.470M
  26171. </p>
  26172. </dd>
  26173. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  26174. <dd><p>BT.470BG
  26175. </p>
  26176. </dd>
  26177. <dt>&lsquo;<samp class="samp">gamma22</samp>&rsquo;</dt>
  26178. <dd><p>Constant gamma of 2.2
  26179. </p>
  26180. </dd>
  26181. <dt>&lsquo;<samp class="samp">gamma28</samp>&rsquo;</dt>
  26182. <dd><p>Constant gamma of 2.8
  26183. </p>
  26184. </dd>
  26185. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  26186. <dd><p>SMPTE-170M, BT.601-6 625 or BT.601-6 525
  26187. </p>
  26188. </dd>
  26189. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  26190. <dd><p>SMPTE-240M
  26191. </p>
  26192. </dd>
  26193. <dt>&lsquo;<samp class="samp">srgb</samp>&rsquo;</dt>
  26194. <dd><p>SRGB
  26195. </p>
  26196. </dd>
  26197. <dt>&lsquo;<samp class="samp">iec61966-2-1</samp>&rsquo;</dt>
  26198. <dd><p>iec61966-2-1
  26199. </p>
  26200. </dd>
  26201. <dt>&lsquo;<samp class="samp">iec61966-2-4</samp>&rsquo;</dt>
  26202. <dd><p>iec61966-2-4
  26203. </p>
  26204. </dd>
  26205. <dt>&lsquo;<samp class="samp">xvycc</samp>&rsquo;</dt>
  26206. <dd><p>xvycc
  26207. </p>
  26208. </dd>
  26209. <dt>&lsquo;<samp class="samp">bt2020-10</samp>&rsquo;</dt>
  26210. <dd><p>BT.2020 for 10-bits content
  26211. </p>
  26212. </dd>
  26213. <dt>&lsquo;<samp class="samp">bt2020-12</samp>&rsquo;</dt>
  26214. <dd><p>BT.2020 for 12-bits content
  26215. </p>
  26216. </dd>
  26217. </dl>
  26218. <a class="anchor" id="primaries"></a></dd>
  26219. <dt><samp class="option">primaries</samp></dt>
  26220. <dd><p>Specify output color primaries.
  26221. </p>
  26222. <p>The accepted values are:
  26223. </p><dl class="table">
  26224. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  26225. <dd><p>BT.709
  26226. </p>
  26227. </dd>
  26228. <dt>&lsquo;<samp class="samp">bt470m</samp>&rsquo;</dt>
  26229. <dd><p>BT.470M
  26230. </p>
  26231. </dd>
  26232. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  26233. <dd><p>BT.470BG or BT.601-6 625
  26234. </p>
  26235. </dd>
  26236. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  26237. <dd><p>SMPTE-170M or BT.601-6 525
  26238. </p>
  26239. </dd>
  26240. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  26241. <dd><p>SMPTE-240M
  26242. </p>
  26243. </dd>
  26244. <dt>&lsquo;<samp class="samp">film</samp>&rsquo;</dt>
  26245. <dd><p>film
  26246. </p>
  26247. </dd>
  26248. <dt>&lsquo;<samp class="samp">smpte431</samp>&rsquo;</dt>
  26249. <dd><p>SMPTE-431
  26250. </p>
  26251. </dd>
  26252. <dt>&lsquo;<samp class="samp">smpte432</samp>&rsquo;</dt>
  26253. <dd><p>SMPTE-432
  26254. </p>
  26255. </dd>
  26256. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  26257. <dd><p>BT.2020
  26258. </p>
  26259. </dd>
  26260. <dt>&lsquo;<samp class="samp">jedec-p22</samp>&rsquo;</dt>
  26261. <dd><p>JEDEC P22 phosphors
  26262. </p>
  26263. </dd>
  26264. </dl>
  26265. <a class="anchor" id="range"></a></dd>
  26266. <dt><samp class="option">range</samp></dt>
  26267. <dd><p>Specify output color range.
  26268. </p>
  26269. <p>The accepted values are:
  26270. </p><dl class="table">
  26271. <dt>&lsquo;<samp class="samp">tv</samp>&rsquo;</dt>
  26272. <dd><p>TV (restricted) range
  26273. </p>
  26274. </dd>
  26275. <dt>&lsquo;<samp class="samp">mpeg</samp>&rsquo;</dt>
  26276. <dd><p>MPEG (restricted) range
  26277. </p>
  26278. </dd>
  26279. <dt>&lsquo;<samp class="samp">pc</samp>&rsquo;</dt>
  26280. <dd><p>PC (full) range
  26281. </p>
  26282. </dd>
  26283. <dt>&lsquo;<samp class="samp">jpeg</samp>&rsquo;</dt>
  26284. <dd><p>JPEG (full) range
  26285. </p>
  26286. </dd>
  26287. </dl>
  26288. </dd>
  26289. <dt><samp class="option">format</samp></dt>
  26290. <dd><p>Specify output color format.
  26291. </p>
  26292. <p>The accepted values are:
  26293. </p><dl class="table">
  26294. <dt>&lsquo;<samp class="samp">yuv420p</samp>&rsquo;</dt>
  26295. <dd><p>YUV 4:2:0 planar 8-bits
  26296. </p>
  26297. </dd>
  26298. <dt>&lsquo;<samp class="samp">yuv420p10</samp>&rsquo;</dt>
  26299. <dd><p>YUV 4:2:0 planar 10-bits
  26300. </p>
  26301. </dd>
  26302. <dt>&lsquo;<samp class="samp">yuv420p12</samp>&rsquo;</dt>
  26303. <dd><p>YUV 4:2:0 planar 12-bits
  26304. </p>
  26305. </dd>
  26306. <dt>&lsquo;<samp class="samp">yuv422p</samp>&rsquo;</dt>
  26307. <dd><p>YUV 4:2:2 planar 8-bits
  26308. </p>
  26309. </dd>
  26310. <dt>&lsquo;<samp class="samp">yuv422p10</samp>&rsquo;</dt>
  26311. <dd><p>YUV 4:2:2 planar 10-bits
  26312. </p>
  26313. </dd>
  26314. <dt>&lsquo;<samp class="samp">yuv422p12</samp>&rsquo;</dt>
  26315. <dd><p>YUV 4:2:2 planar 12-bits
  26316. </p>
  26317. </dd>
  26318. <dt>&lsquo;<samp class="samp">yuv444p</samp>&rsquo;</dt>
  26319. <dd><p>YUV 4:4:4 planar 8-bits
  26320. </p>
  26321. </dd>
  26322. <dt>&lsquo;<samp class="samp">yuv444p10</samp>&rsquo;</dt>
  26323. <dd><p>YUV 4:4:4 planar 10-bits
  26324. </p>
  26325. </dd>
  26326. <dt>&lsquo;<samp class="samp">yuv444p12</samp>&rsquo;</dt>
  26327. <dd><p>YUV 4:4:4 planar 12-bits
  26328. </p>
  26329. </dd>
  26330. </dl>
  26331. </dd>
  26332. <dt><samp class="option">fast</samp></dt>
  26333. <dd><p>Do a fast conversion, which skips gamma/primary correction. This will take
  26334. significantly less CPU, but will be mathematically incorrect. To get output
  26335. compatible with that produced by the colormatrix filter, use fast=1.
  26336. </p>
  26337. </dd>
  26338. <dt><samp class="option">dither</samp></dt>
  26339. <dd><p>Specify dithering mode.
  26340. </p>
  26341. <p>The accepted values are:
  26342. </p><dl class="table">
  26343. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  26344. <dd><p>No dithering
  26345. </p>
  26346. </dd>
  26347. <dt>&lsquo;<samp class="samp">fsb</samp>&rsquo;</dt>
  26348. <dd><p>Floyd-Steinberg dithering
  26349. </p></dd>
  26350. </dl>
  26351. </dd>
  26352. <dt><samp class="option">wpadapt</samp></dt>
  26353. <dd><p>Whitepoint adaptation mode.
  26354. </p>
  26355. <p>The accepted values are:
  26356. </p><dl class="table">
  26357. <dt>&lsquo;<samp class="samp">bradford</samp>&rsquo;</dt>
  26358. <dd><p>Bradford whitepoint adaptation
  26359. </p>
  26360. </dd>
  26361. <dt>&lsquo;<samp class="samp">vonkries</samp>&rsquo;</dt>
  26362. <dd><p>von Kries whitepoint adaptation
  26363. </p>
  26364. </dd>
  26365. <dt>&lsquo;<samp class="samp">identity</samp>&rsquo;</dt>
  26366. <dd><p>identity whitepoint adaptation (i.e. no whitepoint adaptation)
  26367. </p></dd>
  26368. </dl>
  26369. </dd>
  26370. <dt><samp class="option">iall</samp></dt>
  26371. <dd><p>Override all input properties at once. Same accepted values as <a class="ref" href="#all">all</a>.
  26372. </p>
  26373. </dd>
  26374. <dt><samp class="option">ispace</samp></dt>
  26375. <dd><p>Override input colorspace. Same accepted values as <a class="ref" href="#space">space</a>.
  26376. </p>
  26377. </dd>
  26378. <dt><samp class="option">iprimaries</samp></dt>
  26379. <dd><p>Override input color primaries. Same accepted values as <a class="ref" href="#primaries">primaries</a>.
  26380. </p>
  26381. </dd>
  26382. <dt><samp class="option">itrc</samp></dt>
  26383. <dd><p>Override input transfer characteristics. Same accepted values as <a class="ref" href="#trc">trc</a>.
  26384. </p>
  26385. </dd>
  26386. <dt><samp class="option">irange</samp></dt>
  26387. <dd><p>Override input color range. Same accepted values as <a class="ref" href="#range">range</a>.
  26388. </p>
  26389. </dd>
  26390. </dl>
  26391. <p>The filter converts the transfer characteristics, color space and color
  26392. primaries to the specified user values. The output value, if not specified,
  26393. is set to a default value based on the &quot;all&quot; property. If that property is
  26394. also not specified, the filter will log an error. The output color range and
  26395. format default to the same value as the input color range and format. The
  26396. input transfer characteristics, color space, color primaries and color range
  26397. should be set on the input data. If any of these are missing, the filter will
  26398. log an error and no conversion will take place.
  26399. </p>
  26400. <p>For example to convert the input to SMPTE-240M, use the command:
  26401. </p><div class="example">
  26402. <pre class="example-preformatted">colorspace=smpte240m
  26403. </pre></div>
  26404. </div>
  26405. <div class="section-level-extent" id="colorspace_005fcuda">
  26406. <h3 class="section"><span>32.42 colorspace_cuda<a class="copiable-link" href="#colorspace_005fcuda"> &para;</a></span></h3>
  26407. <p>CUDA accelerated implementation of the colorspace filter.
  26408. </p>
  26409. <p>It is by no means feature complete compared to the software colorspace filter,
  26410. and at the current time only supports color range conversion between jpeg/full
  26411. and mpeg/limited range.
  26412. </p>
  26413. <p>The filter accepts the following options:
  26414. </p>
  26415. <dl class="table">
  26416. <dt><samp class="option">range</samp></dt>
  26417. <dd><p>Specify output color range.
  26418. </p>
  26419. <p>The accepted values are:
  26420. </p><dl class="table">
  26421. <dt>&lsquo;<samp class="samp">tv</samp>&rsquo;</dt>
  26422. <dd><p>TV (restricted) range
  26423. </p>
  26424. </dd>
  26425. <dt>&lsquo;<samp class="samp">mpeg</samp>&rsquo;</dt>
  26426. <dd><p>MPEG (restricted) range
  26427. </p>
  26428. </dd>
  26429. <dt>&lsquo;<samp class="samp">pc</samp>&rsquo;</dt>
  26430. <dd><p>PC (full) range
  26431. </p>
  26432. </dd>
  26433. <dt>&lsquo;<samp class="samp">jpeg</samp>&rsquo;</dt>
  26434. <dd><p>JPEG (full) range
  26435. </p>
  26436. </dd>
  26437. </dl>
  26438. </dd>
  26439. </dl>
  26440. </div>
  26441. <div class="section-level-extent" id="colortemperature">
  26442. <h3 class="section"><span>32.43 colortemperature<a class="copiable-link" href="#colortemperature"> &para;</a></span></h3>
  26443. <p>Adjust color temperature in video to simulate variations in ambient color temperature.
  26444. </p>
  26445. <p>The filter accepts the following options:
  26446. </p>
  26447. <dl class="table">
  26448. <dt><samp class="option">temperature</samp></dt>
  26449. <dd><p>Set the temperature in Kelvin. Allowed range is from 1000 to 40000.
  26450. Default value is 6500 K.
  26451. </p>
  26452. </dd>
  26453. <dt><samp class="option">mix</samp></dt>
  26454. <dd><p>Set mixing with filtered output. Allowed range is from 0 to 1.
  26455. Default value is 1.
  26456. </p>
  26457. </dd>
  26458. <dt><samp class="option">pl</samp></dt>
  26459. <dd><p>Set the amount of preserving lightness. Allowed range is from 0 to 1.
  26460. Default value is 0.
  26461. </p></dd>
  26462. </dl>
  26463. <ul class="mini-toc">
  26464. <li><a href="#Commands-74" accesskey="1">Commands</a></li>
  26465. </ul>
  26466. <div class="subsection-level-extent" id="Commands-74">
  26467. <h4 class="subsection"><span>32.43.1 Commands<a class="copiable-link" href="#Commands-74"> &para;</a></span></h4>
  26468. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  26469. </p>
  26470. </div>
  26471. </div>
  26472. <div class="section-level-extent" id="convolution">
  26473. <h3 class="section"><span>32.44 convolution<a class="copiable-link" href="#convolution"> &para;</a></span></h3>
  26474. <p>Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49 elements.
  26475. </p>
  26476. <p>The filter accepts the following options:
  26477. </p>
  26478. <dl class="table">
  26479. <dt><samp class="option">0m</samp></dt>
  26480. <dt><samp class="option">1m</samp></dt>
  26481. <dt><samp class="option">2m</samp></dt>
  26482. <dt><samp class="option">3m</samp></dt>
  26483. <dd><p>Set matrix for each plane.
  26484. Matrix is sequence of 9, 25 or 49 signed integers in <var class="var">square</var> mode,
  26485. and from 1 to 49 odd number of signed integers in <var class="var">row</var> mode.
  26486. </p>
  26487. </dd>
  26488. <dt><samp class="option">0rdiv</samp></dt>
  26489. <dt><samp class="option">1rdiv</samp></dt>
  26490. <dt><samp class="option">2rdiv</samp></dt>
  26491. <dt><samp class="option">3rdiv</samp></dt>
  26492. <dd><p>Set multiplier for calculated value for each plane.
  26493. If unset or 0, it will be 1/sum of all matrix elements.
  26494. </p>
  26495. </dd>
  26496. <dt><samp class="option">0bias</samp></dt>
  26497. <dt><samp class="option">1bias</samp></dt>
  26498. <dt><samp class="option">2bias</samp></dt>
  26499. <dt><samp class="option">3bias</samp></dt>
  26500. <dd><p>Set bias for each plane. This value is added to the result of the multiplication.
  26501. Useful for making the overall image brighter or darker. Default is 0.0.
  26502. </p>
  26503. </dd>
  26504. <dt><samp class="option">0mode</samp></dt>
  26505. <dt><samp class="option">1mode</samp></dt>
  26506. <dt><samp class="option">2mode</samp></dt>
  26507. <dt><samp class="option">3mode</samp></dt>
  26508. <dd><p>Set matrix mode for each plane. Can be <var class="var">square</var>, <var class="var">row</var> or <var class="var">column</var>.
  26509. Default is <var class="var">square</var>.
  26510. </p></dd>
  26511. </dl>
  26512. <ul class="mini-toc">
  26513. <li><a href="#Commands-75" accesskey="1">Commands</a></li>
  26514. <li><a href="#Examples-74" accesskey="2">Examples</a></li>
  26515. </ul>
  26516. <div class="subsection-level-extent" id="Commands-75">
  26517. <h4 class="subsection"><span>32.44.1 Commands<a class="copiable-link" href="#Commands-75"> &para;</a></span></h4>
  26518. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  26519. </p>
  26520. </div>
  26521. <div class="subsection-level-extent" id="Examples-74">
  26522. <h4 class="subsection"><span>32.44.2 Examples<a class="copiable-link" href="#Examples-74"> &para;</a></span></h4>
  26523. <ul class="itemize mark-bullet">
  26524. <li>Apply sharpen:
  26525. <div class="example">
  26526. <pre class="example-preformatted">convolution=&quot;0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0&quot;
  26527. </pre></div>
  26528. </li><li>Apply blur:
  26529. <div class="example">
  26530. <pre class="example-preformatted">convolution=&quot;1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9&quot;
  26531. </pre></div>
  26532. </li><li>Apply edge enhance:
  26533. <div class="example">
  26534. <pre class="example-preformatted">convolution=&quot;0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128&quot;
  26535. </pre></div>
  26536. </li><li>Apply edge detect:
  26537. <div class="example">
  26538. <pre class="example-preformatted">convolution=&quot;0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128&quot;
  26539. </pre></div>
  26540. </li><li>Apply laplacian edge detector which includes diagonals:
  26541. <div class="example">
  26542. <pre class="example-preformatted">convolution=&quot;1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:5:5:5:1:0:128:128:0&quot;
  26543. </pre></div>
  26544. </li><li>Apply emboss:
  26545. <div class="example">
  26546. <pre class="example-preformatted">convolution=&quot;-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2&quot;
  26547. </pre></div>
  26548. </li></ul>
  26549. </div>
  26550. </div>
  26551. <div class="section-level-extent" id="convolve">
  26552. <h3 class="section"><span>32.45 convolve<a class="copiable-link" href="#convolve"> &para;</a></span></h3>
  26553. <p>Apply 2D convolution of video stream in frequency domain using second stream
  26554. as impulse.
  26555. </p>
  26556. <p>The filter accepts the following options:
  26557. </p>
  26558. <dl class="table">
  26559. <dt><samp class="option">planes</samp></dt>
  26560. <dd><p>Set which planes to process.
  26561. </p>
  26562. </dd>
  26563. <dt><samp class="option">impulse</samp></dt>
  26564. <dd><p>Set which impulse video frames will be processed, can be <var class="var">first</var>
  26565. or <var class="var">all</var>. Default is <var class="var">all</var>.
  26566. </p></dd>
  26567. </dl>
  26568. <p>The <code class="code">convolve</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  26569. </p>
  26570. </div>
  26571. <div class="section-level-extent" id="copy">
  26572. <h3 class="section"><span>32.46 copy<a class="copiable-link" href="#copy"> &para;</a></span></h3>
  26573. <p>Copy the input video source unchanged to the output. This is mainly useful for
  26574. testing purposes.
  26575. </p>
  26576. <a class="anchor" id="coreimage"></a></div>
  26577. <div class="section-level-extent" id="coreimage-1">
  26578. <h3 class="section"><span>32.47 coreimage<a class="copiable-link" href="#coreimage-1"> &para;</a></span></h3>
  26579. <p>Video filtering on GPU using Apple&rsquo;s CoreImage API on OSX.
  26580. </p>
  26581. <p>Hardware acceleration is based on an OpenGL context. Usually, this means it is
  26582. processed by video hardware. However, software-based OpenGL implementations
  26583. exist which means there is no guarantee for hardware processing. It depends on
  26584. the respective OSX.
  26585. </p>
  26586. <p>There are many filters and image generators provided by Apple that come with a
  26587. large variety of options. The filter has to be referenced by its name along
  26588. with its options.
  26589. </p>
  26590. <p>The coreimage filter accepts the following options:
  26591. </p><dl class="table">
  26592. <dt><samp class="option">list_filters</samp></dt>
  26593. <dd><p>List all available filters and generators along with all their respective
  26594. options as well as possible minimum and maximum values along with the default
  26595. values.
  26596. </p><div class="example">
  26597. <pre class="example-preformatted">list_filters=true
  26598. </pre></div>
  26599. </dd>
  26600. <dt><samp class="option">filter</samp></dt>
  26601. <dd><p>Specify all filters by their respective name and options.
  26602. Use <var class="var">list_filters</var> to determine all valid filter names and options.
  26603. Numerical options are specified by a float value and are automatically clamped
  26604. to their respective value range. Vector and color options have to be specified
  26605. by a list of space separated float values. Character escaping has to be done.
  26606. A special option name <code class="code">default</code> is available to use default options for a
  26607. filter.
  26608. </p>
  26609. <p>It is required to specify either <code class="code">default</code> or at least one of the filter options.
  26610. All omitted options are used with their default values.
  26611. The syntax of the filter string is as follows:
  26612. </p><div class="example">
  26613. <pre class="example-preformatted">filter=&lt;NAME&gt;@&lt;OPTION&gt;=&lt;VALUE&gt;[@&lt;OPTION&gt;=&lt;VALUE&gt;][@...][#&lt;NAME&gt;@&lt;OPTION&gt;=&lt;VALUE&gt;[@&lt;OPTION&gt;=&lt;VALUE&gt;][@...]][#...]
  26614. </pre></div>
  26615. </dd>
  26616. <dt><samp class="option">output_rect</samp></dt>
  26617. <dd><p>Specify a rectangle where the output of the filter chain is copied into the
  26618. input image. It is given by a list of space separated float values:
  26619. </p><div class="example">
  26620. <pre class="example-preformatted">output_rect=x\ y\ width\ height
  26621. </pre></div>
  26622. <p>If not given, the output rectangle equals the dimensions of the input image.
  26623. The output rectangle is automatically cropped at the borders of the input
  26624. image. Negative values are valid for each component.
  26625. </p><div class="example">
  26626. <pre class="example-preformatted">output_rect=25\ 25\ 100\ 100
  26627. </pre></div>
  26628. </dd>
  26629. </dl>
  26630. <p>Several filters can be chained for successive processing without GPU-HOST
  26631. transfers allowing for fast processing of complex filter chains.
  26632. Currently, only filters with zero (generators) or exactly one (filters) input
  26633. image and one output image are supported. Also, transition filters are not yet
  26634. usable as intended.
  26635. </p>
  26636. <p>Some filters generate output images with additional padding depending on the
  26637. respective filter kernel. The padding is automatically removed to ensure the
  26638. filter output has the same size as the input image.
  26639. </p>
  26640. <p>For image generators, the size of the output image is determined by the
  26641. previous output image of the filter chain or the input image of the whole
  26642. filterchain, respectively. The generators do not use the pixel information of
  26643. this image to generate their output. However, the generated output is
  26644. blended onto this image, resulting in partial or complete coverage of the
  26645. output image.
  26646. </p>
  26647. <p>The <a class="ref" href="#coreimagesrc">coreimagesrc</a> video source can be used for generating input images
  26648. which are directly fed into the filter chain. By using it, providing input
  26649. images by another video source or an input video is not required.
  26650. </p>
  26651. <ul class="mini-toc">
  26652. <li><a href="#Examples-75" accesskey="1">Examples</a></li>
  26653. </ul>
  26654. <div class="subsection-level-extent" id="Examples-75">
  26655. <h4 class="subsection"><span>32.47.1 Examples<a class="copiable-link" href="#Examples-75"> &para;</a></span></h4>
  26656. <ul class="itemize mark-bullet">
  26657. <li>List all filters available:
  26658. <div class="example">
  26659. <pre class="example-preformatted">coreimage=list_filters=true
  26660. </pre></div>
  26661. </li><li>Use the CIBoxBlur filter with default options to blur an image:
  26662. <div class="example">
  26663. <pre class="example-preformatted">coreimage=filter=CIBoxBlur@default
  26664. </pre></div>
  26665. </li><li>Use a filter chain with CISepiaTone at default values and CIVignetteEffect with
  26666. its center at 100x100 and a radius of 50 pixels:
  26667. <div class="example">
  26668. <pre class="example-preformatted">coreimage=filter=CIBoxBlur@default#CIVignetteEffect@inputCenter=100\ 100@inputRadius=50
  26669. </pre></div>
  26670. </li><li>Use nullsrc and CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
  26671. given as complete and escaped command-line for Apple&rsquo;s standard bash shell:
  26672. <div class="example">
  26673. <pre class="example-preformatted">ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
  26674. </pre></div>
  26675. </li></ul>
  26676. </div>
  26677. </div>
  26678. <div class="section-level-extent" id="corr">
  26679. <h3 class="section"><span>32.48 corr<a class="copiable-link" href="#corr"> &para;</a></span></h3>
  26680. <p>Obtain the correlation between two input videos.
  26681. </p>
  26682. <p>This filter takes two input videos.
  26683. </p>
  26684. <p>Both input videos must have the same resolution and pixel format for
  26685. this filter to work correctly. Also it assumes that both inputs
  26686. have the same number of frames, which are compared one by one.
  26687. </p>
  26688. <p>The obtained per component, average, min and max correlation is printed through
  26689. the logging system.
  26690. </p>
  26691. <p>The filter stores the calculated correlation of each frame in frame metadata.
  26692. </p>
  26693. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  26694. </p>
  26695. <p>In the below example the input file <samp class="file">main.mpg</samp> being processed is compared
  26696. with the reference file <samp class="file">ref.mpg</samp>.
  26697. </p>
  26698. <div class="example">
  26699. <pre class="example-preformatted">ffmpeg -i main.mpg -i ref.mpg -lavfi corr -f null -
  26700. </pre></div>
  26701. </div>
  26702. <div class="section-level-extent" id="cover_005frect">
  26703. <h3 class="section"><span>32.49 cover_rect<a class="copiable-link" href="#cover_005frect"> &para;</a></span></h3>
  26704. <p>Cover a rectangular object
  26705. </p>
  26706. <p>It accepts the following options:
  26707. </p>
  26708. <dl class="table">
  26709. <dt><samp class="option">cover</samp></dt>
  26710. <dd><p>Filepath of the optional cover image, needs to be in yuv420.
  26711. </p>
  26712. </dd>
  26713. <dt><samp class="option">mode</samp></dt>
  26714. <dd><p>Set covering mode.
  26715. </p>
  26716. <p>It accepts the following values:
  26717. </p><dl class="table">
  26718. <dt>&lsquo;<samp class="samp">cover</samp>&rsquo;</dt>
  26719. <dd><p>cover it by the supplied image
  26720. </p></dd>
  26721. <dt>&lsquo;<samp class="samp">blur</samp>&rsquo;</dt>
  26722. <dd><p>cover it by interpolating the surrounding pixels
  26723. </p></dd>
  26724. </dl>
  26725. <p>Default value is <var class="var">blur</var>.
  26726. </p></dd>
  26727. </dl>
  26728. <ul class="mini-toc">
  26729. <li><a href="#Examples-76" accesskey="1">Examples</a></li>
  26730. </ul>
  26731. <div class="subsection-level-extent" id="Examples-76">
  26732. <h4 class="subsection"><span>32.49.1 Examples<a class="copiable-link" href="#Examples-76"> &para;</a></span></h4>
  26733. <ul class="itemize mark-bullet">
  26734. <li>Cover a rectangular object by the supplied image of a given video using <code class="command">ffmpeg</code>:
  26735. <div class="example">
  26736. <pre class="example-preformatted">ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
  26737. </pre></div>
  26738. </li></ul>
  26739. </div>
  26740. </div>
  26741. <div class="section-level-extent" id="crop">
  26742. <h3 class="section"><span>32.50 crop<a class="copiable-link" href="#crop"> &para;</a></span></h3>
  26743. <p>Crop the input video to given dimensions.
  26744. </p>
  26745. <p>It accepts the following parameters:
  26746. </p>
  26747. <dl class="table">
  26748. <dt><samp class="option">w, out_w</samp></dt>
  26749. <dd><p>The width of the output video. It defaults to <code class="code">iw</code>.
  26750. This expression is evaluated only once during the filter
  26751. configuration, or when the &lsquo;<samp class="samp">w</samp>&rsquo; or &lsquo;<samp class="samp">out_w</samp>&rsquo; command is sent.
  26752. </p>
  26753. </dd>
  26754. <dt><samp class="option">h, out_h</samp></dt>
  26755. <dd><p>The height of the output video. It defaults to <code class="code">ih</code>.
  26756. This expression is evaluated only once during the filter
  26757. configuration, or when the &lsquo;<samp class="samp">h</samp>&rsquo; or &lsquo;<samp class="samp">out_h</samp>&rsquo; command is sent.
  26758. </p>
  26759. </dd>
  26760. <dt><samp class="option">x</samp></dt>
  26761. <dd><p>The horizontal position, in the input video, of the left edge of the output
  26762. video. It defaults to <code class="code">(in_w-out_w)/2</code>.
  26763. This expression is evaluated per-frame.
  26764. </p>
  26765. </dd>
  26766. <dt><samp class="option">y</samp></dt>
  26767. <dd><p>The vertical position, in the input video, of the top edge of the output video.
  26768. It defaults to <code class="code">(in_h-out_h)/2</code>.
  26769. This expression is evaluated per-frame.
  26770. </p>
  26771. </dd>
  26772. <dt><samp class="option">keep_aspect</samp></dt>
  26773. <dd><p>If set to 1 will force the output display aspect ratio
  26774. to be the same of the input, by changing the output sample aspect
  26775. ratio. It defaults to 0.
  26776. </p>
  26777. </dd>
  26778. <dt><samp class="option">exact</samp></dt>
  26779. <dd><p>Enable exact cropping. If enabled, subsampled videos will be cropped at exact
  26780. width/height/x/y as specified and will not be rounded to nearest smaller value.
  26781. It defaults to 0.
  26782. </p></dd>
  26783. </dl>
  26784. <p>The <var class="var">out_w</var>, <var class="var">out_h</var>, <var class="var">x</var>, <var class="var">y</var> parameters are
  26785. expressions containing the following constants:
  26786. </p>
  26787. <dl class="table">
  26788. <dt><samp class="option">x</samp></dt>
  26789. <dt><samp class="option">y</samp></dt>
  26790. <dd><p>The computed values for <var class="var">x</var> and <var class="var">y</var>. They are evaluated for
  26791. each new frame.
  26792. </p>
  26793. </dd>
  26794. <dt><samp class="option">in_w</samp></dt>
  26795. <dt><samp class="option">in_h</samp></dt>
  26796. <dd><p>The input width and height.
  26797. </p>
  26798. </dd>
  26799. <dt><samp class="option">iw</samp></dt>
  26800. <dt><samp class="option">ih</samp></dt>
  26801. <dd><p>These are the same as <var class="var">in_w</var> and <var class="var">in_h</var>.
  26802. </p>
  26803. </dd>
  26804. <dt><samp class="option">out_w</samp></dt>
  26805. <dt><samp class="option">out_h</samp></dt>
  26806. <dd><p>The output (cropped) width and height.
  26807. </p>
  26808. </dd>
  26809. <dt><samp class="option">ow</samp></dt>
  26810. <dt><samp class="option">oh</samp></dt>
  26811. <dd><p>These are the same as <var class="var">out_w</var> and <var class="var">out_h</var>.
  26812. </p>
  26813. </dd>
  26814. <dt><samp class="option">a</samp></dt>
  26815. <dd><p>same as <var class="var">iw</var> / <var class="var">ih</var>
  26816. </p>
  26817. </dd>
  26818. <dt><samp class="option">sar</samp></dt>
  26819. <dd><p>input sample aspect ratio
  26820. </p>
  26821. </dd>
  26822. <dt><samp class="option">dar</samp></dt>
  26823. <dd><p>input display aspect ratio, it is the same as (<var class="var">iw</var> / <var class="var">ih</var>) * <var class="var">sar</var>
  26824. </p>
  26825. </dd>
  26826. <dt><samp class="option">hsub</samp></dt>
  26827. <dt><samp class="option">vsub</samp></dt>
  26828. <dd><p>horizontal and vertical chroma subsample values. For example for the
  26829. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  26830. </p>
  26831. </dd>
  26832. <dt><samp class="option">n</samp></dt>
  26833. <dd><p>The number of the input frame, starting from 0.
  26834. </p>
  26835. </dd>
  26836. <dt><samp class="option">pos</samp></dt>
  26837. <dd><p>the position in the file of the input frame, NAN if unknown; deprecated,
  26838. do not use
  26839. </p>
  26840. </dd>
  26841. <dt><samp class="option">t</samp></dt>
  26842. <dd><p>The timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  26843. </p>
  26844. </dd>
  26845. </dl>
  26846. <p>The expression for <var class="var">out_w</var> may depend on the value of <var class="var">out_h</var>,
  26847. and the expression for <var class="var">out_h</var> may depend on <var class="var">out_w</var>, but they
  26848. cannot depend on <var class="var">x</var> and <var class="var">y</var>, as <var class="var">x</var> and <var class="var">y</var> are
  26849. evaluated after <var class="var">out_w</var> and <var class="var">out_h</var>.
  26850. </p>
  26851. <p>The <var class="var">x</var> and <var class="var">y</var> parameters specify the expressions for the
  26852. position of the top-left corner of the output (non-cropped) area. They
  26853. are evaluated for each frame. If the evaluated value is not valid, it
  26854. is approximated to the nearest valid value.
  26855. </p>
  26856. <p>The expression for <var class="var">x</var> may depend on <var class="var">y</var>, and the expression
  26857. for <var class="var">y</var> may depend on <var class="var">x</var>.
  26858. </p>
  26859. <ul class="mini-toc">
  26860. <li><a href="#Examples-77" accesskey="1">Examples</a></li>
  26861. <li><a href="#Commands-76" accesskey="2">Commands</a></li>
  26862. </ul>
  26863. <div class="subsection-level-extent" id="Examples-77">
  26864. <h4 class="subsection"><span>32.50.1 Examples<a class="copiable-link" href="#Examples-77"> &para;</a></span></h4>
  26865. <ul class="itemize mark-bullet">
  26866. <li>Crop area with size 100x100 at position (12,34).
  26867. <div class="example">
  26868. <pre class="example-preformatted">crop=100:100:12:34
  26869. </pre></div>
  26870. <p>Using named options, the example above becomes:
  26871. </p><div class="example">
  26872. <pre class="example-preformatted">crop=w=100:h=100:x=12:y=34
  26873. </pre></div>
  26874. </li><li>Crop the central input area with size 100x100:
  26875. <div class="example">
  26876. <pre class="example-preformatted">crop=100:100
  26877. </pre></div>
  26878. </li><li>Crop the central input area with size 2/3 of the input video:
  26879. <div class="example">
  26880. <pre class="example-preformatted">crop=2/3*in_w:2/3*in_h
  26881. </pre></div>
  26882. </li><li>Crop the input video central square:
  26883. <div class="example">
  26884. <pre class="example-preformatted">crop=out_w=in_h
  26885. crop=in_h
  26886. </pre></div>
  26887. </li><li>Delimit the rectangle with the top-left corner placed at position
  26888. 100:100 and the right-bottom corner corresponding to the right-bottom
  26889. corner of the input image.
  26890. <div class="example">
  26891. <pre class="example-preformatted">crop=in_w-100:in_h-100:100:100
  26892. </pre></div>
  26893. </li><li>Crop 10 pixels from the left and right borders, and 20 pixels from
  26894. the top and bottom borders
  26895. <div class="example">
  26896. <pre class="example-preformatted">crop=in_w-2*10:in_h-2*20
  26897. </pre></div>
  26898. </li><li>Keep only the bottom right quarter of the input image:
  26899. <div class="example">
  26900. <pre class="example-preformatted">crop=in_w/2:in_h/2:in_w/2:in_h/2
  26901. </pre></div>
  26902. </li><li>Crop height for getting Greek harmony:
  26903. <div class="example">
  26904. <pre class="example-preformatted">crop=in_w:1/PHI*in_w
  26905. </pre></div>
  26906. </li><li>Apply trembling effect:
  26907. <div class="example">
  26908. <pre class="example-preformatted">crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)
  26909. </pre></div>
  26910. </li><li>Apply erratic camera effect depending on timestamp:
  26911. <div class="example">
  26912. <pre class="example-preformatted">crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)
  26913. </pre></div>
  26914. </li><li>Set x depending on the value of y:
  26915. <div class="example">
  26916. <pre class="example-preformatted">crop=in_w/2:in_h/2:y:10+10*sin(n/10)
  26917. </pre></div>
  26918. </li></ul>
  26919. </div>
  26920. <div class="subsection-level-extent" id="Commands-76">
  26921. <h4 class="subsection"><span>32.50.2 Commands<a class="copiable-link" href="#Commands-76"> &para;</a></span></h4>
  26922. <p>This filter supports the following commands:
  26923. </p><dl class="table">
  26924. <dt><samp class="option">w, out_w</samp></dt>
  26925. <dt><samp class="option">h, out_h</samp></dt>
  26926. <dt><samp class="option">x</samp></dt>
  26927. <dt><samp class="option">y</samp></dt>
  26928. <dd><p>Set width/height of the output video and the horizontal/vertical position
  26929. in the input video.
  26930. The command accepts the same syntax of the corresponding option.
  26931. </p>
  26932. <p>If the specified expression is not valid, it is kept at its current
  26933. value.
  26934. </p></dd>
  26935. </dl>
  26936. </div>
  26937. </div>
  26938. <div class="section-level-extent" id="cropdetect">
  26939. <h3 class="section"><span>32.51 cropdetect<a class="copiable-link" href="#cropdetect"> &para;</a></span></h3>
  26940. <p>Auto-detect the crop size.
  26941. </p>
  26942. <p>It calculates the necessary cropping parameters and prints the
  26943. recommended parameters via the logging system. The detected dimensions
  26944. correspond to the non-black or video area of the input video according to <var class="var">mode</var>.
  26945. </p>
  26946. <p>It accepts the following parameters:
  26947. </p>
  26948. <dl class="table">
  26949. <dt><samp class="option">mode</samp></dt>
  26950. <dd><p>Depending on <var class="var">mode</var> crop detection is based on either the mere black value of surrounding pixels or a combination of motion vectors and edge pixels.
  26951. </p>
  26952. <dl class="table">
  26953. <dt>&lsquo;<samp class="samp">black</samp>&rsquo;</dt>
  26954. <dd><p>Detect black pixels surrounding the playing video. For fine control use option <var class="var">limit</var>.
  26955. </p>
  26956. </dd>
  26957. <dt>&lsquo;<samp class="samp">mvedges</samp>&rsquo;</dt>
  26958. <dd><p>Detect the playing video by the motion vectors inside the video and scanning for edge pixels typically forming the border of a playing video.
  26959. </p></dd>
  26960. </dl>
  26961. </dd>
  26962. <dt><samp class="option">limit</samp></dt>
  26963. <dd><p>Set higher black value threshold, which can be optionally specified
  26964. from nothing (0) to everything (255 for 8-bit based formats). An intensity
  26965. value greater to the set value is considered non-black. It defaults to 24.
  26966. You can also specify a value between 0.0 and 1.0 which will be scaled depending
  26967. on the bitdepth of the pixel format.
  26968. </p>
  26969. </dd>
  26970. <dt><samp class="option">round</samp></dt>
  26971. <dd><p>The value which the width/height should be divisible by. It defaults to
  26972. 16. The offset is automatically adjusted to center the video. Use 2 to
  26973. get only even dimensions (needed for 4:2:2 video). 16 is best when
  26974. encoding to most video codecs.
  26975. </p>
  26976. </dd>
  26977. <dt><samp class="option">skip</samp></dt>
  26978. <dd><p>Set the number of initial frames for which evaluation is skipped.
  26979. Default is 2. Range is 0 to INT_MAX.
  26980. </p>
  26981. </dd>
  26982. <dt><samp class="option">reset_count, reset</samp></dt>
  26983. <dd><p>Set the counter that determines after how many frames cropdetect will
  26984. reset the previously detected largest video area and start over to
  26985. detect the current optimal crop area. Default value is 0.
  26986. </p>
  26987. <p>This can be useful when channel logos distort the video area. 0
  26988. indicates &rsquo;never reset&rsquo;, and returns the largest area encountered during
  26989. playback.
  26990. </p>
  26991. </dd>
  26992. <dt><samp class="option">mv_threshold</samp></dt>
  26993. <dd><p>Set motion in pixel units as threshold for motion detection. It defaults to 8.
  26994. </p>
  26995. </dd>
  26996. <dt><samp class="option">low</samp></dt>
  26997. <dt><samp class="option">high</samp></dt>
  26998. <dd><p>Set low and high threshold values used by the Canny thresholding
  26999. algorithm.
  27000. </p>
  27001. <p>The high threshold selects the &quot;strong&quot; edge pixels, which are then
  27002. connected through 8-connectivity with the &quot;weak&quot; edge pixels selected
  27003. by the low threshold.
  27004. </p>
  27005. <p><var class="var">low</var> and <var class="var">high</var> threshold values must be chosen in the range
  27006. [0,1], and <var class="var">low</var> should be lesser or equal to <var class="var">high</var>.
  27007. </p>
  27008. <p>Default value for <var class="var">low</var> is <code class="code">5/255</code>, and default value for <var class="var">high</var>
  27009. is <code class="code">15/255</code>.
  27010. </p></dd>
  27011. </dl>
  27012. <ul class="mini-toc">
  27013. <li><a href="#Examples-78" accesskey="1">Examples</a></li>
  27014. <li><a href="#Commands-77" accesskey="2">Commands</a></li>
  27015. </ul>
  27016. <div class="subsection-level-extent" id="Examples-78">
  27017. <h4 class="subsection"><span>32.51.1 Examples<a class="copiable-link" href="#Examples-78"> &para;</a></span></h4>
  27018. <ul class="itemize mark-bullet">
  27019. <li>Find video area surrounded by black borders:
  27020. <div class="example">
  27021. <pre class="example-preformatted">ffmpeg -i file.mp4 -vf cropdetect,metadata=mode=print -f null -
  27022. </pre></div>
  27023. </li><li>Find an embedded video area, generate motion vectors beforehand:
  27024. <div class="example">
  27025. <pre class="example-preformatted">ffmpeg -i file.mp4 -vf mestimate,cropdetect=mode=mvedges,metadata=mode=print -f null -
  27026. </pre></div>
  27027. </li><li>Find an embedded video area, use motion vectors from decoder:
  27028. <div class="example">
  27029. <pre class="example-preformatted">ffmpeg -flags2 +export_mvs -i file.mp4 -vf cropdetect=mode=mvedges,metadata=mode=print -f null -
  27030. </pre></div>
  27031. </li></ul>
  27032. </div>
  27033. <div class="subsection-level-extent" id="Commands-77">
  27034. <h4 class="subsection"><span>32.51.2 Commands<a class="copiable-link" href="#Commands-77"> &para;</a></span></h4>
  27035. <p>This filter supports the following commands:
  27036. </p>
  27037. <dl class="table">
  27038. <dt><samp class="option">limit</samp></dt>
  27039. <dd><p>The command accepts the same syntax of the corresponding option.
  27040. If the specified expression is not valid, it is kept at its current value.
  27041. </p></dd>
  27042. </dl>
  27043. <a class="anchor" id="cue"></a></div>
  27044. </div>
  27045. <div class="section-level-extent" id="cue-1">
  27046. <h3 class="section"><span>32.52 cue<a class="copiable-link" href="#cue-1"> &para;</a></span></h3>
  27047. <p>Delay video filtering until a given wallclock timestamp. The filter first
  27048. passes on <samp class="option">preroll</samp> amount of frames, then it buffers at most
  27049. <samp class="option">buffer</samp> amount of frames and waits for the cue. After reaching the cue
  27050. it forwards the buffered frames and also any subsequent frames coming in its
  27051. input.
  27052. </p>
  27053. <p>The filter can be used synchronize the output of multiple ffmpeg processes for
  27054. realtime output devices like decklink. By putting the delay in the filtering
  27055. chain and pre-buffering frames the process can pass on data to output almost
  27056. immediately after the target wallclock timestamp is reached.
  27057. </p>
  27058. <p>Perfect frame accuracy cannot be guaranteed, but the result is good enough for
  27059. some use cases.
  27060. </p>
  27061. <dl class="table">
  27062. <dt><samp class="option">cue</samp></dt>
  27063. <dd><p>The cue timestamp expressed in a UNIX timestamp in microseconds. Default is 0.
  27064. </p>
  27065. </dd>
  27066. <dt><samp class="option">preroll</samp></dt>
  27067. <dd><p>The duration of content to pass on as preroll expressed in seconds. Default is 0.
  27068. </p>
  27069. </dd>
  27070. <dt><samp class="option">buffer</samp></dt>
  27071. <dd><p>The maximum duration of content to buffer before waiting for the cue expressed
  27072. in seconds. Default is 0.
  27073. </p>
  27074. </dd>
  27075. </dl>
  27076. <a class="anchor" id="curves"></a></div>
  27077. <div class="section-level-extent" id="curves-1">
  27078. <h3 class="section"><span>32.53 curves<a class="copiable-link" href="#curves-1"> &para;</a></span></h3>
  27079. <p>Apply color adjustments using curves.
  27080. </p>
  27081. <p>This filter is similar to the Adobe Photoshop and GIMP curves tools. Each
  27082. component (red, green and blue) has its values defined by <var class="var">N</var> key points
  27083. tied from each other using a smooth curve. The x-axis represents the pixel
  27084. values from the input frame, and the y-axis the new pixel values to be set for
  27085. the output frame.
  27086. </p>
  27087. <p>By default, a component curve is defined by the two points <var class="var">(0;0)</var> and
  27088. <var class="var">(1;1)</var>. This creates a straight line where each original pixel value is
  27089. &quot;adjusted&quot; to its own value, which means no change to the image.
  27090. </p>
  27091. <p>The filter allows you to redefine these two points and add some more. A new
  27092. curve will be define to pass smoothly through all these new coordinates. The
  27093. new defined points needs to be strictly increasing over the x-axis, and their
  27094. <var class="var">x</var> and <var class="var">y</var> values must be in the <var class="var">[0;1]</var> interval. The curve is
  27095. formed by using a natural or monotonic cubic spline interpolation, depending
  27096. on the <var class="var">interp</var> option (default: <code class="code">natural</code>). The <code class="code">natural</code>
  27097. spline produces a smoother curve in general while the monotonic (<code class="code">pchip</code>)
  27098. spline guarantees the transitions between the specified points to be
  27099. monotonic. If the computed curves happened to go outside the vector spaces,
  27100. the values will be clipped accordingly.
  27101. </p>
  27102. <p>The filter accepts the following options:
  27103. </p>
  27104. <dl class="table">
  27105. <dt><samp class="option">preset</samp></dt>
  27106. <dd><p>Select one of the available color presets. This option can be used in addition
  27107. to the <samp class="option">r</samp>, <samp class="option">g</samp>, <samp class="option">b</samp> parameters; in this case, the later
  27108. options takes priority on the preset values.
  27109. Available presets are:
  27110. </p><dl class="table">
  27111. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  27112. <dt>&lsquo;<samp class="samp">color_negative</samp>&rsquo;</dt>
  27113. <dt>&lsquo;<samp class="samp">cross_process</samp>&rsquo;</dt>
  27114. <dt>&lsquo;<samp class="samp">darker</samp>&rsquo;</dt>
  27115. <dt>&lsquo;<samp class="samp">increase_contrast</samp>&rsquo;</dt>
  27116. <dt>&lsquo;<samp class="samp">lighter</samp>&rsquo;</dt>
  27117. <dt>&lsquo;<samp class="samp">linear_contrast</samp>&rsquo;</dt>
  27118. <dt>&lsquo;<samp class="samp">medium_contrast</samp>&rsquo;</dt>
  27119. <dt>&lsquo;<samp class="samp">negative</samp>&rsquo;</dt>
  27120. <dt>&lsquo;<samp class="samp">strong_contrast</samp>&rsquo;</dt>
  27121. <dt>&lsquo;<samp class="samp">vintage</samp>&rsquo;</dt>
  27122. </dl>
  27123. <p>Default is <code class="code">none</code>.
  27124. </p></dd>
  27125. <dt><samp class="option">master, m</samp></dt>
  27126. <dd><p>Set the master key points. These points will define a second pass mapping. It
  27127. is sometimes called a &quot;luminance&quot; or &quot;value&quot; mapping. It can be used with
  27128. <samp class="option">r</samp>, <samp class="option">g</samp>, <samp class="option">b</samp> or <samp class="option">all</samp> since it acts like a
  27129. post-processing LUT.
  27130. </p></dd>
  27131. <dt><samp class="option">red, r</samp></dt>
  27132. <dd><p>Set the key points for the red component.
  27133. </p></dd>
  27134. <dt><samp class="option">green, g</samp></dt>
  27135. <dd><p>Set the key points for the green component.
  27136. </p></dd>
  27137. <dt><samp class="option">blue, b</samp></dt>
  27138. <dd><p>Set the key points for the blue component.
  27139. </p></dd>
  27140. <dt><samp class="option">all</samp></dt>
  27141. <dd><p>Set the key points for all components (not including master).
  27142. Can be used in addition to the other key points component
  27143. options. In this case, the unset component(s) will fallback on this
  27144. <samp class="option">all</samp> setting.
  27145. </p></dd>
  27146. <dt><samp class="option">psfile</samp></dt>
  27147. <dd><p>Specify a Photoshop curves file (<code class="code">.acv</code>) to import the settings from.
  27148. </p></dd>
  27149. <dt><samp class="option">plot</samp></dt>
  27150. <dd><p>Save Gnuplot script of the curves in specified file.
  27151. </p></dd>
  27152. <dt><samp class="option">interp</samp></dt>
  27153. <dd><p>Specify the kind of interpolation. Available algorithms are:
  27154. </p><dl class="table">
  27155. <dt>&lsquo;<samp class="samp">natural</samp>&rsquo;</dt>
  27156. <dd><p>Natural cubic spline using a piece-wise cubic polynomial that is twice continuously differentiable.
  27157. </p></dd>
  27158. <dt>&lsquo;<samp class="samp">pchip</samp>&rsquo;</dt>
  27159. <dd><p>Monotonic cubic spline using a piecewise cubic Hermite interpolating polynomial (PCHIP).
  27160. </p></dd>
  27161. </dl>
  27162. </dd>
  27163. </dl>
  27164. <p>To avoid some filtergraph syntax conflicts, each key points list need to be
  27165. defined using the following syntax: <code class="code">x0/y0 x1/y1 x2/y2 ...</code>.
  27166. </p>
  27167. <ul class="mini-toc">
  27168. <li><a href="#Commands-78" accesskey="1">Commands</a></li>
  27169. <li><a href="#Examples-79" accesskey="2">Examples</a></li>
  27170. </ul>
  27171. <div class="subsection-level-extent" id="Commands-78">
  27172. <h4 class="subsection"><span>32.53.1 Commands<a class="copiable-link" href="#Commands-78"> &para;</a></span></h4>
  27173. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  27174. </p>
  27175. </div>
  27176. <div class="subsection-level-extent" id="Examples-79">
  27177. <h4 class="subsection"><span>32.53.2 Examples<a class="copiable-link" href="#Examples-79"> &para;</a></span></h4>
  27178. <ul class="itemize mark-bullet">
  27179. <li>Increase slightly the middle level of blue:
  27180. <div class="example">
  27181. <pre class="example-preformatted">curves=blue='0/0 0.5/0.58 1/1'
  27182. </pre></div>
  27183. </li><li>Vintage effect:
  27184. <div class="example">
  27185. <pre class="example-preformatted">curves=r='0/0.11 .42/.51 1/0.95':g='0/0 0.50/0.48 1/1':b='0/0.22 .49/.44 1/0.8'
  27186. </pre></div>
  27187. <p>Here we obtain the following coordinates for each components:
  27188. </p><dl class="table">
  27189. <dt><var class="var">red</var></dt>
  27190. <dd><p><code class="code">(0;0.11) (0.42;0.51) (1;0.95)</code>
  27191. </p></dd>
  27192. <dt><var class="var">green</var></dt>
  27193. <dd><p><code class="code">(0;0) (0.50;0.48) (1;1)</code>
  27194. </p></dd>
  27195. <dt><var class="var">blue</var></dt>
  27196. <dd><p><code class="code">(0;0.22) (0.49;0.44) (1;0.80)</code>
  27197. </p></dd>
  27198. </dl>
  27199. </li><li>The previous example can also be achieved with the associated built-in preset:
  27200. <div class="example">
  27201. <pre class="example-preformatted">curves=preset=vintage
  27202. </pre></div>
  27203. </li><li>Or simply:
  27204. <div class="example">
  27205. <pre class="example-preformatted">curves=vintage
  27206. </pre></div>
  27207. </li><li>Use a Photoshop preset and redefine the points of the green component:
  27208. <div class="example">
  27209. <pre class="example-preformatted">curves=psfile='MyCurvesPresets/purple.acv':green='0/0 0.45/0.53 1/1'
  27210. </pre></div>
  27211. </li><li>Check out the curves of the <code class="code">cross_process</code> profile using <code class="command">ffmpeg</code>
  27212. and <code class="command">gnuplot</code>:
  27213. <div class="example">
  27214. <pre class="example-preformatted">ffmpeg -f lavfi -i color -vf curves=cross_process:plot=/tmp/curves.plt -frames:v 1 -f null -
  27215. gnuplot -p /tmp/curves.plt
  27216. </pre></div>
  27217. </li></ul>
  27218. </div>
  27219. </div>
  27220. <div class="section-level-extent" id="datascope">
  27221. <h3 class="section"><span>32.54 datascope<a class="copiable-link" href="#datascope"> &para;</a></span></h3>
  27222. <p>Video data analysis filter.
  27223. </p>
  27224. <p>This filter shows hexadecimal pixel values of part of video.
  27225. </p>
  27226. <p>The filter accepts the following options:
  27227. </p>
  27228. <dl class="table">
  27229. <dt><samp class="option">size, s</samp></dt>
  27230. <dd><p>Set output video size.
  27231. </p>
  27232. </dd>
  27233. <dt><samp class="option">x</samp></dt>
  27234. <dd><p>Set x offset from where to pick pixels.
  27235. </p>
  27236. </dd>
  27237. <dt><samp class="option">y</samp></dt>
  27238. <dd><p>Set y offset from where to pick pixels.
  27239. </p>
  27240. </dd>
  27241. <dt><samp class="option">mode</samp></dt>
  27242. <dd><p>Set scope mode, can be one of the following:
  27243. </p><dl class="table">
  27244. <dt>&lsquo;<samp class="samp">mono</samp>&rsquo;</dt>
  27245. <dd><p>Draw hexadecimal pixel values with white color on black background.
  27246. </p>
  27247. </dd>
  27248. <dt>&lsquo;<samp class="samp">color</samp>&rsquo;</dt>
  27249. <dd><p>Draw hexadecimal pixel values with input video pixel color on black
  27250. background.
  27251. </p>
  27252. </dd>
  27253. <dt>&lsquo;<samp class="samp">color2</samp>&rsquo;</dt>
  27254. <dd><p>Draw hexadecimal pixel values on color background picked from input video,
  27255. the text color is picked in such way so its always visible.
  27256. </p></dd>
  27257. </dl>
  27258. </dd>
  27259. <dt><samp class="option">axis</samp></dt>
  27260. <dd><p>Draw rows and columns numbers on left and top of video.
  27261. </p>
  27262. </dd>
  27263. <dt><samp class="option">opacity</samp></dt>
  27264. <dd><p>Set background opacity.
  27265. </p>
  27266. </dd>
  27267. <dt><samp class="option">format</samp></dt>
  27268. <dd><p>Set display number format. Can be <code class="code">hex</code>, or <code class="code">dec</code>. Default is <code class="code">hex</code>.
  27269. </p>
  27270. </dd>
  27271. <dt><samp class="option">components</samp></dt>
  27272. <dd><p>Set pixel components to display. By default all pixel components are displayed.
  27273. </p></dd>
  27274. </dl>
  27275. <ul class="mini-toc">
  27276. <li><a href="#Commands-79" accesskey="1">Commands</a></li>
  27277. </ul>
  27278. <div class="subsection-level-extent" id="Commands-79">
  27279. <h4 class="subsection"><span>32.54.1 Commands<a class="copiable-link" href="#Commands-79"> &para;</a></span></h4>
  27280. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options excluding <code class="code">size</code> option.
  27281. </p>
  27282. </div>
  27283. </div>
  27284. <div class="section-level-extent" id="dblur">
  27285. <h3 class="section"><span>32.55 dblur<a class="copiable-link" href="#dblur"> &para;</a></span></h3>
  27286. <p>Apply Directional blur filter.
  27287. </p>
  27288. <p>The filter accepts the following options:
  27289. </p>
  27290. <dl class="table">
  27291. <dt><samp class="option">angle</samp></dt>
  27292. <dd><p>Set angle of directional blur. Default is <code class="code">45</code>.
  27293. </p>
  27294. </dd>
  27295. <dt><samp class="option">radius</samp></dt>
  27296. <dd><p>Set radius of directional blur. Default is <code class="code">5</code>.
  27297. </p>
  27298. </dd>
  27299. <dt><samp class="option">planes</samp></dt>
  27300. <dd><p>Set which planes to filter. By default all planes are filtered.
  27301. </p></dd>
  27302. </dl>
  27303. <ul class="mini-toc">
  27304. <li><a href="#Commands-80" accesskey="1">Commands</a></li>
  27305. </ul>
  27306. <div class="subsection-level-extent" id="Commands-80">
  27307. <h4 class="subsection"><span>32.55.1 Commands<a class="copiable-link" href="#Commands-80"> &para;</a></span></h4>
  27308. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  27309. The command accepts the same syntax of the corresponding option.
  27310. </p>
  27311. <p>If the specified expression is not valid, it is kept at its current
  27312. value.
  27313. </p>
  27314. </div>
  27315. </div>
  27316. <div class="section-level-extent" id="dctdnoiz">
  27317. <h3 class="section"><span>32.56 dctdnoiz<a class="copiable-link" href="#dctdnoiz"> &para;</a></span></h3>
  27318. <p>Denoise frames using 2D DCT (frequency domain filtering).
  27319. </p>
  27320. <p>This filter is not designed for real time.
  27321. </p>
  27322. <p>The filter accepts the following options:
  27323. </p>
  27324. <dl class="table">
  27325. <dt><samp class="option">sigma, s</samp></dt>
  27326. <dd><p>Set the noise sigma constant.
  27327. </p>
  27328. <p>This <var class="var">sigma</var> defines a hard threshold of <code class="code">3 * sigma</code>; every DCT
  27329. coefficient (absolute value) below this threshold with be dropped.
  27330. </p>
  27331. <p>If you need a more advanced filtering, see <samp class="option">expr</samp>.
  27332. </p>
  27333. <p>Default is <code class="code">0</code>.
  27334. </p>
  27335. </dd>
  27336. <dt><samp class="option">overlap</samp></dt>
  27337. <dd><p>Set number overlapping pixels for each block. Since the filter can be slow, you
  27338. may want to reduce this value, at the cost of a less effective filter and the
  27339. risk of various artefacts.
  27340. </p>
  27341. <p>If the overlapping value doesn&rsquo;t permit processing the whole input width or
  27342. height, a warning will be displayed and according borders won&rsquo;t be denoised.
  27343. </p>
  27344. <p>Default value is <var class="var">blocksize</var>-1, which is the best possible setting.
  27345. </p>
  27346. </dd>
  27347. <dt><samp class="option">expr, e</samp></dt>
  27348. <dd><p>Set the coefficient factor expression.
  27349. </p>
  27350. <p>For each coefficient of a DCT block, this expression will be evaluated as a
  27351. multiplier value for the coefficient.
  27352. </p>
  27353. <p>If this is option is set, the <samp class="option">sigma</samp> option will be ignored.
  27354. </p>
  27355. <p>The absolute value of the coefficient can be accessed through the <var class="var">c</var>
  27356. variable.
  27357. </p>
  27358. </dd>
  27359. <dt><samp class="option">n</samp></dt>
  27360. <dd><p>Set the <var class="var">blocksize</var> using the number of bits. <code class="code">1&lt;&lt;<var class="var">n</var></code> defines the
  27361. <var class="var">blocksize</var>, which is the width and height of the processed blocks.
  27362. </p>
  27363. <p>The default value is <var class="var">3</var> (8x8) and can be raised to <var class="var">4</var> for a
  27364. <var class="var">blocksize</var> of 16x16. Note that changing this setting has huge consequences
  27365. on the speed processing. Also, a larger block size does not necessarily means a
  27366. better de-noising.
  27367. </p></dd>
  27368. </dl>
  27369. <ul class="mini-toc">
  27370. <li><a href="#Examples-80" accesskey="1">Examples</a></li>
  27371. </ul>
  27372. <div class="subsection-level-extent" id="Examples-80">
  27373. <h4 class="subsection"><span>32.56.1 Examples<a class="copiable-link" href="#Examples-80"> &para;</a></span></h4>
  27374. <p>Apply a denoise with a <samp class="option">sigma</samp> of <code class="code">4.5</code>:
  27375. </p><div class="example">
  27376. <pre class="example-preformatted">dctdnoiz=4.5
  27377. </pre></div>
  27378. <p>The same operation can be achieved using the expression system:
  27379. </p><div class="example">
  27380. <pre class="example-preformatted">dctdnoiz=e='gte(c, 4.5*3)'
  27381. </pre></div>
  27382. <p>Violent denoise using a block size of <code class="code">16x16</code>:
  27383. </p><div class="example">
  27384. <pre class="example-preformatted">dctdnoiz=15:n=4
  27385. </pre></div>
  27386. </div>
  27387. </div>
  27388. <div class="section-level-extent" id="deband">
  27389. <h3 class="section"><span>32.57 deband<a class="copiable-link" href="#deband"> &para;</a></span></h3>
  27390. <p>Remove banding artifacts from input video.
  27391. It works by replacing banded pixels with average value of referenced pixels.
  27392. </p>
  27393. <p>The filter accepts the following options:
  27394. </p>
  27395. <dl class="table">
  27396. <dt><samp class="option">1thr</samp></dt>
  27397. <dt><samp class="option">2thr</samp></dt>
  27398. <dt><samp class="option">3thr</samp></dt>
  27399. <dt><samp class="option">4thr</samp></dt>
  27400. <dd><p>Set banding detection threshold for each plane. Default is 0.02.
  27401. Valid range is 0.00003 to 0.5.
  27402. If difference between current pixel and reference pixel is less than threshold,
  27403. it will be considered as banded.
  27404. </p>
  27405. </dd>
  27406. <dt><samp class="option">range, r</samp></dt>
  27407. <dd><p>Banding detection range in pixels. Default is 16. If positive, random number
  27408. in range 0 to set value will be used. If negative, exact absolute value
  27409. will be used.
  27410. The range defines square of four pixels around current pixel.
  27411. </p>
  27412. </dd>
  27413. <dt><samp class="option">direction, d</samp></dt>
  27414. <dd><p>Set direction in radians from which four pixel will be compared. If positive,
  27415. random direction from 0 to set direction will be picked. If negative, exact of
  27416. absolute value will be picked. For example direction 0, -PI or -2*PI radians
  27417. will pick only pixels on same row and -PI/2 will pick only pixels on same
  27418. column.
  27419. </p>
  27420. </dd>
  27421. <dt><samp class="option">blur, b</samp></dt>
  27422. <dd><p>If enabled, current pixel is compared with average value of all four
  27423. surrounding pixels. The default is enabled. If disabled current pixel is
  27424. compared with all four surrounding pixels. The pixel is considered banded
  27425. if only all four differences with surrounding pixels are less than threshold.
  27426. </p>
  27427. </dd>
  27428. <dt><samp class="option">coupling, c</samp></dt>
  27429. <dd><p>If enabled, current pixel is changed if and only if all pixel components are banded,
  27430. e.g. banding detection threshold is triggered for all color components.
  27431. The default is disabled.
  27432. </p></dd>
  27433. </dl>
  27434. <ul class="mini-toc">
  27435. <li><a href="#Commands-81" accesskey="1">Commands</a></li>
  27436. </ul>
  27437. <div class="subsection-level-extent" id="Commands-81">
  27438. <h4 class="subsection"><span>32.57.1 Commands<a class="copiable-link" href="#Commands-81"> &para;</a></span></h4>
  27439. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  27440. </p>
  27441. </div>
  27442. </div>
  27443. <div class="section-level-extent" id="deblock">
  27444. <h3 class="section"><span>32.58 deblock<a class="copiable-link" href="#deblock"> &para;</a></span></h3>
  27445. <p>Remove blocking artifacts from input video.
  27446. </p>
  27447. <p>The filter accepts the following options:
  27448. </p>
  27449. <dl class="table">
  27450. <dt><samp class="option">filter</samp></dt>
  27451. <dd><p>Set filter type, can be <var class="var">weak</var> or <var class="var">strong</var>. Default is <var class="var">strong</var>.
  27452. This controls what kind of deblocking is applied.
  27453. </p>
  27454. </dd>
  27455. <dt><samp class="option">block</samp></dt>
  27456. <dd><p>Set size of block, allowed range is from 4 to 512. Default is <var class="var">8</var>.
  27457. </p>
  27458. </dd>
  27459. <dt><samp class="option">alpha</samp></dt>
  27460. <dt><samp class="option">beta</samp></dt>
  27461. <dt><samp class="option">gamma</samp></dt>
  27462. <dt><samp class="option">delta</samp></dt>
  27463. <dd><p>Set blocking detection thresholds. Allowed range is 0 to 1.
  27464. Defaults are: <var class="var">0.098</var> for <var class="var">alpha</var> and <var class="var">0.05</var> for the rest.
  27465. Using higher threshold gives more deblocking strength.
  27466. Setting <var class="var">alpha</var> controls threshold detection at exact edge of block.
  27467. Remaining options controls threshold detection near the edge. Each one for
  27468. below/above or left/right. Setting any of those to <var class="var">0</var> disables
  27469. deblocking.
  27470. </p>
  27471. </dd>
  27472. <dt><samp class="option">planes</samp></dt>
  27473. <dd><p>Set planes to filter. Default is to filter all available planes.
  27474. </p></dd>
  27475. </dl>
  27476. <ul class="mini-toc">
  27477. <li><a href="#Examples-81" accesskey="1">Examples</a></li>
  27478. <li><a href="#Commands-82" accesskey="2">Commands</a></li>
  27479. </ul>
  27480. <div class="subsection-level-extent" id="Examples-81">
  27481. <h4 class="subsection"><span>32.58.1 Examples<a class="copiable-link" href="#Examples-81"> &para;</a></span></h4>
  27482. <ul class="itemize mark-bullet">
  27483. <li>Deblock using weak filter and block size of 4 pixels.
  27484. <div class="example">
  27485. <pre class="example-preformatted">deblock=filter=weak:block=4
  27486. </pre></div>
  27487. </li><li>Deblock using strong filter, block size of 4 pixels and custom thresholds for
  27488. deblocking more edges.
  27489. <div class="example">
  27490. <pre class="example-preformatted">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05
  27491. </pre></div>
  27492. </li><li>Similar as above, but filter only first plane.
  27493. <div class="example">
  27494. <pre class="example-preformatted">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=1
  27495. </pre></div>
  27496. </li><li>Similar as above, but filter only second and third plane.
  27497. <div class="example">
  27498. <pre class="example-preformatted">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=6
  27499. </pre></div>
  27500. </li></ul>
  27501. </div>
  27502. <div class="subsection-level-extent" id="Commands-82">
  27503. <h4 class="subsection"><span>32.58.2 Commands<a class="copiable-link" href="#Commands-82"> &para;</a></span></h4>
  27504. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  27505. </p>
  27506. <a class="anchor" id="decimate"></a></div>
  27507. </div>
  27508. <div class="section-level-extent" id="decimate-1">
  27509. <h3 class="section"><span>32.59 decimate<a class="copiable-link" href="#decimate-1"> &para;</a></span></h3>
  27510. <p>Drop duplicated frames at regular intervals.
  27511. </p>
  27512. <p>The filter accepts the following options:
  27513. </p>
  27514. <dl class="table">
  27515. <dt><samp class="option">cycle</samp></dt>
  27516. <dd><p>Set the number of frames from which one will be dropped. Setting this to
  27517. <var class="var">N</var> means one frame in every batch of <var class="var">N</var> frames will be dropped.
  27518. Default is <code class="code">5</code>.
  27519. </p>
  27520. </dd>
  27521. <dt><samp class="option">dupthresh</samp></dt>
  27522. <dd><p>Set the threshold for duplicate detection. If the difference metric for a frame
  27523. is less than or equal to this value, then it is declared as duplicate. Default
  27524. is <code class="code">1.1</code>
  27525. </p>
  27526. </dd>
  27527. <dt><samp class="option">scthresh</samp></dt>
  27528. <dd><p>Set scene change threshold. Default is <code class="code">15</code>.
  27529. </p>
  27530. </dd>
  27531. <dt><samp class="option">blockx</samp></dt>
  27532. <dt><samp class="option">blocky</samp></dt>
  27533. <dd><p>Set the size of the x and y-axis blocks used during metric calculations.
  27534. Larger blocks give better noise suppression, but also give worse detection of
  27535. small movements. Must be a power of two. Default is <code class="code">32</code>.
  27536. </p>
  27537. </dd>
  27538. <dt><samp class="option">ppsrc</samp></dt>
  27539. <dd><p>Mark main input as a pre-processed input and activate clean source input
  27540. stream. This allows the input to be pre-processed with various filters to help
  27541. the metrics calculation while keeping the frame selection lossless. When set to
  27542. <code class="code">1</code>, the first stream is for the pre-processed input, and the second
  27543. stream is the clean source from where the kept frames are chosen. Default is
  27544. <code class="code">0</code>.
  27545. </p>
  27546. </dd>
  27547. <dt><samp class="option">chroma</samp></dt>
  27548. <dd><p>Set whether or not chroma is considered in the metric calculations. Default is
  27549. <code class="code">1</code>.
  27550. </p>
  27551. </dd>
  27552. <dt><samp class="option">mixed</samp></dt>
  27553. <dd><p>Set whether or not the input only partially contains content to be decimated.
  27554. Default is <code class="code">false</code>.
  27555. If enabled video output stream will be in variable frame rate.
  27556. </p></dd>
  27557. </dl>
  27558. </div>
  27559. <div class="section-level-extent" id="deconvolve">
  27560. <h3 class="section"><span>32.60 deconvolve<a class="copiable-link" href="#deconvolve"> &para;</a></span></h3>
  27561. <p>Apply 2D deconvolution of video stream in frequency domain using second stream
  27562. as impulse.
  27563. </p>
  27564. <p>The filter accepts the following options:
  27565. </p>
  27566. <dl class="table">
  27567. <dt><samp class="option">planes</samp></dt>
  27568. <dd><p>Set which planes to process.
  27569. </p>
  27570. </dd>
  27571. <dt><samp class="option">impulse</samp></dt>
  27572. <dd><p>Set which impulse video frames will be processed, can be <var class="var">first</var>
  27573. or <var class="var">all</var>. Default is <var class="var">all</var>.
  27574. </p>
  27575. </dd>
  27576. <dt><samp class="option">noise</samp></dt>
  27577. <dd><p>Set noise when doing divisions. Default is <var class="var">0.0000001</var>. Useful when width
  27578. and height are not same and not power of 2 or if stream prior to convolving
  27579. had noise.
  27580. </p></dd>
  27581. </dl>
  27582. <p>The <code class="code">deconvolve</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  27583. </p>
  27584. </div>
  27585. <div class="section-level-extent" id="dedot">
  27586. <h3 class="section"><span>32.61 dedot<a class="copiable-link" href="#dedot"> &para;</a></span></h3>
  27587. <p>Reduce cross-luminance (dot-crawl) and cross-color (rainbows) from video.
  27588. </p>
  27589. <p>It accepts the following options:
  27590. </p>
  27591. <dl class="table">
  27592. <dt><samp class="option">m</samp></dt>
  27593. <dd><p>Set mode of operation. Can be combination of <var class="var">dotcrawl</var> for cross-luminance reduction and/or
  27594. <var class="var">rainbows</var> for cross-color reduction.
  27595. </p>
  27596. </dd>
  27597. <dt><samp class="option">lt</samp></dt>
  27598. <dd><p>Set spatial luma threshold. Lower values increases reduction of cross-luminance.
  27599. </p>
  27600. </dd>
  27601. <dt><samp class="option">tl</samp></dt>
  27602. <dd><p>Set tolerance for temporal luma. Higher values increases reduction of cross-luminance.
  27603. </p>
  27604. </dd>
  27605. <dt><samp class="option">tc</samp></dt>
  27606. <dd><p>Set tolerance for chroma temporal variation. Higher values increases reduction of cross-color.
  27607. </p>
  27608. </dd>
  27609. <dt><samp class="option">ct</samp></dt>
  27610. <dd><p>Set temporal chroma threshold. Lower values increases reduction of cross-color.
  27611. </p></dd>
  27612. </dl>
  27613. </div>
  27614. <div class="section-level-extent" id="deflate">
  27615. <h3 class="section"><span>32.62 deflate<a class="copiable-link" href="#deflate"> &para;</a></span></h3>
  27616. <p>Apply deflate effect to the video.
  27617. </p>
  27618. <p>This filter replaces the pixel by the local(3x3) average by taking into account
  27619. only values lower than the pixel.
  27620. </p>
  27621. <p>It accepts the following options:
  27622. </p>
  27623. <dl class="table">
  27624. <dt><samp class="option">threshold0</samp></dt>
  27625. <dt><samp class="option">threshold1</samp></dt>
  27626. <dt><samp class="option">threshold2</samp></dt>
  27627. <dt><samp class="option">threshold3</samp></dt>
  27628. <dd><p>Limit the maximum change for each plane, default is 65535.
  27629. If 0, plane will remain unchanged.
  27630. </p></dd>
  27631. </dl>
  27632. <ul class="mini-toc">
  27633. <li><a href="#Commands-83" accesskey="1">Commands</a></li>
  27634. </ul>
  27635. <div class="subsection-level-extent" id="Commands-83">
  27636. <h4 class="subsection"><span>32.62.1 Commands<a class="copiable-link" href="#Commands-83"> &para;</a></span></h4>
  27637. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  27638. </p>
  27639. </div>
  27640. </div>
  27641. <div class="section-level-extent" id="deflicker">
  27642. <h3 class="section"><span>32.63 deflicker<a class="copiable-link" href="#deflicker"> &para;</a></span></h3>
  27643. <p>Remove temporal frame luminance variations.
  27644. </p>
  27645. <p>It accepts the following options:
  27646. </p>
  27647. <dl class="table">
  27648. <dt><samp class="option">size, s</samp></dt>
  27649. <dd><p>Set moving-average filter size in frames. Default is 5. Allowed range is 2 - 129.
  27650. </p>
  27651. </dd>
  27652. <dt><samp class="option">mode, m</samp></dt>
  27653. <dd><p>Set averaging mode to smooth temporal luminance variations.
  27654. </p>
  27655. <p>Available values are:
  27656. </p><dl class="table">
  27657. <dt>&lsquo;<samp class="samp">am</samp>&rsquo;</dt>
  27658. <dd><p>Arithmetic mean
  27659. </p>
  27660. </dd>
  27661. <dt>&lsquo;<samp class="samp">gm</samp>&rsquo;</dt>
  27662. <dd><p>Geometric mean
  27663. </p>
  27664. </dd>
  27665. <dt>&lsquo;<samp class="samp">hm</samp>&rsquo;</dt>
  27666. <dd><p>Harmonic mean
  27667. </p>
  27668. </dd>
  27669. <dt>&lsquo;<samp class="samp">qm</samp>&rsquo;</dt>
  27670. <dd><p>Quadratic mean
  27671. </p>
  27672. </dd>
  27673. <dt>&lsquo;<samp class="samp">cm</samp>&rsquo;</dt>
  27674. <dd><p>Cubic mean
  27675. </p>
  27676. </dd>
  27677. <dt>&lsquo;<samp class="samp">pm</samp>&rsquo;</dt>
  27678. <dd><p>Power mean
  27679. </p>
  27680. </dd>
  27681. <dt>&lsquo;<samp class="samp">median</samp>&rsquo;</dt>
  27682. <dd><p>Median
  27683. </p></dd>
  27684. </dl>
  27685. </dd>
  27686. <dt><samp class="option">bypass</samp></dt>
  27687. <dd><p>Do not actually modify frame. Useful when one only wants metadata.
  27688. </p></dd>
  27689. </dl>
  27690. </div>
  27691. <div class="section-level-extent" id="dejudder">
  27692. <h3 class="section"><span>32.64 dejudder<a class="copiable-link" href="#dejudder"> &para;</a></span></h3>
  27693. <p>Remove judder produced by partially interlaced telecined content.
  27694. </p>
  27695. <p>Judder can be introduced, for instance, by <a class="ref" href="#pullup">pullup</a> filter. If the original
  27696. source was partially telecined content then the output of <code class="code">pullup,dejudder</code>
  27697. will have a variable frame rate. May change the recorded frame rate of the
  27698. container. Aside from that change, this filter will not affect constant frame
  27699. rate video.
  27700. </p>
  27701. <p>The option available in this filter is:
  27702. </p><dl class="table">
  27703. <dt><samp class="option">cycle</samp></dt>
  27704. <dd><p>Specify the length of the window over which the judder repeats.
  27705. </p>
  27706. <p>Accepts any integer greater than 1. Useful values are:
  27707. </p><dl class="table">
  27708. <dt>&lsquo;<samp class="samp">4</samp>&rsquo;</dt>
  27709. <dd><p>If the original was telecined from 24 to 30 fps (Film to NTSC).
  27710. </p>
  27711. </dd>
  27712. <dt>&lsquo;<samp class="samp">5</samp>&rsquo;</dt>
  27713. <dd><p>If the original was telecined from 25 to 30 fps (PAL to NTSC).
  27714. </p>
  27715. </dd>
  27716. <dt>&lsquo;<samp class="samp">20</samp>&rsquo;</dt>
  27717. <dd><p>If a mixture of the two.
  27718. </p></dd>
  27719. </dl>
  27720. <p>The default is &lsquo;<samp class="samp">4</samp>&rsquo;.
  27721. </p></dd>
  27722. </dl>
  27723. </div>
  27724. <div class="section-level-extent" id="delogo">
  27725. <h3 class="section"><span>32.65 delogo<a class="copiable-link" href="#delogo"> &para;</a></span></h3>
  27726. <p>Suppress a TV station logo by a simple interpolation of the surrounding
  27727. pixels. Just set a rectangle covering the logo and watch it disappear
  27728. (and sometimes something even uglier appear - your mileage may vary).
  27729. </p>
  27730. <p>It accepts the following parameters:
  27731. </p><dl class="table">
  27732. <dt><samp class="option">x</samp></dt>
  27733. <dt><samp class="option">y</samp></dt>
  27734. <dd><p>Specify the top left corner coordinates of the logo. They must be
  27735. specified.
  27736. </p>
  27737. </dd>
  27738. <dt><samp class="option">w</samp></dt>
  27739. <dt><samp class="option">h</samp></dt>
  27740. <dd><p>Specify the width and height of the logo to clear. They must be
  27741. specified.
  27742. </p>
  27743. </dd>
  27744. <dt><samp class="option">show</samp></dt>
  27745. <dd><p>When set to 1, a green rectangle is drawn on the screen to simplify
  27746. finding the right <var class="var">x</var>, <var class="var">y</var>, <var class="var">w</var>, and <var class="var">h</var> parameters.
  27747. The default value is 0.
  27748. </p>
  27749. <p>The rectangle is drawn on the outermost pixels which will be (partly)
  27750. replaced with interpolated values. The values of the next pixels
  27751. immediately outside this rectangle in each direction will be used to
  27752. compute the interpolated pixel values inside the rectangle.
  27753. </p>
  27754. </dd>
  27755. </dl>
  27756. <ul class="mini-toc">
  27757. <li><a href="#Examples-82" accesskey="1">Examples</a></li>
  27758. </ul>
  27759. <div class="subsection-level-extent" id="Examples-82">
  27760. <h4 class="subsection"><span>32.65.1 Examples<a class="copiable-link" href="#Examples-82"> &para;</a></span></h4>
  27761. <ul class="itemize mark-bullet">
  27762. <li>Set a rectangle covering the area with top left corner coordinates 0,0
  27763. and size 100x77:
  27764. <div class="example">
  27765. <pre class="example-preformatted">delogo=x=0:y=0:w=100:h=77
  27766. </pre></div>
  27767. </li></ul>
  27768. <a class="anchor" id="derain"></a></div>
  27769. </div>
  27770. <div class="section-level-extent" id="derain-1">
  27771. <h3 class="section"><span>32.66 derain<a class="copiable-link" href="#derain-1"> &para;</a></span></h3>
  27772. <p>Remove the rain in the input image/video by applying the derain methods based on
  27773. convolutional neural networks. Supported models:
  27774. </p>
  27775. <ul class="itemize mark-bullet">
  27776. <li>Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
  27777. See <a class="url" href="http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf">http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_Squeeze-and-Excitation_Context_ECCV_2018_paper.pdf</a>.
  27778. </li></ul>
  27779. <p>Training as well as model generation scripts are provided in
  27780. the repository at <a class="url" href="https://github.com/XueweiMeng/derain_filter.git">https://github.com/XueweiMeng/derain_filter.git</a>.
  27781. </p>
  27782. <p>The filter accepts the following options:
  27783. </p>
  27784. <dl class="table">
  27785. <dt><samp class="option">filter_type</samp></dt>
  27786. <dd><p>Specify which filter to use. This option accepts the following values:
  27787. </p>
  27788. <dl class="table">
  27789. <dt>&lsquo;<samp class="samp">derain</samp>&rsquo;</dt>
  27790. <dd><p>Derain filter. To conduct derain filter, you need to use a derain model.
  27791. </p>
  27792. </dd>
  27793. <dt>&lsquo;<samp class="samp">dehaze</samp>&rsquo;</dt>
  27794. <dd><p>Dehaze filter. To conduct dehaze filter, you need to use a dehaze model.
  27795. </p></dd>
  27796. </dl>
  27797. <p>Default value is &lsquo;<samp class="samp">derain</samp>&rsquo;.
  27798. </p>
  27799. </dd>
  27800. <dt><samp class="option">dnn_backend</samp></dt>
  27801. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  27802. the following values:
  27803. </p>
  27804. <dl class="table">
  27805. <dt>&lsquo;<samp class="samp">tensorflow</samp>&rsquo;</dt>
  27806. <dd><p>TensorFlow backend. To enable this backend you
  27807. need to install the TensorFlow for C library (see
  27808. <a class="url" href="https://www.tensorflow.org/install/lang_c">https://www.tensorflow.org/install/lang_c</a>) and configure FFmpeg with
  27809. <code class="code">--enable-libtensorflow</code>
  27810. </p></dd>
  27811. </dl>
  27812. </dd>
  27813. <dt><samp class="option">model</samp></dt>
  27814. <dd><p>Set path to model file specifying network architecture and its parameters.
  27815. Note that different backends use different file formats. TensorFlow can load files for only its format.
  27816. </p></dd>
  27817. </dl>
  27818. <p>To get full functionality (such as async execution), please use the <a class="ref" href="#dnn_005fprocessing">dnn_processing</a> filter.
  27819. </p>
  27820. </div>
  27821. <div class="section-level-extent" id="deshake">
  27822. <h3 class="section"><span>32.67 deshake<a class="copiable-link" href="#deshake"> &para;</a></span></h3>
  27823. <p>Attempt to fix small changes in horizontal and/or vertical shift. This
  27824. filter helps remove camera shake from hand-holding a camera, bumping a
  27825. tripod, moving on a vehicle, etc.
  27826. </p>
  27827. <p>The filter accepts the following options:
  27828. </p>
  27829. <dl class="table">
  27830. <dt><samp class="option">x</samp></dt>
  27831. <dt><samp class="option">y</samp></dt>
  27832. <dt><samp class="option">w</samp></dt>
  27833. <dt><samp class="option">h</samp></dt>
  27834. <dd><p>Specify a rectangular area where to limit the search for motion
  27835. vectors.
  27836. If desired the search for motion vectors can be limited to a
  27837. rectangular area of the frame defined by its top left corner, width
  27838. and height. These parameters have the same meaning as the drawbox
  27839. filter which can be used to visualise the position of the bounding
  27840. box.
  27841. </p>
  27842. <p>This is useful when simultaneous movement of subjects within the frame
  27843. might be confused for camera motion by the motion vector search.
  27844. </p>
  27845. <p>If any or all of <var class="var">x</var>, <var class="var">y</var>, <var class="var">w</var> and <var class="var">h</var> are set to -1
  27846. then the full frame is used. This allows later options to be set
  27847. without specifying the bounding box for the motion vector search.
  27848. </p>
  27849. <p>Default - search the whole frame.
  27850. </p>
  27851. </dd>
  27852. <dt><samp class="option">rx</samp></dt>
  27853. <dt><samp class="option">ry</samp></dt>
  27854. <dd><p>Specify the maximum extent of movement in x and y directions in the
  27855. range 0-64 pixels. Default 16.
  27856. </p>
  27857. </dd>
  27858. <dt><samp class="option">edge</samp></dt>
  27859. <dd><p>Specify how to generate pixels to fill blanks at the edge of the
  27860. frame. Available values are:
  27861. </p><dl class="table">
  27862. <dt>&lsquo;<samp class="samp">blank, 0</samp>&rsquo;</dt>
  27863. <dd><p>Fill zeroes at blank locations
  27864. </p></dd>
  27865. <dt>&lsquo;<samp class="samp">original, 1</samp>&rsquo;</dt>
  27866. <dd><p>Original image at blank locations
  27867. </p></dd>
  27868. <dt>&lsquo;<samp class="samp">clamp, 2</samp>&rsquo;</dt>
  27869. <dd><p>Extruded edge value at blank locations
  27870. </p></dd>
  27871. <dt>&lsquo;<samp class="samp">mirror, 3</samp>&rsquo;</dt>
  27872. <dd><p>Mirrored edge at blank locations
  27873. </p></dd>
  27874. </dl>
  27875. <p>Default value is &lsquo;<samp class="samp">mirror</samp>&rsquo;.
  27876. </p>
  27877. </dd>
  27878. <dt><samp class="option">blocksize</samp></dt>
  27879. <dd><p>Specify the blocksize to use for motion search. Range 4-128 pixels,
  27880. default 8.
  27881. </p>
  27882. </dd>
  27883. <dt><samp class="option">contrast</samp></dt>
  27884. <dd><p>Specify the contrast threshold for blocks. Only blocks with more than
  27885. the specified contrast (difference between darkest and lightest
  27886. pixels) will be considered. Range 1-255, default 125.
  27887. </p>
  27888. </dd>
  27889. <dt><samp class="option">search</samp></dt>
  27890. <dd><p>Specify the search strategy. Available values are:
  27891. </p><dl class="table">
  27892. <dt>&lsquo;<samp class="samp">exhaustive, 0</samp>&rsquo;</dt>
  27893. <dd><p>Set exhaustive search
  27894. </p></dd>
  27895. <dt>&lsquo;<samp class="samp">less, 1</samp>&rsquo;</dt>
  27896. <dd><p>Set less exhaustive search.
  27897. </p></dd>
  27898. </dl>
  27899. <p>Default value is &lsquo;<samp class="samp">exhaustive</samp>&rsquo;.
  27900. </p>
  27901. </dd>
  27902. <dt><samp class="option">filename</samp></dt>
  27903. <dd><p>If set then a detailed log of the motion search is written to the
  27904. specified file.
  27905. </p>
  27906. </dd>
  27907. </dl>
  27908. </div>
  27909. <div class="section-level-extent" id="despill">
  27910. <h3 class="section"><span>32.68 despill<a class="copiable-link" href="#despill"> &para;</a></span></h3>
  27911. <p>Remove unwanted contamination of foreground colors, caused by reflected color of
  27912. greenscreen or bluescreen.
  27913. </p>
  27914. <p>This filter accepts the following options:
  27915. </p>
  27916. <dl class="table">
  27917. <dt><samp class="option">type</samp></dt>
  27918. <dd><p>Set what type of despill to use.
  27919. </p>
  27920. </dd>
  27921. <dt><samp class="option">mix</samp></dt>
  27922. <dd><p>Set how spillmap will be generated.
  27923. </p>
  27924. </dd>
  27925. <dt><samp class="option">expand</samp></dt>
  27926. <dd><p>Set how much to get rid of still remaining spill.
  27927. </p>
  27928. </dd>
  27929. <dt><samp class="option">red</samp></dt>
  27930. <dd><p>Controls amount of red in spill area.
  27931. </p>
  27932. </dd>
  27933. <dt><samp class="option">green</samp></dt>
  27934. <dd><p>Controls amount of green in spill area.
  27935. Should be -1 for greenscreen.
  27936. </p>
  27937. </dd>
  27938. <dt><samp class="option">blue</samp></dt>
  27939. <dd><p>Controls amount of blue in spill area.
  27940. Should be -1 for bluescreen.
  27941. </p>
  27942. </dd>
  27943. <dt><samp class="option">brightness</samp></dt>
  27944. <dd><p>Controls brightness of spill area, preserving colors.
  27945. </p>
  27946. </dd>
  27947. <dt><samp class="option">alpha</samp></dt>
  27948. <dd><p>Modify alpha from generated spillmap.
  27949. </p></dd>
  27950. </dl>
  27951. <ul class="mini-toc">
  27952. <li><a href="#Commands-84" accesskey="1">Commands</a></li>
  27953. </ul>
  27954. <div class="subsection-level-extent" id="Commands-84">
  27955. <h4 class="subsection"><span>32.68.1 Commands<a class="copiable-link" href="#Commands-84"> &para;</a></span></h4>
  27956. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  27957. </p>
  27958. </div>
  27959. </div>
  27960. <div class="section-level-extent" id="detelecine">
  27961. <h3 class="section"><span>32.69 detelecine<a class="copiable-link" href="#detelecine"> &para;</a></span></h3>
  27962. <p>Apply an exact inverse of the telecine operation. It requires a predefined
  27963. pattern specified using the pattern option which must be the same as that passed
  27964. to the telecine filter.
  27965. </p>
  27966. <p>This filter accepts the following options:
  27967. </p>
  27968. <dl class="table">
  27969. <dt><samp class="option">first_field</samp></dt>
  27970. <dd><dl class="table">
  27971. <dt>&lsquo;<samp class="samp">top, t</samp>&rsquo;</dt>
  27972. <dd><p>top field first
  27973. </p></dd>
  27974. <dt>&lsquo;<samp class="samp">bottom, b</samp>&rsquo;</dt>
  27975. <dd><p>bottom field first
  27976. The default value is <code class="code">top</code>.
  27977. </p></dd>
  27978. </dl>
  27979. </dd>
  27980. <dt><samp class="option">pattern</samp></dt>
  27981. <dd><p>A string of numbers representing the pulldown pattern you wish to apply.
  27982. The default value is <code class="code">23</code>.
  27983. </p>
  27984. </dd>
  27985. <dt><samp class="option">start_frame</samp></dt>
  27986. <dd><p>A number representing position of the first frame with respect to the telecine
  27987. pattern. This is to be used if the stream is cut. The default value is <code class="code">0</code>.
  27988. </p></dd>
  27989. </dl>
  27990. <a class="anchor" id="dilation"></a></div>
  27991. <div class="section-level-extent" id="dilation-1">
  27992. <h3 class="section"><span>32.70 dilation<a class="copiable-link" href="#dilation-1"> &para;</a></span></h3>
  27993. <p>Apply dilation effect to the video.
  27994. </p>
  27995. <p>This filter replaces the pixel by the local(3x3) maximum.
  27996. </p>
  27997. <p>It accepts the following options:
  27998. </p>
  27999. <dl class="table">
  28000. <dt><samp class="option">threshold0</samp></dt>
  28001. <dt><samp class="option">threshold1</samp></dt>
  28002. <dt><samp class="option">threshold2</samp></dt>
  28003. <dt><samp class="option">threshold3</samp></dt>
  28004. <dd><p>Limit the maximum change for each plane, default is 65535.
  28005. If 0, plane will remain unchanged.
  28006. </p>
  28007. </dd>
  28008. <dt><samp class="option">coordinates</samp></dt>
  28009. <dd><p>Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
  28010. pixels are used.
  28011. </p>
  28012. <p>Flags to local 3x3 coordinates maps like this:
  28013. </p>
  28014. <p>1 2 3
  28015. 4 5
  28016. 6 7 8
  28017. </p></dd>
  28018. </dl>
  28019. <ul class="mini-toc">
  28020. <li><a href="#Commands-85" accesskey="1">Commands</a></li>
  28021. </ul>
  28022. <div class="subsection-level-extent" id="Commands-85">
  28023. <h4 class="subsection"><span>32.70.1 Commands<a class="copiable-link" href="#Commands-85"> &para;</a></span></h4>
  28024. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  28025. </p>
  28026. </div>
  28027. </div>
  28028. <div class="section-level-extent" id="displace">
  28029. <h3 class="section"><span>32.71 displace<a class="copiable-link" href="#displace"> &para;</a></span></h3>
  28030. <p>Displace pixels as indicated by second and third input stream.
  28031. </p>
  28032. <p>It takes three input streams and outputs one stream, the first input is the
  28033. source, and second and third input are displacement maps.
  28034. </p>
  28035. <p>The second input specifies how much to displace pixels along the
  28036. x-axis, while the third input specifies how much to displace pixels
  28037. along the y-axis.
  28038. If one of displacement map streams terminates, last frame from that
  28039. displacement map will be used.
  28040. </p>
  28041. <p>Note that once generated, displacements maps can be reused over and over again.
  28042. </p>
  28043. <p>A description of the accepted options follows.
  28044. </p>
  28045. <dl class="table">
  28046. <dt><samp class="option">edge</samp></dt>
  28047. <dd><p>Set displace behavior for pixels that are out of range.
  28048. </p>
  28049. <p>Available values are:
  28050. </p><dl class="table">
  28051. <dt>&lsquo;<samp class="samp">blank</samp>&rsquo;</dt>
  28052. <dd><p>Missing pixels are replaced by black pixels.
  28053. </p>
  28054. </dd>
  28055. <dt>&lsquo;<samp class="samp">smear</samp>&rsquo;</dt>
  28056. <dd><p>Adjacent pixels will spread out to replace missing pixels.
  28057. </p>
  28058. </dd>
  28059. <dt>&lsquo;<samp class="samp">wrap</samp>&rsquo;</dt>
  28060. <dd><p>Out of range pixels are wrapped so they point to pixels of other side.
  28061. </p>
  28062. </dd>
  28063. <dt>&lsquo;<samp class="samp">mirror</samp>&rsquo;</dt>
  28064. <dd><p>Out of range pixels will be replaced with mirrored pixels.
  28065. </p></dd>
  28066. </dl>
  28067. <p>Default is &lsquo;<samp class="samp">smear</samp>&rsquo;.
  28068. </p>
  28069. </dd>
  28070. </dl>
  28071. <ul class="mini-toc">
  28072. <li><a href="#Examples-83" accesskey="1">Examples</a></li>
  28073. </ul>
  28074. <div class="subsection-level-extent" id="Examples-83">
  28075. <h4 class="subsection"><span>32.71.1 Examples<a class="copiable-link" href="#Examples-83"> &para;</a></span></h4>
  28076. <ul class="itemize mark-bullet">
  28077. <li>Add ripple effect to rgb input of video size hd720:
  28078. <div class="example">
  28079. <pre class="example-preformatted">ffmpeg -i INPUT -f lavfi -i nullsrc=s=hd720,lutrgb=128:128:128 -f lavfi -i nullsrc=s=hd720,geq='r=128+30*sin(2*PI*X/400+T):g=128+30*sin(2*PI*X/400+T):b=128+30*sin(2*PI*X/400+T)' -lavfi '[0][1][2]displace' OUTPUT
  28080. </pre></div>
  28081. </li><li>Add wave effect to rgb input of video size hd720:
  28082. <div class="example">
  28083. <pre class="example-preformatted">ffmpeg -i INPUT -f lavfi -i nullsrc=hd720,geq='r=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):g=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T)):b=128+80*(sin(sqrt((X-W/2)*(X-W/2)+(Y-H/2)*(Y-H/2))/220*2*PI+T))' -lavfi '[1]split[x][y],[0][x][y]displace' OUTPUT
  28084. </pre></div>
  28085. </li></ul>
  28086. </div>
  28087. </div>
  28088. <div class="section-level-extent" id="dnn_005fclassify">
  28089. <h3 class="section"><span>32.72 dnn_classify<a class="copiable-link" href="#dnn_005fclassify"> &para;</a></span></h3>
  28090. <p>Do classification with deep neural networks based on bounding boxes.
  28091. </p>
  28092. <p>The filter accepts the following options:
  28093. </p>
  28094. <dl class="table">
  28095. <dt><samp class="option">dnn_backend</samp></dt>
  28096. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  28097. only openvino now, tensorflow backends will be added.
  28098. </p>
  28099. </dd>
  28100. <dt><samp class="option">model</samp></dt>
  28101. <dd><p>Set path to model file specifying network architecture and its parameters.
  28102. Note that different backends use different file formats.
  28103. </p>
  28104. </dd>
  28105. <dt><samp class="option">input</samp></dt>
  28106. <dd><p>Set the input name of the dnn network.
  28107. </p>
  28108. </dd>
  28109. <dt><samp class="option">output</samp></dt>
  28110. <dd><p>Set the output name of the dnn network.
  28111. </p>
  28112. </dd>
  28113. <dt><samp class="option">confidence</samp></dt>
  28114. <dd><p>Set the confidence threshold (default: 0.5).
  28115. </p>
  28116. </dd>
  28117. <dt><samp class="option">labels</samp></dt>
  28118. <dd><p>Set path to label file specifying the mapping between label id and name.
  28119. Each label name is written in one line, tailing spaces and empty lines are skipped.
  28120. The first line is the name of label id 0,
  28121. and the second line is the name of label id 1, etc.
  28122. The label id is considered as name if the label file is not provided.
  28123. </p>
  28124. </dd>
  28125. <dt><samp class="option">backend_configs</samp></dt>
  28126. <dd><p>Set the configs to be passed into backend
  28127. </p>
  28128. <p>For tensorflow backend, you can set its configs with <samp class="option">sess_config</samp> options,
  28129. please use tools/python/tf_sess_config.py to get the configs for your system.
  28130. </p>
  28131. </dd>
  28132. </dl>
  28133. </div>
  28134. <div class="section-level-extent" id="dnn_005fdetect">
  28135. <h3 class="section"><span>32.73 dnn_detect<a class="copiable-link" href="#dnn_005fdetect"> &para;</a></span></h3>
  28136. <p>Do object detection with deep neural networks.
  28137. </p>
  28138. <p>The filter accepts the following options:
  28139. </p>
  28140. <dl class="table">
  28141. <dt><samp class="option">dnn_backend</samp></dt>
  28142. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  28143. only openvino now, tensorflow backends will be added.
  28144. </p>
  28145. </dd>
  28146. <dt><samp class="option">model</samp></dt>
  28147. <dd><p>Set path to model file specifying network architecture and its parameters.
  28148. Note that different backends use different file formats.
  28149. </p>
  28150. </dd>
  28151. <dt><samp class="option">input</samp></dt>
  28152. <dd><p>Set the input name of the dnn network.
  28153. </p>
  28154. </dd>
  28155. <dt><samp class="option">output</samp></dt>
  28156. <dd><p>Set the output name of the dnn network.
  28157. </p>
  28158. </dd>
  28159. <dt><samp class="option">confidence</samp></dt>
  28160. <dd><p>Set the confidence threshold (default: 0.5).
  28161. </p>
  28162. </dd>
  28163. <dt><samp class="option">labels</samp></dt>
  28164. <dd><p>Set path to label file specifying the mapping between label id and name.
  28165. Each label name is written in one line, tailing spaces and empty lines are skipped.
  28166. The first line is the name of label id 0 (usually it is &rsquo;background&rsquo;),
  28167. and the second line is the name of label id 1, etc.
  28168. The label id is considered as name if the label file is not provided.
  28169. </p>
  28170. </dd>
  28171. <dt><samp class="option">backend_configs</samp></dt>
  28172. <dd><p>Set the configs to be passed into backend. To use async execution, set async (default: set).
  28173. Roll back to sync execution if the backend does not support async.
  28174. </p>
  28175. </dd>
  28176. </dl>
  28177. <a class="anchor" id="dnn_005fprocessing"></a></div>
  28178. <div class="section-level-extent" id="dnn_005fprocessing-1">
  28179. <h3 class="section"><span>32.74 dnn_processing<a class="copiable-link" href="#dnn_005fprocessing-1"> &para;</a></span></h3>
  28180. <p>Do image processing with deep neural networks. It works together with another filter
  28181. which converts the pixel format of the Frame to what the dnn network requires.
  28182. </p>
  28183. <p>The filter accepts the following options:
  28184. </p>
  28185. <dl class="table">
  28186. <dt><samp class="option">dnn_backend</samp></dt>
  28187. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  28188. the following values:
  28189. </p>
  28190. <dl class="table">
  28191. <dt>&lsquo;<samp class="samp">tensorflow</samp>&rsquo;</dt>
  28192. <dd><p>TensorFlow backend. To enable this backend you
  28193. need to install the TensorFlow for C library (see
  28194. <a class="url" href="https://www.tensorflow.org/install/lang_c">https://www.tensorflow.org/install/lang_c</a>) and configure FFmpeg with
  28195. <code class="code">--enable-libtensorflow</code>
  28196. </p>
  28197. </dd>
  28198. <dt>&lsquo;<samp class="samp">openvino</samp>&rsquo;</dt>
  28199. <dd><p>OpenVINO backend. To enable this backend you
  28200. need to build and install the OpenVINO for C library (see
  28201. <a class="url" href="https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md">https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md</a>) and configure FFmpeg with
  28202. <code class="code">--enable-libopenvino</code> (&ndash;extra-cflags=-I... &ndash;extra-ldflags=-L... might
  28203. be needed if the header files and libraries are not installed into system path)
  28204. </p>
  28205. </dd>
  28206. <dt>&lsquo;<samp class="samp">torch</samp>&rsquo;</dt>
  28207. <dd><p>Libtorch backend. To enable this backend you need to build and install Libtroch
  28208. for C++ library. Please download cxx11 ABI version (see
  28209. <a class="url" href="https://pytorch.org/get-started/locally">https://pytorch.org/get-started/locally</a>)
  28210. and configure FFmpeg with <code class="code">--enable-libtorch
  28211. --extra-cflags=-I/libtorch_root/libtorch/include
  28212. --extra-cflags=-I/libtorch_root/libtorch/include/torch/csrc/api/include
  28213. --extra-ldflags=-L/libtorch_root/libtorch/lib/</code>
  28214. </p>
  28215. </dd>
  28216. </dl>
  28217. </dd>
  28218. <dt><samp class="option">model</samp></dt>
  28219. <dd><p>Set path to model file specifying network architecture and its parameters.
  28220. Note that different backends use different file formats. TensorFlow, OpenVINO
  28221. and Libtorch backend can load files for only its format.
  28222. </p>
  28223. </dd>
  28224. <dt><samp class="option">input</samp></dt>
  28225. <dd><p>Set the input name of the dnn network.
  28226. </p>
  28227. </dd>
  28228. <dt><samp class="option">output</samp></dt>
  28229. <dd><p>Set the output name of the dnn network.
  28230. </p>
  28231. </dd>
  28232. <dt><samp class="option">backend_configs</samp></dt>
  28233. <dd><p>Set the configs to be passed into backend. To use async execution, set async (default: set).
  28234. Roll back to sync execution if the backend does not support async.
  28235. </p>
  28236. <p>For tensorflow backend, you can set its configs with <samp class="option">sess_config</samp> options,
  28237. please use tools/python/tf_sess_config.py to get the configs of TensorFlow backend for your system.
  28238. </p>
  28239. </dd>
  28240. </dl>
  28241. <ul class="mini-toc">
  28242. <li><a href="#Examples-84" accesskey="1">Examples</a></li>
  28243. </ul>
  28244. <div class="subsection-level-extent" id="Examples-84">
  28245. <h4 class="subsection"><span>32.74.1 Examples<a class="copiable-link" href="#Examples-84"> &para;</a></span></h4>
  28246. <ul class="itemize mark-bullet">
  28247. <li>Remove rain in rgb24 frame with can.pb (see <a class="ref" href="#derain">derain</a> filter):
  28248. <div class="example">
  28249. <pre class="example-preformatted">./ffmpeg -i rain.jpg -vf format=rgb24,dnn_processing=dnn_backend=tensorflow:model=can.pb:input=x:output=y derain.jpg
  28250. </pre></div>
  28251. </li><li>Handle the Y channel with srcnn.pb (see <a class="ref" href="#sr">sr</a> filter) for frame with yuv420p (planar YUV formats supported):
  28252. <div class="example">
  28253. <pre class="example-preformatted">./ffmpeg -i 480p.jpg -vf format=yuv420p,scale=w=iw*2:h=ih*2,dnn_processing=dnn_backend=tensorflow:model=srcnn.pb:input=x:output=y -y srcnn.jpg
  28254. </pre></div>
  28255. </li><li>Handle the Y channel with espcn.pb (see <a class="ref" href="#sr">sr</a> filter), which changes frame size, for format yuv420p (planar YUV formats supported),
  28256. please use tools/python/tf_sess_config.py to get the configs of TensorFlow backend for your system.
  28257. <div class="example">
  28258. <pre class="example-preformatted">./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y:backend_configs=sess_config=0x10022805320e09cdccccccccccec3f20012a01303801 -y tmp.espcn.jpg
  28259. </pre></div>
  28260. </li></ul>
  28261. </div>
  28262. </div>
  28263. <div class="section-level-extent" id="drawbox">
  28264. <h3 class="section"><span>32.75 drawbox<a class="copiable-link" href="#drawbox"> &para;</a></span></h3>
  28265. <p>Draw a colored box on the input image.
  28266. </p>
  28267. <p>It accepts the following parameters:
  28268. </p>
  28269. <dl class="table">
  28270. <dt><samp class="option">x</samp></dt>
  28271. <dt><samp class="option">y</samp></dt>
  28272. <dd><p>The expressions which specify the top left corner coordinates of the box. It defaults to 0.
  28273. </p>
  28274. </dd>
  28275. <dt><samp class="option">width, w</samp></dt>
  28276. <dt><samp class="option">height, h</samp></dt>
  28277. <dd><p>The expressions which specify the width and height of the box; if 0 they are interpreted as
  28278. the input width and height. It defaults to 0.
  28279. </p>
  28280. </dd>
  28281. <dt><samp class="option">color, c</samp></dt>
  28282. <dd><p>Specify the color of the box to write. For the general syntax of this option,
  28283. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>. If the special
  28284. value <code class="code">invert</code> is used, the box edge color is the same as the
  28285. video with inverted luma.
  28286. </p>
  28287. </dd>
  28288. <dt><samp class="option">thickness, t</samp></dt>
  28289. <dd><p>The expression which sets the thickness of the box edge.
  28290. A value of <code class="code">fill</code> will create a filled box. Default value is <code class="code">3</code>.
  28291. </p>
  28292. <p>See below for the list of accepted constants.
  28293. </p>
  28294. </dd>
  28295. <dt><samp class="option">replace</samp></dt>
  28296. <dd><p>Applicable if the input has alpha. With value <code class="code">1</code>, the pixels of the painted box
  28297. will overwrite the video&rsquo;s color and alpha pixels.
  28298. Default is <code class="code">0</code>, which composites the box onto the input, leaving the video&rsquo;s alpha intact.
  28299. </p></dd>
  28300. </dl>
  28301. <p>The parameters for <var class="var">x</var>, <var class="var">y</var>, <var class="var">w</var> and <var class="var">h</var> and <var class="var">t</var> are expressions containing the
  28302. following constants:
  28303. </p>
  28304. <dl class="table">
  28305. <dt><samp class="option">dar</samp></dt>
  28306. <dd><p>The input display aspect ratio, it is the same as (<var class="var">w</var> / <var class="var">h</var>) * <var class="var">sar</var>.
  28307. </p>
  28308. </dd>
  28309. <dt><samp class="option">hsub</samp></dt>
  28310. <dt><samp class="option">vsub</samp></dt>
  28311. <dd><p>horizontal and vertical chroma subsample values. For example for the
  28312. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  28313. </p>
  28314. </dd>
  28315. <dt><samp class="option">in_h, ih</samp></dt>
  28316. <dt><samp class="option">in_w, iw</samp></dt>
  28317. <dd><p>The input width and height.
  28318. </p>
  28319. </dd>
  28320. <dt><samp class="option">sar</samp></dt>
  28321. <dd><p>The input sample aspect ratio.
  28322. </p>
  28323. </dd>
  28324. <dt><samp class="option">x</samp></dt>
  28325. <dt><samp class="option">y</samp></dt>
  28326. <dd><p>The x and y offset coordinates where the box is drawn.
  28327. </p>
  28328. </dd>
  28329. <dt><samp class="option">w</samp></dt>
  28330. <dt><samp class="option">h</samp></dt>
  28331. <dd><p>The width and height of the drawn box.
  28332. </p>
  28333. </dd>
  28334. <dt><samp class="option">box_source</samp></dt>
  28335. <dd><p>Box source can be set as side_data_detection_bboxes if you want to use box data in
  28336. detection bboxes of side data.
  28337. </p>
  28338. <p>If <var class="var">box_source</var> is set, the <var class="var">x</var>, <var class="var">y</var>, <var class="var">width</var> and <var class="var">height</var> will be ignored and
  28339. still use box data in detection bboxes of side data. So please do not use this parameter if you were
  28340. not sure about the box source.
  28341. </p>
  28342. </dd>
  28343. <dt><samp class="option">t</samp></dt>
  28344. <dd><p>The thickness of the drawn box.
  28345. </p>
  28346. <p>These constants allow the <var class="var">x</var>, <var class="var">y</var>, <var class="var">w</var>, <var class="var">h</var> and <var class="var">t</var> expressions to refer to
  28347. each other, so you may for example specify <code class="code">y=x/dar</code> or <code class="code">h=w/dar</code>.
  28348. </p>
  28349. </dd>
  28350. </dl>
  28351. <ul class="mini-toc">
  28352. <li><a href="#Examples-85" accesskey="1">Examples</a></li>
  28353. <li><a href="#Commands-86" accesskey="2">Commands</a></li>
  28354. </ul>
  28355. <div class="subsection-level-extent" id="Examples-85">
  28356. <h4 class="subsection"><span>32.75.1 Examples<a class="copiable-link" href="#Examples-85"> &para;</a></span></h4>
  28357. <ul class="itemize mark-bullet">
  28358. <li>Draw a black box around the edge of the input image:
  28359. <div class="example">
  28360. <pre class="example-preformatted">drawbox
  28361. </pre></div>
  28362. </li><li>Draw a box with color red and an opacity of 50%:
  28363. <div class="example">
  28364. <pre class="example-preformatted">drawbox=10:20:200:60:red@0.5
  28365. </pre></div>
  28366. <p>The previous example can be specified as:
  28367. </p><div class="example">
  28368. <pre class="example-preformatted">drawbox=x=10:y=20:w=200:h=60:color=red@0.5
  28369. </pre></div>
  28370. </li><li>Fill the box with pink color:
  28371. <div class="example">
  28372. <pre class="example-preformatted">drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=fill
  28373. </pre></div>
  28374. </li><li>Draw a 2-pixel red 2.40:1 mask:
  28375. <div class="example">
  28376. <pre class="example-preformatted">drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red
  28377. </pre></div>
  28378. </li></ul>
  28379. </div>
  28380. <div class="subsection-level-extent" id="Commands-86">
  28381. <h4 class="subsection"><span>32.75.2 Commands<a class="copiable-link" href="#Commands-86"> &para;</a></span></h4>
  28382. <p>This filter supports same commands as options.
  28383. The command accepts the same syntax of the corresponding option.
  28384. </p>
  28385. <p>If the specified expression is not valid, it is kept at its current
  28386. value.
  28387. </p>
  28388. <a class="anchor" id="drawgraph"></a></div>
  28389. </div>
  28390. <div class="section-level-extent" id="drawgraph-1">
  28391. <h3 class="section"><span>32.76 drawgraph<a class="copiable-link" href="#drawgraph-1"> &para;</a></span></h3>
  28392. <p>Draw a graph using input video metadata.
  28393. </p>
  28394. <p>It accepts the following parameters:
  28395. </p>
  28396. <dl class="table">
  28397. <dt><samp class="option">m1</samp></dt>
  28398. <dd><p>Set 1st frame metadata key from which metadata values will be used to draw a graph.
  28399. </p>
  28400. </dd>
  28401. <dt><samp class="option">fg1</samp></dt>
  28402. <dd><p>Set 1st foreground color expression.
  28403. </p>
  28404. </dd>
  28405. <dt><samp class="option">m2</samp></dt>
  28406. <dd><p>Set 2nd frame metadata key from which metadata values will be used to draw a graph.
  28407. </p>
  28408. </dd>
  28409. <dt><samp class="option">fg2</samp></dt>
  28410. <dd><p>Set 2nd foreground color expression.
  28411. </p>
  28412. </dd>
  28413. <dt><samp class="option">m3</samp></dt>
  28414. <dd><p>Set 3rd frame metadata key from which metadata values will be used to draw a graph.
  28415. </p>
  28416. </dd>
  28417. <dt><samp class="option">fg3</samp></dt>
  28418. <dd><p>Set 3rd foreground color expression.
  28419. </p>
  28420. </dd>
  28421. <dt><samp class="option">m4</samp></dt>
  28422. <dd><p>Set 4th frame metadata key from which metadata values will be used to draw a graph.
  28423. </p>
  28424. </dd>
  28425. <dt><samp class="option">fg4</samp></dt>
  28426. <dd><p>Set 4th foreground color expression.
  28427. </p>
  28428. </dd>
  28429. <dt><samp class="option">min</samp></dt>
  28430. <dd><p>Set minimal value of metadata value.
  28431. </p>
  28432. </dd>
  28433. <dt><samp class="option">max</samp></dt>
  28434. <dd><p>Set maximal value of metadata value.
  28435. </p>
  28436. </dd>
  28437. <dt><samp class="option">bg</samp></dt>
  28438. <dd><p>Set graph background color. Default is white.
  28439. </p>
  28440. </dd>
  28441. <dt><samp class="option">mode</samp></dt>
  28442. <dd><p>Set graph mode.
  28443. </p>
  28444. <p>Available values for mode is:
  28445. </p><dl class="table">
  28446. <dt>&lsquo;<samp class="samp">bar</samp>&rsquo;</dt>
  28447. <dt>&lsquo;<samp class="samp">dot</samp>&rsquo;</dt>
  28448. <dt>&lsquo;<samp class="samp">line</samp>&rsquo;</dt>
  28449. </dl>
  28450. <p>Default is <code class="code">line</code>.
  28451. </p>
  28452. </dd>
  28453. <dt><samp class="option">slide</samp></dt>
  28454. <dd><p>Set slide mode.
  28455. </p>
  28456. <p>Available values for slide is:
  28457. </p><dl class="table">
  28458. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  28459. <dd><p>Draw new frame when right border is reached.
  28460. </p>
  28461. </dd>
  28462. <dt>&lsquo;<samp class="samp">replace</samp>&rsquo;</dt>
  28463. <dd><p>Replace old columns with new ones.
  28464. </p>
  28465. </dd>
  28466. <dt>&lsquo;<samp class="samp">scroll</samp>&rsquo;</dt>
  28467. <dd><p>Scroll from right to left.
  28468. </p>
  28469. </dd>
  28470. <dt>&lsquo;<samp class="samp">rscroll</samp>&rsquo;</dt>
  28471. <dd><p>Scroll from left to right.
  28472. </p>
  28473. </dd>
  28474. <dt>&lsquo;<samp class="samp">picture</samp>&rsquo;</dt>
  28475. <dd><p>Draw single picture.
  28476. </p></dd>
  28477. </dl>
  28478. <p>Default is <code class="code">frame</code>.
  28479. </p>
  28480. </dd>
  28481. <dt><samp class="option">size</samp></dt>
  28482. <dd><p>Set size of graph video. For the syntax of this option, check the
  28483. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  28484. The default value is <code class="code">900x256</code>.
  28485. </p>
  28486. </dd>
  28487. <dt><samp class="option">rate, r</samp></dt>
  28488. <dd><p>Set the output frame rate. Default value is <code class="code">25</code>.
  28489. </p>
  28490. <p>The foreground color expressions can use the following variables:
  28491. </p><dl class="table">
  28492. <dt><samp class="option">MIN</samp></dt>
  28493. <dd><p>Minimal value of metadata value.
  28494. </p>
  28495. </dd>
  28496. <dt><samp class="option">MAX</samp></dt>
  28497. <dd><p>Maximal value of metadata value.
  28498. </p>
  28499. </dd>
  28500. <dt><samp class="option">VAL</samp></dt>
  28501. <dd><p>Current metadata key value.
  28502. </p></dd>
  28503. </dl>
  28504. <p>The color is defined as 0xAABBGGRR.
  28505. </p></dd>
  28506. </dl>
  28507. <p>Example using metadata from <a class="ref" href="#signalstats">signalstats</a> filter:
  28508. </p><div class="example">
  28509. <pre class="example-preformatted">signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
  28510. </pre></div>
  28511. <p>Example using metadata from <a class="ref" href="#ebur128">ebur128</a> filter:
  28512. </p><div class="example">
  28513. <pre class="example-preformatted">ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
  28514. </pre></div>
  28515. </div>
  28516. <div class="section-level-extent" id="drawgrid">
  28517. <h3 class="section"><span>32.77 drawgrid<a class="copiable-link" href="#drawgrid"> &para;</a></span></h3>
  28518. <p>Draw a grid on the input image.
  28519. </p>
  28520. <p>It accepts the following parameters:
  28521. </p>
  28522. <dl class="table">
  28523. <dt><samp class="option">x</samp></dt>
  28524. <dt><samp class="option">y</samp></dt>
  28525. <dd><p>The expressions which specify the coordinates of some point of grid intersection (meant to configure offset). Both default to 0.
  28526. </p>
  28527. </dd>
  28528. <dt><samp class="option">width, w</samp></dt>
  28529. <dt><samp class="option">height, h</samp></dt>
  28530. <dd><p>The expressions which specify the width and height of the grid cell, if 0 they are interpreted as the
  28531. input width and height, respectively, minus <code class="code">thickness</code>, so image gets
  28532. framed. Default to 0.
  28533. </p>
  28534. </dd>
  28535. <dt><samp class="option">color, c</samp></dt>
  28536. <dd><p>Specify the color of the grid. For the general syntax of this option,
  28537. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>. If the special
  28538. value <code class="code">invert</code> is used, the grid color is the same as the
  28539. video with inverted luma.
  28540. </p>
  28541. </dd>
  28542. <dt><samp class="option">thickness, t</samp></dt>
  28543. <dd><p>The expression which sets the thickness of the grid line. Default value is <code class="code">1</code>.
  28544. </p>
  28545. <p>See below for the list of accepted constants.
  28546. </p>
  28547. </dd>
  28548. <dt><samp class="option">replace</samp></dt>
  28549. <dd><p>Applicable if the input has alpha. With <code class="code">1</code> the pixels of the painted grid
  28550. will overwrite the video&rsquo;s color and alpha pixels.
  28551. Default is <code class="code">0</code>, which composites the grid onto the input, leaving the video&rsquo;s alpha intact.
  28552. </p></dd>
  28553. </dl>
  28554. <p>The parameters for <var class="var">x</var>, <var class="var">y</var>, <var class="var">w</var> and <var class="var">h</var> and <var class="var">t</var> are expressions containing the
  28555. following constants:
  28556. </p>
  28557. <dl class="table">
  28558. <dt><samp class="option">dar</samp></dt>
  28559. <dd><p>The input display aspect ratio, it is the same as (<var class="var">w</var> / <var class="var">h</var>) * <var class="var">sar</var>.
  28560. </p>
  28561. </dd>
  28562. <dt><samp class="option">hsub</samp></dt>
  28563. <dt><samp class="option">vsub</samp></dt>
  28564. <dd><p>horizontal and vertical chroma subsample values. For example for the
  28565. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  28566. </p>
  28567. </dd>
  28568. <dt><samp class="option">in_h, ih</samp></dt>
  28569. <dt><samp class="option">in_w, iw</samp></dt>
  28570. <dd><p>The input grid cell width and height.
  28571. </p>
  28572. </dd>
  28573. <dt><samp class="option">sar</samp></dt>
  28574. <dd><p>The input sample aspect ratio.
  28575. </p>
  28576. </dd>
  28577. <dt><samp class="option">x</samp></dt>
  28578. <dt><samp class="option">y</samp></dt>
  28579. <dd><p>The x and y coordinates of some point of grid intersection (meant to configure offset).
  28580. </p>
  28581. </dd>
  28582. <dt><samp class="option">w</samp></dt>
  28583. <dt><samp class="option">h</samp></dt>
  28584. <dd><p>The width and height of the drawn cell.
  28585. </p>
  28586. </dd>
  28587. <dt><samp class="option">t</samp></dt>
  28588. <dd><p>The thickness of the drawn cell.
  28589. </p>
  28590. <p>These constants allow the <var class="var">x</var>, <var class="var">y</var>, <var class="var">w</var>, <var class="var">h</var> and <var class="var">t</var> expressions to refer to
  28591. each other, so you may for example specify <code class="code">y=x/dar</code> or <code class="code">h=w/dar</code>.
  28592. </p>
  28593. </dd>
  28594. </dl>
  28595. <ul class="mini-toc">
  28596. <li><a href="#Examples-86" accesskey="1">Examples</a></li>
  28597. <li><a href="#Commands-87" accesskey="2">Commands</a></li>
  28598. </ul>
  28599. <div class="subsection-level-extent" id="Examples-86">
  28600. <h4 class="subsection"><span>32.77.1 Examples<a class="copiable-link" href="#Examples-86"> &para;</a></span></h4>
  28601. <ul class="itemize mark-bullet">
  28602. <li>Draw a grid with cell 100x100 pixels, thickness 2 pixels, with color red and an opacity of 50%:
  28603. <div class="example">
  28604. <pre class="example-preformatted">drawgrid=width=100:height=100:thickness=2:color=red@0.5
  28605. </pre></div>
  28606. </li><li>Draw a white 3x3 grid with an opacity of 50%:
  28607. <div class="example">
  28608. <pre class="example-preformatted">drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5
  28609. </pre></div>
  28610. </li></ul>
  28611. </div>
  28612. <div class="subsection-level-extent" id="Commands-87">
  28613. <h4 class="subsection"><span>32.77.2 Commands<a class="copiable-link" href="#Commands-87"> &para;</a></span></h4>
  28614. <p>This filter supports same commands as options.
  28615. The command accepts the same syntax of the corresponding option.
  28616. </p>
  28617. <p>If the specified expression is not valid, it is kept at its current
  28618. value.
  28619. </p>
  28620. <a class="anchor" id="drawtext"></a></div>
  28621. </div>
  28622. <div class="section-level-extent" id="drawtext-1">
  28623. <h3 class="section"><span>32.78 drawtext<a class="copiable-link" href="#drawtext-1"> &para;</a></span></h3>
  28624. <p>Draw a text string or text from a specified file on top of a video, using the
  28625. libfreetype library.
  28626. </p>
  28627. <p>To enable compilation of this filter, you need to configure FFmpeg with
  28628. <code class="code">--enable-libfreetype</code> and <code class="code">--enable-libharfbuzz</code>.
  28629. To enable default font fallback and the <var class="var">font</var> option you need to
  28630. configure FFmpeg with <code class="code">--enable-libfontconfig</code>.
  28631. To enable the <var class="var">text_shaping</var> option, you need to configure FFmpeg with
  28632. <code class="code">--enable-libfribidi</code>.
  28633. </p>
  28634. <ul class="mini-toc">
  28635. <li><a href="#Syntax-2" accesskey="1">Syntax</a></li>
  28636. <li><a href="#Text-expansion" accesskey="2">Text expansion</a></li>
  28637. <li><a href="#Commands-88" accesskey="3">Commands</a></li>
  28638. <li><a href="#Examples-87" accesskey="4">Examples</a></li>
  28639. </ul>
  28640. <div class="subsection-level-extent" id="Syntax-2">
  28641. <h4 class="subsection"><span>32.78.1 Syntax<a class="copiable-link" href="#Syntax-2"> &para;</a></span></h4>
  28642. <p>It accepts the following parameters:
  28643. </p>
  28644. <dl class="table">
  28645. <dt><samp class="option">box</samp></dt>
  28646. <dd><p>Used to draw a box around text using the background color.
  28647. The value must be either 1 (enable) or 0 (disable).
  28648. The default value of <var class="var">box</var> is 0.
  28649. </p>
  28650. </dd>
  28651. <dt><samp class="option">boxborderw</samp></dt>
  28652. <dd><p>Set the width of the border to be drawn around the box using <var class="var">boxcolor</var>.
  28653. The value must be specified using one of the following formats:
  28654. </p><ul class="itemize mark-bullet">
  28655. <li><code class="code">boxborderw=10</code> set the width of all the borders to 10
  28656. </li><li><code class="code">boxborderw=10|20</code> set the width of the top and bottom borders to 10
  28657. and the width of the left and right borders to 20
  28658. </li><li><code class="code">boxborderw=10|20|30</code> set the width of the top border to 10, the width
  28659. of the bottom border to 30 and the width of the left and right borders to 20
  28660. </li><li><code class="code">boxborderw=10|20|30|40</code> set the borders width to 10 (top), 20 (right),
  28661. 30 (bottom), 40 (left)
  28662. </li></ul>
  28663. <p>The default value of <var class="var">boxborderw</var> is &quot;0&quot;.
  28664. </p>
  28665. </dd>
  28666. <dt><samp class="option">boxcolor</samp></dt>
  28667. <dd><p>The color to be used for drawing box around text. For the syntax of this
  28668. option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  28669. </p>
  28670. <p>The default value of <var class="var">boxcolor</var> is &quot;white&quot;.
  28671. </p>
  28672. </dd>
  28673. <dt><samp class="option">line_spacing</samp></dt>
  28674. <dd><p>Set the line spacing in pixels. The default value of <var class="var">line_spacing</var> is 0.
  28675. </p>
  28676. </dd>
  28677. <dt><samp class="option">text_align</samp></dt>
  28678. <dd><p>Set the vertical and horizontal alignment of the text with respect to the box boundaries.
  28679. The value is combination of flags, one for the vertical alignment (T=top,
  28680. M=middle, B=bottom) and one for the horizontal alignment (L=left, C=center, R=right).
  28681. Please note that tab characters are only supported with the left horizontal alignment.
  28682. </p>
  28683. </dd>
  28684. <dt><samp class="option">y_align</samp></dt>
  28685. <dd><p>Specify what the <var class="var">y</var> value is referred to. Possible values are:
  28686. </p><ul class="itemize mark-bullet">
  28687. <li><code class="code">text</code> the top of the highest glyph of the first text line is placed at <var class="var">y</var>
  28688. </li><li><code class="code">baseline</code> the baseline of the first text line is placed at <var class="var">y</var>
  28689. </li><li><code class="code">font</code> the baseline of the first text line is placed at <var class="var">y</var> plus the
  28690. ascent (in pixels) defined in the font metrics
  28691. </li></ul>
  28692. <p>The default value of <var class="var">y_align</var> is &quot;text&quot; for backward compatibility.
  28693. </p>
  28694. </dd>
  28695. <dt><samp class="option">borderw</samp></dt>
  28696. <dd><p>Set the width of the border to be drawn around the text using <var class="var">bordercolor</var>.
  28697. The default value of <var class="var">borderw</var> is 0.
  28698. </p>
  28699. </dd>
  28700. <dt><samp class="option">bordercolor</samp></dt>
  28701. <dd><p>Set the color to be used for drawing border around text. For the syntax of this
  28702. option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  28703. </p>
  28704. <p>The default value of <var class="var">bordercolor</var> is &quot;black&quot;.
  28705. </p>
  28706. </dd>
  28707. <dt><samp class="option">expansion</samp></dt>
  28708. <dd><p>Select how the <var class="var">text</var> is expanded. Can be either <code class="code">none</code>,
  28709. <code class="code">strftime</code> (deprecated) or <code class="code">normal</code> (default). See the
  28710. <a class="ref" href="#drawtext_005fexpansion">Text expansion</a> section below for details.
  28711. </p>
  28712. </dd>
  28713. <dt><samp class="option">basetime</samp></dt>
  28714. <dd><p>Set a start time for the count. Value is in microseconds. Only applied
  28715. in the deprecated <code class="code">strftime</code> expansion mode. To emulate in normal expansion
  28716. mode use the <code class="code">pts</code> function, supplying the start time (in seconds)
  28717. as the second argument.
  28718. </p>
  28719. </dd>
  28720. <dt><samp class="option">fix_bounds</samp></dt>
  28721. <dd><p>If true, check and fix text coords to avoid clipping.
  28722. </p>
  28723. </dd>
  28724. <dt><samp class="option">fontcolor</samp></dt>
  28725. <dd><p>The color to be used for drawing fonts. For the syntax of this option, check
  28726. the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  28727. </p>
  28728. <p>The default value of <var class="var">fontcolor</var> is &quot;black&quot;.
  28729. </p>
  28730. </dd>
  28731. <dt><samp class="option">fontcolor_expr</samp></dt>
  28732. <dd><p>String which is expanded the same way as <var class="var">text</var> to obtain dynamic
  28733. <var class="var">fontcolor</var> value. By default this option has empty value and is not
  28734. processed. When this option is set, it overrides <var class="var">fontcolor</var> option.
  28735. </p>
  28736. </dd>
  28737. <dt><samp class="option">font</samp></dt>
  28738. <dd><p>The font family to be used for drawing text. By default Sans.
  28739. </p>
  28740. </dd>
  28741. <dt><samp class="option">fontfile</samp></dt>
  28742. <dd><p>The font file to be used for drawing text. The path must be included.
  28743. This parameter is mandatory if the fontconfig support is disabled.
  28744. </p>
  28745. </dd>
  28746. <dt><samp class="option">alpha</samp></dt>
  28747. <dd><p>Draw the text applying alpha blending. The value can
  28748. be a number between 0.0 and 1.0.
  28749. The expression accepts the same variables <var class="var">x, y</var> as well.
  28750. The default value is 1.
  28751. Please see <var class="var">fontcolor_expr</var>.
  28752. </p>
  28753. </dd>
  28754. <dt><samp class="option">fontsize</samp></dt>
  28755. <dd><p>The font size to be used for drawing text.
  28756. The default value of <var class="var">fontsize</var> is 16.
  28757. </p>
  28758. </dd>
  28759. <dt><samp class="option">text_shaping</samp></dt>
  28760. <dd><p>If set to 1, attempt to shape the text (for example, reverse the order of
  28761. right-to-left text and join Arabic characters) before drawing it.
  28762. Otherwise, just draw the text exactly as given.
  28763. By default 1 (if supported).
  28764. </p>
  28765. </dd>
  28766. <dt><samp class="option">ft_load_flags</samp></dt>
  28767. <dd><p>The flags to be used for loading the fonts.
  28768. </p>
  28769. <p>The flags map the corresponding flags supported by libfreetype, and are
  28770. a combination of the following values:
  28771. </p><dl class="table">
  28772. <dt><var class="var">default</var></dt>
  28773. <dt><var class="var">no_scale</var></dt>
  28774. <dt><var class="var">no_hinting</var></dt>
  28775. <dt><var class="var">render</var></dt>
  28776. <dt><var class="var">no_bitmap</var></dt>
  28777. <dt><var class="var">vertical_layout</var></dt>
  28778. <dt><var class="var">force_autohint</var></dt>
  28779. <dt><var class="var">crop_bitmap</var></dt>
  28780. <dt><var class="var">pedantic</var></dt>
  28781. <dt><var class="var">ignore_global_advance_width</var></dt>
  28782. <dt><var class="var">no_recurse</var></dt>
  28783. <dt><var class="var">ignore_transform</var></dt>
  28784. <dt><var class="var">monochrome</var></dt>
  28785. <dt><var class="var">linear_design</var></dt>
  28786. <dt><var class="var">no_autohint</var></dt>
  28787. </dl>
  28788. <p>Default value is &quot;default&quot;.
  28789. </p>
  28790. <p>For more information consult the documentation for the FT_LOAD_*
  28791. libfreetype flags.
  28792. </p>
  28793. </dd>
  28794. <dt><samp class="option">shadowcolor</samp></dt>
  28795. <dd><p>The color to be used for drawing a shadow behind the drawn text. For the
  28796. syntax of this option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the
  28797. ffmpeg-utils manual</a>.
  28798. </p>
  28799. <p>The default value of <var class="var">shadowcolor</var> is &quot;black&quot;.
  28800. </p>
  28801. </dd>
  28802. <dt><samp class="option">boxw</samp></dt>
  28803. <dd><p>Set the width of the box to be drawn around text.
  28804. The default value of <var class="var">boxw</var> is computed automatically to match the text width
  28805. </p>
  28806. </dd>
  28807. <dt><samp class="option">boxh</samp></dt>
  28808. <dd><p>Set the height of the box to be drawn around text.
  28809. The default value of <var class="var">boxh</var> is computed automatically to match the text height
  28810. </p>
  28811. </dd>
  28812. <dt><samp class="option">shadowx</samp></dt>
  28813. <dt><samp class="option">shadowy</samp></dt>
  28814. <dd><p>The x and y offsets for the text shadow position with respect to the
  28815. position of the text. They can be either positive or negative
  28816. values. The default value for both is &quot;0&quot;.
  28817. </p>
  28818. </dd>
  28819. <dt><samp class="option">start_number</samp></dt>
  28820. <dd><p>The starting frame number for the n/frame_num variable. The default value
  28821. is &quot;0&quot;.
  28822. </p>
  28823. </dd>
  28824. <dt><samp class="option">tabsize</samp></dt>
  28825. <dd><p>The size in number of spaces to use for rendering the tab.
  28826. Default value is 4.
  28827. </p>
  28828. </dd>
  28829. <dt><samp class="option">timecode</samp></dt>
  28830. <dd><p>Set the initial timecode representation in &quot;hh:mm:ss[:;.]ff&quot;
  28831. format. It can be used with or without text parameter. <var class="var">timecode_rate</var>
  28832. option must be specified.
  28833. </p>
  28834. </dd>
  28835. <dt><samp class="option">timecode_rate, rate, r</samp></dt>
  28836. <dd><p>Set the timecode frame rate (timecode only). Value will be rounded to nearest
  28837. integer. Minimum value is &quot;1&quot;.
  28838. Drop-frame timecode is supported for frame rates 30 &amp; 60.
  28839. </p>
  28840. </dd>
  28841. <dt><samp class="option">tc24hmax</samp></dt>
  28842. <dd><p>If set to 1, the output of the timecode option will wrap around at 24 hours.
  28843. Default is 0 (disabled).
  28844. </p>
  28845. </dd>
  28846. <dt><samp class="option">text</samp></dt>
  28847. <dd><p>The text string to be drawn. The text must be a sequence of UTF-8
  28848. encoded characters.
  28849. This parameter is mandatory if no file is specified with the parameter
  28850. <var class="var">textfile</var>.
  28851. </p>
  28852. </dd>
  28853. <dt><samp class="option">textfile</samp></dt>
  28854. <dd><p>A text file containing text to be drawn. The text must be a sequence
  28855. of UTF-8 encoded characters.
  28856. </p>
  28857. <p>This parameter is mandatory if no text string is specified with the
  28858. parameter <var class="var">text</var>.
  28859. </p>
  28860. <p>If both <var class="var">text</var> and <var class="var">textfile</var> are specified, an error is thrown.
  28861. </p>
  28862. </dd>
  28863. <dt><samp class="option">text_source</samp></dt>
  28864. <dd><p>Text source should be set as side_data_detection_bboxes if you want to use text data in
  28865. detection bboxes of side data.
  28866. </p>
  28867. <p>If text source is set, <var class="var">text</var> and <var class="var">textfile</var> will be ignored and still use
  28868. text data in detection bboxes of side data. So please do not use this parameter
  28869. if you are not sure about the text source.
  28870. </p>
  28871. </dd>
  28872. <dt><samp class="option">reload</samp></dt>
  28873. <dd><p>The <var class="var">textfile</var> will be reloaded at specified frame interval.
  28874. Be sure to update <var class="var">textfile</var> atomically, or it may be read partially,
  28875. or even fail.
  28876. Range is 0 to INT_MAX. Default is 0.
  28877. </p>
  28878. </dd>
  28879. <dt><samp class="option">x</samp></dt>
  28880. <dt><samp class="option">y</samp></dt>
  28881. <dd><p>The expressions which specify the offsets where text will be drawn
  28882. within the video frame. They are relative to the top/left border of the
  28883. output image.
  28884. </p>
  28885. <p>The default value of <var class="var">x</var> and <var class="var">y</var> is &quot;0&quot;.
  28886. </p>
  28887. <p>See below for the list of accepted constants and functions.
  28888. </p></dd>
  28889. </dl>
  28890. <p>The parameters for <var class="var">x</var> and <var class="var">y</var> are expressions containing the
  28891. following constants and functions:
  28892. </p>
  28893. <dl class="table">
  28894. <dt><samp class="option">dar</samp></dt>
  28895. <dd><p>input display aspect ratio, it is the same as (<var class="var">w</var> / <var class="var">h</var>) * <var class="var">sar</var>
  28896. </p>
  28897. </dd>
  28898. <dt><samp class="option">hsub</samp></dt>
  28899. <dt><samp class="option">vsub</samp></dt>
  28900. <dd><p>horizontal and vertical chroma subsample values. For example for the
  28901. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  28902. </p>
  28903. </dd>
  28904. <dt><samp class="option">line_h, lh</samp></dt>
  28905. <dd><p>the height of each text line
  28906. </p>
  28907. </dd>
  28908. <dt><samp class="option">main_h, h, H</samp></dt>
  28909. <dd><p>the input height
  28910. </p>
  28911. </dd>
  28912. <dt><samp class="option">main_w, w, W</samp></dt>
  28913. <dd><p>the input width
  28914. </p>
  28915. </dd>
  28916. <dt><samp class="option">max_glyph_a, ascent</samp></dt>
  28917. <dd><p>the maximum distance from the baseline to the highest/upper grid
  28918. coordinate used to place a glyph outline point, for all the rendered
  28919. glyphs.
  28920. It is a positive value, due to the grid&rsquo;s orientation with the Y axis
  28921. upwards.
  28922. </p>
  28923. </dd>
  28924. <dt><samp class="option">max_glyph_d, descent</samp></dt>
  28925. <dd><p>the maximum distance from the baseline to the lowest grid coordinate
  28926. used to place a glyph outline point, for all the rendered glyphs.
  28927. This is a negative value, due to the grid&rsquo;s orientation, with the Y axis
  28928. upwards.
  28929. </p>
  28930. </dd>
  28931. <dt><samp class="option">max_glyph_h</samp></dt>
  28932. <dd><p>maximum glyph height, that is the maximum height for all the glyphs
  28933. contained in the rendered text, it is equivalent to <var class="var">ascent</var> -
  28934. <var class="var">descent</var>.
  28935. </p>
  28936. </dd>
  28937. <dt><samp class="option">max_glyph_w</samp></dt>
  28938. <dd><p>maximum glyph width, that is the maximum width for all the glyphs
  28939. contained in the rendered text
  28940. </p>
  28941. </dd>
  28942. <dt><samp class="option">font_a</samp></dt>
  28943. <dd><p>the ascent size defined in the font metrics
  28944. </p>
  28945. </dd>
  28946. <dt><samp class="option">font_d</samp></dt>
  28947. <dd><p>the descent size defined in the font metrics
  28948. </p>
  28949. </dd>
  28950. <dt><samp class="option">top_a</samp></dt>
  28951. <dd><p>the maximum ascender of the glyphs of the first text line
  28952. </p>
  28953. </dd>
  28954. <dt><samp class="option">bottom_d</samp></dt>
  28955. <dd><p>the maximum descender of the glyphs of the last text line
  28956. </p>
  28957. </dd>
  28958. <dt><samp class="option">n</samp></dt>
  28959. <dd><p>the number of input frame, starting from 0
  28960. </p>
  28961. </dd>
  28962. <dt><samp class="option">rand(min, max)</samp></dt>
  28963. <dd><p>return a random number included between <var class="var">min</var> and <var class="var">max</var>
  28964. </p>
  28965. </dd>
  28966. <dt><samp class="option">sar</samp></dt>
  28967. <dd><p>The input sample aspect ratio.
  28968. </p>
  28969. </dd>
  28970. <dt><samp class="option">t</samp></dt>
  28971. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  28972. </p>
  28973. </dd>
  28974. <dt><samp class="option">text_h, th</samp></dt>
  28975. <dd><p>the height of the rendered text
  28976. </p>
  28977. </dd>
  28978. <dt><samp class="option">text_w, tw</samp></dt>
  28979. <dd><p>the width of the rendered text
  28980. </p>
  28981. </dd>
  28982. <dt><samp class="option">x</samp></dt>
  28983. <dt><samp class="option">y</samp></dt>
  28984. <dd><p>the x and y offset coordinates where the text is drawn.
  28985. </p>
  28986. <p>These parameters allow the <var class="var">x</var> and <var class="var">y</var> expressions to refer
  28987. to each other, so you can for example specify <code class="code">y=x/dar</code>.
  28988. </p>
  28989. </dd>
  28990. <dt><samp class="option">pict_type</samp></dt>
  28991. <dd><p>A one character description of the current frame&rsquo;s picture type.
  28992. </p>
  28993. </dd>
  28994. <dt><samp class="option">pkt_pos</samp></dt>
  28995. <dd><p>The current packet&rsquo;s position in the input file or stream
  28996. (in bytes, from the start of the input). A value of -1 indicates
  28997. this info is not available.
  28998. </p>
  28999. </dd>
  29000. <dt><samp class="option">duration</samp></dt>
  29001. <dd><p>The current packet&rsquo;s duration, in seconds.
  29002. </p>
  29003. </dd>
  29004. <dt><samp class="option">pkt_size</samp></dt>
  29005. <dd><p>The current packet&rsquo;s size (in bytes).
  29006. </p></dd>
  29007. </dl>
  29008. <a class="anchor" id="drawtext_005fexpansion"></a></div>
  29009. <div class="subsection-level-extent" id="Text-expansion">
  29010. <h4 class="subsection"><span>32.78.2 Text expansion<a class="copiable-link" href="#Text-expansion"> &para;</a></span></h4>
  29011. <p>If <samp class="option">expansion</samp> is set to <code class="code">strftime</code>, the filter recognizes
  29012. sequences accepted by the <code class="code">strftime</code> C function in the provided
  29013. text and expands them accordingly. Check the documentation of
  29014. <code class="code">strftime</code>. This feature is deprecated in favor of <code class="code">normal</code>
  29015. expansion with the <code class="code">gmtime</code> or <code class="code">localtime</code> expansion
  29016. functions.
  29017. </p>
  29018. <p>If <samp class="option">expansion</samp> is set to <code class="code">none</code>, the text is printed verbatim.
  29019. </p>
  29020. <p>If <samp class="option">expansion</samp> is set to <code class="code">normal</code> (which is the default),
  29021. the following expansion mechanism is used.
  29022. </p>
  29023. <p>The backslash character &lsquo;<samp class="samp">\</samp>&rsquo;, followed by any character, always expands to
  29024. the second character.
  29025. </p>
  29026. <p>Sequences of the form <code class="code">%{...}</code> are expanded. The text between the
  29027. braces is a function name, possibly followed by arguments separated by &rsquo;:&rsquo;.
  29028. If the arguments contain special characters or delimiters (&rsquo;:&rsquo; or &rsquo;}&rsquo;),
  29029. they should be escaped.
  29030. </p>
  29031. <p>Note that they probably must also be escaped as the value for the <samp class="option">text</samp>
  29032. option in the filter argument string and as the filter argument in the
  29033. filtergraph description, and possibly also for the shell, that makes up to four
  29034. levels of escaping; using a text file with the <samp class="option">textfile</samp> option avoids
  29035. these problems.
  29036. </p>
  29037. <p>The following functions are available:
  29038. </p>
  29039. <dl class="table">
  29040. <dt><code class="command">expr, e</code></dt>
  29041. <dd><p>The expression evaluation result.
  29042. </p>
  29043. <p>It must take one argument specifying the expression to be evaluated,
  29044. which accepts the same constants and functions as the <var class="var">x</var> and
  29045. <var class="var">y</var> values. Note that not all constants should be used, for
  29046. example the text size is not known when evaluating the expression, so
  29047. the constants <var class="var">text_w</var> and <var class="var">text_h</var> will have an undefined
  29048. value.
  29049. </p>
  29050. </dd>
  29051. <dt><code class="command">expr_int_format, eif</code></dt>
  29052. <dd><p>Evaluate the expression&rsquo;s value and output as formatted integer.
  29053. </p>
  29054. <p>The first argument is the expression to be evaluated, just as for the <var class="var">expr</var> function.
  29055. The second argument specifies the output format. Allowed values are &lsquo;<samp class="samp">x</samp>&rsquo;,
  29056. &lsquo;<samp class="samp">X</samp>&rsquo;, &lsquo;<samp class="samp">d</samp>&rsquo; and &lsquo;<samp class="samp">u</samp>&rsquo;. They are treated exactly as in the
  29057. <code class="code">printf</code> function.
  29058. The third parameter is optional and sets the number of positions taken by the output.
  29059. It can be used to add padding with zeros from the left.
  29060. </p>
  29061. </dd>
  29062. <dt><code class="command">gmtime</code></dt>
  29063. <dd><p>The time at which the filter is running, expressed in UTC.
  29064. It can accept an argument: a <code class="code">strftime</code> C function format string.
  29065. The format string is extended to support the variable <var class="var">%[1-6]N</var>
  29066. which prints fractions of the second with optionally specified number of digits.
  29067. </p>
  29068. </dd>
  29069. <dt><code class="command">localtime</code></dt>
  29070. <dd><p>The time at which the filter is running, expressed in the local time zone.
  29071. It can accept an argument: a <code class="code">strftime</code> C function format string.
  29072. The format string is extended to support the variable <var class="var">%[1-6]N</var>
  29073. which prints fractions of the second with optionally specified number of digits.
  29074. </p>
  29075. </dd>
  29076. <dt><code class="command">metadata</code></dt>
  29077. <dd><p>Frame metadata. Takes one or two arguments.
  29078. </p>
  29079. <p>The first argument is mandatory and specifies the metadata key.
  29080. </p>
  29081. <p>The second argument is optional and specifies a default value, used when the
  29082. metadata key is not found or empty.
  29083. </p>
  29084. <p>Available metadata can be identified by inspecting entries
  29085. starting with TAG included within each frame section
  29086. printed by running <code class="code">ffprobe -show_frames</code>.
  29087. </p>
  29088. <p>String metadata generated in filters leading to
  29089. the drawtext filter are also available.
  29090. </p>
  29091. </dd>
  29092. <dt><code class="command">n, frame_num</code></dt>
  29093. <dd><p>The frame number, starting from 0.
  29094. </p>
  29095. </dd>
  29096. <dt><code class="command">pict_type</code></dt>
  29097. <dd><p>A one character description of the current picture type.
  29098. </p>
  29099. </dd>
  29100. <dt><code class="command">pts</code></dt>
  29101. <dd><p>The timestamp of the current frame.
  29102. It can take up to three arguments.
  29103. </p>
  29104. <p>The first argument is the format of the timestamp; it defaults to <code class="code">flt</code>
  29105. for seconds as a decimal number with microsecond accuracy; <code class="code">hms</code> stands
  29106. for a formatted <var class="var">[-]HH:MM:SS.mmm</var> timestamp with millisecond accuracy.
  29107. <code class="code">gmtime</code> stands for the timestamp of the frame formatted as UTC time;
  29108. <code class="code">localtime</code> stands for the timestamp of the frame formatted as
  29109. local time zone time.
  29110. </p>
  29111. <p>The second argument is an offset added to the timestamp.
  29112. </p>
  29113. <p>If the format is set to <code class="code">hms</code>, a third argument <code class="code">24HH</code> may be
  29114. supplied to present the hour part of the formatted timestamp in 24h format
  29115. (00-23).
  29116. </p>
  29117. <p>If the format is set to <code class="code">localtime</code> or <code class="code">gmtime</code>, a third
  29118. argument may be supplied: a <code class="code">strftime</code> C function format string.
  29119. By default, <var class="var">YYYY-MM-DD HH:MM:SS</var> format will be used.
  29120. </p></dd>
  29121. </dl>
  29122. </div>
  29123. <div class="subsection-level-extent" id="Commands-88">
  29124. <h4 class="subsection"><span>32.78.3 Commands<a class="copiable-link" href="#Commands-88"> &para;</a></span></h4>
  29125. <p>This filter supports altering parameters via commands:
  29126. </p><dl class="table">
  29127. <dt><samp class="option">reinit</samp></dt>
  29128. <dd><p>Alter existing filter parameters.
  29129. </p>
  29130. <p>Syntax for the argument is the same as for filter invocation, e.g.
  29131. </p>
  29132. <div class="example">
  29133. <pre class="example-preformatted">fontsize=56:fontcolor=green:text='Hello World'
  29134. </pre></div>
  29135. <p>Full filter invocation with sendcmd would look like this:
  29136. </p>
  29137. <div class="example">
  29138. <pre class="example-preformatted">sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
  29139. </pre></div>
  29140. <p>If the entire argument can&rsquo;t be parsed or applied as valid values then the filter will
  29141. continue with its existing parameters.
  29142. </p>
  29143. </dd>
  29144. </dl>
  29145. <p>The following options are also supported as <a class="ref" href="#commands">commands</a>:
  29146. </p>
  29147. <ul class="itemize mark-bullet">
  29148. <li>x
  29149. </li><li>y
  29150. </li><li>alpha
  29151. </li><li>fontsize
  29152. </li><li>fontcolor
  29153. </li><li>boxcolor
  29154. </li><li>bordercolor
  29155. </li><li>shadowcolor
  29156. </li><li>box
  29157. </li><li>boxw
  29158. </li><li>boxh
  29159. </li><li>boxborderw
  29160. </li><li>line_spacing
  29161. </li><li>text_align
  29162. </li><li>shadowx
  29163. </li><li>shadowy
  29164. </li><li>borderw
  29165. </li></ul>
  29166. </div>
  29167. <div class="subsection-level-extent" id="Examples-87">
  29168. <h4 class="subsection"><span>32.78.4 Examples<a class="copiable-link" href="#Examples-87"> &para;</a></span></h4>
  29169. <ul class="itemize mark-bullet">
  29170. <li>Draw &quot;Test Text&quot; with font FreeSerif, using the default values for the
  29171. optional parameters.
  29172. <div class="example">
  29173. <pre class="example-preformatted">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'&quot;
  29174. </pre></div>
  29175. </li><li>Draw &rsquo;Test Text&rsquo; with font FreeSerif of size 24 at position x=100
  29176. and y=50 (counting from the top-left corner of the screen), text is
  29177. yellow with a red box around it. Both the text and the box have an
  29178. opacity of 20%.
  29179. <div class="example">
  29180. <pre class="example-preformatted">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
  29181. x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2&quot;
  29182. </pre></div>
  29183. <p>Note that the double quotes are not necessary if spaces are not used
  29184. within the parameter list.
  29185. </p>
  29186. </li><li>Show the text at the center of the video frame:
  29187. <div class="example">
  29188. <pre class="example-preformatted">drawtext=&quot;fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2&quot;
  29189. </pre></div>
  29190. </li><li>Show the text at a random position, switching to a new position every 30 seconds:
  29191. <div class="example">
  29192. <pre class="example-preformatted">drawtext=&quot;fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=if(eq(mod(t\,30)\,0)\,rand(0\,(w-text_w))\,x):y=if(eq(mod(t\,30)\,0)\,rand(0\,(h-text_h))\,y)&quot;
  29193. </pre></div>
  29194. </li><li>Show a text line sliding from right to left in the last row of the video
  29195. frame. The file <samp class="file">LONG_LINE</samp> is assumed to contain a single line
  29196. with no newlines.
  29197. <div class="example">
  29198. <pre class="example-preformatted">drawtext=&quot;fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t&quot;
  29199. </pre></div>
  29200. </li><li>Show the content of file <samp class="file">CREDITS</samp> off the bottom of the frame and scroll up.
  29201. <div class="example">
  29202. <pre class="example-preformatted">drawtext=&quot;fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h-20*t&quot;
  29203. </pre></div>
  29204. </li><li>Draw a single green letter &quot;g&quot;, at the center of the input video.
  29205. The glyph baseline is placed at half screen height.
  29206. <div class="example">
  29207. <pre class="example-preformatted">drawtext=&quot;fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent&quot;
  29208. </pre></div>
  29209. </li><li>Show text for 1 second every 3 seconds:
  29210. <div class="example">
  29211. <pre class="example-preformatted">drawtext=&quot;fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\,3)\,1):text='blink'&quot;
  29212. </pre></div>
  29213. </li><li>Use fontconfig to set the font. Note that the colons need to be escaped.
  29214. <div class="example">
  29215. <pre class="example-preformatted">drawtext='fontfile=Linux Libertine O-40\\:style=Semibold:text=FFmpeg'
  29216. </pre></div>
  29217. </li><li>Draw &quot;Test Text&quot; with font size dependent on height of the video.
  29218. <div class="example">
  29219. <pre class="example-preformatted">drawtext=&quot;text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)&quot;
  29220. </pre></div>
  29221. </li><li>Print the date of a real-time encoding (see documentation for the
  29222. <code class="code">strftime</code> C function):
  29223. <div class="example">
  29224. <pre class="example-preformatted">drawtext='fontfile=FreeSans.ttf:text=%{localtime\:%a %b %d %Y}'
  29225. </pre></div>
  29226. </li><li>Show text fading in and out (appearing/disappearing):
  29227. <div class="example">
  29228. <pre class="example-preformatted">#!/bin/sh
  29229. DS=1.0 # display start
  29230. DE=10.0 # display end
  29231. FID=1.5 # fade in duration
  29232. FOD=5 # fade out duration
  29233. ffplay -f lavfi &quot;color,drawtext=text=TEST:fontsize=50:fontfile=FreeSerif.ttf:fontcolor_expr=ff0000%{eif\\\\: clip(255*(1*between(t\\, $DS + $FID\\, $DE - $FOD) + ((t - $DS)/$FID)*between(t\\, $DS\\, $DS + $FID) + (-(t - $DE)/$FOD)*between(t\\, $DE - $FOD\\, $DE) )\\, 0\\, 255) \\\\: x\\\\: 2 }&quot;
  29234. </pre></div>
  29235. </li><li>Horizontally align multiple separate texts. Note that <samp class="option">max_glyph_a</samp>
  29236. and the <samp class="option">fontsize</samp> value are included in the <samp class="option">y</samp> offset.
  29237. <div class="example">
  29238. <pre class="example-preformatted">drawtext=fontfile=FreeSans.ttf:text=DOG:fontsize=24:x=10:y=20+24-max_glyph_a,
  29239. drawtext=fontfile=FreeSans.ttf:text=cow:fontsize=24:x=80:y=20+24-max_glyph_a
  29240. </pre></div>
  29241. </li><li>Plot special <var class="var">lavf.image2dec.source_basename</var> metadata onto each frame if
  29242. such metadata exists. Otherwise, plot the string &quot;NA&quot;. Note that image2 demuxer
  29243. must have option <samp class="option">-export_path_metadata 1</samp> for the special metadata fields
  29244. to be available for filters.
  29245. <div class="example">
  29246. <pre class="example-preformatted">drawtext=&quot;fontsize=20:fontcolor=white:fontfile=FreeSans.ttf:text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=10:y=10&quot;
  29247. </pre></div>
  29248. </li></ul>
  29249. <p>For more information about libfreetype, check:
  29250. <a class="url" href="http://www.freetype.org/">http://www.freetype.org/</a>.
  29251. </p>
  29252. <p>For more information about fontconfig, check:
  29253. <a class="url" href="http://freedesktop.org/software/fontconfig/fontconfig-user.html">http://freedesktop.org/software/fontconfig/fontconfig-user.html</a>.
  29254. </p>
  29255. <p>For more information about libfribidi, check:
  29256. <a class="url" href="http://fribidi.org/">http://fribidi.org/</a>.
  29257. </p>
  29258. <p>For more information about libharfbuzz, check:
  29259. <a class="url" href="https://github.com/harfbuzz/harfbuzz">https://github.com/harfbuzz/harfbuzz</a>.
  29260. </p>
  29261. </div>
  29262. </div>
  29263. <div class="section-level-extent" id="edgedetect">
  29264. <h3 class="section"><span>32.79 edgedetect<a class="copiable-link" href="#edgedetect"> &para;</a></span></h3>
  29265. <p>Detect and draw edges. The filter uses the Canny Edge Detection algorithm.
  29266. </p>
  29267. <p>The filter accepts the following options:
  29268. </p>
  29269. <dl class="table">
  29270. <dt><samp class="option">low</samp></dt>
  29271. <dt><samp class="option">high</samp></dt>
  29272. <dd><p>Set low and high threshold values used by the Canny thresholding
  29273. algorithm.
  29274. </p>
  29275. <p>The high threshold selects the &quot;strong&quot; edge pixels, which are then
  29276. connected through 8-connectivity with the &quot;weak&quot; edge pixels selected
  29277. by the low threshold.
  29278. </p>
  29279. <p><var class="var">low</var> and <var class="var">high</var> threshold values must be chosen in the range
  29280. [0,1], and <var class="var">low</var> should be lesser or equal to <var class="var">high</var>.
  29281. </p>
  29282. <p>Default value for <var class="var">low</var> is <code class="code">20/255</code>, and default value for <var class="var">high</var>
  29283. is <code class="code">50/255</code>.
  29284. </p>
  29285. </dd>
  29286. <dt><samp class="option">mode</samp></dt>
  29287. <dd><p>Define the drawing mode.
  29288. </p>
  29289. <dl class="table">
  29290. <dt>&lsquo;<samp class="samp">wires</samp>&rsquo;</dt>
  29291. <dd><p>Draw white/gray wires on black background.
  29292. </p>
  29293. </dd>
  29294. <dt>&lsquo;<samp class="samp">colormix</samp>&rsquo;</dt>
  29295. <dd><p>Mix the colors to create a paint/cartoon effect.
  29296. </p>
  29297. </dd>
  29298. <dt>&lsquo;<samp class="samp">canny</samp>&rsquo;</dt>
  29299. <dd><p>Apply Canny edge detector on all selected planes.
  29300. </p></dd>
  29301. </dl>
  29302. <p>Default value is <var class="var">wires</var>.
  29303. </p>
  29304. </dd>
  29305. <dt><samp class="option">planes</samp></dt>
  29306. <dd><p>Select planes for filtering. By default all available planes are filtered.
  29307. </p></dd>
  29308. </dl>
  29309. <ul class="mini-toc">
  29310. <li><a href="#Examples-88" accesskey="1">Examples</a></li>
  29311. </ul>
  29312. <div class="subsection-level-extent" id="Examples-88">
  29313. <h4 class="subsection"><span>32.79.1 Examples<a class="copiable-link" href="#Examples-88"> &para;</a></span></h4>
  29314. <ul class="itemize mark-bullet">
  29315. <li>Standard edge detection with custom values for the hysteresis thresholding:
  29316. <div class="example">
  29317. <pre class="example-preformatted">edgedetect=low=0.1:high=0.4
  29318. </pre></div>
  29319. </li><li>Painting effect without thresholding:
  29320. <div class="example">
  29321. <pre class="example-preformatted">edgedetect=mode=colormix:high=0
  29322. </pre></div>
  29323. </li></ul>
  29324. </div>
  29325. </div>
  29326. <div class="section-level-extent" id="elbg">
  29327. <h3 class="section"><span>32.80 elbg<a class="copiable-link" href="#elbg"> &para;</a></span></h3>
  29328. <p>Apply a posterize effect using the ELBG (Enhanced LBG) algorithm.
  29329. </p>
  29330. <p>For each input image, the filter will compute the optimal mapping from
  29331. the input to the output given the codebook length, that is the number
  29332. of distinct output colors.
  29333. </p>
  29334. <p>This filter accepts the following options.
  29335. </p>
  29336. <dl class="table">
  29337. <dt><samp class="option">codebook_length, l</samp></dt>
  29338. <dd><p>Set codebook length. The value must be a positive integer, and
  29339. represents the number of distinct output colors. Default value is 256.
  29340. </p>
  29341. </dd>
  29342. <dt><samp class="option">nb_steps, n</samp></dt>
  29343. <dd><p>Set the maximum number of iterations to apply for computing the optimal
  29344. mapping. The higher the value the better the result and the higher the
  29345. computation time. Default value is 1.
  29346. </p>
  29347. </dd>
  29348. <dt><samp class="option">seed, s</samp></dt>
  29349. <dd><p>Set a random seed, must be an integer included between 0 and
  29350. UINT32_MAX. If not specified, or if explicitly set to -1, the filter
  29351. will try to use a good random seed on a best effort basis.
  29352. </p>
  29353. </dd>
  29354. <dt><samp class="option">pal8</samp></dt>
  29355. <dd><p>Set pal8 output pixel format. This option does not work with codebook
  29356. length greater than 256. Default is disabled.
  29357. </p>
  29358. </dd>
  29359. <dt><samp class="option">use_alpha</samp></dt>
  29360. <dd><p>Include alpha values in the quantization calculation. Allows creating
  29361. palettized output images (e.g. PNG8) with multiple alpha smooth blending.
  29362. </p></dd>
  29363. </dl>
  29364. </div>
  29365. <div class="section-level-extent" id="entropy">
  29366. <h3 class="section"><span>32.81 entropy<a class="copiable-link" href="#entropy"> &para;</a></span></h3>
  29367. <p>Measure graylevel entropy in histogram of color channels of video frames.
  29368. </p>
  29369. <p>It accepts the following parameters:
  29370. </p>
  29371. <dl class="table">
  29372. <dt><samp class="option">mode</samp></dt>
  29373. <dd><p>Can be either <var class="var">normal</var> or <var class="var">diff</var>. Default is <var class="var">normal</var>.
  29374. </p>
  29375. <p><var class="var">diff</var> mode measures entropy of histogram delta values, absolute differences
  29376. between neighbour histogram values.
  29377. </p></dd>
  29378. </dl>
  29379. </div>
  29380. <div class="section-level-extent" id="epx">
  29381. <h3 class="section"><span>32.82 epx<a class="copiable-link" href="#epx"> &para;</a></span></h3>
  29382. <p>Apply the EPX magnification filter which is designed for pixel art.
  29383. </p>
  29384. <p>It accepts the following option:
  29385. </p>
  29386. <dl class="table">
  29387. <dt><samp class="option">n</samp></dt>
  29388. <dd><p>Set the scaling dimension: <code class="code">2</code> for <code class="code">2xEPX</code>, <code class="code">3</code> for
  29389. <code class="code">3xEPX</code>.
  29390. Default is <code class="code">3</code>.
  29391. </p></dd>
  29392. </dl>
  29393. </div>
  29394. <div class="section-level-extent" id="eq">
  29395. <h3 class="section"><span>32.83 eq<a class="copiable-link" href="#eq"> &para;</a></span></h3>
  29396. <p>Set brightness, contrast, saturation and approximate gamma adjustment.
  29397. </p>
  29398. <p>The filter accepts the following options:
  29399. </p>
  29400. <dl class="table">
  29401. <dt><samp class="option">contrast</samp></dt>
  29402. <dd><p>Set the contrast expression. The value must be a float value in range
  29403. <code class="code">-1000.0</code> to <code class="code">1000.0</code>. The default value is &quot;1&quot;.
  29404. </p>
  29405. </dd>
  29406. <dt><samp class="option">brightness</samp></dt>
  29407. <dd><p>Set the brightness expression. The value must be a float value in
  29408. range <code class="code">-1.0</code> to <code class="code">1.0</code>. The default value is &quot;0&quot;.
  29409. </p>
  29410. </dd>
  29411. <dt><samp class="option">saturation</samp></dt>
  29412. <dd><p>Set the saturation expression. The value must be a float in
  29413. range <code class="code">0.0</code> to <code class="code">3.0</code>. The default value is &quot;1&quot;.
  29414. </p>
  29415. </dd>
  29416. <dt><samp class="option">gamma</samp></dt>
  29417. <dd><p>Set the gamma expression. The value must be a float in range
  29418. <code class="code">0.1</code> to <code class="code">10.0</code>. The default value is &quot;1&quot;.
  29419. </p>
  29420. </dd>
  29421. <dt><samp class="option">gamma_r</samp></dt>
  29422. <dd><p>Set the gamma expression for red. The value must be a float in
  29423. range <code class="code">0.1</code> to <code class="code">10.0</code>. The default value is &quot;1&quot;.
  29424. </p>
  29425. </dd>
  29426. <dt><samp class="option">gamma_g</samp></dt>
  29427. <dd><p>Set the gamma expression for green. The value must be a float in range
  29428. <code class="code">0.1</code> to <code class="code">10.0</code>. The default value is &quot;1&quot;.
  29429. </p>
  29430. </dd>
  29431. <dt><samp class="option">gamma_b</samp></dt>
  29432. <dd><p>Set the gamma expression for blue. The value must be a float in range
  29433. <code class="code">0.1</code> to <code class="code">10.0</code>. The default value is &quot;1&quot;.
  29434. </p>
  29435. </dd>
  29436. <dt><samp class="option">gamma_weight</samp></dt>
  29437. <dd><p>Set the gamma weight expression. It can be used to reduce the effect
  29438. of a high gamma value on bright image areas, e.g. keep them from
  29439. getting overamplified and just plain white. The value must be a float
  29440. in range <code class="code">0.0</code> to <code class="code">1.0</code>. A value of <code class="code">0.0</code> turns the
  29441. gamma correction all the way down while <code class="code">1.0</code> leaves it at its
  29442. full strength. Default is &quot;1&quot;.
  29443. </p>
  29444. </dd>
  29445. <dt><samp class="option">eval</samp></dt>
  29446. <dd><p>Set when the expressions for brightness, contrast, saturation and
  29447. gamma expressions are evaluated.
  29448. </p>
  29449. <p>It accepts the following values:
  29450. </p><dl class="table">
  29451. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  29452. <dd><p>only evaluate expressions once during the filter initialization or
  29453. when a command is processed
  29454. </p>
  29455. </dd>
  29456. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  29457. <dd><p>evaluate expressions for each incoming frame
  29458. </p></dd>
  29459. </dl>
  29460. <p>Default value is &lsquo;<samp class="samp">init</samp>&rsquo;.
  29461. </p></dd>
  29462. </dl>
  29463. <p>The expressions accept the following parameters:
  29464. </p><dl class="table">
  29465. <dt><samp class="option">n</samp></dt>
  29466. <dd><p>frame count of the input frame starting from 0
  29467. </p>
  29468. </dd>
  29469. <dt><samp class="option">pos</samp></dt>
  29470. <dd><p>byte position of the corresponding packet in the input file, NAN if
  29471. unspecified; deprecated, do not use
  29472. </p>
  29473. </dd>
  29474. <dt><samp class="option">r</samp></dt>
  29475. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  29476. </p>
  29477. </dd>
  29478. <dt><samp class="option">t</samp></dt>
  29479. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  29480. </p></dd>
  29481. </dl>
  29482. <ul class="mini-toc">
  29483. <li><a href="#Commands-89" accesskey="1">Commands</a></li>
  29484. </ul>
  29485. <div class="subsection-level-extent" id="Commands-89">
  29486. <h4 class="subsection"><span>32.83.1 Commands<a class="copiable-link" href="#Commands-89"> &para;</a></span></h4>
  29487. <p>The filter supports the following commands:
  29488. </p>
  29489. <dl class="table">
  29490. <dt><samp class="option">contrast</samp></dt>
  29491. <dd><p>Set the contrast expression.
  29492. </p>
  29493. </dd>
  29494. <dt><samp class="option">brightness</samp></dt>
  29495. <dd><p>Set the brightness expression.
  29496. </p>
  29497. </dd>
  29498. <dt><samp class="option">saturation</samp></dt>
  29499. <dd><p>Set the saturation expression.
  29500. </p>
  29501. </dd>
  29502. <dt><samp class="option">gamma</samp></dt>
  29503. <dd><p>Set the gamma expression.
  29504. </p>
  29505. </dd>
  29506. <dt><samp class="option">gamma_r</samp></dt>
  29507. <dd><p>Set the gamma_r expression.
  29508. </p>
  29509. </dd>
  29510. <dt><samp class="option">gamma_g</samp></dt>
  29511. <dd><p>Set gamma_g expression.
  29512. </p>
  29513. </dd>
  29514. <dt><samp class="option">gamma_b</samp></dt>
  29515. <dd><p>Set gamma_b expression.
  29516. </p>
  29517. </dd>
  29518. <dt><samp class="option">gamma_weight</samp></dt>
  29519. <dd><p>Set gamma_weight expression.
  29520. </p>
  29521. <p>The command accepts the same syntax of the corresponding option.
  29522. </p>
  29523. <p>If the specified expression is not valid, it is kept at its current
  29524. value.
  29525. </p>
  29526. </dd>
  29527. </dl>
  29528. <a class="anchor" id="erosion"></a></div>
  29529. </div>
  29530. <div class="section-level-extent" id="erosion-1">
  29531. <h3 class="section"><span>32.84 erosion<a class="copiable-link" href="#erosion-1"> &para;</a></span></h3>
  29532. <p>Apply erosion effect to the video.
  29533. </p>
  29534. <p>This filter replaces the pixel by the local(3x3) minimum.
  29535. </p>
  29536. <p>It accepts the following options:
  29537. </p>
  29538. <dl class="table">
  29539. <dt><samp class="option">threshold0</samp></dt>
  29540. <dt><samp class="option">threshold1</samp></dt>
  29541. <dt><samp class="option">threshold2</samp></dt>
  29542. <dt><samp class="option">threshold3</samp></dt>
  29543. <dd><p>Limit the maximum change for each plane, default is 65535.
  29544. If 0, plane will remain unchanged.
  29545. </p>
  29546. </dd>
  29547. <dt><samp class="option">coordinates</samp></dt>
  29548. <dd><p>Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
  29549. pixels are used.
  29550. </p>
  29551. <p>Flags to local 3x3 coordinates maps like this:
  29552. </p>
  29553. <p>1 2 3
  29554. 4 5
  29555. 6 7 8
  29556. </p></dd>
  29557. </dl>
  29558. <ul class="mini-toc">
  29559. <li><a href="#Commands-90" accesskey="1">Commands</a></li>
  29560. </ul>
  29561. <div class="subsection-level-extent" id="Commands-90">
  29562. <h4 class="subsection"><span>32.84.1 Commands<a class="copiable-link" href="#Commands-90"> &para;</a></span></h4>
  29563. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  29564. </p>
  29565. </div>
  29566. </div>
  29567. <div class="section-level-extent" id="estdif">
  29568. <h3 class="section"><span>32.85 estdif<a class="copiable-link" href="#estdif"> &para;</a></span></h3>
  29569. <p>Deinterlace the input video (&quot;estdif&quot; stands for &quot;Edge Slope
  29570. Tracing Deinterlacing Filter&quot;).
  29571. </p>
  29572. <p>Spatial only filter that uses edge slope tracing algorithm
  29573. to interpolate missing lines.
  29574. It accepts the following parameters:
  29575. </p>
  29576. <dl class="table">
  29577. <dt><samp class="option">mode</samp></dt>
  29578. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  29579. </p>
  29580. <dl class="table">
  29581. <dt><samp class="option">frame</samp></dt>
  29582. <dd><p>Output one frame for each frame.
  29583. </p></dd>
  29584. <dt><samp class="option">field</samp></dt>
  29585. <dd><p>Output one frame for each field.
  29586. </p></dd>
  29587. </dl>
  29588. <p>The default value is <code class="code">field</code>.
  29589. </p>
  29590. </dd>
  29591. <dt><samp class="option">parity</samp></dt>
  29592. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  29593. of the following values:
  29594. </p>
  29595. <dl class="table">
  29596. <dt><samp class="option">tff</samp></dt>
  29597. <dd><p>Assume the top field is first.
  29598. </p></dd>
  29599. <dt><samp class="option">bff</samp></dt>
  29600. <dd><p>Assume the bottom field is first.
  29601. </p></dd>
  29602. <dt><samp class="option">auto</samp></dt>
  29603. <dd><p>Enable automatic detection of field parity.
  29604. </p></dd>
  29605. </dl>
  29606. <p>The default value is <code class="code">auto</code>.
  29607. If the interlacing is unknown or the decoder does not export this information,
  29608. top field first will be assumed.
  29609. </p>
  29610. </dd>
  29611. <dt><samp class="option">deint</samp></dt>
  29612. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  29613. values:
  29614. </p>
  29615. <dl class="table">
  29616. <dt><samp class="option">all</samp></dt>
  29617. <dd><p>Deinterlace all frames.
  29618. </p></dd>
  29619. <dt><samp class="option">interlaced</samp></dt>
  29620. <dd><p>Only deinterlace frames marked as interlaced.
  29621. </p></dd>
  29622. </dl>
  29623. <p>The default value is <code class="code">all</code>.
  29624. </p>
  29625. </dd>
  29626. <dt><samp class="option">rslope</samp></dt>
  29627. <dd><p>Specify the search radius for edge slope tracing. Default value is 1.
  29628. Allowed range is from 1 to 15.
  29629. </p>
  29630. </dd>
  29631. <dt><samp class="option">redge</samp></dt>
  29632. <dd><p>Specify the search radius for best edge matching. Default value is 2.
  29633. Allowed range is from 0 to 15.
  29634. </p>
  29635. </dd>
  29636. <dt><samp class="option">ecost</samp></dt>
  29637. <dd><p>Specify the edge cost for edge matching. Default value is 2.
  29638. Allowed range is from 0 to 50.
  29639. </p>
  29640. </dd>
  29641. <dt><samp class="option">mcost</samp></dt>
  29642. <dd><p>Specify the middle cost for edge matching. Default value is 1.
  29643. Allowed range is from 0 to 50.
  29644. </p>
  29645. </dd>
  29646. <dt><samp class="option">dcost</samp></dt>
  29647. <dd><p>Specify the distance cost for edge matching. Default value is 1.
  29648. Allowed range is from 0 to 50.
  29649. </p>
  29650. </dd>
  29651. <dt><samp class="option">interp</samp></dt>
  29652. <dd><p>Specify the interpolation used. Default is 4-point interpolation. It accepts one
  29653. of the following values:
  29654. </p>
  29655. <dl class="table">
  29656. <dt><samp class="option">2p</samp></dt>
  29657. <dd><p>Two-point interpolation.
  29658. </p></dd>
  29659. <dt><samp class="option">4p</samp></dt>
  29660. <dd><p>Four-point interpolation.
  29661. </p></dd>
  29662. <dt><samp class="option">6p</samp></dt>
  29663. <dd><p>Six-point interpolation.
  29664. </p></dd>
  29665. </dl>
  29666. </dd>
  29667. </dl>
  29668. <ul class="mini-toc">
  29669. <li><a href="#Commands-91" accesskey="1">Commands</a></li>
  29670. </ul>
  29671. <div class="subsection-level-extent" id="Commands-91">
  29672. <h4 class="subsection"><span>32.85.1 Commands<a class="copiable-link" href="#Commands-91"> &para;</a></span></h4>
  29673. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  29674. </p>
  29675. </div>
  29676. </div>
  29677. <div class="section-level-extent" id="exposure">
  29678. <h3 class="section"><span>32.86 exposure<a class="copiable-link" href="#exposure"> &para;</a></span></h3>
  29679. <p>Adjust exposure of the video stream.
  29680. </p>
  29681. <p>The filter accepts the following options:
  29682. </p>
  29683. <dl class="table">
  29684. <dt><samp class="option">exposure</samp></dt>
  29685. <dd><p>Set the exposure correction in EV. Allowed range is from -3.0 to 3.0 EV
  29686. Default value is 0 EV.
  29687. </p>
  29688. </dd>
  29689. <dt><samp class="option">black</samp></dt>
  29690. <dd><p>Set the black level correction. Allowed range is from -1.0 to 1.0.
  29691. Default value is 0.
  29692. </p></dd>
  29693. </dl>
  29694. <ul class="mini-toc">
  29695. <li><a href="#Commands-92" accesskey="1">Commands</a></li>
  29696. </ul>
  29697. <div class="subsection-level-extent" id="Commands-92">
  29698. <h4 class="subsection"><span>32.86.1 Commands<a class="copiable-link" href="#Commands-92"> &para;</a></span></h4>
  29699. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  29700. </p>
  29701. </div>
  29702. </div>
  29703. <div class="section-level-extent" id="extractplanes">
  29704. <h3 class="section"><span>32.87 extractplanes<a class="copiable-link" href="#extractplanes"> &para;</a></span></h3>
  29705. <p>Extract color channel components from input video stream into
  29706. separate grayscale video streams.
  29707. </p>
  29708. <p>The filter accepts the following option:
  29709. </p>
  29710. <dl class="table">
  29711. <dt><samp class="option">planes</samp></dt>
  29712. <dd><p>Set plane(s) to extract.
  29713. </p>
  29714. <p>Available values for planes are:
  29715. </p><dl class="table">
  29716. <dt>&lsquo;<samp class="samp">y</samp>&rsquo;</dt>
  29717. <dt>&lsquo;<samp class="samp">u</samp>&rsquo;</dt>
  29718. <dt>&lsquo;<samp class="samp">v</samp>&rsquo;</dt>
  29719. <dt>&lsquo;<samp class="samp">a</samp>&rsquo;</dt>
  29720. <dt>&lsquo;<samp class="samp">r</samp>&rsquo;</dt>
  29721. <dt>&lsquo;<samp class="samp">g</samp>&rsquo;</dt>
  29722. <dt>&lsquo;<samp class="samp">b</samp>&rsquo;</dt>
  29723. </dl>
  29724. <p>Choosing planes not available in the input will result in an error.
  29725. That means you cannot select <code class="code">r</code>, <code class="code">g</code>, <code class="code">b</code> planes
  29726. with <code class="code">y</code>, <code class="code">u</code>, <code class="code">v</code> planes at same time.
  29727. </p></dd>
  29728. </dl>
  29729. <ul class="mini-toc">
  29730. <li><a href="#Examples-89" accesskey="1">Examples</a></li>
  29731. </ul>
  29732. <div class="subsection-level-extent" id="Examples-89">
  29733. <h4 class="subsection"><span>32.87.1 Examples<a class="copiable-link" href="#Examples-89"> &para;</a></span></h4>
  29734. <ul class="itemize mark-bullet">
  29735. <li>Extract luma, u and v color channel component from input video frame
  29736. into 3 grayscale outputs:
  29737. <div class="example">
  29738. <pre class="example-preformatted">ffmpeg -i video.avi -filter_complex 'extractplanes=y+u+v[y][u][v]' -map '[y]' y.avi -map '[u]' u.avi -map '[v]' v.avi
  29739. </pre></div>
  29740. </li></ul>
  29741. </div>
  29742. </div>
  29743. <div class="section-level-extent" id="fade">
  29744. <h3 class="section"><span>32.88 fade<a class="copiable-link" href="#fade"> &para;</a></span></h3>
  29745. <p>Apply a fade-in/out effect to the input video.
  29746. </p>
  29747. <p>It accepts the following parameters:
  29748. </p>
  29749. <dl class="table">
  29750. <dt><samp class="option">type, t</samp></dt>
  29751. <dd><p>The effect type can be either &quot;in&quot; for a fade-in, or &quot;out&quot; for a fade-out
  29752. effect.
  29753. Default is <code class="code">in</code>.
  29754. </p>
  29755. </dd>
  29756. <dt><samp class="option">start_frame, s</samp></dt>
  29757. <dd><p>Specify the number of the frame to start applying the fade
  29758. effect at. Default is 0.
  29759. </p>
  29760. </dd>
  29761. <dt><samp class="option">nb_frames, n</samp></dt>
  29762. <dd><p>The number of frames that the fade effect lasts. At the end of the
  29763. fade-in effect, the output video will have the same intensity as the input video.
  29764. At the end of the fade-out transition, the output video will be filled with the
  29765. selected <samp class="option">color</samp>.
  29766. Default is 25.
  29767. </p>
  29768. </dd>
  29769. <dt><samp class="option">alpha</samp></dt>
  29770. <dd><p>If set to 1, fade only alpha channel, if one exists on the input.
  29771. Default value is 0.
  29772. </p>
  29773. </dd>
  29774. <dt><samp class="option">start_time, st</samp></dt>
  29775. <dd><p>Specify the timestamp (in seconds) of the frame to start to apply the fade
  29776. effect. If both start_frame and start_time are specified, the fade will start at
  29777. whichever comes last. Default is 0.
  29778. </p>
  29779. </dd>
  29780. <dt><samp class="option">duration, d</samp></dt>
  29781. <dd><p>The number of seconds for which the fade effect has to last. At the end of the
  29782. fade-in effect the output video will have the same intensity as the input video,
  29783. at the end of the fade-out transition the output video will be filled with the
  29784. selected <samp class="option">color</samp>.
  29785. If both duration and nb_frames are specified, duration is used. Default is 0
  29786. (nb_frames is used by default).
  29787. </p>
  29788. </dd>
  29789. <dt><samp class="option">color, c</samp></dt>
  29790. <dd><p>Specify the color of the fade. Default is &quot;black&quot;.
  29791. </p></dd>
  29792. </dl>
  29793. <ul class="mini-toc">
  29794. <li><a href="#Examples-90" accesskey="1">Examples</a></li>
  29795. </ul>
  29796. <div class="subsection-level-extent" id="Examples-90">
  29797. <h4 class="subsection"><span>32.88.1 Examples<a class="copiable-link" href="#Examples-90"> &para;</a></span></h4>
  29798. <ul class="itemize mark-bullet">
  29799. <li>Fade in the first 30 frames of video:
  29800. <div class="example">
  29801. <pre class="example-preformatted">fade=in:0:30
  29802. </pre></div>
  29803. <p>The command above is equivalent to:
  29804. </p><div class="example">
  29805. <pre class="example-preformatted">fade=t=in:s=0:n=30
  29806. </pre></div>
  29807. </li><li>Fade out the last 45 frames of a 200-frame video:
  29808. <div class="example">
  29809. <pre class="example-preformatted">fade=out:155:45
  29810. fade=type=out:start_frame=155:nb_frames=45
  29811. </pre></div>
  29812. </li><li>Fade in the first 25 frames and fade out the last 25 frames of a 1000-frame video:
  29813. <div class="example">
  29814. <pre class="example-preformatted">fade=in:0:25, fade=out:975:25
  29815. </pre></div>
  29816. </li><li>Make the first 5 frames yellow, then fade in from frame 5-24:
  29817. <div class="example">
  29818. <pre class="example-preformatted">fade=in:5:20:color=yellow
  29819. </pre></div>
  29820. </li><li>Fade in alpha over first 25 frames of video:
  29821. <div class="example">
  29822. <pre class="example-preformatted">fade=in:0:25:alpha=1
  29823. </pre></div>
  29824. </li><li>Make the first 5.5 seconds black, then fade in for 0.5 seconds:
  29825. <div class="example">
  29826. <pre class="example-preformatted">fade=t=in:st=5.5:d=0.5
  29827. </pre></div>
  29828. </li></ul>
  29829. </div>
  29830. </div>
  29831. <div class="section-level-extent" id="feedback">
  29832. <h3 class="section"><span>32.89 feedback<a class="copiable-link" href="#feedback"> &para;</a></span></h3>
  29833. <p>Apply feedback video filter.
  29834. </p>
  29835. <p>This filter pass cropped input frames to 2nd output.
  29836. From there it can be filtered with other video filters.
  29837. After filter receives frame from 2nd input, that frame
  29838. is combined on top of original frame from 1st input and passed
  29839. to 1st output.
  29840. </p>
  29841. <p>The typical usage is filter only part of frame.
  29842. </p>
  29843. <p>The filter accepts the following options:
  29844. </p><dl class="table">
  29845. <dt><samp class="option">x</samp></dt>
  29846. <dt><samp class="option">y</samp></dt>
  29847. <dd><p>Set the top left crop position.
  29848. </p>
  29849. </dd>
  29850. <dt><samp class="option">w</samp></dt>
  29851. <dt><samp class="option">h</samp></dt>
  29852. <dd><p>Set the crop size.
  29853. </p></dd>
  29854. </dl>
  29855. <ul class="mini-toc">
  29856. <li><a href="#Examples-91" accesskey="1">Examples</a></li>
  29857. </ul>
  29858. <div class="subsection-level-extent" id="Examples-91">
  29859. <h4 class="subsection"><span>32.89.1 Examples<a class="copiable-link" href="#Examples-91"> &para;</a></span></h4>
  29860. <ul class="itemize mark-bullet">
  29861. <li>Blur only top left rectangular part of video frame size 100x100 with gblur filter.
  29862. <div class="example">
  29863. <pre class="example-preformatted">[in][blurin]feedback=x=0:y=0:w=100:h=100[out][blurout];[blurout]gblur=8[blurin]
  29864. </pre></div>
  29865. </li><li>Draw black box on top left part of video frame of size 100x100 with drawbox filter.
  29866. <div class="example">
  29867. <pre class="example-preformatted">[in][blurin]feedback=x=0:y=0:w=100:h=100[out][blurout];[blurout]drawbox=x=0:y=0:w=100:h=100:t=100[blurin]
  29868. </pre></div>
  29869. </li><li>Pixelize rectangular part of video frame of size 100x100 with pixelize filter.
  29870. <div class="example">
  29871. <pre class="example-preformatted">[in][blurin]feedback=x=320:y=240:w=100:h=100[out][blurout];[blurout]pixelize[blurin]
  29872. </pre></div>
  29873. </li></ul>
  29874. </div>
  29875. </div>
  29876. <div class="section-level-extent" id="fftdnoiz">
  29877. <h3 class="section"><span>32.90 fftdnoiz<a class="copiable-link" href="#fftdnoiz"> &para;</a></span></h3>
  29878. <p>Denoise frames using 3D FFT (frequency domain filtering).
  29879. </p>
  29880. <p>The filter accepts the following options:
  29881. </p>
  29882. <dl class="table">
  29883. <dt><samp class="option">sigma</samp></dt>
  29884. <dd><p>Set the noise sigma constant. This sets denoising strength.
  29885. Default value is 1. Allowed range is from 0 to 30.
  29886. Using very high sigma with low overlap may give blocking artifacts.
  29887. </p>
  29888. </dd>
  29889. <dt><samp class="option">amount</samp></dt>
  29890. <dd><p>Set amount of denoising. By default all detected noise is reduced.
  29891. Default value is 1. Allowed range is from 0 to 1.
  29892. </p>
  29893. </dd>
  29894. <dt><samp class="option">block</samp></dt>
  29895. <dd><p>Set size of block in pixels, Default is 32, can be 8 to 256.
  29896. </p>
  29897. </dd>
  29898. <dt><samp class="option">overlap</samp></dt>
  29899. <dd><p>Set block overlap. Default is 0.5. Allowed range is from 0.2 to 0.8.
  29900. </p>
  29901. </dd>
  29902. <dt><samp class="option">method</samp></dt>
  29903. <dd><p>Set denoising method. Default is <code class="code">wiener</code>, can also be <code class="code">hard</code>.
  29904. </p>
  29905. </dd>
  29906. <dt><samp class="option">prev</samp></dt>
  29907. <dd><p>Set number of previous frames to use for denoising. By default is set to 0.
  29908. </p>
  29909. </dd>
  29910. <dt><samp class="option">next</samp></dt>
  29911. <dd><p>Set number of next frames to to use for denoising. By default is set to 0.
  29912. </p>
  29913. </dd>
  29914. <dt><samp class="option">planes</samp></dt>
  29915. <dd><p>Set planes which will be filtered, by default are all available filtered
  29916. except alpha.
  29917. </p></dd>
  29918. </dl>
  29919. </div>
  29920. <div class="section-level-extent" id="fftfilt">
  29921. <h3 class="section"><span>32.91 fftfilt<a class="copiable-link" href="#fftfilt"> &para;</a></span></h3>
  29922. <p>Apply arbitrary expressions to samples in frequency domain
  29923. </p>
  29924. <dl class="table">
  29925. <dt><samp class="option">dc_Y</samp></dt>
  29926. <dd><p>Adjust the dc value (gain) of the luma plane of the image. The filter
  29927. accepts an integer value in range <code class="code">0</code> to <code class="code">1000</code>. The default
  29928. value is set to <code class="code">0</code>.
  29929. </p>
  29930. </dd>
  29931. <dt><samp class="option">dc_U</samp></dt>
  29932. <dd><p>Adjust the dc value (gain) of the 1st chroma plane of the image. The
  29933. filter accepts an integer value in range <code class="code">0</code> to <code class="code">1000</code>. The
  29934. default value is set to <code class="code">0</code>.
  29935. </p>
  29936. </dd>
  29937. <dt><samp class="option">dc_V</samp></dt>
  29938. <dd><p>Adjust the dc value (gain) of the 2nd chroma plane of the image. The
  29939. filter accepts an integer value in range <code class="code">0</code> to <code class="code">1000</code>. The
  29940. default value is set to <code class="code">0</code>.
  29941. </p>
  29942. </dd>
  29943. <dt><samp class="option">weight_Y</samp></dt>
  29944. <dd><p>Set the frequency domain weight expression for the luma plane.
  29945. </p>
  29946. </dd>
  29947. <dt><samp class="option">weight_U</samp></dt>
  29948. <dd><p>Set the frequency domain weight expression for the 1st chroma plane.
  29949. </p>
  29950. </dd>
  29951. <dt><samp class="option">weight_V</samp></dt>
  29952. <dd><p>Set the frequency domain weight expression for the 2nd chroma plane.
  29953. </p>
  29954. </dd>
  29955. <dt><samp class="option">eval</samp></dt>
  29956. <dd><p>Set when the expressions are evaluated.
  29957. </p>
  29958. <p>It accepts the following values:
  29959. </p><dl class="table">
  29960. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  29961. <dd><p>Only evaluate expressions once during the filter initialization.
  29962. </p>
  29963. </dd>
  29964. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  29965. <dd><p>Evaluate expressions for each incoming frame.
  29966. </p></dd>
  29967. </dl>
  29968. <p>Default value is &lsquo;<samp class="samp">init</samp>&rsquo;.
  29969. </p>
  29970. <p>The filter accepts the following variables:
  29971. </p></dd>
  29972. <dt><samp class="option">X</samp></dt>
  29973. <dt><samp class="option">Y</samp></dt>
  29974. <dd><p>The coordinates of the current sample.
  29975. </p>
  29976. </dd>
  29977. <dt><samp class="option">W</samp></dt>
  29978. <dt><samp class="option">H</samp></dt>
  29979. <dd><p>The width and height of the image.
  29980. </p>
  29981. </dd>
  29982. <dt><samp class="option">N</samp></dt>
  29983. <dd><p>The number of input frame, starting from 0.
  29984. </p>
  29985. </dd>
  29986. <dt><samp class="option">WS</samp></dt>
  29987. <dt><samp class="option">HS</samp></dt>
  29988. <dd><p>The size of FFT array for horizontal and vertical processing.
  29989. </p></dd>
  29990. </dl>
  29991. <ul class="mini-toc">
  29992. <li><a href="#Examples-92" accesskey="1">Examples</a></li>
  29993. </ul>
  29994. <div class="subsection-level-extent" id="Examples-92">
  29995. <h4 class="subsection"><span>32.91.1 Examples<a class="copiable-link" href="#Examples-92"> &para;</a></span></h4>
  29996. <ul class="itemize mark-bullet">
  29997. <li>High-pass:
  29998. <div class="example">
  29999. <pre class="example-preformatted">fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
  30000. </pre></div>
  30001. </li><li>Low-pass:
  30002. <div class="example">
  30003. <pre class="example-preformatted">fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
  30004. </pre></div>
  30005. </li><li>Sharpen:
  30006. <div class="example">
  30007. <pre class="example-preformatted">fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
  30008. </pre></div>
  30009. </li><li>Blur:
  30010. <div class="example">
  30011. <pre class="example-preformatted">fftfilt=dc_Y=0:weight_Y='exp(-4 * ((Y+X)/(W+H)))'
  30012. </pre></div>
  30013. </li></ul>
  30014. </div>
  30015. </div>
  30016. <div class="section-level-extent" id="field">
  30017. <h3 class="section"><span>32.92 field<a class="copiable-link" href="#field"> &para;</a></span></h3>
  30018. <p>Extract a single field from an interlaced image using stride
  30019. arithmetic to avoid wasting CPU time. The output frames are marked as
  30020. non-interlaced.
  30021. </p>
  30022. <p>The filter accepts the following options:
  30023. </p>
  30024. <dl class="table">
  30025. <dt><samp class="option">type</samp></dt>
  30026. <dd><p>Specify whether to extract the top (if the value is <code class="code">0</code> or
  30027. <code class="code">top</code>) or the bottom field (if the value is <code class="code">1</code> or
  30028. <code class="code">bottom</code>).
  30029. </p></dd>
  30030. </dl>
  30031. </div>
  30032. <div class="section-level-extent" id="fieldhint">
  30033. <h3 class="section"><span>32.93 fieldhint<a class="copiable-link" href="#fieldhint"> &para;</a></span></h3>
  30034. <p>Create new frames by copying the top and bottom fields from surrounding frames
  30035. supplied as numbers by the hint file.
  30036. </p>
  30037. <dl class="table">
  30038. <dt><samp class="option">hint</samp></dt>
  30039. <dd><p>Set file containing hints: absolute/relative frame numbers.
  30040. </p>
  30041. <p>There must be one line for each frame in a clip. Each line must contain two
  30042. numbers separated by the comma, optionally followed by <code class="code">-</code> or <code class="code">+</code>.
  30043. Numbers supplied on each line of file can not be out of [N-1,N+1] where N
  30044. is current frame number for <code class="code">absolute</code> mode or out of [-1, 1] range
  30045. for <code class="code">relative</code> mode. First number tells from which frame to pick up top
  30046. field and second number tells from which frame to pick up bottom field.
  30047. </p>
  30048. <p>If optionally followed by <code class="code">+</code> output frame will be marked as interlaced,
  30049. else if followed by <code class="code">-</code> output frame will be marked as progressive, else
  30050. it will be marked same as input frame.
  30051. If optionally followed by <code class="code">t</code> output frame will use only top field, or in
  30052. case of <code class="code">b</code> it will use only bottom field.
  30053. If line starts with <code class="code">#</code> or <code class="code">;</code> that line is skipped.
  30054. </p>
  30055. </dd>
  30056. <dt><samp class="option">mode</samp></dt>
  30057. <dd><p>Can be item <code class="code">absolute</code> or <code class="code">relative</code> or <code class="code">pattern</code>. Default is <code class="code">absolute</code>.
  30058. The <code class="code">pattern</code> mode is same as <code class="code">relative</code> mode, except at last entry of file if there
  30059. are more frames to process than <code class="code">hint</code> file is seek back to start.
  30060. </p></dd>
  30061. </dl>
  30062. <p>Example of first several lines of <code class="code">hint</code> file for <code class="code">relative</code> mode:
  30063. </p><div class="example">
  30064. <pre class="example-preformatted">0,0 - # first frame
  30065. 1,0 - # second frame, use third's frame top field and second's frame bottom field
  30066. 1,0 - # third frame, use fourth's frame top field and third's frame bottom field
  30067. 1,0 -
  30068. 0,0 -
  30069. 0,0 -
  30070. 1,0 -
  30071. 1,0 -
  30072. 1,0 -
  30073. 0,0 -
  30074. 0,0 -
  30075. 1,0 -
  30076. 1,0 -
  30077. 1,0 -
  30078. 0,0 -
  30079. </pre></div>
  30080. </div>
  30081. <div class="section-level-extent" id="fieldmatch">
  30082. <h3 class="section"><span>32.94 fieldmatch<a class="copiable-link" href="#fieldmatch"> &para;</a></span></h3>
  30083. <p>Field matching filter for inverse telecine. It is meant to reconstruct the
  30084. progressive frames from a telecined stream. The filter does not drop duplicated
  30085. frames, so to achieve a complete inverse telecine <code class="code">fieldmatch</code> needs to be
  30086. followed by a decimation filter such as <a class="ref" href="#decimate">decimate</a> in the filtergraph.
  30087. </p>
  30088. <p>The separation of the field matching and the decimation is notably motivated by
  30089. the possibility of inserting a de-interlacing filter fallback between the two.
  30090. If the source has mixed telecined and real interlaced content,
  30091. <code class="code">fieldmatch</code> will not be able to match fields for the interlaced parts.
  30092. But these remaining combed frames will be marked as interlaced, and thus can be
  30093. de-interlaced by a later filter such as <a class="ref" href="#yadif">yadif</a> before decimation.
  30094. </p>
  30095. <p>In addition to the various configuration options, <code class="code">fieldmatch</code> can take an
  30096. optional second stream, activated through the <samp class="option">ppsrc</samp> option. If
  30097. enabled, the frames reconstruction will be based on the fields and frames from
  30098. this second stream. This allows the first input to be pre-processed in order to
  30099. help the various algorithms of the filter, while keeping the output lossless
  30100. (assuming the fields are matched properly). Typically, a field-aware denoiser,
  30101. or brightness/contrast adjustments can help.
  30102. </p>
  30103. <p>Note that this filter uses the same algorithms as TIVTC/TFM (AviSynth project)
  30104. and VIVTC/VFM (VapourSynth project). The later is a light clone of TFM from
  30105. which <code class="code">fieldmatch</code> is based on. While the semantic and usage are very
  30106. close, some behaviour and options names can differ.
  30107. </p>
  30108. <p>The <a class="ref" href="#decimate">decimate</a> filter currently only works for constant frame rate input.
  30109. If your input has mixed telecined (30fps) and progressive content with a lower
  30110. framerate like 24fps use the following filterchain to produce the necessary cfr
  30111. stream: <code class="code">dejudder,fps=30000/1001,fieldmatch,decimate</code>.
  30112. </p>
  30113. <p>The filter accepts the following options:
  30114. </p>
  30115. <dl class="table">
  30116. <dt><samp class="option">order</samp></dt>
  30117. <dd><p>Specify the assumed field order of the input stream. Available values are:
  30118. </p>
  30119. <dl class="table">
  30120. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  30121. <dd><p>Auto detect parity (use FFmpeg&rsquo;s internal parity value).
  30122. </p></dd>
  30123. <dt>&lsquo;<samp class="samp">bff</samp>&rsquo;</dt>
  30124. <dd><p>Assume bottom field first.
  30125. </p></dd>
  30126. <dt>&lsquo;<samp class="samp">tff</samp>&rsquo;</dt>
  30127. <dd><p>Assume top field first.
  30128. </p></dd>
  30129. </dl>
  30130. <p>Note that it is sometimes recommended not to trust the parity announced by the
  30131. stream.
  30132. </p>
  30133. <p>Default value is <var class="var">auto</var>.
  30134. </p>
  30135. </dd>
  30136. <dt><samp class="option">mode</samp></dt>
  30137. <dd><p>Set the matching mode or strategy to use. <samp class="option">pc</samp> mode is the safest in the
  30138. sense that it won&rsquo;t risk creating jerkiness due to duplicate frames when
  30139. possible, but if there are bad edits or blended fields it will end up
  30140. outputting combed frames when a good match might actually exist. On the other
  30141. hand, <samp class="option">pcn_ub</samp> mode is the most risky in terms of creating jerkiness,
  30142. but will almost always find a good frame if there is one. The other values are
  30143. all somewhere in between <samp class="option">pc</samp> and <samp class="option">pcn_ub</samp> in terms of risking
  30144. jerkiness and creating duplicate frames versus finding good matches in sections
  30145. with bad edits, orphaned fields, blended fields, etc.
  30146. </p>
  30147. <p>More details about p/c/n/u/b are available in <a class="ref" href="#p_002fc_002fn_002fu_002fb-meaning">p/c/n/u/b meaning</a> section.
  30148. </p>
  30149. <p>Available values are:
  30150. </p>
  30151. <dl class="table">
  30152. <dt>&lsquo;<samp class="samp">pc</samp>&rsquo;</dt>
  30153. <dd><p>2-way matching (p/c)
  30154. </p></dd>
  30155. <dt>&lsquo;<samp class="samp">pc_n</samp>&rsquo;</dt>
  30156. <dd><p>2-way matching, and trying 3rd match if still combed (p/c + n)
  30157. </p></dd>
  30158. <dt>&lsquo;<samp class="samp">pc_u</samp>&rsquo;</dt>
  30159. <dd><p>2-way matching, and trying 3rd match (same order) if still combed (p/c + u)
  30160. </p></dd>
  30161. <dt>&lsquo;<samp class="samp">pc_n_ub</samp>&rsquo;</dt>
  30162. <dd><p>2-way matching, trying 3rd match if still combed, and trying 4th/5th matches if
  30163. still combed (p/c + n + u/b)
  30164. </p></dd>
  30165. <dt>&lsquo;<samp class="samp">pcn</samp>&rsquo;</dt>
  30166. <dd><p>3-way matching (p/c/n)
  30167. </p></dd>
  30168. <dt>&lsquo;<samp class="samp">pcn_ub</samp>&rsquo;</dt>
  30169. <dd><p>3-way matching, and trying 4th/5th matches if all 3 of the original matches are
  30170. detected as combed (p/c/n + u/b)
  30171. </p></dd>
  30172. </dl>
  30173. <p>The parenthesis at the end indicate the matches that would be used for that
  30174. mode assuming <samp class="option">order</samp>=<var class="var">tff</var> (and <samp class="option">field</samp> on <var class="var">auto</var> or
  30175. <var class="var">top</var>).
  30176. </p>
  30177. <p>In terms of speed <samp class="option">pc</samp> mode is by far the fastest and <samp class="option">pcn_ub</samp> is
  30178. the slowest.
  30179. </p>
  30180. <p>Default value is <var class="var">pc_n</var>.
  30181. </p>
  30182. </dd>
  30183. <dt><samp class="option">ppsrc</samp></dt>
  30184. <dd><p>Mark the main input stream as a pre-processed input, and enable the secondary
  30185. input stream as the clean source to pick the fields from. See the filter
  30186. introduction for more details. It is similar to the <samp class="option">clip2</samp> feature from
  30187. VFM/TFM.
  30188. </p>
  30189. <p>Default value is <code class="code">0</code> (disabled).
  30190. </p>
  30191. </dd>
  30192. <dt><samp class="option">field</samp></dt>
  30193. <dd><p>Set the field to match from. It is recommended to set this to the same value as
  30194. <samp class="option">order</samp> unless you experience matching failures with that setting. In
  30195. certain circumstances changing the field that is used to match from can have a
  30196. large impact on matching performance. Available values are:
  30197. </p>
  30198. <dl class="table">
  30199. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  30200. <dd><p>Automatic (same value as <samp class="option">order</samp>).
  30201. </p></dd>
  30202. <dt>&lsquo;<samp class="samp">bottom</samp>&rsquo;</dt>
  30203. <dd><p>Match from the bottom field.
  30204. </p></dd>
  30205. <dt>&lsquo;<samp class="samp">top</samp>&rsquo;</dt>
  30206. <dd><p>Match from the top field.
  30207. </p></dd>
  30208. </dl>
  30209. <p>Default value is <var class="var">auto</var>.
  30210. </p>
  30211. </dd>
  30212. <dt><samp class="option">mchroma</samp></dt>
  30213. <dd><p>Set whether or not chroma is included during the match comparisons. In most
  30214. cases it is recommended to leave this enabled. You should set this to <code class="code">0</code>
  30215. only if your clip has bad chroma problems such as heavy rainbowing or other
  30216. artifacts. Setting this to <code class="code">0</code> could also be used to speed things up at
  30217. the cost of some accuracy.
  30218. </p>
  30219. <p>Default value is <code class="code">1</code>.
  30220. </p>
  30221. </dd>
  30222. <dt><samp class="option">y0</samp></dt>
  30223. <dt><samp class="option">y1</samp></dt>
  30224. <dd><p>These define an exclusion band which excludes the lines between <samp class="option">y0</samp> and
  30225. <samp class="option">y1</samp> from being included in the field matching decision. An exclusion
  30226. band can be used to ignore subtitles, a logo, or other things that may
  30227. interfere with the matching. <samp class="option">y0</samp> sets the starting scan line and
  30228. <samp class="option">y1</samp> sets the ending line; all lines in between <samp class="option">y0</samp> and
  30229. <samp class="option">y1</samp> (including <samp class="option">y0</samp> and <samp class="option">y1</samp>) will be ignored. Setting
  30230. <samp class="option">y0</samp> and <samp class="option">y1</samp> to the same value will disable the feature.
  30231. <samp class="option">y0</samp> and <samp class="option">y1</samp> defaults to <code class="code">0</code>.
  30232. </p>
  30233. </dd>
  30234. <dt><samp class="option">scthresh</samp></dt>
  30235. <dd><p>Set the scene change detection threshold as a percentage of maximum change on
  30236. the luma plane. Good values are in the <code class="code">[8.0, 14.0]</code> range. Scene change
  30237. detection is only relevant in case <samp class="option">combmatch</samp>=<var class="var">sc</var>. The range for
  30238. <samp class="option">scthresh</samp> is <code class="code">[0.0, 100.0]</code>.
  30239. </p>
  30240. <p>Default value is <code class="code">12.0</code>.
  30241. </p>
  30242. </dd>
  30243. <dt><samp class="option">combmatch</samp></dt>
  30244. <dd><p>When <samp class="option">combatch</samp> is not <var class="var">none</var>, <code class="code">fieldmatch</code> will take into
  30245. account the combed scores of matches when deciding what match to use as the
  30246. final match. Available values are:
  30247. </p>
  30248. <dl class="table">
  30249. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  30250. <dd><p>No final matching based on combed scores.
  30251. </p></dd>
  30252. <dt>&lsquo;<samp class="samp">sc</samp>&rsquo;</dt>
  30253. <dd><p>Combed scores are only used when a scene change is detected.
  30254. </p></dd>
  30255. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  30256. <dd><p>Use combed scores all the time.
  30257. </p></dd>
  30258. </dl>
  30259. <p>Default is <var class="var">sc</var>.
  30260. </p>
  30261. </dd>
  30262. <dt><samp class="option">combdbg</samp></dt>
  30263. <dd><p>Force <code class="code">fieldmatch</code> to calculate the combed metrics for certain matches and
  30264. print them. This setting is known as <samp class="option">micout</samp> in TFM/VFM vocabulary.
  30265. Available values are:
  30266. </p>
  30267. <dl class="table">
  30268. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  30269. <dd><p>No forced calculation.
  30270. </p></dd>
  30271. <dt>&lsquo;<samp class="samp">pcn</samp>&rsquo;</dt>
  30272. <dd><p>Force p/c/n calculations.
  30273. </p></dd>
  30274. <dt>&lsquo;<samp class="samp">pcnub</samp>&rsquo;</dt>
  30275. <dd><p>Force p/c/n/u/b calculations.
  30276. </p></dd>
  30277. </dl>
  30278. <p>Default value is <var class="var">none</var>.
  30279. </p>
  30280. </dd>
  30281. <dt><samp class="option">cthresh</samp></dt>
  30282. <dd><p>This is the area combing threshold used for combed frame detection. This
  30283. essentially controls how &quot;strong&quot; or &quot;visible&quot; combing must be to be detected.
  30284. Larger values mean combing must be more visible and smaller values mean combing
  30285. can be less visible or strong and still be detected. Valid settings are from
  30286. <code class="code">-1</code> (every pixel will be detected as combed) to <code class="code">255</code> (no pixel will
  30287. be detected as combed). This is basically a pixel difference value. A good
  30288. range is <code class="code">[8, 12]</code>.
  30289. </p>
  30290. <p>Default value is <code class="code">9</code>.
  30291. </p>
  30292. </dd>
  30293. <dt><samp class="option">chroma</samp></dt>
  30294. <dd><p>Sets whether or not chroma is considered in the combed frame decision. Only
  30295. disable this if your source has chroma problems (rainbowing, etc.) that are
  30296. causing problems for the combed frame detection with chroma enabled. Actually,
  30297. using <samp class="option">chroma</samp>=<var class="var">0</var> is usually more reliable, except for the case
  30298. where there is chroma only combing in the source.
  30299. </p>
  30300. <p>Default value is <code class="code">0</code>.
  30301. </p>
  30302. </dd>
  30303. <dt><samp class="option">blockx</samp></dt>
  30304. <dt><samp class="option">blocky</samp></dt>
  30305. <dd><p>Respectively set the x-axis and y-axis size of the window used during combed
  30306. frame detection. This has to do with the size of the area in which
  30307. <samp class="option">combpel</samp> pixels are required to be detected as combed for a frame to be
  30308. declared combed. See the <samp class="option">combpel</samp> parameter description for more info.
  30309. Possible values are any number that is a power of 2 starting at 4 and going up
  30310. to 512.
  30311. </p>
  30312. <p>Default value is <code class="code">16</code>.
  30313. </p>
  30314. </dd>
  30315. <dt><samp class="option">combpel</samp></dt>
  30316. <dd><p>The number of combed pixels inside any of the <samp class="option">blocky</samp> by
  30317. <samp class="option">blockx</samp> size blocks on the frame for the frame to be detected as
  30318. combed. While <samp class="option">cthresh</samp> controls how &quot;visible&quot; the combing must be, this
  30319. setting controls &quot;how much&quot; combing there must be in any localized area (a
  30320. window defined by the <samp class="option">blockx</samp> and <samp class="option">blocky</samp> settings) on the
  30321. frame. Minimum value is <code class="code">0</code> and maximum is <code class="code">blocky x blockx</code> (at
  30322. which point no frames will ever be detected as combed). This setting is known
  30323. as <samp class="option">MI</samp> in TFM/VFM vocabulary.
  30324. </p>
  30325. <p>Default value is <code class="code">80</code>.
  30326. </p></dd>
  30327. </dl>
  30328. <a class="anchor" id="p_002fc_002fn_002fu_002fb-meaning"></a><ul class="mini-toc">
  30329. <li><a href="#p_002fc_002fn_002fu_002fb-meaning-1" accesskey="1">p/c/n/u/b meaning</a></li>
  30330. <li><a href="#Examples-93" accesskey="2">Examples</a></li>
  30331. </ul>
  30332. <div class="subsection-level-extent" id="p_002fc_002fn_002fu_002fb-meaning-1">
  30333. <h4 class="subsection"><span>32.94.1 p/c/n/u/b meaning<a class="copiable-link" href="#p_002fc_002fn_002fu_002fb-meaning-1"> &para;</a></span></h4>
  30334. <ul class="mini-toc">
  30335. <li><a href="#p_002fc_002fn" accesskey="1">p/c/n</a></li>
  30336. <li><a href="#u_002fb" accesskey="2">u/b</a></li>
  30337. </ul>
  30338. <div class="subsubsection-level-extent" id="p_002fc_002fn">
  30339. <h4 class="subsubsection"><span>32.94.1.1 p/c/n<a class="copiable-link" href="#p_002fc_002fn"> &para;</a></span></h4>
  30340. <p>We assume the following telecined stream:
  30341. </p>
  30342. <div class="example">
  30343. <pre class="example-preformatted">Top fields: 1 2 2 3 4
  30344. Bottom fields: 1 2 3 4 4
  30345. </pre></div>
  30346. <p>The numbers correspond to the progressive frame the fields relate to. Here, the
  30347. first two frames are progressive, the 3rd and 4th are combed, and so on.
  30348. </p>
  30349. <p>When <code class="code">fieldmatch</code> is configured to run a matching from bottom
  30350. (<samp class="option">field</samp>=<var class="var">bottom</var>) this is how this input stream get transformed:
  30351. </p>
  30352. <div class="example">
  30353. <pre class="example-preformatted">Input stream:
  30354. T 1 2 2 3 4
  30355. B 1 2 3 4 4 &lt;-- matching reference
  30356. Matches: c c n n c
  30357. Output stream:
  30358. T 1 2 3 4 4
  30359. B 1 2 3 4 4
  30360. </pre></div>
  30361. <p>As a result of the field matching, we can see that some frames get duplicated.
  30362. To perform a complete inverse telecine, you need to rely on a decimation filter
  30363. after this operation. See for instance the <a class="ref" href="#decimate">decimate</a> filter.
  30364. </p>
  30365. <p>The same operation now matching from top fields (<samp class="option">field</samp>=<var class="var">top</var>)
  30366. looks like this:
  30367. </p>
  30368. <div class="example">
  30369. <pre class="example-preformatted">Input stream:
  30370. T 1 2 2 3 4 &lt;-- matching reference
  30371. B 1 2 3 4 4
  30372. Matches: c c p p c
  30373. Output stream:
  30374. T 1 2 2 3 4
  30375. B 1 2 2 3 4
  30376. </pre></div>
  30377. <p>In these examples, we can see what <var class="var">p</var>, <var class="var">c</var> and <var class="var">n</var> mean;
  30378. basically, they refer to the frame and field of the opposite parity:
  30379. </p>
  30380. <ul class="itemize mark-bullet">
  30381. <li><var class="var">p</var> matches the field of the opposite parity in the previous frame
  30382. </li><li><var class="var">c</var> matches the field of the opposite parity in the current frame
  30383. </li><li><var class="var">n</var> matches the field of the opposite parity in the next frame
  30384. </li></ul>
  30385. </div>
  30386. <div class="subsubsection-level-extent" id="u_002fb">
  30387. <h4 class="subsubsection"><span>32.94.1.2 u/b<a class="copiable-link" href="#u_002fb"> &para;</a></span></h4>
  30388. <p>The <var class="var">u</var> and <var class="var">b</var> matching are a bit special in the sense that they match
  30389. from the opposite parity flag. In the following examples, we assume that we are
  30390. currently matching the 2nd frame (Top:2, bottom:2). According to the match, a
  30391. &rsquo;x&rsquo; is placed above and below each matched fields.
  30392. </p>
  30393. <p>With bottom matching (<samp class="option">field</samp>=<var class="var">bottom</var>):
  30394. </p><div class="example">
  30395. <pre class="example-preformatted">Match: c p n b u
  30396. x x x x x
  30397. Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
  30398. Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
  30399. x x x x x
  30400. Output frames:
  30401. 2 1 2 2 2
  30402. 2 2 2 1 3
  30403. </pre></div>
  30404. <p>With top matching (<samp class="option">field</samp>=<var class="var">top</var>):
  30405. </p><div class="example">
  30406. <pre class="example-preformatted">Match: c p n b u
  30407. x x x x x
  30408. Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
  30409. Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
  30410. x x x x x
  30411. Output frames:
  30412. 2 2 2 1 2
  30413. 2 1 3 2 2
  30414. </pre></div>
  30415. </div>
  30416. </div>
  30417. <div class="subsection-level-extent" id="Examples-93">
  30418. <h4 class="subsection"><span>32.94.2 Examples<a class="copiable-link" href="#Examples-93"> &para;</a></span></h4>
  30419. <p>Simple IVTC of a top field first telecined stream:
  30420. </p><div class="example">
  30421. <pre class="example-preformatted">fieldmatch=order=tff:combmatch=none, decimate
  30422. </pre></div>
  30423. <p>Advanced IVTC, with fallback on <a class="ref" href="#yadif">yadif</a> for still combed frames:
  30424. </p><div class="example">
  30425. <pre class="example-preformatted">fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
  30426. </pre></div>
  30427. </div>
  30428. </div>
  30429. <div class="section-level-extent" id="fieldorder">
  30430. <h3 class="section"><span>32.95 fieldorder<a class="copiable-link" href="#fieldorder"> &para;</a></span></h3>
  30431. <p>Transform the field order of the input video.
  30432. </p>
  30433. <p>It accepts the following parameters:
  30434. </p>
  30435. <dl class="table">
  30436. <dt><samp class="option">order</samp></dt>
  30437. <dd><p>The output field order. Valid values are <var class="var">tff</var> for top field first or <var class="var">bff</var>
  30438. for bottom field first.
  30439. </p></dd>
  30440. </dl>
  30441. <p>The default value is &lsquo;<samp class="samp">tff</samp>&rsquo;.
  30442. </p>
  30443. <p>The transformation is done by shifting the picture content up or down
  30444. by one line, and filling the remaining line with appropriate picture content.
  30445. This method is consistent with most broadcast field order converters.
  30446. </p>
  30447. <p>If the input video is not flagged as being interlaced, or it is already
  30448. flagged as being of the required output field order, then this filter does
  30449. not alter the incoming video.
  30450. </p>
  30451. <p>It is very useful when converting to or from PAL DV material,
  30452. which is bottom field first.
  30453. </p>
  30454. <p>For example:
  30455. </p><div class="example">
  30456. <pre class="example-preformatted">ffmpeg -i in.vob -vf &quot;fieldorder=bff&quot; out.dv
  30457. </pre></div>
  30458. </div>
  30459. <div class="section-level-extent" id="fillborders">
  30460. <h3 class="section"><span>32.96 fillborders<a class="copiable-link" href="#fillborders"> &para;</a></span></h3>
  30461. <p>Fill borders of the input video, without changing video stream dimensions.
  30462. Sometimes video can have garbage at the four edges and you may not want to
  30463. crop video input to keep size multiple of some number.
  30464. </p>
  30465. <p>This filter accepts the following options:
  30466. </p>
  30467. <dl class="table">
  30468. <dt><samp class="option">left</samp></dt>
  30469. <dd><p>Number of pixels to fill from left border.
  30470. </p>
  30471. </dd>
  30472. <dt><samp class="option">right</samp></dt>
  30473. <dd><p>Number of pixels to fill from right border.
  30474. </p>
  30475. </dd>
  30476. <dt><samp class="option">top</samp></dt>
  30477. <dd><p>Number of pixels to fill from top border.
  30478. </p>
  30479. </dd>
  30480. <dt><samp class="option">bottom</samp></dt>
  30481. <dd><p>Number of pixels to fill from bottom border.
  30482. </p>
  30483. </dd>
  30484. <dt><samp class="option">mode</samp></dt>
  30485. <dd><p>Set fill mode.
  30486. </p>
  30487. <p>It accepts the following values:
  30488. </p><dl class="table">
  30489. <dt>&lsquo;<samp class="samp">smear</samp>&rsquo;</dt>
  30490. <dd><p>fill pixels using outermost pixels
  30491. </p>
  30492. </dd>
  30493. <dt>&lsquo;<samp class="samp">mirror</samp>&rsquo;</dt>
  30494. <dd><p>fill pixels using mirroring (half sample symmetric)
  30495. </p>
  30496. </dd>
  30497. <dt>&lsquo;<samp class="samp">fixed</samp>&rsquo;</dt>
  30498. <dd><p>fill pixels with constant value
  30499. </p>
  30500. </dd>
  30501. <dt>&lsquo;<samp class="samp">reflect</samp>&rsquo;</dt>
  30502. <dd><p>fill pixels using reflecting (whole sample symmetric)
  30503. </p>
  30504. </dd>
  30505. <dt>&lsquo;<samp class="samp">wrap</samp>&rsquo;</dt>
  30506. <dd><p>fill pixels using wrapping
  30507. </p>
  30508. </dd>
  30509. <dt>&lsquo;<samp class="samp">fade</samp>&rsquo;</dt>
  30510. <dd><p>fade pixels to constant value
  30511. </p>
  30512. </dd>
  30513. <dt>&lsquo;<samp class="samp">margins</samp>&rsquo;</dt>
  30514. <dd><p>fill pixels at top and bottom with weighted averages pixels near borders
  30515. </p></dd>
  30516. </dl>
  30517. <p>Default is <var class="var">smear</var>.
  30518. </p>
  30519. </dd>
  30520. <dt><samp class="option">color</samp></dt>
  30521. <dd><p>Set color for pixels in fixed or fade mode. Default is <var class="var">black</var>.
  30522. </p></dd>
  30523. </dl>
  30524. <ul class="mini-toc">
  30525. <li><a href="#Commands-93" accesskey="1">Commands</a></li>
  30526. </ul>
  30527. <div class="subsection-level-extent" id="Commands-93">
  30528. <h4 class="subsection"><span>32.96.1 Commands<a class="copiable-link" href="#Commands-93"> &para;</a></span></h4>
  30529. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  30530. The command accepts the same syntax of the corresponding option.
  30531. </p>
  30532. <p>If the specified expression is not valid, it is kept at its current
  30533. value.
  30534. </p>
  30535. </div>
  30536. </div>
  30537. <div class="section-level-extent" id="find_005frect">
  30538. <h3 class="section"><span>32.97 find_rect<a class="copiable-link" href="#find_005frect"> &para;</a></span></h3>
  30539. <p>Find a rectangular object in the input video.
  30540. </p>
  30541. <p>The object to search for must be specified as a gray8 image specified with the
  30542. <samp class="option">object</samp> option.
  30543. </p>
  30544. <p>For each possible match, a score is computed. If the score reaches the specified
  30545. threshold, the object is considered found.
  30546. </p>
  30547. <p>If the input video contains multiple instances of the object, the filter will
  30548. find only one of them.
  30549. </p>
  30550. <p>When an object is found, the following metadata entries are set in the matching
  30551. frame:
  30552. </p><dl class="table">
  30553. <dt><samp class="option">lavfi.rect.w</samp></dt>
  30554. <dd><p>width of object
  30555. </p>
  30556. </dd>
  30557. <dt><samp class="option">lavfi.rect.h</samp></dt>
  30558. <dd><p>height of object
  30559. </p>
  30560. </dd>
  30561. <dt><samp class="option">lavfi.rect.x</samp></dt>
  30562. <dd><p>x position of object
  30563. </p>
  30564. </dd>
  30565. <dt><samp class="option">lavfi.rect.y</samp></dt>
  30566. <dd><p>y position of object
  30567. </p>
  30568. </dd>
  30569. <dt><samp class="option">lavfi.rect.score</samp></dt>
  30570. <dd><p>match score of the found object
  30571. </p></dd>
  30572. </dl>
  30573. <p>It accepts the following options:
  30574. </p>
  30575. <dl class="table">
  30576. <dt><samp class="option">object</samp></dt>
  30577. <dd><p>Filepath of the object image, needs to be in gray8.
  30578. </p>
  30579. </dd>
  30580. <dt><samp class="option">threshold</samp></dt>
  30581. <dd><p>Detection threshold, expressed as a decimal number in the range 0-1.
  30582. </p>
  30583. <p>A threshold value of 0.01 means only exact matches, a threshold of 0.99 means
  30584. almost everything matches.
  30585. </p>
  30586. <p>Default value is 0.5.
  30587. </p>
  30588. </dd>
  30589. <dt><samp class="option">mipmaps</samp></dt>
  30590. <dd><p>Number of mipmaps, default is 3.
  30591. </p>
  30592. </dd>
  30593. <dt><samp class="option">xmin, ymin, xmax, ymax</samp></dt>
  30594. <dd><p>Specifies the rectangle in which to search.
  30595. </p>
  30596. </dd>
  30597. <dt><samp class="option">discard</samp></dt>
  30598. <dd><p>Discard frames where object is not detected. Default is disabled.
  30599. </p></dd>
  30600. </dl>
  30601. <ul class="mini-toc">
  30602. <li><a href="#Examples-94" accesskey="1">Examples</a></li>
  30603. </ul>
  30604. <div class="subsection-level-extent" id="Examples-94">
  30605. <h4 class="subsection"><span>32.97.1 Examples<a class="copiable-link" href="#Examples-94"> &para;</a></span></h4>
  30606. <ul class="itemize mark-bullet">
  30607. <li>Cover a rectangular object by the supplied image of a given video using <code class="command">ffmpeg</code>:
  30608. <div class="example">
  30609. <pre class="example-preformatted">ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
  30610. </pre></div>
  30611. </li><li>Find the position of an object in each frame using <code class="command">ffprobe</code> and write
  30612. it to a log file:
  30613. <div class="example">
  30614. <pre class="example-preformatted">ffprobe -f lavfi movie=test.mp4,find_rect=object=object.pgm:threshold=0.3 \
  30615. -show_entries frame=pkt_pts_time:frame_tags=lavfi.rect.x,lavfi.rect.y \
  30616. -of csv -o find_rect.csv
  30617. </pre></div>
  30618. </li></ul>
  30619. </div>
  30620. </div>
  30621. <div class="section-level-extent" id="floodfill">
  30622. <h3 class="section"><span>32.98 floodfill<a class="copiable-link" href="#floodfill"> &para;</a></span></h3>
  30623. <p>Flood area with values of same pixel components with another values.
  30624. </p>
  30625. <p>It accepts the following options:
  30626. </p><dl class="table">
  30627. <dt><samp class="option">x</samp></dt>
  30628. <dd><p>Set pixel x coordinate.
  30629. </p>
  30630. </dd>
  30631. <dt><samp class="option">y</samp></dt>
  30632. <dd><p>Set pixel y coordinate.
  30633. </p>
  30634. </dd>
  30635. <dt><samp class="option">s0</samp></dt>
  30636. <dd><p>Set source #0 component value.
  30637. </p>
  30638. </dd>
  30639. <dt><samp class="option">s1</samp></dt>
  30640. <dd><p>Set source #1 component value.
  30641. </p>
  30642. </dd>
  30643. <dt><samp class="option">s2</samp></dt>
  30644. <dd><p>Set source #2 component value.
  30645. </p>
  30646. </dd>
  30647. <dt><samp class="option">s3</samp></dt>
  30648. <dd><p>Set source #3 component value.
  30649. </p>
  30650. </dd>
  30651. <dt><samp class="option">d0</samp></dt>
  30652. <dd><p>Set destination #0 component value.
  30653. </p>
  30654. </dd>
  30655. <dt><samp class="option">d1</samp></dt>
  30656. <dd><p>Set destination #1 component value.
  30657. </p>
  30658. </dd>
  30659. <dt><samp class="option">d2</samp></dt>
  30660. <dd><p>Set destination #2 component value.
  30661. </p>
  30662. </dd>
  30663. <dt><samp class="option">d3</samp></dt>
  30664. <dd><p>Set destination #3 component value.
  30665. </p></dd>
  30666. </dl>
  30667. <a class="anchor" id="format"></a></div>
  30668. <div class="section-level-extent" id="format-1">
  30669. <h3 class="section"><span>32.99 format<a class="copiable-link" href="#format-1"> &para;</a></span></h3>
  30670. <p>Convert the input video to one of the specified pixel formats.
  30671. Libavfilter will try to pick one that is suitable as input to
  30672. the next filter.
  30673. </p>
  30674. <p>It accepts the following parameters:
  30675. </p><dl class="table">
  30676. <dt><samp class="option">pix_fmts</samp></dt>
  30677. <dd><p>A &rsquo;|&rsquo;-separated list of pixel format names, such as
  30678. &quot;pix_fmts=yuv420p|monow|rgb24&quot;.
  30679. </p>
  30680. </dd>
  30681. <dt><samp class="option">color_spaces</samp></dt>
  30682. <dd><p>A &rsquo;|&rsquo;-separated list of color space names, such as
  30683. &quot;color_spaces=bt709|bt470bg|bt2020nc&quot;.
  30684. </p>
  30685. </dd>
  30686. <dt><samp class="option">color_ranges</samp></dt>
  30687. <dd><p>A &rsquo;|&rsquo;-separated list of color range names, such as
  30688. &quot;color_spaces=tv|pc&quot;.
  30689. </p>
  30690. </dd>
  30691. </dl>
  30692. <ul class="mini-toc">
  30693. <li><a href="#Examples-95" accesskey="1">Examples</a></li>
  30694. </ul>
  30695. <div class="subsection-level-extent" id="Examples-95">
  30696. <h4 class="subsection"><span>32.99.1 Examples<a class="copiable-link" href="#Examples-95"> &para;</a></span></h4>
  30697. <ul class="itemize mark-bullet">
  30698. <li>Convert the input video to the <var class="var">yuv420p</var> format
  30699. <div class="example">
  30700. <pre class="example-preformatted">format=pix_fmts=yuv420p
  30701. </pre></div>
  30702. <p>Convert the input video to any of the formats in the list
  30703. </p><div class="example">
  30704. <pre class="example-preformatted">format=pix_fmts=yuv420p|yuv444p|yuv410p
  30705. </pre></div>
  30706. </li></ul>
  30707. <a class="anchor" id="fps"></a></div>
  30708. </div>
  30709. <div class="section-level-extent" id="fps-1">
  30710. <h3 class="section"><span>32.100 fps<a class="copiable-link" href="#fps-1"> &para;</a></span></h3>
  30711. <p>Convert the video to specified constant frame rate by duplicating or dropping
  30712. frames as necessary.
  30713. </p>
  30714. <p>It accepts the following parameters:
  30715. </p><dl class="table">
  30716. <dt><samp class="option">fps</samp></dt>
  30717. <dd><p>The desired output frame rate. It accepts expressions containing the following
  30718. constants:
  30719. </p>
  30720. <dl class="table">
  30721. <dt>&lsquo;<samp class="samp">source_fps</samp>&rsquo;</dt>
  30722. <dd><p>The input&rsquo;s frame rate
  30723. </p>
  30724. </dd>
  30725. <dt>&lsquo;<samp class="samp">ntsc</samp>&rsquo;</dt>
  30726. <dd><p>NTSC frame rate of <code class="code">30000/1001</code>
  30727. </p>
  30728. </dd>
  30729. <dt>&lsquo;<samp class="samp">pal</samp>&rsquo;</dt>
  30730. <dd><p>PAL frame rate of <code class="code">25.0</code>
  30731. </p>
  30732. </dd>
  30733. <dt>&lsquo;<samp class="samp">film</samp>&rsquo;</dt>
  30734. <dd><p>Film frame rate of <code class="code">24.0</code>
  30735. </p>
  30736. </dd>
  30737. <dt>&lsquo;<samp class="samp">ntsc_film</samp>&rsquo;</dt>
  30738. <dd><p>NTSC-film frame rate of <code class="code">24000/1001</code>
  30739. </p></dd>
  30740. </dl>
  30741. <p>The default is <code class="code">25</code>.
  30742. </p>
  30743. </dd>
  30744. <dt><samp class="option">start_time</samp></dt>
  30745. <dd><p>Assume the first PTS should be the given value, in seconds. This allows for
  30746. padding/trimming at the start of stream. By default, no assumption is made
  30747. about the first frame&rsquo;s expected PTS, so no padding or trimming is done.
  30748. For example, this could be set to 0 to pad the beginning with duplicates of
  30749. the first frame if a video stream starts after the audio stream or to trim any
  30750. frames with a negative PTS.
  30751. </p>
  30752. </dd>
  30753. <dt><samp class="option">round</samp></dt>
  30754. <dd><p>Timestamp (PTS) rounding method.
  30755. </p>
  30756. <p>Possible values are:
  30757. </p><dl class="table">
  30758. <dt><samp class="option">zero</samp></dt>
  30759. <dd><p>round towards 0
  30760. </p></dd>
  30761. <dt><samp class="option">inf</samp></dt>
  30762. <dd><p>round away from 0
  30763. </p></dd>
  30764. <dt><samp class="option">down</samp></dt>
  30765. <dd><p>round towards -infinity
  30766. </p></dd>
  30767. <dt><samp class="option">up</samp></dt>
  30768. <dd><p>round towards +infinity
  30769. </p></dd>
  30770. <dt><samp class="option">near</samp></dt>
  30771. <dd><p>round to nearest
  30772. </p></dd>
  30773. </dl>
  30774. <p>The default is <code class="code">near</code>.
  30775. </p>
  30776. </dd>
  30777. <dt><samp class="option">eof_action</samp></dt>
  30778. <dd><p>Action performed when reading the last frame.
  30779. </p>
  30780. <p>Possible values are:
  30781. </p><dl class="table">
  30782. <dt><samp class="option">round</samp></dt>
  30783. <dd><p>Use same timestamp rounding method as used for other frames.
  30784. </p></dd>
  30785. <dt><samp class="option">pass</samp></dt>
  30786. <dd><p>Pass through last frame if input duration has not been reached yet.
  30787. </p></dd>
  30788. </dl>
  30789. <p>The default is <code class="code">round</code>.
  30790. </p>
  30791. </dd>
  30792. </dl>
  30793. <p>Alternatively, the options can be specified as a flat string:
  30794. <var class="var">fps</var>[:<var class="var">start_time</var>[:<var class="var">round</var>]].
  30795. </p>
  30796. <p>See also the <a class="ref" href="#setpts">setpts</a> filter.
  30797. </p>
  30798. <ul class="mini-toc">
  30799. <li><a href="#Examples-96" accesskey="1">Examples</a></li>
  30800. </ul>
  30801. <div class="subsection-level-extent" id="Examples-96">
  30802. <h4 class="subsection"><span>32.100.1 Examples<a class="copiable-link" href="#Examples-96"> &para;</a></span></h4>
  30803. <ul class="itemize mark-bullet">
  30804. <li>A typical usage in order to set the fps to 25:
  30805. <div class="example">
  30806. <pre class="example-preformatted">fps=fps=25
  30807. </pre></div>
  30808. </li><li>Sets the fps to 24, using abbreviation and rounding method to round to nearest:
  30809. <div class="example">
  30810. <pre class="example-preformatted">fps=fps=film:round=near
  30811. </pre></div>
  30812. </li></ul>
  30813. </div>
  30814. </div>
  30815. <div class="section-level-extent" id="framepack">
  30816. <h3 class="section"><span>32.101 framepack<a class="copiable-link" href="#framepack"> &para;</a></span></h3>
  30817. <p>Pack two different video streams into a stereoscopic video, setting proper
  30818. metadata on supported codecs. The two views should have the same size and
  30819. framerate and processing will stop when the shorter video ends. Please note
  30820. that you may conveniently adjust view properties with the <a class="ref" href="#scale">scale</a> and
  30821. <a class="ref" href="#fps">fps</a> filters.
  30822. </p>
  30823. <p>It accepts the following parameters:
  30824. </p><dl class="table">
  30825. <dt><samp class="option">format</samp></dt>
  30826. <dd><p>The desired packing format. Supported values are:
  30827. </p>
  30828. <dl class="table">
  30829. <dt><samp class="option">sbs</samp></dt>
  30830. <dd><p>The views are next to each other (default).
  30831. </p>
  30832. </dd>
  30833. <dt><samp class="option">tab</samp></dt>
  30834. <dd><p>The views are on top of each other.
  30835. </p>
  30836. </dd>
  30837. <dt><samp class="option">lines</samp></dt>
  30838. <dd><p>The views are packed by line.
  30839. </p>
  30840. </dd>
  30841. <dt><samp class="option">columns</samp></dt>
  30842. <dd><p>The views are packed by column.
  30843. </p>
  30844. </dd>
  30845. <dt><samp class="option">frameseq</samp></dt>
  30846. <dd><p>The views are temporally interleaved.
  30847. </p>
  30848. </dd>
  30849. </dl>
  30850. </dd>
  30851. </dl>
  30852. <p>Some examples:
  30853. </p>
  30854. <div class="example">
  30855. <pre class="example-preformatted"># Convert left and right views into a frame-sequential video
  30856. ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
  30857. # Convert views into a side-by-side video with the same output resolution as the input
  30858. ffmpeg -i LEFT -i RIGHT -filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT
  30859. </pre></div>
  30860. </div>
  30861. <div class="section-level-extent" id="framerate">
  30862. <h3 class="section"><span>32.102 framerate<a class="copiable-link" href="#framerate"> &para;</a></span></h3>
  30863. <p>Change the frame rate by interpolating new video output frames from the source
  30864. frames.
  30865. </p>
  30866. <p>This filter is not designed to function correctly with interlaced media. If
  30867. you wish to change the frame rate of interlaced media then you are required
  30868. to deinterlace before this filter and re-interlace after this filter.
  30869. </p>
  30870. <p>A description of the accepted options follows.
  30871. </p>
  30872. <dl class="table">
  30873. <dt><samp class="option">fps</samp></dt>
  30874. <dd><p>Specify the output frames per second. This option can also be specified
  30875. as a value alone. The default is <code class="code">50</code>.
  30876. </p>
  30877. </dd>
  30878. <dt><samp class="option">interp_start</samp></dt>
  30879. <dd><p>Specify the start of a range where the output frame will be created as a
  30880. linear interpolation of two frames. The range is [<code class="code">0</code>-<code class="code">255</code>],
  30881. the default is <code class="code">15</code>.
  30882. </p>
  30883. </dd>
  30884. <dt><samp class="option">interp_end</samp></dt>
  30885. <dd><p>Specify the end of a range where the output frame will be created as a
  30886. linear interpolation of two frames. The range is [<code class="code">0</code>-<code class="code">255</code>],
  30887. the default is <code class="code">240</code>.
  30888. </p>
  30889. </dd>
  30890. <dt><samp class="option">scene</samp></dt>
  30891. <dd><p>Specify the level at which a scene change is detected as a value between
  30892. 0 and 100 to indicate a new scene; a low value reflects a low
  30893. probability for the current frame to introduce a new scene, while a higher
  30894. value means the current frame is more likely to be one.
  30895. The default is <code class="code">8.2</code>.
  30896. </p>
  30897. </dd>
  30898. <dt><samp class="option">flags</samp></dt>
  30899. <dd><p>Specify flags influencing the filter process.
  30900. </p>
  30901. <p>Available value for <var class="var">flags</var> is:
  30902. </p>
  30903. <dl class="table">
  30904. <dt><samp class="option">scene_change_detect, scd</samp></dt>
  30905. <dd><p>Enable scene change detection using the value of the option <var class="var">scene</var>.
  30906. This flag is enabled by default.
  30907. </p></dd>
  30908. </dl>
  30909. </dd>
  30910. </dl>
  30911. </div>
  30912. <div class="section-level-extent" id="framestep">
  30913. <h3 class="section"><span>32.103 framestep<a class="copiable-link" href="#framestep"> &para;</a></span></h3>
  30914. <p>Select one frame every N-th frame.
  30915. </p>
  30916. <p>This filter accepts the following option:
  30917. </p><dl class="table">
  30918. <dt><samp class="option">step</samp></dt>
  30919. <dd><p>Select frame after every <code class="code">step</code> frames.
  30920. Allowed values are positive integers higher than 0. Default value is <code class="code">1</code>.
  30921. </p></dd>
  30922. </dl>
  30923. </div>
  30924. <div class="section-level-extent" id="freezedetect">
  30925. <h3 class="section"><span>32.104 freezedetect<a class="copiable-link" href="#freezedetect"> &para;</a></span></h3>
  30926. <p>Detect frozen video.
  30927. </p>
  30928. <p>This filter logs a message and sets frame metadata when it detects that the
  30929. input video has no significant change in content during a specified duration.
  30930. Video freeze detection calculates the mean average absolute difference of all
  30931. the components of video frames and compares it to a noise floor.
  30932. </p>
  30933. <p>The printed times and duration are expressed in seconds. The
  30934. <code class="code">lavfi.freezedetect.freeze_start</code> metadata key is set on the first frame
  30935. whose timestamp equals or exceeds the detection duration and it contains the
  30936. timestamp of the first frame of the freeze. The
  30937. <code class="code">lavfi.freezedetect.freeze_duration</code> and
  30938. <code class="code">lavfi.freezedetect.freeze_end</code> metadata keys are set on the first frame
  30939. after the freeze.
  30940. </p>
  30941. <p>The filter accepts the following options:
  30942. </p>
  30943. <dl class="table">
  30944. <dt><samp class="option">noise, n</samp></dt>
  30945. <dd><p>Set noise tolerance. Can be specified in dB (in case &quot;dB&quot; is appended to the
  30946. specified value) or as a difference ratio between 0 and 1. Default is -60dB, or
  30947. 0.001.
  30948. </p>
  30949. </dd>
  30950. <dt><samp class="option">duration, d</samp></dt>
  30951. <dd><p>Set freeze duration until notification (default is 2 seconds).
  30952. </p></dd>
  30953. </dl>
  30954. </div>
  30955. <div class="section-level-extent" id="freezeframes">
  30956. <h3 class="section"><span>32.105 freezeframes<a class="copiable-link" href="#freezeframes"> &para;</a></span></h3>
  30957. <p>Freeze video frames.
  30958. </p>
  30959. <p>This filter freezes video frames using frame from 2nd input.
  30960. </p>
  30961. <p>The filter accepts the following options:
  30962. </p>
  30963. <dl class="table">
  30964. <dt><samp class="option">first</samp></dt>
  30965. <dd><p>Set number of first frame from which to start freeze.
  30966. </p>
  30967. </dd>
  30968. <dt><samp class="option">last</samp></dt>
  30969. <dd><p>Set number of last frame from which to end freeze.
  30970. </p>
  30971. </dd>
  30972. <dt><samp class="option">replace</samp></dt>
  30973. <dd><p>Set number of frame from 2nd input which will be used instead of replaced frames.
  30974. </p></dd>
  30975. </dl>
  30976. <a class="anchor" id="frei0r"></a></div>
  30977. <div class="section-level-extent" id="frei0r-1">
  30978. <h3 class="section"><span>32.106 frei0r<a class="copiable-link" href="#frei0r-1"> &para;</a></span></h3>
  30979. <p>Apply a frei0r effect to the input video.
  30980. </p>
  30981. <p>To enable the compilation of this filter, you need to install the frei0r
  30982. header and configure FFmpeg with <code class="code">--enable-frei0r</code>.
  30983. </p>
  30984. <p>It accepts the following parameters:
  30985. </p>
  30986. <dl class="table">
  30987. <dt><samp class="option">filter_name</samp></dt>
  30988. <dd><p>The name of the frei0r effect to load. If the environment variable
  30989. <code class="env">FREI0R_PATH</code> is defined, the frei0r effect is searched for in each of the
  30990. directories specified by the colon-separated list in <code class="env">FREI0R_PATH</code>.
  30991. Otherwise, the standard frei0r paths are searched, in this order:
  30992. <samp class="file">HOME/.frei0r-1/lib/</samp>, <samp class="file">/usr/local/lib/frei0r-1/</samp>,
  30993. <samp class="file">/usr/lib/frei0r-1/</samp>.
  30994. </p>
  30995. </dd>
  30996. <dt><samp class="option">filter_params</samp></dt>
  30997. <dd><p>A &rsquo;|&rsquo;-separated list of parameters to pass to the frei0r effect.
  30998. </p>
  30999. </dd>
  31000. </dl>
  31001. <p>A frei0r effect parameter can be a boolean (its value is either
  31002. &quot;y&quot; or &quot;n&quot;), a double, a color (specified as
  31003. <var class="var">R</var>/<var class="var">G</var>/<var class="var">B</var>, where <var class="var">R</var>, <var class="var">G</var>, and <var class="var">B</var> are floating point
  31004. numbers between 0.0 and 1.0, inclusive) or a color description as specified in the
  31005. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>,
  31006. a position (specified as <var class="var">X</var>/<var class="var">Y</var>, where
  31007. <var class="var">X</var> and <var class="var">Y</var> are floating point numbers) and/or a string.
  31008. </p>
  31009. <p>The number and types of parameters depend on the loaded effect. If an
  31010. effect parameter is not specified, the default value is set.
  31011. </p>
  31012. <ul class="mini-toc">
  31013. <li><a href="#Examples-97" accesskey="1">Examples</a></li>
  31014. <li><a href="#Commands-94" accesskey="2">Commands</a></li>
  31015. </ul>
  31016. <div class="subsection-level-extent" id="Examples-97">
  31017. <h4 class="subsection"><span>32.106.1 Examples<a class="copiable-link" href="#Examples-97"> &para;</a></span></h4>
  31018. <ul class="itemize mark-bullet">
  31019. <li>Apply the distort0r effect, setting the first two double parameters:
  31020. <div class="example">
  31021. <pre class="example-preformatted">frei0r=filter_name=distort0r:filter_params=0.5|0.01
  31022. </pre></div>
  31023. </li><li>Apply the colordistance effect, taking a color as the first parameter:
  31024. <div class="example">
  31025. <pre class="example-preformatted">frei0r=colordistance:0.2/0.3/0.4
  31026. frei0r=colordistance:violet
  31027. frei0r=colordistance:0x112233
  31028. </pre></div>
  31029. </li><li>Apply the perspective effect, specifying the top left and top right image
  31030. positions:
  31031. <div class="example">
  31032. <pre class="example-preformatted">frei0r=perspective:0.2/0.2|0.8/0.2
  31033. </pre></div>
  31034. </li></ul>
  31035. <p>For more information, see
  31036. <a class="url" href="http://frei0r.dyne.org">http://frei0r.dyne.org</a>
  31037. </p>
  31038. </div>
  31039. <div class="subsection-level-extent" id="Commands-94">
  31040. <h4 class="subsection"><span>32.106.2 Commands<a class="copiable-link" href="#Commands-94"> &para;</a></span></h4>
  31041. <p>This filter supports the <samp class="option">filter_params</samp> option as <a class="ref" href="#commands">commands</a>.
  31042. </p>
  31043. </div>
  31044. </div>
  31045. <div class="section-level-extent" id="fspp">
  31046. <h3 class="section"><span>32.107 fspp<a class="copiable-link" href="#fspp"> &para;</a></span></h3>
  31047. <p>Apply fast and simple postprocessing. It is a faster version of <a class="ref" href="#spp">spp</a>.
  31048. </p>
  31049. <p>It splits (I)DCT into horizontal/vertical passes. Unlike the simple post-
  31050. processing filter, one of them is performed once per block, not per pixel.
  31051. This allows for much higher speed.
  31052. </p>
  31053. <p>The filter accepts the following options:
  31054. </p>
  31055. <dl class="table">
  31056. <dt><samp class="option">quality</samp></dt>
  31057. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  31058. an integer in the range 4-5. Default value is <code class="code">4</code>.
  31059. </p>
  31060. </dd>
  31061. <dt><samp class="option">qp</samp></dt>
  31062. <dd><p>Force a constant quantization parameter. It accepts an integer in range 0-63.
  31063. If not set, the filter will use the QP from the video stream (if available).
  31064. </p>
  31065. </dd>
  31066. <dt><samp class="option">strength</samp></dt>
  31067. <dd><p>Set filter strength. It accepts an integer in range -15 to 32. Lower values mean
  31068. more details but also more artifacts, while higher values make the image smoother
  31069. but also blurrier. Default value is <code class="code">0</code> − PSNR optimal.
  31070. </p>
  31071. </dd>
  31072. <dt><samp class="option">use_bframe_qp</samp></dt>
  31073. <dd><p>Enable the use of the QP from the B-Frames if set to <code class="code">1</code>. Using this
  31074. option may cause flicker since the B-Frames have often larger QP. Default is
  31075. <code class="code">0</code> (not enabled).
  31076. </p>
  31077. </dd>
  31078. </dl>
  31079. <a class="anchor" id="fsync"></a></div>
  31080. <div class="section-level-extent" id="fsync-1">
  31081. <h3 class="section"><span>32.108 fsync<a class="copiable-link" href="#fsync-1"> &para;</a></span></h3>
  31082. <p>Synchronize video frames with an external mapping from a file.
  31083. </p>
  31084. <p>For each input PTS given in the map file it either drops or creates as many
  31085. frames as necessary to recreate the sequence of output frames given in the
  31086. map file.
  31087. </p>
  31088. <p>This filter is useful to recreate the output frames of a framerate conversion
  31089. by the <a class="ref" href="#fps">fps</a> filter, recorded into a map file using the ffmpeg option
  31090. <code class="code">-stats_mux_pre</code>, and do further processing to the corresponding frames
  31091. e.g. quality comparison.
  31092. </p>
  31093. <p>Each line of the map file must contain three items per input frame, the input
  31094. PTS (decimal), the output PTS (decimal) and the
  31095. output TIMEBASE (decimal/decimal), seperated by a space.
  31096. This file format corresponds to the output
  31097. of <code class="code">-stats_mux_pre_fmt=&quot;{ptsi} {pts} {tb}&quot;</code>.
  31098. </p>
  31099. <p>The filter assumes the map file is sorted by increasing input PTS.
  31100. </p>
  31101. <p>The filter accepts the following options:
  31102. </p><dl class="table">
  31103. <dt><samp class="option">file, f</samp></dt>
  31104. <dd><p>The filename of the map file to be used.
  31105. </p></dd>
  31106. </dl>
  31107. <p>Example:
  31108. </p><div class="example">
  31109. <pre class="example-preformatted"># Convert a video to 25 fps and record a MAP_FILE file with the default format of this filter
  31110. ffmpeg -i INPUT -vf fps=fps=25 -stats_mux_pre MAP_FILE -stats_mux_pre_fmt &quot;{ptsi} {pts} {tb}&quot; OUTPUT
  31111. # Sort MAP_FILE by increasing input PTS
  31112. sort -n MAP_FILE
  31113. # Use INPUT, OUTPUT and the MAP_FILE from above to compare the corresponding frames in INPUT and OUTPUT via SSIM
  31114. ffmpeg -i INPUT -i OUTPUT -filter_complex '[0:v]fsync=file=MAP_FILE[ref];[1:v][ref]ssim' -f null -
  31115. </pre></div>
  31116. </div>
  31117. <div class="section-level-extent" id="gblur">
  31118. <h3 class="section"><span>32.109 gblur<a class="copiable-link" href="#gblur"> &para;</a></span></h3>
  31119. <p>Apply Gaussian blur filter.
  31120. </p>
  31121. <p>The filter accepts the following options:
  31122. </p>
  31123. <dl class="table">
  31124. <dt><samp class="option">sigma</samp></dt>
  31125. <dd><p>Set horizontal sigma, standard deviation of Gaussian blur. Default is <code class="code">0.5</code>.
  31126. </p>
  31127. </dd>
  31128. <dt><samp class="option">steps</samp></dt>
  31129. <dd><p>Set number of steps for Gaussian approximation. Default is <code class="code">1</code>.
  31130. </p>
  31131. </dd>
  31132. <dt><samp class="option">planes</samp></dt>
  31133. <dd><p>Set which planes to filter. By default all planes are filtered.
  31134. </p>
  31135. </dd>
  31136. <dt><samp class="option">sigmaV</samp></dt>
  31137. <dd><p>Set vertical sigma, if negative it will be same as <code class="code">sigma</code>.
  31138. Default is <code class="code">-1</code>.
  31139. </p></dd>
  31140. </dl>
  31141. <ul class="mini-toc">
  31142. <li><a href="#Commands-95" accesskey="1">Commands</a></li>
  31143. </ul>
  31144. <div class="subsection-level-extent" id="Commands-95">
  31145. <h4 class="subsection"><span>32.109.1 Commands<a class="copiable-link" href="#Commands-95"> &para;</a></span></h4>
  31146. <p>This filter supports same commands as options.
  31147. The command accepts the same syntax of the corresponding option.
  31148. </p>
  31149. <p>If the specified expression is not valid, it is kept at its current
  31150. value.
  31151. </p>
  31152. </div>
  31153. </div>
  31154. <div class="section-level-extent" id="geq">
  31155. <h3 class="section"><span>32.110 geq<a class="copiable-link" href="#geq"> &para;</a></span></h3>
  31156. <p>Apply generic equation to each pixel.
  31157. </p>
  31158. <p>The filter accepts the following options:
  31159. </p>
  31160. <dl class="table">
  31161. <dt><samp class="option">lum_expr, lum</samp></dt>
  31162. <dd><p>Set the luma expression.
  31163. </p></dd>
  31164. <dt><samp class="option">cb_expr, cb</samp></dt>
  31165. <dd><p>Set the chrominance blue expression.
  31166. </p></dd>
  31167. <dt><samp class="option">cr_expr, cr</samp></dt>
  31168. <dd><p>Set the chrominance red expression.
  31169. </p></dd>
  31170. <dt><samp class="option">alpha_expr, a</samp></dt>
  31171. <dd><p>Set the alpha expression.
  31172. </p></dd>
  31173. <dt><samp class="option">red_expr, r</samp></dt>
  31174. <dd><p>Set the red expression.
  31175. </p></dd>
  31176. <dt><samp class="option">green_expr, g</samp></dt>
  31177. <dd><p>Set the green expression.
  31178. </p></dd>
  31179. <dt><samp class="option">blue_expr, b</samp></dt>
  31180. <dd><p>Set the blue expression.
  31181. </p></dd>
  31182. </dl>
  31183. <p>The colorspace is selected according to the specified options. If one
  31184. of the <samp class="option">lum_expr</samp>, <samp class="option">cb_expr</samp>, or <samp class="option">cr_expr</samp>
  31185. options is specified, the filter will automatically select a YCbCr
  31186. colorspace. If one of the <samp class="option">red_expr</samp>, <samp class="option">green_expr</samp>, or
  31187. <samp class="option">blue_expr</samp> options is specified, it will select an RGB
  31188. colorspace.
  31189. </p>
  31190. <p>If one of the chrominance expression is not defined, it falls back on the other
  31191. one. If no alpha expression is specified it will evaluate to opaque value.
  31192. If none of chrominance expressions are specified, they will evaluate
  31193. to the luma expression.
  31194. </p>
  31195. <p>The expressions can use the following variables and functions:
  31196. </p>
  31197. <dl class="table">
  31198. <dt><samp class="option">N</samp></dt>
  31199. <dd><p>The sequential number of the filtered frame, starting from <code class="code">0</code>.
  31200. </p>
  31201. </dd>
  31202. <dt><samp class="option">X</samp></dt>
  31203. <dt><samp class="option">Y</samp></dt>
  31204. <dd><p>The coordinates of the current sample.
  31205. </p>
  31206. </dd>
  31207. <dt><samp class="option">W</samp></dt>
  31208. <dt><samp class="option">H</samp></dt>
  31209. <dd><p>The width and height of the image.
  31210. </p>
  31211. </dd>
  31212. <dt><samp class="option">SW</samp></dt>
  31213. <dt><samp class="option">SH</samp></dt>
  31214. <dd><p>Width and height scale depending on the currently filtered plane. It is the
  31215. ratio between the corresponding luma plane number of pixels and the current
  31216. plane ones. E.g. for YUV4:2:0 the values are <code class="code">1,1</code> for the luma plane, and
  31217. <code class="code">0.5,0.5</code> for chroma planes.
  31218. </p>
  31219. </dd>
  31220. <dt><samp class="option">T</samp></dt>
  31221. <dd><p>Time of the current frame, expressed in seconds.
  31222. </p>
  31223. </dd>
  31224. <dt><samp class="option">p(x, y)</samp></dt>
  31225. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the current
  31226. plane.
  31227. </p>
  31228. </dd>
  31229. <dt><samp class="option">lum(x, y)</samp></dt>
  31230. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the luma
  31231. plane.
  31232. </p>
  31233. </dd>
  31234. <dt><samp class="option">cb(x, y)</samp></dt>
  31235. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the
  31236. blue-difference chroma plane. Return 0 if there is no such plane.
  31237. </p>
  31238. </dd>
  31239. <dt><samp class="option">cr(x, y)</samp></dt>
  31240. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the
  31241. red-difference chroma plane. Return 0 if there is no such plane.
  31242. </p>
  31243. </dd>
  31244. <dt><samp class="option">r(x, y)</samp></dt>
  31245. <dt><samp class="option">g(x, y)</samp></dt>
  31246. <dt><samp class="option">b(x, y)</samp></dt>
  31247. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the
  31248. red/green/blue component. Return 0 if there is no such component.
  31249. </p>
  31250. </dd>
  31251. <dt><samp class="option">alpha(x, y)</samp></dt>
  31252. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the alpha
  31253. plane. Return 0 if there is no such plane.
  31254. </p>
  31255. </dd>
  31256. <dt><samp class="option">psum(x,y), lumsum(x, y), cbsum(x,y), crsum(x,y), rsum(x,y), gsum(x,y), bsum(x,y), alphasum(x,y)</samp></dt>
  31257. <dd><p>Sum of sample values in the rectangle from (0,0) to (x,y), this allows obtaining
  31258. sums of samples within a rectangle. See the functions without the sum postfix.
  31259. </p>
  31260. </dd>
  31261. <dt><samp class="option">interpolation</samp></dt>
  31262. <dd><p>Set one of interpolation methods:
  31263. </p><dl class="table">
  31264. <dt><samp class="option">nearest, n</samp></dt>
  31265. <dt><samp class="option">bilinear, b</samp></dt>
  31266. </dl>
  31267. <p>Default is bilinear.
  31268. </p></dd>
  31269. </dl>
  31270. <p>For functions, if <var class="var">x</var> and <var class="var">y</var> are outside the area, the value will be
  31271. automatically clipped to the closer edge.
  31272. </p>
  31273. <p>Please note that this filter can use multiple threads in which case each slice
  31274. will have its own expression state. If you want to use only a single expression
  31275. state because your expressions depend on previous state then you should limit
  31276. the number of filter threads to 1.
  31277. </p>
  31278. <ul class="mini-toc">
  31279. <li><a href="#Examples-98" accesskey="1">Examples</a></li>
  31280. </ul>
  31281. <div class="subsection-level-extent" id="Examples-98">
  31282. <h4 class="subsection"><span>32.110.1 Examples<a class="copiable-link" href="#Examples-98"> &para;</a></span></h4>
  31283. <ul class="itemize mark-bullet">
  31284. <li>Flip the image horizontally:
  31285. <div class="example">
  31286. <pre class="example-preformatted">geq=p(W-X\,Y)
  31287. </pre></div>
  31288. </li><li>Generate a bidimensional sine wave, with angle <code class="code">PI/3</code> and a
  31289. wavelength of 100 pixels:
  31290. <div class="example">
  31291. <pre class="example-preformatted">geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
  31292. </pre></div>
  31293. </li><li>Generate a fancy enigmatic moving light:
  31294. <div class="example">
  31295. <pre class="example-preformatted">nullsrc=s=256x256,geq=random(1)/hypot(X-cos(N*0.07)*W/2-W/2\,Y-sin(N*0.09)*H/2-H/2)^2*1000000*sin(N*0.02):128:128
  31296. </pre></div>
  31297. </li><li>Generate a quick emboss effect:
  31298. <div class="example">
  31299. <pre class="example-preformatted">format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'
  31300. </pre></div>
  31301. </li><li>Modify RGB components depending on pixel position:
  31302. <div class="example">
  31303. <pre class="example-preformatted">geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
  31304. </pre></div>
  31305. </li><li>Create a radial gradient that is the same size as the input (also see
  31306. the <a class="ref" href="#vignette">vignette</a> filter):
  31307. <div class="example">
  31308. <pre class="example-preformatted">geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
  31309. </pre></div>
  31310. </li></ul>
  31311. </div>
  31312. </div>
  31313. <div class="section-level-extent" id="gradfun">
  31314. <h3 class="section"><span>32.111 gradfun<a class="copiable-link" href="#gradfun"> &para;</a></span></h3>
  31315. <p>Fix the banding artifacts that are sometimes introduced into nearly flat
  31316. regions by truncation to 8-bit color depth.
  31317. Interpolate the gradients that should go where the bands are, and
  31318. dither them.
  31319. </p>
  31320. <p>It is designed for playback only. Do not use it prior to
  31321. lossy compression, because compression tends to lose the dither and
  31322. bring back the bands.
  31323. </p>
  31324. <p>It accepts the following parameters:
  31325. </p>
  31326. <dl class="table">
  31327. <dt><samp class="option">strength</samp></dt>
  31328. <dd><p>The maximum amount by which the filter will change any one pixel. This is also
  31329. the threshold for detecting nearly flat regions. Acceptable values range from
  31330. .51 to 64; the default value is 1.2. Out-of-range values will be clipped to the
  31331. valid range.
  31332. </p>
  31333. </dd>
  31334. <dt><samp class="option">radius</samp></dt>
  31335. <dd><p>The neighborhood to fit the gradient to. A larger radius makes for smoother
  31336. gradients, but also prevents the filter from modifying the pixels near detailed
  31337. regions. Acceptable values are 8-32; the default value is 16. Out-of-range
  31338. values will be clipped to the valid range.
  31339. </p>
  31340. </dd>
  31341. </dl>
  31342. <p>Alternatively, the options can be specified as a flat string:
  31343. <var class="var">strength</var>[:<var class="var">radius</var>]
  31344. </p>
  31345. <ul class="mini-toc">
  31346. <li><a href="#Examples-99" accesskey="1">Examples</a></li>
  31347. </ul>
  31348. <div class="subsection-level-extent" id="Examples-99">
  31349. <h4 class="subsection"><span>32.111.1 Examples<a class="copiable-link" href="#Examples-99"> &para;</a></span></h4>
  31350. <ul class="itemize mark-bullet">
  31351. <li>Apply the filter with a <code class="code">3.5</code> strength and radius of <code class="code">8</code>:
  31352. <div class="example">
  31353. <pre class="example-preformatted">gradfun=3.5:8
  31354. </pre></div>
  31355. </li><li>Specify radius, omitting the strength (which will fall-back to the default
  31356. value):
  31357. <div class="example">
  31358. <pre class="example-preformatted">gradfun=radius=8
  31359. </pre></div>
  31360. </li></ul>
  31361. <a class="anchor" id="graphmonitor"></a></div>
  31362. </div>
  31363. <div class="section-level-extent" id="graphmonitor-1">
  31364. <h3 class="section"><span>32.112 graphmonitor<a class="copiable-link" href="#graphmonitor-1"> &para;</a></span></h3>
  31365. <p>Show various filtergraph stats.
  31366. </p>
  31367. <p>With this filter one can debug complete filtergraph.
  31368. Especially issues with links filling with queued frames.
  31369. </p>
  31370. <p>The filter accepts the following options:
  31371. </p>
  31372. <dl class="table">
  31373. <dt><samp class="option">size, s</samp></dt>
  31374. <dd><p>Set video output size. Default is <var class="var">hd720</var>.
  31375. </p>
  31376. </dd>
  31377. <dt><samp class="option">opacity, o</samp></dt>
  31378. <dd><p>Set video opacity. Default is <var class="var">0.9</var>. Allowed range is from <var class="var">0</var> to <var class="var">1</var>.
  31379. </p>
  31380. </dd>
  31381. <dt><samp class="option">mode, m</samp></dt>
  31382. <dd><p>Set output mode flags.
  31383. </p>
  31384. <p>Available values for flags are:
  31385. </p><dl class="table">
  31386. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  31387. <dd><p>No any filtering. Default.
  31388. </p></dd>
  31389. <dt>&lsquo;<samp class="samp">compact</samp>&rsquo;</dt>
  31390. <dd><p>Show only filters with queued frames.
  31391. </p></dd>
  31392. <dt>&lsquo;<samp class="samp">nozero</samp>&rsquo;</dt>
  31393. <dd><p>Show only filters with non-zero stats.
  31394. </p></dd>
  31395. <dt>&lsquo;<samp class="samp">noeof</samp>&rsquo;</dt>
  31396. <dd><p>Show only filters with non-eof stat.
  31397. </p></dd>
  31398. <dt>&lsquo;<samp class="samp">nodisabled</samp>&rsquo;</dt>
  31399. <dd><p>Show only filters that are enabled in timeline.
  31400. </p></dd>
  31401. </dl>
  31402. </dd>
  31403. <dt><samp class="option">flags, f</samp></dt>
  31404. <dd><p>Set flags which enable which stats are shown in video.
  31405. </p>
  31406. <p>Available values for flags are:
  31407. </p><dl class="table">
  31408. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  31409. <dd><p>All flags turned off.
  31410. </p>
  31411. </dd>
  31412. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  31413. <dd><p>All flags turned on.
  31414. </p>
  31415. </dd>
  31416. <dt>&lsquo;<samp class="samp">queue</samp>&rsquo;</dt>
  31417. <dd><p>Display number of queued frames in each link.
  31418. </p>
  31419. </dd>
  31420. <dt>&lsquo;<samp class="samp">frame_count_in</samp>&rsquo;</dt>
  31421. <dd><p>Display number of frames taken from filter.
  31422. </p>
  31423. </dd>
  31424. <dt>&lsquo;<samp class="samp">frame_count_out</samp>&rsquo;</dt>
  31425. <dd><p>Display number of frames given out from filter.
  31426. </p>
  31427. </dd>
  31428. <dt>&lsquo;<samp class="samp">frame_count_delta</samp>&rsquo;</dt>
  31429. <dd><p>Display delta number of frames between above two values.
  31430. </p>
  31431. </dd>
  31432. <dt>&lsquo;<samp class="samp">pts</samp>&rsquo;</dt>
  31433. <dd><p>Display current filtered frame pts.
  31434. </p>
  31435. </dd>
  31436. <dt>&lsquo;<samp class="samp">pts_delta</samp>&rsquo;</dt>
  31437. <dd><p>Display pts delta between current and previous frame.
  31438. </p>
  31439. </dd>
  31440. <dt>&lsquo;<samp class="samp">time</samp>&rsquo;</dt>
  31441. <dd><p>Display current filtered frame time.
  31442. </p>
  31443. </dd>
  31444. <dt>&lsquo;<samp class="samp">time_delta</samp>&rsquo;</dt>
  31445. <dd><p>Display time delta between current and previous frame.
  31446. </p>
  31447. </dd>
  31448. <dt>&lsquo;<samp class="samp">timebase</samp>&rsquo;</dt>
  31449. <dd><p>Display time base for filter link.
  31450. </p>
  31451. </dd>
  31452. <dt>&lsquo;<samp class="samp">format</samp>&rsquo;</dt>
  31453. <dd><p>Display used format for filter link.
  31454. </p>
  31455. </dd>
  31456. <dt>&lsquo;<samp class="samp">size</samp>&rsquo;</dt>
  31457. <dd><p>Display video size or number of audio channels in case of audio used by filter link.
  31458. </p>
  31459. </dd>
  31460. <dt>&lsquo;<samp class="samp">rate</samp>&rsquo;</dt>
  31461. <dd><p>Display video frame rate or sample rate in case of audio used by filter link.
  31462. </p>
  31463. </dd>
  31464. <dt>&lsquo;<samp class="samp">eof</samp>&rsquo;</dt>
  31465. <dd><p>Display link output status.
  31466. </p>
  31467. </dd>
  31468. <dt>&lsquo;<samp class="samp">sample_count_in</samp>&rsquo;</dt>
  31469. <dd><p>Display number of samples taken from filter.
  31470. </p>
  31471. </dd>
  31472. <dt>&lsquo;<samp class="samp">sample_count_out</samp>&rsquo;</dt>
  31473. <dd><p>Display number of samples given out from filter.
  31474. </p>
  31475. </dd>
  31476. <dt>&lsquo;<samp class="samp">sample_count_delta</samp>&rsquo;</dt>
  31477. <dd><p>Display delta number of samples between above two values.
  31478. </p>
  31479. </dd>
  31480. <dt>&lsquo;<samp class="samp">disabled</samp>&rsquo;</dt>
  31481. <dd><p>Show the timeline filter status.
  31482. </p></dd>
  31483. </dl>
  31484. </dd>
  31485. <dt><samp class="option">rate, r</samp></dt>
  31486. <dd><p>Set upper limit for video rate of output stream, Default value is <var class="var">25</var>.
  31487. This guarantee that output video frame rate will not be higher than this value.
  31488. </p></dd>
  31489. </dl>
  31490. </div>
  31491. <div class="section-level-extent" id="grayworld">
  31492. <h3 class="section"><span>32.113 grayworld<a class="copiable-link" href="#grayworld"> &para;</a></span></h3>
  31493. <p>A color constancy filter that applies color correction based on the grayworld assumption
  31494. </p>
  31495. <p>See: <a class="url" href="https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging">https://www.researchgate.net/publication/275213614_A_New_Color_Correction_Method_for_Underwater_Imaging</a>
  31496. </p>
  31497. <p>The algorithm uses linear light, so input
  31498. data should be linearized beforehand (and possibly correctly tagged).
  31499. </p>
  31500. <div class="example">
  31501. <pre class="example-preformatted">ffmpeg -i INPUT -vf zscale=transfer=linear,grayworld,zscale=transfer=bt709,format=yuv420p OUTPUT
  31502. </pre></div>
  31503. </div>
  31504. <div class="section-level-extent" id="greyedge">
  31505. <h3 class="section"><span>32.114 greyedge<a class="copiable-link" href="#greyedge"> &para;</a></span></h3>
  31506. <p>A color constancy variation filter which estimates scene illumination via grey edge algorithm
  31507. and corrects the scene colors accordingly.
  31508. </p>
  31509. <p>See: <a class="url" href="https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf">https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf</a>
  31510. </p>
  31511. <p>The filter accepts the following options:
  31512. </p>
  31513. <dl class="table">
  31514. <dt><samp class="option">difford</samp></dt>
  31515. <dd><p>The order of differentiation to be applied on the scene. Must be chosen in the range
  31516. [0,2] and default value is 1.
  31517. </p>
  31518. </dd>
  31519. <dt><samp class="option">minknorm</samp></dt>
  31520. <dd><p>The Minkowski parameter to be used for calculating the Minkowski distance. Must
  31521. be chosen in the range [0,20] and default value is 1. Set to 0 for getting
  31522. max value instead of calculating Minkowski distance.
  31523. </p>
  31524. </dd>
  31525. <dt><samp class="option">sigma</samp></dt>
  31526. <dd><p>The standard deviation of Gaussian blur to be applied on the scene. Must be
  31527. chosen in the range [0,1024.0] and default value = 1. floor( <var class="var">sigma</var> * break_off_sigma(3) )
  31528. can&rsquo;t be equal to 0 if <var class="var">difford</var> is greater than 0.
  31529. </p></dd>
  31530. </dl>
  31531. <ul class="mini-toc">
  31532. <li><a href="#Examples-100" accesskey="1">Examples</a></li>
  31533. </ul>
  31534. <div class="subsection-level-extent" id="Examples-100">
  31535. <h4 class="subsection"><span>32.114.1 Examples<a class="copiable-link" href="#Examples-100"> &para;</a></span></h4>
  31536. <ul class="itemize mark-bullet">
  31537. <li>Grey Edge:
  31538. <div class="example">
  31539. <pre class="example-preformatted">greyedge=difford=1:minknorm=5:sigma=2
  31540. </pre></div>
  31541. </li><li>Max Edge:
  31542. <div class="example">
  31543. <pre class="example-preformatted">greyedge=difford=1:minknorm=0:sigma=2
  31544. </pre></div>
  31545. </li></ul>
  31546. </div>
  31547. </div>
  31548. <div class="section-level-extent" id="guided">
  31549. <h3 class="section"><span>32.115 guided<a class="copiable-link" href="#guided"> &para;</a></span></h3>
  31550. <p>Apply guided filter for edge-preserving smoothing, dehazing and so on.
  31551. </p>
  31552. <p>The filter accepts the following options:
  31553. </p><dl class="table">
  31554. <dt><samp class="option">radius</samp></dt>
  31555. <dd><p>Set the box radius in pixels.
  31556. Allowed range is 1 to 20. Default is 3.
  31557. </p>
  31558. </dd>
  31559. <dt><samp class="option">eps</samp></dt>
  31560. <dd><p>Set regularization parameter (with square).
  31561. Allowed range is 0 to 1. Default is 0.01.
  31562. </p>
  31563. </dd>
  31564. <dt><samp class="option">mode</samp></dt>
  31565. <dd><p>Set filter mode. Can be <code class="code">basic</code> or <code class="code">fast</code>.
  31566. Default is <code class="code">basic</code>.
  31567. </p>
  31568. </dd>
  31569. <dt><samp class="option">sub</samp></dt>
  31570. <dd><p>Set subsampling ratio for <code class="code">fast</code> mode.
  31571. Range is 2 to 64. Default is 4.
  31572. No subsampling occurs in <code class="code">basic</code> mode.
  31573. </p>
  31574. </dd>
  31575. <dt><samp class="option">guidance</samp></dt>
  31576. <dd><p>Set guidance mode. Can be <code class="code">off</code> or <code class="code">on</code>. Default is <code class="code">off</code>.
  31577. If <code class="code">off</code>, single input is required.
  31578. If <code class="code">on</code>, two inputs of the same resolution and pixel format are required.
  31579. The second input serves as the guidance.
  31580. </p>
  31581. </dd>
  31582. <dt><samp class="option">planes</samp></dt>
  31583. <dd><p>Set planes to filter. Default is first only.
  31584. </p></dd>
  31585. </dl>
  31586. <ul class="mini-toc">
  31587. <li><a href="#Commands-96" accesskey="1">Commands</a></li>
  31588. <li><a href="#Examples-101" accesskey="2">Examples</a></li>
  31589. </ul>
  31590. <div class="subsection-level-extent" id="Commands-96">
  31591. <h4 class="subsection"><span>32.115.1 Commands<a class="copiable-link" href="#Commands-96"> &para;</a></span></h4>
  31592. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  31593. </p>
  31594. </div>
  31595. <div class="subsection-level-extent" id="Examples-101">
  31596. <h4 class="subsection"><span>32.115.2 Examples<a class="copiable-link" href="#Examples-101"> &para;</a></span></h4>
  31597. <ul class="itemize mark-bullet">
  31598. <li>Edge-preserving smoothing with guided filter:
  31599. <div class="example">
  31600. <pre class="example-preformatted">ffmpeg -i in.png -vf guided out.png
  31601. </pre></div>
  31602. </li><li>Dehazing, structure-transferring filtering, detail enhancement with guided filter.
  31603. For the generation of guidance image, refer to paper &quot;Guided Image Filtering&quot;.
  31604. See: <a class="url" href="http://kaiminghe.com/publications/pami12guidedfilter.pdf">http://kaiminghe.com/publications/pami12guidedfilter.pdf</a>.
  31605. <div class="example">
  31606. <pre class="example-preformatted">ffmpeg -i in.png -i guidance.png -filter_complex guided=guidance=on out.png
  31607. </pre></div>
  31608. </li></ul>
  31609. <a class="anchor" id="haldclut"></a></div>
  31610. </div>
  31611. <div class="section-level-extent" id="haldclut-1">
  31612. <h3 class="section"><span>32.116 haldclut<a class="copiable-link" href="#haldclut-1"> &para;</a></span></h3>
  31613. <p>Apply a Hald CLUT to a video stream.
  31614. </p>
  31615. <p>First input is the video stream to process, and second one is the Hald CLUT.
  31616. The Hald CLUT input can be a simple picture or a complete video stream.
  31617. </p>
  31618. <p>The filter accepts the following options:
  31619. </p>
  31620. <dl class="table">
  31621. <dt><samp class="option">clut</samp></dt>
  31622. <dd><p>Set which CLUT video frames will be processed from second input stream,
  31623. can be <var class="var">first</var> or <var class="var">all</var>. Default is <var class="var">all</var>.
  31624. </p>
  31625. </dd>
  31626. <dt><samp class="option">shortest</samp></dt>
  31627. <dd><p>Force termination when the shortest input terminates. Default is <code class="code">0</code>.
  31628. </p></dd>
  31629. <dt><samp class="option">repeatlast</samp></dt>
  31630. <dd><p>Continue applying the last CLUT after the end of the stream. A value of
  31631. <code class="code">0</code> disable the filter after the last frame of the CLUT is reached.
  31632. Default is <code class="code">1</code>.
  31633. </p></dd>
  31634. </dl>
  31635. <p><code class="code">haldclut</code> also has the same interpolation options as <a class="ref" href="#lut3d">lut3d</a> (both
  31636. filters share the same internals).
  31637. </p>
  31638. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  31639. </p>
  31640. <p>More information about the Hald CLUT can be found on Eskil Steenberg&rsquo;s website
  31641. (Hald CLUT author) at <a class="url" href="http://www.quelsolaar.com/technology/clut.html">http://www.quelsolaar.com/technology/clut.html</a>.
  31642. </p>
  31643. <ul class="mini-toc">
  31644. <li><a href="#Commands-97" accesskey="1">Commands</a></li>
  31645. <li><a href="#Workflow-examples" accesskey="2">Workflow examples</a></li>
  31646. </ul>
  31647. <div class="subsection-level-extent" id="Commands-97">
  31648. <h4 class="subsection"><span>32.116.1 Commands<a class="copiable-link" href="#Commands-97"> &para;</a></span></h4>
  31649. <p>This filter supports the <code class="code">interp</code> option as <a class="ref" href="#commands">commands</a>.
  31650. </p>
  31651. </div>
  31652. <div class="subsection-level-extent" id="Workflow-examples">
  31653. <h4 class="subsection"><span>32.116.2 Workflow examples<a class="copiable-link" href="#Workflow-examples"> &para;</a></span></h4>
  31654. <ul class="mini-toc">
  31655. <li><a href="#Hald-CLUT-video-stream" accesskey="1">Hald CLUT video stream</a></li>
  31656. <li><a href="#Hald-CLUT-with-preview" accesskey="2">Hald CLUT with preview</a></li>
  31657. </ul>
  31658. <div class="subsubsection-level-extent" id="Hald-CLUT-video-stream">
  31659. <h4 class="subsubsection"><span>32.116.2.1 Hald CLUT video stream<a class="copiable-link" href="#Hald-CLUT-video-stream"> &para;</a></span></h4>
  31660. <p>Generate an identity Hald CLUT stream altered with various effects:
  31661. </p><div class="example">
  31662. <pre class="example-preformatted">ffmpeg -f lavfi -i <a class="ref" href="#haldclutsrc">haldclutsrc</a>=8 -vf &quot;hue=H=2*PI*t:s=sin(2*PI*t)+1, curves=cross_process&quot; -t 10 -c:v ffv1 clut.nut
  31663. </pre></div>
  31664. <p>Note: make sure you use a lossless codec.
  31665. </p>
  31666. <p>Then use it with <code class="code">haldclut</code> to apply it on some random stream:
  31667. </p><div class="example">
  31668. <pre class="example-preformatted">ffmpeg -f lavfi -i mandelbrot -i clut.nut -filter_complex '[0][1] haldclut' -t 20 mandelclut.mkv
  31669. </pre></div>
  31670. <p>The Hald CLUT will be applied to the 10 first seconds (duration of
  31671. <samp class="file">clut.nut</samp>), then the latest picture of that CLUT stream will be applied
  31672. to the remaining frames of the <code class="code">mandelbrot</code> stream.
  31673. </p>
  31674. </div>
  31675. <div class="subsubsection-level-extent" id="Hald-CLUT-with-preview">
  31676. <h4 class="subsubsection"><span>32.116.2.2 Hald CLUT with preview<a class="copiable-link" href="#Hald-CLUT-with-preview"> &para;</a></span></h4>
  31677. <p>A Hald CLUT is supposed to be a squared image of <code class="code">Level*Level*Level</code> by
  31678. <code class="code">Level*Level*Level</code> pixels. For a given Hald CLUT, FFmpeg will select the
  31679. biggest possible square starting at the top left of the picture. The remaining
  31680. padding pixels (bottom or right) will be ignored. This area can be used to add
  31681. a preview of the Hald CLUT.
  31682. </p>
  31683. <p>Typically, the following generated Hald CLUT will be supported by the
  31684. <code class="code">haldclut</code> filter:
  31685. </p>
  31686. <div class="example">
  31687. <pre class="example-preformatted">ffmpeg -f lavfi -i <a class="ref" href="#haldclutsrc">haldclutsrc</a>=8 -vf &quot;
  31688. pad=iw+320 [padded_clut];
  31689. smptebars=s=320x256, split [a][b];
  31690. [padded_clut][a] overlay=W-320:h, curves=color_negative [main];
  31691. [main][b] overlay=W-320&quot; -frames:v 1 clut.png
  31692. </pre></div>
  31693. <p>It contains the original and a preview of the effect of the CLUT: SMPTE color
  31694. bars are displayed on the right-top, and below the same color bars processed by
  31695. the color changes.
  31696. </p>
  31697. <p>Then, the effect of this Hald CLUT can be visualized with:
  31698. </p><div class="example">
  31699. <pre class="example-preformatted">ffplay input.mkv -vf &quot;movie=clut.png, [in] haldclut&quot;
  31700. </pre></div>
  31701. </div>
  31702. </div>
  31703. </div>
  31704. <div class="section-level-extent" id="hflip">
  31705. <h3 class="section"><span>32.117 hflip<a class="copiable-link" href="#hflip"> &para;</a></span></h3>
  31706. <p>Flip the input video horizontally.
  31707. </p>
  31708. <p>For example, to horizontally flip the input video with <code class="command">ffmpeg</code>:
  31709. </p><div class="example">
  31710. <pre class="example-preformatted">ffmpeg -i in.avi -vf &quot;hflip&quot; out.avi
  31711. </pre></div>
  31712. </div>
  31713. <div class="section-level-extent" id="histeq">
  31714. <h3 class="section"><span>32.118 histeq<a class="copiable-link" href="#histeq"> &para;</a></span></h3>
  31715. <p>This filter applies a global color histogram equalization on a
  31716. per-frame basis.
  31717. </p>
  31718. <p>It can be used to correct video that has a compressed range of pixel
  31719. intensities. The filter redistributes the pixel intensities to
  31720. equalize their distribution across the intensity range. It may be
  31721. viewed as an &quot;automatically adjusting contrast filter&quot;. This filter is
  31722. useful only for correcting degraded or poorly captured source
  31723. video.
  31724. </p>
  31725. <p>The filter accepts the following options:
  31726. </p>
  31727. <dl class="table">
  31728. <dt><samp class="option">strength</samp></dt>
  31729. <dd><p>Determine the amount of equalization to be applied. As the strength
  31730. is reduced, the distribution of pixel intensities more-and-more
  31731. approaches that of the input frame. The value must be a float number
  31732. in the range [0,1] and defaults to 0.200.
  31733. </p>
  31734. </dd>
  31735. <dt><samp class="option">intensity</samp></dt>
  31736. <dd><p>Set the maximum intensity that can generated and scale the output
  31737. values appropriately. The strength should be set as desired and then
  31738. the intensity can be limited if needed to avoid washing-out. The value
  31739. must be a float number in the range [0,1] and defaults to 0.210.
  31740. </p>
  31741. </dd>
  31742. <dt><samp class="option">antibanding</samp></dt>
  31743. <dd><p>Set the antibanding level. If enabled the filter will randomly vary
  31744. the luminance of output pixels by a small amount to avoid banding of
  31745. the histogram. Possible values are <code class="code">none</code>, <code class="code">weak</code> or
  31746. <code class="code">strong</code>. It defaults to <code class="code">none</code>.
  31747. </p></dd>
  31748. </dl>
  31749. <a class="anchor" id="histogram"></a></div>
  31750. <div class="section-level-extent" id="histogram-1">
  31751. <h3 class="section"><span>32.119 histogram<a class="copiable-link" href="#histogram-1"> &para;</a></span></h3>
  31752. <p>Compute and draw a color distribution histogram for the input video.
  31753. </p>
  31754. <p>The computed histogram is a representation of the color component
  31755. distribution in an image.
  31756. </p>
  31757. <p>Standard histogram displays the color components distribution in an image.
  31758. Displays color graph for each color component. Shows distribution of
  31759. the Y, U, V, A or R, G, B components, depending on input format, in the
  31760. current frame. Below each graph a color component scale meter is shown.
  31761. </p>
  31762. <p>The filter accepts the following options:
  31763. </p>
  31764. <dl class="table">
  31765. <dt><samp class="option">level_height</samp></dt>
  31766. <dd><p>Set height of level. Default value is <code class="code">200</code>.
  31767. Allowed range is [50, 2048].
  31768. </p>
  31769. </dd>
  31770. <dt><samp class="option">scale_height</samp></dt>
  31771. <dd><p>Set height of color scale. Default value is <code class="code">12</code>.
  31772. Allowed range is [0, 40].
  31773. </p>
  31774. </dd>
  31775. <dt><samp class="option">display_mode</samp></dt>
  31776. <dd><p>Set display mode.
  31777. It accepts the following values:
  31778. </p><dl class="table">
  31779. <dt>&lsquo;<samp class="samp">stack</samp>&rsquo;</dt>
  31780. <dd><p>Per color component graphs are placed below each other.
  31781. </p>
  31782. </dd>
  31783. <dt>&lsquo;<samp class="samp">parade</samp>&rsquo;</dt>
  31784. <dd><p>Per color component graphs are placed side by side.
  31785. </p>
  31786. </dd>
  31787. <dt>&lsquo;<samp class="samp">overlay</samp>&rsquo;</dt>
  31788. <dd><p>Presents information identical to that in the <code class="code">parade</code>, except
  31789. that the graphs representing color components are superimposed directly
  31790. over one another.
  31791. </p></dd>
  31792. </dl>
  31793. <p>Default is <code class="code">stack</code>.
  31794. </p>
  31795. </dd>
  31796. <dt><samp class="option">levels_mode</samp></dt>
  31797. <dd><p>Set mode. Can be either <code class="code">linear</code>, or <code class="code">logarithmic</code>.
  31798. Default is <code class="code">linear</code>.
  31799. </p>
  31800. </dd>
  31801. <dt><samp class="option">components</samp></dt>
  31802. <dd><p>Set what color components to display.
  31803. Default is <code class="code">7</code>.
  31804. </p>
  31805. </dd>
  31806. <dt><samp class="option">fgopacity</samp></dt>
  31807. <dd><p>Set foreground opacity. Default is <code class="code">0.7</code>.
  31808. </p>
  31809. </dd>
  31810. <dt><samp class="option">bgopacity</samp></dt>
  31811. <dd><p>Set background opacity. Default is <code class="code">0.5</code>.
  31812. </p>
  31813. </dd>
  31814. <dt><samp class="option">colors_mode</samp></dt>
  31815. <dd><p>Set colors mode.
  31816. It accepts the following values:
  31817. </p><dl class="table">
  31818. <dt>&lsquo;<samp class="samp">whiteonblack</samp>&rsquo;</dt>
  31819. <dt>&lsquo;<samp class="samp">blackonwhite</samp>&rsquo;</dt>
  31820. <dt>&lsquo;<samp class="samp">whiteongray</samp>&rsquo;</dt>
  31821. <dt>&lsquo;<samp class="samp">blackongray</samp>&rsquo;</dt>
  31822. <dt>&lsquo;<samp class="samp">coloronblack</samp>&rsquo;</dt>
  31823. <dt>&lsquo;<samp class="samp">coloronwhite</samp>&rsquo;</dt>
  31824. <dt>&lsquo;<samp class="samp">colorongray</samp>&rsquo;</dt>
  31825. <dt>&lsquo;<samp class="samp">blackoncolor</samp>&rsquo;</dt>
  31826. <dt>&lsquo;<samp class="samp">whiteoncolor</samp>&rsquo;</dt>
  31827. <dt>&lsquo;<samp class="samp">grayoncolor</samp>&rsquo;</dt>
  31828. </dl>
  31829. <p>Default is <code class="code">whiteonblack</code>.
  31830. </p></dd>
  31831. </dl>
  31832. <ul class="mini-toc">
  31833. <li><a href="#Examples-102" accesskey="1">Examples</a></li>
  31834. </ul>
  31835. <div class="subsection-level-extent" id="Examples-102">
  31836. <h4 class="subsection"><span>32.119.1 Examples<a class="copiable-link" href="#Examples-102"> &para;</a></span></h4>
  31837. <ul class="itemize mark-bullet">
  31838. <li>Calculate and draw histogram:
  31839. <div class="example">
  31840. <pre class="example-preformatted">ffplay -i input -vf histogram
  31841. </pre></div>
  31842. </li></ul>
  31843. <a class="anchor" id="hqdn3d"></a></div>
  31844. </div>
  31845. <div class="section-level-extent" id="hqdn3d-1">
  31846. <h3 class="section"><span>32.120 hqdn3d<a class="copiable-link" href="#hqdn3d-1"> &para;</a></span></h3>
  31847. <p>This is a high precision/quality 3d denoise filter. It aims to reduce
  31848. image noise, producing smooth images and making still images really
  31849. still. It should enhance compressibility.
  31850. </p>
  31851. <p>It accepts the following optional parameters:
  31852. </p>
  31853. <dl class="table">
  31854. <dt><samp class="option">luma_spatial</samp></dt>
  31855. <dd><p>A non-negative floating point number which specifies spatial luma strength.
  31856. It defaults to 4.0.
  31857. </p>
  31858. </dd>
  31859. <dt><samp class="option">chroma_spatial</samp></dt>
  31860. <dd><p>A non-negative floating point number which specifies spatial chroma strength.
  31861. It defaults to 3.0*<var class="var">luma_spatial</var>/4.0.
  31862. </p>
  31863. </dd>
  31864. <dt><samp class="option">luma_tmp</samp></dt>
  31865. <dd><p>A floating point number which specifies luma temporal strength. It defaults to
  31866. 6.0*<var class="var">luma_spatial</var>/4.0.
  31867. </p>
  31868. </dd>
  31869. <dt><samp class="option">chroma_tmp</samp></dt>
  31870. <dd><p>A floating point number which specifies chroma temporal strength. It defaults to
  31871. <var class="var">luma_tmp</var>*<var class="var">chroma_spatial</var>/<var class="var">luma_spatial</var>.
  31872. </p></dd>
  31873. </dl>
  31874. <ul class="mini-toc">
  31875. <li><a href="#Commands-98" accesskey="1">Commands</a></li>
  31876. </ul>
  31877. <div class="subsection-level-extent" id="Commands-98">
  31878. <h4 class="subsection"><span>32.120.1 Commands<a class="copiable-link" href="#Commands-98"> &para;</a></span></h4>
  31879. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  31880. The command accepts the same syntax of the corresponding option.
  31881. </p>
  31882. <p>If the specified expression is not valid, it is kept at its current
  31883. value.
  31884. </p>
  31885. <a class="anchor" id="hwdownload"></a></div>
  31886. </div>
  31887. <div class="section-level-extent" id="hwdownload-1">
  31888. <h3 class="section"><span>32.121 hwdownload<a class="copiable-link" href="#hwdownload-1"> &para;</a></span></h3>
  31889. <p>Download hardware frames to system memory.
  31890. </p>
  31891. <p>The input must be in hardware frames, and the output a non-hardware format.
  31892. Not all formats will be supported on the output - it may be necessary to insert
  31893. an additional <samp class="option">format</samp> filter immediately following in the graph to get
  31894. the output in a supported format.
  31895. </p>
  31896. </div>
  31897. <div class="section-level-extent" id="hwmap">
  31898. <h3 class="section"><span>32.122 hwmap<a class="copiable-link" href="#hwmap"> &para;</a></span></h3>
  31899. <p>Map hardware frames to system memory or to another device.
  31900. </p>
  31901. <p>This filter has several different modes of operation; which one is used depends
  31902. on the input and output formats:
  31903. </p><ul class="itemize mark-bullet">
  31904. <li>Hardware frame input, normal frame output
  31905. <p>Map the input frames to system memory and pass them to the output. If the
  31906. original hardware frame is later required (for example, after overlaying
  31907. something else on part of it), the <samp class="option">hwmap</samp> filter can be used again
  31908. in the next mode to retrieve it.
  31909. </p></li><li>Normal frame input, hardware frame output
  31910. <p>If the input is actually a software-mapped hardware frame, then unmap it -
  31911. that is, return the original hardware frame.
  31912. </p>
  31913. <p>Otherwise, a device must be provided. Create new hardware surfaces on that
  31914. device for the output, then map them back to the software format at the input
  31915. and give those frames to the preceding filter. This will then act like the
  31916. <samp class="option">hwupload</samp> filter, but may be able to avoid an additional copy when
  31917. the input is already in a compatible format.
  31918. </p></li><li>Hardware frame input and output
  31919. <p>A device must be supplied for the output, either directly or with the
  31920. <samp class="option">derive_device</samp> option. The input and output devices must be of
  31921. different types and compatible - the exact meaning of this is
  31922. system-dependent, but typically it means that they must refer to the same
  31923. underlying hardware context (for example, refer to the same graphics card).
  31924. </p>
  31925. <p>If the input frames were originally created on the output device, then unmap
  31926. to retrieve the original frames.
  31927. </p>
  31928. <p>Otherwise, map the frames to the output device - create new hardware frames
  31929. on the output corresponding to the frames on the input.
  31930. </p></li></ul>
  31931. <p>The following additional parameters are accepted:
  31932. </p>
  31933. <dl class="table">
  31934. <dt><samp class="option">mode</samp></dt>
  31935. <dd><p>Set the frame mapping mode. Some combination of:
  31936. </p><dl class="table">
  31937. <dt><var class="var">read</var></dt>
  31938. <dd><p>The mapped frame should be readable.
  31939. </p></dd>
  31940. <dt><var class="var">write</var></dt>
  31941. <dd><p>The mapped frame should be writeable.
  31942. </p></dd>
  31943. <dt><var class="var">overwrite</var></dt>
  31944. <dd><p>The mapping will always overwrite the entire frame.
  31945. </p>
  31946. <p>This may improve performance in some cases, as the original contents of the
  31947. frame need not be loaded.
  31948. </p></dd>
  31949. <dt><var class="var">direct</var></dt>
  31950. <dd><p>The mapping must not involve any copying.
  31951. </p>
  31952. <p>Indirect mappings to copies of frames are created in some cases where either
  31953. direct mapping is not possible or it would have unexpected properties.
  31954. Setting this flag ensures that the mapping is direct and will fail if that is
  31955. not possible.
  31956. </p></dd>
  31957. </dl>
  31958. <p>Defaults to <var class="var">read+write</var> if not specified.
  31959. </p>
  31960. </dd>
  31961. <dt><samp class="option">derive_device <var class="var">type</var></samp></dt>
  31962. <dd><p>Rather than using the device supplied at initialisation, instead derive a new
  31963. device of type <var class="var">type</var> from the device the input frames exist on.
  31964. </p>
  31965. </dd>
  31966. <dt><samp class="option">reverse</samp></dt>
  31967. <dd><p>In a hardware to hardware mapping, map in reverse - create frames in the sink
  31968. and map them back to the source. This may be necessary in some cases where
  31969. a mapping in one direction is required but only the opposite direction is
  31970. supported by the devices being used.
  31971. </p>
  31972. <p>This option is dangerous - it may break the preceding filter in undefined
  31973. ways if there are any additional constraints on that filter&rsquo;s output.
  31974. Do not use it without fully understanding the implications of its use.
  31975. </p></dd>
  31976. </dl>
  31977. <a class="anchor" id="hwupload"></a></div>
  31978. <div class="section-level-extent" id="hwupload-1">
  31979. <h3 class="section"><span>32.123 hwupload<a class="copiable-link" href="#hwupload-1"> &para;</a></span></h3>
  31980. <p>Upload system memory frames to hardware surfaces.
  31981. </p>
  31982. <p>The device to upload to must be supplied when the filter is initialised. If
  31983. using ffmpeg, select the appropriate device with the <samp class="option">-filter_hw_device</samp>
  31984. option or with the <samp class="option">derive_device</samp> option. The input and output devices
  31985. must be of different types and compatible - the exact meaning of this is
  31986. system-dependent, but typically it means that they must refer to the same
  31987. underlying hardware context (for example, refer to the same graphics card).
  31988. </p>
  31989. <p>The following additional parameters are accepted:
  31990. </p>
  31991. <dl class="table">
  31992. <dt><samp class="option">derive_device <var class="var">type</var></samp></dt>
  31993. <dd><p>Rather than using the device supplied at initialisation, instead derive a new
  31994. device of type <var class="var">type</var> from the device the input frames exist on.
  31995. </p></dd>
  31996. </dl>
  31997. <a class="anchor" id="hwupload_005fcuda"></a></div>
  31998. <div class="section-level-extent" id="hwupload_005fcuda-1">
  31999. <h3 class="section"><span>32.124 hwupload_cuda<a class="copiable-link" href="#hwupload_005fcuda-1"> &para;</a></span></h3>
  32000. <p>Upload system memory frames to a CUDA device.
  32001. </p>
  32002. <p>It accepts the following optional parameters:
  32003. </p>
  32004. <dl class="table">
  32005. <dt><samp class="option">device</samp></dt>
  32006. <dd><p>The number of the CUDA device to use
  32007. </p></dd>
  32008. </dl>
  32009. </div>
  32010. <div class="section-level-extent" id="hqx">
  32011. <h3 class="section"><span>32.125 hqx<a class="copiable-link" href="#hqx"> &para;</a></span></h3>
  32012. <p>Apply a high-quality magnification filter designed for pixel art. This filter
  32013. was originally created by Maxim Stepin.
  32014. </p>
  32015. <p>It accepts the following option:
  32016. </p>
  32017. <dl class="table">
  32018. <dt><samp class="option">n</samp></dt>
  32019. <dd><p>Set the scaling dimension: <code class="code">2</code> for <code class="code">hq2x</code>, <code class="code">3</code> for
  32020. <code class="code">hq3x</code> and <code class="code">4</code> for <code class="code">hq4x</code>.
  32021. Default is <code class="code">3</code>.
  32022. </p></dd>
  32023. </dl>
  32024. <a class="anchor" id="hstack"></a></div>
  32025. <div class="section-level-extent" id="hstack-1">
  32026. <h3 class="section"><span>32.126 hstack<a class="copiable-link" href="#hstack-1"> &para;</a></span></h3>
  32027. <p>Stack input videos horizontally.
  32028. </p>
  32029. <p>All streams must be of same pixel format and of same height.
  32030. </p>
  32031. <p>Note that this filter is faster than using <a class="ref" href="#overlay">overlay</a> and <a class="ref" href="#pad">pad</a> filter
  32032. to create same output.
  32033. </p>
  32034. <p>The filter accepts the following option:
  32035. </p>
  32036. <dl class="table">
  32037. <dt><samp class="option">inputs</samp></dt>
  32038. <dd><p>Set number of input streams. Default is 2.
  32039. </p>
  32040. </dd>
  32041. <dt><samp class="option">shortest</samp></dt>
  32042. <dd><p>If set to 1, force the output to terminate when the shortest input
  32043. terminates. Default value is 0.
  32044. </p></dd>
  32045. </dl>
  32046. </div>
  32047. <div class="section-level-extent" id="hsvhold">
  32048. <h3 class="section"><span>32.127 hsvhold<a class="copiable-link" href="#hsvhold"> &para;</a></span></h3>
  32049. <p>Turns a certain HSV range into gray values.
  32050. </p>
  32051. <p>This filter measures color difference between set HSV color in options
  32052. and ones measured in video stream. Depending on options, output
  32053. colors can be changed to be gray or not.
  32054. </p>
  32055. <p>The filter accepts the following options:
  32056. </p>
  32057. <dl class="table">
  32058. <dt><samp class="option">hue</samp></dt>
  32059. <dd><p>Set the hue value which will be used in color difference calculation.
  32060. Allowed range is from -360 to 360. Default value is 0.
  32061. </p>
  32062. </dd>
  32063. <dt><samp class="option">sat</samp></dt>
  32064. <dd><p>Set the saturation value which will be used in color difference calculation.
  32065. Allowed range is from -1 to 1. Default value is 0.
  32066. </p>
  32067. </dd>
  32068. <dt><samp class="option">val</samp></dt>
  32069. <dd><p>Set the value which will be used in color difference calculation.
  32070. Allowed range is from -1 to 1. Default value is 0.
  32071. </p>
  32072. </dd>
  32073. <dt><samp class="option">similarity</samp></dt>
  32074. <dd><p>Set similarity percentage with the key color.
  32075. Allowed range is from 0 to 1. Default value is 0.01.
  32076. </p>
  32077. <p>0.00001 matches only the exact key color, while 1.0 matches everything.
  32078. </p>
  32079. </dd>
  32080. <dt><samp class="option">blend</samp></dt>
  32081. <dd><p>Blend percentage.
  32082. Allowed range is from 0 to 1. Default value is 0.
  32083. </p>
  32084. <p>0.0 makes pixels either fully gray, or not gray at all.
  32085. </p>
  32086. <p>Higher values result in more gray pixels, with a higher gray pixel
  32087. the more similar the pixels color is to the key color.
  32088. </p></dd>
  32089. </dl>
  32090. </div>
  32091. <div class="section-level-extent" id="hsvkey">
  32092. <h3 class="section"><span>32.128 hsvkey<a class="copiable-link" href="#hsvkey"> &para;</a></span></h3>
  32093. <p>Turns a certain HSV range into transparency.
  32094. </p>
  32095. <p>This filter measures color difference between set HSV color in options
  32096. and ones measured in video stream. Depending on options, output
  32097. colors can be changed to transparent by adding alpha channel.
  32098. </p>
  32099. <p>The filter accepts the following options:
  32100. </p>
  32101. <dl class="table">
  32102. <dt><samp class="option">hue</samp></dt>
  32103. <dd><p>Set the hue value which will be used in color difference calculation.
  32104. Allowed range is from -360 to 360. Default value is 0.
  32105. </p>
  32106. </dd>
  32107. <dt><samp class="option">sat</samp></dt>
  32108. <dd><p>Set the saturation value which will be used in color difference calculation.
  32109. Allowed range is from -1 to 1. Default value is 0.
  32110. </p>
  32111. </dd>
  32112. <dt><samp class="option">val</samp></dt>
  32113. <dd><p>Set the value which will be used in color difference calculation.
  32114. Allowed range is from -1 to 1. Default value is 0.
  32115. </p>
  32116. </dd>
  32117. <dt><samp class="option">similarity</samp></dt>
  32118. <dd><p>Set similarity percentage with the key color.
  32119. Allowed range is from 0 to 1. Default value is 0.01.
  32120. </p>
  32121. <p>0.00001 matches only the exact key color, while 1.0 matches everything.
  32122. </p>
  32123. </dd>
  32124. <dt><samp class="option">blend</samp></dt>
  32125. <dd><p>Blend percentage.
  32126. Allowed range is from 0 to 1. Default value is 0.
  32127. </p>
  32128. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  32129. </p>
  32130. <p>Higher values result in semi-transparent pixels, with a higher transparency
  32131. the more similar the pixels color is to the key color.
  32132. </p></dd>
  32133. </dl>
  32134. </div>
  32135. <div class="section-level-extent" id="hue">
  32136. <h3 class="section"><span>32.129 hue<a class="copiable-link" href="#hue"> &para;</a></span></h3>
  32137. <p>Modify the hue and/or the saturation of the input.
  32138. </p>
  32139. <p>It accepts the following parameters:
  32140. </p>
  32141. <dl class="table">
  32142. <dt><samp class="option">h</samp></dt>
  32143. <dd><p>Specify the hue angle as a number of degrees. It accepts an expression,
  32144. and defaults to &quot;0&quot;.
  32145. </p>
  32146. </dd>
  32147. <dt><samp class="option">s</samp></dt>
  32148. <dd><p>Specify the saturation in the [-10,10] range. It accepts an expression and
  32149. defaults to &quot;1&quot;.
  32150. </p>
  32151. </dd>
  32152. <dt><samp class="option">H</samp></dt>
  32153. <dd><p>Specify the hue angle as a number of radians. It accepts an
  32154. expression, and defaults to &quot;0&quot;.
  32155. </p>
  32156. </dd>
  32157. <dt><samp class="option">b</samp></dt>
  32158. <dd><p>Specify the brightness in the [-10,10] range. It accepts an expression and
  32159. defaults to &quot;0&quot;.
  32160. </p></dd>
  32161. </dl>
  32162. <p><samp class="option">h</samp> and <samp class="option">H</samp> are mutually exclusive, and can&rsquo;t be
  32163. specified at the same time.
  32164. </p>
  32165. <p>The <samp class="option">b</samp>, <samp class="option">h</samp>, <samp class="option">H</samp> and <samp class="option">s</samp> option values are
  32166. expressions containing the following constants:
  32167. </p>
  32168. <dl class="table">
  32169. <dt><samp class="option">n</samp></dt>
  32170. <dd><p>frame count of the input frame starting from 0
  32171. </p>
  32172. </dd>
  32173. <dt><samp class="option">pts</samp></dt>
  32174. <dd><p>presentation timestamp of the input frame expressed in time base units
  32175. </p>
  32176. </dd>
  32177. <dt><samp class="option">r</samp></dt>
  32178. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  32179. </p>
  32180. </dd>
  32181. <dt><samp class="option">t</samp></dt>
  32182. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  32183. </p>
  32184. </dd>
  32185. <dt><samp class="option">tb</samp></dt>
  32186. <dd><p>time base of the input video
  32187. </p></dd>
  32188. </dl>
  32189. <ul class="mini-toc">
  32190. <li><a href="#Examples-103" accesskey="1">Examples</a></li>
  32191. <li><a href="#Commands-99" accesskey="2">Commands</a></li>
  32192. </ul>
  32193. <div class="subsection-level-extent" id="Examples-103">
  32194. <h4 class="subsection"><span>32.129.1 Examples<a class="copiable-link" href="#Examples-103"> &para;</a></span></h4>
  32195. <ul class="itemize mark-bullet">
  32196. <li>Set the hue to 90 degrees and the saturation to 1.0:
  32197. <div class="example">
  32198. <pre class="example-preformatted">hue=h=90:s=1
  32199. </pre></div>
  32200. </li><li>Same command but expressing the hue in radians:
  32201. <div class="example">
  32202. <pre class="example-preformatted">hue=H=PI/2:s=1
  32203. </pre></div>
  32204. </li><li>Rotate hue and make the saturation swing between 0
  32205. and 2 over a period of 1 second:
  32206. <div class="example">
  32207. <pre class="example-preformatted">hue=&quot;H=2*PI*t: s=sin(2*PI*t)+1&quot;
  32208. </pre></div>
  32209. </li><li>Apply a 3 seconds saturation fade-in effect starting at 0:
  32210. <div class="example">
  32211. <pre class="example-preformatted">hue=&quot;s=min(t/3\,1)&quot;
  32212. </pre></div>
  32213. <p>The general fade-in expression can be written as:
  32214. </p><div class="example">
  32215. <pre class="example-preformatted">hue=&quot;s=min(0\, max((t-START)/DURATION\, 1))&quot;
  32216. </pre></div>
  32217. </li><li>Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
  32218. <div class="example">
  32219. <pre class="example-preformatted">hue=&quot;s=max(0\, min(1\, (8-t)/3))&quot;
  32220. </pre></div>
  32221. <p>The general fade-out expression can be written as:
  32222. </p><div class="example">
  32223. <pre class="example-preformatted">hue=&quot;s=max(0\, min(1\, (START+DURATION-t)/DURATION))&quot;
  32224. </pre></div>
  32225. </li></ul>
  32226. </div>
  32227. <div class="subsection-level-extent" id="Commands-99">
  32228. <h4 class="subsection"><span>32.129.2 Commands<a class="copiable-link" href="#Commands-99"> &para;</a></span></h4>
  32229. <p>This filter supports the following commands:
  32230. </p><dl class="table">
  32231. <dt><samp class="option">b</samp></dt>
  32232. <dt><samp class="option">s</samp></dt>
  32233. <dt><samp class="option">h</samp></dt>
  32234. <dt><samp class="option">H</samp></dt>
  32235. <dd><p>Modify the hue and/or the saturation and/or brightness of the input video.
  32236. The command accepts the same syntax of the corresponding option.
  32237. </p>
  32238. <p>If the specified expression is not valid, it is kept at its current
  32239. value.
  32240. </p></dd>
  32241. </dl>
  32242. </div>
  32243. </div>
  32244. <div class="section-level-extent" id="huesaturation">
  32245. <h3 class="section"><span>32.130 huesaturation<a class="copiable-link" href="#huesaturation"> &para;</a></span></h3>
  32246. <p>Apply hue-saturation-intensity adjustments to input video stream.
  32247. </p>
  32248. <p>This filter operates in RGB colorspace.
  32249. </p>
  32250. <p>This filter accepts the following options:
  32251. </p>
  32252. <dl class="table">
  32253. <dt><samp class="option">hue</samp></dt>
  32254. <dd><p>Set the hue shift in degrees to apply. Default is 0.
  32255. Allowed range is from -180 to 180.
  32256. </p>
  32257. </dd>
  32258. <dt><samp class="option">saturation</samp></dt>
  32259. <dd><p>Set the saturation shift. Default is 0.
  32260. Allowed range is from -1 to 1.
  32261. </p>
  32262. </dd>
  32263. <dt><samp class="option">intensity</samp></dt>
  32264. <dd><p>Set the intensity shift. Default is 0.
  32265. Allowed range is from -1 to 1.
  32266. </p>
  32267. </dd>
  32268. <dt><samp class="option">colors</samp></dt>
  32269. <dd><p>Set which primary and complementary colors are going to be adjusted.
  32270. This options is set by providing one or multiple values.
  32271. This can select multiple colors at once. By default all colors are selected.
  32272. </p><dl class="table">
  32273. <dt>&lsquo;<samp class="samp">r</samp>&rsquo;</dt>
  32274. <dd><p>Adjust reds.
  32275. </p></dd>
  32276. <dt>&lsquo;<samp class="samp">y</samp>&rsquo;</dt>
  32277. <dd><p>Adjust yellows.
  32278. </p></dd>
  32279. <dt>&lsquo;<samp class="samp">g</samp>&rsquo;</dt>
  32280. <dd><p>Adjust greens.
  32281. </p></dd>
  32282. <dt>&lsquo;<samp class="samp">c</samp>&rsquo;</dt>
  32283. <dd><p>Adjust cyans.
  32284. </p></dd>
  32285. <dt>&lsquo;<samp class="samp">b</samp>&rsquo;</dt>
  32286. <dd><p>Adjust blues.
  32287. </p></dd>
  32288. <dt>&lsquo;<samp class="samp">m</samp>&rsquo;</dt>
  32289. <dd><p>Adjust magentas.
  32290. </p></dd>
  32291. <dt>&lsquo;<samp class="samp">a</samp>&rsquo;</dt>
  32292. <dd><p>Adjust all colors.
  32293. </p></dd>
  32294. </dl>
  32295. </dd>
  32296. <dt><samp class="option">strength</samp></dt>
  32297. <dd><p>Set strength of filtering. Allowed range is from 0 to 100.
  32298. Default value is 1.
  32299. </p>
  32300. </dd>
  32301. <dt><samp class="option">rw, gw, bw</samp></dt>
  32302. <dd><p>Set weight for each RGB component. Allowed range is from 0 to 1.
  32303. By default is set to 0.333, 0.334, 0.333.
  32304. Those options are used in saturation and lightess processing.
  32305. </p>
  32306. </dd>
  32307. <dt><samp class="option">lightness</samp></dt>
  32308. <dd><p>Set preserving lightness, by default is disabled.
  32309. Adjusting hues can change lightness from original RGB triplet,
  32310. with this option enabled lightness is kept at same value.
  32311. </p></dd>
  32312. </dl>
  32313. </div>
  32314. <div class="section-level-extent" id="hysteresis">
  32315. <h3 class="section"><span>32.131 hysteresis<a class="copiable-link" href="#hysteresis"> &para;</a></span></h3>
  32316. <p>Grow first stream into second stream by connecting components.
  32317. This makes it possible to build more robust edge masks.
  32318. </p>
  32319. <p>This filter accepts the following options:
  32320. </p>
  32321. <dl class="table">
  32322. <dt><samp class="option">planes</samp></dt>
  32323. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  32324. copied from first stream.
  32325. By default value 0xf, all planes will be processed.
  32326. </p>
  32327. </dd>
  32328. <dt><samp class="option">threshold</samp></dt>
  32329. <dd><p>Set threshold which is used in filtering. If pixel component value is higher than
  32330. this value filter algorithm for connecting components is activated.
  32331. By default value is 0.
  32332. </p></dd>
  32333. </dl>
  32334. <p>The <code class="code">hysteresis</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  32335. </p>
  32336. </div>
  32337. <div class="section-level-extent" id="iccdetect">
  32338. <h3 class="section"><span>32.132 iccdetect<a class="copiable-link" href="#iccdetect"> &para;</a></span></h3>
  32339. <p>Detect the colorspace from an embedded ICC profile (if present), and update
  32340. the frame&rsquo;s tags accordingly.
  32341. </p>
  32342. <p>This filter accepts the following options:
  32343. </p>
  32344. <dl class="table">
  32345. <dt><samp class="option">force</samp></dt>
  32346. <dd><p>If true, the frame&rsquo;s existing colorspace tags will always be overridden by
  32347. values detected from an ICC profile. Otherwise, they will only be assigned if
  32348. they contain <code class="code">unknown</code>. Enabled by default.
  32349. </p></dd>
  32350. </dl>
  32351. </div>
  32352. <div class="section-level-extent" id="iccgen">
  32353. <h3 class="section"><span>32.133 iccgen<a class="copiable-link" href="#iccgen"> &para;</a></span></h3>
  32354. <p>Generate ICC profiles and attach them to frames.
  32355. </p>
  32356. <p>This filter accepts the following options:
  32357. </p>
  32358. <dl class="table">
  32359. <dt><samp class="option">color_primaries</samp></dt>
  32360. <dt><samp class="option">color_trc</samp></dt>
  32361. <dd><p>Configure the colorspace that the ICC profile will be generated for. The
  32362. default value of <code class="code">auto</code> infers the value from the input frame&rsquo;s metadata,
  32363. defaulting to BT.709/sRGB as appropriate.
  32364. </p>
  32365. <p>See the <a class="ref" href="#setparams">setparams</a> filter for a list of possible values, but note that
  32366. <code class="code">unknown</code> are not valid values for this filter.
  32367. </p>
  32368. </dd>
  32369. <dt><samp class="option">force</samp></dt>
  32370. <dd><p>If true, an ICC profile will be generated even if it would overwrite an
  32371. already existing ICC profile. Disabled by default.
  32372. </p></dd>
  32373. </dl>
  32374. </div>
  32375. <div class="section-level-extent" id="identity">
  32376. <h3 class="section"><span>32.134 identity<a class="copiable-link" href="#identity"> &para;</a></span></h3>
  32377. <p>Obtain the identity score between two input videos.
  32378. </p>
  32379. <p>This filter takes two input videos.
  32380. </p>
  32381. <p>Both input videos must have the same resolution and pixel format for
  32382. this filter to work correctly. Also it assumes that both inputs
  32383. have the same number of frames, which are compared one by one.
  32384. </p>
  32385. <p>The obtained per component, average, min and max identity score is printed through
  32386. the logging system.
  32387. </p>
  32388. <p>The filter stores the calculated identity scores of each frame in frame metadata.
  32389. </p>
  32390. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  32391. </p>
  32392. <p>In the below example the input file <samp class="file">main.mpg</samp> being processed is compared
  32393. with the reference file <samp class="file">ref.mpg</samp>.
  32394. </p>
  32395. <div class="example">
  32396. <pre class="example-preformatted">ffmpeg -i main.mpg -i ref.mpg -lavfi identity -f null -
  32397. </pre></div>
  32398. </div>
  32399. <div class="section-level-extent" id="idet">
  32400. <h3 class="section"><span>32.135 idet<a class="copiable-link" href="#idet"> &para;</a></span></h3>
  32401. <p>Detect video interlacing type.
  32402. </p>
  32403. <p>This filter tries to detect if the input frames are interlaced, progressive,
  32404. top or bottom field first. It will also try to detect fields that are
  32405. repeated between adjacent frames (a sign of telecine).
  32406. </p>
  32407. <p>Single frame detection considers only immediately adjacent frames when classifying each frame.
  32408. Multiple frame detection incorporates the classification history of previous frames.
  32409. </p>
  32410. <p>The filter will log these metadata values:
  32411. </p>
  32412. <dl class="table">
  32413. <dt><samp class="option">single.current_frame</samp></dt>
  32414. <dd><p>Detected type of current frame using single-frame detection. One of:
  32415. &ldquo;tff&rdquo; (top field first), &ldquo;bff&rdquo; (bottom field first),
  32416. &ldquo;progressive&rdquo;, or &ldquo;undetermined&rdquo;
  32417. </p>
  32418. </dd>
  32419. <dt><samp class="option">single.tff</samp></dt>
  32420. <dd><p>Cumulative number of frames detected as top field first using single-frame detection.
  32421. </p>
  32422. </dd>
  32423. <dt><samp class="option">multiple.tff</samp></dt>
  32424. <dd><p>Cumulative number of frames detected as top field first using multiple-frame detection.
  32425. </p>
  32426. </dd>
  32427. <dt><samp class="option">single.bff</samp></dt>
  32428. <dd><p>Cumulative number of frames detected as bottom field first using single-frame detection.
  32429. </p>
  32430. </dd>
  32431. <dt><samp class="option">multiple.current_frame</samp></dt>
  32432. <dd><p>Detected type of current frame using multiple-frame detection. One of:
  32433. &ldquo;tff&rdquo; (top field first), &ldquo;bff&rdquo; (bottom field first),
  32434. &ldquo;progressive&rdquo;, or &ldquo;undetermined&rdquo;
  32435. </p>
  32436. </dd>
  32437. <dt><samp class="option">multiple.bff</samp></dt>
  32438. <dd><p>Cumulative number of frames detected as bottom field first using multiple-frame detection.
  32439. </p>
  32440. </dd>
  32441. <dt><samp class="option">single.progressive</samp></dt>
  32442. <dd><p>Cumulative number of frames detected as progressive using single-frame detection.
  32443. </p>
  32444. </dd>
  32445. <dt><samp class="option">multiple.progressive</samp></dt>
  32446. <dd><p>Cumulative number of frames detected as progressive using multiple-frame detection.
  32447. </p>
  32448. </dd>
  32449. <dt><samp class="option">single.undetermined</samp></dt>
  32450. <dd><p>Cumulative number of frames that could not be classified using single-frame detection.
  32451. </p>
  32452. </dd>
  32453. <dt><samp class="option">multiple.undetermined</samp></dt>
  32454. <dd><p>Cumulative number of frames that could not be classified using multiple-frame detection.
  32455. </p>
  32456. </dd>
  32457. <dt><samp class="option">repeated.current_frame</samp></dt>
  32458. <dd><p>Which field in the current frame is repeated from the last. One of &ldquo;neither&rdquo;, &ldquo;top&rdquo;, or &ldquo;bottom&rdquo;.
  32459. </p>
  32460. </dd>
  32461. <dt><samp class="option">repeated.neither</samp></dt>
  32462. <dd><p>Cumulative number of frames with no repeated field.
  32463. </p>
  32464. </dd>
  32465. <dt><samp class="option">repeated.top</samp></dt>
  32466. <dd><p>Cumulative number of frames with the top field repeated from the previous frame&rsquo;s top field.
  32467. </p>
  32468. </dd>
  32469. <dt><samp class="option">repeated.bottom</samp></dt>
  32470. <dd><p>Cumulative number of frames with the bottom field repeated from the previous frame&rsquo;s bottom field.
  32471. </p></dd>
  32472. </dl>
  32473. <p>The filter accepts the following options:
  32474. </p>
  32475. <dl class="table">
  32476. <dt><samp class="option">intl_thres</samp></dt>
  32477. <dd><p>Set interlacing threshold.
  32478. </p></dd>
  32479. <dt><samp class="option">prog_thres</samp></dt>
  32480. <dd><p>Set progressive threshold.
  32481. </p></dd>
  32482. <dt><samp class="option">rep_thres</samp></dt>
  32483. <dd><p>Threshold for repeated field detection.
  32484. </p></dd>
  32485. <dt><samp class="option">half_life</samp></dt>
  32486. <dd><p>Number of frames after which a given frame&rsquo;s contribution to the
  32487. statistics is halved (i.e., it contributes only 0.5 to its
  32488. classification). The default of 0 means that all frames seen are given
  32489. full weight of 1.0 forever.
  32490. </p></dd>
  32491. <dt><samp class="option">analyze_interlaced_flag</samp></dt>
  32492. <dd><p>When this is not 0 then idet will use the specified number of frames to determine
  32493. if the interlaced flag is accurate, it will not count undetermined frames.
  32494. If the flag is found to be accurate it will be used without any further
  32495. computations, if it is found to be inaccurate it will be cleared without any
  32496. further computations. This allows inserting the idet filter as a low computational
  32497. method to clean up the interlaced flag
  32498. </p></dd>
  32499. </dl>
  32500. <ul class="mini-toc">
  32501. <li><a href="#Examples-104" accesskey="1">Examples</a></li>
  32502. </ul>
  32503. <div class="subsection-level-extent" id="Examples-104">
  32504. <h4 class="subsection"><span>32.135.1 Examples<a class="copiable-link" href="#Examples-104"> &para;</a></span></h4>
  32505. <p>Inspect the field order of the first 360 frames in a video, in verbose detail:
  32506. </p><div class="example">
  32507. <pre class="example-preformatted">ffmpeg -i INPUT -filter:v idet,metadata=mode=print -frames:v 360 -an -f null -
  32508. </pre></div>
  32509. <p>The idet filter will add analysis metadata to each frame, which will then be
  32510. discarded. At the end, the filter will also print a final report with statistics.
  32511. </p>
  32512. </div>
  32513. </div>
  32514. <div class="section-level-extent" id="il">
  32515. <h3 class="section"><span>32.136 il<a class="copiable-link" href="#il"> &para;</a></span></h3>
  32516. <p>Deinterleave or interleave fields.
  32517. </p>
  32518. <p>This filter allows one to process interlaced images fields without
  32519. deinterlacing them. Deinterleaving splits the input frame into 2
  32520. fields (so called half pictures). Odd lines are moved to the top
  32521. half of the output image, even lines to the bottom half.
  32522. You can process (filter) them independently and then re-interleave them.
  32523. </p>
  32524. <p>The filter accepts the following options:
  32525. </p>
  32526. <dl class="table">
  32527. <dt><samp class="option">luma_mode, l</samp></dt>
  32528. <dt><samp class="option">chroma_mode, c</samp></dt>
  32529. <dt><samp class="option">alpha_mode, a</samp></dt>
  32530. <dd><p>Available values for <var class="var">luma_mode</var>, <var class="var">chroma_mode</var> and
  32531. <var class="var">alpha_mode</var> are:
  32532. </p>
  32533. <dl class="table">
  32534. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  32535. <dd><p>Do nothing.
  32536. </p>
  32537. </dd>
  32538. <dt>&lsquo;<samp class="samp">deinterleave, d</samp>&rsquo;</dt>
  32539. <dd><p>Deinterleave fields, placing one above the other.
  32540. </p>
  32541. </dd>
  32542. <dt>&lsquo;<samp class="samp">interleave, i</samp>&rsquo;</dt>
  32543. <dd><p>Interleave fields. Reverse the effect of deinterleaving.
  32544. </p></dd>
  32545. </dl>
  32546. <p>Default value is <code class="code">none</code>.
  32547. </p>
  32548. </dd>
  32549. <dt><samp class="option">luma_swap, ls</samp></dt>
  32550. <dt><samp class="option">chroma_swap, cs</samp></dt>
  32551. <dt><samp class="option">alpha_swap, as</samp></dt>
  32552. <dd><p>Swap luma/chroma/alpha fields. Exchange even &amp; odd lines. Default value is <code class="code">0</code>.
  32553. </p></dd>
  32554. </dl>
  32555. <ul class="mini-toc">
  32556. <li><a href="#Commands-100" accesskey="1">Commands</a></li>
  32557. </ul>
  32558. <div class="subsection-level-extent" id="Commands-100">
  32559. <h4 class="subsection"><span>32.136.1 Commands<a class="copiable-link" href="#Commands-100"> &para;</a></span></h4>
  32560. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  32561. </p>
  32562. </div>
  32563. </div>
  32564. <div class="section-level-extent" id="inflate">
  32565. <h3 class="section"><span>32.137 inflate<a class="copiable-link" href="#inflate"> &para;</a></span></h3>
  32566. <p>Apply inflate effect to the video.
  32567. </p>
  32568. <p>This filter replaces the pixel by the local(3x3) average by taking into account
  32569. only values higher than the pixel.
  32570. </p>
  32571. <p>It accepts the following options:
  32572. </p>
  32573. <dl class="table">
  32574. <dt><samp class="option">threshold0</samp></dt>
  32575. <dt><samp class="option">threshold1</samp></dt>
  32576. <dt><samp class="option">threshold2</samp></dt>
  32577. <dt><samp class="option">threshold3</samp></dt>
  32578. <dd><p>Limit the maximum change for each plane, default is 65535.
  32579. If 0, plane will remain unchanged.
  32580. </p></dd>
  32581. </dl>
  32582. <ul class="mini-toc">
  32583. <li><a href="#Commands-101" accesskey="1">Commands</a></li>
  32584. </ul>
  32585. <div class="subsection-level-extent" id="Commands-101">
  32586. <h4 class="subsection"><span>32.137.1 Commands<a class="copiable-link" href="#Commands-101"> &para;</a></span></h4>
  32587. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  32588. </p>
  32589. </div>
  32590. </div>
  32591. <div class="section-level-extent" id="interlace">
  32592. <h3 class="section"><span>32.138 interlace<a class="copiable-link" href="#interlace"> &para;</a></span></h3>
  32593. <p>Simple interlacing filter from progressive contents. This interleaves upper (or
  32594. lower) lines from odd frames with lower (or upper) lines from even frames,
  32595. halving the frame rate and preserving image height.
  32596. </p>
  32597. <div class="example">
  32598. <pre class="example-preformatted"> Original Original New Frame
  32599. Frame 'j' Frame 'j+1' (tff)
  32600. ========== =========== ==================
  32601. Line 0 --------------------&gt; Frame 'j' Line 0
  32602. Line 1 Line 1 ----&gt; Frame 'j+1' Line 1
  32603. Line 2 ---------------------&gt; Frame 'j' Line 2
  32604. Line 3 Line 3 ----&gt; Frame 'j+1' Line 3
  32605. ... ... ...
  32606. New Frame + 1 will be generated by Frame 'j+2' and Frame 'j+3' and so on
  32607. </pre></div>
  32608. <p>It accepts the following optional parameters:
  32609. </p>
  32610. <dl class="table">
  32611. <dt><samp class="option">scan</samp></dt>
  32612. <dd><p>This determines whether the interlaced frame is taken from the even
  32613. (tff - default) or odd (bff) lines of the progressive frame.
  32614. </p>
  32615. </dd>
  32616. <dt><samp class="option">lowpass</samp></dt>
  32617. <dd><p>Vertical lowpass filter to avoid twitter interlacing and
  32618. reduce moire patterns.
  32619. </p>
  32620. <dl class="table">
  32621. <dt>&lsquo;<samp class="samp">0, off</samp>&rsquo;</dt>
  32622. <dd><p>Disable vertical lowpass filter
  32623. </p>
  32624. </dd>
  32625. <dt>&lsquo;<samp class="samp">1, linear</samp>&rsquo;</dt>
  32626. <dd><p>Enable linear filter (default)
  32627. </p>
  32628. </dd>
  32629. <dt>&lsquo;<samp class="samp">2, complex</samp>&rsquo;</dt>
  32630. <dd><p>Enable complex filter. This will slightly less reduce twitter and moire
  32631. but better retain detail and subjective sharpness impression.
  32632. </p>
  32633. </dd>
  32634. </dl>
  32635. </dd>
  32636. </dl>
  32637. </div>
  32638. <div class="section-level-extent" id="kerndeint">
  32639. <h3 class="section"><span>32.139 kerndeint<a class="copiable-link" href="#kerndeint"> &para;</a></span></h3>
  32640. <p>Deinterlace input video by applying Donald Graft&rsquo;s adaptive kernel
  32641. deinterling. Work on interlaced parts of a video to produce
  32642. progressive frames.
  32643. </p>
  32644. <p>The description of the accepted parameters follows.
  32645. </p>
  32646. <dl class="table">
  32647. <dt><samp class="option">thresh</samp></dt>
  32648. <dd><p>Set the threshold which affects the filter&rsquo;s tolerance when
  32649. determining if a pixel line must be processed. It must be an integer
  32650. in the range [0,255] and defaults to 10. A value of 0 will result in
  32651. applying the process on every pixels.
  32652. </p>
  32653. </dd>
  32654. <dt><samp class="option">map</samp></dt>
  32655. <dd><p>Paint pixels exceeding the threshold value to white if set to 1.
  32656. Default is 0.
  32657. </p>
  32658. </dd>
  32659. <dt><samp class="option">order</samp></dt>
  32660. <dd><p>Set the fields order. Swap fields if set to 1, leave fields alone if
  32661. 0. Default is 0.
  32662. </p>
  32663. </dd>
  32664. <dt><samp class="option">sharp</samp></dt>
  32665. <dd><p>Enable additional sharpening if set to 1. Default is 0.
  32666. </p>
  32667. </dd>
  32668. <dt><samp class="option">twoway</samp></dt>
  32669. <dd><p>Enable twoway sharpening if set to 1. Default is 0.
  32670. </p></dd>
  32671. </dl>
  32672. <ul class="mini-toc">
  32673. <li><a href="#Examples-105" accesskey="1">Examples</a></li>
  32674. </ul>
  32675. <div class="subsection-level-extent" id="Examples-105">
  32676. <h4 class="subsection"><span>32.139.1 Examples<a class="copiable-link" href="#Examples-105"> &para;</a></span></h4>
  32677. <ul class="itemize mark-bullet">
  32678. <li>Apply default values:
  32679. <div class="example">
  32680. <pre class="example-preformatted">kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
  32681. </pre></div>
  32682. </li><li>Enable additional sharpening:
  32683. <div class="example">
  32684. <pre class="example-preformatted">kerndeint=sharp=1
  32685. </pre></div>
  32686. </li><li>Paint processed pixels in white:
  32687. <div class="example">
  32688. <pre class="example-preformatted">kerndeint=map=1
  32689. </pre></div>
  32690. </li></ul>
  32691. </div>
  32692. </div>
  32693. <div class="section-level-extent" id="kirsch">
  32694. <h3 class="section"><span>32.140 kirsch<a class="copiable-link" href="#kirsch"> &para;</a></span></h3>
  32695. <p>Apply kirsch operator to input video stream.
  32696. </p>
  32697. <p>The filter accepts the following option:
  32698. </p>
  32699. <dl class="table">
  32700. <dt><samp class="option">planes</samp></dt>
  32701. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  32702. By default value 0xf, all planes will be processed.
  32703. </p>
  32704. </dd>
  32705. <dt><samp class="option">scale</samp></dt>
  32706. <dd><p>Set value which will be multiplied with filtered result.
  32707. </p>
  32708. </dd>
  32709. <dt><samp class="option">delta</samp></dt>
  32710. <dd><p>Set value which will be added to filtered result.
  32711. </p></dd>
  32712. </dl>
  32713. <ul class="mini-toc">
  32714. <li><a href="#Commands-102" accesskey="1">Commands</a></li>
  32715. </ul>
  32716. <div class="subsection-level-extent" id="Commands-102">
  32717. <h4 class="subsection"><span>32.140.1 Commands<a class="copiable-link" href="#Commands-102"> &para;</a></span></h4>
  32718. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  32719. </p>
  32720. </div>
  32721. </div>
  32722. <div class="section-level-extent" id="lagfun">
  32723. <h3 class="section"><span>32.141 lagfun<a class="copiable-link" href="#lagfun"> &para;</a></span></h3>
  32724. <p>Slowly update darker pixels.
  32725. </p>
  32726. <p>This filter makes short flashes of light appear longer.
  32727. This filter accepts the following options:
  32728. </p>
  32729. <dl class="table">
  32730. <dt><samp class="option">decay</samp></dt>
  32731. <dd><p>Set factor for decaying. Default is .95. Allowed range is from 0 to 1.
  32732. </p>
  32733. </dd>
  32734. <dt><samp class="option">planes</samp></dt>
  32735. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  32736. </p></dd>
  32737. </dl>
  32738. <ul class="mini-toc">
  32739. <li><a href="#Commands-103" accesskey="1">Commands</a></li>
  32740. </ul>
  32741. <div class="subsection-level-extent" id="Commands-103">
  32742. <h4 class="subsection"><span>32.141.1 Commands<a class="copiable-link" href="#Commands-103"> &para;</a></span></h4>
  32743. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  32744. </p>
  32745. </div>
  32746. </div>
  32747. <div class="section-level-extent" id="lenscorrection">
  32748. <h3 class="section"><span>32.142 lenscorrection<a class="copiable-link" href="#lenscorrection"> &para;</a></span></h3>
  32749. <p>Correct radial lens distortion
  32750. </p>
  32751. <p>This filter can be used to correct for radial distortion as can result from the use
  32752. of wide angle lenses, and thereby re-rectify the image. To find the right parameters
  32753. one can use tools available for example as part of opencv or simply trial-and-error.
  32754. To use opencv use the calibration sample (under samples/cpp) from the opencv sources
  32755. and extract the k1 and k2 coefficients from the resulting matrix.
  32756. </p>
  32757. <p>Note that effectively the same filter is available in the open-source tools Krita and
  32758. Digikam from the KDE project.
  32759. </p>
  32760. <p>In contrast to the <a class="ref" href="#vignette">vignette</a> filter, which can also be used to compensate lens errors,
  32761. this filter corrects the distortion of the image, whereas <a class="ref" href="#vignette">vignette</a> corrects the
  32762. brightness distribution, so you may want to use both filters together in certain
  32763. cases, though you will have to take care of ordering, i.e. whether vignetting should
  32764. be applied before or after lens correction.
  32765. </p>
  32766. <ul class="mini-toc">
  32767. <li><a href="#Options-37" accesskey="1">Options</a></li>
  32768. <li><a href="#Commands-104" accesskey="2">Commands</a></li>
  32769. </ul>
  32770. <div class="subsection-level-extent" id="Options-37">
  32771. <h4 class="subsection"><span>32.142.1 Options<a class="copiable-link" href="#Options-37"> &para;</a></span></h4>
  32772. <p>The filter accepts the following options:
  32773. </p>
  32774. <dl class="table">
  32775. <dt><samp class="option">cx</samp></dt>
  32776. <dd><p>Relative x-coordinate of the focal point of the image, and thereby the center of the
  32777. distortion. This value has a range [0,1] and is expressed as fractions of the image
  32778. width. Default is 0.5.
  32779. </p></dd>
  32780. <dt><samp class="option">cy</samp></dt>
  32781. <dd><p>Relative y-coordinate of the focal point of the image, and thereby the center of the
  32782. distortion. This value has a range [0,1] and is expressed as fractions of the image
  32783. height. Default is 0.5.
  32784. </p></dd>
  32785. <dt><samp class="option">k1</samp></dt>
  32786. <dd><p>Coefficient of the quadratic correction term. This value has a range [-1,1]. 0 means
  32787. no correction. Default is 0.
  32788. </p></dd>
  32789. <dt><samp class="option">k2</samp></dt>
  32790. <dd><p>Coefficient of the double quadratic correction term. This value has a range [-1,1].
  32791. 0 means no correction. Default is 0.
  32792. </p></dd>
  32793. <dt><samp class="option">i</samp></dt>
  32794. <dd><p>Set interpolation type. Can be <code class="code">nearest</code> or <code class="code">bilinear</code>.
  32795. Default is <code class="code">nearest</code>.
  32796. </p></dd>
  32797. <dt><samp class="option">fc</samp></dt>
  32798. <dd><p>Specify the color of the unmapped pixels. For the syntax of this option,
  32799. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils
  32800. manual</a>. Default color is <code class="code">black@0</code>.
  32801. </p></dd>
  32802. </dl>
  32803. <p>The formula that generates the correction is:
  32804. </p>
  32805. <p><var class="var">r_src</var> = <var class="var">r_tgt</var> * (1 + <var class="var">k1</var> * (<var class="var">r_tgt</var> / <var class="var">r_0</var>)^2 + <var class="var">k2</var> * (<var class="var">r_tgt</var> / <var class="var">r_0</var>)^4)
  32806. </p>
  32807. <p>where <var class="var">r_0</var> is halve of the image diagonal and <var class="var">r_src</var> and <var class="var">r_tgt</var> are the
  32808. distances from the focal point in the source and target images, respectively.
  32809. </p>
  32810. </div>
  32811. <div class="subsection-level-extent" id="Commands-104">
  32812. <h4 class="subsection"><span>32.142.2 Commands<a class="copiable-link" href="#Commands-104"> &para;</a></span></h4>
  32813. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  32814. </p>
  32815. </div>
  32816. </div>
  32817. <div class="section-level-extent" id="lensfun">
  32818. <h3 class="section"><span>32.143 lensfun<a class="copiable-link" href="#lensfun"> &para;</a></span></h3>
  32819. <p>Apply lens correction via the lensfun library (<a class="url" href="http://lensfun.sourceforge.net/">http://lensfun.sourceforge.net/</a>).
  32820. </p>
  32821. <p>The <code class="code">lensfun</code> filter requires the camera make, camera model, and lens model
  32822. to apply the lens correction. The filter will load the lensfun database and
  32823. query it to find the corresponding camera and lens entries in the database. As
  32824. long as these entries can be found with the given options, the filter can
  32825. perform corrections on frames. Note that incomplete strings will result in the
  32826. filter choosing the best match with the given options, and the filter will
  32827. output the chosen camera and lens models (logged with level &quot;info&quot;). You must
  32828. provide the make, camera model, and lens model as they are required.
  32829. </p>
  32830. <p>To obtain a list of available makes and models, leave out one or both of <code class="code">make</code> and
  32831. <code class="code">model</code> options. The filter will send the full list to the log with level <code class="code">INFO</code>.
  32832. The first column is the make and the second column is the model.
  32833. To obtain a list of available lenses, set any values for make and model and leave out the
  32834. <code class="code">lens_model</code> option. The filter will send the full list of lenses in the log with level
  32835. <code class="code">INFO</code>. The ffmpeg tool will exit after the list is printed.
  32836. </p>
  32837. <p>The filter accepts the following options:
  32838. </p>
  32839. <dl class="table">
  32840. <dt><samp class="option">make</samp></dt>
  32841. <dd><p>The make of the camera (for example, &quot;Canon&quot;). This option is required.
  32842. </p>
  32843. </dd>
  32844. <dt><samp class="option">model</samp></dt>
  32845. <dd><p>The model of the camera (for example, &quot;Canon EOS 100D&quot;). This option is
  32846. required.
  32847. </p>
  32848. </dd>
  32849. <dt><samp class="option">lens_model</samp></dt>
  32850. <dd><p>The model of the lens (for example, &quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot;). This
  32851. option is required.
  32852. </p>
  32853. </dd>
  32854. <dt><samp class="option">db_path</samp></dt>
  32855. <dd><p>The full path to the lens database folder. If not set, the filter will attempt to
  32856. load the database from the install path when the library was built. Default is unset.
  32857. </p>
  32858. </dd>
  32859. <dt><samp class="option">mode</samp></dt>
  32860. <dd><p>The type of correction to apply. The following values are valid options:
  32861. </p>
  32862. <dl class="table">
  32863. <dt>&lsquo;<samp class="samp">vignetting</samp>&rsquo;</dt>
  32864. <dd><p>Enables fixing lens vignetting.
  32865. </p>
  32866. </dd>
  32867. <dt>&lsquo;<samp class="samp">geometry</samp>&rsquo;</dt>
  32868. <dd><p>Enables fixing lens geometry. This is the default.
  32869. </p>
  32870. </dd>
  32871. <dt>&lsquo;<samp class="samp">subpixel</samp>&rsquo;</dt>
  32872. <dd><p>Enables fixing chromatic aberrations.
  32873. </p>
  32874. </dd>
  32875. <dt>&lsquo;<samp class="samp">vig_geo</samp>&rsquo;</dt>
  32876. <dd><p>Enables fixing lens vignetting and lens geometry.
  32877. </p>
  32878. </dd>
  32879. <dt>&lsquo;<samp class="samp">vig_subpixel</samp>&rsquo;</dt>
  32880. <dd><p>Enables fixing lens vignetting and chromatic aberrations.
  32881. </p>
  32882. </dd>
  32883. <dt>&lsquo;<samp class="samp">distortion</samp>&rsquo;</dt>
  32884. <dd><p>Enables fixing both lens geometry and chromatic aberrations.
  32885. </p>
  32886. </dd>
  32887. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  32888. <dd><p>Enables all possible corrections.
  32889. </p>
  32890. </dd>
  32891. </dl>
  32892. </dd>
  32893. <dt><samp class="option">focal_length</samp></dt>
  32894. <dd><p>The focal length of the image/video (zoom; expected constant for video). For
  32895. example, a 18&ndash;55mm lens has focal length range of [18&ndash;55], so a value in that
  32896. range should be chosen when using that lens. Default 18.
  32897. </p>
  32898. </dd>
  32899. <dt><samp class="option">aperture</samp></dt>
  32900. <dd><p>The aperture of the image/video (expected constant for video). Note that
  32901. aperture is only used for vignetting correction. Default 3.5.
  32902. </p>
  32903. </dd>
  32904. <dt><samp class="option">focus_distance</samp></dt>
  32905. <dd><p>The focus distance of the image/video (expected constant for video). Note that
  32906. focus distance is only used for vignetting and only slightly affects the
  32907. vignetting correction process. If unknown, leave it at the default value (which
  32908. is 1000).
  32909. </p>
  32910. </dd>
  32911. <dt><samp class="option">scale</samp></dt>
  32912. <dd><p>The scale factor which is applied after transformation. After correction the
  32913. video is no longer necessarily rectangular. This parameter controls how much of
  32914. the resulting image is visible. The value 0 means that a value will be chosen
  32915. automatically such that there is little or no unmapped area in the output
  32916. image. 1.0 means that no additional scaling is done. Lower values may result
  32917. in more of the corrected image being visible, while higher values may avoid
  32918. unmapped areas in the output.
  32919. </p>
  32920. </dd>
  32921. <dt><samp class="option">target_geometry</samp></dt>
  32922. <dd><p>The target geometry of the output image/video. The following values are valid
  32923. options:
  32924. </p>
  32925. <dl class="table">
  32926. <dt>&lsquo;<samp class="samp">rectilinear (default)</samp>&rsquo;</dt>
  32927. <dt>&lsquo;<samp class="samp">fisheye</samp>&rsquo;</dt>
  32928. <dt>&lsquo;<samp class="samp">panoramic</samp>&rsquo;</dt>
  32929. <dt>&lsquo;<samp class="samp">equirectangular</samp>&rsquo;</dt>
  32930. <dt>&lsquo;<samp class="samp">fisheye_orthographic</samp>&rsquo;</dt>
  32931. <dt>&lsquo;<samp class="samp">fisheye_stereographic</samp>&rsquo;</dt>
  32932. <dt>&lsquo;<samp class="samp">fisheye_equisolid</samp>&rsquo;</dt>
  32933. <dt>&lsquo;<samp class="samp">fisheye_thoby</samp>&rsquo;</dt>
  32934. </dl>
  32935. </dd>
  32936. <dt><samp class="option">reverse</samp></dt>
  32937. <dd><p>Apply the reverse of image correction (instead of correcting distortion, apply
  32938. it).
  32939. </p>
  32940. </dd>
  32941. <dt><samp class="option">interpolation</samp></dt>
  32942. <dd><p>The type of interpolation used when correcting distortion. The following values
  32943. are valid options:
  32944. </p>
  32945. <dl class="table">
  32946. <dt>&lsquo;<samp class="samp">nearest</samp>&rsquo;</dt>
  32947. <dt>&lsquo;<samp class="samp">linear (default)</samp>&rsquo;</dt>
  32948. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  32949. </dl>
  32950. </dd>
  32951. </dl>
  32952. <ul class="mini-toc">
  32953. <li><a href="#Examples-106" accesskey="1">Examples</a></li>
  32954. </ul>
  32955. <div class="subsection-level-extent" id="Examples-106">
  32956. <h4 class="subsection"><span>32.143.1 Examples<a class="copiable-link" href="#Examples-106"> &para;</a></span></h4>
  32957. <ul class="itemize mark-bullet">
  32958. <li>Apply lens correction with make &quot;Canon&quot;, camera model &quot;Canon EOS 100D&quot;, and lens
  32959. model &quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot; with focal length of &quot;18&quot; and
  32960. aperture of &quot;8.0&quot;.
  32961. <div class="example">
  32962. <pre class="example-preformatted">ffmpeg -i input.mov -vf lensfun=make=Canon:model=&quot;Canon EOS 100D&quot;:lens_model=&quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot;:focal_length=18:aperture=8 -c:v h264 -b:v 8000k output.mov
  32963. </pre></div>
  32964. </li><li>Apply the same as before, but only for the first 5 seconds of video.
  32965. <div class="example">
  32966. <pre class="example-preformatted">ffmpeg -i input.mov -vf lensfun=make=Canon:model=&quot;Canon EOS 100D&quot;:lens_model=&quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot;:focal_length=18:aperture=8:enable='lte(t\,5)' -c:v h264 -b:v 8000k output.mov
  32967. </pre></div>
  32968. </li></ul>
  32969. </div>
  32970. </div>
  32971. <div class="section-level-extent" id="libplacebo">
  32972. <h3 class="section"><span>32.144 libplacebo<a class="copiable-link" href="#libplacebo"> &para;</a></span></h3>
  32973. <p>Flexible GPU-accelerated processing filter based on libplacebo
  32974. (<a class="url" href="https://code.videolan.org/videolan/libplacebo">https://code.videolan.org/videolan/libplacebo</a>).
  32975. </p>
  32976. <ul class="mini-toc">
  32977. <li><a href="#Options-38" accesskey="1">Options</a></li>
  32978. <li><a href="#Commands-105" accesskey="2">Commands</a></li>
  32979. <li><a href="#Examples-107" accesskey="3">Examples</a></li>
  32980. </ul>
  32981. <div class="subsection-level-extent" id="Options-38">
  32982. <h4 class="subsection"><span>32.144.1 Options<a class="copiable-link" href="#Options-38"> &para;</a></span></h4>
  32983. <p>The options for this filter are divided into the following sections:
  32984. </p>
  32985. <ul class="mini-toc">
  32986. <li><a href="#Output-mode" accesskey="1">Output mode</a></li>
  32987. <li><a href="#Scaling" accesskey="2">Scaling</a></li>
  32988. <li><a href="#Debanding" accesskey="3">Debanding</a></li>
  32989. <li><a href="#Color-adjustment" accesskey="4">Color adjustment</a></li>
  32990. <li><a href="#Peak-detection" accesskey="5">Peak detection</a></li>
  32991. <li><a href="#Tone-mapping" accesskey="6">Tone mapping</a></li>
  32992. <li><a href="#Dithering" accesskey="7">Dithering</a></li>
  32993. <li><a href="#Custom-shaders" accesskey="8">Custom shaders</a></li>
  32994. <li><a href="#Debugging-_002f-performance" accesskey="9">Debugging / performance</a></li>
  32995. </ul>
  32996. <div class="subsubsection-level-extent" id="Output-mode">
  32997. <h4 class="subsubsection"><span>32.144.1.1 Output mode<a class="copiable-link" href="#Output-mode"> &para;</a></span></h4>
  32998. <p>These options control the overall output mode. By default, libplacebo will try
  32999. to preserve the source colorimetry and size as best as it can, but it will
  33000. apply any embedded film grain, dolby vision metadata or anamorphic SAR present
  33001. in source frames.
  33002. </p><dl class="table">
  33003. <dt><samp class="option">inputs</samp></dt>
  33004. <dd><p>Set the number of inputs. This can be used, alongside the <code class="code">idx</code> variable,
  33005. to allow placing/blending multiple inputs inside the output frame. This
  33006. effectively enables functionality similar to <a class="ref" href="#hstack">hstack</a>, <a class="ref" href="#overlay">overlay</a>, etc.
  33007. </p>
  33008. </dd>
  33009. <dt><samp class="option">w</samp></dt>
  33010. <dt><samp class="option">h</samp></dt>
  33011. <dd><p>Set the output video dimension expression. Default values are <code class="code">iw</code> and
  33012. <code class="code">ih</code>.
  33013. </p>
  33014. <p>Allows for the same expressions as the <a class="ref" href="#scale">scale</a> filter.
  33015. </p>
  33016. </dd>
  33017. <dt><samp class="option">crop_x</samp></dt>
  33018. <dt><samp class="option">crop_y</samp></dt>
  33019. <dd><p>Set the input crop x/y expressions, default values are <code class="code">(iw-cw)/2</code> and
  33020. <code class="code">(ih-ch)/2</code>.
  33021. </p>
  33022. </dd>
  33023. <dt><samp class="option">crop_w</samp></dt>
  33024. <dt><samp class="option">crop_h</samp></dt>
  33025. <dd><p>Set the input crop width/height expressions, default values are <code class="code">iw</code> and
  33026. <code class="code">ih</code>.
  33027. </p>
  33028. </dd>
  33029. <dt><samp class="option">pos_x</samp></dt>
  33030. <dt><samp class="option">pos_y</samp></dt>
  33031. <dd><p>Set the output placement x/y expressions, default values are <code class="code">(ow-pw)/2</code>
  33032. and <code class="code">(oh-ph)/2</code>.
  33033. </p>
  33034. </dd>
  33035. <dt><samp class="option">pos_w</samp></dt>
  33036. <dt><samp class="option">pos_h</samp></dt>
  33037. <dd><p>Set the output placement width/height expressions, default values are <code class="code">ow</code>
  33038. and <code class="code">oh</code>.
  33039. </p>
  33040. </dd>
  33041. <dt><samp class="option">fps</samp></dt>
  33042. <dd><p>Set the output frame rate. This can be rational, e.g. <code class="code">60000/1001</code>. If
  33043. set to the special string <code class="code">none</code> (the default), input timestamps will
  33044. instead be passed through to the output unmodified. Otherwise, the input video
  33045. frames will be interpolated as necessary to rescale the video to the specified
  33046. target framerate, in a manner as determined by the <samp class="option">frame_mixer</samp> option.
  33047. </p>
  33048. </dd>
  33049. <dt><samp class="option">format</samp></dt>
  33050. <dd><p>Set the output format override. If unset (the default), frames will be output
  33051. in the same format as the respective input frames. Otherwise, format conversion
  33052. will be performed.
  33053. </p>
  33054. </dd>
  33055. <dt><samp class="option">force_original_aspect_ratio</samp></dt>
  33056. <dt><samp class="option">force_divisible_by</samp></dt>
  33057. <dd><p>Work the same as the identical <a class="ref" href="#scale">scale</a> filter options.
  33058. </p>
  33059. </dd>
  33060. <dt><samp class="option">normalize_sar</samp></dt>
  33061. <dd><p>If enabled, output frames will always have a pixel aspect ratio of 1:1. This
  33062. will introduce additional padding/cropping as necessary. If disabled (the
  33063. default), any aspect ratio mismatches, including those from e.g. anamorphic
  33064. video sources, are forwarded to the output pixel aspect ratio.
  33065. </p>
  33066. </dd>
  33067. <dt><samp class="option">pad_crop_ratio</samp></dt>
  33068. <dd><p>Specifies a ratio (between <code class="code">0.0</code> and <code class="code">1.0</code>) between padding and
  33069. cropping when the input aspect ratio does not match the output aspect ratio and
  33070. <samp class="option">normalize_sar</samp> is in effect. The default of <code class="code">0.0</code> always pads the
  33071. content with black borders, while a value of <code class="code">1.0</code> always crops off parts
  33072. of the content. Intermediate values are possible, leading to a mix of the two
  33073. approaches.
  33074. </p>
  33075. </dd>
  33076. <dt><samp class="option">fillcolor</samp></dt>
  33077. <dd><p>Set the color used to fill the output area not covered by the output image, for
  33078. example as a result of <samp class="option">normalize_sar</samp>. For the general syntax of this
  33079. option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils
  33080. manual</a>. Defaults to <code class="code">black</code>.
  33081. </p>
  33082. </dd>
  33083. <dt><samp class="option">corner_rounding</samp></dt>
  33084. <dd><p>Render frames with rounded corners. The value, given as a float ranging from
  33085. <code class="code">0.0</code> to <code class="code">1.0</code>, indicates the relative degree of rounding, from fully
  33086. square to fully circular. In other words, it gives the radius divided by half
  33087. the smaller side length. Defaults to <code class="code">0.0</code>.
  33088. </p>
  33089. </dd>
  33090. <dt><samp class="option">extra_opts</samp></dt>
  33091. <dd><p>Pass extra libplacebo internal configuration options. These can be specified
  33092. as a list of <var class="var">key</var>=<var class="var">value</var> pairs separated by &rsquo;:&rsquo;. The following example
  33093. shows how to configure a custom filter kernel (&quot;EWA LanczosSharp&quot;) and use it
  33094. to double the input image resolution:
  33095. </p>
  33096. <div class="example">
  33097. <pre class="example-preformatted">-vf &quot;libplacebo=w=iw*2:h=ih*2:extra_opts='upscaler=custom\:upscaler_preset=ewa_lanczos\:upscaler_blur=0.9812505644269356'&quot;
  33098. </pre></div>
  33099. </dd>
  33100. <dt><samp class="option">colorspace</samp></dt>
  33101. <dt><samp class="option">color_primaries</samp></dt>
  33102. <dt><samp class="option">color_trc</samp></dt>
  33103. <dt><samp class="option">range</samp></dt>
  33104. <dd><p>Configure the colorspace that output frames will be delivered in. The default
  33105. value of <code class="code">auto</code> outputs frames in the same format as the input frames,
  33106. leading to no change. For any other value, conversion will be performed.
  33107. </p>
  33108. <p>See the <a class="ref" href="#setparams">setparams</a> filter for a list of possible values.
  33109. </p>
  33110. </dd>
  33111. <dt><samp class="option">apply_filmgrain</samp></dt>
  33112. <dd><p>Apply film grain (e.g. AV1 or H.274) if present in source frames, and strip
  33113. it from the output. Enabled by default.
  33114. </p>
  33115. </dd>
  33116. <dt><samp class="option">apply_dolbyvision</samp></dt>
  33117. <dd><p>Apply Dolby Vision RPU metadata if present in source frames, and strip it from
  33118. the output. Enabled by default. Note that Dolby Vision will always output
  33119. BT.2020+PQ, overriding the usual input frame metadata. These will also be
  33120. picked as the values of <code class="code">auto</code> for the respective frame output options.
  33121. </p></dd>
  33122. </dl>
  33123. <p>In addition to the expression constants documented for the <a class="ref" href="#scale">scale</a> filter,
  33124. the <samp class="option">crop_w</samp>, <samp class="option">crop_h</samp>, <samp class="option">crop_x</samp>, <samp class="option">crop_y</samp>,
  33125. <samp class="option">pos_w</samp>, <samp class="option">pos_h</samp>, <samp class="option">pos_x</samp> and <samp class="option">pos_y</samp> options can
  33126. also contain the following constants:
  33127. </p>
  33128. <dl class="table">
  33129. <dt><samp class="option">in_idx, idx</samp></dt>
  33130. <dd><p>The (0-based) numeric index of the currently active input stream.
  33131. </p></dd>
  33132. <dt><samp class="option">crop_w, cw</samp></dt>
  33133. <dt><samp class="option">crop_h, ch</samp></dt>
  33134. <dd><p>The computed values of <samp class="option">crop_w</samp> and <samp class="option">crop_h</samp>.
  33135. </p>
  33136. </dd>
  33137. <dt><samp class="option">pos_w, pw</samp></dt>
  33138. <dt><samp class="option">pos_h, ph</samp></dt>
  33139. <dd><p>The computed values of <samp class="option">pos_w</samp> and <samp class="option">pos_h</samp>.
  33140. </p>
  33141. </dd>
  33142. <dt><samp class="option">in_t, t</samp></dt>
  33143. <dd><p>The input frame timestamp, in seconds. NAN if input timestamp is unknown.
  33144. </p>
  33145. </dd>
  33146. <dt><samp class="option">out_t, ot</samp></dt>
  33147. <dd><p>The input frame timestamp, in seconds. NAN if input timestamp is unknown.
  33148. </p>
  33149. </dd>
  33150. <dt><samp class="option">n</samp></dt>
  33151. <dd><p>The input frame number, starting with 0.
  33152. </p></dd>
  33153. </dl>
  33154. </div>
  33155. <div class="subsubsection-level-extent" id="Scaling">
  33156. <h4 class="subsubsection"><span>32.144.1.2 Scaling<a class="copiable-link" href="#Scaling"> &para;</a></span></h4>
  33157. <p>The options in this section control how libplacebo performs upscaling and (if
  33158. necessary) downscaling. Note that libplacebo will always internally operate on
  33159. 4:4:4 content, so any sub-sampled chroma formats such as <code class="code">yuv420p</code> will
  33160. necessarily be upsampled and downsampled as part of the rendering process. That
  33161. means scaling might be in effect even if the source and destination resolution
  33162. are the same.
  33163. </p><dl class="table">
  33164. <dt><samp class="option">upscaler</samp></dt>
  33165. <dt><samp class="option">downscaler</samp></dt>
  33166. <dd><p>Configure the filter kernel used for upscaling and downscaling. The respective
  33167. defaults are <code class="code">spline36</code> and <code class="code">mitchell</code>. For a full list of possible
  33168. values, pass <code class="code">help</code> to these options. The most important values are:
  33169. </p><dl class="table">
  33170. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  33171. <dd><p>Forces the use of built-in GPU texture sampling (typically bilinear). Extremely
  33172. fast but poor quality, especially when downscaling.
  33173. </p>
  33174. </dd>
  33175. <dt>&lsquo;<samp class="samp">bilinear</samp>&rsquo;</dt>
  33176. <dd><p>Bilinear interpolation. Can generally be done for free on GPUs, except when
  33177. doing so would lead to aliasing. Fast and low quality.
  33178. </p>
  33179. </dd>
  33180. <dt>&lsquo;<samp class="samp">nearest</samp>&rsquo;</dt>
  33181. <dd><p>Nearest-neighbour interpolation. Sharp but highly aliasing.
  33182. </p>
  33183. </dd>
  33184. <dt>&lsquo;<samp class="samp">oversample</samp>&rsquo;</dt>
  33185. <dd><p>Algorithm that looks visually similar to nearest-neighbour interpolation but
  33186. tries to preserve pixel aspect ratio. Good for pixel art, since it results in
  33187. minimal distortion of the artistic appearance.
  33188. </p>
  33189. </dd>
  33190. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  33191. <dd><p>Standard sinc-sinc interpolation kernel.
  33192. </p>
  33193. </dd>
  33194. <dt>&lsquo;<samp class="samp">spline36</samp>&rsquo;</dt>
  33195. <dd><p>Cubic spline approximation of lanczos. No difference in performance, but has
  33196. very slightly less ringing.
  33197. </p>
  33198. </dd>
  33199. <dt>&lsquo;<samp class="samp">ewa_lanczos</samp>&rsquo;</dt>
  33200. <dd><p>Elliptically weighted average version of lanczos, based on a jinc-sinc kernel.
  33201. This is also popularly referred to as just &quot;Jinc scaling&quot;. Slow but very high
  33202. quality.
  33203. </p>
  33204. </dd>
  33205. <dt>&lsquo;<samp class="samp">gaussian</samp>&rsquo;</dt>
  33206. <dd><p>Gaussian kernel. Has certain ideal mathematical properties, but subjectively
  33207. very blurry.
  33208. </p>
  33209. </dd>
  33210. <dt>&lsquo;<samp class="samp">mitchell</samp>&rsquo;</dt>
  33211. <dd><p>Cubic BC spline with parameters recommended by Mitchell and Netravali. Very
  33212. little ringing.
  33213. </p></dd>
  33214. </dl>
  33215. </dd>
  33216. <dt><samp class="option">frame_mixer</samp></dt>
  33217. <dd><p>Controls the kernel used for mixing frames temporally. The default value is
  33218. <code class="code">none</code>, which disables frame mixing. For a full list of possible values,
  33219. pass <code class="code">help</code> to this option. The most important values are:
  33220. </p><dl class="table">
  33221. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  33222. <dd><p>Disables frame mixing, giving a result equivalent to &quot;nearest neighbour&quot;
  33223. semantics.
  33224. </p>
  33225. </dd>
  33226. <dt>&lsquo;<samp class="samp">oversample</samp>&rsquo;</dt>
  33227. <dd><p>Oversamples the input video to create a &quot;Smooth Motion&quot;-type effect: if an
  33228. output frame would exactly fall on the transition between two video frames, it
  33229. is blended according to the relative overlap. This is the recommended option
  33230. whenever preserving the original subjective appearance is desired.
  33231. </p>
  33232. </dd>
  33233. <dt>&lsquo;<samp class="samp">mitchell_clamp</samp>&rsquo;</dt>
  33234. <dd><p>Larger filter kernel that smoothly interpolates multiple frames in a manner
  33235. designed to eliminate ringing and other artefacts as much as possible. This is
  33236. the recommended option wherever maximum visual smoothness is desired.
  33237. </p>
  33238. </dd>
  33239. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  33240. <dd><p>Linear blend/fade between frames. Especially useful for constructing e.g.
  33241. slideshows.
  33242. </p></dd>
  33243. </dl>
  33244. </dd>
  33245. <dt><samp class="option">lut_entries</samp></dt>
  33246. <dd><p>Configures the size of scaler LUTs, ranging from <code class="code">1</code> to <code class="code">256</code>. The
  33247. default of <code class="code">0</code> will pick libplacebo&rsquo;s internal default, typically
  33248. <code class="code">64</code>.
  33249. </p>
  33250. </dd>
  33251. <dt><samp class="option">antiringing</samp></dt>
  33252. <dd><p>Enables anti-ringing (for non-EWA filters). The value (between <code class="code">0.0</code> and
  33253. <code class="code">1.0</code>) configures the strength of the anti-ringing algorithm. May increase
  33254. aliasing if set too high. Disabled by default.
  33255. </p>
  33256. </dd>
  33257. <dt><samp class="option">sigmoid</samp></dt>
  33258. <dd><p>Enable sigmoidal compression during upscaling. Reduces ringing slightly.
  33259. Enabled by default.
  33260. </p></dd>
  33261. </dl>
  33262. </div>
  33263. <div class="subsubsection-level-extent" id="Debanding">
  33264. <h4 class="subsubsection"><span>32.144.1.3 Debanding<a class="copiable-link" href="#Debanding"> &para;</a></span></h4>
  33265. <p>Libplacebo comes with a built-in debanding filter that is good at counteracting
  33266. many common sources of banding and blocking. Turning this on is highly
  33267. recommended whenever quality is desired.
  33268. </p><dl class="table">
  33269. <dt><samp class="option">deband</samp></dt>
  33270. <dd><p>Enable (fast) debanding algorithm. Disabled by default.
  33271. </p>
  33272. </dd>
  33273. <dt><samp class="option">deband_iterations</samp></dt>
  33274. <dd><p>Number of deband iterations of the debanding algorithm. Each iteration is
  33275. performed with progressively increased radius (and diminished threshold).
  33276. Recommended values are in the range <code class="code">1</code> to <code class="code">4</code>. Defaults to <code class="code">1</code>.
  33277. </p>
  33278. </dd>
  33279. <dt><samp class="option">deband_threshold</samp></dt>
  33280. <dd><p>Debanding filter strength. Higher numbers lead to more aggressive debanding.
  33281. Defaults to <code class="code">4.0</code>.
  33282. </p>
  33283. </dd>
  33284. <dt><samp class="option">deband_radius</samp></dt>
  33285. <dd><p>Debanding filter radius. A higher radius is better for slow gradients, while
  33286. a lower radius is better for steep gradients. Defaults to <code class="code">16.0</code>.
  33287. </p>
  33288. </dd>
  33289. <dt><samp class="option">deband_grain</samp></dt>
  33290. <dd><p>Amount of extra output grain to add. Helps hide imperfections. Defaults to
  33291. <code class="code">6.0</code>.
  33292. </p></dd>
  33293. </dl>
  33294. </div>
  33295. <div class="subsubsection-level-extent" id="Color-adjustment">
  33296. <h4 class="subsubsection"><span>32.144.1.4 Color adjustment<a class="copiable-link" href="#Color-adjustment"> &para;</a></span></h4>
  33297. <p>A collection of subjective color controls. Not very rigorous, so the exact
  33298. effect will vary somewhat depending on the input primaries and colorspace.
  33299. </p><dl class="table">
  33300. <dt><samp class="option">brightness</samp></dt>
  33301. <dd><p>Brightness boost, between <code class="code">-1.0</code> and <code class="code">1.0</code>. Defaults to <code class="code">0.0</code>.
  33302. </p>
  33303. </dd>
  33304. <dt><samp class="option">contrast</samp></dt>
  33305. <dd><p>Contrast gain, between <code class="code">0.0</code> and <code class="code">16.0</code>. Defaults to <code class="code">1.0</code>.
  33306. </p>
  33307. </dd>
  33308. <dt><samp class="option">saturation</samp></dt>
  33309. <dd><p>Saturation gain, between <code class="code">0.0</code> and <code class="code">16.0</code>. Defaults to <code class="code">1.0</code>.
  33310. </p>
  33311. </dd>
  33312. <dt><samp class="option">hue</samp></dt>
  33313. <dd><p>Hue shift in radians, between <code class="code">-3.14</code> and <code class="code">3.14</code>. Defaults to
  33314. <code class="code">0.0</code>. This will rotate the UV subvector, defaulting to BT.709
  33315. coefficients for RGB inputs.
  33316. </p>
  33317. </dd>
  33318. <dt><samp class="option">gamma</samp></dt>
  33319. <dd><p>Gamma adjustment, between <code class="code">0.0</code> and <code class="code">16.0</code>. Defaults to <code class="code">1.0</code>.
  33320. </p>
  33321. </dd>
  33322. <dt><samp class="option">cones</samp></dt>
  33323. <dd><p>Cone model to use for color blindness simulation. Accepts any combination of
  33324. <code class="code">l</code>, <code class="code">m</code> and <code class="code">s</code>. Here are some examples:
  33325. </p><dl class="table">
  33326. <dt>&lsquo;<samp class="samp">m</samp>&rsquo;</dt>
  33327. <dd><p>Deuteranomaly / deuteranopia (affecting 3%-4% of the population)
  33328. </p></dd>
  33329. <dt>&lsquo;<samp class="samp">l</samp>&rsquo;</dt>
  33330. <dd><p>Protanomaly / protanopia (affecting 1%-2% of the population)
  33331. </p></dd>
  33332. <dt>&lsquo;<samp class="samp">l+m</samp>&rsquo;</dt>
  33333. <dd><p>Monochromacy (very rare)
  33334. </p></dd>
  33335. <dt>&lsquo;<samp class="samp">l+m+s</samp>&rsquo;</dt>
  33336. <dd><p>Achromatopsy (complete loss of daytime vision, extremely rare)
  33337. </p></dd>
  33338. </dl>
  33339. </dd>
  33340. <dt><samp class="option">cone-strength</samp></dt>
  33341. <dd><p>Gain factor for the cones specified by <code class="code">cones</code>, between <code class="code">0.0</code> and
  33342. <code class="code">10.0</code>. A value of <code class="code">1.0</code> results in no change to color vision. A
  33343. value of <code class="code">0.0</code> (the default) simulates complete loss of those cones. Values
  33344. above <code class="code">1.0</code> result in exaggerating the differences between cones, which
  33345. may help compensate for reduced color vision.
  33346. </p></dd>
  33347. </dl>
  33348. </div>
  33349. <div class="subsubsection-level-extent" id="Peak-detection">
  33350. <h4 class="subsubsection"><span>32.144.1.5 Peak detection<a class="copiable-link" href="#Peak-detection"> &para;</a></span></h4>
  33351. <p>To help deal with sources that only have static HDR10 metadata (or no tagging
  33352. whatsoever), libplacebo uses its own internal frame analysis compute shader to
  33353. analyze source frames and adapt the tone mapping function in realtime. If this
  33354. is too slow, or if exactly reproducible frame-perfect results are needed, it&rsquo;s
  33355. recommended to turn this feature off.
  33356. </p><dl class="table">
  33357. <dt><samp class="option">peak_detect</samp></dt>
  33358. <dd><p>Enable HDR peak detection. Ignores static MaxCLL/MaxFALL values in favor of
  33359. dynamic detection from the input. Note that the detected values do not get
  33360. written back to the output frames, they merely guide the internal tone mapping
  33361. process. Enabled by default.
  33362. </p>
  33363. </dd>
  33364. <dt><samp class="option">smoothing_period</samp></dt>
  33365. <dd><p>Peak detection smoothing period, between <code class="code">0.0</code> and <code class="code">1000.0</code>. Higher
  33366. values result in peak detection becoming less responsive to changes in the
  33367. input. Defaults to <code class="code">100.0</code>.
  33368. </p>
  33369. </dd>
  33370. <dt><samp class="option">minimum_peak</samp></dt>
  33371. <dd><p>Lower bound on the detected peak (relative to SDR white), between <code class="code">0.0</code>
  33372. and <code class="code">100.0</code>. Defaults to <code class="code">1.0</code>.
  33373. </p>
  33374. </dd>
  33375. <dt><samp class="option">scene_threshold_low</samp></dt>
  33376. <dt><samp class="option">scene_threshold_high</samp></dt>
  33377. <dd><p>Lower and upper thresholds for scene change detection. Expressed in a
  33378. logarithmic scale between <code class="code">0.0</code> and <code class="code">100.0</code>. Default to <code class="code">5.5</code>
  33379. and <code class="code">10.0</code>, respectively. Setting either to a negative value disables
  33380. this functionality.
  33381. </p>
  33382. </dd>
  33383. <dt><samp class="option">percentile</samp></dt>
  33384. <dd><p>Which percentile of the frame brightness histogram to use as the source peak
  33385. for tone-mapping. Defaults to <code class="code">99.995</code>, a fairly conservative value.
  33386. Setting this to <code class="code">100.0</code> disables frame histogram measurement and instead
  33387. uses the true peak brightness for tone-mapping.
  33388. </p></dd>
  33389. </dl>
  33390. </div>
  33391. <div class="subsubsection-level-extent" id="Tone-mapping">
  33392. <h4 class="subsubsection"><span>32.144.1.6 Tone mapping<a class="copiable-link" href="#Tone-mapping"> &para;</a></span></h4>
  33393. <p>The options in this section control how libplacebo performs tone-mapping and
  33394. gamut-mapping when dealing with mismatches between wide-gamut or HDR content.
  33395. In general, libplacebo relies on accurate source tagging and mastering display
  33396. gamut information to produce the best results.
  33397. </p><dl class="table">
  33398. <dt><samp class="option">gamut_mode</samp></dt>
  33399. <dd><p>How to handle out-of-gamut colors that can occur as a result of colorimetric
  33400. gamut mapping.
  33401. </p><dl class="table">
  33402. <dt>&lsquo;<samp class="samp">clip</samp>&rsquo;</dt>
  33403. <dd><p>Do nothing, simply clip out-of-range colors to the RGB volume. Low quality but
  33404. extremely fast.
  33405. </p></dd>
  33406. <dt>&lsquo;<samp class="samp">perceptual</samp>&rsquo;</dt>
  33407. <dd><p>Perceptually soft-clip colors to the gamut volume. This is the default.
  33408. </p></dd>
  33409. <dt>&lsquo;<samp class="samp">relative</samp>&rsquo;</dt>
  33410. <dd><p>Relative colorimetric hard-clip. Similar to <code class="code">perceptual</code> but without
  33411. the soft knee.
  33412. </p></dd>
  33413. <dt>&lsquo;<samp class="samp">saturation</samp>&rsquo;</dt>
  33414. <dd><p>Saturation mapping, maps primaries directly to primaries in RGB space.
  33415. Not recommended except for artificial computer graphics for which a bright,
  33416. saturated display is desired.
  33417. </p></dd>
  33418. <dt>&lsquo;<samp class="samp">absolute</samp>&rsquo;</dt>
  33419. <dd><p>Absolute colorimetric hard-clip. Performs no adjustment of the white point.
  33420. </p></dd>
  33421. <dt>&lsquo;<samp class="samp">desaturate</samp>&rsquo;</dt>
  33422. <dd><p>Hard-desaturates out-of-gamut colors towards white, while preserving the
  33423. luminance. Has a tendency to distort the visual appearance of bright objects.
  33424. </p></dd>
  33425. <dt>&lsquo;<samp class="samp">darken</samp>&rsquo;</dt>
  33426. <dd><p>Linearly reduces content brightness to preserves saturated details, followed by
  33427. clipping the remaining out-of-gamut colors.
  33428. </p></dd>
  33429. <dt>&lsquo;<samp class="samp">warn</samp>&rsquo;</dt>
  33430. <dd><p>Highlight out-of-gamut pixels (by inverting/marking them).
  33431. </p></dd>
  33432. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  33433. <dd><p>Linearly reduces chromaticity of the entire image to make it fit within the
  33434. target color volume. Be careful when using this on BT.2020 sources without
  33435. proper mastering metadata, as doing so will lead to excessive desaturation.
  33436. </p></dd>
  33437. </dl>
  33438. </dd>
  33439. <dt><samp class="option">tonemapping</samp></dt>
  33440. <dd><p>Tone-mapping algorithm to use. Available values are:
  33441. </p><dl class="table">
  33442. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  33443. <dd><p>Automatic selection based on internal heuristics. This is the default.
  33444. </p></dd>
  33445. <dt>&lsquo;<samp class="samp">clip</samp>&rsquo;</dt>
  33446. <dd><p>Performs no tone-mapping, just clips out-of-range colors. Retains perfect color
  33447. accuracy for in-range colors but completely destroys out-of-range information.
  33448. Does not perform any black point adaptation. Not configurable.
  33449. </p></dd>
  33450. <dt>&lsquo;<samp class="samp">st2094-40</samp>&rsquo;</dt>
  33451. <dd><p>EETF from SMPTE ST 2094-40 Annex B, which applies the Bezier curves from HDR10+
  33452. dynamic metadata based on Bezier curves to perform tone-mapping. The OOTF used
  33453. is adjusted based on the ratio between the targeted and actual display peak
  33454. luminances.
  33455. </p></dd>
  33456. <dt>&lsquo;<samp class="samp">st2094-10</samp>&rsquo;</dt>
  33457. <dd><p>EETF from SMPTE ST 2094-10 Annex B.2, which takes into account the input signal
  33458. average luminance in addition to the maximum/minimum. The configurable contrast
  33459. parameter influences the slope of the linear output segment, defaulting to
  33460. <code class="code">1.0</code> for no increase/decrease in contrast. Note that this does not
  33461. currently include the subjective gain/offset/gamma controls defined in Annex
  33462. B.3.
  33463. </p></dd>
  33464. <dt>&lsquo;<samp class="samp">bt.2390</samp>&rsquo;</dt>
  33465. <dd><p>EETF from the ITU-R Report BT.2390, a hermite spline roll-off with linear
  33466. segment. The knee point offset is configurable. Note that this parameter
  33467. defaults to <code class="code">1.0</code>, rather than the value of <code class="code">0.5</code> from the ITU-R
  33468. spec.
  33469. </p></dd>
  33470. <dt>&lsquo;<samp class="samp">bt.2446a</samp>&rsquo;</dt>
  33471. <dd><p>EETF from ITU-R Report BT.2446, method A. Designed for well-mastered HDR
  33472. sources. Can be used for both forward and inverse tone mapping. Not
  33473. configurable.
  33474. </p></dd>
  33475. <dt>&lsquo;<samp class="samp">spline</samp>&rsquo;</dt>
  33476. <dd><p>Simple spline consisting of two polynomials, joined by a single pivot point.
  33477. The parameter gives the pivot point (in PQ space), defaulting to <code class="code">0.30</code>.
  33478. Can be used for both forward and inverse tone mapping.
  33479. </p></dd>
  33480. <dt>&lsquo;<samp class="samp">reinhard</samp>&rsquo;</dt>
  33481. <dd><p>Simple non-linear, global tone mapping algorithm. The parameter specifies the
  33482. local contrast coefficient at the display peak. Essentially, a parameter of
  33483. <code class="code">0.5</code> implies that the reference white will be about half as bright as
  33484. when clipping. Defaults to <code class="code">0.5</code>, which results in the simplest
  33485. formulation of this function.
  33486. </p></dd>
  33487. <dt>&lsquo;<samp class="samp">mobius</samp>&rsquo;</dt>
  33488. <dd><p>Generalization of the reinhard tone mapping algorithm to support an additional
  33489. linear slope near black. The tone mapping parameter indicates the trade-off
  33490. between the linear section and the non-linear section. Essentially, for a given
  33491. parameter <var class="var">x</var>, every color value below <var class="var">x</var> will be mapped linearly,
  33492. while higher values get non-linearly tone-mapped. Values near <code class="code">1.0</code> make
  33493. this curve behave like <code class="code">clip</code>, while values near <code class="code">0.0</code> make this
  33494. curve behave like <code class="code">reinhard</code>. The default value is <code class="code">0.3</code>, which
  33495. provides a good balance between colorimetric accuracy and preserving
  33496. out-of-gamut details.
  33497. </p></dd>
  33498. <dt>&lsquo;<samp class="samp">hable</samp>&rsquo;</dt>
  33499. <dd><p>Piece-wise, filmic tone-mapping algorithm developed by John Hable for use in
  33500. Uncharted 2, inspired by a similar tone-mapping algorithm used by Kodak.
  33501. Popularized by its use in video games with HDR rendering. Preserves both dark
  33502. and bright details very well, but comes with the drawback of changing the
  33503. average brightness quite significantly. This is sort of similar to
  33504. <code class="code">reinhard</code> with parameter <code class="code">0.24</code>.
  33505. </p></dd>
  33506. <dt>&lsquo;<samp class="samp">gamma</samp>&rsquo;</dt>
  33507. <dd><p>Fits a gamma (power) function to transfer between the source and target color
  33508. spaces, effectively resulting in a perceptual hard-knee joining two roughly
  33509. linear sections. This preserves details at all scales fairly accurately, but
  33510. can result in an image with a muted or dull appearance. The parameter is used
  33511. as the cutoff point, defaulting to <code class="code">0.5</code>.
  33512. </p></dd>
  33513. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  33514. <dd><p>Linearly stretches the input range to the output range, in PQ space. This will
  33515. preserve all details accurately, but results in a significantly different
  33516. average brightness. Can be used for inverse tone-mapping in addition to regular
  33517. tone-mapping. The parameter can be used as an additional linear gain
  33518. coefficient (defaulting to <code class="code">1.0</code>).
  33519. </p></dd>
  33520. </dl>
  33521. </dd>
  33522. <dt><samp class="option">tonemapping_param</samp></dt>
  33523. <dd><p>For tunable tone mapping functions, this parameter can be used to fine-tune the
  33524. curve behavior. Refer to the documentation of <code class="code">tonemapping</code>. The default
  33525. value of <code class="code">0.0</code> is replaced by the curve&rsquo;s preferred default setting.
  33526. </p>
  33527. </dd>
  33528. <dt><samp class="option">inverse_tonemapping</samp></dt>
  33529. <dd><p>If enabled, this filter will also attempt stretching SDR signals to fill HDR
  33530. output color volumes. Disabled by default.
  33531. </p>
  33532. </dd>
  33533. <dt><samp class="option">tonemapping_lut_size</samp></dt>
  33534. <dd><p>Size of the tone-mapping LUT, between <code class="code">2</code> and <code class="code">1024</code>. Defaults to
  33535. <code class="code">256</code>. Note that this figure is squared when combined with
  33536. <code class="code">peak_detect</code>.
  33537. </p>
  33538. </dd>
  33539. <dt><samp class="option">contrast_recovery</samp></dt>
  33540. <dd><p>Contrast recovery strength. If set to a value above <code class="code">0.0</code>, the source
  33541. image will be divided into high-frequency and low-frequency components, and a
  33542. portion of the high-frequency image is added back onto the tone-mapped output.
  33543. May cause excessive ringing artifacts for some HDR sources, but can improve the
  33544. subjective sharpness and detail left over in the image after tone-mapping.
  33545. Defaults to <code class="code">0.30</code>.
  33546. </p>
  33547. </dd>
  33548. <dt><samp class="option">contrast_smoothness</samp></dt>
  33549. <dd><p>Contrast recovery lowpass kernel size. Defaults to <code class="code">3.5</code>. Increasing or
  33550. decreasing this will affect the visual appearance substantially. Has no effect
  33551. when <code class="code">contrast_recovery</code> is disabled.
  33552. </p></dd>
  33553. </dl>
  33554. </div>
  33555. <div class="subsubsection-level-extent" id="Dithering">
  33556. <h4 class="subsubsection"><span>32.144.1.7 Dithering<a class="copiable-link" href="#Dithering"> &para;</a></span></h4>
  33557. <p>By default, libplacebo will dither whenever necessary, which includes rendering
  33558. to any integer format below 16-bit precision. It&rsquo;s recommended to always leave
  33559. this on, since not doing so may result in visible banding in the output, even
  33560. if the <code class="code">debanding</code> filter is enabled. If maximum performance is needed,
  33561. use <code class="code">ordered_fixed</code> instead of disabling dithering.
  33562. </p><dl class="table">
  33563. <dt><samp class="option">dithering</samp></dt>
  33564. <dd><p>Dithering method to use. Accepts the following values:
  33565. </p><dl class="table">
  33566. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  33567. <dd><p>Disables dithering completely. May result in visible banding.
  33568. </p></dd>
  33569. <dt>&lsquo;<samp class="samp">blue</samp>&rsquo;</dt>
  33570. <dd><p>Dither with pseudo-blue noise. This is the default.
  33571. </p></dd>
  33572. <dt>&lsquo;<samp class="samp">ordered</samp>&rsquo;</dt>
  33573. <dd><p>Tunable ordered dither pattern.
  33574. </p></dd>
  33575. <dt>&lsquo;<samp class="samp">ordered_fixed</samp>&rsquo;</dt>
  33576. <dd><p>Faster ordered dither with a fixed size of <code class="code">6</code>. Texture-less.
  33577. </p></dd>
  33578. <dt>&lsquo;<samp class="samp">white</samp>&rsquo;</dt>
  33579. <dd><p>Dither with white noise. Texture-less.
  33580. </p></dd>
  33581. </dl>
  33582. </dd>
  33583. <dt><samp class="option">dither_lut_size</samp></dt>
  33584. <dd><p>Dither LUT size, as log base2 between <code class="code">1</code> and <code class="code">8</code>. Defaults to
  33585. <code class="code">6</code>, corresponding to a LUT size of <code class="code">64x64</code>.
  33586. </p>
  33587. </dd>
  33588. <dt><samp class="option">dither_temporal</samp></dt>
  33589. <dd><p>Enables temporal dithering. Disabled by default.
  33590. </p></dd>
  33591. </dl>
  33592. </div>
  33593. <div class="subsubsection-level-extent" id="Custom-shaders">
  33594. <h4 class="subsubsection"><span>32.144.1.8 Custom shaders<a class="copiable-link" href="#Custom-shaders"> &para;</a></span></h4>
  33595. <p>libplacebo supports a number of custom shaders based on the mpv .hook GLSL
  33596. syntax. A collection of such shaders can be found here:
  33597. <a class="url" href="https://github.com/mpv-player/mpv/wiki/User-Scripts#user-shaders">https://github.com/mpv-player/mpv/wiki/User-Scripts#user-shaders</a>
  33598. </p>
  33599. <p>A full description of the mpv shader format is beyond the scope of this
  33600. section, but a summary can be found here:
  33601. <a class="url" href="https://mpv.io/manual/master/#options-glsl-shader">https://mpv.io/manual/master/#options-glsl-shader</a>
  33602. </p><dl class="table">
  33603. <dt><samp class="option">custom_shader_path</samp></dt>
  33604. <dd><p>Specifies a path to a custom shader file to load at runtime.
  33605. </p>
  33606. </dd>
  33607. <dt><samp class="option">custom_shader_bin</samp></dt>
  33608. <dd><p>Specifies a complete custom shader as a raw string.
  33609. </p></dd>
  33610. </dl>
  33611. </div>
  33612. <div class="subsubsection-level-extent" id="Debugging-_002f-performance">
  33613. <h4 class="subsubsection"><span>32.144.1.9 Debugging / performance<a class="copiable-link" href="#Debugging-_002f-performance"> &para;</a></span></h4>
  33614. <p>All of the options in this section default off. They may be of assistance when
  33615. attempting to squeeze the maximum performance at the cost of quality.
  33616. </p><dl class="table">
  33617. <dt><samp class="option">skip_aa</samp></dt>
  33618. <dd><p>Disable anti-aliasing when downscaling.
  33619. </p>
  33620. </dd>
  33621. <dt><samp class="option">polar_cutoff</samp></dt>
  33622. <dd><p>Truncate polar (EWA) scaler kernels below this absolute magnitude, between
  33623. <code class="code">0.0</code> and <code class="code">1.0</code>.
  33624. </p>
  33625. </dd>
  33626. <dt><samp class="option">disable_linear</samp></dt>
  33627. <dd><p>Disable linear light scaling.
  33628. </p>
  33629. </dd>
  33630. <dt><samp class="option">disable_builtin</samp></dt>
  33631. <dd><p>Disable built-in GPU sampling (forces LUT).
  33632. </p>
  33633. </dd>
  33634. <dt><samp class="option">disable_fbos</samp></dt>
  33635. <dd><p>Forcibly disable FBOs, resulting in loss of almost all functionality, but
  33636. offering the maximum possible speed.
  33637. </p></dd>
  33638. </dl>
  33639. </div>
  33640. </div>
  33641. <div class="subsection-level-extent" id="Commands-105">
  33642. <h4 class="subsection"><span>32.144.2 Commands<a class="copiable-link" href="#Commands-105"> &para;</a></span></h4>
  33643. <p>This filter supports almost all of the above options as <a class="ref" href="#commands">commands</a>.
  33644. </p>
  33645. </div>
  33646. <div class="subsection-level-extent" id="Examples-107">
  33647. <h4 class="subsection"><span>32.144.3 Examples<a class="copiable-link" href="#Examples-107"> &para;</a></span></h4>
  33648. <ul class="itemize mark-bullet">
  33649. <li>Tone-map input to standard gamut BT.709 output:
  33650. <div class="example">
  33651. <pre class="example-preformatted">libplacebo=colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=tv
  33652. </pre></div>
  33653. </li><li>Rescale input to fit into standard 1080p, with high quality scaling:
  33654. <div class="example">
  33655. <pre class="example-preformatted">libplacebo=w=1920:h=1080:force_original_aspect_ratio=decrease:normalize_sar=true:upscaler=ewa_lanczos:downscaler=ewa_lanczos
  33656. </pre></div>
  33657. </li><li>Interpolate low FPS / VFR input to smoothed constant 60 fps output:
  33658. <div class="example">
  33659. <pre class="example-preformatted">libplacebo=fps=60:frame_mixer=mitchell_clamp
  33660. </pre></div>
  33661. </li><li>Convert input to standard sRGB JPEG:
  33662. <div class="example">
  33663. <pre class="example-preformatted">libplacebo=format=yuv420p:colorspace=bt470bg:color_primaries=bt709:color_trc=iec61966-2-1:range=pc
  33664. </pre></div>
  33665. </li><li>Use higher quality debanding settings:
  33666. <div class="example">
  33667. <pre class="example-preformatted">libplacebo=deband=true:deband_iterations=3:deband_radius=8:deband_threshold=6
  33668. </pre></div>
  33669. </li><li>Run this filter on the CPU, on systems with Mesa installed (and with the most
  33670. expensive options disabled):
  33671. <div class="example">
  33672. <pre class="example-preformatted">ffmpeg ... -init_hw_device vulkan:llvmpipe ... -vf libplacebo=upscaler=none:downscaler=none:peak_detect=false
  33673. </pre></div>
  33674. </li><li>Suppress CPU-based AV1/H.274 film grain application in the decoder, in favor of
  33675. doing it with this filter. Note that this is only a gain if the frames are
  33676. either already on the GPU, or if you&rsquo;re using libplacebo for other purposes,
  33677. since otherwise the VRAM roundtrip will more than offset any expected speedup.
  33678. <div class="example">
  33679. <pre class="example-preformatted">ffmpeg -export_side_data +film_grain ... -vf libplacebo=apply_filmgrain=true
  33680. </pre></div>
  33681. </li><li>Interop with VAAPI hwdec to avoid round-tripping through RAM:
  33682. <div class="example">
  33683. <pre class="example-preformatted">ffmpeg -init_hw_device vulkan -hwaccel vaapi -hwaccel_output_format vaapi ... -vf libplacebo
  33684. </pre></div>
  33685. </li></ul>
  33686. <a class="anchor" id="libvmaf"></a></div>
  33687. </div>
  33688. <div class="section-level-extent" id="libvmaf-1">
  33689. <h3 class="section"><span>32.145 libvmaf<a class="copiable-link" href="#libvmaf-1"> &para;</a></span></h3>
  33690. <p>Calculate the VMAF (Video Multi-Method Assessment Fusion) score for a
  33691. reference/distorted pair of input videos.
  33692. </p>
  33693. <p>The first input is the distorted video, and the second input is the reference video.
  33694. </p>
  33695. <p>The obtained VMAF score is printed through the logging system.
  33696. </p>
  33697. <p>It requires Netflix&rsquo;s vmaf library (libvmaf) as a pre-requisite.
  33698. After installing the library it can be enabled using:
  33699. <code class="code">./configure --enable-libvmaf</code>.
  33700. </p>
  33701. <p>The filter has following options:
  33702. </p>
  33703. <dl class="table">
  33704. <dt><samp class="option">model</samp></dt>
  33705. <dd><p>A &lsquo;|&lsquo; delimited list of vmaf models. Each model can be configured with a number of parameters.
  33706. Default value: <code class="code">&quot;version=vmaf_v0.6.1&quot;</code>
  33707. </p>
  33708. </dd>
  33709. <dt><samp class="option">feature</samp></dt>
  33710. <dd><p>A &lsquo;|&lsquo; delimited list of features. Each feature can be configured with a number of parameters.
  33711. </p>
  33712. </dd>
  33713. <dt><samp class="option">log_path</samp></dt>
  33714. <dd><p>Set the file path to be used to store log files.
  33715. </p>
  33716. </dd>
  33717. <dt><samp class="option">log_fmt</samp></dt>
  33718. <dd><p>Set the format of the log file (xml, json, csv, or sub).
  33719. </p>
  33720. </dd>
  33721. <dt><samp class="option">pool</samp></dt>
  33722. <dd><p>Set the pool method to be used for computing vmaf.
  33723. Options are <code class="code">min</code>, <code class="code">harmonic_mean</code> or <code class="code">mean</code> (default).
  33724. </p>
  33725. </dd>
  33726. <dt><samp class="option">n_threads</samp></dt>
  33727. <dd><p>Set number of threads to be used when initializing libvmaf.
  33728. Default value: <code class="code">0</code>, no threads.
  33729. </p>
  33730. </dd>
  33731. <dt><samp class="option">n_subsample</samp></dt>
  33732. <dd><p>Set frame subsampling interval to be used.
  33733. </p></dd>
  33734. </dl>
  33735. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  33736. </p>
  33737. <ul class="mini-toc">
  33738. <li><a href="#Examples-108" accesskey="1">Examples</a></li>
  33739. </ul>
  33740. <div class="subsection-level-extent" id="Examples-108">
  33741. <h4 class="subsection"><span>32.145.1 Examples<a class="copiable-link" href="#Examples-108"> &para;</a></span></h4>
  33742. <ul class="itemize mark-bullet">
  33743. <li>In the examples below, a distorted video <samp class="file">distorted.mpg</samp> is
  33744. compared with a reference file <samp class="file">reference.mpg</samp>.
  33745. </li><li>Basic usage:
  33746. <div class="example">
  33747. <pre class="example-preformatted">ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf=log_path=output.xml -f null -
  33748. </pre></div>
  33749. </li><li>Example with multiple models:
  33750. <div class="example">
  33751. <pre class="example-preformatted">ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='model=version=vmaf_v0.6.1\\:name=vmaf|version=vmaf_v0.6.1neg\\:name=vmaf_neg' -f null -
  33752. </pre></div>
  33753. </li><li>Example with multiple additional features:
  33754. <div class="example">
  33755. <pre class="example-preformatted">ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='feature=name=psnr|name=ciede' -f null -
  33756. </pre></div>
  33757. </li><li>Example with options and different containers:
  33758. <div class="example">
  33759. <pre class="example-preformatted">ffmpeg -i distorted.mpg -i reference.mkv -lavfi &quot;[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf=log_fmt=json:log_path=output.json&quot; -f null -
  33760. </pre></div>
  33761. </li></ul>
  33762. </div>
  33763. </div>
  33764. <div class="section-level-extent" id="libvmaf_005fcuda">
  33765. <h3 class="section"><span>32.146 libvmaf_cuda<a class="copiable-link" href="#libvmaf_005fcuda"> &para;</a></span></h3>
  33766. <p>This is the CUDA variant of the <a class="ref" href="#libvmaf">libvmaf</a> filter. It only accepts CUDA frames.
  33767. </p>
  33768. <p>It requires Netflix&rsquo;s vmaf library (libvmaf) as a pre-requisite.
  33769. After installing the library it can be enabled using:
  33770. <code class="code">./configure --enable-nonfree --enable-ffnvcodec --enable-libvmaf</code>.
  33771. </p>
  33772. <ul class="mini-toc">
  33773. <li><a href="#Examples-109" accesskey="1">Examples</a></li>
  33774. </ul>
  33775. <div class="subsection-level-extent" id="Examples-109">
  33776. <h4 class="subsection"><span>32.146.1 Examples<a class="copiable-link" href="#Examples-109"> &para;</a></span></h4>
  33777. <ul class="itemize mark-bullet">
  33778. <li>Basic usage showing CUVID hardware decoding and CUDA scaling with <a class="ref" href="#scale_005fcuda">scale_cuda</a>:
  33779. <div class="example">
  33780. <pre class="example-preformatted">ffmpeg \
  33781. -hwaccel cuda -hwaccel_output_format cuda -codec:v av1_cuvid -i dis.obu \
  33782. -hwaccel cuda -hwaccel_output_format cuda -codec:v av1_cuvid -i ref.obu \
  33783. -filter_complex &quot;
  33784. [0:v]scale_cuda=format=yuv420p[ref]; \
  33785. [1:v]scale_cuda=format=yuv420p[dis]; \
  33786. [dis][ref]libvmaf_cuda=log_fmt=json:log_path=output.json
  33787. &quot; \
  33788. -f null -
  33789. </pre></div>
  33790. </li></ul>
  33791. </div>
  33792. </div>
  33793. <div class="section-level-extent" id="limitdiff">
  33794. <h3 class="section"><span>32.147 limitdiff<a class="copiable-link" href="#limitdiff"> &para;</a></span></h3>
  33795. <p>Apply limited difference filter using second and optionally third video stream.
  33796. </p>
  33797. <p>The filter accepts the following options:
  33798. </p>
  33799. <dl class="table">
  33800. <dt><samp class="option">threshold</samp></dt>
  33801. <dd><p>Set the threshold to use when allowing certain differences between video streams.
  33802. Any absolute difference value lower or exact than this threshold will pick pixel components from
  33803. first video stream.
  33804. </p>
  33805. </dd>
  33806. <dt><samp class="option">elasticity</samp></dt>
  33807. <dd><p>Set the elasticity of soft thresholding when processing video streams.
  33808. This value multiplied with first one sets second threshold.
  33809. Any absolute difference value greater or exact than second threshold will pick pixel components
  33810. from second video stream. For values between those two threshold
  33811. linear interpolation between first and second video stream will be used.
  33812. </p>
  33813. </dd>
  33814. <dt><samp class="option">reference</samp></dt>
  33815. <dd><p>Enable the reference (third) video stream processing. By default is disabled.
  33816. If set, this video stream will be used for calculating absolute difference with first video
  33817. stream.
  33818. </p>
  33819. </dd>
  33820. <dt><samp class="option">planes</samp></dt>
  33821. <dd><p>Specify which planes will be processed. Defaults to all available.
  33822. </p></dd>
  33823. </dl>
  33824. <ul class="mini-toc">
  33825. <li><a href="#Commands-106" accesskey="1">Commands</a></li>
  33826. </ul>
  33827. <div class="subsection-level-extent" id="Commands-106">
  33828. <h4 class="subsection"><span>32.147.1 Commands<a class="copiable-link" href="#Commands-106"> &para;</a></span></h4>
  33829. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a> except option &lsquo;<samp class="samp">reference</samp>&rsquo;.
  33830. </p>
  33831. </div>
  33832. </div>
  33833. <div class="section-level-extent" id="limiter">
  33834. <h3 class="section"><span>32.148 limiter<a class="copiable-link" href="#limiter"> &para;</a></span></h3>
  33835. <p>Limits the pixel components values to the specified range [min, max].
  33836. </p>
  33837. <p>The filter accepts the following options:
  33838. </p>
  33839. <dl class="table">
  33840. <dt><samp class="option">min</samp></dt>
  33841. <dd><p>Lower bound. Defaults to the lowest allowed value for the input.
  33842. </p>
  33843. </dd>
  33844. <dt><samp class="option">max</samp></dt>
  33845. <dd><p>Upper bound. Defaults to the highest allowed value for the input.
  33846. </p>
  33847. </dd>
  33848. <dt><samp class="option">planes</samp></dt>
  33849. <dd><p>Specify which planes will be processed. Defaults to all available.
  33850. </p></dd>
  33851. </dl>
  33852. <ul class="mini-toc">
  33853. <li><a href="#Commands-107" accesskey="1">Commands</a></li>
  33854. </ul>
  33855. <div class="subsection-level-extent" id="Commands-107">
  33856. <h4 class="subsection"><span>32.148.1 Commands<a class="copiable-link" href="#Commands-107"> &para;</a></span></h4>
  33857. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  33858. </p>
  33859. </div>
  33860. </div>
  33861. <div class="section-level-extent" id="loop">
  33862. <h3 class="section"><span>32.149 loop<a class="copiable-link" href="#loop"> &para;</a></span></h3>
  33863. <p>Loop video frames.
  33864. </p>
  33865. <p>The filter accepts the following options:
  33866. </p>
  33867. <dl class="table">
  33868. <dt><samp class="option">loop</samp></dt>
  33869. <dd><p>Set the number of loops. Setting this value to -1 will result in infinite loops.
  33870. Default is 0.
  33871. </p>
  33872. </dd>
  33873. <dt><samp class="option">size</samp></dt>
  33874. <dd><p>Set maximal size in number of frames. Default is 0.
  33875. </p>
  33876. </dd>
  33877. <dt><samp class="option">start</samp></dt>
  33878. <dd><p>Set first frame of loop. Default is 0.
  33879. </p>
  33880. </dd>
  33881. <dt><samp class="option">time</samp></dt>
  33882. <dd><p>Set the time of loop start in seconds.
  33883. Only used if option named <var class="var">start</var> is set to <code class="code">-1</code>.
  33884. </p></dd>
  33885. </dl>
  33886. <ul class="mini-toc">
  33887. <li><a href="#Examples-110" accesskey="1">Examples</a></li>
  33888. </ul>
  33889. <div class="subsection-level-extent" id="Examples-110">
  33890. <h4 class="subsection"><span>32.149.1 Examples<a class="copiable-link" href="#Examples-110"> &para;</a></span></h4>
  33891. <ul class="itemize mark-bullet">
  33892. <li>Loop single first frame infinitely:
  33893. <div class="example">
  33894. <pre class="example-preformatted">loop=loop=-1:size=1:start=0
  33895. </pre></div>
  33896. </li><li>Loop single first frame 10 times:
  33897. <div class="example">
  33898. <pre class="example-preformatted">loop=loop=10:size=1:start=0
  33899. </pre></div>
  33900. </li><li>Loop 10 first frames 5 times:
  33901. <div class="example">
  33902. <pre class="example-preformatted">loop=loop=5:size=10:start=0
  33903. </pre></div>
  33904. </li></ul>
  33905. </div>
  33906. </div>
  33907. <div class="section-level-extent" id="lut1d">
  33908. <h3 class="section"><span>32.150 lut1d<a class="copiable-link" href="#lut1d"> &para;</a></span></h3>
  33909. <p>Apply a 1D LUT to an input video.
  33910. </p>
  33911. <p>The filter accepts the following options:
  33912. </p>
  33913. <dl class="table">
  33914. <dt><samp class="option">file</samp></dt>
  33915. <dd><p>Set the 1D LUT file name.
  33916. </p>
  33917. <p>Currently supported formats:
  33918. </p><dl class="table">
  33919. <dt>&lsquo;<samp class="samp">cube</samp>&rsquo;</dt>
  33920. <dd><p>Iridas
  33921. </p></dd>
  33922. <dt>&lsquo;<samp class="samp">csp</samp>&rsquo;</dt>
  33923. <dd><p>cineSpace
  33924. </p></dd>
  33925. </dl>
  33926. </dd>
  33927. <dt><samp class="option">interp</samp></dt>
  33928. <dd><p>Select interpolation mode.
  33929. </p>
  33930. <p>Available values are:
  33931. </p>
  33932. <dl class="table">
  33933. <dt>&lsquo;<samp class="samp">nearest</samp>&rsquo;</dt>
  33934. <dd><p>Use values from the nearest defined point.
  33935. </p></dd>
  33936. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  33937. <dd><p>Interpolate values using the linear interpolation.
  33938. </p></dd>
  33939. <dt>&lsquo;<samp class="samp">cosine</samp>&rsquo;</dt>
  33940. <dd><p>Interpolate values using the cosine interpolation.
  33941. </p></dd>
  33942. <dt>&lsquo;<samp class="samp">cubic</samp>&rsquo;</dt>
  33943. <dd><p>Interpolate values using the cubic interpolation.
  33944. </p></dd>
  33945. <dt>&lsquo;<samp class="samp">spline</samp>&rsquo;</dt>
  33946. <dd><p>Interpolate values using the spline interpolation.
  33947. </p></dd>
  33948. </dl>
  33949. </dd>
  33950. </dl>
  33951. <ul class="mini-toc">
  33952. <li><a href="#Commands-108" accesskey="1">Commands</a></li>
  33953. </ul>
  33954. <div class="subsection-level-extent" id="Commands-108">
  33955. <h4 class="subsection"><span>32.150.1 Commands<a class="copiable-link" href="#Commands-108"> &para;</a></span></h4>
  33956. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  33957. </p>
  33958. <a class="anchor" id="lut3d"></a></div>
  33959. </div>
  33960. <div class="section-level-extent" id="lut3d-1">
  33961. <h3 class="section"><span>32.151 lut3d<a class="copiable-link" href="#lut3d-1"> &para;</a></span></h3>
  33962. <p>Apply a 3D LUT to an input video.
  33963. </p>
  33964. <p>The filter accepts the following options:
  33965. </p>
  33966. <dl class="table">
  33967. <dt><samp class="option">file</samp></dt>
  33968. <dd><p>Set the 3D LUT file name.
  33969. </p>
  33970. <p>Currently supported formats:
  33971. </p><dl class="table">
  33972. <dt>&lsquo;<samp class="samp">3dl</samp>&rsquo;</dt>
  33973. <dd><p>AfterEffects
  33974. </p></dd>
  33975. <dt>&lsquo;<samp class="samp">cube</samp>&rsquo;</dt>
  33976. <dd><p>Iridas
  33977. </p></dd>
  33978. <dt>&lsquo;<samp class="samp">dat</samp>&rsquo;</dt>
  33979. <dd><p>DaVinci
  33980. </p></dd>
  33981. <dt>&lsquo;<samp class="samp">m3d</samp>&rsquo;</dt>
  33982. <dd><p>Pandora
  33983. </p></dd>
  33984. <dt>&lsquo;<samp class="samp">csp</samp>&rsquo;</dt>
  33985. <dd><p>cineSpace
  33986. </p></dd>
  33987. </dl>
  33988. </dd>
  33989. <dt><samp class="option">interp</samp></dt>
  33990. <dd><p>Select interpolation mode.
  33991. </p>
  33992. <p>Available values are:
  33993. </p>
  33994. <dl class="table">
  33995. <dt>&lsquo;<samp class="samp">nearest</samp>&rsquo;</dt>
  33996. <dd><p>Use values from the nearest defined point.
  33997. </p></dd>
  33998. <dt>&lsquo;<samp class="samp">trilinear</samp>&rsquo;</dt>
  33999. <dd><p>Interpolate values using the 8 points defining a cube.
  34000. </p></dd>
  34001. <dt>&lsquo;<samp class="samp">tetrahedral</samp>&rsquo;</dt>
  34002. <dd><p>Interpolate values using a tetrahedron.
  34003. </p></dd>
  34004. <dt>&lsquo;<samp class="samp">pyramid</samp>&rsquo;</dt>
  34005. <dd><p>Interpolate values using a pyramid.
  34006. </p></dd>
  34007. <dt>&lsquo;<samp class="samp">prism</samp>&rsquo;</dt>
  34008. <dd><p>Interpolate values using a prism.
  34009. </p></dd>
  34010. </dl>
  34011. </dd>
  34012. </dl>
  34013. <ul class="mini-toc">
  34014. <li><a href="#Commands-109" accesskey="1">Commands</a></li>
  34015. </ul>
  34016. <div class="subsection-level-extent" id="Commands-109">
  34017. <h4 class="subsection"><span>32.151.1 Commands<a class="copiable-link" href="#Commands-109"> &para;</a></span></h4>
  34018. <p>This filter supports the <code class="code">interp</code> option as <a class="ref" href="#commands">commands</a>.
  34019. </p>
  34020. </div>
  34021. </div>
  34022. <div class="section-level-extent" id="lumakey">
  34023. <h3 class="section"><span>32.152 lumakey<a class="copiable-link" href="#lumakey"> &para;</a></span></h3>
  34024. <p>Turn certain luma values into transparency.
  34025. </p>
  34026. <p>The filter accepts the following options:
  34027. </p>
  34028. <dl class="table">
  34029. <dt><samp class="option">threshold</samp></dt>
  34030. <dd><p>Set the luma which will be used as base for transparency.
  34031. Default value is <code class="code">0</code>.
  34032. </p>
  34033. </dd>
  34034. <dt><samp class="option">tolerance</samp></dt>
  34035. <dd><p>Set the range of luma values to be keyed out.
  34036. Default value is <code class="code">0.01</code>.
  34037. </p>
  34038. </dd>
  34039. <dt><samp class="option">softness</samp></dt>
  34040. <dd><p>Set the range of softness. Default value is <code class="code">0</code>.
  34041. Use this to control gradual transition from zero to full transparency.
  34042. </p></dd>
  34043. </dl>
  34044. <ul class="mini-toc">
  34045. <li><a href="#Commands-110" accesskey="1">Commands</a></li>
  34046. </ul>
  34047. <div class="subsection-level-extent" id="Commands-110">
  34048. <h4 class="subsection"><span>32.152.1 Commands<a class="copiable-link" href="#Commands-110"> &para;</a></span></h4>
  34049. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  34050. The command accepts the same syntax of the corresponding option.
  34051. </p>
  34052. <p>If the specified expression is not valid, it is kept at its current
  34053. value.
  34054. </p>
  34055. </div>
  34056. </div>
  34057. <div class="section-level-extent" id="lut_002c-lutrgb_002c-lutyuv">
  34058. <h3 class="section"><span>32.153 lut, lutrgb, lutyuv<a class="copiable-link" href="#lut_002c-lutrgb_002c-lutyuv"> &para;</a></span></h3>
  34059. <p>Compute a look-up table for binding each pixel component input value
  34060. to an output value, and apply it to the input video.
  34061. </p>
  34062. <p><var class="var">lutyuv</var> applies a lookup table to a YUV input video, <var class="var">lutrgb</var>
  34063. to an RGB input video.
  34064. </p>
  34065. <p>These filters accept the following parameters:
  34066. </p><dl class="table">
  34067. <dt><samp class="option">c0</samp></dt>
  34068. <dd><p>set first pixel component expression
  34069. </p></dd>
  34070. <dt><samp class="option">c1</samp></dt>
  34071. <dd><p>set second pixel component expression
  34072. </p></dd>
  34073. <dt><samp class="option">c2</samp></dt>
  34074. <dd><p>set third pixel component expression
  34075. </p></dd>
  34076. <dt><samp class="option">c3</samp></dt>
  34077. <dd><p>set fourth pixel component expression, corresponds to the alpha component
  34078. </p>
  34079. </dd>
  34080. <dt><samp class="option">r</samp></dt>
  34081. <dd><p>set red component expression
  34082. </p></dd>
  34083. <dt><samp class="option">g</samp></dt>
  34084. <dd><p>set green component expression
  34085. </p></dd>
  34086. <dt><samp class="option">b</samp></dt>
  34087. <dd><p>set blue component expression
  34088. </p></dd>
  34089. <dt><samp class="option">a</samp></dt>
  34090. <dd><p>alpha component expression
  34091. </p>
  34092. </dd>
  34093. <dt><samp class="option">y</samp></dt>
  34094. <dd><p>set Y/luma component expression
  34095. </p></dd>
  34096. <dt><samp class="option">u</samp></dt>
  34097. <dd><p>set U/Cb component expression
  34098. </p></dd>
  34099. <dt><samp class="option">v</samp></dt>
  34100. <dd><p>set V/Cr component expression
  34101. </p></dd>
  34102. </dl>
  34103. <p>Each of them specifies the expression to use for computing the lookup table for
  34104. the corresponding pixel component values.
  34105. </p>
  34106. <p>The exact component associated to each of the <var class="var">c*</var> options depends on the
  34107. format in input.
  34108. </p>
  34109. <p>The <var class="var">lut</var> filter requires either YUV or RGB pixel formats in input,
  34110. <var class="var">lutrgb</var> requires RGB pixel formats in input, and <var class="var">lutyuv</var> requires YUV.
  34111. </p>
  34112. <p>The expressions can contain the following constants and functions:
  34113. </p>
  34114. <dl class="table">
  34115. <dt><samp class="option">w</samp></dt>
  34116. <dt><samp class="option">h</samp></dt>
  34117. <dd><p>The input width and height.
  34118. </p>
  34119. </dd>
  34120. <dt><samp class="option">val</samp></dt>
  34121. <dd><p>The input value for the pixel component.
  34122. </p>
  34123. </dd>
  34124. <dt><samp class="option">clipval</samp></dt>
  34125. <dd><p>The input value, clipped to the <var class="var">minval</var>-<var class="var">maxval</var> range.
  34126. </p>
  34127. </dd>
  34128. <dt><samp class="option">maxval</samp></dt>
  34129. <dd><p>The maximum value for the pixel component.
  34130. </p>
  34131. </dd>
  34132. <dt><samp class="option">minval</samp></dt>
  34133. <dd><p>The minimum value for the pixel component.
  34134. </p>
  34135. </dd>
  34136. <dt><samp class="option">negval</samp></dt>
  34137. <dd><p>The negated value for the pixel component value, clipped to the
  34138. <var class="var">minval</var>-<var class="var">maxval</var> range; it corresponds to the expression
  34139. &quot;maxval-clipval+minval&quot;.
  34140. </p>
  34141. </dd>
  34142. <dt><samp class="option">clip(val)</samp></dt>
  34143. <dd><p>The computed value in <var class="var">val</var>, clipped to the
  34144. <var class="var">minval</var>-<var class="var">maxval</var> range.
  34145. </p>
  34146. </dd>
  34147. <dt><samp class="option">gammaval(gamma)</samp></dt>
  34148. <dd><p>The computed gamma correction value of the pixel component value,
  34149. clipped to the <var class="var">minval</var>-<var class="var">maxval</var> range. It corresponds to the
  34150. expression
  34151. &quot;pow((clipval-minval)/(maxval-minval)\,<var class="var">gamma</var>)*(maxval-minval)+minval&quot;
  34152. </p>
  34153. </dd>
  34154. </dl>
  34155. <p>All expressions default to &quot;clipval&quot;.
  34156. </p>
  34157. <ul class="mini-toc">
  34158. <li><a href="#Commands-111" accesskey="1">Commands</a></li>
  34159. <li><a href="#Examples-111" accesskey="2">Examples</a></li>
  34160. </ul>
  34161. <div class="subsection-level-extent" id="Commands-111">
  34162. <h4 class="subsection"><span>32.153.1 Commands<a class="copiable-link" href="#Commands-111"> &para;</a></span></h4>
  34163. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  34164. </p>
  34165. </div>
  34166. <div class="subsection-level-extent" id="Examples-111">
  34167. <h4 class="subsection"><span>32.153.2 Examples<a class="copiable-link" href="#Examples-111"> &para;</a></span></h4>
  34168. <ul class="itemize mark-bullet">
  34169. <li>Negate input video:
  34170. <div class="example">
  34171. <pre class="example-preformatted">lutrgb=&quot;r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val&quot;
  34172. lutyuv=&quot;y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val&quot;
  34173. </pre></div>
  34174. <p>The above is the same as:
  34175. </p><div class="example">
  34176. <pre class="example-preformatted">lutrgb=&quot;r=negval:g=negval:b=negval&quot;
  34177. lutyuv=&quot;y=negval:u=negval:v=negval&quot;
  34178. </pre></div>
  34179. </li><li>Negate luma:
  34180. <div class="example">
  34181. <pre class="example-preformatted">lutyuv=y=negval
  34182. </pre></div>
  34183. </li><li>Remove chroma components, turning the video into a graytone image:
  34184. <div class="example">
  34185. <pre class="example-preformatted">lutyuv=&quot;u=128:v=128&quot;
  34186. </pre></div>
  34187. </li><li>Apply a luma burning effect:
  34188. <div class="example">
  34189. <pre class="example-preformatted">lutyuv=&quot;y=2*val&quot;
  34190. </pre></div>
  34191. </li><li>Remove green and blue components:
  34192. <div class="example">
  34193. <pre class="example-preformatted">lutrgb=&quot;g=0:b=0&quot;
  34194. </pre></div>
  34195. </li><li>Set a constant alpha channel value on input:
  34196. <div class="example">
  34197. <pre class="example-preformatted">format=rgba,lutrgb=a=&quot;maxval-minval/2&quot;
  34198. </pre></div>
  34199. </li><li>Correct luma gamma by a factor of 0.5:
  34200. <div class="example">
  34201. <pre class="example-preformatted">lutyuv=y=gammaval(0.5)
  34202. </pre></div>
  34203. </li><li>Discard least significant bits of luma:
  34204. <div class="example">
  34205. <pre class="example-preformatted">lutyuv=y='bitand(val, 128+64+32)'
  34206. </pre></div>
  34207. </li><li>Technicolor like effect:
  34208. <div class="example">
  34209. <pre class="example-preformatted">lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
  34210. </pre></div>
  34211. </li></ul>
  34212. </div>
  34213. </div>
  34214. <div class="section-level-extent" id="lut2_002c-tlut2">
  34215. <h3 class="section"><span>32.154 lut2, tlut2<a class="copiable-link" href="#lut2_002c-tlut2"> &para;</a></span></h3>
  34216. <p>The <code class="code">lut2</code> filter takes two input streams and outputs one
  34217. stream.
  34218. </p>
  34219. <p>The <code class="code">tlut2</code> (time lut2) filter takes two consecutive frames
  34220. from one single stream.
  34221. </p>
  34222. <p>This filter accepts the following parameters:
  34223. </p><dl class="table">
  34224. <dt><samp class="option">c0</samp></dt>
  34225. <dd><p>set first pixel component expression
  34226. </p></dd>
  34227. <dt><samp class="option">c1</samp></dt>
  34228. <dd><p>set second pixel component expression
  34229. </p></dd>
  34230. <dt><samp class="option">c2</samp></dt>
  34231. <dd><p>set third pixel component expression
  34232. </p></dd>
  34233. <dt><samp class="option">c3</samp></dt>
  34234. <dd><p>set fourth pixel component expression, corresponds to the alpha component
  34235. </p>
  34236. </dd>
  34237. <dt><samp class="option">d</samp></dt>
  34238. <dd><p>set output bit depth, only available for <code class="code">lut2</code> filter. By default is 0,
  34239. which means bit depth is automatically picked from first input format.
  34240. </p></dd>
  34241. </dl>
  34242. <p>The <code class="code">lut2</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  34243. </p>
  34244. <p>Each of them specifies the expression to use for computing the lookup table for
  34245. the corresponding pixel component values.
  34246. </p>
  34247. <p>The exact component associated to each of the <var class="var">c*</var> options depends on the
  34248. format in inputs.
  34249. </p>
  34250. <p>The expressions can contain the following constants:
  34251. </p>
  34252. <dl class="table">
  34253. <dt><samp class="option">w</samp></dt>
  34254. <dt><samp class="option">h</samp></dt>
  34255. <dd><p>The input width and height.
  34256. </p>
  34257. </dd>
  34258. <dt><samp class="option">x</samp></dt>
  34259. <dd><p>The first input value for the pixel component.
  34260. </p>
  34261. </dd>
  34262. <dt><samp class="option">y</samp></dt>
  34263. <dd><p>The second input value for the pixel component.
  34264. </p>
  34265. </dd>
  34266. <dt><samp class="option">bdx</samp></dt>
  34267. <dd><p>The first input video bit depth.
  34268. </p>
  34269. </dd>
  34270. <dt><samp class="option">bdy</samp></dt>
  34271. <dd><p>The second input video bit depth.
  34272. </p></dd>
  34273. </dl>
  34274. <p>All expressions default to &quot;x&quot;.
  34275. </p>
  34276. <ul class="mini-toc">
  34277. <li><a href="#Commands-112" accesskey="1">Commands</a></li>
  34278. <li><a href="#Examples-112" accesskey="2">Examples</a></li>
  34279. </ul>
  34280. <div class="subsection-level-extent" id="Commands-112">
  34281. <h4 class="subsection"><span>32.154.1 Commands<a class="copiable-link" href="#Commands-112"> &para;</a></span></h4>
  34282. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a> except option <code class="code">d</code>.
  34283. </p>
  34284. </div>
  34285. <div class="subsection-level-extent" id="Examples-112">
  34286. <h4 class="subsection"><span>32.154.2 Examples<a class="copiable-link" href="#Examples-112"> &para;</a></span></h4>
  34287. <ul class="itemize mark-bullet">
  34288. <li>Highlight differences between two RGB video streams:
  34289. <div class="example">
  34290. <pre class="example-preformatted">lut2='ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,0,pow(2,bdx)-1)'
  34291. </pre></div>
  34292. </li><li>Highlight differences between two YUV video streams:
  34293. <div class="example">
  34294. <pre class="example-preformatted">lut2='ifnot(x-y,0,pow(2,bdx)-1):ifnot(x-y,pow(2,bdx-1),pow(2,bdx)-1):ifnot(x-y,pow(2,bdx-1),pow(2,bdx)-1)'
  34295. </pre></div>
  34296. </li><li>Show max difference between two video streams:
  34297. <div class="example">
  34298. <pre class="example-preformatted">lut2='if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1))):if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1))):if(lt(x,y),0,if(gt(x,y),pow(2,bdx)-1,pow(2,bdx-1)))'
  34299. </pre></div>
  34300. </li></ul>
  34301. </div>
  34302. </div>
  34303. <div class="section-level-extent" id="maskedclamp">
  34304. <h3 class="section"><span>32.155 maskedclamp<a class="copiable-link" href="#maskedclamp"> &para;</a></span></h3>
  34305. <p>Clamp the first input stream with the second input and third input stream.
  34306. </p>
  34307. <p>Returns the value of first stream to be between second input
  34308. stream - <code class="code">undershoot</code> and third input stream + <code class="code">overshoot</code>.
  34309. </p>
  34310. <p>This filter accepts the following options:
  34311. </p><dl class="table">
  34312. <dt><samp class="option">undershoot</samp></dt>
  34313. <dd><p>Default value is <code class="code">0</code>.
  34314. </p>
  34315. </dd>
  34316. <dt><samp class="option">overshoot</samp></dt>
  34317. <dd><p>Default value is <code class="code">0</code>.
  34318. </p>
  34319. </dd>
  34320. <dt><samp class="option">planes</samp></dt>
  34321. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  34322. copied from first stream.
  34323. By default value 0xf, all planes will be processed.
  34324. </p></dd>
  34325. </dl>
  34326. <ul class="mini-toc">
  34327. <li><a href="#Commands-113" accesskey="1">Commands</a></li>
  34328. </ul>
  34329. <div class="subsection-level-extent" id="Commands-113">
  34330. <h4 class="subsection"><span>32.155.1 Commands<a class="copiable-link" href="#Commands-113"> &para;</a></span></h4>
  34331. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  34332. </p>
  34333. </div>
  34334. </div>
  34335. <div class="section-level-extent" id="maskedmax">
  34336. <h3 class="section"><span>32.156 maskedmax<a class="copiable-link" href="#maskedmax"> &para;</a></span></h3>
  34337. <p>Merge the second and third input stream into output stream using absolute differences
  34338. between second input stream and first input stream and absolute difference between
  34339. third input stream and first input stream. The picked value will be from second input
  34340. stream if second absolute difference is greater than first one or from third input stream
  34341. otherwise.
  34342. </p>
  34343. <p>This filter accepts the following options:
  34344. </p><dl class="table">
  34345. <dt><samp class="option">planes</samp></dt>
  34346. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  34347. copied from first stream.
  34348. By default value 0xf, all planes will be processed.
  34349. </p></dd>
  34350. </dl>
  34351. <ul class="mini-toc">
  34352. <li><a href="#Commands-114" accesskey="1">Commands</a></li>
  34353. </ul>
  34354. <div class="subsection-level-extent" id="Commands-114">
  34355. <h4 class="subsection"><span>32.156.1 Commands<a class="copiable-link" href="#Commands-114"> &para;</a></span></h4>
  34356. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  34357. </p>
  34358. </div>
  34359. </div>
  34360. <div class="section-level-extent" id="maskedmerge">
  34361. <h3 class="section"><span>32.157 maskedmerge<a class="copiable-link" href="#maskedmerge"> &para;</a></span></h3>
  34362. <p>Merge the first input stream with the second input stream using per pixel
  34363. weights in the third input stream.
  34364. </p>
  34365. <p>A value of 0 in the third stream pixel component means that pixel component
  34366. from first stream is returned unchanged, while maximum value (eg. 255 for
  34367. 8-bit videos) means that pixel component from second stream is returned
  34368. unchanged. Intermediate values define the amount of merging between both
  34369. input stream&rsquo;s pixel components.
  34370. </p>
  34371. <p>This filter accepts the following options:
  34372. </p><dl class="table">
  34373. <dt><samp class="option">planes</samp></dt>
  34374. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  34375. copied from first stream.
  34376. By default value 0xf, all planes will be processed.
  34377. </p></dd>
  34378. </dl>
  34379. <ul class="mini-toc">
  34380. <li><a href="#Commands-115" accesskey="1">Commands</a></li>
  34381. </ul>
  34382. <div class="subsection-level-extent" id="Commands-115">
  34383. <h4 class="subsection"><span>32.157.1 Commands<a class="copiable-link" href="#Commands-115"> &para;</a></span></h4>
  34384. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  34385. </p>
  34386. </div>
  34387. </div>
  34388. <div class="section-level-extent" id="maskedmin">
  34389. <h3 class="section"><span>32.158 maskedmin<a class="copiable-link" href="#maskedmin"> &para;</a></span></h3>
  34390. <p>Merge the second and third input stream into output stream using absolute differences
  34391. between second input stream and first input stream and absolute difference between
  34392. third input stream and first input stream. The picked value will be from second input
  34393. stream if second absolute difference is less than first one or from third input stream
  34394. otherwise.
  34395. </p>
  34396. <p>This filter accepts the following options:
  34397. </p><dl class="table">
  34398. <dt><samp class="option">planes</samp></dt>
  34399. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  34400. copied from first stream.
  34401. By default value 0xf, all planes will be processed.
  34402. </p></dd>
  34403. </dl>
  34404. <ul class="mini-toc">
  34405. <li><a href="#Commands-116" accesskey="1">Commands</a></li>
  34406. </ul>
  34407. <div class="subsection-level-extent" id="Commands-116">
  34408. <h4 class="subsection"><span>32.158.1 Commands<a class="copiable-link" href="#Commands-116"> &para;</a></span></h4>
  34409. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  34410. </p>
  34411. </div>
  34412. </div>
  34413. <div class="section-level-extent" id="maskedthreshold">
  34414. <h3 class="section"><span>32.159 maskedthreshold<a class="copiable-link" href="#maskedthreshold"> &para;</a></span></h3>
  34415. <p>Pick pixels comparing absolute difference of two video streams with fixed
  34416. threshold.
  34417. </p>
  34418. <p>If absolute difference between pixel component of first and second video
  34419. stream is equal or lower than user supplied threshold than pixel component
  34420. from first video stream is picked, otherwise pixel component from second
  34421. video stream is picked.
  34422. </p>
  34423. <p>This filter accepts the following options:
  34424. </p><dl class="table">
  34425. <dt><samp class="option">threshold</samp></dt>
  34426. <dd><p>Set threshold used when picking pixels from absolute difference from two input
  34427. video streams.
  34428. </p>
  34429. </dd>
  34430. <dt><samp class="option">planes</samp></dt>
  34431. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  34432. copied from second stream.
  34433. By default value 0xf, all planes will be processed.
  34434. </p>
  34435. </dd>
  34436. <dt><samp class="option">mode</samp></dt>
  34437. <dd><p>Set mode of filter operation. Can be <code class="code">abs</code> or <code class="code">diff</code>.
  34438. Default is <code class="code">abs</code>.
  34439. </p></dd>
  34440. </dl>
  34441. <ul class="mini-toc">
  34442. <li><a href="#Commands-117" accesskey="1">Commands</a></li>
  34443. </ul>
  34444. <div class="subsection-level-extent" id="Commands-117">
  34445. <h4 class="subsection"><span>32.159.1 Commands<a class="copiable-link" href="#Commands-117"> &para;</a></span></h4>
  34446. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  34447. </p>
  34448. </div>
  34449. </div>
  34450. <div class="section-level-extent" id="maskfun">
  34451. <h3 class="section"><span>32.160 maskfun<a class="copiable-link" href="#maskfun"> &para;</a></span></h3>
  34452. <p>Create mask from input video.
  34453. </p>
  34454. <p>For example it is useful to create motion masks after <code class="code">tblend</code> filter.
  34455. </p>
  34456. <p>This filter accepts the following options:
  34457. </p>
  34458. <dl class="table">
  34459. <dt><samp class="option">low</samp></dt>
  34460. <dd><p>Set low threshold. Any pixel component lower or exact than this value will be set to 0.
  34461. </p>
  34462. </dd>
  34463. <dt><samp class="option">high</samp></dt>
  34464. <dd><p>Set high threshold. Any pixel component higher than this value will be set to max value
  34465. allowed for current pixel format.
  34466. </p>
  34467. </dd>
  34468. <dt><samp class="option">planes</samp></dt>
  34469. <dd><p>Set planes to filter, by default all available planes are filtered.
  34470. </p>
  34471. </dd>
  34472. <dt><samp class="option">fill</samp></dt>
  34473. <dd><p>Fill all frame pixels with this value.
  34474. </p>
  34475. </dd>
  34476. <dt><samp class="option">sum</samp></dt>
  34477. <dd><p>Set max average pixel value for frame. If sum of all pixel components is higher that this
  34478. average, output frame will be completely filled with value set by <var class="var">fill</var> option.
  34479. Typically useful for scene changes when used in combination with <code class="code">tblend</code> filter.
  34480. </p></dd>
  34481. </dl>
  34482. <ul class="mini-toc">
  34483. <li><a href="#Commands-118" accesskey="1">Commands</a></li>
  34484. </ul>
  34485. <div class="subsection-level-extent" id="Commands-118">
  34486. <h4 class="subsection"><span>32.160.1 Commands<a class="copiable-link" href="#Commands-118"> &para;</a></span></h4>
  34487. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  34488. </p>
  34489. </div>
  34490. </div>
  34491. <div class="section-level-extent" id="mcdeint">
  34492. <h3 class="section"><span>32.161 mcdeint<a class="copiable-link" href="#mcdeint"> &para;</a></span></h3>
  34493. <p>Apply motion-compensation deinterlacing.
  34494. </p>
  34495. <p>It needs one field per frame as input and must thus be used together
  34496. with yadif=1/3 or equivalent.
  34497. </p>
  34498. <p>This filter accepts the following options:
  34499. </p><dl class="table">
  34500. <dt><samp class="option">mode</samp></dt>
  34501. <dd><p>Set the deinterlacing mode.
  34502. </p>
  34503. <p>It accepts one of the following values:
  34504. </p><dl class="table">
  34505. <dt>&lsquo;<samp class="samp">fast</samp>&rsquo;</dt>
  34506. <dt>&lsquo;<samp class="samp">medium</samp>&rsquo;</dt>
  34507. <dt>&lsquo;<samp class="samp">slow</samp>&rsquo;</dt>
  34508. <dd><p>use iterative motion estimation
  34509. </p></dd>
  34510. <dt>&lsquo;<samp class="samp">extra_slow</samp>&rsquo;</dt>
  34511. <dd><p>like &lsquo;<samp class="samp">slow</samp>&rsquo;, but use multiple reference frames.
  34512. </p></dd>
  34513. </dl>
  34514. <p>Default value is &lsquo;<samp class="samp">fast</samp>&rsquo;.
  34515. </p>
  34516. </dd>
  34517. <dt><samp class="option">parity</samp></dt>
  34518. <dd><p>Set the picture field parity assumed for the input video. It must be
  34519. one of the following values:
  34520. </p>
  34521. <dl class="table">
  34522. <dt>&lsquo;<samp class="samp">0, tff</samp>&rsquo;</dt>
  34523. <dd><p>assume top field first
  34524. </p></dd>
  34525. <dt>&lsquo;<samp class="samp">1, bff</samp>&rsquo;</dt>
  34526. <dd><p>assume bottom field first
  34527. </p></dd>
  34528. </dl>
  34529. <p>Default value is &lsquo;<samp class="samp">bff</samp>&rsquo;.
  34530. </p>
  34531. </dd>
  34532. <dt><samp class="option">qp</samp></dt>
  34533. <dd><p>Set per-block quantization parameter (QP) used by the internal
  34534. encoder.
  34535. </p>
  34536. <p>Higher values should result in a smoother motion vector field but less
  34537. optimal individual vectors. Default value is 1.
  34538. </p></dd>
  34539. </dl>
  34540. </div>
  34541. <div class="section-level-extent" id="median">
  34542. <h3 class="section"><span>32.162 median<a class="copiable-link" href="#median"> &para;</a></span></h3>
  34543. <p>Pick median pixel from certain rectangle defined by radius.
  34544. </p>
  34545. <p>This filter accepts the following options:
  34546. </p>
  34547. <dl class="table">
  34548. <dt><samp class="option">radius</samp></dt>
  34549. <dd><p>Set horizontal radius size. Default value is <code class="code">1</code>.
  34550. Allowed range is integer from 1 to 127.
  34551. </p>
  34552. </dd>
  34553. <dt><samp class="option">planes</samp></dt>
  34554. <dd><p>Set which planes to process. Default is <code class="code">15</code>, which is all available planes.
  34555. </p>
  34556. </dd>
  34557. <dt><samp class="option">radiusV</samp></dt>
  34558. <dd><p>Set vertical radius size. Default value is <code class="code">0</code>.
  34559. Allowed range is integer from 0 to 127.
  34560. If it is 0, value will be picked from horizontal <code class="code">radius</code> option.
  34561. </p>
  34562. </dd>
  34563. <dt><samp class="option">percentile</samp></dt>
  34564. <dd><p>Set median percentile. Default value is <code class="code">0.5</code>.
  34565. Default value of <code class="code">0.5</code> will pick always median values, while <code class="code">0</code> will pick
  34566. minimum values, and <code class="code">1</code> maximum values.
  34567. </p></dd>
  34568. </dl>
  34569. <ul class="mini-toc">
  34570. <li><a href="#Commands-119" accesskey="1">Commands</a></li>
  34571. </ul>
  34572. <div class="subsection-level-extent" id="Commands-119">
  34573. <h4 class="subsection"><span>32.162.1 Commands<a class="copiable-link" href="#Commands-119"> &para;</a></span></h4>
  34574. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  34575. The command accepts the same syntax of the corresponding option.
  34576. </p>
  34577. <p>If the specified expression is not valid, it is kept at its current
  34578. value.
  34579. </p>
  34580. </div>
  34581. </div>
  34582. <div class="section-level-extent" id="mergeplanes">
  34583. <h3 class="section"><span>32.163 mergeplanes<a class="copiable-link" href="#mergeplanes"> &para;</a></span></h3>
  34584. <p>Merge color channel components from several video streams.
  34585. </p>
  34586. <p>The filter accepts up to 4 input streams, and merge selected input
  34587. planes to the output video.
  34588. </p>
  34589. <p>This filter accepts the following options:
  34590. </p><dl class="table">
  34591. <dt><samp class="option">mapping</samp></dt>
  34592. <dd><p>Set input to output plane mapping. Default is <code class="code">0</code>.
  34593. </p>
  34594. <p>The mappings is specified as a bitmap. It should be specified as a
  34595. hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. &rsquo;Aa&rsquo; describes the
  34596. mapping for the first plane of the output stream. &rsquo;A&rsquo; sets the number of
  34597. the input stream to use (from 0 to 3), and &rsquo;a&rsquo; the plane number of the
  34598. corresponding input to use (from 0 to 3). The rest of the mappings is
  34599. similar, &rsquo;Bb&rsquo; describes the mapping for the output stream second
  34600. plane, &rsquo;Cc&rsquo; describes the mapping for the output stream third plane and
  34601. &rsquo;Dd&rsquo; describes the mapping for the output stream fourth plane.
  34602. </p>
  34603. </dd>
  34604. <dt><samp class="option">format</samp></dt>
  34605. <dd><p>Set output pixel format. Default is <code class="code">yuva444p</code>.
  34606. </p>
  34607. </dd>
  34608. <dt><samp class="option">map0s</samp></dt>
  34609. <dt><samp class="option">map1s</samp></dt>
  34610. <dt><samp class="option">map2s</samp></dt>
  34611. <dt><samp class="option">map3s</samp></dt>
  34612. <dd><p>Set input to output stream mapping for output Nth plane. Default is <code class="code">0</code>.
  34613. </p>
  34614. </dd>
  34615. <dt><samp class="option">map0p</samp></dt>
  34616. <dt><samp class="option">map1p</samp></dt>
  34617. <dt><samp class="option">map2p</samp></dt>
  34618. <dt><samp class="option">map3p</samp></dt>
  34619. <dd><p>Set input to output plane mapping for output Nth plane. Default is <code class="code">0</code>.
  34620. </p></dd>
  34621. </dl>
  34622. <ul class="mini-toc">
  34623. <li><a href="#Examples-113" accesskey="1">Examples</a></li>
  34624. </ul>
  34625. <div class="subsection-level-extent" id="Examples-113">
  34626. <h4 class="subsection"><span>32.163.1 Examples<a class="copiable-link" href="#Examples-113"> &para;</a></span></h4>
  34627. <ul class="itemize mark-bullet">
  34628. <li>Merge three gray video streams of same width and height into single video stream:
  34629. <div class="example">
  34630. <pre class="example-preformatted">[a0][a1][a2]mergeplanes=0x001020:yuv444p
  34631. </pre></div>
  34632. </li><li>Merge 1st yuv444p stream and 2nd gray video stream into yuva444p video stream:
  34633. <div class="example">
  34634. <pre class="example-preformatted">[a0][a1]mergeplanes=0x00010210:yuva444p
  34635. </pre></div>
  34636. </li><li>Swap Y and A plane in yuva444p stream:
  34637. <div class="example">
  34638. <pre class="example-preformatted">format=yuva444p,mergeplanes=0x03010200:yuva444p
  34639. </pre></div>
  34640. </li><li>Swap U and V plane in yuv420p stream:
  34641. <div class="example">
  34642. <pre class="example-preformatted">format=yuv420p,mergeplanes=0x000201:yuv420p
  34643. </pre></div>
  34644. </li><li>Cast a rgb24 clip to yuv444p:
  34645. <div class="example">
  34646. <pre class="example-preformatted">format=rgb24,mergeplanes=0x000102:yuv444p
  34647. </pre></div>
  34648. </li></ul>
  34649. </div>
  34650. </div>
  34651. <div class="section-level-extent" id="mestimate">
  34652. <h3 class="section"><span>32.164 mestimate<a class="copiable-link" href="#mestimate"> &para;</a></span></h3>
  34653. <p>Estimate and export motion vectors using block matching algorithms.
  34654. Motion vectors are stored in frame side data to be used by other filters.
  34655. </p>
  34656. <p>This filter accepts the following options:
  34657. </p><dl class="table">
  34658. <dt><samp class="option">method</samp></dt>
  34659. <dd><p>Specify the motion estimation method. Accepts one of the following values:
  34660. </p>
  34661. <dl class="table">
  34662. <dt>&lsquo;<samp class="samp">esa</samp>&rsquo;</dt>
  34663. <dd><p>Exhaustive search algorithm.
  34664. </p></dd>
  34665. <dt>&lsquo;<samp class="samp">tss</samp>&rsquo;</dt>
  34666. <dd><p>Three step search algorithm.
  34667. </p></dd>
  34668. <dt>&lsquo;<samp class="samp">tdls</samp>&rsquo;</dt>
  34669. <dd><p>Two dimensional logarithmic search algorithm.
  34670. </p></dd>
  34671. <dt>&lsquo;<samp class="samp">ntss</samp>&rsquo;</dt>
  34672. <dd><p>New three step search algorithm.
  34673. </p></dd>
  34674. <dt>&lsquo;<samp class="samp">fss</samp>&rsquo;</dt>
  34675. <dd><p>Four step search algorithm.
  34676. </p></dd>
  34677. <dt>&lsquo;<samp class="samp">ds</samp>&rsquo;</dt>
  34678. <dd><p>Diamond search algorithm.
  34679. </p></dd>
  34680. <dt>&lsquo;<samp class="samp">hexbs</samp>&rsquo;</dt>
  34681. <dd><p>Hexagon-based search algorithm.
  34682. </p></dd>
  34683. <dt>&lsquo;<samp class="samp">epzs</samp>&rsquo;</dt>
  34684. <dd><p>Enhanced predictive zonal search algorithm.
  34685. </p></dd>
  34686. <dt>&lsquo;<samp class="samp">umh</samp>&rsquo;</dt>
  34687. <dd><p>Uneven multi-hexagon search algorithm.
  34688. </p></dd>
  34689. </dl>
  34690. <p>Default value is &lsquo;<samp class="samp">esa</samp>&rsquo;.
  34691. </p>
  34692. </dd>
  34693. <dt><samp class="option">mb_size</samp></dt>
  34694. <dd><p>Macroblock size. Default <code class="code">16</code>.
  34695. </p>
  34696. </dd>
  34697. <dt><samp class="option">search_param</samp></dt>
  34698. <dd><p>Search parameter. Default <code class="code">7</code>.
  34699. </p></dd>
  34700. </dl>
  34701. </div>
  34702. <div class="section-level-extent" id="midequalizer">
  34703. <h3 class="section"><span>32.165 midequalizer<a class="copiable-link" href="#midequalizer"> &para;</a></span></h3>
  34704. <p>Apply Midway Image Equalization effect using two video streams.
  34705. </p>
  34706. <p>Midway Image Equalization adjusts a pair of images to have the same
  34707. histogram, while maintaining their dynamics as much as possible. It&rsquo;s
  34708. useful for e.g. matching exposures from a pair of stereo cameras.
  34709. </p>
  34710. <p>This filter has two inputs and one output, which must be of same pixel format, but
  34711. may be of different sizes. The output of filter is first input adjusted with
  34712. midway histogram of both inputs.
  34713. </p>
  34714. <p>This filter accepts the following option:
  34715. </p>
  34716. <dl class="table">
  34717. <dt><samp class="option">planes</samp></dt>
  34718. <dd><p>Set which planes to process. Default is <code class="code">15</code>, which is all available planes.
  34719. </p></dd>
  34720. </dl>
  34721. </div>
  34722. <div class="section-level-extent" id="minterpolate">
  34723. <h3 class="section"><span>32.166 minterpolate<a class="copiable-link" href="#minterpolate"> &para;</a></span></h3>
  34724. <p>Convert the video to specified frame rate using motion interpolation.
  34725. </p>
  34726. <p>This filter accepts the following options:
  34727. </p><dl class="table">
  34728. <dt><samp class="option">fps</samp></dt>
  34729. <dd><p>Specify the output frame rate. This can be rational e.g. <code class="code">60000/1001</code>. Frames are dropped if <var class="var">fps</var> is lower than source fps. Default <code class="code">60</code>.
  34730. </p>
  34731. </dd>
  34732. <dt><samp class="option">mi_mode</samp></dt>
  34733. <dd><p>Motion interpolation mode. Following values are accepted:
  34734. </p><dl class="table">
  34735. <dt>&lsquo;<samp class="samp">dup</samp>&rsquo;</dt>
  34736. <dd><p>Duplicate previous or next frame for interpolating new ones.
  34737. </p></dd>
  34738. <dt>&lsquo;<samp class="samp">blend</samp>&rsquo;</dt>
  34739. <dd><p>Blend source frames. Interpolated frame is mean of previous and next frames.
  34740. </p></dd>
  34741. <dt>&lsquo;<samp class="samp">mci</samp>&rsquo;</dt>
  34742. <dd><p>Motion compensated interpolation. Following options are effective when this mode is selected:
  34743. </p>
  34744. <dl class="table">
  34745. <dt>&lsquo;<samp class="samp">mc_mode</samp>&rsquo;</dt>
  34746. <dd><p>Motion compensation mode. Following values are accepted:
  34747. </p><dl class="table">
  34748. <dt>&lsquo;<samp class="samp">obmc</samp>&rsquo;</dt>
  34749. <dd><p>Overlapped block motion compensation.
  34750. </p></dd>
  34751. <dt>&lsquo;<samp class="samp">aobmc</samp>&rsquo;</dt>
  34752. <dd><p>Adaptive overlapped block motion compensation. Window weighting coefficients are controlled adaptively according to the reliabilities of the neighboring motion vectors to reduce oversmoothing.
  34753. </p></dd>
  34754. </dl>
  34755. <p>Default mode is &lsquo;<samp class="samp">obmc</samp>&rsquo;.
  34756. </p>
  34757. </dd>
  34758. <dt>&lsquo;<samp class="samp">me_mode</samp>&rsquo;</dt>
  34759. <dd><p>Motion estimation mode. Following values are accepted:
  34760. </p><dl class="table">
  34761. <dt>&lsquo;<samp class="samp">bidir</samp>&rsquo;</dt>
  34762. <dd><p>Bidirectional motion estimation. Motion vectors are estimated for each source frame in both forward and backward directions.
  34763. </p></dd>
  34764. <dt>&lsquo;<samp class="samp">bilat</samp>&rsquo;</dt>
  34765. <dd><p>Bilateral motion estimation. Motion vectors are estimated directly for interpolated frame.
  34766. </p></dd>
  34767. </dl>
  34768. <p>Default mode is &lsquo;<samp class="samp">bilat</samp>&rsquo;.
  34769. </p>
  34770. </dd>
  34771. <dt>&lsquo;<samp class="samp">me</samp>&rsquo;</dt>
  34772. <dd><p>The algorithm to be used for motion estimation. Following values are accepted:
  34773. </p><dl class="table">
  34774. <dt>&lsquo;<samp class="samp">esa</samp>&rsquo;</dt>
  34775. <dd><p>Exhaustive search algorithm.
  34776. </p></dd>
  34777. <dt>&lsquo;<samp class="samp">tss</samp>&rsquo;</dt>
  34778. <dd><p>Three step search algorithm.
  34779. </p></dd>
  34780. <dt>&lsquo;<samp class="samp">tdls</samp>&rsquo;</dt>
  34781. <dd><p>Two dimensional logarithmic search algorithm.
  34782. </p></dd>
  34783. <dt>&lsquo;<samp class="samp">ntss</samp>&rsquo;</dt>
  34784. <dd><p>New three step search algorithm.
  34785. </p></dd>
  34786. <dt>&lsquo;<samp class="samp">fss</samp>&rsquo;</dt>
  34787. <dd><p>Four step search algorithm.
  34788. </p></dd>
  34789. <dt>&lsquo;<samp class="samp">ds</samp>&rsquo;</dt>
  34790. <dd><p>Diamond search algorithm.
  34791. </p></dd>
  34792. <dt>&lsquo;<samp class="samp">hexbs</samp>&rsquo;</dt>
  34793. <dd><p>Hexagon-based search algorithm.
  34794. </p></dd>
  34795. <dt>&lsquo;<samp class="samp">epzs</samp>&rsquo;</dt>
  34796. <dd><p>Enhanced predictive zonal search algorithm.
  34797. </p></dd>
  34798. <dt>&lsquo;<samp class="samp">umh</samp>&rsquo;</dt>
  34799. <dd><p>Uneven multi-hexagon search algorithm.
  34800. </p></dd>
  34801. </dl>
  34802. <p>Default algorithm is &lsquo;<samp class="samp">epzs</samp>&rsquo;.
  34803. </p>
  34804. </dd>
  34805. <dt>&lsquo;<samp class="samp">mb_size</samp>&rsquo;</dt>
  34806. <dd><p>Macroblock size. Default <code class="code">16</code>.
  34807. </p>
  34808. </dd>
  34809. <dt>&lsquo;<samp class="samp">search_param</samp>&rsquo;</dt>
  34810. <dd><p>Motion estimation search parameter. Default <code class="code">32</code>.
  34811. </p>
  34812. </dd>
  34813. <dt>&lsquo;<samp class="samp">vsbmc</samp>&rsquo;</dt>
  34814. <dd><p>Enable variable-size block motion compensation. Motion estimation is applied with smaller block sizes at object boundaries in order to make them less blurry. Default is <code class="code">0</code> (disabled).
  34815. </p></dd>
  34816. </dl>
  34817. </dd>
  34818. </dl>
  34819. </dd>
  34820. <dt><samp class="option">scd</samp></dt>
  34821. <dd><p>Scene change detection method. Scene change leads motion vectors to be in random direction. Scene change detection replace interpolated frames by duplicate ones. May not be needed for other modes. Following values are accepted:
  34822. </p><dl class="table">
  34823. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  34824. <dd><p>Disable scene change detection.
  34825. </p></dd>
  34826. <dt>&lsquo;<samp class="samp">fdiff</samp>&rsquo;</dt>
  34827. <dd><p>Frame difference. Corresponding pixel values are compared and if it satisfies <var class="var">scd_threshold</var> scene change is detected.
  34828. </p></dd>
  34829. </dl>
  34830. <p>Default method is &lsquo;<samp class="samp">fdiff</samp>&rsquo;.
  34831. </p>
  34832. </dd>
  34833. <dt><samp class="option">scd_threshold</samp></dt>
  34834. <dd><p>Scene change detection threshold. Default is <code class="code">10.</code>.
  34835. </p></dd>
  34836. </dl>
  34837. </div>
  34838. <div class="section-level-extent" id="mix">
  34839. <h3 class="section"><span>32.167 mix<a class="copiable-link" href="#mix"> &para;</a></span></h3>
  34840. <p>Mix several video input streams into one video stream.
  34841. </p>
  34842. <p>A description of the accepted options follows.
  34843. </p>
  34844. <dl class="table">
  34845. <dt><samp class="option">inputs</samp></dt>
  34846. <dd><p>The number of inputs. If unspecified, it defaults to 2.
  34847. </p>
  34848. </dd>
  34849. <dt><samp class="option">weights</samp></dt>
  34850. <dd><p>Specify weight of each input video stream as sequence.
  34851. Each weight is separated by space. If number of weights
  34852. is smaller than number of <var class="var">frames</var> last specified
  34853. weight will be used for all remaining unset weights.
  34854. </p>
  34855. </dd>
  34856. <dt><samp class="option">scale</samp></dt>
  34857. <dd><p>Specify scale, if it is set it will be multiplied with sum
  34858. of each weight multiplied with pixel values to give final destination
  34859. pixel value. By default <var class="var">scale</var> is auto scaled to sum of weights.
  34860. </p>
  34861. </dd>
  34862. <dt><samp class="option">planes</samp></dt>
  34863. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  34864. </p>
  34865. </dd>
  34866. <dt><samp class="option">duration</samp></dt>
  34867. <dd><p>Specify how end of stream is determined.
  34868. </p><dl class="table">
  34869. <dt>&lsquo;<samp class="samp">longest</samp>&rsquo;</dt>
  34870. <dd><p>The duration of the longest input. (default)
  34871. </p>
  34872. </dd>
  34873. <dt>&lsquo;<samp class="samp">shortest</samp>&rsquo;</dt>
  34874. <dd><p>The duration of the shortest input.
  34875. </p>
  34876. </dd>
  34877. <dt>&lsquo;<samp class="samp">first</samp>&rsquo;</dt>
  34878. <dd><p>The duration of the first input.
  34879. </p></dd>
  34880. </dl>
  34881. </dd>
  34882. </dl>
  34883. <ul class="mini-toc">
  34884. <li><a href="#Commands-120" accesskey="1">Commands</a></li>
  34885. </ul>
  34886. <div class="subsection-level-extent" id="Commands-120">
  34887. <h4 class="subsection"><span>32.167.1 Commands<a class="copiable-link" href="#Commands-120"> &para;</a></span></h4>
  34888. <p>This filter supports the following commands:
  34889. </p><dl class="table">
  34890. <dt><samp class="option">weights</samp></dt>
  34891. <dt><samp class="option">scale</samp></dt>
  34892. <dt><samp class="option">planes</samp></dt>
  34893. <dd><p>Syntax is same as option with same name.
  34894. </p></dd>
  34895. </dl>
  34896. </div>
  34897. </div>
  34898. <div class="section-level-extent" id="monochrome">
  34899. <h3 class="section"><span>32.168 monochrome<a class="copiable-link" href="#monochrome"> &para;</a></span></h3>
  34900. <p>Convert video to gray using custom color filter.
  34901. </p>
  34902. <p>A description of the accepted options follows.
  34903. </p>
  34904. <dl class="table">
  34905. <dt><samp class="option">cb</samp></dt>
  34906. <dd><p>Set the chroma blue spot. Allowed range is from -1 to 1.
  34907. Default value is 0.
  34908. </p>
  34909. </dd>
  34910. <dt><samp class="option">cr</samp></dt>
  34911. <dd><p>Set the chroma red spot. Allowed range is from -1 to 1.
  34912. Default value is 0.
  34913. </p>
  34914. </dd>
  34915. <dt><samp class="option">size</samp></dt>
  34916. <dd><p>Set the color filter size. Allowed range is from .1 to 10.
  34917. Default value is 1.
  34918. </p>
  34919. </dd>
  34920. <dt><samp class="option">high</samp></dt>
  34921. <dd><p>Set the highlights strength. Allowed range is from 0 to 1.
  34922. Default value is 0.
  34923. </p></dd>
  34924. </dl>
  34925. <ul class="mini-toc">
  34926. <li><a href="#Commands-121" accesskey="1">Commands</a></li>
  34927. </ul>
  34928. <div class="subsection-level-extent" id="Commands-121">
  34929. <h4 class="subsection"><span>32.168.1 Commands<a class="copiable-link" href="#Commands-121"> &para;</a></span></h4>
  34930. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  34931. </p>
  34932. </div>
  34933. </div>
  34934. <div class="section-level-extent" id="morpho">
  34935. <h3 class="section"><span>32.169 morpho<a class="copiable-link" href="#morpho"> &para;</a></span></h3>
  34936. <p>This filter allows to apply main morphological grayscale transforms,
  34937. erode and dilate with arbitrary structures set in second input stream.
  34938. </p>
  34939. <p>Unlike naive implementation and much slower performance in <a class="ref" href="#erosion">erosion</a>
  34940. and <a class="ref" href="#dilation">dilation</a> filters, when speed is critical <code class="code">morpho</code> filter
  34941. should be used instead.
  34942. </p>
  34943. <p>A description of accepted options follows,
  34944. </p>
  34945. <dl class="table">
  34946. <dt><samp class="option">mode</samp></dt>
  34947. <dd><p>Set morphological transform to apply, can be:
  34948. </p>
  34949. <dl class="table">
  34950. <dt>&lsquo;<samp class="samp">erode</samp>&rsquo;</dt>
  34951. <dt>&lsquo;<samp class="samp">dilate</samp>&rsquo;</dt>
  34952. <dt>&lsquo;<samp class="samp">open</samp>&rsquo;</dt>
  34953. <dt>&lsquo;<samp class="samp">close</samp>&rsquo;</dt>
  34954. <dt>&lsquo;<samp class="samp">gradient</samp>&rsquo;</dt>
  34955. <dt>&lsquo;<samp class="samp">tophat</samp>&rsquo;</dt>
  34956. <dt>&lsquo;<samp class="samp">blackhat</samp>&rsquo;</dt>
  34957. </dl>
  34958. <p>Default is <code class="code">erode</code>.
  34959. </p>
  34960. </dd>
  34961. <dt><samp class="option">planes</samp></dt>
  34962. <dd><p>Set planes to filter, by default all planes except alpha are filtered.
  34963. </p>
  34964. </dd>
  34965. <dt><samp class="option">structure</samp></dt>
  34966. <dd><p>Set which structure video frames will be processed from second input stream,
  34967. can be <var class="var">first</var> or <var class="var">all</var>. Default is <var class="var">all</var>.
  34968. </p></dd>
  34969. </dl>
  34970. <p>The <code class="code">morpho</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  34971. </p>
  34972. <ul class="mini-toc">
  34973. <li><a href="#Commands-122" accesskey="1">Commands</a></li>
  34974. </ul>
  34975. <div class="subsection-level-extent" id="Commands-122">
  34976. <h4 class="subsection"><span>32.169.1 Commands<a class="copiable-link" href="#Commands-122"> &para;</a></span></h4>
  34977. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  34978. </p>
  34979. </div>
  34980. </div>
  34981. <div class="section-level-extent" id="mpdecimate">
  34982. <h3 class="section"><span>32.170 mpdecimate<a class="copiable-link" href="#mpdecimate"> &para;</a></span></h3>
  34983. <p>Drop frames that do not differ greatly from the previous frame in
  34984. order to reduce frame rate.
  34985. </p>
  34986. <p>The main use of this filter is for very-low-bitrate encoding
  34987. (e.g. streaming over dialup modem), but it could in theory be used for
  34988. fixing movies that were inverse-telecined incorrectly.
  34989. </p>
  34990. <p>A description of the accepted options follows.
  34991. </p>
  34992. <dl class="table">
  34993. <dt><samp class="option">max</samp></dt>
  34994. <dd><p>Set the maximum number of consecutive frames which can be dropped (if
  34995. positive), or the minimum interval between dropped frames (if
  34996. negative). If the value is 0, the frame is dropped disregarding the
  34997. number of previous sequentially dropped frames.
  34998. </p>
  34999. <p>Default value is 0.
  35000. </p>
  35001. </dd>
  35002. <dt><samp class="option">keep</samp></dt>
  35003. <dd><p>Set the maximum number of consecutive similar frames to ignore before to start dropping them.
  35004. If the value is 0, the frame is dropped disregarding the
  35005. number of previous sequentially similar frames.
  35006. </p>
  35007. <p>Default value is 0.
  35008. </p>
  35009. </dd>
  35010. <dt><samp class="option">hi</samp></dt>
  35011. <dt><samp class="option">lo</samp></dt>
  35012. <dt><samp class="option">frac</samp></dt>
  35013. <dd><p>Set the dropping threshold values.
  35014. </p>
  35015. <p>Values for <samp class="option">hi</samp> and <samp class="option">lo</samp> are for 8x8 pixel blocks and
  35016. represent actual pixel value differences, so a threshold of 64
  35017. corresponds to 1 unit of difference for each pixel, or the same spread
  35018. out differently over the block.
  35019. </p>
  35020. <p>A frame is a candidate for dropping if no 8x8 blocks differ by more
  35021. than a threshold of <samp class="option">hi</samp>, and if no more than <samp class="option">frac</samp> blocks (1
  35022. meaning the whole image) differ by more than a threshold of <samp class="option">lo</samp>.
  35023. </p>
  35024. <p>Default value for <samp class="option">hi</samp> is 64*12, default value for <samp class="option">lo</samp> is
  35025. 64*5, and default value for <samp class="option">frac</samp> is 0.33.
  35026. </p></dd>
  35027. </dl>
  35028. </div>
  35029. <div class="section-level-extent" id="msad">
  35030. <h3 class="section"><span>32.171 msad<a class="copiable-link" href="#msad"> &para;</a></span></h3>
  35031. <p>Obtain the MSAD (Mean Sum of Absolute Differences) between two input videos.
  35032. </p>
  35033. <p>This filter takes two input videos.
  35034. </p>
  35035. <p>Both input videos must have the same resolution and pixel format for
  35036. this filter to work correctly. Also it assumes that both inputs
  35037. have the same number of frames, which are compared one by one.
  35038. </p>
  35039. <p>The obtained per component, average, min and max MSAD is printed through
  35040. the logging system.
  35041. </p>
  35042. <p>The filter stores the calculated MSAD of each frame in frame metadata.
  35043. </p>
  35044. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  35045. </p>
  35046. <p>In the below example the input file <samp class="file">main.mpg</samp> being processed is compared
  35047. with the reference file <samp class="file">ref.mpg</samp>.
  35048. </p>
  35049. <div class="example">
  35050. <pre class="example-preformatted">ffmpeg -i main.mpg -i ref.mpg -lavfi msad -f null -
  35051. </pre></div>
  35052. </div>
  35053. <div class="section-level-extent" id="multiply">
  35054. <h3 class="section"><span>32.172 multiply<a class="copiable-link" href="#multiply"> &para;</a></span></h3>
  35055. <p>Multiply first video stream pixels values with second video stream pixels values.
  35056. </p>
  35057. <p>The filter accepts the following options:
  35058. </p>
  35059. <dl class="table">
  35060. <dt><samp class="option">scale</samp></dt>
  35061. <dd><p>Set the scale applied to second video stream. By default is <code class="code">1</code>.
  35062. Allowed range is from <code class="code">0</code> to <code class="code">9</code>.
  35063. </p>
  35064. </dd>
  35065. <dt><samp class="option">offset</samp></dt>
  35066. <dd><p>Set the offset applied to second video stream. By default is <code class="code">0.5</code>.
  35067. Allowed range is from <code class="code">-1</code> to <code class="code">1</code>.
  35068. </p>
  35069. </dd>
  35070. <dt><samp class="option">planes</samp></dt>
  35071. <dd><p>Specify planes from input video stream that will be processed.
  35072. By default all planes are processed.
  35073. </p></dd>
  35074. </dl>
  35075. <ul class="mini-toc">
  35076. <li><a href="#Commands-123" accesskey="1">Commands</a></li>
  35077. </ul>
  35078. <div class="subsection-level-extent" id="Commands-123">
  35079. <h4 class="subsection"><span>32.172.1 Commands<a class="copiable-link" href="#Commands-123"> &para;</a></span></h4>
  35080. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  35081. </p>
  35082. </div>
  35083. </div>
  35084. <div class="section-level-extent" id="negate">
  35085. <h3 class="section"><span>32.173 negate<a class="copiable-link" href="#negate"> &para;</a></span></h3>
  35086. <p>Negate (invert) the input video.
  35087. </p>
  35088. <p>It accepts the following option:
  35089. </p>
  35090. <dl class="table">
  35091. <dt><samp class="option">components</samp></dt>
  35092. <dd><p>Set components to negate.
  35093. </p>
  35094. <p>Available values for components are:
  35095. </p><dl class="table">
  35096. <dt>&lsquo;<samp class="samp">y</samp>&rsquo;</dt>
  35097. <dt>&lsquo;<samp class="samp">u</samp>&rsquo;</dt>
  35098. <dt>&lsquo;<samp class="samp">v</samp>&rsquo;</dt>
  35099. <dt>&lsquo;<samp class="samp">a</samp>&rsquo;</dt>
  35100. <dt>&lsquo;<samp class="samp">r</samp>&rsquo;</dt>
  35101. <dt>&lsquo;<samp class="samp">g</samp>&rsquo;</dt>
  35102. <dt>&lsquo;<samp class="samp">b</samp>&rsquo;</dt>
  35103. </dl>
  35104. </dd>
  35105. <dt><samp class="option">negate_alpha</samp></dt>
  35106. <dd><p>With value 1, it negates the alpha component, if present. Default value is 0.
  35107. </p></dd>
  35108. </dl>
  35109. <ul class="mini-toc">
  35110. <li><a href="#Commands-124" accesskey="1">Commands</a></li>
  35111. </ul>
  35112. <div class="subsection-level-extent" id="Commands-124">
  35113. <h4 class="subsection"><span>32.173.1 Commands<a class="copiable-link" href="#Commands-124"> &para;</a></span></h4>
  35114. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  35115. </p>
  35116. <a class="anchor" id="nlmeans"></a></div>
  35117. </div>
  35118. <div class="section-level-extent" id="nlmeans-1">
  35119. <h3 class="section"><span>32.174 nlmeans<a class="copiable-link" href="#nlmeans-1"> &para;</a></span></h3>
  35120. <p>Denoise frames using Non-Local Means algorithm.
  35121. </p>
  35122. <p>Each pixel is adjusted by looking for other pixels with similar contexts. This
  35123. context similarity is defined by comparing their surrounding patches of size
  35124. <samp class="option">p</samp>x<samp class="option">p</samp>. Patches are searched in an area of <samp class="option">r</samp>x<samp class="option">r</samp>
  35125. around the pixel.
  35126. </p>
  35127. <p>Note that the research area defines centers for patches, which means some
  35128. patches will be made of pixels outside that research area.
  35129. </p>
  35130. <p>The filter accepts the following options.
  35131. </p>
  35132. <dl class="table">
  35133. <dt><samp class="option">s</samp></dt>
  35134. <dd><p>Set denoising strength. Default is 1.0. Must be in range [1.0, 30.0].
  35135. </p>
  35136. </dd>
  35137. <dt><samp class="option">p</samp></dt>
  35138. <dd><p>Set patch size. Default is 7. Must be odd number in range [0, 99].
  35139. </p>
  35140. </dd>
  35141. <dt><samp class="option">pc</samp></dt>
  35142. <dd><p>Same as <samp class="option">p</samp> but for chroma planes.
  35143. </p>
  35144. <p>The default value is <var class="var">0</var> and means automatic.
  35145. </p>
  35146. </dd>
  35147. <dt><samp class="option">r</samp></dt>
  35148. <dd><p>Set research size. Default is 15. Must be odd number in range [0, 99].
  35149. </p>
  35150. </dd>
  35151. <dt><samp class="option">rc</samp></dt>
  35152. <dd><p>Same as <samp class="option">r</samp> but for chroma planes.
  35153. </p>
  35154. <p>The default value is <var class="var">0</var> and means automatic.
  35155. </p></dd>
  35156. </dl>
  35157. </div>
  35158. <div class="section-level-extent" id="nnedi">
  35159. <h3 class="section"><span>32.175 nnedi<a class="copiable-link" href="#nnedi"> &para;</a></span></h3>
  35160. <p>Deinterlace video using neural network edge directed interpolation.
  35161. </p>
  35162. <p>This filter accepts the following options:
  35163. </p>
  35164. <dl class="table">
  35165. <dt><samp class="option">weights</samp></dt>
  35166. <dd><p>Mandatory option, without binary file filter can not work.
  35167. Currently file can be found here:
  35168. https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
  35169. </p>
  35170. </dd>
  35171. <dt><samp class="option">deint</samp></dt>
  35172. <dd><p>Set which frames to deinterlace, by default it is <code class="code">all</code>.
  35173. Can be <code class="code">all</code> or <code class="code">interlaced</code>.
  35174. </p>
  35175. </dd>
  35176. <dt><samp class="option">field</samp></dt>
  35177. <dd><p>Set mode of operation.
  35178. </p>
  35179. <p>Can be one of the following:
  35180. </p>
  35181. <dl class="table">
  35182. <dt>&lsquo;<samp class="samp">af</samp>&rsquo;</dt>
  35183. <dd><p>Use frame flags, both fields.
  35184. </p></dd>
  35185. <dt>&lsquo;<samp class="samp">a</samp>&rsquo;</dt>
  35186. <dd><p>Use frame flags, single field.
  35187. </p></dd>
  35188. <dt>&lsquo;<samp class="samp">t</samp>&rsquo;</dt>
  35189. <dd><p>Use top field only.
  35190. </p></dd>
  35191. <dt>&lsquo;<samp class="samp">b</samp>&rsquo;</dt>
  35192. <dd><p>Use bottom field only.
  35193. </p></dd>
  35194. <dt>&lsquo;<samp class="samp">tf</samp>&rsquo;</dt>
  35195. <dd><p>Use both fields, top first.
  35196. </p></dd>
  35197. <dt>&lsquo;<samp class="samp">bf</samp>&rsquo;</dt>
  35198. <dd><p>Use both fields, bottom first.
  35199. </p></dd>
  35200. </dl>
  35201. </dd>
  35202. <dt><samp class="option">planes</samp></dt>
  35203. <dd><p>Set which planes to process, by default filter process all frames.
  35204. </p>
  35205. </dd>
  35206. <dt><samp class="option">nsize</samp></dt>
  35207. <dd><p>Set size of local neighborhood around each pixel, used by the predictor neural
  35208. network.
  35209. </p>
  35210. <p>Can be one of the following:
  35211. </p>
  35212. <dl class="table">
  35213. <dt>&lsquo;<samp class="samp">s8x6</samp>&rsquo;</dt>
  35214. <dt>&lsquo;<samp class="samp">s16x6</samp>&rsquo;</dt>
  35215. <dt>&lsquo;<samp class="samp">s32x6</samp>&rsquo;</dt>
  35216. <dt>&lsquo;<samp class="samp">s48x6</samp>&rsquo;</dt>
  35217. <dt>&lsquo;<samp class="samp">s8x4</samp>&rsquo;</dt>
  35218. <dt>&lsquo;<samp class="samp">s16x4</samp>&rsquo;</dt>
  35219. <dt>&lsquo;<samp class="samp">s32x4</samp>&rsquo;</dt>
  35220. </dl>
  35221. </dd>
  35222. <dt><samp class="option">nns</samp></dt>
  35223. <dd><p>Set the number of neurons in predictor neural network.
  35224. Can be one of the following:
  35225. </p>
  35226. <dl class="table">
  35227. <dt>&lsquo;<samp class="samp">n16</samp>&rsquo;</dt>
  35228. <dt>&lsquo;<samp class="samp">n32</samp>&rsquo;</dt>
  35229. <dt>&lsquo;<samp class="samp">n64</samp>&rsquo;</dt>
  35230. <dt>&lsquo;<samp class="samp">n128</samp>&rsquo;</dt>
  35231. <dt>&lsquo;<samp class="samp">n256</samp>&rsquo;</dt>
  35232. </dl>
  35233. </dd>
  35234. <dt><samp class="option">qual</samp></dt>
  35235. <dd><p>Controls the number of different neural network predictions that are blended
  35236. together to compute the final output value. Can be <code class="code">fast</code>, default or
  35237. <code class="code">slow</code>.
  35238. </p>
  35239. </dd>
  35240. <dt><samp class="option">etype</samp></dt>
  35241. <dd><p>Set which set of weights to use in the predictor.
  35242. Can be one of the following:
  35243. </p>
  35244. <dl class="table">
  35245. <dt>&lsquo;<samp class="samp">a, abs</samp>&rsquo;</dt>
  35246. <dd><p>weights trained to minimize absolute error
  35247. </p></dd>
  35248. <dt>&lsquo;<samp class="samp">s, mse</samp>&rsquo;</dt>
  35249. <dd><p>weights trained to minimize squared error
  35250. </p></dd>
  35251. </dl>
  35252. </dd>
  35253. <dt><samp class="option">pscrn</samp></dt>
  35254. <dd><p>Controls whether or not the prescreener neural network is used to decide
  35255. which pixels should be processed by the predictor neural network and which
  35256. can be handled by simple cubic interpolation.
  35257. The prescreener is trained to know whether cubic interpolation will be
  35258. sufficient for a pixel or whether it should be predicted by the predictor nn.
  35259. The computational complexity of the prescreener nn is much less than that of
  35260. the predictor nn. Since most pixels can be handled by cubic interpolation,
  35261. using the prescreener generally results in much faster processing.
  35262. The prescreener is pretty accurate, so the difference between using it and not
  35263. using it is almost always unnoticeable.
  35264. </p>
  35265. <p>Can be one of the following:
  35266. </p>
  35267. <dl class="table">
  35268. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  35269. <dt>&lsquo;<samp class="samp">original</samp>&rsquo;</dt>
  35270. <dt>&lsquo;<samp class="samp">new</samp>&rsquo;</dt>
  35271. <dt>&lsquo;<samp class="samp">new2</samp>&rsquo;</dt>
  35272. <dt>&lsquo;<samp class="samp">new3</samp>&rsquo;</dt>
  35273. </dl>
  35274. <p>Default is <code class="code">new</code>.
  35275. </p></dd>
  35276. </dl>
  35277. <ul class="mini-toc">
  35278. <li><a href="#Commands-125" accesskey="1">Commands</a></li>
  35279. </ul>
  35280. <div class="subsection-level-extent" id="Commands-125">
  35281. <h4 class="subsection"><span>32.175.1 Commands<a class="copiable-link" href="#Commands-125"> &para;</a></span></h4>
  35282. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options, excluding <var class="var">weights</var> option.
  35283. </p>
  35284. </div>
  35285. </div>
  35286. <div class="section-level-extent" id="noformat">
  35287. <h3 class="section"><span>32.176 noformat<a class="copiable-link" href="#noformat"> &para;</a></span></h3>
  35288. <p>Force libavfilter not to use any of the specified pixel formats for the
  35289. input to the next filter.
  35290. </p>
  35291. <p>It accepts the following parameters:
  35292. </p><dl class="table">
  35293. <dt><samp class="option">pix_fmts</samp></dt>
  35294. <dd><p>A &rsquo;|&rsquo;-separated list of pixel format names, such as
  35295. pix_fmts=yuv420p|monow|rgb24&quot;.
  35296. </p>
  35297. </dd>
  35298. </dl>
  35299. <ul class="mini-toc">
  35300. <li><a href="#Examples-114" accesskey="1">Examples</a></li>
  35301. </ul>
  35302. <div class="subsection-level-extent" id="Examples-114">
  35303. <h4 class="subsection"><span>32.176.1 Examples<a class="copiable-link" href="#Examples-114"> &para;</a></span></h4>
  35304. <ul class="itemize mark-bullet">
  35305. <li>Force libavfilter to use a format different from <var class="var">yuv420p</var> for the
  35306. input to the vflip filter:
  35307. <div class="example">
  35308. <pre class="example-preformatted">noformat=pix_fmts=yuv420p,vflip
  35309. </pre></div>
  35310. </li><li>Convert the input video to any of the formats not contained in the list:
  35311. <div class="example">
  35312. <pre class="example-preformatted">noformat=yuv420p|yuv444p|yuv410p
  35313. </pre></div>
  35314. </li></ul>
  35315. </div>
  35316. </div>
  35317. <div class="section-level-extent" id="noise-1">
  35318. <h3 class="section"><span>32.177 noise<a class="copiable-link" href="#noise-1"> &para;</a></span></h3>
  35319. <p>Add noise on video input frame.
  35320. </p>
  35321. <p>The filter accepts the following options:
  35322. </p>
  35323. <dl class="table">
  35324. <dt><samp class="option">all_seed</samp></dt>
  35325. <dt><samp class="option">c0_seed</samp></dt>
  35326. <dt><samp class="option">c1_seed</samp></dt>
  35327. <dt><samp class="option">c2_seed</samp></dt>
  35328. <dt><samp class="option">c3_seed</samp></dt>
  35329. <dd><p>Set noise seed for specific pixel component or all pixel components in case
  35330. of <var class="var">all_seed</var>. Default value is <code class="code">123457</code>.
  35331. </p>
  35332. </dd>
  35333. <dt><samp class="option">all_strength, alls</samp></dt>
  35334. <dt><samp class="option">c0_strength, c0s</samp></dt>
  35335. <dt><samp class="option">c1_strength, c1s</samp></dt>
  35336. <dt><samp class="option">c2_strength, c2s</samp></dt>
  35337. <dt><samp class="option">c3_strength, c3s</samp></dt>
  35338. <dd><p>Set noise strength for specific pixel component or all pixel components in case
  35339. <var class="var">all_strength</var>. Default value is <code class="code">0</code>. Allowed range is [0, 100].
  35340. </p>
  35341. </dd>
  35342. <dt><samp class="option">all_flags, allf</samp></dt>
  35343. <dt><samp class="option">c0_flags, c0f</samp></dt>
  35344. <dt><samp class="option">c1_flags, c1f</samp></dt>
  35345. <dt><samp class="option">c2_flags, c2f</samp></dt>
  35346. <dt><samp class="option">c3_flags, c3f</samp></dt>
  35347. <dd><p>Set pixel component flags or set flags for all components if <var class="var">all_flags</var>.
  35348. Available values for component flags are:
  35349. </p><dl class="table">
  35350. <dt>&lsquo;<samp class="samp">a</samp>&rsquo;</dt>
  35351. <dd><p>averaged temporal noise (smoother)
  35352. </p></dd>
  35353. <dt>&lsquo;<samp class="samp">p</samp>&rsquo;</dt>
  35354. <dd><p>mix random noise with a (semi)regular pattern
  35355. </p></dd>
  35356. <dt>&lsquo;<samp class="samp">t</samp>&rsquo;</dt>
  35357. <dd><p>temporal noise (noise pattern changes between frames)
  35358. </p></dd>
  35359. <dt>&lsquo;<samp class="samp">u</samp>&rsquo;</dt>
  35360. <dd><p>uniform noise (gaussian otherwise)
  35361. </p></dd>
  35362. </dl>
  35363. </dd>
  35364. </dl>
  35365. <ul class="mini-toc">
  35366. <li><a href="#Examples-115" accesskey="1">Examples</a></li>
  35367. </ul>
  35368. <div class="subsection-level-extent" id="Examples-115">
  35369. <h4 class="subsection"><span>32.177.1 Examples<a class="copiable-link" href="#Examples-115"> &para;</a></span></h4>
  35370. <p>Add temporal and uniform noise to input video:
  35371. </p><div class="example">
  35372. <pre class="example-preformatted">noise=alls=20:allf=t+u
  35373. </pre></div>
  35374. </div>
  35375. </div>
  35376. <div class="section-level-extent" id="normalize">
  35377. <h3 class="section"><span>32.178 normalize<a class="copiable-link" href="#normalize"> &para;</a></span></h3>
  35378. <p>Normalize RGB video (aka histogram stretching, contrast stretching).
  35379. See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
  35380. </p>
  35381. <p>For each channel of each frame, the filter computes the input range and maps
  35382. it linearly to the user-specified output range. The output range defaults
  35383. to the full dynamic range from pure black to pure white.
  35384. </p>
  35385. <p>Temporal smoothing can be used on the input range to reduce flickering (rapid
  35386. changes in brightness) caused when small dark or bright objects enter or leave
  35387. the scene. This is similar to the auto-exposure (automatic gain control) on a
  35388. video camera, and, like a video camera, it may cause a period of over- or
  35389. under-exposure of the video.
  35390. </p>
  35391. <p>The R,G,B channels can be normalized independently, which may cause some
  35392. color shifting, or linked together as a single channel, which prevents
  35393. color shifting. Linked normalization preserves hue. Independent normalization
  35394. does not, so it can be used to remove some color casts. Independent and linked
  35395. normalization can be combined in any ratio.
  35396. </p>
  35397. <p>The normalize filter accepts the following options:
  35398. </p>
  35399. <dl class="table">
  35400. <dt><samp class="option">blackpt</samp></dt>
  35401. <dt><samp class="option">whitept</samp></dt>
  35402. <dd><p>Colors which define the output range. The minimum input value is mapped to
  35403. the <var class="var">blackpt</var>. The maximum input value is mapped to the <var class="var">whitept</var>.
  35404. The defaults are black and white respectively. Specifying white for
  35405. <var class="var">blackpt</var> and black for <var class="var">whitept</var> will give color-inverted,
  35406. normalized video. Shades of grey can be used to reduce the dynamic range
  35407. (contrast). Specifying saturated colors here can create some interesting
  35408. effects.
  35409. </p>
  35410. </dd>
  35411. <dt><samp class="option">smoothing</samp></dt>
  35412. <dd><p>The number of previous frames to use for temporal smoothing. The input range
  35413. of each channel is smoothed using a rolling average over the current frame
  35414. and the <var class="var">smoothing</var> previous frames. The default is 0 (no temporal
  35415. smoothing).
  35416. </p>
  35417. </dd>
  35418. <dt><samp class="option">independence</samp></dt>
  35419. <dd><p>Controls the ratio of independent (color shifting) channel normalization to
  35420. linked (color preserving) normalization. 0.0 is fully linked, 1.0 is fully
  35421. independent. Defaults to 1.0 (fully independent).
  35422. </p>
  35423. </dd>
  35424. <dt><samp class="option">strength</samp></dt>
  35425. <dd><p>Overall strength of the filter. 1.0 is full strength. 0.0 is a rather
  35426. expensive no-op. Defaults to 1.0 (full strength).
  35427. </p>
  35428. </dd>
  35429. </dl>
  35430. <ul class="mini-toc">
  35431. <li><a href="#Commands-126" accesskey="1">Commands</a></li>
  35432. <li><a href="#Examples-116" accesskey="2">Examples</a></li>
  35433. </ul>
  35434. <div class="subsection-level-extent" id="Commands-126">
  35435. <h4 class="subsection"><span>32.178.1 Commands<a class="copiable-link" href="#Commands-126"> &para;</a></span></h4>
  35436. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options, excluding <var class="var">smoothing</var> option.
  35437. The command accepts the same syntax of the corresponding option.
  35438. </p>
  35439. <p>If the specified expression is not valid, it is kept at its current
  35440. value.
  35441. </p>
  35442. </div>
  35443. <div class="subsection-level-extent" id="Examples-116">
  35444. <h4 class="subsection"><span>32.178.2 Examples<a class="copiable-link" href="#Examples-116"> &para;</a></span></h4>
  35445. <p>Stretch video contrast to use the full dynamic range, with no temporal
  35446. smoothing; may flicker depending on the source content:
  35447. </p><div class="example">
  35448. <pre class="example-preformatted">normalize=blackpt=black:whitept=white:smoothing=0
  35449. </pre></div>
  35450. <p>As above, but with 50 frames of temporal smoothing; flicker should be
  35451. reduced, depending on the source content:
  35452. </p><div class="example">
  35453. <pre class="example-preformatted">normalize=blackpt=black:whitept=white:smoothing=50
  35454. </pre></div>
  35455. <p>As above, but with hue-preserving linked channel normalization:
  35456. </p><div class="example">
  35457. <pre class="example-preformatted">normalize=blackpt=black:whitept=white:smoothing=50:independence=0
  35458. </pre></div>
  35459. <p>As above, but with half strength:
  35460. </p><div class="example">
  35461. <pre class="example-preformatted">normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
  35462. </pre></div>
  35463. <p>Map the darkest input color to red, the brightest input color to cyan:
  35464. </p><div class="example">
  35465. <pre class="example-preformatted">normalize=blackpt=red:whitept=cyan
  35466. </pre></div>
  35467. </div>
  35468. </div>
  35469. <div class="section-level-extent" id="null-1">
  35470. <h3 class="section"><span>32.179 null<a class="copiable-link" href="#null-1"> &para;</a></span></h3>
  35471. <p>Pass the video source unchanged to the output.
  35472. </p>
  35473. </div>
  35474. <div class="section-level-extent" id="ocr">
  35475. <h3 class="section"><span>32.180 ocr<a class="copiable-link" href="#ocr"> &para;</a></span></h3>
  35476. <p>Optical Character Recognition
  35477. </p>
  35478. <p>This filter uses Tesseract for optical character recognition. To enable
  35479. compilation of this filter, you need to configure FFmpeg with
  35480. <code class="code">--enable-libtesseract</code>.
  35481. </p>
  35482. <p>It accepts the following options:
  35483. </p>
  35484. <dl class="table">
  35485. <dt><samp class="option">datapath</samp></dt>
  35486. <dd><p>Set datapath to tesseract data. Default is to use whatever was
  35487. set at installation.
  35488. </p>
  35489. </dd>
  35490. <dt><samp class="option">language</samp></dt>
  35491. <dd><p>Set language, default is &quot;eng&quot;.
  35492. </p>
  35493. </dd>
  35494. <dt><samp class="option">whitelist</samp></dt>
  35495. <dd><p>Set character whitelist.
  35496. </p>
  35497. </dd>
  35498. <dt><samp class="option">blacklist</samp></dt>
  35499. <dd><p>Set character blacklist.
  35500. </p></dd>
  35501. </dl>
  35502. <p>The filter exports recognized text as the frame metadata <code class="code">lavfi.ocr.text</code>.
  35503. The filter exports confidence of recognized words as the frame metadata <code class="code">lavfi.ocr.confidence</code>.
  35504. </p>
  35505. </div>
  35506. <div class="section-level-extent" id="ocv">
  35507. <h3 class="section"><span>32.181 ocv<a class="copiable-link" href="#ocv"> &para;</a></span></h3>
  35508. <p>Apply a video transform using libopencv.
  35509. </p>
  35510. <p>To enable this filter, install the libopencv library and headers and
  35511. configure FFmpeg with <code class="code">--enable-libopencv</code>.
  35512. </p>
  35513. <p>It accepts the following parameters:
  35514. </p>
  35515. <dl class="table">
  35516. <dt><samp class="option">filter_name</samp></dt>
  35517. <dd><p>The name of the libopencv filter to apply.
  35518. </p>
  35519. </dd>
  35520. <dt><samp class="option">filter_params</samp></dt>
  35521. <dd><p>The parameters to pass to the libopencv filter. If not specified, the default
  35522. values are assumed.
  35523. </p>
  35524. </dd>
  35525. </dl>
  35526. <p>Refer to the official libopencv documentation for more precise
  35527. information:
  35528. <a class="url" href="http://docs.opencv.org/master/modules/imgproc/doc/filtering.html">http://docs.opencv.org/master/modules/imgproc/doc/filtering.html</a>
  35529. </p>
  35530. <p>Several libopencv filters are supported; see the following subsections.
  35531. </p>
  35532. <a class="anchor" id="dilate"></a><ul class="mini-toc">
  35533. <li><a href="#dilate-1" accesskey="1">dilate</a></li>
  35534. <li><a href="#erode" accesskey="2">erode</a></li>
  35535. <li><a href="#smooth" accesskey="3">smooth</a></li>
  35536. </ul>
  35537. <div class="subsection-level-extent" id="dilate-1">
  35538. <h4 class="subsection"><span>32.181.1 dilate<a class="copiable-link" href="#dilate-1"> &para;</a></span></h4>
  35539. <p>Dilate an image by using a specific structuring element.
  35540. It corresponds to the libopencv function <code class="code">cvDilate</code>.
  35541. </p>
  35542. <p>It accepts the parameters: <var class="var">struct_el</var>|<var class="var">nb_iterations</var>.
  35543. </p>
  35544. <p><var class="var">struct_el</var> represents a structuring element, and has the syntax:
  35545. <var class="var">cols</var>x<var class="var">rows</var>+<var class="var">anchor_x</var>x<var class="var">anchor_y</var>/<var class="var">shape</var>
  35546. </p>
  35547. <p><var class="var">cols</var> and <var class="var">rows</var> represent the number of columns and rows of
  35548. the structuring element, <var class="var">anchor_x</var> and <var class="var">anchor_y</var> the anchor
  35549. point, and <var class="var">shape</var> the shape for the structuring element. <var class="var">shape</var>
  35550. must be &quot;rect&quot;, &quot;cross&quot;, &quot;ellipse&quot;, or &quot;custom&quot;.
  35551. </p>
  35552. <p>If the value for <var class="var">shape</var> is &quot;custom&quot;, it must be followed by a
  35553. string of the form &quot;=<var class="var">filename</var>&quot;. The file with name
  35554. <var class="var">filename</var> is assumed to represent a binary image, with each
  35555. printable character corresponding to a bright pixel. When a custom
  35556. <var class="var">shape</var> is used, <var class="var">cols</var> and <var class="var">rows</var> are ignored, the number
  35557. or columns and rows of the read file are assumed instead.
  35558. </p>
  35559. <p>The default value for <var class="var">struct_el</var> is &quot;3x3+0x0/rect&quot;.
  35560. </p>
  35561. <p><var class="var">nb_iterations</var> specifies the number of times the transform is
  35562. applied to the image, and defaults to 1.
  35563. </p>
  35564. <p>Some examples:
  35565. </p><div class="example">
  35566. <pre class="example-preformatted"># Use the default values
  35567. ocv=dilate
  35568. # Dilate using a structuring element with a 5x5 cross, iterating two times
  35569. ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
  35570. # Read the shape from the file diamond.shape, iterating two times.
  35571. # The file diamond.shape may contain a pattern of characters like this
  35572. # *
  35573. # ***
  35574. # *****
  35575. # ***
  35576. # *
  35577. # The specified columns and rows are ignored
  35578. # but the anchor point coordinates are not
  35579. ocv=dilate:0x0+2x2/custom=diamond.shape|2
  35580. </pre></div>
  35581. </div>
  35582. <div class="subsection-level-extent" id="erode">
  35583. <h4 class="subsection"><span>32.181.2 erode<a class="copiable-link" href="#erode"> &para;</a></span></h4>
  35584. <p>Erode an image by using a specific structuring element.
  35585. It corresponds to the libopencv function <code class="code">cvErode</code>.
  35586. </p>
  35587. <p>It accepts the parameters: <var class="var">struct_el</var>:<var class="var">nb_iterations</var>,
  35588. with the same syntax and semantics as the <a class="ref" href="#dilate">dilate</a> filter.
  35589. </p>
  35590. </div>
  35591. <div class="subsection-level-extent" id="smooth">
  35592. <h4 class="subsection"><span>32.181.3 smooth<a class="copiable-link" href="#smooth"> &para;</a></span></h4>
  35593. <p>Smooth the input video.
  35594. </p>
  35595. <p>The filter takes the following parameters:
  35596. <var class="var">type</var>|<var class="var">param1</var>|<var class="var">param2</var>|<var class="var">param3</var>|<var class="var">param4</var>.
  35597. </p>
  35598. <p><var class="var">type</var> is the type of smooth filter to apply, and must be one of
  35599. the following values: &quot;blur&quot;, &quot;blur_no_scale&quot;, &quot;median&quot;, &quot;gaussian&quot;,
  35600. or &quot;bilateral&quot;. The default value is &quot;gaussian&quot;.
  35601. </p>
  35602. <p>The meaning of <var class="var">param1</var>, <var class="var">param2</var>, <var class="var">param3</var>, and <var class="var">param4</var>
  35603. depends on the smooth type. <var class="var">param1</var> and
  35604. <var class="var">param2</var> accept integer positive values or 0. <var class="var">param3</var> and
  35605. <var class="var">param4</var> accept floating point values.
  35606. </p>
  35607. <p>The default value for <var class="var">param1</var> is 3. The default value for the
  35608. other parameters is 0.
  35609. </p>
  35610. <p>These parameters correspond to the parameters assigned to the
  35611. libopencv function <code class="code">cvSmooth</code>.
  35612. </p>
  35613. </div>
  35614. </div>
  35615. <div class="section-level-extent" id="oscilloscope">
  35616. <h3 class="section"><span>32.182 oscilloscope<a class="copiable-link" href="#oscilloscope"> &para;</a></span></h3>
  35617. <p>2D Video Oscilloscope.
  35618. </p>
  35619. <p>Useful to measure spatial impulse, step responses, chroma delays, etc.
  35620. </p>
  35621. <p>It accepts the following parameters:
  35622. </p>
  35623. <dl class="table">
  35624. <dt><samp class="option">x</samp></dt>
  35625. <dd><p>Set scope center x position.
  35626. </p>
  35627. </dd>
  35628. <dt><samp class="option">y</samp></dt>
  35629. <dd><p>Set scope center y position.
  35630. </p>
  35631. </dd>
  35632. <dt><samp class="option">s</samp></dt>
  35633. <dd><p>Set scope size, relative to frame diagonal.
  35634. </p>
  35635. </dd>
  35636. <dt><samp class="option">t</samp></dt>
  35637. <dd><p>Set scope tilt/rotation.
  35638. </p>
  35639. </dd>
  35640. <dt><samp class="option">o</samp></dt>
  35641. <dd><p>Set trace opacity.
  35642. </p>
  35643. </dd>
  35644. <dt><samp class="option">tx</samp></dt>
  35645. <dd><p>Set trace center x position.
  35646. </p>
  35647. </dd>
  35648. <dt><samp class="option">ty</samp></dt>
  35649. <dd><p>Set trace center y position.
  35650. </p>
  35651. </dd>
  35652. <dt><samp class="option">tw</samp></dt>
  35653. <dd><p>Set trace width, relative to width of frame.
  35654. </p>
  35655. </dd>
  35656. <dt><samp class="option">th</samp></dt>
  35657. <dd><p>Set trace height, relative to height of frame.
  35658. </p>
  35659. </dd>
  35660. <dt><samp class="option">c</samp></dt>
  35661. <dd><p>Set which components to trace. By default it traces first three components.
  35662. </p>
  35663. </dd>
  35664. <dt><samp class="option">g</samp></dt>
  35665. <dd><p>Draw trace grid. By default is enabled.
  35666. </p>
  35667. </dd>
  35668. <dt><samp class="option">st</samp></dt>
  35669. <dd><p>Draw some statistics. By default is enabled.
  35670. </p>
  35671. </dd>
  35672. <dt><samp class="option">sc</samp></dt>
  35673. <dd><p>Draw scope. By default is enabled.
  35674. </p></dd>
  35675. </dl>
  35676. <ul class="mini-toc">
  35677. <li><a href="#Commands-127" accesskey="1">Commands</a></li>
  35678. <li><a href="#Examples-117" accesskey="2">Examples</a></li>
  35679. </ul>
  35680. <div class="subsection-level-extent" id="Commands-127">
  35681. <h4 class="subsection"><span>32.182.1 Commands<a class="copiable-link" href="#Commands-127"> &para;</a></span></h4>
  35682. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  35683. The command accepts the same syntax of the corresponding option.
  35684. </p>
  35685. <p>If the specified expression is not valid, it is kept at its current
  35686. value.
  35687. </p>
  35688. </div>
  35689. <div class="subsection-level-extent" id="Examples-117">
  35690. <h4 class="subsection"><span>32.182.2 Examples<a class="copiable-link" href="#Examples-117"> &para;</a></span></h4>
  35691. <ul class="itemize mark-bullet">
  35692. <li>Inspect full first row of video frame.
  35693. <div class="example">
  35694. <pre class="example-preformatted">oscilloscope=x=0.5:y=0:s=1
  35695. </pre></div>
  35696. </li><li>Inspect full last row of video frame.
  35697. <div class="example">
  35698. <pre class="example-preformatted">oscilloscope=x=0.5:y=1:s=1
  35699. </pre></div>
  35700. </li><li>Inspect full 5th line of video frame of height 1080.
  35701. <div class="example">
  35702. <pre class="example-preformatted">oscilloscope=x=0.5:y=5/1080:s=1
  35703. </pre></div>
  35704. </li><li>Inspect full last column of video frame.
  35705. <div class="example">
  35706. <pre class="example-preformatted">oscilloscope=x=1:y=0.5:s=1:t=1
  35707. </pre></div>
  35708. </li></ul>
  35709. <a class="anchor" id="overlay"></a></div>
  35710. </div>
  35711. <div class="section-level-extent" id="overlay-1">
  35712. <h3 class="section"><span>32.183 overlay<a class="copiable-link" href="#overlay-1"> &para;</a></span></h3>
  35713. <p>Overlay one video on top of another.
  35714. </p>
  35715. <p>It takes two inputs and has one output. The first input is the &quot;main&quot;
  35716. video on which the second input is overlaid.
  35717. </p>
  35718. <p>It accepts the following parameters:
  35719. </p>
  35720. <p>A description of the accepted options follows.
  35721. </p>
  35722. <dl class="table">
  35723. <dt><samp class="option">x</samp></dt>
  35724. <dt><samp class="option">y</samp></dt>
  35725. <dd><p>Set the expression for the x and y coordinates of the overlaid video
  35726. on the main video. Default value is &quot;0&quot; for both expressions. In case
  35727. the expression is invalid, it is set to a huge value (meaning that the
  35728. overlay will not be displayed within the output visible area).
  35729. </p>
  35730. </dd>
  35731. <dt><samp class="option">eof_action</samp></dt>
  35732. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  35733. </p>
  35734. </dd>
  35735. <dt><samp class="option">eval</samp></dt>
  35736. <dd><p>Set when the expressions for <samp class="option">x</samp>, and <samp class="option">y</samp> are evaluated.
  35737. </p>
  35738. <p>It accepts the following values:
  35739. </p><dl class="table">
  35740. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  35741. <dd><p>only evaluate expressions once during the filter initialization or
  35742. when a command is processed
  35743. </p>
  35744. </dd>
  35745. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  35746. <dd><p>evaluate expressions for each incoming frame
  35747. </p></dd>
  35748. </dl>
  35749. <p>Default value is &lsquo;<samp class="samp">frame</samp>&rsquo;.
  35750. </p>
  35751. </dd>
  35752. <dt><samp class="option">shortest</samp></dt>
  35753. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  35754. </p>
  35755. </dd>
  35756. <dt><samp class="option">format</samp></dt>
  35757. <dd><p>Set the format for the output video.
  35758. </p>
  35759. <p>It accepts the following values:
  35760. </p><dl class="table">
  35761. <dt>&lsquo;<samp class="samp">yuv420</samp>&rsquo;</dt>
  35762. <dd><p>force YUV 4:2:0 8-bit planar output
  35763. </p>
  35764. </dd>
  35765. <dt>&lsquo;<samp class="samp">yuv420p10</samp>&rsquo;</dt>
  35766. <dd><p>force YUV 4:2:0 10-bit planar output
  35767. </p>
  35768. </dd>
  35769. <dt>&lsquo;<samp class="samp">yuv422</samp>&rsquo;</dt>
  35770. <dd><p>force YUV 4:2:2 8-bit planar output
  35771. </p>
  35772. </dd>
  35773. <dt>&lsquo;<samp class="samp">yuv422p10</samp>&rsquo;</dt>
  35774. <dd><p>force YUV 4:2:2 10-bit planar output
  35775. </p>
  35776. </dd>
  35777. <dt>&lsquo;<samp class="samp">yuv444</samp>&rsquo;</dt>
  35778. <dd><p>force YUV 4:4:4 8-bit planar output
  35779. </p>
  35780. </dd>
  35781. <dt>&lsquo;<samp class="samp">yuv444p10</samp>&rsquo;</dt>
  35782. <dd><p>force YUV 4:4:4 10-bit planar output
  35783. </p>
  35784. </dd>
  35785. <dt>&lsquo;<samp class="samp">rgb</samp>&rsquo;</dt>
  35786. <dd><p>force RGB 8-bit packed output
  35787. </p>
  35788. </dd>
  35789. <dt>&lsquo;<samp class="samp">gbrp</samp>&rsquo;</dt>
  35790. <dd><p>force RGB 8-bit planar output
  35791. </p>
  35792. </dd>
  35793. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  35794. <dd><p>automatically pick format
  35795. </p></dd>
  35796. </dl>
  35797. <p>Default value is &lsquo;<samp class="samp">yuv420</samp>&rsquo;.
  35798. </p>
  35799. </dd>
  35800. <dt><samp class="option">repeatlast</samp></dt>
  35801. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  35802. </p>
  35803. </dd>
  35804. <dt><samp class="option">alpha</samp></dt>
  35805. <dd><p>Set format of alpha of the overlaid video, it can be <var class="var">straight</var> or
  35806. <var class="var">premultiplied</var>. Default is <var class="var">straight</var>.
  35807. </p></dd>
  35808. </dl>
  35809. <p>The <samp class="option">x</samp>, and <samp class="option">y</samp> expressions can contain the following
  35810. parameters.
  35811. </p>
  35812. <dl class="table">
  35813. <dt><samp class="option">main_w, W</samp></dt>
  35814. <dt><samp class="option">main_h, H</samp></dt>
  35815. <dd><p>The main input width and height.
  35816. </p>
  35817. </dd>
  35818. <dt><samp class="option">overlay_w, w</samp></dt>
  35819. <dt><samp class="option">overlay_h, h</samp></dt>
  35820. <dd><p>The overlay input width and height.
  35821. </p>
  35822. </dd>
  35823. <dt><samp class="option">x</samp></dt>
  35824. <dt><samp class="option">y</samp></dt>
  35825. <dd><p>The computed values for <var class="var">x</var> and <var class="var">y</var>. They are evaluated for
  35826. each new frame.
  35827. </p>
  35828. </dd>
  35829. <dt><samp class="option">hsub</samp></dt>
  35830. <dt><samp class="option">vsub</samp></dt>
  35831. <dd><p>horizontal and vertical chroma subsample values of the output
  35832. format. For example for the pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and
  35833. <var class="var">vsub</var> is 1.
  35834. </p>
  35835. </dd>
  35836. <dt><samp class="option">n</samp></dt>
  35837. <dd><p>the number of input frame, starting from 0
  35838. </p>
  35839. </dd>
  35840. <dt><samp class="option">pos</samp></dt>
  35841. <dd><p>the position in the file of the input frame, NAN if unknown; deprecated,
  35842. do not use
  35843. </p>
  35844. </dd>
  35845. <dt><samp class="option">t</samp></dt>
  35846. <dd><p>The timestamp, expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  35847. </p>
  35848. </dd>
  35849. </dl>
  35850. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  35851. </p>
  35852. <p>Note that the <var class="var">n</var>, <var class="var">t</var> variables are available only
  35853. when evaluation is done <em class="emph">per frame</em>, and will evaluate to NAN
  35854. when <samp class="option">eval</samp> is set to &lsquo;<samp class="samp">init</samp>&rsquo;.
  35855. </p>
  35856. <p>Be aware that frames are taken from each input video in timestamp
  35857. order, hence, if their initial timestamps differ, it is a good idea
  35858. to pass the two inputs through a <var class="var">setpts=PTS-STARTPTS</var> filter to
  35859. have them begin in the same zero timestamp, as the example for
  35860. the <var class="var">movie</var> filter does.
  35861. </p>
  35862. <p>You can chain together more overlays but you should test the
  35863. efficiency of such approach.
  35864. </p>
  35865. <ul class="mini-toc">
  35866. <li><a href="#Commands-128" accesskey="1">Commands</a></li>
  35867. <li><a href="#Examples-118" accesskey="2">Examples</a></li>
  35868. </ul>
  35869. <div class="subsection-level-extent" id="Commands-128">
  35870. <h4 class="subsection"><span>32.183.1 Commands<a class="copiable-link" href="#Commands-128"> &para;</a></span></h4>
  35871. <p>This filter supports the following commands:
  35872. </p><dl class="table">
  35873. <dt><samp class="option">x</samp></dt>
  35874. <dt><samp class="option">y</samp></dt>
  35875. <dd><p>Modify the x and y of the overlay input.
  35876. The command accepts the same syntax of the corresponding option.
  35877. </p>
  35878. <p>If the specified expression is not valid, it is kept at its current
  35879. value.
  35880. </p></dd>
  35881. </dl>
  35882. </div>
  35883. <div class="subsection-level-extent" id="Examples-118">
  35884. <h4 class="subsection"><span>32.183.2 Examples<a class="copiable-link" href="#Examples-118"> &para;</a></span></h4>
  35885. <ul class="itemize mark-bullet">
  35886. <li>Draw the overlay at 10 pixels from the bottom right corner of the main
  35887. video:
  35888. <div class="example">
  35889. <pre class="example-preformatted">overlay=main_w-overlay_w-10:main_h-overlay_h-10
  35890. </pre></div>
  35891. <p>Using named options the example above becomes:
  35892. </p><div class="example">
  35893. <pre class="example-preformatted">overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10
  35894. </pre></div>
  35895. </li><li>Insert a transparent PNG logo in the bottom left corner of the input,
  35896. using the <code class="command">ffmpeg</code> tool with the <code class="code">-filter_complex</code> option:
  35897. <div class="example">
  35898. <pre class="example-preformatted">ffmpeg -i input -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output
  35899. </pre></div>
  35900. </li><li>Insert 2 different transparent PNG logos (second logo on bottom
  35901. right corner) using the <code class="command">ffmpeg</code> tool:
  35902. <div class="example">
  35903. <pre class="example-preformatted">ffmpeg -i input -i logo1 -i logo2 -filter_complex 'overlay=x=10:y=H-h-10,overlay=x=W-w-10:y=H-h-10' output
  35904. </pre></div>
  35905. </li><li>Add a transparent color layer on top of the main video; <code class="code">WxH</code>
  35906. must specify the size of the main input to the overlay filter:
  35907. <div class="example">
  35908. <pre class="example-preformatted">color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
  35909. </pre></div>
  35910. </li><li>Play an original video and a filtered version (here with the deshake
  35911. filter) side by side using the <code class="command">ffplay</code> tool:
  35912. <div class="example">
  35913. <pre class="example-preformatted">ffplay input.avi -vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'
  35914. </pre></div>
  35915. <p>The above command is the same as:
  35916. </p><div class="example">
  35917. <pre class="example-preformatted">ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
  35918. </pre></div>
  35919. </li><li>Make a sliding overlay appearing from the left to the right top part of the
  35920. screen starting since time 2:
  35921. <div class="example">
  35922. <pre class="example-preformatted">overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0
  35923. </pre></div>
  35924. </li><li>Compose output by putting two input videos side to side:
  35925. <div class="example">
  35926. <pre class="example-preformatted">ffmpeg -i left.avi -i right.avi -filter_complex &quot;
  35927. nullsrc=size=200x100 [background];
  35928. [0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
  35929. [1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
  35930. [background][left] overlay=shortest=1 [background+left];
  35931. [background+left][right] overlay=shortest=1:x=100 [left+right]
  35932. &quot;
  35933. </pre></div>
  35934. </li><li>Mask 10-20 seconds of a video by applying the delogo filter to a section
  35935. <div class="example">
  35936. <pre class="example-preformatted">ffmpeg -i test.avi -codec:v:0 wmv2 -ar 11025 -b:v 9000k
  35937. -vf '[in]split[split_main][split_delogo];[split_delogo]trim=start=360:end=371,delogo=0:0:640:480[delogoed];[split_main][delogoed]overlay=eof_action=pass[out]'
  35938. masked.avi
  35939. </pre></div>
  35940. </li><li>Chain several overlays in cascade:
  35941. <div class="example">
  35942. <pre class="example-preformatted">nullsrc=s=200x200 [bg];
  35943. testsrc=s=100x100, split=4 [in0][in1][in2][in3];
  35944. [in0] lutrgb=r=0, [bg] overlay=0:0 [mid0];
  35945. [in1] lutrgb=g=0, [mid0] overlay=100:0 [mid1];
  35946. [in2] lutrgb=b=0, [mid1] overlay=0:100 [mid2];
  35947. [in3] null, [mid2] overlay=100:100 [out0]
  35948. </pre></div>
  35949. </li></ul>
  35950. <a class="anchor" id="overlay_005fcuda"></a></div>
  35951. </div>
  35952. <div class="section-level-extent" id="overlay_005fcuda-1">
  35953. <h3 class="section"><span>32.184 overlay_cuda<a class="copiable-link" href="#overlay_005fcuda-1"> &para;</a></span></h3>
  35954. <p>Overlay one video on top of another.
  35955. </p>
  35956. <p>This is the CUDA variant of the <a class="ref" href="#overlay">overlay</a> filter.
  35957. It only accepts CUDA frames. The underlying input pixel formats have to match.
  35958. </p>
  35959. <p>It takes two inputs and has one output. The first input is the &quot;main&quot;
  35960. video on which the second input is overlaid.
  35961. </p>
  35962. <p>It accepts the following parameters:
  35963. </p>
  35964. <dl class="table">
  35965. <dt><samp class="option">x</samp></dt>
  35966. <dt><samp class="option">y</samp></dt>
  35967. <dd><p>Set expressions for the x and y coordinates of the overlaid video
  35968. on the main video.
  35969. </p>
  35970. <p>They can contain the following parameters:
  35971. </p>
  35972. <dl class="table">
  35973. <dt><samp class="option">main_w, W</samp></dt>
  35974. <dt><samp class="option">main_h, H</samp></dt>
  35975. <dd><p>The main input width and height.
  35976. </p>
  35977. </dd>
  35978. <dt><samp class="option">overlay_w, w</samp></dt>
  35979. <dt><samp class="option">overlay_h, h</samp></dt>
  35980. <dd><p>The overlay input width and height.
  35981. </p>
  35982. </dd>
  35983. <dt><samp class="option">x</samp></dt>
  35984. <dt><samp class="option">y</samp></dt>
  35985. <dd><p>The computed values for <var class="var">x</var> and <var class="var">y</var>. They are evaluated for
  35986. each new frame.
  35987. </p>
  35988. </dd>
  35989. <dt><samp class="option">n</samp></dt>
  35990. <dd><p>The ordinal index of the main input frame, starting from 0.
  35991. </p>
  35992. </dd>
  35993. <dt><samp class="option">pos</samp></dt>
  35994. <dd><p>The byte offset position in the file of the main input frame, NAN if unknown.
  35995. Deprecated, do not use.
  35996. </p>
  35997. </dd>
  35998. <dt><samp class="option">t</samp></dt>
  35999. <dd><p>The timestamp of the main input frame, expressed in seconds, NAN if unknown.
  36000. </p>
  36001. </dd>
  36002. </dl>
  36003. <p>Default value is &quot;0&quot; for both expressions.
  36004. </p>
  36005. </dd>
  36006. <dt><samp class="option">eval</samp></dt>
  36007. <dd><p>Set when the expressions for <samp class="option">x</samp> and <samp class="option">y</samp> are evaluated.
  36008. </p>
  36009. <p>It accepts the following values:
  36010. </p><dl class="table">
  36011. <dt><samp class="option">init</samp></dt>
  36012. <dd><p>Evaluate expressions once during filter initialization or
  36013. when a command is processed.
  36014. </p>
  36015. </dd>
  36016. <dt><samp class="option">frame</samp></dt>
  36017. <dd><p>Evaluate expressions for each incoming frame
  36018. </p></dd>
  36019. </dl>
  36020. <p>Default value is <samp class="option">frame</samp>.
  36021. </p>
  36022. </dd>
  36023. <dt><samp class="option">eof_action</samp></dt>
  36024. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  36025. </p>
  36026. </dd>
  36027. <dt><samp class="option">shortest</samp></dt>
  36028. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  36029. </p>
  36030. </dd>
  36031. <dt><samp class="option">repeatlast</samp></dt>
  36032. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  36033. </p>
  36034. </dd>
  36035. </dl>
  36036. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  36037. </p>
  36038. </div>
  36039. <div class="section-level-extent" id="owdenoise">
  36040. <h3 class="section"><span>32.185 owdenoise<a class="copiable-link" href="#owdenoise"> &para;</a></span></h3>
  36041. <p>Apply Overcomplete Wavelet denoiser.
  36042. </p>
  36043. <p>The filter accepts the following options:
  36044. </p>
  36045. <dl class="table">
  36046. <dt><samp class="option">depth</samp></dt>
  36047. <dd><p>Set depth.
  36048. </p>
  36049. <p>Larger depth values will denoise lower frequency components more, but
  36050. slow down filtering.
  36051. </p>
  36052. <p>Must be an int in the range 8-16, default is <code class="code">8</code>.
  36053. </p>
  36054. </dd>
  36055. <dt><samp class="option">luma_strength, ls</samp></dt>
  36056. <dd><p>Set luma strength.
  36057. </p>
  36058. <p>Must be a double value in the range 0-1000, default is <code class="code">1.0</code>.
  36059. </p>
  36060. </dd>
  36061. <dt><samp class="option">chroma_strength, cs</samp></dt>
  36062. <dd><p>Set chroma strength.
  36063. </p>
  36064. <p>Must be a double value in the range 0-1000, default is <code class="code">1.0</code>.
  36065. </p></dd>
  36066. </dl>
  36067. <a class="anchor" id="pad"></a></div>
  36068. <div class="section-level-extent" id="pad-1">
  36069. <h3 class="section"><span>32.186 pad<a class="copiable-link" href="#pad-1"> &para;</a></span></h3>
  36070. <p>Add paddings to the input image, and place the original input at the
  36071. provided <var class="var">x</var>, <var class="var">y</var> coordinates.
  36072. </p>
  36073. <p>It accepts the following parameters:
  36074. </p>
  36075. <dl class="table">
  36076. <dt><samp class="option">width, w</samp></dt>
  36077. <dt><samp class="option">height, h</samp></dt>
  36078. <dd><p>Specify an expression for the size of the output image with the
  36079. paddings added. If the value for <var class="var">width</var> or <var class="var">height</var> is 0, the
  36080. corresponding input size is used for the output.
  36081. </p>
  36082. <p>The <var class="var">width</var> expression can reference the value set by the
  36083. <var class="var">height</var> expression, and vice versa.
  36084. </p>
  36085. <p>The default value of <var class="var">width</var> and <var class="var">height</var> is 0.
  36086. </p>
  36087. </dd>
  36088. <dt><samp class="option">x</samp></dt>
  36089. <dt><samp class="option">y</samp></dt>
  36090. <dd><p>Specify the offsets to place the input image at within the padded area,
  36091. with respect to the top/left border of the output image.
  36092. </p>
  36093. <p>The <var class="var">x</var> expression can reference the value set by the <var class="var">y</var>
  36094. expression, and vice versa.
  36095. </p>
  36096. <p>The default value of <var class="var">x</var> and <var class="var">y</var> is 0.
  36097. </p>
  36098. <p>If <var class="var">x</var> or <var class="var">y</var> evaluate to a negative number, they&rsquo;ll be changed
  36099. so the input image is centered on the padded area.
  36100. </p>
  36101. </dd>
  36102. <dt><samp class="option">color</samp></dt>
  36103. <dd><p>Specify the color of the padded area. For the syntax of this option,
  36104. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils
  36105. manual</a>.
  36106. </p>
  36107. <p>The default value of <var class="var">color</var> is &quot;black&quot;.
  36108. </p>
  36109. </dd>
  36110. <dt><samp class="option">eval</samp></dt>
  36111. <dd><p>Specify when to evaluate <var class="var">width</var>, <var class="var">height</var>, <var class="var">x</var> and <var class="var">y</var> expression.
  36112. </p>
  36113. <p>It accepts the following values:
  36114. </p>
  36115. <dl class="table">
  36116. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  36117. <dd><p>Only evaluate expressions once during the filter initialization or when
  36118. a command is processed.
  36119. </p>
  36120. </dd>
  36121. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  36122. <dd><p>Evaluate expressions for each incoming frame.
  36123. </p>
  36124. </dd>
  36125. </dl>
  36126. <p>Default value is &lsquo;<samp class="samp">init</samp>&rsquo;.
  36127. </p>
  36128. </dd>
  36129. <dt><samp class="option">aspect</samp></dt>
  36130. <dd><p>Pad to aspect instead to a resolution.
  36131. </p>
  36132. </dd>
  36133. </dl>
  36134. <p>The value for the <var class="var">width</var>, <var class="var">height</var>, <var class="var">x</var>, and <var class="var">y</var>
  36135. options are expressions containing the following constants:
  36136. </p>
  36137. <dl class="table">
  36138. <dt><samp class="option">in_w</samp></dt>
  36139. <dt><samp class="option">in_h</samp></dt>
  36140. <dd><p>The input video width and height.
  36141. </p>
  36142. </dd>
  36143. <dt><samp class="option">iw</samp></dt>
  36144. <dt><samp class="option">ih</samp></dt>
  36145. <dd><p>These are the same as <var class="var">in_w</var> and <var class="var">in_h</var>.
  36146. </p>
  36147. </dd>
  36148. <dt><samp class="option">out_w</samp></dt>
  36149. <dt><samp class="option">out_h</samp></dt>
  36150. <dd><p>The output width and height (the size of the padded area), as
  36151. specified by the <var class="var">width</var> and <var class="var">height</var> expressions.
  36152. </p>
  36153. </dd>
  36154. <dt><samp class="option">ow</samp></dt>
  36155. <dt><samp class="option">oh</samp></dt>
  36156. <dd><p>These are the same as <var class="var">out_w</var> and <var class="var">out_h</var>.
  36157. </p>
  36158. </dd>
  36159. <dt><samp class="option">x</samp></dt>
  36160. <dt><samp class="option">y</samp></dt>
  36161. <dd><p>The x and y offsets as specified by the <var class="var">x</var> and <var class="var">y</var>
  36162. expressions, or NAN if not yet specified.
  36163. </p>
  36164. </dd>
  36165. <dt><samp class="option">a</samp></dt>
  36166. <dd><p>same as <var class="var">iw</var> / <var class="var">ih</var>
  36167. </p>
  36168. </dd>
  36169. <dt><samp class="option">sar</samp></dt>
  36170. <dd><p>input sample aspect ratio
  36171. </p>
  36172. </dd>
  36173. <dt><samp class="option">dar</samp></dt>
  36174. <dd><p>input display aspect ratio, it is the same as (<var class="var">iw</var> / <var class="var">ih</var>) * <var class="var">sar</var>
  36175. </p>
  36176. </dd>
  36177. <dt><samp class="option">hsub</samp></dt>
  36178. <dt><samp class="option">vsub</samp></dt>
  36179. <dd><p>The horizontal and vertical chroma subsample values. For example for the
  36180. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  36181. </p></dd>
  36182. </dl>
  36183. <ul class="mini-toc">
  36184. <li><a href="#Examples-119" accesskey="1">Examples</a></li>
  36185. </ul>
  36186. <div class="subsection-level-extent" id="Examples-119">
  36187. <h4 class="subsection"><span>32.186.1 Examples<a class="copiable-link" href="#Examples-119"> &para;</a></span></h4>
  36188. <ul class="itemize mark-bullet">
  36189. <li>Add paddings with the color &quot;violet&quot; to the input video. The output video
  36190. size is 640x480, and the top-left corner of the input video is placed at
  36191. column 0, row 40
  36192. <div class="example">
  36193. <pre class="example-preformatted">pad=640:480:0:40:violet
  36194. </pre></div>
  36195. <p>The example above is equivalent to the following command:
  36196. </p><div class="example">
  36197. <pre class="example-preformatted">pad=width=640:height=480:x=0:y=40:color=violet
  36198. </pre></div>
  36199. </li><li>Pad the input to get an output with dimensions increased by 3/2,
  36200. and put the input video at the center of the padded area:
  36201. <div class="example">
  36202. <pre class="example-preformatted">pad=&quot;3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2&quot;
  36203. </pre></div>
  36204. </li><li>Pad the input to get a squared output with size equal to the maximum
  36205. value between the input width and height, and put the input video at
  36206. the center of the padded area:
  36207. <div class="example">
  36208. <pre class="example-preformatted">pad=&quot;max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2&quot;
  36209. </pre></div>
  36210. </li><li>Pad the input to get a final w/h ratio of 16:9:
  36211. <div class="example">
  36212. <pre class="example-preformatted">pad=&quot;ih*16/9:ih:(ow-iw)/2:(oh-ih)/2&quot;
  36213. </pre></div>
  36214. </li><li>In case of anamorphic video, in order to set the output display aspect
  36215. correctly, it is necessary to use <var class="var">sar</var> in the expression,
  36216. according to the relation:
  36217. <div class="example">
  36218. <pre class="example-preformatted">(ih * X / ih) * sar = output_dar
  36219. X = output_dar / sar
  36220. </pre></div>
  36221. <p>Thus the previous example needs to be modified to:
  36222. </p><div class="example">
  36223. <pre class="example-preformatted">pad=&quot;ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2&quot;
  36224. </pre></div>
  36225. </li><li>Double the output size and put the input video in the bottom-right
  36226. corner of the output padded area:
  36227. <div class="example">
  36228. <pre class="example-preformatted">pad=&quot;2*iw:2*ih:ow-iw:oh-ih&quot;
  36229. </pre></div>
  36230. </li></ul>
  36231. <a class="anchor" id="palettegen"></a></div>
  36232. </div>
  36233. <div class="section-level-extent" id="palettegen-1">
  36234. <h3 class="section"><span>32.187 palettegen<a class="copiable-link" href="#palettegen-1"> &para;</a></span></h3>
  36235. <p>Generate one palette for a whole video stream.
  36236. </p>
  36237. <p>It accepts the following options:
  36238. </p>
  36239. <dl class="table">
  36240. <dt><samp class="option">max_colors</samp></dt>
  36241. <dd><p>Set the maximum number of colors to quantize in the palette.
  36242. Note: the palette will still contain 256 colors; the unused palette entries
  36243. will be black.
  36244. </p>
  36245. </dd>
  36246. <dt><samp class="option">reserve_transparent</samp></dt>
  36247. <dd><p>Create a palette of 255 colors maximum and reserve the last one for
  36248. transparency. Reserving the transparency color is useful for GIF optimization.
  36249. If not set, the maximum of colors in the palette will be 256. You probably want
  36250. to disable this option for a standalone image.
  36251. Set by default.
  36252. </p>
  36253. </dd>
  36254. <dt><samp class="option">transparency_color</samp></dt>
  36255. <dd><p>Set the color that will be used as background for transparency.
  36256. </p>
  36257. </dd>
  36258. <dt><samp class="option">stats_mode</samp></dt>
  36259. <dd><p>Set statistics mode.
  36260. </p>
  36261. <p>It accepts the following values:
  36262. </p><dl class="table">
  36263. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  36264. <dd><p>Compute full frame histograms.
  36265. </p></dd>
  36266. <dt>&lsquo;<samp class="samp">diff</samp>&rsquo;</dt>
  36267. <dd><p>Compute histograms only for the part that differs from previous frame. This
  36268. might be relevant to give more importance to the moving part of your input if
  36269. the background is static.
  36270. </p></dd>
  36271. <dt>&lsquo;<samp class="samp">single</samp>&rsquo;</dt>
  36272. <dd><p>Compute new histogram for each frame.
  36273. </p></dd>
  36274. </dl>
  36275. <p>Default value is <var class="var">full</var>.
  36276. </p></dd>
  36277. </dl>
  36278. <p>The filter also exports the frame metadata <code class="code">lavfi.color_quant_ratio</code>
  36279. (<code class="code">nb_color_in / nb_color_out</code>) which you can use to evaluate the degree of
  36280. color quantization of the palette. This information is also visible at
  36281. <var class="var">info</var> logging level.
  36282. </p>
  36283. <ul class="mini-toc">
  36284. <li><a href="#Examples-120" accesskey="1">Examples</a></li>
  36285. </ul>
  36286. <div class="subsection-level-extent" id="Examples-120">
  36287. <h4 class="subsection"><span>32.187.1 Examples<a class="copiable-link" href="#Examples-120"> &para;</a></span></h4>
  36288. <ul class="itemize mark-bullet">
  36289. <li>Generate a representative palette of a given video using <code class="command">ffmpeg</code>:
  36290. <div class="example">
  36291. <pre class="example-preformatted">ffmpeg -i input.mkv -vf palettegen palette.png
  36292. </pre></div>
  36293. </li></ul>
  36294. </div>
  36295. </div>
  36296. <div class="section-level-extent" id="paletteuse">
  36297. <h3 class="section"><span>32.188 paletteuse<a class="copiable-link" href="#paletteuse"> &para;</a></span></h3>
  36298. <p>Use a palette to downsample an input video stream.
  36299. </p>
  36300. <p>The filter takes two inputs: one video stream and a palette. The palette must
  36301. be a 256 pixels image.
  36302. </p>
  36303. <p>It accepts the following options:
  36304. </p>
  36305. <dl class="table">
  36306. <dt><samp class="option">dither</samp></dt>
  36307. <dd><p>Select dithering mode. Available algorithms are:
  36308. </p><dl class="table">
  36309. <dt>&lsquo;<samp class="samp">bayer</samp>&rsquo;</dt>
  36310. <dd><p>Ordered 8x8 bayer dithering (deterministic)
  36311. </p></dd>
  36312. <dt>&lsquo;<samp class="samp">heckbert</samp>&rsquo;</dt>
  36313. <dd><p>Dithering as defined by Paul Heckbert in 1982 (simple error diffusion).
  36314. Note: this dithering is sometimes considered &quot;wrong&quot; and is included as a
  36315. reference.
  36316. </p></dd>
  36317. <dt>&lsquo;<samp class="samp">floyd_steinberg</samp>&rsquo;</dt>
  36318. <dd><p>Floyd and Steingberg dithering (error diffusion)
  36319. </p></dd>
  36320. <dt>&lsquo;<samp class="samp">sierra2</samp>&rsquo;</dt>
  36321. <dd><p>Frankie Sierra dithering v2 (error diffusion)
  36322. </p></dd>
  36323. <dt>&lsquo;<samp class="samp">sierra2_4a</samp>&rsquo;</dt>
  36324. <dd><p>Frankie Sierra dithering v2 &quot;Lite&quot; (error diffusion)
  36325. </p></dd>
  36326. <dt>&lsquo;<samp class="samp">sierra3</samp>&rsquo;</dt>
  36327. <dd><p>Frankie Sierra dithering v3 (error diffusion)
  36328. </p></dd>
  36329. <dt>&lsquo;<samp class="samp">burkes</samp>&rsquo;</dt>
  36330. <dd><p>Burkes dithering (error diffusion)
  36331. </p></dd>
  36332. <dt>&lsquo;<samp class="samp">atkinson</samp>&rsquo;</dt>
  36333. <dd><p>Atkinson dithering by Bill Atkinson at Apple Computer (error diffusion)
  36334. </p></dd>
  36335. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  36336. <dd><p>Disable dithering.
  36337. </p></dd>
  36338. </dl>
  36339. <p>Default is <var class="var">sierra2_4a</var>.
  36340. </p>
  36341. </dd>
  36342. <dt><samp class="option">bayer_scale</samp></dt>
  36343. <dd><p>When <var class="var">bayer</var> dithering is selected, this option defines the scale of the
  36344. pattern (how much the crosshatch pattern is visible). A low value means more
  36345. visible pattern for less banding, and higher value means less visible pattern
  36346. at the cost of more banding.
  36347. </p>
  36348. <p>The option must be an integer value in the range [0,5]. Default is <var class="var">2</var>.
  36349. </p>
  36350. </dd>
  36351. <dt><samp class="option">diff_mode</samp></dt>
  36352. <dd><p>If set, define the zone to process
  36353. </p>
  36354. <dl class="table">
  36355. <dt>&lsquo;<samp class="samp">rectangle</samp>&rsquo;</dt>
  36356. <dd><p>Only the changing rectangle will be reprocessed. This is similar to GIF
  36357. cropping/offsetting compression mechanism. This option can be useful for speed
  36358. if only a part of the image is changing, and has use cases such as limiting the
  36359. scope of the error diffusal <samp class="option">dither</samp> to the rectangle that bounds the
  36360. moving scene (it leads to more deterministic output if the scene doesn&rsquo;t change
  36361. much, and as a result less moving noise and better GIF compression).
  36362. </p></dd>
  36363. </dl>
  36364. <p>Default is <var class="var">none</var>.
  36365. </p>
  36366. </dd>
  36367. <dt><samp class="option">new</samp></dt>
  36368. <dd><p>Take new palette for each output frame.
  36369. </p>
  36370. </dd>
  36371. <dt><samp class="option">alpha_threshold</samp></dt>
  36372. <dd><p>Sets the alpha threshold for transparency. Alpha values above this threshold
  36373. will be treated as completely opaque, and values below this threshold will be
  36374. treated as completely transparent.
  36375. </p>
  36376. <p>The option must be an integer value in the range [0,255]. Default is <var class="var">128</var>.
  36377. </p></dd>
  36378. </dl>
  36379. <ul class="mini-toc">
  36380. <li><a href="#Examples-121" accesskey="1">Examples</a></li>
  36381. </ul>
  36382. <div class="subsection-level-extent" id="Examples-121">
  36383. <h4 class="subsection"><span>32.188.1 Examples<a class="copiable-link" href="#Examples-121"> &para;</a></span></h4>
  36384. <ul class="itemize mark-bullet">
  36385. <li>Use a palette (generated for example with <a class="ref" href="#palettegen">palettegen</a>) to encode a GIF
  36386. using <code class="command">ffmpeg</code>:
  36387. <div class="example">
  36388. <pre class="example-preformatted">ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
  36389. </pre></div>
  36390. </li></ul>
  36391. </div>
  36392. </div>
  36393. <div class="section-level-extent" id="perspective">
  36394. <h3 class="section"><span>32.189 perspective<a class="copiable-link" href="#perspective"> &para;</a></span></h3>
  36395. <p>Correct perspective of video not recorded perpendicular to the screen.
  36396. </p>
  36397. <p>A description of the accepted parameters follows.
  36398. </p>
  36399. <dl class="table">
  36400. <dt><samp class="option">x0</samp></dt>
  36401. <dt><samp class="option">y0</samp></dt>
  36402. <dt><samp class="option">x1</samp></dt>
  36403. <dt><samp class="option">y1</samp></dt>
  36404. <dt><samp class="option">x2</samp></dt>
  36405. <dt><samp class="option">y2</samp></dt>
  36406. <dt><samp class="option">x3</samp></dt>
  36407. <dt><samp class="option">y3</samp></dt>
  36408. <dd><p>Set coordinates expression for top left, top right, bottom left and bottom right corners.
  36409. Default values are <code class="code">0:0:W:0:0:H:W:H</code> with which perspective will remain unchanged.
  36410. If the <code class="code">sense</code> option is set to <code class="code">source</code>, then the specified points will be sent
  36411. to the corners of the destination. If the <code class="code">sense</code> option is set to <code class="code">destination</code>,
  36412. then the corners of the source will be sent to the specified coordinates.
  36413. </p>
  36414. <p>The expressions can use the following variables:
  36415. </p>
  36416. <dl class="table">
  36417. <dt><samp class="option">W</samp></dt>
  36418. <dt><samp class="option">H</samp></dt>
  36419. <dd><p>the width and height of video frame.
  36420. </p></dd>
  36421. <dt><samp class="option">in</samp></dt>
  36422. <dd><p>Input frame count.
  36423. </p></dd>
  36424. <dt><samp class="option">on</samp></dt>
  36425. <dd><p>Output frame count.
  36426. </p></dd>
  36427. </dl>
  36428. </dd>
  36429. <dt><samp class="option">interpolation</samp></dt>
  36430. <dd><p>Set interpolation for perspective correction.
  36431. </p>
  36432. <p>It accepts the following values:
  36433. </p><dl class="table">
  36434. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  36435. <dt>&lsquo;<samp class="samp">cubic</samp>&rsquo;</dt>
  36436. </dl>
  36437. <p>Default value is &lsquo;<samp class="samp">linear</samp>&rsquo;.
  36438. </p>
  36439. </dd>
  36440. <dt><samp class="option">sense</samp></dt>
  36441. <dd><p>Set interpretation of coordinate options.
  36442. </p>
  36443. <p>It accepts the following values:
  36444. </p><dl class="table">
  36445. <dt>&lsquo;<samp class="samp">0, source</samp>&rsquo;</dt>
  36446. <dd>
  36447. <p>Send point in the source specified by the given coordinates to
  36448. the corners of the destination.
  36449. </p>
  36450. </dd>
  36451. <dt>&lsquo;<samp class="samp">1, destination</samp>&rsquo;</dt>
  36452. <dd>
  36453. <p>Send the corners of the source to the point in the destination specified
  36454. by the given coordinates.
  36455. </p>
  36456. <p>Default value is &lsquo;<samp class="samp">source</samp>&rsquo;.
  36457. </p></dd>
  36458. </dl>
  36459. </dd>
  36460. <dt><samp class="option">eval</samp></dt>
  36461. <dd><p>Set when the expressions for coordinates <samp class="option">x0,y0,...x3,y3</samp> are evaluated.
  36462. </p>
  36463. <p>It accepts the following values:
  36464. </p><dl class="table">
  36465. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  36466. <dd><p>only evaluate expressions once during the filter initialization or
  36467. when a command is processed
  36468. </p>
  36469. </dd>
  36470. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  36471. <dd><p>evaluate expressions for each incoming frame
  36472. </p></dd>
  36473. </dl>
  36474. <p>Default value is &lsquo;<samp class="samp">init</samp>&rsquo;.
  36475. </p></dd>
  36476. </dl>
  36477. </div>
  36478. <div class="section-level-extent" id="phase">
  36479. <h3 class="section"><span>32.190 phase<a class="copiable-link" href="#phase"> &para;</a></span></h3>
  36480. <p>Delay interlaced video by one field time so that the field order changes.
  36481. </p>
  36482. <p>The intended use is to fix PAL movies that have been captured with the
  36483. opposite field order to the film-to-video transfer.
  36484. </p>
  36485. <p>A description of the accepted parameters follows.
  36486. </p>
  36487. <dl class="table">
  36488. <dt><samp class="option">mode</samp></dt>
  36489. <dd><p>Set phase mode.
  36490. </p>
  36491. <p>It accepts the following values:
  36492. </p><dl class="table">
  36493. <dt>&lsquo;<samp class="samp">t</samp>&rsquo;</dt>
  36494. <dd><p>Capture field order top-first, transfer bottom-first.
  36495. Filter will delay the bottom field.
  36496. </p>
  36497. </dd>
  36498. <dt>&lsquo;<samp class="samp">b</samp>&rsquo;</dt>
  36499. <dd><p>Capture field order bottom-first, transfer top-first.
  36500. Filter will delay the top field.
  36501. </p>
  36502. </dd>
  36503. <dt>&lsquo;<samp class="samp">p</samp>&rsquo;</dt>
  36504. <dd><p>Capture and transfer with the same field order. This mode only exists
  36505. for the documentation of the other options to refer to, but if you
  36506. actually select it, the filter will faithfully do nothing.
  36507. </p>
  36508. </dd>
  36509. <dt>&lsquo;<samp class="samp">a</samp>&rsquo;</dt>
  36510. <dd><p>Capture field order determined automatically by field flags, transfer
  36511. opposite.
  36512. Filter selects among &lsquo;<samp class="samp">t</samp>&rsquo; and &lsquo;<samp class="samp">b</samp>&rsquo; modes on a frame by frame
  36513. basis using field flags. If no field information is available,
  36514. then this works just like &lsquo;<samp class="samp">u</samp>&rsquo;.
  36515. </p>
  36516. </dd>
  36517. <dt>&lsquo;<samp class="samp">u</samp>&rsquo;</dt>
  36518. <dd><p>Capture unknown or varying, transfer opposite.
  36519. Filter selects among &lsquo;<samp class="samp">t</samp>&rsquo; and &lsquo;<samp class="samp">b</samp>&rsquo; on a frame by frame basis by
  36520. analyzing the images and selecting the alternative that produces best
  36521. match between the fields.
  36522. </p>
  36523. </dd>
  36524. <dt>&lsquo;<samp class="samp">T</samp>&rsquo;</dt>
  36525. <dd><p>Capture top-first, transfer unknown or varying.
  36526. Filter selects among &lsquo;<samp class="samp">t</samp>&rsquo; and &lsquo;<samp class="samp">p</samp>&rsquo; using image analysis.
  36527. </p>
  36528. </dd>
  36529. <dt>&lsquo;<samp class="samp">B</samp>&rsquo;</dt>
  36530. <dd><p>Capture bottom-first, transfer unknown or varying.
  36531. Filter selects among &lsquo;<samp class="samp">b</samp>&rsquo; and &lsquo;<samp class="samp">p</samp>&rsquo; using image analysis.
  36532. </p>
  36533. </dd>
  36534. <dt>&lsquo;<samp class="samp">A</samp>&rsquo;</dt>
  36535. <dd><p>Capture determined by field flags, transfer unknown or varying.
  36536. Filter selects among &lsquo;<samp class="samp">t</samp>&rsquo;, &lsquo;<samp class="samp">b</samp>&rsquo; and &lsquo;<samp class="samp">p</samp>&rsquo; using field flags and
  36537. image analysis. If no field information is available, then this works just
  36538. like &lsquo;<samp class="samp">U</samp>&rsquo;. This is the default mode.
  36539. </p>
  36540. </dd>
  36541. <dt>&lsquo;<samp class="samp">U</samp>&rsquo;</dt>
  36542. <dd><p>Both capture and transfer unknown or varying.
  36543. Filter selects among &lsquo;<samp class="samp">t</samp>&rsquo;, &lsquo;<samp class="samp">b</samp>&rsquo; and &lsquo;<samp class="samp">p</samp>&rsquo; using image analysis only.
  36544. </p></dd>
  36545. </dl>
  36546. </dd>
  36547. </dl>
  36548. <ul class="mini-toc">
  36549. <li><a href="#Commands-129" accesskey="1">Commands</a></li>
  36550. </ul>
  36551. <div class="subsection-level-extent" id="Commands-129">
  36552. <h4 class="subsection"><span>32.190.1 Commands<a class="copiable-link" href="#Commands-129"> &para;</a></span></h4>
  36553. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  36554. </p>
  36555. </div>
  36556. </div>
  36557. <div class="section-level-extent" id="photosensitivity">
  36558. <h3 class="section"><span>32.191 photosensitivity<a class="copiable-link" href="#photosensitivity"> &para;</a></span></h3>
  36559. <p>Reduce various flashes in video, so to help users with epilepsy.
  36560. </p>
  36561. <p>It accepts the following options:
  36562. </p><dl class="table">
  36563. <dt><samp class="option">frames, f</samp></dt>
  36564. <dd><p>Set how many frames to use when filtering. Default is 30.
  36565. </p>
  36566. </dd>
  36567. <dt><samp class="option">threshold, t</samp></dt>
  36568. <dd><p>Set detection threshold factor. Default is 1.
  36569. Lower is stricter.
  36570. </p>
  36571. </dd>
  36572. <dt><samp class="option">skip</samp></dt>
  36573. <dd><p>Set how many pixels to skip when sampling frames. Default is 1.
  36574. Allowed range is from 1 to 1024.
  36575. </p>
  36576. </dd>
  36577. <dt><samp class="option">bypass</samp></dt>
  36578. <dd><p>Leave frames unchanged. Default is disabled.
  36579. </p></dd>
  36580. </dl>
  36581. </div>
  36582. <div class="section-level-extent" id="pixdesctest">
  36583. <h3 class="section"><span>32.192 pixdesctest<a class="copiable-link" href="#pixdesctest"> &para;</a></span></h3>
  36584. <p>Pixel format descriptor test filter, mainly useful for internal
  36585. testing. The output video should be equal to the input video.
  36586. </p>
  36587. <p>For example:
  36588. </p><div class="example">
  36589. <pre class="example-preformatted">format=monow, pixdesctest
  36590. </pre></div>
  36591. <p>can be used to test the monowhite pixel format descriptor definition.
  36592. </p>
  36593. </div>
  36594. <div class="section-level-extent" id="pixelize">
  36595. <h3 class="section"><span>32.193 pixelize<a class="copiable-link" href="#pixelize"> &para;</a></span></h3>
  36596. <p>Apply pixelization to video stream.
  36597. </p>
  36598. <p>The filter accepts the following options:
  36599. </p><dl class="table">
  36600. <dt><samp class="option">width, w</samp></dt>
  36601. <dt><samp class="option">height, h</samp></dt>
  36602. <dd><p>Set block dimensions that will be used for pixelization.
  36603. Default value is <code class="code">16</code>.
  36604. </p>
  36605. </dd>
  36606. <dt><samp class="option">mode, m</samp></dt>
  36607. <dd><p>Set the mode of pixelization used.
  36608. </p>
  36609. <p>Possible values are:
  36610. </p><dl class="table">
  36611. <dt>&lsquo;<samp class="samp">avg</samp>&rsquo;</dt>
  36612. <dt>&lsquo;<samp class="samp">min</samp>&rsquo;</dt>
  36613. <dt>&lsquo;<samp class="samp">max</samp>&rsquo;</dt>
  36614. </dl>
  36615. <p>Default value is <code class="code">avg</code>.
  36616. </p>
  36617. </dd>
  36618. <dt><samp class="option">planes, p</samp></dt>
  36619. <dd><p>Set what planes to filter. Default is to filter all planes.
  36620. </p></dd>
  36621. </dl>
  36622. <ul class="mini-toc">
  36623. <li><a href="#Commands-130" accesskey="1">Commands</a></li>
  36624. </ul>
  36625. <div class="subsection-level-extent" id="Commands-130">
  36626. <h4 class="subsection"><span>32.193.1 Commands<a class="copiable-link" href="#Commands-130"> &para;</a></span></h4>
  36627. <p>This filter supports all options as <a class="ref" href="#commands">commands</a>.
  36628. </p>
  36629. </div>
  36630. </div>
  36631. <div class="section-level-extent" id="pixscope">
  36632. <h3 class="section"><span>32.194 pixscope<a class="copiable-link" href="#pixscope"> &para;</a></span></h3>
  36633. <p>Display sample values of color channels. Mainly useful for checking color
  36634. and levels. Minimum supported resolution is 640x480.
  36635. </p>
  36636. <p>The filters accept the following options:
  36637. </p>
  36638. <dl class="table">
  36639. <dt><samp class="option">x</samp></dt>
  36640. <dd><p>Set scope X position, relative offset on X axis.
  36641. </p>
  36642. </dd>
  36643. <dt><samp class="option">y</samp></dt>
  36644. <dd><p>Set scope Y position, relative offset on Y axis.
  36645. </p>
  36646. </dd>
  36647. <dt><samp class="option">w</samp></dt>
  36648. <dd><p>Set scope width.
  36649. </p>
  36650. </dd>
  36651. <dt><samp class="option">h</samp></dt>
  36652. <dd><p>Set scope height.
  36653. </p>
  36654. </dd>
  36655. <dt><samp class="option">o</samp></dt>
  36656. <dd><p>Set window opacity. This window also holds statistics about pixel area.
  36657. </p>
  36658. </dd>
  36659. <dt><samp class="option">wx</samp></dt>
  36660. <dd><p>Set window X position, relative offset on X axis.
  36661. </p>
  36662. </dd>
  36663. <dt><samp class="option">wy</samp></dt>
  36664. <dd><p>Set window Y position, relative offset on Y axis.
  36665. </p></dd>
  36666. </dl>
  36667. <ul class="mini-toc">
  36668. <li><a href="#Commands-131" accesskey="1">Commands</a></li>
  36669. </ul>
  36670. <div class="subsection-level-extent" id="Commands-131">
  36671. <h4 class="subsection"><span>32.194.1 Commands<a class="copiable-link" href="#Commands-131"> &para;</a></span></h4>
  36672. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  36673. </p>
  36674. </div>
  36675. </div>
  36676. <div class="section-level-extent" id="pp">
  36677. <h3 class="section"><span>32.195 pp<a class="copiable-link" href="#pp"> &para;</a></span></h3>
  36678. <p>Enable the specified chain of postprocessing subfilters using libpostproc. This
  36679. library should be automatically selected with a GPL build (<code class="code">--enable-gpl</code>).
  36680. Subfilters must be separated by &rsquo;/&rsquo; and can be disabled by prepending a &rsquo;-&rsquo;.
  36681. Each subfilter and some options have a short and a long name that can be used
  36682. interchangeably, i.e. dr/dering are the same.
  36683. </p>
  36684. <p>The filters accept the following options:
  36685. </p>
  36686. <dl class="table">
  36687. <dt><samp class="option">subfilters</samp></dt>
  36688. <dd><p>Set postprocessing subfilters string.
  36689. </p></dd>
  36690. </dl>
  36691. <p>All subfilters share common options to determine their scope:
  36692. </p>
  36693. <dl class="table">
  36694. <dt><samp class="option">a/autoq</samp></dt>
  36695. <dd><p>Honor the quality commands for this subfilter.
  36696. </p>
  36697. </dd>
  36698. <dt><samp class="option">c/chrom</samp></dt>
  36699. <dd><p>Do chrominance filtering, too (default).
  36700. </p>
  36701. </dd>
  36702. <dt><samp class="option">y/nochrom</samp></dt>
  36703. <dd><p>Do luma filtering only (no chrominance).
  36704. </p>
  36705. </dd>
  36706. <dt><samp class="option">n/noluma</samp></dt>
  36707. <dd><p>Do chrominance filtering only (no luma).
  36708. </p></dd>
  36709. </dl>
  36710. <p>These options can be appended after the subfilter name, separated by a &rsquo;|&rsquo;.
  36711. </p>
  36712. <p>Available subfilters are:
  36713. </p>
  36714. <dl class="table">
  36715. <dt><samp class="option">hb/hdeblock[|difference[|flatness]]</samp></dt>
  36716. <dd><p>Horizontal deblocking filter
  36717. </p><dl class="table">
  36718. <dt><samp class="option">difference</samp></dt>
  36719. <dd><p>Difference factor where higher values mean more deblocking (default: <code class="code">32</code>).
  36720. </p></dd>
  36721. <dt><samp class="option">flatness</samp></dt>
  36722. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code class="code">39</code>).
  36723. </p></dd>
  36724. </dl>
  36725. </dd>
  36726. <dt><samp class="option">vb/vdeblock[|difference[|flatness]]</samp></dt>
  36727. <dd><p>Vertical deblocking filter
  36728. </p><dl class="table">
  36729. <dt><samp class="option">difference</samp></dt>
  36730. <dd><p>Difference factor where higher values mean more deblocking (default: <code class="code">32</code>).
  36731. </p></dd>
  36732. <dt><samp class="option">flatness</samp></dt>
  36733. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code class="code">39</code>).
  36734. </p></dd>
  36735. </dl>
  36736. </dd>
  36737. <dt><samp class="option">ha/hadeblock[|difference[|flatness]]</samp></dt>
  36738. <dd><p>Accurate horizontal deblocking filter
  36739. </p><dl class="table">
  36740. <dt><samp class="option">difference</samp></dt>
  36741. <dd><p>Difference factor where higher values mean more deblocking (default: <code class="code">32</code>).
  36742. </p></dd>
  36743. <dt><samp class="option">flatness</samp></dt>
  36744. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code class="code">39</code>).
  36745. </p></dd>
  36746. </dl>
  36747. </dd>
  36748. <dt><samp class="option">va/vadeblock[|difference[|flatness]]</samp></dt>
  36749. <dd><p>Accurate vertical deblocking filter
  36750. </p><dl class="table">
  36751. <dt><samp class="option">difference</samp></dt>
  36752. <dd><p>Difference factor where higher values mean more deblocking (default: <code class="code">32</code>).
  36753. </p></dd>
  36754. <dt><samp class="option">flatness</samp></dt>
  36755. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code class="code">39</code>).
  36756. </p></dd>
  36757. </dl>
  36758. </dd>
  36759. </dl>
  36760. <p>The horizontal and vertical deblocking filters share the difference and
  36761. flatness values so you cannot set different horizontal and vertical
  36762. thresholds.
  36763. </p>
  36764. <dl class="table">
  36765. <dt><samp class="option">h1/x1hdeblock</samp></dt>
  36766. <dd><p>Experimental horizontal deblocking filter
  36767. </p>
  36768. </dd>
  36769. <dt><samp class="option">v1/x1vdeblock</samp></dt>
  36770. <dd><p>Experimental vertical deblocking filter
  36771. </p>
  36772. </dd>
  36773. <dt><samp class="option">dr/dering</samp></dt>
  36774. <dd><p>Deringing filter
  36775. </p>
  36776. </dd>
  36777. <dt><samp class="option">tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise reducer</samp></dt>
  36778. <dd><dl class="table">
  36779. <dt><samp class="option">threshold1</samp></dt>
  36780. <dd><p>larger -&gt; stronger filtering
  36781. </p></dd>
  36782. <dt><samp class="option">threshold2</samp></dt>
  36783. <dd><p>larger -&gt; stronger filtering
  36784. </p></dd>
  36785. <dt><samp class="option">threshold3</samp></dt>
  36786. <dd><p>larger -&gt; stronger filtering
  36787. </p></dd>
  36788. </dl>
  36789. </dd>
  36790. <dt><samp class="option">al/autolevels[:f/fullyrange], automatic brightness / contrast correction</samp></dt>
  36791. <dd><dl class="table">
  36792. <dt><samp class="option">f/fullyrange</samp></dt>
  36793. <dd><p>Stretch luma to <code class="code">0-255</code>.
  36794. </p></dd>
  36795. </dl>
  36796. </dd>
  36797. <dt><samp class="option">lb/linblenddeint</samp></dt>
  36798. <dd><p>Linear blend deinterlacing filter that deinterlaces the given block by
  36799. filtering all lines with a <code class="code">(1 2 1)</code> filter.
  36800. </p>
  36801. </dd>
  36802. <dt><samp class="option">li/linipoldeint</samp></dt>
  36803. <dd><p>Linear interpolating deinterlacing filter that deinterlaces the given block by
  36804. linearly interpolating every second line.
  36805. </p>
  36806. </dd>
  36807. <dt><samp class="option">ci/cubicipoldeint</samp></dt>
  36808. <dd><p>Cubic interpolating deinterlacing filter deinterlaces the given block by
  36809. cubically interpolating every second line.
  36810. </p>
  36811. </dd>
  36812. <dt><samp class="option">md/mediandeint</samp></dt>
  36813. <dd><p>Median deinterlacing filter that deinterlaces the given block by applying a
  36814. median filter to every second line.
  36815. </p>
  36816. </dd>
  36817. <dt><samp class="option">fd/ffmpegdeint</samp></dt>
  36818. <dd><p>FFmpeg deinterlacing filter that deinterlaces the given block by filtering every
  36819. second line with a <code class="code">(-1 4 2 4 -1)</code> filter.
  36820. </p>
  36821. </dd>
  36822. <dt><samp class="option">l5/lowpass5</samp></dt>
  36823. <dd><p>Vertically applied FIR lowpass deinterlacing filter that deinterlaces the given
  36824. block by filtering all lines with a <code class="code">(-1 2 6 2 -1)</code> filter.
  36825. </p>
  36826. </dd>
  36827. <dt><samp class="option">fq/forceQuant[|quantizer]</samp></dt>
  36828. <dd><p>Overrides the quantizer table from the input with the constant quantizer you
  36829. specify.
  36830. </p><dl class="table">
  36831. <dt><samp class="option">quantizer</samp></dt>
  36832. <dd><p>Quantizer to use
  36833. </p></dd>
  36834. </dl>
  36835. </dd>
  36836. <dt><samp class="option">de/default</samp></dt>
  36837. <dd><p>Default pp filter combination (<code class="code">hb|a,vb|a,dr|a</code>)
  36838. </p>
  36839. </dd>
  36840. <dt><samp class="option">fa/fast</samp></dt>
  36841. <dd><p>Fast pp filter combination (<code class="code">h1|a,v1|a,dr|a</code>)
  36842. </p>
  36843. </dd>
  36844. <dt><samp class="option">ac</samp></dt>
  36845. <dd><p>High quality pp filter combination (<code class="code">ha|a|128|7,va|a,dr|a</code>)
  36846. </p></dd>
  36847. </dl>
  36848. <ul class="mini-toc">
  36849. <li><a href="#Examples-122" accesskey="1">Examples</a></li>
  36850. </ul>
  36851. <div class="subsection-level-extent" id="Examples-122">
  36852. <h4 class="subsection"><span>32.195.1 Examples<a class="copiable-link" href="#Examples-122"> &para;</a></span></h4>
  36853. <ul class="itemize mark-bullet">
  36854. <li>Apply horizontal and vertical deblocking, deringing and automatic
  36855. brightness/contrast:
  36856. <div class="example">
  36857. <pre class="example-preformatted">pp=hb/vb/dr/al
  36858. </pre></div>
  36859. </li><li>Apply default filters without brightness/contrast correction:
  36860. <div class="example">
  36861. <pre class="example-preformatted">pp=de/-al
  36862. </pre></div>
  36863. </li><li>Apply default filters and temporal denoiser:
  36864. <div class="example">
  36865. <pre class="example-preformatted">pp=default/tmpnoise|1|2|3
  36866. </pre></div>
  36867. </li><li>Apply deblocking on luma only, and switch vertical deblocking on or off
  36868. automatically depending on available CPU time:
  36869. <div class="example">
  36870. <pre class="example-preformatted">pp=hb|y/vb|a
  36871. </pre></div>
  36872. </li></ul>
  36873. </div>
  36874. </div>
  36875. <div class="section-level-extent" id="pp7">
  36876. <h3 class="section"><span>32.196 pp7<a class="copiable-link" href="#pp7"> &para;</a></span></h3>
  36877. <p>Apply Postprocessing filter 7. It is variant of the <a class="ref" href="#spp">spp</a> filter,
  36878. similar to spp = 6 with 7 point DCT, where only the center sample is
  36879. used after IDCT.
  36880. </p>
  36881. <p>The filter accepts the following options:
  36882. </p>
  36883. <dl class="table">
  36884. <dt><samp class="option">qp</samp></dt>
  36885. <dd><p>Force a constant quantization parameter. It accepts an integer in range
  36886. 0 to 63. If not set, the filter will use the QP from the video stream
  36887. (if available).
  36888. </p>
  36889. </dd>
  36890. <dt><samp class="option">mode</samp></dt>
  36891. <dd><p>Set thresholding mode. Available modes are:
  36892. </p>
  36893. <dl class="table">
  36894. <dt>&lsquo;<samp class="samp">hard</samp>&rsquo;</dt>
  36895. <dd><p>Set hard thresholding.
  36896. </p></dd>
  36897. <dt>&lsquo;<samp class="samp">soft</samp>&rsquo;</dt>
  36898. <dd><p>Set soft thresholding (better de-ringing effect, but likely blurrier).
  36899. </p></dd>
  36900. <dt>&lsquo;<samp class="samp">medium</samp>&rsquo;</dt>
  36901. <dd><p>Set medium thresholding (good results, default).
  36902. </p></dd>
  36903. </dl>
  36904. </dd>
  36905. </dl>
  36906. </div>
  36907. <div class="section-level-extent" id="premultiply">
  36908. <h3 class="section"><span>32.197 premultiply<a class="copiable-link" href="#premultiply"> &para;</a></span></h3>
  36909. <p>Apply alpha premultiply effect to input video stream using first plane
  36910. of second stream as alpha.
  36911. </p>
  36912. <p>Both streams must have same dimensions and same pixel format.
  36913. </p>
  36914. <p>The filter accepts the following option:
  36915. </p>
  36916. <dl class="table">
  36917. <dt><samp class="option">planes</samp></dt>
  36918. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  36919. By default value 0xf, all planes will be processed.
  36920. </p>
  36921. </dd>
  36922. <dt><samp class="option">inplace</samp></dt>
  36923. <dd><p>Do not require 2nd input for processing, instead use alpha plane from input stream.
  36924. </p></dd>
  36925. </dl>
  36926. </div>
  36927. <div class="section-level-extent" id="prewitt">
  36928. <h3 class="section"><span>32.198 prewitt<a class="copiable-link" href="#prewitt"> &para;</a></span></h3>
  36929. <p>Apply prewitt operator to input video stream.
  36930. </p>
  36931. <p>The filter accepts the following option:
  36932. </p>
  36933. <dl class="table">
  36934. <dt><samp class="option">planes</samp></dt>
  36935. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  36936. By default value 0xf, all planes will be processed.
  36937. </p>
  36938. </dd>
  36939. <dt><samp class="option">scale</samp></dt>
  36940. <dd><p>Set value which will be multiplied with filtered result.
  36941. </p>
  36942. </dd>
  36943. <dt><samp class="option">delta</samp></dt>
  36944. <dd><p>Set value which will be added to filtered result.
  36945. </p></dd>
  36946. </dl>
  36947. <ul class="mini-toc">
  36948. <li><a href="#Commands-132" accesskey="1">Commands</a></li>
  36949. </ul>
  36950. <div class="subsection-level-extent" id="Commands-132">
  36951. <h4 class="subsection"><span>32.198.1 Commands<a class="copiable-link" href="#Commands-132"> &para;</a></span></h4>
  36952. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  36953. </p>
  36954. </div>
  36955. </div>
  36956. <div class="section-level-extent" id="pseudocolor">
  36957. <h3 class="section"><span>32.199 pseudocolor<a class="copiable-link" href="#pseudocolor"> &para;</a></span></h3>
  36958. <p>Alter frame colors in video with pseudocolors.
  36959. </p>
  36960. <p>This filter accepts the following options:
  36961. </p>
  36962. <dl class="table">
  36963. <dt><samp class="option">c0</samp></dt>
  36964. <dd><p>set pixel first component expression
  36965. </p>
  36966. </dd>
  36967. <dt><samp class="option">c1</samp></dt>
  36968. <dd><p>set pixel second component expression
  36969. </p>
  36970. </dd>
  36971. <dt><samp class="option">c2</samp></dt>
  36972. <dd><p>set pixel third component expression
  36973. </p>
  36974. </dd>
  36975. <dt><samp class="option">c3</samp></dt>
  36976. <dd><p>set pixel fourth component expression, corresponds to the alpha component
  36977. </p>
  36978. </dd>
  36979. <dt><samp class="option">index, i</samp></dt>
  36980. <dd><p>set component to use as base for altering colors
  36981. </p>
  36982. </dd>
  36983. <dt><samp class="option">preset, p</samp></dt>
  36984. <dd><p>Pick one of built-in LUTs. By default is set to none.
  36985. </p>
  36986. <p>Available LUTs:
  36987. </p><dl class="table">
  36988. <dt>&lsquo;<samp class="samp">magma</samp>&rsquo;</dt>
  36989. <dt>&lsquo;<samp class="samp">inferno</samp>&rsquo;</dt>
  36990. <dt>&lsquo;<samp class="samp">plasma</samp>&rsquo;</dt>
  36991. <dt>&lsquo;<samp class="samp">viridis</samp>&rsquo;</dt>
  36992. <dt>&lsquo;<samp class="samp">turbo</samp>&rsquo;</dt>
  36993. <dt>&lsquo;<samp class="samp">cividis</samp>&rsquo;</dt>
  36994. <dt>&lsquo;<samp class="samp">range1</samp>&rsquo;</dt>
  36995. <dt>&lsquo;<samp class="samp">range2</samp>&rsquo;</dt>
  36996. <dt>&lsquo;<samp class="samp">shadows</samp>&rsquo;</dt>
  36997. <dt>&lsquo;<samp class="samp">highlights</samp>&rsquo;</dt>
  36998. <dt>&lsquo;<samp class="samp">solar</samp>&rsquo;</dt>
  36999. <dt>&lsquo;<samp class="samp">nominal</samp>&rsquo;</dt>
  37000. <dt>&lsquo;<samp class="samp">preferred</samp>&rsquo;</dt>
  37001. <dt>&lsquo;<samp class="samp">total</samp>&rsquo;</dt>
  37002. <dt>&lsquo;<samp class="samp">spectral</samp>&rsquo;</dt>
  37003. <dt>&lsquo;<samp class="samp">cool</samp>&rsquo;</dt>
  37004. <dt>&lsquo;<samp class="samp">heat</samp>&rsquo;</dt>
  37005. <dt>&lsquo;<samp class="samp">fiery</samp>&rsquo;</dt>
  37006. <dt>&lsquo;<samp class="samp">blues</samp>&rsquo;</dt>
  37007. <dt>&lsquo;<samp class="samp">green</samp>&rsquo;</dt>
  37008. <dt>&lsquo;<samp class="samp">helix</samp>&rsquo;</dt>
  37009. </dl>
  37010. </dd>
  37011. <dt><samp class="option">opacity</samp></dt>
  37012. <dd><p>Set opacity of output colors. Allowed range is from 0 to 1.
  37013. Default value is set to 1.
  37014. </p></dd>
  37015. </dl>
  37016. <p>Each of the expression options specifies the expression to use for computing
  37017. the lookup table for the corresponding pixel component values.
  37018. </p>
  37019. <p>The expressions can contain the following constants and functions:
  37020. </p>
  37021. <dl class="table">
  37022. <dt><samp class="option">w</samp></dt>
  37023. <dt><samp class="option">h</samp></dt>
  37024. <dd><p>The input width and height.
  37025. </p>
  37026. </dd>
  37027. <dt><samp class="option">val</samp></dt>
  37028. <dd><p>The input value for the pixel component.
  37029. </p>
  37030. </dd>
  37031. <dt><samp class="option">ymin, umin, vmin, amin</samp></dt>
  37032. <dd><p>The minimum allowed component value.
  37033. </p>
  37034. </dd>
  37035. <dt><samp class="option">ymax, umax, vmax, amax</samp></dt>
  37036. <dd><p>The maximum allowed component value.
  37037. </p></dd>
  37038. </dl>
  37039. <p>All expressions default to &quot;val&quot;.
  37040. </p>
  37041. <ul class="mini-toc">
  37042. <li><a href="#Commands-133" accesskey="1">Commands</a></li>
  37043. <li><a href="#Examples-123" accesskey="2">Examples</a></li>
  37044. </ul>
  37045. <div class="subsection-level-extent" id="Commands-133">
  37046. <h4 class="subsection"><span>32.199.1 Commands<a class="copiable-link" href="#Commands-133"> &para;</a></span></h4>
  37047. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  37048. </p>
  37049. </div>
  37050. <div class="subsection-level-extent" id="Examples-123">
  37051. <h4 class="subsection"><span>32.199.2 Examples<a class="copiable-link" href="#Examples-123"> &para;</a></span></h4>
  37052. <ul class="itemize mark-bullet">
  37053. <li>Change too high luma values to gradient:
  37054. <div class="example">
  37055. <pre class="example-preformatted">pseudocolor=&quot;'if(between(val,ymax,amax),lerp(ymin,ymax,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(umax,umin,(val-ymax)/(amax-ymax)),-1):if(between(val,ymax,amax),lerp(vmin,vmax,(val-ymax)/(amax-ymax)),-1):-1'&quot;
  37056. </pre></div>
  37057. </li></ul>
  37058. </div>
  37059. </div>
  37060. <div class="section-level-extent" id="psnr">
  37061. <h3 class="section"><span>32.200 psnr<a class="copiable-link" href="#psnr"> &para;</a></span></h3>
  37062. <p>Obtain the average, maximum and minimum PSNR (Peak Signal to Noise
  37063. Ratio) between two input videos.
  37064. </p>
  37065. <p>This filter takes in input two input videos, the first input is
  37066. considered the &quot;main&quot; source and is passed unchanged to the
  37067. output. The second input is used as a &quot;reference&quot; video for computing
  37068. the PSNR.
  37069. </p>
  37070. <p>Both video inputs must have the same resolution and pixel format for
  37071. this filter to work correctly. Also it assumes that both inputs
  37072. have the same number of frames, which are compared one by one.
  37073. </p>
  37074. <p>The obtained average PSNR is printed through the logging system.
  37075. </p>
  37076. <p>The filter stores the accumulated MSE (mean squared error) of each
  37077. frame, and at the end of the processing it is averaged across all frames
  37078. equally, and the following formula is applied to obtain the PSNR:
  37079. </p>
  37080. <div class="example">
  37081. <pre class="example-preformatted">PSNR = 10*log10(MAX^2/MSE)
  37082. </pre></div>
  37083. <p>Where MAX is the average of the maximum values of each component of the
  37084. image.
  37085. </p>
  37086. <p>The description of the accepted parameters follows.
  37087. </p>
  37088. <dl class="table">
  37089. <dt><samp class="option">stats_file, f</samp></dt>
  37090. <dd><p>If specified the filter will use the named file to save the PSNR of
  37091. each individual frame. When filename equals &quot;-&quot; the data is sent to
  37092. standard output.
  37093. </p>
  37094. </dd>
  37095. <dt><samp class="option">stats_version</samp></dt>
  37096. <dd><p>Specifies which version of the stats file format to use. Details of
  37097. each format are written below.
  37098. Default value is 1.
  37099. </p>
  37100. </dd>
  37101. <dt><samp class="option">stats_add_max</samp></dt>
  37102. <dd><p>Determines whether the max value is output to the stats log.
  37103. Default value is 0.
  37104. Requires stats_version &gt;= 2. If this is set and stats_version &lt; 2,
  37105. the filter will return an error.
  37106. </p></dd>
  37107. </dl>
  37108. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  37109. </p>
  37110. <p>The file printed if <var class="var">stats_file</var> is selected, contains a sequence of
  37111. key/value pairs of the form <var class="var">key</var>:<var class="var">value</var> for each compared
  37112. couple of frames.
  37113. </p>
  37114. <p>If a <var class="var">stats_version</var> greater than 1 is specified, a header line precedes
  37115. the list of per-frame-pair stats, with key value pairs following the frame
  37116. format with the following parameters:
  37117. </p>
  37118. <dl class="table">
  37119. <dt><samp class="option">psnr_log_version</samp></dt>
  37120. <dd><p>The version of the log file format. Will match <var class="var">stats_version</var>.
  37121. </p>
  37122. </dd>
  37123. <dt><samp class="option">fields</samp></dt>
  37124. <dd><p>A comma separated list of the per-frame-pair parameters included in
  37125. the log.
  37126. </p></dd>
  37127. </dl>
  37128. <p>A description of each shown per-frame-pair parameter follows:
  37129. </p>
  37130. <dl class="table">
  37131. <dt><samp class="option">n</samp></dt>
  37132. <dd><p>sequential number of the input frame, starting from 1
  37133. </p>
  37134. </dd>
  37135. <dt><samp class="option">mse_avg</samp></dt>
  37136. <dd><p>Mean Square Error pixel-by-pixel average difference of the compared
  37137. frames, averaged over all the image components.
  37138. </p>
  37139. </dd>
  37140. <dt><samp class="option">mse_y, mse_u, mse_v, mse_r, mse_g, mse_b, mse_a</samp></dt>
  37141. <dd><p>Mean Square Error pixel-by-pixel average difference of the compared
  37142. frames for the component specified by the suffix.
  37143. </p>
  37144. </dd>
  37145. <dt><samp class="option">psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a</samp></dt>
  37146. <dd><p>Peak Signal to Noise ratio of the compared frames for the component
  37147. specified by the suffix.
  37148. </p>
  37149. </dd>
  37150. <dt><samp class="option">max_avg, max_y, max_u, max_v</samp></dt>
  37151. <dd><p>Maximum allowed value for each channel, and average over all
  37152. channels.
  37153. </p></dd>
  37154. </dl>
  37155. <ul class="mini-toc">
  37156. <li><a href="#Examples-124" accesskey="1">Examples</a></li>
  37157. </ul>
  37158. <div class="subsection-level-extent" id="Examples-124">
  37159. <h4 class="subsection"><span>32.200.1 Examples<a class="copiable-link" href="#Examples-124"> &para;</a></span></h4>
  37160. <ul class="itemize mark-bullet">
  37161. <li>For example:
  37162. <div class="example">
  37163. <pre class="example-preformatted">movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
  37164. [main][ref] psnr=&quot;stats_file=stats.log&quot; [out]
  37165. </pre></div>
  37166. <p>On this example the input file being processed is compared with the
  37167. reference file <samp class="file">ref_movie.mpg</samp>. The PSNR of each individual frame
  37168. is stored in <samp class="file">stats.log</samp>.
  37169. </p>
  37170. </li><li>Another example with different containers:
  37171. <div class="example">
  37172. <pre class="example-preformatted">ffmpeg -i main.mpg -i ref.mkv -lavfi &quot;[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]psnr&quot; -f null -
  37173. </pre></div>
  37174. </li></ul>
  37175. <a class="anchor" id="pullup"></a></div>
  37176. </div>
  37177. <div class="section-level-extent" id="pullup-1">
  37178. <h3 class="section"><span>32.201 pullup<a class="copiable-link" href="#pullup-1"> &para;</a></span></h3>
  37179. <p>Pulldown reversal (inverse telecine) filter, capable of handling mixed
  37180. hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps progressive
  37181. content.
  37182. </p>
  37183. <p>The pullup filter is designed to take advantage of future context in making
  37184. its decisions. This filter is stateless in the sense that it does not lock
  37185. onto a pattern to follow, but it instead looks forward to the following
  37186. fields in order to identify matches and rebuild progressive frames.
  37187. </p>
  37188. <p>To produce content with an even framerate, insert the fps filter after
  37189. pullup, use <code class="code">fps=24000/1001</code> if the input frame rate is 29.97fps,
  37190. <code class="code">fps=24</code> for 30fps and the (rare) telecined 25fps input.
  37191. </p>
  37192. <p>The filter accepts the following options:
  37193. </p>
  37194. <dl class="table">
  37195. <dt><samp class="option">jl</samp></dt>
  37196. <dt><samp class="option">jr</samp></dt>
  37197. <dt><samp class="option">jt</samp></dt>
  37198. <dt><samp class="option">jb</samp></dt>
  37199. <dd><p>These options set the amount of &quot;junk&quot; to ignore at the left, right, top, and
  37200. bottom of the image, respectively. Left and right are in units of 8 pixels,
  37201. while top and bottom are in units of 2 lines.
  37202. The default is 8 pixels on each side.
  37203. </p>
  37204. </dd>
  37205. <dt><samp class="option">sb</samp></dt>
  37206. <dd><p>Set the strict breaks. Setting this option to 1 will reduce the chances of
  37207. filter generating an occasional mismatched frame, but it may also cause an
  37208. excessive number of frames to be dropped during high motion sequences.
  37209. Conversely, setting it to -1 will make filter match fields more easily.
  37210. This may help processing of video where there is slight blurring between
  37211. the fields, but may also cause there to be interlaced frames in the output.
  37212. Default value is <code class="code">0</code>.
  37213. </p>
  37214. </dd>
  37215. <dt><samp class="option">mp</samp></dt>
  37216. <dd><p>Set the metric plane to use. It accepts the following values:
  37217. </p><dl class="table">
  37218. <dt>&lsquo;<samp class="samp">l</samp>&rsquo;</dt>
  37219. <dd><p>Use luma plane.
  37220. </p>
  37221. </dd>
  37222. <dt>&lsquo;<samp class="samp">u</samp>&rsquo;</dt>
  37223. <dd><p>Use chroma blue plane.
  37224. </p>
  37225. </dd>
  37226. <dt>&lsquo;<samp class="samp">v</samp>&rsquo;</dt>
  37227. <dd><p>Use chroma red plane.
  37228. </p></dd>
  37229. </dl>
  37230. <p>This option may be set to use chroma plane instead of the default luma plane
  37231. for doing filter&rsquo;s computations. This may improve accuracy on very clean
  37232. source material, but more likely will decrease accuracy, especially if there
  37233. is chroma noise (rainbow effect) or any grayscale video.
  37234. The main purpose of setting <samp class="option">mp</samp> to a chroma plane is to reduce CPU
  37235. load and make pullup usable in realtime on slow machines.
  37236. </p></dd>
  37237. </dl>
  37238. <p>For best results (without duplicated frames in the output file) it is
  37239. necessary to change the output frame rate. For example, to inverse
  37240. telecine NTSC input:
  37241. </p><div class="example">
  37242. <pre class="example-preformatted">ffmpeg -i input -vf pullup -r 24000/1001 ...
  37243. </pre></div>
  37244. </div>
  37245. <div class="section-level-extent" id="qp">
  37246. <h3 class="section"><span>32.202 qp<a class="copiable-link" href="#qp"> &para;</a></span></h3>
  37247. <p>Change video quantization parameters (QP).
  37248. </p>
  37249. <p>The filter accepts the following option:
  37250. </p>
  37251. <dl class="table">
  37252. <dt><samp class="option">qp</samp></dt>
  37253. <dd><p>Set expression for quantization parameter.
  37254. </p></dd>
  37255. </dl>
  37256. <p>The expression is evaluated through the eval API and can contain, among others,
  37257. the following constants:
  37258. </p>
  37259. <dl class="table">
  37260. <dt><var class="var">known</var></dt>
  37261. <dd><p>1 if index is not 129, 0 otherwise.
  37262. </p>
  37263. </dd>
  37264. <dt><var class="var">qp</var></dt>
  37265. <dd><p>Sequential index starting from -129 to 128.
  37266. </p></dd>
  37267. </dl>
  37268. <ul class="mini-toc">
  37269. <li><a href="#Examples-125" accesskey="1">Examples</a></li>
  37270. </ul>
  37271. <div class="subsection-level-extent" id="Examples-125">
  37272. <h4 class="subsection"><span>32.202.1 Examples<a class="copiable-link" href="#Examples-125"> &para;</a></span></h4>
  37273. <ul class="itemize mark-bullet">
  37274. <li>Some equation like:
  37275. <div class="example">
  37276. <pre class="example-preformatted">qp=2+2*sin(PI*qp)
  37277. </pre></div>
  37278. </li></ul>
  37279. </div>
  37280. </div>
  37281. <div class="section-level-extent" id="qrencode">
  37282. <h3 class="section"><span>32.203 qrencode<a class="copiable-link" href="#qrencode"> &para;</a></span></h3>
  37283. <p>Generate a QR code using the libqrencode library (see
  37284. <a class="url" href="https://fukuchi.org/works/qrencode/">https://fukuchi.org/works/qrencode/</a>), and overlay it on top of the current
  37285. frame.
  37286. </p>
  37287. <p>To enable the compilation of this filter, you need to configure FFmpeg with
  37288. <code class="code">--enable-libqrencode</code>.
  37289. </p>
  37290. <p>The QR code is generated from the provided text or text pattern. The
  37291. corresponding QR code is scaled and overlayed into the video output according to
  37292. the specified options.
  37293. </p>
  37294. <p>In case no text is specified, no QR code is overlaied.
  37295. </p>
  37296. <p>This filter accepts the following options:
  37297. </p>
  37298. <dl class="table">
  37299. <dt><samp class="option">qrcode_width, q</samp></dt>
  37300. <dt><samp class="option">padded_qrcode_width, Q</samp></dt>
  37301. <dd><p>Specify an expression for the width of the rendered QR code, with and without
  37302. padding. The <var class="var">qrcode_width</var> expression can reference the value set by the
  37303. <var class="var">padded_qrcode_width</var> expression, and vice versa.
  37304. By default <var class="var">padded_qrcode_width</var> is set to <var class="var">qrcode_width</var>, meaning that
  37305. there is no padding.
  37306. </p>
  37307. <p>These expressions are evaluated for each new frame.
  37308. </p>
  37309. <p>See the <a class="ref" href="#qrencode_005fexpressions">qrencode Expressions</a> section for details.
  37310. </p>
  37311. </dd>
  37312. <dt><samp class="option">x</samp></dt>
  37313. <dt><samp class="option">y</samp></dt>
  37314. <dd><p>Specify an expression for positioning the padded QR code top-left corner. The
  37315. <var class="var">x</var> expression can reference the value set by the <var class="var">y</var> expression, and
  37316. vice.
  37317. </p>
  37318. <p>By default <var class="var">x</var> and <var class="var">y</var> are set set to <var class="var">0</var>, meaning that the QR code
  37319. is placed in the top left corner of the input.
  37320. </p>
  37321. <p>These expressions are evaluated for each new frame.
  37322. </p>
  37323. <p>See the <a class="ref" href="#qrencode_005fexpressions">qrencode Expressions</a> section for details.
  37324. </p>
  37325. </dd>
  37326. <dt><samp class="option">case_sensitive, cs</samp></dt>
  37327. <dd><p>Instruct libqrencode to use case sensitive encoding. This is enabled by
  37328. default. This can be disabled to reduce the QR encoding size.
  37329. </p>
  37330. </dd>
  37331. <dt><samp class="option">level, l</samp></dt>
  37332. <dd><p>Specify the QR encoding error correction level. With an higher correction level,
  37333. the encoding size will increase but the code will be more robust to corruption.
  37334. Lower level is <var class="var">L</var>.
  37335. </p>
  37336. <p>It accepts the following values:
  37337. </p><dl class="table">
  37338. <dt>&lsquo;<samp class="samp">L</samp>&rsquo;</dt>
  37339. <dt>&lsquo;<samp class="samp">M</samp>&rsquo;</dt>
  37340. <dt>&lsquo;<samp class="samp">Q</samp>&rsquo;</dt>
  37341. <dt>&lsquo;<samp class="samp">H</samp>&rsquo;</dt>
  37342. </dl>
  37343. </dd>
  37344. <dt><samp class="option">expansion</samp></dt>
  37345. <dd><p>Select how the input text is expanded. Can be either <code class="code">none</code>, or
  37346. <code class="code">normal</code> (default). See the <a class="ref" href="#qrencode_005ftext_005fexpansion">qrencode Text expansion</a>
  37347. section below for details.
  37348. </p>
  37349. </dd>
  37350. <dt><samp class="option">text</samp></dt>
  37351. <dt><samp class="option">textfile</samp></dt>
  37352. <dd><p>Define the text to be rendered. In case neither is specified, no QR is encoded
  37353. (just an empty colored frame).
  37354. </p>
  37355. <p>In case expansion is enabled, the text is treated as a text template, using the
  37356. qrencode expansion mechanism. See the <a class="ref" href="#qrencode_005ftext_005fexpansion">qrencode
  37357. Text expansion</a> section below for details.
  37358. </p>
  37359. </dd>
  37360. <dt><samp class="option">background_color, bc</samp></dt>
  37361. <dt><samp class="option">foreground_color, fc</samp></dt>
  37362. <dd><p>Set the QR code and background color. The default value of
  37363. <var class="var">foreground_color</var> is &quot;black&quot;, the default value of <var class="var">background_color</var>
  37364. is &quot;white&quot;.
  37365. </p>
  37366. <p>For the syntax of the color options, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot;
  37367. section in the ffmpeg-utils manual</a>.
  37368. </p></dd>
  37369. </dl>
  37370. <a class="anchor" id="qrencode_005fexpressions"></a><ul class="mini-toc">
  37371. <li><a href="#qrencode-Expressions" accesskey="1">qrencode Expressions</a></li>
  37372. <li><a href="#qrencode-Text-expansion" accesskey="2">qrencode Text expansion</a></li>
  37373. <li><a href="#Examples-126" accesskey="3">Examples</a></li>
  37374. </ul>
  37375. <div class="subsection-level-extent" id="qrencode-Expressions">
  37376. <h4 class="subsection"><span>32.203.1 qrencode Expressions<a class="copiable-link" href="#qrencode-Expressions"> &para;</a></span></h4>
  37377. <p>The expressions set by the options contain the following constants and functions.
  37378. </p>
  37379. <dl class="table">
  37380. <dt><samp class="option">dar</samp></dt>
  37381. <dd><p>input display aspect ratio, it is the same as (<var class="var">w</var> / <var class="var">h</var>) * <var class="var">sar</var>
  37382. </p>
  37383. </dd>
  37384. <dt><samp class="option">duration</samp></dt>
  37385. <dd><p>the current frame&rsquo;s duration, in seconds
  37386. </p>
  37387. </dd>
  37388. <dt><samp class="option">hsub</samp></dt>
  37389. <dt><samp class="option">vsub</samp></dt>
  37390. <dd><p>horizontal and vertical chroma subsample values. For example for the
  37391. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  37392. </p>
  37393. </dd>
  37394. <dt><samp class="option">main_h, H</samp></dt>
  37395. <dd><p>the input height
  37396. </p>
  37397. </dd>
  37398. <dt><samp class="option">main_w, W</samp></dt>
  37399. <dd><p>the input width
  37400. </p>
  37401. </dd>
  37402. <dt><samp class="option">n</samp></dt>
  37403. <dd><p>the number of input frame, starting from 0
  37404. </p>
  37405. </dd>
  37406. <dt><samp class="option">pict_type</samp></dt>
  37407. <dd><p>a number representing the picture type
  37408. </p>
  37409. </dd>
  37410. <dt><samp class="option">qr_w, w</samp></dt>
  37411. <dd><p>the width of the encoded QR code
  37412. </p>
  37413. </dd>
  37414. <dt><samp class="option">rendered_qr_w, q</samp></dt>
  37415. <dt><samp class="option">rendered_padded_qr_w, Q</samp></dt>
  37416. <dd><p>the width of the rendered QR code, without and without padding.
  37417. </p>
  37418. <p>These parameters allow the <var class="var">q</var> and <var class="var">Q</var> expressions to refer to each
  37419. other, so you can for example specify <code class="code">q=3/4*Q</code>.
  37420. </p>
  37421. </dd>
  37422. <dt><samp class="option">rand(min, max)</samp></dt>
  37423. <dd><p>return a random number included between <var class="var">min</var> and <var class="var">max</var>
  37424. </p>
  37425. </dd>
  37426. <dt><samp class="option">sar</samp></dt>
  37427. <dd><p>the input sample aspect ratio
  37428. </p>
  37429. </dd>
  37430. <dt><samp class="option">t</samp></dt>
  37431. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  37432. </p>
  37433. </dd>
  37434. <dt><samp class="option">x</samp></dt>
  37435. <dt><samp class="option">y</samp></dt>
  37436. <dd><p>the x and y offset coordinates where the text is drawn.
  37437. </p>
  37438. <p>These parameters allow the <var class="var">x</var> and <var class="var">y</var> expressions to refer to each
  37439. other, so you can for example specify <code class="code">y=x/dar</code>.
  37440. </p></dd>
  37441. </dl>
  37442. <a class="anchor" id="qrencode_005ftext_005fexpansion"></a></div>
  37443. <div class="subsection-level-extent" id="qrencode-Text-expansion">
  37444. <h4 class="subsection"><span>32.203.2 qrencode Text expansion<a class="copiable-link" href="#qrencode-Text-expansion"> &para;</a></span></h4>
  37445. <p>If <samp class="option">expansion</samp> is set to <code class="code">none</code>, the text is printed verbatim.
  37446. </p>
  37447. <p>If <samp class="option">expansion</samp> is set to <code class="code">normal</code> (which is the default),
  37448. the following expansion mechanism is used.
  37449. </p>
  37450. <p>The backslash character &lsquo;<samp class="samp">\</samp>&rsquo;, followed by any character, always expands to
  37451. the second character.
  37452. </p>
  37453. <p>Sequences of the form <code class="code">%{...}</code> are expanded. The text between the
  37454. braces is a function name, possibly followed by arguments separated by &rsquo;:&rsquo;.
  37455. If the arguments contain special characters or delimiters (&rsquo;:&rsquo; or &rsquo;}&rsquo;),
  37456. they should be escaped.
  37457. </p>
  37458. <p>Note that they probably must also be escaped as the value for the <samp class="option">text</samp>
  37459. option in the filter argument string and as the filter argument in the
  37460. filtergraph description, and possibly also for the shell, that makes up to four
  37461. levels of escaping; using a text file with the <samp class="option">textfile</samp> option avoids
  37462. these problems.
  37463. </p>
  37464. <p>The following functions are available:
  37465. </p>
  37466. <dl class="table">
  37467. <dt><code class="command">n, frame_num</code></dt>
  37468. <dd><p>return the frame number
  37469. </p>
  37470. </dd>
  37471. <dt><code class="command">pts</code></dt>
  37472. <dd><p>Return the presentation timestamp of the current frame.
  37473. </p>
  37474. <p>It can take up to two arguments.
  37475. </p>
  37476. <p>The first argument is the format of the timestamp; it defaults to <code class="code">flt</code> for
  37477. seconds as a decimal number with microsecond accuracy; <code class="code">hms</code> stands for a
  37478. formatted <var class="var">[-]HH:MM:SS.mmm</var> timestamp with millisecond accuracy.
  37479. <code class="code">gmtime</code> stands for the timestamp of the frame formatted as UTC time;
  37480. <code class="code">localtime</code> stands for the timestamp of the frame formatted as local time
  37481. zone time. If the format is set to <code class="code">hms24hh</code>, the time is formatted in 24h
  37482. format (00-23).
  37483. </p>
  37484. <p>The second argument is an offset added to the timestamp.
  37485. </p>
  37486. <p>If the format is set to <code class="code">localtime</code> or <code class="code">gmtime</code>, a third argument may
  37487. be supplied: a <code class="code">strftime</code> C function format string. By default,
  37488. <var class="var">YYYY-MM-DD HH:MM:SS</var> format will be used.
  37489. </p>
  37490. </dd>
  37491. <dt><code class="command">expr, e</code></dt>
  37492. <dd><p>Evaluate the expression&rsquo;s value and output as a double.
  37493. </p>
  37494. <p>It must take one argument specifying the expression to be evaluated, accepting
  37495. the constants and functions defined in <a class="ref" href="#qrencode_005fexpressions">qrencode_expressions</a>.
  37496. </p>
  37497. </dd>
  37498. <dt><code class="command">expr_formatted, ef</code></dt>
  37499. <dd><p>Evaluate the expression&rsquo;s value and output as a formatted string.
  37500. </p>
  37501. <p>The first argument is the expression to be evaluated, just as for the <var class="var">expr</var> function.
  37502. The second argument specifies the output format. Allowed values are &lsquo;<samp class="samp">x</samp>&rsquo;,
  37503. &lsquo;<samp class="samp">X</samp>&rsquo;, &lsquo;<samp class="samp">d</samp>&rsquo; and &lsquo;<samp class="samp">u</samp>&rsquo;. They are treated exactly as in the
  37504. <code class="code">printf</code> function.
  37505. The third parameter is optional and sets the number of positions taken by the output.
  37506. It can be used to add padding with zeros from the left.
  37507. </p>
  37508. </dd>
  37509. <dt><code class="command">gmtime</code></dt>
  37510. <dd><p>The time at which the filter is running, expressed in UTC.
  37511. It can accept an argument: a <code class="code">strftime</code> C function format string.
  37512. The format string is extended to support the variable <var class="var">%[1-6]N</var>
  37513. which prints fractions of the second with optionally specified number of digits.
  37514. </p>
  37515. </dd>
  37516. <dt><code class="command">localtime</code></dt>
  37517. <dd><p>The time at which the filter is running, expressed in the local time zone.
  37518. It can accept an argument: a <code class="code">strftime</code> C function format string.
  37519. The format string is extended to support the variable <var class="var">%[1-6]N</var>
  37520. which prints fractions of the second with optionally specified number of digits.
  37521. </p>
  37522. </dd>
  37523. <dt><code class="command">metadata</code></dt>
  37524. <dd><p>Frame metadata. Takes one or two arguments.
  37525. </p>
  37526. <p>The first argument is mandatory and specifies the metadata key.
  37527. </p>
  37528. <p>The second argument is optional and specifies a default value, used when the
  37529. metadata key is not found or empty.
  37530. </p>
  37531. <p>Available metadata can be identified by inspecting entries starting with TAG
  37532. included within each frame section printed by running <code class="code">ffprobe
  37533. -show_frames</code>.
  37534. </p>
  37535. <p>String metadata generated in filters leading to the qrencode filter are also
  37536. available.
  37537. </p>
  37538. </dd>
  37539. <dt><code class="command">rand(min, max)</code></dt>
  37540. <dd><p>return a random number included between <var class="var">min</var> and <var class="var">max</var>
  37541. </p></dd>
  37542. </dl>
  37543. </div>
  37544. <div class="subsection-level-extent" id="Examples-126">
  37545. <h4 class="subsection"><span>32.203.3 Examples<a class="copiable-link" href="#Examples-126"> &para;</a></span></h4>
  37546. <ul class="itemize mark-bullet">
  37547. <li>Generate a QR code encoding the specified text with the default size, overalaid
  37548. in the top left corner of the input video, with the default size:
  37549. <div class="example">
  37550. <pre class="example-preformatted">qrencode=text=www.ffmpeg.org
  37551. </pre></div>
  37552. </li><li>Same as below, but select blue on pink colors:
  37553. <div class="example">
  37554. <pre class="example-preformatted">qrencode=text=www.ffmpeg.org:bc=pink@0.5:fc=blue
  37555. </pre></div>
  37556. </li><li>Place the QR code in the bottom right corner of the input video:
  37557. <div class="example">
  37558. <pre class="example-preformatted">qrencode=text=www.ffmpeg.org:x=W-Q:y=H-Q
  37559. </pre></div>
  37560. </li><li>Generate a QR code with width of 200 pixels and padding, making the padded width
  37561. 4/3 of the QR code width:
  37562. <div class="example">
  37563. <pre class="example-preformatted">qrencode=text=www.ffmpeg.org:q=200:Q=4/3*q
  37564. </pre></div>
  37565. </li><li>Generate a QR code with padded width of 200 pixels and padding, making the QR
  37566. code width 3/4 of the padded width:
  37567. <div class="example">
  37568. <pre class="example-preformatted">qrencode=text=www.ffmpeg.org:Q=200:q=3/4*Q
  37569. </pre></div>
  37570. </li><li>Make the QR code a fraction of the input video width:
  37571. <div class="example">
  37572. <pre class="example-preformatted">qrencode=text=www.ffmpeg.org:q=W/5
  37573. </pre></div>
  37574. </li><li>Generate a QR code encoding the frame number:
  37575. <div class="example">
  37576. <pre class="example-preformatted">qrencode=text=%{n}
  37577. </pre></div>
  37578. </li><li>Generate a QR code encoding the GMT timestamp:
  37579. <div class="example">
  37580. <pre class="example-preformatted">qrencode=text=%{gmtime}
  37581. </pre></div>
  37582. </li><li>Generate a QR code encoding the timestamp expressed as a float:
  37583. <div class="example">
  37584. <pre class="example-preformatted">qrencode=text=%{pts}
  37585. </pre></div>
  37586. </li></ul>
  37587. </div>
  37588. </div>
  37589. <div class="section-level-extent" id="quirc">
  37590. <h3 class="section"><span>32.204 quirc<a class="copiable-link" href="#quirc"> &para;</a></span></h3>
  37591. <p>Identify and decode a QR code using the libquirc library (see
  37592. <a class="url" href="https://github.com/dlbeer/quirc/">https://github.com/dlbeer/quirc/</a>), and print the identified QR codes
  37593. positions and payload as metadata.
  37594. </p>
  37595. <p>To enable the compilation of this filter, you need to configure FFmpeg with
  37596. <code class="code">--enable-libquirc</code>.
  37597. </p>
  37598. <p>For each found QR code in the input video, some metadata entries are added with
  37599. the prefix <var class="var">lavfi.quirc.N</var>, where <var class="var">N</var> is the index, starting from 0,
  37600. associated to the QR code.
  37601. </p>
  37602. <p>A description of each metadata value follows:
  37603. </p>
  37604. <dl class="table">
  37605. <dt><samp class="option">lavfi.quirc.count</samp></dt>
  37606. <dd><p>the number of found QR codes, it is not set in case none was found
  37607. </p>
  37608. </dd>
  37609. <dt><samp class="option">lavfi.quirc.N.corner.M.x</samp></dt>
  37610. <dt><samp class="option">lavfi.quirc.N.coreer.M.y</samp></dt>
  37611. <dd><p>the x/y positions of the four corners of the square containing the QR code,
  37612. where <var class="var">M</var> is the index of the corner starting from 0
  37613. </p>
  37614. </dd>
  37615. <dt><samp class="option">lavfi.quirc.N.payload</samp></dt>
  37616. <dd><p>the payload of the QR code
  37617. </p></dd>
  37618. </dl>
  37619. </div>
  37620. <div class="section-level-extent" id="random">
  37621. <h3 class="section"><span>32.205 random<a class="copiable-link" href="#random"> &para;</a></span></h3>
  37622. <p>Flush video frames from internal cache of frames into a random order.
  37623. No frame is discarded.
  37624. Inspired by <a class="ref" href="#frei0r">frei0r</a> nervous filter.
  37625. </p>
  37626. <dl class="table">
  37627. <dt><samp class="option">frames</samp></dt>
  37628. <dd><p>Set size in number of frames of internal cache, in range from <code class="code">2</code> to
  37629. <code class="code">512</code>. Default is <code class="code">30</code>.
  37630. </p>
  37631. </dd>
  37632. <dt><samp class="option">seed</samp></dt>
  37633. <dd><p>Set seed for random number generator, must be an integer included between
  37634. <code class="code">0</code> and <code class="code">UINT32_MAX</code>. If not specified, or if explicitly set to
  37635. less than <code class="code">0</code>, the filter will try to use a good random seed on a
  37636. best effort basis.
  37637. </p></dd>
  37638. </dl>
  37639. </div>
  37640. <div class="section-level-extent" id="readeia608">
  37641. <h3 class="section"><span>32.206 readeia608<a class="copiable-link" href="#readeia608"> &para;</a></span></h3>
  37642. <p>Read closed captioning (EIA-608) information from the top lines of a video frame.
  37643. </p>
  37644. <p>This filter adds frame metadata for <code class="code">lavfi.readeia608.X.cc</code> and
  37645. <code class="code">lavfi.readeia608.X.line</code>, where <code class="code">X</code> is the number of the identified line
  37646. with EIA-608 data (starting from 0). A description of each metadata value follows:
  37647. </p>
  37648. <dl class="table">
  37649. <dt><samp class="option">lavfi.readeia608.X.cc</samp></dt>
  37650. <dd><p>The two bytes stored as EIA-608 data (printed in hexadecimal).
  37651. </p>
  37652. </dd>
  37653. <dt><samp class="option">lavfi.readeia608.X.line</samp></dt>
  37654. <dd><p>The number of the line on which the EIA-608 data was identified and read.
  37655. </p></dd>
  37656. </dl>
  37657. <p>This filter accepts the following options:
  37658. </p>
  37659. <dl class="table">
  37660. <dt><samp class="option">scan_min</samp></dt>
  37661. <dd><p>Set the line to start scanning for EIA-608 data. Default is <code class="code">0</code>.
  37662. </p>
  37663. </dd>
  37664. <dt><samp class="option">scan_max</samp></dt>
  37665. <dd><p>Set the line to end scanning for EIA-608 data. Default is <code class="code">29</code>.
  37666. </p>
  37667. </dd>
  37668. <dt><samp class="option">spw</samp></dt>
  37669. <dd><p>Set the ratio of width reserved for sync code detection.
  37670. Default is <code class="code">0.27</code>. Allowed range is <code class="code">[0.1 - 0.7]</code>.
  37671. </p>
  37672. </dd>
  37673. <dt><samp class="option">chp</samp></dt>
  37674. <dd><p>Enable checking the parity bit. In the event of a parity error, the filter will output
  37675. <code class="code">0x00</code> for that character. Default is false.
  37676. </p>
  37677. </dd>
  37678. <dt><samp class="option">lp</samp></dt>
  37679. <dd><p>Lowpass lines prior to further processing. Default is enabled.
  37680. </p></dd>
  37681. </dl>
  37682. <ul class="mini-toc">
  37683. <li><a href="#Commands-134" accesskey="1">Commands</a></li>
  37684. <li><a href="#Examples-127" accesskey="2">Examples</a></li>
  37685. </ul>
  37686. <div class="subsection-level-extent" id="Commands-134">
  37687. <h4 class="subsection"><span>32.206.1 Commands<a class="copiable-link" href="#Commands-134"> &para;</a></span></h4>
  37688. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  37689. </p>
  37690. </div>
  37691. <div class="subsection-level-extent" id="Examples-127">
  37692. <h4 class="subsection"><span>32.206.2 Examples<a class="copiable-link" href="#Examples-127"> &para;</a></span></h4>
  37693. <ul class="itemize mark-bullet">
  37694. <li>Output a csv with presentation time and the first two lines of identified EIA-608 captioning data.
  37695. <div class="example">
  37696. <pre class="example-preformatted">ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv
  37697. </pre></div>
  37698. </li></ul>
  37699. </div>
  37700. </div>
  37701. <div class="section-level-extent" id="readvitc">
  37702. <h3 class="section"><span>32.207 readvitc<a class="copiable-link" href="#readvitc"> &para;</a></span></h3>
  37703. <p>Read vertical interval timecode (VITC) information from the top lines of a
  37704. video frame.
  37705. </p>
  37706. <p>The filter adds frame metadata key <code class="code">lavfi.readvitc.tc_str</code> with the
  37707. timecode value, if a valid timecode has been detected. Further metadata key
  37708. <code class="code">lavfi.readvitc.found</code> is set to 0/1 depending on whether
  37709. timecode data has been found or not.
  37710. </p>
  37711. <p>This filter accepts the following options:
  37712. </p>
  37713. <dl class="table">
  37714. <dt><samp class="option">scan_max</samp></dt>
  37715. <dd><p>Set the maximum number of lines to scan for VITC data. If the value is set to
  37716. <code class="code">-1</code> the full video frame is scanned. Default is <code class="code">45</code>.
  37717. </p>
  37718. </dd>
  37719. <dt><samp class="option">thr_b</samp></dt>
  37720. <dd><p>Set the luma threshold for black. Accepts float numbers in the range [0.0,1.0],
  37721. default value is <code class="code">0.2</code>. The value must be equal or less than <code class="code">thr_w</code>.
  37722. </p>
  37723. </dd>
  37724. <dt><samp class="option">thr_w</samp></dt>
  37725. <dd><p>Set the luma threshold for white. Accepts float numbers in the range [0.0,1.0],
  37726. default value is <code class="code">0.6</code>. The value must be equal or greater than <code class="code">thr_b</code>.
  37727. </p></dd>
  37728. </dl>
  37729. <ul class="mini-toc">
  37730. <li><a href="#Examples-128" accesskey="1">Examples</a></li>
  37731. </ul>
  37732. <div class="subsection-level-extent" id="Examples-128">
  37733. <h4 class="subsection"><span>32.207.1 Examples<a class="copiable-link" href="#Examples-128"> &para;</a></span></h4>
  37734. <ul class="itemize mark-bullet">
  37735. <li>Detect and draw VITC data onto the video frame; if no valid VITC is detected,
  37736. draw <code class="code">--:--:--:--</code> as a placeholder:
  37737. <div class="example">
  37738. <pre class="example-preformatted">ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--}:x=(w-tw)/2:y=400-ascent'
  37739. </pre></div>
  37740. </li></ul>
  37741. </div>
  37742. </div>
  37743. <div class="section-level-extent" id="remap">
  37744. <h3 class="section"><span>32.208 remap<a class="copiable-link" href="#remap"> &para;</a></span></h3>
  37745. <p>Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
  37746. </p>
  37747. <p>Destination pixel at position (X, Y) will be picked from source (x, y) position
  37748. where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are out of range, zero
  37749. value for pixel will be used for destination pixel.
  37750. </p>
  37751. <p>Xmap and Ymap input video streams must be of same dimensions. Output video stream
  37752. will have Xmap/Ymap video stream dimensions.
  37753. Xmap and Ymap input video streams are 16bit depth, single channel.
  37754. </p>
  37755. <dl class="table">
  37756. <dt><samp class="option">format</samp></dt>
  37757. <dd><p>Specify pixel format of output from this filter. Can be <code class="code">color</code> or <code class="code">gray</code>.
  37758. Default is <code class="code">color</code>.
  37759. </p>
  37760. </dd>
  37761. <dt><samp class="option">fill</samp></dt>
  37762. <dd><p>Specify the color of the unmapped pixels. For the syntax of this option,
  37763. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils
  37764. manual</a>. Default color is <code class="code">black</code>.
  37765. </p></dd>
  37766. </dl>
  37767. </div>
  37768. <div class="section-level-extent" id="removegrain">
  37769. <h3 class="section"><span>32.209 removegrain<a class="copiable-link" href="#removegrain"> &para;</a></span></h3>
  37770. <p>The removegrain filter is a spatial denoiser for progressive video.
  37771. </p>
  37772. <dl class="table">
  37773. <dt><samp class="option">m0</samp></dt>
  37774. <dd><p>Set mode for the first plane.
  37775. </p>
  37776. </dd>
  37777. <dt><samp class="option">m1</samp></dt>
  37778. <dd><p>Set mode for the second plane.
  37779. </p>
  37780. </dd>
  37781. <dt><samp class="option">m2</samp></dt>
  37782. <dd><p>Set mode for the third plane.
  37783. </p>
  37784. </dd>
  37785. <dt><samp class="option">m3</samp></dt>
  37786. <dd><p>Set mode for the fourth plane.
  37787. </p></dd>
  37788. </dl>
  37789. <p>Range of mode is from 0 to 24. Description of each mode follows:
  37790. </p>
  37791. <dl class="table">
  37792. <dt><var class="var">0</var></dt>
  37793. <dd><p>Leave input plane unchanged. Default.
  37794. </p>
  37795. </dd>
  37796. <dt><var class="var">1</var></dt>
  37797. <dd><p>Clips the pixel with the minimum and maximum of the 8 neighbour pixels.
  37798. </p>
  37799. </dd>
  37800. <dt><var class="var">2</var></dt>
  37801. <dd><p>Clips the pixel with the second minimum and maximum of the 8 neighbour pixels.
  37802. </p>
  37803. </dd>
  37804. <dt><var class="var">3</var></dt>
  37805. <dd><p>Clips the pixel with the third minimum and maximum of the 8 neighbour pixels.
  37806. </p>
  37807. </dd>
  37808. <dt><var class="var">4</var></dt>
  37809. <dd><p>Clips the pixel with the fourth minimum and maximum of the 8 neighbour pixels.
  37810. This is equivalent to a median filter.
  37811. </p>
  37812. </dd>
  37813. <dt><var class="var">5</var></dt>
  37814. <dd><p>Line-sensitive clipping giving the minimal change.
  37815. </p>
  37816. </dd>
  37817. <dt><var class="var">6</var></dt>
  37818. <dd><p>Line-sensitive clipping, intermediate.
  37819. </p>
  37820. </dd>
  37821. <dt><var class="var">7</var></dt>
  37822. <dd><p>Line-sensitive clipping, intermediate.
  37823. </p>
  37824. </dd>
  37825. <dt><var class="var">8</var></dt>
  37826. <dd><p>Line-sensitive clipping, intermediate.
  37827. </p>
  37828. </dd>
  37829. <dt><var class="var">9</var></dt>
  37830. <dd><p>Line-sensitive clipping on a line where the neighbours pixels are the closest.
  37831. </p>
  37832. </dd>
  37833. <dt><var class="var">10</var></dt>
  37834. <dd><p>Replaces the target pixel with the closest neighbour.
  37835. </p>
  37836. </dd>
  37837. <dt><var class="var">11</var></dt>
  37838. <dd><p>[1 2 1] horizontal and vertical kernel blur.
  37839. </p>
  37840. </dd>
  37841. <dt><var class="var">12</var></dt>
  37842. <dd><p>Same as mode 11.
  37843. </p>
  37844. </dd>
  37845. <dt><var class="var">13</var></dt>
  37846. <dd><p>Bob mode, interpolates top field from the line where the neighbours
  37847. pixels are the closest.
  37848. </p>
  37849. </dd>
  37850. <dt><var class="var">14</var></dt>
  37851. <dd><p>Bob mode, interpolates bottom field from the line where the neighbours
  37852. pixels are the closest.
  37853. </p>
  37854. </dd>
  37855. <dt><var class="var">15</var></dt>
  37856. <dd><p>Bob mode, interpolates top field. Same as 13 but with a more complicated
  37857. interpolation formula.
  37858. </p>
  37859. </dd>
  37860. <dt><var class="var">16</var></dt>
  37861. <dd><p>Bob mode, interpolates bottom field. Same as 14 but with a more complicated
  37862. interpolation formula.
  37863. </p>
  37864. </dd>
  37865. <dt><var class="var">17</var></dt>
  37866. <dd><p>Clips the pixel with the minimum and maximum of respectively the maximum and
  37867. minimum of each pair of opposite neighbour pixels.
  37868. </p>
  37869. </dd>
  37870. <dt><var class="var">18</var></dt>
  37871. <dd><p>Line-sensitive clipping using opposite neighbours whose greatest distance from
  37872. the current pixel is minimal.
  37873. </p>
  37874. </dd>
  37875. <dt><var class="var">19</var></dt>
  37876. <dd><p>Replaces the pixel with the average of its 8 neighbours.
  37877. </p>
  37878. </dd>
  37879. <dt><var class="var">20</var></dt>
  37880. <dd><p>Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
  37881. </p>
  37882. </dd>
  37883. <dt><var class="var">21</var></dt>
  37884. <dd><p>Clips pixels using the averages of opposite neighbour.
  37885. </p>
  37886. </dd>
  37887. <dt><var class="var">22</var></dt>
  37888. <dd><p>Same as mode 21 but simpler and faster.
  37889. </p>
  37890. </dd>
  37891. <dt><var class="var">23</var></dt>
  37892. <dd><p>Small edge and halo removal, but reputed useless.
  37893. </p>
  37894. </dd>
  37895. <dt><var class="var">24</var></dt>
  37896. <dd><p>Similar as 23.
  37897. </p></dd>
  37898. </dl>
  37899. </div>
  37900. <div class="section-level-extent" id="removelogo">
  37901. <h3 class="section"><span>32.210 removelogo<a class="copiable-link" href="#removelogo"> &para;</a></span></h3>
  37902. <p>Suppress a TV station logo, using an image file to determine which
  37903. pixels comprise the logo. It works by filling in the pixels that
  37904. comprise the logo with neighboring pixels.
  37905. </p>
  37906. <p>The filter accepts the following options:
  37907. </p>
  37908. <dl class="table">
  37909. <dt><samp class="option">filename, f</samp></dt>
  37910. <dd><p>Set the filter bitmap file, which can be any image format supported by
  37911. libavformat. The width and height of the image file must match those of the
  37912. video stream being processed.
  37913. </p></dd>
  37914. </dl>
  37915. <p>Pixels in the provided bitmap image with a value of zero are not
  37916. considered part of the logo, non-zero pixels are considered part of
  37917. the logo. If you use white (255) for the logo and black (0) for the
  37918. rest, you will be safe. For making the filter bitmap, it is
  37919. recommended to take a screen capture of a black frame with the logo
  37920. visible, and then using a threshold filter followed by the erode
  37921. filter once or twice.
  37922. </p>
  37923. <p>If needed, little splotches can be fixed manually. Remember that if
  37924. logo pixels are not covered, the filter quality will be much
  37925. reduced. Marking too many pixels as part of the logo does not hurt as
  37926. much, but it will increase the amount of blurring needed to cover over
  37927. the image and will destroy more information than necessary, and extra
  37928. pixels will slow things down on a large logo.
  37929. </p>
  37930. </div>
  37931. <div class="section-level-extent" id="repeatfields">
  37932. <h3 class="section"><span>32.211 repeatfields<a class="copiable-link" href="#repeatfields"> &para;</a></span></h3>
  37933. <p>This filter uses the repeat_field flag from the Video ES headers and hard repeats
  37934. fields based on its value.
  37935. </p>
  37936. </div>
  37937. <div class="section-level-extent" id="reverse">
  37938. <h3 class="section"><span>32.212 reverse<a class="copiable-link" href="#reverse"> &para;</a></span></h3>
  37939. <p>Reverse a video clip.
  37940. </p>
  37941. <p>Warning: This filter requires memory to buffer the entire clip, so trimming
  37942. is suggested.
  37943. </p>
  37944. <ul class="mini-toc">
  37945. <li><a href="#Examples-129" accesskey="1">Examples</a></li>
  37946. </ul>
  37947. <div class="subsection-level-extent" id="Examples-129">
  37948. <h4 class="subsection"><span>32.212.1 Examples<a class="copiable-link" href="#Examples-129"> &para;</a></span></h4>
  37949. <ul class="itemize mark-bullet">
  37950. <li>Take the first 5 seconds of a clip, and reverse it.
  37951. <div class="example">
  37952. <pre class="example-preformatted">trim=end=5,reverse
  37953. </pre></div>
  37954. </li></ul>
  37955. </div>
  37956. </div>
  37957. <div class="section-level-extent" id="rgbashift">
  37958. <h3 class="section"><span>32.213 rgbashift<a class="copiable-link" href="#rgbashift"> &para;</a></span></h3>
  37959. <p>Shift R/G/B/A pixels horizontally and/or vertically.
  37960. </p>
  37961. <p>The filter accepts the following options:
  37962. </p><dl class="table">
  37963. <dt><samp class="option">rh</samp></dt>
  37964. <dd><p>Set amount to shift red horizontally.
  37965. </p></dd>
  37966. <dt><samp class="option">rv</samp></dt>
  37967. <dd><p>Set amount to shift red vertically.
  37968. </p></dd>
  37969. <dt><samp class="option">gh</samp></dt>
  37970. <dd><p>Set amount to shift green horizontally.
  37971. </p></dd>
  37972. <dt><samp class="option">gv</samp></dt>
  37973. <dd><p>Set amount to shift green vertically.
  37974. </p></dd>
  37975. <dt><samp class="option">bh</samp></dt>
  37976. <dd><p>Set amount to shift blue horizontally.
  37977. </p></dd>
  37978. <dt><samp class="option">bv</samp></dt>
  37979. <dd><p>Set amount to shift blue vertically.
  37980. </p></dd>
  37981. <dt><samp class="option">ah</samp></dt>
  37982. <dd><p>Set amount to shift alpha horizontally.
  37983. </p></dd>
  37984. <dt><samp class="option">av</samp></dt>
  37985. <dd><p>Set amount to shift alpha vertically.
  37986. </p></dd>
  37987. <dt><samp class="option">edge</samp></dt>
  37988. <dd><p>Set edge mode, can be <var class="var">smear</var>, default, or <var class="var">warp</var>.
  37989. </p></dd>
  37990. </dl>
  37991. <ul class="mini-toc">
  37992. <li><a href="#Commands-135" accesskey="1">Commands</a></li>
  37993. </ul>
  37994. <div class="subsection-level-extent" id="Commands-135">
  37995. <h4 class="subsection"><span>32.213.1 Commands<a class="copiable-link" href="#Commands-135"> &para;</a></span></h4>
  37996. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  37997. </p>
  37998. </div>
  37999. </div>
  38000. <div class="section-level-extent" id="roberts">
  38001. <h3 class="section"><span>32.214 roberts<a class="copiable-link" href="#roberts"> &para;</a></span></h3>
  38002. <p>Apply roberts cross operator to input video stream.
  38003. </p>
  38004. <p>The filter accepts the following option:
  38005. </p>
  38006. <dl class="table">
  38007. <dt><samp class="option">planes</samp></dt>
  38008. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  38009. By default value 0xf, all planes will be processed.
  38010. </p>
  38011. </dd>
  38012. <dt><samp class="option">scale</samp></dt>
  38013. <dd><p>Set value which will be multiplied with filtered result.
  38014. </p>
  38015. </dd>
  38016. <dt><samp class="option">delta</samp></dt>
  38017. <dd><p>Set value which will be added to filtered result.
  38018. </p></dd>
  38019. </dl>
  38020. <ul class="mini-toc">
  38021. <li><a href="#Commands-136" accesskey="1">Commands</a></li>
  38022. </ul>
  38023. <div class="subsection-level-extent" id="Commands-136">
  38024. <h4 class="subsection"><span>32.214.1 Commands<a class="copiable-link" href="#Commands-136"> &para;</a></span></h4>
  38025. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  38026. </p>
  38027. </div>
  38028. </div>
  38029. <div class="section-level-extent" id="rotate">
  38030. <h3 class="section"><span>32.215 rotate<a class="copiable-link" href="#rotate"> &para;</a></span></h3>
  38031. <p>Rotate video by an arbitrary angle expressed in radians.
  38032. </p>
  38033. <p>The filter accepts the following options:
  38034. </p>
  38035. <p>A description of the optional parameters follows.
  38036. </p><dl class="table">
  38037. <dt><samp class="option">angle, a</samp></dt>
  38038. <dd><p>Set an expression for the angle by which to rotate the input video
  38039. clockwise, expressed as a number of radians. A negative value will
  38040. result in a counter-clockwise rotation. By default it is set to &quot;0&quot;.
  38041. </p>
  38042. <p>This expression is evaluated for each frame.
  38043. </p>
  38044. </dd>
  38045. <dt><samp class="option">out_w, ow</samp></dt>
  38046. <dd><p>Set the output width expression, default value is &quot;iw&quot;.
  38047. This expression is evaluated just once during configuration.
  38048. </p>
  38049. </dd>
  38050. <dt><samp class="option">out_h, oh</samp></dt>
  38051. <dd><p>Set the output height expression, default value is &quot;ih&quot;.
  38052. This expression is evaluated just once during configuration.
  38053. </p>
  38054. </dd>
  38055. <dt><samp class="option">bilinear</samp></dt>
  38056. <dd><p>Enable bilinear interpolation if set to 1, a value of 0 disables
  38057. it. Default value is 1.
  38058. </p>
  38059. </dd>
  38060. <dt><samp class="option">fillcolor, c</samp></dt>
  38061. <dd><p>Set the color used to fill the output area not covered by the rotated
  38062. image. For the general syntax of this option, check the
  38063. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  38064. If the special value &quot;none&quot; is selected then no
  38065. background is printed (useful for example if the background is never shown).
  38066. </p>
  38067. <p>Default value is &quot;black&quot;.
  38068. </p></dd>
  38069. </dl>
  38070. <p>The expressions for the angle and the output size can contain the
  38071. following constants and functions:
  38072. </p>
  38073. <dl class="table">
  38074. <dt><samp class="option">n</samp></dt>
  38075. <dd><p>sequential number of the input frame, starting from 0. It is always NAN
  38076. before the first frame is filtered.
  38077. </p>
  38078. </dd>
  38079. <dt><samp class="option">t</samp></dt>
  38080. <dd><p>time in seconds of the input frame, it is set to 0 when the filter is
  38081. configured. It is always NAN before the first frame is filtered.
  38082. </p>
  38083. </dd>
  38084. <dt><samp class="option">hsub</samp></dt>
  38085. <dt><samp class="option">vsub</samp></dt>
  38086. <dd><p>horizontal and vertical chroma subsample values. For example for the
  38087. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  38088. </p>
  38089. </dd>
  38090. <dt><samp class="option">in_w, iw</samp></dt>
  38091. <dt><samp class="option">in_h, ih</samp></dt>
  38092. <dd><p>the input video width and height
  38093. </p>
  38094. </dd>
  38095. <dt><samp class="option">out_w, ow</samp></dt>
  38096. <dt><samp class="option">out_h, oh</samp></dt>
  38097. <dd><p>the output width and height, that is the size of the padded area as
  38098. specified by the <var class="var">width</var> and <var class="var">height</var> expressions
  38099. </p>
  38100. </dd>
  38101. <dt><samp class="option">rotw(a)</samp></dt>
  38102. <dt><samp class="option">roth(a)</samp></dt>
  38103. <dd><p>the minimal width/height required for completely containing the input
  38104. video rotated by <var class="var">a</var> radians.
  38105. </p>
  38106. <p>These are only available when computing the <samp class="option">out_w</samp> and
  38107. <samp class="option">out_h</samp> expressions.
  38108. </p></dd>
  38109. </dl>
  38110. <ul class="mini-toc">
  38111. <li><a href="#Examples-130" accesskey="1">Examples</a></li>
  38112. <li><a href="#Commands-137" accesskey="2">Commands</a></li>
  38113. </ul>
  38114. <div class="subsection-level-extent" id="Examples-130">
  38115. <h4 class="subsection"><span>32.215.1 Examples<a class="copiable-link" href="#Examples-130"> &para;</a></span></h4>
  38116. <ul class="itemize mark-bullet">
  38117. <li>Rotate the input by PI/6 radians clockwise:
  38118. <div class="example">
  38119. <pre class="example-preformatted">rotate=PI/6
  38120. </pre></div>
  38121. </li><li>Rotate the input by PI/6 radians counter-clockwise:
  38122. <div class="example">
  38123. <pre class="example-preformatted">rotate=-PI/6
  38124. </pre></div>
  38125. </li><li>Rotate the input by 45 degrees clockwise:
  38126. <div class="example">
  38127. <pre class="example-preformatted">rotate=45*PI/180
  38128. </pre></div>
  38129. </li><li>Apply a constant rotation with period T, starting from an angle of PI/3:
  38130. <div class="example">
  38131. <pre class="example-preformatted">rotate=PI/3+2*PI*t/T
  38132. </pre></div>
  38133. </li><li>Make the input video rotation oscillating with a period of T
  38134. seconds and an amplitude of A radians:
  38135. <div class="example">
  38136. <pre class="example-preformatted">rotate=A*sin(2*PI/T*t)
  38137. </pre></div>
  38138. </li><li>Rotate the video, output size is chosen so that the whole rotating
  38139. input video is always completely contained in the output:
  38140. <div class="example">
  38141. <pre class="example-preformatted">rotate='2*PI*t:ow=hypot(iw,ih):oh=ow'
  38142. </pre></div>
  38143. </li><li>Rotate the video, reduce the output size so that no background is ever
  38144. shown:
  38145. <div class="example">
  38146. <pre class="example-preformatted">rotate=2*PI*t:ow='min(iw,ih)/sqrt(2)':oh=ow:c=none
  38147. </pre></div>
  38148. </li></ul>
  38149. </div>
  38150. <div class="subsection-level-extent" id="Commands-137">
  38151. <h4 class="subsection"><span>32.215.2 Commands<a class="copiable-link" href="#Commands-137"> &para;</a></span></h4>
  38152. <p>The filter supports the following commands:
  38153. </p>
  38154. <dl class="table">
  38155. <dt><samp class="option">a, angle</samp></dt>
  38156. <dd><p>Set the angle expression.
  38157. The command accepts the same syntax of the corresponding option.
  38158. </p>
  38159. <p>If the specified expression is not valid, it is kept at its current
  38160. value.
  38161. </p></dd>
  38162. </dl>
  38163. </div>
  38164. </div>
  38165. <div class="section-level-extent" id="sab">
  38166. <h3 class="section"><span>32.216 sab<a class="copiable-link" href="#sab"> &para;</a></span></h3>
  38167. <p>Apply Shape Adaptive Blur.
  38168. </p>
  38169. <p>The filter accepts the following options:
  38170. </p>
  38171. <dl class="table">
  38172. <dt><samp class="option">luma_radius, lr</samp></dt>
  38173. <dd><p>Set luma blur filter strength, must be a value in range 0.1-4.0, default
  38174. value is 1.0. A greater value will result in a more blurred image, and
  38175. in slower processing.
  38176. </p>
  38177. </dd>
  38178. <dt><samp class="option">luma_pre_filter_radius, lpfr</samp></dt>
  38179. <dd><p>Set luma pre-filter radius, must be a value in the 0.1-2.0 range, default
  38180. value is 1.0.
  38181. </p>
  38182. </dd>
  38183. <dt><samp class="option">luma_strength, ls</samp></dt>
  38184. <dd><p>Set luma maximum difference between pixels to still be considered, must
  38185. be a value in the 0.1-100.0 range, default value is 1.0.
  38186. </p>
  38187. </dd>
  38188. <dt><samp class="option">chroma_radius, cr</samp></dt>
  38189. <dd><p>Set chroma blur filter strength, must be a value in range -0.9-4.0. A
  38190. greater value will result in a more blurred image, and in slower
  38191. processing.
  38192. </p>
  38193. </dd>
  38194. <dt><samp class="option">chroma_pre_filter_radius, cpfr</samp></dt>
  38195. <dd><p>Set chroma pre-filter radius, must be a value in the -0.9-2.0 range.
  38196. </p>
  38197. </dd>
  38198. <dt><samp class="option">chroma_strength, cs</samp></dt>
  38199. <dd><p>Set chroma maximum difference between pixels to still be considered,
  38200. must be a value in the -0.9-100.0 range.
  38201. </p></dd>
  38202. </dl>
  38203. <p>Each chroma option value, if not explicitly specified, is set to the
  38204. corresponding luma option value.
  38205. </p>
  38206. <a class="anchor" id="scale"></a></div>
  38207. <div class="section-level-extent" id="scale-1">
  38208. <h3 class="section"><span>32.217 scale<a class="copiable-link" href="#scale-1"> &para;</a></span></h3>
  38209. <p>Scale (resize) the input video, using the libswscale library.
  38210. </p>
  38211. <p>The scale filter forces the output display aspect ratio to be the same
  38212. of the input, by changing the output sample aspect ratio.
  38213. </p>
  38214. <p>If the input image format is different from the format requested by
  38215. the next filter, the scale filter will convert the input to the
  38216. requested format.
  38217. </p>
  38218. <ul class="mini-toc">
  38219. <li><a href="#Options-39" accesskey="1">Options</a></li>
  38220. <li><a href="#Examples-131" accesskey="2">Examples</a></li>
  38221. <li><a href="#Commands-138" accesskey="3">Commands</a></li>
  38222. </ul>
  38223. <div class="subsection-level-extent" id="Options-39">
  38224. <h4 class="subsection"><span>32.217.1 Options<a class="copiable-link" href="#Options-39"> &para;</a></span></h4>
  38225. <p>The filter accepts the following options, or any of the options
  38226. supported by the libswscale scaler.
  38227. </p>
  38228. <p>See <a data-manual="ffmpeg-scaler" href="ffmpeg-scaler.html#scaler_005foptions">the ffmpeg-scaler manual</a> for
  38229. the complete list of scaler options.
  38230. </p>
  38231. <dl class="table">
  38232. <dt><samp class="option">width, w</samp></dt>
  38233. <dt><samp class="option">height, h</samp></dt>
  38234. <dd><p>Set the output video dimension expression. Default value is the input
  38235. dimension.
  38236. </p>
  38237. <p>If the <var class="var">width</var> or <var class="var">w</var> value is 0, the input width is used for
  38238. the output. If the <var class="var">height</var> or <var class="var">h</var> value is 0, the input height
  38239. is used for the output.
  38240. </p>
  38241. <p>If one and only one of the values is -n with n &gt;= 1, the scale filter
  38242. will use a value that maintains the aspect ratio of the input image,
  38243. calculated from the other specified dimension. After that it will,
  38244. however, make sure that the calculated dimension is divisible by n and
  38245. adjust the value if necessary.
  38246. </p>
  38247. <p>If both values are -n with n &gt;= 1, the behavior will be identical to
  38248. both values being set to 0 as previously detailed.
  38249. </p>
  38250. <p>See below for the list of accepted constants for use in the dimension
  38251. expression.
  38252. </p>
  38253. </dd>
  38254. <dt><samp class="option">eval</samp></dt>
  38255. <dd><p>Specify when to evaluate <var class="var">width</var> and <var class="var">height</var> expression. It accepts the following values:
  38256. </p>
  38257. <dl class="table">
  38258. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  38259. <dd><p>Only evaluate expressions once during the filter initialization or when a command is processed.
  38260. </p>
  38261. </dd>
  38262. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  38263. <dd><p>Evaluate expressions for each incoming frame.
  38264. </p>
  38265. </dd>
  38266. </dl>
  38267. <p>Default value is &lsquo;<samp class="samp">init</samp>&rsquo;.
  38268. </p>
  38269. </dd>
  38270. <dt><samp class="option">interl</samp></dt>
  38271. <dd><p>Set the interlacing mode. It accepts the following values:
  38272. </p>
  38273. <dl class="table">
  38274. <dt>&lsquo;<samp class="samp">1</samp>&rsquo;</dt>
  38275. <dd><p>Force interlaced aware scaling.
  38276. </p>
  38277. </dd>
  38278. <dt>&lsquo;<samp class="samp">0</samp>&rsquo;</dt>
  38279. <dd><p>Do not apply interlaced scaling.
  38280. </p>
  38281. </dd>
  38282. <dt>&lsquo;<samp class="samp">-1</samp>&rsquo;</dt>
  38283. <dd><p>Select interlaced aware scaling depending on whether the source frames
  38284. are flagged as interlaced or not.
  38285. </p></dd>
  38286. </dl>
  38287. <p>Default value is &lsquo;<samp class="samp">0</samp>&rsquo;.
  38288. </p>
  38289. </dd>
  38290. <dt><samp class="option">flags</samp></dt>
  38291. <dd><p>Set libswscale scaling flags. See
  38292. <a data-manual="ffmpeg-scaler" href="ffmpeg-scaler.html#sws_005fflags">the ffmpeg-scaler manual</a> for the
  38293. complete list of values. If not explicitly specified the filter applies
  38294. the default flags.
  38295. </p>
  38296. </dd>
  38297. <dt><samp class="option">param0, param1</samp></dt>
  38298. <dd><p>Set libswscale input parameters for scaling algorithms that need them. See
  38299. <a data-manual="ffmpeg-scaler" href="ffmpeg-scaler.html#sws_005fparams">the ffmpeg-scaler manual</a> for the
  38300. complete documentation. If not explicitly specified the filter applies
  38301. empty parameters.
  38302. </p>
  38303. </dd>
  38304. <dt><samp class="option">size, s</samp></dt>
  38305. <dd><p>Set the video size. For the syntax of this option, check the
  38306. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  38307. </p>
  38308. </dd>
  38309. <dt><samp class="option">in_color_matrix</samp></dt>
  38310. <dt><samp class="option">out_color_matrix</samp></dt>
  38311. <dd><p>Set in/output YCbCr color space type.
  38312. </p>
  38313. <p>This allows the autodetected value to be overridden as well as allows forcing
  38314. a specific value used for the output and encoder.
  38315. </p>
  38316. <p>If not specified, the color space type depends on the pixel format.
  38317. </p>
  38318. <p>Possible values:
  38319. </p>
  38320. <dl class="table">
  38321. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  38322. <dd><p>Choose automatically.
  38323. </p>
  38324. </dd>
  38325. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  38326. <dd><p>Format conforming to International Telecommunication Union (ITU)
  38327. Recommendation BT.709.
  38328. </p>
  38329. </dd>
  38330. <dt>&lsquo;<samp class="samp">fcc</samp>&rsquo;</dt>
  38331. <dd><p>Set color space conforming to the United States Federal Communications
  38332. Commission (FCC) Code of Federal Regulations (CFR) Title 47 (2003) 73.682 (a).
  38333. </p>
  38334. </dd>
  38335. <dt>&lsquo;<samp class="samp">bt601</samp>&rsquo;</dt>
  38336. <dt>&lsquo;<samp class="samp">bt470</samp>&rsquo;</dt>
  38337. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  38338. <dd><p>Set color space conforming to:
  38339. </p>
  38340. <ul class="itemize mark-bullet">
  38341. <li>ITU Radiocommunication Sector (ITU-R) Recommendation BT.601
  38342. </li><li>ITU-R Rec. BT.470-6 (1998) Systems B, B1, and G
  38343. </li><li>Society of Motion Picture and Television Engineers (SMPTE) ST 170:2004
  38344. </li></ul>
  38345. </dd>
  38346. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  38347. <dd><p>Set color space conforming to SMPTE ST 240:1999.
  38348. </p>
  38349. </dd>
  38350. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  38351. <dd><p>Set color space conforming to ITU-R BT.2020 non-constant luminance system.
  38352. </p></dd>
  38353. </dl>
  38354. </dd>
  38355. <dt><samp class="option">in_range</samp></dt>
  38356. <dt><samp class="option">out_range</samp></dt>
  38357. <dd><p>Set in/output YCbCr sample range.
  38358. </p>
  38359. <p>This allows the autodetected value to be overridden as well as allows forcing
  38360. a specific value used for the output and encoder. If not specified, the
  38361. range depends on the pixel format. Possible values:
  38362. </p>
  38363. <dl class="table">
  38364. <dt>&lsquo;<samp class="samp">auto/unknown</samp>&rsquo;</dt>
  38365. <dd><p>Choose automatically.
  38366. </p>
  38367. </dd>
  38368. <dt>&lsquo;<samp class="samp">jpeg/full/pc</samp>&rsquo;</dt>
  38369. <dd><p>Set full range (0-255 in case of 8-bit luma).
  38370. </p>
  38371. </dd>
  38372. <dt>&lsquo;<samp class="samp">mpeg/limited/tv</samp>&rsquo;</dt>
  38373. <dd><p>Set &quot;MPEG&quot; range (16-235 in case of 8-bit luma).
  38374. </p></dd>
  38375. </dl>
  38376. </dd>
  38377. <dt><samp class="option">force_original_aspect_ratio</samp></dt>
  38378. <dd><p>Enable decreasing or increasing output video width or height if necessary to
  38379. keep the original aspect ratio. Possible values:
  38380. </p>
  38381. <dl class="table">
  38382. <dt>&lsquo;<samp class="samp">disable</samp>&rsquo;</dt>
  38383. <dd><p>Scale the video as specified and disable this feature.
  38384. </p>
  38385. </dd>
  38386. <dt>&lsquo;<samp class="samp">decrease</samp>&rsquo;</dt>
  38387. <dd><p>The output video dimensions will automatically be decreased if needed.
  38388. </p>
  38389. </dd>
  38390. <dt>&lsquo;<samp class="samp">increase</samp>&rsquo;</dt>
  38391. <dd><p>The output video dimensions will automatically be increased if needed.
  38392. </p>
  38393. </dd>
  38394. </dl>
  38395. <p>One useful instance of this option is that when you know a specific device&rsquo;s
  38396. maximum allowed resolution, you can use this to limit the output video to
  38397. that, while retaining the aspect ratio. For example, device A allows
  38398. 1280x720 playback, and your video is 1920x800. Using this option (set it to
  38399. decrease) and specifying 1280x720 to the command line makes the output
  38400. 1280x533.
  38401. </p>
  38402. <p>Please note that this is a different thing than specifying -1 for <samp class="option">w</samp>
  38403. or <samp class="option">h</samp>, you still need to specify the output resolution for this option
  38404. to work.
  38405. </p>
  38406. </dd>
  38407. <dt><samp class="option">force_divisible_by</samp></dt>
  38408. <dd><p>Ensures that both the output dimensions, width and height, are divisible by the
  38409. given integer when used together with <samp class="option">force_original_aspect_ratio</samp>. This
  38410. works similar to using <code class="code">-n</code> in the <samp class="option">w</samp> and <samp class="option">h</samp> options.
  38411. </p>
  38412. <p>This option respects the value set for <samp class="option">force_original_aspect_ratio</samp>,
  38413. increasing or decreasing the resolution accordingly. The video&rsquo;s aspect ratio
  38414. may be slightly modified.
  38415. </p>
  38416. <p>This option can be handy if you need to have a video fit within or exceed
  38417. a defined resolution using <samp class="option">force_original_aspect_ratio</samp> but also have
  38418. encoder restrictions on width or height divisibility.
  38419. </p>
  38420. </dd>
  38421. </dl>
  38422. <p>The values of the <samp class="option">w</samp> and <samp class="option">h</samp> options are expressions
  38423. containing the following constants:
  38424. </p>
  38425. <dl class="table">
  38426. <dt><var class="var">in_w</var></dt>
  38427. <dt><var class="var">in_h</var></dt>
  38428. <dd><p>The input width and height
  38429. </p>
  38430. </dd>
  38431. <dt><var class="var">iw</var></dt>
  38432. <dt><var class="var">ih</var></dt>
  38433. <dd><p>These are the same as <var class="var">in_w</var> and <var class="var">in_h</var>.
  38434. </p>
  38435. </dd>
  38436. <dt><var class="var">out_w</var></dt>
  38437. <dt><var class="var">out_h</var></dt>
  38438. <dd><p>The output (scaled) width and height
  38439. </p>
  38440. </dd>
  38441. <dt><var class="var">ow</var></dt>
  38442. <dt><var class="var">oh</var></dt>
  38443. <dd><p>These are the same as <var class="var">out_w</var> and <var class="var">out_h</var>
  38444. </p>
  38445. </dd>
  38446. <dt><var class="var">a</var></dt>
  38447. <dd><p>The same as <var class="var">iw</var> / <var class="var">ih</var>
  38448. </p>
  38449. </dd>
  38450. <dt><var class="var">sar</var></dt>
  38451. <dd><p>input sample aspect ratio
  38452. </p>
  38453. </dd>
  38454. <dt><var class="var">dar</var></dt>
  38455. <dd><p>The input display aspect ratio. Calculated from <code class="code">(iw / ih) * sar</code>.
  38456. </p>
  38457. </dd>
  38458. <dt><var class="var">hsub</var></dt>
  38459. <dt><var class="var">vsub</var></dt>
  38460. <dd><p>horizontal and vertical input chroma subsample values. For example for the
  38461. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  38462. </p>
  38463. </dd>
  38464. <dt><var class="var">ohsub</var></dt>
  38465. <dt><var class="var">ovsub</var></dt>
  38466. <dd><p>horizontal and vertical output chroma subsample values. For example for the
  38467. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  38468. </p>
  38469. </dd>
  38470. <dt><var class="var">n</var></dt>
  38471. <dd><p>The (sequential) number of the input frame, starting from 0.
  38472. Only available with <code class="code">eval=frame</code>.
  38473. </p>
  38474. </dd>
  38475. <dt><var class="var">t</var></dt>
  38476. <dd><p>The presentation timestamp of the input frame, expressed as a number of
  38477. seconds. Only available with <code class="code">eval=frame</code>.
  38478. </p>
  38479. </dd>
  38480. <dt><var class="var">pos</var></dt>
  38481. <dd><p>The position (byte offset) of the frame in the input stream, or NaN if
  38482. this information is unavailable and/or meaningless (for example in case of synthetic video).
  38483. Only available with <code class="code">eval=frame</code>.
  38484. Deprecated, do not use.
  38485. </p></dd>
  38486. </dl>
  38487. </div>
  38488. <div class="subsection-level-extent" id="Examples-131">
  38489. <h4 class="subsection"><span>32.217.2 Examples<a class="copiable-link" href="#Examples-131"> &para;</a></span></h4>
  38490. <ul class="itemize mark-bullet">
  38491. <li>Scale the input video to a size of 200x100
  38492. <div class="example">
  38493. <pre class="example-preformatted">scale=w=200:h=100
  38494. </pre></div>
  38495. <p>This is equivalent to:
  38496. </p><div class="example">
  38497. <pre class="example-preformatted">scale=200:100
  38498. </pre></div>
  38499. <p>or:
  38500. </p><div class="example">
  38501. <pre class="example-preformatted">scale=200x100
  38502. </pre></div>
  38503. </li><li>Specify a size abbreviation for the output size:
  38504. <div class="example">
  38505. <pre class="example-preformatted">scale=qcif
  38506. </pre></div>
  38507. <p>which can also be written as:
  38508. </p><div class="example">
  38509. <pre class="example-preformatted">scale=size=qcif
  38510. </pre></div>
  38511. </li><li>Scale the input to 2x:
  38512. <div class="example">
  38513. <pre class="example-preformatted">scale=w=2*iw:h=2*ih
  38514. </pre></div>
  38515. </li><li>The above is the same as:
  38516. <div class="example">
  38517. <pre class="example-preformatted">scale=2*in_w:2*in_h
  38518. </pre></div>
  38519. </li><li>Scale the input to 2x with forced interlaced scaling:
  38520. <div class="example">
  38521. <pre class="example-preformatted">scale=2*iw:2*ih:interl=1
  38522. </pre></div>
  38523. </li><li>Scale the input to half size:
  38524. <div class="example">
  38525. <pre class="example-preformatted">scale=w=iw/2:h=ih/2
  38526. </pre></div>
  38527. </li><li>Increase the width, and set the height to the same size:
  38528. <div class="example">
  38529. <pre class="example-preformatted">scale=3/2*iw:ow
  38530. </pre></div>
  38531. </li><li>Seek Greek harmony:
  38532. <div class="example">
  38533. <pre class="example-preformatted">scale=iw:1/PHI*iw
  38534. scale=ih*PHI:ih
  38535. </pre></div>
  38536. </li><li>Increase the height, and set the width to 3/2 of the height:
  38537. <div class="example">
  38538. <pre class="example-preformatted">scale=w=3/2*oh:h=3/5*ih
  38539. </pre></div>
  38540. </li><li>Increase the size, making the size a multiple of the chroma
  38541. subsample values:
  38542. <div class="example">
  38543. <pre class="example-preformatted">scale=&quot;trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub&quot;
  38544. </pre></div>
  38545. </li><li>Increase the width to a maximum of 500 pixels,
  38546. keeping the same aspect ratio as the input:
  38547. <div class="example">
  38548. <pre class="example-preformatted">scale=w='min(500\, iw*3/2):h=-1'
  38549. </pre></div>
  38550. </li><li>Make pixels square by combining scale and setsar:
  38551. <div class="example">
  38552. <pre class="example-preformatted">scale='trunc(ih*dar):ih',setsar=1/1
  38553. </pre></div>
  38554. </li><li>Make pixels square by combining scale and setsar,
  38555. making sure the resulting resolution is even (required by some codecs):
  38556. <div class="example">
  38557. <pre class="example-preformatted">scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
  38558. </pre></div>
  38559. </li></ul>
  38560. </div>
  38561. <div class="subsection-level-extent" id="Commands-138">
  38562. <h4 class="subsection"><span>32.217.3 Commands<a class="copiable-link" href="#Commands-138"> &para;</a></span></h4>
  38563. <p>This filter supports the following commands:
  38564. </p><dl class="table">
  38565. <dt><samp class="option">width, w</samp></dt>
  38566. <dt><samp class="option">height, h</samp></dt>
  38567. <dd><p>Set the output video dimension expression.
  38568. The command accepts the same syntax of the corresponding option.
  38569. </p>
  38570. <p>If the specified expression is not valid, it is kept at its current
  38571. value.
  38572. </p></dd>
  38573. </dl>
  38574. <a class="anchor" id="scale_005fcuda"></a></div>
  38575. </div>
  38576. <div class="section-level-extent" id="scale_005fcuda-1">
  38577. <h3 class="section"><span>32.218 scale_cuda<a class="copiable-link" href="#scale_005fcuda-1"> &para;</a></span></h3>
  38578. <p>Scale (resize) and convert (pixel format) the input video, using accelerated CUDA kernels.
  38579. Setting the output width and height works in the same way as for the <a class="ref" href="#scale">scale</a> filter.
  38580. </p>
  38581. <p>The filter accepts the following options:
  38582. </p><dl class="table">
  38583. <dt><samp class="option">w</samp></dt>
  38584. <dt><samp class="option">h</samp></dt>
  38585. <dd><p>Set the output video dimension expression. Default value is the input dimension.
  38586. </p>
  38587. <p>Allows for the same expressions as the <a class="ref" href="#scale">scale</a> filter.
  38588. </p>
  38589. </dd>
  38590. <dt><samp class="option">interp_algo</samp></dt>
  38591. <dd><p>Sets the algorithm used for scaling:
  38592. </p>
  38593. <dl class="table">
  38594. <dt><var class="var">nearest</var></dt>
  38595. <dd><p>Nearest neighbour
  38596. </p>
  38597. <p>Used by default if input parameters match the desired output.
  38598. </p>
  38599. </dd>
  38600. <dt><var class="var">bilinear</var></dt>
  38601. <dd><p>Bilinear
  38602. </p>
  38603. </dd>
  38604. <dt><var class="var">bicubic</var></dt>
  38605. <dd><p>Bicubic
  38606. </p>
  38607. <p>This is the default.
  38608. </p>
  38609. </dd>
  38610. <dt><var class="var">lanczos</var></dt>
  38611. <dd><p>Lanczos
  38612. </p>
  38613. </dd>
  38614. </dl>
  38615. </dd>
  38616. <dt><samp class="option">format</samp></dt>
  38617. <dd><p>Controls the output pixel format. By default, or if none is specified, the input
  38618. pixel format is used.
  38619. </p>
  38620. <p>The filter does not support converting between YUV and RGB pixel formats.
  38621. </p>
  38622. </dd>
  38623. <dt><samp class="option">passthrough</samp></dt>
  38624. <dd><p>If set to 0, every frame is processed, even if no conversion is necessary.
  38625. This mode can be useful to use the filter as a buffer for a downstream
  38626. frame-consumer that exhausts the limited decoder frame pool.
  38627. </p>
  38628. <p>If set to 1, frames are passed through as-is if they match the desired output
  38629. parameters. This is the default behaviour.
  38630. </p>
  38631. </dd>
  38632. <dt><samp class="option">param</samp></dt>
  38633. <dd><p>Algorithm-Specific parameter.
  38634. </p>
  38635. <p>Affects the curves of the bicubic algorithm.
  38636. </p>
  38637. </dd>
  38638. <dt><samp class="option">force_original_aspect_ratio</samp></dt>
  38639. <dt><samp class="option">force_divisible_by</samp></dt>
  38640. <dd><p>Work the same as the identical <a class="ref" href="#scale">scale</a> filter options.
  38641. </p>
  38642. </dd>
  38643. </dl>
  38644. <ul class="mini-toc">
  38645. <li><a href="#Examples-132" accesskey="1">Examples</a></li>
  38646. </ul>
  38647. <div class="subsection-level-extent" id="Examples-132">
  38648. <h4 class="subsection"><span>32.218.1 Examples<a class="copiable-link" href="#Examples-132"> &para;</a></span></h4>
  38649. <ul class="itemize mark-bullet">
  38650. <li>Scale input to 720p, keeping aspect ratio and ensuring the output is yuv420p.
  38651. <div class="example">
  38652. <pre class="example-preformatted">scale_cuda=-2:720:format=yuv420p
  38653. </pre></div>
  38654. </li><li>Upscale to 4K using nearest neighbour algorithm.
  38655. <div class="example">
  38656. <pre class="example-preformatted">scale_cuda=4096:2160:interp_algo=nearest
  38657. </pre></div>
  38658. </li><li>Don&rsquo;t do any conversion or scaling, but copy all input frames into newly allocated ones.
  38659. This can be useful to deal with a filter and encode chain that otherwise exhausts the
  38660. decoders frame pool.
  38661. <div class="example">
  38662. <pre class="example-preformatted">scale_cuda=passthrough=0
  38663. </pre></div>
  38664. </li></ul>
  38665. <a class="anchor" id="scale_005fnpp"></a></div>
  38666. </div>
  38667. <div class="section-level-extent" id="scale_005fnpp-1">
  38668. <h3 class="section"><span>32.219 scale_npp<a class="copiable-link" href="#scale_005fnpp-1"> &para;</a></span></h3>
  38669. <p>Use the NVIDIA Performance Primitives (libnpp) to perform scaling and/or pixel
  38670. format conversion on CUDA video frames. Setting the output width and height
  38671. works in the same way as for the <var class="var">scale</var> filter.
  38672. </p>
  38673. <p>The following additional options are accepted:
  38674. </p><dl class="table">
  38675. <dt><samp class="option">format</samp></dt>
  38676. <dd><p>The pixel format of the output CUDA frames. If set to the string &quot;same&quot; (the
  38677. default), the input format will be kept. Note that automatic format negotiation
  38678. and conversion is not yet supported for hardware frames
  38679. </p>
  38680. </dd>
  38681. <dt><samp class="option">interp_algo</samp></dt>
  38682. <dd><p>The interpolation algorithm used for resizing. One of the following:
  38683. </p><dl class="table">
  38684. <dt><samp class="option">nn</samp></dt>
  38685. <dd><p>Nearest neighbour.
  38686. </p>
  38687. </dd>
  38688. <dt><samp class="option">linear</samp></dt>
  38689. <dt><samp class="option">cubic</samp></dt>
  38690. <dt><samp class="option">cubic2p_bspline</samp></dt>
  38691. <dd><p>2-parameter cubic (B=1, C=0)
  38692. </p>
  38693. </dd>
  38694. <dt><samp class="option">cubic2p_catmullrom</samp></dt>
  38695. <dd><p>2-parameter cubic (B=0, C=1/2)
  38696. </p>
  38697. </dd>
  38698. <dt><samp class="option">cubic2p_b05c03</samp></dt>
  38699. <dd><p>2-parameter cubic (B=1/2, C=3/10)
  38700. </p>
  38701. </dd>
  38702. <dt><samp class="option">super</samp></dt>
  38703. <dd><p>Supersampling
  38704. </p>
  38705. </dd>
  38706. <dt><samp class="option">lanczos</samp></dt>
  38707. </dl>
  38708. </dd>
  38709. <dt><samp class="option">force_original_aspect_ratio</samp></dt>
  38710. <dd><p>Enable decreasing or increasing output video width or height if necessary to
  38711. keep the original aspect ratio. Possible values:
  38712. </p>
  38713. <dl class="table">
  38714. <dt>&lsquo;<samp class="samp">disable</samp>&rsquo;</dt>
  38715. <dd><p>Scale the video as specified and disable this feature.
  38716. </p>
  38717. </dd>
  38718. <dt>&lsquo;<samp class="samp">decrease</samp>&rsquo;</dt>
  38719. <dd><p>The output video dimensions will automatically be decreased if needed.
  38720. </p>
  38721. </dd>
  38722. <dt>&lsquo;<samp class="samp">increase</samp>&rsquo;</dt>
  38723. <dd><p>The output video dimensions will automatically be increased if needed.
  38724. </p>
  38725. </dd>
  38726. </dl>
  38727. <p>One useful instance of this option is that when you know a specific device&rsquo;s
  38728. maximum allowed resolution, you can use this to limit the output video to
  38729. that, while retaining the aspect ratio. For example, device A allows
  38730. 1280x720 playback, and your video is 1920x800. Using this option (set it to
  38731. decrease) and specifying 1280x720 to the command line makes the output
  38732. 1280x533.
  38733. </p>
  38734. <p>Please note that this is a different thing than specifying -1 for <samp class="option">w</samp>
  38735. or <samp class="option">h</samp>, you still need to specify the output resolution for this option
  38736. to work.
  38737. </p>
  38738. </dd>
  38739. <dt><samp class="option">force_divisible_by</samp></dt>
  38740. <dd><p>Ensures that both the output dimensions, width and height, are divisible by the
  38741. given integer when used together with <samp class="option">force_original_aspect_ratio</samp>. This
  38742. works similar to using <code class="code">-n</code> in the <samp class="option">w</samp> and <samp class="option">h</samp> options.
  38743. </p>
  38744. <p>This option respects the value set for <samp class="option">force_original_aspect_ratio</samp>,
  38745. increasing or decreasing the resolution accordingly. The video&rsquo;s aspect ratio
  38746. may be slightly modified.
  38747. </p>
  38748. <p>This option can be handy if you need to have a video fit within or exceed
  38749. a defined resolution using <samp class="option">force_original_aspect_ratio</samp> but also have
  38750. encoder restrictions on width or height divisibility.
  38751. </p>
  38752. </dd>
  38753. <dt><samp class="option">eval</samp></dt>
  38754. <dd><p>Specify when to evaluate <var class="var">width</var> and <var class="var">height</var> expression. It accepts the following values:
  38755. </p>
  38756. <dl class="table">
  38757. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  38758. <dd><p>Only evaluate expressions once during the filter initialization or when a command is processed.
  38759. </p>
  38760. </dd>
  38761. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  38762. <dd><p>Evaluate expressions for each incoming frame.
  38763. </p>
  38764. </dd>
  38765. </dl>
  38766. </dd>
  38767. </dl>
  38768. <p>The values of the <samp class="option">w</samp> and <samp class="option">h</samp> options are expressions
  38769. containing the following constants:
  38770. </p>
  38771. <dl class="table">
  38772. <dt><var class="var">in_w</var></dt>
  38773. <dt><var class="var">in_h</var></dt>
  38774. <dd><p>The input width and height
  38775. </p>
  38776. </dd>
  38777. <dt><var class="var">iw</var></dt>
  38778. <dt><var class="var">ih</var></dt>
  38779. <dd><p>These are the same as <var class="var">in_w</var> and <var class="var">in_h</var>.
  38780. </p>
  38781. </dd>
  38782. <dt><var class="var">out_w</var></dt>
  38783. <dt><var class="var">out_h</var></dt>
  38784. <dd><p>The output (scaled) width and height
  38785. </p>
  38786. </dd>
  38787. <dt><var class="var">ow</var></dt>
  38788. <dt><var class="var">oh</var></dt>
  38789. <dd><p>These are the same as <var class="var">out_w</var> and <var class="var">out_h</var>
  38790. </p>
  38791. </dd>
  38792. <dt><var class="var">a</var></dt>
  38793. <dd><p>The same as <var class="var">iw</var> / <var class="var">ih</var>
  38794. </p>
  38795. </dd>
  38796. <dt><var class="var">sar</var></dt>
  38797. <dd><p>input sample aspect ratio
  38798. </p>
  38799. </dd>
  38800. <dt><var class="var">dar</var></dt>
  38801. <dd><p>The input display aspect ratio. Calculated from <code class="code">(iw / ih) * sar</code>.
  38802. </p>
  38803. </dd>
  38804. <dt><var class="var">n</var></dt>
  38805. <dd><p>The (sequential) number of the input frame, starting from 0.
  38806. Only available with <code class="code">eval=frame</code>.
  38807. </p>
  38808. </dd>
  38809. <dt><var class="var">t</var></dt>
  38810. <dd><p>The presentation timestamp of the input frame, expressed as a number of
  38811. seconds. Only available with <code class="code">eval=frame</code>.
  38812. </p>
  38813. </dd>
  38814. <dt><var class="var">pos</var></dt>
  38815. <dd><p>The position (byte offset) of the frame in the input stream, or NaN if
  38816. this information is unavailable and/or meaningless (for example in case of synthetic video).
  38817. Only available with <code class="code">eval=frame</code>.
  38818. Deprecated, do not use.
  38819. </p></dd>
  38820. </dl>
  38821. </div>
  38822. <div class="section-level-extent" id="scale2ref">
  38823. <h3 class="section"><span>32.220 scale2ref<a class="copiable-link" href="#scale2ref"> &para;</a></span></h3>
  38824. <p>Scale (resize) the input video, based on a reference video.
  38825. </p>
  38826. <p>See the scale filter for available options, scale2ref supports the same but
  38827. uses the reference video instead of the main input as basis. scale2ref also
  38828. supports the following additional constants for the <samp class="option">w</samp> and
  38829. <samp class="option">h</samp> options:
  38830. </p>
  38831. <dl class="table">
  38832. <dt><var class="var">main_w</var></dt>
  38833. <dt><var class="var">main_h</var></dt>
  38834. <dd><p>The main input video&rsquo;s width and height
  38835. </p>
  38836. </dd>
  38837. <dt><var class="var">main_a</var></dt>
  38838. <dd><p>The same as <var class="var">main_w</var> / <var class="var">main_h</var>
  38839. </p>
  38840. </dd>
  38841. <dt><var class="var">main_sar</var></dt>
  38842. <dd><p>The main input video&rsquo;s sample aspect ratio
  38843. </p>
  38844. </dd>
  38845. <dt><var class="var">main_dar, mdar</var></dt>
  38846. <dd><p>The main input video&rsquo;s display aspect ratio. Calculated from
  38847. <code class="code">(main_w / main_h) * main_sar</code>.
  38848. </p>
  38849. </dd>
  38850. <dt><var class="var">main_hsub</var></dt>
  38851. <dt><var class="var">main_vsub</var></dt>
  38852. <dd><p>The main input video&rsquo;s horizontal and vertical chroma subsample values.
  38853. For example for the pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var>
  38854. is 1.
  38855. </p>
  38856. </dd>
  38857. <dt><var class="var">main_n</var></dt>
  38858. <dd><p>The (sequential) number of the main input frame, starting from 0.
  38859. Only available with <code class="code">eval=frame</code>.
  38860. </p>
  38861. </dd>
  38862. <dt><var class="var">main_t</var></dt>
  38863. <dd><p>The presentation timestamp of the main input frame, expressed as a number of
  38864. seconds. Only available with <code class="code">eval=frame</code>.
  38865. </p>
  38866. </dd>
  38867. <dt><var class="var">main_pos</var></dt>
  38868. <dd><p>The position (byte offset) of the frame in the main input stream, or NaN if
  38869. this information is unavailable and/or meaningless (for example in case of synthetic video).
  38870. Only available with <code class="code">eval=frame</code>.
  38871. </p></dd>
  38872. </dl>
  38873. <ul class="mini-toc">
  38874. <li><a href="#Examples-133" accesskey="1">Examples</a></li>
  38875. <li><a href="#Commands-139" accesskey="2">Commands</a></li>
  38876. </ul>
  38877. <div class="subsection-level-extent" id="Examples-133">
  38878. <h4 class="subsection"><span>32.220.1 Examples<a class="copiable-link" href="#Examples-133"> &para;</a></span></h4>
  38879. <ul class="itemize mark-bullet">
  38880. <li>Scale a subtitle stream (b) to match the main video (a) in size before overlaying
  38881. <div class="example">
  38882. <pre class="example-preformatted">'scale2ref[b][a];[a][b]overlay'
  38883. </pre></div>
  38884. </li><li>Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio.
  38885. <div class="example">
  38886. <pre class="example-preformatted">[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
  38887. </pre></div>
  38888. </li></ul>
  38889. </div>
  38890. <div class="subsection-level-extent" id="Commands-139">
  38891. <h4 class="subsection"><span>32.220.2 Commands<a class="copiable-link" href="#Commands-139"> &para;</a></span></h4>
  38892. <p>This filter supports the following commands:
  38893. </p><dl class="table">
  38894. <dt><samp class="option">width, w</samp></dt>
  38895. <dt><samp class="option">height, h</samp></dt>
  38896. <dd><p>Set the output video dimension expression.
  38897. The command accepts the same syntax of the corresponding option.
  38898. </p>
  38899. <p>If the specified expression is not valid, it is kept at its current
  38900. value.
  38901. </p></dd>
  38902. </dl>
  38903. </div>
  38904. </div>
  38905. <div class="section-level-extent" id="scale2ref_005fnpp">
  38906. <h3 class="section"><span>32.221 scale2ref_npp<a class="copiable-link" href="#scale2ref_005fnpp"> &para;</a></span></h3>
  38907. <p>Use the NVIDIA Performance Primitives (libnpp) to scale (resize) the input
  38908. video, based on a reference video.
  38909. </p>
  38910. <p>See the <a class="ref" href="#scale_005fnpp">scale_npp</a> filter for available options, scale2ref_npp supports the same
  38911. but uses the reference video instead of the main input as basis. scale2ref_npp
  38912. also supports the following additional constants for the <samp class="option">w</samp> and
  38913. <samp class="option">h</samp> options:
  38914. </p>
  38915. <dl class="table">
  38916. <dt><var class="var">main_w</var></dt>
  38917. <dt><var class="var">main_h</var></dt>
  38918. <dd><p>The main input video&rsquo;s width and height
  38919. </p>
  38920. </dd>
  38921. <dt><var class="var">main_a</var></dt>
  38922. <dd><p>The same as <var class="var">main_w</var> / <var class="var">main_h</var>
  38923. </p>
  38924. </dd>
  38925. <dt><var class="var">main_sar</var></dt>
  38926. <dd><p>The main input video&rsquo;s sample aspect ratio
  38927. </p>
  38928. </dd>
  38929. <dt><var class="var">main_dar, mdar</var></dt>
  38930. <dd><p>The main input video&rsquo;s display aspect ratio. Calculated from
  38931. <code class="code">(main_w / main_h) * main_sar</code>.
  38932. </p>
  38933. </dd>
  38934. <dt><var class="var">main_n</var></dt>
  38935. <dd><p>The (sequential) number of the main input frame, starting from 0.
  38936. Only available with <code class="code">eval=frame</code>.
  38937. </p>
  38938. </dd>
  38939. <dt><var class="var">main_t</var></dt>
  38940. <dd><p>The presentation timestamp of the main input frame, expressed as a number of
  38941. seconds. Only available with <code class="code">eval=frame</code>.
  38942. </p>
  38943. </dd>
  38944. <dt><var class="var">main_pos</var></dt>
  38945. <dd><p>The position (byte offset) of the frame in the main input stream, or NaN if
  38946. this information is unavailable and/or meaningless (for example in case of synthetic video).
  38947. Only available with <code class="code">eval=frame</code>.
  38948. </p></dd>
  38949. </dl>
  38950. <ul class="mini-toc">
  38951. <li><a href="#Examples-134" accesskey="1">Examples</a></li>
  38952. </ul>
  38953. <div class="subsection-level-extent" id="Examples-134">
  38954. <h4 class="subsection"><span>32.221.1 Examples<a class="copiable-link" href="#Examples-134"> &para;</a></span></h4>
  38955. <ul class="itemize mark-bullet">
  38956. <li>Scale a subtitle stream (b) to match the main video (a) in size before overlaying
  38957. <div class="example">
  38958. <pre class="example-preformatted">'scale2ref_npp[b][a];[a][b]overlay_cuda'
  38959. </pre></div>
  38960. </li><li>Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio.
  38961. <div class="example">
  38962. <pre class="example-preformatted">[logo-in][video-in]scale2ref_npp=w=oh*mdar:h=ih/10[logo-out][video-out]
  38963. </pre></div>
  38964. </li></ul>
  38965. </div>
  38966. </div>
  38967. <div class="section-level-extent" id="scale_005fvt">
  38968. <h3 class="section"><span>32.222 scale_vt<a class="copiable-link" href="#scale_005fvt"> &para;</a></span></h3>
  38969. <p>Scale and convert the color parameters using VTPixelTransferSession.
  38970. </p>
  38971. <p>The filter accepts the following options:
  38972. </p><dl class="table">
  38973. <dt><samp class="option">w</samp></dt>
  38974. <dt><samp class="option">h</samp></dt>
  38975. <dd><p>Set the output video dimension expression. Default value is the input dimension.
  38976. </p>
  38977. </dd>
  38978. <dt><samp class="option">color_matrix</samp></dt>
  38979. <dd><p>Set the output colorspace matrix.
  38980. </p>
  38981. </dd>
  38982. <dt><samp class="option">color_primaries</samp></dt>
  38983. <dd><p>Set the output color primaries.
  38984. </p>
  38985. </dd>
  38986. <dt><samp class="option">color_transfer</samp></dt>
  38987. <dd><p>Set the output transfer characteristics.
  38988. </p>
  38989. </dd>
  38990. </dl>
  38991. </div>
  38992. <div class="section-level-extent" id="scharr">
  38993. <h3 class="section"><span>32.223 scharr<a class="copiable-link" href="#scharr"> &para;</a></span></h3>
  38994. <p>Apply scharr operator to input video stream.
  38995. </p>
  38996. <p>The filter accepts the following option:
  38997. </p>
  38998. <dl class="table">
  38999. <dt><samp class="option">planes</samp></dt>
  39000. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  39001. By default value 0xf, all planes will be processed.
  39002. </p>
  39003. </dd>
  39004. <dt><samp class="option">scale</samp></dt>
  39005. <dd><p>Set value which will be multiplied with filtered result.
  39006. </p>
  39007. </dd>
  39008. <dt><samp class="option">delta</samp></dt>
  39009. <dd><p>Set value which will be added to filtered result.
  39010. </p></dd>
  39011. </dl>
  39012. <ul class="mini-toc">
  39013. <li><a href="#Commands-140" accesskey="1">Commands</a></li>
  39014. </ul>
  39015. <div class="subsection-level-extent" id="Commands-140">
  39016. <h4 class="subsection"><span>32.223.1 Commands<a class="copiable-link" href="#Commands-140"> &para;</a></span></h4>
  39017. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  39018. </p>
  39019. </div>
  39020. </div>
  39021. <div class="section-level-extent" id="scroll">
  39022. <h3 class="section"><span>32.224 scroll<a class="copiable-link" href="#scroll"> &para;</a></span></h3>
  39023. <p>Scroll input video horizontally and/or vertically by constant speed.
  39024. </p>
  39025. <p>The filter accepts the following options:
  39026. </p><dl class="table">
  39027. <dt><samp class="option">horizontal, h</samp></dt>
  39028. <dd><p>Set the horizontal scrolling speed. Default is 0. Allowed range is from -1 to 1.
  39029. Negative values changes scrolling direction.
  39030. </p>
  39031. </dd>
  39032. <dt><samp class="option">vertical, v</samp></dt>
  39033. <dd><p>Set the vertical scrolling speed. Default is 0. Allowed range is from -1 to 1.
  39034. Negative values changes scrolling direction.
  39035. </p>
  39036. </dd>
  39037. <dt><samp class="option">hpos</samp></dt>
  39038. <dd><p>Set the initial horizontal scrolling position. Default is 0. Allowed range is from 0 to 1.
  39039. </p>
  39040. </dd>
  39041. <dt><samp class="option">vpos</samp></dt>
  39042. <dd><p>Set the initial vertical scrolling position. Default is 0. Allowed range is from 0 to 1.
  39043. </p></dd>
  39044. </dl>
  39045. <ul class="mini-toc">
  39046. <li><a href="#Commands-141" accesskey="1">Commands</a></li>
  39047. </ul>
  39048. <div class="subsection-level-extent" id="Commands-141">
  39049. <h4 class="subsection"><span>32.224.1 Commands<a class="copiable-link" href="#Commands-141"> &para;</a></span></h4>
  39050. <p>This filter supports the following <a class="ref" href="#commands">commands</a>:
  39051. </p><dl class="table">
  39052. <dt><samp class="option">horizontal, h</samp></dt>
  39053. <dd><p>Set the horizontal scrolling speed.
  39054. </p></dd>
  39055. <dt><samp class="option">vertical, v</samp></dt>
  39056. <dd><p>Set the vertical scrolling speed.
  39057. </p></dd>
  39058. </dl>
  39059. <a class="anchor" id="scdet"></a></div>
  39060. </div>
  39061. <div class="section-level-extent" id="scdet-1">
  39062. <h3 class="section"><span>32.225 scdet<a class="copiable-link" href="#scdet-1"> &para;</a></span></h3>
  39063. <p>Detect video scene change.
  39064. </p>
  39065. <p>This filter sets frame metadata with mafd between frame, the scene score, and
  39066. forward the frame to the next filter, so they can use these metadata to detect
  39067. scene change or others.
  39068. </p>
  39069. <p>In addition, this filter logs a message and sets frame metadata when it detects
  39070. a scene change by <samp class="option">threshold</samp>.
  39071. </p>
  39072. <p><code class="code">lavfi.scd.mafd</code> metadata keys are set with mafd for every frame.
  39073. </p>
  39074. <p><code class="code">lavfi.scd.score</code> metadata keys are set with scene change score for every frame
  39075. to detect scene change.
  39076. </p>
  39077. <p><code class="code">lavfi.scd.time</code> metadata keys are set with current filtered frame time which
  39078. detect scene change with <samp class="option">threshold</samp>.
  39079. </p>
  39080. <p>The filter accepts the following options:
  39081. </p>
  39082. <dl class="table">
  39083. <dt><samp class="option">threshold, t</samp></dt>
  39084. <dd><p>Set the scene change detection threshold as a percentage of maximum change. Good
  39085. values are in the <code class="code">[8.0, 14.0]</code> range. The range for <samp class="option">threshold</samp> is
  39086. <code class="code">[0., 100.]</code>.
  39087. </p>
  39088. <p>Default value is <code class="code">10.</code>.
  39089. </p>
  39090. </dd>
  39091. <dt><samp class="option">sc_pass, s</samp></dt>
  39092. <dd><p>Set the flag to pass scene change frames to the next filter. Default value is <code class="code">0</code>
  39093. You can enable it if you want to get snapshot of scene change frames only.
  39094. </p></dd>
  39095. </dl>
  39096. <a class="anchor" id="selectivecolor"></a></div>
  39097. <div class="section-level-extent" id="selectivecolor-1">
  39098. <h3 class="section"><span>32.226 selectivecolor<a class="copiable-link" href="#selectivecolor-1"> &para;</a></span></h3>
  39099. <p>Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of colors (such
  39100. as &quot;reds&quot;, &quot;yellows&quot;, &quot;greens&quot;, &quot;cyans&quot;, ...). The adjustment range is defined
  39101. by the &quot;purity&quot; of the color (that is, how saturated it already is).
  39102. </p>
  39103. <p>This filter is similar to the Adobe Photoshop Selective Color tool.
  39104. </p>
  39105. <p>The filter accepts the following options:
  39106. </p>
  39107. <dl class="table">
  39108. <dt><samp class="option">correction_method</samp></dt>
  39109. <dd><p>Select color correction method.
  39110. </p>
  39111. <p>Available values are:
  39112. </p><dl class="table">
  39113. <dt>&lsquo;<samp class="samp">absolute</samp>&rsquo;</dt>
  39114. <dd><p>Specified adjustments are applied &quot;as-is&quot; (added/subtracted to original pixel
  39115. component value).
  39116. </p></dd>
  39117. <dt>&lsquo;<samp class="samp">relative</samp>&rsquo;</dt>
  39118. <dd><p>Specified adjustments are relative to the original component value.
  39119. </p></dd>
  39120. </dl>
  39121. <p>Default is <code class="code">absolute</code>.
  39122. </p></dd>
  39123. <dt><samp class="option">reds</samp></dt>
  39124. <dd><p>Adjustments for red pixels (pixels where the red component is the maximum)
  39125. </p></dd>
  39126. <dt><samp class="option">yellows</samp></dt>
  39127. <dd><p>Adjustments for yellow pixels (pixels where the blue component is the minimum)
  39128. </p></dd>
  39129. <dt><samp class="option">greens</samp></dt>
  39130. <dd><p>Adjustments for green pixels (pixels where the green component is the maximum)
  39131. </p></dd>
  39132. <dt><samp class="option">cyans</samp></dt>
  39133. <dd><p>Adjustments for cyan pixels (pixels where the red component is the minimum)
  39134. </p></dd>
  39135. <dt><samp class="option">blues</samp></dt>
  39136. <dd><p>Adjustments for blue pixels (pixels where the blue component is the maximum)
  39137. </p></dd>
  39138. <dt><samp class="option">magentas</samp></dt>
  39139. <dd><p>Adjustments for magenta pixels (pixels where the green component is the minimum)
  39140. </p></dd>
  39141. <dt><samp class="option">whites</samp></dt>
  39142. <dd><p>Adjustments for white pixels (pixels where all components are greater than 128)
  39143. </p></dd>
  39144. <dt><samp class="option">neutrals</samp></dt>
  39145. <dd><p>Adjustments for all pixels except pure black and pure white
  39146. </p></dd>
  39147. <dt><samp class="option">blacks</samp></dt>
  39148. <dd><p>Adjustments for black pixels (pixels where all components are lesser than 128)
  39149. </p></dd>
  39150. <dt><samp class="option">psfile</samp></dt>
  39151. <dd><p>Specify a Photoshop selective color file (<code class="code">.asv</code>) to import the settings from.
  39152. </p></dd>
  39153. </dl>
  39154. <p>All the adjustment settings (<samp class="option">reds</samp>, <samp class="option">yellows</samp>, ...) accept up to
  39155. 4 space separated floating point adjustment values in the [-1,1] range,
  39156. respectively to adjust the amount of cyan, magenta, yellow and black for the
  39157. pixels of its range.
  39158. </p>
  39159. <ul class="mini-toc">
  39160. <li><a href="#Examples-135" accesskey="1">Examples</a></li>
  39161. </ul>
  39162. <div class="subsection-level-extent" id="Examples-135">
  39163. <h4 class="subsection"><span>32.226.1 Examples<a class="copiable-link" href="#Examples-135"> &para;</a></span></h4>
  39164. <ul class="itemize mark-bullet">
  39165. <li>Increase cyan by 50% and reduce yellow by 33% in every green areas, and
  39166. increase magenta by 27% in blue areas:
  39167. <div class="example">
  39168. <pre class="example-preformatted">selectivecolor=greens=.5 0 -.33 0:blues=0 .27
  39169. </pre></div>
  39170. </li><li>Use a Photoshop selective color preset:
  39171. <div class="example">
  39172. <pre class="example-preformatted">selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
  39173. </pre></div>
  39174. </li></ul>
  39175. <a class="anchor" id="separatefields"></a></div>
  39176. </div>
  39177. <div class="section-level-extent" id="separatefields-1">
  39178. <h3 class="section"><span>32.227 separatefields<a class="copiable-link" href="#separatefields-1"> &para;</a></span></h3>
  39179. <p>The <code class="code">separatefields</code> takes a frame-based video input and splits
  39180. each frame into its components fields, producing a new half height clip
  39181. with twice the frame rate and twice the frame count.
  39182. </p>
  39183. <p>This filter use field-dominance information in frame to decide which
  39184. of each pair of fields to place first in the output.
  39185. If it gets it wrong use <a class="ref" href="#setfield">setfield</a> filter before <code class="code">separatefields</code> filter.
  39186. </p>
  39187. </div>
  39188. <div class="section-level-extent" id="setdar_002c-setsar">
  39189. <h3 class="section"><span>32.228 setdar, setsar<a class="copiable-link" href="#setdar_002c-setsar"> &para;</a></span></h3>
  39190. <p>The <code class="code">setdar</code> filter sets the Display Aspect Ratio for the filter
  39191. output video.
  39192. </p>
  39193. <p>This is done by changing the specified Sample (aka Pixel) Aspect
  39194. Ratio, according to the following equation:
  39195. </p><div class="example">
  39196. <pre class="example-preformatted"><var class="var">DAR</var> = <var class="var">HORIZONTAL_RESOLUTION</var> / <var class="var">VERTICAL_RESOLUTION</var> * <var class="var">SAR</var>
  39197. </pre></div>
  39198. <p>Keep in mind that the <code class="code">setdar</code> filter does not modify the pixel
  39199. dimensions of the video frame. Also, the display aspect ratio set by
  39200. this filter may be changed by later filters in the filterchain,
  39201. e.g. in case of scaling or if another &quot;setdar&quot; or a &quot;setsar&quot; filter is
  39202. applied.
  39203. </p>
  39204. <p>The <code class="code">setsar</code> filter sets the Sample (aka Pixel) Aspect Ratio for
  39205. the filter output video.
  39206. </p>
  39207. <p>Note that as a consequence of the application of this filter, the
  39208. output display aspect ratio will change according to the equation
  39209. above.
  39210. </p>
  39211. <p>Keep in mind that the sample aspect ratio set by the <code class="code">setsar</code>
  39212. filter may be changed by later filters in the filterchain, e.g. if
  39213. another &quot;setsar&quot; or a &quot;setdar&quot; filter is applied.
  39214. </p>
  39215. <p>It accepts the following parameters:
  39216. </p>
  39217. <dl class="table">
  39218. <dt><samp class="option">r, ratio, dar (<code class="code">setdar</code> only), sar (<code class="code">setsar</code> only)</samp></dt>
  39219. <dd><p>Set the aspect ratio used by the filter.
  39220. </p>
  39221. <p>The parameter can be a floating point number string, or an expression. If the
  39222. parameter is not specified, the value &quot;0&quot; is assumed, meaning that the same
  39223. input value is used.
  39224. </p>
  39225. </dd>
  39226. <dt><samp class="option">max</samp></dt>
  39227. <dd><p>Set the maximum integer value to use for expressing numerator and
  39228. denominator when reducing the expressed aspect ratio to a rational.
  39229. Default value is <code class="code">100</code>.
  39230. </p>
  39231. </dd>
  39232. </dl>
  39233. <p>The parameter <var class="var">sar</var> is an expression containing the following constants:
  39234. </p>
  39235. <dl class="table">
  39236. <dt><samp class="option">w, h</samp></dt>
  39237. <dd><p>The input width and height.
  39238. </p>
  39239. </dd>
  39240. <dt><samp class="option">a</samp></dt>
  39241. <dd><p>Same as <var class="var">w</var> / <var class="var">h</var>.
  39242. </p>
  39243. </dd>
  39244. <dt><samp class="option">sar</samp></dt>
  39245. <dd><p>The input sample aspect ratio.
  39246. </p>
  39247. </dd>
  39248. <dt><samp class="option">dar</samp></dt>
  39249. <dd><p>The input display aspect ratio. It is the same as
  39250. (<var class="var">w</var> / <var class="var">h</var>) * <var class="var">sar</var>.
  39251. </p>
  39252. </dd>
  39253. <dt><samp class="option">hsub, vsub</samp></dt>
  39254. <dd><p>Horizontal and vertical chroma subsample values. For example, for the
  39255. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  39256. </p></dd>
  39257. </dl>
  39258. <ul class="mini-toc">
  39259. <li><a href="#Examples-136" accesskey="1">Examples</a></li>
  39260. </ul>
  39261. <div class="subsection-level-extent" id="Examples-136">
  39262. <h4 class="subsection"><span>32.228.1 Examples<a class="copiable-link" href="#Examples-136"> &para;</a></span></h4>
  39263. <ul class="itemize mark-bullet">
  39264. <li>To change the display aspect ratio to 16:9, specify one of the following:
  39265. <div class="example">
  39266. <pre class="example-preformatted">setdar=dar=1.77777
  39267. setdar=dar=16/9
  39268. </pre></div>
  39269. </li><li>To change the sample aspect ratio to 10:11, specify:
  39270. <div class="example">
  39271. <pre class="example-preformatted">setsar=sar=10/11
  39272. </pre></div>
  39273. </li><li>To set a display aspect ratio of 16:9, and specify a maximum integer value of
  39274. 1000 in the aspect ratio reduction, use the command:
  39275. <div class="example">
  39276. <pre class="example-preformatted">setdar=ratio=16/9:max=1000
  39277. </pre></div>
  39278. </li></ul>
  39279. <a class="anchor" id="setfield"></a></div>
  39280. </div>
  39281. <div class="section-level-extent" id="setfield-1">
  39282. <h3 class="section"><span>32.229 setfield<a class="copiable-link" href="#setfield-1"> &para;</a></span></h3>
  39283. <p>Force field for the output video frame.
  39284. </p>
  39285. <p>The <code class="code">setfield</code> filter marks the interlace type field for the
  39286. output frames. It does not change the input frame, but only sets the
  39287. corresponding property, which affects how the frame is treated by
  39288. following filters (e.g. <code class="code">fieldorder</code> or <code class="code">yadif</code>).
  39289. </p>
  39290. <p>The filter accepts the following options:
  39291. </p>
  39292. <dl class="table">
  39293. <dt><samp class="option">mode</samp></dt>
  39294. <dd><p>Available values are:
  39295. </p>
  39296. <dl class="table">
  39297. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  39298. <dd><p>Keep the same field property.
  39299. </p>
  39300. </dd>
  39301. <dt>&lsquo;<samp class="samp">bff</samp>&rsquo;</dt>
  39302. <dd><p>Mark the frame as bottom-field-first.
  39303. </p>
  39304. </dd>
  39305. <dt>&lsquo;<samp class="samp">tff</samp>&rsquo;</dt>
  39306. <dd><p>Mark the frame as top-field-first.
  39307. </p>
  39308. </dd>
  39309. <dt>&lsquo;<samp class="samp">prog</samp>&rsquo;</dt>
  39310. <dd><p>Mark the frame as progressive.
  39311. </p></dd>
  39312. </dl>
  39313. </dd>
  39314. </dl>
  39315. <a class="anchor" id="setparams"></a></div>
  39316. <div class="section-level-extent" id="setparams-1">
  39317. <h3 class="section"><span>32.230 setparams<a class="copiable-link" href="#setparams-1"> &para;</a></span></h3>
  39318. <p>Force frame parameter for the output video frame.
  39319. </p>
  39320. <p>The <code class="code">setparams</code> filter marks interlace and color range for the
  39321. output frames. It does not change the input frame, but only sets the
  39322. corresponding property, which affects how the frame is treated by
  39323. filters/encoders.
  39324. </p>
  39325. <dl class="table">
  39326. <dt><samp class="option">field_mode</samp></dt>
  39327. <dd><p>Available values are:
  39328. </p>
  39329. <dl class="table">
  39330. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  39331. <dd><p>Keep the same field property (default).
  39332. </p>
  39333. </dd>
  39334. <dt>&lsquo;<samp class="samp">bff</samp>&rsquo;</dt>
  39335. <dd><p>Mark the frame as bottom-field-first.
  39336. </p>
  39337. </dd>
  39338. <dt>&lsquo;<samp class="samp">tff</samp>&rsquo;</dt>
  39339. <dd><p>Mark the frame as top-field-first.
  39340. </p>
  39341. </dd>
  39342. <dt>&lsquo;<samp class="samp">prog</samp>&rsquo;</dt>
  39343. <dd><p>Mark the frame as progressive.
  39344. </p></dd>
  39345. </dl>
  39346. </dd>
  39347. <dt><samp class="option">range</samp></dt>
  39348. <dd><p>Available values are:
  39349. </p>
  39350. <dl class="table">
  39351. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  39352. <dd><p>Keep the same color range property (default).
  39353. </p>
  39354. </dd>
  39355. <dt>&lsquo;<samp class="samp">unspecified, unknown</samp>&rsquo;</dt>
  39356. <dd><p>Mark the frame as unspecified color range.
  39357. </p>
  39358. </dd>
  39359. <dt>&lsquo;<samp class="samp">limited, tv, mpeg</samp>&rsquo;</dt>
  39360. <dd><p>Mark the frame as limited range.
  39361. </p>
  39362. </dd>
  39363. <dt>&lsquo;<samp class="samp">full, pc, jpeg</samp>&rsquo;</dt>
  39364. <dd><p>Mark the frame as full range.
  39365. </p></dd>
  39366. </dl>
  39367. </dd>
  39368. <dt><samp class="option">color_primaries</samp></dt>
  39369. <dd><p>Set the color primaries.
  39370. Available values are:
  39371. </p>
  39372. <dl class="table">
  39373. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  39374. <dd><p>Keep the same color primaries property (default).
  39375. </p>
  39376. </dd>
  39377. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  39378. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  39379. <dt>&lsquo;<samp class="samp">bt470m</samp>&rsquo;</dt>
  39380. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  39381. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  39382. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  39383. <dt>&lsquo;<samp class="samp">film</samp>&rsquo;</dt>
  39384. <dt>&lsquo;<samp class="samp">bt2020</samp>&rsquo;</dt>
  39385. <dt>&lsquo;<samp class="samp">smpte428</samp>&rsquo;</dt>
  39386. <dt>&lsquo;<samp class="samp">smpte431</samp>&rsquo;</dt>
  39387. <dt>&lsquo;<samp class="samp">smpte432</samp>&rsquo;</dt>
  39388. <dt>&lsquo;<samp class="samp">jedec-p22</samp>&rsquo;</dt>
  39389. </dl>
  39390. </dd>
  39391. <dt><samp class="option">color_trc</samp></dt>
  39392. <dd><p>Set the color transfer.
  39393. Available values are:
  39394. </p>
  39395. <dl class="table">
  39396. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  39397. <dd><p>Keep the same color trc property (default).
  39398. </p>
  39399. </dd>
  39400. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  39401. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  39402. <dt>&lsquo;<samp class="samp">bt470m</samp>&rsquo;</dt>
  39403. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  39404. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  39405. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  39406. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  39407. <dt>&lsquo;<samp class="samp">log100</samp>&rsquo;</dt>
  39408. <dt>&lsquo;<samp class="samp">log316</samp>&rsquo;</dt>
  39409. <dt>&lsquo;<samp class="samp">iec61966-2-4</samp>&rsquo;</dt>
  39410. <dt>&lsquo;<samp class="samp">bt1361e</samp>&rsquo;</dt>
  39411. <dt>&lsquo;<samp class="samp">iec61966-2-1</samp>&rsquo;</dt>
  39412. <dt>&lsquo;<samp class="samp">bt2020-10</samp>&rsquo;</dt>
  39413. <dt>&lsquo;<samp class="samp">bt2020-12</samp>&rsquo;</dt>
  39414. <dt>&lsquo;<samp class="samp">smpte2084</samp>&rsquo;</dt>
  39415. <dt>&lsquo;<samp class="samp">smpte428</samp>&rsquo;</dt>
  39416. <dt>&lsquo;<samp class="samp">arib-std-b67</samp>&rsquo;</dt>
  39417. </dl>
  39418. </dd>
  39419. <dt><samp class="option">colorspace</samp></dt>
  39420. <dd><p>Set the colorspace.
  39421. Available values are:
  39422. </p>
  39423. <dl class="table">
  39424. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  39425. <dd><p>Keep the same colorspace property (default).
  39426. </p>
  39427. </dd>
  39428. <dt>&lsquo;<samp class="samp">gbr</samp>&rsquo;</dt>
  39429. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  39430. <dt>&lsquo;<samp class="samp">unknown</samp>&rsquo;</dt>
  39431. <dt>&lsquo;<samp class="samp">fcc</samp>&rsquo;</dt>
  39432. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  39433. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  39434. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  39435. <dt>&lsquo;<samp class="samp">ycgco</samp>&rsquo;</dt>
  39436. <dt>&lsquo;<samp class="samp">bt2020nc</samp>&rsquo;</dt>
  39437. <dt>&lsquo;<samp class="samp">bt2020c</samp>&rsquo;</dt>
  39438. <dt>&lsquo;<samp class="samp">smpte2085</samp>&rsquo;</dt>
  39439. <dt>&lsquo;<samp class="samp">chroma-derived-nc</samp>&rsquo;</dt>
  39440. <dt>&lsquo;<samp class="samp">chroma-derived-c</samp>&rsquo;</dt>
  39441. <dt>&lsquo;<samp class="samp">ictcp</samp>&rsquo;</dt>
  39442. </dl>
  39443. </dd>
  39444. </dl>
  39445. </div>
  39446. <div class="section-level-extent" id="sharpen_005fnpp">
  39447. <h3 class="section"><span>32.231 sharpen_npp<a class="copiable-link" href="#sharpen_005fnpp"> &para;</a></span></h3>
  39448. <p>Use the NVIDIA Performance Primitives (libnpp) to perform image sharpening with
  39449. border control.
  39450. </p>
  39451. <p>The following additional options are accepted:
  39452. </p><dl class="table">
  39453. <dt><samp class="option">border_type</samp></dt>
  39454. <dd><p>Type of sampling to be used ad frame borders. One of the following:
  39455. </p><dl class="table">
  39456. <dt><samp class="option">replicate</samp></dt>
  39457. <dd><p>Replicate pixel values.
  39458. </p>
  39459. </dd>
  39460. </dl>
  39461. </dd>
  39462. </dl>
  39463. </div>
  39464. <div class="section-level-extent" id="shear">
  39465. <h3 class="section"><span>32.232 shear<a class="copiable-link" href="#shear"> &para;</a></span></h3>
  39466. <p>Apply shear transform to input video.
  39467. </p>
  39468. <p>This filter supports the following options:
  39469. </p>
  39470. <dl class="table">
  39471. <dt><samp class="option">shx</samp></dt>
  39472. <dd><p>Shear factor in X-direction. Default value is 0.
  39473. Allowed range is from -2 to 2.
  39474. </p>
  39475. </dd>
  39476. <dt><samp class="option">shy</samp></dt>
  39477. <dd><p>Shear factor in Y-direction. Default value is 0.
  39478. Allowed range is from -2 to 2.
  39479. </p>
  39480. </dd>
  39481. <dt><samp class="option">fillcolor, c</samp></dt>
  39482. <dd><p>Set the color used to fill the output area not covered by the transformed
  39483. video. For the general syntax of this option, check the
  39484. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  39485. If the special value &quot;none&quot; is selected then no
  39486. background is printed (useful for example if the background is never shown).
  39487. </p>
  39488. <p>Default value is &quot;black&quot;.
  39489. </p>
  39490. </dd>
  39491. <dt><samp class="option">interp</samp></dt>
  39492. <dd><p>Set interpolation type. Can be <code class="code">bilinear</code> or <code class="code">nearest</code>. Default is <code class="code">bilinear</code>.
  39493. </p></dd>
  39494. </dl>
  39495. <ul class="mini-toc">
  39496. <li><a href="#Commands-142" accesskey="1">Commands</a></li>
  39497. </ul>
  39498. <div class="subsection-level-extent" id="Commands-142">
  39499. <h4 class="subsection"><span>32.232.1 Commands<a class="copiable-link" href="#Commands-142"> &para;</a></span></h4>
  39500. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  39501. </p>
  39502. </div>
  39503. </div>
  39504. <div class="section-level-extent" id="showinfo-1">
  39505. <h3 class="section"><span>32.233 showinfo<a class="copiable-link" href="#showinfo-1"> &para;</a></span></h3>
  39506. <p>Show a line containing various information for each input video frame.
  39507. The input video is not modified.
  39508. </p>
  39509. <p>This filter supports the following options:
  39510. </p>
  39511. <dl class="table">
  39512. <dt><samp class="option">checksum</samp></dt>
  39513. <dd><p>Calculate checksums of each plane. By default enabled.
  39514. </p>
  39515. </dd>
  39516. <dt><samp class="option">udu_sei_as_ascii</samp></dt>
  39517. <dd><p>Try to print user data unregistered SEI as ascii character when possible,
  39518. in hex format otherwise.
  39519. </p></dd>
  39520. </dl>
  39521. <p>The shown line contains a sequence of key/value pairs of the form
  39522. <var class="var">key</var>:<var class="var">value</var>.
  39523. </p>
  39524. <p>The following values are shown in the output:
  39525. </p>
  39526. <dl class="table">
  39527. <dt><samp class="option">n</samp></dt>
  39528. <dd><p>The (sequential) number of the input frame, starting from 0.
  39529. </p>
  39530. </dd>
  39531. <dt><samp class="option">pts</samp></dt>
  39532. <dd><p>The Presentation TimeStamp of the input frame, expressed as a number of
  39533. time base units. The time base unit depends on the filter input pad.
  39534. </p>
  39535. </dd>
  39536. <dt><samp class="option">pts_time</samp></dt>
  39537. <dd><p>The Presentation TimeStamp of the input frame, expressed as a number of
  39538. seconds.
  39539. </p>
  39540. </dd>
  39541. <dt><samp class="option">fmt</samp></dt>
  39542. <dd><p>The pixel format name.
  39543. </p>
  39544. </dd>
  39545. <dt><samp class="option">sar</samp></dt>
  39546. <dd><p>The sample aspect ratio of the input frame, expressed in the form
  39547. <var class="var">num</var>/<var class="var">den</var>.
  39548. </p>
  39549. </dd>
  39550. <dt><samp class="option">s</samp></dt>
  39551. <dd><p>The size of the input frame. For the syntax of this option, check the
  39552. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  39553. </p>
  39554. </dd>
  39555. <dt><samp class="option">i</samp></dt>
  39556. <dd><p>The type of interlaced mode (&quot;P&quot; for &quot;progressive&quot;, &quot;T&quot; for top field first, &quot;B&quot;
  39557. for bottom field first).
  39558. </p>
  39559. </dd>
  39560. <dt><samp class="option">iskey</samp></dt>
  39561. <dd><p>This is 1 if the frame is a key frame, 0 otherwise.
  39562. </p>
  39563. </dd>
  39564. <dt><samp class="option">type</samp></dt>
  39565. <dd><p>The picture type of the input frame (&quot;I&quot; for an I-frame, &quot;P&quot; for a
  39566. P-frame, &quot;B&quot; for a B-frame, or &quot;?&quot; for an unknown type).
  39567. Also refer to the documentation of the <code class="code">AVPictureType</code> enum and of
  39568. the <code class="code">av_get_picture_type_char</code> function defined in
  39569. <samp class="file">libavutil/avutil.h</samp>.
  39570. </p>
  39571. </dd>
  39572. <dt><samp class="option">checksum</samp></dt>
  39573. <dd><p>The Adler-32 checksum (printed in hexadecimal) of all the planes of the input frame.
  39574. </p>
  39575. </dd>
  39576. <dt><samp class="option">plane_checksum</samp></dt>
  39577. <dd><p>The Adler-32 checksum (printed in hexadecimal) of each plane of the input frame,
  39578. expressed in the form &quot;[<var class="var">c0</var> <var class="var">c1</var> <var class="var">c2</var> <var class="var">c3</var>]&quot;.
  39579. </p>
  39580. </dd>
  39581. <dt><samp class="option">mean</samp></dt>
  39582. <dd><p>The mean value of pixels in each plane of the input frame, expressed in the form
  39583. &quot;[<var class="var">mean0</var> <var class="var">mean1</var> <var class="var">mean2</var> <var class="var">mean3</var>]&quot;.
  39584. </p>
  39585. </dd>
  39586. <dt><samp class="option">stdev</samp></dt>
  39587. <dd><p>The standard deviation of pixel values in each plane of the input frame, expressed
  39588. in the form &quot;[<var class="var">stdev0</var> <var class="var">stdev1</var> <var class="var">stdev2</var> <var class="var">stdev3</var>]&quot;.
  39589. </p>
  39590. </dd>
  39591. </dl>
  39592. </div>
  39593. <div class="section-level-extent" id="showpalette">
  39594. <h3 class="section"><span>32.234 showpalette<a class="copiable-link" href="#showpalette"> &para;</a></span></h3>
  39595. <p>Displays the 256 colors palette of each frame. This filter is only relevant for
  39596. <var class="var">pal8</var> pixel format frames.
  39597. </p>
  39598. <p>It accepts the following option:
  39599. </p>
  39600. <dl class="table">
  39601. <dt><samp class="option">s</samp></dt>
  39602. <dd><p>Set the size of the box used to represent one palette color entry. Default is
  39603. <code class="code">30</code> (for a <code class="code">30x30</code> pixel box).
  39604. </p></dd>
  39605. </dl>
  39606. </div>
  39607. <div class="section-level-extent" id="shuffleframes">
  39608. <h3 class="section"><span>32.235 shuffleframes<a class="copiable-link" href="#shuffleframes"> &para;</a></span></h3>
  39609. <p>Reorder and/or duplicate and/or drop video frames.
  39610. </p>
  39611. <p>It accepts the following parameters:
  39612. </p>
  39613. <dl class="table">
  39614. <dt><samp class="option">mapping</samp></dt>
  39615. <dd><p>Set the destination indexes of input frames.
  39616. This is space or &rsquo;|&rsquo; separated list of indexes that maps input frames to output
  39617. frames. Number of indexes also sets maximal value that each index may have.
  39618. &rsquo;-1&rsquo; index have special meaning and that is to drop frame.
  39619. </p></dd>
  39620. </dl>
  39621. <p>The first frame has the index 0. The default is to keep the input unchanged.
  39622. </p>
  39623. <ul class="mini-toc">
  39624. <li><a href="#Examples-137" accesskey="1">Examples</a></li>
  39625. </ul>
  39626. <div class="subsection-level-extent" id="Examples-137">
  39627. <h4 class="subsection"><span>32.235.1 Examples<a class="copiable-link" href="#Examples-137"> &para;</a></span></h4>
  39628. <ul class="itemize mark-bullet">
  39629. <li>Swap second and third frame of every three frames of the input:
  39630. <div class="example">
  39631. <pre class="example-preformatted">ffmpeg -i INPUT -vf &quot;shuffleframes=0 2 1&quot; OUTPUT
  39632. </pre></div>
  39633. </li><li>Swap 10th and 1st frame of every ten frames of the input:
  39634. <div class="example">
  39635. <pre class="example-preformatted">ffmpeg -i INPUT -vf &quot;shuffleframes=9 1 2 3 4 5 6 7 8 0&quot; OUTPUT
  39636. </pre></div>
  39637. </li></ul>
  39638. </div>
  39639. </div>
  39640. <div class="section-level-extent" id="shufflepixels">
  39641. <h3 class="section"><span>32.236 shufflepixels<a class="copiable-link" href="#shufflepixels"> &para;</a></span></h3>
  39642. <p>Reorder pixels in video frames.
  39643. </p>
  39644. <p>This filter accepts the following options:
  39645. </p>
  39646. <dl class="table">
  39647. <dt><samp class="option">direction, d</samp></dt>
  39648. <dd><p>Set shuffle direction. Can be forward or inverse direction.
  39649. Default direction is forward.
  39650. </p>
  39651. </dd>
  39652. <dt><samp class="option">mode, m</samp></dt>
  39653. <dd><p>Set shuffle mode. Can be horizontal, vertical or block mode.
  39654. </p>
  39655. </dd>
  39656. <dt><samp class="option">width, w</samp></dt>
  39657. <dt><samp class="option">height, h</samp></dt>
  39658. <dd><p>Set shuffle block_size. In case of horizontal shuffle mode only width
  39659. part of size is used, and in case of vertical shuffle mode only height
  39660. part of size is used.
  39661. </p>
  39662. </dd>
  39663. <dt><samp class="option">seed, s</samp></dt>
  39664. <dd><p>Set random seed used with shuffling pixels. Mainly useful to set to be able
  39665. to reverse filtering process to get original input.
  39666. For example, to reverse forward shuffle you need to use same parameters
  39667. and exact same seed and to set direction to inverse.
  39668. </p></dd>
  39669. </dl>
  39670. </div>
  39671. <div class="section-level-extent" id="shuffleplanes">
  39672. <h3 class="section"><span>32.237 shuffleplanes<a class="copiable-link" href="#shuffleplanes"> &para;</a></span></h3>
  39673. <p>Reorder and/or duplicate video planes.
  39674. </p>
  39675. <p>It accepts the following parameters:
  39676. </p>
  39677. <dl class="table">
  39678. <dt><samp class="option">map0</samp></dt>
  39679. <dd><p>The index of the input plane to be used as the first output plane.
  39680. </p>
  39681. </dd>
  39682. <dt><samp class="option">map1</samp></dt>
  39683. <dd><p>The index of the input plane to be used as the second output plane.
  39684. </p>
  39685. </dd>
  39686. <dt><samp class="option">map2</samp></dt>
  39687. <dd><p>The index of the input plane to be used as the third output plane.
  39688. </p>
  39689. </dd>
  39690. <dt><samp class="option">map3</samp></dt>
  39691. <dd><p>The index of the input plane to be used as the fourth output plane.
  39692. </p>
  39693. </dd>
  39694. </dl>
  39695. <p>The first plane has the index 0. The default is to keep the input unchanged.
  39696. </p>
  39697. <ul class="mini-toc">
  39698. <li><a href="#Examples-138" accesskey="1">Examples</a></li>
  39699. </ul>
  39700. <div class="subsection-level-extent" id="Examples-138">
  39701. <h4 class="subsection"><span>32.237.1 Examples<a class="copiable-link" href="#Examples-138"> &para;</a></span></h4>
  39702. <ul class="itemize mark-bullet">
  39703. <li>Swap the second and third planes of the input:
  39704. <div class="example">
  39705. <pre class="example-preformatted">ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
  39706. </pre></div>
  39707. </li></ul>
  39708. <a class="anchor" id="signalstats"></a></div>
  39709. </div>
  39710. <div class="section-level-extent" id="signalstats-1">
  39711. <h3 class="section"><span>32.238 signalstats<a class="copiable-link" href="#signalstats-1"> &para;</a></span></h3>
  39712. <p>Evaluate various visual metrics that assist in determining issues associated
  39713. with the digitization of analog video media.
  39714. </p>
  39715. <p>By default the filter will log these metadata values:
  39716. </p>
  39717. <dl class="table">
  39718. <dt><samp class="option">YMIN</samp></dt>
  39719. <dd><p>Display the minimal Y value contained within the input frame. Expressed in
  39720. range of [0-255].
  39721. </p>
  39722. </dd>
  39723. <dt><samp class="option">YLOW</samp></dt>
  39724. <dd><p>Display the Y value at the 10% percentile within the input frame. Expressed in
  39725. range of [0-255].
  39726. </p>
  39727. </dd>
  39728. <dt><samp class="option">YAVG</samp></dt>
  39729. <dd><p>Display the average Y value within the input frame. Expressed in range of
  39730. [0-255].
  39731. </p>
  39732. </dd>
  39733. <dt><samp class="option">YHIGH</samp></dt>
  39734. <dd><p>Display the Y value at the 90% percentile within the input frame. Expressed in
  39735. range of [0-255].
  39736. </p>
  39737. </dd>
  39738. <dt><samp class="option">YMAX</samp></dt>
  39739. <dd><p>Display the maximum Y value contained within the input frame. Expressed in
  39740. range of [0-255].
  39741. </p>
  39742. </dd>
  39743. <dt><samp class="option">UMIN</samp></dt>
  39744. <dd><p>Display the minimal U value contained within the input frame. Expressed in
  39745. range of [0-255].
  39746. </p>
  39747. </dd>
  39748. <dt><samp class="option">ULOW</samp></dt>
  39749. <dd><p>Display the U value at the 10% percentile within the input frame. Expressed in
  39750. range of [0-255].
  39751. </p>
  39752. </dd>
  39753. <dt><samp class="option">UAVG</samp></dt>
  39754. <dd><p>Display the average U value within the input frame. Expressed in range of
  39755. [0-255].
  39756. </p>
  39757. </dd>
  39758. <dt><samp class="option">UHIGH</samp></dt>
  39759. <dd><p>Display the U value at the 90% percentile within the input frame. Expressed in
  39760. range of [0-255].
  39761. </p>
  39762. </dd>
  39763. <dt><samp class="option">UMAX</samp></dt>
  39764. <dd><p>Display the maximum U value contained within the input frame. Expressed in
  39765. range of [0-255].
  39766. </p>
  39767. </dd>
  39768. <dt><samp class="option">VMIN</samp></dt>
  39769. <dd><p>Display the minimal V value contained within the input frame. Expressed in
  39770. range of [0-255].
  39771. </p>
  39772. </dd>
  39773. <dt><samp class="option">VLOW</samp></dt>
  39774. <dd><p>Display the V value at the 10% percentile within the input frame. Expressed in
  39775. range of [0-255].
  39776. </p>
  39777. </dd>
  39778. <dt><samp class="option">VAVG</samp></dt>
  39779. <dd><p>Display the average V value within the input frame. Expressed in range of
  39780. [0-255].
  39781. </p>
  39782. </dd>
  39783. <dt><samp class="option">VHIGH</samp></dt>
  39784. <dd><p>Display the V value at the 90% percentile within the input frame. Expressed in
  39785. range of [0-255].
  39786. </p>
  39787. </dd>
  39788. <dt><samp class="option">VMAX</samp></dt>
  39789. <dd><p>Display the maximum V value contained within the input frame. Expressed in
  39790. range of [0-255].
  39791. </p>
  39792. </dd>
  39793. <dt><samp class="option">SATMIN</samp></dt>
  39794. <dd><p>Display the minimal saturation value contained within the input frame.
  39795. Expressed in range of [0-~181.02].
  39796. </p>
  39797. </dd>
  39798. <dt><samp class="option">SATLOW</samp></dt>
  39799. <dd><p>Display the saturation value at the 10% percentile within the input frame.
  39800. Expressed in range of [0-~181.02].
  39801. </p>
  39802. </dd>
  39803. <dt><samp class="option">SATAVG</samp></dt>
  39804. <dd><p>Display the average saturation value within the input frame. Expressed in range
  39805. of [0-~181.02].
  39806. </p>
  39807. </dd>
  39808. <dt><samp class="option">SATHIGH</samp></dt>
  39809. <dd><p>Display the saturation value at the 90% percentile within the input frame.
  39810. Expressed in range of [0-~181.02].
  39811. </p>
  39812. </dd>
  39813. <dt><samp class="option">SATMAX</samp></dt>
  39814. <dd><p>Display the maximum saturation value contained within the input frame.
  39815. Expressed in range of [0-~181.02].
  39816. </p>
  39817. </dd>
  39818. <dt><samp class="option">HUEMED</samp></dt>
  39819. <dd><p>Display the median value for hue within the input frame. Expressed in range of
  39820. [0-360].
  39821. </p>
  39822. </dd>
  39823. <dt><samp class="option">HUEAVG</samp></dt>
  39824. <dd><p>Display the average value for hue within the input frame. Expressed in range of
  39825. [0-360].
  39826. </p>
  39827. </dd>
  39828. <dt><samp class="option">YDIF</samp></dt>
  39829. <dd><p>Display the average of sample value difference between all values of the Y
  39830. plane in the current frame and corresponding values of the previous input frame.
  39831. Expressed in range of [0-255].
  39832. </p>
  39833. </dd>
  39834. <dt><samp class="option">UDIF</samp></dt>
  39835. <dd><p>Display the average of sample value difference between all values of the U
  39836. plane in the current frame and corresponding values of the previous input frame.
  39837. Expressed in range of [0-255].
  39838. </p>
  39839. </dd>
  39840. <dt><samp class="option">VDIF</samp></dt>
  39841. <dd><p>Display the average of sample value difference between all values of the V
  39842. plane in the current frame and corresponding values of the previous input frame.
  39843. Expressed in range of [0-255].
  39844. </p>
  39845. </dd>
  39846. <dt><samp class="option">YBITDEPTH</samp></dt>
  39847. <dd><p>Display bit depth of Y plane in current frame.
  39848. Expressed in range of [0-16].
  39849. </p>
  39850. </dd>
  39851. <dt><samp class="option">UBITDEPTH</samp></dt>
  39852. <dd><p>Display bit depth of U plane in current frame.
  39853. Expressed in range of [0-16].
  39854. </p>
  39855. </dd>
  39856. <dt><samp class="option">VBITDEPTH</samp></dt>
  39857. <dd><p>Display bit depth of V plane in current frame.
  39858. Expressed in range of [0-16].
  39859. </p></dd>
  39860. </dl>
  39861. <p>The filter accepts the following options:
  39862. </p>
  39863. <dl class="table">
  39864. <dt><samp class="option">stat</samp></dt>
  39865. <dt><samp class="option">out</samp></dt>
  39866. <dd>
  39867. <p><samp class="option">stat</samp> specify an additional form of image analysis.
  39868. <samp class="option">out</samp> output video with the specified type of pixel highlighted.
  39869. </p>
  39870. <p>Both options accept the following values:
  39871. </p>
  39872. <dl class="table">
  39873. <dt>&lsquo;<samp class="samp">tout</samp>&rsquo;</dt>
  39874. <dd><p>Identify <var class="var">temporal outliers</var> pixels. A <var class="var">temporal outlier</var> is a pixel
  39875. unlike the neighboring pixels of the same field. Examples of temporal outliers
  39876. include the results of video dropouts, head clogs, or tape tracking issues.
  39877. </p>
  39878. </dd>
  39879. <dt>&lsquo;<samp class="samp">vrep</samp>&rsquo;</dt>
  39880. <dd><p>Identify <var class="var">vertical line repetition</var>. Vertical line repetition includes
  39881. similar rows of pixels within a frame. In born-digital video vertical line
  39882. repetition is common, but this pattern is uncommon in video digitized from an
  39883. analog source. When it occurs in video that results from the digitization of an
  39884. analog source it can indicate concealment from a dropout compensator.
  39885. </p>
  39886. </dd>
  39887. <dt>&lsquo;<samp class="samp">brng</samp>&rsquo;</dt>
  39888. <dd><p>Identify pixels that fall outside of legal broadcast range.
  39889. </p></dd>
  39890. </dl>
  39891. </dd>
  39892. <dt><samp class="option">color, c</samp></dt>
  39893. <dd><p>Set the highlight color for the <samp class="option">out</samp> option. The default color is
  39894. yellow.
  39895. </p></dd>
  39896. </dl>
  39897. <ul class="mini-toc">
  39898. <li><a href="#Examples-139" accesskey="1">Examples</a></li>
  39899. </ul>
  39900. <div class="subsection-level-extent" id="Examples-139">
  39901. <h4 class="subsection"><span>32.238.1 Examples<a class="copiable-link" href="#Examples-139"> &para;</a></span></h4>
  39902. <ul class="itemize mark-bullet">
  39903. <li>Output data of various video metrics:
  39904. <div class="example">
  39905. <pre class="example-preformatted">ffprobe -f lavfi movie=example.mov,signalstats=&quot;stat=tout+vrep+brng&quot; -show_frames
  39906. </pre></div>
  39907. </li><li>Output specific data about the minimum and maximum values of the Y plane per frame:
  39908. <div class="example">
  39909. <pre class="example-preformatted">ffprobe -f lavfi movie=example.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN
  39910. </pre></div>
  39911. </li><li>Playback video while highlighting pixels that are outside of broadcast range in red.
  39912. <div class="example">
  39913. <pre class="example-preformatted">ffplay example.mov -vf signalstats=&quot;out=brng:color=red&quot;
  39914. </pre></div>
  39915. </li><li>Playback video with signalstats metadata drawn over the frame.
  39916. <div class="example">
  39917. <pre class="example-preformatted">ffplay example.mov -vf signalstats=stat=brng+vrep+tout,drawtext=fontfile=FreeSerif.ttf:textfile=signalstat_drawtext.txt
  39918. </pre></div>
  39919. <p>The contents of signalstat_drawtext.txt used in the command are:
  39920. </p><div class="example">
  39921. <pre class="example-preformatted">time %{pts:hms}
  39922. Y (%{metadata:lavfi.signalstats.YMIN}-%{metadata:lavfi.signalstats.YMAX})
  39923. U (%{metadata:lavfi.signalstats.UMIN}-%{metadata:lavfi.signalstats.UMAX})
  39924. V (%{metadata:lavfi.signalstats.VMIN}-%{metadata:lavfi.signalstats.VMAX})
  39925. saturation maximum: %{metadata:lavfi.signalstats.SATMAX}
  39926. </pre></div>
  39927. </li></ul>
  39928. <a class="anchor" id="signature"></a></div>
  39929. </div>
  39930. <div class="section-level-extent" id="signature-1">
  39931. <h3 class="section"><span>32.239 signature<a class="copiable-link" href="#signature-1"> &para;</a></span></h3>
  39932. <p>Calculates the MPEG-7 Video Signature. The filter can handle more than one
  39933. input. In this case the matching between the inputs can be calculated additionally.
  39934. The filter always passes through the first input. The signature of each stream can
  39935. be written into a file.
  39936. </p>
  39937. <p>It accepts the following options:
  39938. </p>
  39939. <dl class="table">
  39940. <dt><samp class="option">detectmode</samp></dt>
  39941. <dd><p>Enable or disable the matching process.
  39942. </p>
  39943. <p>Available values are:
  39944. </p>
  39945. <dl class="table">
  39946. <dt>&lsquo;<samp class="samp">off</samp>&rsquo;</dt>
  39947. <dd><p>Disable the calculation of a matching (default).
  39948. </p></dd>
  39949. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  39950. <dd><p>Calculate the matching for the whole video and output whether the whole video
  39951. matches or only parts.
  39952. </p></dd>
  39953. <dt>&lsquo;<samp class="samp">fast</samp>&rsquo;</dt>
  39954. <dd><p>Calculate only until a matching is found or the video ends. Should be faster in
  39955. some cases.
  39956. </p></dd>
  39957. </dl>
  39958. </dd>
  39959. <dt><samp class="option">nb_inputs</samp></dt>
  39960. <dd><p>Set the number of inputs. The option value must be a non negative integer.
  39961. Default value is 1.
  39962. </p>
  39963. </dd>
  39964. <dt><samp class="option">filename</samp></dt>
  39965. <dd><p>Set the path to which the output is written. If there is more than one input,
  39966. the path must be a prototype, i.e. must contain %d or %0nd (where n is a positive
  39967. integer), that will be replaced with the input number. If no filename is
  39968. specified, no output will be written. This is the default.
  39969. </p>
  39970. </dd>
  39971. <dt><samp class="option">format</samp></dt>
  39972. <dd><p>Choose the output format.
  39973. </p>
  39974. <p>Available values are:
  39975. </p>
  39976. <dl class="table">
  39977. <dt>&lsquo;<samp class="samp">binary</samp>&rsquo;</dt>
  39978. <dd><p>Use the specified binary representation (default).
  39979. </p></dd>
  39980. <dt>&lsquo;<samp class="samp">xml</samp>&rsquo;</dt>
  39981. <dd><p>Use the specified xml representation.
  39982. </p></dd>
  39983. </dl>
  39984. </dd>
  39985. <dt><samp class="option">th_d</samp></dt>
  39986. <dd><p>Set threshold to detect one word as similar. The option value must be an integer
  39987. greater than zero. The default value is 9000.
  39988. </p>
  39989. </dd>
  39990. <dt><samp class="option">th_dc</samp></dt>
  39991. <dd><p>Set threshold to detect all words as similar. The option value must be an integer
  39992. greater than zero. The default value is 60000.
  39993. </p>
  39994. </dd>
  39995. <dt><samp class="option">th_xh</samp></dt>
  39996. <dd><p>Set threshold to detect frames as similar. The option value must be an integer
  39997. greater than zero. The default value is 116.
  39998. </p>
  39999. </dd>
  40000. <dt><samp class="option">th_di</samp></dt>
  40001. <dd><p>Set the minimum length of a sequence in frames to recognize it as matching
  40002. sequence. The option value must be a non negative integer value.
  40003. The default value is 0.
  40004. </p>
  40005. </dd>
  40006. <dt><samp class="option">th_it</samp></dt>
  40007. <dd><p>Set the minimum relation, that matching frames to all frames must have.
  40008. The option value must be a double value between 0 and 1. The default value is 0.5.
  40009. </p></dd>
  40010. </dl>
  40011. <ul class="mini-toc">
  40012. <li><a href="#Examples-140" accesskey="1">Examples</a></li>
  40013. </ul>
  40014. <div class="subsection-level-extent" id="Examples-140">
  40015. <h4 class="subsection"><span>32.239.1 Examples<a class="copiable-link" href="#Examples-140"> &para;</a></span></h4>
  40016. <ul class="itemize mark-bullet">
  40017. <li>To calculate the signature of an input video and store it in signature.bin:
  40018. <div class="example">
  40019. <pre class="example-preformatted">ffmpeg -i input.mkv -vf signature=filename=signature.bin -map 0:v -f null -
  40020. </pre></div>
  40021. </li><li>To detect whether two videos match and store the signatures in XML format in
  40022. signature0.xml and signature1.xml:
  40023. <div class="example">
  40024. <pre class="example-preformatted">ffmpeg -i input1.mkv -i input2.mkv -filter_complex &quot;[0:v][1:v] signature=nb_inputs=2:detectmode=full:format=xml:filename=signature%d.xml&quot; -map :v -f null -
  40025. </pre></div>
  40026. </li></ul>
  40027. <a class="anchor" id="siti"></a></div>
  40028. </div>
  40029. <div class="section-level-extent" id="siti-1">
  40030. <h3 class="section"><span>32.240 siti<a class="copiable-link" href="#siti-1"> &para;</a></span></h3>
  40031. <p>Calculate Spatial Information (SI) and Temporal Information (TI) scores for a video,
  40032. as defined in ITU-T Rec. P.910 (11/21): Subjective video quality assessment methods
  40033. for multimedia applications. Available PDF at <a class="url" href="https://www.itu.int/rec/T-REC-P.910-202111-S/en">https://www.itu.int/rec/T-REC-P.910-202111-S/en</a>.
  40034. Note that this is a legacy implementation that corresponds to a superseded recommendation.
  40035. Refer to ITU-T Rec. P.910 (07/22) for the latest version: <a class="url" href="https://www.itu.int/rec/T-REC-P.910-202207-I/en">https://www.itu.int/rec/T-REC-P.910-202207-I/en</a>
  40036. </p>
  40037. <p>It accepts the following option:
  40038. </p>
  40039. <dl class="table">
  40040. <dt><samp class="option">print_summary</samp></dt>
  40041. <dd><p>If set to 1, Summary statistics will be printed to the console. Default 0.
  40042. </p></dd>
  40043. </dl>
  40044. <ul class="mini-toc">
  40045. <li><a href="#Examples-141" accesskey="1">Examples</a></li>
  40046. </ul>
  40047. <div class="subsection-level-extent" id="Examples-141">
  40048. <h4 class="subsection"><span>32.240.1 Examples<a class="copiable-link" href="#Examples-141"> &para;</a></span></h4>
  40049. <ul class="itemize mark-bullet">
  40050. <li>To calculate SI/TI metrics and print summary:
  40051. <div class="example">
  40052. <pre class="example-preformatted">ffmpeg -i input.mp4 -vf siti=print_summary=1 -f null -
  40053. </pre></div>
  40054. </li></ul>
  40055. <a class="anchor" id="smartblur"></a></div>
  40056. </div>
  40057. <div class="section-level-extent" id="smartblur-1">
  40058. <h3 class="section"><span>32.241 smartblur<a class="copiable-link" href="#smartblur-1"> &para;</a></span></h3>
  40059. <p>Blur the input video without impacting the outlines.
  40060. </p>
  40061. <p>It accepts the following options:
  40062. </p>
  40063. <dl class="table">
  40064. <dt><samp class="option">luma_radius, lr</samp></dt>
  40065. <dd><p>Set the luma radius. The option value must be a float number in
  40066. the range [0.1,5.0] that specifies the variance of the gaussian filter
  40067. used to blur the image (slower if larger). Default value is 1.0.
  40068. </p>
  40069. </dd>
  40070. <dt><samp class="option">luma_strength, ls</samp></dt>
  40071. <dd><p>Set the luma strength. The option value must be a float number
  40072. in the range [-1.0,1.0] that configures the blurring. A value included
  40073. in [0.0,1.0] will blur the image whereas a value included in
  40074. [-1.0,0.0] will sharpen the image. Default value is 1.0.
  40075. </p>
  40076. </dd>
  40077. <dt><samp class="option">luma_threshold, lt</samp></dt>
  40078. <dd><p>Set the luma threshold used as a coefficient to determine
  40079. whether a pixel should be blurred or not. The option value must be an
  40080. integer in the range [-30,30]. A value of 0 will filter all the image,
  40081. a value included in [0,30] will filter flat areas and a value included
  40082. in [-30,0] will filter edges. Default value is 0.
  40083. </p>
  40084. </dd>
  40085. <dt><samp class="option">chroma_radius, cr</samp></dt>
  40086. <dd><p>Set the chroma radius. The option value must be a float number in
  40087. the range [0.1,5.0] that specifies the variance of the gaussian filter
  40088. used to blur the image (slower if larger). Default value is <samp class="option">luma_radius</samp>.
  40089. </p>
  40090. </dd>
  40091. <dt><samp class="option">chroma_strength, cs</samp></dt>
  40092. <dd><p>Set the chroma strength. The option value must be a float number
  40093. in the range [-1.0,1.0] that configures the blurring. A value included
  40094. in [0.0,1.0] will blur the image whereas a value included in
  40095. [-1.0,0.0] will sharpen the image. Default value is <samp class="option">luma_strength</samp>.
  40096. </p>
  40097. </dd>
  40098. <dt><samp class="option">chroma_threshold, ct</samp></dt>
  40099. <dd><p>Set the chroma threshold used as a coefficient to determine
  40100. whether a pixel should be blurred or not. The option value must be an
  40101. integer in the range [-30,30]. A value of 0 will filter all the image,
  40102. a value included in [0,30] will filter flat areas and a value included
  40103. in [-30,0] will filter edges. Default value is <samp class="option">luma_threshold</samp>.
  40104. </p></dd>
  40105. </dl>
  40106. <p>If a chroma option is not explicitly set, the corresponding luma value
  40107. is set.
  40108. </p>
  40109. </div>
  40110. <div class="section-level-extent" id="sobel">
  40111. <h3 class="section"><span>32.242 sobel<a class="copiable-link" href="#sobel"> &para;</a></span></h3>
  40112. <p>Apply sobel operator to input video stream.
  40113. </p>
  40114. <p>The filter accepts the following option:
  40115. </p>
  40116. <dl class="table">
  40117. <dt><samp class="option">planes</samp></dt>
  40118. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  40119. By default value 0xf, all planes will be processed.
  40120. </p>
  40121. </dd>
  40122. <dt><samp class="option">scale</samp></dt>
  40123. <dd><p>Set value which will be multiplied with filtered result.
  40124. </p>
  40125. </dd>
  40126. <dt><samp class="option">delta</samp></dt>
  40127. <dd><p>Set value which will be added to filtered result.
  40128. </p></dd>
  40129. </dl>
  40130. <ul class="mini-toc">
  40131. <li><a href="#Commands-143" accesskey="1">Commands</a></li>
  40132. </ul>
  40133. <div class="subsection-level-extent" id="Commands-143">
  40134. <h4 class="subsection"><span>32.242.1 Commands<a class="copiable-link" href="#Commands-143"> &para;</a></span></h4>
  40135. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  40136. </p>
  40137. <a class="anchor" id="spp"></a></div>
  40138. </div>
  40139. <div class="section-level-extent" id="spp-1">
  40140. <h3 class="section"><span>32.243 spp<a class="copiable-link" href="#spp-1"> &para;</a></span></h3>
  40141. <p>Apply a simple postprocessing filter that compresses and decompresses the image
  40142. at several (or - in the case of <samp class="option">quality</samp> level <code class="code">6</code> - all) shifts
  40143. and average the results.
  40144. </p>
  40145. <p>The filter accepts the following options:
  40146. </p>
  40147. <dl class="table">
  40148. <dt><samp class="option">quality</samp></dt>
  40149. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  40150. an integer in the range 0-6. If set to <code class="code">0</code>, the filter will have no
  40151. effect. A value of <code class="code">6</code> means the higher quality. For each increment of
  40152. that value the speed drops by a factor of approximately 2. Default value is
  40153. <code class="code">3</code>.
  40154. </p>
  40155. </dd>
  40156. <dt><samp class="option">qp</samp></dt>
  40157. <dd><p>Force a constant quantization parameter. If not set, the filter will use the QP
  40158. from the video stream (if available).
  40159. </p>
  40160. </dd>
  40161. <dt><samp class="option">mode</samp></dt>
  40162. <dd><p>Set thresholding mode. Available modes are:
  40163. </p>
  40164. <dl class="table">
  40165. <dt>&lsquo;<samp class="samp">hard</samp>&rsquo;</dt>
  40166. <dd><p>Set hard thresholding (default).
  40167. </p></dd>
  40168. <dt>&lsquo;<samp class="samp">soft</samp>&rsquo;</dt>
  40169. <dd><p>Set soft thresholding (better de-ringing effect, but likely blurrier).
  40170. </p></dd>
  40171. </dl>
  40172. </dd>
  40173. <dt><samp class="option">use_bframe_qp</samp></dt>
  40174. <dd><p>Enable the use of the QP from the B-Frames if set to <code class="code">1</code>. Using this
  40175. option may cause flicker since the B-Frames have often larger QP. Default is
  40176. <code class="code">0</code> (not enabled).
  40177. </p></dd>
  40178. </dl>
  40179. <ul class="mini-toc">
  40180. <li><a href="#Commands-144" accesskey="1">Commands</a></li>
  40181. </ul>
  40182. <div class="subsection-level-extent" id="Commands-144">
  40183. <h4 class="subsection"><span>32.243.1 Commands<a class="copiable-link" href="#Commands-144"> &para;</a></span></h4>
  40184. <p>This filter supports the following commands:
  40185. </p><dl class="table">
  40186. <dt><samp class="option">quality, level</samp></dt>
  40187. <dd><p>Set quality level. The value <code class="code">max</code> can be used to set the maximum level,
  40188. currently <code class="code">6</code>.
  40189. </p></dd>
  40190. </dl>
  40191. <a class="anchor" id="sr"></a></div>
  40192. </div>
  40193. <div class="section-level-extent" id="sr-1">
  40194. <h3 class="section"><span>32.244 sr<a class="copiable-link" href="#sr-1"> &para;</a></span></h3>
  40195. <p>Scale the input by applying one of the super-resolution methods based on
  40196. convolutional neural networks. Supported models:
  40197. </p>
  40198. <ul class="itemize mark-bullet">
  40199. <li>Super-Resolution Convolutional Neural Network model (SRCNN).
  40200. See <a class="url" href="https://arxiv.org/abs/1501.00092">https://arxiv.org/abs/1501.00092</a>.
  40201. </li><li>Efficient Sub-Pixel Convolutional Neural Network model (ESPCN).
  40202. See <a class="url" href="https://arxiv.org/abs/1609.05158">https://arxiv.org/abs/1609.05158</a>.
  40203. </li></ul>
  40204. <p>Training scripts as well as scripts for model file (.pb) saving can be found at
  40205. <a class="url" href="https://github.com/XueweiMeng/sr/tree/sr_dnn_native">https://github.com/XueweiMeng/sr/tree/sr_dnn_native</a>. Original repository
  40206. is at <a class="url" href="https://github.com/HighVoltageRocknRoll/sr.git">https://github.com/HighVoltageRocknRoll/sr.git</a>.
  40207. </p>
  40208. <p>The filter accepts the following options:
  40209. </p>
  40210. <dl class="table">
  40211. <dt><samp class="option">dnn_backend</samp></dt>
  40212. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  40213. the following values:
  40214. </p>
  40215. <dl class="table">
  40216. <dt>&lsquo;<samp class="samp">tensorflow</samp>&rsquo;</dt>
  40217. <dd><p>TensorFlow backend. To enable this backend you
  40218. need to install the TensorFlow for C library (see
  40219. <a class="url" href="https://www.tensorflow.org/install/lang_c">https://www.tensorflow.org/install/lang_c</a>) and configure FFmpeg with
  40220. <code class="code">--enable-libtensorflow</code>
  40221. </p></dd>
  40222. </dl>
  40223. </dd>
  40224. <dt><samp class="option">model</samp></dt>
  40225. <dd><p>Set path to model file specifying network architecture and its parameters.
  40226. Note that different backends use different file formats. TensorFlow, OpenVINO backend
  40227. can load files for only its format.
  40228. </p>
  40229. </dd>
  40230. <dt><samp class="option">scale_factor</samp></dt>
  40231. <dd><p>Set scale factor for SRCNN model. Allowed values are <code class="code">2</code>, <code class="code">3</code> and <code class="code">4</code>.
  40232. Default value is <code class="code">2</code>. Scale factor is necessary for SRCNN model, because it accepts
  40233. input upscaled using bicubic upscaling with proper scale factor.
  40234. </p></dd>
  40235. </dl>
  40236. <p>To get full functionality (such as async execution), please use the <a class="ref" href="#dnn_005fprocessing">dnn_processing</a> filter.
  40237. </p>
  40238. </div>
  40239. <div class="section-level-extent" id="ssim">
  40240. <h3 class="section"><span>32.245 ssim<a class="copiable-link" href="#ssim"> &para;</a></span></h3>
  40241. <p>Obtain the SSIM (Structural SImilarity Metric) between two input videos.
  40242. </p>
  40243. <p>This filter takes in input two input videos, the first input is
  40244. considered the &quot;main&quot; source and is passed unchanged to the
  40245. output. The second input is used as a &quot;reference&quot; video for computing
  40246. the SSIM.
  40247. </p>
  40248. <p>Both video inputs must have the same resolution and pixel format for
  40249. this filter to work correctly. Also it assumes that both inputs
  40250. have the same number of frames, which are compared one by one.
  40251. </p>
  40252. <p>The filter stores the calculated SSIM of each frame.
  40253. </p>
  40254. <p>The description of the accepted parameters follows.
  40255. </p>
  40256. <dl class="table">
  40257. <dt><samp class="option">stats_file, f</samp></dt>
  40258. <dd><p>If specified the filter will use the named file to save the SSIM of
  40259. each individual frame. When filename equals &quot;-&quot; the data is sent to
  40260. standard output.
  40261. </p></dd>
  40262. </dl>
  40263. <p>The file printed if <var class="var">stats_file</var> is selected, contains a sequence of
  40264. key/value pairs of the form <var class="var">key</var>:<var class="var">value</var> for each compared
  40265. couple of frames.
  40266. </p>
  40267. <p>A description of each shown parameter follows:
  40268. </p>
  40269. <dl class="table">
  40270. <dt><samp class="option">n</samp></dt>
  40271. <dd><p>sequential number of the input frame, starting from 1
  40272. </p>
  40273. </dd>
  40274. <dt><samp class="option">Y, U, V, R, G, B</samp></dt>
  40275. <dd><p>SSIM of the compared frames for the component specified by the suffix.
  40276. </p>
  40277. </dd>
  40278. <dt><samp class="option">All</samp></dt>
  40279. <dd><p>SSIM of the compared frames for the whole frame.
  40280. </p>
  40281. </dd>
  40282. <dt><samp class="option">dB</samp></dt>
  40283. <dd><p>Same as above but in dB representation.
  40284. </p></dd>
  40285. </dl>
  40286. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  40287. </p>
  40288. <ul class="mini-toc">
  40289. <li><a href="#Examples-142" accesskey="1">Examples</a></li>
  40290. </ul>
  40291. <div class="subsection-level-extent" id="Examples-142">
  40292. <h4 class="subsection"><span>32.245.1 Examples<a class="copiable-link" href="#Examples-142"> &para;</a></span></h4>
  40293. <ul class="itemize mark-bullet">
  40294. <li>For example:
  40295. <div class="example">
  40296. <pre class="example-preformatted">movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
  40297. [main][ref] ssim=&quot;stats_file=stats.log&quot; [out]
  40298. </pre></div>
  40299. <p>On this example the input file being processed is compared with the
  40300. reference file <samp class="file">ref_movie.mpg</samp>. The SSIM of each individual frame
  40301. is stored in <samp class="file">stats.log</samp>.
  40302. </p>
  40303. </li><li>Another example with both psnr and ssim at same time:
  40304. <div class="example">
  40305. <pre class="example-preformatted">ffmpeg -i main.mpg -i ref.mpg -lavfi &quot;ssim;[0:v][1:v]psnr&quot; -f null -
  40306. </pre></div>
  40307. </li><li>Another example with different containers:
  40308. <div class="example">
  40309. <pre class="example-preformatted">ffmpeg -i main.mpg -i ref.mkv -lavfi &quot;[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]ssim&quot; -f null -
  40310. </pre></div>
  40311. </li></ul>
  40312. </div>
  40313. </div>
  40314. <div class="section-level-extent" id="stereo3d">
  40315. <h3 class="section"><span>32.246 stereo3d<a class="copiable-link" href="#stereo3d"> &para;</a></span></h3>
  40316. <p>Convert between different stereoscopic image formats.
  40317. </p>
  40318. <p>The filters accept the following options:
  40319. </p>
  40320. <dl class="table">
  40321. <dt><samp class="option">in</samp></dt>
  40322. <dd><p>Set stereoscopic image format of input.
  40323. </p>
  40324. <p>Available values for input image formats are:
  40325. </p><dl class="table">
  40326. <dt>&lsquo;<samp class="samp">sbsl</samp>&rsquo;</dt>
  40327. <dd><p>side by side parallel (left eye left, right eye right)
  40328. </p>
  40329. </dd>
  40330. <dt>&lsquo;<samp class="samp">sbsr</samp>&rsquo;</dt>
  40331. <dd><p>side by side crosseye (right eye left, left eye right)
  40332. </p>
  40333. </dd>
  40334. <dt>&lsquo;<samp class="samp">sbs2l</samp>&rsquo;</dt>
  40335. <dd><p>side by side parallel with half width resolution
  40336. (left eye left, right eye right)
  40337. </p>
  40338. </dd>
  40339. <dt>&lsquo;<samp class="samp">sbs2r</samp>&rsquo;</dt>
  40340. <dd><p>side by side crosseye with half width resolution
  40341. (right eye left, left eye right)
  40342. </p>
  40343. </dd>
  40344. <dt>&lsquo;<samp class="samp">abl</samp>&rsquo;</dt>
  40345. <dt>&lsquo;<samp class="samp">tbl</samp>&rsquo;</dt>
  40346. <dd><p>above-below (left eye above, right eye below)
  40347. </p>
  40348. </dd>
  40349. <dt>&lsquo;<samp class="samp">abr</samp>&rsquo;</dt>
  40350. <dt>&lsquo;<samp class="samp">tbr</samp>&rsquo;</dt>
  40351. <dd><p>above-below (right eye above, left eye below)
  40352. </p>
  40353. </dd>
  40354. <dt>&lsquo;<samp class="samp">ab2l</samp>&rsquo;</dt>
  40355. <dt>&lsquo;<samp class="samp">tb2l</samp>&rsquo;</dt>
  40356. <dd><p>above-below with half height resolution
  40357. (left eye above, right eye below)
  40358. </p>
  40359. </dd>
  40360. <dt>&lsquo;<samp class="samp">ab2r</samp>&rsquo;</dt>
  40361. <dt>&lsquo;<samp class="samp">tb2r</samp>&rsquo;</dt>
  40362. <dd><p>above-below with half height resolution
  40363. (right eye above, left eye below)
  40364. </p>
  40365. </dd>
  40366. <dt>&lsquo;<samp class="samp">al</samp>&rsquo;</dt>
  40367. <dd><p>alternating frames (left eye first, right eye second)
  40368. </p>
  40369. </dd>
  40370. <dt>&lsquo;<samp class="samp">ar</samp>&rsquo;</dt>
  40371. <dd><p>alternating frames (right eye first, left eye second)
  40372. </p>
  40373. </dd>
  40374. <dt>&lsquo;<samp class="samp">irl</samp>&rsquo;</dt>
  40375. <dd><p>interleaved rows (left eye has top row, right eye starts on next row)
  40376. </p>
  40377. </dd>
  40378. <dt>&lsquo;<samp class="samp">irr</samp>&rsquo;</dt>
  40379. <dd><p>interleaved rows (right eye has top row, left eye starts on next row)
  40380. </p>
  40381. </dd>
  40382. <dt>&lsquo;<samp class="samp">icl</samp>&rsquo;</dt>
  40383. <dd><p>interleaved columns, left eye first
  40384. </p>
  40385. </dd>
  40386. <dt>&lsquo;<samp class="samp">icr</samp>&rsquo;</dt>
  40387. <dd><p>interleaved columns, right eye first
  40388. </p>
  40389. <p>Default value is &lsquo;<samp class="samp">sbsl</samp>&rsquo;.
  40390. </p></dd>
  40391. </dl>
  40392. </dd>
  40393. <dt><samp class="option">out</samp></dt>
  40394. <dd><p>Set stereoscopic image format of output.
  40395. </p>
  40396. <dl class="table">
  40397. <dt>&lsquo;<samp class="samp">sbsl</samp>&rsquo;</dt>
  40398. <dd><p>side by side parallel (left eye left, right eye right)
  40399. </p>
  40400. </dd>
  40401. <dt>&lsquo;<samp class="samp">sbsr</samp>&rsquo;</dt>
  40402. <dd><p>side by side crosseye (right eye left, left eye right)
  40403. </p>
  40404. </dd>
  40405. <dt>&lsquo;<samp class="samp">sbs2l</samp>&rsquo;</dt>
  40406. <dd><p>side by side parallel with half width resolution
  40407. (left eye left, right eye right)
  40408. </p>
  40409. </dd>
  40410. <dt>&lsquo;<samp class="samp">sbs2r</samp>&rsquo;</dt>
  40411. <dd><p>side by side crosseye with half width resolution
  40412. (right eye left, left eye right)
  40413. </p>
  40414. </dd>
  40415. <dt>&lsquo;<samp class="samp">abl</samp>&rsquo;</dt>
  40416. <dt>&lsquo;<samp class="samp">tbl</samp>&rsquo;</dt>
  40417. <dd><p>above-below (left eye above, right eye below)
  40418. </p>
  40419. </dd>
  40420. <dt>&lsquo;<samp class="samp">abr</samp>&rsquo;</dt>
  40421. <dt>&lsquo;<samp class="samp">tbr</samp>&rsquo;</dt>
  40422. <dd><p>above-below (right eye above, left eye below)
  40423. </p>
  40424. </dd>
  40425. <dt>&lsquo;<samp class="samp">ab2l</samp>&rsquo;</dt>
  40426. <dt>&lsquo;<samp class="samp">tb2l</samp>&rsquo;</dt>
  40427. <dd><p>above-below with half height resolution
  40428. (left eye above, right eye below)
  40429. </p>
  40430. </dd>
  40431. <dt>&lsquo;<samp class="samp">ab2r</samp>&rsquo;</dt>
  40432. <dt>&lsquo;<samp class="samp">tb2r</samp>&rsquo;</dt>
  40433. <dd><p>above-below with half height resolution
  40434. (right eye above, left eye below)
  40435. </p>
  40436. </dd>
  40437. <dt>&lsquo;<samp class="samp">al</samp>&rsquo;</dt>
  40438. <dd><p>alternating frames (left eye first, right eye second)
  40439. </p>
  40440. </dd>
  40441. <dt>&lsquo;<samp class="samp">ar</samp>&rsquo;</dt>
  40442. <dd><p>alternating frames (right eye first, left eye second)
  40443. </p>
  40444. </dd>
  40445. <dt>&lsquo;<samp class="samp">irl</samp>&rsquo;</dt>
  40446. <dd><p>interleaved rows (left eye has top row, right eye starts on next row)
  40447. </p>
  40448. </dd>
  40449. <dt>&lsquo;<samp class="samp">irr</samp>&rsquo;</dt>
  40450. <dd><p>interleaved rows (right eye has top row, left eye starts on next row)
  40451. </p>
  40452. </dd>
  40453. <dt>&lsquo;<samp class="samp">arbg</samp>&rsquo;</dt>
  40454. <dd><p>anaglyph red/blue gray
  40455. (red filter on left eye, blue filter on right eye)
  40456. </p>
  40457. </dd>
  40458. <dt>&lsquo;<samp class="samp">argg</samp>&rsquo;</dt>
  40459. <dd><p>anaglyph red/green gray
  40460. (red filter on left eye, green filter on right eye)
  40461. </p>
  40462. </dd>
  40463. <dt>&lsquo;<samp class="samp">arcg</samp>&rsquo;</dt>
  40464. <dd><p>anaglyph red/cyan gray
  40465. (red filter on left eye, cyan filter on right eye)
  40466. </p>
  40467. </dd>
  40468. <dt>&lsquo;<samp class="samp">arch</samp>&rsquo;</dt>
  40469. <dd><p>anaglyph red/cyan half colored
  40470. (red filter on left eye, cyan filter on right eye)
  40471. </p>
  40472. </dd>
  40473. <dt>&lsquo;<samp class="samp">arcc</samp>&rsquo;</dt>
  40474. <dd><p>anaglyph red/cyan color
  40475. (red filter on left eye, cyan filter on right eye)
  40476. </p>
  40477. </dd>
  40478. <dt>&lsquo;<samp class="samp">arcd</samp>&rsquo;</dt>
  40479. <dd><p>anaglyph red/cyan color optimized with the least squares projection of dubois
  40480. (red filter on left eye, cyan filter on right eye)
  40481. </p>
  40482. </dd>
  40483. <dt>&lsquo;<samp class="samp">agmg</samp>&rsquo;</dt>
  40484. <dd><p>anaglyph green/magenta gray
  40485. (green filter on left eye, magenta filter on right eye)
  40486. </p>
  40487. </dd>
  40488. <dt>&lsquo;<samp class="samp">agmh</samp>&rsquo;</dt>
  40489. <dd><p>anaglyph green/magenta half colored
  40490. (green filter on left eye, magenta filter on right eye)
  40491. </p>
  40492. </dd>
  40493. <dt>&lsquo;<samp class="samp">agmc</samp>&rsquo;</dt>
  40494. <dd><p>anaglyph green/magenta colored
  40495. (green filter on left eye, magenta filter on right eye)
  40496. </p>
  40497. </dd>
  40498. <dt>&lsquo;<samp class="samp">agmd</samp>&rsquo;</dt>
  40499. <dd><p>anaglyph green/magenta color optimized with the least squares projection of dubois
  40500. (green filter on left eye, magenta filter on right eye)
  40501. </p>
  40502. </dd>
  40503. <dt>&lsquo;<samp class="samp">aybg</samp>&rsquo;</dt>
  40504. <dd><p>anaglyph yellow/blue gray
  40505. (yellow filter on left eye, blue filter on right eye)
  40506. </p>
  40507. </dd>
  40508. <dt>&lsquo;<samp class="samp">aybh</samp>&rsquo;</dt>
  40509. <dd><p>anaglyph yellow/blue half colored
  40510. (yellow filter on left eye, blue filter on right eye)
  40511. </p>
  40512. </dd>
  40513. <dt>&lsquo;<samp class="samp">aybc</samp>&rsquo;</dt>
  40514. <dd><p>anaglyph yellow/blue colored
  40515. (yellow filter on left eye, blue filter on right eye)
  40516. </p>
  40517. </dd>
  40518. <dt>&lsquo;<samp class="samp">aybd</samp>&rsquo;</dt>
  40519. <dd><p>anaglyph yellow/blue color optimized with the least squares projection of dubois
  40520. (yellow filter on left eye, blue filter on right eye)
  40521. </p>
  40522. </dd>
  40523. <dt>&lsquo;<samp class="samp">ml</samp>&rsquo;</dt>
  40524. <dd><p>mono output (left eye only)
  40525. </p>
  40526. </dd>
  40527. <dt>&lsquo;<samp class="samp">mr</samp>&rsquo;</dt>
  40528. <dd><p>mono output (right eye only)
  40529. </p>
  40530. </dd>
  40531. <dt>&lsquo;<samp class="samp">chl</samp>&rsquo;</dt>
  40532. <dd><p>checkerboard, left eye first
  40533. </p>
  40534. </dd>
  40535. <dt>&lsquo;<samp class="samp">chr</samp>&rsquo;</dt>
  40536. <dd><p>checkerboard, right eye first
  40537. </p>
  40538. </dd>
  40539. <dt>&lsquo;<samp class="samp">icl</samp>&rsquo;</dt>
  40540. <dd><p>interleaved columns, left eye first
  40541. </p>
  40542. </dd>
  40543. <dt>&lsquo;<samp class="samp">icr</samp>&rsquo;</dt>
  40544. <dd><p>interleaved columns, right eye first
  40545. </p>
  40546. </dd>
  40547. <dt>&lsquo;<samp class="samp">hdmi</samp>&rsquo;</dt>
  40548. <dd><p>HDMI frame pack
  40549. </p></dd>
  40550. </dl>
  40551. <p>Default value is &lsquo;<samp class="samp">arcd</samp>&rsquo;.
  40552. </p></dd>
  40553. </dl>
  40554. <ul class="mini-toc">
  40555. <li><a href="#Examples-143" accesskey="1">Examples</a></li>
  40556. </ul>
  40557. <div class="subsection-level-extent" id="Examples-143">
  40558. <h4 class="subsection"><span>32.246.1 Examples<a class="copiable-link" href="#Examples-143"> &para;</a></span></h4>
  40559. <ul class="itemize mark-bullet">
  40560. <li>Convert input video from side by side parallel to anaglyph yellow/blue dubois:
  40561. <div class="example">
  40562. <pre class="example-preformatted">stereo3d=sbsl:aybd
  40563. </pre></div>
  40564. </li><li>Convert input video from above below (left eye above, right eye below) to side by side crosseye.
  40565. <div class="example">
  40566. <pre class="example-preformatted">stereo3d=abl:sbsr
  40567. </pre></div>
  40568. </li></ul>
  40569. </div>
  40570. </div>
  40571. <div class="section-level-extent" id="streamselect_002c-astreamselect">
  40572. <h3 class="section"><span>32.247 streamselect, astreamselect<a class="copiable-link" href="#streamselect_002c-astreamselect"> &para;</a></span></h3>
  40573. <p>Select video or audio streams.
  40574. </p>
  40575. <p>The filter accepts the following options:
  40576. </p>
  40577. <dl class="table">
  40578. <dt><samp class="option">inputs</samp></dt>
  40579. <dd><p>Set number of inputs. Default is 2.
  40580. </p>
  40581. </dd>
  40582. <dt><samp class="option">map</samp></dt>
  40583. <dd><p>Set input indexes to remap to outputs.
  40584. </p></dd>
  40585. </dl>
  40586. <ul class="mini-toc">
  40587. <li><a href="#Commands-145" accesskey="1">Commands</a></li>
  40588. <li><a href="#Examples-144" accesskey="2">Examples</a></li>
  40589. </ul>
  40590. <div class="subsection-level-extent" id="Commands-145">
  40591. <h4 class="subsection"><span>32.247.1 Commands<a class="copiable-link" href="#Commands-145"> &para;</a></span></h4>
  40592. <p>The <code class="code">streamselect</code> and <code class="code">astreamselect</code> filter supports the following
  40593. commands:
  40594. </p>
  40595. <dl class="table">
  40596. <dt><samp class="option">map</samp></dt>
  40597. <dd><p>Set input indexes to remap to outputs.
  40598. </p></dd>
  40599. </dl>
  40600. </div>
  40601. <div class="subsection-level-extent" id="Examples-144">
  40602. <h4 class="subsection"><span>32.247.2 Examples<a class="copiable-link" href="#Examples-144"> &para;</a></span></h4>
  40603. <ul class="itemize mark-bullet">
  40604. <li>Select first 5 seconds 1st stream and rest of time 2nd stream:
  40605. <div class="example">
  40606. <pre class="example-preformatted">sendcmd='5.0 streamselect map 1',streamselect=inputs=2:map=0
  40607. </pre></div>
  40608. </li><li>Same as above, but for audio:
  40609. <div class="example">
  40610. <pre class="example-preformatted">asendcmd='5.0 astreamselect map 1',astreamselect=inputs=2:map=0
  40611. </pre></div>
  40612. </li></ul>
  40613. <a class="anchor" id="subtitles"></a></div>
  40614. </div>
  40615. <div class="section-level-extent" id="subtitles-1">
  40616. <h3 class="section"><span>32.248 subtitles<a class="copiable-link" href="#subtitles-1"> &para;</a></span></h3>
  40617. <p>Draw subtitles on top of input video using the libass library.
  40618. </p>
  40619. <p>To enable compilation of this filter you need to configure FFmpeg with
  40620. <code class="code">--enable-libass</code>. This filter also requires a build with libavcodec and
  40621. libavformat to convert the passed subtitles file to ASS (Advanced Substation
  40622. Alpha) subtitles format.
  40623. </p>
  40624. <p>The filter accepts the following options:
  40625. </p>
  40626. <dl class="table">
  40627. <dt><samp class="option">filename, f</samp></dt>
  40628. <dd><p>Set the filename of the subtitle file to read. It must be specified.
  40629. </p>
  40630. </dd>
  40631. <dt><samp class="option">original_size</samp></dt>
  40632. <dd><p>Specify the size of the original video, the video for which the ASS file
  40633. was composed. For the syntax of this option, check the
  40634. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  40635. Due to a misdesign in ASS aspect ratio arithmetic, this is necessary to
  40636. correctly scale the fonts if the aspect ratio has been changed.
  40637. </p>
  40638. </dd>
  40639. <dt><samp class="option">fontsdir</samp></dt>
  40640. <dd><p>Set a directory path containing fonts that can be used by the filter.
  40641. These fonts will be used in addition to whatever the font provider uses.
  40642. </p>
  40643. </dd>
  40644. <dt><samp class="option">alpha</samp></dt>
  40645. <dd><p>Process alpha channel, by default alpha channel is untouched.
  40646. </p>
  40647. </dd>
  40648. <dt><samp class="option">charenc</samp></dt>
  40649. <dd><p>Set subtitles input character encoding. <code class="code">subtitles</code> filter only. Only
  40650. useful if not UTF-8.
  40651. </p>
  40652. </dd>
  40653. <dt><samp class="option">stream_index, si</samp></dt>
  40654. <dd><p>Set subtitles stream index. <code class="code">subtitles</code> filter only.
  40655. </p>
  40656. </dd>
  40657. <dt><samp class="option">force_style</samp></dt>
  40658. <dd><p>Override default style or script info parameters of the subtitles. It accepts a
  40659. string containing ASS style format <code class="code">KEY=VALUE</code> couples separated by &quot;,&quot;.
  40660. </p>
  40661. </dd>
  40662. <dt><samp class="option">wrap_unicode</samp></dt>
  40663. <dd><p>Break lines according to the Unicode Line Breaking Algorithm. Availability requires
  40664. at least libass release 0.17.0 (or LIBASS_VERSION 0x01600010), <em class="emph">and</em> libass must
  40665. have been built with libunibreak.
  40666. </p>
  40667. <p>The option is enabled by default except for native ASS.
  40668. </p></dd>
  40669. </dl>
  40670. <p>If the first key is not specified, it is assumed that the first value
  40671. specifies the <samp class="option">filename</samp>.
  40672. </p>
  40673. <p>For example, to render the file <samp class="file">sub.srt</samp> on top of the input
  40674. video, use the command:
  40675. </p><div class="example">
  40676. <pre class="example-preformatted">subtitles=sub.srt
  40677. </pre></div>
  40678. <p>which is equivalent to:
  40679. </p><div class="example">
  40680. <pre class="example-preformatted">subtitles=filename=sub.srt
  40681. </pre></div>
  40682. <p>To render the default subtitles stream from file <samp class="file">video.mkv</samp>, use:
  40683. </p><div class="example">
  40684. <pre class="example-preformatted">subtitles=video.mkv
  40685. </pre></div>
  40686. <p>To render the second subtitles stream from that file, use:
  40687. </p><div class="example">
  40688. <pre class="example-preformatted">subtitles=video.mkv:si=1
  40689. </pre></div>
  40690. <p>To make the subtitles stream from <samp class="file">sub.srt</samp> appear in 80% transparent blue
  40691. <code class="code">DejaVu Serif</code>, use:
  40692. </p><div class="example">
  40693. <pre class="example-preformatted">subtitles=sub.srt:force_style='Fontname=DejaVu Serif,PrimaryColour=&amp;HCCFF0000'
  40694. </pre></div>
  40695. </div>
  40696. <div class="section-level-extent" id="super2xsai">
  40697. <h3 class="section"><span>32.249 super2xsai<a class="copiable-link" href="#super2xsai"> &para;</a></span></h3>
  40698. <p>Scale the input by 2x and smooth using the Super2xSaI (Scale and
  40699. Interpolate) pixel art scaling algorithm.
  40700. </p>
  40701. <p>Useful for enlarging pixel art images without reducing sharpness.
  40702. </p>
  40703. </div>
  40704. <div class="section-level-extent" id="swaprect">
  40705. <h3 class="section"><span>32.250 swaprect<a class="copiable-link" href="#swaprect"> &para;</a></span></h3>
  40706. <p>Swap two rectangular objects in video.
  40707. </p>
  40708. <p>This filter accepts the following options:
  40709. </p>
  40710. <dl class="table">
  40711. <dt><samp class="option">w</samp></dt>
  40712. <dd><p>Set object width.
  40713. </p>
  40714. </dd>
  40715. <dt><samp class="option">h</samp></dt>
  40716. <dd><p>Set object height.
  40717. </p>
  40718. </dd>
  40719. <dt><samp class="option">x1</samp></dt>
  40720. <dd><p>Set 1st rect x coordinate.
  40721. </p>
  40722. </dd>
  40723. <dt><samp class="option">y1</samp></dt>
  40724. <dd><p>Set 1st rect y coordinate.
  40725. </p>
  40726. </dd>
  40727. <dt><samp class="option">x2</samp></dt>
  40728. <dd><p>Set 2nd rect x coordinate.
  40729. </p>
  40730. </dd>
  40731. <dt><samp class="option">y2</samp></dt>
  40732. <dd><p>Set 2nd rect y coordinate.
  40733. </p>
  40734. <p>All expressions are evaluated once for each frame.
  40735. </p></dd>
  40736. </dl>
  40737. <p>The all options are expressions containing the following constants:
  40738. </p>
  40739. <dl class="table">
  40740. <dt><samp class="option">w</samp></dt>
  40741. <dt><samp class="option">h</samp></dt>
  40742. <dd><p>The input width and height.
  40743. </p>
  40744. </dd>
  40745. <dt><samp class="option">a</samp></dt>
  40746. <dd><p>same as <var class="var">w</var> / <var class="var">h</var>
  40747. </p>
  40748. </dd>
  40749. <dt><samp class="option">sar</samp></dt>
  40750. <dd><p>input sample aspect ratio
  40751. </p>
  40752. </dd>
  40753. <dt><samp class="option">dar</samp></dt>
  40754. <dd><p>input display aspect ratio, it is the same as (<var class="var">w</var> / <var class="var">h</var>) * <var class="var">sar</var>
  40755. </p>
  40756. </dd>
  40757. <dt><samp class="option">n</samp></dt>
  40758. <dd><p>The number of the input frame, starting from 0.
  40759. </p>
  40760. </dd>
  40761. <dt><samp class="option">t</samp></dt>
  40762. <dd><p>The timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  40763. </p>
  40764. </dd>
  40765. <dt><samp class="option">pos</samp></dt>
  40766. <dd><p>the position in the file of the input frame, NAN if unknown; deprecated,
  40767. do not use
  40768. </p></dd>
  40769. </dl>
  40770. <ul class="mini-toc">
  40771. <li><a href="#Commands-146" accesskey="1">Commands</a></li>
  40772. </ul>
  40773. <div class="subsection-level-extent" id="Commands-146">
  40774. <h4 class="subsection"><span>32.250.1 Commands<a class="copiable-link" href="#Commands-146"> &para;</a></span></h4>
  40775. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  40776. </p>
  40777. </div>
  40778. </div>
  40779. <div class="section-level-extent" id="swapuv">
  40780. <h3 class="section"><span>32.251 swapuv<a class="copiable-link" href="#swapuv"> &para;</a></span></h3>
  40781. <p>Swap U &amp; V plane.
  40782. </p>
  40783. </div>
  40784. <div class="section-level-extent" id="tblend">
  40785. <h3 class="section"><span>32.252 tblend<a class="copiable-link" href="#tblend"> &para;</a></span></h3>
  40786. <p>Blend successive video frames.
  40787. </p>
  40788. <p>See <a class="ref" href="#blend">blend</a>
  40789. </p>
  40790. </div>
  40791. <div class="section-level-extent" id="telecine">
  40792. <h3 class="section"><span>32.253 telecine<a class="copiable-link" href="#telecine"> &para;</a></span></h3>
  40793. <p>Apply telecine process to the video.
  40794. </p>
  40795. <p>This filter accepts the following options:
  40796. </p>
  40797. <dl class="table">
  40798. <dt><samp class="option">first_field</samp></dt>
  40799. <dd><dl class="table">
  40800. <dt>&lsquo;<samp class="samp">top, t</samp>&rsquo;</dt>
  40801. <dd><p>top field first
  40802. </p></dd>
  40803. <dt>&lsquo;<samp class="samp">bottom, b</samp>&rsquo;</dt>
  40804. <dd><p>bottom field first
  40805. The default value is <code class="code">top</code>.
  40806. </p></dd>
  40807. </dl>
  40808. </dd>
  40809. <dt><samp class="option">pattern</samp></dt>
  40810. <dd><p>A string of numbers representing the pulldown pattern you wish to apply.
  40811. The default value is <code class="code">23</code>.
  40812. </p></dd>
  40813. </dl>
  40814. <div class="example">
  40815. <pre class="example-preformatted">Some typical patterns:
  40816. NTSC output (30i):
  40817. 27.5p: 32222
  40818. 24p: 23 (classic)
  40819. 24p: 2332 (preferred)
  40820. 20p: 33
  40821. 18p: 334
  40822. 16p: 3444
  40823. PAL output (25i):
  40824. 27.5p: 12222
  40825. 24p: 222222222223 (&quot;Euro pulldown&quot;)
  40826. 16.67p: 33
  40827. 16p: 33333334
  40828. </pre></div>
  40829. </div>
  40830. <div class="section-level-extent" id="thistogram">
  40831. <h3 class="section"><span>32.254 thistogram<a class="copiable-link" href="#thistogram"> &para;</a></span></h3>
  40832. <p>Compute and draw a color distribution histogram for the input video across time.
  40833. </p>
  40834. <p>Unlike <a class="ref" href="#histogram">histogram</a> video filter which only shows histogram of single input frame
  40835. at certain time, this filter shows also past histograms of number of frames defined
  40836. by <code class="code">width</code> option.
  40837. </p>
  40838. <p>The computed histogram is a representation of the color component
  40839. distribution in an image.
  40840. </p>
  40841. <p>The filter accepts the following options:
  40842. </p>
  40843. <dl class="table">
  40844. <dt><samp class="option">width, w</samp></dt>
  40845. <dd><p>Set width of single color component output. Default value is <code class="code">0</code>.
  40846. Value of <code class="code">0</code> means width will be picked from input video.
  40847. This also set number of passed histograms to keep.
  40848. Allowed range is [0, 8192].
  40849. </p>
  40850. </dd>
  40851. <dt><samp class="option">display_mode, d</samp></dt>
  40852. <dd><p>Set display mode.
  40853. It accepts the following values:
  40854. </p><dl class="table">
  40855. <dt>&lsquo;<samp class="samp">stack</samp>&rsquo;</dt>
  40856. <dd><p>Per color component graphs are placed below each other.
  40857. </p>
  40858. </dd>
  40859. <dt>&lsquo;<samp class="samp">parade</samp>&rsquo;</dt>
  40860. <dd><p>Per color component graphs are placed side by side.
  40861. </p>
  40862. </dd>
  40863. <dt>&lsquo;<samp class="samp">overlay</samp>&rsquo;</dt>
  40864. <dd><p>Presents information identical to that in the <code class="code">parade</code>, except
  40865. that the graphs representing color components are superimposed directly
  40866. over one another.
  40867. </p></dd>
  40868. </dl>
  40869. <p>Default is <code class="code">stack</code>.
  40870. </p>
  40871. </dd>
  40872. <dt><samp class="option">levels_mode, m</samp></dt>
  40873. <dd><p>Set mode. Can be either <code class="code">linear</code>, or <code class="code">logarithmic</code>.
  40874. Default is <code class="code">linear</code>.
  40875. </p>
  40876. </dd>
  40877. <dt><samp class="option">components, c</samp></dt>
  40878. <dd><p>Set what color components to display.
  40879. Default is <code class="code">7</code>.
  40880. </p>
  40881. </dd>
  40882. <dt><samp class="option">bgopacity, b</samp></dt>
  40883. <dd><p>Set background opacity. Default is <code class="code">0.9</code>.
  40884. </p>
  40885. </dd>
  40886. <dt><samp class="option">envelope, e</samp></dt>
  40887. <dd><p>Show envelope. Default is disabled.
  40888. </p>
  40889. </dd>
  40890. <dt><samp class="option">ecolor, ec</samp></dt>
  40891. <dd><p>Set envelope color. Default is <code class="code">gold</code>.
  40892. </p>
  40893. </dd>
  40894. <dt><samp class="option">slide</samp></dt>
  40895. <dd><p>Set slide mode.
  40896. </p>
  40897. <p>Available values for slide is:
  40898. </p><dl class="table">
  40899. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  40900. <dd><p>Draw new frame when right border is reached.
  40901. </p>
  40902. </dd>
  40903. <dt>&lsquo;<samp class="samp">replace</samp>&rsquo;</dt>
  40904. <dd><p>Replace old columns with new ones.
  40905. </p>
  40906. </dd>
  40907. <dt>&lsquo;<samp class="samp">scroll</samp>&rsquo;</dt>
  40908. <dd><p>Scroll from right to left.
  40909. </p>
  40910. </dd>
  40911. <dt>&lsquo;<samp class="samp">rscroll</samp>&rsquo;</dt>
  40912. <dd><p>Scroll from left to right.
  40913. </p>
  40914. </dd>
  40915. <dt>&lsquo;<samp class="samp">picture</samp>&rsquo;</dt>
  40916. <dd><p>Draw single picture.
  40917. </p></dd>
  40918. </dl>
  40919. <p>Default is <code class="code">replace</code>.
  40920. </p></dd>
  40921. </dl>
  40922. </div>
  40923. <div class="section-level-extent" id="threshold">
  40924. <h3 class="section"><span>32.255 threshold<a class="copiable-link" href="#threshold"> &para;</a></span></h3>
  40925. <p>Apply threshold effect to video stream.
  40926. </p>
  40927. <p>This filter needs four video streams to perform thresholding.
  40928. First stream is stream we are filtering.
  40929. Second stream is holding threshold values, third stream is holding min values,
  40930. and last, fourth stream is holding max values.
  40931. </p>
  40932. <p>The filter accepts the following option:
  40933. </p>
  40934. <dl class="table">
  40935. <dt><samp class="option">planes</samp></dt>
  40936. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  40937. By default value 0xf, all planes will be processed.
  40938. </p></dd>
  40939. </dl>
  40940. <p>For example if first stream pixel&rsquo;s component value is less then threshold value
  40941. of pixel component from 2nd threshold stream, third stream value will picked,
  40942. otherwise fourth stream pixel component value will be picked.
  40943. </p>
  40944. <p>Using color source filter one can perform various types of thresholding:
  40945. </p>
  40946. <ul class="mini-toc">
  40947. <li><a href="#Commands-147" accesskey="1">Commands</a></li>
  40948. <li><a href="#Examples-145" accesskey="2">Examples</a></li>
  40949. </ul>
  40950. <div class="subsection-level-extent" id="Commands-147">
  40951. <h4 class="subsection"><span>32.255.1 Commands<a class="copiable-link" href="#Commands-147"> &para;</a></span></h4>
  40952. <p>This filter supports the all options as <a class="ref" href="#commands">commands</a>.
  40953. </p>
  40954. </div>
  40955. <div class="subsection-level-extent" id="Examples-145">
  40956. <h4 class="subsection"><span>32.255.2 Examples<a class="copiable-link" href="#Examples-145"> &para;</a></span></h4>
  40957. <ul class="itemize mark-bullet">
  40958. <li>Binary threshold, using gray color as threshold:
  40959. <div class="example">
  40960. <pre class="example-preformatted">ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=black -f lavfi -i color=white -lavfi threshold output.avi
  40961. </pre></div>
  40962. </li><li>Inverted binary threshold, using gray color as threshold:
  40963. <div class="example">
  40964. <pre class="example-preformatted">ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -f lavfi -i color=black -lavfi threshold output.avi
  40965. </pre></div>
  40966. </li><li>Truncate binary threshold, using gray color as threshold:
  40967. <div class="example">
  40968. <pre class="example-preformatted">ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi
  40969. </pre></div>
  40970. </li><li>Threshold to zero, using gray color as threshold:
  40971. <div class="example">
  40972. <pre class="example-preformatted">ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi
  40973. </pre></div>
  40974. </li><li>Inverted threshold to zero, using gray color as threshold:
  40975. <div class="example">
  40976. <pre class="example-preformatted">ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi
  40977. </pre></div>
  40978. </li></ul>
  40979. </div>
  40980. </div>
  40981. <div class="section-level-extent" id="thumbnail">
  40982. <h3 class="section"><span>32.256 thumbnail<a class="copiable-link" href="#thumbnail"> &para;</a></span></h3>
  40983. <p>Select the most representative frame in a given sequence of consecutive frames.
  40984. </p>
  40985. <p>The filter accepts the following options:
  40986. </p>
  40987. <dl class="table">
  40988. <dt><samp class="option">n</samp></dt>
  40989. <dd><p>Set the frames batch size to analyze; in a set of <var class="var">n</var> frames, the filter
  40990. will pick one of them, and then handle the next batch of <var class="var">n</var> frames until
  40991. the end. Default is <code class="code">100</code>.
  40992. </p>
  40993. </dd>
  40994. <dt><samp class="option">log</samp></dt>
  40995. <dd><p>Set the log level to display picked frame stats.
  40996. Default is <code class="code">info</code>.
  40997. </p></dd>
  40998. </dl>
  40999. <p>Since the filter keeps track of the whole frames sequence, a bigger <var class="var">n</var>
  41000. value will result in a higher memory usage, so a high value is not recommended.
  41001. </p>
  41002. <ul class="mini-toc">
  41003. <li><a href="#Examples-146" accesskey="1">Examples</a></li>
  41004. </ul>
  41005. <div class="subsection-level-extent" id="Examples-146">
  41006. <h4 class="subsection"><span>32.256.1 Examples<a class="copiable-link" href="#Examples-146"> &para;</a></span></h4>
  41007. <ul class="itemize mark-bullet">
  41008. <li>Extract one picture each 50 frames:
  41009. <div class="example">
  41010. <pre class="example-preformatted">thumbnail=50
  41011. </pre></div>
  41012. </li><li>Complete example of a thumbnail creation with <code class="command">ffmpeg</code>:
  41013. <div class="example">
  41014. <pre class="example-preformatted">ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
  41015. </pre></div>
  41016. </li></ul>
  41017. <a class="anchor" id="tile"></a></div>
  41018. </div>
  41019. <div class="section-level-extent" id="tile-1">
  41020. <h3 class="section"><span>32.257 tile<a class="copiable-link" href="#tile-1"> &para;</a></span></h3>
  41021. <p>Tile several successive frames together.
  41022. </p>
  41023. <p>The <a class="ref" href="#untile">untile</a> filter can do the reverse.
  41024. </p>
  41025. <p>The filter accepts the following options:
  41026. </p>
  41027. <dl class="table">
  41028. <dt><samp class="option">layout</samp></dt>
  41029. <dd><p>Set the grid size in the form <code class="code">COLUMNSxROWS</code>. Range is up to UINT_MAX cells.
  41030. Default is <code class="code">6x5</code>.
  41031. </p>
  41032. </dd>
  41033. <dt><samp class="option">nb_frames</samp></dt>
  41034. <dd><p>Set the maximum number of frames to render in the given area. It must be less
  41035. than or equal to <var class="var">w</var>x<var class="var">h</var>. The default value is <code class="code">0</code>, meaning all
  41036. the area will be used.
  41037. </p>
  41038. </dd>
  41039. <dt><samp class="option">margin</samp></dt>
  41040. <dd><p>Set the outer border margin in pixels. Range is 0 to 1024. Default is <code class="code">0</code>.
  41041. </p>
  41042. </dd>
  41043. <dt><samp class="option">padding</samp></dt>
  41044. <dd><p>Set the inner border thickness (i.e. the number of pixels between frames). For
  41045. more advanced padding options (such as having different values for the edges),
  41046. refer to the pad video filter. Range is 0 to 1024. Default is <code class="code">0</code>.
  41047. </p>
  41048. </dd>
  41049. <dt><samp class="option">color</samp></dt>
  41050. <dd><p>Specify the color of the unused area. For the syntax of this option, check the
  41051. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  41052. The default value of <var class="var">color</var> is &quot;black&quot;.
  41053. </p>
  41054. </dd>
  41055. <dt><samp class="option">overlap</samp></dt>
  41056. <dd><p>Set the number of frames to overlap when tiling several successive frames together.
  41057. The value must be between <code class="code">0</code> and <var class="var">nb_frames - 1</var>. Default is <code class="code">0</code>.
  41058. </p>
  41059. </dd>
  41060. <dt><samp class="option">init_padding</samp></dt>
  41061. <dd><p>Set the number of frames to initially be empty before displaying first output frame.
  41062. This controls how soon will one get first output frame.
  41063. The value must be between <code class="code">0</code> and <var class="var">nb_frames - 1</var>. Default is <code class="code">0</code>.
  41064. </p></dd>
  41065. </dl>
  41066. <ul class="mini-toc">
  41067. <li><a href="#Examples-147" accesskey="1">Examples</a></li>
  41068. </ul>
  41069. <div class="subsection-level-extent" id="Examples-147">
  41070. <h4 class="subsection"><span>32.257.1 Examples<a class="copiable-link" href="#Examples-147"> &para;</a></span></h4>
  41071. <ul class="itemize mark-bullet">
  41072. <li>Produce 8x8 PNG tiles of all keyframes (<samp class="option">-skip_frame nokey</samp>) in a movie:
  41073. <div class="example">
  41074. <pre class="example-preformatted">ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
  41075. </pre></div>
  41076. <p>The <samp class="option">-vsync 0</samp> is necessary to prevent <code class="command">ffmpeg</code> from
  41077. duplicating each output frame to accommodate the originally detected frame
  41078. rate.
  41079. </p>
  41080. </li><li>Display <code class="code">5</code> pictures in an area of <code class="code">3x2</code> frames,
  41081. with <code class="code">7</code> pixels between them, and <code class="code">2</code> pixels of initial margin, using
  41082. mixed flat and named options:
  41083. <div class="example">
  41084. <pre class="example-preformatted">tile=3x2:nb_frames=5:padding=7:margin=2
  41085. </pre></div>
  41086. </li></ul>
  41087. </div>
  41088. </div>
  41089. <div class="section-level-extent" id="tiltandshift">
  41090. <h3 class="section"><span>32.258 tiltandshift<a class="copiable-link" href="#tiltandshift"> &para;</a></span></h3>
  41091. <p>What happens when you invert time and space?
  41092. </p>
  41093. <p>Normally a video is composed of several frames that represent a different
  41094. instant of time and shows a scence that evolves in the space captured by the
  41095. frame. This filter is the antipode of that concept, taking inspiration by
  41096. tilt and shift photography.
  41097. </p>
  41098. <p>A filtered frame contains the whole timeline of events composing the sequence,
  41099. and this is obtained by placing a slice of pixels from each frame into a single
  41100. one. However, since there are no infinite-width frames, this is done up the
  41101. width of the input frame, and a video is recomposed by shifting away one
  41102. column for each subsequent frame. In order to map space to time, the filter
  41103. tilts each input frame as well, so that motion is preseved. This is accomplished
  41104. by progressively selecting a different column from each input frame.
  41105. </p>
  41106. <p>The end result is a sort of inverted parralax, so that far away objects move
  41107. much faster that the ones in the front. The ideal conditions for this video
  41108. effect are when there is either very little motion and the backgroud is static,
  41109. or when there is a lot of motion and a very wide depth of field (eg. wide
  41110. panorama, while moving on a train).
  41111. </p>
  41112. <p>The filter accepts the following parameters:
  41113. </p>
  41114. <dl class="table">
  41115. <dt><samp class="option">tilt</samp></dt>
  41116. <dd><p>Tilt video while shifting (default). When unset, video will be sliding a
  41117. static image, composed of the first column of each frame.
  41118. </p>
  41119. </dd>
  41120. <dt><samp class="option">start</samp></dt>
  41121. <dd><p>What to do at the start of filtering (see below).
  41122. </p>
  41123. </dd>
  41124. <dt><samp class="option">end</samp></dt>
  41125. <dd><p>What to do at the end of filtering (see below).
  41126. </p>
  41127. </dd>
  41128. <dt><samp class="option">hold</samp></dt>
  41129. <dd><p>How many columns should pass through before start of filtering.
  41130. </p>
  41131. </dd>
  41132. <dt><samp class="option">pad</samp></dt>
  41133. <dd><p>How many columns should be inserted before end of filtering.
  41134. </p>
  41135. </dd>
  41136. </dl>
  41137. <p>Normally the filter shifts and tils from the very first frame, and stops when
  41138. the last one is received. However, before filtering starts, normal video may
  41139. be preseved, so that the effect is slowly shifted in its place. Similarly,
  41140. the last video frame may be reconstructed at the end. Alternatively it is
  41141. possible to just start and end with black.
  41142. </p>
  41143. <dl class="table">
  41144. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  41145. <dd><p>Filtering is starts immediately and ends when the last frame is received.
  41146. </p>
  41147. </dd>
  41148. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  41149. <dd><p>The first frames or the very last frame are kept intact during processing.
  41150. </p>
  41151. </dd>
  41152. <dt>&lsquo;<samp class="samp">black</samp>&rsquo;</dt>
  41153. <dd><p>Black is padded at the beginning or at the end of filtering.
  41154. </p>
  41155. </dd>
  41156. </dl>
  41157. </div>
  41158. <div class="section-level-extent" id="tinterlace">
  41159. <h3 class="section"><span>32.259 tinterlace<a class="copiable-link" href="#tinterlace"> &para;</a></span></h3>
  41160. <p>Perform various types of temporal field interlacing.
  41161. </p>
  41162. <p>Frames are counted starting from 1, so the first input frame is
  41163. considered odd.
  41164. </p>
  41165. <p>The filter accepts the following options:
  41166. </p>
  41167. <dl class="table">
  41168. <dt><samp class="option">mode</samp></dt>
  41169. <dd><p>Specify the mode of the interlacing. This option can also be specified
  41170. as a value alone. See below for a list of values for this option.
  41171. </p>
  41172. <p>Available values are:
  41173. </p>
  41174. <dl class="table">
  41175. <dt>&lsquo;<samp class="samp">merge, 0</samp>&rsquo;</dt>
  41176. <dd><p>Move odd frames into the upper field, even into the lower field,
  41177. generating a double height frame at half frame rate.
  41178. </p><div class="example">
  41179. <pre class="example-preformatted"> ------&gt; time
  41180. Input:
  41181. Frame 1 Frame 2 Frame 3 Frame 4
  41182. 11111 22222 33333 44444
  41183. 11111 22222 33333 44444
  41184. 11111 22222 33333 44444
  41185. 11111 22222 33333 44444
  41186. Output:
  41187. 11111 33333
  41188. 22222 44444
  41189. 11111 33333
  41190. 22222 44444
  41191. 11111 33333
  41192. 22222 44444
  41193. 11111 33333
  41194. 22222 44444
  41195. </pre></div>
  41196. </dd>
  41197. <dt>&lsquo;<samp class="samp">drop_even, 1</samp>&rsquo;</dt>
  41198. <dd><p>Only output odd frames, even frames are dropped, generating a frame with
  41199. unchanged height at half frame rate.
  41200. </p>
  41201. <div class="example">
  41202. <pre class="example-preformatted"> ------&gt; time
  41203. Input:
  41204. Frame 1 Frame 2 Frame 3 Frame 4
  41205. 11111 22222 33333 44444
  41206. 11111 22222 33333 44444
  41207. 11111 22222 33333 44444
  41208. 11111 22222 33333 44444
  41209. Output:
  41210. 11111 33333
  41211. 11111 33333
  41212. 11111 33333
  41213. 11111 33333
  41214. </pre></div>
  41215. </dd>
  41216. <dt>&lsquo;<samp class="samp">drop_odd, 2</samp>&rsquo;</dt>
  41217. <dd><p>Only output even frames, odd frames are dropped, generating a frame with
  41218. unchanged height at half frame rate.
  41219. </p>
  41220. <div class="example">
  41221. <pre class="example-preformatted"> ------&gt; time
  41222. Input:
  41223. Frame 1 Frame 2 Frame 3 Frame 4
  41224. 11111 22222 33333 44444
  41225. 11111 22222 33333 44444
  41226. 11111 22222 33333 44444
  41227. 11111 22222 33333 44444
  41228. Output:
  41229. 22222 44444
  41230. 22222 44444
  41231. 22222 44444
  41232. 22222 44444
  41233. </pre></div>
  41234. </dd>
  41235. <dt>&lsquo;<samp class="samp">pad, 3</samp>&rsquo;</dt>
  41236. <dd><p>Expand each frame to full height, but pad alternate lines with black,
  41237. generating a frame with double height at the same input frame rate.
  41238. </p>
  41239. <div class="example">
  41240. <pre class="example-preformatted"> ------&gt; time
  41241. Input:
  41242. Frame 1 Frame 2 Frame 3 Frame 4
  41243. 11111 22222 33333 44444
  41244. 11111 22222 33333 44444
  41245. 11111 22222 33333 44444
  41246. 11111 22222 33333 44444
  41247. Output:
  41248. 11111 ..... 33333 .....
  41249. ..... 22222 ..... 44444
  41250. 11111 ..... 33333 .....
  41251. ..... 22222 ..... 44444
  41252. 11111 ..... 33333 .....
  41253. ..... 22222 ..... 44444
  41254. 11111 ..... 33333 .....
  41255. ..... 22222 ..... 44444
  41256. </pre></div>
  41257. </dd>
  41258. <dt>&lsquo;<samp class="samp">interleave_top, 4</samp>&rsquo;</dt>
  41259. <dd><p>Interleave the upper field from odd frames with the lower field from
  41260. even frames, generating a frame with unchanged height at half frame rate.
  41261. </p>
  41262. <div class="example">
  41263. <pre class="example-preformatted"> ------&gt; time
  41264. Input:
  41265. Frame 1 Frame 2 Frame 3 Frame 4
  41266. 11111&lt;- 22222 33333&lt;- 44444
  41267. 11111 22222&lt;- 33333 44444&lt;-
  41268. 11111&lt;- 22222 33333&lt;- 44444
  41269. 11111 22222&lt;- 33333 44444&lt;-
  41270. Output:
  41271. 11111 33333
  41272. 22222 44444
  41273. 11111 33333
  41274. 22222 44444
  41275. </pre></div>
  41276. </dd>
  41277. <dt>&lsquo;<samp class="samp">interleave_bottom, 5</samp>&rsquo;</dt>
  41278. <dd><p>Interleave the lower field from odd frames with the upper field from
  41279. even frames, generating a frame with unchanged height at half frame rate.
  41280. </p>
  41281. <div class="example">
  41282. <pre class="example-preformatted"> ------&gt; time
  41283. Input:
  41284. Frame 1 Frame 2 Frame 3 Frame 4
  41285. 11111 22222&lt;- 33333 44444&lt;-
  41286. 11111&lt;- 22222 33333&lt;- 44444
  41287. 11111 22222&lt;- 33333 44444&lt;-
  41288. 11111&lt;- 22222 33333&lt;- 44444
  41289. Output:
  41290. 22222 44444
  41291. 11111 33333
  41292. 22222 44444
  41293. 11111 33333
  41294. </pre></div>
  41295. </dd>
  41296. <dt>&lsquo;<samp class="samp">interlacex2, 6</samp>&rsquo;</dt>
  41297. <dd><p>Double frame rate with unchanged height. Frames are inserted each
  41298. containing the second temporal field from the previous input frame and
  41299. the first temporal field from the next input frame. This mode relies on
  41300. the top_field_first flag. Useful for interlaced video displays with no
  41301. field synchronisation.
  41302. </p>
  41303. <div class="example">
  41304. <pre class="example-preformatted"> ------&gt; time
  41305. Input:
  41306. Frame 1 Frame 2 Frame 3 Frame 4
  41307. 11111 22222 33333 44444
  41308. 11111 22222 33333 44444
  41309. 11111 22222 33333 44444
  41310. 11111 22222 33333 44444
  41311. Output:
  41312. 11111 22222 22222 33333 33333 44444 44444
  41313. 11111 11111 22222 22222 33333 33333 44444
  41314. 11111 22222 22222 33333 33333 44444 44444
  41315. 11111 11111 22222 22222 33333 33333 44444
  41316. </pre></div>
  41317. </dd>
  41318. <dt>&lsquo;<samp class="samp">mergex2, 7</samp>&rsquo;</dt>
  41319. <dd><p>Move odd frames into the upper field, even into the lower field,
  41320. generating a double height frame at same frame rate.
  41321. </p>
  41322. <div class="example">
  41323. <pre class="example-preformatted"> ------&gt; time
  41324. Input:
  41325. Frame 1 Frame 2 Frame 3 Frame 4
  41326. 11111 22222 33333 44444
  41327. 11111 22222 33333 44444
  41328. 11111 22222 33333 44444
  41329. 11111 22222 33333 44444
  41330. Output:
  41331. 11111 33333 33333 55555
  41332. 22222 22222 44444 44444
  41333. 11111 33333 33333 55555
  41334. 22222 22222 44444 44444
  41335. 11111 33333 33333 55555
  41336. 22222 22222 44444 44444
  41337. 11111 33333 33333 55555
  41338. 22222 22222 44444 44444
  41339. </pre></div>
  41340. </dd>
  41341. </dl>
  41342. <p>Numeric values are deprecated but are accepted for backward
  41343. compatibility reasons.
  41344. </p>
  41345. <p>Default mode is <code class="code">merge</code>.
  41346. </p>
  41347. </dd>
  41348. <dt><samp class="option">flags</samp></dt>
  41349. <dd><p>Specify flags influencing the filter process.
  41350. </p>
  41351. <p>Available value for <var class="var">flags</var> is:
  41352. </p>
  41353. <dl class="table">
  41354. <dt><samp class="option">low_pass_filter, vlpf</samp></dt>
  41355. <dd><p>Enable linear vertical low-pass filtering in the filter.
  41356. Vertical low-pass filtering is required when creating an interlaced
  41357. destination from a progressive source which contains high-frequency
  41358. vertical detail. Filtering will reduce interlace &rsquo;twitter&rsquo; and Moire
  41359. patterning.
  41360. </p>
  41361. </dd>
  41362. <dt><samp class="option">complex_filter, cvlpf</samp></dt>
  41363. <dd><p>Enable complex vertical low-pass filtering.
  41364. This will slightly less reduce interlace &rsquo;twitter&rsquo; and Moire
  41365. patterning but better retain detail and subjective sharpness impression.
  41366. </p>
  41367. </dd>
  41368. <dt><samp class="option">bypass_il</samp></dt>
  41369. <dd><p>Bypass already interlaced frames, only adjust the frame rate.
  41370. </p></dd>
  41371. </dl>
  41372. <p>Vertical low-pass filtering and bypassing already interlaced frames can only be
  41373. enabled for <samp class="option">mode</samp> <var class="var">interleave_top</var> and <var class="var">interleave_bottom</var>.
  41374. </p>
  41375. </dd>
  41376. </dl>
  41377. </div>
  41378. <div class="section-level-extent" id="tmedian">
  41379. <h3 class="section"><span>32.260 tmedian<a class="copiable-link" href="#tmedian"> &para;</a></span></h3>
  41380. <p>Pick median pixels from several successive input video frames.
  41381. </p>
  41382. <p>The filter accepts the following options:
  41383. </p>
  41384. <dl class="table">
  41385. <dt><samp class="option">radius</samp></dt>
  41386. <dd><p>Set radius of median filter.
  41387. Default is 1. Allowed range is from 1 to 127.
  41388. </p>
  41389. </dd>
  41390. <dt><samp class="option">planes</samp></dt>
  41391. <dd><p>Set which planes to filter. Default value is <code class="code">15</code>, by which all planes are processed.
  41392. </p>
  41393. </dd>
  41394. <dt><samp class="option">percentile</samp></dt>
  41395. <dd><p>Set median percentile. Default value is <code class="code">0.5</code>.
  41396. Default value of <code class="code">0.5</code> will pick always median values, while <code class="code">0</code> will pick
  41397. minimum values, and <code class="code">1</code> maximum values.
  41398. </p></dd>
  41399. </dl>
  41400. <ul class="mini-toc">
  41401. <li><a href="#Commands-148" accesskey="1">Commands</a></li>
  41402. </ul>
  41403. <div class="subsection-level-extent" id="Commands-148">
  41404. <h4 class="subsection"><span>32.260.1 Commands<a class="copiable-link" href="#Commands-148"> &para;</a></span></h4>
  41405. <p>This filter supports all above options as <a class="ref" href="#commands">commands</a>, excluding option <code class="code">radius</code>.
  41406. </p>
  41407. </div>
  41408. </div>
  41409. <div class="section-level-extent" id="tmidequalizer">
  41410. <h3 class="section"><span>32.261 tmidequalizer<a class="copiable-link" href="#tmidequalizer"> &para;</a></span></h3>
  41411. <p>Apply Temporal Midway Video Equalization effect.
  41412. </p>
  41413. <p>Midway Video Equalization adjusts a sequence of video frames to have the same
  41414. histograms, while maintaining their dynamics as much as possible. It&rsquo;s
  41415. useful for e.g. matching exposures from a video frames sequence.
  41416. </p>
  41417. <p>This filter accepts the following option:
  41418. </p>
  41419. <dl class="table">
  41420. <dt><samp class="option">radius</samp></dt>
  41421. <dd><p>Set filtering radius. Default is <code class="code">5</code>. Allowed range is from 1 to 127.
  41422. </p>
  41423. </dd>
  41424. <dt><samp class="option">sigma</samp></dt>
  41425. <dd><p>Set filtering sigma. Default is <code class="code">0.5</code>. This controls strength of filtering.
  41426. Setting this option to 0 effectively does nothing.
  41427. </p>
  41428. </dd>
  41429. <dt><samp class="option">planes</samp></dt>
  41430. <dd><p>Set which planes to process. Default is <code class="code">15</code>, which is all available planes.
  41431. </p></dd>
  41432. </dl>
  41433. </div>
  41434. <div class="section-level-extent" id="tmix">
  41435. <h3 class="section"><span>32.262 tmix<a class="copiable-link" href="#tmix"> &para;</a></span></h3>
  41436. <p>Mix successive video frames.
  41437. </p>
  41438. <p>A description of the accepted options follows.
  41439. </p>
  41440. <dl class="table">
  41441. <dt><samp class="option">frames</samp></dt>
  41442. <dd><p>The number of successive frames to mix. If unspecified, it defaults to 3.
  41443. </p>
  41444. </dd>
  41445. <dt><samp class="option">weights</samp></dt>
  41446. <dd><p>Specify weight of each input video frame.
  41447. Each weight is separated by space. If number of weights is smaller than
  41448. number of <var class="var">frames</var> last specified weight will be used for all remaining
  41449. unset weights.
  41450. </p>
  41451. </dd>
  41452. <dt><samp class="option">scale</samp></dt>
  41453. <dd><p>Specify scale, if it is set it will be multiplied with sum
  41454. of each weight multiplied with pixel values to give final destination
  41455. pixel value. By default <var class="var">scale</var> is auto scaled to sum of weights.
  41456. </p>
  41457. </dd>
  41458. <dt><samp class="option">planes</samp></dt>
  41459. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  41460. </p></dd>
  41461. </dl>
  41462. <ul class="mini-toc">
  41463. <li><a href="#Examples-148" accesskey="1">Examples</a></li>
  41464. <li><a href="#Commands-149" accesskey="2">Commands</a></li>
  41465. </ul>
  41466. <div class="subsection-level-extent" id="Examples-148">
  41467. <h4 class="subsection"><span>32.262.1 Examples<a class="copiable-link" href="#Examples-148"> &para;</a></span></h4>
  41468. <ul class="itemize mark-bullet">
  41469. <li>Average 7 successive frames:
  41470. <div class="example">
  41471. <pre class="example-preformatted">tmix=frames=7:weights=&quot;1 1 1 1 1 1 1&quot;
  41472. </pre></div>
  41473. </li><li>Apply simple temporal convolution:
  41474. <div class="example">
  41475. <pre class="example-preformatted">tmix=frames=3:weights=&quot;-1 3 -1&quot;
  41476. </pre></div>
  41477. </li><li>Similar as above but only showing temporal differences:
  41478. <div class="example">
  41479. <pre class="example-preformatted">tmix=frames=3:weights=&quot;-1 2 -1&quot;:scale=1
  41480. </pre></div>
  41481. </li></ul>
  41482. </div>
  41483. <div class="subsection-level-extent" id="Commands-149">
  41484. <h4 class="subsection"><span>32.262.2 Commands<a class="copiable-link" href="#Commands-149"> &para;</a></span></h4>
  41485. <p>This filter supports the following commands:
  41486. </p><dl class="table">
  41487. <dt><samp class="option">weights</samp></dt>
  41488. <dt><samp class="option">scale</samp></dt>
  41489. <dt><samp class="option">planes</samp></dt>
  41490. <dd><p>Syntax is same as option with same name.
  41491. </p></dd>
  41492. </dl>
  41493. <a class="anchor" id="tonemap"></a></div>
  41494. </div>
  41495. <div class="section-level-extent" id="tonemap-1">
  41496. <h3 class="section"><span>32.263 tonemap<a class="copiable-link" href="#tonemap-1"> &para;</a></span></h3>
  41497. <p>Tone map colors from different dynamic ranges.
  41498. </p>
  41499. <p>This filter expects data in single precision floating point, as it needs to
  41500. operate on (and can output) out-of-range values. Another filter, such as
  41501. <a class="ref" href="#zscale">zscale</a>, is needed to convert the resulting frame to a usable format.
  41502. </p>
  41503. <p>The tonemapping algorithms implemented only work on linear light, so input
  41504. data should be linearized beforehand (and possibly correctly tagged).
  41505. </p>
  41506. <div class="example">
  41507. <pre class="example-preformatted">ffmpeg -i INPUT -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p OUTPUT
  41508. </pre></div>
  41509. <ul class="mini-toc">
  41510. <li><a href="#Options-40" accesskey="1">Options</a></li>
  41511. </ul>
  41512. <div class="subsection-level-extent" id="Options-40">
  41513. <h4 class="subsection"><span>32.263.1 Options<a class="copiable-link" href="#Options-40"> &para;</a></span></h4>
  41514. <p>The filter accepts the following options.
  41515. </p>
  41516. <dl class="table">
  41517. <dt><samp class="option">tonemap</samp></dt>
  41518. <dd><p>Set the tone map algorithm to use.
  41519. </p>
  41520. <p>Possible values are:
  41521. </p><dl class="table">
  41522. <dt><var class="var">none</var></dt>
  41523. <dd><p>Do not apply any tone map, only desaturate overbright pixels.
  41524. </p>
  41525. </dd>
  41526. <dt><var class="var">clip</var></dt>
  41527. <dd><p>Hard-clip any out-of-range values. Use it for perfect color accuracy for
  41528. in-range values, while distorting out-of-range values.
  41529. </p>
  41530. </dd>
  41531. <dt><var class="var">linear</var></dt>
  41532. <dd><p>Stretch the entire reference gamut to a linear multiple of the display.
  41533. </p>
  41534. </dd>
  41535. <dt><var class="var">gamma</var></dt>
  41536. <dd><p>Fit a logarithmic transfer between the tone curves.
  41537. </p>
  41538. </dd>
  41539. <dt><var class="var">reinhard</var></dt>
  41540. <dd><p>Preserve overall image brightness with a simple curve, using nonlinear
  41541. contrast, which results in flattening details and degrading color accuracy.
  41542. </p>
  41543. </dd>
  41544. <dt><var class="var">hable</var></dt>
  41545. <dd><p>Preserve both dark and bright details better than <var class="var">reinhard</var>, at the cost
  41546. of slightly darkening everything. Use it when detail preservation is more
  41547. important than color and brightness accuracy.
  41548. </p>
  41549. </dd>
  41550. <dt><var class="var">mobius</var></dt>
  41551. <dd><p>Smoothly map out-of-range values, while retaining contrast and colors for
  41552. in-range material as much as possible. Use it when color accuracy is more
  41553. important than detail preservation.
  41554. </p></dd>
  41555. </dl>
  41556. <p>Default is none.
  41557. </p>
  41558. </dd>
  41559. <dt><samp class="option">param</samp></dt>
  41560. <dd><p>Tune the tone mapping algorithm.
  41561. </p>
  41562. <p>This affects the following algorithms:
  41563. </p><dl class="table">
  41564. <dt><var class="var">none</var></dt>
  41565. <dd><p>Ignored.
  41566. </p>
  41567. </dd>
  41568. <dt><var class="var">linear</var></dt>
  41569. <dd><p>Specifies the scale factor to use while stretching.
  41570. Default to 1.0.
  41571. </p>
  41572. </dd>
  41573. <dt><var class="var">gamma</var></dt>
  41574. <dd><p>Specifies the exponent of the function.
  41575. Default to 1.8.
  41576. </p>
  41577. </dd>
  41578. <dt><var class="var">clip</var></dt>
  41579. <dd><p>Specify an extra linear coefficient to multiply into the signal before clipping.
  41580. Default to 1.0.
  41581. </p>
  41582. </dd>
  41583. <dt><var class="var">reinhard</var></dt>
  41584. <dd><p>Specify the local contrast coefficient at the display peak.
  41585. Default to 0.5, which means that in-gamut values will be about half as bright
  41586. as when clipping.
  41587. </p>
  41588. </dd>
  41589. <dt><var class="var">hable</var></dt>
  41590. <dd><p>Ignored.
  41591. </p>
  41592. </dd>
  41593. <dt><var class="var">mobius</var></dt>
  41594. <dd><p>Specify the transition point from linear to mobius transform. Every value
  41595. below this point is guaranteed to be mapped 1:1. The higher the value, the
  41596. more accurate the result will be, at the cost of losing bright details.
  41597. Default to 0.3, which due to the steep initial slope still preserves in-range
  41598. colors fairly accurately.
  41599. </p></dd>
  41600. </dl>
  41601. </dd>
  41602. <dt><samp class="option">desat</samp></dt>
  41603. <dd><p>Apply desaturation for highlights that exceed this level of brightness. The
  41604. higher the parameter, the more color information will be preserved. This
  41605. setting helps prevent unnaturally blown-out colors for super-highlights, by
  41606. (smoothly) turning into white instead. This makes images feel more natural,
  41607. at the cost of reducing information about out-of-range colors.
  41608. </p>
  41609. <p>The default of 2.0 is somewhat conservative and will mostly just apply to
  41610. skies or directly sunlit surfaces. A setting of 0.0 disables this option.
  41611. </p>
  41612. <p>This option works only if the input frame has a supported color tag.
  41613. </p>
  41614. </dd>
  41615. <dt><samp class="option">peak</samp></dt>
  41616. <dd><p>Override signal/nominal/reference peak with this value. Useful when the
  41617. embedded peak information in display metadata is not reliable or when tone
  41618. mapping from a lower range to a higher range.
  41619. </p></dd>
  41620. </dl>
  41621. </div>
  41622. </div>
  41623. <div class="section-level-extent" id="tpad">
  41624. <h3 class="section"><span>32.264 tpad<a class="copiable-link" href="#tpad"> &para;</a></span></h3>
  41625. <p>Temporarily pad video frames.
  41626. </p>
  41627. <p>The filter accepts the following options:
  41628. </p>
  41629. <dl class="table">
  41630. <dt><samp class="option">start</samp></dt>
  41631. <dd><p>Specify number of delay frames before input video stream. Default is 0.
  41632. </p>
  41633. </dd>
  41634. <dt><samp class="option">stop</samp></dt>
  41635. <dd><p>Specify number of padding frames after input video stream.
  41636. Set to -1 to pad indefinitely. Default is 0.
  41637. </p>
  41638. </dd>
  41639. <dt><samp class="option">start_mode</samp></dt>
  41640. <dd><p>Set kind of frames added to beginning of stream.
  41641. Can be either <var class="var">add</var> or <var class="var">clone</var>.
  41642. With <var class="var">add</var> frames of solid-color are added.
  41643. With <var class="var">clone</var> frames are clones of first frame.
  41644. Default is <var class="var">add</var>.
  41645. </p>
  41646. </dd>
  41647. <dt><samp class="option">stop_mode</samp></dt>
  41648. <dd><p>Set kind of frames added to end of stream.
  41649. Can be either <var class="var">add</var> or <var class="var">clone</var>.
  41650. With <var class="var">add</var> frames of solid-color are added.
  41651. With <var class="var">clone</var> frames are clones of last frame.
  41652. Default is <var class="var">add</var>.
  41653. </p>
  41654. </dd>
  41655. <dt><samp class="option">start_duration, stop_duration</samp></dt>
  41656. <dd><p>Specify the duration of the start/stop delay. See
  41657. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  41658. for the accepted syntax.
  41659. These options override <var class="var">start</var> and <var class="var">stop</var>. Default is 0.
  41660. </p>
  41661. </dd>
  41662. <dt><samp class="option">color</samp></dt>
  41663. <dd><p>Specify the color of the padded area. For the syntax of this option,
  41664. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils
  41665. manual</a>.
  41666. </p>
  41667. <p>The default value of <var class="var">color</var> is &quot;black&quot;.
  41668. </p></dd>
  41669. </dl>
  41670. <a class="anchor" id="transpose"></a></div>
  41671. <div class="section-level-extent" id="transpose-1">
  41672. <h3 class="section"><span>32.265 transpose<a class="copiable-link" href="#transpose-1"> &para;</a></span></h3>
  41673. <p>Transpose rows with columns in the input video and optionally flip it.
  41674. </p>
  41675. <p>It accepts the following parameters:
  41676. </p>
  41677. <dl class="table">
  41678. <dt><samp class="option">dir</samp></dt>
  41679. <dd><p>Specify the transposition direction.
  41680. </p>
  41681. <p>Can assume the following values:
  41682. </p><dl class="table">
  41683. <dt>&lsquo;<samp class="samp">0, 4, cclock_flip</samp>&rsquo;</dt>
  41684. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
  41685. </p><div class="example">
  41686. <pre class="example-preformatted">L.R L.l
  41687. . . -&gt; . .
  41688. l.r R.r
  41689. </pre></div>
  41690. </dd>
  41691. <dt>&lsquo;<samp class="samp">1, 5, clock</samp>&rsquo;</dt>
  41692. <dd><p>Rotate by 90 degrees clockwise, that is:
  41693. </p><div class="example">
  41694. <pre class="example-preformatted">L.R l.L
  41695. . . -&gt; . .
  41696. l.r r.R
  41697. </pre></div>
  41698. </dd>
  41699. <dt>&lsquo;<samp class="samp">2, 6, cclock</samp>&rsquo;</dt>
  41700. <dd><p>Rotate by 90 degrees counterclockwise, that is:
  41701. </p><div class="example">
  41702. <pre class="example-preformatted">L.R R.r
  41703. . . -&gt; . .
  41704. l.r L.l
  41705. </pre></div>
  41706. </dd>
  41707. <dt>&lsquo;<samp class="samp">3, 7, clock_flip</samp>&rsquo;</dt>
  41708. <dd><p>Rotate by 90 degrees clockwise and vertically flip, that is:
  41709. </p><div class="example">
  41710. <pre class="example-preformatted">L.R r.R
  41711. . . -&gt; . .
  41712. l.r l.L
  41713. </pre></div>
  41714. </dd>
  41715. </dl>
  41716. <p>For values between 4-7, the transposition is only done if the input
  41717. video geometry is portrait and not landscape. These values are
  41718. deprecated, the <code class="code">passthrough</code> option should be used instead.
  41719. </p>
  41720. <p>Numerical values are deprecated, and should be dropped in favor of
  41721. symbolic constants.
  41722. </p>
  41723. </dd>
  41724. <dt><samp class="option">passthrough</samp></dt>
  41725. <dd><p>Do not apply the transposition if the input geometry matches the one
  41726. specified by the specified value. It accepts the following values:
  41727. </p><dl class="table">
  41728. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  41729. <dd><p>Always apply transposition.
  41730. </p></dd>
  41731. <dt>&lsquo;<samp class="samp">portrait</samp>&rsquo;</dt>
  41732. <dd><p>Preserve portrait geometry (when <var class="var">height</var> &gt;= <var class="var">width</var>).
  41733. </p></dd>
  41734. <dt>&lsquo;<samp class="samp">landscape</samp>&rsquo;</dt>
  41735. <dd><p>Preserve landscape geometry (when <var class="var">width</var> &gt;= <var class="var">height</var>).
  41736. </p></dd>
  41737. </dl>
  41738. <p>Default value is <code class="code">none</code>.
  41739. </p></dd>
  41740. </dl>
  41741. <p>For example to rotate by 90 degrees clockwise and preserve portrait
  41742. layout:
  41743. </p><div class="example">
  41744. <pre class="example-preformatted">transpose=dir=1:passthrough=portrait
  41745. </pre></div>
  41746. <p>The command above can also be specified as:
  41747. </p><div class="example">
  41748. <pre class="example-preformatted">transpose=1:portrait
  41749. </pre></div>
  41750. </div>
  41751. <div class="section-level-extent" id="transpose_005fnpp">
  41752. <h3 class="section"><span>32.266 transpose_npp<a class="copiable-link" href="#transpose_005fnpp"> &para;</a></span></h3>
  41753. <p>Transpose rows with columns in the input video and optionally flip it.
  41754. For more in depth examples see the <a class="ref" href="#transpose">transpose</a> video filter, which shares mostly the same options.
  41755. </p>
  41756. <p>It accepts the following parameters:
  41757. </p>
  41758. <dl class="table">
  41759. <dt><samp class="option">dir</samp></dt>
  41760. <dd><p>Specify the transposition direction.
  41761. </p>
  41762. <p>Can assume the following values:
  41763. </p><dl class="table">
  41764. <dt>&lsquo;<samp class="samp">cclock_flip</samp>&rsquo;</dt>
  41765. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip. (default)
  41766. </p>
  41767. </dd>
  41768. <dt>&lsquo;<samp class="samp">clock</samp>&rsquo;</dt>
  41769. <dd><p>Rotate by 90 degrees clockwise.
  41770. </p>
  41771. </dd>
  41772. <dt>&lsquo;<samp class="samp">cclock</samp>&rsquo;</dt>
  41773. <dd><p>Rotate by 90 degrees counterclockwise.
  41774. </p>
  41775. </dd>
  41776. <dt>&lsquo;<samp class="samp">clock_flip</samp>&rsquo;</dt>
  41777. <dd><p>Rotate by 90 degrees clockwise and vertically flip.
  41778. </p></dd>
  41779. </dl>
  41780. </dd>
  41781. <dt><samp class="option">passthrough</samp></dt>
  41782. <dd><p>Do not apply the transposition if the input geometry matches the one
  41783. specified by the specified value. It accepts the following values:
  41784. </p><dl class="table">
  41785. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  41786. <dd><p>Always apply transposition. (default)
  41787. </p></dd>
  41788. <dt>&lsquo;<samp class="samp">portrait</samp>&rsquo;</dt>
  41789. <dd><p>Preserve portrait geometry (when <var class="var">height</var> &gt;= <var class="var">width</var>).
  41790. </p></dd>
  41791. <dt>&lsquo;<samp class="samp">landscape</samp>&rsquo;</dt>
  41792. <dd><p>Preserve landscape geometry (when <var class="var">width</var> &gt;= <var class="var">height</var>).
  41793. </p></dd>
  41794. </dl>
  41795. </dd>
  41796. </dl>
  41797. </div>
  41798. <div class="section-level-extent" id="trim">
  41799. <h3 class="section"><span>32.267 trim<a class="copiable-link" href="#trim"> &para;</a></span></h3>
  41800. <p>Trim the input so that the output contains one continuous subpart of the input.
  41801. </p>
  41802. <p>It accepts the following parameters:
  41803. </p><dl class="table">
  41804. <dt><samp class="option">start</samp></dt>
  41805. <dd><p>Specify the time of the start of the kept section, i.e. the frame with the
  41806. timestamp <var class="var">start</var> will be the first frame in the output.
  41807. </p>
  41808. </dd>
  41809. <dt><samp class="option">end</samp></dt>
  41810. <dd><p>Specify the time of the first frame that will be dropped, i.e. the frame
  41811. immediately preceding the one with the timestamp <var class="var">end</var> will be the last
  41812. frame in the output.
  41813. </p>
  41814. </dd>
  41815. <dt><samp class="option">start_pts</samp></dt>
  41816. <dd><p>This is the same as <var class="var">start</var>, except this option sets the start timestamp
  41817. in timebase units instead of seconds.
  41818. </p>
  41819. </dd>
  41820. <dt><samp class="option">end_pts</samp></dt>
  41821. <dd><p>This is the same as <var class="var">end</var>, except this option sets the end timestamp
  41822. in timebase units instead of seconds.
  41823. </p>
  41824. </dd>
  41825. <dt><samp class="option">duration</samp></dt>
  41826. <dd><p>The maximum duration of the output in seconds.
  41827. </p>
  41828. </dd>
  41829. <dt><samp class="option">start_frame</samp></dt>
  41830. <dd><p>The number of the first frame that should be passed to the output.
  41831. </p>
  41832. </dd>
  41833. <dt><samp class="option">end_frame</samp></dt>
  41834. <dd><p>The number of the first frame that should be dropped.
  41835. </p></dd>
  41836. </dl>
  41837. <p><samp class="option">start</samp>, <samp class="option">end</samp>, and <samp class="option">duration</samp> are expressed as time
  41838. duration specifications; see
  41839. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  41840. for the accepted syntax.
  41841. </p>
  41842. <p>Note that the first two sets of the start/end options and the <samp class="option">duration</samp>
  41843. option look at the frame timestamp, while the _frame variants simply count the
  41844. frames that pass through the filter. Also note that this filter does not modify
  41845. the timestamps. If you wish for the output timestamps to start at zero, insert a
  41846. setpts filter after the trim filter.
  41847. </p>
  41848. <p>If multiple start or end options are set, this filter tries to be greedy and
  41849. keep all the frames that match at least one of the specified constraints. To keep
  41850. only the part that matches all the constraints at once, chain multiple trim
  41851. filters.
  41852. </p>
  41853. <p>The defaults are such that all the input is kept. So it is possible to set e.g.
  41854. just the end values to keep everything before the specified time.
  41855. </p>
  41856. <p>Examples:
  41857. </p><ul class="itemize mark-bullet">
  41858. <li>Drop everything except the second minute of input:
  41859. <div class="example">
  41860. <pre class="example-preformatted">ffmpeg -i INPUT -vf trim=60:120
  41861. </pre></div>
  41862. </li><li>Keep only the first second:
  41863. <div class="example">
  41864. <pre class="example-preformatted">ffmpeg -i INPUT -vf trim=duration=1
  41865. </pre></div>
  41866. </li></ul>
  41867. </div>
  41868. <div class="section-level-extent" id="unpremultiply">
  41869. <h3 class="section"><span>32.268 unpremultiply<a class="copiable-link" href="#unpremultiply"> &para;</a></span></h3>
  41870. <p>Apply alpha unpremultiply effect to input video stream using first plane
  41871. of second stream as alpha.
  41872. </p>
  41873. <p>Both streams must have same dimensions and same pixel format.
  41874. </p>
  41875. <p>The filter accepts the following option:
  41876. </p>
  41877. <dl class="table">
  41878. <dt><samp class="option">planes</samp></dt>
  41879. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  41880. By default value 0xf, all planes will be processed.
  41881. </p>
  41882. <p>If the format has 1 or 2 components, then luma is bit 0.
  41883. If the format has 3 or 4 components:
  41884. for RGB formats bit 0 is green, bit 1 is blue and bit 2 is red;
  41885. for YUV formats bit 0 is luma, bit 1 is chroma-U and bit 2 is chroma-V.
  41886. If present, the alpha channel is always the last bit.
  41887. </p>
  41888. </dd>
  41889. <dt><samp class="option">inplace</samp></dt>
  41890. <dd><p>Do not require 2nd input for processing, instead use alpha plane from input stream.
  41891. </p></dd>
  41892. </dl>
  41893. <a class="anchor" id="unsharp"></a></div>
  41894. <div class="section-level-extent" id="unsharp-1">
  41895. <h3 class="section"><span>32.269 unsharp<a class="copiable-link" href="#unsharp-1"> &para;</a></span></h3>
  41896. <p>Sharpen or blur the input video.
  41897. </p>
  41898. <p>It accepts the following parameters:
  41899. </p>
  41900. <dl class="table">
  41901. <dt><samp class="option">luma_msize_x, lx</samp></dt>
  41902. <dd><p>Set the luma matrix horizontal size. It must be an odd integer between
  41903. 3 and 23. The default value is 5.
  41904. </p>
  41905. </dd>
  41906. <dt><samp class="option">luma_msize_y, ly</samp></dt>
  41907. <dd><p>Set the luma matrix vertical size. It must be an odd integer between 3
  41908. and 23. The default value is 5.
  41909. </p>
  41910. </dd>
  41911. <dt><samp class="option">luma_amount, la</samp></dt>
  41912. <dd><p>Set the luma effect strength. It must be a floating point number, reasonable
  41913. values lay between -1.5 and 1.5.
  41914. </p>
  41915. <p>Negative values will blur the input video, while positive values will
  41916. sharpen it, a value of zero will disable the effect.
  41917. </p>
  41918. <p>Default value is 1.0.
  41919. </p>
  41920. </dd>
  41921. <dt><samp class="option">chroma_msize_x, cx</samp></dt>
  41922. <dd><p>Set the chroma matrix horizontal size. It must be an odd integer
  41923. between 3 and 23. The default value is 5.
  41924. </p>
  41925. </dd>
  41926. <dt><samp class="option">chroma_msize_y, cy</samp></dt>
  41927. <dd><p>Set the chroma matrix vertical size. It must be an odd integer
  41928. between 3 and 23. The default value is 5.
  41929. </p>
  41930. </dd>
  41931. <dt><samp class="option">chroma_amount, ca</samp></dt>
  41932. <dd><p>Set the chroma effect strength. It must be a floating point number, reasonable
  41933. values lay between -1.5 and 1.5.
  41934. </p>
  41935. <p>Negative values will blur the input video, while positive values will
  41936. sharpen it, a value of zero will disable the effect.
  41937. </p>
  41938. <p>Default value is 0.0.
  41939. </p>
  41940. </dd>
  41941. <dt><samp class="option">alpha_msize_x, ax</samp></dt>
  41942. <dd><p>Set the alpha matrix horizontal size. It must be an odd integer
  41943. between 3 and 23. The default value is 5.
  41944. </p>
  41945. </dd>
  41946. <dt><samp class="option">alpha_msize_y, ay</samp></dt>
  41947. <dd><p>Set the alpha matrix vertical size. It must be an odd integer
  41948. between 3 and 23. The default value is 5.
  41949. </p>
  41950. </dd>
  41951. <dt><samp class="option">alpha_amount, aa</samp></dt>
  41952. <dd><p>Set the alpha effect strength. It must be a floating point number, reasonable
  41953. values lay between -1.5 and 1.5.
  41954. </p>
  41955. <p>Negative values will blur the input video, while positive values will
  41956. sharpen it, a value of zero will disable the effect.
  41957. </p>
  41958. <p>Default value is 0.0.
  41959. </p>
  41960. </dd>
  41961. </dl>
  41962. <p>All parameters are optional and default to the equivalent of the
  41963. string &rsquo;5:5:1.0:5:5:0.0&rsquo;.
  41964. </p>
  41965. <ul class="mini-toc">
  41966. <li><a href="#Examples-149" accesskey="1">Examples</a></li>
  41967. </ul>
  41968. <div class="subsection-level-extent" id="Examples-149">
  41969. <h4 class="subsection"><span>32.269.1 Examples<a class="copiable-link" href="#Examples-149"> &para;</a></span></h4>
  41970. <ul class="itemize mark-bullet">
  41971. <li>Apply strong luma sharpen effect:
  41972. <div class="example">
  41973. <pre class="example-preformatted">unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
  41974. </pre></div>
  41975. </li><li>Apply a strong blur of both luma and chroma parameters:
  41976. <div class="example">
  41977. <pre class="example-preformatted">unsharp=7:7:-2:7:7:-2
  41978. </pre></div>
  41979. </li></ul>
  41980. <a class="anchor" id="untile"></a></div>
  41981. </div>
  41982. <div class="section-level-extent" id="untile-1">
  41983. <h3 class="section"><span>32.270 untile<a class="copiable-link" href="#untile-1"> &para;</a></span></h3>
  41984. <p>Decompose a video made of tiled images into the individual images.
  41985. </p>
  41986. <p>The frame rate of the output video is the frame rate of the input video
  41987. multiplied by the number of tiles.
  41988. </p>
  41989. <p>This filter does the reverse of <a class="ref" href="#tile">tile</a>.
  41990. </p>
  41991. <p>The filter accepts the following options:
  41992. </p>
  41993. <dl class="table">
  41994. <dt><samp class="option">layout</samp></dt>
  41995. <dd><p>Set the grid size (i.e. the number of lines and columns). For the syntax of
  41996. this option, check the
  41997. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  41998. </p></dd>
  41999. </dl>
  42000. <ul class="mini-toc">
  42001. <li><a href="#Examples-150" accesskey="1">Examples</a></li>
  42002. </ul>
  42003. <div class="subsection-level-extent" id="Examples-150">
  42004. <h4 class="subsection"><span>32.270.1 Examples<a class="copiable-link" href="#Examples-150"> &para;</a></span></h4>
  42005. <ul class="itemize mark-bullet">
  42006. <li>Produce a 1-second video from a still image file made of 25 frames stacked
  42007. vertically, like an analogic film reel:
  42008. <div class="example">
  42009. <pre class="example-preformatted">ffmpeg -r 1 -i image.jpg -vf untile=1x25 movie.mkv
  42010. </pre></div>
  42011. </li></ul>
  42012. </div>
  42013. </div>
  42014. <div class="section-level-extent" id="uspp">
  42015. <h3 class="section"><span>32.271 uspp<a class="copiable-link" href="#uspp"> &para;</a></span></h3>
  42016. <p>Apply ultra slow/simple postprocessing filter that compresses and decompresses
  42017. the image at several (or - in the case of <samp class="option">quality</samp> level <code class="code">8</code> - all)
  42018. shifts and average the results.
  42019. </p>
  42020. <p>The way this differs from the behavior of spp is that uspp actually encodes &amp;
  42021. decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8
  42022. DCT similar to MJPEG.
  42023. </p>
  42024. <p>This filter is only available in ffmpeg version 4.4 or earlier.
  42025. </p>
  42026. <p>The filter accepts the following options:
  42027. </p>
  42028. <dl class="table">
  42029. <dt><samp class="option">quality</samp></dt>
  42030. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  42031. an integer in the range 0-8. If set to <code class="code">0</code>, the filter will have no
  42032. effect. A value of <code class="code">8</code> means the higher quality. For each increment of
  42033. that value the speed drops by a factor of approximately 2. Default value is
  42034. <code class="code">3</code>.
  42035. </p>
  42036. </dd>
  42037. <dt><samp class="option">qp</samp></dt>
  42038. <dd><p>Force a constant quantization parameter. If not set, the filter will use the QP
  42039. from the video stream (if available).
  42040. </p>
  42041. </dd>
  42042. <dt><samp class="option">codec</samp></dt>
  42043. <dd><p>Use specified codec instead of snow.
  42044. </p></dd>
  42045. </dl>
  42046. </div>
  42047. <div class="section-level-extent" id="v360">
  42048. <h3 class="section"><span>32.272 v360<a class="copiable-link" href="#v360"> &para;</a></span></h3>
  42049. <p>Convert 360 videos between various formats.
  42050. </p>
  42051. <p>The filter accepts the following options:
  42052. </p>
  42053. <dl class="table">
  42054. <dt><samp class="option">input</samp></dt>
  42055. <dt><samp class="option">output</samp></dt>
  42056. <dd><p>Set format of the input/output video.
  42057. </p>
  42058. <p>Available formats:
  42059. </p>
  42060. <dl class="table">
  42061. <dt>&lsquo;<samp class="samp">e</samp>&rsquo;</dt>
  42062. <dt>&lsquo;<samp class="samp">equirect</samp>&rsquo;</dt>
  42063. <dd><p>Equirectangular projection.
  42064. </p>
  42065. </dd>
  42066. <dt>&lsquo;<samp class="samp">c3x2</samp>&rsquo;</dt>
  42067. <dt>&lsquo;<samp class="samp">c6x1</samp>&rsquo;</dt>
  42068. <dt>&lsquo;<samp class="samp">c1x6</samp>&rsquo;</dt>
  42069. <dd><p>Cubemap with 3x2/6x1/1x6 layout.
  42070. </p>
  42071. <p>Format specific options:
  42072. </p>
  42073. <dl class="table">
  42074. <dt><samp class="option">in_pad</samp></dt>
  42075. <dt><samp class="option">out_pad</samp></dt>
  42076. <dd><p>Set padding proportion for the input/output cubemap. Values in decimals.
  42077. </p>
  42078. <p>Example values:
  42079. </p><dl class="table">
  42080. <dt>&lsquo;<samp class="samp">0</samp>&rsquo;</dt>
  42081. <dd><p>No padding.
  42082. </p></dd>
  42083. <dt>&lsquo;<samp class="samp">0.01</samp>&rsquo;</dt>
  42084. <dd><p>1% of face is padding. For example, with 1920x1280 resolution face size would be 640x640 and padding would be 3 pixels from each side. (640 * 0.01 = 6 pixels)
  42085. </p></dd>
  42086. </dl>
  42087. <p>Default value is <b class="b">&lsquo;<samp class="samp">0</samp>&rsquo;</b>.
  42088. Maximum value is <b class="b">&lsquo;<samp class="samp">0.1</samp>&rsquo;</b>.
  42089. </p>
  42090. </dd>
  42091. <dt><samp class="option">fin_pad</samp></dt>
  42092. <dt><samp class="option">fout_pad</samp></dt>
  42093. <dd><p>Set fixed padding for the input/output cubemap. Values in pixels.
  42094. </p>
  42095. <p>Default value is <b class="b">&lsquo;<samp class="samp">0</samp>&rsquo;</b>. If greater than zero it overrides other padding options.
  42096. </p>
  42097. </dd>
  42098. <dt><samp class="option">in_forder</samp></dt>
  42099. <dt><samp class="option">out_forder</samp></dt>
  42100. <dd><p>Set order of faces for the input/output cubemap. Choose one direction for each position.
  42101. </p>
  42102. <p>Designation of directions:
  42103. </p><dl class="table">
  42104. <dt>&lsquo;<samp class="samp">r</samp>&rsquo;</dt>
  42105. <dd><p>right
  42106. </p></dd>
  42107. <dt>&lsquo;<samp class="samp">l</samp>&rsquo;</dt>
  42108. <dd><p>left
  42109. </p></dd>
  42110. <dt>&lsquo;<samp class="samp">u</samp>&rsquo;</dt>
  42111. <dd><p>up
  42112. </p></dd>
  42113. <dt>&lsquo;<samp class="samp">d</samp>&rsquo;</dt>
  42114. <dd><p>down
  42115. </p></dd>
  42116. <dt>&lsquo;<samp class="samp">f</samp>&rsquo;</dt>
  42117. <dd><p>forward
  42118. </p></dd>
  42119. <dt>&lsquo;<samp class="samp">b</samp>&rsquo;</dt>
  42120. <dd><p>back
  42121. </p></dd>
  42122. </dl>
  42123. <p>Default value is <b class="b">&lsquo;<samp class="samp">rludfb</samp>&rsquo;</b>.
  42124. </p>
  42125. </dd>
  42126. <dt><samp class="option">in_frot</samp></dt>
  42127. <dt><samp class="option">out_frot</samp></dt>
  42128. <dd><p>Set rotation of faces for the input/output cubemap. Choose one angle for each position.
  42129. </p>
  42130. <p>Designation of angles:
  42131. </p><dl class="table">
  42132. <dt>&lsquo;<samp class="samp">0</samp>&rsquo;</dt>
  42133. <dd><p>0 degrees clockwise
  42134. </p></dd>
  42135. <dt>&lsquo;<samp class="samp">1</samp>&rsquo;</dt>
  42136. <dd><p>90 degrees clockwise
  42137. </p></dd>
  42138. <dt>&lsquo;<samp class="samp">2</samp>&rsquo;</dt>
  42139. <dd><p>180 degrees clockwise
  42140. </p></dd>
  42141. <dt>&lsquo;<samp class="samp">3</samp>&rsquo;</dt>
  42142. <dd><p>270 degrees clockwise
  42143. </p></dd>
  42144. </dl>
  42145. <p>Default value is <b class="b">&lsquo;<samp class="samp">000000</samp>&rsquo;</b>.
  42146. </p></dd>
  42147. </dl>
  42148. </dd>
  42149. <dt>&lsquo;<samp class="samp">eac</samp>&rsquo;</dt>
  42150. <dd><p>Equi-Angular Cubemap.
  42151. </p>
  42152. </dd>
  42153. <dt>&lsquo;<samp class="samp">flat</samp>&rsquo;</dt>
  42154. <dt>&lsquo;<samp class="samp">gnomonic</samp>&rsquo;</dt>
  42155. <dt>&lsquo;<samp class="samp">rectilinear</samp>&rsquo;</dt>
  42156. <dd><p>Regular video.
  42157. </p>
  42158. <p>Format specific options:
  42159. </p><dl class="table">
  42160. <dt><samp class="option">h_fov</samp></dt>
  42161. <dt><samp class="option">v_fov</samp></dt>
  42162. <dt><samp class="option">d_fov</samp></dt>
  42163. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  42164. </p>
  42165. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42166. </p>
  42167. </dd>
  42168. <dt><samp class="option">ih_fov</samp></dt>
  42169. <dt><samp class="option">iv_fov</samp></dt>
  42170. <dt><samp class="option">id_fov</samp></dt>
  42171. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  42172. </p>
  42173. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42174. </p></dd>
  42175. </dl>
  42176. </dd>
  42177. <dt>&lsquo;<samp class="samp">dfisheye</samp>&rsquo;</dt>
  42178. <dd><p>Dual fisheye.
  42179. </p>
  42180. <p>Format specific options:
  42181. </p><dl class="table">
  42182. <dt><samp class="option">h_fov</samp></dt>
  42183. <dt><samp class="option">v_fov</samp></dt>
  42184. <dt><samp class="option">d_fov</samp></dt>
  42185. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  42186. </p>
  42187. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42188. </p>
  42189. </dd>
  42190. <dt><samp class="option">ih_fov</samp></dt>
  42191. <dt><samp class="option">iv_fov</samp></dt>
  42192. <dt><samp class="option">id_fov</samp></dt>
  42193. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  42194. </p>
  42195. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42196. </p></dd>
  42197. </dl>
  42198. </dd>
  42199. <dt>&lsquo;<samp class="samp">barrel</samp>&rsquo;</dt>
  42200. <dt>&lsquo;<samp class="samp">fb</samp>&rsquo;</dt>
  42201. <dt>&lsquo;<samp class="samp">barrelsplit</samp>&rsquo;</dt>
  42202. <dd><p>Facebook&rsquo;s 360 formats.
  42203. </p>
  42204. </dd>
  42205. <dt>&lsquo;<samp class="samp">sg</samp>&rsquo;</dt>
  42206. <dd><p>Stereographic format.
  42207. </p>
  42208. <p>Format specific options:
  42209. </p><dl class="table">
  42210. <dt><samp class="option">h_fov</samp></dt>
  42211. <dt><samp class="option">v_fov</samp></dt>
  42212. <dt><samp class="option">d_fov</samp></dt>
  42213. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  42214. </p>
  42215. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42216. </p>
  42217. </dd>
  42218. <dt><samp class="option">ih_fov</samp></dt>
  42219. <dt><samp class="option">iv_fov</samp></dt>
  42220. <dt><samp class="option">id_fov</samp></dt>
  42221. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  42222. </p>
  42223. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42224. </p></dd>
  42225. </dl>
  42226. </dd>
  42227. <dt>&lsquo;<samp class="samp">mercator</samp>&rsquo;</dt>
  42228. <dd><p>Mercator format.
  42229. </p>
  42230. </dd>
  42231. <dt>&lsquo;<samp class="samp">ball</samp>&rsquo;</dt>
  42232. <dd><p>Ball format, gives significant distortion toward the back.
  42233. </p>
  42234. </dd>
  42235. <dt>&lsquo;<samp class="samp">hammer</samp>&rsquo;</dt>
  42236. <dd><p>Hammer-Aitoff map projection format.
  42237. </p>
  42238. </dd>
  42239. <dt>&lsquo;<samp class="samp">sinusoidal</samp>&rsquo;</dt>
  42240. <dd><p>Sinusoidal map projection format.
  42241. </p>
  42242. </dd>
  42243. <dt>&lsquo;<samp class="samp">fisheye</samp>&rsquo;</dt>
  42244. <dd><p>Fisheye projection.
  42245. </p>
  42246. <p>Format specific options:
  42247. </p><dl class="table">
  42248. <dt><samp class="option">h_fov</samp></dt>
  42249. <dt><samp class="option">v_fov</samp></dt>
  42250. <dt><samp class="option">d_fov</samp></dt>
  42251. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  42252. </p>
  42253. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42254. </p>
  42255. </dd>
  42256. <dt><samp class="option">ih_fov</samp></dt>
  42257. <dt><samp class="option">iv_fov</samp></dt>
  42258. <dt><samp class="option">id_fov</samp></dt>
  42259. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  42260. </p>
  42261. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42262. </p></dd>
  42263. </dl>
  42264. </dd>
  42265. <dt>&lsquo;<samp class="samp">pannini</samp>&rsquo;</dt>
  42266. <dd><p>Pannini projection.
  42267. </p>
  42268. <p>Format specific options:
  42269. </p><dl class="table">
  42270. <dt><samp class="option">h_fov</samp></dt>
  42271. <dd><p>Set output pannini parameter.
  42272. </p>
  42273. </dd>
  42274. <dt><samp class="option">ih_fov</samp></dt>
  42275. <dd><p>Set input pannini parameter.
  42276. </p></dd>
  42277. </dl>
  42278. </dd>
  42279. <dt>&lsquo;<samp class="samp">cylindrical</samp>&rsquo;</dt>
  42280. <dd><p>Cylindrical projection.
  42281. </p>
  42282. <p>Format specific options:
  42283. </p><dl class="table">
  42284. <dt><samp class="option">h_fov</samp></dt>
  42285. <dt><samp class="option">v_fov</samp></dt>
  42286. <dt><samp class="option">d_fov</samp></dt>
  42287. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  42288. </p>
  42289. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42290. </p>
  42291. </dd>
  42292. <dt><samp class="option">ih_fov</samp></dt>
  42293. <dt><samp class="option">iv_fov</samp></dt>
  42294. <dt><samp class="option">id_fov</samp></dt>
  42295. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  42296. </p>
  42297. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42298. </p></dd>
  42299. </dl>
  42300. </dd>
  42301. <dt>&lsquo;<samp class="samp">perspective</samp>&rsquo;</dt>
  42302. <dd><p>Perspective projection. <i class="i">(output only)</i>
  42303. </p>
  42304. <p>Format specific options:
  42305. </p><dl class="table">
  42306. <dt><samp class="option">v_fov</samp></dt>
  42307. <dd><p>Set perspective parameter.
  42308. </p></dd>
  42309. </dl>
  42310. </dd>
  42311. <dt>&lsquo;<samp class="samp">tetrahedron</samp>&rsquo;</dt>
  42312. <dd><p>Tetrahedron projection.
  42313. </p>
  42314. </dd>
  42315. <dt>&lsquo;<samp class="samp">tsp</samp>&rsquo;</dt>
  42316. <dd><p>Truncated square pyramid projection.
  42317. </p>
  42318. </dd>
  42319. <dt>&lsquo;<samp class="samp">he</samp>&rsquo;</dt>
  42320. <dt>&lsquo;<samp class="samp">hequirect</samp>&rsquo;</dt>
  42321. <dd><p>Half equirectangular projection.
  42322. </p>
  42323. </dd>
  42324. <dt>&lsquo;<samp class="samp">equisolid</samp>&rsquo;</dt>
  42325. <dd><p>Equisolid format.
  42326. </p>
  42327. <p>Format specific options:
  42328. </p><dl class="table">
  42329. <dt><samp class="option">h_fov</samp></dt>
  42330. <dt><samp class="option">v_fov</samp></dt>
  42331. <dt><samp class="option">d_fov</samp></dt>
  42332. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  42333. </p>
  42334. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42335. </p>
  42336. </dd>
  42337. <dt><samp class="option">ih_fov</samp></dt>
  42338. <dt><samp class="option">iv_fov</samp></dt>
  42339. <dt><samp class="option">id_fov</samp></dt>
  42340. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  42341. </p>
  42342. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42343. </p></dd>
  42344. </dl>
  42345. </dd>
  42346. <dt>&lsquo;<samp class="samp">og</samp>&rsquo;</dt>
  42347. <dd><p>Orthographic format.
  42348. </p>
  42349. <p>Format specific options:
  42350. </p><dl class="table">
  42351. <dt><samp class="option">h_fov</samp></dt>
  42352. <dt><samp class="option">v_fov</samp></dt>
  42353. <dt><samp class="option">d_fov</samp></dt>
  42354. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  42355. </p>
  42356. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42357. </p>
  42358. </dd>
  42359. <dt><samp class="option">ih_fov</samp></dt>
  42360. <dt><samp class="option">iv_fov</samp></dt>
  42361. <dt><samp class="option">id_fov</samp></dt>
  42362. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  42363. </p>
  42364. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  42365. </p></dd>
  42366. </dl>
  42367. </dd>
  42368. <dt>&lsquo;<samp class="samp">octahedron</samp>&rsquo;</dt>
  42369. <dd><p>Octahedron projection.
  42370. </p>
  42371. </dd>
  42372. <dt>&lsquo;<samp class="samp">cylindricalea</samp>&rsquo;</dt>
  42373. <dd><p>Cylindrical Equal Area projection.
  42374. </p></dd>
  42375. </dl>
  42376. </dd>
  42377. <dt><samp class="option">interp</samp></dt>
  42378. <dd><p>Set interpolation method.<br>
  42379. <i class="i">Note: more complex interpolation methods require much more memory to run.</i>
  42380. </p>
  42381. <p>Available methods:
  42382. </p>
  42383. <dl class="table">
  42384. <dt>&lsquo;<samp class="samp">near</samp>&rsquo;</dt>
  42385. <dt>&lsquo;<samp class="samp">nearest</samp>&rsquo;</dt>
  42386. <dd><p>Nearest neighbour.
  42387. </p></dd>
  42388. <dt>&lsquo;<samp class="samp">line</samp>&rsquo;</dt>
  42389. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  42390. <dd><p>Bilinear interpolation.
  42391. </p></dd>
  42392. <dt>&lsquo;<samp class="samp">lagrange9</samp>&rsquo;</dt>
  42393. <dd><p>Lagrange9 interpolation.
  42394. </p></dd>
  42395. <dt>&lsquo;<samp class="samp">cube</samp>&rsquo;</dt>
  42396. <dt>&lsquo;<samp class="samp">cubic</samp>&rsquo;</dt>
  42397. <dd><p>Bicubic interpolation.
  42398. </p></dd>
  42399. <dt>&lsquo;<samp class="samp">lanc</samp>&rsquo;</dt>
  42400. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  42401. <dd><p>Lanczos interpolation.
  42402. </p></dd>
  42403. <dt>&lsquo;<samp class="samp">sp16</samp>&rsquo;</dt>
  42404. <dt>&lsquo;<samp class="samp">spline16</samp>&rsquo;</dt>
  42405. <dd><p>Spline16 interpolation.
  42406. </p></dd>
  42407. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  42408. <dt>&lsquo;<samp class="samp">gaussian</samp>&rsquo;</dt>
  42409. <dd><p>Gaussian interpolation.
  42410. </p></dd>
  42411. <dt>&lsquo;<samp class="samp">mitchell</samp>&rsquo;</dt>
  42412. <dd><p>Mitchell interpolation.
  42413. </p></dd>
  42414. </dl>
  42415. <p>Default value is <b class="b">&lsquo;<samp class="samp">line</samp>&rsquo;</b>.
  42416. </p>
  42417. </dd>
  42418. <dt><samp class="option">w</samp></dt>
  42419. <dt><samp class="option">h</samp></dt>
  42420. <dd><p>Set the output video resolution.
  42421. </p>
  42422. <p>Default resolution depends on formats.
  42423. </p>
  42424. </dd>
  42425. <dt><samp class="option">in_stereo</samp></dt>
  42426. <dt><samp class="option">out_stereo</samp></dt>
  42427. <dd><p>Set the input/output stereo format.
  42428. </p>
  42429. <dl class="table">
  42430. <dt>&lsquo;<samp class="samp">2d</samp>&rsquo;</dt>
  42431. <dd><p>2D mono
  42432. </p></dd>
  42433. <dt>&lsquo;<samp class="samp">sbs</samp>&rsquo;</dt>
  42434. <dd><p>Side by side
  42435. </p></dd>
  42436. <dt>&lsquo;<samp class="samp">tb</samp>&rsquo;</dt>
  42437. <dd><p>Top bottom
  42438. </p></dd>
  42439. </dl>
  42440. <p>Default value is <b class="b">&lsquo;<samp class="samp">2d</samp>&rsquo;</b> for input and output format.
  42441. </p>
  42442. </dd>
  42443. <dt><samp class="option">yaw</samp></dt>
  42444. <dt><samp class="option">pitch</samp></dt>
  42445. <dt><samp class="option">roll</samp></dt>
  42446. <dd><p>Set rotation for the output video. Values in degrees.
  42447. </p>
  42448. </dd>
  42449. <dt><samp class="option">rorder</samp></dt>
  42450. <dd><p>Set rotation order for the output video. Choose one item for each position.
  42451. </p>
  42452. <dl class="table">
  42453. <dt>&lsquo;<samp class="samp">y, Y</samp>&rsquo;</dt>
  42454. <dd><p>yaw
  42455. </p></dd>
  42456. <dt>&lsquo;<samp class="samp">p, P</samp>&rsquo;</dt>
  42457. <dd><p>pitch
  42458. </p></dd>
  42459. <dt>&lsquo;<samp class="samp">r, R</samp>&rsquo;</dt>
  42460. <dd><p>roll
  42461. </p></dd>
  42462. </dl>
  42463. <p>Default value is <b class="b">&lsquo;<samp class="samp">ypr</samp>&rsquo;</b>.
  42464. </p>
  42465. </dd>
  42466. <dt><samp class="option">h_flip</samp></dt>
  42467. <dt><samp class="option">v_flip</samp></dt>
  42468. <dt><samp class="option">d_flip</samp></dt>
  42469. <dd><p>Flip the output video horizontally(swaps left-right)/vertically(swaps up-down)/in-depth(swaps back-forward). Boolean values.
  42470. </p>
  42471. </dd>
  42472. <dt><samp class="option">ih_flip</samp></dt>
  42473. <dt><samp class="option">iv_flip</samp></dt>
  42474. <dd><p>Set if input video is flipped horizontally/vertically. Boolean values.
  42475. </p>
  42476. </dd>
  42477. <dt><samp class="option">in_trans</samp></dt>
  42478. <dd><p>Set if input video is transposed. Boolean value, by default disabled.
  42479. </p>
  42480. </dd>
  42481. <dt><samp class="option">out_trans</samp></dt>
  42482. <dd><p>Set if output video needs to be transposed. Boolean value, by default disabled.
  42483. </p>
  42484. </dd>
  42485. <dt><samp class="option">h_offset</samp></dt>
  42486. <dt><samp class="option">v_offset</samp></dt>
  42487. <dd><p>Set output horizontal/vertical off-axis offset. Default is set to 0.
  42488. Allowed range is from -1 to 1.
  42489. </p>
  42490. </dd>
  42491. <dt><samp class="option">alpha_mask</samp></dt>
  42492. <dd><p>Build mask in alpha plane for all unmapped pixels by marking them fully transparent. Boolean value, by default disabled.
  42493. </p>
  42494. </dd>
  42495. <dt><samp class="option">reset_rot</samp></dt>
  42496. <dd><p>Reset rotation of output video. Boolean value, by default disabled.
  42497. </p></dd>
  42498. </dl>
  42499. <ul class="mini-toc">
  42500. <li><a href="#Examples-151" accesskey="1">Examples</a></li>
  42501. <li><a href="#Commands-150" accesskey="2">Commands</a></li>
  42502. </ul>
  42503. <div class="subsection-level-extent" id="Examples-151">
  42504. <h4 class="subsection"><span>32.272.1 Examples<a class="copiable-link" href="#Examples-151"> &para;</a></span></h4>
  42505. <ul class="itemize mark-bullet">
  42506. <li>Convert equirectangular video to cubemap with 3x2 layout and 1% padding using bicubic interpolation:
  42507. <div class="example">
  42508. <pre class="example-preformatted">ffmpeg -i input.mkv -vf v360=e:c3x2:cubic:out_pad=0.01 output.mkv
  42509. </pre></div>
  42510. </li><li>Extract back view of Equi-Angular Cubemap:
  42511. <div class="example">
  42512. <pre class="example-preformatted">ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
  42513. </pre></div>
  42514. </li><li>Convert transposed and horizontally flipped Equi-Angular Cubemap in side-by-side stereo format to equirectangular top-bottom stereo format:
  42515. <div class="example">
  42516. <pre class="example-preformatted">v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
  42517. </pre></div>
  42518. </li></ul>
  42519. </div>
  42520. <div class="subsection-level-extent" id="Commands-150">
  42521. <h4 class="subsection"><span>32.272.2 Commands<a class="copiable-link" href="#Commands-150"> &para;</a></span></h4>
  42522. <p>This filter supports subset of above options as <a class="ref" href="#commands">commands</a>.
  42523. </p>
  42524. </div>
  42525. </div>
  42526. <div class="section-level-extent" id="vaguedenoiser">
  42527. <h3 class="section"><span>32.273 vaguedenoiser<a class="copiable-link" href="#vaguedenoiser"> &para;</a></span></h3>
  42528. <p>Apply a wavelet based denoiser.
  42529. </p>
  42530. <p>It transforms each frame from the video input into the wavelet domain,
  42531. using Cohen-Daubechies-Feauveau 9/7. Then it applies some filtering to
  42532. the obtained coefficients. It does an inverse wavelet transform after.
  42533. Due to wavelet properties, it should give a nice smoothed result, and
  42534. reduced noise, without blurring picture features.
  42535. </p>
  42536. <p>This filter accepts the following options:
  42537. </p>
  42538. <dl class="table">
  42539. <dt><samp class="option">threshold</samp></dt>
  42540. <dd><p>The filtering strength. The higher, the more filtered the video will be.
  42541. Hard thresholding can use a higher threshold than soft thresholding
  42542. before the video looks overfiltered. Default value is 2.
  42543. </p>
  42544. </dd>
  42545. <dt><samp class="option">method</samp></dt>
  42546. <dd><p>The filtering method the filter will use.
  42547. </p>
  42548. <p>It accepts the following values:
  42549. </p><dl class="table">
  42550. <dt>&lsquo;<samp class="samp">hard</samp>&rsquo;</dt>
  42551. <dd><p>All values under the threshold will be zeroed.
  42552. </p>
  42553. </dd>
  42554. <dt>&lsquo;<samp class="samp">soft</samp>&rsquo;</dt>
  42555. <dd><p>All values under the threshold will be zeroed. All values above will be
  42556. reduced by the threshold.
  42557. </p>
  42558. </dd>
  42559. <dt>&lsquo;<samp class="samp">garrote</samp>&rsquo;</dt>
  42560. <dd><p>Scales or nullifies coefficients - intermediary between (more) soft and
  42561. (less) hard thresholding.
  42562. </p></dd>
  42563. </dl>
  42564. <p>Default is garrote.
  42565. </p>
  42566. </dd>
  42567. <dt><samp class="option">nsteps</samp></dt>
  42568. <dd><p>Number of times, the wavelet will decompose the picture. Picture can&rsquo;t
  42569. be decomposed beyond a particular point (typically, 8 for a 640x480
  42570. frame - as 2^9 = 512 &gt; 480). Valid values are integers between 1 and 32. Default value is 6.
  42571. </p>
  42572. </dd>
  42573. <dt><samp class="option">percent</samp></dt>
  42574. <dd><p>Partial of full denoising (limited coefficients shrinking), from 0 to 100. Default value is 85.
  42575. </p>
  42576. </dd>
  42577. <dt><samp class="option">planes</samp></dt>
  42578. <dd><p>A list of the planes to process. By default all planes are processed.
  42579. </p>
  42580. </dd>
  42581. <dt><samp class="option">type</samp></dt>
  42582. <dd><p>The threshold type the filter will use.
  42583. </p>
  42584. <p>It accepts the following values:
  42585. </p><dl class="table">
  42586. <dt>&lsquo;<samp class="samp">universal</samp>&rsquo;</dt>
  42587. <dd><p>Threshold used is same for all decompositions.
  42588. </p>
  42589. </dd>
  42590. <dt>&lsquo;<samp class="samp">bayes</samp>&rsquo;</dt>
  42591. <dd><p>Threshold used depends also on each decomposition coefficients.
  42592. </p></dd>
  42593. </dl>
  42594. <p>Default is universal.
  42595. </p></dd>
  42596. </dl>
  42597. </div>
  42598. <div class="section-level-extent" id="varblur">
  42599. <h3 class="section"><span>32.274 varblur<a class="copiable-link" href="#varblur"> &para;</a></span></h3>
  42600. <p>Apply variable blur filter by using 2nd video stream to set blur radius.
  42601. The 2nd stream must have the same dimensions.
  42602. </p>
  42603. <p>This filter accepts the following options:
  42604. </p>
  42605. <dl class="table">
  42606. <dt><samp class="option">min_r</samp></dt>
  42607. <dd><p>Set min allowed radius. Allowed range is from 0 to 254. Default is 0.
  42608. </p></dd>
  42609. <dt><samp class="option">max_r</samp></dt>
  42610. <dd><p>Set max allowed radius. Allowed range is from 1 to 255. Default is 8.
  42611. </p></dd>
  42612. <dt><samp class="option">planes</samp></dt>
  42613. <dd><p>Set which planes to process. By default, all are used.
  42614. </p></dd>
  42615. </dl>
  42616. <p>The <code class="code">varblur</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  42617. </p>
  42618. <ul class="mini-toc">
  42619. <li><a href="#Commands-151" accesskey="1">Commands</a></li>
  42620. </ul>
  42621. <div class="subsection-level-extent" id="Commands-151">
  42622. <h4 class="subsection"><span>32.274.1 Commands<a class="copiable-link" href="#Commands-151"> &para;</a></span></h4>
  42623. <p>This filter supports all the above options as <a class="ref" href="#commands">commands</a>.
  42624. </p>
  42625. </div>
  42626. </div>
  42627. <div class="section-level-extent" id="vectorscope">
  42628. <h3 class="section"><span>32.275 vectorscope<a class="copiable-link" href="#vectorscope"> &para;</a></span></h3>
  42629. <p>Display 2 color component values in the two dimensional graph (which is called
  42630. a vectorscope).
  42631. </p>
  42632. <p>This filter accepts the following options:
  42633. </p>
  42634. <dl class="table">
  42635. <dt><samp class="option">mode, m</samp></dt>
  42636. <dd><p>Set vectorscope mode.
  42637. </p>
  42638. <p>It accepts the following values:
  42639. </p><dl class="table">
  42640. <dt>&lsquo;<samp class="samp">gray</samp>&rsquo;</dt>
  42641. <dt>&lsquo;<samp class="samp">tint</samp>&rsquo;</dt>
  42642. <dd><p>Gray values are displayed on graph, higher brightness means more pixels have
  42643. same component color value on location in graph. This is the default mode.
  42644. </p>
  42645. </dd>
  42646. <dt>&lsquo;<samp class="samp">color</samp>&rsquo;</dt>
  42647. <dd><p>Gray values are displayed on graph. Surrounding pixels values which are not
  42648. present in video frame are drawn in gradient of 2 color components which are
  42649. set by option <code class="code">x</code> and <code class="code">y</code>. The 3rd color component is static.
  42650. </p>
  42651. </dd>
  42652. <dt>&lsquo;<samp class="samp">color2</samp>&rsquo;</dt>
  42653. <dd><p>Actual color components values present in video frame are displayed on graph.
  42654. </p>
  42655. </dd>
  42656. <dt>&lsquo;<samp class="samp">color3</samp>&rsquo;</dt>
  42657. <dd><p>Similar as color2 but higher frequency of same values <code class="code">x</code> and <code class="code">y</code>
  42658. on graph increases value of another color component, which is luminance by
  42659. default values of <code class="code">x</code> and <code class="code">y</code>.
  42660. </p>
  42661. </dd>
  42662. <dt>&lsquo;<samp class="samp">color4</samp>&rsquo;</dt>
  42663. <dd><p>Actual colors present in video frame are displayed on graph. If two different
  42664. colors map to same position on graph then color with higher value of component
  42665. not present in graph is picked.
  42666. </p>
  42667. </dd>
  42668. <dt>&lsquo;<samp class="samp">color5</samp>&rsquo;</dt>
  42669. <dd><p>Gray values are displayed on graph. Similar to <code class="code">color</code> but with 3rd color
  42670. component picked from radial gradient.
  42671. </p></dd>
  42672. </dl>
  42673. </dd>
  42674. <dt><samp class="option">x</samp></dt>
  42675. <dd><p>Set which color component will be represented on X-axis. Default is <code class="code">1</code>.
  42676. </p>
  42677. </dd>
  42678. <dt><samp class="option">y</samp></dt>
  42679. <dd><p>Set which color component will be represented on Y-axis. Default is <code class="code">2</code>.
  42680. </p>
  42681. </dd>
  42682. <dt><samp class="option">intensity, i</samp></dt>
  42683. <dd><p>Set intensity, used by modes: gray, color, color3 and color5 for increasing brightness
  42684. of color component which represents frequency of (X, Y) location in graph.
  42685. </p>
  42686. </dd>
  42687. <dt><samp class="option">envelope, e</samp></dt>
  42688. <dd><dl class="table">
  42689. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  42690. <dd><p>No envelope, this is default.
  42691. </p>
  42692. </dd>
  42693. <dt>&lsquo;<samp class="samp">instant</samp>&rsquo;</dt>
  42694. <dd><p>Instant envelope, even darkest single pixel will be clearly highlighted.
  42695. </p>
  42696. </dd>
  42697. <dt>&lsquo;<samp class="samp">peak</samp>&rsquo;</dt>
  42698. <dd><p>Hold maximum and minimum values presented in graph over time. This way you
  42699. can still spot out of range values without constantly looking at vectorscope.
  42700. </p>
  42701. </dd>
  42702. <dt>&lsquo;<samp class="samp">peak+instant</samp>&rsquo;</dt>
  42703. <dd><p>Peak and instant envelope combined together.
  42704. </p></dd>
  42705. </dl>
  42706. </dd>
  42707. <dt><samp class="option">graticule, g</samp></dt>
  42708. <dd><p>Set what kind of graticule to draw.
  42709. </p><dl class="table">
  42710. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  42711. <dt>&lsquo;<samp class="samp">green</samp>&rsquo;</dt>
  42712. <dt>&lsquo;<samp class="samp">color</samp>&rsquo;</dt>
  42713. <dt>&lsquo;<samp class="samp">invert</samp>&rsquo;</dt>
  42714. </dl>
  42715. </dd>
  42716. <dt><samp class="option">opacity, o</samp></dt>
  42717. <dd><p>Set graticule opacity.
  42718. </p>
  42719. </dd>
  42720. <dt><samp class="option">flags, f</samp></dt>
  42721. <dd><p>Set graticule flags.
  42722. </p>
  42723. <dl class="table">
  42724. <dt>&lsquo;<samp class="samp">white</samp>&rsquo;</dt>
  42725. <dd><p>Draw graticule for white point.
  42726. </p>
  42727. </dd>
  42728. <dt>&lsquo;<samp class="samp">black</samp>&rsquo;</dt>
  42729. <dd><p>Draw graticule for black point.
  42730. </p>
  42731. </dd>
  42732. <dt>&lsquo;<samp class="samp">name</samp>&rsquo;</dt>
  42733. <dd><p>Draw color points short names.
  42734. </p></dd>
  42735. </dl>
  42736. </dd>
  42737. <dt><samp class="option">bgopacity, b</samp></dt>
  42738. <dd><p>Set background opacity.
  42739. </p>
  42740. </dd>
  42741. <dt><samp class="option">lthreshold, l</samp></dt>
  42742. <dd><p>Set low threshold for color component not represented on X or Y axis.
  42743. Values lower than this value will be ignored. Default is 0.
  42744. Note this value is multiplied with actual max possible value one pixel component
  42745. can have. So for 8-bit input and low threshold value of 0.1 actual threshold
  42746. is 0.1 * 255 = 25.
  42747. </p>
  42748. </dd>
  42749. <dt><samp class="option">hthreshold, h</samp></dt>
  42750. <dd><p>Set high threshold for color component not represented on X or Y axis.
  42751. Values higher than this value will be ignored. Default is 1.
  42752. Note this value is multiplied with actual max possible value one pixel component
  42753. can have. So for 8-bit input and high threshold value of 0.9 actual threshold
  42754. is 0.9 * 255 = 230.
  42755. </p>
  42756. </dd>
  42757. <dt><samp class="option">colorspace, c</samp></dt>
  42758. <dd><p>Set what kind of colorspace to use when drawing graticule.
  42759. </p><dl class="table">
  42760. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  42761. <dt>&lsquo;<samp class="samp">601</samp>&rsquo;</dt>
  42762. <dt>&lsquo;<samp class="samp">709</samp>&rsquo;</dt>
  42763. </dl>
  42764. <p>Default is auto.
  42765. </p>
  42766. </dd>
  42767. <dt><samp class="option">tint0, t0</samp></dt>
  42768. <dt><samp class="option">tint1, t1</samp></dt>
  42769. <dd><p>Set color tint for gray/tint vectorscope mode. By default both options are zero.
  42770. This means no tint, and output will remain gray.
  42771. </p></dd>
  42772. </dl>
  42773. <a class="anchor" id="vidstabdetect"></a></div>
  42774. <div class="section-level-extent" id="vidstabdetect-1">
  42775. <h3 class="section"><span>32.276 vidstabdetect<a class="copiable-link" href="#vidstabdetect-1"> &para;</a></span></h3>
  42776. <p>Analyze video stabilization/deshaking. Perform pass 1 of 2, see
  42777. <a class="ref" href="#vidstabtransform">vidstabtransform</a> for pass 2.
  42778. </p>
  42779. <p>This filter generates a file with relative translation and rotation
  42780. transform information about subsequent frames, which is then used by
  42781. the <a class="ref" href="#vidstabtransform">vidstabtransform</a> filter.
  42782. </p>
  42783. <p>To enable compilation of this filter you need to configure FFmpeg with
  42784. <code class="code">--enable-libvidstab</code>.
  42785. </p>
  42786. <p>This filter accepts the following options:
  42787. </p>
  42788. <dl class="table">
  42789. <dt><samp class="option">result</samp></dt>
  42790. <dd><p>Set the path to the file used to write the transforms information.
  42791. Default value is <samp class="file">transforms.trf</samp>.
  42792. </p>
  42793. </dd>
  42794. <dt><samp class="option">shakiness</samp></dt>
  42795. <dd><p>Set how shaky the video is and how quick the camera is. It accepts an
  42796. integer in the range 1-10, a value of 1 means little shakiness, a
  42797. value of 10 means strong shakiness. Default value is 5.
  42798. </p>
  42799. </dd>
  42800. <dt><samp class="option">accuracy</samp></dt>
  42801. <dd><p>Set the accuracy of the detection process. It must be a value in the
  42802. range 1-15. A value of 1 means low accuracy, a value of 15 means high
  42803. accuracy. Default value is 15.
  42804. </p>
  42805. </dd>
  42806. <dt><samp class="option">stepsize</samp></dt>
  42807. <dd><p>Set stepsize of the search process. The region around minimum is
  42808. scanned with 1 pixel resolution. Default value is 6.
  42809. </p>
  42810. </dd>
  42811. <dt><samp class="option">mincontrast</samp></dt>
  42812. <dd><p>Set minimum contrast. Below this value a local measurement field is
  42813. discarded. Must be a floating point value in the range 0-1. Default
  42814. value is 0.3.
  42815. </p>
  42816. </dd>
  42817. <dt><samp class="option">tripod</samp></dt>
  42818. <dd><p>Set reference frame number for tripod mode.
  42819. </p>
  42820. <p>If enabled, the motion of the frames is compared to a reference frame
  42821. in the filtered stream, identified by the specified number. The idea
  42822. is to compensate all movements in a more-or-less static scene and keep
  42823. the camera view absolutely still.
  42824. </p>
  42825. <p>If set to 0, it is disabled. The frames are counted starting from 1.
  42826. </p>
  42827. </dd>
  42828. <dt><samp class="option">show</samp></dt>
  42829. <dd><p>Show fields and transforms in the resulting frames. It accepts an
  42830. integer in the range 0-2. Default value is 0, which disables any
  42831. visualization.
  42832. </p>
  42833. </dd>
  42834. <dt><samp class="option">fileformat</samp></dt>
  42835. <dd><p>Format for the transforms data file to be written.
  42836. Acceptable values are
  42837. </p>
  42838. <dl class="table">
  42839. <dt>&lsquo;<samp class="samp">ascii</samp>&rsquo;</dt>
  42840. <dd><p>Human-readable plain text
  42841. </p>
  42842. </dd>
  42843. <dt>&lsquo;<samp class="samp">binary</samp>&rsquo;</dt>
  42844. <dd><p>Binary format, roughly 40% smaller than <code class="code">ascii</code>. (<em class="emph">default</em>)
  42845. </p></dd>
  42846. </dl>
  42847. </dd>
  42848. </dl>
  42849. <ul class="mini-toc">
  42850. <li><a href="#Examples-152" accesskey="1">Examples</a></li>
  42851. </ul>
  42852. <div class="subsection-level-extent" id="Examples-152">
  42853. <h4 class="subsection"><span>32.276.1 Examples<a class="copiable-link" href="#Examples-152"> &para;</a></span></h4>
  42854. <ul class="itemize mark-bullet">
  42855. <li>Use default values:
  42856. <div class="example">
  42857. <pre class="example-preformatted">vidstabdetect
  42858. </pre></div>
  42859. </li><li>Analyze strongly shaky movie and put the results in file
  42860. <samp class="file">mytransforms.trf</samp>:
  42861. <div class="example">
  42862. <pre class="example-preformatted">vidstabdetect=shakiness=10:accuracy=15:result=&quot;mytransforms.trf&quot;
  42863. </pre></div>
  42864. </li><li>Visualize the result of internal transformations in the resulting
  42865. video:
  42866. <div class="example">
  42867. <pre class="example-preformatted">vidstabdetect=show=1
  42868. </pre></div>
  42869. </li><li>Analyze a video with medium shakiness using <code class="command">ffmpeg</code>:
  42870. <div class="example">
  42871. <pre class="example-preformatted">ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
  42872. </pre></div>
  42873. </li></ul>
  42874. <a class="anchor" id="vidstabtransform"></a></div>
  42875. </div>
  42876. <div class="section-level-extent" id="vidstabtransform-1">
  42877. <h3 class="section"><span>32.277 vidstabtransform<a class="copiable-link" href="#vidstabtransform-1"> &para;</a></span></h3>
  42878. <p>Video stabilization/deshaking: pass 2 of 2,
  42879. see <a class="ref" href="#vidstabdetect">vidstabdetect</a> for pass 1.
  42880. </p>
  42881. <p>Read a file with transform information for each frame and
  42882. apply/compensate them. Together with the <a class="ref" href="#vidstabdetect">vidstabdetect</a>
  42883. filter this can be used to deshake videos. See also
  42884. <a class="url" href="http://public.hronopik.de/vid.stab">http://public.hronopik.de/vid.stab</a>. It is important to also use
  42885. the <a class="ref" href="#unsharp">unsharp</a> filter, see below.
  42886. </p>
  42887. <p>To enable compilation of this filter you need to configure FFmpeg with
  42888. <code class="code">--enable-libvidstab</code>.
  42889. </p>
  42890. <ul class="mini-toc">
  42891. <li><a href="#Options-41" accesskey="1">Options</a></li>
  42892. <li><a href="#Examples-153" accesskey="2">Examples</a></li>
  42893. </ul>
  42894. <div class="subsection-level-extent" id="Options-41">
  42895. <h4 class="subsection"><span>32.277.1 Options<a class="copiable-link" href="#Options-41"> &para;</a></span></h4>
  42896. <dl class="table">
  42897. <dt><samp class="option">input</samp></dt>
  42898. <dd><p>Set path to the file used to read the transforms. Default value is
  42899. <samp class="file">transforms.trf</samp>.
  42900. </p>
  42901. </dd>
  42902. <dt><samp class="option">smoothing</samp></dt>
  42903. <dd><p>Set the number of frames (value*2 + 1) used for lowpass filtering the
  42904. camera movements. Default value is 10.
  42905. </p>
  42906. <p>For example a number of 10 means that 21 frames are used (10 in the
  42907. past and 10 in the future) to smoothen the motion in the video. A
  42908. larger value leads to a smoother video, but limits the acceleration of
  42909. the camera (pan/tilt movements). 0 is a special case where a static
  42910. camera is simulated.
  42911. </p>
  42912. </dd>
  42913. <dt><samp class="option">optalgo</samp></dt>
  42914. <dd><p>Set the camera path optimization algorithm.
  42915. </p>
  42916. <p>Accepted values are:
  42917. </p><dl class="table">
  42918. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  42919. <dd><p>gaussian kernel low-pass filter on camera motion (default)
  42920. </p></dd>
  42921. <dt>&lsquo;<samp class="samp">avg</samp>&rsquo;</dt>
  42922. <dd><p>averaging on transformations
  42923. </p></dd>
  42924. </dl>
  42925. </dd>
  42926. <dt><samp class="option">maxshift</samp></dt>
  42927. <dd><p>Set maximal number of pixels to translate frames. Default value is -1,
  42928. meaning no limit.
  42929. </p>
  42930. </dd>
  42931. <dt><samp class="option">maxangle</samp></dt>
  42932. <dd><p>Set maximal angle in radians (degree*PI/180) to rotate frames. Default
  42933. value is -1, meaning no limit.
  42934. </p>
  42935. </dd>
  42936. <dt><samp class="option">crop</samp></dt>
  42937. <dd><p>Specify how to deal with borders that may be visible due to movement
  42938. compensation.
  42939. </p>
  42940. <p>Available values are:
  42941. </p><dl class="table">
  42942. <dt>&lsquo;<samp class="samp">keep</samp>&rsquo;</dt>
  42943. <dd><p>keep image information from previous frame (default)
  42944. </p></dd>
  42945. <dt>&lsquo;<samp class="samp">black</samp>&rsquo;</dt>
  42946. <dd><p>fill the border black
  42947. </p></dd>
  42948. </dl>
  42949. </dd>
  42950. <dt><samp class="option">invert</samp></dt>
  42951. <dd><p>Invert transforms if set to 1. Default value is 0.
  42952. </p>
  42953. </dd>
  42954. <dt><samp class="option">relative</samp></dt>
  42955. <dd><p>Consider transforms as relative to previous frame if set to 1,
  42956. absolute if set to 0. Default value is 0.
  42957. </p>
  42958. </dd>
  42959. <dt><samp class="option">zoom</samp></dt>
  42960. <dd><p>Set percentage to zoom. A positive value will result in a zoom-in
  42961. effect, a negative value in a zoom-out effect. Default value is 0 (no
  42962. zoom).
  42963. </p>
  42964. </dd>
  42965. <dt><samp class="option">optzoom</samp></dt>
  42966. <dd><p>Set optimal zooming to avoid borders.
  42967. </p>
  42968. <p>Accepted values are:
  42969. </p><dl class="table">
  42970. <dt>&lsquo;<samp class="samp">0</samp>&rsquo;</dt>
  42971. <dd><p>disabled
  42972. </p></dd>
  42973. <dt>&lsquo;<samp class="samp">1</samp>&rsquo;</dt>
  42974. <dd><p>optimal static zoom value is determined (only very strong movements
  42975. will lead to visible borders) (default)
  42976. </p></dd>
  42977. <dt>&lsquo;<samp class="samp">2</samp>&rsquo;</dt>
  42978. <dd><p>optimal adaptive zoom value is determined (no borders will be
  42979. visible), see <samp class="option">zoomspeed</samp>
  42980. </p></dd>
  42981. </dl>
  42982. <p>Note that the value given at zoom is added to the one calculated here.
  42983. </p>
  42984. </dd>
  42985. <dt><samp class="option">zoomspeed</samp></dt>
  42986. <dd><p>Set percent to zoom maximally each frame (enabled when
  42987. <samp class="option">optzoom</samp> is set to 2). Range is from 0 to 5, default value is
  42988. 0.25.
  42989. </p>
  42990. </dd>
  42991. <dt><samp class="option">interpol</samp></dt>
  42992. <dd><p>Specify type of interpolation.
  42993. </p>
  42994. <p>Available values are:
  42995. </p><dl class="table">
  42996. <dt>&lsquo;<samp class="samp">no</samp>&rsquo;</dt>
  42997. <dd><p>no interpolation
  42998. </p></dd>
  42999. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  43000. <dd><p>linear only horizontal
  43001. </p></dd>
  43002. <dt>&lsquo;<samp class="samp">bilinear</samp>&rsquo;</dt>
  43003. <dd><p>linear in both directions (default)
  43004. </p></dd>
  43005. <dt>&lsquo;<samp class="samp">bicubic</samp>&rsquo;</dt>
  43006. <dd><p>cubic in both directions (slow)
  43007. </p></dd>
  43008. </dl>
  43009. </dd>
  43010. <dt><samp class="option">tripod</samp></dt>
  43011. <dd><p>Enable virtual tripod mode if set to 1, which is equivalent to
  43012. <code class="code">relative=0:smoothing=0</code>. Default value is 0.
  43013. </p>
  43014. <p>Use also <code class="code">tripod</code> option of <a class="ref" href="#vidstabdetect">vidstabdetect</a>.
  43015. </p>
  43016. </dd>
  43017. <dt><samp class="option">debug</samp></dt>
  43018. <dd><p>Increase log verbosity if set to 1. Also the detected global motions
  43019. are written to the temporary file <samp class="file">global_motions.trf</samp>. Default
  43020. value is 0.
  43021. </p></dd>
  43022. </dl>
  43023. </div>
  43024. <div class="subsection-level-extent" id="Examples-153">
  43025. <h4 class="subsection"><span>32.277.2 Examples<a class="copiable-link" href="#Examples-153"> &para;</a></span></h4>
  43026. <ul class="itemize mark-bullet">
  43027. <li>Use <code class="command">ffmpeg</code> for a typical stabilization with default values:
  43028. <div class="example">
  43029. <pre class="example-preformatted">ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg
  43030. </pre></div>
  43031. <p>Note the use of the <a class="ref" href="#unsharp">unsharp</a> filter which is always recommended.
  43032. </p>
  43033. </li><li>Zoom in a bit more and load transform data from a given file:
  43034. <div class="example">
  43035. <pre class="example-preformatted">vidstabtransform=zoom=5:input=&quot;mytransforms.trf&quot;
  43036. </pre></div>
  43037. </li><li>Smoothen the video even more:
  43038. <div class="example">
  43039. <pre class="example-preformatted">vidstabtransform=smoothing=30
  43040. </pre></div>
  43041. </li></ul>
  43042. </div>
  43043. </div>
  43044. <div class="section-level-extent" id="vflip">
  43045. <h3 class="section"><span>32.278 vflip<a class="copiable-link" href="#vflip"> &para;</a></span></h3>
  43046. <p>Flip the input video vertically.
  43047. </p>
  43048. <p>For example, to vertically flip a video with <code class="command">ffmpeg</code>:
  43049. </p><div class="example">
  43050. <pre class="example-preformatted">ffmpeg -i in.avi -vf &quot;vflip&quot; out.avi
  43051. </pre></div>
  43052. </div>
  43053. <div class="section-level-extent" id="vfrdet">
  43054. <h3 class="section"><span>32.279 vfrdet<a class="copiable-link" href="#vfrdet"> &para;</a></span></h3>
  43055. <p>Detect variable frame rate video.
  43056. </p>
  43057. <p>This filter tries to detect if the input is variable or constant frame rate.
  43058. </p>
  43059. <p>At end it will output number of frames detected as having variable delta pts,
  43060. and ones with constant delta pts.
  43061. If there was frames with variable delta, than it will also show min, max and
  43062. average delta encountered.
  43063. </p>
  43064. </div>
  43065. <div class="section-level-extent" id="vibrance">
  43066. <h3 class="section"><span>32.280 vibrance<a class="copiable-link" href="#vibrance"> &para;</a></span></h3>
  43067. <p>Boost or alter saturation.
  43068. </p>
  43069. <p>The filter accepts the following options:
  43070. </p><dl class="table">
  43071. <dt><samp class="option">intensity</samp></dt>
  43072. <dd><p>Set strength of boost if positive value or strength of alter if negative value.
  43073. Default is 0. Allowed range is from -2 to 2.
  43074. </p>
  43075. </dd>
  43076. <dt><samp class="option">rbal</samp></dt>
  43077. <dd><p>Set the red balance. Default is 1. Allowed range is from -10 to 10.
  43078. </p>
  43079. </dd>
  43080. <dt><samp class="option">gbal</samp></dt>
  43081. <dd><p>Set the green balance. Default is 1. Allowed range is from -10 to 10.
  43082. </p>
  43083. </dd>
  43084. <dt><samp class="option">bbal</samp></dt>
  43085. <dd><p>Set the blue balance. Default is 1. Allowed range is from -10 to 10.
  43086. </p>
  43087. </dd>
  43088. <dt><samp class="option">rlum</samp></dt>
  43089. <dd><p>Set the red luma coefficient.
  43090. </p>
  43091. </dd>
  43092. <dt><samp class="option">glum</samp></dt>
  43093. <dd><p>Set the green luma coefficient.
  43094. </p>
  43095. </dd>
  43096. <dt><samp class="option">blum</samp></dt>
  43097. <dd><p>Set the blue luma coefficient.
  43098. </p>
  43099. </dd>
  43100. <dt><samp class="option">alternate</samp></dt>
  43101. <dd><p>If <code class="code">intensity</code> is negative and this is set to 1, colors will change,
  43102. otherwise colors will be less saturated, more towards gray.
  43103. </p></dd>
  43104. </dl>
  43105. <ul class="mini-toc">
  43106. <li><a href="#Commands-152" accesskey="1">Commands</a></li>
  43107. </ul>
  43108. <div class="subsection-level-extent" id="Commands-152">
  43109. <h4 class="subsection"><span>32.280.1 Commands<a class="copiable-link" href="#Commands-152"> &para;</a></span></h4>
  43110. <p>This filter supports the all above options as <a class="ref" href="#commands">commands</a>.
  43111. </p>
  43112. </div>
  43113. </div>
  43114. <div class="section-level-extent" id="vif">
  43115. <h3 class="section"><span>32.281 vif<a class="copiable-link" href="#vif"> &para;</a></span></h3>
  43116. <p>Obtain the average VIF (Visual Information Fidelity) between two input videos.
  43117. </p>
  43118. <p>This filter takes two input videos.
  43119. </p>
  43120. <p>Both input videos must have the same resolution and pixel format for
  43121. this filter to work correctly. Also it assumes that both inputs
  43122. have the same number of frames, which are compared one by one.
  43123. </p>
  43124. <p>The obtained average VIF score is printed through the logging system.
  43125. </p>
  43126. <p>The filter stores the calculated VIF score of each frame.
  43127. </p>
  43128. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  43129. </p>
  43130. <p>In the below example the input file <samp class="file">main.mpg</samp> being processed is compared
  43131. with the reference file <samp class="file">ref.mpg</samp>.
  43132. </p>
  43133. <div class="example">
  43134. <pre class="example-preformatted">ffmpeg -i main.mpg -i ref.mpg -lavfi vif -f null -
  43135. </pre></div>
  43136. <a class="anchor" id="vignette"></a></div>
  43137. <div class="section-level-extent" id="vignette-1">
  43138. <h3 class="section"><span>32.282 vignette<a class="copiable-link" href="#vignette-1"> &para;</a></span></h3>
  43139. <p>Make or reverse a natural vignetting effect.
  43140. </p>
  43141. <p>The filter accepts the following options:
  43142. </p>
  43143. <dl class="table">
  43144. <dt><samp class="option">angle, a</samp></dt>
  43145. <dd><p>Set lens angle expression as a number of radians.
  43146. </p>
  43147. <p>The value is clipped in the <code class="code">[0,PI/2]</code> range.
  43148. </p>
  43149. <p>Default value: <code class="code">&quot;PI/5&quot;</code>
  43150. </p>
  43151. </dd>
  43152. <dt><samp class="option">x0</samp></dt>
  43153. <dt><samp class="option">y0</samp></dt>
  43154. <dd><p>Set center coordinates expressions. Respectively <code class="code">&quot;w/2&quot;</code> and <code class="code">&quot;h/2&quot;</code>
  43155. by default.
  43156. </p>
  43157. </dd>
  43158. <dt><samp class="option">mode</samp></dt>
  43159. <dd><p>Set forward/backward mode.
  43160. </p>
  43161. <p>Available modes are:
  43162. </p><dl class="table">
  43163. <dt>&lsquo;<samp class="samp">forward</samp>&rsquo;</dt>
  43164. <dd><p>The larger the distance from the central point, the darker the image becomes.
  43165. </p>
  43166. </dd>
  43167. <dt>&lsquo;<samp class="samp">backward</samp>&rsquo;</dt>
  43168. <dd><p>The larger the distance from the central point, the brighter the image becomes.
  43169. This can be used to reverse a vignette effect, though there is no automatic
  43170. detection to extract the lens <samp class="option">angle</samp> and other settings (yet). It can
  43171. also be used to create a burning effect.
  43172. </p></dd>
  43173. </dl>
  43174. <p>Default value is &lsquo;<samp class="samp">forward</samp>&rsquo;.
  43175. </p>
  43176. </dd>
  43177. <dt><samp class="option">eval</samp></dt>
  43178. <dd><p>Set evaluation mode for the expressions (<samp class="option">angle</samp>, <samp class="option">x0</samp>, <samp class="option">y0</samp>).
  43179. </p>
  43180. <p>It accepts the following values:
  43181. </p><dl class="table">
  43182. <dt>&lsquo;<samp class="samp">init</samp>&rsquo;</dt>
  43183. <dd><p>Evaluate expressions only once during the filter initialization.
  43184. </p>
  43185. </dd>
  43186. <dt>&lsquo;<samp class="samp">frame</samp>&rsquo;</dt>
  43187. <dd><p>Evaluate expressions for each incoming frame. This is way slower than the
  43188. &lsquo;<samp class="samp">init</samp>&rsquo; mode since it requires all the scalers to be re-computed, but it
  43189. allows advanced dynamic expressions.
  43190. </p></dd>
  43191. </dl>
  43192. <p>Default value is &lsquo;<samp class="samp">init</samp>&rsquo;.
  43193. </p>
  43194. </dd>
  43195. <dt><samp class="option">dither</samp></dt>
  43196. <dd><p>Set dithering to reduce the circular banding effects. Default is <code class="code">1</code>
  43197. (enabled).
  43198. </p>
  43199. </dd>
  43200. <dt><samp class="option">aspect</samp></dt>
  43201. <dd><p>Set vignette aspect. This setting allows one to adjust the shape of the vignette.
  43202. Setting this value to the SAR of the input will make a rectangular vignetting
  43203. following the dimensions of the video.
  43204. </p>
  43205. <p>Default is <code class="code">1/1</code>.
  43206. </p></dd>
  43207. </dl>
  43208. <ul class="mini-toc">
  43209. <li><a href="#Expressions" accesskey="1">Expressions</a></li>
  43210. <li><a href="#Examples-154" accesskey="2">Examples</a></li>
  43211. </ul>
  43212. <div class="subsection-level-extent" id="Expressions">
  43213. <h4 class="subsection"><span>32.282.1 Expressions<a class="copiable-link" href="#Expressions"> &para;</a></span></h4>
  43214. <p>The <samp class="option">alpha</samp>, <samp class="option">x0</samp> and <samp class="option">y0</samp> expressions can contain the
  43215. following parameters.
  43216. </p>
  43217. <dl class="table">
  43218. <dt><samp class="option">w</samp></dt>
  43219. <dt><samp class="option">h</samp></dt>
  43220. <dd><p>input width and height
  43221. </p>
  43222. </dd>
  43223. <dt><samp class="option">n</samp></dt>
  43224. <dd><p>the number of input frame, starting from 0
  43225. </p>
  43226. </dd>
  43227. <dt><samp class="option">pts</samp></dt>
  43228. <dd><p>the PTS (Presentation TimeStamp) time of the filtered video frame, expressed in
  43229. <var class="var">TB</var> units, NAN if undefined
  43230. </p>
  43231. </dd>
  43232. <dt><samp class="option">r</samp></dt>
  43233. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  43234. </p>
  43235. </dd>
  43236. <dt><samp class="option">t</samp></dt>
  43237. <dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
  43238. expressed in seconds, NAN if undefined
  43239. </p>
  43240. </dd>
  43241. <dt><samp class="option">tb</samp></dt>
  43242. <dd><p>time base of the input video
  43243. </p></dd>
  43244. </dl>
  43245. </div>
  43246. <div class="subsection-level-extent" id="Examples-154">
  43247. <h4 class="subsection"><span>32.282.2 Examples<a class="copiable-link" href="#Examples-154"> &para;</a></span></h4>
  43248. <ul class="itemize mark-bullet">
  43249. <li>Apply simple strong vignetting effect:
  43250. <div class="example">
  43251. <pre class="example-preformatted">vignette=PI/4
  43252. </pre></div>
  43253. </li><li>Make a flickering vignetting:
  43254. <div class="example">
  43255. <pre class="example-preformatted">vignette='PI/4+random(1)*PI/50':eval=frame
  43256. </pre></div>
  43257. </li></ul>
  43258. </div>
  43259. </div>
  43260. <div class="section-level-extent" id="vmafmotion">
  43261. <h3 class="section"><span>32.283 vmafmotion<a class="copiable-link" href="#vmafmotion"> &para;</a></span></h3>
  43262. <p>Obtain the average VMAF motion score of a video.
  43263. It is one of the component metrics of VMAF.
  43264. </p>
  43265. <p>The obtained average motion score is printed through the logging system.
  43266. </p>
  43267. <p>The filter accepts the following options:
  43268. </p>
  43269. <dl class="table">
  43270. <dt><samp class="option">stats_file</samp></dt>
  43271. <dd><p>If specified, the filter will use the named file to save the motion score of
  43272. each frame with respect to the previous frame.
  43273. When filename equals &quot;-&quot; the data is sent to standard output.
  43274. </p></dd>
  43275. </dl>
  43276. <p>Example:
  43277. </p><div class="example">
  43278. <pre class="example-preformatted">ffmpeg -i ref.mpg -vf vmafmotion -f null -
  43279. </pre></div>
  43280. <a class="anchor" id="vstack"></a></div>
  43281. <div class="section-level-extent" id="vstack-1">
  43282. <h3 class="section"><span>32.284 vstack<a class="copiable-link" href="#vstack-1"> &para;</a></span></h3>
  43283. <p>Stack input videos vertically.
  43284. </p>
  43285. <p>All streams must be of same pixel format and of same width.
  43286. </p>
  43287. <p>Note that this filter is faster than using <a class="ref" href="#overlay">overlay</a> and <a class="ref" href="#pad">pad</a> filter
  43288. to create same output.
  43289. </p>
  43290. <p>The filter accepts the following options:
  43291. </p>
  43292. <dl class="table">
  43293. <dt><samp class="option">inputs</samp></dt>
  43294. <dd><p>Set number of input streams. Default is 2.
  43295. </p>
  43296. </dd>
  43297. <dt><samp class="option">shortest</samp></dt>
  43298. <dd><p>If set to 1, force the output to terminate when the shortest input
  43299. terminates. Default value is 0.
  43300. </p></dd>
  43301. </dl>
  43302. </div>
  43303. <div class="section-level-extent" id="w3fdif">
  43304. <h3 class="section"><span>32.285 w3fdif<a class="copiable-link" href="#w3fdif"> &para;</a></span></h3>
  43305. <p>Deinterlace the input video (&quot;w3fdif&quot; stands for &quot;Weston 3 Field
  43306. Deinterlacing Filter&quot;).
  43307. </p>
  43308. <p>Based on the process described by Martin Weston for BBC R&amp;D, and
  43309. implemented based on the de-interlace algorithm written by Jim
  43310. Easterbrook for BBC R&amp;D, the Weston 3 field deinterlacing filter
  43311. uses filter coefficients calculated by BBC R&amp;D.
  43312. </p>
  43313. <p>This filter uses field-dominance information in frame to decide which
  43314. of each pair of fields to place first in the output.
  43315. If it gets it wrong use <a class="ref" href="#setfield">setfield</a> filter before <code class="code">w3fdif</code> filter.
  43316. </p>
  43317. <p>There are two sets of filter coefficients, so called &quot;simple&quot;
  43318. and &quot;complex&quot;. Which set of filter coefficients is used can
  43319. be set by passing an optional parameter:
  43320. </p>
  43321. <dl class="table">
  43322. <dt><samp class="option">filter</samp></dt>
  43323. <dd><p>Set the interlacing filter coefficients. Accepts one of the following values:
  43324. </p>
  43325. <dl class="table">
  43326. <dt>&lsquo;<samp class="samp">simple</samp>&rsquo;</dt>
  43327. <dd><p>Simple filter coefficient set.
  43328. </p></dd>
  43329. <dt>&lsquo;<samp class="samp">complex</samp>&rsquo;</dt>
  43330. <dd><p>More-complex filter coefficient set.
  43331. </p></dd>
  43332. </dl>
  43333. <p>Default value is &lsquo;<samp class="samp">complex</samp>&rsquo;.
  43334. </p>
  43335. </dd>
  43336. <dt><samp class="option">mode</samp></dt>
  43337. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  43338. </p>
  43339. <dl class="table">
  43340. <dt><samp class="option">frame</samp></dt>
  43341. <dd><p>Output one frame for each frame.
  43342. </p></dd>
  43343. <dt><samp class="option">field</samp></dt>
  43344. <dd><p>Output one frame for each field.
  43345. </p></dd>
  43346. </dl>
  43347. <p>The default value is <code class="code">field</code>.
  43348. </p>
  43349. </dd>
  43350. <dt><samp class="option">parity</samp></dt>
  43351. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  43352. of the following values:
  43353. </p>
  43354. <dl class="table">
  43355. <dt><samp class="option">tff</samp></dt>
  43356. <dd><p>Assume the top field is first.
  43357. </p></dd>
  43358. <dt><samp class="option">bff</samp></dt>
  43359. <dd><p>Assume the bottom field is first.
  43360. </p></dd>
  43361. <dt><samp class="option">auto</samp></dt>
  43362. <dd><p>Enable automatic detection of field parity.
  43363. </p></dd>
  43364. </dl>
  43365. <p>The default value is <code class="code">auto</code>.
  43366. If the interlacing is unknown or the decoder does not export this information,
  43367. top field first will be assumed.
  43368. </p>
  43369. </dd>
  43370. <dt><samp class="option">deint</samp></dt>
  43371. <dd><p>Specify which frames to deinterlace. Accepts one of the following values:
  43372. </p>
  43373. <dl class="table">
  43374. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  43375. <dd><p>Deinterlace all frames,
  43376. </p></dd>
  43377. <dt>&lsquo;<samp class="samp">interlaced</samp>&rsquo;</dt>
  43378. <dd><p>Only deinterlace frames marked as interlaced.
  43379. </p></dd>
  43380. </dl>
  43381. <p>Default value is &lsquo;<samp class="samp">all</samp>&rsquo;.
  43382. </p></dd>
  43383. </dl>
  43384. <ul class="mini-toc">
  43385. <li><a href="#Commands-153" accesskey="1">Commands</a></li>
  43386. </ul>
  43387. <div class="subsection-level-extent" id="Commands-153">
  43388. <h4 class="subsection"><span>32.285.1 Commands<a class="copiable-link" href="#Commands-153"> &para;</a></span></h4>
  43389. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  43390. </p>
  43391. </div>
  43392. </div>
  43393. <div class="section-level-extent" id="waveform">
  43394. <h3 class="section"><span>32.286 waveform<a class="copiable-link" href="#waveform"> &para;</a></span></h3>
  43395. <p>Video waveform monitor.
  43396. </p>
  43397. <p>The waveform monitor plots color component intensity. By default luma
  43398. only. Each column of the waveform corresponds to a column of pixels in the
  43399. source video.
  43400. </p>
  43401. <p>It accepts the following options:
  43402. </p>
  43403. <dl class="table">
  43404. <dt><samp class="option">mode, m</samp></dt>
  43405. <dd><p>Can be either <code class="code">row</code>, or <code class="code">column</code>. Default is <code class="code">column</code>.
  43406. In row mode, the graph on the left side represents color component value 0 and
  43407. the right side represents value = 255. In column mode, the top side represents
  43408. color component value = 0 and bottom side represents value = 255.
  43409. </p>
  43410. </dd>
  43411. <dt><samp class="option">intensity, i</samp></dt>
  43412. <dd><p>Set intensity. Smaller values are useful to find out how many values of the same
  43413. luminance are distributed across input rows/columns.
  43414. Default value is <code class="code">0.04</code>. Allowed range is [0, 1].
  43415. </p>
  43416. </dd>
  43417. <dt><samp class="option">mirror, r</samp></dt>
  43418. <dd><p>Set mirroring mode. <code class="code">0</code> means unmirrored, <code class="code">1</code> means mirrored.
  43419. In mirrored mode, higher values will be represented on the left
  43420. side for <code class="code">row</code> mode and at the top for <code class="code">column</code> mode. Default is
  43421. <code class="code">1</code> (mirrored).
  43422. </p>
  43423. </dd>
  43424. <dt><samp class="option">display, d</samp></dt>
  43425. <dd><p>Set display mode.
  43426. It accepts the following values:
  43427. </p><dl class="table">
  43428. <dt>&lsquo;<samp class="samp">overlay</samp>&rsquo;</dt>
  43429. <dd><p>Presents information identical to that in the <code class="code">parade</code>, except
  43430. that the graphs representing color components are superimposed directly
  43431. over one another.
  43432. </p>
  43433. <p>This display mode makes it easier to spot relative differences or similarities
  43434. in overlapping areas of the color components that are supposed to be identical,
  43435. such as neutral whites, grays, or blacks.
  43436. </p>
  43437. </dd>
  43438. <dt>&lsquo;<samp class="samp">stack</samp>&rsquo;</dt>
  43439. <dd><p>Display separate graph for the color components side by side in
  43440. <code class="code">row</code> mode or one below the other in <code class="code">column</code> mode.
  43441. </p>
  43442. </dd>
  43443. <dt>&lsquo;<samp class="samp">parade</samp>&rsquo;</dt>
  43444. <dd><p>Display separate graph for the color components side by side in
  43445. <code class="code">column</code> mode or one below the other in <code class="code">row</code> mode.
  43446. </p>
  43447. <p>Using this display mode makes it easy to spot color casts in the highlights
  43448. and shadows of an image, by comparing the contours of the top and the bottom
  43449. graphs of each waveform. Since whites, grays, and blacks are characterized
  43450. by exactly equal amounts of red, green, and blue, neutral areas of the picture
  43451. should display three waveforms of roughly equal width/height. If not, the
  43452. correction is easy to perform by making level adjustments the three waveforms.
  43453. </p></dd>
  43454. </dl>
  43455. <p>Default is <code class="code">stack</code>.
  43456. </p>
  43457. </dd>
  43458. <dt><samp class="option">components, c</samp></dt>
  43459. <dd><p>Set which color components to display. Default is 1, which means only luma
  43460. or red color component if input is in RGB colorspace. If is set for example to
  43461. 7 it will display all 3 (if) available color components.
  43462. </p>
  43463. </dd>
  43464. <dt><samp class="option">envelope, e</samp></dt>
  43465. <dd><dl class="table">
  43466. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  43467. <dd><p>No envelope, this is default.
  43468. </p>
  43469. </dd>
  43470. <dt>&lsquo;<samp class="samp">instant</samp>&rsquo;</dt>
  43471. <dd><p>Instant envelope, minimum and maximum values presented in graph will be easily
  43472. visible even with small <code class="code">step</code> value.
  43473. </p>
  43474. </dd>
  43475. <dt>&lsquo;<samp class="samp">peak</samp>&rsquo;</dt>
  43476. <dd><p>Hold minimum and maximum values presented in graph across time. This way you
  43477. can still spot out of range values without constantly looking at waveforms.
  43478. </p>
  43479. </dd>
  43480. <dt>&lsquo;<samp class="samp">peak+instant</samp>&rsquo;</dt>
  43481. <dd><p>Peak and instant envelope combined together.
  43482. </p></dd>
  43483. </dl>
  43484. </dd>
  43485. <dt><samp class="option">filter, f</samp></dt>
  43486. <dd><dl class="table">
  43487. <dt>&lsquo;<samp class="samp">lowpass</samp>&rsquo;</dt>
  43488. <dd><p>No filtering, this is default.
  43489. </p>
  43490. </dd>
  43491. <dt>&lsquo;<samp class="samp">flat</samp>&rsquo;</dt>
  43492. <dd><p>Luma and chroma combined together.
  43493. </p>
  43494. </dd>
  43495. <dt>&lsquo;<samp class="samp">aflat</samp>&rsquo;</dt>
  43496. <dd><p>Similar as above, but shows difference between blue and red chroma.
  43497. </p>
  43498. </dd>
  43499. <dt>&lsquo;<samp class="samp">xflat</samp>&rsquo;</dt>
  43500. <dd><p>Similar as above, but use different colors.
  43501. </p>
  43502. </dd>
  43503. <dt>&lsquo;<samp class="samp">yflat</samp>&rsquo;</dt>
  43504. <dd><p>Similar as above, but again with different colors.
  43505. </p>
  43506. </dd>
  43507. <dt>&lsquo;<samp class="samp">chroma</samp>&rsquo;</dt>
  43508. <dd><p>Displays only chroma.
  43509. </p>
  43510. </dd>
  43511. <dt>&lsquo;<samp class="samp">color</samp>&rsquo;</dt>
  43512. <dd><p>Displays actual color value on waveform.
  43513. </p>
  43514. </dd>
  43515. <dt>&lsquo;<samp class="samp">acolor</samp>&rsquo;</dt>
  43516. <dd><p>Similar as above, but with luma showing frequency of chroma values.
  43517. </p></dd>
  43518. </dl>
  43519. </dd>
  43520. <dt><samp class="option">graticule, g</samp></dt>
  43521. <dd><p>Set which graticule to display.
  43522. </p>
  43523. <dl class="table">
  43524. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  43525. <dd><p>Do not display graticule.
  43526. </p>
  43527. </dd>
  43528. <dt>&lsquo;<samp class="samp">green</samp>&rsquo;</dt>
  43529. <dd><p>Display green graticule showing legal broadcast ranges.
  43530. </p>
  43531. </dd>
  43532. <dt>&lsquo;<samp class="samp">orange</samp>&rsquo;</dt>
  43533. <dd><p>Display orange graticule showing legal broadcast ranges.
  43534. </p>
  43535. </dd>
  43536. <dt>&lsquo;<samp class="samp">invert</samp>&rsquo;</dt>
  43537. <dd><p>Display invert graticule showing legal broadcast ranges.
  43538. </p></dd>
  43539. </dl>
  43540. </dd>
  43541. <dt><samp class="option">opacity, o</samp></dt>
  43542. <dd><p>Set graticule opacity.
  43543. </p>
  43544. </dd>
  43545. <dt><samp class="option">flags, fl</samp></dt>
  43546. <dd><p>Set graticule flags.
  43547. </p>
  43548. <dl class="table">
  43549. <dt>&lsquo;<samp class="samp">numbers</samp>&rsquo;</dt>
  43550. <dd><p>Draw numbers above lines. By default enabled.
  43551. </p>
  43552. </dd>
  43553. <dt>&lsquo;<samp class="samp">dots</samp>&rsquo;</dt>
  43554. <dd><p>Draw dots instead of lines.
  43555. </p></dd>
  43556. </dl>
  43557. </dd>
  43558. <dt><samp class="option">scale, s</samp></dt>
  43559. <dd><p>Set scale used for displaying graticule.
  43560. </p>
  43561. <dl class="table">
  43562. <dt>&lsquo;<samp class="samp">digital</samp>&rsquo;</dt>
  43563. <dt>&lsquo;<samp class="samp">millivolts</samp>&rsquo;</dt>
  43564. <dt>&lsquo;<samp class="samp">ire</samp>&rsquo;</dt>
  43565. </dl>
  43566. <p>Default is digital.
  43567. </p>
  43568. </dd>
  43569. <dt><samp class="option">bgopacity, b</samp></dt>
  43570. <dd><p>Set background opacity.
  43571. </p>
  43572. </dd>
  43573. <dt><samp class="option">tint0, t0</samp></dt>
  43574. <dt><samp class="option">tint1, t1</samp></dt>
  43575. <dd><p>Set tint for output.
  43576. Only used with lowpass filter and when display is not overlay and input
  43577. pixel formats are not RGB.
  43578. </p>
  43579. </dd>
  43580. <dt><samp class="option">fitmode, fm</samp></dt>
  43581. <dd><p>Set sample aspect ratio of video output frames.
  43582. Can be used to configure waveform so it is not
  43583. streched too much in one of directions.
  43584. </p>
  43585. <dl class="table">
  43586. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  43587. <dd><p>Set sample aspect ration to 1/1.
  43588. </p></dd>
  43589. <dt>&lsquo;<samp class="samp">size</samp>&rsquo;</dt>
  43590. <dd><p>Set sample aspect ratio to match input size of video
  43591. </p></dd>
  43592. </dl>
  43593. <p>Default is &lsquo;<samp class="samp">none</samp>&rsquo;.
  43594. </p>
  43595. </dd>
  43596. <dt><samp class="option">input</samp></dt>
  43597. <dd><p>Set input formats for filter to pick from.
  43598. Can be &lsquo;<samp class="samp">all</samp>&rsquo;, for selecting from all available formats,
  43599. or &lsquo;<samp class="samp">first</samp>&rsquo;, for selecting first available format.
  43600. Default is &lsquo;<samp class="samp">first</samp>&rsquo;.
  43601. </p></dd>
  43602. </dl>
  43603. </div>
  43604. <div class="section-level-extent" id="weave_002c-doubleweave">
  43605. <h3 class="section"><span>32.287 weave, doubleweave<a class="copiable-link" href="#weave_002c-doubleweave"> &para;</a></span></h3>
  43606. <p>The <code class="code">weave</code> takes a field-based video input and join
  43607. each two sequential fields into single frame, producing a new double
  43608. height clip with half the frame rate and half the frame count.
  43609. </p>
  43610. <p>The <code class="code">doubleweave</code> works same as <code class="code">weave</code> but without
  43611. halving frame rate and frame count.
  43612. </p>
  43613. <p>It accepts the following option:
  43614. </p>
  43615. <dl class="table">
  43616. <dt><samp class="option">first_field</samp></dt>
  43617. <dd><p>Set first field. Available values are:
  43618. </p>
  43619. <dl class="table">
  43620. <dt>&lsquo;<samp class="samp">top, t</samp>&rsquo;</dt>
  43621. <dd><p>Set the frame as top-field-first.
  43622. </p>
  43623. </dd>
  43624. <dt>&lsquo;<samp class="samp">bottom, b</samp>&rsquo;</dt>
  43625. <dd><p>Set the frame as bottom-field-first.
  43626. </p></dd>
  43627. </dl>
  43628. </dd>
  43629. </dl>
  43630. <ul class="mini-toc">
  43631. <li><a href="#Examples-155" accesskey="1">Examples</a></li>
  43632. </ul>
  43633. <div class="subsection-level-extent" id="Examples-155">
  43634. <h4 class="subsection"><span>32.287.1 Examples<a class="copiable-link" href="#Examples-155"> &para;</a></span></h4>
  43635. <ul class="itemize mark-bullet">
  43636. <li>Interlace video using <a class="ref" href="#select">select</a> and <a class="ref" href="#separatefields">separatefields</a> filter:
  43637. <div class="example">
  43638. <pre class="example-preformatted">separatefields,select=eq(mod(n,4),0)+eq(mod(n,4),3),weave
  43639. </pre></div>
  43640. </li></ul>
  43641. </div>
  43642. </div>
  43643. <div class="section-level-extent" id="xbr">
  43644. <h3 class="section"><span>32.288 xbr<a class="copiable-link" href="#xbr"> &para;</a></span></h3>
  43645. <p>Apply the xBR high-quality magnification filter which is designed for pixel
  43646. art. It follows a set of edge-detection rules, see
  43647. <a class="url" href="https://forums.libretro.com/t/xbr-algorithm-tutorial/123">https://forums.libretro.com/t/xbr-algorithm-tutorial/123</a>.
  43648. </p>
  43649. <p>It accepts the following option:
  43650. </p>
  43651. <dl class="table">
  43652. <dt><samp class="option">n</samp></dt>
  43653. <dd><p>Set the scaling dimension: <code class="code">2</code> for <code class="code">2xBR</code>, <code class="code">3</code> for
  43654. <code class="code">3xBR</code> and <code class="code">4</code> for <code class="code">4xBR</code>.
  43655. Default is <code class="code">3</code>.
  43656. </p></dd>
  43657. </dl>
  43658. </div>
  43659. <div class="section-level-extent" id="xcorrelate">
  43660. <h3 class="section"><span>32.289 xcorrelate<a class="copiable-link" href="#xcorrelate"> &para;</a></span></h3>
  43661. <p>Apply normalized cross-correlation between first and second input video stream.
  43662. </p>
  43663. <p>Second input video stream dimensions must be lower than first input video stream.
  43664. </p>
  43665. <p>The filter accepts the following options:
  43666. </p>
  43667. <dl class="table">
  43668. <dt><samp class="option">planes</samp></dt>
  43669. <dd><p>Set which planes to process.
  43670. </p>
  43671. </dd>
  43672. <dt><samp class="option">secondary</samp></dt>
  43673. <dd><p>Set which secondary video frames will be processed from second input video stream,
  43674. can be <var class="var">first</var> or <var class="var">all</var>. Default is <var class="var">all</var>.
  43675. </p></dd>
  43676. </dl>
  43677. <p>The <code class="code">xcorrelate</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  43678. </p>
  43679. </div>
  43680. <div class="section-level-extent" id="xfade">
  43681. <h3 class="section"><span>32.290 xfade<a class="copiable-link" href="#xfade"> &para;</a></span></h3>
  43682. <p>Apply cross fade from one input video stream to another input video stream.
  43683. The cross fade is applied for specified duration.
  43684. </p>
  43685. <p>Both inputs must be constant frame-rate and have the same resolution, pixel format,
  43686. frame rate and timebase.
  43687. </p>
  43688. <p>The filter accepts the following options:
  43689. </p>
  43690. <dl class="table">
  43691. <dt><samp class="option">transition</samp></dt>
  43692. <dd><p>Set one of available transition effects:
  43693. </p>
  43694. <dl class="table">
  43695. <dt>&lsquo;<samp class="samp">custom</samp>&rsquo;</dt>
  43696. <dt>&lsquo;<samp class="samp">fade</samp>&rsquo;</dt>
  43697. <dt>&lsquo;<samp class="samp">wipeleft</samp>&rsquo;</dt>
  43698. <dt>&lsquo;<samp class="samp">wiperight</samp>&rsquo;</dt>
  43699. <dt>&lsquo;<samp class="samp">wipeup</samp>&rsquo;</dt>
  43700. <dt>&lsquo;<samp class="samp">wipedown</samp>&rsquo;</dt>
  43701. <dt>&lsquo;<samp class="samp">slideleft</samp>&rsquo;</dt>
  43702. <dt>&lsquo;<samp class="samp">slideright</samp>&rsquo;</dt>
  43703. <dt>&lsquo;<samp class="samp">slideup</samp>&rsquo;</dt>
  43704. <dt>&lsquo;<samp class="samp">slidedown</samp>&rsquo;</dt>
  43705. <dt>&lsquo;<samp class="samp">circlecrop</samp>&rsquo;</dt>
  43706. <dt>&lsquo;<samp class="samp">rectcrop</samp>&rsquo;</dt>
  43707. <dt>&lsquo;<samp class="samp">distance</samp>&rsquo;</dt>
  43708. <dt>&lsquo;<samp class="samp">fadeblack</samp>&rsquo;</dt>
  43709. <dt>&lsquo;<samp class="samp">fadewhite</samp>&rsquo;</dt>
  43710. <dt>&lsquo;<samp class="samp">radial</samp>&rsquo;</dt>
  43711. <dt>&lsquo;<samp class="samp">smoothleft</samp>&rsquo;</dt>
  43712. <dt>&lsquo;<samp class="samp">smoothright</samp>&rsquo;</dt>
  43713. <dt>&lsquo;<samp class="samp">smoothup</samp>&rsquo;</dt>
  43714. <dt>&lsquo;<samp class="samp">smoothdown</samp>&rsquo;</dt>
  43715. <dt>&lsquo;<samp class="samp">circleopen</samp>&rsquo;</dt>
  43716. <dt>&lsquo;<samp class="samp">circleclose</samp>&rsquo;</dt>
  43717. <dt>&lsquo;<samp class="samp">vertopen</samp>&rsquo;</dt>
  43718. <dt>&lsquo;<samp class="samp">vertclose</samp>&rsquo;</dt>
  43719. <dt>&lsquo;<samp class="samp">horzopen</samp>&rsquo;</dt>
  43720. <dt>&lsquo;<samp class="samp">horzclose</samp>&rsquo;</dt>
  43721. <dt>&lsquo;<samp class="samp">dissolve</samp>&rsquo;</dt>
  43722. <dt>&lsquo;<samp class="samp">pixelize</samp>&rsquo;</dt>
  43723. <dt>&lsquo;<samp class="samp">diagtl</samp>&rsquo;</dt>
  43724. <dt>&lsquo;<samp class="samp">diagtr</samp>&rsquo;</dt>
  43725. <dt>&lsquo;<samp class="samp">diagbl</samp>&rsquo;</dt>
  43726. <dt>&lsquo;<samp class="samp">diagbr</samp>&rsquo;</dt>
  43727. <dt>&lsquo;<samp class="samp">hlslice</samp>&rsquo;</dt>
  43728. <dt>&lsquo;<samp class="samp">hrslice</samp>&rsquo;</dt>
  43729. <dt>&lsquo;<samp class="samp">vuslice</samp>&rsquo;</dt>
  43730. <dt>&lsquo;<samp class="samp">vdslice</samp>&rsquo;</dt>
  43731. <dt>&lsquo;<samp class="samp">hblur</samp>&rsquo;</dt>
  43732. <dt>&lsquo;<samp class="samp">fadegrays</samp>&rsquo;</dt>
  43733. <dt>&lsquo;<samp class="samp">wipetl</samp>&rsquo;</dt>
  43734. <dt>&lsquo;<samp class="samp">wipetr</samp>&rsquo;</dt>
  43735. <dt>&lsquo;<samp class="samp">wipebl</samp>&rsquo;</dt>
  43736. <dt>&lsquo;<samp class="samp">wipebr</samp>&rsquo;</dt>
  43737. <dt>&lsquo;<samp class="samp">squeezeh</samp>&rsquo;</dt>
  43738. <dt>&lsquo;<samp class="samp">squeezev</samp>&rsquo;</dt>
  43739. <dt>&lsquo;<samp class="samp">zoomin</samp>&rsquo;</dt>
  43740. <dt>&lsquo;<samp class="samp">fadefast</samp>&rsquo;</dt>
  43741. <dt>&lsquo;<samp class="samp">fadeslow</samp>&rsquo;</dt>
  43742. <dt>&lsquo;<samp class="samp">hlwind</samp>&rsquo;</dt>
  43743. <dt>&lsquo;<samp class="samp">hrwind</samp>&rsquo;</dt>
  43744. <dt>&lsquo;<samp class="samp">vuwind</samp>&rsquo;</dt>
  43745. <dt>&lsquo;<samp class="samp">vdwind</samp>&rsquo;</dt>
  43746. <dt>&lsquo;<samp class="samp">coverleft</samp>&rsquo;</dt>
  43747. <dt>&lsquo;<samp class="samp">coverright</samp>&rsquo;</dt>
  43748. <dt>&lsquo;<samp class="samp">coverup</samp>&rsquo;</dt>
  43749. <dt>&lsquo;<samp class="samp">coverdown</samp>&rsquo;</dt>
  43750. <dt>&lsquo;<samp class="samp">revealleft</samp>&rsquo;</dt>
  43751. <dt>&lsquo;<samp class="samp">revealright</samp>&rsquo;</dt>
  43752. <dt>&lsquo;<samp class="samp">revealup</samp>&rsquo;</dt>
  43753. <dt>&lsquo;<samp class="samp">revealdown</samp>&rsquo;</dt>
  43754. </dl>
  43755. <p>Default transition effect is fade.
  43756. </p>
  43757. </dd>
  43758. <dt><samp class="option">duration</samp></dt>
  43759. <dd><p>Set cross fade duration in seconds.
  43760. Range is 0 to 60 seconds.
  43761. Default duration is 1 second.
  43762. </p>
  43763. </dd>
  43764. <dt><samp class="option">offset</samp></dt>
  43765. <dd><p>Set cross fade start relative to first input stream in seconds.
  43766. Default offset is 0.
  43767. </p>
  43768. </dd>
  43769. <dt><samp class="option">expr</samp></dt>
  43770. <dd><p>Set expression for custom transition effect.
  43771. </p>
  43772. <p>The expressions can use the following variables and functions:
  43773. </p>
  43774. <dl class="table">
  43775. <dt><samp class="option">X</samp></dt>
  43776. <dt><samp class="option">Y</samp></dt>
  43777. <dd><p>The coordinates of the current sample.
  43778. </p>
  43779. </dd>
  43780. <dt><samp class="option">W</samp></dt>
  43781. <dt><samp class="option">H</samp></dt>
  43782. <dd><p>The width and height of the image.
  43783. </p>
  43784. </dd>
  43785. <dt><samp class="option">P</samp></dt>
  43786. <dd><p>Progress of transition effect.
  43787. </p>
  43788. </dd>
  43789. <dt><samp class="option">PLANE</samp></dt>
  43790. <dd><p>Currently processed plane.
  43791. </p>
  43792. </dd>
  43793. <dt><samp class="option">A</samp></dt>
  43794. <dd><p>Return value of first input at current location and plane.
  43795. </p>
  43796. </dd>
  43797. <dt><samp class="option">B</samp></dt>
  43798. <dd><p>Return value of second input at current location and plane.
  43799. </p>
  43800. </dd>
  43801. <dt><samp class="option">a0(x, y)</samp></dt>
  43802. <dt><samp class="option">a1(x, y)</samp></dt>
  43803. <dt><samp class="option">a2(x, y)</samp></dt>
  43804. <dt><samp class="option">a3(x, y)</samp></dt>
  43805. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the
  43806. first/second/third/fourth component of first input.
  43807. </p>
  43808. </dd>
  43809. <dt><samp class="option">b0(x, y)</samp></dt>
  43810. <dt><samp class="option">b1(x, y)</samp></dt>
  43811. <dt><samp class="option">b2(x, y)</samp></dt>
  43812. <dt><samp class="option">b3(x, y)</samp></dt>
  43813. <dd><p>Return the value of the pixel at location (<var class="var">x</var>,<var class="var">y</var>) of the
  43814. first/second/third/fourth component of second input.
  43815. </p></dd>
  43816. </dl>
  43817. </dd>
  43818. </dl>
  43819. <ul class="mini-toc">
  43820. <li><a href="#Examples-156" accesskey="1">Examples</a></li>
  43821. </ul>
  43822. <div class="subsection-level-extent" id="Examples-156">
  43823. <h4 class="subsection"><span>32.290.1 Examples<a class="copiable-link" href="#Examples-156"> &para;</a></span></h4>
  43824. <ul class="itemize mark-bullet">
  43825. <li>Cross fade from one input video to another input video, with fade transition and duration of transition
  43826. of 2 seconds starting at offset of 5 seconds:
  43827. <div class="example">
  43828. <pre class="example-preformatted">ffmpeg -i first.mp4 -i second.mp4 -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
  43829. </pre></div>
  43830. </li></ul>
  43831. </div>
  43832. </div>
  43833. <div class="section-level-extent" id="xmedian">
  43834. <h3 class="section"><span>32.291 xmedian<a class="copiable-link" href="#xmedian"> &para;</a></span></h3>
  43835. <p>Pick median pixels from several input videos.
  43836. </p>
  43837. <p>The filter accepts the following options:
  43838. </p>
  43839. <dl class="table">
  43840. <dt><samp class="option">inputs</samp></dt>
  43841. <dd><p>Set number of inputs.
  43842. Default is 3. Allowed range is from 3 to 255.
  43843. If number of inputs is even number, than result will be mean value between two median values.
  43844. </p>
  43845. </dd>
  43846. <dt><samp class="option">planes</samp></dt>
  43847. <dd><p>Set which planes to filter. Default value is <code class="code">15</code>, by which all planes are processed.
  43848. </p>
  43849. </dd>
  43850. <dt><samp class="option">percentile</samp></dt>
  43851. <dd><p>Set median percentile. Default value is <code class="code">0.5</code>.
  43852. Default value of <code class="code">0.5</code> will pick always median values, while <code class="code">0</code> will pick
  43853. minimum values, and <code class="code">1</code> maximum values.
  43854. </p></dd>
  43855. </dl>
  43856. <ul class="mini-toc">
  43857. <li><a href="#Commands-154" accesskey="1">Commands</a></li>
  43858. </ul>
  43859. <div class="subsection-level-extent" id="Commands-154">
  43860. <h4 class="subsection"><span>32.291.1 Commands<a class="copiable-link" href="#Commands-154"> &para;</a></span></h4>
  43861. <p>This filter supports all above options as <a class="ref" href="#commands">commands</a>, excluding option <code class="code">inputs</code>.
  43862. </p>
  43863. <a class="anchor" id="xstack"></a></div>
  43864. </div>
  43865. <div class="section-level-extent" id="xstack-1">
  43866. <h3 class="section"><span>32.292 xstack<a class="copiable-link" href="#xstack-1"> &para;</a></span></h3>
  43867. <p>Stack video inputs into custom layout.
  43868. </p>
  43869. <p>All streams must be of same pixel format.
  43870. </p>
  43871. <p>The filter accepts the following options:
  43872. </p>
  43873. <dl class="table">
  43874. <dt><samp class="option">inputs</samp></dt>
  43875. <dd><p>Set number of input streams. Default is 2.
  43876. </p>
  43877. </dd>
  43878. <dt><samp class="option">layout</samp></dt>
  43879. <dd><p>Specify layout of inputs.
  43880. This option requires the desired layout configuration to be explicitly set by the user.
  43881. This sets position of each video input in output. Each input
  43882. is separated by &rsquo;|&rsquo;.
  43883. The first number represents the column, and the second number represents the row.
  43884. Numbers start at 0 and are separated by &rsquo;_&rsquo;. Optionally one can use wX and hX,
  43885. where X is video input from which to take width or height.
  43886. Multiple values can be used when separated by &rsquo;+&rsquo;. In such
  43887. case values are summed together.
  43888. </p>
  43889. <p>Note that if inputs are of different sizes gaps may appear, as not all of
  43890. the output video frame will be filled. Similarly, videos can overlap each
  43891. other if their position doesn&rsquo;t leave enough space for the full frame of
  43892. adjoining videos.
  43893. </p>
  43894. <p>For 2 inputs, a default layout of <code class="code">0_0|w0_0</code> (equivalent to
  43895. <code class="code">grid=2x1</code>) is set. In all other cases, a layout or a grid must be set by
  43896. the user. Either <code class="code">grid</code> or <code class="code">layout</code> can be specified at a time.
  43897. Specifying both will result in an error.
  43898. </p>
  43899. </dd>
  43900. <dt><samp class="option">grid</samp></dt>
  43901. <dd><p>Specify a fixed size grid of inputs.
  43902. This option is used to create a fixed size grid of the input streams. Set the
  43903. grid size in the form <code class="code">COLUMNSxROWS</code>. There must be <code class="code">ROWS * COLUMNS</code>
  43904. input streams and they will be arranged as a grid with <code class="code">ROWS</code> rows and
  43905. <code class="code">COLUMNS</code> columns. When using this option, each input stream within a row
  43906. must have the same height and all the rows must have the same width.
  43907. </p>
  43908. <p>If <code class="code">grid</code> is set, then <code class="code">inputs</code> option is ignored and is implicitly
  43909. set to <code class="code">ROWS * COLUMNS</code>.
  43910. </p>
  43911. <p>For 2 inputs, a default grid of <code class="code">2x1</code> (equivalent to
  43912. <code class="code">layout=0_0|w0_0</code>) is set. In all other cases, a layout or a grid must be
  43913. set by the user. Either <code class="code">grid</code> or <code class="code">layout</code> can be specified at a time.
  43914. Specifying both will result in an error.
  43915. </p>
  43916. </dd>
  43917. <dt><samp class="option">shortest</samp></dt>
  43918. <dd><p>If set to 1, force the output to terminate when the shortest input
  43919. terminates. Default value is 0.
  43920. </p>
  43921. </dd>
  43922. <dt><samp class="option">fill</samp></dt>
  43923. <dd><p>If set to valid color, all unused pixels will be filled with that color.
  43924. By default fill is set to none, so it is disabled.
  43925. </p></dd>
  43926. </dl>
  43927. <ul class="mini-toc">
  43928. <li><a href="#Examples-157" accesskey="1">Examples</a></li>
  43929. </ul>
  43930. <div class="subsection-level-extent" id="Examples-157">
  43931. <h4 class="subsection"><span>32.292.1 Examples<a class="copiable-link" href="#Examples-157"> &para;</a></span></h4>
  43932. <ul class="itemize mark-bullet">
  43933. <li>Display 4 inputs into 2x2 grid.
  43934. <p>Layout:
  43935. </p><div class="example">
  43936. <pre class="example-preformatted">input1(0, 0) | input3(w0, 0)
  43937. input2(0, h0) | input4(w0, h0)
  43938. </pre></div>
  43939. <div class="example">
  43940. <pre class="example-preformatted">xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
  43941. </pre></div>
  43942. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  43943. </p>
  43944. </li><li>Display 4 inputs into 1x4 grid.
  43945. <p>Layout:
  43946. </p><div class="example">
  43947. <pre class="example-preformatted">input1(0, 0)
  43948. input2(0, h0)
  43949. input3(0, h0+h1)
  43950. input4(0, h0+h1+h2)
  43951. </pre></div>
  43952. <div class="example">
  43953. <pre class="example-preformatted">xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
  43954. </pre></div>
  43955. <p>Note that if inputs are of different widths, unused space will appear.
  43956. </p>
  43957. </li><li>Display 9 inputs into 3x3 grid.
  43958. <p>Layout:
  43959. </p><div class="example">
  43960. <pre class="example-preformatted">input1(0, 0) | input4(w0, 0) | input7(w0+w3, 0)
  43961. input2(0, h0) | input5(w0, h0) | input8(w0+w3, h0)
  43962. input3(0, h0+h1) | input6(w0, h0+h1) | input9(w0+w3, h0+h1)
  43963. </pre></div>
  43964. <div class="example">
  43965. <pre class="example-preformatted">xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w3_0|w0+w3_h0|w0+w3_h0+h1
  43966. </pre></div>
  43967. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  43968. </p>
  43969. </li><li>Display 16 inputs into 4x4 grid.
  43970. <p>Layout:
  43971. </p><div class="example">
  43972. <pre class="example-preformatted">input1(0, 0) | input5(w0, 0) | input9 (w0+w4, 0) | input13(w0+w4+w8, 0)
  43973. input2(0, h0) | input6(w0, h0) | input10(w0+w4, h0) | input14(w0+w4+w8, h0)
  43974. input3(0, h0+h1) | input7(w0, h0+h1) | input11(w0+w4, h0+h1) | input15(w0+w4+w8, h0+h1)
  43975. input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
  43976. </pre></div>
  43977. <div class="example">
  43978. <pre class="example-preformatted">xstack=inputs=16:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2|w0_0|w0_h0|w0_h0+h1|w0_h0+h1+h2|w0+w4_0|
  43979. w0+w4_h0|w0+w4_h0+h1|w0+w4_h0+h1+h2|w0+w4+w8_0|w0+w4+w8_h0|w0+w4+w8_h0+h1|w0+w4+w8_h0+h1+h2
  43980. </pre></div>
  43981. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  43982. </p>
  43983. </li></ul>
  43984. <a class="anchor" id="yadif"></a></div>
  43985. </div>
  43986. <div class="section-level-extent" id="yadif-1">
  43987. <h3 class="section"><span>32.293 yadif<a class="copiable-link" href="#yadif-1"> &para;</a></span></h3>
  43988. <p>Deinterlace the input video (&quot;yadif&quot; means &quot;yet another deinterlacing
  43989. filter&quot;).
  43990. </p>
  43991. <p>It accepts the following parameters:
  43992. </p>
  43993. <dl class="table">
  43994. <dt><samp class="option">mode</samp></dt>
  43995. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  43996. </p>
  43997. <dl class="table">
  43998. <dt><samp class="option">0, send_frame</samp></dt>
  43999. <dd><p>Output one frame for each frame.
  44000. </p></dd>
  44001. <dt><samp class="option">1, send_field</samp></dt>
  44002. <dd><p>Output one frame for each field.
  44003. </p></dd>
  44004. <dt><samp class="option">2, send_frame_nospatial</samp></dt>
  44005. <dd><p>Like <code class="code">send_frame</code>, but it skips the spatial interlacing check.
  44006. </p></dd>
  44007. <dt><samp class="option">3, send_field_nospatial</samp></dt>
  44008. <dd><p>Like <code class="code">send_field</code>, but it skips the spatial interlacing check.
  44009. </p></dd>
  44010. </dl>
  44011. <p>The default value is <code class="code">send_frame</code>.
  44012. </p>
  44013. </dd>
  44014. <dt><samp class="option">parity</samp></dt>
  44015. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  44016. of the following values:
  44017. </p>
  44018. <dl class="table">
  44019. <dt><samp class="option">0, tff</samp></dt>
  44020. <dd><p>Assume the top field is first.
  44021. </p></dd>
  44022. <dt><samp class="option">1, bff</samp></dt>
  44023. <dd><p>Assume the bottom field is first.
  44024. </p></dd>
  44025. <dt><samp class="option">-1, auto</samp></dt>
  44026. <dd><p>Enable automatic detection of field parity.
  44027. </p></dd>
  44028. </dl>
  44029. <p>The default value is <code class="code">auto</code>.
  44030. If the interlacing is unknown or the decoder does not export this information,
  44031. top field first will be assumed.
  44032. </p>
  44033. </dd>
  44034. <dt><samp class="option">deint</samp></dt>
  44035. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  44036. values:
  44037. </p>
  44038. <dl class="table">
  44039. <dt><samp class="option">0, all</samp></dt>
  44040. <dd><p>Deinterlace all frames.
  44041. </p></dd>
  44042. <dt><samp class="option">1, interlaced</samp></dt>
  44043. <dd><p>Only deinterlace frames marked as interlaced.
  44044. </p></dd>
  44045. </dl>
  44046. <p>The default value is <code class="code">all</code>.
  44047. </p></dd>
  44048. </dl>
  44049. </div>
  44050. <div class="section-level-extent" id="yadif_005fcuda">
  44051. <h3 class="section"><span>32.294 yadif_cuda<a class="copiable-link" href="#yadif_005fcuda"> &para;</a></span></h3>
  44052. <p>Deinterlace the input video using the <a class="ref" href="#yadif">yadif</a> algorithm, but implemented
  44053. in CUDA so that it can work as part of a GPU accelerated pipeline with nvdec
  44054. and/or nvenc.
  44055. </p>
  44056. <p>It accepts the following parameters:
  44057. </p>
  44058. <dl class="table">
  44059. <dt><samp class="option">mode</samp></dt>
  44060. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  44061. </p>
  44062. <dl class="table">
  44063. <dt><samp class="option">0, send_frame</samp></dt>
  44064. <dd><p>Output one frame for each frame.
  44065. </p></dd>
  44066. <dt><samp class="option">1, send_field</samp></dt>
  44067. <dd><p>Output one frame for each field.
  44068. </p></dd>
  44069. <dt><samp class="option">2, send_frame_nospatial</samp></dt>
  44070. <dd><p>Like <code class="code">send_frame</code>, but it skips the spatial interlacing check.
  44071. </p></dd>
  44072. <dt><samp class="option">3, send_field_nospatial</samp></dt>
  44073. <dd><p>Like <code class="code">send_field</code>, but it skips the spatial interlacing check.
  44074. </p></dd>
  44075. </dl>
  44076. <p>The default value is <code class="code">send_frame</code>.
  44077. </p>
  44078. </dd>
  44079. <dt><samp class="option">parity</samp></dt>
  44080. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  44081. of the following values:
  44082. </p>
  44083. <dl class="table">
  44084. <dt><samp class="option">0, tff</samp></dt>
  44085. <dd><p>Assume the top field is first.
  44086. </p></dd>
  44087. <dt><samp class="option">1, bff</samp></dt>
  44088. <dd><p>Assume the bottom field is first.
  44089. </p></dd>
  44090. <dt><samp class="option">-1, auto</samp></dt>
  44091. <dd><p>Enable automatic detection of field parity.
  44092. </p></dd>
  44093. </dl>
  44094. <p>The default value is <code class="code">auto</code>.
  44095. If the interlacing is unknown or the decoder does not export this information,
  44096. top field first will be assumed.
  44097. </p>
  44098. </dd>
  44099. <dt><samp class="option">deint</samp></dt>
  44100. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  44101. values:
  44102. </p>
  44103. <dl class="table">
  44104. <dt><samp class="option">0, all</samp></dt>
  44105. <dd><p>Deinterlace all frames.
  44106. </p></dd>
  44107. <dt><samp class="option">1, interlaced</samp></dt>
  44108. <dd><p>Only deinterlace frames marked as interlaced.
  44109. </p></dd>
  44110. </dl>
  44111. <p>The default value is <code class="code">all</code>.
  44112. </p></dd>
  44113. </dl>
  44114. </div>
  44115. <div class="section-level-extent" id="yaepblur">
  44116. <h3 class="section"><span>32.295 yaepblur<a class="copiable-link" href="#yaepblur"> &para;</a></span></h3>
  44117. <p>Apply blur filter while preserving edges (&quot;yaepblur&quot; means &quot;yet another edge preserving blur filter&quot;).
  44118. The algorithm is described in
  44119. &quot;J. S. Lee, Digital image enhancement and noise filtering by use of local statistics, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-2, 1980.&quot;
  44120. </p>
  44121. <p>It accepts the following parameters:
  44122. </p>
  44123. <dl class="table">
  44124. <dt><samp class="option">radius, r</samp></dt>
  44125. <dd><p>Set the window radius. Default value is 3.
  44126. </p>
  44127. </dd>
  44128. <dt><samp class="option">planes, p</samp></dt>
  44129. <dd><p>Set which planes to filter. Default is only the first plane.
  44130. </p>
  44131. </dd>
  44132. <dt><samp class="option">sigma, s</samp></dt>
  44133. <dd><p>Set blur strength. Default value is 128.
  44134. </p></dd>
  44135. </dl>
  44136. <ul class="mini-toc">
  44137. <li><a href="#Commands-155" accesskey="1">Commands</a></li>
  44138. </ul>
  44139. <div class="subsection-level-extent" id="Commands-155">
  44140. <h4 class="subsection"><span>32.295.1 Commands<a class="copiable-link" href="#Commands-155"> &para;</a></span></h4>
  44141. <p>This filter supports same <a class="ref" href="#commands">commands</a> as options.
  44142. </p>
  44143. </div>
  44144. </div>
  44145. <div class="section-level-extent" id="zoompan">
  44146. <h3 class="section"><span>32.296 zoompan<a class="copiable-link" href="#zoompan"> &para;</a></span></h3>
  44147. <p>Apply Zoom &amp; Pan effect.
  44148. </p>
  44149. <p>This filter accepts the following options:
  44150. </p>
  44151. <dl class="table">
  44152. <dt><samp class="option">zoom, z</samp></dt>
  44153. <dd><p>Set the zoom expression. Range is 1-10. Default is 1.
  44154. </p>
  44155. </dd>
  44156. <dt><samp class="option">x</samp></dt>
  44157. <dt><samp class="option">y</samp></dt>
  44158. <dd><p>Set the x and y expression. Default is 0.
  44159. </p>
  44160. </dd>
  44161. <dt><samp class="option">d</samp></dt>
  44162. <dd><p>Set the duration expression in number of frames.
  44163. This sets for how many number of frames effect will last for
  44164. single input image. Default is 90.
  44165. </p>
  44166. </dd>
  44167. <dt><samp class="option">s</samp></dt>
  44168. <dd><p>Set the output image size, default is &rsquo;hd720&rsquo;.
  44169. </p>
  44170. </dd>
  44171. <dt><samp class="option">fps</samp></dt>
  44172. <dd><p>Set the output frame rate, default is &rsquo;25&rsquo;.
  44173. </p></dd>
  44174. </dl>
  44175. <p>Each expression can contain the following constants:
  44176. </p>
  44177. <dl class="table">
  44178. <dt><samp class="option">in_w, iw</samp></dt>
  44179. <dd><p>Input width.
  44180. </p>
  44181. </dd>
  44182. <dt><samp class="option">in_h, ih</samp></dt>
  44183. <dd><p>Input height.
  44184. </p>
  44185. </dd>
  44186. <dt><samp class="option">out_w, ow</samp></dt>
  44187. <dd><p>Output width.
  44188. </p>
  44189. </dd>
  44190. <dt><samp class="option">out_h, oh</samp></dt>
  44191. <dd><p>Output height.
  44192. </p>
  44193. </dd>
  44194. <dt><samp class="option">in</samp></dt>
  44195. <dd><p>Input frame count.
  44196. </p>
  44197. </dd>
  44198. <dt><samp class="option">on</samp></dt>
  44199. <dd><p>Output frame count.
  44200. </p>
  44201. </dd>
  44202. <dt><samp class="option">in_time, it</samp></dt>
  44203. <dd><p>The input timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  44204. </p>
  44205. </dd>
  44206. <dt><samp class="option">out_time, time, ot</samp></dt>
  44207. <dd><p>The output timestamp expressed in seconds.
  44208. </p>
  44209. </dd>
  44210. <dt><samp class="option">x</samp></dt>
  44211. <dt><samp class="option">y</samp></dt>
  44212. <dd><p>Last calculated &rsquo;x&rsquo; and &rsquo;y&rsquo; position from &rsquo;x&rsquo; and &rsquo;y&rsquo; expression
  44213. for current input frame.
  44214. </p>
  44215. </dd>
  44216. <dt><samp class="option">px</samp></dt>
  44217. <dt><samp class="option">py</samp></dt>
  44218. <dd><p>&rsquo;x&rsquo; and &rsquo;y&rsquo; of last output frame of previous input frame or 0 when there was
  44219. not yet such frame (first input frame).
  44220. </p>
  44221. </dd>
  44222. <dt><samp class="option">zoom</samp></dt>
  44223. <dd><p>Last calculated zoom from &rsquo;z&rsquo; expression for current input frame.
  44224. </p>
  44225. </dd>
  44226. <dt><samp class="option">pzoom</samp></dt>
  44227. <dd><p>Last calculated zoom of last output frame of previous input frame.
  44228. </p>
  44229. </dd>
  44230. <dt><samp class="option">duration</samp></dt>
  44231. <dd><p>Number of output frames for current input frame. Calculated from &rsquo;d&rsquo; expression
  44232. for each input frame.
  44233. </p>
  44234. </dd>
  44235. <dt><samp class="option">pduration</samp></dt>
  44236. <dd><p>number of output frames created for previous input frame
  44237. </p>
  44238. </dd>
  44239. <dt><samp class="option">a</samp></dt>
  44240. <dd><p>Rational number: input width / input height
  44241. </p>
  44242. </dd>
  44243. <dt><samp class="option">sar</samp></dt>
  44244. <dd><p>sample aspect ratio
  44245. </p>
  44246. </dd>
  44247. <dt><samp class="option">dar</samp></dt>
  44248. <dd><p>display aspect ratio
  44249. </p>
  44250. </dd>
  44251. </dl>
  44252. <ul class="mini-toc">
  44253. <li><a href="#Examples-158" accesskey="1">Examples</a></li>
  44254. </ul>
  44255. <div class="subsection-level-extent" id="Examples-158">
  44256. <h4 class="subsection"><span>32.296.1 Examples<a class="copiable-link" href="#Examples-158"> &para;</a></span></h4>
  44257. <ul class="itemize mark-bullet">
  44258. <li>Zoom in up to 1.5x and pan at same time to some spot near center of picture:
  44259. <div class="example">
  44260. <pre class="example-preformatted">zoompan=z='min(zoom+0.0015,1.5)':d=700:x='if(gte(zoom,1.5),x,x+1/a)':y='if(gte(zoom,1.5),y,y+1)':s=640x360
  44261. </pre></div>
  44262. </li><li>Zoom in up to 1.5x and pan always at center of picture:
  44263. <div class="example">
  44264. <pre class="example-preformatted">zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
  44265. </pre></div>
  44266. </li><li>Same as above but without pausing:
  44267. <div class="example">
  44268. <pre class="example-preformatted">zoompan=z='min(max(zoom,pzoom)+0.0015,1.5)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
  44269. </pre></div>
  44270. </li><li>Zoom in 2x into center of picture only for the first second of the input video:
  44271. <div class="example">
  44272. <pre class="example-preformatted">zoompan=z='if(between(in_time,0,1),2,1)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
  44273. </pre></div>
  44274. </li></ul>
  44275. <a class="anchor" id="zscale"></a></div>
  44276. </div>
  44277. <div class="section-level-extent" id="zscale-1">
  44278. <h3 class="section"><span>32.297 zscale<a class="copiable-link" href="#zscale-1"> &para;</a></span></h3>
  44279. <p>Scale (resize) the input video, using the z.lib library:
  44280. <a class="url" href="https://github.com/sekrit-twc/zimg">https://github.com/sekrit-twc/zimg</a>. To enable compilation of this
  44281. filter, you need to configure FFmpeg with <code class="code">--enable-libzimg</code>.
  44282. </p>
  44283. <p>The zscale filter forces the output display aspect ratio to be the same
  44284. as the input, by changing the output sample aspect ratio.
  44285. </p>
  44286. <p>If the input image format is different from the format requested by
  44287. the next filter, the zscale filter will convert the input to the
  44288. requested format.
  44289. </p>
  44290. <ul class="mini-toc">
  44291. <li><a href="#Options-42" accesskey="1">Options</a></li>
  44292. <li><a href="#Commands-156" accesskey="2">Commands</a></li>
  44293. </ul>
  44294. <div class="subsection-level-extent" id="Options-42">
  44295. <h4 class="subsection"><span>32.297.1 Options<a class="copiable-link" href="#Options-42"> &para;</a></span></h4>
  44296. <p>The filter accepts the following options.
  44297. </p>
  44298. <dl class="table">
  44299. <dt><samp class="option">width, w</samp></dt>
  44300. <dt><samp class="option">height, h</samp></dt>
  44301. <dd><p>Set the output video dimension expression. Default value is the input
  44302. dimension.
  44303. </p>
  44304. <p>If the <var class="var">width</var> or <var class="var">w</var> value is 0, the input width is used for
  44305. the output. If the <var class="var">height</var> or <var class="var">h</var> value is 0, the input height
  44306. is used for the output.
  44307. </p>
  44308. <p>If one and only one of the values is -n with n &gt;= 1, the zscale filter
  44309. will use a value that maintains the aspect ratio of the input image,
  44310. calculated from the other specified dimension. After that it will,
  44311. however, make sure that the calculated dimension is divisible by n and
  44312. adjust the value if necessary.
  44313. </p>
  44314. <p>If both values are -n with n &gt;= 1, the behavior will be identical to
  44315. both values being set to 0 as previously detailed.
  44316. </p>
  44317. <p>See below for the list of accepted constants for use in the dimension
  44318. expression.
  44319. </p>
  44320. </dd>
  44321. <dt><samp class="option">size, s</samp></dt>
  44322. <dd><p>Set the video size. For the syntax of this option, check the
  44323. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  44324. </p>
  44325. </dd>
  44326. <dt><samp class="option">dither, d</samp></dt>
  44327. <dd><p>Set the dither type.
  44328. </p>
  44329. <p>Possible values are:
  44330. </p><dl class="table">
  44331. <dt><var class="var">none</var></dt>
  44332. <dt><var class="var">ordered</var></dt>
  44333. <dt><var class="var">random</var></dt>
  44334. <dt><var class="var">error_diffusion</var></dt>
  44335. </dl>
  44336. <p>Default is none.
  44337. </p>
  44338. </dd>
  44339. <dt><samp class="option">filter, f</samp></dt>
  44340. <dd><p>Set the resize filter type.
  44341. </p>
  44342. <p>Possible values are:
  44343. </p><dl class="table">
  44344. <dt><var class="var">point</var></dt>
  44345. <dt><var class="var">bilinear</var></dt>
  44346. <dt><var class="var">bicubic</var></dt>
  44347. <dt><var class="var">spline16</var></dt>
  44348. <dt><var class="var">spline36</var></dt>
  44349. <dt><var class="var">lanczos</var></dt>
  44350. </dl>
  44351. <p>Default is bilinear.
  44352. </p>
  44353. </dd>
  44354. <dt><samp class="option">range, r</samp></dt>
  44355. <dd><p>Set the color range.
  44356. </p>
  44357. <p>Possible values are:
  44358. </p><dl class="table">
  44359. <dt><var class="var">input</var></dt>
  44360. <dt><var class="var">limited</var></dt>
  44361. <dt><var class="var">full</var></dt>
  44362. </dl>
  44363. <p>Default is same as input.
  44364. </p>
  44365. </dd>
  44366. <dt><samp class="option">primaries, p</samp></dt>
  44367. <dd><p>Set the color primaries.
  44368. </p>
  44369. <p>Possible values are:
  44370. </p><dl class="table">
  44371. <dt><var class="var">input</var></dt>
  44372. <dt><var class="var">709</var></dt>
  44373. <dt><var class="var">unspecified</var></dt>
  44374. <dt><var class="var">170m</var></dt>
  44375. <dt><var class="var">240m</var></dt>
  44376. <dt><var class="var">2020</var></dt>
  44377. </dl>
  44378. <p>Default is same as input.
  44379. </p>
  44380. </dd>
  44381. <dt><samp class="option">transfer, t</samp></dt>
  44382. <dd><p>Set the transfer characteristics.
  44383. </p>
  44384. <p>Possible values are:
  44385. </p><dl class="table">
  44386. <dt><var class="var">input</var></dt>
  44387. <dt><var class="var">709</var></dt>
  44388. <dt><var class="var">unspecified</var></dt>
  44389. <dt><var class="var">601</var></dt>
  44390. <dt><var class="var">linear</var></dt>
  44391. <dt><var class="var">2020_10</var></dt>
  44392. <dt><var class="var">2020_12</var></dt>
  44393. <dt><var class="var">smpte2084</var></dt>
  44394. <dt><var class="var">iec61966-2-1</var></dt>
  44395. <dt><var class="var">arib-std-b67</var></dt>
  44396. </dl>
  44397. <p>Default is same as input.
  44398. </p>
  44399. </dd>
  44400. <dt><samp class="option">matrix, m</samp></dt>
  44401. <dd><p>Set the colorspace matrix.
  44402. </p>
  44403. <p>Possible value are:
  44404. </p><dl class="table">
  44405. <dt><var class="var">input</var></dt>
  44406. <dt><var class="var">709</var></dt>
  44407. <dt><var class="var">unspecified</var></dt>
  44408. <dt><var class="var">470bg</var></dt>
  44409. <dt><var class="var">170m</var></dt>
  44410. <dt><var class="var">2020_ncl</var></dt>
  44411. <dt><var class="var">2020_cl</var></dt>
  44412. </dl>
  44413. <p>Default is same as input.
  44414. </p>
  44415. </dd>
  44416. <dt><samp class="option">rangein, rin</samp></dt>
  44417. <dd><p>Set the input color range.
  44418. </p>
  44419. <p>Possible values are:
  44420. </p><dl class="table">
  44421. <dt><var class="var">input</var></dt>
  44422. <dt><var class="var">limited</var></dt>
  44423. <dt><var class="var">full</var></dt>
  44424. </dl>
  44425. <p>Default is same as input.
  44426. </p>
  44427. </dd>
  44428. <dt><samp class="option">primariesin, pin</samp></dt>
  44429. <dd><p>Set the input color primaries.
  44430. </p>
  44431. <p>Possible values are:
  44432. </p><dl class="table">
  44433. <dt><var class="var">input</var></dt>
  44434. <dt><var class="var">709</var></dt>
  44435. <dt><var class="var">unspecified</var></dt>
  44436. <dt><var class="var">170m</var></dt>
  44437. <dt><var class="var">240m</var></dt>
  44438. <dt><var class="var">2020</var></dt>
  44439. </dl>
  44440. <p>Default is same as input.
  44441. </p>
  44442. </dd>
  44443. <dt><samp class="option">transferin, tin</samp></dt>
  44444. <dd><p>Set the input transfer characteristics.
  44445. </p>
  44446. <p>Possible values are:
  44447. </p><dl class="table">
  44448. <dt><var class="var">input</var></dt>
  44449. <dt><var class="var">709</var></dt>
  44450. <dt><var class="var">unspecified</var></dt>
  44451. <dt><var class="var">601</var></dt>
  44452. <dt><var class="var">linear</var></dt>
  44453. <dt><var class="var">2020_10</var></dt>
  44454. <dt><var class="var">2020_12</var></dt>
  44455. </dl>
  44456. <p>Default is same as input.
  44457. </p>
  44458. </dd>
  44459. <dt><samp class="option">matrixin, min</samp></dt>
  44460. <dd><p>Set the input colorspace matrix.
  44461. </p>
  44462. <p>Possible value are:
  44463. </p><dl class="table">
  44464. <dt><var class="var">input</var></dt>
  44465. <dt><var class="var">709</var></dt>
  44466. <dt><var class="var">unspecified</var></dt>
  44467. <dt><var class="var">470bg</var></dt>
  44468. <dt><var class="var">170m</var></dt>
  44469. <dt><var class="var">2020_ncl</var></dt>
  44470. <dt><var class="var">2020_cl</var></dt>
  44471. </dl>
  44472. </dd>
  44473. <dt><samp class="option">chromal, c</samp></dt>
  44474. <dd><p>Set the output chroma location.
  44475. </p>
  44476. <p>Possible values are:
  44477. </p><dl class="table">
  44478. <dt><var class="var">input</var></dt>
  44479. <dt><var class="var">left</var></dt>
  44480. <dt><var class="var">center</var></dt>
  44481. <dt><var class="var">topleft</var></dt>
  44482. <dt><var class="var">top</var></dt>
  44483. <dt><var class="var">bottomleft</var></dt>
  44484. <dt><var class="var">bottom</var></dt>
  44485. </dl>
  44486. </dd>
  44487. <dt><samp class="option">chromalin, cin</samp></dt>
  44488. <dd><p>Set the input chroma location.
  44489. </p>
  44490. <p>Possible values are:
  44491. </p><dl class="table">
  44492. <dt><var class="var">input</var></dt>
  44493. <dt><var class="var">left</var></dt>
  44494. <dt><var class="var">center</var></dt>
  44495. <dt><var class="var">topleft</var></dt>
  44496. <dt><var class="var">top</var></dt>
  44497. <dt><var class="var">bottomleft</var></dt>
  44498. <dt><var class="var">bottom</var></dt>
  44499. </dl>
  44500. </dd>
  44501. <dt><samp class="option">npl</samp></dt>
  44502. <dd><p>Set the nominal peak luminance.
  44503. </p>
  44504. </dd>
  44505. <dt><samp class="option">param_a</samp></dt>
  44506. <dd><p>Parameter A for scaling filters. Parameter &quot;b&quot; for bicubic, and the number of
  44507. filter taps for lanczos.
  44508. </p>
  44509. </dd>
  44510. <dt><samp class="option">param_b</samp></dt>
  44511. <dd><p>Parameter B for scaling filters. Parameter &quot;c&quot; for bicubic.
  44512. </p></dd>
  44513. </dl>
  44514. <p>The values of the <samp class="option">w</samp> and <samp class="option">h</samp> options are expressions
  44515. containing the following constants:
  44516. </p>
  44517. <dl class="table">
  44518. <dt><var class="var">in_w</var></dt>
  44519. <dt><var class="var">in_h</var></dt>
  44520. <dd><p>The input width and height
  44521. </p>
  44522. </dd>
  44523. <dt><var class="var">iw</var></dt>
  44524. <dt><var class="var">ih</var></dt>
  44525. <dd><p>These are the same as <var class="var">in_w</var> and <var class="var">in_h</var>.
  44526. </p>
  44527. </dd>
  44528. <dt><var class="var">out_w</var></dt>
  44529. <dt><var class="var">out_h</var></dt>
  44530. <dd><p>The output (scaled) width and height
  44531. </p>
  44532. </dd>
  44533. <dt><var class="var">ow</var></dt>
  44534. <dt><var class="var">oh</var></dt>
  44535. <dd><p>These are the same as <var class="var">out_w</var> and <var class="var">out_h</var>
  44536. </p>
  44537. </dd>
  44538. <dt><var class="var">a</var></dt>
  44539. <dd><p>The same as <var class="var">iw</var> / <var class="var">ih</var>
  44540. </p>
  44541. </dd>
  44542. <dt><var class="var">sar</var></dt>
  44543. <dd><p>input sample aspect ratio
  44544. </p>
  44545. </dd>
  44546. <dt><var class="var">dar</var></dt>
  44547. <dd><p>The input display aspect ratio. Calculated from <code class="code">(iw / ih) * sar</code>.
  44548. </p>
  44549. </dd>
  44550. <dt><var class="var">hsub</var></dt>
  44551. <dt><var class="var">vsub</var></dt>
  44552. <dd><p>horizontal and vertical input chroma subsample values. For example for the
  44553. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  44554. </p>
  44555. </dd>
  44556. <dt><var class="var">ohsub</var></dt>
  44557. <dt><var class="var">ovsub</var></dt>
  44558. <dd><p>horizontal and vertical output chroma subsample values. For example for the
  44559. pixel format &quot;yuv422p&quot; <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  44560. </p></dd>
  44561. </dl>
  44562. </div>
  44563. <div class="subsection-level-extent" id="Commands-156">
  44564. <h4 class="subsection"><span>32.297.2 Commands<a class="copiable-link" href="#Commands-156"> &para;</a></span></h4>
  44565. <p>This filter supports the following commands:
  44566. </p><dl class="table">
  44567. <dt><samp class="option">width, w</samp></dt>
  44568. <dt><samp class="option">height, h</samp></dt>
  44569. <dd><p>Set the output video dimension expression.
  44570. The command accepts the same syntax of the corresponding option.
  44571. </p>
  44572. <p>If the specified expression is not valid, it is kept at its current
  44573. value.
  44574. </p></dd>
  44575. </dl>
  44576. </div>
  44577. </div>
  44578. </div>
  44579. <div class="chapter-level-extent" id="OpenCL-Video-Filters">
  44580. <h2 class="chapter"><span>33 OpenCL Video Filters<a class="copiable-link" href="#OpenCL-Video-Filters"> &para;</a></span></h2>
  44581. <p>Below is a description of the currently available OpenCL video filters.
  44582. </p>
  44583. <p>To enable compilation of these filters you need to configure FFmpeg with
  44584. <code class="code">--enable-opencl</code>.
  44585. </p>
  44586. <p>Running OpenCL filters requires you to initialize a hardware device and to pass that device to all filters in any filter graph.
  44587. </p><dl class="table">
  44588. <dt><samp class="option">-init_hw_device opencl[=<var class="var">name</var>][:<var class="var">device</var>[,<var class="var">key=value</var>...]]</samp></dt>
  44589. <dd><p>Initialise a new hardware device of type <var class="var">opencl</var> called <var class="var">name</var>, using the
  44590. given device parameters.
  44591. </p>
  44592. </dd>
  44593. <dt><samp class="option">-filter_hw_device <var class="var">name</var></samp></dt>
  44594. <dd><p>Pass the hardware device called <var class="var">name</var> to all filters in any filter graph.
  44595. </p>
  44596. </dd>
  44597. </dl>
  44598. <p>For more detailed information see <a class="url" href="https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options">https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options</a>
  44599. </p>
  44600. <ul class="itemize mark-bullet">
  44601. <li>Example of choosing the first device on the second platform and running avgblur_opencl filter with default parameters on it.
  44602. <div class="example">
  44603. <pre class="example-preformatted">-init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf &quot;hwupload, avgblur_opencl, hwdownload&quot; OUTPUT
  44604. </pre></div>
  44605. </li></ul>
  44606. <p>Since OpenCL filters are not able to access frame data in normal memory, all frame data needs to be uploaded(<a class="ref" href="#hwupload">hwupload</a>) to hardware surfaces connected to the appropriate device before being used and then downloaded(<a class="ref" href="#hwdownload">hwdownload</a>) back to normal memory. Note that <a class="ref" href="#hwupload">hwupload</a> will upload to a surface with the same layout as the software frame, so it may be necessary to add a <a class="ref" href="#format">format</a> filter immediately before to get the input into the right format and <a class="ref" href="#hwdownload">hwdownload</a> does not support all formats on the output - it may be necessary to insert an additional <a class="ref" href="#format">format</a> filter immediately following in the graph to get the output in a supported format.
  44607. </p>
  44608. <ul class="mini-toc">
  44609. <li><a href="#avgblur_005fopencl" accesskey="1">avgblur_opencl</a></li>
  44610. <li><a href="#boxblur_005fopencl" accesskey="2">boxblur_opencl</a></li>
  44611. <li><a href="#colorkey_005fopencl" accesskey="3">colorkey_opencl</a></li>
  44612. <li><a href="#convolution_005fopencl" accesskey="4">convolution_opencl</a></li>
  44613. <li><a href="#erosion_005fopencl" accesskey="5">erosion_opencl</a></li>
  44614. <li><a href="#deshake_005fopencl" accesskey="6">deshake_opencl</a></li>
  44615. <li><a href="#dilation_005fopencl" accesskey="7">dilation_opencl</a></li>
  44616. <li><a href="#nlmeans_005fopencl-1" accesskey="8">nlmeans_opencl</a></li>
  44617. <li><a href="#overlay_005fopencl" accesskey="9">overlay_opencl</a></li>
  44618. <li><a href="#pad_005fopencl">pad_opencl</a></li>
  44619. <li><a href="#prewitt_005fopencl">prewitt_opencl</a></li>
  44620. <li><a href="#program_005fopencl-1">program_opencl</a></li>
  44621. <li><a href="#remap_005fopencl">remap_opencl</a></li>
  44622. <li><a href="#roberts_005fopencl">roberts_opencl</a></li>
  44623. <li><a href="#sobel_005fopencl">sobel_opencl</a></li>
  44624. <li><a href="#tonemap_005fopencl">tonemap_opencl</a></li>
  44625. <li><a href="#unsharp_005fopencl">unsharp_opencl</a></li>
  44626. <li><a href="#xfade_005fopencl">xfade_opencl</a></li>
  44627. </ul>
  44628. <div class="section-level-extent" id="avgblur_005fopencl">
  44629. <h3 class="section"><span>33.1 avgblur_opencl<a class="copiable-link" href="#avgblur_005fopencl"> &para;</a></span></h3>
  44630. <p>Apply average blur filter.
  44631. </p>
  44632. <p>The filter accepts the following options:
  44633. </p>
  44634. <dl class="table">
  44635. <dt><samp class="option">sizeX</samp></dt>
  44636. <dd><p>Set horizontal radius size.
  44637. Range is <code class="code">[1, 1024]</code> and default value is <code class="code">1</code>.
  44638. </p>
  44639. </dd>
  44640. <dt><samp class="option">planes</samp></dt>
  44641. <dd><p>Set which planes to filter. Default value is <code class="code">0xf</code>, by which all planes are processed.
  44642. </p>
  44643. </dd>
  44644. <dt><samp class="option">sizeY</samp></dt>
  44645. <dd><p>Set vertical radius size. Range is <code class="code">[1, 1024]</code> and default value is <code class="code">0</code>. If zero, <code class="code">sizeX</code> value will be used.
  44646. </p></dd>
  44647. </dl>
  44648. <ul class="mini-toc">
  44649. <li><a href="#Example" accesskey="1">Example</a></li>
  44650. </ul>
  44651. <div class="subsection-level-extent" id="Example">
  44652. <h4 class="subsection"><span>33.1.1 Example<a class="copiable-link" href="#Example"> &para;</a></span></h4>
  44653. <ul class="itemize mark-bullet">
  44654. <li>Apply average blur filter with horizontal and vertical size of 3, setting each pixel of the output to the average value of the 7x7 region centered on it in the input. For pixels on the edges of the image, the region does not extend beyond the image boundaries, and so out-of-range coordinates are not used in the calculations.
  44655. <div class="example">
  44656. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, avgblur_opencl=3, hwdownload&quot; OUTPUT
  44657. </pre></div>
  44658. </li></ul>
  44659. </div>
  44660. </div>
  44661. <div class="section-level-extent" id="boxblur_005fopencl">
  44662. <h3 class="section"><span>33.2 boxblur_opencl<a class="copiable-link" href="#boxblur_005fopencl"> &para;</a></span></h3>
  44663. <p>Apply a boxblur algorithm to the input video.
  44664. </p>
  44665. <p>It accepts the following parameters:
  44666. </p>
  44667. <dl class="table">
  44668. <dt><samp class="option">luma_radius, lr</samp></dt>
  44669. <dt><samp class="option">luma_power, lp</samp></dt>
  44670. <dt><samp class="option">chroma_radius, cr</samp></dt>
  44671. <dt><samp class="option">chroma_power, cp</samp></dt>
  44672. <dt><samp class="option">alpha_radius, ar</samp></dt>
  44673. <dt><samp class="option">alpha_power, ap</samp></dt>
  44674. </dl>
  44675. <p>A description of the accepted options follows.
  44676. </p>
  44677. <dl class="table">
  44678. <dt><samp class="option">luma_radius, lr</samp></dt>
  44679. <dt><samp class="option">chroma_radius, cr</samp></dt>
  44680. <dt><samp class="option">alpha_radius, ar</samp></dt>
  44681. <dd><p>Set an expression for the box radius in pixels used for blurring the
  44682. corresponding input plane.
  44683. </p>
  44684. <p>The radius value must be a non-negative number, and must not be
  44685. greater than the value of the expression <code class="code">min(w,h)/2</code> for the
  44686. luma and alpha planes, and of <code class="code">min(cw,ch)/2</code> for the chroma
  44687. planes.
  44688. </p>
  44689. <p>Default value for <samp class="option">luma_radius</samp> is &quot;2&quot;. If not specified,
  44690. <samp class="option">chroma_radius</samp> and <samp class="option">alpha_radius</samp> default to the
  44691. corresponding value set for <samp class="option">luma_radius</samp>.
  44692. </p>
  44693. <p>The expressions can contain the following constants:
  44694. </p><dl class="table">
  44695. <dt><samp class="option">w</samp></dt>
  44696. <dt><samp class="option">h</samp></dt>
  44697. <dd><p>The input width and height in pixels.
  44698. </p>
  44699. </dd>
  44700. <dt><samp class="option">cw</samp></dt>
  44701. <dt><samp class="option">ch</samp></dt>
  44702. <dd><p>The input chroma image width and height in pixels.
  44703. </p>
  44704. </dd>
  44705. <dt><samp class="option">hsub</samp></dt>
  44706. <dt><samp class="option">vsub</samp></dt>
  44707. <dd><p>The horizontal and vertical chroma subsample values. For example, for the
  44708. pixel format &quot;yuv422p&quot;, <var class="var">hsub</var> is 2 and <var class="var">vsub</var> is 1.
  44709. </p></dd>
  44710. </dl>
  44711. </dd>
  44712. <dt><samp class="option">luma_power, lp</samp></dt>
  44713. <dt><samp class="option">chroma_power, cp</samp></dt>
  44714. <dt><samp class="option">alpha_power, ap</samp></dt>
  44715. <dd><p>Specify how many times the boxblur filter is applied to the
  44716. corresponding plane.
  44717. </p>
  44718. <p>Default value for <samp class="option">luma_power</samp> is 2. If not specified,
  44719. <samp class="option">chroma_power</samp> and <samp class="option">alpha_power</samp> default to the
  44720. corresponding value set for <samp class="option">luma_power</samp>.
  44721. </p>
  44722. <p>A value of 0 will disable the effect.
  44723. </p></dd>
  44724. </dl>
  44725. <ul class="mini-toc">
  44726. <li><a href="#Examples-159" accesskey="1">Examples</a></li>
  44727. </ul>
  44728. <div class="subsection-level-extent" id="Examples-159">
  44729. <h4 class="subsection"><span>33.2.1 Examples<a class="copiable-link" href="#Examples-159"> &para;</a></span></h4>
  44730. <p>Apply boxblur filter, setting each pixel of the output to the average value of box-radiuses <var class="var">luma_radius</var>, <var class="var">chroma_radius</var>, <var class="var">alpha_radius</var> for each plane respectively. The filter will apply <var class="var">luma_power</var>, <var class="var">chroma_power</var>, <var class="var">alpha_power</var> times onto the corresponding plane. For pixels on the edges of the image, the radius does not extend beyond the image boundaries, and so out-of-range coordinates are not used in the calculations.
  44731. </p>
  44732. <ul class="itemize mark-bullet">
  44733. <li>Apply a boxblur filter with the luma, chroma, and alpha radius
  44734. set to 2 and luma, chroma, and alpha power set to 3. The filter will run 3 times with box-radius set to 2 for every plane of the image.
  44735. <div class="example">
  44736. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, boxblur_opencl=luma_radius=2:luma_power=3, hwdownload&quot; OUTPUT
  44737. -i INPUT -vf &quot;hwupload, boxblur_opencl=2:3, hwdownload&quot; OUTPUT
  44738. </pre></div>
  44739. </li><li>Apply a boxblur filter with luma radius set to 2, luma_power to 1, chroma_radius to 4, chroma_power to 5, alpha_radius to 3 and alpha_power to 7.
  44740. <p>For the luma plane, a 2x2 box radius will be run once.
  44741. </p>
  44742. <p>For the chroma plane, a 4x4 box radius will be run 5 times.
  44743. </p>
  44744. <p>For the alpha plane, a 3x3 box radius will be run 7 times.
  44745. </p><div class="example">
  44746. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, boxblur_opencl=2:1:4:5:3:7, hwdownload&quot; OUTPUT
  44747. </pre></div>
  44748. </li></ul>
  44749. </div>
  44750. </div>
  44751. <div class="section-level-extent" id="colorkey_005fopencl">
  44752. <h3 class="section"><span>33.3 colorkey_opencl<a class="copiable-link" href="#colorkey_005fopencl"> &para;</a></span></h3>
  44753. <p>RGB colorspace color keying.
  44754. </p>
  44755. <p>The filter accepts the following options:
  44756. </p>
  44757. <dl class="table">
  44758. <dt><samp class="option">color</samp></dt>
  44759. <dd><p>The color which will be replaced with transparency.
  44760. </p>
  44761. </dd>
  44762. <dt><samp class="option">similarity</samp></dt>
  44763. <dd><p>Similarity percentage with the key color.
  44764. </p>
  44765. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  44766. </p>
  44767. </dd>
  44768. <dt><samp class="option">blend</samp></dt>
  44769. <dd><p>Blend percentage.
  44770. </p>
  44771. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  44772. </p>
  44773. <p>Higher values result in semi-transparent pixels, with a higher transparency
  44774. the more similar the pixels color is to the key color.
  44775. </p></dd>
  44776. </dl>
  44777. <ul class="mini-toc">
  44778. <li><a href="#Examples-160" accesskey="1">Examples</a></li>
  44779. </ul>
  44780. <div class="subsection-level-extent" id="Examples-160">
  44781. <h4 class="subsection"><span>33.3.1 Examples<a class="copiable-link" href="#Examples-160"> &para;</a></span></h4>
  44782. <ul class="itemize mark-bullet">
  44783. <li>Make every semi-green pixel in the input transparent with some slight blending:
  44784. <div class="example">
  44785. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, colorkey_opencl=green:0.3:0.1, hwdownload&quot; OUTPUT
  44786. </pre></div>
  44787. </li></ul>
  44788. </div>
  44789. </div>
  44790. <div class="section-level-extent" id="convolution_005fopencl">
  44791. <h3 class="section"><span>33.4 convolution_opencl<a class="copiable-link" href="#convolution_005fopencl"> &para;</a></span></h3>
  44792. <p>Apply convolution of 3x3, 5x5, 7x7 matrix.
  44793. </p>
  44794. <p>The filter accepts the following options:
  44795. </p>
  44796. <dl class="table">
  44797. <dt><samp class="option">0m</samp></dt>
  44798. <dt><samp class="option">1m</samp></dt>
  44799. <dt><samp class="option">2m</samp></dt>
  44800. <dt><samp class="option">3m</samp></dt>
  44801. <dd><p>Set matrix for each plane.
  44802. Matrix is sequence of 9, 25 or 49 signed numbers.
  44803. Default value for each plane is <code class="code">0 0 0 0 1 0 0 0 0</code>.
  44804. </p>
  44805. </dd>
  44806. <dt><samp class="option">0rdiv</samp></dt>
  44807. <dt><samp class="option">1rdiv</samp></dt>
  44808. <dt><samp class="option">2rdiv</samp></dt>
  44809. <dt><samp class="option">3rdiv</samp></dt>
  44810. <dd><p>Set multiplier for calculated value for each plane.
  44811. If unset or 0, it will be sum of all matrix elements.
  44812. The option value must be a float number greater or equal to <code class="code">0.0</code>. Default value is <code class="code">1.0</code>.
  44813. </p>
  44814. </dd>
  44815. <dt><samp class="option">0bias</samp></dt>
  44816. <dt><samp class="option">1bias</samp></dt>
  44817. <dt><samp class="option">2bias</samp></dt>
  44818. <dt><samp class="option">3bias</samp></dt>
  44819. <dd><p>Set bias for each plane. This value is added to the result of the multiplication.
  44820. Useful for making the overall image brighter or darker.
  44821. The option value must be a float number greater or equal to <code class="code">0.0</code>. Default value is <code class="code">0.0</code>.
  44822. </p>
  44823. </dd>
  44824. </dl>
  44825. <ul class="mini-toc">
  44826. <li><a href="#Examples-161" accesskey="1">Examples</a></li>
  44827. </ul>
  44828. <div class="subsection-level-extent" id="Examples-161">
  44829. <h4 class="subsection"><span>33.4.1 Examples<a class="copiable-link" href="#Examples-161"> &para;</a></span></h4>
  44830. <ul class="itemize mark-bullet">
  44831. <li>Apply sharpen:
  44832. <div class="example">
  44833. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, convolution_opencl=0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0, hwdownload&quot; OUTPUT
  44834. </pre></div>
  44835. </li><li>Apply blur:
  44836. <div class="example">
  44837. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, convolution_opencl=1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9, hwdownload&quot; OUTPUT
  44838. </pre></div>
  44839. </li><li>Apply edge enhance:
  44840. <div class="example">
  44841. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, convolution_opencl=0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128, hwdownload&quot; OUTPUT
  44842. </pre></div>
  44843. </li><li>Apply edge detect:
  44844. <div class="example">
  44845. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, convolution_opencl=0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128, hwdownload&quot; OUTPUT
  44846. </pre></div>
  44847. </li><li>Apply laplacian edge detector which includes diagonals:
  44848. <div class="example">
  44849. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, convolution_opencl=1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:5:5:5:1:0:128:128:0, hwdownload&quot; OUTPUT
  44850. </pre></div>
  44851. </li><li>Apply emboss:
  44852. <div class="example">
  44853. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, convolution_opencl=-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2, hwdownload&quot; OUTPUT
  44854. </pre></div>
  44855. </li></ul>
  44856. </div>
  44857. </div>
  44858. <div class="section-level-extent" id="erosion_005fopencl">
  44859. <h3 class="section"><span>33.5 erosion_opencl<a class="copiable-link" href="#erosion_005fopencl"> &para;</a></span></h3>
  44860. <p>Apply erosion effect to the video.
  44861. </p>
  44862. <p>This filter replaces the pixel by the local(3x3) minimum.
  44863. </p>
  44864. <p>It accepts the following options:
  44865. </p>
  44866. <dl class="table">
  44867. <dt><samp class="option">threshold0</samp></dt>
  44868. <dt><samp class="option">threshold1</samp></dt>
  44869. <dt><samp class="option">threshold2</samp></dt>
  44870. <dt><samp class="option">threshold3</samp></dt>
  44871. <dd><p>Limit the maximum change for each plane. Range is <code class="code">[0, 65535]</code> and default value is <code class="code">65535</code>.
  44872. If <code class="code">0</code>, plane will remain unchanged.
  44873. </p>
  44874. </dd>
  44875. <dt><samp class="option">coordinates</samp></dt>
  44876. <dd><p>Flag which specifies the pixel to refer to.
  44877. Range is <code class="code">[0, 255]</code> and default value is <code class="code">255</code>, i.e. all eight pixels are used.
  44878. </p>
  44879. <p>Flags to local 3x3 coordinates region centered on <code class="code">x</code>:
  44880. </p>
  44881. <p>1 2 3
  44882. </p>
  44883. <p>4 x 5
  44884. </p>
  44885. <p>6 7 8
  44886. </p></dd>
  44887. </dl>
  44888. <ul class="mini-toc">
  44889. <li><a href="#Example-1" accesskey="1">Example</a></li>
  44890. </ul>
  44891. <div class="subsection-level-extent" id="Example-1">
  44892. <h4 class="subsection"><span>33.5.1 Example<a class="copiable-link" href="#Example-1"> &para;</a></span></h4>
  44893. <ul class="itemize mark-bullet">
  44894. <li>Apply erosion filter with threshold0 set to 30, threshold1 set 40, threshold2 set to 50 and coordinates set to 231, setting each pixel of the output to the local minimum between pixels: 1, 2, 3, 6, 7, 8 of the 3x3 region centered on it in the input. If the difference between input pixel and local minimum is more then threshold of the corresponding plane, output pixel will be set to input pixel - threshold of corresponding plane.
  44895. <div class="example">
  44896. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, erosion_opencl=30:40:50:coordinates=231, hwdownload&quot; OUTPUT
  44897. </pre></div>
  44898. </li></ul>
  44899. </div>
  44900. </div>
  44901. <div class="section-level-extent" id="deshake_005fopencl">
  44902. <h3 class="section"><span>33.6 deshake_opencl<a class="copiable-link" href="#deshake_005fopencl"> &para;</a></span></h3>
  44903. <p>Feature-point based video stabilization filter.
  44904. </p>
  44905. <p>The filter accepts the following options:
  44906. </p>
  44907. <dl class="table">
  44908. <dt><samp class="option">tripod</samp></dt>
  44909. <dd><p>Simulates a tripod by preventing any camera movement whatsoever from the original frame. Defaults to <code class="code">0</code>.
  44910. </p>
  44911. </dd>
  44912. <dt><samp class="option">debug</samp></dt>
  44913. <dd><p>Whether or not additional debug info should be displayed, both in the processed output and in the console.
  44914. </p>
  44915. <p>Note that in order to see console debug output you will also need to pass <code class="code">-v verbose</code> to ffmpeg.
  44916. </p>
  44917. <p>Viewing point matches in the output video is only supported for RGB input.
  44918. </p>
  44919. <p>Defaults to <code class="code">0</code>.
  44920. </p>
  44921. </dd>
  44922. <dt><samp class="option">adaptive_crop</samp></dt>
  44923. <dd><p>Whether or not to do a tiny bit of cropping at the borders to cut down on the amount of mirrored pixels.
  44924. </p>
  44925. <p>Defaults to <code class="code">1</code>.
  44926. </p>
  44927. </dd>
  44928. <dt><samp class="option">refine_features</samp></dt>
  44929. <dd><p>Whether or not feature points should be refined at a sub-pixel level.
  44930. </p>
  44931. <p>This can be turned off for a slight performance gain at the cost of precision.
  44932. </p>
  44933. <p>Defaults to <code class="code">1</code>.
  44934. </p>
  44935. </dd>
  44936. <dt><samp class="option">smooth_strength</samp></dt>
  44937. <dd><p>The strength of the smoothing applied to the camera path from <code class="code">0.0</code> to <code class="code">1.0</code>.
  44938. </p>
  44939. <p><code class="code">1.0</code> is the maximum smoothing strength while values less than that result in less smoothing.
  44940. </p>
  44941. <p><code class="code">0.0</code> causes the filter to adaptively choose a smoothing strength on a per-frame basis.
  44942. </p>
  44943. <p>Defaults to <code class="code">0.0</code>.
  44944. </p>
  44945. </dd>
  44946. <dt><samp class="option">smooth_window_multiplier</samp></dt>
  44947. <dd><p>Controls the size of the smoothing window (the number of frames buffered to determine motion information from).
  44948. </p>
  44949. <p>The size of the smoothing window is determined by multiplying the framerate of the video by this number.
  44950. </p>
  44951. <p>Acceptable values range from <code class="code">0.1</code> to <code class="code">10.0</code>.
  44952. </p>
  44953. <p>Larger values increase the amount of motion data available for determining how to smooth the camera path,
  44954. potentially improving smoothness, but also increase latency and memory usage.
  44955. </p>
  44956. <p>Defaults to <code class="code">2.0</code>.
  44957. </p>
  44958. </dd>
  44959. </dl>
  44960. <ul class="mini-toc">
  44961. <li><a href="#Examples-162" accesskey="1">Examples</a></li>
  44962. </ul>
  44963. <div class="subsection-level-extent" id="Examples-162">
  44964. <h4 class="subsection"><span>33.6.1 Examples<a class="copiable-link" href="#Examples-162"> &para;</a></span></h4>
  44965. <ul class="itemize mark-bullet">
  44966. <li>Stabilize a video with a fixed, medium smoothing strength:
  44967. <div class="example">
  44968. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, deshake_opencl=smooth_strength=0.5, hwdownload&quot; OUTPUT
  44969. </pre></div>
  44970. </li><li>Stabilize a video with debugging (both in console and in rendered video):
  44971. <div class="example">
  44972. <pre class="example-preformatted">-i INPUT -filter_complex &quot;[0:v]format=rgba, hwupload, deshake_opencl=debug=1, hwdownload, format=rgba, format=yuv420p&quot; -v verbose OUTPUT
  44973. </pre></div>
  44974. </li></ul>
  44975. </div>
  44976. </div>
  44977. <div class="section-level-extent" id="dilation_005fopencl">
  44978. <h3 class="section"><span>33.7 dilation_opencl<a class="copiable-link" href="#dilation_005fopencl"> &para;</a></span></h3>
  44979. <p>Apply dilation effect to the video.
  44980. </p>
  44981. <p>This filter replaces the pixel by the local(3x3) maximum.
  44982. </p>
  44983. <p>It accepts the following options:
  44984. </p>
  44985. <dl class="table">
  44986. <dt><samp class="option">threshold0</samp></dt>
  44987. <dt><samp class="option">threshold1</samp></dt>
  44988. <dt><samp class="option">threshold2</samp></dt>
  44989. <dt><samp class="option">threshold3</samp></dt>
  44990. <dd><p>Limit the maximum change for each plane. Range is <code class="code">[0, 65535]</code> and default value is <code class="code">65535</code>.
  44991. If <code class="code">0</code>, plane will remain unchanged.
  44992. </p>
  44993. </dd>
  44994. <dt><samp class="option">coordinates</samp></dt>
  44995. <dd><p>Flag which specifies the pixel to refer to.
  44996. Range is <code class="code">[0, 255]</code> and default value is <code class="code">255</code>, i.e. all eight pixels are used.
  44997. </p>
  44998. <p>Flags to local 3x3 coordinates region centered on <code class="code">x</code>:
  44999. </p>
  45000. <p>1 2 3
  45001. </p>
  45002. <p>4 x 5
  45003. </p>
  45004. <p>6 7 8
  45005. </p></dd>
  45006. </dl>
  45007. <ul class="mini-toc">
  45008. <li><a href="#Example-2" accesskey="1">Example</a></li>
  45009. </ul>
  45010. <div class="subsection-level-extent" id="Example-2">
  45011. <h4 class="subsection"><span>33.7.1 Example<a class="copiable-link" href="#Example-2"> &para;</a></span></h4>
  45012. <ul class="itemize mark-bullet">
  45013. <li>Apply dilation filter with threshold0 set to 30, threshold1 set 40, threshold2 set to 50 and coordinates set to 231, setting each pixel of the output to the local maximum between pixels: 1, 2, 3, 6, 7, 8 of the 3x3 region centered on it in the input. If the difference between input pixel and local maximum is more then threshold of the corresponding plane, output pixel will be set to input pixel + threshold of corresponding plane.
  45014. <div class="example">
  45015. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, dilation_opencl=30:40:50:coordinates=231, hwdownload&quot; OUTPUT
  45016. </pre></div>
  45017. </li></ul>
  45018. <a class="anchor" id="nlmeans_005fopencl"></a></div>
  45019. </div>
  45020. <div class="section-level-extent" id="nlmeans_005fopencl-1">
  45021. <h3 class="section"><span>33.8 nlmeans_opencl<a class="copiable-link" href="#nlmeans_005fopencl-1"> &para;</a></span></h3>
  45022. <p>Non-local Means denoise filter through OpenCL, this filter accepts same options as <a class="ref" href="#nlmeans">nlmeans</a>.
  45023. </p>
  45024. </div>
  45025. <div class="section-level-extent" id="overlay_005fopencl">
  45026. <h3 class="section"><span>33.9 overlay_opencl<a class="copiable-link" href="#overlay_005fopencl"> &para;</a></span></h3>
  45027. <p>Overlay one video on top of another.
  45028. </p>
  45029. <p>It takes two inputs and has one output. The first input is the &quot;main&quot; video on which the second input is overlaid.
  45030. This filter requires same memory layout for all the inputs. So, format conversion may be needed.
  45031. </p>
  45032. <p>The filter accepts the following options:
  45033. </p>
  45034. <dl class="table">
  45035. <dt><samp class="option">x</samp></dt>
  45036. <dd><p>Set the x coordinate of the overlaid video on the main video.
  45037. Default value is <code class="code">0</code>.
  45038. </p>
  45039. </dd>
  45040. <dt><samp class="option">y</samp></dt>
  45041. <dd><p>Set the y coordinate of the overlaid video on the main video.
  45042. Default value is <code class="code">0</code>.
  45043. </p>
  45044. </dd>
  45045. </dl>
  45046. <ul class="mini-toc">
  45047. <li><a href="#Examples-163" accesskey="1">Examples</a></li>
  45048. </ul>
  45049. <div class="subsection-level-extent" id="Examples-163">
  45050. <h4 class="subsection"><span>33.9.1 Examples<a class="copiable-link" href="#Examples-163"> &para;</a></span></h4>
  45051. <ul class="itemize mark-bullet">
  45052. <li>Overlay an image LOGO at the top-left corner of the INPUT video. Both inputs are yuv420p format.
  45053. <div class="example">
  45054. <pre class="example-preformatted">-i INPUT -i LOGO -filter_complex &quot;[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_opencl, hwdownload&quot; OUTPUT
  45055. </pre></div>
  45056. </li><li>The inputs have same memory layout for color channels , the overlay has additional alpha plane, like INPUT is yuv420p, and the LOGO is yuva420p.
  45057. <div class="example">
  45058. <pre class="example-preformatted">-i INPUT -i LOGO -filter_complex &quot;[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_opencl, hwdownload&quot; OUTPUT
  45059. </pre></div>
  45060. </li></ul>
  45061. </div>
  45062. </div>
  45063. <div class="section-level-extent" id="pad_005fopencl">
  45064. <h3 class="section"><span>33.10 pad_opencl<a class="copiable-link" href="#pad_005fopencl"> &para;</a></span></h3>
  45065. <p>Add paddings to the input image, and place the original input at the
  45066. provided <var class="var">x</var>, <var class="var">y</var> coordinates.
  45067. </p>
  45068. <p>It accepts the following options:
  45069. </p>
  45070. <dl class="table">
  45071. <dt><samp class="option">width, w</samp></dt>
  45072. <dt><samp class="option">height, h</samp></dt>
  45073. <dd><p>Specify an expression for the size of the output image with the
  45074. paddings added. If the value for <var class="var">width</var> or <var class="var">height</var> is 0, the
  45075. corresponding input size is used for the output.
  45076. </p>
  45077. <p>The <var class="var">width</var> expression can reference the value set by the
  45078. <var class="var">height</var> expression, and vice versa.
  45079. </p>
  45080. <p>The default value of <var class="var">width</var> and <var class="var">height</var> is 0.
  45081. </p>
  45082. </dd>
  45083. <dt><samp class="option">x</samp></dt>
  45084. <dt><samp class="option">y</samp></dt>
  45085. <dd><p>Specify the offsets to place the input image at within the padded area,
  45086. with respect to the top/left border of the output image.
  45087. </p>
  45088. <p>The <var class="var">x</var> expression can reference the value set by the <var class="var">y</var>
  45089. expression, and vice versa.
  45090. </p>
  45091. <p>The default value of <var class="var">x</var> and <var class="var">y</var> is 0.
  45092. </p>
  45093. <p>If <var class="var">x</var> or <var class="var">y</var> evaluate to a negative number, they&rsquo;ll be changed
  45094. so the input image is centered on the padded area.
  45095. </p>
  45096. </dd>
  45097. <dt><samp class="option">color</samp></dt>
  45098. <dd><p>Specify the color of the padded area. For the syntax of this option,
  45099. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils
  45100. manual</a>.
  45101. </p>
  45102. </dd>
  45103. <dt><samp class="option">aspect</samp></dt>
  45104. <dd><p>Pad to an aspect instead to a resolution.
  45105. </p></dd>
  45106. </dl>
  45107. <p>The value for the <var class="var">width</var>, <var class="var">height</var>, <var class="var">x</var>, and <var class="var">y</var>
  45108. options are expressions containing the following constants:
  45109. </p>
  45110. <dl class="table">
  45111. <dt><samp class="option">in_w</samp></dt>
  45112. <dt><samp class="option">in_h</samp></dt>
  45113. <dd><p>The input video width and height.
  45114. </p>
  45115. </dd>
  45116. <dt><samp class="option">iw</samp></dt>
  45117. <dt><samp class="option">ih</samp></dt>
  45118. <dd><p>These are the same as <var class="var">in_w</var> and <var class="var">in_h</var>.
  45119. </p>
  45120. </dd>
  45121. <dt><samp class="option">out_w</samp></dt>
  45122. <dt><samp class="option">out_h</samp></dt>
  45123. <dd><p>The output width and height (the size of the padded area), as
  45124. specified by the <var class="var">width</var> and <var class="var">height</var> expressions.
  45125. </p>
  45126. </dd>
  45127. <dt><samp class="option">ow</samp></dt>
  45128. <dt><samp class="option">oh</samp></dt>
  45129. <dd><p>These are the same as <var class="var">out_w</var> and <var class="var">out_h</var>.
  45130. </p>
  45131. </dd>
  45132. <dt><samp class="option">x</samp></dt>
  45133. <dt><samp class="option">y</samp></dt>
  45134. <dd><p>The x and y offsets as specified by the <var class="var">x</var> and <var class="var">y</var>
  45135. expressions, or NAN if not yet specified.
  45136. </p>
  45137. </dd>
  45138. <dt><samp class="option">a</samp></dt>
  45139. <dd><p>same as <var class="var">iw</var> / <var class="var">ih</var>
  45140. </p>
  45141. </dd>
  45142. <dt><samp class="option">sar</samp></dt>
  45143. <dd><p>input sample aspect ratio
  45144. </p>
  45145. </dd>
  45146. <dt><samp class="option">dar</samp></dt>
  45147. <dd><p>input display aspect ratio, it is the same as (<var class="var">iw</var> / <var class="var">ih</var>) * <var class="var">sar</var>
  45148. </p></dd>
  45149. </dl>
  45150. </div>
  45151. <div class="section-level-extent" id="prewitt_005fopencl">
  45152. <h3 class="section"><span>33.11 prewitt_opencl<a class="copiable-link" href="#prewitt_005fopencl"> &para;</a></span></h3>
  45153. <p>Apply the Prewitt operator (<a class="url" href="https://en.wikipedia.org/wiki/Prewitt_operator">https://en.wikipedia.org/wiki/Prewitt_operator</a>) to input video stream.
  45154. </p>
  45155. <p>The filter accepts the following option:
  45156. </p>
  45157. <dl class="table">
  45158. <dt><samp class="option">planes</samp></dt>
  45159. <dd><p>Set which planes to filter. Default value is <code class="code">0xf</code>, by which all planes are processed.
  45160. </p>
  45161. </dd>
  45162. <dt><samp class="option">scale</samp></dt>
  45163. <dd><p>Set value which will be multiplied with filtered result.
  45164. Range is <code class="code">[0.0, 65535]</code> and default value is <code class="code">1.0</code>.
  45165. </p>
  45166. </dd>
  45167. <dt><samp class="option">delta</samp></dt>
  45168. <dd><p>Set value which will be added to filtered result.
  45169. Range is <code class="code">[-65535, 65535]</code> and default value is <code class="code">0.0</code>.
  45170. </p></dd>
  45171. </dl>
  45172. <ul class="mini-toc">
  45173. <li><a href="#Example-3" accesskey="1">Example</a></li>
  45174. </ul>
  45175. <div class="subsection-level-extent" id="Example-3">
  45176. <h4 class="subsection"><span>33.11.1 Example<a class="copiable-link" href="#Example-3"> &para;</a></span></h4>
  45177. <ul class="itemize mark-bullet">
  45178. <li>Apply the Prewitt operator with scale set to 2 and delta set to 10.
  45179. <div class="example">
  45180. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, prewitt_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  45181. </pre></div>
  45182. </li></ul>
  45183. <a class="anchor" id="program_005fopencl"></a></div>
  45184. </div>
  45185. <div class="section-level-extent" id="program_005fopencl-1">
  45186. <h3 class="section"><span>33.12 program_opencl<a class="copiable-link" href="#program_005fopencl-1"> &para;</a></span></h3>
  45187. <p>Filter video using an OpenCL program.
  45188. </p>
  45189. <dl class="table">
  45190. <dt><samp class="option">source</samp></dt>
  45191. <dd><p>OpenCL program source file.
  45192. </p>
  45193. </dd>
  45194. <dt><samp class="option">kernel</samp></dt>
  45195. <dd><p>Kernel name in program.
  45196. </p>
  45197. </dd>
  45198. <dt><samp class="option">inputs</samp></dt>
  45199. <dd><p>Number of inputs to the filter. Defaults to 1.
  45200. </p>
  45201. </dd>
  45202. <dt><samp class="option">size, s</samp></dt>
  45203. <dd><p>Size of output frames. Defaults to the same as the first input.
  45204. </p>
  45205. </dd>
  45206. </dl>
  45207. <p>The <code class="code">program_opencl</code> filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  45208. </p>
  45209. <p>The program source file must contain a kernel function with the given name,
  45210. which will be run once for each plane of the output. Each run on a plane
  45211. gets enqueued as a separate 2D global NDRange with one work-item for each
  45212. pixel to be generated. The global ID offset for each work-item is therefore
  45213. the coordinates of a pixel in the destination image.
  45214. </p>
  45215. <p>The kernel function needs to take the following arguments:
  45216. </p><ul class="itemize mark-bullet">
  45217. <li>Destination image, <var class="var">__write_only image2d_t</var>.
  45218. <p>This image will become the output; the kernel should write all of it.
  45219. </p></li><li>Frame index, <var class="var">unsigned int</var>.
  45220. <p>This is a counter starting from zero and increasing by one for each frame.
  45221. </p></li><li>Source images, <var class="var">__read_only image2d_t</var>.
  45222. <p>These are the most recent images on each input. The kernel may read from
  45223. them to generate the output, but they can&rsquo;t be written to.
  45224. </p></li></ul>
  45225. <p>Example programs:
  45226. </p>
  45227. <ul class="itemize mark-bullet">
  45228. <li>Copy the input to the output (output must be the same size as the input).
  45229. <pre class="verbatim">__kernel void copy(__write_only image2d_t destination,
  45230. unsigned int index,
  45231. __read_only image2d_t source)
  45232. {
  45233. const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE;
  45234. int2 location = (int2)(get_global_id(0), get_global_id(1));
  45235. float4 value = read_imagef(source, sampler, location);
  45236. write_imagef(destination, location, value);
  45237. }
  45238. </pre>
  45239. </li><li>Apply a simple transformation, rotating the input by an amount increasing
  45240. with the index counter. Pixel values are linearly interpolated by the
  45241. sampler, and the output need not have the same dimensions as the input.
  45242. <pre class="verbatim">__kernel void rotate_image(__write_only image2d_t dst,
  45243. unsigned int index,
  45244. __read_only image2d_t src)
  45245. {
  45246. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  45247. CLK_FILTER_LINEAR);
  45248. float angle = (float)index / 100.0f;
  45249. float2 dst_dim = convert_float2(get_image_dim(dst));
  45250. float2 src_dim = convert_float2(get_image_dim(src));
  45251. float2 dst_cen = dst_dim / 2.0f;
  45252. float2 src_cen = src_dim / 2.0f;
  45253. int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
  45254. float2 dst_pos = convert_float2(dst_loc) - dst_cen;
  45255. float2 src_pos = {
  45256. cos(angle) * dst_pos.x - sin(angle) * dst_pos.y,
  45257. sin(angle) * dst_pos.x + cos(angle) * dst_pos.y
  45258. };
  45259. src_pos = src_pos * src_dim / dst_dim;
  45260. float2 src_loc = src_pos + src_cen;
  45261. if (src_loc.x &lt; 0.0f || src_loc.y &lt; 0.0f ||
  45262. src_loc.x &gt; src_dim.x || src_loc.y &gt; src_dim.y)
  45263. write_imagef(dst, dst_loc, 0.5f);
  45264. else
  45265. write_imagef(dst, dst_loc, read_imagef(src, sampler, src_loc));
  45266. }
  45267. </pre>
  45268. </li><li>Blend two inputs together, with the amount of each input used varying
  45269. with the index counter.
  45270. <pre class="verbatim">__kernel void blend_images(__write_only image2d_t dst,
  45271. unsigned int index,
  45272. __read_only image2d_t src1,
  45273. __read_only image2d_t src2)
  45274. {
  45275. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  45276. CLK_FILTER_LINEAR);
  45277. float blend = (cos((float)index / 50.0f) + 1.0f) / 2.0f;
  45278. int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
  45279. int2 src1_loc = dst_loc * get_image_dim(src1) / get_image_dim(dst);
  45280. int2 src2_loc = dst_loc * get_image_dim(src2) / get_image_dim(dst);
  45281. float4 val1 = read_imagef(src1, sampler, src1_loc);
  45282. float4 val2 = read_imagef(src2, sampler, src2_loc);
  45283. write_imagef(dst, dst_loc, val1 * blend + val2 * (1.0f - blend));
  45284. }
  45285. </pre>
  45286. </li></ul>
  45287. </div>
  45288. <div class="section-level-extent" id="remap_005fopencl">
  45289. <h3 class="section"><span>33.13 remap_opencl<a class="copiable-link" href="#remap_005fopencl"> &para;</a></span></h3>
  45290. <p>Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
  45291. </p>
  45292. <p>Destination pixel at position (X, Y) will be picked from source (x, y) position
  45293. where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are out of range, zero
  45294. value for pixel will be used for destination pixel.
  45295. </p>
  45296. <p>Xmap and Ymap input video streams must be of same dimensions. Output video stream
  45297. will have Xmap/Ymap video stream dimensions.
  45298. Xmap and Ymap input video streams are 32bit float pixel format, single channel.
  45299. </p>
  45300. <dl class="table">
  45301. <dt><samp class="option">interp</samp></dt>
  45302. <dd><p>Specify interpolation used for remapping of pixels.
  45303. Allowed values are <code class="code">near</code> and <code class="code">linear</code>.
  45304. Default value is <code class="code">linear</code>.
  45305. </p>
  45306. </dd>
  45307. <dt><samp class="option">fill</samp></dt>
  45308. <dd><p>Specify the color of the unmapped pixels. For the syntax of this option,
  45309. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils
  45310. manual</a>. Default color is <code class="code">black</code>.
  45311. </p></dd>
  45312. </dl>
  45313. </div>
  45314. <div class="section-level-extent" id="roberts_005fopencl">
  45315. <h3 class="section"><span>33.14 roberts_opencl<a class="copiable-link" href="#roberts_005fopencl"> &para;</a></span></h3>
  45316. <p>Apply the Roberts cross operator (<a class="url" href="https://en.wikipedia.org/wiki/Roberts_cross">https://en.wikipedia.org/wiki/Roberts_cross</a>) to input video stream.
  45317. </p>
  45318. <p>The filter accepts the following option:
  45319. </p>
  45320. <dl class="table">
  45321. <dt><samp class="option">planes</samp></dt>
  45322. <dd><p>Set which planes to filter. Default value is <code class="code">0xf</code>, by which all planes are processed.
  45323. </p>
  45324. </dd>
  45325. <dt><samp class="option">scale</samp></dt>
  45326. <dd><p>Set value which will be multiplied with filtered result.
  45327. Range is <code class="code">[0.0, 65535]</code> and default value is <code class="code">1.0</code>.
  45328. </p>
  45329. </dd>
  45330. <dt><samp class="option">delta</samp></dt>
  45331. <dd><p>Set value which will be added to filtered result.
  45332. Range is <code class="code">[-65535, 65535]</code> and default value is <code class="code">0.0</code>.
  45333. </p></dd>
  45334. </dl>
  45335. <ul class="mini-toc">
  45336. <li><a href="#Example-4" accesskey="1">Example</a></li>
  45337. </ul>
  45338. <div class="subsection-level-extent" id="Example-4">
  45339. <h4 class="subsection"><span>33.14.1 Example<a class="copiable-link" href="#Example-4"> &para;</a></span></h4>
  45340. <ul class="itemize mark-bullet">
  45341. <li>Apply the Roberts cross operator with scale set to 2 and delta set to 10
  45342. <div class="example">
  45343. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, roberts_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  45344. </pre></div>
  45345. </li></ul>
  45346. </div>
  45347. </div>
  45348. <div class="section-level-extent" id="sobel_005fopencl">
  45349. <h3 class="section"><span>33.15 sobel_opencl<a class="copiable-link" href="#sobel_005fopencl"> &para;</a></span></h3>
  45350. <p>Apply the Sobel operator (<a class="url" href="https://en.wikipedia.org/wiki/Sobel_operator">https://en.wikipedia.org/wiki/Sobel_operator</a>) to input video stream.
  45351. </p>
  45352. <p>The filter accepts the following option:
  45353. </p>
  45354. <dl class="table">
  45355. <dt><samp class="option">planes</samp></dt>
  45356. <dd><p>Set which planes to filter. Default value is <code class="code">0xf</code>, by which all planes are processed.
  45357. </p>
  45358. </dd>
  45359. <dt><samp class="option">scale</samp></dt>
  45360. <dd><p>Set value which will be multiplied with filtered result.
  45361. Range is <code class="code">[0.0, 65535]</code> and default value is <code class="code">1.0</code>.
  45362. </p>
  45363. </dd>
  45364. <dt><samp class="option">delta</samp></dt>
  45365. <dd><p>Set value which will be added to filtered result.
  45366. Range is <code class="code">[-65535, 65535]</code> and default value is <code class="code">0.0</code>.
  45367. </p></dd>
  45368. </dl>
  45369. <ul class="mini-toc">
  45370. <li><a href="#Example-5" accesskey="1">Example</a></li>
  45371. </ul>
  45372. <div class="subsection-level-extent" id="Example-5">
  45373. <h4 class="subsection"><span>33.15.1 Example<a class="copiable-link" href="#Example-5"> &para;</a></span></h4>
  45374. <ul class="itemize mark-bullet">
  45375. <li>Apply sobel operator with scale set to 2 and delta set to 10
  45376. <div class="example">
  45377. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, sobel_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  45378. </pre></div>
  45379. </li></ul>
  45380. </div>
  45381. </div>
  45382. <div class="section-level-extent" id="tonemap_005fopencl">
  45383. <h3 class="section"><span>33.16 tonemap_opencl<a class="copiable-link" href="#tonemap_005fopencl"> &para;</a></span></h3>
  45384. <p>Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
  45385. </p>
  45386. <p>It accepts the following parameters:
  45387. </p>
  45388. <dl class="table">
  45389. <dt><samp class="option">tonemap</samp></dt>
  45390. <dd><p>Specify the tone-mapping operator to be used. Same as tonemap option in <a class="ref" href="#tonemap">tonemap</a>.
  45391. </p>
  45392. </dd>
  45393. <dt><samp class="option">param</samp></dt>
  45394. <dd><p>Tune the tone mapping algorithm. same as param option in <a class="ref" href="#tonemap">tonemap</a>.
  45395. </p>
  45396. </dd>
  45397. <dt><samp class="option">desat</samp></dt>
  45398. <dd><p>Apply desaturation for highlights that exceed this level of brightness. The
  45399. higher the parameter, the more color information will be preserved. This
  45400. setting helps prevent unnaturally blown-out colors for super-highlights, by
  45401. (smoothly) turning into white instead. This makes images feel more natural,
  45402. at the cost of reducing information about out-of-range colors.
  45403. </p>
  45404. <p>The default value is 0.5, and the algorithm here is a little different from
  45405. the cpu version tonemap currently. A setting of 0.0 disables this option.
  45406. </p>
  45407. </dd>
  45408. <dt><samp class="option">threshold</samp></dt>
  45409. <dd><p>The tonemapping algorithm parameters is fine-tuned per each scene. And a threshold
  45410. is used to detect whether the scene has changed or not. If the distance between
  45411. the current frame average brightness and the current running average exceeds
  45412. a threshold value, we would re-calculate scene average and peak brightness.
  45413. The default value is 0.2.
  45414. </p>
  45415. </dd>
  45416. <dt><samp class="option">format</samp></dt>
  45417. <dd><p>Specify the output pixel format.
  45418. </p>
  45419. <p>Currently supported formats are:
  45420. </p><dl class="table">
  45421. <dt><var class="var">p010</var></dt>
  45422. <dt><var class="var">nv12</var></dt>
  45423. </dl>
  45424. </dd>
  45425. <dt><samp class="option">range, r</samp></dt>
  45426. <dd><p>Set the output color range.
  45427. </p>
  45428. <p>Possible values are:
  45429. </p><dl class="table">
  45430. <dt><var class="var">tv/mpeg</var></dt>
  45431. <dt><var class="var">pc/jpeg</var></dt>
  45432. </dl>
  45433. <p>Default is same as input.
  45434. </p>
  45435. </dd>
  45436. <dt><samp class="option">primaries, p</samp></dt>
  45437. <dd><p>Set the output color primaries.
  45438. </p>
  45439. <p>Possible values are:
  45440. </p><dl class="table">
  45441. <dt><var class="var">bt709</var></dt>
  45442. <dt><var class="var">bt2020</var></dt>
  45443. </dl>
  45444. <p>Default is same as input.
  45445. </p>
  45446. </dd>
  45447. <dt><samp class="option">transfer, t</samp></dt>
  45448. <dd><p>Set the output transfer characteristics.
  45449. </p>
  45450. <p>Possible values are:
  45451. </p><dl class="table">
  45452. <dt><var class="var">bt709</var></dt>
  45453. <dt><var class="var">bt2020</var></dt>
  45454. </dl>
  45455. <p>Default is bt709.
  45456. </p>
  45457. </dd>
  45458. <dt><samp class="option">matrix, m</samp></dt>
  45459. <dd><p>Set the output colorspace matrix.
  45460. </p>
  45461. <p>Possible value are:
  45462. </p><dl class="table">
  45463. <dt><var class="var">bt709</var></dt>
  45464. <dt><var class="var">bt2020</var></dt>
  45465. </dl>
  45466. <p>Default is same as input.
  45467. </p>
  45468. </dd>
  45469. </dl>
  45470. <ul class="mini-toc">
  45471. <li><a href="#Example-6" accesskey="1">Example</a></li>
  45472. </ul>
  45473. <div class="subsection-level-extent" id="Example-6">
  45474. <h4 class="subsection"><span>33.16.1 Example<a class="copiable-link" href="#Example-6"> &para;</a></span></h4>
  45475. <ul class="itemize mark-bullet">
  45476. <li>Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010 format using linear operator.
  45477. <div class="example">
  45478. <pre class="example-preformatted">-i INPUT -vf &quot;format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010&quot; OUTPUT
  45479. </pre></div>
  45480. </li></ul>
  45481. </div>
  45482. </div>
  45483. <div class="section-level-extent" id="unsharp_005fopencl">
  45484. <h3 class="section"><span>33.17 unsharp_opencl<a class="copiable-link" href="#unsharp_005fopencl"> &para;</a></span></h3>
  45485. <p>Sharpen or blur the input video.
  45486. </p>
  45487. <p>It accepts the following parameters:
  45488. </p>
  45489. <dl class="table">
  45490. <dt><samp class="option">luma_msize_x, lx</samp></dt>
  45491. <dd><p>Set the luma matrix horizontal size.
  45492. Range is <code class="code">[1, 23]</code> and default value is <code class="code">5</code>.
  45493. </p>
  45494. </dd>
  45495. <dt><samp class="option">luma_msize_y, ly</samp></dt>
  45496. <dd><p>Set the luma matrix vertical size.
  45497. Range is <code class="code">[1, 23]</code> and default value is <code class="code">5</code>.
  45498. </p>
  45499. </dd>
  45500. <dt><samp class="option">luma_amount, la</samp></dt>
  45501. <dd><p>Set the luma effect strength.
  45502. Range is <code class="code">[-10, 10]</code> and default value is <code class="code">1.0</code>.
  45503. </p>
  45504. <p>Negative values will blur the input video, while positive values will
  45505. sharpen it, a value of zero will disable the effect.
  45506. </p>
  45507. </dd>
  45508. <dt><samp class="option">chroma_msize_x, cx</samp></dt>
  45509. <dd><p>Set the chroma matrix horizontal size.
  45510. Range is <code class="code">[1, 23]</code> and default value is <code class="code">5</code>.
  45511. </p>
  45512. </dd>
  45513. <dt><samp class="option">chroma_msize_y, cy</samp></dt>
  45514. <dd><p>Set the chroma matrix vertical size.
  45515. Range is <code class="code">[1, 23]</code> and default value is <code class="code">5</code>.
  45516. </p>
  45517. </dd>
  45518. <dt><samp class="option">chroma_amount, ca</samp></dt>
  45519. <dd><p>Set the chroma effect strength.
  45520. Range is <code class="code">[-10, 10]</code> and default value is <code class="code">0.0</code>.
  45521. </p>
  45522. <p>Negative values will blur the input video, while positive values will
  45523. sharpen it, a value of zero will disable the effect.
  45524. </p>
  45525. </dd>
  45526. </dl>
  45527. <p>All parameters are optional and default to the equivalent of the
  45528. string &rsquo;5:5:1.0:5:5:0.0&rsquo;.
  45529. </p>
  45530. <ul class="mini-toc">
  45531. <li><a href="#Examples-164" accesskey="1">Examples</a></li>
  45532. </ul>
  45533. <div class="subsection-level-extent" id="Examples-164">
  45534. <h4 class="subsection"><span>33.17.1 Examples<a class="copiable-link" href="#Examples-164"> &para;</a></span></h4>
  45535. <ul class="itemize mark-bullet">
  45536. <li>Apply strong luma sharpen effect:
  45537. <div class="example">
  45538. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, unsharp_opencl=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5, hwdownload&quot; OUTPUT
  45539. </pre></div>
  45540. </li><li>Apply a strong blur of both luma and chroma parameters:
  45541. <div class="example">
  45542. <pre class="example-preformatted">-i INPUT -vf &quot;hwupload, unsharp_opencl=7:7:-2:7:7:-2, hwdownload&quot; OUTPUT
  45543. </pre></div>
  45544. </li></ul>
  45545. </div>
  45546. </div>
  45547. <div class="section-level-extent" id="xfade_005fopencl">
  45548. <h3 class="section"><span>33.18 xfade_opencl<a class="copiable-link" href="#xfade_005fopencl"> &para;</a></span></h3>
  45549. <p>Cross fade two videos with custom transition effect by using OpenCL.
  45550. </p>
  45551. <p>It accepts the following options:
  45552. </p>
  45553. <dl class="table">
  45554. <dt><samp class="option">transition</samp></dt>
  45555. <dd><p>Set one of possible transition effects.
  45556. </p>
  45557. <dl class="table">
  45558. <dt><samp class="option">custom</samp></dt>
  45559. <dd><p>Select custom transition effect, the actual transition description
  45560. will be picked from source and kernel options.
  45561. </p>
  45562. </dd>
  45563. <dt><samp class="option">fade</samp></dt>
  45564. <dt><samp class="option">wipeleft</samp></dt>
  45565. <dt><samp class="option">wiperight</samp></dt>
  45566. <dt><samp class="option">wipeup</samp></dt>
  45567. <dt><samp class="option">wipedown</samp></dt>
  45568. <dt><samp class="option">slideleft</samp></dt>
  45569. <dt><samp class="option">slideright</samp></dt>
  45570. <dt><samp class="option">slideup</samp></dt>
  45571. <dt><samp class="option">slidedown</samp></dt>
  45572. <dd>
  45573. <p>Default transition is fade.
  45574. </p></dd>
  45575. </dl>
  45576. </dd>
  45577. <dt><samp class="option">source</samp></dt>
  45578. <dd><p>OpenCL program source file for custom transition.
  45579. </p>
  45580. </dd>
  45581. <dt><samp class="option">kernel</samp></dt>
  45582. <dd><p>Set name of kernel to use for custom transition from program source file.
  45583. </p>
  45584. </dd>
  45585. <dt><samp class="option">duration</samp></dt>
  45586. <dd><p>Set duration of video transition.
  45587. </p>
  45588. </dd>
  45589. <dt><samp class="option">offset</samp></dt>
  45590. <dd><p>Set time of start of transition relative to first video.
  45591. </p></dd>
  45592. </dl>
  45593. <p>The program source file must contain a kernel function with the given name,
  45594. which will be run once for each plane of the output. Each run on a plane
  45595. gets enqueued as a separate 2D global NDRange with one work-item for each
  45596. pixel to be generated. The global ID offset for each work-item is therefore
  45597. the coordinates of a pixel in the destination image.
  45598. </p>
  45599. <p>The kernel function needs to take the following arguments:
  45600. </p><ul class="itemize mark-bullet">
  45601. <li>Destination image, <var class="var">__write_only image2d_t</var>.
  45602. <p>This image will become the output; the kernel should write all of it.
  45603. </p>
  45604. </li><li>First Source image, <var class="var">__read_only image2d_t</var>.
  45605. Second Source image, <var class="var">__read_only image2d_t</var>.
  45606. <p>These are the most recent images on each input. The kernel may read from
  45607. them to generate the output, but they can&rsquo;t be written to.
  45608. </p>
  45609. </li><li>Transition progress, <var class="var">float</var>. This value is always between 0 and 1 inclusive.
  45610. </li></ul>
  45611. <p>Example programs:
  45612. </p>
  45613. <ul class="itemize mark-bullet">
  45614. <li>Apply dots curtain transition effect:
  45615. <pre class="verbatim">__kernel void blend_images(__write_only image2d_t dst,
  45616. __read_only image2d_t src1,
  45617. __read_only image2d_t src2,
  45618. float progress)
  45619. {
  45620. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  45621. CLK_FILTER_LINEAR);
  45622. int2 p = (int2)(get_global_id(0), get_global_id(1));
  45623. float2 rp = (float2)(get_global_id(0), get_global_id(1));
  45624. float2 dim = (float2)(get_image_dim(src1).x, get_image_dim(src1).y);
  45625. rp = rp / dim;
  45626. float2 dots = (float2)(20.0, 20.0);
  45627. float2 center = (float2)(0,0);
  45628. float2 unused;
  45629. float4 val1 = read_imagef(src1, sampler, p);
  45630. float4 val2 = read_imagef(src2, sampler, p);
  45631. bool next = distance(fract(rp * dots, &amp;unused), (float2)(0.5, 0.5)) &lt; (progress / distance(rp, center));
  45632. write_imagef(dst, p, next ? val1 : val2);
  45633. }
  45634. </pre>
  45635. </li></ul>
  45636. </div>
  45637. </div>
  45638. <div class="chapter-level-extent" id="VAAPI-Video-Filters">
  45639. <h2 class="chapter"><span>34 VAAPI Video Filters<a class="copiable-link" href="#VAAPI-Video-Filters"> &para;</a></span></h2>
  45640. <p>VAAPI Video filters are usually used with VAAPI decoder and VAAPI encoder. Below is a description of VAAPI video filters.
  45641. </p>
  45642. <p>To enable compilation of these filters you need to configure FFmpeg with
  45643. <code class="code">--enable-vaapi</code>.
  45644. </p>
  45645. <p>To use vaapi filters, you need to setup the vaapi device correctly. For more information, please read <a class="url" href="https://trac.ffmpeg.org/wiki/Hardware/VAAPI">https://trac.ffmpeg.org/wiki/Hardware/VAAPI</a>
  45646. </p>
  45647. <ul class="mini-toc">
  45648. <li><a href="#overlay_005fvaapi" accesskey="1">overlay_vaapi</a></li>
  45649. <li><a href="#tonemap_005fvaapi" accesskey="2">tonemap_vaapi</a></li>
  45650. <li><a href="#hstack_005fvaapi" accesskey="3">hstack_vaapi</a></li>
  45651. <li><a href="#vstack_005fvaapi" accesskey="4">vstack_vaapi</a></li>
  45652. <li><a href="#xstack_005fvaapi" accesskey="5">xstack_vaapi</a></li>
  45653. </ul>
  45654. <div class="section-level-extent" id="overlay_005fvaapi">
  45655. <h3 class="section"><span>34.1 overlay_vaapi<a class="copiable-link" href="#overlay_005fvaapi"> &para;</a></span></h3>
  45656. <p>Overlay one video on the top of another.
  45657. </p>
  45658. <p>It takes two inputs and has one output. The first input is the &quot;main&quot; video on which the second input is overlaid.
  45659. </p>
  45660. <p>The filter accepts the following options:
  45661. </p>
  45662. <dl class="table">
  45663. <dt><samp class="option">x</samp></dt>
  45664. <dt><samp class="option">y</samp></dt>
  45665. <dd><p>Set expressions for the x and y coordinates of the overlaid video
  45666. on the main video.
  45667. </p>
  45668. <p>Default value is &quot;0&quot; for both expressions.
  45669. </p>
  45670. </dd>
  45671. <dt><samp class="option">w</samp></dt>
  45672. <dt><samp class="option">h</samp></dt>
  45673. <dd><p>Set expressions for the width and height the overlaid video
  45674. on the main video.
  45675. </p>
  45676. <p>Default values are &rsquo;overlay_iw&rsquo; for &rsquo;w&rsquo; and &rsquo;overlay_ih*w/overlay_iw&rsquo; for &rsquo;h&rsquo;.
  45677. </p>
  45678. <p>The expressions can contain the following parameters:
  45679. </p>
  45680. <dl class="table">
  45681. <dt><samp class="option">main_w, W</samp></dt>
  45682. <dt><samp class="option">main_h, H</samp></dt>
  45683. <dd><p>The main input width and height.
  45684. </p>
  45685. </dd>
  45686. <dt><samp class="option">overlay_iw</samp></dt>
  45687. <dt><samp class="option">overlay_ih</samp></dt>
  45688. <dd><p>The overlay input width and height.
  45689. </p>
  45690. </dd>
  45691. <dt><samp class="option">overlay_w, w</samp></dt>
  45692. <dt><samp class="option">overlay_h, h</samp></dt>
  45693. <dd><p>The overlay output width and height.
  45694. </p>
  45695. </dd>
  45696. <dt><samp class="option">overlay_x, x</samp></dt>
  45697. <dt><samp class="option">overlay_y, y</samp></dt>
  45698. <dd><p>Position of the overlay layer inside of main
  45699. </p>
  45700. </dd>
  45701. </dl>
  45702. </dd>
  45703. <dt><samp class="option">alpha</samp></dt>
  45704. <dd><p>Set transparency of overlaid video. Allowed range is 0.0 to 1.0.
  45705. Higher value means lower transparency.
  45706. Default value is <code class="code">1.0</code>.
  45707. </p>
  45708. </dd>
  45709. <dt><samp class="option">eof_action</samp></dt>
  45710. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  45711. </p>
  45712. </dd>
  45713. <dt><samp class="option">shortest</samp></dt>
  45714. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  45715. </p>
  45716. </dd>
  45717. <dt><samp class="option">repeatlast</samp></dt>
  45718. <dd><p>See <a class="ref" href="#framesync">framesync</a>.
  45719. </p>
  45720. </dd>
  45721. </dl>
  45722. <p>This filter also supports the <a class="ref" href="#framesync">framesync</a> options.
  45723. </p><ul class="mini-toc">
  45724. <li><a href="#Examples-165" accesskey="1">Examples</a></li>
  45725. </ul>
  45726. <div class="subsection-level-extent" id="Examples-165">
  45727. <h4 class="subsection"><span>34.1.1 Examples<a class="copiable-link" href="#Examples-165"> &para;</a></span></h4>
  45728. <ul class="itemize mark-bullet">
  45729. <li>Overlay an image LOGO at the top-left corner of the INPUT video. Both inputs for this filter are yuv420p format.
  45730. <div class="example">
  45731. <pre class="example-preformatted">-i INPUT -i LOGO -filter_complex &quot;[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_vaapi&quot; OUTPUT
  45732. </pre></div>
  45733. </li><li>Overlay an image LOGO at the offset (200, 100) from the top-left corner of the INPUT video.
  45734. The inputs have same memory layout for color channels, the overlay has additional alpha plane, like INPUT is yuv420p, and the LOGO is yuva420p.
  45735. <div class="example">
  45736. <pre class="example-preformatted">-i INPUT -i LOGO -filter_complex &quot;[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_vaapi=x=200:y=100:w=400:h=300:alpha=1.0, hwdownload, format=nv12&quot; OUTPUT
  45737. </pre></div>
  45738. </li></ul>
  45739. </div>
  45740. </div>
  45741. <div class="section-level-extent" id="tonemap_005fvaapi">
  45742. <h3 class="section"><span>34.2 tonemap_vaapi<a class="copiable-link" href="#tonemap_005fvaapi"> &para;</a></span></h3>
  45743. <p>Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion with tone-mapping.
  45744. It maps the dynamic range of HDR10 content to the SDR content.
  45745. It currently only accepts HDR10 as input.
  45746. </p>
  45747. <p>It accepts the following parameters:
  45748. </p>
  45749. <dl class="table">
  45750. <dt><samp class="option">format</samp></dt>
  45751. <dd><p>Specify the output pixel format.
  45752. </p>
  45753. <p>Currently supported formats are:
  45754. </p><dl class="table">
  45755. <dt><var class="var">p010</var></dt>
  45756. <dt><var class="var">nv12</var></dt>
  45757. </dl>
  45758. <p>Default is nv12.
  45759. </p>
  45760. </dd>
  45761. <dt><samp class="option">primaries, p</samp></dt>
  45762. <dd><p>Set the output color primaries.
  45763. </p>
  45764. <p>Default is same as input.
  45765. </p>
  45766. </dd>
  45767. <dt><samp class="option">transfer, t</samp></dt>
  45768. <dd><p>Set the output transfer characteristics.
  45769. </p>
  45770. <p>Default is bt709.
  45771. </p>
  45772. </dd>
  45773. <dt><samp class="option">matrix, m</samp></dt>
  45774. <dd><p>Set the output colorspace matrix.
  45775. </p>
  45776. <p>Default is same as input.
  45777. </p>
  45778. </dd>
  45779. </dl>
  45780. <ul class="mini-toc">
  45781. <li><a href="#Example-7" accesskey="1">Example</a></li>
  45782. </ul>
  45783. <div class="subsection-level-extent" id="Example-7">
  45784. <h4 class="subsection"><span>34.2.1 Example<a class="copiable-link" href="#Example-7"> &para;</a></span></h4>
  45785. <ul class="itemize mark-bullet">
  45786. <li>Convert HDR(HDR10) video to bt2020-transfer-characteristic p010 format
  45787. <div class="example">
  45788. <pre class="example-preformatted">tonemap_vaapi=format=p010:t=bt2020-10
  45789. </pre></div>
  45790. </li></ul>
  45791. </div>
  45792. </div>
  45793. <div class="section-level-extent" id="hstack_005fvaapi">
  45794. <h3 class="section"><span>34.3 hstack_vaapi<a class="copiable-link" href="#hstack_005fvaapi"> &para;</a></span></h3>
  45795. <p>Stack input videos horizontally.
  45796. </p>
  45797. <p>This is the VA-API variant of the <a class="ref" href="#hstack">hstack</a> filter, each input stream may
  45798. have different height, this filter will scale down/up each input stream while
  45799. keeping the original aspect.
  45800. </p>
  45801. <p>It accepts the following options:
  45802. </p>
  45803. <dl class="table">
  45804. <dt><samp class="option">inputs</samp></dt>
  45805. <dd><p>See <a class="ref" href="#hstack">hstack</a>.
  45806. </p>
  45807. </dd>
  45808. <dt><samp class="option">shortest</samp></dt>
  45809. <dd><p>See <a class="ref" href="#hstack">hstack</a>.
  45810. </p>
  45811. </dd>
  45812. <dt><samp class="option">height</samp></dt>
  45813. <dd><p>Set height of output. If set to 0, this filter will set height of output to
  45814. height of the first input stream. Default value is 0.
  45815. </p></dd>
  45816. </dl>
  45817. </div>
  45818. <div class="section-level-extent" id="vstack_005fvaapi">
  45819. <h3 class="section"><span>34.4 vstack_vaapi<a class="copiable-link" href="#vstack_005fvaapi"> &para;</a></span></h3>
  45820. <p>Stack input videos vertically.
  45821. </p>
  45822. <p>This is the VA-API variant of the <a class="ref" href="#vstack">vstack</a> filter, each input stream may
  45823. have different width, this filter will scale down/up each input stream while
  45824. keeping the original aspect.
  45825. </p>
  45826. <p>It accepts the following options:
  45827. </p>
  45828. <dl class="table">
  45829. <dt><samp class="option">inputs</samp></dt>
  45830. <dd><p>See <a class="ref" href="#vstack">vstack</a>.
  45831. </p>
  45832. </dd>
  45833. <dt><samp class="option">shortest</samp></dt>
  45834. <dd><p>See <a class="ref" href="#vstack">vstack</a>.
  45835. </p>
  45836. </dd>
  45837. <dt><samp class="option">width</samp></dt>
  45838. <dd><p>Set width of output. If set to 0, this filter will set width of output to
  45839. width of the first input stream. Default value is 0.
  45840. </p></dd>
  45841. </dl>
  45842. </div>
  45843. <div class="section-level-extent" id="xstack_005fvaapi">
  45844. <h3 class="section"><span>34.5 xstack_vaapi<a class="copiable-link" href="#xstack_005fvaapi"> &para;</a></span></h3>
  45845. <p>Stack video inputs into custom layout.
  45846. </p>
  45847. <p>This is the VA-API variant of the <a class="ref" href="#xstack">xstack</a> filter, each input stream may
  45848. have different size, this filter will scale down/up each input stream to the
  45849. given output size, or the size of the first input stream.
  45850. </p>
  45851. <p>It accepts the following options:
  45852. </p>
  45853. <dl class="table">
  45854. <dt><samp class="option">inputs</samp></dt>
  45855. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  45856. </p>
  45857. </dd>
  45858. <dt><samp class="option">shortest</samp></dt>
  45859. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  45860. </p>
  45861. </dd>
  45862. <dt><samp class="option">layout</samp></dt>
  45863. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  45864. Moreover, this permits the user to supply output size for each input stream.
  45865. </p><div class="example">
  45866. <pre class="example-preformatted">xstack_vaapi=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080
  45867. </pre></div>
  45868. </dd>
  45869. <dt><samp class="option">grid</samp></dt>
  45870. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  45871. </p>
  45872. </dd>
  45873. <dt><samp class="option">grid_tile_size</samp></dt>
  45874. <dd><p>Set output size for each input stream when <samp class="option">grid</samp> is set. If this option
  45875. is not set, this filter will set output size by default to the size of the
  45876. first input stream. For the syntax of this option, check the
  45877. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  45878. </p>
  45879. </dd>
  45880. <dt><samp class="option">fill</samp></dt>
  45881. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  45882. </p></dd>
  45883. </dl>
  45884. </div>
  45885. </div>
  45886. <div class="chapter-level-extent" id="Vulkan-Video-Filters">
  45887. <h2 class="chapter"><span>35 Vulkan Video Filters<a class="copiable-link" href="#Vulkan-Video-Filters"> &para;</a></span></h2>
  45888. <p>Below is a description of the currently available Vulkan video filters.
  45889. </p>
  45890. <p>To enable compilation of these filters you need to configure FFmpeg with
  45891. <code class="code">--enable-vulkan</code> and either <code class="code">--enable-libglslang</code> or <code class="code">--enable-libshaderc</code>.
  45892. </p>
  45893. <p>Running Vulkan filters requires you to initialize a hardware device and to pass that device to all filters in any filter graph.
  45894. </p><dl class="table">
  45895. <dt><samp class="option">-init_hw_device vulkan[=<var class="var">name</var>][:<var class="var">device</var>[,<var class="var">key=value</var>...]]</samp></dt>
  45896. <dd><p>Initialise a new hardware device of type <var class="var">vulkan</var> called <var class="var">name</var>, using the
  45897. given device parameters and options in <var class="var">key=value</var>. The following options
  45898. are supported:
  45899. </p>
  45900. <dl class="table">
  45901. <dt><samp class="option">debug</samp></dt>
  45902. <dd><p>Switches validation layers on if set to 1.
  45903. </p>
  45904. </dd>
  45905. <dt><samp class="option">linear_images</samp></dt>
  45906. <dd><p>Allocates linear images. Does not apply to decoding.
  45907. </p>
  45908. </dd>
  45909. <dt><samp class="option">disable_multiplane</samp></dt>
  45910. <dd><p>Disables multiplane images. Does not apply to decoding.
  45911. </p></dd>
  45912. </dl>
  45913. </dd>
  45914. <dt><samp class="option">-filter_hw_device <var class="var">name</var></samp></dt>
  45915. <dd><p>Pass the hardware device called <var class="var">name</var> to all filters in any filter graph.
  45916. </p>
  45917. </dd>
  45918. </dl>
  45919. <p>For more detailed information see <a class="url" href="https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options">https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options</a>
  45920. </p>
  45921. <ul class="itemize mark-bullet">
  45922. <li>Example of choosing the first device and running nlmeans_vulkan filter with default parameters on it.
  45923. <div class="example">
  45924. <pre class="example-preformatted">-init_hw_device vulkan=vk:0 -filter_hw_device vk -i INPUT -vf &quot;hwupload,nlmeans_vulkan,hwdownload&quot; OUTPUT
  45925. </pre></div>
  45926. </li></ul>
  45927. <p>As Vulkan filters are not able to access frame data in normal memory, all frame data needs to be uploaded (<a class="ref" href="#hwupload">hwupload</a>) to hardware surfaces connected to the appropriate device before being used and then downloaded (<a class="ref" href="#hwdownload">hwdownload</a>) back to normal memory. Note that <a class="ref" href="#hwupload">hwupload</a> will upload to a frame with the same layout as the software frame, so it may be necessary to add a <a class="ref" href="#format">format</a> filter immediately before to get the input into the right format and <a class="ref" href="#hwdownload">hwdownload</a> does not support all formats on the output - it is usually necessary to insert an additional <a class="ref" href="#format">format</a> filter immediately following in the graph to get the output in a supported format.
  45928. </p>
  45929. <ul class="mini-toc">
  45930. <li><a href="#avgblur_005fvulkan" accesskey="1">avgblur_vulkan</a></li>
  45931. <li><a href="#blend_005fvulkan" accesskey="2">blend_vulkan</a></li>
  45932. <li><a href="#bwdif_005fvulkan" accesskey="3">bwdif_vulkan</a></li>
  45933. <li><a href="#chromaber_005fvulkan" accesskey="4">chromaber_vulkan</a></li>
  45934. <li><a href="#color_005fvulkan" accesskey="5">color_vulkan</a></li>
  45935. <li><a href="#vflip_005fvulkan" accesskey="6">vflip_vulkan</a></li>
  45936. <li><a href="#hflip_005fvulkan" accesskey="7">hflip_vulkan</a></li>
  45937. <li><a href="#flip_005fvulkan" accesskey="8">flip_vulkan</a></li>
  45938. <li><a href="#gblur_005fvulkan" accesskey="9">gblur_vulkan</a></li>
  45939. <li><a href="#nlmeans_005fvulkan">nlmeans_vulkan</a></li>
  45940. <li><a href="#overlay_005fvulkan">overlay_vulkan</a></li>
  45941. <li><a href="#transpose_005fvt">transpose_vt</a></li>
  45942. <li><a href="#transpose_005fvulkan">transpose_vulkan</a></li>
  45943. </ul>
  45944. <div class="section-level-extent" id="avgblur_005fvulkan">
  45945. <h3 class="section"><span>35.1 avgblur_vulkan<a class="copiable-link" href="#avgblur_005fvulkan"> &para;</a></span></h3>
  45946. <p>Apply an average blur filter, implemented on the GPU using Vulkan.
  45947. </p>
  45948. <p>The filter accepts the following options:
  45949. </p>
  45950. <dl class="table">
  45951. <dt><samp class="option">sizeX</samp></dt>
  45952. <dd><p>Set horizontal radius size.
  45953. Range is <code class="code">[1, 32]</code> and default value is <code class="code">3</code>.
  45954. </p>
  45955. </dd>
  45956. <dt><samp class="option">sizeY</samp></dt>
  45957. <dd><p>Set vertical radius size. Range is <code class="code">[1, 32]</code> and default value is <code class="code">3</code>.
  45958. </p>
  45959. </dd>
  45960. <dt><samp class="option">planes</samp></dt>
  45961. <dd><p>Set which planes to filter. Default value is <code class="code">0xf</code>, by which all planes are processed.
  45962. </p></dd>
  45963. </dl>
  45964. </div>
  45965. <div class="section-level-extent" id="blend_005fvulkan">
  45966. <h3 class="section"><span>35.2 blend_vulkan<a class="copiable-link" href="#blend_005fvulkan"> &para;</a></span></h3>
  45967. <p>Blend two Vulkan frames into each other.
  45968. </p>
  45969. <p>The <code class="code">blend</code> filter takes two input streams and outputs one
  45970. stream, the first input is the &quot;top&quot; layer and second input is
  45971. &quot;bottom&quot; layer. By default, the output terminates when the longest input terminates.
  45972. </p>
  45973. <p>A description of the accepted options follows.
  45974. </p>
  45975. <dl class="table">
  45976. <dt><samp class="option">c0_mode</samp></dt>
  45977. <dt><samp class="option">c1_mode</samp></dt>
  45978. <dt><samp class="option">c2_mode</samp></dt>
  45979. <dt><samp class="option">c3_mode</samp></dt>
  45980. <dt><samp class="option">all_mode</samp></dt>
  45981. <dd><p>Set blend mode for specific pixel component or all pixel components in case
  45982. of <var class="var">all_mode</var>. Default value is <code class="code">normal</code>.
  45983. </p>
  45984. <p>Available values for component modes are:
  45985. </p><dl class="table">
  45986. <dt>&lsquo;<samp class="samp">normal</samp>&rsquo;</dt>
  45987. <dt>&lsquo;<samp class="samp">multiply</samp>&rsquo;</dt>
  45988. </dl>
  45989. </dd>
  45990. </dl>
  45991. </div>
  45992. <div class="section-level-extent" id="bwdif_005fvulkan">
  45993. <h3 class="section"><span>35.3 bwdif_vulkan<a class="copiable-link" href="#bwdif_005fvulkan"> &para;</a></span></h3>
  45994. <p>Deinterlacer using <a class="ref" href="#bwdif">bwdif</a>, the &quot;Bob Weaver Deinterlacing Filter&quot; algorithm, implemented
  45995. on the GPU using Vulkan.
  45996. </p>
  45997. <p>It accepts the following parameters:
  45998. </p>
  45999. <dl class="table">
  46000. <dt><samp class="option">mode</samp></dt>
  46001. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  46002. </p>
  46003. <dl class="table">
  46004. <dt><samp class="option">0, send_frame</samp></dt>
  46005. <dd><p>Output one frame for each frame.
  46006. </p></dd>
  46007. <dt><samp class="option">1, send_field</samp></dt>
  46008. <dd><p>Output one frame for each field.
  46009. </p></dd>
  46010. </dl>
  46011. <p>The default value is <code class="code">send_field</code>.
  46012. </p>
  46013. </dd>
  46014. <dt><samp class="option">parity</samp></dt>
  46015. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  46016. of the following values:
  46017. </p>
  46018. <dl class="table">
  46019. <dt><samp class="option">0, tff</samp></dt>
  46020. <dd><p>Assume the top field is first.
  46021. </p></dd>
  46022. <dt><samp class="option">1, bff</samp></dt>
  46023. <dd><p>Assume the bottom field is first.
  46024. </p></dd>
  46025. <dt><samp class="option">-1, auto</samp></dt>
  46026. <dd><p>Enable automatic detection of field parity.
  46027. </p></dd>
  46028. </dl>
  46029. <p>The default value is <code class="code">auto</code>.
  46030. If the interlacing is unknown or the decoder does not export this information,
  46031. top field first will be assumed.
  46032. </p>
  46033. </dd>
  46034. <dt><samp class="option">deint</samp></dt>
  46035. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  46036. values:
  46037. </p>
  46038. <dl class="table">
  46039. <dt><samp class="option">0, all</samp></dt>
  46040. <dd><p>Deinterlace all frames.
  46041. </p></dd>
  46042. <dt><samp class="option">1, interlaced</samp></dt>
  46043. <dd><p>Only deinterlace frames marked as interlaced.
  46044. </p></dd>
  46045. </dl>
  46046. <p>The default value is <code class="code">all</code>.
  46047. </p></dd>
  46048. </dl>
  46049. </div>
  46050. <div class="section-level-extent" id="chromaber_005fvulkan">
  46051. <h3 class="section"><span>35.4 chromaber_vulkan<a class="copiable-link" href="#chromaber_005fvulkan"> &para;</a></span></h3>
  46052. <p>Apply an effect that emulates chromatic aberration. Works best with RGB inputs,
  46053. but provides a similar effect with YCbCr inputs too.
  46054. </p>
  46055. <dl class="table">
  46056. <dt><samp class="option">dist_x</samp></dt>
  46057. <dd><p>Horizontal displacement multiplier. Each chroma pixel&rsquo;s position will be multiplied
  46058. by this amount, starting from the center of the image. Default is <code class="code">0</code>.
  46059. </p>
  46060. </dd>
  46061. <dt><samp class="option">dist_y</samp></dt>
  46062. <dd><p>Similarly, this sets the vertical displacement multiplier. Default is <code class="code">0</code>.
  46063. </p>
  46064. </dd>
  46065. </dl>
  46066. </div>
  46067. <div class="section-level-extent" id="color_005fvulkan">
  46068. <h3 class="section"><span>35.5 color_vulkan<a class="copiable-link" href="#color_005fvulkan"> &para;</a></span></h3>
  46069. <p>Video source that creates a Vulkan frame of a solid color.
  46070. Useful for benchmarking, or overlaying.
  46071. </p>
  46072. <p>It accepts the following parameters:
  46073. </p>
  46074. <dl class="table">
  46075. <dt><samp class="option">color</samp></dt>
  46076. <dd><p>The color to use. Either a name, or a hexadecimal value.
  46077. The default value is <code class="code">black</code>.
  46078. </p>
  46079. </dd>
  46080. <dt><samp class="option">size</samp></dt>
  46081. <dd><p>The size of the output frame. Default value is <code class="code">1920x1080</code>.
  46082. </p>
  46083. </dd>
  46084. <dt><samp class="option">rate</samp></dt>
  46085. <dd><p>The framerate to output at. Default value is <code class="code">60</code> frames per second.
  46086. </p>
  46087. </dd>
  46088. <dt><samp class="option">duration</samp></dt>
  46089. <dd><p>The video duration. Default value is <code class="code">-0.000001</code>.
  46090. </p>
  46091. </dd>
  46092. <dt><samp class="option">sar</samp></dt>
  46093. <dd><p>The video signal aspect ratio. Default value is <code class="code">1/1</code>.
  46094. </p>
  46095. </dd>
  46096. <dt><samp class="option">format</samp></dt>
  46097. <dd><p>The pixel format of the output Vulkan frames. Default value is <code class="code">yuv444p</code>.
  46098. </p>
  46099. </dd>
  46100. <dt><samp class="option">out_range</samp></dt>
  46101. <dd><p>Set the output YCbCr sample range.
  46102. </p>
  46103. <p>This allows the autodetected value to be overridden as well as allows forcing
  46104. a specific value used for the output and encoder. If not specified, the
  46105. range depends on the pixel format. Possible values:
  46106. </p>
  46107. <dl class="table">
  46108. <dt>&lsquo;<samp class="samp">auto/unknown</samp>&rsquo;</dt>
  46109. <dd><p>Choose automatically.
  46110. </p>
  46111. </dd>
  46112. <dt>&lsquo;<samp class="samp">jpeg/full/pc</samp>&rsquo;</dt>
  46113. <dd><p>Set full range (0-255 in case of 8-bit luma).
  46114. </p>
  46115. </dd>
  46116. <dt>&lsquo;<samp class="samp">mpeg/limited/tv</samp>&rsquo;</dt>
  46117. <dd><p>Set &quot;MPEG&quot; range (16-235 in case of 8-bit luma).
  46118. </p></dd>
  46119. </dl>
  46120. </dd>
  46121. </dl>
  46122. </div>
  46123. <div class="section-level-extent" id="vflip_005fvulkan">
  46124. <h3 class="section"><span>35.6 vflip_vulkan<a class="copiable-link" href="#vflip_005fvulkan"> &para;</a></span></h3>
  46125. <p>Flips an image vertically.
  46126. </p>
  46127. </div>
  46128. <div class="section-level-extent" id="hflip_005fvulkan">
  46129. <h3 class="section"><span>35.7 hflip_vulkan<a class="copiable-link" href="#hflip_005fvulkan"> &para;</a></span></h3>
  46130. <p>Flips an image horizontally.
  46131. </p>
  46132. </div>
  46133. <div class="section-level-extent" id="flip_005fvulkan">
  46134. <h3 class="section"><span>35.8 flip_vulkan<a class="copiable-link" href="#flip_005fvulkan"> &para;</a></span></h3>
  46135. <p>Flips an image along both the vertical and horizontal axis.
  46136. </p>
  46137. </div>
  46138. <div class="section-level-extent" id="gblur_005fvulkan">
  46139. <h3 class="section"><span>35.9 gblur_vulkan<a class="copiable-link" href="#gblur_005fvulkan"> &para;</a></span></h3>
  46140. <p>Apply Gaussian blur filter on Vulkan frames.
  46141. </p>
  46142. <p>The filter accepts the following options:
  46143. </p>
  46144. <dl class="table">
  46145. <dt><samp class="option">sigma</samp></dt>
  46146. <dd><p>Set horizontal sigma, standard deviation of Gaussian blur. Default is <code class="code">0.5</code>.
  46147. </p>
  46148. </dd>
  46149. <dt><samp class="option">sigmaV</samp></dt>
  46150. <dd><p>Set vertical sigma, if negative it will be same as <code class="code">sigma</code>.
  46151. Default is <code class="code">-1</code>.
  46152. </p>
  46153. </dd>
  46154. <dt><samp class="option">planes</samp></dt>
  46155. <dd><p>Set which planes to filter. By default all planes are filtered.
  46156. </p>
  46157. </dd>
  46158. <dt><samp class="option">size</samp></dt>
  46159. <dd><p>Set the kernel size along the horizontal axis. Default is <code class="code">19</code>.
  46160. </p>
  46161. </dd>
  46162. <dt><samp class="option">sizeV</samp></dt>
  46163. <dd><p>Set the kernel size along the vertical axis. Default is <code class="code">0</code>,
  46164. which sets to use the same value as <var class="var">size</var>.
  46165. </p>
  46166. </dd>
  46167. </dl>
  46168. </div>
  46169. <div class="section-level-extent" id="nlmeans_005fvulkan">
  46170. <h3 class="section"><span>35.10 nlmeans_vulkan<a class="copiable-link" href="#nlmeans_005fvulkan"> &para;</a></span></h3>
  46171. <p>Denoise frames using Non-Local Means algorithm, implemented on the GPU using
  46172. Vulkan.
  46173. Supports more pixel formats than <a class="ref" href="#nlmeans">nlmeans</a> or <a class="ref" href="#nlmeans_005fopencl">nlmeans_opencl</a>, including
  46174. alpha channel support.
  46175. </p>
  46176. <p>The filter accepts the following options.
  46177. </p>
  46178. <dl class="table">
  46179. <dt><samp class="option">s</samp></dt>
  46180. <dd><p>Set denoising strength for all components. Default is 1.0. Must be in range [1.0, 100.0].
  46181. </p>
  46182. </dd>
  46183. <dt><samp class="option">p</samp></dt>
  46184. <dd><p>Set patch size for all planes. Default is 7. Must be odd number in range [0, 99].
  46185. </p>
  46186. </dd>
  46187. <dt><samp class="option">r</samp></dt>
  46188. <dd><p>Set research size. Default is 15. Must be odd number in range [0, 99].
  46189. </p>
  46190. </dd>
  46191. <dt><samp class="option">t</samp></dt>
  46192. <dd><p>Set parallelism. Default is 36. Must be a number in the range [1, 168].
  46193. Larger values may speed up processing, at the cost of more VRAM.
  46194. Lower values will slow it down, reducing VRAM usage.
  46195. Only supported on GPUs with atomic float operations (RDNA3+, Ampere+).
  46196. </p>
  46197. </dd>
  46198. <dt><samp class="option">s0</samp></dt>
  46199. <dt><samp class="option">s1</samp></dt>
  46200. <dt><samp class="option">s2</samp></dt>
  46201. <dt><samp class="option">s3</samp></dt>
  46202. <dd><p>Set denoising strength for a specific component. Default is <var class="var">1</var>, equal to <samp class="option">s</samp>.
  46203. Must be odd number in range [1, 100].
  46204. </p>
  46205. </dd>
  46206. <dt><samp class="option">p0</samp></dt>
  46207. <dt><samp class="option">p1</samp></dt>
  46208. <dt><samp class="option">p2</samp></dt>
  46209. <dt><samp class="option">p3</samp></dt>
  46210. <dd><p>Set patch size for a specific component. Default is <var class="var">7</var>, equal to <samp class="option">p</samp>.
  46211. Must be odd number in range [0, 99].
  46212. </p>
  46213. </dd>
  46214. </dl>
  46215. </div>
  46216. <div class="section-level-extent" id="overlay_005fvulkan">
  46217. <h3 class="section"><span>35.11 overlay_vulkan<a class="copiable-link" href="#overlay_005fvulkan"> &para;</a></span></h3>
  46218. <p>Overlay one video on top of another.
  46219. </p>
  46220. <p>It takes two inputs and has one output. The first input is the &quot;main&quot; video on which the second input is overlaid.
  46221. This filter requires all inputs to use the same pixel format. So, format conversion may be needed.
  46222. </p>
  46223. <p>The filter accepts the following options:
  46224. </p>
  46225. <dl class="table">
  46226. <dt><samp class="option">x</samp></dt>
  46227. <dd><p>Set the x coordinate of the overlaid video on the main video.
  46228. Default value is <code class="code">0</code>.
  46229. </p>
  46230. </dd>
  46231. <dt><samp class="option">y</samp></dt>
  46232. <dd><p>Set the y coordinate of the overlaid video on the main video.
  46233. Default value is <code class="code">0</code>.
  46234. </p>
  46235. </dd>
  46236. </dl>
  46237. </div>
  46238. <div class="section-level-extent" id="transpose_005fvt">
  46239. <h3 class="section"><span>35.12 transpose_vt<a class="copiable-link" href="#transpose_005fvt"> &para;</a></span></h3>
  46240. <p>Transpose rows with columns in the input video and optionally flip it.
  46241. For more in depth examples see the <a class="ref" href="#transpose">transpose</a> video filter, which shares mostly the same options.
  46242. </p>
  46243. <p>It accepts the following parameters:
  46244. </p>
  46245. <dl class="table">
  46246. <dt><samp class="option">dir</samp></dt>
  46247. <dd><p>Specify the transposition direction.
  46248. </p>
  46249. <p>Can assume the following values:
  46250. </p><dl class="table">
  46251. <dt>&lsquo;<samp class="samp">cclock_flip</samp>&rsquo;</dt>
  46252. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip. (default)
  46253. </p>
  46254. </dd>
  46255. <dt>&lsquo;<samp class="samp">clock</samp>&rsquo;</dt>
  46256. <dd><p>Rotate by 90 degrees clockwise.
  46257. </p>
  46258. </dd>
  46259. <dt>&lsquo;<samp class="samp">cclock</samp>&rsquo;</dt>
  46260. <dd><p>Rotate by 90 degrees counterclockwise.
  46261. </p>
  46262. </dd>
  46263. <dt>&lsquo;<samp class="samp">clock_flip</samp>&rsquo;</dt>
  46264. <dd><p>Rotate by 90 degrees clockwise and vertically flip.
  46265. </p>
  46266. </dd>
  46267. <dt>&lsquo;<samp class="samp">hflip</samp>&rsquo;</dt>
  46268. <dd><p>Flip the input video horizontally.
  46269. </p>
  46270. </dd>
  46271. <dt>&lsquo;<samp class="samp">vflip</samp>&rsquo;</dt>
  46272. <dd><p>Flip the input video vertically.
  46273. </p>
  46274. </dd>
  46275. </dl>
  46276. </dd>
  46277. <dt><samp class="option">passthrough</samp></dt>
  46278. <dd><p>Do not apply the transposition if the input geometry matches the one
  46279. specified by the specified value. It accepts the following values:
  46280. </p><dl class="table">
  46281. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  46282. <dd><p>Always apply transposition. (default)
  46283. </p></dd>
  46284. <dt>&lsquo;<samp class="samp">portrait</samp>&rsquo;</dt>
  46285. <dd><p>Preserve portrait geometry (when <var class="var">height</var> &gt;= <var class="var">width</var>).
  46286. </p></dd>
  46287. <dt>&lsquo;<samp class="samp">landscape</samp>&rsquo;</dt>
  46288. <dd><p>Preserve landscape geometry (when <var class="var">width</var> &gt;= <var class="var">height</var>).
  46289. </p></dd>
  46290. </dl>
  46291. </dd>
  46292. </dl>
  46293. </div>
  46294. <div class="section-level-extent" id="transpose_005fvulkan">
  46295. <h3 class="section"><span>35.13 transpose_vulkan<a class="copiable-link" href="#transpose_005fvulkan"> &para;</a></span></h3>
  46296. <p>Transpose rows with columns in the input video and optionally flip it.
  46297. For more in depth examples see the <a class="ref" href="#transpose">transpose</a> video filter, which shares mostly the same options.
  46298. </p>
  46299. <p>It accepts the following parameters:
  46300. </p>
  46301. <dl class="table">
  46302. <dt><samp class="option">dir</samp></dt>
  46303. <dd><p>Specify the transposition direction.
  46304. </p>
  46305. <p>Can assume the following values:
  46306. </p><dl class="table">
  46307. <dt>&lsquo;<samp class="samp">cclock_flip</samp>&rsquo;</dt>
  46308. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip. (default)
  46309. </p>
  46310. </dd>
  46311. <dt>&lsquo;<samp class="samp">clock</samp>&rsquo;</dt>
  46312. <dd><p>Rotate by 90 degrees clockwise.
  46313. </p>
  46314. </dd>
  46315. <dt>&lsquo;<samp class="samp">cclock</samp>&rsquo;</dt>
  46316. <dd><p>Rotate by 90 degrees counterclockwise.
  46317. </p>
  46318. </dd>
  46319. <dt>&lsquo;<samp class="samp">clock_flip</samp>&rsquo;</dt>
  46320. <dd><p>Rotate by 90 degrees clockwise and vertically flip.
  46321. </p></dd>
  46322. </dl>
  46323. </dd>
  46324. <dt><samp class="option">passthrough</samp></dt>
  46325. <dd><p>Do not apply the transposition if the input geometry matches the one
  46326. specified by the specified value. It accepts the following values:
  46327. </p><dl class="table">
  46328. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  46329. <dd><p>Always apply transposition. (default)
  46330. </p></dd>
  46331. <dt>&lsquo;<samp class="samp">portrait</samp>&rsquo;</dt>
  46332. <dd><p>Preserve portrait geometry (when <var class="var">height</var> &gt;= <var class="var">width</var>).
  46333. </p></dd>
  46334. <dt>&lsquo;<samp class="samp">landscape</samp>&rsquo;</dt>
  46335. <dd><p>Preserve landscape geometry (when <var class="var">width</var> &gt;= <var class="var">height</var>).
  46336. </p></dd>
  46337. </dl>
  46338. </dd>
  46339. </dl>
  46340. </div>
  46341. </div>
  46342. <div class="chapter-level-extent" id="QSV-Video-Filters">
  46343. <h2 class="chapter"><span>36 QSV Video Filters<a class="copiable-link" href="#QSV-Video-Filters"> &para;</a></span></h2>
  46344. <p>Below is a description of the currently available QSV video filters.
  46345. </p>
  46346. <p>To enable compilation of these filters you need to configure FFmpeg with
  46347. <code class="code">--enable-libmfx</code> or <code class="code">--enable-libvpl</code>.
  46348. </p>
  46349. <p>To use QSV filters, you need to setup the QSV device correctly. For more information, please read <a class="url" href="https://trac.ffmpeg.org/wiki/Hardware/QuickSync">https://trac.ffmpeg.org/wiki/Hardware/QuickSync</a>
  46350. </p>
  46351. <ul class="mini-toc">
  46352. <li><a href="#hstack_005fqsv" accesskey="1">hstack_qsv</a></li>
  46353. <li><a href="#vstack_005fqsv" accesskey="2">vstack_qsv</a></li>
  46354. <li><a href="#xstack_005fqsv" accesskey="3">xstack_qsv</a></li>
  46355. </ul>
  46356. <div class="section-level-extent" id="hstack_005fqsv">
  46357. <h3 class="section"><span>36.1 hstack_qsv<a class="copiable-link" href="#hstack_005fqsv"> &para;</a></span></h3>
  46358. <p>Stack input videos horizontally.
  46359. </p>
  46360. <p>This is the QSV variant of the <a class="ref" href="#hstack">hstack</a> filter, each input stream may
  46361. have different height, this filter will scale down/up each input stream while
  46362. keeping the original aspect.
  46363. </p>
  46364. <p>It accepts the following options:
  46365. </p>
  46366. <dl class="table">
  46367. <dt><samp class="option">inputs</samp></dt>
  46368. <dd><p>See <a class="ref" href="#hstack">hstack</a>.
  46369. </p>
  46370. </dd>
  46371. <dt><samp class="option">shortest</samp></dt>
  46372. <dd><p>See <a class="ref" href="#hstack">hstack</a>.
  46373. </p>
  46374. </dd>
  46375. <dt><samp class="option">height</samp></dt>
  46376. <dd><p>Set height of output. If set to 0, this filter will set height of output to
  46377. height of the first input stream. Default value is 0.
  46378. </p></dd>
  46379. </dl>
  46380. </div>
  46381. <div class="section-level-extent" id="vstack_005fqsv">
  46382. <h3 class="section"><span>36.2 vstack_qsv<a class="copiable-link" href="#vstack_005fqsv"> &para;</a></span></h3>
  46383. <p>Stack input videos vertically.
  46384. </p>
  46385. <p>This is the QSV variant of the <a class="ref" href="#vstack">vstack</a> filter, each input stream may
  46386. have different width, this filter will scale down/up each input stream while
  46387. keeping the original aspect.
  46388. </p>
  46389. <p>It accepts the following options:
  46390. </p>
  46391. <dl class="table">
  46392. <dt><samp class="option">inputs</samp></dt>
  46393. <dd><p>See <a class="ref" href="#vstack">vstack</a>.
  46394. </p>
  46395. </dd>
  46396. <dt><samp class="option">shortest</samp></dt>
  46397. <dd><p>See <a class="ref" href="#vstack">vstack</a>.
  46398. </p>
  46399. </dd>
  46400. <dt><samp class="option">width</samp></dt>
  46401. <dd><p>Set width of output. If set to 0, this filter will set width of output to
  46402. width of the first input stream. Default value is 0.
  46403. </p></dd>
  46404. </dl>
  46405. </div>
  46406. <div class="section-level-extent" id="xstack_005fqsv">
  46407. <h3 class="section"><span>36.3 xstack_qsv<a class="copiable-link" href="#xstack_005fqsv"> &para;</a></span></h3>
  46408. <p>Stack video inputs into custom layout.
  46409. </p>
  46410. <p>This is the QSV variant of the <a class="ref" href="#xstack">xstack</a> filter.
  46411. </p>
  46412. <p>It accepts the following options:
  46413. </p>
  46414. <dl class="table">
  46415. <dt><samp class="option">inputs</samp></dt>
  46416. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  46417. </p>
  46418. </dd>
  46419. <dt><samp class="option">shortest</samp></dt>
  46420. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  46421. </p>
  46422. </dd>
  46423. <dt><samp class="option">layout</samp></dt>
  46424. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  46425. Moreover, this permits the user to supply output size for each input stream.
  46426. </p><div class="example">
  46427. <pre class="example-preformatted">xstack_qsv=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080
  46428. </pre></div>
  46429. </dd>
  46430. <dt><samp class="option">grid</samp></dt>
  46431. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  46432. </p>
  46433. </dd>
  46434. <dt><samp class="option">grid_tile_size</samp></dt>
  46435. <dd><p>Set output size for each input stream when <samp class="option">grid</samp> is set. If this option
  46436. is not set, this filter will set output size by default to the size of the
  46437. first input stream. For the syntax of this option, check the
  46438. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  46439. </p>
  46440. </dd>
  46441. <dt><samp class="option">fill</samp></dt>
  46442. <dd><p>See <a class="ref" href="#xstack">xstack</a>.
  46443. </p></dd>
  46444. </dl>
  46445. </div>
  46446. </div>
  46447. <div class="chapter-level-extent" id="Video-Sources">
  46448. <h2 class="chapter"><span>37 Video Sources<a class="copiable-link" href="#Video-Sources"> &para;</a></span></h2>
  46449. <p>Below is a description of the currently available video sources.
  46450. </p>
  46451. <ul class="mini-toc">
  46452. <li><a href="#buffer" accesskey="1">buffer</a></li>
  46453. <li><a href="#cellauto" accesskey="2">cellauto</a></li>
  46454. <li><a href="#coreimagesrc-1" accesskey="3">coreimagesrc</a></li>
  46455. <li><a href="#ddagrab" accesskey="4">ddagrab</a></li>
  46456. <li><a href="#gradients" accesskey="5">gradients</a></li>
  46457. <li><a href="#mandelbrot" accesskey="6">mandelbrot</a></li>
  46458. <li><a href="#mptestsrc" accesskey="7">mptestsrc</a></li>
  46459. <li><a href="#frei0r_005fsrc" accesskey="8">frei0r_src</a></li>
  46460. <li><a href="#life" accesskey="9">life</a></li>
  46461. <li><a href="#qrencodesrc">qrencodesrc</a></li>
  46462. <li><a href="#allrgb_002c-allyuv_002c-color_002c-colorchart_002c-colorspectrum_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc">allrgb, allyuv, color, colorchart, colorspectrum, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc</a></li>
  46463. <li><a href="#openclsrc">openclsrc</a></li>
  46464. <li><a href="#sierpinski">sierpinski</a></li>
  46465. <li><a href="#zoneplate">zoneplate</a></li>
  46466. </ul>
  46467. <div class="section-level-extent" id="buffer">
  46468. <h3 class="section"><span>37.1 buffer<a class="copiable-link" href="#buffer"> &para;</a></span></h3>
  46469. <p>Buffer video frames, and make them available to the filter chain.
  46470. </p>
  46471. <p>This source is mainly intended for a programmatic use, in particular
  46472. through the interface defined in <samp class="file">libavfilter/buffersrc.h</samp>.
  46473. </p>
  46474. <p>It accepts the following parameters:
  46475. </p>
  46476. <dl class="table">
  46477. <dt><samp class="option">video_size</samp></dt>
  46478. <dd><p>Specify the size (width and height) of the buffered video frames. For the
  46479. syntax of this option, check the
  46480. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  46481. </p>
  46482. </dd>
  46483. <dt><samp class="option">width</samp></dt>
  46484. <dd><p>The input video width.
  46485. </p>
  46486. </dd>
  46487. <dt><samp class="option">height</samp></dt>
  46488. <dd><p>The input video height.
  46489. </p>
  46490. </dd>
  46491. <dt><samp class="option">pix_fmt</samp></dt>
  46492. <dd><p>A string representing the pixel format of the buffered video frames.
  46493. It may be a number corresponding to a pixel format, or a pixel format
  46494. name.
  46495. </p>
  46496. </dd>
  46497. <dt><samp class="option">time_base</samp></dt>
  46498. <dd><p>Specify the timebase assumed by the timestamps of the buffered frames.
  46499. </p>
  46500. </dd>
  46501. <dt><samp class="option">frame_rate</samp></dt>
  46502. <dd><p>Specify the frame rate expected for the video stream.
  46503. </p>
  46504. </dd>
  46505. <dt><samp class="option">colorspace</samp></dt>
  46506. <dd><p>A string representing the color space of the buffered video frames.
  46507. It may be a number corresponding to a color space, or a color space
  46508. name.
  46509. </p>
  46510. </dd>
  46511. <dt><samp class="option">range</samp></dt>
  46512. <dd><p>A string representing the color range of the buffered video frames.
  46513. It may be a number corresponding to a color range, or a color range
  46514. name.
  46515. </p>
  46516. </dd>
  46517. <dt><samp class="option">pixel_aspect, sar</samp></dt>
  46518. <dd><p>The sample (pixel) aspect ratio of the input video.
  46519. </p>
  46520. </dd>
  46521. <dt><samp class="option">hw_frames_ctx</samp></dt>
  46522. <dd><p>When using a hardware pixel format, this should be a reference to an
  46523. AVHWFramesContext describing input frames.
  46524. </p></dd>
  46525. </dl>
  46526. <p>For example:
  46527. </p><div class="example">
  46528. <pre class="example-preformatted">buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
  46529. </pre></div>
  46530. <p>will instruct the source to accept video frames with size 320x240 and
  46531. with format &quot;yuv410p&quot;, assuming 1/24 as the timestamps timebase and
  46532. square pixels (1:1 sample aspect ratio).
  46533. Since the pixel format with name &quot;yuv410p&quot; corresponds to the number 6
  46534. (check the enum AVPixelFormat definition in <samp class="file">libavutil/pixfmt.h</samp>),
  46535. this example corresponds to:
  46536. </p><div class="example">
  46537. <pre class="example-preformatted">buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
  46538. </pre></div>
  46539. <p>Alternatively, the options can be specified as a flat string, but this
  46540. syntax is deprecated:
  46541. </p>
  46542. <p><var class="var">width</var>:<var class="var">height</var>:<var class="var">pix_fmt</var>:<var class="var">time_base.num</var>:<var class="var">time_base.den</var>:<var class="var">pixel_aspect.num</var>:<var class="var">pixel_aspect.den</var>
  46543. </p>
  46544. </div>
  46545. <div class="section-level-extent" id="cellauto">
  46546. <h3 class="section"><span>37.2 cellauto<a class="copiable-link" href="#cellauto"> &para;</a></span></h3>
  46547. <p>Create a pattern generated by an elementary cellular automaton.
  46548. </p>
  46549. <p>The initial state of the cellular automaton can be defined through the
  46550. <samp class="option">filename</samp> and <samp class="option">pattern</samp> options. If such options are
  46551. not specified an initial state is created randomly.
  46552. </p>
  46553. <p>At each new frame a new row in the video is filled with the result of
  46554. the cellular automaton next generation. The behavior when the whole
  46555. frame is filled is defined by the <samp class="option">scroll</samp> option.
  46556. </p>
  46557. <p>This source accepts the following options:
  46558. </p>
  46559. <dl class="table">
  46560. <dt><samp class="option">filename, f</samp></dt>
  46561. <dd><p>Read the initial cellular automaton state, i.e. the starting row, from
  46562. the specified file.
  46563. In the file, each non-whitespace character is considered an alive
  46564. cell, a newline will terminate the row, and further characters in the
  46565. file will be ignored.
  46566. </p>
  46567. </dd>
  46568. <dt><samp class="option">pattern, p</samp></dt>
  46569. <dd><p>Read the initial cellular automaton state, i.e. the starting row, from
  46570. the specified string.
  46571. </p>
  46572. <p>Each non-whitespace character in the string is considered an alive
  46573. cell, a newline will terminate the row, and further characters in the
  46574. string will be ignored.
  46575. </p>
  46576. </dd>
  46577. <dt><samp class="option">rate, r</samp></dt>
  46578. <dd><p>Set the video rate, that is the number of frames generated per second.
  46579. Default is 25.
  46580. </p>
  46581. </dd>
  46582. <dt><samp class="option">random_fill_ratio, ratio</samp></dt>
  46583. <dd><p>Set the random fill ratio for the initial cellular automaton row. It
  46584. is a floating point number value ranging from 0 to 1, defaults to
  46585. 1/PHI.
  46586. </p>
  46587. <p>This option is ignored when a file or a pattern is specified.
  46588. </p>
  46589. </dd>
  46590. <dt><samp class="option">random_seed, seed</samp></dt>
  46591. <dd><p>Set the seed for filling randomly the initial row, must be an integer
  46592. included between 0 and UINT32_MAX. If not specified, or if explicitly
  46593. set to -1, the filter will try to use a good random seed on a best
  46594. effort basis.
  46595. </p>
  46596. </dd>
  46597. <dt><samp class="option">rule</samp></dt>
  46598. <dd><p>Set the cellular automaton rule, it is a number ranging from 0 to 255.
  46599. Default value is 110.
  46600. </p>
  46601. </dd>
  46602. <dt><samp class="option">size, s</samp></dt>
  46603. <dd><p>Set the size of the output video. For the syntax of this option, check the
  46604. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  46605. </p>
  46606. <p>If <samp class="option">filename</samp> or <samp class="option">pattern</samp> is specified, the size is set
  46607. by default to the width of the specified initial state row, and the
  46608. height is set to <var class="var">width</var> * PHI.
  46609. </p>
  46610. <p>If <samp class="option">size</samp> is set, it must contain the width of the specified
  46611. pattern string, and the specified pattern will be centered in the
  46612. larger row.
  46613. </p>
  46614. <p>If a filename or a pattern string is not specified, the size value
  46615. defaults to &quot;320x518&quot; (used for a randomly generated initial state).
  46616. </p>
  46617. </dd>
  46618. <dt><samp class="option">scroll</samp></dt>
  46619. <dd><p>If set to 1, scroll the output upward when all the rows in the output
  46620. have been already filled. If set to 0, the new generated row will be
  46621. written over the top row just after the bottom row is filled.
  46622. Defaults to 1.
  46623. </p>
  46624. </dd>
  46625. <dt><samp class="option">start_full, full</samp></dt>
  46626. <dd><p>If set to 1, completely fill the output with generated rows before
  46627. outputting the first frame.
  46628. This is the default behavior, for disabling set the value to 0.
  46629. </p>
  46630. </dd>
  46631. <dt><samp class="option">stitch</samp></dt>
  46632. <dd><p>If set to 1, stitch the left and right row edges together.
  46633. This is the default behavior, for disabling set the value to 0.
  46634. </p></dd>
  46635. </dl>
  46636. <ul class="mini-toc">
  46637. <li><a href="#Examples-166" accesskey="1">Examples</a></li>
  46638. </ul>
  46639. <div class="subsection-level-extent" id="Examples-166">
  46640. <h4 class="subsection"><span>37.2.1 Examples<a class="copiable-link" href="#Examples-166"> &para;</a></span></h4>
  46641. <ul class="itemize mark-bullet">
  46642. <li>Read the initial state from <samp class="file">pattern</samp>, and specify an output of
  46643. size 200x400.
  46644. <div class="example">
  46645. <pre class="example-preformatted">cellauto=f=pattern:s=200x400
  46646. </pre></div>
  46647. </li><li>Generate a random initial row with a width of 200 cells, with a fill
  46648. ratio of 2/3:
  46649. <div class="example">
  46650. <pre class="example-preformatted">cellauto=ratio=2/3:s=200x200
  46651. </pre></div>
  46652. </li><li>Create a pattern generated by rule 18 starting by a single alive cell
  46653. centered on an initial row with width 100:
  46654. <div class="example">
  46655. <pre class="example-preformatted">cellauto=p=@:s=100x400:full=0:rule=18
  46656. </pre></div>
  46657. </li><li>Specify a more elaborated initial pattern:
  46658. <div class="example">
  46659. <pre class="example-preformatted">cellauto=p='@@ @ @@':s=100x400:full=0:rule=18
  46660. </pre></div>
  46661. </li></ul>
  46662. <a class="anchor" id="coreimagesrc"></a></div>
  46663. </div>
  46664. <div class="section-level-extent" id="coreimagesrc-1">
  46665. <h3 class="section"><span>37.3 coreimagesrc<a class="copiable-link" href="#coreimagesrc-1"> &para;</a></span></h3>
  46666. <p>Video source generated on GPU using Apple&rsquo;s CoreImage API on OSX.
  46667. </p>
  46668. <p>This video source is a specialized version of the <a class="ref" href="#coreimage">coreimage</a> video filter.
  46669. Use a core image generator at the beginning of the applied filterchain to
  46670. generate the content.
  46671. </p>
  46672. <p>The coreimagesrc video source accepts the following options:
  46673. </p><dl class="table">
  46674. <dt><samp class="option">list_generators</samp></dt>
  46675. <dd><p>List all available generators along with all their respective options as well as
  46676. possible minimum and maximum values along with the default values.
  46677. </p><div class="example">
  46678. <pre class="example-preformatted">list_generators=true
  46679. </pre></div>
  46680. </dd>
  46681. <dt><samp class="option">size, s</samp></dt>
  46682. <dd><p>Specify the size of the sourced video. For the syntax of this option, check the
  46683. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  46684. The default value is <code class="code">320x240</code>.
  46685. </p>
  46686. </dd>
  46687. <dt><samp class="option">rate, r</samp></dt>
  46688. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  46689. generated per second. It has to be a string in the format
  46690. <var class="var">frame_rate_num</var>/<var class="var">frame_rate_den</var>, an integer number, a floating point
  46691. number or a valid video frame rate abbreviation. The default value is
  46692. &quot;25&quot;.
  46693. </p>
  46694. </dd>
  46695. <dt><samp class="option">sar</samp></dt>
  46696. <dd><p>Set the sample aspect ratio of the sourced video.
  46697. </p>
  46698. </dd>
  46699. <dt><samp class="option">duration, d</samp></dt>
  46700. <dd><p>Set the duration of the sourced video. See
  46701. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  46702. for the accepted syntax.
  46703. </p>
  46704. <p>If not specified, or the expressed duration is negative, the video is
  46705. supposed to be generated forever.
  46706. </p></dd>
  46707. </dl>
  46708. <p>Additionally, all options of the <a class="ref" href="#coreimage">coreimage</a> video filter are accepted.
  46709. A complete filterchain can be used for further processing of the
  46710. generated input without CPU-HOST transfer. See <a class="ref" href="#coreimage">coreimage</a> documentation
  46711. and examples for details.
  46712. </p>
  46713. <ul class="mini-toc">
  46714. <li><a href="#Examples-167" accesskey="1">Examples</a></li>
  46715. </ul>
  46716. <div class="subsection-level-extent" id="Examples-167">
  46717. <h4 class="subsection"><span>37.3.1 Examples<a class="copiable-link" href="#Examples-167"> &para;</a></span></h4>
  46718. <ul class="itemize mark-bullet">
  46719. <li>Use CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
  46720. given as complete and escaped command-line for Apple&rsquo;s standard bash shell:
  46721. <div class="example">
  46722. <pre class="example-preformatted">ffmpeg -f lavfi -i coreimagesrc=s=100x100:filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
  46723. </pre></div>
  46724. <p>This example is equivalent to the QRCode example of <a class="ref" href="#coreimage">coreimage</a> without the
  46725. need for a nullsrc video source.
  46726. </p></li></ul>
  46727. </div>
  46728. </div>
  46729. <div class="section-level-extent" id="ddagrab">
  46730. <h3 class="section"><span>37.4 ddagrab<a class="copiable-link" href="#ddagrab"> &para;</a></span></h3>
  46731. <p>Captures the Windows Desktop via Desktop Duplication API.
  46732. </p>
  46733. <p>The filter exclusively returns D3D11 Hardware Frames, for on-gpu encoding
  46734. or processing. So an explicit <a class="ref" href="#hwdownload">hwdownload</a> is needed for any kind of
  46735. software processing.
  46736. </p>
  46737. <p>It accepts the following options:
  46738. </p>
  46739. <dl class="table">
  46740. <dt><samp class="option">output_idx</samp></dt>
  46741. <dd><p>DXGI Output Index to capture.
  46742. </p>
  46743. <p>Usually corresponds to the index Windows has given the screen minus one,
  46744. so it&rsquo;s starting at 0.
  46745. </p>
  46746. <p>Defaults to output 0.
  46747. </p>
  46748. </dd>
  46749. <dt><samp class="option">draw_mouse</samp></dt>
  46750. <dd><p>Whether to draw the mouse cursor.
  46751. </p>
  46752. <p>Defaults to true.
  46753. </p>
  46754. <p>Only affects hardware cursors. If a game or application renders its own cursor,
  46755. it&rsquo;ll always be captured.
  46756. </p>
  46757. </dd>
  46758. <dt><samp class="option">framerate</samp></dt>
  46759. <dd><p>Maximum framerate at which the desktop will be captured - the interval between
  46760. successive frames will not be smaller than the inverse of the framerate. When
  46761. <var class="var">dup_frames</var> is true (the default) and the desktop is not being updated
  46762. often enough, the filter will duplicate a previous frame. Note that there is no
  46763. background buffering going on, so when the filter is not polled often enough
  46764. then the actual inter-frame interval may be significantly larger.
  46765. </p>
  46766. <p>Defaults to 30 FPS.
  46767. </p>
  46768. </dd>
  46769. <dt><samp class="option">video_size</samp></dt>
  46770. <dd><p>Specify the size of the captured video.
  46771. </p>
  46772. <p>Defaults to the full size of the screen.
  46773. </p>
  46774. <p>Cropped from the bottom/right if smaller than screen size.
  46775. </p>
  46776. </dd>
  46777. <dt><samp class="option">offset_x</samp></dt>
  46778. <dd><p>Horizontal offset of the captured video.
  46779. </p>
  46780. </dd>
  46781. <dt><samp class="option">offset_y</samp></dt>
  46782. <dd><p>Vertical offset of the captured video.
  46783. </p>
  46784. </dd>
  46785. <dt><samp class="option">output_fmt</samp></dt>
  46786. <dd><p>Desired filter output format.
  46787. Defaults to 8 Bit BGRA.
  46788. </p>
  46789. <p>It accepts the following values:
  46790. </p><dl class="table">
  46791. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  46792. <dd><p>Passes all supported output formats to DDA and returns what DDA decides to use.
  46793. </p></dd>
  46794. <dt>&lsquo;<samp class="samp">8bit</samp>&rsquo;</dt>
  46795. <dt>&lsquo;<samp class="samp">bgra</samp>&rsquo;</dt>
  46796. <dd><p>8 Bit formats always work, and DDA will convert to them if necessary.
  46797. </p></dd>
  46798. <dt>&lsquo;<samp class="samp">10bit</samp>&rsquo;</dt>
  46799. <dt>&lsquo;<samp class="samp">x2bgr10</samp>&rsquo;</dt>
  46800. <dd><p>Filter initialization will fail if 10 bit format is requested but unavailable.
  46801. </p></dd>
  46802. </dl>
  46803. </dd>
  46804. <dt><samp class="option">dup_frames</samp></dt>
  46805. <dd><p>When this option is set to true (the default), the filter will duplicate frames
  46806. when the desktop has not been updated in order to maintain approximately
  46807. constant target framerate. When this option is set to false, the filter will
  46808. wait for the desktop to be updated (inter-frame intervals may vary significantly
  46809. in this case).
  46810. </p>
  46811. </dd>
  46812. </dl>
  46813. <ul class="mini-toc">
  46814. <li><a href="#Examples-168" accesskey="1">Examples</a></li>
  46815. </ul>
  46816. <div class="subsection-level-extent" id="Examples-168">
  46817. <h4 class="subsection"><span>37.4.1 Examples<a class="copiable-link" href="#Examples-168"> &para;</a></span></h4>
  46818. <p>Capture primary screen and encode using nvenc:
  46819. </p><div class="example">
  46820. <pre class="example-preformatted">ffmpeg -f lavfi -i ddagrab -c:v h264_nvenc -cq 18 output.mp4
  46821. </pre></div>
  46822. <p>You can also skip the lavfi device and directly use the filter.
  46823. Also demonstrates downloading the frame and encoding with libx264.
  46824. Explicit output format specification is required in this case:
  46825. </p><div class="example">
  46826. <pre class="example-preformatted">ffmpeg -filter_complex ddagrab=output_idx=1:framerate=60,hwdownload,format=bgra -c:v libx264 -crf 18 output.mp4
  46827. </pre></div>
  46828. <p>If you want to capture only a subsection of the desktop, this can be achieved
  46829. by specifying a smaller size and its offsets into the screen:
  46830. </p><div class="example">
  46831. <pre class="example-preformatted">ddagrab=video_size=800x600:offset_x=100:offset_y=100
  46832. </pre></div>
  46833. </div>
  46834. </div>
  46835. <div class="section-level-extent" id="gradients">
  46836. <h3 class="section"><span>37.5 gradients<a class="copiable-link" href="#gradients"> &para;</a></span></h3>
  46837. <p>Generate several gradients.
  46838. </p>
  46839. <dl class="table">
  46840. <dt><samp class="option">size, s</samp></dt>
  46841. <dd><p>Set frame size. For the syntax of this option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video
  46842. size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  46843. </p>
  46844. </dd>
  46845. <dt><samp class="option">rate, r</samp></dt>
  46846. <dd><p>Set frame rate, expressed as number of frames per second. Default
  46847. value is &quot;25&quot;.
  46848. </p>
  46849. </dd>
  46850. <dt><samp class="option">c0, c1, c2, c3, c4, c5, c6, c7</samp></dt>
  46851. <dd><p>Set 8 colors. Default values for colors is to pick random one.
  46852. </p>
  46853. </dd>
  46854. <dt><samp class="option">x0, y0, y0, y1</samp></dt>
  46855. <dd><p>Set gradient line source and destination points. If negative or out of range, random ones
  46856. are picked.
  46857. </p>
  46858. </dd>
  46859. <dt><samp class="option">nb_colors, n</samp></dt>
  46860. <dd><p>Set number of colors to use at once. Allowed range is from 2 to 8. Default value is 2.
  46861. </p>
  46862. </dd>
  46863. <dt><samp class="option">seed</samp></dt>
  46864. <dd><p>Set seed for picking gradient line points.
  46865. </p>
  46866. </dd>
  46867. <dt><samp class="option">duration, d</samp></dt>
  46868. <dd><p>Set the duration of the sourced video. See
  46869. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  46870. for the accepted syntax.
  46871. </p>
  46872. <p>If not specified, or the expressed duration is negative, the video is
  46873. supposed to be generated forever.
  46874. </p>
  46875. </dd>
  46876. <dt><samp class="option">speed</samp></dt>
  46877. <dd><p>Set speed of gradients rotation.
  46878. </p>
  46879. </dd>
  46880. <dt><samp class="option">type, t</samp></dt>
  46881. <dd><p>Set type of gradients.
  46882. Available values are:
  46883. </p><dl class="table">
  46884. <dt>&lsquo;<samp class="samp">linear</samp>&rsquo;</dt>
  46885. <dt>&lsquo;<samp class="samp">radial</samp>&rsquo;</dt>
  46886. <dt>&lsquo;<samp class="samp">circular</samp>&rsquo;</dt>
  46887. <dt>&lsquo;<samp class="samp">spiral</samp>&rsquo;</dt>
  46888. <dt>&lsquo;<samp class="samp">square</samp>&rsquo;</dt>
  46889. </dl>
  46890. <p>Default type is <var class="var">linear</var>.
  46891. </p></dd>
  46892. </dl>
  46893. <ul class="mini-toc">
  46894. <li><a href="#Commands-157" accesskey="1">Commands</a></li>
  46895. </ul>
  46896. <div class="subsection-level-extent" id="Commands-157">
  46897. <h4 class="subsection"><span>37.5.1 Commands<a class="copiable-link" href="#Commands-157"> &para;</a></span></h4>
  46898. <p>This source supports the some above options as <a class="ref" href="#commands">commands</a>.
  46899. </p>
  46900. </div>
  46901. </div>
  46902. <div class="section-level-extent" id="mandelbrot">
  46903. <h3 class="section"><span>37.6 mandelbrot<a class="copiable-link" href="#mandelbrot"> &para;</a></span></h3>
  46904. <p>Generate a Mandelbrot set fractal, and progressively zoom towards the
  46905. point specified with <var class="var">start_x</var> and <var class="var">start_y</var>.
  46906. </p>
  46907. <p>This source accepts the following options:
  46908. </p>
  46909. <dl class="table">
  46910. <dt><samp class="option">end_pts</samp></dt>
  46911. <dd><p>Set the terminal pts value. Default value is 400.
  46912. </p>
  46913. </dd>
  46914. <dt><samp class="option">end_scale</samp></dt>
  46915. <dd><p>Set the terminal scale value.
  46916. Must be a floating point value. Default value is 0.3.
  46917. </p>
  46918. </dd>
  46919. <dt><samp class="option">inner</samp></dt>
  46920. <dd><p>Set the inner coloring mode, that is the algorithm used to draw the
  46921. Mandelbrot fractal internal region.
  46922. </p>
  46923. <p>It shall assume one of the following values:
  46924. </p><dl class="table">
  46925. <dt><samp class="option">black</samp></dt>
  46926. <dd><p>Set black mode.
  46927. </p></dd>
  46928. <dt><samp class="option">convergence</samp></dt>
  46929. <dd><p>Show time until convergence.
  46930. </p></dd>
  46931. <dt><samp class="option">mincol</samp></dt>
  46932. <dd><p>Set color based on point closest to the origin of the iterations.
  46933. </p></dd>
  46934. <dt><samp class="option">period</samp></dt>
  46935. <dd><p>Set period mode.
  46936. </p></dd>
  46937. </dl>
  46938. <p>Default value is <var class="var">mincol</var>.
  46939. </p>
  46940. </dd>
  46941. <dt><samp class="option">bailout</samp></dt>
  46942. <dd><p>Set the bailout value. Default value is 10.0.
  46943. </p>
  46944. </dd>
  46945. <dt><samp class="option">maxiter</samp></dt>
  46946. <dd><p>Set the maximum of iterations performed by the rendering
  46947. algorithm. Default value is 7189.
  46948. </p>
  46949. </dd>
  46950. <dt><samp class="option">outer</samp></dt>
  46951. <dd><p>Set outer coloring mode.
  46952. It shall assume one of following values:
  46953. </p><dl class="table">
  46954. <dt><samp class="option">iteration_count</samp></dt>
  46955. <dd><p>Set iteration count mode.
  46956. </p></dd>
  46957. <dt><samp class="option">normalized_iteration_count</samp></dt>
  46958. <dd><p>set normalized iteration count mode.
  46959. </p></dd>
  46960. </dl>
  46961. <p>Default value is <var class="var">normalized_iteration_count</var>.
  46962. </p>
  46963. </dd>
  46964. <dt><samp class="option">rate, r</samp></dt>
  46965. <dd><p>Set frame rate, expressed as number of frames per second. Default
  46966. value is &quot;25&quot;.
  46967. </p>
  46968. </dd>
  46969. <dt><samp class="option">size, s</samp></dt>
  46970. <dd><p>Set frame size. For the syntax of this option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video
  46971. size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  46972. </p>
  46973. </dd>
  46974. <dt><samp class="option">start_scale</samp></dt>
  46975. <dd><p>Set the initial scale value. Default value is 3.0.
  46976. </p>
  46977. </dd>
  46978. <dt><samp class="option">start_x</samp></dt>
  46979. <dd><p>Set the initial x position. Must be a floating point value between
  46980. -100 and 100. Default value is -0.743643887037158704752191506114774.
  46981. </p>
  46982. </dd>
  46983. <dt><samp class="option">start_y</samp></dt>
  46984. <dd><p>Set the initial y position. Must be a floating point value between
  46985. -100 and 100. Default value is -0.131825904205311970493132056385139.
  46986. </p></dd>
  46987. </dl>
  46988. </div>
  46989. <div class="section-level-extent" id="mptestsrc">
  46990. <h3 class="section"><span>37.7 mptestsrc<a class="copiable-link" href="#mptestsrc"> &para;</a></span></h3>
  46991. <p>Generate various test patterns, as generated by the MPlayer test filter.
  46992. </p>
  46993. <p>The size of the generated video is fixed, and is 256x256.
  46994. This source is useful in particular for testing encoding features.
  46995. </p>
  46996. <p>This source accepts the following options:
  46997. </p>
  46998. <dl class="table">
  46999. <dt><samp class="option">rate, r</samp></dt>
  47000. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  47001. generated per second. It has to be a string in the format
  47002. <var class="var">frame_rate_num</var>/<var class="var">frame_rate_den</var>, an integer number, a floating point
  47003. number or a valid video frame rate abbreviation. The default value is
  47004. &quot;25&quot;.
  47005. </p>
  47006. </dd>
  47007. <dt><samp class="option">duration, d</samp></dt>
  47008. <dd><p>Set the duration of the sourced video. See
  47009. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  47010. for the accepted syntax.
  47011. </p>
  47012. <p>If not specified, or the expressed duration is negative, the video is
  47013. supposed to be generated forever.
  47014. </p>
  47015. </dd>
  47016. <dt><samp class="option">test, t</samp></dt>
  47017. <dd>
  47018. <p>Set the number or the name of the test to perform. Supported tests are:
  47019. </p><dl class="table">
  47020. <dt><samp class="option">dc_luma</samp></dt>
  47021. <dt><samp class="option">dc_chroma</samp></dt>
  47022. <dt><samp class="option">freq_luma</samp></dt>
  47023. <dt><samp class="option">freq_chroma</samp></dt>
  47024. <dt><samp class="option">amp_luma</samp></dt>
  47025. <dt><samp class="option">amp_chroma</samp></dt>
  47026. <dt><samp class="option">cbp</samp></dt>
  47027. <dt><samp class="option">mv</samp></dt>
  47028. <dt><samp class="option">ring1</samp></dt>
  47029. <dt><samp class="option">ring2</samp></dt>
  47030. <dt><samp class="option">all</samp></dt>
  47031. <dt><samp class="option">max_frames, m</samp></dt>
  47032. <dd><p>Set the maximum number of frames generated for each test, default value is 30.
  47033. </p>
  47034. </dd>
  47035. </dl>
  47036. <p>Default value is &quot;all&quot;, which will cycle through the list of all tests.
  47037. </p></dd>
  47038. </dl>
  47039. <p>Some examples:
  47040. </p><div class="example">
  47041. <pre class="example-preformatted">mptestsrc=t=dc_luma
  47042. </pre></div>
  47043. <p>will generate a &quot;dc_luma&quot; test pattern.
  47044. </p>
  47045. </div>
  47046. <div class="section-level-extent" id="frei0r_005fsrc">
  47047. <h3 class="section"><span>37.8 frei0r_src<a class="copiable-link" href="#frei0r_005fsrc"> &para;</a></span></h3>
  47048. <p>Provide a frei0r source.
  47049. </p>
  47050. <p>To enable compilation of this filter you need to install the frei0r
  47051. header and configure FFmpeg with <code class="code">--enable-frei0r</code>.
  47052. </p>
  47053. <p>This source accepts the following parameters:
  47054. </p>
  47055. <dl class="table">
  47056. <dt><samp class="option">size</samp></dt>
  47057. <dd><p>The size of the video to generate. For the syntax of this option, check the
  47058. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  47059. </p>
  47060. </dd>
  47061. <dt><samp class="option">framerate</samp></dt>
  47062. <dd><p>The framerate of the generated video. It may be a string of the form
  47063. <var class="var">num</var>/<var class="var">den</var> or a frame rate abbreviation.
  47064. </p>
  47065. </dd>
  47066. <dt><samp class="option">filter_name</samp></dt>
  47067. <dd><p>The name to the frei0r source to load. For more information regarding frei0r and
  47068. how to set the parameters, read the <a class="ref" href="#frei0r">frei0r</a> section in the video filters
  47069. documentation.
  47070. </p>
  47071. </dd>
  47072. <dt><samp class="option">filter_params</samp></dt>
  47073. <dd><p>A &rsquo;|&rsquo;-separated list of parameters to pass to the frei0r source.
  47074. </p>
  47075. </dd>
  47076. </dl>
  47077. <p>For example, to generate a frei0r partik0l source with size 200x200
  47078. and frame rate 10 which is overlaid on the overlay filter main input:
  47079. </p><div class="example">
  47080. <pre class="example-preformatted">frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
  47081. </pre></div>
  47082. </div>
  47083. <div class="section-level-extent" id="life">
  47084. <h3 class="section"><span>37.9 life<a class="copiable-link" href="#life"> &para;</a></span></h3>
  47085. <p>Generate a life pattern.
  47086. </p>
  47087. <p>This source is based on a generalization of John Conway&rsquo;s life game.
  47088. </p>
  47089. <p>The sourced input represents a life grid, each pixel represents a cell
  47090. which can be in one of two possible states, alive or dead. Every cell
  47091. interacts with its eight neighbours, which are the cells that are
  47092. horizontally, vertically, or diagonally adjacent.
  47093. </p>
  47094. <p>At each interaction the grid evolves according to the adopted rule,
  47095. which specifies the number of neighbor alive cells which will make a
  47096. cell stay alive or born. The <samp class="option">rule</samp> option allows one to specify
  47097. the rule to adopt.
  47098. </p>
  47099. <p>This source accepts the following options:
  47100. </p>
  47101. <dl class="table">
  47102. <dt><samp class="option">filename, f</samp></dt>
  47103. <dd><p>Set the file from which to read the initial grid state. In the file,
  47104. each non-whitespace character is considered an alive cell, and newline
  47105. is used to delimit the end of each row.
  47106. </p>
  47107. <p>If this option is not specified, the initial grid is generated
  47108. randomly.
  47109. </p>
  47110. </dd>
  47111. <dt><samp class="option">rate, r</samp></dt>
  47112. <dd><p>Set the video rate, that is the number of frames generated per second.
  47113. Default is 25.
  47114. </p>
  47115. </dd>
  47116. <dt><samp class="option">random_fill_ratio, ratio</samp></dt>
  47117. <dd><p>Set the random fill ratio for the initial random grid. It is a
  47118. floating point number value ranging from 0 to 1, defaults to 1/PHI.
  47119. It is ignored when a file is specified.
  47120. </p>
  47121. </dd>
  47122. <dt><samp class="option">random_seed, seed</samp></dt>
  47123. <dd><p>Set the seed for filling the initial random grid, must be an integer
  47124. included between 0 and UINT32_MAX. If not specified, or if explicitly
  47125. set to -1, the filter will try to use a good random seed on a best
  47126. effort basis.
  47127. </p>
  47128. </dd>
  47129. <dt><samp class="option">rule</samp></dt>
  47130. <dd><p>Set the life rule.
  47131. </p>
  47132. <p>A rule can be specified with a code of the kind &quot;S<var class="var">NS</var>/B<var class="var">NB</var>&quot;,
  47133. where <var class="var">NS</var> and <var class="var">NB</var> are sequences of numbers in the range 0-8,
  47134. <var class="var">NS</var> specifies the number of alive neighbor cells which make a
  47135. live cell stay alive, and <var class="var">NB</var> the number of alive neighbor cells
  47136. which make a dead cell to become alive (i.e. to &quot;born&quot;).
  47137. &quot;s&quot; and &quot;b&quot; can be used in place of &quot;S&quot; and &quot;B&quot;, respectively.
  47138. </p>
  47139. <p>Alternatively a rule can be specified by an 18-bits integer. The 9
  47140. high order bits are used to encode the next cell state if it is alive
  47141. for each number of neighbor alive cells, the low order bits specify
  47142. the rule for &quot;borning&quot; new cells. Higher order bits encode for an
  47143. higher number of neighbor cells.
  47144. For example the number 6153 = <code class="code">(12&lt;&lt;9)+9</code> specifies a stay alive
  47145. rule of 12 and a born rule of 9, which corresponds to &quot;S23/B03&quot;.
  47146. </p>
  47147. <p>Default value is &quot;S23/B3&quot;, which is the original Conway&rsquo;s game of life
  47148. rule, and will keep a cell alive if it has 2 or 3 neighbor alive
  47149. cells, and will born a new cell if there are three alive cells around
  47150. a dead cell.
  47151. </p>
  47152. </dd>
  47153. <dt><samp class="option">size, s</samp></dt>
  47154. <dd><p>Set the size of the output video. For the syntax of this option, check the
  47155. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  47156. </p>
  47157. <p>If <samp class="option">filename</samp> is specified, the size is set by default to the
  47158. same size of the input file. If <samp class="option">size</samp> is set, it must contain
  47159. the size specified in the input file, and the initial grid defined in
  47160. that file is centered in the larger resulting area.
  47161. </p>
  47162. <p>If a filename is not specified, the size value defaults to &quot;320x240&quot;
  47163. (used for a randomly generated initial grid).
  47164. </p>
  47165. </dd>
  47166. <dt><samp class="option">stitch</samp></dt>
  47167. <dd><p>If set to 1, stitch the left and right grid edges together, and the
  47168. top and bottom edges also. Defaults to 1.
  47169. </p>
  47170. </dd>
  47171. <dt><samp class="option">mold</samp></dt>
  47172. <dd><p>Set cell mold speed. If set, a dead cell will go from <samp class="option">death_color</samp> to
  47173. <samp class="option">mold_color</samp> with a step of <samp class="option">mold</samp>. <samp class="option">mold</samp> can have a
  47174. value from 0 to 255.
  47175. </p>
  47176. </dd>
  47177. <dt><samp class="option">life_color</samp></dt>
  47178. <dd><p>Set the color of living (or new born) cells.
  47179. </p>
  47180. </dd>
  47181. <dt><samp class="option">death_color</samp></dt>
  47182. <dd><p>Set the color of dead cells. If <samp class="option">mold</samp> is set, this is the first color
  47183. used to represent a dead cell.
  47184. </p>
  47185. </dd>
  47186. <dt><samp class="option">mold_color</samp></dt>
  47187. <dd><p>Set mold color, for definitely dead and moldy cells.
  47188. </p>
  47189. <p>For the syntax of these 3 color options, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the
  47190. ffmpeg-utils manual</a>.
  47191. </p></dd>
  47192. </dl>
  47193. <ul class="mini-toc">
  47194. <li><a href="#Examples-169" accesskey="1">Examples</a></li>
  47195. </ul>
  47196. <div class="subsection-level-extent" id="Examples-169">
  47197. <h4 class="subsection"><span>37.9.1 Examples<a class="copiable-link" href="#Examples-169"> &para;</a></span></h4>
  47198. <ul class="itemize mark-bullet">
  47199. <li>Read a grid from <samp class="file">pattern</samp>, and center it on a grid of size
  47200. 300x300 pixels:
  47201. <div class="example">
  47202. <pre class="example-preformatted">life=f=pattern:s=300x300
  47203. </pre></div>
  47204. </li><li>Generate a random grid of size 200x200, with a fill ratio of 2/3:
  47205. <div class="example">
  47206. <pre class="example-preformatted">life=ratio=2/3:s=200x200
  47207. </pre></div>
  47208. </li><li>Specify a custom rule for evolving a randomly generated grid:
  47209. <div class="example">
  47210. <pre class="example-preformatted">life=rule=S14/B34
  47211. </pre></div>
  47212. </li><li>Full example with slow death effect (mold) using <code class="command">ffplay</code>:
  47213. <div class="example">
  47214. <pre class="example-preformatted">ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16
  47215. </pre></div>
  47216. </li></ul>
  47217. </div>
  47218. </div>
  47219. <div class="section-level-extent" id="qrencodesrc">
  47220. <h3 class="section"><span>37.10 qrencodesrc<a class="copiable-link" href="#qrencodesrc"> &para;</a></span></h3>
  47221. <p>Generate a QR code using the libqrencode library (see
  47222. <a class="url" href="https://fukuchi.org/works/qrencode/">https://fukuchi.org/works/qrencode/</a>).
  47223. </p>
  47224. <p>To enable the compilation of this source, you need to configure FFmpeg with
  47225. <code class="code">--enable-libqrencode</code>.
  47226. </p>
  47227. <p>The QR code is generated from the provided text or text pattern. The
  47228. corresponding QR code is scaled and put in the video output according to the
  47229. specified output size options.
  47230. </p>
  47231. <p>In case no text is specified, the QR code is not generated, but an empty colored
  47232. output is returned instead.
  47233. </p>
  47234. <p>This source accepts the following options:
  47235. </p>
  47236. <dl class="table">
  47237. <dt><samp class="option">qrcode_width, q</samp></dt>
  47238. <dt><samp class="option">padded_qrcode_width, Q</samp></dt>
  47239. <dd><p>Specify an expression for the width of the rendered QR code, with and without
  47240. padding. The <var class="var">qrcode_width</var> expression can reference the value set by the
  47241. <var class="var">padded_qrcode_width</var> expression, and vice versa.
  47242. By default <var class="var">padded_qrcode_width</var> is set to <var class="var">qrcode_width</var>, meaning that
  47243. there is no padding.
  47244. </p>
  47245. <p>These expressions are evaluated only once, when initializing the source.
  47246. See the <a class="ref" href="#qrencode_005fexpressions">qrencode Expressions</a> section for details.
  47247. </p>
  47248. <p>Note that some of the constants are missing for the source (for example the
  47249. <var class="var">x</var> or <var class="var">t</var> or ¸<var class="var">n</var>), since they only makes sense when evaluating the
  47250. expression for each frame rather than at initialization time.
  47251. </p>
  47252. </dd>
  47253. <dt><samp class="option">rate, r</samp></dt>
  47254. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  47255. generated per second. It has to be a string in the format
  47256. <var class="var">frame_rate_num</var>/<var class="var">frame_rate_den</var>, an integer number, a floating point
  47257. number or a valid video frame rate abbreviation. The default value is
  47258. &quot;25&quot;.
  47259. </p>
  47260. </dd>
  47261. <dt><samp class="option">case_sensitive, cs</samp></dt>
  47262. <dd><p>Instruct libqrencode to use case sensitive encoding. This is enabled by
  47263. default. This can be disabled to reduce the QR encoding size.
  47264. </p>
  47265. </dd>
  47266. <dt><samp class="option">level, l</samp></dt>
  47267. <dd><p>Specify the QR encoding error correction level. With an higher correction level,
  47268. the encoding size will increase but the code will be more robust to corruption.
  47269. Lower level is <var class="var">L</var>.
  47270. </p>
  47271. <p>It accepts the following values:
  47272. </p><dl class="table">
  47273. <dt>&lsquo;<samp class="samp">L</samp>&rsquo;</dt>
  47274. <dt>&lsquo;<samp class="samp">M</samp>&rsquo;</dt>
  47275. <dt>&lsquo;<samp class="samp">Q</samp>&rsquo;</dt>
  47276. <dt>&lsquo;<samp class="samp">H</samp>&rsquo;</dt>
  47277. </dl>
  47278. </dd>
  47279. <dt><samp class="option">expansion</samp></dt>
  47280. <dd><p>Select how the input text is expanded. Can be either <code class="code">none</code>, or
  47281. <code class="code">normal</code> (default). See the <a class="ref" href="#qrencode_005ftext_005fexpansion">qrencode Text expansion</a>
  47282. section for details.
  47283. </p>
  47284. </dd>
  47285. <dt><samp class="option">text</samp></dt>
  47286. <dt><samp class="option">textfile</samp></dt>
  47287. <dd><p>Define the text to be rendered. In case neither is specified, no QR is encoded
  47288. (just an empty colored frame).
  47289. </p>
  47290. <p>In case expansion is enabled, the text is treated as a text template, using the
  47291. qrencode expansion mechanism. See the <a class="ref" href="#qrencode_005ftext_005fexpansion">qrencode
  47292. Text expansion</a> section for details.
  47293. </p>
  47294. </dd>
  47295. <dt><samp class="option">background_color, bc</samp></dt>
  47296. <dt><samp class="option">foreground_color, fc</samp></dt>
  47297. <dd><p>Set the QR code and background color. The default value of
  47298. <var class="var">foreground_color</var> is &quot;black&quot;, the default value of <var class="var">background_color</var>
  47299. is &quot;white&quot;.
  47300. </p>
  47301. <p>For the syntax of the color options, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot;
  47302. section in the ffmpeg-utils manual</a>.
  47303. </p></dd>
  47304. </dl>
  47305. <ul class="mini-toc">
  47306. <li><a href="#Examples-170" accesskey="1">Examples</a></li>
  47307. </ul>
  47308. <div class="subsection-level-extent" id="Examples-170">
  47309. <h4 class="subsection"><span>37.10.1 Examples<a class="copiable-link" href="#Examples-170"> &para;</a></span></h4>
  47310. <ul class="itemize mark-bullet">
  47311. <li>Generate a QR code encoding the specified text with the default size:
  47312. <div class="example">
  47313. <pre class="example-preformatted">qrencodesrc=text=www.ffmpeg.org
  47314. </pre></div>
  47315. </li><li>Same as below, but select blue on pink colors:
  47316. <div class="example">
  47317. <pre class="example-preformatted">qrencodesrc=text=www.ffmpeg.org:bc=pink:fc=blue
  47318. </pre></div>
  47319. </li><li>Generate a QR code with width of 200 pixels and padding, making the padded width
  47320. 4/3 of the QR code width:
  47321. <div class="example">
  47322. <pre class="example-preformatted">qrencodesrc=text=www.ffmpeg.org:q=200:Q=4/3*q
  47323. </pre></div>
  47324. </li><li>Generate a QR code with padded width of 200 pixels and padding, making the QR
  47325. code width 3/4 of the padded width:
  47326. <div class="example">
  47327. <pre class="example-preformatted">qrencodesrc=text=www.ffmpeg.org:Q=200:q=3/4*Q
  47328. </pre></div>
  47329. </li><li>Generate a QR code encoding the frame number:
  47330. <div class="example">
  47331. <pre class="example-preformatted">qrencodesrc=text=%{n}
  47332. </pre></div>
  47333. </li><li>Generate a QR code encoding the GMT timestamp:
  47334. <div class="example">
  47335. <pre class="example-preformatted">qrencodesrc=text=%{gmtime}
  47336. </pre></div>
  47337. </li><li>Generate a QR code encoding the timestamp expressed as a float:
  47338. <div class="example">
  47339. <pre class="example-preformatted">qrencodesrc=text=%{pts}
  47340. </pre></div>
  47341. </li></ul>
  47342. <a class="anchor" id="allrgb"></a><a class="anchor" id="allyuv"></a><a class="anchor" id="color"></a><a class="anchor" id="colorchart"></a><a class="anchor" id="colorspectrum"></a><a class="anchor" id="haldclutsrc"></a><a class="anchor" id="nullsrc"></a><a class="anchor" id="pal75bars"></a><a class="anchor" id="pal100bars"></a><a class="anchor" id="rgbtestsrc"></a><a class="anchor" id="smptebars"></a><a class="anchor" id="smptehdbars"></a><a class="anchor" id="testsrc"></a><a class="anchor" id="testsrc2"></a><a class="anchor" id="yuvtestsrc"></a></div>
  47343. </div>
  47344. <div class="section-level-extent" id="allrgb_002c-allyuv_002c-color_002c-colorchart_002c-colorspectrum_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc">
  47345. <h3 class="section"><span>37.11 allrgb, allyuv, color, colorchart, colorspectrum, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc<a class="copiable-link" href="#allrgb_002c-allyuv_002c-color_002c-colorchart_002c-colorspectrum_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc"> &para;</a></span></h3>
  47346. <p>The <code class="code">allrgb</code> source returns frames of size 4096x4096 of all rgb colors.
  47347. </p>
  47348. <p>The <code class="code">allyuv</code> source returns frames of size 4096x4096 of all yuv colors.
  47349. </p>
  47350. <p>The <code class="code">color</code> source provides an uniformly colored input.
  47351. </p>
  47352. <p>The <code class="code">colorchart</code> source provides a colors checker chart.
  47353. </p>
  47354. <p>The <code class="code">colorspectrum</code> source provides a color spectrum input.
  47355. </p>
  47356. <p>The <code class="code">haldclutsrc</code> source provides an identity Hald CLUT. See also
  47357. <a class="ref" href="#haldclut">haldclut</a> filter.
  47358. </p>
  47359. <p>The <code class="code">nullsrc</code> source returns unprocessed video frames. It is
  47360. mainly useful to be employed in analysis / debugging tools, or as the
  47361. source for filters which ignore the input data.
  47362. </p>
  47363. <p>The <code class="code">pal75bars</code> source generates a color bars pattern, based on
  47364. EBU PAL recommendations with 75% color levels.
  47365. </p>
  47366. <p>The <code class="code">pal100bars</code> source generates a color bars pattern, based on
  47367. EBU PAL recommendations with 100% color levels.
  47368. </p>
  47369. <p>The <code class="code">rgbtestsrc</code> source generates an RGB test pattern useful for
  47370. detecting RGB vs BGR issues. You should see a red, green and blue
  47371. stripe from top to bottom.
  47372. </p>
  47373. <p>The <code class="code">smptebars</code> source generates a color bars pattern, based on
  47374. the SMPTE Engineering Guideline EG 1-1990.
  47375. </p>
  47376. <p>The <code class="code">smptehdbars</code> source generates a color bars pattern, based on
  47377. the SMPTE RP 219-2002.
  47378. </p>
  47379. <p>The <code class="code">testsrc</code> source generates a test video pattern, showing a
  47380. color pattern, a scrolling gradient and a timestamp. This is mainly
  47381. intended for testing purposes.
  47382. </p>
  47383. <p>The <code class="code">testsrc2</code> source is similar to testsrc, but supports more
  47384. pixel formats instead of just <code class="code">rgb24</code>. This allows using it as an
  47385. input for other tests without requiring a format conversion.
  47386. </p>
  47387. <p>The <code class="code">yuvtestsrc</code> source generates an YUV test pattern. You should
  47388. see a y, cb and cr stripe from top to bottom.
  47389. </p>
  47390. <p>The sources accept the following parameters:
  47391. </p>
  47392. <dl class="table">
  47393. <dt><samp class="option">level</samp></dt>
  47394. <dd><p>Specify the level of the Hald CLUT, only available in the <code class="code">haldclutsrc</code>
  47395. source. A level of <code class="code">N</code> generates a picture of <code class="code">N*N*N</code> by <code class="code">N*N*N</code>
  47396. pixels to be used as identity matrix for 3D lookup tables. Each component is
  47397. coded on a <code class="code">1/(N*N)</code> scale.
  47398. </p>
  47399. </dd>
  47400. <dt><samp class="option">color, c</samp></dt>
  47401. <dd><p>Specify the color of the source, only available in the <code class="code">color</code>
  47402. source. For the syntax of this option, check the
  47403. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#color-syntax">&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  47404. </p>
  47405. </dd>
  47406. <dt><samp class="option">size, s</samp></dt>
  47407. <dd><p>Specify the size of the sourced video. For the syntax of this option, check the
  47408. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  47409. The default value is <code class="code">320x240</code>.
  47410. </p>
  47411. <p>This option is not available with the <code class="code">allrgb</code>, <code class="code">allyuv</code>, and
  47412. <code class="code">haldclutsrc</code> filters.
  47413. </p>
  47414. </dd>
  47415. <dt><samp class="option">rate, r</samp></dt>
  47416. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  47417. generated per second. It has to be a string in the format
  47418. <var class="var">frame_rate_num</var>/<var class="var">frame_rate_den</var>, an integer number, a floating point
  47419. number or a valid video frame rate abbreviation. The default value is
  47420. &quot;25&quot;.
  47421. </p>
  47422. </dd>
  47423. <dt><samp class="option">duration, d</samp></dt>
  47424. <dd><p>Set the duration of the sourced video. See
  47425. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  47426. for the accepted syntax.
  47427. </p>
  47428. <p>If not specified, or the expressed duration is negative, the video is
  47429. supposed to be generated forever.
  47430. </p>
  47431. <p>Since the frame rate is used as time base, all frames including the last one
  47432. will have their full duration. If the specified duration is not a multiple
  47433. of the frame duration, it will be rounded up.
  47434. </p>
  47435. </dd>
  47436. <dt><samp class="option">sar</samp></dt>
  47437. <dd><p>Set the sample aspect ratio of the sourced video.
  47438. </p>
  47439. </dd>
  47440. <dt><samp class="option">alpha</samp></dt>
  47441. <dd><p>Specify the alpha (opacity) of the background, only available in the
  47442. <code class="code">testsrc2</code> source. The value must be between 0 (fully transparent) and
  47443. 255 (fully opaque, the default).
  47444. </p>
  47445. </dd>
  47446. <dt><samp class="option">decimals, n</samp></dt>
  47447. <dd><p>Set the number of decimals to show in the timestamp, only available in the
  47448. <code class="code">testsrc</code> source.
  47449. </p>
  47450. <p>The displayed timestamp value will correspond to the original
  47451. timestamp value multiplied by the power of 10 of the specified
  47452. value. Default value is 0.
  47453. </p>
  47454. </dd>
  47455. <dt><samp class="option">type</samp></dt>
  47456. <dd><p>Set the type of the color spectrum, only available in the
  47457. <code class="code">colorspectrum</code> source. Can be one of the following:
  47458. </p>
  47459. <dl class="table">
  47460. <dt>&lsquo;<samp class="samp">black</samp>&rsquo;</dt>
  47461. <dt>&lsquo;<samp class="samp">white</samp>&rsquo;</dt>
  47462. <dt>&lsquo;<samp class="samp">all</samp>&rsquo;</dt>
  47463. </dl>
  47464. </dd>
  47465. <dt><samp class="option">patch_size</samp></dt>
  47466. <dd><p>Set patch size of single color patch, only available in the
  47467. <code class="code">colorchart</code> source. Default is <code class="code">64x64</code>.
  47468. </p>
  47469. </dd>
  47470. <dt><samp class="option">preset</samp></dt>
  47471. <dd><p>Set colorchecker colors preset, only available in the
  47472. <code class="code">colorchart</code> source.
  47473. </p>
  47474. <p>Available values are:
  47475. </p><dl class="table">
  47476. <dt>&lsquo;<samp class="samp">reference</samp>&rsquo;</dt>
  47477. <dt>&lsquo;<samp class="samp">skintones</samp>&rsquo;</dt>
  47478. </dl>
  47479. <p>Default value is <code class="code">reference</code>.
  47480. </p></dd>
  47481. </dl>
  47482. <ul class="mini-toc">
  47483. <li><a href="#Examples-171" accesskey="1">Examples</a></li>
  47484. <li><a href="#Commands-158" accesskey="2">Commands</a></li>
  47485. </ul>
  47486. <div class="subsection-level-extent" id="Examples-171">
  47487. <h4 class="subsection"><span>37.11.1 Examples<a class="copiable-link" href="#Examples-171"> &para;</a></span></h4>
  47488. <ul class="itemize mark-bullet">
  47489. <li>Generate a video with a duration of 5.3 seconds, with size
  47490. 176x144 and a frame rate of 10 frames per second:
  47491. <div class="example">
  47492. <pre class="example-preformatted">testsrc=duration=5.3:size=qcif:rate=10
  47493. </pre></div>
  47494. </li><li>The following graph description will generate a red source
  47495. with an opacity of 0.2, with size &quot;qcif&quot; and a frame rate of 10
  47496. frames per second:
  47497. <div class="example">
  47498. <pre class="example-preformatted">color=c=red@0.2:s=qcif:r=10
  47499. </pre></div>
  47500. </li><li>If the input content is to be ignored, <code class="code">nullsrc</code> can be used. The
  47501. following command generates noise in the luma plane by employing
  47502. the <code class="code">geq</code> filter:
  47503. <div class="example">
  47504. <pre class="example-preformatted">nullsrc=s=256x256, geq=random(1)*255:128:128
  47505. </pre></div>
  47506. </li></ul>
  47507. </div>
  47508. <div class="subsection-level-extent" id="Commands-158">
  47509. <h4 class="subsection"><span>37.11.2 Commands<a class="copiable-link" href="#Commands-158"> &para;</a></span></h4>
  47510. <p>The <code class="code">color</code> source supports the following commands:
  47511. </p>
  47512. <dl class="table">
  47513. <dt><samp class="option">c, color</samp></dt>
  47514. <dd><p>Set the color of the created image. Accepts the same syntax of the
  47515. corresponding <samp class="option">color</samp> option.
  47516. </p></dd>
  47517. </dl>
  47518. </div>
  47519. </div>
  47520. <div class="section-level-extent" id="openclsrc">
  47521. <h3 class="section"><span>37.12 openclsrc<a class="copiable-link" href="#openclsrc"> &para;</a></span></h3>
  47522. <p>Generate video using an OpenCL program.
  47523. </p>
  47524. <dl class="table">
  47525. <dt><samp class="option">source</samp></dt>
  47526. <dd><p>OpenCL program source file.
  47527. </p>
  47528. </dd>
  47529. <dt><samp class="option">kernel</samp></dt>
  47530. <dd><p>Kernel name in program.
  47531. </p>
  47532. </dd>
  47533. <dt><samp class="option">size, s</samp></dt>
  47534. <dd><p>Size of frames to generate. This must be set.
  47535. </p>
  47536. </dd>
  47537. <dt><samp class="option">format</samp></dt>
  47538. <dd><p>Pixel format to use for the generated frames. This must be set.
  47539. </p>
  47540. </dd>
  47541. <dt><samp class="option">rate, r</samp></dt>
  47542. <dd><p>Number of frames generated every second. Default value is &rsquo;25&rsquo;.
  47543. </p>
  47544. </dd>
  47545. </dl>
  47546. <p>For details of how the program loading works, see the <a class="ref" href="#program_005fopencl">program_opencl</a>
  47547. filter.
  47548. </p>
  47549. <p>Example programs:
  47550. </p>
  47551. <ul class="itemize mark-bullet">
  47552. <li>Generate a colour ramp by setting pixel values from the position of the pixel
  47553. in the output image. (Note that this will work with all pixel formats, but
  47554. the generated output will not be the same.)
  47555. <pre class="verbatim">__kernel void ramp(__write_only image2d_t dst,
  47556. unsigned int index)
  47557. {
  47558. int2 loc = (int2)(get_global_id(0), get_global_id(1));
  47559. float4 val;
  47560. val.xy = val.zw = convert_float2(loc) / convert_float2(get_image_dim(dst));
  47561. write_imagef(dst, loc, val);
  47562. }
  47563. </pre>
  47564. </li><li>Generate a Sierpinski carpet pattern, panning by a single pixel each frame.
  47565. <pre class="verbatim">__kernel void sierpinski_carpet(__write_only image2d_t dst,
  47566. unsigned int index)
  47567. {
  47568. int2 loc = (int2)(get_global_id(0), get_global_id(1));
  47569. float4 value = 0.0f;
  47570. int x = loc.x + index;
  47571. int y = loc.y + index;
  47572. while (x &gt; 0 || y &gt; 0) {
  47573. if (x % 3 == 1 &amp;&amp; y % 3 == 1) {
  47574. value = 1.0f;
  47575. break;
  47576. }
  47577. x /= 3;
  47578. y /= 3;
  47579. }
  47580. write_imagef(dst, loc, value);
  47581. }
  47582. </pre>
  47583. </li></ul>
  47584. </div>
  47585. <div class="section-level-extent" id="sierpinski">
  47586. <h3 class="section"><span>37.13 sierpinski<a class="copiable-link" href="#sierpinski"> &para;</a></span></h3>
  47587. <p>Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
  47588. </p>
  47589. <p>This source accepts the following options:
  47590. </p>
  47591. <dl class="table">
  47592. <dt><samp class="option">size, s</samp></dt>
  47593. <dd><p>Set frame size. For the syntax of this option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video
  47594. size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  47595. </p>
  47596. </dd>
  47597. <dt><samp class="option">rate, r</samp></dt>
  47598. <dd><p>Set frame rate, expressed as number of frames per second. Default
  47599. value is &quot;25&quot;.
  47600. </p>
  47601. </dd>
  47602. <dt><samp class="option">seed</samp></dt>
  47603. <dd><p>Set seed which is used for random panning.
  47604. </p>
  47605. </dd>
  47606. <dt><samp class="option">jump</samp></dt>
  47607. <dd><p>Set max jump for single pan destination. Allowed range is from 1 to 10000.
  47608. </p>
  47609. </dd>
  47610. <dt><samp class="option">type</samp></dt>
  47611. <dd><p>Set fractal type, can be default <code class="code">carpet</code> or <code class="code">triangle</code>.
  47612. </p></dd>
  47613. </dl>
  47614. </div>
  47615. <div class="section-level-extent" id="zoneplate">
  47616. <h3 class="section"><span>37.14 zoneplate<a class="copiable-link" href="#zoneplate"> &para;</a></span></h3>
  47617. <p>Generate a zoneplate test video pattern.
  47618. </p>
  47619. <p>This source accepts the following options:
  47620. </p>
  47621. <dl class="table">
  47622. <dt><samp class="option">size, s</samp></dt>
  47623. <dd><p>Set frame size. For the syntax of this option, check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video
  47624. size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;320x240&quot;.
  47625. </p>
  47626. </dd>
  47627. <dt><samp class="option">rate, r</samp></dt>
  47628. <dd><p>Set frame rate, expressed as number of frames per second. Default
  47629. value is &quot;25&quot;.
  47630. </p>
  47631. </dd>
  47632. <dt><samp class="option">duration, d</samp></dt>
  47633. <dd><p>Set the duration of the sourced video. See
  47634. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#time-duration-syntax">the Time duration section in the ffmpeg-utils(1) manual</a>
  47635. for the accepted syntax.
  47636. </p>
  47637. <p>If not specified, or the expressed duration is negative, the video is
  47638. supposed to be generated forever.
  47639. </p>
  47640. </dd>
  47641. <dt><samp class="option">sar</samp></dt>
  47642. <dd><p>Set the sample aspect ratio of the sourced video.
  47643. </p>
  47644. </dd>
  47645. <dt><samp class="option">precision</samp></dt>
  47646. <dd><p>Set precision in bits for look-up table for sine calculations. Default value is 10.
  47647. Allowed range is from 4 to 16.
  47648. </p>
  47649. </dd>
  47650. <dt><samp class="option">xo</samp></dt>
  47651. <dd><p>Set horizontal axis offset for output signal. Default value is 0.
  47652. </p>
  47653. </dd>
  47654. <dt><samp class="option">yo</samp></dt>
  47655. <dd><p>Set vertical axis offset for output signal. Default value is 0.
  47656. </p>
  47657. </dd>
  47658. <dt><samp class="option">to</samp></dt>
  47659. <dd><p>Set time axis offset for output signal. Default value is 0.
  47660. </p>
  47661. </dd>
  47662. <dt><samp class="option">k0</samp></dt>
  47663. <dd><p>Set 0-order, constant added to signal phase. Default value is 0.
  47664. </p>
  47665. </dd>
  47666. <dt><samp class="option">kx</samp></dt>
  47667. <dd><p>Set 1-order, phase factor multiplier for horizontal axis. Default value is 0.
  47668. </p>
  47669. </dd>
  47670. <dt><samp class="option">ky</samp></dt>
  47671. <dd><p>Set 1-order, phase factor multiplier for vertical axis. Default value is 0.
  47672. </p>
  47673. </dd>
  47674. <dt><samp class="option">kt</samp></dt>
  47675. <dd><p>Set 1-order, phase factor multiplier for time axis. Default value is 0.
  47676. </p>
  47677. </dd>
  47678. <dt><samp class="option">kxt, kyt, kxy</samp></dt>
  47679. <dd><p>Set phase factor multipliers for combination of spatial and temporal axis.
  47680. Default value is 0.
  47681. </p>
  47682. </dd>
  47683. <dt><samp class="option">kx2</samp></dt>
  47684. <dd><p>Set 2-order, phase factor multiplier for horizontal axis. Default value is 0.
  47685. </p>
  47686. </dd>
  47687. <dt><samp class="option">ky2</samp></dt>
  47688. <dd><p>Set 2-order, phase factor multiplier for vertical axis. Default value is 0.
  47689. </p>
  47690. </dd>
  47691. <dt><samp class="option">kt2</samp></dt>
  47692. <dd><p>Set 2-order, phase factor multiplier for time axis. Default value is 0.
  47693. </p>
  47694. </dd>
  47695. <dt><samp class="option">ku</samp></dt>
  47696. <dd><p>Set the constant added to final phase to produce chroma-blue component of signal.
  47697. Default value is 0.
  47698. </p>
  47699. </dd>
  47700. <dt><samp class="option">kv</samp></dt>
  47701. <dd><p>Set the constant added to final phase to produce chroma-red component of signal.
  47702. Default value is 0.
  47703. </p></dd>
  47704. </dl>
  47705. <ul class="mini-toc">
  47706. <li><a href="#Commands-159" accesskey="1">Commands</a></li>
  47707. <li><a href="#Examples-172" accesskey="2">Examples</a></li>
  47708. </ul>
  47709. <div class="subsection-level-extent" id="Commands-159">
  47710. <h4 class="subsection"><span>37.14.1 Commands<a class="copiable-link" href="#Commands-159"> &para;</a></span></h4>
  47711. <p>This source supports the some above options as <a class="ref" href="#commands">commands</a>.
  47712. </p>
  47713. </div>
  47714. <div class="subsection-level-extent" id="Examples-172">
  47715. <h4 class="subsection"><span>37.14.2 Examples<a class="copiable-link" href="#Examples-172"> &para;</a></span></h4>
  47716. <ul class="itemize mark-bullet">
  47717. <li>Generate horizontal color sine sweep:
  47718. <div class="example">
  47719. <pre class="example-preformatted">zoneplate=ku=512:kv=0:kt2=0:kx2=256:s=wvga:xo=-426:kt=11
  47720. </pre></div>
  47721. </li><li>Generate vertical color sine sweep:
  47722. <div class="example">
  47723. <pre class="example-preformatted">zoneplate=ku=512:kv=0:kt2=0:ky2=156:s=wvga:yo=-240:kt=11
  47724. </pre></div>
  47725. </li><li>Generate circular zone-plate:
  47726. <div class="example">
  47727. <pre class="example-preformatted">zoneplate=ku=512:kv=100:kt2=0:ky2=256:kx2=556:s=wvga:yo=0:kt=11
  47728. </pre></div>
  47729. </li></ul>
  47730. </div>
  47731. </div>
  47732. </div>
  47733. <div class="chapter-level-extent" id="Video-Sinks">
  47734. <h2 class="chapter"><span>38 Video Sinks<a class="copiable-link" href="#Video-Sinks"> &para;</a></span></h2>
  47735. <p>Below is a description of the currently available video sinks.
  47736. </p>
  47737. <ul class="mini-toc">
  47738. <li><a href="#buffersink" accesskey="1">buffersink</a></li>
  47739. <li><a href="#nullsink" accesskey="2">nullsink</a></li>
  47740. </ul>
  47741. <div class="section-level-extent" id="buffersink">
  47742. <h3 class="section"><span>38.1 buffersink<a class="copiable-link" href="#buffersink"> &para;</a></span></h3>
  47743. <p>Buffer video frames, and make them available to the end of the filter
  47744. graph.
  47745. </p>
  47746. <p>This sink is mainly intended for programmatic use, in particular
  47747. through the interface defined in <samp class="file">libavfilter/buffersink.h</samp>
  47748. or the options system.
  47749. </p>
  47750. <p>It accepts a pointer to an AVBufferSinkContext structure, which
  47751. defines the incoming buffers&rsquo; formats, to be passed as the opaque
  47752. parameter to <code class="code">avfilter_init_filter</code> for initialization.
  47753. </p>
  47754. </div>
  47755. <div class="section-level-extent" id="nullsink">
  47756. <h3 class="section"><span>38.2 nullsink<a class="copiable-link" href="#nullsink"> &para;</a></span></h3>
  47757. <p>Null video sink: do absolutely nothing with the input video. It is
  47758. mainly useful as a template and for use in analysis / debugging
  47759. tools.
  47760. </p>
  47761. </div>
  47762. </div>
  47763. <div class="chapter-level-extent" id="Multimedia-Filters">
  47764. <h2 class="chapter"><span>39 Multimedia Filters<a class="copiable-link" href="#Multimedia-Filters"> &para;</a></span></h2>
  47765. <p>Below is a description of the currently available multimedia filters.
  47766. </p>
  47767. <ul class="mini-toc">
  47768. <li><a href="#a3dscope" accesskey="1">a3dscope</a></li>
  47769. <li><a href="#abitscope" accesskey="2">abitscope</a></li>
  47770. <li><a href="#adrawgraph" accesskey="3">adrawgraph</a></li>
  47771. <li><a href="#agraphmonitor" accesskey="4">agraphmonitor</a></li>
  47772. <li><a href="#ahistogram" accesskey="5">ahistogram</a></li>
  47773. <li><a href="#aphasemeter" accesskey="6">aphasemeter</a></li>
  47774. <li><a href="#avectorscope" accesskey="7">avectorscope</a></li>
  47775. <li><a href="#bench_002c-abench" accesskey="8">bench, abench</a></li>
  47776. <li><a href="#concat-3" accesskey="9">concat</a></li>
  47777. <li><a href="#ebur128-1">ebur128</a></li>
  47778. <li><a href="#interleave_002c-ainterleave">interleave, ainterleave</a></li>
  47779. <li><a href="#latency_002c-alatency">latency, alatency</a></li>
  47780. <li><a href="#metadata_002c-ametadata">metadata, ametadata</a></li>
  47781. <li><a href="#perms_002c-aperms">perms, aperms</a></li>
  47782. <li><a href="#realtime_002c-arealtime">realtime, arealtime</a></li>
  47783. <li><a href="#segment_002c-asegment">segment, asegment</a></li>
  47784. <li><a href="#select_002c-aselect">select, aselect</a></li>
  47785. <li><a href="#sendcmd_002c-asendcmd">sendcmd, asendcmd</a></li>
  47786. <li><a href="#setpts_002c-asetpts">setpts, asetpts</a></li>
  47787. <li><a href="#setrange">setrange</a></li>
  47788. <li><a href="#settb_002c-asettb">settb, asettb</a></li>
  47789. <li><a href="#showcqt">showcqt</a></li>
  47790. <li><a href="#showcwt">showcwt</a></li>
  47791. <li><a href="#showfreqs">showfreqs</a></li>
  47792. <li><a href="#showspatial">showspatial</a></li>
  47793. <li><a href="#showspectrum-1">showspectrum</a></li>
  47794. <li><a href="#showspectrumpic">showspectrumpic</a></li>
  47795. <li><a href="#showvolume">showvolume</a></li>
  47796. <li><a href="#showwaves">showwaves</a></li>
  47797. <li><a href="#showwavespic">showwavespic</a></li>
  47798. <li><a href="#sidedata_002c-asidedata">sidedata, asidedata</a></li>
  47799. <li><a href="#spectrumsynth">spectrumsynth</a></li>
  47800. <li><a href="#split_002c-asplit">split, asplit</a></li>
  47801. <li><a href="#zmq_002c-azmq">zmq, azmq</a></li>
  47802. </ul>
  47803. <div class="section-level-extent" id="a3dscope">
  47804. <h3 class="section"><span>39.1 a3dscope<a class="copiable-link" href="#a3dscope"> &para;</a></span></h3>
  47805. <p>Convert input audio to 3d scope video output.
  47806. </p>
  47807. <p>The filter accepts the following options:
  47808. </p>
  47809. <dl class="table">
  47810. <dt><samp class="option">rate, r</samp></dt>
  47811. <dd><p>Set frame rate, expressed as number of frames per second. Default
  47812. value is &quot;25&quot;.
  47813. </p>
  47814. </dd>
  47815. <dt><samp class="option">size, s</samp></dt>
  47816. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  47817. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  47818. Default value is <code class="code">hd720</code>.
  47819. </p>
  47820. </dd>
  47821. <dt><samp class="option">fov</samp></dt>
  47822. <dd><p>Set the camera field of view. Default is 90 degrees.
  47823. Allowed range is from 40 to 150.
  47824. </p>
  47825. </dd>
  47826. <dt><samp class="option">roll</samp></dt>
  47827. <dd><p>Set the camera roll.
  47828. </p>
  47829. </dd>
  47830. <dt><samp class="option">pitch</samp></dt>
  47831. <dd><p>Set the camera pitch.
  47832. </p>
  47833. </dd>
  47834. <dt><samp class="option">yaw</samp></dt>
  47835. <dd><p>Set the camera yaw.
  47836. </p>
  47837. </dd>
  47838. <dt><samp class="option">xzoom</samp></dt>
  47839. <dd><p>Set the camera zoom on X-axis.
  47840. </p>
  47841. </dd>
  47842. <dt><samp class="option">yzoom</samp></dt>
  47843. <dd><p>Set the camera zoom on Y-axis.
  47844. </p>
  47845. </dd>
  47846. <dt><samp class="option">zzoom</samp></dt>
  47847. <dd><p>Set the camera zoom on Z-axis.
  47848. </p>
  47849. </dd>
  47850. <dt><samp class="option">xpos</samp></dt>
  47851. <dd><p>Set the camera position on X-axis.
  47852. </p>
  47853. </dd>
  47854. <dt><samp class="option">ypos</samp></dt>
  47855. <dd><p>Set the camera position on Y-axis.
  47856. </p>
  47857. </dd>
  47858. <dt><samp class="option">zpos</samp></dt>
  47859. <dd><p>Set the camera position on Z-axis.
  47860. </p>
  47861. </dd>
  47862. <dt><samp class="option">length</samp></dt>
  47863. <dd><p>Set the length of displayed audio waves in number of frames.
  47864. </p></dd>
  47865. </dl>
  47866. <ul class="mini-toc">
  47867. <li><a href="#Commands-160" accesskey="1">Commands</a></li>
  47868. </ul>
  47869. <div class="subsection-level-extent" id="Commands-160">
  47870. <h4 class="subsection"><span>39.1.1 Commands<a class="copiable-link" href="#Commands-160"> &para;</a></span></h4>
  47871. <p>Filter supports the some above options as <a class="ref" href="#commands">commands</a>.
  47872. </p>
  47873. </div>
  47874. </div>
  47875. <div class="section-level-extent" id="abitscope">
  47876. <h3 class="section"><span>39.2 abitscope<a class="copiable-link" href="#abitscope"> &para;</a></span></h3>
  47877. <p>Convert input audio to a video output, displaying the audio bit scope.
  47878. </p>
  47879. <p>The filter accepts the following options:
  47880. </p>
  47881. <dl class="table">
  47882. <dt><samp class="option">rate, r</samp></dt>
  47883. <dd><p>Set frame rate, expressed as number of frames per second. Default
  47884. value is &quot;25&quot;.
  47885. </p>
  47886. </dd>
  47887. <dt><samp class="option">size, s</samp></dt>
  47888. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  47889. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  47890. Default value is <code class="code">1024x256</code>.
  47891. </p>
  47892. </dd>
  47893. <dt><samp class="option">colors</samp></dt>
  47894. <dd><p>Specify list of colors separated by space or by &rsquo;|&rsquo; which will be used to
  47895. draw channels. Unrecognized or missing colors will be replaced
  47896. by white color.
  47897. </p>
  47898. </dd>
  47899. <dt><samp class="option">mode, m</samp></dt>
  47900. <dd><p>Set output mode. Can be <code class="code">bars</code> or <code class="code">trace</code>. Default is <code class="code">bars</code>.
  47901. </p></dd>
  47902. </dl>
  47903. </div>
  47904. <div class="section-level-extent" id="adrawgraph">
  47905. <h3 class="section"><span>39.3 adrawgraph<a class="copiable-link" href="#adrawgraph"> &para;</a></span></h3>
  47906. <p>Draw a graph using input audio metadata.
  47907. </p>
  47908. <p>See <a class="ref" href="#drawgraph">drawgraph</a>
  47909. </p>
  47910. </div>
  47911. <div class="section-level-extent" id="agraphmonitor">
  47912. <h3 class="section"><span>39.4 agraphmonitor<a class="copiable-link" href="#agraphmonitor"> &para;</a></span></h3>
  47913. <p>See <a class="ref" href="#graphmonitor">graphmonitor</a>.
  47914. </p>
  47915. </div>
  47916. <div class="section-level-extent" id="ahistogram">
  47917. <h3 class="section"><span>39.5 ahistogram<a class="copiable-link" href="#ahistogram"> &para;</a></span></h3>
  47918. <p>Convert input audio to a video output, displaying the volume histogram.
  47919. </p>
  47920. <p>The filter accepts the following options:
  47921. </p>
  47922. <dl class="table">
  47923. <dt><samp class="option">dmode</samp></dt>
  47924. <dd><p>Specify how histogram is calculated.
  47925. </p>
  47926. <p>It accepts the following values:
  47927. </p><dl class="table">
  47928. <dt>&lsquo;<samp class="samp">single</samp>&rsquo;</dt>
  47929. <dd><p>Use single histogram for all channels.
  47930. </p></dd>
  47931. <dt>&lsquo;<samp class="samp">separate</samp>&rsquo;</dt>
  47932. <dd><p>Use separate histogram for each channel.
  47933. </p></dd>
  47934. </dl>
  47935. <p>Default is <code class="code">single</code>.
  47936. </p>
  47937. </dd>
  47938. <dt><samp class="option">rate, r</samp></dt>
  47939. <dd><p>Set frame rate, expressed as number of frames per second. Default
  47940. value is &quot;25&quot;.
  47941. </p>
  47942. </dd>
  47943. <dt><samp class="option">size, s</samp></dt>
  47944. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  47945. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  47946. Default value is <code class="code">hd720</code>.
  47947. </p>
  47948. </dd>
  47949. <dt><samp class="option">scale</samp></dt>
  47950. <dd><p>Set display scale.
  47951. </p>
  47952. <p>It accepts the following values:
  47953. </p><dl class="table">
  47954. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  47955. <dd><p>logarithmic
  47956. </p></dd>
  47957. <dt>&lsquo;<samp class="samp">sqrt</samp>&rsquo;</dt>
  47958. <dd><p>square root
  47959. </p></dd>
  47960. <dt>&lsquo;<samp class="samp">cbrt</samp>&rsquo;</dt>
  47961. <dd><p>cubic root
  47962. </p></dd>
  47963. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  47964. <dd><p>linear
  47965. </p></dd>
  47966. <dt>&lsquo;<samp class="samp">rlog</samp>&rsquo;</dt>
  47967. <dd><p>reverse logarithmic
  47968. </p></dd>
  47969. </dl>
  47970. <p>Default is <code class="code">log</code>.
  47971. </p>
  47972. </dd>
  47973. <dt><samp class="option">ascale</samp></dt>
  47974. <dd><p>Set amplitude scale.
  47975. </p>
  47976. <p>It accepts the following values:
  47977. </p><dl class="table">
  47978. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  47979. <dd><p>logarithmic
  47980. </p></dd>
  47981. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  47982. <dd><p>linear
  47983. </p></dd>
  47984. </dl>
  47985. <p>Default is <code class="code">log</code>.
  47986. </p>
  47987. </dd>
  47988. <dt><samp class="option">acount</samp></dt>
  47989. <dd><p>Set how much frames to accumulate in histogram.
  47990. Default is 1. Setting this to -1 accumulates all frames.
  47991. </p>
  47992. </dd>
  47993. <dt><samp class="option">rheight</samp></dt>
  47994. <dd><p>Set histogram ratio of window height.
  47995. </p>
  47996. </dd>
  47997. <dt><samp class="option">slide</samp></dt>
  47998. <dd><p>Set sonogram sliding.
  47999. </p>
  48000. <p>It accepts the following values:
  48001. </p><dl class="table">
  48002. <dt>&lsquo;<samp class="samp">replace</samp>&rsquo;</dt>
  48003. <dd><p>replace old rows with new ones.
  48004. </p></dd>
  48005. <dt>&lsquo;<samp class="samp">scroll</samp>&rsquo;</dt>
  48006. <dd><p>scroll from top to bottom.
  48007. </p></dd>
  48008. </dl>
  48009. <p>Default is <code class="code">replace</code>.
  48010. </p>
  48011. </dd>
  48012. <dt><samp class="option">hmode</samp></dt>
  48013. <dd><p>Set histogram mode.
  48014. </p>
  48015. <p>It accepts the following values:
  48016. </p><dl class="table">
  48017. <dt>&lsquo;<samp class="samp">abs</samp>&rsquo;</dt>
  48018. <dd><p>Use absolute values of samples.
  48019. </p></dd>
  48020. <dt>&lsquo;<samp class="samp">sign</samp>&rsquo;</dt>
  48021. <dd><p>Use untouched values of samples.
  48022. </p></dd>
  48023. </dl>
  48024. <p>Default is <code class="code">abs</code>.
  48025. </p></dd>
  48026. </dl>
  48027. </div>
  48028. <div class="section-level-extent" id="aphasemeter">
  48029. <h3 class="section"><span>39.6 aphasemeter<a class="copiable-link" href="#aphasemeter"> &para;</a></span></h3>
  48030. <p>Measures phase of input audio, which is exported as metadata <code class="code">lavfi.aphasemeter.phase</code>,
  48031. representing mean phase of current audio frame. A video output can also be produced and is
  48032. enabled by default. The audio is passed through as first output.
  48033. </p>
  48034. <p>Audio will be rematrixed to stereo if it has a different channel layout. Phase value is in
  48035. range <code class="code">[-1, 1]</code> where <code class="code">-1</code> means left and right channels are completely out of phase
  48036. and <code class="code">1</code> means channels are in phase.
  48037. </p>
  48038. <p>The filter accepts the following options, all related to its video output:
  48039. </p>
  48040. <dl class="table">
  48041. <dt><samp class="option">rate, r</samp></dt>
  48042. <dd><p>Set the output frame rate. Default value is <code class="code">25</code>.
  48043. </p>
  48044. </dd>
  48045. <dt><samp class="option">size, s</samp></dt>
  48046. <dd><p>Set the video size for the output. For the syntax of this option, check the
  48047. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  48048. Default value is <code class="code">800x400</code>.
  48049. </p>
  48050. </dd>
  48051. <dt><samp class="option">rc</samp></dt>
  48052. <dt><samp class="option">gc</samp></dt>
  48053. <dt><samp class="option">bc</samp></dt>
  48054. <dd><p>Specify the red, green, blue contrast. Default values are <code class="code">2</code>,
  48055. <code class="code">7</code> and <code class="code">1</code>.
  48056. Allowed range is <code class="code">[0, 255]</code>.
  48057. </p>
  48058. </dd>
  48059. <dt><samp class="option">mpc</samp></dt>
  48060. <dd><p>Set color which will be used for drawing median phase. If color is
  48061. <code class="code">none</code> which is default, no median phase value will be drawn.
  48062. </p>
  48063. </dd>
  48064. <dt><samp class="option">video</samp></dt>
  48065. <dd><p>Enable video output. Default is enabled.
  48066. </p></dd>
  48067. </dl>
  48068. <ul class="mini-toc">
  48069. <li><a href="#phasing-detection" accesskey="1">phasing detection</a></li>
  48070. <li><a href="#Examples-173" accesskey="2">Examples</a></li>
  48071. </ul>
  48072. <div class="subsection-level-extent" id="phasing-detection">
  48073. <h4 class="subsection"><span>39.6.1 phasing detection<a class="copiable-link" href="#phasing-detection"> &para;</a></span></h4>
  48074. <p>The filter also detects out of phase and mono sequences in stereo streams.
  48075. It logs the sequence start, end and duration when it lasts longer or as long as the minimum set.
  48076. </p>
  48077. <p>The filter accepts the following options for this detection:
  48078. </p>
  48079. <dl class="table">
  48080. <dt><samp class="option">phasing</samp></dt>
  48081. <dd><p>Enable mono and out of phase detection. Default is disabled.
  48082. </p>
  48083. </dd>
  48084. <dt><samp class="option">tolerance, t</samp></dt>
  48085. <dd><p>Set phase tolerance for mono detection, in amplitude ratio. Default is <code class="code">0</code>.
  48086. Allowed range is <code class="code">[0, 1]</code>.
  48087. </p>
  48088. </dd>
  48089. <dt><samp class="option">angle, a</samp></dt>
  48090. <dd><p>Set angle threshold for out of phase detection, in degree. Default is <code class="code">170</code>.
  48091. Allowed range is <code class="code">[90, 180]</code>.
  48092. </p>
  48093. </dd>
  48094. <dt><samp class="option">duration, d</samp></dt>
  48095. <dd><p>Set mono or out of phase duration until notification, expressed in seconds. Default is <code class="code">2</code>.
  48096. </p></dd>
  48097. </dl>
  48098. </div>
  48099. <div class="subsection-level-extent" id="Examples-173">
  48100. <h4 class="subsection"><span>39.6.2 Examples<a class="copiable-link" href="#Examples-173"> &para;</a></span></h4>
  48101. <ul class="itemize mark-bullet">
  48102. <li>Complete example with <code class="command">ffmpeg</code> to detect 1 second of mono with 0.001 phase tolerance:
  48103. <div class="example">
  48104. <pre class="example-preformatted">ffmpeg -i stereo.wav -af aphasemeter=video=0:phasing=1:duration=1:tolerance=0.001 -f null -
  48105. </pre></div>
  48106. </li></ul>
  48107. </div>
  48108. </div>
  48109. <div class="section-level-extent" id="avectorscope">
  48110. <h3 class="section"><span>39.7 avectorscope<a class="copiable-link" href="#avectorscope"> &para;</a></span></h3>
  48111. <p>Convert input audio to a video output, representing the audio vector
  48112. scope.
  48113. </p>
  48114. <p>The filter is used to measure the difference between channels of stereo
  48115. audio stream. A monaural signal, consisting of identical left and right
  48116. signal, results in straight vertical line. Any stereo separation is visible
  48117. as a deviation from this line, creating a Lissajous figure.
  48118. If the straight (or deviation from it) but horizontal line appears this
  48119. indicates that the left and right channels are out of phase.
  48120. </p>
  48121. <p>The filter accepts the following options:
  48122. </p>
  48123. <dl class="table">
  48124. <dt><samp class="option">mode, m</samp></dt>
  48125. <dd><p>Set the vectorscope mode.
  48126. </p>
  48127. <p>Available values are:
  48128. </p><dl class="table">
  48129. <dt>&lsquo;<samp class="samp">lissajous</samp>&rsquo;</dt>
  48130. <dd><p>Lissajous rotated by 45 degrees.
  48131. </p>
  48132. </dd>
  48133. <dt>&lsquo;<samp class="samp">lissajous_xy</samp>&rsquo;</dt>
  48134. <dd><p>Same as above but not rotated.
  48135. </p>
  48136. </dd>
  48137. <dt>&lsquo;<samp class="samp">polar</samp>&rsquo;</dt>
  48138. <dd><p>Shape resembling half of circle.
  48139. </p></dd>
  48140. </dl>
  48141. <p>Default value is &lsquo;<samp class="samp">lissajous</samp>&rsquo;.
  48142. </p>
  48143. </dd>
  48144. <dt><samp class="option">size, s</samp></dt>
  48145. <dd><p>Set the video size for the output. For the syntax of this option, check the
  48146. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  48147. Default value is <code class="code">400x400</code>.
  48148. </p>
  48149. </dd>
  48150. <dt><samp class="option">rate, r</samp></dt>
  48151. <dd><p>Set the output frame rate. Default value is <code class="code">25</code>.
  48152. </p>
  48153. </dd>
  48154. <dt><samp class="option">rc</samp></dt>
  48155. <dt><samp class="option">gc</samp></dt>
  48156. <dt><samp class="option">bc</samp></dt>
  48157. <dt><samp class="option">ac</samp></dt>
  48158. <dd><p>Specify the red, green, blue and alpha contrast. Default values are <code class="code">40</code>,
  48159. <code class="code">160</code>, <code class="code">80</code> and <code class="code">255</code>.
  48160. Allowed range is <code class="code">[0, 255]</code>.
  48161. </p>
  48162. </dd>
  48163. <dt><samp class="option">rf</samp></dt>
  48164. <dt><samp class="option">gf</samp></dt>
  48165. <dt><samp class="option">bf</samp></dt>
  48166. <dt><samp class="option">af</samp></dt>
  48167. <dd><p>Specify the red, green, blue and alpha fade. Default values are <code class="code">15</code>,
  48168. <code class="code">10</code>, <code class="code">5</code> and <code class="code">5</code>.
  48169. Allowed range is <code class="code">[0, 255]</code>.
  48170. </p>
  48171. </dd>
  48172. <dt><samp class="option">zoom</samp></dt>
  48173. <dd><p>Set the zoom factor. Default value is <code class="code">1</code>. Allowed range is <code class="code">[0, 10]</code>.
  48174. Values lower than <var class="var">1</var> will auto adjust zoom factor to maximal possible value.
  48175. </p>
  48176. </dd>
  48177. <dt><samp class="option">draw</samp></dt>
  48178. <dd><p>Set the vectorscope drawing mode.
  48179. </p>
  48180. <p>Available values are:
  48181. </p><dl class="table">
  48182. <dt>&lsquo;<samp class="samp">dot</samp>&rsquo;</dt>
  48183. <dd><p>Draw dot for each sample.
  48184. </p>
  48185. </dd>
  48186. <dt>&lsquo;<samp class="samp">line</samp>&rsquo;</dt>
  48187. <dd><p>Draw line between previous and current sample.
  48188. </p>
  48189. </dd>
  48190. <dt>&lsquo;<samp class="samp">aaline</samp>&rsquo;</dt>
  48191. <dd><p>Draw anti-aliased line between previous and current sample.
  48192. </p></dd>
  48193. </dl>
  48194. <p>Default value is &lsquo;<samp class="samp">dot</samp>&rsquo;.
  48195. </p>
  48196. </dd>
  48197. <dt><samp class="option">scale</samp></dt>
  48198. <dd><p>Specify amplitude scale of audio samples.
  48199. </p>
  48200. <p>Available values are:
  48201. </p><dl class="table">
  48202. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  48203. <dd><p>Linear.
  48204. </p>
  48205. </dd>
  48206. <dt>&lsquo;<samp class="samp">sqrt</samp>&rsquo;</dt>
  48207. <dd><p>Square root.
  48208. </p>
  48209. </dd>
  48210. <dt>&lsquo;<samp class="samp">cbrt</samp>&rsquo;</dt>
  48211. <dd><p>Cubic root.
  48212. </p>
  48213. </dd>
  48214. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  48215. <dd><p>Logarithmic.
  48216. </p></dd>
  48217. </dl>
  48218. </dd>
  48219. <dt><samp class="option">swap</samp></dt>
  48220. <dd><p>Swap left channel axis with right channel axis.
  48221. </p>
  48222. </dd>
  48223. <dt><samp class="option">mirror</samp></dt>
  48224. <dd><p>Mirror axis.
  48225. </p>
  48226. <dl class="table">
  48227. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  48228. <dd><p>No mirror.
  48229. </p>
  48230. </dd>
  48231. <dt>&lsquo;<samp class="samp">x</samp>&rsquo;</dt>
  48232. <dd><p>Mirror only x axis.
  48233. </p>
  48234. </dd>
  48235. <dt>&lsquo;<samp class="samp">y</samp>&rsquo;</dt>
  48236. <dd><p>Mirror only y axis.
  48237. </p>
  48238. </dd>
  48239. <dt>&lsquo;<samp class="samp">xy</samp>&rsquo;</dt>
  48240. <dd><p>Mirror both axis.
  48241. </p></dd>
  48242. </dl>
  48243. </dd>
  48244. </dl>
  48245. <ul class="mini-toc">
  48246. <li><a href="#Examples-174" accesskey="1">Examples</a></li>
  48247. <li><a href="#Commands-161" accesskey="2">Commands</a></li>
  48248. </ul>
  48249. <div class="subsection-level-extent" id="Examples-174">
  48250. <h4 class="subsection"><span>39.7.1 Examples<a class="copiable-link" href="#Examples-174"> &para;</a></span></h4>
  48251. <ul class="itemize mark-bullet">
  48252. <li>Complete example using <code class="command">ffplay</code>:
  48253. <div class="example">
  48254. <pre class="example-preformatted">ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
  48255. [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]'
  48256. </pre></div>
  48257. </li></ul>
  48258. </div>
  48259. <div class="subsection-level-extent" id="Commands-161">
  48260. <h4 class="subsection"><span>39.7.2 Commands<a class="copiable-link" href="#Commands-161"> &para;</a></span></h4>
  48261. <p>This filter supports the all above options as commands except options <code class="code">size</code> and <code class="code">rate</code>.
  48262. </p>
  48263. </div>
  48264. </div>
  48265. <div class="section-level-extent" id="bench_002c-abench">
  48266. <h3 class="section"><span>39.8 bench, abench<a class="copiable-link" href="#bench_002c-abench"> &para;</a></span></h3>
  48267. <p>Benchmark part of a filtergraph.
  48268. </p>
  48269. <p>The filter accepts the following options:
  48270. </p>
  48271. <dl class="table">
  48272. <dt><samp class="option">action</samp></dt>
  48273. <dd><p>Start or stop a timer.
  48274. </p>
  48275. <p>Available values are:
  48276. </p><dl class="table">
  48277. <dt>&lsquo;<samp class="samp">start</samp>&rsquo;</dt>
  48278. <dd><p>Get the current time, set it as frame metadata (using the key
  48279. <code class="code">lavfi.bench.start_time</code>), and forward the frame to the next filter.
  48280. </p>
  48281. </dd>
  48282. <dt>&lsquo;<samp class="samp">stop</samp>&rsquo;</dt>
  48283. <dd><p>Get the current time and fetch the <code class="code">lavfi.bench.start_time</code> metadata from
  48284. the input frame metadata to get the time difference. Time difference, average,
  48285. maximum and minimum time (respectively <code class="code">t</code>, <code class="code">avg</code>, <code class="code">max</code> and
  48286. <code class="code">min</code>) are then printed. The timestamps are expressed in seconds.
  48287. </p></dd>
  48288. </dl>
  48289. </dd>
  48290. </dl>
  48291. <ul class="mini-toc">
  48292. <li><a href="#Examples-175" accesskey="1">Examples</a></li>
  48293. </ul>
  48294. <div class="subsection-level-extent" id="Examples-175">
  48295. <h4 class="subsection"><span>39.8.1 Examples<a class="copiable-link" href="#Examples-175"> &para;</a></span></h4>
  48296. <ul class="itemize mark-bullet">
  48297. <li>Benchmark <a class="ref" href="#selectivecolor">selectivecolor</a> filter:
  48298. <div class="example">
  48299. <pre class="example-preformatted">bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop
  48300. </pre></div>
  48301. </li></ul>
  48302. </div>
  48303. </div>
  48304. <div class="section-level-extent" id="concat-3">
  48305. <h3 class="section"><span>39.9 concat<a class="copiable-link" href="#concat-3"> &para;</a></span></h3>
  48306. <p>Concatenate audio and video streams, joining them together one after the
  48307. other.
  48308. </p>
  48309. <p>The filter works on segments of synchronized video and audio streams. All
  48310. segments must have the same number of streams of each type, and that will
  48311. also be the number of streams at output.
  48312. </p>
  48313. <p>The filter accepts the following options:
  48314. </p>
  48315. <dl class="table">
  48316. <dt><samp class="option">n</samp></dt>
  48317. <dd><p>Set the number of segments. Default is 2.
  48318. </p>
  48319. </dd>
  48320. <dt><samp class="option">v</samp></dt>
  48321. <dd><p>Set the number of output video streams, that is also the number of video
  48322. streams in each segment. Default is 1.
  48323. </p>
  48324. </dd>
  48325. <dt><samp class="option">a</samp></dt>
  48326. <dd><p>Set the number of output audio streams, that is also the number of audio
  48327. streams in each segment. Default is 0.
  48328. </p>
  48329. </dd>
  48330. <dt><samp class="option">unsafe</samp></dt>
  48331. <dd><p>Activate unsafe mode: do not fail if segments have a different format.
  48332. </p>
  48333. </dd>
  48334. </dl>
  48335. <p>The filter has <var class="var">v</var>+<var class="var">a</var> outputs: first <var class="var">v</var> video outputs, then
  48336. <var class="var">a</var> audio outputs.
  48337. </p>
  48338. <p>There are <var class="var">n</var>x(<var class="var">v</var>+<var class="var">a</var>) inputs: first the inputs for the first
  48339. segment, in the same order as the outputs, then the inputs for the second
  48340. segment, etc.
  48341. </p>
  48342. <p>Related streams do not always have exactly the same duration, for various
  48343. reasons including codec frame size or sloppy authoring. For that reason,
  48344. related synchronized streams (e.g. a video and its audio track) should be
  48345. concatenated at once. The concat filter will use the duration of the longest
  48346. stream in each segment (except the last one), and if necessary pad shorter
  48347. audio streams with silence.
  48348. </p>
  48349. <p>For this filter to work correctly, all segments must start at timestamp 0.
  48350. </p>
  48351. <p>All corresponding streams must have the same parameters in all segments; the
  48352. filtering system will automatically select a common pixel format for video
  48353. streams, and a common sample format, sample rate and channel layout for
  48354. audio streams, but other settings, such as resolution, must be converted
  48355. explicitly by the user.
  48356. </p>
  48357. <p>Different frame rates are acceptable but will result in variable frame rate
  48358. at output; be sure to configure the output file to handle it.
  48359. </p>
  48360. <ul class="mini-toc">
  48361. <li><a href="#Examples-176" accesskey="1">Examples</a></li>
  48362. <li><a href="#Commands-162" accesskey="2">Commands</a></li>
  48363. </ul>
  48364. <div class="subsection-level-extent" id="Examples-176">
  48365. <h4 class="subsection"><span>39.9.1 Examples<a class="copiable-link" href="#Examples-176"> &para;</a></span></h4>
  48366. <ul class="itemize mark-bullet">
  48367. <li>Concatenate an opening, an episode and an ending, all in bilingual version
  48368. (video in stream 0, audio in streams 1 and 2):
  48369. <div class="example">
  48370. <pre class="example-preformatted">ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex \
  48371. '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
  48372. concat=n=3:v=1:a=2 [v] [a1] [a2]' \
  48373. -map '[v]' -map '[a1]' -map '[a2]' output.mkv
  48374. </pre></div>
  48375. </li><li>Concatenate two parts, handling audio and video separately, using the
  48376. (a)movie sources, and adjusting the resolution:
  48377. <div class="example">
  48378. <pre class="example-preformatted">movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
  48379. movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
  48380. [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
  48381. </pre></div>
  48382. <p>Note that a desync will happen at the stitch if the audio and video streams
  48383. do not have exactly the same duration in the first file.
  48384. </p>
  48385. </li></ul>
  48386. </div>
  48387. <div class="subsection-level-extent" id="Commands-162">
  48388. <h4 class="subsection"><span>39.9.2 Commands<a class="copiable-link" href="#Commands-162"> &para;</a></span></h4>
  48389. <p>This filter supports the following commands:
  48390. </p><dl class="table">
  48391. <dt><samp class="option">next</samp></dt>
  48392. <dd><p>Close the current segment and step to the next one
  48393. </p></dd>
  48394. </dl>
  48395. <a class="anchor" id="ebur128"></a></div>
  48396. </div>
  48397. <div class="section-level-extent" id="ebur128-1">
  48398. <h3 class="section"><span>39.10 ebur128<a class="copiable-link" href="#ebur128-1"> &para;</a></span></h3>
  48399. <p>EBU R128 scanner filter. This filter takes an audio stream and analyzes its loudness
  48400. level. By default, it logs a message at a frequency of 10Hz with the
  48401. Momentary loudness (identified by <code class="code">M</code>), Short-term loudness (<code class="code">S</code>),
  48402. Integrated loudness (<code class="code">I</code>) and Loudness Range (<code class="code">LRA</code>).
  48403. </p>
  48404. <p>The filter can only analyze streams which have
  48405. sample format is double-precision floating point. The input stream will be converted to
  48406. this specification, if needed. Users may need to insert aformat and/or aresample filters
  48407. after this filter to obtain the original parameters.
  48408. </p>
  48409. <p>The filter also has a video output (see the <var class="var">video</var> option) with a real
  48410. time graph to observe the loudness evolution. The graphic contains the logged
  48411. message mentioned above, so it is not printed anymore when this option is set,
  48412. unless the verbose logging is set. The main graphing area contains the
  48413. short-term loudness (3 seconds of analysis), and the gauge on the right is for
  48414. the momentary loudness (400 milliseconds), but can optionally be configured
  48415. to instead display short-term loudness (see <var class="var">gauge</var>).
  48416. </p>
  48417. <p>The green area marks a +/- 1LU target range around the target loudness
  48418. (-23LUFS by default, unless modified through <var class="var">target</var>).
  48419. </p>
  48420. <p>More information about the Loudness Recommendation EBU R128 on
  48421. <a class="url" href="http://tech.ebu.ch/loudness">http://tech.ebu.ch/loudness</a>.
  48422. </p>
  48423. <p>The filter accepts the following options:
  48424. </p>
  48425. <dl class="table">
  48426. <dt><samp class="option">video</samp></dt>
  48427. <dd><p>Activate the video output. The audio stream is passed unchanged whether this
  48428. option is set or no. The video stream will be the first output stream if
  48429. activated. Default is <code class="code">0</code>.
  48430. </p>
  48431. </dd>
  48432. <dt><samp class="option">size</samp></dt>
  48433. <dd><p>Set the video size. This option is for video only. For the syntax of this
  48434. option, check the
  48435. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  48436. Default and minimum resolution is <code class="code">640x480</code>.
  48437. </p>
  48438. </dd>
  48439. <dt><samp class="option">meter</samp></dt>
  48440. <dd><p>Set the EBU scale meter. Default is <code class="code">9</code>. Common values are <code class="code">9</code> and
  48441. <code class="code">18</code>, respectively for EBU scale meter +9 and EBU scale meter +18. Any
  48442. other integer value between this range is allowed.
  48443. </p>
  48444. </dd>
  48445. <dt><samp class="option">metadata</samp></dt>
  48446. <dd><p>Set metadata injection. If set to <code class="code">1</code>, the audio input will be segmented
  48447. into 100ms output frames, each of them containing various loudness information
  48448. in metadata. All the metadata keys are prefixed with <code class="code">lavfi.r128.</code>.
  48449. </p>
  48450. <p>Default is <code class="code">0</code>.
  48451. </p>
  48452. </dd>
  48453. <dt><samp class="option">framelog</samp></dt>
  48454. <dd><p>Force the frame logging level.
  48455. </p>
  48456. <p>Available values are:
  48457. </p><dl class="table">
  48458. <dt>&lsquo;<samp class="samp">quiet</samp>&rsquo;</dt>
  48459. <dd><p>logging disabled
  48460. </p></dd>
  48461. <dt>&lsquo;<samp class="samp">info</samp>&rsquo;</dt>
  48462. <dd><p>information logging level
  48463. </p></dd>
  48464. <dt>&lsquo;<samp class="samp">verbose</samp>&rsquo;</dt>
  48465. <dd><p>verbose logging level
  48466. </p></dd>
  48467. </dl>
  48468. <p>By default, the logging level is set to <var class="var">info</var>. If the <samp class="option">video</samp> or
  48469. the <samp class="option">metadata</samp> options are set, it switches to <var class="var">verbose</var>.
  48470. </p>
  48471. </dd>
  48472. <dt><samp class="option">peak</samp></dt>
  48473. <dd><p>Set peak mode(s).
  48474. </p>
  48475. <p>Available modes can be cumulated (the option is a <code class="code">flag</code> type). Possible
  48476. values are:
  48477. </p><dl class="table">
  48478. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  48479. <dd><p>Disable any peak mode (default).
  48480. </p></dd>
  48481. <dt>&lsquo;<samp class="samp">sample</samp>&rsquo;</dt>
  48482. <dd><p>Enable sample-peak mode.
  48483. </p>
  48484. <p>Simple peak mode looking for the higher sample value. It logs a message
  48485. for sample-peak (identified by <code class="code">SPK</code>).
  48486. </p></dd>
  48487. <dt>&lsquo;<samp class="samp">true</samp>&rsquo;</dt>
  48488. <dd><p>Enable true-peak mode.
  48489. </p>
  48490. <p>If enabled, the peak lookup is done on an over-sampled version of the input
  48491. stream for better peak accuracy. It logs a message for true-peak.
  48492. (identified by <code class="code">TPK</code>) and true-peak per frame (identified by <code class="code">FTPK</code>).
  48493. This mode requires a build with <code class="code">libswresample</code>.
  48494. </p></dd>
  48495. </dl>
  48496. </dd>
  48497. <dt><samp class="option">dualmono</samp></dt>
  48498. <dd><p>Treat mono input files as &quot;dual mono&quot;. If a mono file is intended for playback
  48499. on a stereo system, its EBU R128 measurement will be perceptually incorrect.
  48500. If set to <code class="code">true</code>, this option will compensate for this effect.
  48501. Multi-channel input files are not affected by this option.
  48502. </p>
  48503. </dd>
  48504. <dt><samp class="option">panlaw</samp></dt>
  48505. <dd><p>Set a specific pan law to be used for the measurement of dual mono files.
  48506. This parameter is optional, and has a default value of -3.01dB.
  48507. </p>
  48508. </dd>
  48509. <dt><samp class="option">target</samp></dt>
  48510. <dd><p>Set a specific target level (in LUFS) used as relative zero in the visualization.
  48511. This parameter is optional and has a default value of -23LUFS as specified
  48512. by EBU R128. However, material published online may prefer a level of -16LUFS
  48513. (e.g. for use with podcasts or video platforms).
  48514. </p>
  48515. </dd>
  48516. <dt><samp class="option">gauge</samp></dt>
  48517. <dd><p>Set the value displayed by the gauge. Valid values are <code class="code">momentary</code> and s
  48518. <code class="code">shortterm</code>. By default the momentary value will be used, but in certain
  48519. scenarios it may be more useful to observe the short term value instead (e.g.
  48520. live mixing).
  48521. </p>
  48522. </dd>
  48523. <dt><samp class="option">scale</samp></dt>
  48524. <dd><p>Sets the display scale for the loudness. Valid parameters are <code class="code">absolute</code>
  48525. (in LUFS) or <code class="code">relative</code> (LU) relative to the target. This only affects the
  48526. video output, not the summary or continuous log output.
  48527. </p>
  48528. </dd>
  48529. <dt><samp class="option">integrated</samp></dt>
  48530. <dd><p>Read-only exported value for measured integrated loudness, in LUFS.
  48531. </p>
  48532. </dd>
  48533. <dt><samp class="option">range</samp></dt>
  48534. <dd><p>Read-only exported value for measured loudness range, in LU.
  48535. </p>
  48536. </dd>
  48537. <dt><samp class="option">lra_low</samp></dt>
  48538. <dd><p>Read-only exported value for measured LRA low, in LUFS.
  48539. </p>
  48540. </dd>
  48541. <dt><samp class="option">lra_high</samp></dt>
  48542. <dd><p>Read-only exported value for measured LRA high, in LUFS.
  48543. </p>
  48544. </dd>
  48545. <dt><samp class="option">sample_peak</samp></dt>
  48546. <dd><p>Read-only exported value for measured sample peak, in dBFS.
  48547. </p>
  48548. </dd>
  48549. <dt><samp class="option">true_peak</samp></dt>
  48550. <dd><p>Read-only exported value for measured true peak, in dBFS.
  48551. </p></dd>
  48552. </dl>
  48553. <ul class="mini-toc">
  48554. <li><a href="#Examples-177" accesskey="1">Examples</a></li>
  48555. </ul>
  48556. <div class="subsection-level-extent" id="Examples-177">
  48557. <h4 class="subsection"><span>39.10.1 Examples<a class="copiable-link" href="#Examples-177"> &para;</a></span></h4>
  48558. <ul class="itemize mark-bullet">
  48559. <li>Real-time graph using <code class="command">ffplay</code>, with a EBU scale meter +18:
  48560. <div class="example">
  48561. <pre class="example-preformatted">ffplay -f lavfi -i &quot;amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]&quot;
  48562. </pre></div>
  48563. </li><li>Run an analysis with <code class="command">ffmpeg</code>:
  48564. <div class="example">
  48565. <pre class="example-preformatted">ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
  48566. </pre></div>
  48567. </li></ul>
  48568. </div>
  48569. </div>
  48570. <div class="section-level-extent" id="interleave_002c-ainterleave">
  48571. <h3 class="section"><span>39.11 interleave, ainterleave<a class="copiable-link" href="#interleave_002c-ainterleave"> &para;</a></span></h3>
  48572. <p>Temporally interleave frames from several inputs.
  48573. </p>
  48574. <p><code class="code">interleave</code> works with video inputs, <code class="code">ainterleave</code> with audio.
  48575. </p>
  48576. <p>These filters read frames from several inputs and send the oldest
  48577. queued frame to the output.
  48578. </p>
  48579. <p>Input streams must have well defined, monotonically increasing frame
  48580. timestamp values.
  48581. </p>
  48582. <p>In order to submit one frame to output, these filters need to enqueue
  48583. at least one frame for each input, so they cannot work in case one
  48584. input is not yet terminated and will not receive incoming frames.
  48585. </p>
  48586. <p>For example consider the case when one input is a <code class="code">select</code> filter
  48587. which always drops input frames. The <code class="code">interleave</code> filter will keep
  48588. reading from that input, but it will never be able to send new frames
  48589. to output until the input sends an end-of-stream signal.
  48590. </p>
  48591. <p>Also, depending on inputs synchronization, the filters will drop
  48592. frames in case one input receives more frames than the other ones, and
  48593. the queue is already filled.
  48594. </p>
  48595. <p>These filters accept the following options:
  48596. </p>
  48597. <dl class="table">
  48598. <dt><samp class="option">nb_inputs, n</samp></dt>
  48599. <dd><p>Set the number of different inputs, it is 2 by default.
  48600. </p>
  48601. </dd>
  48602. <dt><samp class="option">duration</samp></dt>
  48603. <dd><p>How to determine the end-of-stream.
  48604. </p>
  48605. <dl class="table">
  48606. <dt><samp class="option">longest</samp></dt>
  48607. <dd><p>The duration of the longest input. (default)
  48608. </p>
  48609. </dd>
  48610. <dt><samp class="option">shortest</samp></dt>
  48611. <dd><p>The duration of the shortest input.
  48612. </p>
  48613. </dd>
  48614. <dt><samp class="option">first</samp></dt>
  48615. <dd><p>The duration of the first input.
  48616. </p></dd>
  48617. </dl>
  48618. </dd>
  48619. </dl>
  48620. <ul class="mini-toc">
  48621. <li><a href="#Examples-178" accesskey="1">Examples</a></li>
  48622. </ul>
  48623. <div class="subsection-level-extent" id="Examples-178">
  48624. <h4 class="subsection"><span>39.11.1 Examples<a class="copiable-link" href="#Examples-178"> &para;</a></span></h4>
  48625. <ul class="itemize mark-bullet">
  48626. <li>Interleave frames belonging to different streams using <code class="command">ffmpeg</code>:
  48627. <div class="example">
  48628. <pre class="example-preformatted">ffmpeg -i bambi.avi -i pr0n.mkv -filter_complex &quot;[0:v][1:v] interleave&quot; out.avi
  48629. </pre></div>
  48630. </li><li>Add flickering blur effect:
  48631. <div class="example">
  48632. <pre class="example-preformatted">select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave
  48633. </pre></div>
  48634. </li></ul>
  48635. </div>
  48636. </div>
  48637. <div class="section-level-extent" id="latency_002c-alatency">
  48638. <h3 class="section"><span>39.12 latency, alatency<a class="copiable-link" href="#latency_002c-alatency"> &para;</a></span></h3>
  48639. <p>Measure filtering latency.
  48640. </p>
  48641. <p>Report previous filter filtering latency, delay in number of audio samples for audio filters
  48642. or number of video frames for video filters.
  48643. </p>
  48644. <p>On end of input stream, filter will report min and max measured latency for previous running filter
  48645. in filtergraph.
  48646. </p>
  48647. </div>
  48648. <div class="section-level-extent" id="metadata_002c-ametadata">
  48649. <h3 class="section"><span>39.13 metadata, ametadata<a class="copiable-link" href="#metadata_002c-ametadata"> &para;</a></span></h3>
  48650. <p>Manipulate frame metadata.
  48651. </p>
  48652. <p>This filter accepts the following options:
  48653. </p>
  48654. <dl class="table">
  48655. <dt><samp class="option">mode</samp></dt>
  48656. <dd><p>Set mode of operation of the filter.
  48657. </p>
  48658. <p>Can be one of the following:
  48659. </p>
  48660. <dl class="table">
  48661. <dt>&lsquo;<samp class="samp">select</samp>&rsquo;</dt>
  48662. <dd><p>If both <code class="code">value</code> and <code class="code">key</code> is set, select frames
  48663. which have such metadata. If only <code class="code">key</code> is set, select
  48664. every frame that has such key in metadata.
  48665. </p>
  48666. </dd>
  48667. <dt>&lsquo;<samp class="samp">add</samp>&rsquo;</dt>
  48668. <dd><p>Add new metadata <code class="code">key</code> and <code class="code">value</code>. If key is already available
  48669. do nothing.
  48670. </p>
  48671. </dd>
  48672. <dt>&lsquo;<samp class="samp">modify</samp>&rsquo;</dt>
  48673. <dd><p>Modify value of already present key.
  48674. </p>
  48675. </dd>
  48676. <dt>&lsquo;<samp class="samp">delete</samp>&rsquo;</dt>
  48677. <dd><p>If <code class="code">value</code> is set, delete only keys that have such value.
  48678. Otherwise, delete key. If <code class="code">key</code> is not set, delete all metadata values in
  48679. the frame.
  48680. </p>
  48681. </dd>
  48682. <dt>&lsquo;<samp class="samp">print</samp>&rsquo;</dt>
  48683. <dd><p>Print key and its value if metadata was found. If <code class="code">key</code> is not set print all
  48684. metadata values available in frame.
  48685. </p></dd>
  48686. </dl>
  48687. </dd>
  48688. <dt><samp class="option">key</samp></dt>
  48689. <dd><p>Set key used with all modes. Must be set for all modes except <code class="code">print</code> and <code class="code">delete</code>.
  48690. </p>
  48691. </dd>
  48692. <dt><samp class="option">value</samp></dt>
  48693. <dd><p>Set metadata value which will be used. This option is mandatory for
  48694. <code class="code">modify</code> and <code class="code">add</code> mode.
  48695. </p>
  48696. </dd>
  48697. <dt><samp class="option">function</samp></dt>
  48698. <dd><p>Which function to use when comparing metadata value and <code class="code">value</code>.
  48699. </p>
  48700. <p>Can be one of following:
  48701. </p>
  48702. <dl class="table">
  48703. <dt>&lsquo;<samp class="samp">same_str</samp>&rsquo;</dt>
  48704. <dd><p>Values are interpreted as strings, returns true if metadata value is same as <code class="code">value</code>.
  48705. </p>
  48706. </dd>
  48707. <dt>&lsquo;<samp class="samp">starts_with</samp>&rsquo;</dt>
  48708. <dd><p>Values are interpreted as strings, returns true if metadata value starts with
  48709. the <code class="code">value</code> option string.
  48710. </p>
  48711. </dd>
  48712. <dt>&lsquo;<samp class="samp">less</samp>&rsquo;</dt>
  48713. <dd><p>Values are interpreted as floats, returns true if metadata value is less than <code class="code">value</code>.
  48714. </p>
  48715. </dd>
  48716. <dt>&lsquo;<samp class="samp">equal</samp>&rsquo;</dt>
  48717. <dd><p>Values are interpreted as floats, returns true if <code class="code">value</code> is equal with metadata value.
  48718. </p>
  48719. </dd>
  48720. <dt>&lsquo;<samp class="samp">greater</samp>&rsquo;</dt>
  48721. <dd><p>Values are interpreted as floats, returns true if metadata value is greater than <code class="code">value</code>.
  48722. </p>
  48723. </dd>
  48724. <dt>&lsquo;<samp class="samp">expr</samp>&rsquo;</dt>
  48725. <dd><p>Values are interpreted as floats, returns true if expression from option <code class="code">expr</code>
  48726. evaluates to true.
  48727. </p>
  48728. </dd>
  48729. <dt>&lsquo;<samp class="samp">ends_with</samp>&rsquo;</dt>
  48730. <dd><p>Values are interpreted as strings, returns true if metadata value ends with
  48731. the <code class="code">value</code> option string.
  48732. </p></dd>
  48733. </dl>
  48734. </dd>
  48735. <dt><samp class="option">expr</samp></dt>
  48736. <dd><p>Set expression which is used when <code class="code">function</code> is set to <code class="code">expr</code>.
  48737. The expression is evaluated through the eval API and can contain the following
  48738. constants:
  48739. </p>
  48740. <dl class="table">
  48741. <dt><samp class="option">VALUE1, FRAMEVAL</samp></dt>
  48742. <dd><p>Float representation of <code class="code">value</code> from metadata key.
  48743. </p>
  48744. </dd>
  48745. <dt><samp class="option">VALUE2, USERVAL</samp></dt>
  48746. <dd><p>Float representation of <code class="code">value</code> as supplied by user in <code class="code">value</code> option.
  48747. </p></dd>
  48748. </dl>
  48749. </dd>
  48750. <dt><samp class="option">file</samp></dt>
  48751. <dd><p>If specified in <code class="code">print</code> mode, output is written to the named file. Instead of
  48752. plain filename any writable url can be specified. Filename &ldquo;-&rdquo; is a shorthand
  48753. for standard output. If <code class="code">file</code> option is not set, output is written to the log
  48754. with AV_LOG_INFO loglevel.
  48755. </p>
  48756. </dd>
  48757. <dt><samp class="option">direct</samp></dt>
  48758. <dd><p>Reduces buffering in print mode when output is written to a URL set using <var class="var">file</var>.
  48759. </p>
  48760. </dd>
  48761. </dl>
  48762. <ul class="mini-toc">
  48763. <li><a href="#Examples-179" accesskey="1">Examples</a></li>
  48764. </ul>
  48765. <div class="subsection-level-extent" id="Examples-179">
  48766. <h4 class="subsection"><span>39.13.1 Examples<a class="copiable-link" href="#Examples-179"> &para;</a></span></h4>
  48767. <ul class="itemize mark-bullet">
  48768. <li>Print all metadata values for frames with key <code class="code">lavfi.signalstats.YDIF</code> with values
  48769. between 0 and 1.
  48770. <div class="example">
  48771. <pre class="example-preformatted">signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
  48772. </pre></div>
  48773. </li><li>Print silencedetect output to file <samp class="file">metadata.txt</samp>.
  48774. <div class="example">
  48775. <pre class="example-preformatted">silencedetect,ametadata=mode=print:file=metadata.txt
  48776. </pre></div>
  48777. </li><li>Direct all metadata to a pipe with file descriptor 4.
  48778. <div class="example">
  48779. <pre class="example-preformatted">metadata=mode=print:file='pipe\:4'
  48780. </pre></div>
  48781. </li></ul>
  48782. </div>
  48783. </div>
  48784. <div class="section-level-extent" id="perms_002c-aperms">
  48785. <h3 class="section"><span>39.14 perms, aperms<a class="copiable-link" href="#perms_002c-aperms"> &para;</a></span></h3>
  48786. <p>Set read/write permissions for the output frames.
  48787. </p>
  48788. <p>These filters are mainly aimed at developers to test direct path in the
  48789. following filter in the filtergraph.
  48790. </p>
  48791. <p>The filters accept the following options:
  48792. </p>
  48793. <dl class="table">
  48794. <dt><samp class="option">mode</samp></dt>
  48795. <dd><p>Select the permissions mode.
  48796. </p>
  48797. <p>It accepts the following values:
  48798. </p><dl class="table">
  48799. <dt>&lsquo;<samp class="samp">none</samp>&rsquo;</dt>
  48800. <dd><p>Do nothing. This is the default.
  48801. </p></dd>
  48802. <dt>&lsquo;<samp class="samp">ro</samp>&rsquo;</dt>
  48803. <dd><p>Set all the output frames read-only.
  48804. </p></dd>
  48805. <dt>&lsquo;<samp class="samp">rw</samp>&rsquo;</dt>
  48806. <dd><p>Set all the output frames directly writable.
  48807. </p></dd>
  48808. <dt>&lsquo;<samp class="samp">toggle</samp>&rsquo;</dt>
  48809. <dd><p>Make the frame read-only if writable, and writable if read-only.
  48810. </p></dd>
  48811. <dt>&lsquo;<samp class="samp">random</samp>&rsquo;</dt>
  48812. <dd><p>Set each output frame read-only or writable randomly.
  48813. </p></dd>
  48814. </dl>
  48815. </dd>
  48816. <dt><samp class="option">seed</samp></dt>
  48817. <dd><p>Set the seed for the <var class="var">random</var> mode, must be an integer included between
  48818. <code class="code">0</code> and <code class="code">UINT32_MAX</code>. If not specified, or if explicitly set to
  48819. <code class="code">-1</code>, the filter will try to use a good random seed on a best effort
  48820. basis.
  48821. </p></dd>
  48822. </dl>
  48823. <p>Note: in case of auto-inserted filter between the permission filter and the
  48824. following one, the permission might not be received as expected in that
  48825. following filter. Inserting a <a class="ref" href="#format">format</a> or <a class="ref" href="#aformat">aformat</a> filter before the
  48826. perms/aperms filter can avoid this problem.
  48827. </p>
  48828. </div>
  48829. <div class="section-level-extent" id="realtime_002c-arealtime">
  48830. <h3 class="section"><span>39.15 realtime, arealtime<a class="copiable-link" href="#realtime_002c-arealtime"> &para;</a></span></h3>
  48831. <p>Slow down filtering to match real time approximately.
  48832. </p>
  48833. <p>These filters will pause the filtering for a variable amount of time to
  48834. match the output rate with the input timestamps.
  48835. They are similar to the <samp class="option">re</samp> option to <code class="code">ffmpeg</code>.
  48836. </p>
  48837. <p>They accept the following options:
  48838. </p>
  48839. <dl class="table">
  48840. <dt><samp class="option">limit</samp></dt>
  48841. <dd><p>Time limit for the pauses. Any pause longer than that will be considered
  48842. a timestamp discontinuity and reset the timer. Default is 2 seconds.
  48843. </p></dd>
  48844. <dt><samp class="option">speed</samp></dt>
  48845. <dd><p>Speed factor for processing. The value must be a float larger than zero.
  48846. Values larger than 1.0 will result in faster than realtime processing,
  48847. smaller will slow processing down. The <var class="var">limit</var> is automatically adapted
  48848. accordingly. Default is 1.0.
  48849. </p>
  48850. <p>A processing speed faster than what is possible without these filters cannot
  48851. be achieved.
  48852. </p></dd>
  48853. </dl>
  48854. <ul class="mini-toc">
  48855. <li><a href="#Commands-163" accesskey="1">Commands</a></li>
  48856. </ul>
  48857. <div class="subsection-level-extent" id="Commands-163">
  48858. <h4 class="subsection"><span>39.15.1 Commands<a class="copiable-link" href="#Commands-163"> &para;</a></span></h4>
  48859. <p>Both filters supports the all above options as <a class="ref" href="#commands">commands</a>.
  48860. </p>
  48861. </div>
  48862. </div>
  48863. <div class="section-level-extent" id="segment_002c-asegment">
  48864. <h3 class="section"><span>39.16 segment, asegment<a class="copiable-link" href="#segment_002c-asegment"> &para;</a></span></h3>
  48865. <p>Split single input stream into multiple streams.
  48866. </p>
  48867. <p>This filter does opposite of concat filters.
  48868. </p>
  48869. <p><code class="code">segment</code> works on video frames, <code class="code">asegment</code> on audio samples.
  48870. </p>
  48871. <p>This filter accepts the following options:
  48872. </p>
  48873. <dl class="table">
  48874. <dt><samp class="option">timestamps</samp></dt>
  48875. <dd><p>Timestamps of output segments separated by &rsquo;|&rsquo;. The first segment will run
  48876. from the beginning of the input stream. The last segment will run until
  48877. the end of the input stream
  48878. </p>
  48879. </dd>
  48880. <dt><samp class="option">frames, samples</samp></dt>
  48881. <dd><p>Exact frame/sample count to split the segments.
  48882. </p></dd>
  48883. </dl>
  48884. <p>In all cases, prefixing an each segment with &rsquo;+&rsquo; will make it relative to the
  48885. previous segment.
  48886. </p>
  48887. <ul class="mini-toc">
  48888. <li><a href="#Examples-180" accesskey="1">Examples</a></li>
  48889. </ul>
  48890. <div class="subsection-level-extent" id="Examples-180">
  48891. <h4 class="subsection"><span>39.16.1 Examples<a class="copiable-link" href="#Examples-180"> &para;</a></span></h4>
  48892. <ul class="itemize mark-bullet">
  48893. <li>Split input audio stream into three output audio streams, starting at start of input audio stream
  48894. and storing that in 1st output audio stream, then following at 60th second and storing than in 2nd
  48895. output audio stream, and last after 150th second of input audio stream store in 3rd output audio stream:
  48896. <div class="example">
  48897. <pre class="example-preformatted">asegment=timestamps=&quot;60|150&quot;
  48898. </pre></div>
  48899. </li></ul>
  48900. <a class="anchor" id="select"></a></div>
  48901. </div>
  48902. <div class="section-level-extent" id="select_002c-aselect">
  48903. <h3 class="section"><span>39.17 select, aselect<a class="copiable-link" href="#select_002c-aselect"> &para;</a></span></h3>
  48904. <p>Select frames to pass in output.
  48905. </p>
  48906. <p>This filter accepts the following options:
  48907. </p>
  48908. <dl class="table">
  48909. <dt><samp class="option">expr, e</samp></dt>
  48910. <dd><p>Set expression, which is evaluated for each input frame.
  48911. </p>
  48912. <p>If the expression is evaluated to zero, the frame is discarded.
  48913. </p>
  48914. <p>If the evaluation result is negative or NaN, the frame is sent to the
  48915. first output; otherwise it is sent to the output with index
  48916. <code class="code">ceil(val)-1</code>, assuming that the input index starts from 0.
  48917. </p>
  48918. <p>For example a value of <code class="code">1.2</code> corresponds to the output with index
  48919. <code class="code">ceil(1.2)-1 = 2-1 = 1</code>, that is the second output.
  48920. </p>
  48921. </dd>
  48922. <dt><samp class="option">outputs, n</samp></dt>
  48923. <dd><p>Set the number of outputs. The output to which to send the selected
  48924. frame is based on the result of the evaluation. Default value is 1.
  48925. </p></dd>
  48926. </dl>
  48927. <p>The expression can contain the following constants:
  48928. </p>
  48929. <dl class="table">
  48930. <dt><samp class="option">n</samp></dt>
  48931. <dd><p>The (sequential) number of the filtered frame, starting from 0.
  48932. </p>
  48933. </dd>
  48934. <dt><samp class="option">selected_n</samp></dt>
  48935. <dd><p>The (sequential) number of the selected frame, starting from 0.
  48936. </p>
  48937. </dd>
  48938. <dt><samp class="option">prev_selected_n</samp></dt>
  48939. <dd><p>The sequential number of the last selected frame. It&rsquo;s NAN if undefined.
  48940. </p>
  48941. </dd>
  48942. <dt><samp class="option">TB</samp></dt>
  48943. <dd><p>The timebase of the input timestamps.
  48944. </p>
  48945. </dd>
  48946. <dt><samp class="option">pts</samp></dt>
  48947. <dd><p>The PTS (Presentation TimeStamp) of the filtered frame,
  48948. expressed in <var class="var">TB</var> units. It&rsquo;s NAN if undefined.
  48949. </p>
  48950. </dd>
  48951. <dt><samp class="option">t</samp></dt>
  48952. <dd><p>The PTS of the filtered frame,
  48953. expressed in seconds. It&rsquo;s NAN if undefined.
  48954. </p>
  48955. </dd>
  48956. <dt><samp class="option">prev_pts</samp></dt>
  48957. <dd><p>The PTS of the previously filtered frame. It&rsquo;s NAN if undefined.
  48958. </p>
  48959. </dd>
  48960. <dt><samp class="option">prev_selected_pts</samp></dt>
  48961. <dd><p>The PTS of the last previously filtered frame. It&rsquo;s NAN if undefined.
  48962. </p>
  48963. </dd>
  48964. <dt><samp class="option">prev_selected_t</samp></dt>
  48965. <dd><p>The PTS of the last previously selected frame, expressed in seconds. It&rsquo;s NAN if undefined.
  48966. </p>
  48967. </dd>
  48968. <dt><samp class="option">start_pts</samp></dt>
  48969. <dd><p>The first PTS in the stream which is not NAN. It remains NAN if not found.
  48970. </p>
  48971. </dd>
  48972. <dt><samp class="option">start_t</samp></dt>
  48973. <dd><p>The first PTS, in seconds, in the stream which is not NAN. It remains NAN if not found.
  48974. </p>
  48975. </dd>
  48976. <dt><samp class="option">pict_type <em class="emph">(video only)</em></samp></dt>
  48977. <dd><p>The type of the filtered frame. It can assume one of the following
  48978. values:
  48979. </p><dl class="table">
  48980. <dt><samp class="option">I</samp></dt>
  48981. <dt><samp class="option">P</samp></dt>
  48982. <dt><samp class="option">B</samp></dt>
  48983. <dt><samp class="option">S</samp></dt>
  48984. <dt><samp class="option">SI</samp></dt>
  48985. <dt><samp class="option">SP</samp></dt>
  48986. <dt><samp class="option">BI</samp></dt>
  48987. </dl>
  48988. </dd>
  48989. <dt><samp class="option">interlace_type <em class="emph">(video only)</em></samp></dt>
  48990. <dd><p>The frame interlace type. It can assume one of the following values:
  48991. </p><dl class="table">
  48992. <dt><samp class="option">PROGRESSIVE</samp></dt>
  48993. <dd><p>The frame is progressive (not interlaced).
  48994. </p></dd>
  48995. <dt><samp class="option">TOPFIRST</samp></dt>
  48996. <dd><p>The frame is top-field-first.
  48997. </p></dd>
  48998. <dt><samp class="option">BOTTOMFIRST</samp></dt>
  48999. <dd><p>The frame is bottom-field-first.
  49000. </p></dd>
  49001. </dl>
  49002. </dd>
  49003. <dt><samp class="option">consumed_sample_n <em class="emph">(audio only)</em></samp></dt>
  49004. <dd><p>the number of selected samples before the current frame
  49005. </p>
  49006. </dd>
  49007. <dt><samp class="option">samples_n <em class="emph">(audio only)</em></samp></dt>
  49008. <dd><p>the number of samples in the current frame
  49009. </p>
  49010. </dd>
  49011. <dt><samp class="option">sample_rate <em class="emph">(audio only)</em></samp></dt>
  49012. <dd><p>the input sample rate
  49013. </p>
  49014. </dd>
  49015. <dt><samp class="option">key</samp></dt>
  49016. <dd><p>This is 1 if the filtered frame is a key-frame, 0 otherwise.
  49017. </p>
  49018. </dd>
  49019. <dt><samp class="option">pos</samp></dt>
  49020. <dd><p>the position in the file of the filtered frame, -1 if the information
  49021. is not available (e.g. for synthetic video); deprecated, do not use
  49022. </p>
  49023. </dd>
  49024. <dt><samp class="option">scene <em class="emph">(video only)</em></samp></dt>
  49025. <dd><p>value between 0 and 1 to indicate a new scene; a low value reflects a low
  49026. probability for the current frame to introduce a new scene, while a higher
  49027. value means the current frame is more likely to be one (see the example below)
  49028. </p>
  49029. </dd>
  49030. <dt><samp class="option">concatdec_select</samp></dt>
  49031. <dd><p>The concat demuxer can select only part of a concat input file by setting an
  49032. inpoint and an outpoint, but the output packets may not be entirely contained
  49033. in the selected interval. By using this variable, it is possible to skip frames
  49034. generated by the concat demuxer which are not exactly contained in the selected
  49035. interval.
  49036. </p>
  49037. <p>This works by comparing the frame pts against the <var class="var">lavf.concat.start_time</var>
  49038. and the <var class="var">lavf.concat.duration</var> packet metadata values which are also
  49039. present in the decoded frames.
  49040. </p>
  49041. <p>The <var class="var">concatdec_select</var> variable is -1 if the frame pts is at least
  49042. start_time and either the duration metadata is missing or the frame pts is less
  49043. than start_time + duration, 0 otherwise, and NaN if the start_time metadata is
  49044. missing.
  49045. </p>
  49046. <p>That basically means that an input frame is selected if its pts is within the
  49047. interval set by the concat demuxer.
  49048. </p>
  49049. </dd>
  49050. </dl>
  49051. <p>The default value of the select expression is &quot;1&quot;.
  49052. </p>
  49053. <ul class="mini-toc">
  49054. <li><a href="#Examples-181" accesskey="1">Examples</a></li>
  49055. </ul>
  49056. <div class="subsection-level-extent" id="Examples-181">
  49057. <h4 class="subsection"><span>39.17.1 Examples<a class="copiable-link" href="#Examples-181"> &para;</a></span></h4>
  49058. <ul class="itemize mark-bullet">
  49059. <li>Select all frames in input:
  49060. <div class="example">
  49061. <pre class="example-preformatted">select
  49062. </pre></div>
  49063. <p>The example above is the same as:
  49064. </p><div class="example">
  49065. <pre class="example-preformatted">select=1
  49066. </pre></div>
  49067. </li><li>Skip all frames:
  49068. <div class="example">
  49069. <pre class="example-preformatted">select=0
  49070. </pre></div>
  49071. </li><li>Select only I-frames:
  49072. <div class="example">
  49073. <pre class="example-preformatted">select='eq(pict_type\,I)'
  49074. </pre></div>
  49075. </li><li>Select one frame every 100:
  49076. <div class="example">
  49077. <pre class="example-preformatted">select='not(mod(n\,100))'
  49078. </pre></div>
  49079. </li><li>Select only frames contained in the 10-20 time interval:
  49080. <div class="example">
  49081. <pre class="example-preformatted">select=between(t\,10\,20)
  49082. </pre></div>
  49083. </li><li>Select only I-frames contained in the 10-20 time interval:
  49084. <div class="example">
  49085. <pre class="example-preformatted">select=between(t\,10\,20)*eq(pict_type\,I)
  49086. </pre></div>
  49087. </li><li>Select frames with a minimum distance of 10 seconds:
  49088. <div class="example">
  49089. <pre class="example-preformatted">select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
  49090. </pre></div>
  49091. </li><li>Use aselect to select only audio frames with samples number &gt; 100:
  49092. <div class="example">
  49093. <pre class="example-preformatted">aselect='gt(samples_n\,100)'
  49094. </pre></div>
  49095. </li><li>Create a mosaic of the first scenes:
  49096. <div class="example">
  49097. <pre class="example-preformatted">ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
  49098. </pre></div>
  49099. <p>Comparing <var class="var">scene</var> against a value between 0.3 and 0.5 is generally a sane
  49100. choice.
  49101. </p>
  49102. </li><li>Send even and odd frames to separate outputs, and compose them:
  49103. <div class="example">
  49104. <pre class="example-preformatted">select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
  49105. </pre></div>
  49106. </li><li>Select useful frames from an ffconcat file which is using inpoints and
  49107. outpoints but where the source files are not intra frame only.
  49108. <div class="example">
  49109. <pre class="example-preformatted">ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi
  49110. </pre></div>
  49111. </li></ul>
  49112. </div>
  49113. </div>
  49114. <div class="section-level-extent" id="sendcmd_002c-asendcmd">
  49115. <h3 class="section"><span>39.18 sendcmd, asendcmd<a class="copiable-link" href="#sendcmd_002c-asendcmd"> &para;</a></span></h3>
  49116. <p>Send commands to filters in the filtergraph.
  49117. </p>
  49118. <p>These filters read commands to be sent to other filters in the
  49119. filtergraph.
  49120. </p>
  49121. <p><code class="code">sendcmd</code> must be inserted between two video filters,
  49122. <code class="code">asendcmd</code> must be inserted between two audio filters, but apart
  49123. from that they act the same way.
  49124. </p>
  49125. <p>The specification of commands can be provided in the filter arguments
  49126. with the <var class="var">commands</var> option, or in a file specified by the
  49127. <var class="var">filename</var> option.
  49128. </p>
  49129. <p>These filters accept the following options:
  49130. </p><dl class="table">
  49131. <dt><samp class="option">commands, c</samp></dt>
  49132. <dd><p>Set the commands to be read and sent to the other filters.
  49133. </p></dd>
  49134. <dt><samp class="option">filename, f</samp></dt>
  49135. <dd><p>Set the filename of the commands to be read and sent to the other
  49136. filters.
  49137. </p></dd>
  49138. </dl>
  49139. <ul class="mini-toc">
  49140. <li><a href="#Commands-syntax" accesskey="1">Commands syntax</a></li>
  49141. <li><a href="#Examples-182" accesskey="2">Examples</a></li>
  49142. </ul>
  49143. <div class="subsection-level-extent" id="Commands-syntax">
  49144. <h4 class="subsection"><span>39.18.1 Commands syntax<a class="copiable-link" href="#Commands-syntax"> &para;</a></span></h4>
  49145. <p>A commands description consists of a sequence of interval
  49146. specifications, comprising a list of commands to be executed when a
  49147. particular event related to that interval occurs. The occurring event
  49148. is typically the current frame time entering or leaving a given time
  49149. interval.
  49150. </p>
  49151. <p>An interval is specified by the following syntax:
  49152. </p><div class="example">
  49153. <pre class="example-preformatted"><var class="var">START</var>[-<var class="var">END</var>] <var class="var">COMMANDS</var>;
  49154. </pre></div>
  49155. <p>The time interval is specified by the <var class="var">START</var> and <var class="var">END</var> times.
  49156. <var class="var">END</var> is optional and defaults to the maximum time.
  49157. </p>
  49158. <p>The current frame time is considered within the specified interval if
  49159. it is included in the interval [<var class="var">START</var>, <var class="var">END</var>), that is when
  49160. the time is greater or equal to <var class="var">START</var> and is lesser than
  49161. <var class="var">END</var>.
  49162. </p>
  49163. <p><var class="var">COMMANDS</var> consists of a sequence of one or more command
  49164. specifications, separated by &quot;,&quot;, relating to that interval. The
  49165. syntax of a command specification is given by:
  49166. </p><div class="example">
  49167. <pre class="example-preformatted">[<var class="var">FLAGS</var>] <var class="var">TARGET</var> <var class="var">COMMAND</var> <var class="var">ARG</var>
  49168. </pre></div>
  49169. <p><var class="var">FLAGS</var> is optional and specifies the type of events relating to
  49170. the time interval which enable sending the specified command, and must
  49171. be a non-null sequence of identifier flags separated by &quot;+&quot; or &quot;|&quot; and
  49172. enclosed between &quot;[&quot; and &quot;]&quot;.
  49173. </p>
  49174. <p>The following flags are recognized:
  49175. </p><dl class="table">
  49176. <dt><samp class="option">enter</samp></dt>
  49177. <dd><p>The command is sent when the current frame timestamp enters the
  49178. specified interval. In other words, the command is sent when the
  49179. previous frame timestamp was not in the given interval, and the
  49180. current is.
  49181. </p>
  49182. </dd>
  49183. <dt><samp class="option">leave</samp></dt>
  49184. <dd><p>The command is sent when the current frame timestamp leaves the
  49185. specified interval. In other words, the command is sent when the
  49186. previous frame timestamp was in the given interval, and the
  49187. current is not.
  49188. </p>
  49189. </dd>
  49190. <dt><samp class="option">expr</samp></dt>
  49191. <dd><p>The command <var class="var">ARG</var> is interpreted as expression and result of
  49192. expression is passed as <var class="var">ARG</var>.
  49193. </p>
  49194. <p>The expression is evaluated through the eval API and can contain the following
  49195. constants:
  49196. </p>
  49197. <dl class="table">
  49198. <dt><samp class="option">POS</samp></dt>
  49199. <dd><p>Original position in the file of the frame, or undefined if undefined
  49200. for the current frame. Deprecated, do not use.
  49201. </p>
  49202. </dd>
  49203. <dt><samp class="option">PTS</samp></dt>
  49204. <dd><p>The presentation timestamp in input.
  49205. </p>
  49206. </dd>
  49207. <dt><samp class="option">N</samp></dt>
  49208. <dd><p>The count of the input frame for video or audio, starting from 0.
  49209. </p>
  49210. </dd>
  49211. <dt><samp class="option">T</samp></dt>
  49212. <dd><p>The time in seconds of the current frame.
  49213. </p>
  49214. </dd>
  49215. <dt><samp class="option">TS</samp></dt>
  49216. <dd><p>The start time in seconds of the current command interval.
  49217. </p>
  49218. </dd>
  49219. <dt><samp class="option">TE</samp></dt>
  49220. <dd><p>The end time in seconds of the current command interval.
  49221. </p>
  49222. </dd>
  49223. <dt><samp class="option">TI</samp></dt>
  49224. <dd><p>The interpolated time of the current command interval, TI = (T - TS) / (TE - TS).
  49225. </p>
  49226. </dd>
  49227. <dt><samp class="option">W</samp></dt>
  49228. <dd><p>The video frame width.
  49229. </p>
  49230. </dd>
  49231. <dt><samp class="option">H</samp></dt>
  49232. <dd><p>The video frame height.
  49233. </p></dd>
  49234. </dl>
  49235. </dd>
  49236. </dl>
  49237. <p>If <var class="var">FLAGS</var> is not specified, a default value of <code class="code">[enter]</code> is
  49238. assumed.
  49239. </p>
  49240. <p><var class="var">TARGET</var> specifies the target of the command, usually the name of
  49241. the filter class or a specific filter instance name.
  49242. </p>
  49243. <p><var class="var">COMMAND</var> specifies the name of the command for the target filter.
  49244. </p>
  49245. <p><var class="var">ARG</var> is optional and specifies the optional list of argument for
  49246. the given <var class="var">COMMAND</var>.
  49247. </p>
  49248. <p>Between one interval specification and another, whitespaces, or
  49249. sequences of characters starting with <code class="code">#</code> until the end of line,
  49250. are ignored and can be used to annotate comments.
  49251. </p>
  49252. <p>A simplified BNF description of the commands specification syntax
  49253. follows:
  49254. </p><div class="example">
  49255. <pre class="example-preformatted"><var class="var">COMMAND_FLAG</var> ::= &quot;enter&quot; | &quot;leave&quot;
  49256. <var class="var">COMMAND_FLAGS</var> ::= <var class="var">COMMAND_FLAG</var> [(+|&quot;|&quot;)<var class="var">COMMAND_FLAG</var>]
  49257. <var class="var">COMMAND</var> ::= [&quot;[&quot; <var class="var">COMMAND_FLAGS</var> &quot;]&quot;] <var class="var">TARGET</var> <var class="var">COMMAND</var> [<var class="var">ARG</var>]
  49258. <var class="var">COMMANDS</var> ::= <var class="var">COMMAND</var> [,<var class="var">COMMANDS</var>]
  49259. <var class="var">INTERVAL</var> ::= <var class="var">START</var>[-<var class="var">END</var>] <var class="var">COMMANDS</var>
  49260. <var class="var">INTERVALS</var> ::= <var class="var">INTERVAL</var>[;<var class="var">INTERVALS</var>]
  49261. </pre></div>
  49262. </div>
  49263. <div class="subsection-level-extent" id="Examples-182">
  49264. <h4 class="subsection"><span>39.18.2 Examples<a class="copiable-link" href="#Examples-182"> &para;</a></span></h4>
  49265. <ul class="itemize mark-bullet">
  49266. <li>Specify audio tempo change at second 4:
  49267. <div class="example">
  49268. <pre class="example-preformatted">asendcmd=c='4.0 atempo tempo 1.5',atempo
  49269. </pre></div>
  49270. </li><li>Target a specific filter instance:
  49271. <div class="example">
  49272. <pre class="example-preformatted">asendcmd=c='4.0 atempo@my tempo 1.5',atempo@my
  49273. </pre></div>
  49274. </li><li>Specify a list of drawtext and hue commands in a file.
  49275. <div class="example">
  49276. <pre class="example-preformatted"># show text in the interval 5-10
  49277. 5.0-10.0 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=hello world',
  49278. [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=';
  49279. # desaturate the image in the interval 15-20
  49280. 15.0-20.0 [enter] hue s 0,
  49281. [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=nocolor',
  49282. [leave] hue s 1,
  49283. [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=color';
  49284. # apply an exponential saturation fade-out effect, starting from time 25
  49285. 25 [enter] hue s exp(25-t)
  49286. </pre></div>
  49287. <p>A filtergraph allowing to read and process the above command list
  49288. stored in a file <samp class="file">test.cmd</samp>, can be specified with:
  49289. </p><div class="example">
  49290. <pre class="example-preformatted">sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text='',hue
  49291. </pre></div>
  49292. </li></ul>
  49293. <a class="anchor" id="setpts"></a></div>
  49294. </div>
  49295. <div class="section-level-extent" id="setpts_002c-asetpts">
  49296. <h3 class="section"><span>39.19 setpts, asetpts<a class="copiable-link" href="#setpts_002c-asetpts"> &para;</a></span></h3>
  49297. <p>Change the PTS (presentation timestamp) of the input frames.
  49298. </p>
  49299. <p><code class="code">setpts</code> works on video frames, <code class="code">asetpts</code> on audio frames.
  49300. </p>
  49301. <p>This filter accepts the following options:
  49302. </p>
  49303. <dl class="table">
  49304. <dt><samp class="option">expr</samp></dt>
  49305. <dd><p>The expression which is evaluated for each frame to construct its timestamp.
  49306. </p>
  49307. </dd>
  49308. </dl>
  49309. <p>The expression is evaluated through the eval API and can contain the following
  49310. constants:
  49311. </p>
  49312. <dl class="table">
  49313. <dt><samp class="option">FRAME_RATE, FR</samp></dt>
  49314. <dd><p>frame rate, only defined for constant frame-rate video
  49315. </p>
  49316. </dd>
  49317. <dt><samp class="option">PTS</samp></dt>
  49318. <dd><p>The presentation timestamp in input
  49319. </p>
  49320. </dd>
  49321. <dt><samp class="option">N</samp></dt>
  49322. <dd><p>The count of the input frame for video or the number of consumed samples,
  49323. not including the current frame for audio, starting from 0.
  49324. </p>
  49325. </dd>
  49326. <dt><samp class="option">NB_CONSUMED_SAMPLES</samp></dt>
  49327. <dd><p>The number of consumed samples, not including the current frame (only
  49328. audio)
  49329. </p>
  49330. </dd>
  49331. <dt><samp class="option">NB_SAMPLES, S</samp></dt>
  49332. <dd><p>The number of samples in the current frame (only audio)
  49333. </p>
  49334. </dd>
  49335. <dt><samp class="option">SAMPLE_RATE, SR</samp></dt>
  49336. <dd><p>The audio sample rate.
  49337. </p>
  49338. </dd>
  49339. <dt><samp class="option">STARTPTS</samp></dt>
  49340. <dd><p>The PTS of the first frame.
  49341. </p>
  49342. </dd>
  49343. <dt><samp class="option">STARTT</samp></dt>
  49344. <dd><p>the time in seconds of the first frame
  49345. </p>
  49346. </dd>
  49347. <dt><samp class="option">INTERLACED</samp></dt>
  49348. <dd><p>State whether the current frame is interlaced.
  49349. </p>
  49350. </dd>
  49351. <dt><samp class="option">T</samp></dt>
  49352. <dd><p>the time in seconds of the current frame
  49353. </p>
  49354. </dd>
  49355. <dt><samp class="option">POS</samp></dt>
  49356. <dd><p>original position in the file of the frame, or undefined if undefined
  49357. for the current frame; deprecated, do not use
  49358. </p>
  49359. </dd>
  49360. <dt><samp class="option">PREV_INPTS</samp></dt>
  49361. <dd><p>The previous input PTS.
  49362. </p>
  49363. </dd>
  49364. <dt><samp class="option">PREV_INT</samp></dt>
  49365. <dd><p>previous input time in seconds
  49366. </p>
  49367. </dd>
  49368. <dt><samp class="option">PREV_OUTPTS</samp></dt>
  49369. <dd><p>The previous output PTS.
  49370. </p>
  49371. </dd>
  49372. <dt><samp class="option">PREV_OUTT</samp></dt>
  49373. <dd><p>previous output time in seconds
  49374. </p>
  49375. </dd>
  49376. <dt><samp class="option">RTCTIME</samp></dt>
  49377. <dd><p>The wallclock (RTC) time in microseconds. This is deprecated, use time(0)
  49378. instead.
  49379. </p>
  49380. </dd>
  49381. <dt><samp class="option">RTCSTART</samp></dt>
  49382. <dd><p>The wallclock (RTC) time at the start of the movie in microseconds.
  49383. </p>
  49384. </dd>
  49385. <dt><samp class="option">TB</samp></dt>
  49386. <dd><p>The timebase of the input timestamps.
  49387. </p>
  49388. </dd>
  49389. <dt><samp class="option">T_CHANGE</samp></dt>
  49390. <dd><p>Time of the first frame after command was applied or time of the first frame if no commands.
  49391. </p>
  49392. </dd>
  49393. </dl>
  49394. <ul class="mini-toc">
  49395. <li><a href="#Examples-183" accesskey="1">Examples</a></li>
  49396. <li><a href="#Commands-164" accesskey="2">Commands</a></li>
  49397. </ul>
  49398. <div class="subsection-level-extent" id="Examples-183">
  49399. <h4 class="subsection"><span>39.19.1 Examples<a class="copiable-link" href="#Examples-183"> &para;</a></span></h4>
  49400. <ul class="itemize mark-bullet">
  49401. <li>Start counting PTS from zero
  49402. <div class="example">
  49403. <pre class="example-preformatted">setpts=PTS-STARTPTS
  49404. </pre></div>
  49405. </li><li>Apply fast motion effect:
  49406. <div class="example">
  49407. <pre class="example-preformatted">setpts=0.5*PTS
  49408. </pre></div>
  49409. </li><li>Apply slow motion effect:
  49410. <div class="example">
  49411. <pre class="example-preformatted">setpts=2.0*PTS
  49412. </pre></div>
  49413. </li><li>Set fixed rate of 25 frames per second:
  49414. <div class="example">
  49415. <pre class="example-preformatted">setpts=N/(25*TB)
  49416. </pre></div>
  49417. </li><li>Apply a random jitter effect of +/-100 TB units:
  49418. <div class="example">
  49419. <pre class="example-preformatted">setpts=PTS+randomi(0, -100\,100)
  49420. </pre></div>
  49421. </li><li>Set fixed rate 25 fps with some jitter:
  49422. <div class="example">
  49423. <pre class="example-preformatted">setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
  49424. </pre></div>
  49425. </li><li>Apply an offset of 10 seconds to the input PTS:
  49426. <div class="example">
  49427. <pre class="example-preformatted">setpts=PTS+10/TB
  49428. </pre></div>
  49429. </li><li>Generate timestamps from a &quot;live source&quot; and rebase onto the current timebase:
  49430. <div class="example">
  49431. <pre class="example-preformatted">setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
  49432. </pre></div>
  49433. </li><li>Generate timestamps by counting samples:
  49434. <div class="example">
  49435. <pre class="example-preformatted">asetpts=N/SR/TB
  49436. </pre></div>
  49437. </li></ul>
  49438. </div>
  49439. <div class="subsection-level-extent" id="Commands-164">
  49440. <h4 class="subsection"><span>39.19.2 Commands<a class="copiable-link" href="#Commands-164"> &para;</a></span></h4>
  49441. <p>Both filters support all above options as <a class="ref" href="#commands">commands</a>.
  49442. </p>
  49443. </div>
  49444. </div>
  49445. <div class="section-level-extent" id="setrange">
  49446. <h3 class="section"><span>39.20 setrange<a class="copiable-link" href="#setrange"> &para;</a></span></h3>
  49447. <p>Force color range for the output video frame.
  49448. </p>
  49449. <p>The <code class="code">setrange</code> filter marks the color range property for the
  49450. output frames. It does not change the input frame, but only sets the
  49451. corresponding property, which affects how the frame is treated by
  49452. following filters.
  49453. </p>
  49454. <p>The filter accepts the following options:
  49455. </p>
  49456. <dl class="table">
  49457. <dt><samp class="option">range</samp></dt>
  49458. <dd><p>Available values are:
  49459. </p>
  49460. <dl class="table">
  49461. <dt>&lsquo;<samp class="samp">auto</samp>&rsquo;</dt>
  49462. <dd><p>Keep the same color range property.
  49463. </p>
  49464. </dd>
  49465. <dt>&lsquo;<samp class="samp">unspecified, unknown</samp>&rsquo;</dt>
  49466. <dd><p>Set the color range as unspecified.
  49467. </p>
  49468. </dd>
  49469. <dt>&lsquo;<samp class="samp">limited, tv, mpeg</samp>&rsquo;</dt>
  49470. <dd><p>Set the color range as limited.
  49471. </p>
  49472. </dd>
  49473. <dt>&lsquo;<samp class="samp">full, pc, jpeg</samp>&rsquo;</dt>
  49474. <dd><p>Set the color range as full.
  49475. </p></dd>
  49476. </dl>
  49477. </dd>
  49478. </dl>
  49479. </div>
  49480. <div class="section-level-extent" id="settb_002c-asettb">
  49481. <h3 class="section"><span>39.21 settb, asettb<a class="copiable-link" href="#settb_002c-asettb"> &para;</a></span></h3>
  49482. <p>Set the timebase to use for the output frames timestamps.
  49483. It is mainly useful for testing timebase configuration.
  49484. </p>
  49485. <p>It accepts the following parameters:
  49486. </p>
  49487. <dl class="table">
  49488. <dt><samp class="option">expr, tb</samp></dt>
  49489. <dd><p>The expression which is evaluated into the output timebase.
  49490. </p>
  49491. </dd>
  49492. </dl>
  49493. <p>The value for <samp class="option">tb</samp> is an arithmetic expression representing a
  49494. rational. The expression can contain the constants &quot;AVTB&quot; (the default
  49495. timebase), &quot;intb&quot; (the input timebase) and &quot;sr&quot; (the sample rate,
  49496. audio only). Default value is &quot;intb&quot;.
  49497. </p>
  49498. <ul class="mini-toc">
  49499. <li><a href="#Examples-184" accesskey="1">Examples</a></li>
  49500. </ul>
  49501. <div class="subsection-level-extent" id="Examples-184">
  49502. <h4 class="subsection"><span>39.21.1 Examples<a class="copiable-link" href="#Examples-184"> &para;</a></span></h4>
  49503. <ul class="itemize mark-bullet">
  49504. <li>Set the timebase to 1/25:
  49505. <div class="example">
  49506. <pre class="example-preformatted">settb=expr=1/25
  49507. </pre></div>
  49508. </li><li>Set the timebase to 1/10:
  49509. <div class="example">
  49510. <pre class="example-preformatted">settb=expr=0.1
  49511. </pre></div>
  49512. </li><li>Set the timebase to 1001/1000:
  49513. <div class="example">
  49514. <pre class="example-preformatted">settb=1+0.001
  49515. </pre></div>
  49516. </li><li>Set the timebase to 2*intb:
  49517. <div class="example">
  49518. <pre class="example-preformatted">settb=2*intb
  49519. </pre></div>
  49520. </li><li>Set the default timebase value:
  49521. <div class="example">
  49522. <pre class="example-preformatted">settb=AVTB
  49523. </pre></div>
  49524. </li></ul>
  49525. </div>
  49526. </div>
  49527. <div class="section-level-extent" id="showcqt">
  49528. <h3 class="section"><span>39.22 showcqt<a class="copiable-link" href="#showcqt"> &para;</a></span></h3>
  49529. <p>Convert input audio to a video output representing frequency spectrum
  49530. logarithmically using Brown-Puckette constant Q transform algorithm with
  49531. direct frequency domain coefficient calculation (but the transform itself
  49532. is not really constant Q, instead the Q factor is actually variable/clamped),
  49533. with musical tone scale, from E0 to D#10.
  49534. </p>
  49535. <p>The filter accepts the following options:
  49536. </p>
  49537. <dl class="table">
  49538. <dt><samp class="option">size, s</samp></dt>
  49539. <dd><p>Specify the video size for the output. It must be even. For the syntax of this option,
  49540. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  49541. Default value is <code class="code">1920x1080</code>.
  49542. </p>
  49543. </dd>
  49544. <dt><samp class="option">fps, rate, r</samp></dt>
  49545. <dd><p>Set the output frame rate. Default value is <code class="code">25</code>.
  49546. </p>
  49547. </dd>
  49548. <dt><samp class="option">bar_h</samp></dt>
  49549. <dd><p>Set the bargraph height. It must be even. Default value is <code class="code">-1</code> which
  49550. computes the bargraph height automatically.
  49551. </p>
  49552. </dd>
  49553. <dt><samp class="option">axis_h</samp></dt>
  49554. <dd><p>Set the axis height. It must be even. Default value is <code class="code">-1</code> which computes
  49555. the axis height automatically.
  49556. </p>
  49557. </dd>
  49558. <dt><samp class="option">sono_h</samp></dt>
  49559. <dd><p>Set the sonogram height. It must be even. Default value is <code class="code">-1</code> which
  49560. computes the sonogram height automatically.
  49561. </p>
  49562. </dd>
  49563. <dt><samp class="option">fullhd</samp></dt>
  49564. <dd><p>Set the fullhd resolution. This option is deprecated, use <var class="var">size</var>, <var class="var">s</var>
  49565. instead. Default value is <code class="code">1</code>.
  49566. </p>
  49567. </dd>
  49568. <dt><samp class="option">sono_v, volume</samp></dt>
  49569. <dd><p>Specify the sonogram volume expression. It can contain variables:
  49570. </p><dl class="table">
  49571. <dt><samp class="option">bar_v</samp></dt>
  49572. <dd><p>the <var class="var">bar_v</var> evaluated expression
  49573. </p></dd>
  49574. <dt><samp class="option">frequency, freq, f</samp></dt>
  49575. <dd><p>the frequency where it is evaluated
  49576. </p></dd>
  49577. <dt><samp class="option">timeclamp, tc</samp></dt>
  49578. <dd><p>the value of <var class="var">timeclamp</var> option
  49579. </p></dd>
  49580. </dl>
  49581. <p>and functions:
  49582. </p><dl class="table">
  49583. <dt><samp class="option">a_weighting(f)</samp></dt>
  49584. <dd><p>A-weighting of equal loudness
  49585. </p></dd>
  49586. <dt><samp class="option">b_weighting(f)</samp></dt>
  49587. <dd><p>B-weighting of equal loudness
  49588. </p></dd>
  49589. <dt><samp class="option">c_weighting(f)</samp></dt>
  49590. <dd><p>C-weighting of equal loudness.
  49591. </p></dd>
  49592. </dl>
  49593. <p>Default value is <code class="code">16</code>.
  49594. </p>
  49595. </dd>
  49596. <dt><samp class="option">bar_v, volume2</samp></dt>
  49597. <dd><p>Specify the bargraph volume expression. It can contain variables:
  49598. </p><dl class="table">
  49599. <dt><samp class="option">sono_v</samp></dt>
  49600. <dd><p>the <var class="var">sono_v</var> evaluated expression
  49601. </p></dd>
  49602. <dt><samp class="option">frequency, freq, f</samp></dt>
  49603. <dd><p>the frequency where it is evaluated
  49604. </p></dd>
  49605. <dt><samp class="option">timeclamp, tc</samp></dt>
  49606. <dd><p>the value of <var class="var">timeclamp</var> option
  49607. </p></dd>
  49608. </dl>
  49609. <p>and functions:
  49610. </p><dl class="table">
  49611. <dt><samp class="option">a_weighting(f)</samp></dt>
  49612. <dd><p>A-weighting of equal loudness
  49613. </p></dd>
  49614. <dt><samp class="option">b_weighting(f)</samp></dt>
  49615. <dd><p>B-weighting of equal loudness
  49616. </p></dd>
  49617. <dt><samp class="option">c_weighting(f)</samp></dt>
  49618. <dd><p>C-weighting of equal loudness.
  49619. </p></dd>
  49620. </dl>
  49621. <p>Default value is <code class="code">sono_v</code>.
  49622. </p>
  49623. </dd>
  49624. <dt><samp class="option">sono_g, gamma</samp></dt>
  49625. <dd><p>Specify the sonogram gamma. Lower gamma makes the spectrum more contrast,
  49626. higher gamma makes the spectrum having more range. Default value is <code class="code">3</code>.
  49627. Acceptable range is <code class="code">[1, 7]</code>.
  49628. </p>
  49629. </dd>
  49630. <dt><samp class="option">bar_g, gamma2</samp></dt>
  49631. <dd><p>Specify the bargraph gamma. Default value is <code class="code">1</code>. Acceptable range is
  49632. <code class="code">[1, 7]</code>.
  49633. </p>
  49634. </dd>
  49635. <dt><samp class="option">bar_t</samp></dt>
  49636. <dd><p>Specify the bargraph transparency level. Lower value makes the bargraph sharper.
  49637. Default value is <code class="code">1</code>. Acceptable range is <code class="code">[0, 1]</code>.
  49638. </p>
  49639. </dd>
  49640. <dt><samp class="option">timeclamp, tc</samp></dt>
  49641. <dd><p>Specify the transform timeclamp. At low frequency, there is trade-off between
  49642. accuracy in time domain and frequency domain. If timeclamp is lower,
  49643. event in time domain is represented more accurately (such as fast bass drum),
  49644. otherwise event in frequency domain is represented more accurately
  49645. (such as bass guitar). Acceptable range is <code class="code">[0.002, 1]</code>. Default value is <code class="code">0.17</code>.
  49646. </p>
  49647. </dd>
  49648. <dt><samp class="option">attack</samp></dt>
  49649. <dd><p>Set attack time in seconds. The default is <code class="code">0</code> (disabled). Otherwise, it
  49650. limits future samples by applying asymmetric windowing in time domain, useful
  49651. when low latency is required. Accepted range is <code class="code">[0, 1]</code>.
  49652. </p>
  49653. </dd>
  49654. <dt><samp class="option">basefreq</samp></dt>
  49655. <dd><p>Specify the transform base frequency. Default value is <code class="code">20.01523126408007475</code>,
  49656. which is frequency 50 cents below E0. Acceptable range is <code class="code">[10, 100000]</code>.
  49657. </p>
  49658. </dd>
  49659. <dt><samp class="option">endfreq</samp></dt>
  49660. <dd><p>Specify the transform end frequency. Default value is <code class="code">20495.59681441799654</code>,
  49661. which is frequency 50 cents above D#10. Acceptable range is <code class="code">[10, 100000]</code>.
  49662. </p>
  49663. </dd>
  49664. <dt><samp class="option">coeffclamp</samp></dt>
  49665. <dd><p>This option is deprecated and ignored.
  49666. </p>
  49667. </dd>
  49668. <dt><samp class="option">tlength</samp></dt>
  49669. <dd><p>Specify the transform length in time domain. Use this option to control accuracy
  49670. trade-off between time domain and frequency domain at every frequency sample.
  49671. It can contain variables:
  49672. </p><dl class="table">
  49673. <dt><samp class="option">frequency, freq, f</samp></dt>
  49674. <dd><p>the frequency where it is evaluated
  49675. </p></dd>
  49676. <dt><samp class="option">timeclamp, tc</samp></dt>
  49677. <dd><p>the value of <var class="var">timeclamp</var> option.
  49678. </p></dd>
  49679. </dl>
  49680. <p>Default value is <code class="code">384*tc/(384+tc*f)</code>.
  49681. </p>
  49682. </dd>
  49683. <dt><samp class="option">count</samp></dt>
  49684. <dd><p>Specify the transform count for every video frame. Default value is <code class="code">6</code>.
  49685. Acceptable range is <code class="code">[1, 30]</code>.
  49686. </p>
  49687. </dd>
  49688. <dt><samp class="option">fcount</samp></dt>
  49689. <dd><p>Specify the transform count for every single pixel. Default value is <code class="code">0</code>,
  49690. which makes it computed automatically. Acceptable range is <code class="code">[0, 10]</code>.
  49691. </p>
  49692. </dd>
  49693. <dt><samp class="option">fontfile</samp></dt>
  49694. <dd><p>Specify font file for use with freetype to draw the axis. If not specified,
  49695. use embedded font. Note that drawing with font file or embedded font is not
  49696. implemented with custom <var class="var">basefreq</var> and <var class="var">endfreq</var>, use <var class="var">axisfile</var>
  49697. option instead.
  49698. </p>
  49699. </dd>
  49700. <dt><samp class="option">font</samp></dt>
  49701. <dd><p>Specify fontconfig pattern. This has lower priority than <var class="var">fontfile</var>. The
  49702. <code class="code">:</code> in the pattern may be replaced by <code class="code">|</code> to avoid unnecessary
  49703. escaping.
  49704. </p>
  49705. </dd>
  49706. <dt><samp class="option">fontcolor</samp></dt>
  49707. <dd><p>Specify font color expression. This is arithmetic expression that should return
  49708. integer value 0xRRGGBB. It can contain variables:
  49709. </p><dl class="table">
  49710. <dt><samp class="option">frequency, freq, f</samp></dt>
  49711. <dd><p>the frequency where it is evaluated
  49712. </p></dd>
  49713. <dt><samp class="option">timeclamp, tc</samp></dt>
  49714. <dd><p>the value of <var class="var">timeclamp</var> option
  49715. </p></dd>
  49716. </dl>
  49717. <p>and functions:
  49718. </p><dl class="table">
  49719. <dt><samp class="option">midi(f)</samp></dt>
  49720. <dd><p>midi number of frequency f, some midi numbers: E0(16), C1(24), C2(36), A4(69)
  49721. </p></dd>
  49722. <dt><samp class="option">r(x), g(x), b(x)</samp></dt>
  49723. <dd><p>red, green, and blue value of intensity x.
  49724. </p></dd>
  49725. </dl>
  49726. <p>Default value is <code class="code">st(0, (midi(f)-59.5)/12);
  49727. st(1, if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0));
  49728. r(1-ld(1)) + b(ld(1))</code>.
  49729. </p>
  49730. </dd>
  49731. <dt><samp class="option">axisfile</samp></dt>
  49732. <dd><p>Specify image file to draw the axis. This option override <var class="var">fontfile</var> and
  49733. <var class="var">fontcolor</var> option.
  49734. </p>
  49735. </dd>
  49736. <dt><samp class="option">axis, text</samp></dt>
  49737. <dd><p>Enable/disable drawing text to the axis. If it is set to <code class="code">0</code>, drawing to
  49738. the axis is disabled, ignoring <var class="var">fontfile</var> and <var class="var">axisfile</var> option.
  49739. Default value is <code class="code">1</code>.
  49740. </p>
  49741. </dd>
  49742. <dt><samp class="option">csp</samp></dt>
  49743. <dd><p>Set colorspace. The accepted values are:
  49744. </p><dl class="table">
  49745. <dt>&lsquo;<samp class="samp">unspecified</samp>&rsquo;</dt>
  49746. <dd><p>Unspecified (default)
  49747. </p>
  49748. </dd>
  49749. <dt>&lsquo;<samp class="samp">bt709</samp>&rsquo;</dt>
  49750. <dd><p>BT.709
  49751. </p>
  49752. </dd>
  49753. <dt>&lsquo;<samp class="samp">fcc</samp>&rsquo;</dt>
  49754. <dd><p>FCC
  49755. </p>
  49756. </dd>
  49757. <dt>&lsquo;<samp class="samp">bt470bg</samp>&rsquo;</dt>
  49758. <dd><p>BT.470BG or BT.601-6 625
  49759. </p>
  49760. </dd>
  49761. <dt>&lsquo;<samp class="samp">smpte170m</samp>&rsquo;</dt>
  49762. <dd><p>SMPTE-170M or BT.601-6 525
  49763. </p>
  49764. </dd>
  49765. <dt>&lsquo;<samp class="samp">smpte240m</samp>&rsquo;</dt>
  49766. <dd><p>SMPTE-240M
  49767. </p>
  49768. </dd>
  49769. <dt>&lsquo;<samp class="samp">bt2020ncl</samp>&rsquo;</dt>
  49770. <dd><p>BT.2020 with non-constant luminance
  49771. </p>
  49772. </dd>
  49773. </dl>
  49774. </dd>
  49775. <dt><samp class="option">cscheme</samp></dt>
  49776. <dd><p>Set spectrogram color scheme. This is list of floating point values with format
  49777. <code class="code">left_r|left_g|left_b|right_r|right_g|right_b</code>.
  49778. The default is <code class="code">1|0.5|0|0|0.5|1</code>.
  49779. </p>
  49780. </dd>
  49781. </dl>
  49782. <ul class="mini-toc">
  49783. <li><a href="#Examples-185" accesskey="1">Examples</a></li>
  49784. </ul>
  49785. <div class="subsection-level-extent" id="Examples-185">
  49786. <h4 class="subsection"><span>39.22.1 Examples<a class="copiable-link" href="#Examples-185"> &para;</a></span></h4>
  49787. <ul class="itemize mark-bullet">
  49788. <li>Playing audio while showing the spectrum:
  49789. <div class="example">
  49790. <pre class="example-preformatted">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
  49791. </pre></div>
  49792. </li><li>Same as above, but with frame rate 30 fps:
  49793. <div class="example">
  49794. <pre class="example-preformatted">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
  49795. </pre></div>
  49796. </li><li>Playing at 1280x720:
  49797. <div class="example">
  49798. <pre class="example-preformatted">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]'
  49799. </pre></div>
  49800. </li><li>Disable sonogram display:
  49801. <div class="example">
  49802. <pre class="example-preformatted">sono_h=0
  49803. </pre></div>
  49804. </li><li>A1 and its harmonics: A1, A2, (near)E3, A3:
  49805. <div class="example">
  49806. <pre class="example-preformatted">ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
  49807. asplit[a][out1]; [a] showcqt [out0]'
  49808. </pre></div>
  49809. </li><li>Same as above, but with more accuracy in frequency domain:
  49810. <div class="example">
  49811. <pre class="example-preformatted">ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t),
  49812. asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
  49813. </pre></div>
  49814. </li><li>Custom volume:
  49815. <div class="example">
  49816. <pre class="example-preformatted">bar_v=10:sono_v=bar_v*a_weighting(f)
  49817. </pre></div>
  49818. </li><li>Custom gamma, now spectrum is linear to the amplitude.
  49819. <div class="example">
  49820. <pre class="example-preformatted">bar_g=2:sono_g=2
  49821. </pre></div>
  49822. </li><li>Custom tlength equation:
  49823. <div class="example">
  49824. <pre class="example-preformatted">tc=0.33:tlength='st(0,0.17); 384*tc / (384 / ld(0) + tc*f /(1-ld(0))) + 384*tc / (tc*f / ld(0) + 384 /(1-ld(0)))'
  49825. </pre></div>
  49826. </li><li>Custom fontcolor and fontfile, C-note is colored green, others are colored blue:
  49827. <div class="example">
  49828. <pre class="example-preformatted">fontcolor='if(mod(floor(midi(f)+0.5),12), 0x0000FF, g(1))':fontfile=myfont.ttf
  49829. </pre></div>
  49830. </li><li>Custom font using fontconfig:
  49831. <div class="example">
  49832. <pre class="example-preformatted">font='Courier New,Monospace,mono|bold'
  49833. </pre></div>
  49834. </li><li>Custom frequency range with custom axis using image file:
  49835. <div class="example">
  49836. <pre class="example-preformatted">axisfile=myaxis.png:basefreq=40:endfreq=10000
  49837. </pre></div>
  49838. </li></ul>
  49839. </div>
  49840. </div>
  49841. <div class="section-level-extent" id="showcwt">
  49842. <h3 class="section"><span>39.23 showcwt<a class="copiable-link" href="#showcwt"> &para;</a></span></h3>
  49843. <p>Convert input audio to video output representing frequency spectrum
  49844. using Continuous Wavelet Transform and Morlet wavelet.
  49845. </p>
  49846. <p>The filter accepts the following options:
  49847. </p>
  49848. <dl class="table">
  49849. <dt><samp class="option">size, s</samp></dt>
  49850. <dd><p>Specify the video size for the output. For the syntax of this option,
  49851. check the <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  49852. Default value is <code class="code">640x512</code>.
  49853. </p>
  49854. </dd>
  49855. <dt><samp class="option">rate, r</samp></dt>
  49856. <dd><p>Set the output frame rate. Default value is <code class="code">25</code>.
  49857. </p>
  49858. </dd>
  49859. <dt><samp class="option">scale</samp></dt>
  49860. <dd><p>Set the frequency scale used. Allowed values are:
  49861. </p>
  49862. <dl class="table">
  49863. <dt><samp class="option">linear</samp></dt>
  49864. <dt><samp class="option">log</samp></dt>
  49865. <dt><samp class="option">bark</samp></dt>
  49866. <dt><samp class="option">mel</samp></dt>
  49867. <dt><samp class="option">erbs</samp></dt>
  49868. <dt><samp class="option">sqrt</samp></dt>
  49869. <dt><samp class="option">cbrt</samp></dt>
  49870. <dt><samp class="option">qdrt</samp></dt>
  49871. <dt><samp class="option">fm</samp></dt>
  49872. </dl>
  49873. <p>Default value is <code class="code">linear</code>.
  49874. </p>
  49875. </dd>
  49876. <dt><samp class="option">iscale</samp></dt>
  49877. <dd><p>Set the intensity scale used. Allowed values are:
  49878. </p>
  49879. <dl class="table">
  49880. <dt><samp class="option">linear</samp></dt>
  49881. <dt><samp class="option">log</samp></dt>
  49882. <dt><samp class="option">sqrt</samp></dt>
  49883. <dt><samp class="option">cbrt</samp></dt>
  49884. <dt><samp class="option">qdrt</samp></dt>
  49885. </dl>
  49886. <p>Default value is <code class="code">log</code>.
  49887. </p>
  49888. </dd>
  49889. <dt><samp class="option">min</samp></dt>
  49890. <dd><p>Set the minimum frequency that will be used in output.
  49891. Default is <code class="code">20</code> Hz.
  49892. </p>
  49893. </dd>
  49894. <dt><samp class="option">max</samp></dt>
  49895. <dd><p>Set the maximum frequency that will be used in output.
  49896. Default is <code class="code">20000</code> Hz. The real frequency upper limit
  49897. depends on input audio&rsquo;s sample rate and such will be enforced
  49898. on this value when it is set to value greater than Nyquist frequency.
  49899. </p>
  49900. </dd>
  49901. <dt><samp class="option">imin</samp></dt>
  49902. <dd><p>Set the minimum intensity that will be used in output.
  49903. </p>
  49904. </dd>
  49905. <dt><samp class="option">imax</samp></dt>
  49906. <dd><p>Set the maximum intensity that will be used in output.
  49907. </p>
  49908. </dd>
  49909. <dt><samp class="option">logb</samp></dt>
  49910. <dd><p>Set the logarithmic basis for brightness strength when
  49911. mapping calculated magnitude values to pixel values.
  49912. Allowed range is from <code class="code">0</code> to <code class="code">1</code>.
  49913. Default value is <code class="code">0.0001</code>.
  49914. </p>
  49915. </dd>
  49916. <dt><samp class="option">deviation</samp></dt>
  49917. <dd><p>Set the frequency deviation.
  49918. Lower values than <code class="code">1</code> are more frequency oriented,
  49919. while higher values than <code class="code">1</code> are more time oriented.
  49920. Allowed range is from <code class="code">0</code> to <code class="code">10</code>.
  49921. Default value is <code class="code">1</code>.
  49922. </p>
  49923. </dd>
  49924. <dt><samp class="option">pps</samp></dt>
  49925. <dd><p>Set the number of pixel output per each second in one row.
  49926. Allowed range is from <code class="code">1</code> to <code class="code">1024</code>.
  49927. Default value is <code class="code">64</code>.
  49928. </p>
  49929. </dd>
  49930. <dt><samp class="option">mode</samp></dt>
  49931. <dd><p>Set the output visual mode. Allowed values are:
  49932. </p>
  49933. <dl class="table">
  49934. <dt><samp class="option">magnitude</samp></dt>
  49935. <dd><p>Show magnitude.
  49936. </p></dd>
  49937. <dt><samp class="option">phase</samp></dt>
  49938. <dd><p>Show only phase.
  49939. </p></dd>
  49940. <dt><samp class="option">magphase</samp></dt>
  49941. <dd><p>Show combination of magnitude and phase.
  49942. Magnitude is mapped to brightness and phase to color.
  49943. </p></dd>
  49944. <dt><samp class="option">channel</samp></dt>
  49945. <dd><p>Show unique color per channel magnitude.
  49946. </p></dd>
  49947. <dt><samp class="option">stereo</samp></dt>
  49948. <dd><p>Show unique color per stereo difference.
  49949. </p></dd>
  49950. </dl>
  49951. <p>Default value is <code class="code">magnitude</code>.
  49952. </p>
  49953. </dd>
  49954. <dt><samp class="option">slide</samp></dt>
  49955. <dd><p>Set the output slide method. Allowed values are:
  49956. </p>
  49957. <dl class="table">
  49958. <dt><samp class="option">replace</samp></dt>
  49959. <dt><samp class="option">scroll</samp></dt>
  49960. <dt><samp class="option">frame</samp></dt>
  49961. </dl>
  49962. </dd>
  49963. <dt><samp class="option">direction</samp></dt>
  49964. <dd><p>Set the direction method for output slide method. Allowed values are:
  49965. </p>
  49966. <dl class="table">
  49967. <dt><samp class="option">lr</samp></dt>
  49968. <dd><p>Direction from left to right.
  49969. </p></dd>
  49970. <dt><samp class="option">rl</samp></dt>
  49971. <dd><p>Direction from right to left.
  49972. </p></dd>
  49973. <dt><samp class="option">ud</samp></dt>
  49974. <dd><p>Direction from up to down.
  49975. </p></dd>
  49976. <dt><samp class="option">du</samp></dt>
  49977. <dd><p>Direction from down to up.
  49978. </p></dd>
  49979. </dl>
  49980. </dd>
  49981. <dt><samp class="option">bar</samp></dt>
  49982. <dd><p>Set the ratio of bargraph display to display size. Default is 0.
  49983. </p>
  49984. </dd>
  49985. <dt><samp class="option">rotation</samp></dt>
  49986. <dd><p>Set color rotation, must be in [-1.0, 1.0] range.
  49987. Default value is <code class="code">0</code>.
  49988. </p></dd>
  49989. </dl>
  49990. </div>
  49991. <div class="section-level-extent" id="showfreqs">
  49992. <h3 class="section"><span>39.24 showfreqs<a class="copiable-link" href="#showfreqs"> &para;</a></span></h3>
  49993. <p>Convert input audio to video output representing the audio power spectrum.
  49994. Audio amplitude is on Y-axis while frequency is on X-axis.
  49995. </p>
  49996. <p>The filter accepts the following options:
  49997. </p>
  49998. <dl class="table">
  49999. <dt><samp class="option">size, s</samp></dt>
  50000. <dd><p>Specify size of video. For the syntax of this option, check the
  50001. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  50002. Default is <code class="code">1024x512</code>.
  50003. </p>
  50004. </dd>
  50005. <dt><samp class="option">rate, r</samp></dt>
  50006. <dd><p>Set video rate. Default is <code class="code">25</code>.
  50007. </p>
  50008. </dd>
  50009. <dt><samp class="option">mode</samp></dt>
  50010. <dd><p>Set display mode.
  50011. This set how each frequency bin will be represented.
  50012. </p>
  50013. <p>It accepts the following values:
  50014. </p><dl class="table">
  50015. <dt>&lsquo;<samp class="samp">line</samp>&rsquo;</dt>
  50016. <dt>&lsquo;<samp class="samp">bar</samp>&rsquo;</dt>
  50017. <dt>&lsquo;<samp class="samp">dot</samp>&rsquo;</dt>
  50018. </dl>
  50019. <p>Default is <code class="code">bar</code>.
  50020. </p>
  50021. </dd>
  50022. <dt><samp class="option">ascale</samp></dt>
  50023. <dd><p>Set amplitude scale.
  50024. </p>
  50025. <p>It accepts the following values:
  50026. </p><dl class="table">
  50027. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50028. <dd><p>Linear scale.
  50029. </p>
  50030. </dd>
  50031. <dt>&lsquo;<samp class="samp">sqrt</samp>&rsquo;</dt>
  50032. <dd><p>Square root scale.
  50033. </p>
  50034. </dd>
  50035. <dt>&lsquo;<samp class="samp">cbrt</samp>&rsquo;</dt>
  50036. <dd><p>Cubic root scale.
  50037. </p>
  50038. </dd>
  50039. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50040. <dd><p>Logarithmic scale.
  50041. </p></dd>
  50042. </dl>
  50043. <p>Default is <code class="code">log</code>.
  50044. </p>
  50045. </dd>
  50046. <dt><samp class="option">fscale</samp></dt>
  50047. <dd><p>Set frequency scale.
  50048. </p>
  50049. <p>It accepts the following values:
  50050. </p><dl class="table">
  50051. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50052. <dd><p>Linear scale.
  50053. </p>
  50054. </dd>
  50055. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50056. <dd><p>Logarithmic scale.
  50057. </p>
  50058. </dd>
  50059. <dt>&lsquo;<samp class="samp">rlog</samp>&rsquo;</dt>
  50060. <dd><p>Reverse logarithmic scale.
  50061. </p></dd>
  50062. </dl>
  50063. <p>Default is <code class="code">lin</code>.
  50064. </p>
  50065. </dd>
  50066. <dt><samp class="option">win_size</samp></dt>
  50067. <dd><p>Set window size. Allowed range is from 16 to 65536.
  50068. </p>
  50069. <p>Default is <code class="code">2048</code>
  50070. </p>
  50071. </dd>
  50072. <dt><samp class="option">win_func</samp></dt>
  50073. <dd><p>Set windowing function.
  50074. </p>
  50075. <p>It accepts the following values:
  50076. </p><dl class="table">
  50077. <dt>&lsquo;<samp class="samp">rect</samp>&rsquo;</dt>
  50078. <dt>&lsquo;<samp class="samp">bartlett</samp>&rsquo;</dt>
  50079. <dt>&lsquo;<samp class="samp">hanning</samp>&rsquo;</dt>
  50080. <dt>&lsquo;<samp class="samp">hamming</samp>&rsquo;</dt>
  50081. <dt>&lsquo;<samp class="samp">blackman</samp>&rsquo;</dt>
  50082. <dt>&lsquo;<samp class="samp">welch</samp>&rsquo;</dt>
  50083. <dt>&lsquo;<samp class="samp">flattop</samp>&rsquo;</dt>
  50084. <dt>&lsquo;<samp class="samp">bharris</samp>&rsquo;</dt>
  50085. <dt>&lsquo;<samp class="samp">bnuttall</samp>&rsquo;</dt>
  50086. <dt>&lsquo;<samp class="samp">bhann</samp>&rsquo;</dt>
  50087. <dt>&lsquo;<samp class="samp">sine</samp>&rsquo;</dt>
  50088. <dt>&lsquo;<samp class="samp">nuttall</samp>&rsquo;</dt>
  50089. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  50090. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  50091. <dt>&lsquo;<samp class="samp">tukey</samp>&rsquo;</dt>
  50092. <dt>&lsquo;<samp class="samp">dolph</samp>&rsquo;</dt>
  50093. <dt>&lsquo;<samp class="samp">cauchy</samp>&rsquo;</dt>
  50094. <dt>&lsquo;<samp class="samp">parzen</samp>&rsquo;</dt>
  50095. <dt>&lsquo;<samp class="samp">poisson</samp>&rsquo;</dt>
  50096. <dt>&lsquo;<samp class="samp">bohman</samp>&rsquo;</dt>
  50097. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  50098. </dl>
  50099. <p>Default is <code class="code">hanning</code>.
  50100. </p>
  50101. </dd>
  50102. <dt><samp class="option">overlap</samp></dt>
  50103. <dd><p>Set window overlap. In range <code class="code">[0, 1]</code>. Default is <code class="code">1</code>,
  50104. which means optimal overlap for selected window function will be picked.
  50105. </p>
  50106. </dd>
  50107. <dt><samp class="option">averaging</samp></dt>
  50108. <dd><p>Set time averaging. Setting this to 0 will display current maximal peaks.
  50109. Default is <code class="code">1</code>, which means time averaging is disabled.
  50110. </p>
  50111. </dd>
  50112. <dt><samp class="option">colors</samp></dt>
  50113. <dd><p>Specify list of colors separated by space or by &rsquo;|&rsquo; which will be used to
  50114. draw channel frequencies. Unrecognized or missing colors will be replaced
  50115. by white color.
  50116. </p>
  50117. </dd>
  50118. <dt><samp class="option">cmode</samp></dt>
  50119. <dd><p>Set channel display mode.
  50120. </p>
  50121. <p>It accepts the following values:
  50122. </p><dl class="table">
  50123. <dt>&lsquo;<samp class="samp">combined</samp>&rsquo;</dt>
  50124. <dt>&lsquo;<samp class="samp">separate</samp>&rsquo;</dt>
  50125. </dl>
  50126. <p>Default is <code class="code">combined</code>.
  50127. </p>
  50128. </dd>
  50129. <dt><samp class="option">minamp</samp></dt>
  50130. <dd><p>Set minimum amplitude used in <code class="code">log</code> amplitude scaler.
  50131. </p>
  50132. </dd>
  50133. <dt><samp class="option">data</samp></dt>
  50134. <dd><p>Set data display mode.
  50135. </p>
  50136. <p>It accepts the following values:
  50137. </p><dl class="table">
  50138. <dt>&lsquo;<samp class="samp">magnitude</samp>&rsquo;</dt>
  50139. <dt>&lsquo;<samp class="samp">phase</samp>&rsquo;</dt>
  50140. <dt>&lsquo;<samp class="samp">delay</samp>&rsquo;</dt>
  50141. </dl>
  50142. <p>Default is <code class="code">magnitude</code>.
  50143. </p>
  50144. </dd>
  50145. <dt><samp class="option">channels</samp></dt>
  50146. <dd><p>Set channels to use when processing audio. By default all are processed.
  50147. </p></dd>
  50148. </dl>
  50149. </div>
  50150. <div class="section-level-extent" id="showspatial">
  50151. <h3 class="section"><span>39.25 showspatial<a class="copiable-link" href="#showspatial"> &para;</a></span></h3>
  50152. <p>Convert stereo input audio to a video output, representing the spatial relationship
  50153. between two channels.
  50154. </p>
  50155. <p>The filter accepts the following options:
  50156. </p>
  50157. <dl class="table">
  50158. <dt><samp class="option">size, s</samp></dt>
  50159. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  50160. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  50161. Default value is <code class="code">512x512</code>.
  50162. </p>
  50163. </dd>
  50164. <dt><samp class="option">win_size</samp></dt>
  50165. <dd><p>Set window size. Allowed range is from <var class="var">1024</var> to <var class="var">65536</var>. Default size is <var class="var">4096</var>.
  50166. </p>
  50167. </dd>
  50168. <dt><samp class="option">win_func</samp></dt>
  50169. <dd><p>Set window function.
  50170. </p>
  50171. <p>It accepts the following values:
  50172. </p><dl class="table">
  50173. <dt>&lsquo;<samp class="samp">rect</samp>&rsquo;</dt>
  50174. <dt>&lsquo;<samp class="samp">bartlett</samp>&rsquo;</dt>
  50175. <dt>&lsquo;<samp class="samp">hann</samp>&rsquo;</dt>
  50176. <dt>&lsquo;<samp class="samp">hanning</samp>&rsquo;</dt>
  50177. <dt>&lsquo;<samp class="samp">hamming</samp>&rsquo;</dt>
  50178. <dt>&lsquo;<samp class="samp">blackman</samp>&rsquo;</dt>
  50179. <dt>&lsquo;<samp class="samp">welch</samp>&rsquo;</dt>
  50180. <dt>&lsquo;<samp class="samp">flattop</samp>&rsquo;</dt>
  50181. <dt>&lsquo;<samp class="samp">bharris</samp>&rsquo;</dt>
  50182. <dt>&lsquo;<samp class="samp">bnuttall</samp>&rsquo;</dt>
  50183. <dt>&lsquo;<samp class="samp">bhann</samp>&rsquo;</dt>
  50184. <dt>&lsquo;<samp class="samp">sine</samp>&rsquo;</dt>
  50185. <dt>&lsquo;<samp class="samp">nuttall</samp>&rsquo;</dt>
  50186. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  50187. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  50188. <dt>&lsquo;<samp class="samp">tukey</samp>&rsquo;</dt>
  50189. <dt>&lsquo;<samp class="samp">dolph</samp>&rsquo;</dt>
  50190. <dt>&lsquo;<samp class="samp">cauchy</samp>&rsquo;</dt>
  50191. <dt>&lsquo;<samp class="samp">parzen</samp>&rsquo;</dt>
  50192. <dt>&lsquo;<samp class="samp">poisson</samp>&rsquo;</dt>
  50193. <dt>&lsquo;<samp class="samp">bohman</samp>&rsquo;</dt>
  50194. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  50195. </dl>
  50196. <p>Default value is <code class="code">hann</code>.
  50197. </p>
  50198. </dd>
  50199. <dt><samp class="option">rate, r</samp></dt>
  50200. <dd><p>Set output framerate.
  50201. </p></dd>
  50202. </dl>
  50203. <a class="anchor" id="showspectrum"></a></div>
  50204. <div class="section-level-extent" id="showspectrum-1">
  50205. <h3 class="section"><span>39.26 showspectrum<a class="copiable-link" href="#showspectrum-1"> &para;</a></span></h3>
  50206. <p>Convert input audio to a video output, representing the audio frequency
  50207. spectrum.
  50208. </p>
  50209. <p>The filter accepts the following options:
  50210. </p>
  50211. <dl class="table">
  50212. <dt><samp class="option">size, s</samp></dt>
  50213. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  50214. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  50215. Default value is <code class="code">640x512</code>.
  50216. </p>
  50217. </dd>
  50218. <dt><samp class="option">slide</samp></dt>
  50219. <dd><p>Specify how the spectrum should slide along the window.
  50220. </p>
  50221. <p>It accepts the following values:
  50222. </p><dl class="table">
  50223. <dt>&lsquo;<samp class="samp">replace</samp>&rsquo;</dt>
  50224. <dd><p>the samples start again on the left when they reach the right
  50225. </p></dd>
  50226. <dt>&lsquo;<samp class="samp">scroll</samp>&rsquo;</dt>
  50227. <dd><p>the samples scroll from right to left
  50228. </p></dd>
  50229. <dt>&lsquo;<samp class="samp">fullframe</samp>&rsquo;</dt>
  50230. <dd><p>frames are only produced when the samples reach the right
  50231. </p></dd>
  50232. <dt>&lsquo;<samp class="samp">rscroll</samp>&rsquo;</dt>
  50233. <dd><p>the samples scroll from left to right
  50234. </p></dd>
  50235. <dt>&lsquo;<samp class="samp">lreplace</samp>&rsquo;</dt>
  50236. <dd><p>the samples start again on the right when they reach the left
  50237. </p></dd>
  50238. </dl>
  50239. <p>Default value is <code class="code">replace</code>.
  50240. </p>
  50241. </dd>
  50242. <dt><samp class="option">mode</samp></dt>
  50243. <dd><p>Specify display mode.
  50244. </p>
  50245. <p>It accepts the following values:
  50246. </p><dl class="table">
  50247. <dt>&lsquo;<samp class="samp">combined</samp>&rsquo;</dt>
  50248. <dd><p>all channels are displayed in the same row
  50249. </p></dd>
  50250. <dt>&lsquo;<samp class="samp">separate</samp>&rsquo;</dt>
  50251. <dd><p>all channels are displayed in separate rows
  50252. </p></dd>
  50253. </dl>
  50254. <p>Default value is &lsquo;<samp class="samp">combined</samp>&rsquo;.
  50255. </p>
  50256. </dd>
  50257. <dt><samp class="option">color</samp></dt>
  50258. <dd><p>Specify display color mode.
  50259. </p>
  50260. <p>It accepts the following values:
  50261. </p><dl class="table">
  50262. <dt>&lsquo;<samp class="samp">channel</samp>&rsquo;</dt>
  50263. <dd><p>each channel is displayed in a separate color
  50264. </p></dd>
  50265. <dt>&lsquo;<samp class="samp">intensity</samp>&rsquo;</dt>
  50266. <dd><p>each channel is displayed using the same color scheme
  50267. </p></dd>
  50268. <dt>&lsquo;<samp class="samp">rainbow</samp>&rsquo;</dt>
  50269. <dd><p>each channel is displayed using the rainbow color scheme
  50270. </p></dd>
  50271. <dt>&lsquo;<samp class="samp">moreland</samp>&rsquo;</dt>
  50272. <dd><p>each channel is displayed using the moreland color scheme
  50273. </p></dd>
  50274. <dt>&lsquo;<samp class="samp">nebulae</samp>&rsquo;</dt>
  50275. <dd><p>each channel is displayed using the nebulae color scheme
  50276. </p></dd>
  50277. <dt>&lsquo;<samp class="samp">fire</samp>&rsquo;</dt>
  50278. <dd><p>each channel is displayed using the fire color scheme
  50279. </p></dd>
  50280. <dt>&lsquo;<samp class="samp">fiery</samp>&rsquo;</dt>
  50281. <dd><p>each channel is displayed using the fiery color scheme
  50282. </p></dd>
  50283. <dt>&lsquo;<samp class="samp">fruit</samp>&rsquo;</dt>
  50284. <dd><p>each channel is displayed using the fruit color scheme
  50285. </p></dd>
  50286. <dt>&lsquo;<samp class="samp">cool</samp>&rsquo;</dt>
  50287. <dd><p>each channel is displayed using the cool color scheme
  50288. </p></dd>
  50289. <dt>&lsquo;<samp class="samp">magma</samp>&rsquo;</dt>
  50290. <dd><p>each channel is displayed using the magma color scheme
  50291. </p></dd>
  50292. <dt>&lsquo;<samp class="samp">green</samp>&rsquo;</dt>
  50293. <dd><p>each channel is displayed using the green color scheme
  50294. </p></dd>
  50295. <dt>&lsquo;<samp class="samp">viridis</samp>&rsquo;</dt>
  50296. <dd><p>each channel is displayed using the viridis color scheme
  50297. </p></dd>
  50298. <dt>&lsquo;<samp class="samp">plasma</samp>&rsquo;</dt>
  50299. <dd><p>each channel is displayed using the plasma color scheme
  50300. </p></dd>
  50301. <dt>&lsquo;<samp class="samp">cividis</samp>&rsquo;</dt>
  50302. <dd><p>each channel is displayed using the cividis color scheme
  50303. </p></dd>
  50304. <dt>&lsquo;<samp class="samp">terrain</samp>&rsquo;</dt>
  50305. <dd><p>each channel is displayed using the terrain color scheme
  50306. </p></dd>
  50307. </dl>
  50308. <p>Default value is &lsquo;<samp class="samp">channel</samp>&rsquo;.
  50309. </p>
  50310. </dd>
  50311. <dt><samp class="option">scale</samp></dt>
  50312. <dd><p>Specify scale used for calculating intensity color values.
  50313. </p>
  50314. <p>It accepts the following values:
  50315. </p><dl class="table">
  50316. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50317. <dd><p>linear
  50318. </p></dd>
  50319. <dt>&lsquo;<samp class="samp">sqrt</samp>&rsquo;</dt>
  50320. <dd><p>square root, default
  50321. </p></dd>
  50322. <dt>&lsquo;<samp class="samp">cbrt</samp>&rsquo;</dt>
  50323. <dd><p>cubic root
  50324. </p></dd>
  50325. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50326. <dd><p>logarithmic
  50327. </p></dd>
  50328. <dt>&lsquo;<samp class="samp">4thrt</samp>&rsquo;</dt>
  50329. <dd><p>4th root
  50330. </p></dd>
  50331. <dt>&lsquo;<samp class="samp">5thrt</samp>&rsquo;</dt>
  50332. <dd><p>5th root
  50333. </p></dd>
  50334. </dl>
  50335. <p>Default value is &lsquo;<samp class="samp">sqrt</samp>&rsquo;.
  50336. </p>
  50337. </dd>
  50338. <dt><samp class="option">fscale</samp></dt>
  50339. <dd><p>Specify frequency scale.
  50340. </p>
  50341. <p>It accepts the following values:
  50342. </p><dl class="table">
  50343. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50344. <dd><p>linear
  50345. </p></dd>
  50346. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50347. <dd><p>logarithmic
  50348. </p></dd>
  50349. </dl>
  50350. <p>Default value is &lsquo;<samp class="samp">lin</samp>&rsquo;.
  50351. </p>
  50352. </dd>
  50353. <dt><samp class="option">saturation</samp></dt>
  50354. <dd><p>Set saturation modifier for displayed colors. Negative values provide
  50355. alternative color scheme. <code class="code">0</code> is no saturation at all.
  50356. Saturation must be in [-10.0, 10.0] range.
  50357. Default value is <code class="code">1</code>.
  50358. </p>
  50359. </dd>
  50360. <dt><samp class="option">win_func</samp></dt>
  50361. <dd><p>Set window function.
  50362. </p>
  50363. <p>It accepts the following values:
  50364. </p><dl class="table">
  50365. <dt>&lsquo;<samp class="samp">rect</samp>&rsquo;</dt>
  50366. <dt>&lsquo;<samp class="samp">bartlett</samp>&rsquo;</dt>
  50367. <dt>&lsquo;<samp class="samp">hann</samp>&rsquo;</dt>
  50368. <dt>&lsquo;<samp class="samp">hanning</samp>&rsquo;</dt>
  50369. <dt>&lsquo;<samp class="samp">hamming</samp>&rsquo;</dt>
  50370. <dt>&lsquo;<samp class="samp">blackman</samp>&rsquo;</dt>
  50371. <dt>&lsquo;<samp class="samp">welch</samp>&rsquo;</dt>
  50372. <dt>&lsquo;<samp class="samp">flattop</samp>&rsquo;</dt>
  50373. <dt>&lsquo;<samp class="samp">bharris</samp>&rsquo;</dt>
  50374. <dt>&lsquo;<samp class="samp">bnuttall</samp>&rsquo;</dt>
  50375. <dt>&lsquo;<samp class="samp">bhann</samp>&rsquo;</dt>
  50376. <dt>&lsquo;<samp class="samp">sine</samp>&rsquo;</dt>
  50377. <dt>&lsquo;<samp class="samp">nuttall</samp>&rsquo;</dt>
  50378. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  50379. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  50380. <dt>&lsquo;<samp class="samp">tukey</samp>&rsquo;</dt>
  50381. <dt>&lsquo;<samp class="samp">dolph</samp>&rsquo;</dt>
  50382. <dt>&lsquo;<samp class="samp">cauchy</samp>&rsquo;</dt>
  50383. <dt>&lsquo;<samp class="samp">parzen</samp>&rsquo;</dt>
  50384. <dt>&lsquo;<samp class="samp">poisson</samp>&rsquo;</dt>
  50385. <dt>&lsquo;<samp class="samp">bohman</samp>&rsquo;</dt>
  50386. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  50387. </dl>
  50388. <p>Default value is <code class="code">hann</code>.
  50389. </p>
  50390. </dd>
  50391. <dt><samp class="option">orientation</samp></dt>
  50392. <dd><p>Set orientation of time vs frequency axis. Can be <code class="code">vertical</code> or
  50393. <code class="code">horizontal</code>. Default is <code class="code">vertical</code>.
  50394. </p>
  50395. </dd>
  50396. <dt><samp class="option">overlap</samp></dt>
  50397. <dd><p>Set ratio of overlap window. Default value is <code class="code">0</code>.
  50398. When value is <code class="code">1</code> overlap is set to recommended size for specific
  50399. window function currently used.
  50400. </p>
  50401. </dd>
  50402. <dt><samp class="option">gain</samp></dt>
  50403. <dd><p>Set scale gain for calculating intensity color values.
  50404. Default value is <code class="code">1</code>.
  50405. </p>
  50406. </dd>
  50407. <dt><samp class="option">data</samp></dt>
  50408. <dd><p>Set which data to display. Can be <code class="code">magnitude</code>, default or <code class="code">phase</code>,
  50409. or unwrapped phase: <code class="code">uphase</code>.
  50410. </p>
  50411. </dd>
  50412. <dt><samp class="option">rotation</samp></dt>
  50413. <dd><p>Set color rotation, must be in [-1.0, 1.0] range.
  50414. Default value is <code class="code">0</code>.
  50415. </p>
  50416. </dd>
  50417. <dt><samp class="option">start</samp></dt>
  50418. <dd><p>Set start frequency from which to display spectrogram. Default is <code class="code">0</code>.
  50419. </p>
  50420. </dd>
  50421. <dt><samp class="option">stop</samp></dt>
  50422. <dd><p>Set stop frequency to which to display spectrogram. Default is <code class="code">0</code>.
  50423. </p>
  50424. </dd>
  50425. <dt><samp class="option">fps</samp></dt>
  50426. <dd><p>Set upper frame rate limit. Default is <code class="code">auto</code>, unlimited.
  50427. </p>
  50428. </dd>
  50429. <dt><samp class="option">legend</samp></dt>
  50430. <dd><p>Draw time and frequency axes and legends. Default is disabled.
  50431. </p>
  50432. </dd>
  50433. <dt><samp class="option">drange</samp></dt>
  50434. <dd><p>Set dynamic range used to calculate intensity color values. Default is 120 dBFS.
  50435. Allowed range is from 10 to 200.
  50436. </p>
  50437. </dd>
  50438. <dt><samp class="option">limit</samp></dt>
  50439. <dd><p>Set upper limit of input audio samples volume in dBFS. Default is 0 dBFS.
  50440. Allowed range is from -100 to 100.
  50441. </p>
  50442. </dd>
  50443. <dt><samp class="option">opacity</samp></dt>
  50444. <dd><p>Set opacity strength when using pixel format output with alpha component.
  50445. </p></dd>
  50446. </dl>
  50447. <p>The usage is very similar to the showwaves filter; see the examples in that
  50448. section.
  50449. </p>
  50450. <ul class="mini-toc">
  50451. <li><a href="#Examples-186" accesskey="1">Examples</a></li>
  50452. </ul>
  50453. <div class="subsection-level-extent" id="Examples-186">
  50454. <h4 class="subsection"><span>39.26.1 Examples<a class="copiable-link" href="#Examples-186"> &para;</a></span></h4>
  50455. <ul class="itemize mark-bullet">
  50456. <li>Large window with logarithmic color scaling:
  50457. <div class="example">
  50458. <pre class="example-preformatted">showspectrum=s=1280x480:scale=log
  50459. </pre></div>
  50460. </li><li>Complete example for a colored and sliding spectrum per channel using <code class="command">ffplay</code>:
  50461. <div class="example">
  50462. <pre class="example-preformatted">ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
  50463. [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
  50464. </pre></div>
  50465. </li></ul>
  50466. </div>
  50467. </div>
  50468. <div class="section-level-extent" id="showspectrumpic">
  50469. <h3 class="section"><span>39.27 showspectrumpic<a class="copiable-link" href="#showspectrumpic"> &para;</a></span></h3>
  50470. <p>Convert input audio to a single video frame, representing the audio frequency
  50471. spectrum.
  50472. </p>
  50473. <p>The filter accepts the following options:
  50474. </p>
  50475. <dl class="table">
  50476. <dt><samp class="option">size, s</samp></dt>
  50477. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  50478. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  50479. Default value is <code class="code">4096x2048</code>.
  50480. </p>
  50481. </dd>
  50482. <dt><samp class="option">mode</samp></dt>
  50483. <dd><p>Specify display mode.
  50484. </p>
  50485. <p>It accepts the following values:
  50486. </p><dl class="table">
  50487. <dt>&lsquo;<samp class="samp">combined</samp>&rsquo;</dt>
  50488. <dd><p>all channels are displayed in the same row
  50489. </p></dd>
  50490. <dt>&lsquo;<samp class="samp">separate</samp>&rsquo;</dt>
  50491. <dd><p>all channels are displayed in separate rows
  50492. </p></dd>
  50493. </dl>
  50494. <p>Default value is &lsquo;<samp class="samp">combined</samp>&rsquo;.
  50495. </p>
  50496. </dd>
  50497. <dt><samp class="option">color</samp></dt>
  50498. <dd><p>Specify display color mode.
  50499. </p>
  50500. <p>It accepts the following values:
  50501. </p><dl class="table">
  50502. <dt>&lsquo;<samp class="samp">channel</samp>&rsquo;</dt>
  50503. <dd><p>each channel is displayed in a separate color
  50504. </p></dd>
  50505. <dt>&lsquo;<samp class="samp">intensity</samp>&rsquo;</dt>
  50506. <dd><p>each channel is displayed using the same color scheme
  50507. </p></dd>
  50508. <dt>&lsquo;<samp class="samp">rainbow</samp>&rsquo;</dt>
  50509. <dd><p>each channel is displayed using the rainbow color scheme
  50510. </p></dd>
  50511. <dt>&lsquo;<samp class="samp">moreland</samp>&rsquo;</dt>
  50512. <dd><p>each channel is displayed using the moreland color scheme
  50513. </p></dd>
  50514. <dt>&lsquo;<samp class="samp">nebulae</samp>&rsquo;</dt>
  50515. <dd><p>each channel is displayed using the nebulae color scheme
  50516. </p></dd>
  50517. <dt>&lsquo;<samp class="samp">fire</samp>&rsquo;</dt>
  50518. <dd><p>each channel is displayed using the fire color scheme
  50519. </p></dd>
  50520. <dt>&lsquo;<samp class="samp">fiery</samp>&rsquo;</dt>
  50521. <dd><p>each channel is displayed using the fiery color scheme
  50522. </p></dd>
  50523. <dt>&lsquo;<samp class="samp">fruit</samp>&rsquo;</dt>
  50524. <dd><p>each channel is displayed using the fruit color scheme
  50525. </p></dd>
  50526. <dt>&lsquo;<samp class="samp">cool</samp>&rsquo;</dt>
  50527. <dd><p>each channel is displayed using the cool color scheme
  50528. </p></dd>
  50529. <dt>&lsquo;<samp class="samp">magma</samp>&rsquo;</dt>
  50530. <dd><p>each channel is displayed using the magma color scheme
  50531. </p></dd>
  50532. <dt>&lsquo;<samp class="samp">green</samp>&rsquo;</dt>
  50533. <dd><p>each channel is displayed using the green color scheme
  50534. </p></dd>
  50535. <dt>&lsquo;<samp class="samp">viridis</samp>&rsquo;</dt>
  50536. <dd><p>each channel is displayed using the viridis color scheme
  50537. </p></dd>
  50538. <dt>&lsquo;<samp class="samp">plasma</samp>&rsquo;</dt>
  50539. <dd><p>each channel is displayed using the plasma color scheme
  50540. </p></dd>
  50541. <dt>&lsquo;<samp class="samp">cividis</samp>&rsquo;</dt>
  50542. <dd><p>each channel is displayed using the cividis color scheme
  50543. </p></dd>
  50544. <dt>&lsquo;<samp class="samp">terrain</samp>&rsquo;</dt>
  50545. <dd><p>each channel is displayed using the terrain color scheme
  50546. </p></dd>
  50547. </dl>
  50548. <p>Default value is &lsquo;<samp class="samp">intensity</samp>&rsquo;.
  50549. </p>
  50550. </dd>
  50551. <dt><samp class="option">scale</samp></dt>
  50552. <dd><p>Specify scale used for calculating intensity color values.
  50553. </p>
  50554. <p>It accepts the following values:
  50555. </p><dl class="table">
  50556. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50557. <dd><p>linear
  50558. </p></dd>
  50559. <dt>&lsquo;<samp class="samp">sqrt</samp>&rsquo;</dt>
  50560. <dd><p>square root, default
  50561. </p></dd>
  50562. <dt>&lsquo;<samp class="samp">cbrt</samp>&rsquo;</dt>
  50563. <dd><p>cubic root
  50564. </p></dd>
  50565. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50566. <dd><p>logarithmic
  50567. </p></dd>
  50568. <dt>&lsquo;<samp class="samp">4thrt</samp>&rsquo;</dt>
  50569. <dd><p>4th root
  50570. </p></dd>
  50571. <dt>&lsquo;<samp class="samp">5thrt</samp>&rsquo;</dt>
  50572. <dd><p>5th root
  50573. </p></dd>
  50574. </dl>
  50575. <p>Default value is &lsquo;<samp class="samp">log</samp>&rsquo;.
  50576. </p>
  50577. </dd>
  50578. <dt><samp class="option">fscale</samp></dt>
  50579. <dd><p>Specify frequency scale.
  50580. </p>
  50581. <p>It accepts the following values:
  50582. </p><dl class="table">
  50583. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50584. <dd><p>linear
  50585. </p></dd>
  50586. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50587. <dd><p>logarithmic
  50588. </p></dd>
  50589. </dl>
  50590. <p>Default value is &lsquo;<samp class="samp">lin</samp>&rsquo;.
  50591. </p>
  50592. </dd>
  50593. <dt><samp class="option">saturation</samp></dt>
  50594. <dd><p>Set saturation modifier for displayed colors. Negative values provide
  50595. alternative color scheme. <code class="code">0</code> is no saturation at all.
  50596. Saturation must be in [-10.0, 10.0] range.
  50597. Default value is <code class="code">1</code>.
  50598. </p>
  50599. </dd>
  50600. <dt><samp class="option">win_func</samp></dt>
  50601. <dd><p>Set window function.
  50602. </p>
  50603. <p>It accepts the following values:
  50604. </p><dl class="table">
  50605. <dt>&lsquo;<samp class="samp">rect</samp>&rsquo;</dt>
  50606. <dt>&lsquo;<samp class="samp">bartlett</samp>&rsquo;</dt>
  50607. <dt>&lsquo;<samp class="samp">hann</samp>&rsquo;</dt>
  50608. <dt>&lsquo;<samp class="samp">hanning</samp>&rsquo;</dt>
  50609. <dt>&lsquo;<samp class="samp">hamming</samp>&rsquo;</dt>
  50610. <dt>&lsquo;<samp class="samp">blackman</samp>&rsquo;</dt>
  50611. <dt>&lsquo;<samp class="samp">welch</samp>&rsquo;</dt>
  50612. <dt>&lsquo;<samp class="samp">flattop</samp>&rsquo;</dt>
  50613. <dt>&lsquo;<samp class="samp">bharris</samp>&rsquo;</dt>
  50614. <dt>&lsquo;<samp class="samp">bnuttall</samp>&rsquo;</dt>
  50615. <dt>&lsquo;<samp class="samp">bhann</samp>&rsquo;</dt>
  50616. <dt>&lsquo;<samp class="samp">sine</samp>&rsquo;</dt>
  50617. <dt>&lsquo;<samp class="samp">nuttall</samp>&rsquo;</dt>
  50618. <dt>&lsquo;<samp class="samp">lanczos</samp>&rsquo;</dt>
  50619. <dt>&lsquo;<samp class="samp">gauss</samp>&rsquo;</dt>
  50620. <dt>&lsquo;<samp class="samp">tukey</samp>&rsquo;</dt>
  50621. <dt>&lsquo;<samp class="samp">dolph</samp>&rsquo;</dt>
  50622. <dt>&lsquo;<samp class="samp">cauchy</samp>&rsquo;</dt>
  50623. <dt>&lsquo;<samp class="samp">parzen</samp>&rsquo;</dt>
  50624. <dt>&lsquo;<samp class="samp">poisson</samp>&rsquo;</dt>
  50625. <dt>&lsquo;<samp class="samp">bohman</samp>&rsquo;</dt>
  50626. <dt>&lsquo;<samp class="samp">kaiser</samp>&rsquo;</dt>
  50627. </dl>
  50628. <p>Default value is <code class="code">hann</code>.
  50629. </p>
  50630. </dd>
  50631. <dt><samp class="option">orientation</samp></dt>
  50632. <dd><p>Set orientation of time vs frequency axis. Can be <code class="code">vertical</code> or
  50633. <code class="code">horizontal</code>. Default is <code class="code">vertical</code>.
  50634. </p>
  50635. </dd>
  50636. <dt><samp class="option">gain</samp></dt>
  50637. <dd><p>Set scale gain for calculating intensity color values.
  50638. Default value is <code class="code">1</code>.
  50639. </p>
  50640. </dd>
  50641. <dt><samp class="option">legend</samp></dt>
  50642. <dd><p>Draw time and frequency axes and legends. Default is enabled.
  50643. </p>
  50644. </dd>
  50645. <dt><samp class="option">rotation</samp></dt>
  50646. <dd><p>Set color rotation, must be in [-1.0, 1.0] range.
  50647. Default value is <code class="code">0</code>.
  50648. </p>
  50649. </dd>
  50650. <dt><samp class="option">start</samp></dt>
  50651. <dd><p>Set start frequency from which to display spectrogram. Default is <code class="code">0</code>.
  50652. </p>
  50653. </dd>
  50654. <dt><samp class="option">stop</samp></dt>
  50655. <dd><p>Set stop frequency to which to display spectrogram. Default is <code class="code">0</code>.
  50656. </p>
  50657. </dd>
  50658. <dt><samp class="option">drange</samp></dt>
  50659. <dd><p>Set dynamic range used to calculate intensity color values. Default is 120 dBFS.
  50660. Allowed range is from 10 to 200.
  50661. </p>
  50662. </dd>
  50663. <dt><samp class="option">limit</samp></dt>
  50664. <dd><p>Set upper limit of input audio samples volume in dBFS. Default is 0 dBFS.
  50665. Allowed range is from -100 to 100.
  50666. </p>
  50667. </dd>
  50668. <dt><samp class="option">opacity</samp></dt>
  50669. <dd><p>Set opacity strength when using pixel format output with alpha component.
  50670. </p></dd>
  50671. </dl>
  50672. <ul class="mini-toc">
  50673. <li><a href="#Examples-187" accesskey="1">Examples</a></li>
  50674. </ul>
  50675. <div class="subsection-level-extent" id="Examples-187">
  50676. <h4 class="subsection"><span>39.27.1 Examples<a class="copiable-link" href="#Examples-187"> &para;</a></span></h4>
  50677. <ul class="itemize mark-bullet">
  50678. <li>Extract an audio spectrogram of a whole audio track
  50679. in a 1024x1024 picture using <code class="command">ffmpeg</code>:
  50680. <div class="example">
  50681. <pre class="example-preformatted">ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png
  50682. </pre></div>
  50683. </li></ul>
  50684. </div>
  50685. </div>
  50686. <div class="section-level-extent" id="showvolume">
  50687. <h3 class="section"><span>39.28 showvolume<a class="copiable-link" href="#showvolume"> &para;</a></span></h3>
  50688. <p>Convert input audio volume to a video output.
  50689. </p>
  50690. <p>The filter accepts the following options:
  50691. </p>
  50692. <dl class="table">
  50693. <dt><samp class="option">rate, r</samp></dt>
  50694. <dd><p>Set video rate.
  50695. </p>
  50696. </dd>
  50697. <dt><samp class="option">b</samp></dt>
  50698. <dd><p>Set border width, allowed range is [0, 5]. Default is 1.
  50699. </p>
  50700. </dd>
  50701. <dt><samp class="option">w</samp></dt>
  50702. <dd><p>Set channel width, allowed range is [80, 8192]. Default is 400.
  50703. </p>
  50704. </dd>
  50705. <dt><samp class="option">h</samp></dt>
  50706. <dd><p>Set channel height, allowed range is [1, 900]. Default is 20.
  50707. </p>
  50708. </dd>
  50709. <dt><samp class="option">f</samp></dt>
  50710. <dd><p>Set fade, allowed range is [0, 1]. Default is 0.95.
  50711. </p>
  50712. </dd>
  50713. <dt><samp class="option">c</samp></dt>
  50714. <dd><p>Set volume color expression.
  50715. </p>
  50716. <p>The expression can use the following variables:
  50717. </p>
  50718. <dl class="table">
  50719. <dt><samp class="option">VOLUME</samp></dt>
  50720. <dd><p>Current max volume of channel in dB.
  50721. </p>
  50722. </dd>
  50723. <dt><samp class="option">PEAK</samp></dt>
  50724. <dd><p>Current peak.
  50725. </p>
  50726. </dd>
  50727. <dt><samp class="option">CHANNEL</samp></dt>
  50728. <dd><p>Current channel number, starting from 0.
  50729. </p></dd>
  50730. </dl>
  50731. </dd>
  50732. <dt><samp class="option">t</samp></dt>
  50733. <dd><p>If set, displays channel names. Default is enabled.
  50734. </p>
  50735. </dd>
  50736. <dt><samp class="option">v</samp></dt>
  50737. <dd><p>If set, displays volume values. Default is enabled.
  50738. </p>
  50739. </dd>
  50740. <dt><samp class="option">o</samp></dt>
  50741. <dd><p>Set orientation, can be horizontal: <code class="code">h</code> or vertical: <code class="code">v</code>,
  50742. default is <code class="code">h</code>.
  50743. </p>
  50744. </dd>
  50745. <dt><samp class="option">s</samp></dt>
  50746. <dd><p>Set step size, allowed range is [0, 5]. Default is 0, which means
  50747. step is disabled.
  50748. </p>
  50749. </dd>
  50750. <dt><samp class="option">p</samp></dt>
  50751. <dd><p>Set background opacity, allowed range is [0, 1]. Default is 0.
  50752. </p>
  50753. </dd>
  50754. <dt><samp class="option">m</samp></dt>
  50755. <dd><p>Set metering mode, can be peak: <code class="code">p</code> or rms: <code class="code">r</code>,
  50756. default is <code class="code">p</code>.
  50757. </p>
  50758. </dd>
  50759. <dt><samp class="option">ds</samp></dt>
  50760. <dd><p>Set display scale, can be linear: <code class="code">lin</code> or log: <code class="code">log</code>,
  50761. default is <code class="code">lin</code>.
  50762. </p>
  50763. </dd>
  50764. <dt><samp class="option">dm</samp></dt>
  50765. <dd><p>In second.
  50766. If set to &gt; 0., display a line for the max level
  50767. in the previous seconds.
  50768. default is disabled: <code class="code">0.</code>
  50769. </p>
  50770. </dd>
  50771. <dt><samp class="option">dmc</samp></dt>
  50772. <dd><p>The color of the max line. Use when <code class="code">dm</code> option is set to &gt; 0.
  50773. default is: <code class="code">orange</code>
  50774. </p></dd>
  50775. </dl>
  50776. </div>
  50777. <div class="section-level-extent" id="showwaves">
  50778. <h3 class="section"><span>39.29 showwaves<a class="copiable-link" href="#showwaves"> &para;</a></span></h3>
  50779. <p>Convert input audio to a video output, representing the samples waves.
  50780. </p>
  50781. <p>The filter accepts the following options:
  50782. </p>
  50783. <dl class="table">
  50784. <dt><samp class="option">size, s</samp></dt>
  50785. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  50786. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  50787. Default value is <code class="code">600x240</code>.
  50788. </p>
  50789. </dd>
  50790. <dt><samp class="option">mode</samp></dt>
  50791. <dd><p>Set display mode.
  50792. </p>
  50793. <p>Available values are:
  50794. </p><dl class="table">
  50795. <dt>&lsquo;<samp class="samp">point</samp>&rsquo;</dt>
  50796. <dd><p>Draw a point for each sample.
  50797. </p>
  50798. </dd>
  50799. <dt>&lsquo;<samp class="samp">line</samp>&rsquo;</dt>
  50800. <dd><p>Draw a vertical line for each sample.
  50801. </p>
  50802. </dd>
  50803. <dt>&lsquo;<samp class="samp">p2p</samp>&rsquo;</dt>
  50804. <dd><p>Draw a point for each sample and a line between them.
  50805. </p>
  50806. </dd>
  50807. <dt>&lsquo;<samp class="samp">cline</samp>&rsquo;</dt>
  50808. <dd><p>Draw a centered vertical line for each sample.
  50809. </p></dd>
  50810. </dl>
  50811. <p>Default value is <code class="code">point</code>.
  50812. </p>
  50813. </dd>
  50814. <dt><samp class="option">n</samp></dt>
  50815. <dd><p>Set the number of samples which are printed on the same column. A
  50816. larger value will decrease the frame rate. Must be a positive
  50817. integer. This option can be set only if the value for <var class="var">rate</var>
  50818. is not explicitly specified.
  50819. </p>
  50820. </dd>
  50821. <dt><samp class="option">rate, r</samp></dt>
  50822. <dd><p>Set the (approximate) output frame rate. This is done by setting the
  50823. option <var class="var">n</var>. Default value is &quot;25&quot;.
  50824. </p>
  50825. </dd>
  50826. <dt><samp class="option">split_channels</samp></dt>
  50827. <dd><p>Set if channels should be drawn separately or overlap. Default value is 0.
  50828. </p>
  50829. </dd>
  50830. <dt><samp class="option">colors</samp></dt>
  50831. <dd><p>Set colors separated by &rsquo;|&rsquo; which are going to be used for drawing of each channel.
  50832. </p>
  50833. </dd>
  50834. <dt><samp class="option">scale</samp></dt>
  50835. <dd><p>Set amplitude scale.
  50836. </p>
  50837. <p>Available values are:
  50838. </p><dl class="table">
  50839. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50840. <dd><p>Linear.
  50841. </p>
  50842. </dd>
  50843. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50844. <dd><p>Logarithmic.
  50845. </p>
  50846. </dd>
  50847. <dt>&lsquo;<samp class="samp">sqrt</samp>&rsquo;</dt>
  50848. <dd><p>Square root.
  50849. </p>
  50850. </dd>
  50851. <dt>&lsquo;<samp class="samp">cbrt</samp>&rsquo;</dt>
  50852. <dd><p>Cubic root.
  50853. </p></dd>
  50854. </dl>
  50855. <p>Default is linear.
  50856. </p>
  50857. </dd>
  50858. <dt><samp class="option">draw</samp></dt>
  50859. <dd><p>Set the draw mode. This is mostly useful to set for high <var class="var">n</var>.
  50860. </p>
  50861. <p>Available values are:
  50862. </p><dl class="table">
  50863. <dt>&lsquo;<samp class="samp">scale</samp>&rsquo;</dt>
  50864. <dd><p>Scale pixel values for each drawn sample.
  50865. </p>
  50866. </dd>
  50867. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  50868. <dd><p>Draw every sample directly.
  50869. </p></dd>
  50870. </dl>
  50871. <p>Default value is <code class="code">scale</code>.
  50872. </p></dd>
  50873. </dl>
  50874. <ul class="mini-toc">
  50875. <li><a href="#Examples-188" accesskey="1">Examples</a></li>
  50876. </ul>
  50877. <div class="subsection-level-extent" id="Examples-188">
  50878. <h4 class="subsection"><span>39.29.1 Examples<a class="copiable-link" href="#Examples-188"> &para;</a></span></h4>
  50879. <ul class="itemize mark-bullet">
  50880. <li>Output the input file audio and the corresponding video representation
  50881. at the same time:
  50882. <div class="example">
  50883. <pre class="example-preformatted">amovie=a.mp3,asplit[out0],showwaves[out1]
  50884. </pre></div>
  50885. </li><li>Create a synthetic signal and show it with showwaves, forcing a
  50886. frame rate of 30 frames per second:
  50887. <div class="example">
  50888. <pre class="example-preformatted">aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=30[out1]
  50889. </pre></div>
  50890. </li></ul>
  50891. </div>
  50892. </div>
  50893. <div class="section-level-extent" id="showwavespic">
  50894. <h3 class="section"><span>39.30 showwavespic<a class="copiable-link" href="#showwavespic"> &para;</a></span></h3>
  50895. <p>Convert input audio to a single video frame, representing the samples waves.
  50896. </p>
  50897. <p>The filter accepts the following options:
  50898. </p>
  50899. <dl class="table">
  50900. <dt><samp class="option">size, s</samp></dt>
  50901. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  50902. <a data-manual="ffmpeg-utils" href="ffmpeg-utils.html#video-size-syntax">&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  50903. Default value is <code class="code">600x240</code>.
  50904. </p>
  50905. </dd>
  50906. <dt><samp class="option">split_channels</samp></dt>
  50907. <dd><p>Set if channels should be drawn separately or overlap. Default value is 0.
  50908. </p>
  50909. </dd>
  50910. <dt><samp class="option">colors</samp></dt>
  50911. <dd><p>Set colors separated by &rsquo;|&rsquo; which are going to be used for drawing of each channel.
  50912. </p>
  50913. </dd>
  50914. <dt><samp class="option">scale</samp></dt>
  50915. <dd><p>Set amplitude scale.
  50916. </p>
  50917. <p>Available values are:
  50918. </p><dl class="table">
  50919. <dt>&lsquo;<samp class="samp">lin</samp>&rsquo;</dt>
  50920. <dd><p>Linear.
  50921. </p>
  50922. </dd>
  50923. <dt>&lsquo;<samp class="samp">log</samp>&rsquo;</dt>
  50924. <dd><p>Logarithmic.
  50925. </p>
  50926. </dd>
  50927. <dt>&lsquo;<samp class="samp">sqrt</samp>&rsquo;</dt>
  50928. <dd><p>Square root.
  50929. </p>
  50930. </dd>
  50931. <dt>&lsquo;<samp class="samp">cbrt</samp>&rsquo;</dt>
  50932. <dd><p>Cubic root.
  50933. </p></dd>
  50934. </dl>
  50935. <p>Default is linear.
  50936. </p>
  50937. </dd>
  50938. <dt><samp class="option">draw</samp></dt>
  50939. <dd><p>Set the draw mode.
  50940. </p>
  50941. <p>Available values are:
  50942. </p><dl class="table">
  50943. <dt>&lsquo;<samp class="samp">scale</samp>&rsquo;</dt>
  50944. <dd><p>Scale pixel values for each drawn sample.
  50945. </p>
  50946. </dd>
  50947. <dt>&lsquo;<samp class="samp">full</samp>&rsquo;</dt>
  50948. <dd><p>Draw every sample directly.
  50949. </p></dd>
  50950. </dl>
  50951. <p>Default value is <code class="code">scale</code>.
  50952. </p>
  50953. </dd>
  50954. <dt><samp class="option">filter</samp></dt>
  50955. <dd><p>Set the filter mode.
  50956. </p>
  50957. <p>Available values are:
  50958. </p><dl class="table">
  50959. <dt>&lsquo;<samp class="samp">average</samp>&rsquo;</dt>
  50960. <dd><p>Use average samples values for each drawn sample.
  50961. </p>
  50962. </dd>
  50963. <dt>&lsquo;<samp class="samp">peak</samp>&rsquo;</dt>
  50964. <dd><p>Use peak samples values for each drawn sample.
  50965. </p></dd>
  50966. </dl>
  50967. <p>Default value is <code class="code">average</code>.
  50968. </p></dd>
  50969. </dl>
  50970. <ul class="mini-toc">
  50971. <li><a href="#Examples-189" accesskey="1">Examples</a></li>
  50972. </ul>
  50973. <div class="subsection-level-extent" id="Examples-189">
  50974. <h4 class="subsection"><span>39.30.1 Examples<a class="copiable-link" href="#Examples-189"> &para;</a></span></h4>
  50975. <ul class="itemize mark-bullet">
  50976. <li>Extract a channel split representation of the wave form of a whole audio track
  50977. in a 1024x800 picture using <code class="command">ffmpeg</code>:
  50978. <div class="example">
  50979. <pre class="example-preformatted">ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
  50980. </pre></div>
  50981. </li></ul>
  50982. </div>
  50983. </div>
  50984. <div class="section-level-extent" id="sidedata_002c-asidedata">
  50985. <h3 class="section"><span>39.31 sidedata, asidedata<a class="copiable-link" href="#sidedata_002c-asidedata"> &para;</a></span></h3>
  50986. <p>Delete frame side data, or select frames based on it.
  50987. </p>
  50988. <p>This filter accepts the following options:
  50989. </p>
  50990. <dl class="table">
  50991. <dt><samp class="option">mode</samp></dt>
  50992. <dd><p>Set mode of operation of the filter.
  50993. </p>
  50994. <p>Can be one of the following:
  50995. </p>
  50996. <dl class="table">
  50997. <dt>&lsquo;<samp class="samp">select</samp>&rsquo;</dt>
  50998. <dd><p>Select every frame with side data of <code class="code">type</code>.
  50999. </p>
  51000. </dd>
  51001. <dt>&lsquo;<samp class="samp">delete</samp>&rsquo;</dt>
  51002. <dd><p>Delete side data of <code class="code">type</code>. If <code class="code">type</code> is not set, delete all side
  51003. data in the frame.
  51004. </p>
  51005. </dd>
  51006. </dl>
  51007. </dd>
  51008. <dt><samp class="option">type</samp></dt>
  51009. <dd><p>Set side data type used with all modes. Must be set for <code class="code">select</code> mode. For
  51010. the list of frame side data types, refer to the <code class="code">AVFrameSideDataType</code> enum
  51011. in <samp class="file">libavutil/frame.h</samp>. For example, to choose
  51012. <code class="code">AV_FRAME_DATA_PANSCAN</code> side data, you must specify <code class="code">PANSCAN</code>.
  51013. </p>
  51014. </dd>
  51015. </dl>
  51016. </div>
  51017. <div class="section-level-extent" id="spectrumsynth">
  51018. <h3 class="section"><span>39.32 spectrumsynth<a class="copiable-link" href="#spectrumsynth"> &para;</a></span></h3>
  51019. <p>Synthesize audio from 2 input video spectrums, first input stream represents
  51020. magnitude across time and second represents phase across time.
  51021. The filter will transform from frequency domain as displayed in videos back
  51022. to time domain as presented in audio output.
  51023. </p>
  51024. <p>This filter is primarily created for reversing processed <a class="ref" href="#showspectrum">showspectrum</a>
  51025. filter outputs, but can synthesize sound from other spectrograms too.
  51026. But in such case results are going to be poor if the phase data is not
  51027. available, because in such cases phase data need to be recreated, usually
  51028. it&rsquo;s just recreated from random noise.
  51029. For best results use gray only output (<code class="code">channel</code> color mode in
  51030. <a class="ref" href="#showspectrum">showspectrum</a> filter) and <code class="code">log</code> scale for magnitude video and
  51031. <code class="code">lin</code> scale for phase video. To produce phase, for 2nd video, use
  51032. <code class="code">data</code> option. Inputs videos should generally use <code class="code">fullframe</code>
  51033. slide mode as that saves resources needed for decoding video.
  51034. </p>
  51035. <p>The filter accepts the following options:
  51036. </p>
  51037. <dl class="table">
  51038. <dt><samp class="option">sample_rate</samp></dt>
  51039. <dd><p>Specify sample rate of output audio, the sample rate of audio from which
  51040. spectrum was generated may differ.
  51041. </p>
  51042. </dd>
  51043. <dt><samp class="option">channels</samp></dt>
  51044. <dd><p>Set number of channels represented in input video spectrums.
  51045. </p>
  51046. </dd>
  51047. <dt><samp class="option">scale</samp></dt>
  51048. <dd><p>Set scale which was used when generating magnitude input spectrum.
  51049. Can be <code class="code">lin</code> or <code class="code">log</code>. Default is <code class="code">log</code>.
  51050. </p>
  51051. </dd>
  51052. <dt><samp class="option">slide</samp></dt>
  51053. <dd><p>Set slide which was used when generating inputs spectrums.
  51054. Can be <code class="code">replace</code>, <code class="code">scroll</code>, <code class="code">fullframe</code> or <code class="code">rscroll</code>.
  51055. Default is <code class="code">fullframe</code>.
  51056. </p>
  51057. </dd>
  51058. <dt><samp class="option">win_func</samp></dt>
  51059. <dd><p>Set window function used for resynthesis.
  51060. </p>
  51061. </dd>
  51062. <dt><samp class="option">overlap</samp></dt>
  51063. <dd><p>Set window overlap. In range <code class="code">[0, 1]</code>. Default is <code class="code">1</code>,
  51064. which means optimal overlap for selected window function will be picked.
  51065. </p>
  51066. </dd>
  51067. <dt><samp class="option">orientation</samp></dt>
  51068. <dd><p>Set orientation of input videos. Can be <code class="code">vertical</code> or <code class="code">horizontal</code>.
  51069. Default is <code class="code">vertical</code>.
  51070. </p></dd>
  51071. </dl>
  51072. <ul class="mini-toc">
  51073. <li><a href="#Examples-190" accesskey="1">Examples</a></li>
  51074. </ul>
  51075. <div class="subsection-level-extent" id="Examples-190">
  51076. <h4 class="subsection"><span>39.32.1 Examples<a class="copiable-link" href="#Examples-190"> &para;</a></span></h4>
  51077. <ul class="itemize mark-bullet">
  51078. <li>First create magnitude and phase videos from audio, assuming audio is stereo with 44100 sample rate,
  51079. then resynthesize videos back to audio with spectrumsynth:
  51080. <div class="example">
  51081. <pre class="example-preformatted">ffmpeg -i input.flac -lavfi showspectrum=mode=separate:scale=log:overlap=0.875:color=channel:slide=fullframe:data=magnitude -an -c:v rawvideo magnitude.nut
  51082. ffmpeg -i input.flac -lavfi showspectrum=mode=separate:scale=lin:overlap=0.875:color=channel:slide=fullframe:data=phase -an -c:v rawvideo phase.nut
  51083. ffmpeg -i magnitude.nut -i phase.nut -lavfi spectrumsynth=channels=2:sample_rate=44100:win_func=hann:overlap=0.875:slide=fullframe output.flac
  51084. </pre></div>
  51085. </li></ul>
  51086. </div>
  51087. </div>
  51088. <div class="section-level-extent" id="split_002c-asplit">
  51089. <h3 class="section"><span>39.33 split, asplit<a class="copiable-link" href="#split_002c-asplit"> &para;</a></span></h3>
  51090. <p>Split input into several identical outputs.
  51091. </p>
  51092. <p><code class="code">asplit</code> works with audio input, <code class="code">split</code> with video.
  51093. </p>
  51094. <p>The filter accepts a single parameter which specifies the number of outputs. If
  51095. unspecified, it defaults to 2.
  51096. </p>
  51097. <ul class="mini-toc">
  51098. <li><a href="#Examples-191" accesskey="1">Examples</a></li>
  51099. </ul>
  51100. <div class="subsection-level-extent" id="Examples-191">
  51101. <h4 class="subsection"><span>39.33.1 Examples<a class="copiable-link" href="#Examples-191"> &para;</a></span></h4>
  51102. <ul class="itemize mark-bullet">
  51103. <li>Create two separate outputs from the same input:
  51104. <div class="example">
  51105. <pre class="example-preformatted">[in] split [out0][out1]
  51106. </pre></div>
  51107. </li><li>To create 3 or more outputs, you need to specify the number of
  51108. outputs, like in:
  51109. <div class="example">
  51110. <pre class="example-preformatted">[in] asplit=3 [out0][out1][out2]
  51111. </pre></div>
  51112. </li><li>Create two separate outputs from the same input, one cropped and
  51113. one padded:
  51114. <div class="example">
  51115. <pre class="example-preformatted">[in] split [splitout1][splitout2];
  51116. [splitout1] crop=100:100:0:0 [cropout];
  51117. [splitout2] pad=200:200:100:100 [padout];
  51118. </pre></div>
  51119. </li><li>Create 5 copies of the input audio with <code class="command">ffmpeg</code>:
  51120. <div class="example">
  51121. <pre class="example-preformatted">ffmpeg -i INPUT -filter_complex asplit=5 OUTPUT
  51122. </pre></div>
  51123. </li></ul>
  51124. </div>
  51125. </div>
  51126. <div class="section-level-extent" id="zmq_002c-azmq">
  51127. <h3 class="section"><span>39.34 zmq, azmq<a class="copiable-link" href="#zmq_002c-azmq"> &para;</a></span></h3>
  51128. <p>Receive commands sent through a libzmq client, and forward them to
  51129. filters in the filtergraph.
  51130. </p>
  51131. <p><code class="code">zmq</code> and <code class="code">azmq</code> work as a pass-through filters. <code class="code">zmq</code>
  51132. must be inserted between two video filters, <code class="code">azmq</code> between two
  51133. audio filters. Both are capable to send messages to any filter type.
  51134. </p>
  51135. <p>To enable these filters you need to install the libzmq library and
  51136. headers and configure FFmpeg with <code class="code">--enable-libzmq</code>.
  51137. </p>
  51138. <p>For more information about libzmq see:
  51139. <a class="url" href="http://www.zeromq.org/">http://www.zeromq.org/</a>
  51140. </p>
  51141. <p>The <code class="code">zmq</code> and <code class="code">azmq</code> filters work as a libzmq server, which
  51142. receives messages sent through a network interface defined by the
  51143. <samp class="option">bind_address</samp> (or the abbreviation &quot;<samp class="option">b</samp>&quot;) option.
  51144. Default value of this option is <samp class="file">tcp://localhost:5555</samp>. You may
  51145. want to alter this value to your needs, but do not forget to escape any
  51146. &rsquo;:&rsquo; signs (see <a class="ref" href="#filtergraph-escaping">filtergraph escaping</a>).
  51147. </p>
  51148. <p>The received message must be in the form:
  51149. </p><div class="example">
  51150. <pre class="example-preformatted"><var class="var">TARGET</var> <var class="var">COMMAND</var> [<var class="var">ARG</var>]
  51151. </pre></div>
  51152. <p><var class="var">TARGET</var> specifies the target of the command, usually the name of
  51153. the filter class or a specific filter instance name. The default
  51154. filter instance name uses the pattern &lsquo;<samp class="samp">Parsed_&lt;filter_name&gt;_&lt;index&gt;</samp>&rsquo;,
  51155. but you can override this by using the &lsquo;<samp class="samp">filter_name@id</samp>&rsquo; syntax
  51156. (see <a class="ref" href="#Filtergraph-syntax">Filtergraph syntax</a>).
  51157. </p>
  51158. <p><var class="var">COMMAND</var> specifies the name of the command for the target filter.
  51159. </p>
  51160. <p><var class="var">ARG</var> is optional and specifies the optional argument list for the
  51161. given <var class="var">COMMAND</var>.
  51162. </p>
  51163. <p>Upon reception, the message is processed and the corresponding command
  51164. is injected into the filtergraph. Depending on the result, the filter
  51165. will send a reply to the client, adopting the format:
  51166. </p><div class="example">
  51167. <pre class="example-preformatted"><var class="var">ERROR_CODE</var> <var class="var">ERROR_REASON</var>
  51168. <var class="var">MESSAGE</var>
  51169. </pre></div>
  51170. <p><var class="var">MESSAGE</var> is optional.
  51171. </p>
  51172. <ul class="mini-toc">
  51173. <li><a href="#Examples-192" accesskey="1">Examples</a></li>
  51174. </ul>
  51175. <div class="subsection-level-extent" id="Examples-192">
  51176. <h4 class="subsection"><span>39.34.1 Examples<a class="copiable-link" href="#Examples-192"> &para;</a></span></h4>
  51177. <p>Look at <samp class="file">tools/zmqsend</samp> for an example of a zmq client which can
  51178. be used to send commands processed by these filters.
  51179. </p>
  51180. <p>Consider the following filtergraph generated by <code class="command">ffplay</code>.
  51181. In this example the last overlay filter has an instance name. All other
  51182. filters will have default instance names.
  51183. </p>
  51184. <div class="example">
  51185. <pre class="example-preformatted">ffplay -dumpgraph 1 -f lavfi &quot;
  51186. color=s=100x100:c=red [l];
  51187. color=s=100x100:c=blue [r];
  51188. nullsrc=s=200x100, zmq [bg];
  51189. [bg][l] overlay [bg+l];
  51190. [bg+l][r] overlay@my=x=100 &quot;
  51191. </pre></div>
  51192. <p>To change the color of the left side of the video, the following
  51193. command can be used:
  51194. </p><div class="example">
  51195. <pre class="example-preformatted">echo Parsed_color_0 c yellow | tools/zmqsend
  51196. </pre></div>
  51197. <p>To change the right side:
  51198. </p><div class="example">
  51199. <pre class="example-preformatted">echo Parsed_color_1 c pink | tools/zmqsend
  51200. </pre></div>
  51201. <p>To change the position of the right side:
  51202. </p><div class="example">
  51203. <pre class="example-preformatted">echo overlay@my x 150 | tools/zmqsend
  51204. </pre></div>
  51205. </div>
  51206. </div>
  51207. </div>
  51208. <div class="chapter-level-extent" id="Multimedia-Sources">
  51209. <h2 class="chapter"><span>40 Multimedia Sources<a class="copiable-link" href="#Multimedia-Sources"> &para;</a></span></h2>
  51210. <p>Below is a description of the currently available multimedia sources.
  51211. </p>
  51212. <ul class="mini-toc">
  51213. <li><a href="#amovie" accesskey="1">amovie</a></li>
  51214. <li><a href="#avsynctest" accesskey="2">avsynctest</a></li>
  51215. <li><a href="#movie-1" accesskey="3">movie</a></li>
  51216. </ul>
  51217. <div class="section-level-extent" id="amovie">
  51218. <h3 class="section"><span>40.1 amovie<a class="copiable-link" href="#amovie"> &para;</a></span></h3>
  51219. <p>This is the same as <a class="ref" href="#movie">movie</a> source, except it selects an audio
  51220. stream by default.
  51221. </p>
  51222. </div>
  51223. <div class="section-level-extent" id="avsynctest">
  51224. <h3 class="section"><span>40.2 avsynctest<a class="copiable-link" href="#avsynctest"> &para;</a></span></h3>
  51225. <p>Generate an Audio/Video Sync Test.
  51226. </p>
  51227. <p>Generated stream periodically shows flash video frame and emits beep in audio.
  51228. Useful to inspect A/V sync issues.
  51229. </p>
  51230. <p>It accepts the following options:
  51231. </p>
  51232. <dl class="table">
  51233. <dt><samp class="option">size, s</samp></dt>
  51234. <dd><p>Set output video size. Default value is <code class="code">hd720</code>.
  51235. </p>
  51236. </dd>
  51237. <dt><samp class="option">framerate, fr</samp></dt>
  51238. <dd><p>Set output video frame rate. Default value is <code class="code">30</code>.
  51239. </p>
  51240. </dd>
  51241. <dt><samp class="option">samplerate, sr</samp></dt>
  51242. <dd><p>Set output audio sample rate. Default value is <code class="code">44100</code>.
  51243. </p>
  51244. </dd>
  51245. <dt><samp class="option">amplitude, a</samp></dt>
  51246. <dd><p>Set output audio beep amplitude. Default value is <code class="code">0.7</code>.
  51247. </p>
  51248. </dd>
  51249. <dt><samp class="option">period, p</samp></dt>
  51250. <dd><p>Set output audio beep period in seconds. Default value is <code class="code">3</code>.
  51251. </p>
  51252. </dd>
  51253. <dt><samp class="option">delay, dl</samp></dt>
  51254. <dd><p>Set output video flash delay in number of frames. Default value is <code class="code">0</code>.
  51255. </p>
  51256. </dd>
  51257. <dt><samp class="option">cycle, c</samp></dt>
  51258. <dd><p>Enable cycling of video delays, by default is disabled.
  51259. </p>
  51260. </dd>
  51261. <dt><samp class="option">duration, d</samp></dt>
  51262. <dd><p>Set stream output duration. By default duration is unlimited.
  51263. </p>
  51264. </dd>
  51265. <dt><samp class="option">fg, bg, ag</samp></dt>
  51266. <dd><p>Set foreground/background/additional color.
  51267. </p></dd>
  51268. </dl>
  51269. <ul class="mini-toc">
  51270. <li><a href="#Commands-165" accesskey="1">Commands</a></li>
  51271. </ul>
  51272. <div class="subsection-level-extent" id="Commands-165">
  51273. <h4 class="subsection"><span>40.2.1 Commands<a class="copiable-link" href="#Commands-165"> &para;</a></span></h4>
  51274. <p>This source supports the some above options as <a class="ref" href="#commands">commands</a>.
  51275. </p>
  51276. <a class="anchor" id="movie"></a></div>
  51277. </div>
  51278. <div class="section-level-extent" id="movie-1">
  51279. <h3 class="section"><span>40.3 movie<a class="copiable-link" href="#movie-1"> &para;</a></span></h3>
  51280. <p>Read audio and/or video stream(s) from a movie container.
  51281. </p>
  51282. <p>It accepts the following parameters:
  51283. </p>
  51284. <dl class="table">
  51285. <dt><samp class="option">filename</samp></dt>
  51286. <dd><p>The name of the resource to read (not necessarily a file; it can also be a
  51287. device or a stream accessed through some protocol).
  51288. </p>
  51289. </dd>
  51290. <dt><samp class="option">format_name, f</samp></dt>
  51291. <dd><p>Specifies the format assumed for the movie to read, and can be either
  51292. the name of a container or an input device. If not specified, the
  51293. format is guessed from <var class="var">movie_name</var> or by probing.
  51294. </p>
  51295. </dd>
  51296. <dt><samp class="option">seek_point, sp</samp></dt>
  51297. <dd><p>Specifies the seek point in seconds. The frames will be output
  51298. starting from this seek point. The parameter is evaluated with
  51299. <code class="code">av_strtod</code>, so the numerical value may be suffixed by an IS
  51300. postfix. The default value is &quot;0&quot;.
  51301. </p>
  51302. </dd>
  51303. <dt><samp class="option">streams, s</samp></dt>
  51304. <dd><p>Specifies the streams to read. Several streams can be specified,
  51305. separated by &quot;+&quot;. The source will then have as many outputs, in the
  51306. same order. The syntax is explained in the <a data-manual="ffmpeg" href="ffmpeg.html#Stream-specifiers">&quot;Stream specifiers&quot;
  51307. section in the ffmpeg manual</a>. Two special names, &quot;dv&quot; and &quot;da&quot; specify
  51308. respectively the default (best suited) video and audio stream. Default
  51309. is &quot;dv&quot;, or &quot;da&quot; if the filter is called as &quot;amovie&quot;.
  51310. </p>
  51311. </dd>
  51312. <dt><samp class="option">stream_index, si</samp></dt>
  51313. <dd><p>Specifies the index of the video stream to read. If the value is -1,
  51314. the most suitable video stream will be automatically selected. The default
  51315. value is &quot;-1&quot;. Deprecated. If the filter is called &quot;amovie&quot;, it will select
  51316. audio instead of video.
  51317. </p>
  51318. </dd>
  51319. <dt><samp class="option">loop</samp></dt>
  51320. <dd><p>Specifies how many times to read the stream in sequence.
  51321. If the value is 0, the stream will be looped infinitely.
  51322. Default value is &quot;1&quot;.
  51323. </p>
  51324. <p>Note that when the movie is looped the source timestamps are not
  51325. changed, so it will generate non monotonically increasing timestamps.
  51326. </p>
  51327. </dd>
  51328. <dt><samp class="option">discontinuity</samp></dt>
  51329. <dd><p>Specifies the time difference between frames above which the point is
  51330. considered a timestamp discontinuity which is removed by adjusting the later
  51331. timestamps.
  51332. </p>
  51333. </dd>
  51334. <dt><samp class="option">dec_threads</samp></dt>
  51335. <dd><p>Specifies the number of threads for decoding
  51336. </p>
  51337. </dd>
  51338. <dt><samp class="option">format_opts</samp></dt>
  51339. <dd><p>Specify format options for the opened file. Format options can be specified
  51340. as a list of <var class="var">key</var>=<var class="var">value</var> pairs separated by &rsquo;:&rsquo;. The following example
  51341. shows how to add protocol_whitelist and protocol_blacklist options:
  51342. </p><div class="example">
  51343. <pre class="example-preformatted">ffplay -f lavfi
  51344. &quot;movie=filename='1.sdp':format_opts='protocol_whitelist=file,rtp,udp\:protocol_blacklist=http'&quot;
  51345. </pre></div>
  51346. </dd>
  51347. </dl>
  51348. <p>It allows overlaying a second video on top of the main input of
  51349. a filtergraph, as shown in this graph:
  51350. </p><div class="example">
  51351. <pre class="example-preformatted">input -----------&gt; deltapts0 --&gt; overlay --&gt; output
  51352. ^
  51353. |
  51354. movie --&gt; scale--&gt; deltapts1 -------+
  51355. </pre></div>
  51356. <ul class="mini-toc">
  51357. <li><a href="#Examples-193" accesskey="1">Examples</a></li>
  51358. <li><a href="#Commands-166" accesskey="2">Commands</a></li>
  51359. </ul>
  51360. <div class="subsection-level-extent" id="Examples-193">
  51361. <h4 class="subsection"><span>40.3.1 Examples<a class="copiable-link" href="#Examples-193"> &para;</a></span></h4>
  51362. <ul class="itemize mark-bullet">
  51363. <li>Skip 3.2 seconds from the start of the AVI file in.avi, and overlay it
  51364. on top of the input labelled &quot;in&quot;:
  51365. <div class="example">
  51366. <pre class="example-preformatted">movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [over];
  51367. [in] setpts=PTS-STARTPTS [main];
  51368. [main][over] overlay=16:16 [out]
  51369. </pre></div>
  51370. </li><li>Read from a video4linux2 device, and overlay it on top of the input
  51371. labelled &quot;in&quot;:
  51372. <div class="example">
  51373. <pre class="example-preformatted">movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [over];
  51374. [in] setpts=PTS-STARTPTS [main];
  51375. [main][over] overlay=16:16 [out]
  51376. </pre></div>
  51377. </li><li>Read the first video stream and the audio stream with id 0x81 from
  51378. dvd.vob; the video is connected to the pad named &quot;video&quot; and the audio is
  51379. connected to the pad named &quot;audio&quot;:
  51380. <div class="example">
  51381. <pre class="example-preformatted">movie=dvd.vob:s=v:0+#0x81 [video] [audio]
  51382. </pre></div>
  51383. </li></ul>
  51384. </div>
  51385. <div class="subsection-level-extent" id="Commands-166">
  51386. <h4 class="subsection"><span>40.3.2 Commands<a class="copiable-link" href="#Commands-166"> &para;</a></span></h4>
  51387. <p>Both movie and amovie support the following commands:
  51388. </p><dl class="table">
  51389. <dt><samp class="option">seek</samp></dt>
  51390. <dd><p>Perform seek using &quot;av_seek_frame&quot;.
  51391. The syntax is: seek <var class="var">stream_index</var>|<var class="var">timestamp</var>|<var class="var">flags</var>
  51392. </p><ul class="itemize mark-bullet">
  51393. <li><var class="var">stream_index</var>: If stream_index is -1, a default
  51394. stream is selected, and <var class="var">timestamp</var> is automatically converted
  51395. from AV_TIME_BASE units to the stream specific time_base.
  51396. </li><li><var class="var">timestamp</var>: Timestamp in AVStream.time_base units
  51397. or, if no stream is specified, in AV_TIME_BASE units.
  51398. </li><li><var class="var">flags</var>: Flags which select direction and seeking mode.
  51399. </li></ul>
  51400. </dd>
  51401. <dt><samp class="option">get_duration</samp></dt>
  51402. <dd><p>Get movie duration in AV_TIME_BASE units.
  51403. </p>
  51404. </dd>
  51405. </dl>
  51406. </div>
  51407. </div>
  51408. </div>
  51409. <div class="chapter-level-extent" id="External-libraries">
  51410. <h2 class="chapter"><span>41 External libraries<a class="copiable-link" href="#External-libraries"> &para;</a></span></h2>
  51411. <p>FFmpeg can be hooked up with a number of external libraries to add support
  51412. for more formats. None of them are used by default, their use has to be
  51413. explicitly requested by passing the appropriate flags to
  51414. <code class="command">./configure</code>.
  51415. </p>
  51416. <ul class="mini-toc">
  51417. <li><a href="#Alliance-for-Open-Media-_0028AOM_0029" accesskey="1">Alliance for Open Media (AOM)</a></li>
  51418. <li><a href="#AMD-AMF_002fVCE" accesskey="2">AMD AMF/VCE</a></li>
  51419. <li><a href="#AviSynth" accesskey="3">AviSynth</a></li>
  51420. <li><a href="#Chromaprint" accesskey="4">Chromaprint</a></li>
  51421. <li><a href="#codec2" accesskey="5">codec2</a></li>
  51422. <li><a href="#dav1d" accesskey="6">dav1d</a></li>
  51423. <li><a href="#davs2" accesskey="7">davs2</a></li>
  51424. <li><a href="#uavs3d" accesskey="8">uavs3d</a></li>
  51425. <li><a href="#Game-Music-Emu" accesskey="9">Game Music Emu</a></li>
  51426. <li><a href="#Intel-QuickSync-Video">Intel QuickSync Video</a></li>
  51427. <li><a href="#Kvazaar">Kvazaar</a></li>
  51428. <li><a href="#LAME">LAME</a></li>
  51429. <li><a href="#libilbc-1">libilbc</a></li>
  51430. <li><a href="#libjxl">libjxl</a></li>
  51431. <li><a href="#libvpx">libvpx</a></li>
  51432. <li><a href="#ModPlug">ModPlug</a></li>
  51433. <li><a href="#OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries">OpenCORE, VisualOn, and Fraunhofer libraries</a></li>
  51434. <li><a href="#OpenH264">OpenH264</a></li>
  51435. <li><a href="#OpenJPEG">OpenJPEG</a></li>
  51436. <li><a href="#rav1e">rav1e</a></li>
  51437. <li><a href="#SVT_002dAV1">SVT-AV1</a></li>
  51438. <li><a href="#TwoLAME">TwoLAME</a></li>
  51439. <li><a href="#VapourSynth">VapourSynth</a></li>
  51440. <li><a href="#x264">x264</a></li>
  51441. <li><a href="#x265">x265</a></li>
  51442. <li><a href="#xavs">xavs</a></li>
  51443. <li><a href="#xavs2">xavs2</a></li>
  51444. <li><a href="#eXtra_002dfast-Essential-Video-Encoder-_0028XEVE_0029">eXtra-fast Essential Video Encoder (XEVE)</a></li>
  51445. <li><a href="#eXtra_002dfast-Essential-Video-Decoder-_0028XEVD_0029">eXtra-fast Essential Video Decoder (XEVD)</a></li>
  51446. <li><a href="#ZVBI">ZVBI</a></li>
  51447. </ul>
  51448. <div class="section-level-extent" id="Alliance-for-Open-Media-_0028AOM_0029">
  51449. <h3 class="section"><span>41.1 Alliance for Open Media (AOM)<a class="copiable-link" href="#Alliance-for-Open-Media-_0028AOM_0029"> &para;</a></span></h3>
  51450. <p>FFmpeg can make use of the AOM library for AV1 decoding and encoding.
  51451. </p>
  51452. <p>Go to <a class="url" href="http://aomedia.org/">http://aomedia.org/</a> and follow the instructions for
  51453. installing the library. Then pass <code class="code">--enable-libaom</code> to configure to
  51454. enable it.
  51455. </p>
  51456. </div>
  51457. <div class="section-level-extent" id="AMD-AMF_002fVCE">
  51458. <h3 class="section"><span>41.2 AMD AMF/VCE<a class="copiable-link" href="#AMD-AMF_002fVCE"> &para;</a></span></h3>
  51459. <p>FFmpeg can use the AMD Advanced Media Framework library
  51460. for accelerated H.264 and HEVC(only windows) encoding on hardware with Video Coding Engine (VCE).
  51461. </p>
  51462. <p>To enable support you must obtain the AMF framework header files(version 1.4.9+) from
  51463. <a class="url" href="https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git">https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git</a>.
  51464. </p>
  51465. <p>Create an <code class="code">AMF/</code> directory in the system include path.
  51466. Copy the contents of <code class="code">AMF/amf/public/include/</code> into that directory.
  51467. Then configure FFmpeg with <code class="code">--enable-amf</code>.
  51468. </p>
  51469. <p>Initialization of amf encoder occurs in this order:
  51470. 1) trying to initialize through dx11(only windows)
  51471. 2) trying to initialize through dx9(only windows)
  51472. 3) trying to initialize through vulkan
  51473. </p>
  51474. <p>To use h.264(AMD VCE) encoder on linux amdgru-pro version 19.20+ and amf-amdgpu-pro
  51475. package(amdgru-pro contains, but does not install automatically) are required.
  51476. </p>
  51477. <p>This driver can be installed using amdgpu-pro-install script in official amd driver archive.
  51478. </p>
  51479. </div>
  51480. <div class="section-level-extent" id="AviSynth">
  51481. <h3 class="section"><span>41.3 AviSynth<a class="copiable-link" href="#AviSynth"> &para;</a></span></h3>
  51482. <p>FFmpeg can read AviSynth scripts as input. To enable support, pass
  51483. <code class="code">--enable-avisynth</code> to configure after installing the headers
  51484. provided by <a class="url" href="https://github.com/AviSynth/AviSynthPlus">AviSynth+</a>.
  51485. AviSynth+ can be configured to install only the headers by either
  51486. passing <code class="code">-DHEADERS_ONLY:bool=on</code> to the normal CMake-based build
  51487. system, or by using the supplied <code class="code">GNUmakefile</code>.
  51488. </p>
  51489. <p>For Windows, supported AviSynth variants are
  51490. <a class="url" href="http://avisynth.nl">AviSynth 2.6 RC1 or higher</a> for 32-bit builds and
  51491. <a class="url" href="http://avisynth.nl/index.php/AviSynth+">AviSynth+ r1718 or higher</a> for 32-bit and 64-bit builds.
  51492. </p>
  51493. <p>For Linux, macOS, and BSD, the only supported AviSynth variant is
  51494. <a class="url" href="https://github.com/AviSynth/AviSynthPlus">AviSynth+</a>, starting with version 3.5.
  51495. </p>
  51496. <div class="info">
  51497. <p>In 2016, AviSynth+ added support for building with GCC. However, due to
  51498. the eccentricities of Windows&rsquo; calling conventions, 32-bit GCC builds
  51499. of AviSynth+ are not compatible with typical 32-bit builds of FFmpeg.
  51500. </p>
  51501. <p>By default, FFmpeg assumes compatibility with 32-bit MSVC builds of
  51502. AviSynth+ since that is the most widely-used and entrenched build
  51503. configuration. Users can override this and enable support for 32-bit
  51504. GCC builds of AviSynth+ by passing <code class="code">-DAVSC_WIN32_GCC32</code> to
  51505. <code class="code">--extra-cflags</code> when configuring FFmpeg.
  51506. </p>
  51507. <p>64-bit builds of FFmpeg are not affected, and can use either MSVC or
  51508. GCC builds of AviSynth+ without any special flags.
  51509. </p></div>
  51510. <div class="info">
  51511. <p>AviSynth(+) is loaded dynamically. Distributors can build FFmpeg
  51512. with <code class="code">--enable-avisynth</code>, and the binaries will work regardless
  51513. of the end user having AviSynth installed. If/when an end user
  51514. would like to use AviSynth scripts, then they can install AviSynth(+)
  51515. and FFmpeg will be able to find and use it to open scripts.
  51516. </p></div>
  51517. </div>
  51518. <div class="section-level-extent" id="Chromaprint">
  51519. <h3 class="section"><span>41.4 Chromaprint<a class="copiable-link" href="#Chromaprint"> &para;</a></span></h3>
  51520. <p>FFmpeg can make use of the Chromaprint library for generating audio fingerprints.
  51521. Pass <code class="code">--enable-chromaprint</code> to configure to
  51522. enable it. See <a class="url" href="https://acoustid.org/chromaprint">https://acoustid.org/chromaprint</a>.
  51523. </p>
  51524. </div>
  51525. <div class="section-level-extent" id="codec2">
  51526. <h3 class="section"><span>41.5 codec2<a class="copiable-link" href="#codec2"> &para;</a></span></h3>
  51527. <p>FFmpeg can make use of the codec2 library for codec2 decoding and encoding.
  51528. There is currently no native decoder, so libcodec2 must be used for decoding.
  51529. </p>
  51530. <p>Go to <a class="url" href="http://freedv.org/">http://freedv.org/</a>, download &quot;Codec 2 source archive&quot;.
  51531. Build and install using CMake. Debian users can install the libcodec2-dev package instead.
  51532. Once libcodec2 is installed you can pass <code class="code">--enable-libcodec2</code> to configure to enable it.
  51533. </p>
  51534. <p>The easiest way to use codec2 is with .c2 files, since they contain the mode information required for decoding.
  51535. To encode such a file, use a .c2 file extension and give the libcodec2 encoder the -mode option:
  51536. <code class="code">ffmpeg -i input.wav -mode 700C output.c2</code>.
  51537. Playback is as simple as <code class="code">ffplay output.c2</code>.
  51538. For a list of supported modes, run <code class="code">ffmpeg -h encoder=libcodec2</code>.
  51539. Raw codec2 files are also supported.
  51540. To make sense of them the mode in use needs to be specified as a format option:
  51541. <code class="code">ffmpeg -f codec2raw -mode 1300 -i input.raw output.wav</code>.
  51542. </p>
  51543. </div>
  51544. <div class="section-level-extent" id="dav1d">
  51545. <h3 class="section"><span>41.6 dav1d<a class="copiable-link" href="#dav1d"> &para;</a></span></h3>
  51546. <p>FFmpeg can make use of the dav1d library for AV1 video decoding.
  51547. </p>
  51548. <p>Go to <a class="url" href="https://code.videolan.org/videolan/dav1d">https://code.videolan.org/videolan/dav1d</a> and follow the instructions for
  51549. installing the library. Then pass <code class="code">--enable-libdav1d</code> to configure to enable it.
  51550. </p>
  51551. </div>
  51552. <div class="section-level-extent" id="davs2">
  51553. <h3 class="section"><span>41.7 davs2<a class="copiable-link" href="#davs2"> &para;</a></span></h3>
  51554. <p>FFmpeg can make use of the davs2 library for AVS2-P2/IEEE1857.4 video decoding.
  51555. </p>
  51556. <p>Go to <a class="url" href="https://github.com/pkuvcl/davs2">https://github.com/pkuvcl/davs2</a> and follow the instructions for
  51557. installing the library. Then pass <code class="code">--enable-libdavs2</code> to configure to
  51558. enable it.
  51559. </p>
  51560. <div class="info">
  51561. <p>libdavs2 is under the GNU Public License Version 2 or later
  51562. (see <a class="url" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</a> for
  51563. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  51564. </p></div>
  51565. </div>
  51566. <div class="section-level-extent" id="uavs3d">
  51567. <h3 class="section"><span>41.8 uavs3d<a class="copiable-link" href="#uavs3d"> &para;</a></span></h3>
  51568. <p>FFmpeg can make use of the uavs3d library for AVS3-P2/IEEE1857.10 video decoding.
  51569. </p>
  51570. <p>Go to <a class="url" href="https://github.com/uavs3/uavs3d">https://github.com/uavs3/uavs3d</a> and follow the instructions for
  51571. installing the library. Then pass <code class="code">--enable-libuavs3d</code> to configure to
  51572. enable it.
  51573. </p>
  51574. </div>
  51575. <div class="section-level-extent" id="Game-Music-Emu">
  51576. <h3 class="section"><span>41.9 Game Music Emu<a class="copiable-link" href="#Game-Music-Emu"> &para;</a></span></h3>
  51577. <p>FFmpeg can make use of the Game Music Emu library to read audio from supported video game
  51578. music file formats. Pass <code class="code">--enable-libgme</code> to configure to
  51579. enable it. See <a class="url" href="https://bitbucket.org/mpyne/game-music-emu/overview">https://bitbucket.org/mpyne/game-music-emu/overview</a>.
  51580. </p>
  51581. </div>
  51582. <div class="section-level-extent" id="Intel-QuickSync-Video">
  51583. <h3 class="section"><span>41.10 Intel QuickSync Video<a class="copiable-link" href="#Intel-QuickSync-Video"> &para;</a></span></h3>
  51584. <p>FFmpeg can use Intel QuickSync Video (QSV) for accelerated decoding and encoding
  51585. of multiple codecs. To use QSV, FFmpeg must be linked against the <code class="code">libmfx</code>
  51586. dispatcher, which loads the actual decoding libraries.
  51587. </p>
  51588. <p>The dispatcher is open source and can be downloaded from
  51589. <a class="url" href="https://github.com/lu-zero/mfx_dispatch.git">https://github.com/lu-zero/mfx_dispatch.git</a>. FFmpeg needs to be configured
  51590. with the <code class="code">--enable-libmfx</code> option and <code class="code">pkg-config</code> needs to be able to
  51591. locate the dispatcher&rsquo;s <code class="code">.pc</code> files.
  51592. </p>
  51593. </div>
  51594. <div class="section-level-extent" id="Kvazaar">
  51595. <h3 class="section"><span>41.11 Kvazaar<a class="copiable-link" href="#Kvazaar"> &para;</a></span></h3>
  51596. <p>FFmpeg can make use of the Kvazaar library for HEVC encoding.
  51597. </p>
  51598. <p>Go to <a class="url" href="https://github.com/ultravideo/kvazaar">https://github.com/ultravideo/kvazaar</a> and follow the
  51599. instructions for installing the library. Then pass
  51600. <code class="code">--enable-libkvazaar</code> to configure to enable it.
  51601. </p>
  51602. </div>
  51603. <div class="section-level-extent" id="LAME">
  51604. <h3 class="section"><span>41.12 LAME<a class="copiable-link" href="#LAME"> &para;</a></span></h3>
  51605. <p>FFmpeg can make use of the LAME library for MP3 encoding.
  51606. </p>
  51607. <p>Go to <a class="url" href="http://lame.sourceforge.net/">http://lame.sourceforge.net/</a> and follow the
  51608. instructions for installing the library.
  51609. Then pass <code class="code">--enable-libmp3lame</code> to configure to enable it.
  51610. </p>
  51611. </div>
  51612. <div class="section-level-extent" id="libilbc-1">
  51613. <h3 class="section"><span>41.13 libilbc<a class="copiable-link" href="#libilbc-1"> &para;</a></span></h3>
  51614. <p>iLBC is a narrowband speech codec that has been made freely available
  51615. by Google as part of the WebRTC project. libilbc is a packaging friendly
  51616. copy of the iLBC codec. FFmpeg can make use of the libilbc library for
  51617. iLBC decoding and encoding.
  51618. </p>
  51619. <p>Go to <a class="url" href="https://github.com/TimothyGu/libilbc">https://github.com/TimothyGu/libilbc</a> and follow the instructions for
  51620. installing the library. Then pass <code class="code">--enable-libilbc</code> to configure to
  51621. enable it.
  51622. </p>
  51623. </div>
  51624. <div class="section-level-extent" id="libjxl">
  51625. <h3 class="section"><span>41.14 libjxl<a class="copiable-link" href="#libjxl"> &para;</a></span></h3>
  51626. <p>JPEG XL is an image format intended to fully replace legacy JPEG for an extended
  51627. period of life. See <a class="url" href="https://jpegxl.info/">https://jpegxl.info/</a> for more information, and see
  51628. <a class="url" href="https://github.com/libjxl/libjxl">https://github.com/libjxl/libjxl</a> for the library source. You can pass
  51629. <code class="code">--enable-libjxl</code> to configure in order enable the libjxl wrapper.
  51630. </p>
  51631. </div>
  51632. <div class="section-level-extent" id="libvpx">
  51633. <h3 class="section"><span>41.15 libvpx<a class="copiable-link" href="#libvpx"> &para;</a></span></h3>
  51634. <p>FFmpeg can make use of the libvpx library for VP8/VP9 decoding and encoding.
  51635. </p>
  51636. <p>Go to <a class="url" href="http://www.webmproject.org/">http://www.webmproject.org/</a> and follow the instructions for
  51637. installing the library. Then pass <code class="code">--enable-libvpx</code> to configure to
  51638. enable it.
  51639. </p>
  51640. </div>
  51641. <div class="section-level-extent" id="ModPlug">
  51642. <h3 class="section"><span>41.16 ModPlug<a class="copiable-link" href="#ModPlug"> &para;</a></span></h3>
  51643. <p>FFmpeg can make use of this library, originating in Modplug-XMMS, to read from MOD-like music files.
  51644. See <a class="url" href="https://github.com/Konstanty/libmodplug">https://github.com/Konstanty/libmodplug</a>. Pass <code class="code">--enable-libmodplug</code> to configure to
  51645. enable it.
  51646. </p>
  51647. </div>
  51648. <div class="section-level-extent" id="OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries">
  51649. <h3 class="section"><span>41.17 OpenCORE, VisualOn, and Fraunhofer libraries<a class="copiable-link" href="#OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries"> &para;</a></span></h3>
  51650. <p>Spun off Google Android sources, OpenCore, VisualOn and Fraunhofer
  51651. libraries provide encoders for a number of audio codecs.
  51652. </p>
  51653. <div class="info">
  51654. <p>OpenCORE and VisualOn libraries are under the Apache License 2.0
  51655. (see <a class="url" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a> for details), which is
  51656. incompatible to the LGPL version 2.1 and GPL version 2. You have to
  51657. upgrade FFmpeg&rsquo;s license to LGPL version 3 (or if you have enabled
  51658. GPL components, GPL version 3) by passing <code class="code">--enable-version3</code> to configure in
  51659. order to use it.
  51660. </p>
  51661. <p>The license of the Fraunhofer AAC library is incompatible with the GPL.
  51662. Therefore, for GPL builds, you have to pass <code class="code">--enable-nonfree</code> to
  51663. configure in order to use it. To the best of our knowledge, it is
  51664. compatible with the LGPL.
  51665. </p></div>
  51666. <ul class="mini-toc">
  51667. <li><a href="#OpenCORE-AMR" accesskey="1">OpenCORE AMR</a></li>
  51668. <li><a href="#VisualOn-AMR_002dWB-encoder-library" accesskey="2">VisualOn AMR-WB encoder library</a></li>
  51669. <li><a href="#Fraunhofer-AAC-library" accesskey="3">Fraunhofer AAC library</a></li>
  51670. </ul>
  51671. <div class="subsection-level-extent" id="OpenCORE-AMR">
  51672. <h4 class="subsection"><span>41.17.1 OpenCORE AMR<a class="copiable-link" href="#OpenCORE-AMR"> &para;</a></span></h4>
  51673. <p>FFmpeg can make use of the OpenCORE libraries for AMR-NB
  51674. decoding/encoding and AMR-WB decoding.
  51675. </p>
  51676. <p>Go to <a class="url" href="http://sourceforge.net/projects/opencore-amr/">http://sourceforge.net/projects/opencore-amr/</a> and follow the
  51677. instructions for installing the libraries.
  51678. Then pass <code class="code">--enable-libopencore-amrnb</code> and/or
  51679. <code class="code">--enable-libopencore-amrwb</code> to configure to enable them.
  51680. </p>
  51681. </div>
  51682. <div class="subsection-level-extent" id="VisualOn-AMR_002dWB-encoder-library">
  51683. <h4 class="subsection"><span>41.17.2 VisualOn AMR-WB encoder library<a class="copiable-link" href="#VisualOn-AMR_002dWB-encoder-library"> &para;</a></span></h4>
  51684. <p>FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB encoding.
  51685. </p>
  51686. <p>Go to <a class="url" href="http://sourceforge.net/projects/opencore-amr/">http://sourceforge.net/projects/opencore-amr/</a> and follow the
  51687. instructions for installing the library.
  51688. Then pass <code class="code">--enable-libvo-amrwbenc</code> to configure to enable it.
  51689. </p>
  51690. </div>
  51691. <div class="subsection-level-extent" id="Fraunhofer-AAC-library">
  51692. <h4 class="subsection"><span>41.17.3 Fraunhofer AAC library<a class="copiable-link" href="#Fraunhofer-AAC-library"> &para;</a></span></h4>
  51693. <p>FFmpeg can make use of the Fraunhofer AAC library for AAC decoding &amp; encoding.
  51694. </p>
  51695. <p>Go to <a class="url" href="http://sourceforge.net/projects/opencore-amr/">http://sourceforge.net/projects/opencore-amr/</a> and follow the
  51696. instructions for installing the library.
  51697. Then pass <code class="code">--enable-libfdk-aac</code> to configure to enable it.
  51698. </p>
  51699. </div>
  51700. </div>
  51701. <div class="section-level-extent" id="OpenH264">
  51702. <h3 class="section"><span>41.18 OpenH264<a class="copiable-link" href="#OpenH264"> &para;</a></span></h3>
  51703. <p>FFmpeg can make use of the OpenH264 library for H.264 decoding and encoding.
  51704. </p>
  51705. <p>Go to <a class="url" href="http://www.openh264.org/">http://www.openh264.org/</a> and follow the instructions for
  51706. installing the library. Then pass <code class="code">--enable-libopenh264</code> to configure to
  51707. enable it.
  51708. </p>
  51709. <p>For decoding, this library is much more limited than the built-in decoder
  51710. in libavcodec; currently, this library lacks support for decoding B-frames
  51711. and some other main/high profile features. (It currently only supports
  51712. constrained baseline profile and CABAC.) Using it is mostly useful for
  51713. testing and for taking advantage of Cisco&rsquo;s patent portfolio license
  51714. (<a class="url" href="http://www.openh264.org/BINARY_LICENSE.txt">http://www.openh264.org/BINARY_LICENSE.txt</a>).
  51715. </p>
  51716. </div>
  51717. <div class="section-level-extent" id="OpenJPEG">
  51718. <h3 class="section"><span>41.19 OpenJPEG<a class="copiable-link" href="#OpenJPEG"> &para;</a></span></h3>
  51719. <p>FFmpeg can use the OpenJPEG libraries for decoding/encoding J2K videos. Go to
  51720. <a class="url" href="http://www.openjpeg.org/">http://www.openjpeg.org/</a> to get the libraries and follow the installation
  51721. instructions. To enable using OpenJPEG in FFmpeg, pass <code class="code">--enable-libopenjpeg</code> to
  51722. <samp class="file">./configure</samp>.
  51723. </p>
  51724. </div>
  51725. <div class="section-level-extent" id="rav1e">
  51726. <h3 class="section"><span>41.20 rav1e<a class="copiable-link" href="#rav1e"> &para;</a></span></h3>
  51727. <p>FFmpeg can make use of rav1e (Rust AV1 Encoder) via its C bindings to encode videos.
  51728. Go to <a class="url" href="https://github.com/xiph/rav1e/">https://github.com/xiph/rav1e/</a> and follow the instructions to build
  51729. the C library. To enable using rav1e in FFmpeg, pass <code class="code">--enable-librav1e</code>
  51730. to <samp class="file">./configure</samp>.
  51731. </p>
  51732. </div>
  51733. <div class="section-level-extent" id="SVT_002dAV1">
  51734. <h3 class="section"><span>41.21 SVT-AV1<a class="copiable-link" href="#SVT_002dAV1"> &para;</a></span></h3>
  51735. <p>FFmpeg can make use of the Scalable Video Technology for AV1 library for AV1 encoding.
  51736. </p>
  51737. <p>Go to <a class="url" href="https://gitlab.com/AOMediaCodec/SVT-AV1/">https://gitlab.com/AOMediaCodec/SVT-AV1/</a> and follow the instructions
  51738. for installing the library. Then pass <code class="code">--enable-libsvtav1</code> to configure to
  51739. enable it.
  51740. </p>
  51741. </div>
  51742. <div class="section-level-extent" id="TwoLAME">
  51743. <h3 class="section"><span>41.22 TwoLAME<a class="copiable-link" href="#TwoLAME"> &para;</a></span></h3>
  51744. <p>FFmpeg can make use of the TwoLAME library for MP2 encoding.
  51745. </p>
  51746. <p>Go to <a class="url" href="http://www.twolame.org/">http://www.twolame.org/</a> and follow the
  51747. instructions for installing the library.
  51748. Then pass <code class="code">--enable-libtwolame</code> to configure to enable it.
  51749. </p>
  51750. </div>
  51751. <div class="section-level-extent" id="VapourSynth">
  51752. <h3 class="section"><span>41.23 VapourSynth<a class="copiable-link" href="#VapourSynth"> &para;</a></span></h3>
  51753. <p>FFmpeg can read VapourSynth scripts as input. To enable support, pass
  51754. <code class="code">--enable-vapoursynth</code> to configure. Vapoursynth is detected via
  51755. <code class="code">pkg-config</code>. Versions 42 or greater supported.
  51756. See <a class="url" href="http://www.vapoursynth.com/">http://www.vapoursynth.com/</a>.
  51757. </p>
  51758. <p>Due to security concerns, Vapoursynth scripts will not
  51759. be autodetected so the input format has to be forced. For ff* CLI tools,
  51760. add <code class="code">-f vapoursynth</code> before the input <code class="code">-i yourscript.vpy</code>.
  51761. </p>
  51762. </div>
  51763. <div class="section-level-extent" id="x264">
  51764. <h3 class="section"><span>41.24 x264<a class="copiable-link" href="#x264"> &para;</a></span></h3>
  51765. <p>FFmpeg can make use of the x264 library for H.264 encoding.
  51766. </p>
  51767. <p>Go to <a class="url" href="http://www.videolan.org/developers/x264.html">http://www.videolan.org/developers/x264.html</a> and follow the
  51768. instructions for installing the library. Then pass <code class="code">--enable-libx264</code> to
  51769. configure to enable it.
  51770. </p>
  51771. <div class="info">
  51772. <p>x264 is under the GNU Public License Version 2 or later
  51773. (see <a class="url" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</a> for
  51774. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  51775. </p></div>
  51776. </div>
  51777. <div class="section-level-extent" id="x265">
  51778. <h3 class="section"><span>41.25 x265<a class="copiable-link" href="#x265"> &para;</a></span></h3>
  51779. <p>FFmpeg can make use of the x265 library for HEVC encoding.
  51780. </p>
  51781. <p>Go to <a class="url" href="http://x265.org/developers.html">http://x265.org/developers.html</a> and follow the instructions
  51782. for installing the library. Then pass <code class="code">--enable-libx265</code> to configure
  51783. to enable it.
  51784. </p>
  51785. <div class="info">
  51786. <p>x265 is under the GNU Public License Version 2 or later
  51787. (see <a class="url" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</a> for
  51788. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  51789. </p></div>
  51790. </div>
  51791. <div class="section-level-extent" id="xavs">
  51792. <h3 class="section"><span>41.26 xavs<a class="copiable-link" href="#xavs"> &para;</a></span></h3>
  51793. <p>FFmpeg can make use of the xavs library for AVS encoding.
  51794. </p>
  51795. <p>Go to <a class="url" href="http://xavs.sf.net/">http://xavs.sf.net/</a> and follow the instructions for
  51796. installing the library. Then pass <code class="code">--enable-libxavs</code> to configure to
  51797. enable it.
  51798. </p>
  51799. </div>
  51800. <div class="section-level-extent" id="xavs2">
  51801. <h3 class="section"><span>41.27 xavs2<a class="copiable-link" href="#xavs2"> &para;</a></span></h3>
  51802. <p>FFmpeg can make use of the xavs2 library for AVS2-P2/IEEE1857.4 video encoding.
  51803. </p>
  51804. <p>Go to <a class="url" href="https://github.com/pkuvcl/xavs2">https://github.com/pkuvcl/xavs2</a> and follow the instructions for
  51805. installing the library. Then pass <code class="code">--enable-libxavs2</code> to configure to
  51806. enable it.
  51807. </p>
  51808. <div class="info">
  51809. <p>libxavs2 is under the GNU Public License Version 2 or later
  51810. (see <a class="url" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</a> for
  51811. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  51812. </p></div>
  51813. </div>
  51814. <div class="section-level-extent" id="eXtra_002dfast-Essential-Video-Encoder-_0028XEVE_0029">
  51815. <h3 class="section"><span>41.28 eXtra-fast Essential Video Encoder (XEVE)<a class="copiable-link" href="#eXtra_002dfast-Essential-Video-Encoder-_0028XEVE_0029"> &para;</a></span></h3>
  51816. <p>FFmpeg can make use of the XEVE library for EVC video encoding.
  51817. </p>
  51818. <p>Go to <a class="url" href="https://github.com/mpeg5/xeve">https://github.com/mpeg5/xeve</a> and follow the instructions for
  51819. installing the XEVE library. Then pass <code class="code">--enable-libxeve</code> to configure to
  51820. enable it.
  51821. </p>
  51822. </div>
  51823. <div class="section-level-extent" id="eXtra_002dfast-Essential-Video-Decoder-_0028XEVD_0029">
  51824. <h3 class="section"><span>41.29 eXtra-fast Essential Video Decoder (XEVD)<a class="copiable-link" href="#eXtra_002dfast-Essential-Video-Decoder-_0028XEVD_0029"> &para;</a></span></h3>
  51825. <p>FFmpeg can make use of the XEVD library for EVC video decoding.
  51826. </p>
  51827. <p>Go to <a class="url" href="https://github.com/mpeg5/xevd">https://github.com/mpeg5/xevd</a> and follow the instructions for
  51828. installing the XEVD library. Then pass <code class="code">--enable-libxevd</code> to configure to
  51829. enable it.
  51830. </p>
  51831. </div>
  51832. <div class="section-level-extent" id="ZVBI">
  51833. <h3 class="section"><span>41.30 ZVBI<a class="copiable-link" href="#ZVBI"> &para;</a></span></h3>
  51834. <p>ZVBI is a VBI decoding library which can be used by FFmpeg to decode DVB
  51835. teletext pages and DVB teletext subtitles.
  51836. </p>
  51837. <p>Go to <a class="url" href="http://sourceforge.net/projects/zapping/">http://sourceforge.net/projects/zapping/</a> and follow the instructions for
  51838. installing the library. Then pass <code class="code">--enable-libzvbi</code> to configure to
  51839. enable it.
  51840. </p>
  51841. </div>
  51842. </div>
  51843. <div class="chapter-level-extent" id="Supported-File-Formats_002c-Codecs-or-Features">
  51844. <h2 class="chapter"><span>42 Supported File Formats, Codecs or Features<a class="copiable-link" href="#Supported-File-Formats_002c-Codecs-or-Features"> &para;</a></span></h2>
  51845. <p>You can use the <code class="code">-formats</code> and <code class="code">-codecs</code> options to have an exhaustive list.
  51846. </p>
  51847. <ul class="mini-toc">
  51848. <li><a href="#File-Formats" accesskey="1">File Formats</a></li>
  51849. <li><a href="#Image-Formats" accesskey="2">Image Formats</a></li>
  51850. <li><a href="#Video-Codecs" accesskey="3">Video Codecs</a></li>
  51851. <li><a href="#Audio-Codecs" accesskey="4">Audio Codecs</a></li>
  51852. <li><a href="#Subtitle-Formats" accesskey="5">Subtitle Formats</a></li>
  51853. <li><a href="#Network-Protocols" accesskey="6">Network Protocols</a></li>
  51854. <li><a href="#Input_002fOutput-Devices" accesskey="7">Input/Output Devices</a></li>
  51855. <li><a href="#Timecode-1" accesskey="8">Timecode</a></li>
  51856. </ul>
  51857. <div class="section-level-extent" id="File-Formats">
  51858. <h3 class="section"><span>42.1 File Formats<a class="copiable-link" href="#File-Formats"> &para;</a></span></h3>
  51859. <p>FFmpeg supports the following file formats through the <code class="code">libavformat</code>
  51860. library:
  51861. </p>
  51862. <table class="multitable">
  51863. <tbody><tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  51864. <tr><td width="40%">3dostr</td><td width="10%"></td><td width="10%">X</td></tr>
  51865. <tr><td width="40%">4xm</td><td width="10%"></td><td width="10%">X</td><td width="40%">4X Technologies format, used in some games.</td></tr>
  51866. <tr><td width="40%">8088flex TMV</td><td width="10%"></td><td width="10%">X</td></tr>
  51867. <tr><td width="40%">AAX</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audible Enhanced Audio format, used in audiobooks.</td></tr>
  51868. <tr><td width="40%">AA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audible Format 2, 3, and 4, used in audiobooks.</td></tr>
  51869. <tr><td width="40%">ACT Voice</td><td width="10%"></td><td width="10%">X</td><td width="40%">contains G.729 audio</td></tr>
  51870. <tr><td width="40%">Adobe Filmstrip</td><td width="10%">X</td><td width="10%">X</td></tr>
  51871. <tr><td width="40%">Audio IFF (AIFF)</td><td width="10%">X</td><td width="10%">X</td></tr>
  51872. <tr><td width="40%">American Laser Games MM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in games like Mad Dog McCree.</td></tr>
  51873. <tr><td width="40%">3GPP AMR</td><td width="10%">X</td><td width="10%">X</td></tr>
  51874. <tr><td width="40%">Amazing Studio Packed Animation File</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in game Heart Of Darkness.</td></tr>
  51875. <tr><td width="40%">Apple HTTP Live Streaming</td><td width="10%"></td><td width="10%">X</td></tr>
  51876. <tr><td width="40%">Artworx Data Format</td><td width="10%"></td><td width="10%">X</td></tr>
  51877. <tr><td width="40%">Interplay ACM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio only format used in some Interplay games.</td></tr>
  51878. <tr><td width="40%">ADP</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on the Nintendo Gamecube.</td></tr>
  51879. <tr><td width="40%">AFC</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on the Nintendo Gamecube.</td></tr>
  51880. <tr><td width="40%">ADS/SS2</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on the PS2.</td></tr>
  51881. <tr><td width="40%">APNG</td><td width="10%">X</td><td width="10%">X</td></tr>
  51882. <tr><td width="40%">ASF</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Advanced / Active Streaming Format.</td></tr>
  51883. <tr><td width="40%">AST</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Audio format used on the Nintendo Wii.</td></tr>
  51884. <tr><td width="40%">AVI</td><td width="10%">X</td><td width="10%">X</td></tr>
  51885. <tr><td width="40%">AviSynth</td><td width="10%"></td><td width="10%">X</td></tr>
  51886. <tr><td width="40%">AVR</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on Mac.</td></tr>
  51887. <tr><td width="40%">AVS</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by the Creature Shock game.</td></tr>
  51888. <tr><td width="40%">Beam Software SIFF</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio and video format used in some games by Beam Software.</td></tr>
  51889. <tr><td width="40%">Bethesda Softworks VID</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some games from Bethesda Softworks.</td></tr>
  51890. <tr><td width="40%">Binary text</td><td width="10%"></td><td width="10%">X</td></tr>
  51891. <tr><td width="40%">Bink</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by many games.</td></tr>
  51892. <tr><td width="40%">Bink Audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio only multimedia format used by some games.</td></tr>
  51893. <tr><td width="40%">Bitmap Brothers JV</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Z and Z95 games.</td></tr>
  51894. <tr><td width="40%">BRP</td><td width="10%"></td><td width="10%">X</td><td width="40%">Argonaut Games format.</td></tr>
  51895. <tr><td width="40%">Brute Force &amp; Ignorance</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Flash Traffic: City of Angels.</td></tr>
  51896. <tr><td width="40%">BFSTM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on the Nintendo WiiU (based on BRSTM).</td></tr>
  51897. <tr><td width="40%">BRSTM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on the Nintendo Wii.</td></tr>
  51898. <tr><td width="40%">BW64</td><td width="10%"></td><td width="10%">X</td><td width="40%">Broadcast Wave 64bit.</td></tr>
  51899. <tr><td width="40%">BWF</td><td width="10%">X</td><td width="10%">X</td></tr>
  51900. <tr><td width="40%">codec2 (raw)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Must be given -mode format option to decode correctly.</td></tr>
  51901. <tr><td width="40%">codec2 (.c2 files)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Contains header with version and mode info, simplifying playback.</td></tr>
  51902. <tr><td width="40%">CRI ADX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Audio-only format used in console video games.</td></tr>
  51903. <tr><td width="40%">CRI AIX</td><td width="10%"></td><td width="10%">X</td></tr>
  51904. <tr><td width="40%">CRI HCA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio-only format used in console video games.</td></tr>
  51905. <tr><td width="40%">Discworld II BMV</td><td width="10%"></td><td width="10%">X</td></tr>
  51906. <tr><td width="40%">Interplay C93</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Cyberia from Interplay.</td></tr>
  51907. <tr><td width="40%">Delphine Software International CIN</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by Delphine Software games.</td></tr>
  51908. <tr><td width="40%">Digital Speech Standard (DSS)</td><td width="10%"></td><td width="10%">X</td></tr>
  51909. <tr><td width="40%">CD+G</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video format used by CD+G karaoke disks</td></tr>
  51910. <tr><td width="40%">Phantom Cine</td><td width="10%"></td><td width="10%">X</td></tr>
  51911. <tr><td width="40%">Commodore CDXL</td><td width="10%"></td><td width="10%">X</td><td width="40%">Amiga CD video format</td></tr>
  51912. <tr><td width="40%">Core Audio Format</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Apple Core Audio Format</td></tr>
  51913. <tr><td width="40%">CRC testing format</td><td width="10%">X</td><td width="10%"></td></tr>
  51914. <tr><td width="40%">Creative Voice</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Created for the Sound Blaster Pro.</td></tr>
  51915. <tr><td width="40%">CRYO APC</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in some games by CRYO Interactive Entertainment.</td></tr>
  51916. <tr><td width="40%">D-Cinema audio</td><td width="10%">X</td><td width="10%">X</td></tr>
  51917. <tr><td width="40%">Deluxe Paint Animation</td><td width="10%"></td><td width="10%">X</td></tr>
  51918. <tr><td width="40%">DCSTR</td><td width="10%"></td><td width="10%">X</td></tr>
  51919. <tr><td width="40%">DFA</td><td width="10%"></td><td width="10%">X</td><td width="40%">This format is used in Chronomaster game</td></tr>
  51920. <tr><td width="40%">DirectDraw Surface</td><td width="10%"></td><td width="10%">X</td></tr>
  51921. <tr><td width="40%">DSD Stream File (DSF)</td><td width="10%"></td><td width="10%">X</td></tr>
  51922. <tr><td width="40%">DV video</td><td width="10%">X</td><td width="10%">X</td></tr>
  51923. <tr><td width="40%">DXA</td><td width="10%"></td><td width="10%">X</td><td width="40%">This format is used in the non-Windows version of the Feeble Files
  51924. game and different game cutscenes repacked for use with ScummVM.</td></tr>
  51925. <tr><td width="40%">Electronic Arts cdata</td><td width="10%"></td><td width="10%">X</td></tr>
  51926. <tr><td width="40%">Electronic Arts Multimedia</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in various EA games; files have extensions like WVE and UV2.</td></tr>
  51927. <tr><td width="40%">Ensoniq Paris Audio File</td><td width="10%"></td><td width="10%">X</td></tr>
  51928. <tr><td width="40%">FFM (FFserver live feed)</td><td width="10%">X</td><td width="10%">X</td></tr>
  51929. <tr><td width="40%">Flash (SWF)</td><td width="10%">X</td><td width="10%">X</td></tr>
  51930. <tr><td width="40%">Flash 9 (AVM2)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Only embedded audio is decoded.</td></tr>
  51931. <tr><td width="40%">FLI/FLC/FLX animation</td><td width="10%"></td><td width="10%">X</td><td width="40%">.fli/.flc files</td></tr>
  51932. <tr><td width="40%">Flash Video (FLV)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Macromedia Flash video files</td></tr>
  51933. <tr><td width="40%">framecrc testing format</td><td width="10%">X</td><td width="10%"></td></tr>
  51934. <tr><td width="40%">FunCom ISS</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in various games from FunCom like The Longest Journey.</td></tr>
  51935. <tr><td width="40%">G.723.1</td><td width="10%">X</td><td width="10%">X</td></tr>
  51936. <tr><td width="40%">G.726</td><td width="10%"></td><td width="10%">X</td><td width="40%">Both left- and right-justified.</td></tr>
  51937. <tr><td width="40%">G.729 BIT</td><td width="10%">X</td><td width="10%">X</td></tr>
  51938. <tr><td width="40%">G.729 raw</td><td width="10%"></td><td width="10%">X</td></tr>
  51939. <tr><td width="40%">GENH</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format for various games.</td></tr>
  51940. <tr><td width="40%">GIF Animation</td><td width="10%">X</td><td width="10%">X</td></tr>
  51941. <tr><td width="40%">GXF</td><td width="10%">X</td><td width="10%">X</td><td width="40%">General eXchange Format SMPTE 360M, used by Thomson Grass Valley
  51942. playout servers.</td></tr>
  51943. <tr><td width="40%">HNM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Only version 4 supported, used in some games from Cryo Interactive</td></tr>
  51944. <tr><td width="40%">iCEDraw File</td><td width="10%"></td><td width="10%">X</td></tr>
  51945. <tr><td width="40%">ICO</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Microsoft Windows ICO</td></tr>
  51946. <tr><td width="40%">id Quake II CIN video</td><td width="10%"></td><td width="10%">X</td></tr>
  51947. <tr><td width="40%">id RoQ</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Quake III, Jedi Knight 2 and other computer games.</td></tr>
  51948. <tr><td width="40%">IEC61937 encapsulation</td><td width="10%">X</td><td width="10%">X</td></tr>
  51949. <tr><td width="40%">IFF</td><td width="10%"></td><td width="10%">X</td><td width="40%">Interchange File Format</td></tr>
  51950. <tr><td width="40%">IFV</td><td width="10%"></td><td width="10%">X</td><td width="40%">A format used by some old CCTV DVRs.</td></tr>
  51951. <tr><td width="40%">iLBC</td><td width="10%">X</td><td width="10%">X</td></tr>
  51952. <tr><td width="40%">Interplay MVE</td><td width="10%"></td><td width="10%">X</td><td width="40%">Format used in various Interplay computer games.</td></tr>
  51953. <tr><td width="40%">Iterated Systems ClearVideo</td><td width="10%"></td><td width="10%">X</td><td width="40%">I-frames only</td></tr>
  51954. <tr><td width="40%">IV8</td><td width="10%"></td><td width="10%">X</td><td width="40%">A format generated by IndigoVision 8000 video server.</td></tr>
  51955. <tr><td width="40%">IVF (On2)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">A format used by libvpx</td></tr>
  51956. <tr><td width="40%">Internet Video Recording</td><td width="10%"></td><td width="10%">X</td></tr>
  51957. <tr><td width="40%">IRCAM</td><td width="10%">X</td><td width="10%">X</td></tr>
  51958. <tr><td width="40%">LAF</td><td width="10%"></td><td width="10%">X</td><td width="40%">Limitless Audio Format</td></tr>
  51959. <tr><td width="40%">LATM</td><td width="10%">X</td><td width="10%">X</td></tr>
  51960. <tr><td width="40%">LMLM4</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used by Linux Media Labs MPEG-4 PCI boards</td></tr>
  51961. <tr><td width="40%">LOAS</td><td width="10%"></td><td width="10%">X</td><td width="40%">contains LATM multiplexed AAC audio</td></tr>
  51962. <tr><td width="40%">LRC</td><td width="10%">X</td><td width="10%">X</td></tr>
  51963. <tr><td width="40%">LVF</td><td width="10%"></td><td width="10%">X</td></tr>
  51964. <tr><td width="40%">LXF</td><td width="10%"></td><td width="10%">X</td><td width="40%">VR native stream format, used by Leitch/Harris&rsquo; video servers.</td></tr>
  51965. <tr><td width="40%">Magic Lantern Video (MLV)</td><td width="10%"></td><td width="10%">X</td></tr>
  51966. <tr><td width="40%">Matroska</td><td width="10%">X</td><td width="10%">X</td></tr>
  51967. <tr><td width="40%">Matroska audio</td><td width="10%">X</td><td width="10%"></td></tr>
  51968. <tr><td width="40%">FFmpeg metadata</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Metadata in text format.</td></tr>
  51969. <tr><td width="40%">MAXIS XA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sim City 3000; file extension .xa.</td></tr>
  51970. <tr><td width="40%">MCA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some games from Capcom; file extension .mca.</td></tr>
  51971. <tr><td width="40%">MD Studio</td><td width="10%"></td><td width="10%">X</td></tr>
  51972. <tr><td width="40%">Metal Gear Solid: The Twin Snakes</td><td width="10%"></td><td width="10%">X</td></tr>
  51973. <tr><td width="40%">Megalux Frame</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used by Megalux Ultimate Paint</td></tr>
  51974. <tr><td width="40%">MobiClip MODS</td><td width="10%"></td><td width="10%">X</td></tr>
  51975. <tr><td width="40%">MobiClip MOFLEX</td><td width="10%"></td><td width="10%">X</td></tr>
  51976. <tr><td width="40%">Mobotix .mxg</td><td width="10%"></td><td width="10%">X</td></tr>
  51977. <tr><td width="40%">Monkey&rsquo;s Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  51978. <tr><td width="40%">Motion Pixels MVI</td><td width="10%"></td><td width="10%">X</td></tr>
  51979. <tr><td width="40%">MOV/QuickTime/MP4</td><td width="10%">X</td><td width="10%">X</td><td width="40%">3GP, 3GP2, PSP, iPod variants supported</td></tr>
  51980. <tr><td width="40%">MP2</td><td width="10%">X</td><td width="10%">X</td></tr>
  51981. <tr><td width="40%">MP3</td><td width="10%">X</td><td width="10%">X</td></tr>
  51982. <tr><td width="40%">MPEG-1 System</td><td width="10%">X</td><td width="10%">X</td><td width="40%">muxed audio and video, VCD format supported</td></tr>
  51983. <tr><td width="40%">MPEG-PS (program stream)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">also known as <code class="code">VOB</code> file, SVCD and DVD format supported</td></tr>
  51984. <tr><td width="40%">MPEG-TS (transport stream)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">also known as DVB Transport Stream</td></tr>
  51985. <tr><td width="40%">MPEG-4</td><td width="10%">X</td><td width="10%">X</td><td width="40%">MPEG-4 is a variant of QuickTime.</td></tr>
  51986. <tr><td width="40%">MSF</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on the PS3.</td></tr>
  51987. <tr><td width="40%">Mirillis FIC video</td><td width="10%"></td><td width="10%">X</td><td width="40%">No cursor rendering.</td></tr>
  51988. <tr><td width="40%">MIDI Sample Dump Standard</td><td width="10%"></td><td width="10%">X</td></tr>
  51989. <tr><td width="40%">MIME multipart JPEG</td><td width="10%">X</td><td width="10%"></td></tr>
  51990. <tr><td width="40%">MSN TCP webcam</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used by MSN Messenger webcam streams.</td></tr>
  51991. <tr><td width="40%">MTV</td><td width="10%"></td><td width="10%">X</td></tr>
  51992. <tr><td width="40%">Musepack</td><td width="10%"></td><td width="10%">X</td></tr>
  51993. <tr><td width="40%">Musepack SV8</td><td width="10%"></td><td width="10%">X</td></tr>
  51994. <tr><td width="40%">Material eXchange Format (MXF)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">SMPTE 377M, used by D-Cinema, broadcast industry.</td></tr>
  51995. <tr><td width="40%">Material eXchange Format (MXF), D-10 Mapping</td><td width="10%">X</td><td width="10%">X</td><td width="40%">SMPTE 386M, D-10/IMX Mapping.</td></tr>
  51996. <tr><td width="40%">NC camera feed</td><td width="10%"></td><td width="10%">X</td><td width="40%">NC (AVIP NC4600) camera streams</td></tr>
  51997. <tr><td width="40%">NIST SPeech HEader REsources</td><td width="10%"></td><td width="10%">X</td></tr>
  51998. <tr><td width="40%">Computerized Speech Lab NSP</td><td width="10%"></td><td width="10%">X</td></tr>
  51999. <tr><td width="40%">NTT TwinVQ (VQF)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Nippon Telegraph and Telephone Corporation TwinVQ.</td></tr>
  52000. <tr><td width="40%">Nullsoft Streaming Video</td><td width="10%"></td><td width="10%">X</td></tr>
  52001. <tr><td width="40%">NuppelVideo</td><td width="10%"></td><td width="10%">X</td></tr>
  52002. <tr><td width="40%">NUT</td><td width="10%">X</td><td width="10%">X</td><td width="40%">NUT Open Container Format</td></tr>
  52003. <tr><td width="40%">Ogg</td><td width="10%">X</td><td width="10%">X</td></tr>
  52004. <tr><td width="40%">Playstation Portable PMP</td><td width="10%"></td><td width="10%">X</td></tr>
  52005. <tr><td width="40%">Portable Voice Format</td><td width="10%"></td><td width="10%">X</td></tr>
  52006. <tr><td width="40%">RK Audio (RKA)</td><td width="10%"></td><td width="10%">X</td></tr>
  52007. <tr><td width="40%">TechnoTrend PVA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used by TechnoTrend DVB PCI boards.</td></tr>
  52008. <tr><td width="40%">QCP</td><td width="10%"></td><td width="10%">X</td></tr>
  52009. <tr><td width="40%">raw ADTS (AAC)</td><td width="10%">X</td><td width="10%">X</td></tr>
  52010. <tr><td width="40%">raw AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
  52011. <tr><td width="40%">raw AMR-NB</td><td width="10%"></td><td width="10%">X</td></tr>
  52012. <tr><td width="40%">raw AMR-WB</td><td width="10%"></td><td width="10%">X</td></tr>
  52013. <tr><td width="40%">raw APAC</td><td width="10%"></td><td width="10%">X</td></tr>
  52014. <tr><td width="40%">raw aptX</td><td width="10%">X</td><td width="10%">X</td></tr>
  52015. <tr><td width="40%">raw aptX HD</td><td width="10%">X</td><td width="10%">X</td></tr>
  52016. <tr><td width="40%">raw Bonk</td><td width="10%"></td><td width="10%">X</td></tr>
  52017. <tr><td width="40%">raw Chinese AVS video</td><td width="10%">X</td><td width="10%">X</td></tr>
  52018. <tr><td width="40%">raw DFPWM</td><td width="10%">X</td><td width="10%">X</td></tr>
  52019. <tr><td width="40%">raw Dirac</td><td width="10%">X</td><td width="10%">X</td></tr>
  52020. <tr><td width="40%">raw DNxHD</td><td width="10%">X</td><td width="10%">X</td></tr>
  52021. <tr><td width="40%">raw DTS</td><td width="10%">X</td><td width="10%">X</td></tr>
  52022. <tr><td width="40%">raw DTS-HD</td><td width="10%"></td><td width="10%">X</td></tr>
  52023. <tr><td width="40%">raw E-AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
  52024. <tr><td width="40%">raw EVC</td><td width="10%">X</td><td width="10%">X</td></tr>
  52025. <tr><td width="40%">raw FLAC</td><td width="10%">X</td><td width="10%">X</td></tr>
  52026. <tr><td width="40%">raw GSM</td><td width="10%"></td><td width="10%">X</td></tr>
  52027. <tr><td width="40%">raw H.261</td><td width="10%">X</td><td width="10%">X</td></tr>
  52028. <tr><td width="40%">raw H.263</td><td width="10%">X</td><td width="10%">X</td></tr>
  52029. <tr><td width="40%">raw H.264</td><td width="10%">X</td><td width="10%">X</td></tr>
  52030. <tr><td width="40%">raw HEVC</td><td width="10%">X</td><td width="10%">X</td></tr>
  52031. <tr><td width="40%">raw Ingenient MJPEG</td><td width="10%"></td><td width="10%">X</td></tr>
  52032. <tr><td width="40%">raw MJPEG</td><td width="10%">X</td><td width="10%">X</td></tr>
  52033. <tr><td width="40%">raw MLP</td><td width="10%"></td><td width="10%">X</td></tr>
  52034. <tr><td width="40%">raw MPEG</td><td width="10%"></td><td width="10%">X</td></tr>
  52035. <tr><td width="40%">raw MPEG-1</td><td width="10%"></td><td width="10%">X</td></tr>
  52036. <tr><td width="40%">raw MPEG-2</td><td width="10%"></td><td width="10%">X</td></tr>
  52037. <tr><td width="40%">raw MPEG-4</td><td width="10%">X</td><td width="10%">X</td></tr>
  52038. <tr><td width="40%">raw NULL</td><td width="10%">X</td><td width="10%"></td></tr>
  52039. <tr><td width="40%">raw video</td><td width="10%">X</td><td width="10%">X</td></tr>
  52040. <tr><td width="40%">raw id RoQ</td><td width="10%">X</td><td width="10%"></td></tr>
  52041. <tr><td width="40%">raw OBU</td><td width="10%">X</td><td width="10%">X</td></tr>
  52042. <tr><td width="40%">raw OSQ</td><td width="10%"></td><td width="10%">X</td></tr>
  52043. <tr><td width="40%">raw SBC</td><td width="10%">X</td><td width="10%">X</td></tr>
  52044. <tr><td width="40%">raw Shorten</td><td width="10%"></td><td width="10%">X</td></tr>
  52045. <tr><td width="40%">raw TAK</td><td width="10%"></td><td width="10%">X</td></tr>
  52046. <tr><td width="40%">raw TrueHD</td><td width="10%">X</td><td width="10%">X</td></tr>
  52047. <tr><td width="40%">raw VC-1</td><td width="10%">X</td><td width="10%">X</td></tr>
  52048. <tr><td width="40%">raw PCM A-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  52049. <tr><td width="40%">raw PCM mu-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  52050. <tr><td width="40%">raw PCM Archimedes VIDC</td><td width="10%">X</td><td width="10%">X</td></tr>
  52051. <tr><td width="40%">raw PCM signed 8 bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52052. <tr><td width="40%">raw PCM signed 16 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52053. <tr><td width="40%">raw PCM signed 16 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52054. <tr><td width="40%">raw PCM signed 24 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52055. <tr><td width="40%">raw PCM signed 24 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52056. <tr><td width="40%">raw PCM signed 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52057. <tr><td width="40%">raw PCM signed 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52058. <tr><td width="40%">raw PCM signed 64 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52059. <tr><td width="40%">raw PCM signed 64 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52060. <tr><td width="40%">raw PCM unsigned 8 bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52061. <tr><td width="40%">raw PCM unsigned 16 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52062. <tr><td width="40%">raw PCM unsigned 16 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52063. <tr><td width="40%">raw PCM unsigned 24 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52064. <tr><td width="40%">raw PCM unsigned 24 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52065. <tr><td width="40%">raw PCM unsigned 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52066. <tr><td width="40%">raw PCM unsigned 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52067. <tr><td width="40%">raw PCM 16.8 floating point little-endian</td><td width="10%"></td><td width="10%">X</td></tr>
  52068. <tr><td width="40%">raw PCM 24.0 floating point little-endian</td><td width="10%"></td><td width="10%">X</td></tr>
  52069. <tr><td width="40%">raw PCM floating-point 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52070. <tr><td width="40%">raw PCM floating-point 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52071. <tr><td width="40%">raw PCM floating-point 64 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52072. <tr><td width="40%">raw PCM floating-point 64 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52073. <tr><td width="40%">RDT</td><td width="10%"></td><td width="10%">X</td></tr>
  52074. <tr><td width="40%">REDCODE R3D</td><td width="10%"></td><td width="10%">X</td><td width="40%">File format used by RED Digital cameras, contains JPEG 2000 frames and PCM audio.</td></tr>
  52075. <tr><td width="40%">RealMedia</td><td width="10%">X</td><td width="10%">X</td></tr>
  52076. <tr><td width="40%">Redirector</td><td width="10%"></td><td width="10%">X</td></tr>
  52077. <tr><td width="40%">RedSpark</td><td width="10%"></td><td width="10%">X</td></tr>
  52078. <tr><td width="40%">Renderware TeXture Dictionary</td><td width="10%"></td><td width="10%">X</td></tr>
  52079. <tr><td width="40%">Resolume DXV</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Encoding is only supported for the DXT1 (Normal Quality, No Alpha) texture format.</td></tr>
  52080. <tr><td width="40%">RF64</td><td width="10%"></td><td width="10%">X</td></tr>
  52081. <tr><td width="40%">RL2</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio and video format used in some games by Entertainment Software Partners.</td></tr>
  52082. <tr><td width="40%">RPL/ARMovie</td><td width="10%"></td><td width="10%">X</td></tr>
  52083. <tr><td width="40%">Lego Mindstorms RSO</td><td width="10%">X</td><td width="10%">X</td></tr>
  52084. <tr><td width="40%">RSD</td><td width="10%"></td><td width="10%">X</td></tr>
  52085. <tr><td width="40%">RTMP</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Output is performed by publishing stream to RTMP server</td></tr>
  52086. <tr><td width="40%">RTP</td><td width="10%">X</td><td width="10%">X</td></tr>
  52087. <tr><td width="40%">RTSP</td><td width="10%">X</td><td width="10%">X</td></tr>
  52088. <tr><td width="40%">Sample Dump eXchange</td><td width="10%"></td><td width="10%">X</td></tr>
  52089. <tr><td width="40%">SAP</td><td width="10%">X</td><td width="10%">X</td></tr>
  52090. <tr><td width="40%">SBG</td><td width="10%"></td><td width="10%">X</td></tr>
  52091. <tr><td width="40%">SDNS</td><td width="10%"></td><td width="10%">X</td></tr>
  52092. <tr><td width="40%">SDP</td><td width="10%"></td><td width="10%">X</td></tr>
  52093. <tr><td width="40%">SER</td><td width="10%"></td><td width="10%">X</td></tr>
  52094. <tr><td width="40%">Digital Pictures SGA</td><td width="10%"></td><td width="10%">X</td></tr>
  52095. <tr><td width="40%">Sega FILM/CPK</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in many Sega Saturn console games.</td></tr>
  52096. <tr><td width="40%">Silicon Graphics Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  52097. <tr><td width="40%">Sierra SOL</td><td width="10%"></td><td width="10%">X</td><td width="40%">.sol files used in Sierra Online games.</td></tr>
  52098. <tr><td width="40%">Sierra VMD</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra CD-ROM games.</td></tr>
  52099. <tr><td width="40%">Smacker</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used by many games.</td></tr>
  52100. <tr><td width="40%">SMJPEG</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in certain Loki game ports.</td></tr>
  52101. <tr><td width="40%">SMPTE 337M encapsulation</td><td width="10%"></td><td width="10%">X</td></tr>
  52102. <tr><td width="40%">Smush</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in some LucasArts games.</td></tr>
  52103. <tr><td width="40%">Sony OpenMG (OMA)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Audio format used in Sony Sonic Stage and Sony Vegas.</td></tr>
  52104. <tr><td width="40%">Sony PlayStation STR</td><td width="10%"></td><td width="10%">X</td></tr>
  52105. <tr><td width="40%">Sony Wave64 (W64)</td><td width="10%">X</td><td width="10%">X</td></tr>
  52106. <tr><td width="40%">SoX native format</td><td width="10%">X</td><td width="10%">X</td></tr>
  52107. <tr><td width="40%">SUN AU format</td><td width="10%">X</td><td width="10%">X</td></tr>
  52108. <tr><td width="40%">SUP raw PGS subtitles</td><td width="10%">X</td><td width="10%">X</td></tr>
  52109. <tr><td width="40%">SVAG</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in Konami PS2 games.</td></tr>
  52110. <tr><td width="40%">TDSC</td><td width="10%"></td><td width="10%">X</td></tr>
  52111. <tr><td width="40%">Text files</td><td width="10%"></td><td width="10%">X</td></tr>
  52112. <tr><td width="40%">THP</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used on the Nintendo GameCube.</td></tr>
  52113. <tr><td width="40%">Tiertex Limited SEQ</td><td width="10%"></td><td width="10%">X</td><td width="40%">Tiertex .seq files used in the DOS CD-ROM version of the game Flashback.</td></tr>
  52114. <tr><td width="40%">True Audio</td><td width="10%">X</td><td width="10%">X</td></tr>
  52115. <tr><td width="40%">VAG</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in many Sony PS2 games.</td></tr>
  52116. <tr><td width="40%">VC-1 test bitstream</td><td width="10%">X</td><td width="10%">X</td></tr>
  52117. <tr><td width="40%">Vidvox Hap</td><td width="10%">X</td><td width="10%">X</td></tr>
  52118. <tr><td width="40%">Vivo</td><td width="10%"></td><td width="10%">X</td></tr>
  52119. <tr><td width="40%">VPK</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used in Sony PS games.</td></tr>
  52120. <tr><td width="40%">Marble WADY</td><td width="10%"></td><td width="10%">X</td></tr>
  52121. <tr><td width="40%">WAV</td><td width="10%">X</td><td width="10%">X</td></tr>
  52122. <tr><td width="40%">Waveform Archiver</td><td width="10%"></td><td width="10%">X</td></tr>
  52123. <tr><td width="40%">WavPack</td><td width="10%">X</td><td width="10%">X</td></tr>
  52124. <tr><td width="40%">WebM</td><td width="10%">X</td><td width="10%">X</td></tr>
  52125. <tr><td width="40%">Windows Televison (WTV)</td><td width="10%">X</td><td width="10%">X</td></tr>
  52126. <tr><td width="40%">Wing Commander III movie</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in Origin&rsquo;s Wing Commander III computer game.</td></tr>
  52127. <tr><td width="40%">Westwood Studios audio</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Multimedia format used in Westwood Studios games.</td></tr>
  52128. <tr><td width="40%">Westwood Studios VQA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in Westwood Studios games.</td></tr>
  52129. <tr><td width="40%">Wideband Single-bit Data (WSD)</td><td width="10%"></td><td width="10%">X</td></tr>
  52130. <tr><td width="40%">WVE</td><td width="10%"></td><td width="10%">X</td></tr>
  52131. <tr><td width="40%">Konami XMD</td><td width="10%"></td><td width="10%">X</td></tr>
  52132. <tr><td width="40%">XMV</td><td width="10%"></td><td width="10%">X</td><td width="40%">Microsoft video container used in Xbox games.</td></tr>
  52133. <tr><td width="40%">XVAG</td><td width="10%"></td><td width="10%">X</td><td width="40%">Audio format used on the PS3.</td></tr>
  52134. <tr><td width="40%">xWMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Microsoft audio container used by XAudio 2.</td></tr>
  52135. <tr><td width="40%">eXtended BINary text (XBIN)</td><td width="10%"></td><td width="10%">X</td></tr>
  52136. <tr><td width="40%">YUV4MPEG pipe</td><td width="10%">X</td><td width="10%">X</td></tr>
  52137. <tr><td width="40%">Psygnosis YOP</td><td width="10%"></td><td width="10%">X</td></tr>
  52138. </tbody>
  52139. </table>
  52140. <p><code class="code">X</code> means that the feature in that column (encoding / decoding) is supported.
  52141. </p>
  52142. </div>
  52143. <div class="section-level-extent" id="Image-Formats">
  52144. <h3 class="section"><span>42.2 Image Formats<a class="copiable-link" href="#Image-Formats"> &para;</a></span></h3>
  52145. <p>FFmpeg can read and write images for each frame of a video sequence. The
  52146. following image formats are supported:
  52147. </p>
  52148. <table class="multitable">
  52149. <tbody><tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  52150. <tr><td width="40%">.Y.U.V</td><td width="10%">X</td><td width="10%">X</td><td width="40%">one raw file per component</td></tr>
  52151. <tr><td width="40%">Alias PIX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Alias/Wavefront PIX image format</td></tr>
  52152. <tr><td width="40%">animated GIF</td><td width="10%">X</td><td width="10%">X</td></tr>
  52153. <tr><td width="40%">APNG</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Animated Portable Network Graphics</td></tr>
  52154. <tr><td width="40%">BMP</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Microsoft BMP image</td></tr>
  52155. <tr><td width="40%">BRender PIX</td><td width="10%"></td><td width="10%">X</td><td width="40%">Argonaut BRender 3D engine image format.</td></tr>
  52156. <tr><td width="40%">CRI</td><td width="10%"></td><td width="10%">X</td><td width="40%">Cintel RAW</td></tr>
  52157. <tr><td width="40%">DPX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Digital Picture Exchange</td></tr>
  52158. <tr><td width="40%">EXR</td><td width="10%"></td><td width="10%">X</td><td width="40%">OpenEXR</td></tr>
  52159. <tr><td width="40%">FITS</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Flexible Image Transport System</td></tr>
  52160. <tr><td width="40%">HDR</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Radiance HDR RGBE Image format</td></tr>
  52161. <tr><td width="40%">IMG</td><td width="10%"></td><td width="10%">X</td><td width="40%">GEM Raster image</td></tr>
  52162. <tr><td width="40%">JPEG</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Progressive JPEG is not supported.</td></tr>
  52163. <tr><td width="40%">JPEG 2000</td><td width="10%">X</td><td width="10%">X</td></tr>
  52164. <tr><td width="40%">JPEG-LS</td><td width="10%">X</td><td width="10%">X</td></tr>
  52165. <tr><td width="40%">LJPEG</td><td width="10%">X</td><td width="10%"></td><td width="40%">Lossless JPEG</td></tr>
  52166. <tr><td width="40%">Media 100</td><td width="10%"></td><td width="10%">X</td></tr>
  52167. <tr><td width="40%">MSP</td><td width="10%"></td><td width="10%">X</td><td width="40%">Microsoft Paint image</td></tr>
  52168. <tr><td width="40%">PAM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">PAM is a PNM extension with alpha support.</td></tr>
  52169. <tr><td width="40%">PBM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable BitMap image</td></tr>
  52170. <tr><td width="40%">PCD</td><td width="10%"></td><td width="10%">X</td><td width="40%">PhotoCD</td></tr>
  52171. <tr><td width="40%">PCX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">PC Paintbrush</td></tr>
  52172. <tr><td width="40%">PFM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable FloatMap image</td></tr>
  52173. <tr><td width="40%">PGM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable GrayMap image</td></tr>
  52174. <tr><td width="40%">PGMYUV</td><td width="10%">X</td><td width="10%">X</td><td width="40%">PGM with U and V components in YUV 4:2:0</td></tr>
  52175. <tr><td width="40%">PGX</td><td width="10%"></td><td width="10%">X</td><td width="40%">PGX file decoder</td></tr>
  52176. <tr><td width="40%">PHM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable HalfFloatMap image</td></tr>
  52177. <tr><td width="40%">PIC</td><td width="10%"></td><td width="10%">X</td><td width="40%">Pictor/PC Paint</td></tr>
  52178. <tr><td width="40%">PNG</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable Network Graphics image</td></tr>
  52179. <tr><td width="40%">PPM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable PixelMap image</td></tr>
  52180. <tr><td width="40%">PSD</td><td width="10%"></td><td width="10%">X</td><td width="40%">Photoshop</td></tr>
  52181. <tr><td width="40%">PTX</td><td width="10%"></td><td width="10%">X</td><td width="40%">V.Flash PTX format</td></tr>
  52182. <tr><td width="40%">QOI</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Quite OK Image format</td></tr>
  52183. <tr><td width="40%">SGI</td><td width="10%">X</td><td width="10%">X</td><td width="40%">SGI RGB image format</td></tr>
  52184. <tr><td width="40%">Sun Rasterfile</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Sun RAS image format</td></tr>
  52185. <tr><td width="40%">TIFF</td><td width="10%">X</td><td width="10%">X</td><td width="40%">YUV, JPEG and some extension is not supported yet.</td></tr>
  52186. <tr><td width="40%">Truevision Targa</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Targa (.TGA) image format</td></tr>
  52187. <tr><td width="40%">VBN</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Vizrt Binary Image format</td></tr>
  52188. <tr><td width="40%">WBMP</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Wireless Application Protocol Bitmap image format</td></tr>
  52189. <tr><td width="40%">WebP</td><td width="10%">E</td><td width="10%">X</td><td width="40%">WebP image format, encoding supported through external library libwebp</td></tr>
  52190. <tr><td width="40%">XBM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">X BitMap image format</td></tr>
  52191. <tr><td width="40%">XFace</td><td width="10%">X</td><td width="10%">X</td><td width="40%">X-Face image format</td></tr>
  52192. <tr><td width="40%">XPM</td><td width="10%"></td><td width="10%">X</td><td width="40%">X PixMap image format</td></tr>
  52193. <tr><td width="40%">XWD</td><td width="10%">X</td><td width="10%">X</td><td width="40%">X Window Dump image format</td></tr>
  52194. </tbody>
  52195. </table>
  52196. <p><code class="code">X</code> means that the feature in that column (encoding / decoding) is supported.
  52197. </p>
  52198. <p><code class="code">E</code> means that support is provided through an external library.
  52199. </p>
  52200. </div>
  52201. <div class="section-level-extent" id="Video-Codecs">
  52202. <h3 class="section"><span>42.3 Video Codecs<a class="copiable-link" href="#Video-Codecs"> &para;</a></span></h3>
  52203. <table class="multitable">
  52204. <tbody><tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  52205. <tr><td width="40%">4X Movie</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in certain computer games.</td></tr>
  52206. <tr><td width="40%">8088flex TMV</td><td width="10%"></td><td width="10%">X</td></tr>
  52207. <tr><td width="40%">A64 multicolor</td><td width="10%">X</td><td width="10%"></td><td width="40%">Creates video suitable to be played on a commodore 64 (multicolor mode).</td></tr>
  52208. <tr><td width="40%">Amazing Studio PAF Video</td><td width="10%"></td><td width="10%">X</td></tr>
  52209. <tr><td width="40%">American Laser Games MM</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in games like Mad Dog McCree.</td></tr>
  52210. <tr><td width="40%">Amuse Graphics Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  52211. <tr><td width="40%">AMV Video</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Chinese MP3 players.</td></tr>
  52212. <tr><td width="40%">ANSI/ASCII art</td><td width="10%"></td><td width="10%">X</td></tr>
  52213. <tr><td width="40%">Apple Intermediate Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  52214. <tr><td width="40%">Apple MJPEG-B</td><td width="10%"></td><td width="10%">X</td></tr>
  52215. <tr><td width="40%">Apple Pixlet</td><td width="10%"></td><td width="10%">X</td></tr>
  52216. <tr><td width="40%">Apple ProRes</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: apch,apcn,apcs,apco,ap4h,ap4x</td></tr>
  52217. <tr><td width="40%">Apple QuickDraw</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: qdrw</td></tr>
  52218. <tr><td width="40%">Argonaut Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some Argonaut games.</td></tr>
  52219. <tr><td width="40%">Asus v1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: ASV1</td></tr>
  52220. <tr><td width="40%">Asus v2</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: ASV2</td></tr>
  52221. <tr><td width="40%">ATI VCR1</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VCR1</td></tr>
  52222. <tr><td width="40%">ATI VCR2</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VCR2</td></tr>
  52223. <tr><td width="40%">Auravision Aura</td><td width="10%"></td><td width="10%">X</td></tr>
  52224. <tr><td width="40%">Auravision Aura 2</td><td width="10%"></td><td width="10%">X</td></tr>
  52225. <tr><td width="40%">Autodesk Animator Flic video</td><td width="10%"></td><td width="10%">X</td></tr>
  52226. <tr><td width="40%">Autodesk RLE</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: AASC</td></tr>
  52227. <tr><td width="40%">AV1</td><td width="10%">E</td><td width="10%">E</td><td width="40%">Supported through external libraries libaom, libdav1d, librav1e and libsvtav1</td></tr>
  52228. <tr><td width="40%">Avid 1:1 10-bit RGB Packer</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: AVrp</td></tr>
  52229. <tr><td width="40%">AVS (Audio Video Standard) video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video encoding used by the Creature Shock game.</td></tr>
  52230. <tr><td width="40%">AVS2-P2/IEEE1857.4</td><td width="10%">E</td><td width="10%">E</td><td width="40%">Supported through external libraries libxavs2 and libdavs2</td></tr>
  52231. <tr><td width="40%">AVS3-P2/IEEE1857.10</td><td width="10%"></td><td width="10%">E</td><td width="40%">Supported through external library libuavs3d</td></tr>
  52232. <tr><td width="40%">AYUV</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Microsoft uncompressed packed 4:4:4:4</td></tr>
  52233. <tr><td width="40%">Beam Software VB</td><td width="10%"></td><td width="10%">X</td></tr>
  52234. <tr><td width="40%">Bethesda VID video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some games from Bethesda Softworks.</td></tr>
  52235. <tr><td width="40%">Bink Video</td><td width="10%"></td><td width="10%">X</td></tr>
  52236. <tr><td width="40%">BitJazz SheerVideo</td><td width="10%"></td><td width="10%">X</td></tr>
  52237. <tr><td width="40%">Bitmap Brothers JV video</td><td width="10%"></td><td width="10%">X</td></tr>
  52238. <tr><td width="40%">y41p Brooktree uncompressed 4:1:1 12-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52239. <tr><td width="40%">Brooktree ProSumer Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: BT20</td></tr>
  52240. <tr><td width="40%">Brute Force &amp; Ignorance</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Flash Traffic: City of Angels.</td></tr>
  52241. <tr><td width="40%">C93 video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Cyberia game.</td></tr>
  52242. <tr><td width="40%">CamStudio</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: CSCD</td></tr>
  52243. <tr><td width="40%">CD+G</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video codec for CD+G karaoke disks</td></tr>
  52244. <tr><td width="40%">CDXL</td><td width="10%"></td><td width="10%">X</td><td width="40%">Amiga CD video codec</td></tr>
  52245. <tr><td width="40%">Chinese AVS video</td><td width="10%">E</td><td width="10%">X</td><td width="40%">AVS1-P2, JiZhun profile, encoding through external library libxavs</td></tr>
  52246. <tr><td width="40%">Delphine Software International CIN video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Delphine Software International games.</td></tr>
  52247. <tr><td width="40%">Discworld II BMV Video</td><td width="10%"></td><td width="10%">X</td></tr>
  52248. <tr><td width="40%">CineForm HD</td><td width="10%">X</td><td width="10%">X</td></tr>
  52249. <tr><td width="40%">Canopus HQ</td><td width="10%"></td><td width="10%">X</td></tr>
  52250. <tr><td width="40%">Canopus HQA</td><td width="10%"></td><td width="10%">X</td></tr>
  52251. <tr><td width="40%">Canopus HQX</td><td width="10%"></td><td width="10%">X</td></tr>
  52252. <tr><td width="40%">Canopus Lossless Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  52253. <tr><td width="40%">CDToons</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in various Broderbund games.</td></tr>
  52254. <tr><td width="40%">Cinepak</td><td width="10%"></td><td width="10%">X</td></tr>
  52255. <tr><td width="40%">Cirrus Logic AccuPak</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: CLJR</td></tr>
  52256. <tr><td width="40%">CPiA Video Format</td><td width="10%"></td><td width="10%">X</td></tr>
  52257. <tr><td width="40%">Creative YUV (CYUV)</td><td width="10%"></td><td width="10%">X</td></tr>
  52258. <tr><td width="40%">DFA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Chronomaster game.</td></tr>
  52259. <tr><td width="40%">Dirac</td><td width="10%">E</td><td width="10%">X</td><td width="40%">supported though the native vc2 (Dirac Pro) encoder</td></tr>
  52260. <tr><td width="40%">Deluxe Paint Animation</td><td width="10%"></td><td width="10%">X</td></tr>
  52261. <tr><td width="40%">DNxHD</td><td width="10%">X</td><td width="10%">X</td><td width="40%">aka SMPTE VC3</td></tr>
  52262. <tr><td width="40%">Duck TrueMotion 1.0</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: DUCK</td></tr>
  52263. <tr><td width="40%">Duck TrueMotion 2.0</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: TM20</td></tr>
  52264. <tr><td width="40%">Duck TrueMotion 2.0 RT</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: TR20</td></tr>
  52265. <tr><td width="40%">DV (Digital Video)</td><td width="10%">X</td><td width="10%">X</td></tr>
  52266. <tr><td width="40%">Dxtory capture format</td><td width="10%"></td><td width="10%">X</td></tr>
  52267. <tr><td width="40%">Feeble Files/ScummVM DXA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec originally used in Feeble Files game.</td></tr>
  52268. <tr><td width="40%">Electronic Arts CMV video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in NHL 95 game.</td></tr>
  52269. <tr><td width="40%">Electronic Arts Madcow video</td><td width="10%"></td><td width="10%">X</td></tr>
  52270. <tr><td width="40%">Electronic Arts TGV video</td><td width="10%"></td><td width="10%">X</td></tr>
  52271. <tr><td width="40%">Electronic Arts TGQ video</td><td width="10%"></td><td width="10%">X</td></tr>
  52272. <tr><td width="40%">Electronic Arts TQI video</td><td width="10%"></td><td width="10%">X</td></tr>
  52273. <tr><td width="40%">Escape 124</td><td width="10%"></td><td width="10%">X</td></tr>
  52274. <tr><td width="40%">Escape 130</td><td width="10%"></td><td width="10%">X</td></tr>
  52275. <tr><td width="40%">EVC / MPEG-5 Part 1</td><td width="10%">E</td><td width="10%">E</td><td width="40%">encoding and decoding supported through external libraries libxeve and libxevd</td></tr>
  52276. <tr><td width="40%">FFmpeg video codec #1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">lossless codec (fourcc: FFV1)</td></tr>
  52277. <tr><td width="40%">Flash Screen Video v1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: FSV1</td></tr>
  52278. <tr><td width="40%">Flash Screen Video v2</td><td width="10%">X</td><td width="10%">X</td></tr>
  52279. <tr><td width="40%">Flash Video (FLV)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Sorenson H.263 used in Flash</td></tr>
  52280. <tr><td width="40%">FM Screen Capture Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  52281. <tr><td width="40%">Forward Uncompressed</td><td width="10%"></td><td width="10%">X</td></tr>
  52282. <tr><td width="40%">Fraps</td><td width="10%"></td><td width="10%">X</td></tr>
  52283. <tr><td width="40%">Go2Meeting</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: G2M2, G2M3</td></tr>
  52284. <tr><td width="40%">Go2Webinar</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: G2M4</td></tr>
  52285. <tr><td width="40%">Gremlin Digital Video</td><td width="10%"></td><td width="10%">X</td></tr>
  52286. <tr><td width="40%">H.261</td><td width="10%">X</td><td width="10%">X</td></tr>
  52287. <tr><td width="40%">H.263 / H.263-1996</td><td width="10%">X</td><td width="10%">X</td></tr>
  52288. <tr><td width="40%">H.263+ / H.263-1998 / H.263 version 2</td><td width="10%">X</td><td width="10%">X</td></tr>
  52289. <tr><td width="40%">H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libx264 and OpenH264</td></tr>
  52290. <tr><td width="40%">HEVC</td><td width="10%">X</td><td width="10%">X</td><td width="40%">encoding supported through external library libx265 and libkvazaar</td></tr>
  52291. <tr><td width="40%">HNM version 4</td><td width="10%"></td><td width="10%">X</td></tr>
  52292. <tr><td width="40%">HuffYUV</td><td width="10%">X</td><td width="10%">X</td></tr>
  52293. <tr><td width="40%">HuffYUV FFmpeg variant</td><td width="10%">X</td><td width="10%">X</td></tr>
  52294. <tr><td width="40%">IBM Ultimotion</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: ULTI</td></tr>
  52295. <tr><td width="40%">id Cinematic video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Quake II.</td></tr>
  52296. <tr><td width="40%">id RoQ video</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Quake III, Jedi Knight 2, other computer games.</td></tr>
  52297. <tr><td width="40%">IFF ILBM</td><td width="10%"></td><td width="10%">X</td><td width="40%">IFF interleaved bitmap</td></tr>
  52298. <tr><td width="40%">IFF ByteRun1</td><td width="10%"></td><td width="10%">X</td><td width="40%">IFF run length encoded bitmap</td></tr>
  52299. <tr><td width="40%">Infinity IMM4</td><td width="10%"></td><td width="10%">X</td></tr>
  52300. <tr><td width="40%">Intel H.263</td><td width="10%"></td><td width="10%">X</td></tr>
  52301. <tr><td width="40%">Intel Indeo 2</td><td width="10%"></td><td width="10%">X</td></tr>
  52302. <tr><td width="40%">Intel Indeo 3</td><td width="10%"></td><td width="10%">X</td></tr>
  52303. <tr><td width="40%">Intel Indeo 4</td><td width="10%"></td><td width="10%">X</td></tr>
  52304. <tr><td width="40%">Intel Indeo 5</td><td width="10%"></td><td width="10%">X</td></tr>
  52305. <tr><td width="40%">Interplay C93</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in the game Cyberia from Interplay.</td></tr>
  52306. <tr><td width="40%">Interplay MVE video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Interplay .MVE files.</td></tr>
  52307. <tr><td width="40%">J2K</td><td width="10%">X</td><td width="10%">X</td></tr>
  52308. <tr><td width="40%">Karl Morton&rsquo;s video codec</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Worms games.</td></tr>
  52309. <tr><td width="40%">Kega Game Video (KGV1)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Kega emulator screen capture codec.</td></tr>
  52310. <tr><td width="40%">Lagarith</td><td width="10%"></td><td width="10%">X</td></tr>
  52311. <tr><td width="40%">LCL (LossLess Codec Library) MSZH</td><td width="10%"></td><td width="10%">X</td></tr>
  52312. <tr><td width="40%">LCL (LossLess Codec Library) ZLIB</td><td width="10%">E</td><td width="10%">E</td></tr>
  52313. <tr><td width="40%">LEAD MCMP</td><td width="10%"></td><td width="10%">X</td></tr>
  52314. <tr><td width="40%">LOCO</td><td width="10%"></td><td width="10%">X</td></tr>
  52315. <tr><td width="40%">LucasArts SANM/Smush</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in LucasArts games / SMUSH animations.</td></tr>
  52316. <tr><td width="40%">lossless MJPEG</td><td width="10%">X</td><td width="10%">X</td></tr>
  52317. <tr><td width="40%">MagicYUV Video</td><td width="10%">X</td><td width="10%">X</td></tr>
  52318. <tr><td width="40%">Mandsoft Screen Capture Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  52319. <tr><td width="40%">Microsoft ATC Screen</td><td width="10%"></td><td width="10%">X</td><td width="40%">Also known as Microsoft Screen 3.</td></tr>
  52320. <tr><td width="40%">Microsoft Expression Encoder Screen</td><td width="10%"></td><td width="10%">X</td><td width="40%">Also known as Microsoft Titanium Screen 2.</td></tr>
  52321. <tr><td width="40%">Microsoft RLE</td><td width="10%">X</td><td width="10%">X</td></tr>
  52322. <tr><td width="40%">Microsoft Screen 1</td><td width="10%"></td><td width="10%">X</td><td width="40%">Also known as Windows Media Video V7 Screen.</td></tr>
  52323. <tr><td width="40%">Microsoft Screen 2</td><td width="10%"></td><td width="10%">X</td><td width="40%">Also known as Windows Media Video V9 Screen.</td></tr>
  52324. <tr><td width="40%">Microsoft Video 1</td><td width="10%"></td><td width="10%">X</td></tr>
  52325. <tr><td width="40%">Mimic</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in MSN Messenger Webcam streams.</td></tr>
  52326. <tr><td width="40%">Miro VideoXL</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VIXL</td></tr>
  52327. <tr><td width="40%">MJPEG (Motion JPEG)</td><td width="10%">X</td><td width="10%">X</td></tr>
  52328. <tr><td width="40%">Mobotix MxPEG video</td><td width="10%"></td><td width="10%">X</td></tr>
  52329. <tr><td width="40%">Motion Pixels video</td><td width="10%"></td><td width="10%">X</td></tr>
  52330. <tr><td width="40%">MPEG-1 video</td><td width="10%">X</td><td width="10%">X</td></tr>
  52331. <tr><td width="40%">MPEG-2 video</td><td width="10%">X</td><td width="10%">X</td></tr>
  52332. <tr><td width="40%">MPEG-4 part 2</td><td width="10%">X</td><td width="10%">X</td><td width="40%">libxvidcore can be used alternatively for encoding.</td></tr>
  52333. <tr><td width="40%">MPEG-4 part 2 Microsoft variant version 1</td><td width="10%"></td><td width="10%">X</td></tr>
  52334. <tr><td width="40%">MPEG-4 part 2 Microsoft variant version 2</td><td width="10%">X</td><td width="10%">X</td></tr>
  52335. <tr><td width="40%">MPEG-4 part 2 Microsoft variant version 3</td><td width="10%">X</td><td width="10%">X</td></tr>
  52336. <tr><td width="40%">Newtek SpeedHQ</td><td width="10%">X</td><td width="10%">X</td></tr>
  52337. <tr><td width="40%">Nintendo Gamecube THP video</td><td width="10%"></td><td width="10%">X</td></tr>
  52338. <tr><td width="40%">NotchLC</td><td width="10%"></td><td width="10%">X</td></tr>
  52339. <tr><td width="40%">NuppelVideo/RTjpeg</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video encoding used in NuppelVideo files.</td></tr>
  52340. <tr><td width="40%">On2 VP3</td><td width="10%"></td><td width="10%">X</td><td width="40%">still experimental</td></tr>
  52341. <tr><td width="40%">On2 VP4</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP40</td></tr>
  52342. <tr><td width="40%">On2 VP5</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP50</td></tr>
  52343. <tr><td width="40%">On2 VP6</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP60,VP61,VP62</td></tr>
  52344. <tr><td width="40%">On2 VP7</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP70,VP71</td></tr>
  52345. <tr><td width="40%">VP8</td><td width="10%">E</td><td width="10%">X</td><td width="40%">fourcc: VP80, encoding supported through external library libvpx</td></tr>
  52346. <tr><td width="40%">VP9</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libvpx</td></tr>
  52347. <tr><td width="40%">Pinnacle TARGA CineWave YUV16</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: Y216</td></tr>
  52348. <tr><td width="40%">Q-team QPEG</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourccs: QPEG, Q1.0, Q1.1</td></tr>
  52349. <tr><td width="40%">QuickTime 8BPS video</td><td width="10%"></td><td width="10%">X</td></tr>
  52350. <tr><td width="40%">QuickTime Animation (RLE) video</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: &rsquo;rle &rsquo;</td></tr>
  52351. <tr><td width="40%">QuickTime Graphics (SMC)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: &rsquo;smc &rsquo;</td></tr>
  52352. <tr><td width="40%">QuickTime video (RPZA)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: rpza</td></tr>
  52353. <tr><td width="40%">R10K AJA Kona 10-bit RGB Codec</td><td width="10%">X</td><td width="10%">X</td></tr>
  52354. <tr><td width="40%">R210 Quicktime Uncompressed RGB 10-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52355. <tr><td width="40%">Raw Video</td><td width="10%">X</td><td width="10%">X</td></tr>
  52356. <tr><td width="40%">RealVideo 1.0</td><td width="10%">X</td><td width="10%">X</td></tr>
  52357. <tr><td width="40%">RealVideo 2.0</td><td width="10%">X</td><td width="10%">X</td></tr>
  52358. <tr><td width="40%">RealVideo 3.0</td><td width="10%"></td><td width="10%">X</td><td width="40%">still far from ideal</td></tr>
  52359. <tr><td width="40%">RealVideo 4.0</td><td width="10%"></td><td width="10%">X</td></tr>
  52360. <tr><td width="40%">Renderware TXD (TeXture Dictionary)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Texture dictionaries used by the Renderware Engine.</td></tr>
  52361. <tr><td width="40%">RivaTuner Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: &rsquo;RTV1&rsquo;</td></tr>
  52362. <tr><td width="40%">RL2 video</td><td width="10%"></td><td width="10%">X</td><td width="40%">used in some games by Entertainment Software Partners</td></tr>
  52363. <tr><td width="40%">ScreenPressor</td><td width="10%"></td><td width="10%">X</td></tr>
  52364. <tr><td width="40%">Screenpresso</td><td width="10%"></td><td width="10%">X</td></tr>
  52365. <tr><td width="40%">Screen Recorder Gold Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  52366. <tr><td width="40%">Sierra VMD video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra VMD files.</td></tr>
  52367. <tr><td width="40%">Silicon Graphics Motion Video Compressor 1 (MVC1)</td><td width="10%"></td><td width="10%">X</td></tr>
  52368. <tr><td width="40%">Silicon Graphics Motion Video Compressor 2 (MVC2)</td><td width="10%"></td><td width="10%">X</td></tr>
  52369. <tr><td width="40%">Silicon Graphics RLE 8-bit video</td><td width="10%"></td><td width="10%">X</td></tr>
  52370. <tr><td width="40%">Smacker video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Video encoding used in Smacker.</td></tr>
  52371. <tr><td width="40%">SMPTE VC-1</td><td width="10%"></td><td width="10%">X</td></tr>
  52372. <tr><td width="40%">Snow</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental wavelet codec (fourcc: SNOW)</td></tr>
  52373. <tr><td width="40%">Sony PlayStation MDEC (Motion DECoder)</td><td width="10%"></td><td width="10%">X</td></tr>
  52374. <tr><td width="40%">Sorenson Vector Quantizer 1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: SVQ1</td></tr>
  52375. <tr><td width="40%">Sorenson Vector Quantizer 3</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: SVQ3</td></tr>
  52376. <tr><td width="40%">Sunplus JPEG (SP5X)</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: SP5X</td></tr>
  52377. <tr><td width="40%">TechSmith Screen Capture Codec</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: TSCC</td></tr>
  52378. <tr><td width="40%">TechSmith Screen Capture Codec 2</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: TSC2</td></tr>
  52379. <tr><td width="40%">Theora</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libtheora</td></tr>
  52380. <tr><td width="40%">Tiertex Limited SEQ video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in DOS CD-ROM FlashBack game.</td></tr>
  52381. <tr><td width="40%">Ut Video</td><td width="10%">X</td><td width="10%">X</td></tr>
  52382. <tr><td width="40%">v210 QuickTime uncompressed 4:2:2 10-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52383. <tr><td width="40%">v308 QuickTime uncompressed 4:4:4</td><td width="10%">X</td><td width="10%">X</td></tr>
  52384. <tr><td width="40%">v408 QuickTime uncompressed 4:4:4:4</td><td width="10%">X</td><td width="10%">X</td></tr>
  52385. <tr><td width="40%">v410 QuickTime uncompressed 4:4:4 10-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52386. <tr><td width="40%">VBLE Lossless Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  52387. <tr><td width="40%">vMix Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: &rsquo;VMX1&rsquo;</td></tr>
  52388. <tr><td width="40%">VMware Screen Codec / VMware Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in videos captured by VMware.</td></tr>
  52389. <tr><td width="40%">Westwood Studios VQA (Vector Quantized Animation) video</td><td width="10%"></td><td width="10%">X</td></tr>
  52390. <tr><td width="40%">Windows Media Image</td><td width="10%"></td><td width="10%">X</td></tr>
  52391. <tr><td width="40%">Windows Media Video 7</td><td width="10%">X</td><td width="10%">X</td></tr>
  52392. <tr><td width="40%">Windows Media Video 8</td><td width="10%">X</td><td width="10%">X</td></tr>
  52393. <tr><td width="40%">Windows Media Video 9</td><td width="10%"></td><td width="10%">X</td><td width="40%">not completely working</td></tr>
  52394. <tr><td width="40%">Wing Commander III / Xan</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Wing Commander III .MVE files.</td></tr>
  52395. <tr><td width="40%">Wing Commander IV / Xan</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Wing Commander IV.</td></tr>
  52396. <tr><td width="40%">Winnov WNV1</td><td width="10%"></td><td width="10%">X</td></tr>
  52397. <tr><td width="40%">WMV7</td><td width="10%">X</td><td width="10%">X</td></tr>
  52398. <tr><td width="40%">YAMAHA SMAF</td><td width="10%">X</td><td width="10%">X</td></tr>
  52399. <tr><td width="40%">Psygnosis YOP Video</td><td width="10%"></td><td width="10%">X</td></tr>
  52400. <tr><td width="40%">yuv4</td><td width="10%">X</td><td width="10%">X</td><td width="40%">libquicktime uncompressed packed 4:2:0</td></tr>
  52401. <tr><td width="40%">ZeroCodec Lossless Video</td><td width="10%"></td><td width="10%">X</td></tr>
  52402. <tr><td width="40%">ZLIB</td><td width="10%">X</td><td width="10%">X</td><td width="40%">part of LCL, encoder experimental</td></tr>
  52403. <tr><td width="40%">Zip Motion Blocks Video</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Encoder works only in PAL8.</td></tr>
  52404. </tbody>
  52405. </table>
  52406. <p><code class="code">X</code> means that the feature in that column (encoding / decoding) is supported.
  52407. </p>
  52408. <p><code class="code">E</code> means that support is provided through an external library.
  52409. </p>
  52410. </div>
  52411. <div class="section-level-extent" id="Audio-Codecs">
  52412. <h3 class="section"><span>42.4 Audio Codecs<a class="copiable-link" href="#Audio-Codecs"> &para;</a></span></h3>
  52413. <table class="multitable">
  52414. <tbody><tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  52415. <tr><td width="40%">8SVX exponential</td><td width="10%"></td><td width="10%">X</td></tr>
  52416. <tr><td width="40%">8SVX fibonacci</td><td width="10%"></td><td width="10%">X</td></tr>
  52417. <tr><td width="40%">AAC</td><td width="10%">EX</td><td width="10%">X</td><td width="40%">encoding supported through internal encoder and external library libfdk-aac</td></tr>
  52418. <tr><td width="40%">AAC+</td><td width="10%">E</td><td width="10%">IX</td><td width="40%">encoding supported through external library libfdk-aac</td></tr>
  52419. <tr><td width="40%">AC-3</td><td width="10%">IX</td><td width="10%">IX</td></tr>
  52420. <tr><td width="40%">ACELP.KELVIN</td><td width="10%"></td><td width="10%">X</td></tr>
  52421. <tr><td width="40%">ADPCM 4X Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  52422. <tr><td width="40%">ADPCM Yamaha AICA</td><td width="10%"></td><td width="10%">X</td></tr>
  52423. <tr><td width="40%">ADPCM AmuseGraphics Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  52424. <tr><td width="40%">ADPCM Argonaut Games</td><td width="10%">X</td><td width="10%">X</td></tr>
  52425. <tr><td width="40%">ADPCM CDROM XA</td><td width="10%"></td><td width="10%">X</td></tr>
  52426. <tr><td width="40%">ADPCM Creative Technology</td><td width="10%"></td><td width="10%">X</td><td width="40%">16 -&gt; 4, 8 -&gt; 4, 8 -&gt; 3, 8 -&gt; 2</td></tr>
  52427. <tr><td width="40%">ADPCM Electronic Arts</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in various EA titles.</td></tr>
  52428. <tr><td width="40%">ADPCM Electronic Arts Maxis CDROM XS</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sim City 3000.</td></tr>
  52429. <tr><td width="40%">ADPCM Electronic Arts R1</td><td width="10%"></td><td width="10%">X</td></tr>
  52430. <tr><td width="40%">ADPCM Electronic Arts R2</td><td width="10%"></td><td width="10%">X</td></tr>
  52431. <tr><td width="40%">ADPCM Electronic Arts R3</td><td width="10%"></td><td width="10%">X</td></tr>
  52432. <tr><td width="40%">ADPCM Electronic Arts XAS</td><td width="10%"></td><td width="10%">X</td></tr>
  52433. <tr><td width="40%">ADPCM G.722</td><td width="10%">X</td><td width="10%">X</td></tr>
  52434. <tr><td width="40%">ADPCM G.726</td><td width="10%">X</td><td width="10%">X</td></tr>
  52435. <tr><td width="40%">ADPCM IMA Acorn Replay</td><td width="10%"></td><td width="10%">X</td></tr>
  52436. <tr><td width="40%">ADPCM IMA AMV</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in AMV files</td></tr>
  52437. <tr><td width="40%">ADPCM IMA Cunning Developments</td><td width="10%"></td><td width="10%">X</td></tr>
  52438. <tr><td width="40%">ADPCM IMA Electronic Arts EACS</td><td width="10%"></td><td width="10%">X</td></tr>
  52439. <tr><td width="40%">ADPCM IMA Electronic Arts SEAD</td><td width="10%"></td><td width="10%">X</td></tr>
  52440. <tr><td width="40%">ADPCM IMA Funcom</td><td width="10%"></td><td width="10%">X</td></tr>
  52441. <tr><td width="40%">ADPCM IMA High Voltage Software ALP</td><td width="10%">X</td><td width="10%">X</td></tr>
  52442. <tr><td width="40%">ADPCM IMA Mobiclip MOFLEX</td><td width="10%"></td><td width="10%">X</td></tr>
  52443. <tr><td width="40%">ADPCM IMA QuickTime</td><td width="10%">X</td><td width="10%">X</td></tr>
  52444. <tr><td width="40%">ADPCM IMA Simon &amp; Schuster Interactive</td><td width="10%">X</td><td width="10%">X</td></tr>
  52445. <tr><td width="40%">ADPCM IMA Ubisoft APM</td><td width="10%">X</td><td width="10%">X</td></tr>
  52446. <tr><td width="40%">ADPCM IMA Loki SDL MJPEG</td><td width="10%"></td><td width="10%">X</td></tr>
  52447. <tr><td width="40%">ADPCM IMA WAV</td><td width="10%">X</td><td width="10%">X</td></tr>
  52448. <tr><td width="40%">ADPCM IMA Westwood</td><td width="10%"></td><td width="10%">X</td></tr>
  52449. <tr><td width="40%">ADPCM ISS IMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in FunCom games.</td></tr>
  52450. <tr><td width="40%">ADPCM IMA Dialogic</td><td width="10%"></td><td width="10%">X</td></tr>
  52451. <tr><td width="40%">ADPCM IMA Duck DK3</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some Sega Saturn console games.</td></tr>
  52452. <tr><td width="40%">ADPCM IMA Duck DK4</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in some Sega Saturn console games.</td></tr>
  52453. <tr><td width="40%">ADPCM IMA Radical</td><td width="10%"></td><td width="10%">X</td></tr>
  52454. <tr><td width="40%">ADPCM Microsoft</td><td width="10%">X</td><td width="10%">X</td></tr>
  52455. <tr><td width="40%">ADPCM MS IMA</td><td width="10%">X</td><td width="10%">X</td></tr>
  52456. <tr><td width="40%">ADPCM Nintendo Gamecube AFC</td><td width="10%"></td><td width="10%">X</td></tr>
  52457. <tr><td width="40%">ADPCM Nintendo Gamecube DTK</td><td width="10%"></td><td width="10%">X</td></tr>
  52458. <tr><td width="40%">ADPCM Nintendo THP</td><td width="10%"></td><td width="10%">X</td></tr>
  52459. <tr><td width="40%">ADPCM Playstation</td><td width="10%"></td><td width="10%">X</td></tr>
  52460. <tr><td width="40%">ADPCM QT IMA</td><td width="10%">X</td><td width="10%">X</td></tr>
  52461. <tr><td width="40%">ADPCM SEGA CRI ADX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Sega Dreamcast games.</td></tr>
  52462. <tr><td width="40%">ADPCM Shockwave Flash</td><td width="10%">X</td><td width="10%">X</td></tr>
  52463. <tr><td width="40%">ADPCM Sound Blaster Pro 2-bit</td><td width="10%"></td><td width="10%">X</td></tr>
  52464. <tr><td width="40%">ADPCM Sound Blaster Pro 2.6-bit</td><td width="10%"></td><td width="10%">X</td></tr>
  52465. <tr><td width="40%">ADPCM Sound Blaster Pro 4-bit</td><td width="10%"></td><td width="10%">X</td></tr>
  52466. <tr><td width="40%">ADPCM VIMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in LucasArts SMUSH animations.</td></tr>
  52467. <tr><td width="40%">ADPCM Konami XMD</td><td width="10%"></td><td width="10%">X</td></tr>
  52468. <tr><td width="40%">ADPCM Westwood Studios IMA</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Westwood Studios games like Command and Conquer.</td></tr>
  52469. <tr><td width="40%">ADPCM Yamaha</td><td width="10%">X</td><td width="10%">X</td></tr>
  52470. <tr><td width="40%">ADPCM Zork</td><td width="10%"></td><td width="10%">X</td></tr>
  52471. <tr><td width="40%">AMR-NB</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libopencore-amrnb</td></tr>
  52472. <tr><td width="40%">AMR-WB</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libvo-amrwbenc</td></tr>
  52473. <tr><td width="40%">Amazing Studio PAF Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  52474. <tr><td width="40%">Apple lossless audio</td><td width="10%">X</td><td width="10%">X</td><td width="40%">QuickTime fourcc &rsquo;alac&rsquo;</td></tr>
  52475. <tr><td width="40%">aptX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Bluetooth A2DP</td></tr>
  52476. <tr><td width="40%">aptX HD</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Bluetooth A2DP</td></tr>
  52477. <tr><td width="40%">ATRAC1</td><td width="10%"></td><td width="10%">X</td></tr>
  52478. <tr><td width="40%">ATRAC3</td><td width="10%"></td><td width="10%">X</td></tr>
  52479. <tr><td width="40%">ATRAC3+</td><td width="10%"></td><td width="10%">X</td></tr>
  52480. <tr><td width="40%">ATRAC9</td><td width="10%"></td><td width="10%">X</td></tr>
  52481. <tr><td width="40%">Bink Audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Bink and Smacker files in many games.</td></tr>
  52482. <tr><td width="40%">Bonk audio</td><td width="10%"></td><td width="10%">X</td></tr>
  52483. <tr><td width="40%">CELT</td><td width="10%"></td><td width="10%">E</td><td width="40%">decoding supported through external library libcelt</td></tr>
  52484. <tr><td width="40%">codec2</td><td width="10%">E</td><td width="10%">E</td><td width="40%">en/decoding supported through external library libcodec2</td></tr>
  52485. <tr><td width="40%">CRI HCA</td><td width="10%"></td><td width="10%">X</td></tr>
  52486. <tr><td width="40%">Delphine Software International CIN audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Codec used in Delphine Software International games.</td></tr>
  52487. <tr><td width="40%">DFPWM</td><td width="10%">X</td><td width="10%">X</td></tr>
  52488. <tr><td width="40%">Digital Speech Standard - Standard Play mode (DSS SP)</td><td width="10%"></td><td width="10%">X</td></tr>
  52489. <tr><td width="40%">Discworld II BMV Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  52490. <tr><td width="40%">COOK</td><td width="10%"></td><td width="10%">X</td><td width="40%">All versions except 5.1 are supported.</td></tr>
  52491. <tr><td width="40%">DCA (DTS Coherent Acoustics)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">supported extensions: XCh, XXCH, X96, XBR, XLL, LBR (partially)</td></tr>
  52492. <tr><td width="40%">Dolby E</td><td width="10%"></td><td width="10%">X</td></tr>
  52493. <tr><td width="40%">DPCM Cuberoot-Delta-Exact</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in few games.</td></tr>
  52494. <tr><td width="40%">DPCM Gremlin</td><td width="10%"></td><td width="10%">X</td></tr>
  52495. <tr><td width="40%">DPCM id RoQ</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Quake III, Jedi Knight 2 and other computer games.</td></tr>
  52496. <tr><td width="40%">DPCM Marble WADY</td><td width="10%"></td><td width="10%">X</td></tr>
  52497. <tr><td width="40%">DPCM Interplay</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in various Interplay computer games.</td></tr>
  52498. <tr><td width="40%">DPCM Squareroot-Delta-Exact</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in various games.</td></tr>
  52499. <tr><td width="40%">DPCM Sierra Online</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra Online game audio files.</td></tr>
  52500. <tr><td width="40%">DPCM Sol</td><td width="10%"></td><td width="10%">X</td></tr>
  52501. <tr><td width="40%">DPCM Xan</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Origin&rsquo;s Wing Commander IV AVI files.</td></tr>
  52502. <tr><td width="40%">DPCM Xilam DERF</td><td width="10%"></td><td width="10%">X</td></tr>
  52503. <tr><td width="40%">DSD (Direct Stream Digital), least significant bit first</td><td width="10%"></td><td width="10%">X</td></tr>
  52504. <tr><td width="40%">DSD (Direct Stream Digital), most significant bit first</td><td width="10%"></td><td width="10%">X</td></tr>
  52505. <tr><td width="40%">DSD (Direct Stream Digital), least significant bit first, planar</td><td width="10%"></td><td width="10%">X</td></tr>
  52506. <tr><td width="40%">DSD (Direct Stream Digital), most significant bit first, planar</td><td width="10%"></td><td width="10%">X</td></tr>
  52507. <tr><td width="40%">DSP Group TrueSpeech</td><td width="10%"></td><td width="10%">X</td></tr>
  52508. <tr><td width="40%">DST (Direct Stream Transfer)</td><td width="10%"></td><td width="10%">X</td></tr>
  52509. <tr><td width="40%">DV audio</td><td width="10%"></td><td width="10%">X</td></tr>
  52510. <tr><td width="40%">Enhanced AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
  52511. <tr><td width="40%">EVRC (Enhanced Variable Rate Codec)</td><td width="10%"></td><td width="10%">X</td></tr>
  52512. <tr><td width="40%">FLAC (Free Lossless Audio Codec)</td><td width="10%">X</td><td width="10%">IX</td></tr>
  52513. <tr><td width="40%">FTR Voice</td><td width="10%"></td><td width="10%">X</td></tr>
  52514. <tr><td width="40%">G.723.1</td><td width="10%">X</td><td width="10%">X</td></tr>
  52515. <tr><td width="40%">G.729</td><td width="10%"></td><td width="10%">X</td></tr>
  52516. <tr><td width="40%">GSM</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libgsm</td></tr>
  52517. <tr><td width="40%">GSM Microsoft variant</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libgsm</td></tr>
  52518. <tr><td width="40%">IAC (Indeo Audio Coder)</td><td width="10%"></td><td width="10%">X</td></tr>
  52519. <tr><td width="40%">iLBC (Internet Low Bitrate Codec)</td><td width="10%">E</td><td width="10%">EX</td><td width="40%">encoding and decoding supported through external library libilbc</td></tr>
  52520. <tr><td width="40%">IMC (Intel Music Coder)</td><td width="10%"></td><td width="10%">X</td></tr>
  52521. <tr><td width="40%">Interplay ACM</td><td width="10%"></td><td width="10%">X</td></tr>
  52522. <tr><td width="40%">MACE (Macintosh Audio Compression/Expansion) 3:1</td><td width="10%"></td><td width="10%">X</td></tr>
  52523. <tr><td width="40%">MACE (Macintosh Audio Compression/Expansion) 6:1</td><td width="10%"></td><td width="10%">X</td></tr>
  52524. <tr><td width="40%">Marian&rsquo;s A-pac audio</td><td width="10%"></td><td width="10%">X</td></tr>
  52525. <tr><td width="40%">MI-SC4 (Micronas SC-4 Audio)</td><td width="10%"></td><td width="10%">X</td></tr>
  52526. <tr><td width="40%">MLP (Meridian Lossless Packing)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in DVD-Audio discs.</td></tr>
  52527. <tr><td width="40%">Monkey&rsquo;s Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  52528. <tr><td width="40%">MP1 (MPEG audio layer 1)</td><td width="10%"></td><td width="10%">IX</td></tr>
  52529. <tr><td width="40%">MP2 (MPEG audio layer 2)</td><td width="10%">IX</td><td width="10%">IX</td><td width="40%">encoding supported also through external library TwoLAME</td></tr>
  52530. <tr><td width="40%">MP3 (MPEG audio layer 3)</td><td width="10%">E</td><td width="10%">IX</td><td width="40%">encoding supported through external library LAME, ADU MP3 and MP3onMP4 also supported</td></tr>
  52531. <tr><td width="40%">MPEG-4 Audio Lossless Coding (ALS)</td><td width="10%"></td><td width="10%">X</td></tr>
  52532. <tr><td width="40%">MobiClip FastAudio</td><td width="10%"></td><td width="10%">X</td></tr>
  52533. <tr><td width="40%">Musepack SV7</td><td width="10%"></td><td width="10%">X</td></tr>
  52534. <tr><td width="40%">Musepack SV8</td><td width="10%"></td><td width="10%">X</td></tr>
  52535. <tr><td width="40%">Nellymoser Asao</td><td width="10%">X</td><td width="10%">X</td></tr>
  52536. <tr><td width="40%">On2 AVC (Audio for Video Codec)</td><td width="10%"></td><td width="10%">X</td></tr>
  52537. <tr><td width="40%">Opus</td><td width="10%">E</td><td width="10%">X</td><td width="40%">encoding supported through external library libopus</td></tr>
  52538. <tr><td width="40%">OSQ (Original Sound Quality)</td><td width="10%"></td><td width="10%">X</td></tr>
  52539. <tr><td width="40%">PCM A-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  52540. <tr><td width="40%">PCM mu-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  52541. <tr><td width="40%">PCM Archimedes VIDC</td><td width="10%">X</td><td width="10%">X</td></tr>
  52542. <tr><td width="40%">PCM signed 8-bit planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  52543. <tr><td width="40%">PCM signed 16-bit big-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  52544. <tr><td width="40%">PCM signed 16-bit little-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  52545. <tr><td width="40%">PCM signed 24-bit little-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  52546. <tr><td width="40%">PCM signed 32-bit little-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  52547. <tr><td width="40%">PCM 32-bit floating point big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52548. <tr><td width="40%">PCM 32-bit floating point little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52549. <tr><td width="40%">PCM 64-bit floating point big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52550. <tr><td width="40%">PCM 64-bit floating point little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52551. <tr><td width="40%">PCM D-Cinema audio signed 24-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52552. <tr><td width="40%">PCM signed 8-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52553. <tr><td width="40%">PCM signed 16-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52554. <tr><td width="40%">PCM signed 16-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52555. <tr><td width="40%">PCM signed 24-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52556. <tr><td width="40%">PCM signed 24-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52557. <tr><td width="40%">PCM signed 32-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52558. <tr><td width="40%">PCM signed 32-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52559. <tr><td width="40%">PCM signed 16/20/24-bit big-endian in MPEG-TS</td><td width="10%"></td><td width="10%">X</td></tr>
  52560. <tr><td width="40%">PCM unsigned 8-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  52561. <tr><td width="40%">PCM unsigned 16-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52562. <tr><td width="40%">PCM unsigned 16-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52563. <tr><td width="40%">PCM unsigned 24-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52564. <tr><td width="40%">PCM unsigned 24-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52565. <tr><td width="40%">PCM unsigned 32-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52566. <tr><td width="40%">PCM unsigned 32-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  52567. <tr><td width="40%">PCM SGA</td><td width="10%"></td><td width="10%">X</td></tr>
  52568. <tr><td width="40%">QCELP / PureVoice</td><td width="10%"></td><td width="10%">X</td></tr>
  52569. <tr><td width="40%">QDesign Music Codec 1</td><td width="10%"></td><td width="10%">X</td></tr>
  52570. <tr><td width="40%">QDesign Music Codec 2</td><td width="10%"></td><td width="10%">X</td><td width="40%">There are still some distortions.</td></tr>
  52571. <tr><td width="40%">RealAudio 1.0 (14.4K)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Real 14400 bit/s codec</td></tr>
  52572. <tr><td width="40%">RealAudio 2.0 (28.8K)</td><td width="10%"></td><td width="10%">X</td><td width="40%">Real 28800 bit/s codec</td></tr>
  52573. <tr><td width="40%">RealAudio 3.0 (dnet)</td><td width="10%">IX</td><td width="10%">X</td><td width="40%">Real low bitrate AC-3 codec</td></tr>
  52574. <tr><td width="40%">RealAudio Lossless</td><td width="10%"></td><td width="10%">X</td></tr>
  52575. <tr><td width="40%">RealAudio SIPR / ACELP.NET</td><td width="10%"></td><td width="10%">X</td></tr>
  52576. <tr><td width="40%">RK Audio (RKA)</td><td width="10%"></td><td width="10%">X</td></tr>
  52577. <tr><td width="40%">SBC (low-complexity subband codec)</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in Bluetooth A2DP</td></tr>
  52578. <tr><td width="40%">Shorten</td><td width="10%"></td><td width="10%">X</td></tr>
  52579. <tr><td width="40%">Sierra VMD audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Sierra VMD files.</td></tr>
  52580. <tr><td width="40%">Smacker audio</td><td width="10%"></td><td width="10%">X</td></tr>
  52581. <tr><td width="40%">SMPTE 302M AES3 audio</td><td width="10%">X</td><td width="10%">X</td></tr>
  52582. <tr><td width="40%">Sonic</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental codec</td></tr>
  52583. <tr><td width="40%">Sonic lossless</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental codec</td></tr>
  52584. <tr><td width="40%">Speex</td><td width="10%">E</td><td width="10%">EX</td><td width="40%">supported through external library libspeex</td></tr>
  52585. <tr><td width="40%">TAK (Tom&rsquo;s lossless Audio Kompressor)</td><td width="10%"></td><td width="10%">X</td></tr>
  52586. <tr><td width="40%">True Audio (TTA)</td><td width="10%">X</td><td width="10%">X</td></tr>
  52587. <tr><td width="40%">TrueHD</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Used in HD-DVD and Blu-Ray discs.</td></tr>
  52588. <tr><td width="40%">TwinVQ (VQF flavor)</td><td width="10%"></td><td width="10%">X</td></tr>
  52589. <tr><td width="40%">VIMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in LucasArts SMUSH animations.</td></tr>
  52590. <tr><td width="40%">ViewQuest VQC</td><td width="10%"></td><td width="10%">X</td></tr>
  52591. <tr><td width="40%">Vorbis</td><td width="10%">E</td><td width="10%">X</td><td width="40%">A native but very primitive encoder exists.</td></tr>
  52592. <tr><td width="40%">Voxware MetaSound</td><td width="10%"></td><td width="10%">X</td></tr>
  52593. <tr><td width="40%">Waveform Archiver</td><td width="10%"></td><td width="10%">X</td></tr>
  52594. <tr><td width="40%">WavPack</td><td width="10%">X</td><td width="10%">X</td></tr>
  52595. <tr><td width="40%">Westwood Audio (SND1)</td><td width="10%"></td><td width="10%">X</td></tr>
  52596. <tr><td width="40%">Windows Media Audio 1</td><td width="10%">X</td><td width="10%">X</td></tr>
  52597. <tr><td width="40%">Windows Media Audio 2</td><td width="10%">X</td><td width="10%">X</td></tr>
  52598. <tr><td width="40%">Windows Media Audio Lossless</td><td width="10%"></td><td width="10%">X</td></tr>
  52599. <tr><td width="40%">Windows Media Audio Pro</td><td width="10%"></td><td width="10%">X</td></tr>
  52600. <tr><td width="40%">Windows Media Audio Voice</td><td width="10%"></td><td width="10%">X</td></tr>
  52601. <tr><td width="40%">Xbox Media Audio 1</td><td width="10%"></td><td width="10%">X</td></tr>
  52602. <tr><td width="40%">Xbox Media Audio 2</td><td width="10%"></td><td width="10%">X</td></tr>
  52603. </tbody>
  52604. </table>
  52605. <p><code class="code">X</code> means that the feature in that column (encoding / decoding) is supported.
  52606. </p>
  52607. <p><code class="code">E</code> means that support is provided through an external library.
  52608. </p>
  52609. <p><code class="code">I</code> means that an integer-only version is available, too (ensures high
  52610. performance on systems without hardware floating point support).
  52611. </p>
  52612. </div>
  52613. <div class="section-level-extent" id="Subtitle-Formats">
  52614. <h3 class="section"><span>42.5 Subtitle Formats<a class="copiable-link" href="#Subtitle-Formats"> &para;</a></span></h3>
  52615. <table class="multitable">
  52616. <tbody><tr><td width="40%">Name</td><td width="10%">Muxing</td><td width="10%">Demuxing</td><td width="10%">Encoding</td><td width="10%">Decoding</td></tr>
  52617. <tr><td width="40%">3GPP Timed Text</td><td width="10%"></td><td width="10%"></td><td width="10%">X</td><td width="10%">X</td></tr>
  52618. <tr><td width="40%">AQTitle</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52619. <tr><td width="40%">DVB</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
  52620. <tr><td width="40%">DVB teletext</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">E</td></tr>
  52621. <tr><td width="40%">DVD</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
  52622. <tr><td width="40%">JACOsub</td><td width="10%">X</td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52623. <tr><td width="40%">MicroDVD</td><td width="10%">X</td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52624. <tr><td width="40%">MPL2</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52625. <tr><td width="40%">MPsub (MPlayer)</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52626. <tr><td width="40%">PGS</td><td width="10%"></td><td width="10%"></td><td width="10%"></td><td width="10%">X</td></tr>
  52627. <tr><td width="40%">PJS (Phoenix)</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52628. <tr><td width="40%">RealText</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52629. <tr><td width="40%">SAMI</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52630. <tr><td width="40%">Spruce format (STL)</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52631. <tr><td width="40%">SSA/ASS</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
  52632. <tr><td width="40%">SubRip (SRT)</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
  52633. <tr><td width="40%">SubViewer v1</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52634. <tr><td width="40%">SubViewer</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52635. <tr><td width="40%">TED Talks captions</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52636. <tr><td width="40%">TTML</td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td></tr>
  52637. <tr><td width="40%">VobSub (IDX+SUB)</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52638. <tr><td width="40%">VPlayer</td><td width="10%"></td><td width="10%">X</td><td width="10%"></td><td width="10%">X</td></tr>
  52639. <tr><td width="40%">WebVTT</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td><td width="10%">X</td></tr>
  52640. <tr><td width="40%">XSUB</td><td width="10%"></td><td width="10%"></td><td width="10%">X</td><td width="10%">X</td></tr>
  52641. </tbody>
  52642. </table>
  52643. <p><code class="code">X</code> means that the feature is supported.
  52644. </p>
  52645. <p><code class="code">E</code> means that support is provided through an external library.
  52646. </p>
  52647. </div>
  52648. <div class="section-level-extent" id="Network-Protocols">
  52649. <h3 class="section"><span>42.6 Network Protocols<a class="copiable-link" href="#Network-Protocols"> &para;</a></span></h3>
  52650. <table class="multitable">
  52651. <tbody><tr><td width="40%">Name</td><td width="10%">Support</td></tr>
  52652. <tr><td width="40%">AMQP</td><td width="10%">E</td></tr>
  52653. <tr><td width="40%">file</td><td width="10%">X</td></tr>
  52654. <tr><td width="40%">FTP</td><td width="10%">X</td></tr>
  52655. <tr><td width="40%">Gopher</td><td width="10%">X</td></tr>
  52656. <tr><td width="40%">Gophers</td><td width="10%">X</td></tr>
  52657. <tr><td width="40%">HLS</td><td width="10%">X</td></tr>
  52658. <tr><td width="40%">HTTP</td><td width="10%">X</td></tr>
  52659. <tr><td width="40%">HTTPS</td><td width="10%">X</td></tr>
  52660. <tr><td width="40%">Icecast</td><td width="10%">X</td></tr>
  52661. <tr><td width="40%">MMSH</td><td width="10%">X</td></tr>
  52662. <tr><td width="40%">MMST</td><td width="10%">X</td></tr>
  52663. <tr><td width="40%">pipe</td><td width="10%">X</td></tr>
  52664. <tr><td width="40%">Pro-MPEG FEC</td><td width="10%">X</td></tr>
  52665. <tr><td width="40%">RTMP</td><td width="10%">X</td></tr>
  52666. <tr><td width="40%">RTMPE</td><td width="10%">X</td></tr>
  52667. <tr><td width="40%">RTMPS</td><td width="10%">X</td></tr>
  52668. <tr><td width="40%">RTMPT</td><td width="10%">X</td></tr>
  52669. <tr><td width="40%">RTMPTE</td><td width="10%">X</td></tr>
  52670. <tr><td width="40%">RTMPTS</td><td width="10%">X</td></tr>
  52671. <tr><td width="40%">RTP</td><td width="10%">X</td></tr>
  52672. <tr><td width="40%">SAMBA</td><td width="10%">E</td></tr>
  52673. <tr><td width="40%">SCTP</td><td width="10%">X</td></tr>
  52674. <tr><td width="40%">SFTP</td><td width="10%">E</td></tr>
  52675. <tr><td width="40%">TCP</td><td width="10%">X</td></tr>
  52676. <tr><td width="40%">TLS</td><td width="10%">X</td></tr>
  52677. <tr><td width="40%">UDP</td><td width="10%">X</td></tr>
  52678. <tr><td width="40%">ZMQ</td><td width="10%">E</td></tr>
  52679. </tbody>
  52680. </table>
  52681. <p><code class="code">X</code> means that the protocol is supported.
  52682. </p>
  52683. <p><code class="code">E</code> means that support is provided through an external library.
  52684. </p>
  52685. </div>
  52686. <div class="section-level-extent" id="Input_002fOutput-Devices">
  52687. <h3 class="section"><span>42.7 Input/Output Devices<a class="copiable-link" href="#Input_002fOutput-Devices"> &para;</a></span></h3>
  52688. <table class="multitable">
  52689. <tbody><tr><td width="40%">Name</td><td width="10%">Input</td><td width="10%">Output</td></tr>
  52690. <tr><td width="40%">ALSA</td><td width="10%">X</td><td width="10%">X</td></tr>
  52691. <tr><td width="40%">BKTR</td><td width="10%">X</td><td width="10%"></td></tr>
  52692. <tr><td width="40%">caca</td><td width="10%"></td><td width="10%">X</td></tr>
  52693. <tr><td width="40%">DV1394</td><td width="10%">X</td><td width="10%"></td></tr>
  52694. <tr><td width="40%">Lavfi virtual device</td><td width="10%">X</td><td width="10%"></td></tr>
  52695. <tr><td width="40%">Linux framebuffer</td><td width="10%">X</td><td width="10%">X</td></tr>
  52696. <tr><td width="40%">JACK</td><td width="10%">X</td><td width="10%"></td></tr>
  52697. <tr><td width="40%">LIBCDIO</td><td width="10%">X</td></tr>
  52698. <tr><td width="40%">LIBDC1394</td><td width="10%">X</td><td width="10%"></td></tr>
  52699. <tr><td width="40%">OpenAL</td><td width="10%">X</td></tr>
  52700. <tr><td width="40%">OpenGL</td><td width="10%"></td><td width="10%">X</td></tr>
  52701. <tr><td width="40%">OSS</td><td width="10%">X</td><td width="10%">X</td></tr>
  52702. <tr><td width="40%">PulseAudio</td><td width="10%">X</td><td width="10%">X</td></tr>
  52703. <tr><td width="40%">SDL</td><td width="10%"></td><td width="10%">X</td></tr>
  52704. <tr><td width="40%">Video4Linux2</td><td width="10%">X</td><td width="10%">X</td></tr>
  52705. <tr><td width="40%">VfW capture</td><td width="10%">X</td><td width="10%"></td></tr>
  52706. <tr><td width="40%">X11 grabbing</td><td width="10%">X</td><td width="10%"></td></tr>
  52707. <tr><td width="40%">Win32 grabbing</td><td width="10%">X</td><td width="10%"></td></tr>
  52708. </tbody>
  52709. </table>
  52710. <p><code class="code">X</code> means that input/output is supported.
  52711. </p>
  52712. </div>
  52713. <div class="section-level-extent" id="Timecode-1">
  52714. <h3 class="section"><span>42.8 Timecode<a class="copiable-link" href="#Timecode-1"> &para;</a></span></h3>
  52715. <table class="multitable">
  52716. <tbody><tr><td width="40%">Codec/format</td><td width="10%">Read</td><td width="10%">Write</td></tr>
  52717. <tr><td width="40%">AVI</td><td width="10%">X</td><td width="10%">X</td></tr>
  52718. <tr><td width="40%">DV</td><td width="10%">X</td><td width="10%">X</td></tr>
  52719. <tr><td width="40%">GXF</td><td width="10%">X</td><td width="10%">X</td></tr>
  52720. <tr><td width="40%">MOV</td><td width="10%">X</td><td width="10%">X</td></tr>
  52721. <tr><td width="40%">MPEG1/2</td><td width="10%">X</td><td width="10%">X</td></tr>
  52722. <tr><td width="40%">MXF</td><td width="10%">X</td><td width="10%">X</td></tr>
  52723. </tbody>
  52724. </table>
  52725. </div>
  52726. </div>
  52727. <div class="chapter-level-extent" id="See-Also">
  52728. <h2 class="chapter"><span>43 See Also<a class="copiable-link" href="#See-Also"> &para;</a></span></h2>
  52729. <p><a class="url" href="ffprobe.html">ffprobe</a>,
  52730. <a class="url" href="ffmpeg.html">ffmpeg</a>, <a class="url" href="ffplay.html">ffplay</a>,
  52731. <a class="url" href="ffmpeg-utils.html">ffmpeg-utils</a>,
  52732. <a class="url" href="ffmpeg-scaler.html">ffmpeg-scaler</a>,
  52733. <a class="url" href="ffmpeg-resampler.html">ffmpeg-resampler</a>,
  52734. <a class="url" href="ffmpeg-codecs.html">ffmpeg-codecs</a>,
  52735. <a class="url" href="ffmpeg-bitstream-filters.html">ffmpeg-bitstream-filters</a>,
  52736. <a class="url" href="ffmpeg-formats.html">ffmpeg-formats</a>,
  52737. <a class="url" href="ffmpeg-devices.html">ffmpeg-devices</a>,
  52738. <a class="url" href="ffmpeg-protocols.html">ffmpeg-protocols</a>,
  52739. <a class="url" href="ffmpeg-filters.html">ffmpeg-filters</a>
  52740. </p>
  52741. </div>
  52742. <div class="chapter-level-extent" id="Authors">
  52743. <h2 class="chapter"><span>44 Authors<a class="copiable-link" href="#Authors"> &para;</a></span></h2>
  52744. <p>The FFmpeg developers.
  52745. </p>
  52746. <p>For details about the authorship, see the Git history of the project
  52747. (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
  52748. <code class="command">git log</code> in the FFmpeg source directory, or browsing the
  52749. online repository at <a class="url" href="https://git.ffmpeg.org/ffmpeg">https://git.ffmpeg.org/ffmpeg</a>.
  52750. </p>
  52751. <p>Maintainers for the specific components are listed in the file
  52752. <samp class="file">MAINTAINERS</samp> in the source code tree.
  52753. </p>
  52754. </div>
  52755. </div>
  52756. <p style="font-size: small;">
  52757. This document was generated using <a class="uref" href="https://www.gnu.org/software/texinfo/"><em class="emph">makeinfo</em></a>.
  52758. </p>
  52759. </div>
  52760. </body>
  52761. </html>