ffprobe-all.html 1.7 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952
  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 6.7, http://www.gnu.org/software/texinfo/ -->
  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 align="center">
  19. </div>
  20. <a name="SEC_Top"></a>
  21. <span id="SEC_Contents"></span>
  22. <h2 class="contents-heading">Table of Contents</h2>
  23. <div class="contents">
  24. <ul class="no-bullet">
  25. <li><a id="toc-Synopsis" href="#Synopsis">1 Synopsis</a></li>
  26. <li><a id="toc-Description" href="#Description">2 Description</a></li>
  27. <li><a id="toc-Options" href="#Options">3 Options</a>
  28. <ul class="no-bullet">
  29. <li><a id="toc-Stream-specifiers-1" href="#Stream-specifiers-1">3.1 Stream specifiers</a></li>
  30. <li><a id="toc-Generic-options" href="#Generic-options">3.2 Generic options</a></li>
  31. <li><a id="toc-AVOptions" href="#AVOptions">3.3 AVOptions</a></li>
  32. <li><a id="toc-Main-options" href="#Main-options">3.4 Main options</a></li>
  33. </ul></li>
  34. <li><a id="toc-Writers" href="#Writers">4 Writers</a>
  35. <ul class="no-bullet">
  36. <li><a id="toc-default" href="#default">4.1 default</a></li>
  37. <li><a id="toc-compact_002c-csv" href="#compact_002c-csv">4.2 compact, csv</a></li>
  38. <li><a id="toc-flat" href="#flat">4.3 flat</a></li>
  39. <li><a id="toc-ini" href="#ini">4.4 ini</a></li>
  40. <li><a id="toc-json" href="#json">4.5 json</a></li>
  41. <li><a id="toc-xml" href="#xml">4.6 xml</a></li>
  42. </ul></li>
  43. <li><a id="toc-Timecode" href="#Timecode">5 Timecode</a></li>
  44. <li><a id="toc-Syntax" href="#Syntax">6 Syntax</a>
  45. <ul class="no-bullet">
  46. <li><a id="toc-Quoting-and-escaping" href="#Quoting-and-escaping">6.1 Quoting and escaping</a>
  47. <ul class="no-bullet">
  48. <li><a id="toc-Examples" href="#Examples">6.1.1 Examples</a></li>
  49. </ul></li>
  50. <li><a id="toc-Date" href="#Date">6.2 Date</a></li>
  51. <li><a id="toc-Time-duration" href="#Time-duration">6.3 Time duration</a>
  52. <ul class="no-bullet">
  53. <li><a id="toc-Examples-1" href="#Examples-1">6.3.1 Examples</a></li>
  54. </ul></li>
  55. <li><a id="toc-Video-size" href="#Video-size">6.4 Video size</a></li>
  56. <li><a id="toc-Video-rate" href="#Video-rate">6.5 Video rate</a></li>
  57. <li><a id="toc-Ratio" href="#Ratio">6.6 Ratio</a></li>
  58. <li><a id="toc-Color" href="#Color">6.7 Color</a></li>
  59. <li><a id="toc-Channel-Layout" href="#Channel-Layout">6.8 Channel Layout</a></li>
  60. </ul></li>
  61. <li><a id="toc-Expression-Evaluation" href="#Expression-Evaluation">7 Expression Evaluation</a></li>
  62. <li><a id="toc-Codec-Options" href="#Codec-Options">8 Codec Options</a></li>
  63. <li><a id="toc-Decoders" href="#Decoders">9 Decoders</a></li>
  64. <li><a id="toc-Video-Decoders" href="#Video-Decoders">10 Video Decoders</a>
  65. <ul class="no-bullet">
  66. <li><a id="toc-av1" href="#av1">10.1 av1</a>
  67. <ul class="no-bullet">
  68. <li><a id="toc-Options-1" href="#Options-1">10.1.1 Options</a></li>
  69. </ul></li>
  70. <li><a id="toc-rawvideo" href="#rawvideo">10.2 rawvideo</a>
  71. <ul class="no-bullet">
  72. <li><a id="toc-Options-2" href="#Options-2">10.2.1 Options</a></li>
  73. </ul></li>
  74. <li><a id="toc-libdav1d" href="#libdav1d">10.3 libdav1d</a>
  75. <ul class="no-bullet">
  76. <li><a id="toc-Options-3" href="#Options-3">10.3.1 Options</a></li>
  77. </ul></li>
  78. <li><a id="toc-libdavs2" href="#libdavs2">10.4 libdavs2</a></li>
  79. <li><a id="toc-libuavs3d" href="#libuavs3d">10.5 libuavs3d</a>
  80. <ul class="no-bullet">
  81. <li><a id="toc-Options-4" href="#Options-4">10.5.1 Options</a></li>
  82. </ul></li>
  83. </ul></li>
  84. <li><a id="toc-Audio-Decoders" href="#Audio-Decoders">11 Audio Decoders</a>
  85. <ul class="no-bullet">
  86. <li><a id="toc-ac3" href="#ac3">11.1 ac3</a>
  87. <ul class="no-bullet">
  88. <li><a id="toc-AC_002d3-Decoder-Options" href="#AC_002d3-Decoder-Options">11.1.1 AC-3 Decoder Options</a></li>
  89. </ul></li>
  90. <li><a id="toc-flac" href="#flac">11.2 flac</a>
  91. <ul class="no-bullet">
  92. <li><a id="toc-FLAC-Decoder-options" href="#FLAC-Decoder-options">11.2.1 FLAC Decoder options</a></li>
  93. </ul></li>
  94. <li><a id="toc-ffwavesynth" href="#ffwavesynth">11.3 ffwavesynth</a></li>
  95. <li><a id="toc-libcelt" href="#libcelt">11.4 libcelt</a></li>
  96. <li><a id="toc-libgsm" href="#libgsm">11.5 libgsm</a></li>
  97. <li><a id="toc-libilbc" href="#libilbc">11.6 libilbc</a>
  98. <ul class="no-bullet">
  99. <li><a id="toc-Options-5" href="#Options-5">11.6.1 Options</a></li>
  100. </ul></li>
  101. <li><a id="toc-libopencore_002damrnb" href="#libopencore_002damrnb">11.7 libopencore-amrnb</a></li>
  102. <li><a id="toc-libopencore_002damrwb" href="#libopencore_002damrwb">11.8 libopencore-amrwb</a></li>
  103. <li><a id="toc-libopus" href="#libopus">11.9 libopus</a></li>
  104. </ul></li>
  105. <li><a id="toc-Subtitles-Decoders" href="#Subtitles-Decoders">12 Subtitles Decoders</a>
  106. <ul class="no-bullet">
  107. <li><a id="toc-libaribb24" href="#libaribb24">12.1 libaribb24</a>
  108. <ul class="no-bullet">
  109. <li><a id="toc-libaribb24-Decoder-Options" href="#libaribb24-Decoder-Options">12.1.1 libaribb24 Decoder Options</a></li>
  110. </ul></li>
  111. <li><a id="toc-dvbsub" href="#dvbsub">12.2 dvbsub</a>
  112. <ul class="no-bullet">
  113. <li><a id="toc-Options-6" href="#Options-6">12.2.1 Options</a></li>
  114. </ul></li>
  115. <li><a id="toc-dvdsub" href="#dvdsub">12.3 dvdsub</a>
  116. <ul class="no-bullet">
  117. <li><a id="toc-Options-7" href="#Options-7">12.3.1 Options</a></li>
  118. </ul></li>
  119. <li><a id="toc-libzvbi_002dteletext" href="#libzvbi_002dteletext">12.4 libzvbi-teletext</a>
  120. <ul class="no-bullet">
  121. <li><a id="toc-Options-8" href="#Options-8">12.4.1 Options</a></li>
  122. </ul></li>
  123. </ul></li>
  124. <li><a id="toc-Bitstream-Filters" href="#Bitstream-Filters">13 Bitstream Filters</a>
  125. <ul class="no-bullet">
  126. <li><a id="toc-aac_005fadtstoasc" href="#aac_005fadtstoasc">13.1 aac_adtstoasc</a></li>
  127. <li><a id="toc-av1_005fmetadata" href="#av1_005fmetadata">13.2 av1_metadata</a></li>
  128. <li><a id="toc-chomp" href="#chomp">13.3 chomp</a></li>
  129. <li><a id="toc-dca_005fcore" href="#dca_005fcore">13.4 dca_core</a></li>
  130. <li><a id="toc-dump_005fextra" href="#dump_005fextra">13.5 dump_extra</a></li>
  131. <li><a id="toc-eac3_005fcore" href="#eac3_005fcore">13.6 eac3_core</a></li>
  132. <li><a id="toc-extract_005fextradata" href="#extract_005fextradata">13.7 extract_extradata</a></li>
  133. <li><a id="toc-filter_005funits" href="#filter_005funits">13.8 filter_units</a></li>
  134. <li><a id="toc-hapqa_005fextract" href="#hapqa_005fextract">13.9 hapqa_extract</a></li>
  135. <li><a id="toc-h264_005fmetadata" href="#h264_005fmetadata">13.10 h264_metadata</a></li>
  136. <li><a id="toc-h264_005fmp4toannexb" href="#h264_005fmp4toannexb">13.11 h264_mp4toannexb</a></li>
  137. <li><a id="toc-h264_005fredundant_005fpps" href="#h264_005fredundant_005fpps">13.12 h264_redundant_pps</a></li>
  138. <li><a id="toc-hevc_005fmetadata" href="#hevc_005fmetadata">13.13 hevc_metadata</a></li>
  139. <li><a id="toc-hevc_005fmp4toannexb" href="#hevc_005fmp4toannexb">13.14 hevc_mp4toannexb</a></li>
  140. <li><a id="toc-imxdump" href="#imxdump">13.15 imxdump</a></li>
  141. <li><a id="toc-mjpeg2jpeg" href="#mjpeg2jpeg">13.16 mjpeg2jpeg</a></li>
  142. <li><a id="toc-mjpegadump" href="#mjpegadump">13.17 mjpegadump</a></li>
  143. <li><a id="toc-mov2textsub-1" href="#mov2textsub-1">13.18 mov2textsub</a></li>
  144. <li><a id="toc-mp3decomp" href="#mp3decomp">13.19 mp3decomp</a></li>
  145. <li><a id="toc-mpeg2_005fmetadata" href="#mpeg2_005fmetadata">13.20 mpeg2_metadata</a></li>
  146. <li><a id="toc-mpeg4_005funpack_005fbframes" href="#mpeg4_005funpack_005fbframes">13.21 mpeg4_unpack_bframes</a></li>
  147. <li><a id="toc-noise" href="#noise">13.22 noise</a></li>
  148. <li><a id="toc-null" href="#null">13.23 null</a></li>
  149. <li><a id="toc-pcm_005frechunk" href="#pcm_005frechunk">13.24 pcm_rechunk</a></li>
  150. <li><a id="toc-prores_005fmetadata" href="#prores_005fmetadata">13.25 prores_metadata</a></li>
  151. <li><a id="toc-remove_005fextra" href="#remove_005fextra">13.26 remove_extra</a></li>
  152. <li><a id="toc-setts" href="#setts">13.27 setts</a></li>
  153. <li><a id="toc-text2movsub-1" href="#text2movsub-1">13.28 text2movsub</a></li>
  154. <li><a id="toc-trace_005fheaders" href="#trace_005fheaders">13.29 trace_headers</a></li>
  155. <li><a id="toc-truehd_005fcore" href="#truehd_005fcore">13.30 truehd_core</a></li>
  156. <li><a id="toc-vp9_005fmetadata" href="#vp9_005fmetadata">13.31 vp9_metadata</a></li>
  157. <li><a id="toc-vp9_005fsuperframe" href="#vp9_005fsuperframe">13.32 vp9_superframe</a></li>
  158. <li><a id="toc-vp9_005fsuperframe_005fsplit" href="#vp9_005fsuperframe_005fsplit">13.33 vp9_superframe_split</a></li>
  159. <li><a id="toc-vp9_005fraw_005freorder" href="#vp9_005fraw_005freorder">13.34 vp9_raw_reorder</a></li>
  160. </ul></li>
  161. <li><a id="toc-Format-Options" href="#Format-Options">14 Format Options</a>
  162. <ul class="no-bullet">
  163. <li><a id="toc-Format-stream-specifiers-1" href="#Format-stream-specifiers-1">14.1 Format stream specifiers</a></li>
  164. </ul></li>
  165. <li><a id="toc-Demuxers" href="#Demuxers">15 Demuxers</a>
  166. <ul class="no-bullet">
  167. <li><a id="toc-aa" href="#aa">15.1 aa</a></li>
  168. <li><a id="toc-apng" href="#apng">15.2 apng</a></li>
  169. <li><a id="toc-asf" href="#asf">15.3 asf</a></li>
  170. <li><a id="toc-concat-1" href="#concat-1">15.4 concat</a>
  171. <ul class="no-bullet">
  172. <li><a id="toc-Syntax-1" href="#Syntax-1">15.4.1 Syntax</a></li>
  173. <li><a id="toc-Options-9" href="#Options-9">15.4.2 Options</a></li>
  174. <li><a id="toc-Examples-2" href="#Examples-2">15.4.3 Examples</a></li>
  175. </ul></li>
  176. <li><a id="toc-dash" href="#dash">15.5 dash</a></li>
  177. <li><a id="toc-flv_002c-live_005fflv" href="#flv_002c-live_005fflv">15.6 flv, live_flv</a></li>
  178. <li><a id="toc-gif" href="#gif">15.7 gif</a></li>
  179. <li><a id="toc-hls" href="#hls">15.8 hls</a></li>
  180. <li><a id="toc-image2" href="#image2">15.9 image2</a>
  181. <ul class="no-bullet">
  182. <li><a id="toc-Examples-3" href="#Examples-3">15.9.1 Examples</a></li>
  183. </ul></li>
  184. <li><a id="toc-libgme" href="#libgme">15.10 libgme</a></li>
  185. <li><a id="toc-libmodplug" href="#libmodplug">15.11 libmodplug</a></li>
  186. <li><a id="toc-libopenmpt" href="#libopenmpt">15.12 libopenmpt</a></li>
  187. <li><a id="toc-mov_002fmp4_002f3gp" href="#mov_002fmp4_002f3gp">15.13 mov/mp4/3gp</a>
  188. <ul class="no-bullet">
  189. <li><a id="toc-Options-10" href="#Options-10">15.13.1 Options</a></li>
  190. <li><a id="toc-Audible-AAX" href="#Audible-AAX">15.13.2 Audible AAX</a></li>
  191. </ul></li>
  192. <li><a id="toc-mpegts" href="#mpegts">15.14 mpegts</a></li>
  193. <li><a id="toc-mpjpeg" href="#mpjpeg">15.15 mpjpeg</a></li>
  194. <li><a id="toc-rawvideo-1" href="#rawvideo-1">15.16 rawvideo</a></li>
  195. <li><a id="toc-sbg" href="#sbg">15.17 sbg</a></li>
  196. <li><a id="toc-tedcaptions" href="#tedcaptions">15.18 tedcaptions</a></li>
  197. <li><a id="toc-vapoursynth" href="#vapoursynth">15.19 vapoursynth</a></li>
  198. </ul></li>
  199. <li><a id="toc-Metadata" href="#Metadata">16 Metadata</a></li>
  200. <li><a id="toc-Protocol-Options" href="#Protocol-Options">17 Protocol Options</a></li>
  201. <li><a id="toc-Protocols" href="#Protocols">18 Protocols</a>
  202. <ul class="no-bullet">
  203. <li><a id="toc-amqp" href="#amqp">18.1 amqp</a></li>
  204. <li><a id="toc-async" href="#async">18.2 async</a></li>
  205. <li><a id="toc-bluray" href="#bluray">18.3 bluray</a></li>
  206. <li><a id="toc-cache" href="#cache">18.4 cache</a></li>
  207. <li><a id="toc-concat-2" href="#concat-2">18.5 concat</a></li>
  208. <li><a id="toc-crypto" href="#crypto">18.6 crypto</a></li>
  209. <li><a id="toc-data" href="#data">18.7 data</a></li>
  210. <li><a id="toc-file" href="#file">18.8 file</a></li>
  211. <li><a id="toc-ftp" href="#ftp">18.9 ftp</a></li>
  212. <li><a id="toc-gopher" href="#gopher">18.10 gopher</a></li>
  213. <li><a id="toc-gophers" href="#gophers">18.11 gophers</a></li>
  214. <li><a id="toc-hls-1" href="#hls-1">18.12 hls</a></li>
  215. <li><a id="toc-http" href="#http">18.13 http</a>
  216. <ul class="no-bullet">
  217. <li><a id="toc-HTTP-Cookies" href="#HTTP-Cookies">18.13.1 HTTP Cookies</a></li>
  218. </ul></li>
  219. <li><a id="toc-Icecast" href="#Icecast">18.14 Icecast</a></li>
  220. <li><a id="toc-mmst" href="#mmst">18.15 mmst</a></li>
  221. <li><a id="toc-mmsh" href="#mmsh">18.16 mmsh</a></li>
  222. <li><a id="toc-md5" href="#md5">18.17 md5</a></li>
  223. <li><a id="toc-pipe" href="#pipe">18.18 pipe</a></li>
  224. <li><a id="toc-prompeg" href="#prompeg">18.19 prompeg</a></li>
  225. <li><a id="toc-rist" href="#rist">18.20 rist</a></li>
  226. <li><a id="toc-rtmp" href="#rtmp">18.21 rtmp</a></li>
  227. <li><a id="toc-rtmpe" href="#rtmpe">18.22 rtmpe</a></li>
  228. <li><a id="toc-rtmps" href="#rtmps">18.23 rtmps</a></li>
  229. <li><a id="toc-rtmpt" href="#rtmpt">18.24 rtmpt</a></li>
  230. <li><a id="toc-rtmpte" href="#rtmpte">18.25 rtmpte</a></li>
  231. <li><a id="toc-rtmpts" href="#rtmpts">18.26 rtmpts</a></li>
  232. <li><a id="toc-libsmbclient" href="#libsmbclient">18.27 libsmbclient</a></li>
  233. <li><a id="toc-libssh" href="#libssh">18.28 libssh</a></li>
  234. <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.29 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
  235. <li><a id="toc-rtp" href="#rtp">18.30 rtp</a></li>
  236. <li><a id="toc-rtsp" href="#rtsp">18.31 rtsp</a>
  237. <ul class="no-bullet">
  238. <li><a id="toc-Examples-4" href="#Examples-4">18.31.1 Examples</a></li>
  239. </ul></li>
  240. <li><a id="toc-sap" href="#sap">18.32 sap</a>
  241. <ul class="no-bullet">
  242. <li><a id="toc-Muxer" href="#Muxer">18.32.1 Muxer</a></li>
  243. <li><a id="toc-Demuxer" href="#Demuxer">18.32.2 Demuxer</a></li>
  244. </ul></li>
  245. <li><a id="toc-sctp" href="#sctp">18.33 sctp</a></li>
  246. <li><a id="toc-srt" href="#srt">18.34 srt</a></li>
  247. <li><a id="toc-srtp" href="#srtp">18.35 srtp</a></li>
  248. <li><a id="toc-subfile" href="#subfile">18.36 subfile</a></li>
  249. <li><a id="toc-tee" href="#tee">18.37 tee</a></li>
  250. <li><a id="toc-tcp" href="#tcp">18.38 tcp</a></li>
  251. <li><a id="toc-tls" href="#tls">18.39 tls</a></li>
  252. <li><a id="toc-udp" href="#udp">18.40 udp</a>
  253. <ul class="no-bullet">
  254. <li><a id="toc-Examples-5" href="#Examples-5">18.40.1 Examples</a></li>
  255. </ul></li>
  256. <li><a id="toc-unix" href="#unix">18.41 unix</a></li>
  257. <li><a id="toc-zmq" href="#zmq">18.42 zmq</a></li>
  258. </ul></li>
  259. <li><a id="toc-Device-Options" href="#Device-Options">19 Device Options</a></li>
  260. <li><a id="toc-Input-Devices" href="#Input-Devices">20 Input Devices</a>
  261. <ul class="no-bullet">
  262. <li><a id="toc-alsa" href="#alsa">20.1 alsa</a>
  263. <ul class="no-bullet">
  264. <li><a id="toc-Options-11" href="#Options-11">20.1.1 Options</a></li>
  265. </ul></li>
  266. <li><a id="toc-android_005fcamera" href="#android_005fcamera">20.2 android_camera</a>
  267. <ul class="no-bullet">
  268. <li><a id="toc-Options-12" href="#Options-12">20.2.1 Options</a></li>
  269. </ul></li>
  270. <li><a id="toc-avfoundation" href="#avfoundation">20.3 avfoundation</a>
  271. <ul class="no-bullet">
  272. <li><a id="toc-Options-13" href="#Options-13">20.3.1 Options</a></li>
  273. <li><a id="toc-Examples-6" href="#Examples-6">20.3.2 Examples</a></li>
  274. </ul></li>
  275. <li><a id="toc-bktr" href="#bktr">20.4 bktr</a>
  276. <ul class="no-bullet">
  277. <li><a id="toc-Options-14" href="#Options-14">20.4.1 Options</a></li>
  278. </ul></li>
  279. <li><a id="toc-decklink" href="#decklink">20.5 decklink</a>
  280. <ul class="no-bullet">
  281. <li><a id="toc-Options-15" href="#Options-15">20.5.1 Options</a></li>
  282. <li><a id="toc-Examples-7" href="#Examples-7">20.5.2 Examples</a></li>
  283. </ul></li>
  284. <li><a id="toc-dshow" href="#dshow">20.6 dshow</a>
  285. <ul class="no-bullet">
  286. <li><a id="toc-Options-16" href="#Options-16">20.6.1 Options</a></li>
  287. <li><a id="toc-Examples-8" href="#Examples-8">20.6.2 Examples</a></li>
  288. </ul></li>
  289. <li><a id="toc-fbdev" href="#fbdev">20.7 fbdev</a>
  290. <ul class="no-bullet">
  291. <li><a id="toc-Options-17" href="#Options-17">20.7.1 Options</a></li>
  292. </ul></li>
  293. <li><a id="toc-gdigrab" href="#gdigrab">20.8 gdigrab</a>
  294. <ul class="no-bullet">
  295. <li><a id="toc-Options-18" href="#Options-18">20.8.1 Options</a></li>
  296. </ul></li>
  297. <li><a id="toc-iec61883" href="#iec61883">20.9 iec61883</a>
  298. <ul class="no-bullet">
  299. <li><a id="toc-Options-19" href="#Options-19">20.9.1 Options</a></li>
  300. <li><a id="toc-Examples-9" href="#Examples-9">20.9.2 Examples</a></li>
  301. </ul></li>
  302. <li><a id="toc-jack" href="#jack">20.10 jack</a>
  303. <ul class="no-bullet">
  304. <li><a id="toc-Options-20" href="#Options-20">20.10.1 Options</a></li>
  305. </ul></li>
  306. <li><a id="toc-kmsgrab" href="#kmsgrab">20.11 kmsgrab</a>
  307. <ul class="no-bullet">
  308. <li><a id="toc-Options-21" href="#Options-21">20.11.1 Options</a></li>
  309. <li><a id="toc-Examples-10" href="#Examples-10">20.11.2 Examples</a></li>
  310. </ul></li>
  311. <li><a id="toc-lavfi" href="#lavfi">20.12 lavfi</a>
  312. <ul class="no-bullet">
  313. <li><a id="toc-Options-22" href="#Options-22">20.12.1 Options</a></li>
  314. <li><a id="toc-Examples-11" href="#Examples-11">20.12.2 Examples</a></li>
  315. </ul></li>
  316. <li><a id="toc-libcdio" href="#libcdio">20.13 libcdio</a>
  317. <ul class="no-bullet">
  318. <li><a id="toc-Options-23" href="#Options-23">20.13.1 Options</a></li>
  319. </ul></li>
  320. <li><a id="toc-libdc1394" href="#libdc1394">20.14 libdc1394</a>
  321. <ul class="no-bullet">
  322. <li><a id="toc-Options-24" href="#Options-24">20.14.1 Options</a></li>
  323. </ul></li>
  324. <li><a id="toc-openal" href="#openal">20.15 openal</a>
  325. <ul class="no-bullet">
  326. <li><a id="toc-Options-25" href="#Options-25">20.15.1 Options</a></li>
  327. <li><a id="toc-Examples-12" href="#Examples-12">20.15.2 Examples</a></li>
  328. </ul></li>
  329. <li><a id="toc-oss" href="#oss">20.16 oss</a>
  330. <ul class="no-bullet">
  331. <li><a id="toc-Options-26" href="#Options-26">20.16.1 Options</a></li>
  332. </ul></li>
  333. <li><a id="toc-pulse" href="#pulse">20.17 pulse</a>
  334. <ul class="no-bullet">
  335. <li><a id="toc-Options-27" href="#Options-27">20.17.1 Options</a></li>
  336. <li><a id="toc-Examples-13" href="#Examples-13">20.17.2 Examples</a></li>
  337. </ul></li>
  338. <li><a id="toc-sndio" href="#sndio">20.18 sndio</a>
  339. <ul class="no-bullet">
  340. <li><a id="toc-Options-28" href="#Options-28">20.18.1 Options</a></li>
  341. </ul></li>
  342. <li><a id="toc-video4linux2_002c-v4l2" href="#video4linux2_002c-v4l2">20.19 video4linux2, v4l2</a>
  343. <ul class="no-bullet">
  344. <li><a id="toc-Options-29" href="#Options-29">20.19.1 Options</a></li>
  345. </ul></li>
  346. <li><a id="toc-vfwcap" href="#vfwcap">20.20 vfwcap</a>
  347. <ul class="no-bullet">
  348. <li><a id="toc-Options-30" href="#Options-30">20.20.1 Options</a></li>
  349. </ul></li>
  350. <li><a id="toc-x11grab" href="#x11grab">20.21 x11grab</a>
  351. <ul class="no-bullet">
  352. <li><a id="toc-Options-31" href="#Options-31">20.21.1 Options</a></li>
  353. </ul></li>
  354. </ul></li>
  355. <li><a id="toc-Resampler-Options" href="#Resampler-Options">21 Resampler Options</a></li>
  356. <li><a id="toc-Scaler-Options" href="#Scaler-Options">22 Scaler Options</a></li>
  357. <li><a id="toc-Filtering-Introduction" href="#Filtering-Introduction">23 Filtering Introduction</a></li>
  358. <li><a id="toc-graph2dot" href="#graph2dot">24 graph2dot</a></li>
  359. <li><a id="toc-Filtergraph-description" href="#Filtergraph-description">25 Filtergraph description</a>
  360. <ul class="no-bullet">
  361. <li><a id="toc-Filtergraph-syntax-1" href="#Filtergraph-syntax-1">25.1 Filtergraph syntax</a></li>
  362. <li><a id="toc-Notes-on-filtergraph-escaping" href="#Notes-on-filtergraph-escaping">25.2 Notes on filtergraph escaping</a></li>
  363. </ul></li>
  364. <li><a id="toc-Timeline-editing" href="#Timeline-editing">26 Timeline editing</a></li>
  365. <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>
  366. <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>
  367. <li><a id="toc-Audio-Filters" href="#Audio-Filters">29 Audio Filters</a>
  368. <ul class="no-bullet">
  369. <li><a id="toc-acompressor" href="#acompressor">29.1 acompressor</a>
  370. <ul class="no-bullet">
  371. <li><a id="toc-Commands" href="#Commands">29.1.1 Commands</a></li>
  372. </ul></li>
  373. <li><a id="toc-acontrast" href="#acontrast">29.2 acontrast</a></li>
  374. <li><a id="toc-acopy" href="#acopy">29.3 acopy</a></li>
  375. <li><a id="toc-acrossfade" href="#acrossfade">29.4 acrossfade</a>
  376. <ul class="no-bullet">
  377. <li><a id="toc-Examples-14" href="#Examples-14">29.4.1 Examples</a></li>
  378. </ul></li>
  379. <li><a id="toc-acrossover" href="#acrossover">29.5 acrossover</a>
  380. <ul class="no-bullet">
  381. <li><a id="toc-Examples-15" href="#Examples-15">29.5.1 Examples</a></li>
  382. </ul></li>
  383. <li><a id="toc-acrusher" href="#acrusher">29.6 acrusher</a>
  384. <ul class="no-bullet">
  385. <li><a id="toc-Commands-1" href="#Commands-1">29.6.1 Commands</a></li>
  386. </ul></li>
  387. <li><a id="toc-acue" href="#acue">29.7 acue</a></li>
  388. <li><a id="toc-adeclick" href="#adeclick">29.8 adeclick</a></li>
  389. <li><a id="toc-adeclip" href="#adeclip">29.9 adeclip</a></li>
  390. <li><a id="toc-adelay" href="#adelay">29.10 adelay</a>
  391. <ul class="no-bullet">
  392. <li><a id="toc-Examples-16" href="#Examples-16">29.10.1 Examples</a></li>
  393. </ul></li>
  394. <li><a id="toc-adenorm" href="#adenorm">29.11 adenorm</a>
  395. <ul class="no-bullet">
  396. <li><a id="toc-Commands-2" href="#Commands-2">29.11.1 Commands</a></li>
  397. </ul></li>
  398. <li><a id="toc-aderivative_002c-aintegral" href="#aderivative_002c-aintegral">29.12 aderivative, aintegral</a></li>
  399. <li><a id="toc-aecho" href="#aecho">29.13 aecho</a>
  400. <ul class="no-bullet">
  401. <li><a id="toc-Examples-17" href="#Examples-17">29.13.1 Examples</a></li>
  402. </ul></li>
  403. <li><a id="toc-aemphasis" href="#aemphasis">29.14 aemphasis</a>
  404. <ul class="no-bullet">
  405. <li><a id="toc-Commands-3" href="#Commands-3">29.14.1 Commands</a></li>
  406. </ul></li>
  407. <li><a id="toc-aeval" href="#aeval">29.15 aeval</a>
  408. <ul class="no-bullet">
  409. <li><a id="toc-Examples-18" href="#Examples-18">29.15.1 Examples</a></li>
  410. </ul></li>
  411. <li><a id="toc-aexciter" href="#aexciter">29.16 aexciter</a>
  412. <ul class="no-bullet">
  413. <li><a id="toc-Commands-4" href="#Commands-4">29.16.1 Commands</a></li>
  414. </ul></li>
  415. <li><a id="toc-afade-1" href="#afade-1">29.17 afade</a>
  416. <ul class="no-bullet">
  417. <li><a id="toc-Commands-5" href="#Commands-5">29.17.1 Commands</a></li>
  418. <li><a id="toc-Examples-19" href="#Examples-19">29.17.2 Examples</a></li>
  419. </ul></li>
  420. <li><a id="toc-afftdn" href="#afftdn">29.18 afftdn</a>
  421. <ul class="no-bullet">
  422. <li><a id="toc-Commands-6" href="#Commands-6">29.18.1 Commands</a></li>
  423. </ul></li>
  424. <li><a id="toc-afftfilt" href="#afftfilt">29.19 afftfilt</a>
  425. <ul class="no-bullet">
  426. <li><a id="toc-Examples-20" href="#Examples-20">29.19.1 Examples</a></li>
  427. </ul></li>
  428. <li><a id="toc-afir-1" href="#afir-1">29.20 afir</a>
  429. <ul class="no-bullet">
  430. <li><a id="toc-Examples-21" href="#Examples-21">29.20.1 Examples</a></li>
  431. </ul></li>
  432. <li><a id="toc-aformat-1" href="#aformat-1">29.21 aformat</a></li>
  433. <li><a id="toc-afreqshift" href="#afreqshift">29.22 afreqshift</a>
  434. <ul class="no-bullet">
  435. <li><a id="toc-Commands-7" href="#Commands-7">29.22.1 Commands</a></li>
  436. </ul></li>
  437. <li><a id="toc-agate" href="#agate">29.23 agate</a>
  438. <ul class="no-bullet">
  439. <li><a id="toc-Commands-8" href="#Commands-8">29.23.1 Commands</a></li>
  440. </ul></li>
  441. <li><a id="toc-aiir" href="#aiir">29.24 aiir</a>
  442. <ul class="no-bullet">
  443. <li><a id="toc-Examples-22" href="#Examples-22">29.24.1 Examples</a></li>
  444. </ul></li>
  445. <li><a id="toc-alimiter" href="#alimiter">29.25 alimiter</a></li>
  446. <li><a id="toc-allpass" href="#allpass">29.26 allpass</a>
  447. <ul class="no-bullet">
  448. <li><a id="toc-Commands-9" href="#Commands-9">29.26.1 Commands</a></li>
  449. </ul></li>
  450. <li><a id="toc-aloop" href="#aloop">29.27 aloop</a></li>
  451. <li><a id="toc-amerge-1" href="#amerge-1">29.28 amerge</a>
  452. <ul class="no-bullet">
  453. <li><a id="toc-Examples-23" href="#Examples-23">29.28.1 Examples</a></li>
  454. </ul></li>
  455. <li><a id="toc-amix" href="#amix">29.29 amix</a>
  456. <ul class="no-bullet">
  457. <li><a id="toc-Commands-10" href="#Commands-10">29.29.1 Commands</a></li>
  458. </ul></li>
  459. <li><a id="toc-amultiply" href="#amultiply">29.30 amultiply</a></li>
  460. <li><a id="toc-anequalizer" href="#anequalizer">29.31 anequalizer</a>
  461. <ul class="no-bullet">
  462. <li><a id="toc-Examples-24" href="#Examples-24">29.31.1 Examples</a></li>
  463. <li><a id="toc-Commands-11" href="#Commands-11">29.31.2 Commands</a></li>
  464. </ul></li>
  465. <li><a id="toc-anlmdn" href="#anlmdn">29.32 anlmdn</a>
  466. <ul class="no-bullet">
  467. <li><a id="toc-Commands-12" href="#Commands-12">29.32.1 Commands</a></li>
  468. </ul></li>
  469. <li><a id="toc-anlms" href="#anlms">29.33 anlms</a>
  470. <ul class="no-bullet">
  471. <li><a id="toc-Examples-25" href="#Examples-25">29.33.1 Examples</a></li>
  472. <li><a id="toc-Commands-13" href="#Commands-13">29.33.2 Commands</a></li>
  473. </ul></li>
  474. <li><a id="toc-anull" href="#anull">29.34 anull</a></li>
  475. <li><a id="toc-apad" href="#apad">29.35 apad</a>
  476. <ul class="no-bullet">
  477. <li><a id="toc-Examples-26" href="#Examples-26">29.35.1 Examples</a></li>
  478. </ul></li>
  479. <li><a id="toc-aphaser" href="#aphaser">29.36 aphaser</a></li>
  480. <li><a id="toc-aphaseshift" href="#aphaseshift">29.37 aphaseshift</a>
  481. <ul class="no-bullet">
  482. <li><a id="toc-Commands-14" href="#Commands-14">29.37.1 Commands</a></li>
  483. </ul></li>
  484. <li><a id="toc-apulsator" href="#apulsator">29.38 apulsator</a></li>
  485. <li><a id="toc-aresample-1" href="#aresample-1">29.39 aresample</a>
  486. <ul class="no-bullet">
  487. <li><a id="toc-Examples-27" href="#Examples-27">29.39.1 Examples</a></li>
  488. </ul></li>
  489. <li><a id="toc-areverse" href="#areverse">29.40 areverse</a>
  490. <ul class="no-bullet">
  491. <li><a id="toc-Examples-28" href="#Examples-28">29.40.1 Examples</a></li>
  492. </ul></li>
  493. <li><a id="toc-arnndn" href="#arnndn">29.41 arnndn</a>
  494. <ul class="no-bullet">
  495. <li><a id="toc-Commands-15" href="#Commands-15">29.41.1 Commands</a></li>
  496. </ul></li>
  497. <li><a id="toc-asetnsamples" href="#asetnsamples">29.42 asetnsamples</a></li>
  498. <li><a id="toc-asetrate" href="#asetrate">29.43 asetrate</a></li>
  499. <li><a id="toc-ashowinfo" href="#ashowinfo">29.44 ashowinfo</a></li>
  500. <li><a id="toc-asoftclip" href="#asoftclip">29.45 asoftclip</a>
  501. <ul class="no-bullet">
  502. <li><a id="toc-Commands-16" href="#Commands-16">29.45.1 Commands</a></li>
  503. </ul></li>
  504. <li><a id="toc-asr" href="#asr">29.46 asr</a></li>
  505. <li><a id="toc-astats-1" href="#astats-1">29.47 astats</a></li>
  506. <li><a id="toc-asubboost" href="#asubboost">29.48 asubboost</a>
  507. <ul class="no-bullet">
  508. <li><a id="toc-Commands-17" href="#Commands-17">29.48.1 Commands</a></li>
  509. </ul></li>
  510. <li><a id="toc-asubcut" href="#asubcut">29.49 asubcut</a>
  511. <ul class="no-bullet">
  512. <li><a id="toc-Commands-18" href="#Commands-18">29.49.1 Commands</a></li>
  513. </ul></li>
  514. <li><a id="toc-asupercut" href="#asupercut">29.50 asupercut</a>
  515. <ul class="no-bullet">
  516. <li><a id="toc-Commands-19" href="#Commands-19">29.50.1 Commands</a></li>
  517. </ul></li>
  518. <li><a id="toc-asuperpass" href="#asuperpass">29.51 asuperpass</a>
  519. <ul class="no-bullet">
  520. <li><a id="toc-Commands-20" href="#Commands-20">29.51.1 Commands</a></li>
  521. </ul></li>
  522. <li><a id="toc-asuperstop" href="#asuperstop">29.52 asuperstop</a>
  523. <ul class="no-bullet">
  524. <li><a id="toc-Commands-21" href="#Commands-21">29.52.1 Commands</a></li>
  525. </ul></li>
  526. <li><a id="toc-atempo" href="#atempo">29.53 atempo</a>
  527. <ul class="no-bullet">
  528. <li><a id="toc-Examples-29" href="#Examples-29">29.53.1 Examples</a></li>
  529. <li><a id="toc-Commands-22" href="#Commands-22">29.53.2 Commands</a></li>
  530. </ul></li>
  531. <li><a id="toc-atrim" href="#atrim">29.54 atrim</a></li>
  532. <li><a id="toc-axcorrelate" href="#axcorrelate">29.55 axcorrelate</a>
  533. <ul class="no-bullet">
  534. <li><a id="toc-Examples-30" href="#Examples-30">29.55.1 Examples</a></li>
  535. </ul></li>
  536. <li><a id="toc-bandpass" href="#bandpass">29.56 bandpass</a>
  537. <ul class="no-bullet">
  538. <li><a id="toc-Commands-23" href="#Commands-23">29.56.1 Commands</a></li>
  539. </ul></li>
  540. <li><a id="toc-bandreject" href="#bandreject">29.57 bandreject</a>
  541. <ul class="no-bullet">
  542. <li><a id="toc-Commands-24" href="#Commands-24">29.57.1 Commands</a></li>
  543. </ul></li>
  544. <li><a id="toc-bass_002c-lowshelf" href="#bass_002c-lowshelf">29.58 bass, lowshelf</a>
  545. <ul class="no-bullet">
  546. <li><a id="toc-Commands-25" href="#Commands-25">29.58.1 Commands</a></li>
  547. </ul></li>
  548. <li><a id="toc-biquad" href="#biquad">29.59 biquad</a>
  549. <ul class="no-bullet">
  550. <li><a id="toc-Commands-26" href="#Commands-26">29.59.1 Commands</a></li>
  551. </ul></li>
  552. <li><a id="toc-bs2b" href="#bs2b">29.60 bs2b</a></li>
  553. <li><a id="toc-channelmap" href="#channelmap">29.61 channelmap</a>
  554. <ul class="no-bullet">
  555. <li><a id="toc-Examples-31" href="#Examples-31">29.61.1 Examples</a></li>
  556. </ul></li>
  557. <li><a id="toc-channelsplit" href="#channelsplit">29.62 channelsplit</a>
  558. <ul class="no-bullet">
  559. <li><a id="toc-Examples-32" href="#Examples-32">29.62.1 Examples</a></li>
  560. </ul></li>
  561. <li><a id="toc-chorus" href="#chorus">29.63 chorus</a>
  562. <ul class="no-bullet">
  563. <li><a id="toc-Examples-33" href="#Examples-33">29.63.1 Examples</a></li>
  564. </ul></li>
  565. <li><a id="toc-compand" href="#compand">29.64 compand</a>
  566. <ul class="no-bullet">
  567. <li><a id="toc-Examples-34" href="#Examples-34">29.64.1 Examples</a></li>
  568. </ul></li>
  569. <li><a id="toc-compensationdelay" href="#compensationdelay">29.65 compensationdelay</a></li>
  570. <li><a id="toc-crossfeed" href="#crossfeed">29.66 crossfeed</a>
  571. <ul class="no-bullet">
  572. <li><a id="toc-Commands-27" href="#Commands-27">29.66.1 Commands</a></li>
  573. </ul></li>
  574. <li><a id="toc-crystalizer" href="#crystalizer">29.67 crystalizer</a>
  575. <ul class="no-bullet">
  576. <li><a id="toc-Commands-28" href="#Commands-28">29.67.1 Commands</a></li>
  577. </ul></li>
  578. <li><a id="toc-dcshift" href="#dcshift">29.68 dcshift</a></li>
  579. <li><a id="toc-deesser" href="#deesser">29.69 deesser</a></li>
  580. <li><a id="toc-drmeter" href="#drmeter">29.70 drmeter</a></li>
  581. <li><a id="toc-dynaudnorm" href="#dynaudnorm">29.71 dynaudnorm</a>
  582. <ul class="no-bullet">
  583. <li><a id="toc-Commands-29" href="#Commands-29">29.71.1 Commands</a></li>
  584. </ul></li>
  585. <li><a id="toc-earwax" href="#earwax">29.72 earwax</a></li>
  586. <li><a id="toc-equalizer" href="#equalizer">29.73 equalizer</a>
  587. <ul class="no-bullet">
  588. <li><a id="toc-Examples-35" href="#Examples-35">29.73.1 Examples</a></li>
  589. <li><a id="toc-Commands-30" href="#Commands-30">29.73.2 Commands</a></li>
  590. </ul></li>
  591. <li><a id="toc-extrastereo" href="#extrastereo">29.74 extrastereo</a>
  592. <ul class="no-bullet">
  593. <li><a id="toc-Commands-31" href="#Commands-31">29.74.1 Commands</a></li>
  594. </ul></li>
  595. <li><a id="toc-firequalizer" href="#firequalizer">29.75 firequalizer</a>
  596. <ul class="no-bullet">
  597. <li><a id="toc-Examples-36" href="#Examples-36">29.75.1 Examples</a></li>
  598. </ul></li>
  599. <li><a id="toc-flanger" href="#flanger">29.76 flanger</a></li>
  600. <li><a id="toc-haas" href="#haas">29.77 haas</a></li>
  601. <li><a id="toc-hdcd" href="#hdcd">29.78 hdcd</a></li>
  602. <li><a id="toc-headphone" href="#headphone">29.79 headphone</a>
  603. <ul class="no-bullet">
  604. <li><a id="toc-Examples-37" href="#Examples-37">29.79.1 Examples</a></li>
  605. </ul></li>
  606. <li><a id="toc-highpass" href="#highpass">29.80 highpass</a>
  607. <ul class="no-bullet">
  608. <li><a id="toc-Commands-32" href="#Commands-32">29.80.1 Commands</a></li>
  609. </ul></li>
  610. <li><a id="toc-join" href="#join">29.81 join</a></li>
  611. <li><a id="toc-ladspa" href="#ladspa">29.82 ladspa</a>
  612. <ul class="no-bullet">
  613. <li><a id="toc-Examples-38" href="#Examples-38">29.82.1 Examples</a></li>
  614. <li><a id="toc-Commands-33" href="#Commands-33">29.82.2 Commands</a></li>
  615. </ul></li>
  616. <li><a id="toc-loudnorm" href="#loudnorm">29.83 loudnorm</a></li>
  617. <li><a id="toc-lowpass" href="#lowpass">29.84 lowpass</a>
  618. <ul class="no-bullet">
  619. <li><a id="toc-Examples-39" href="#Examples-39">29.84.1 Examples</a></li>
  620. <li><a id="toc-Commands-34" href="#Commands-34">29.84.2 Commands</a></li>
  621. </ul></li>
  622. <li><a id="toc-lv2" href="#lv2">29.85 lv2</a>
  623. <ul class="no-bullet">
  624. <li><a id="toc-Examples-40" href="#Examples-40">29.85.1 Examples</a></li>
  625. </ul></li>
  626. <li><a id="toc-mcompand" href="#mcompand">29.86 mcompand</a></li>
  627. <li><a id="toc-pan-1" href="#pan-1">29.87 pan</a>
  628. <ul class="no-bullet">
  629. <li><a id="toc-Mixing-examples" href="#Mixing-examples">29.87.1 Mixing examples</a></li>
  630. <li><a id="toc-Remapping-examples" href="#Remapping-examples">29.87.2 Remapping examples</a></li>
  631. </ul></li>
  632. <li><a id="toc-replaygain" href="#replaygain">29.88 replaygain</a></li>
  633. <li><a id="toc-resample" href="#resample">29.89 resample</a></li>
  634. <li><a id="toc-rubberband" href="#rubberband">29.90 rubberband</a>
  635. <ul class="no-bullet">
  636. <li><a id="toc-Commands-35" href="#Commands-35">29.90.1 Commands</a></li>
  637. </ul></li>
  638. <li><a id="toc-sidechaincompress" href="#sidechaincompress">29.91 sidechaincompress</a>
  639. <ul class="no-bullet">
  640. <li><a id="toc-Commands-36" href="#Commands-36">29.91.1 Commands</a></li>
  641. <li><a id="toc-Examples-41" href="#Examples-41">29.91.2 Examples</a></li>
  642. </ul></li>
  643. <li><a id="toc-sidechaingate" href="#sidechaingate">29.92 sidechaingate</a>
  644. <ul class="no-bullet">
  645. <li><a id="toc-Commands-37" href="#Commands-37">29.92.1 Commands</a></li>
  646. </ul></li>
  647. <li><a id="toc-silencedetect" href="#silencedetect">29.93 silencedetect</a>
  648. <ul class="no-bullet">
  649. <li><a id="toc-Examples-42" href="#Examples-42">29.93.1 Examples</a></li>
  650. </ul></li>
  651. <li><a id="toc-silenceremove" href="#silenceremove">29.94 silenceremove</a>
  652. <ul class="no-bullet">
  653. <li><a id="toc-Examples-43" href="#Examples-43">29.94.1 Examples</a></li>
  654. </ul></li>
  655. <li><a id="toc-sofalizer" href="#sofalizer">29.95 sofalizer</a>
  656. <ul class="no-bullet">
  657. <li><a id="toc-Examples-44" href="#Examples-44">29.95.1 Examples</a></li>
  658. </ul></li>
  659. <li><a id="toc-speechnorm" href="#speechnorm">29.96 speechnorm</a>
  660. <ul class="no-bullet">
  661. <li><a id="toc-Commands-38" href="#Commands-38">29.96.1 Commands</a></li>
  662. </ul></li>
  663. <li><a id="toc-stereotools" href="#stereotools">29.97 stereotools</a>
  664. <ul class="no-bullet">
  665. <li><a id="toc-Commands-39" href="#Commands-39">29.97.1 Commands</a></li>
  666. <li><a id="toc-Examples-45" href="#Examples-45">29.97.2 Examples</a></li>
  667. </ul></li>
  668. <li><a id="toc-stereowiden" href="#stereowiden">29.98 stereowiden</a>
  669. <ul class="no-bullet">
  670. <li><a id="toc-Commands-40" href="#Commands-40">29.98.1 Commands</a></li>
  671. </ul></li>
  672. <li><a id="toc-superequalizer" href="#superequalizer">29.99 superequalizer</a></li>
  673. <li><a id="toc-surround" href="#surround">29.100 surround</a></li>
  674. <li><a id="toc-treble_002c-highshelf" href="#treble_002c-highshelf">29.101 treble, highshelf</a>
  675. <ul class="no-bullet">
  676. <li><a id="toc-Commands-41" href="#Commands-41">29.101.1 Commands</a></li>
  677. </ul></li>
  678. <li><a id="toc-tremolo" href="#tremolo">29.102 tremolo</a></li>
  679. <li><a id="toc-vibrato" href="#vibrato">29.103 vibrato</a></li>
  680. <li><a id="toc-volume" href="#volume">29.104 volume</a>
  681. <ul class="no-bullet">
  682. <li><a id="toc-Commands-42" href="#Commands-42">29.104.1 Commands</a></li>
  683. <li><a id="toc-Examples-46" href="#Examples-46">29.104.2 Examples</a></li>
  684. </ul></li>
  685. <li><a id="toc-volumedetect" href="#volumedetect">29.105 volumedetect</a>
  686. <ul class="no-bullet">
  687. <li><a id="toc-Examples-47" href="#Examples-47">29.105.1 Examples</a></li>
  688. </ul></li>
  689. </ul></li>
  690. <li><a id="toc-Audio-Sources" href="#Audio-Sources">30 Audio Sources</a>
  691. <ul class="no-bullet">
  692. <li><a id="toc-abuffer" href="#abuffer">30.1 abuffer</a>
  693. <ul class="no-bullet">
  694. <li><a id="toc-Examples-48" href="#Examples-48">30.1.1 Examples</a></li>
  695. </ul></li>
  696. <li><a id="toc-aevalsrc" href="#aevalsrc">30.2 aevalsrc</a>
  697. <ul class="no-bullet">
  698. <li><a id="toc-Examples-49" href="#Examples-49">30.2.1 Examples</a></li>
  699. </ul></li>
  700. <li><a id="toc-afirsrc" href="#afirsrc">30.3 afirsrc</a></li>
  701. <li><a id="toc-anullsrc" href="#anullsrc">30.4 anullsrc</a>
  702. <ul class="no-bullet">
  703. <li><a id="toc-Examples-50" href="#Examples-50">30.4.1 Examples</a></li>
  704. </ul></li>
  705. <li><a id="toc-flite" href="#flite">30.5 flite</a>
  706. <ul class="no-bullet">
  707. <li><a id="toc-Examples-51" href="#Examples-51">30.5.1 Examples</a></li>
  708. </ul></li>
  709. <li><a id="toc-anoisesrc" href="#anoisesrc">30.6 anoisesrc</a>
  710. <ul class="no-bullet">
  711. <li><a id="toc-Examples-52" href="#Examples-52">30.6.1 Examples</a></li>
  712. </ul></li>
  713. <li><a id="toc-hilbert" href="#hilbert">30.7 hilbert</a></li>
  714. <li><a id="toc-sinc" href="#sinc">30.8 sinc</a></li>
  715. <li><a id="toc-sine" href="#sine">30.9 sine</a>
  716. <ul class="no-bullet">
  717. <li><a id="toc-Examples-53" href="#Examples-53">30.9.1 Examples</a></li>
  718. </ul></li>
  719. </ul></li>
  720. <li><a id="toc-Audio-Sinks" href="#Audio-Sinks">31 Audio Sinks</a>
  721. <ul class="no-bullet">
  722. <li><a id="toc-abuffersink" href="#abuffersink">31.1 abuffersink</a></li>
  723. <li><a id="toc-anullsink" href="#anullsink">31.2 anullsink</a></li>
  724. </ul></li>
  725. <li><a id="toc-Video-Filters" href="#Video-Filters">32 Video Filters</a>
  726. <ul class="no-bullet">
  727. <li><a id="toc-addroi" href="#addroi">32.1 addroi</a>
  728. <ul class="no-bullet">
  729. <li><a id="toc-Examples-54" href="#Examples-54">32.1.1 Examples</a></li>
  730. </ul></li>
  731. <li><a id="toc-alphaextract" href="#alphaextract">32.2 alphaextract</a></li>
  732. <li><a id="toc-alphamerge" href="#alphamerge">32.3 alphamerge</a></li>
  733. <li><a id="toc-amplify" href="#amplify">32.4 amplify</a>
  734. <ul class="no-bullet">
  735. <li><a id="toc-Commands-43" href="#Commands-43">32.4.1 Commands</a></li>
  736. </ul></li>
  737. <li><a id="toc-ass" href="#ass">32.5 ass</a></li>
  738. <li><a id="toc-atadenoise" href="#atadenoise">32.6 atadenoise</a>
  739. <ul class="no-bullet">
  740. <li><a id="toc-Commands-44" href="#Commands-44">32.6.1 Commands</a></li>
  741. </ul></li>
  742. <li><a id="toc-avgblur" href="#avgblur">32.7 avgblur</a>
  743. <ul class="no-bullet">
  744. <li><a id="toc-Commands-45" href="#Commands-45">32.7.1 Commands</a></li>
  745. </ul></li>
  746. <li><a id="toc-bbox" href="#bbox">32.8 bbox</a>
  747. <ul class="no-bullet">
  748. <li><a id="toc-Commands-46" href="#Commands-46">32.8.1 Commands</a></li>
  749. </ul></li>
  750. <li><a id="toc-bilateral" href="#bilateral">32.9 bilateral</a>
  751. <ul class="no-bullet">
  752. <li><a id="toc-Commands-47" href="#Commands-47">32.9.1 Commands</a></li>
  753. </ul></li>
  754. <li><a id="toc-bitplanenoise" href="#bitplanenoise">32.10 bitplanenoise</a></li>
  755. <li><a id="toc-blackdetect" href="#blackdetect">32.11 blackdetect</a></li>
  756. <li><a id="toc-blackframe" href="#blackframe">32.12 blackframe</a></li>
  757. <li><a id="toc-blend-1" href="#blend-1">32.13 blend</a>
  758. <ul class="no-bullet">
  759. <li><a id="toc-Examples-55" href="#Examples-55">32.13.1 Examples</a></li>
  760. <li><a id="toc-Commands-48" href="#Commands-48">32.13.2 Commands</a></li>
  761. </ul></li>
  762. <li><a id="toc-bm3d" href="#bm3d">32.14 bm3d</a>
  763. <ul class="no-bullet">
  764. <li><a id="toc-Examples-56" href="#Examples-56">32.14.1 Examples</a></li>
  765. </ul></li>
  766. <li><a id="toc-boxblur" href="#boxblur">32.15 boxblur</a>
  767. <ul class="no-bullet">
  768. <li><a id="toc-Examples-57" href="#Examples-57">32.15.1 Examples</a></li>
  769. </ul></li>
  770. <li><a id="toc-bwdif" href="#bwdif">32.16 bwdif</a></li>
  771. <li><a id="toc-cas" href="#cas">32.17 cas</a>
  772. <ul class="no-bullet">
  773. <li><a id="toc-Commands-49" href="#Commands-49">32.17.1 Commands</a></li>
  774. </ul></li>
  775. <li><a id="toc-chromahold" href="#chromahold">32.18 chromahold</a>
  776. <ul class="no-bullet">
  777. <li><a id="toc-Commands-50" href="#Commands-50">32.18.1 Commands</a></li>
  778. </ul></li>
  779. <li><a id="toc-chromakey" href="#chromakey">32.19 chromakey</a>
  780. <ul class="no-bullet">
  781. <li><a id="toc-Commands-51" href="#Commands-51">32.19.1 Commands</a></li>
  782. <li><a id="toc-Examples-58" href="#Examples-58">32.19.2 Examples</a></li>
  783. </ul></li>
  784. <li><a id="toc-chromanr" href="#chromanr">32.20 chromanr</a>
  785. <ul class="no-bullet">
  786. <li><a id="toc-Commands-52" href="#Commands-52">32.20.1 Commands</a></li>
  787. </ul></li>
  788. <li><a id="toc-chromashift" href="#chromashift">32.21 chromashift</a>
  789. <ul class="no-bullet">
  790. <li><a id="toc-Commands-53" href="#Commands-53">32.21.1 Commands</a></li>
  791. </ul></li>
  792. <li><a id="toc-ciescope" href="#ciescope">32.22 ciescope</a></li>
  793. <li><a id="toc-codecview" href="#codecview">32.23 codecview</a>
  794. <ul class="no-bullet">
  795. <li><a id="toc-Examples-59" href="#Examples-59">32.23.1 Examples</a></li>
  796. </ul></li>
  797. <li><a id="toc-colorbalance" href="#colorbalance">32.24 colorbalance</a>
  798. <ul class="no-bullet">
  799. <li><a id="toc-Examples-60" href="#Examples-60">32.24.1 Examples</a></li>
  800. <li><a id="toc-Commands-54" href="#Commands-54">32.24.2 Commands</a></li>
  801. </ul></li>
  802. <li><a id="toc-colorcontrast" href="#colorcontrast">32.25 colorcontrast</a>
  803. <ul class="no-bullet">
  804. <li><a id="toc-Commands-55" href="#Commands-55">32.25.1 Commands</a></li>
  805. </ul></li>
  806. <li><a id="toc-colorcorrect" href="#colorcorrect">32.26 colorcorrect</a>
  807. <ul class="no-bullet">
  808. <li><a id="toc-Commands-56" href="#Commands-56">32.26.1 Commands</a></li>
  809. </ul></li>
  810. <li><a id="toc-colorchannelmixer" href="#colorchannelmixer">32.27 colorchannelmixer</a>
  811. <ul class="no-bullet">
  812. <li><a id="toc-Examples-61" href="#Examples-61">32.27.1 Examples</a></li>
  813. <li><a id="toc-Commands-57" href="#Commands-57">32.27.2 Commands</a></li>
  814. </ul></li>
  815. <li><a id="toc-colorize" href="#colorize">32.28 colorize</a>
  816. <ul class="no-bullet">
  817. <li><a id="toc-Commands-58" href="#Commands-58">32.28.1 Commands</a></li>
  818. </ul></li>
  819. <li><a id="toc-colorkey" href="#colorkey">32.29 colorkey</a>
  820. <ul class="no-bullet">
  821. <li><a id="toc-Examples-62" href="#Examples-62">32.29.1 Examples</a></li>
  822. <li><a id="toc-Commands-59" href="#Commands-59">32.29.2 Commands</a></li>
  823. </ul></li>
  824. <li><a id="toc-colorhold" href="#colorhold">32.30 colorhold</a>
  825. <ul class="no-bullet">
  826. <li><a id="toc-Commands-60" href="#Commands-60">32.30.1 Commands</a></li>
  827. </ul></li>
  828. <li><a id="toc-colorlevels" href="#colorlevels">32.31 colorlevels</a>
  829. <ul class="no-bullet">
  830. <li><a id="toc-Examples-63" href="#Examples-63">32.31.1 Examples</a></li>
  831. <li><a id="toc-Commands-61" href="#Commands-61">32.31.2 Commands</a></li>
  832. </ul></li>
  833. <li><a id="toc-colormatrix" href="#colormatrix">32.32 colormatrix</a></li>
  834. <li><a id="toc-colorspace" href="#colorspace">32.33 colorspace</a></li>
  835. <li><a id="toc-colortemperature" href="#colortemperature">32.34 colortemperature</a>
  836. <ul class="no-bullet">
  837. <li><a id="toc-Commands-62" href="#Commands-62">32.34.1 Commands</a></li>
  838. </ul></li>
  839. <li><a id="toc-convolution" href="#convolution">32.35 convolution</a>
  840. <ul class="no-bullet">
  841. <li><a id="toc-Commands-63" href="#Commands-63">32.35.1 Commands</a></li>
  842. <li><a id="toc-Examples-64" href="#Examples-64">32.35.2 Examples</a></li>
  843. </ul></li>
  844. <li><a id="toc-convolve" href="#convolve">32.36 convolve</a></li>
  845. <li><a id="toc-copy" href="#copy">32.37 copy</a></li>
  846. <li><a id="toc-coreimage-1" href="#coreimage-1">32.38 coreimage</a>
  847. <ul class="no-bullet">
  848. <li><a id="toc-Examples-65" href="#Examples-65">32.38.1 Examples</a></li>
  849. </ul></li>
  850. <li><a id="toc-cover_005frect" href="#cover_005frect">32.39 cover_rect</a>
  851. <ul class="no-bullet">
  852. <li><a id="toc-Examples-66" href="#Examples-66">32.39.1 Examples</a></li>
  853. </ul></li>
  854. <li><a id="toc-crop" href="#crop">32.40 crop</a>
  855. <ul class="no-bullet">
  856. <li><a id="toc-Examples-67" href="#Examples-67">32.40.1 Examples</a></li>
  857. <li><a id="toc-Commands-64" href="#Commands-64">32.40.2 Commands</a></li>
  858. </ul></li>
  859. <li><a id="toc-cropdetect" href="#cropdetect">32.41 cropdetect</a></li>
  860. <li><a id="toc-cue-1" href="#cue-1">32.42 cue</a></li>
  861. <li><a id="toc-curves-1" href="#curves-1">32.43 curves</a>
  862. <ul class="no-bullet">
  863. <li><a id="toc-Commands-65" href="#Commands-65">32.43.1 Commands</a></li>
  864. <li><a id="toc-Examples-68" href="#Examples-68">32.43.2 Examples</a></li>
  865. </ul></li>
  866. <li><a id="toc-datascope" href="#datascope">32.44 datascope</a>
  867. <ul class="no-bullet">
  868. <li><a id="toc-Commands-66" href="#Commands-66">32.44.1 Commands</a></li>
  869. </ul></li>
  870. <li><a id="toc-dblur" href="#dblur">32.45 dblur</a>
  871. <ul class="no-bullet">
  872. <li><a id="toc-Commands-67" href="#Commands-67">32.45.1 Commands</a></li>
  873. </ul></li>
  874. <li><a id="toc-dctdnoiz" href="#dctdnoiz">32.46 dctdnoiz</a>
  875. <ul class="no-bullet">
  876. <li><a id="toc-Examples-69" href="#Examples-69">32.46.1 Examples</a></li>
  877. </ul></li>
  878. <li><a id="toc-deband" href="#deband">32.47 deband</a>
  879. <ul class="no-bullet">
  880. <li><a id="toc-Commands-68" href="#Commands-68">32.47.1 Commands</a></li>
  881. </ul></li>
  882. <li><a id="toc-deblock" href="#deblock">32.48 deblock</a>
  883. <ul class="no-bullet">
  884. <li><a id="toc-Examples-70" href="#Examples-70">32.48.1 Examples</a></li>
  885. <li><a id="toc-Commands-69" href="#Commands-69">32.48.2 Commands</a></li>
  886. </ul></li>
  887. <li><a id="toc-decimate-1" href="#decimate-1">32.49 decimate</a></li>
  888. <li><a id="toc-deconvolve" href="#deconvolve">32.50 deconvolve</a></li>
  889. <li><a id="toc-dedot" href="#dedot">32.51 dedot</a></li>
  890. <li><a id="toc-deflate" href="#deflate">32.52 deflate</a>
  891. <ul class="no-bullet">
  892. <li><a id="toc-Commands-70" href="#Commands-70">32.52.1 Commands</a></li>
  893. </ul></li>
  894. <li><a id="toc-deflicker" href="#deflicker">32.53 deflicker</a></li>
  895. <li><a id="toc-dejudder" href="#dejudder">32.54 dejudder</a></li>
  896. <li><a id="toc-delogo" href="#delogo">32.55 delogo</a>
  897. <ul class="no-bullet">
  898. <li><a id="toc-Examples-71" href="#Examples-71">32.55.1 Examples</a></li>
  899. </ul></li>
  900. <li><a id="toc-derain-1" href="#derain-1">32.56 derain</a></li>
  901. <li><a id="toc-deshake" href="#deshake">32.57 deshake</a></li>
  902. <li><a id="toc-despill" href="#despill">32.58 despill</a>
  903. <ul class="no-bullet">
  904. <li><a id="toc-Commands-71" href="#Commands-71">32.58.1 Commands</a></li>
  905. </ul></li>
  906. <li><a id="toc-detelecine" href="#detelecine">32.59 detelecine</a></li>
  907. <li><a id="toc-dilation" href="#dilation">32.60 dilation</a>
  908. <ul class="no-bullet">
  909. <li><a id="toc-Commands-72" href="#Commands-72">32.60.1 Commands</a></li>
  910. </ul></li>
  911. <li><a id="toc-displace" href="#displace">32.61 displace</a>
  912. <ul class="no-bullet">
  913. <li><a id="toc-Examples-72" href="#Examples-72">32.61.1 Examples</a></li>
  914. </ul></li>
  915. <li><a id="toc-dnn_005fprocessing-1" href="#dnn_005fprocessing-1">32.62 dnn_processing</a>
  916. <ul class="no-bullet">
  917. <li><a id="toc-Examples-73" href="#Examples-73">32.62.1 Examples</a></li>
  918. </ul></li>
  919. <li><a id="toc-drawbox" href="#drawbox">32.63 drawbox</a>
  920. <ul class="no-bullet">
  921. <li><a id="toc-Examples-74" href="#Examples-74">32.63.1 Examples</a></li>
  922. <li><a id="toc-Commands-73" href="#Commands-73">32.63.2 Commands</a></li>
  923. </ul></li>
  924. <li><a id="toc-drawgraph-1" href="#drawgraph-1">32.64 drawgraph</a></li>
  925. <li><a id="toc-drawgrid" href="#drawgrid">32.65 drawgrid</a>
  926. <ul class="no-bullet">
  927. <li><a id="toc-Examples-75" href="#Examples-75">32.65.1 Examples</a></li>
  928. <li><a id="toc-Commands-74" href="#Commands-74">32.65.2 Commands</a></li>
  929. </ul></li>
  930. <li><a id="toc-drawtext-1" href="#drawtext-1">32.66 drawtext</a>
  931. <ul class="no-bullet">
  932. <li><a id="toc-Syntax-2" href="#Syntax-2">32.66.1 Syntax</a></li>
  933. <li><a id="toc-Text-expansion" href="#Text-expansion">32.66.2 Text expansion</a></li>
  934. <li><a id="toc-Commands-75" href="#Commands-75">32.66.3 Commands</a></li>
  935. <li><a id="toc-Examples-76" href="#Examples-76">32.66.4 Examples</a></li>
  936. </ul></li>
  937. <li><a id="toc-edgedetect" href="#edgedetect">32.67 edgedetect</a>
  938. <ul class="no-bullet">
  939. <li><a id="toc-Examples-77" href="#Examples-77">32.67.1 Examples</a></li>
  940. </ul></li>
  941. <li><a id="toc-elbg" href="#elbg">32.68 elbg</a></li>
  942. <li><a id="toc-entropy" href="#entropy">32.69 entropy</a></li>
  943. <li><a id="toc-epx" href="#epx">32.70 epx</a></li>
  944. <li><a id="toc-eq" href="#eq">32.71 eq</a>
  945. <ul class="no-bullet">
  946. <li><a id="toc-Commands-76" href="#Commands-76">32.71.1 Commands</a></li>
  947. </ul></li>
  948. <li><a id="toc-erosion" href="#erosion">32.72 erosion</a>
  949. <ul class="no-bullet">
  950. <li><a id="toc-Commands-77" href="#Commands-77">32.72.1 Commands</a></li>
  951. </ul></li>
  952. <li><a id="toc-estdif" href="#estdif">32.73 estdif</a>
  953. <ul class="no-bullet">
  954. <li><a id="toc-Commands-78" href="#Commands-78">32.73.1 Commands</a></li>
  955. </ul></li>
  956. <li><a id="toc-exposure" href="#exposure">32.74 exposure</a>
  957. <ul class="no-bullet">
  958. <li><a id="toc-Commands-79" href="#Commands-79">32.74.1 Commands</a></li>
  959. </ul></li>
  960. <li><a id="toc-extractplanes" href="#extractplanes">32.75 extractplanes</a>
  961. <ul class="no-bullet">
  962. <li><a id="toc-Examples-78" href="#Examples-78">32.75.1 Examples</a></li>
  963. </ul></li>
  964. <li><a id="toc-fade" href="#fade">32.76 fade</a>
  965. <ul class="no-bullet">
  966. <li><a id="toc-Examples-79" href="#Examples-79">32.76.1 Examples</a></li>
  967. </ul></li>
  968. <li><a id="toc-fftdnoiz" href="#fftdnoiz">32.77 fftdnoiz</a></li>
  969. <li><a id="toc-fftfilt" href="#fftfilt">32.78 fftfilt</a>
  970. <ul class="no-bullet">
  971. <li><a id="toc-Examples-80" href="#Examples-80">32.78.1 Examples</a></li>
  972. </ul></li>
  973. <li><a id="toc-field" href="#field">32.79 field</a></li>
  974. <li><a id="toc-fieldhint" href="#fieldhint">32.80 fieldhint</a></li>
  975. <li><a id="toc-fieldmatch" href="#fieldmatch">32.81 fieldmatch</a>
  976. <ul class="no-bullet">
  977. <li><a id="toc-p_002fc_002fn_002fu_002fb-meaning-1" href="#p_002fc_002fn_002fu_002fb-meaning-1">32.81.1 p/c/n/u/b meaning</a>
  978. <ul class="no-bullet">
  979. <li><a id="toc-p_002fc_002fn" href="#p_002fc_002fn">32.81.1.1 p/c/n</a></li>
  980. <li><a id="toc-u_002fb" href="#u_002fb">32.81.1.2 u/b</a></li>
  981. </ul></li>
  982. <li><a id="toc-Examples-81" href="#Examples-81">32.81.2 Examples</a></li>
  983. </ul></li>
  984. <li><a id="toc-fieldorder" href="#fieldorder">32.82 fieldorder</a></li>
  985. <li><a id="toc-fifo_002c-afifo" href="#fifo_002c-afifo">32.83 fifo, afifo</a></li>
  986. <li><a id="toc-fillborders" href="#fillborders">32.84 fillborders</a>
  987. <ul class="no-bullet">
  988. <li><a id="toc-Commands-80" href="#Commands-80">32.84.1 Commands</a></li>
  989. </ul></li>
  990. <li><a id="toc-find_005frect" href="#find_005frect">32.85 find_rect</a>
  991. <ul class="no-bullet">
  992. <li><a id="toc-Examples-82" href="#Examples-82">32.85.1 Examples</a></li>
  993. </ul></li>
  994. <li><a id="toc-floodfill" href="#floodfill">32.86 floodfill</a></li>
  995. <li><a id="toc-format-1" href="#format-1">32.87 format</a>
  996. <ul class="no-bullet">
  997. <li><a id="toc-Examples-83" href="#Examples-83">32.87.1 Examples</a></li>
  998. </ul></li>
  999. <li><a id="toc-fps-1" href="#fps-1">32.88 fps</a>
  1000. <ul class="no-bullet">
  1001. <li><a id="toc-Examples-84" href="#Examples-84">32.88.1 Examples</a></li>
  1002. </ul></li>
  1003. <li><a id="toc-framepack" href="#framepack">32.89 framepack</a></li>
  1004. <li><a id="toc-framerate" href="#framerate">32.90 framerate</a></li>
  1005. <li><a id="toc-framestep" href="#framestep">32.91 framestep</a></li>
  1006. <li><a id="toc-freezedetect" href="#freezedetect">32.92 freezedetect</a></li>
  1007. <li><a id="toc-freezeframes" href="#freezeframes">32.93 freezeframes</a></li>
  1008. <li><a id="toc-frei0r-1" href="#frei0r-1">32.94 frei0r</a>
  1009. <ul class="no-bullet">
  1010. <li><a id="toc-Examples-85" href="#Examples-85">32.94.1 Examples</a></li>
  1011. <li><a id="toc-Commands-81" href="#Commands-81">32.94.2 Commands</a></li>
  1012. </ul></li>
  1013. <li><a id="toc-fspp" href="#fspp">32.95 fspp</a></li>
  1014. <li><a id="toc-gblur" href="#gblur">32.96 gblur</a>
  1015. <ul class="no-bullet">
  1016. <li><a id="toc-Commands-82" href="#Commands-82">32.96.1 Commands</a></li>
  1017. </ul></li>
  1018. <li><a id="toc-geq" href="#geq">32.97 geq</a>
  1019. <ul class="no-bullet">
  1020. <li><a id="toc-Examples-86" href="#Examples-86">32.97.1 Examples</a></li>
  1021. </ul></li>
  1022. <li><a id="toc-gradfun" href="#gradfun">32.98 gradfun</a>
  1023. <ul class="no-bullet">
  1024. <li><a id="toc-Examples-87" href="#Examples-87">32.98.1 Examples</a></li>
  1025. </ul></li>
  1026. <li><a id="toc-graphmonitor-1" href="#graphmonitor-1">32.99 graphmonitor</a></li>
  1027. <li><a id="toc-greyedge" href="#greyedge">32.100 greyedge</a>
  1028. <ul class="no-bullet">
  1029. <li><a id="toc-Examples-88" href="#Examples-88">32.100.1 Examples</a></li>
  1030. </ul></li>
  1031. <li><a id="toc-haldclut-1" href="#haldclut-1">32.101 haldclut</a>
  1032. <ul class="no-bullet">
  1033. <li><a id="toc-Commands-83" href="#Commands-83">32.101.1 Commands</a></li>
  1034. <li><a id="toc-Workflow-examples" href="#Workflow-examples">32.101.2 Workflow examples</a>
  1035. <ul class="no-bullet">
  1036. <li><a id="toc-Hald-CLUT-video-stream" href="#Hald-CLUT-video-stream">32.101.2.1 Hald CLUT video stream</a></li>
  1037. <li><a id="toc-Hald-CLUT-with-preview" href="#Hald-CLUT-with-preview">32.101.2.2 Hald CLUT with preview</a></li>
  1038. </ul></li>
  1039. </ul></li>
  1040. <li><a id="toc-hflip" href="#hflip">32.102 hflip</a></li>
  1041. <li><a id="toc-histeq" href="#histeq">32.103 histeq</a></li>
  1042. <li><a id="toc-histogram-1" href="#histogram-1">32.104 histogram</a>
  1043. <ul class="no-bullet">
  1044. <li><a id="toc-Examples-89" href="#Examples-89">32.104.1 Examples</a></li>
  1045. </ul></li>
  1046. <li><a id="toc-hqdn3d-1" href="#hqdn3d-1">32.105 hqdn3d</a>
  1047. <ul class="no-bullet">
  1048. <li><a id="toc-Commands-84" href="#Commands-84">32.105.1 Commands</a></li>
  1049. </ul></li>
  1050. <li><a id="toc-hwdownload-1" href="#hwdownload-1">32.106 hwdownload</a></li>
  1051. <li><a id="toc-hwmap" href="#hwmap">32.107 hwmap</a></li>
  1052. <li><a id="toc-hwupload-1" href="#hwupload-1">32.108 hwupload</a></li>
  1053. <li><a id="toc-hwupload_005fcuda-1" href="#hwupload_005fcuda-1">32.109 hwupload_cuda</a></li>
  1054. <li><a id="toc-hqx" href="#hqx">32.110 hqx</a></li>
  1055. <li><a id="toc-hstack" href="#hstack">32.111 hstack</a></li>
  1056. <li><a id="toc-hue" href="#hue">32.112 hue</a>
  1057. <ul class="no-bullet">
  1058. <li><a id="toc-Examples-90" href="#Examples-90">32.112.1 Examples</a></li>
  1059. <li><a id="toc-Commands-85" href="#Commands-85">32.112.2 Commands</a></li>
  1060. </ul></li>
  1061. <li><a id="toc-hysteresis" href="#hysteresis">32.113 hysteresis</a></li>
  1062. <li><a id="toc-identity" href="#identity">32.114 identity</a></li>
  1063. <li><a id="toc-idet" href="#idet">32.115 idet</a></li>
  1064. <li><a id="toc-il" href="#il">32.116 il</a>
  1065. <ul class="no-bullet">
  1066. <li><a id="toc-Commands-86" href="#Commands-86">32.116.1 Commands</a></li>
  1067. </ul></li>
  1068. <li><a id="toc-inflate" href="#inflate">32.117 inflate</a>
  1069. <ul class="no-bullet">
  1070. <li><a id="toc-Commands-87" href="#Commands-87">32.117.1 Commands</a></li>
  1071. </ul></li>
  1072. <li><a id="toc-interlace" href="#interlace">32.118 interlace</a></li>
  1073. <li><a id="toc-kerndeint" href="#kerndeint">32.119 kerndeint</a>
  1074. <ul class="no-bullet">
  1075. <li><a id="toc-Examples-91" href="#Examples-91">32.119.1 Examples</a></li>
  1076. </ul></li>
  1077. <li><a id="toc-kirsch" href="#kirsch">32.120 kirsch</a>
  1078. <ul class="no-bullet">
  1079. <li><a id="toc-Commands-88" href="#Commands-88">32.120.1 Commands</a></li>
  1080. </ul></li>
  1081. <li><a id="toc-lagfun" href="#lagfun">32.121 lagfun</a>
  1082. <ul class="no-bullet">
  1083. <li><a id="toc-Commands-89" href="#Commands-89">32.121.1 Commands</a></li>
  1084. </ul></li>
  1085. <li><a id="toc-lenscorrection" href="#lenscorrection">32.122 lenscorrection</a>
  1086. <ul class="no-bullet">
  1087. <li><a id="toc-Options-32" href="#Options-32">32.122.1 Options</a></li>
  1088. <li><a id="toc-Commands-90" href="#Commands-90">32.122.2 Commands</a></li>
  1089. </ul></li>
  1090. <li><a id="toc-lensfun" href="#lensfun">32.123 lensfun</a>
  1091. <ul class="no-bullet">
  1092. <li><a id="toc-Examples-92" href="#Examples-92">32.123.1 Examples</a></li>
  1093. </ul></li>
  1094. <li><a id="toc-libvmaf" href="#libvmaf">32.124 libvmaf</a>
  1095. <ul class="no-bullet">
  1096. <li><a id="toc-Examples-93" href="#Examples-93">32.124.1 Examples</a></li>
  1097. </ul></li>
  1098. <li><a id="toc-limiter" href="#limiter">32.125 limiter</a>
  1099. <ul class="no-bullet">
  1100. <li><a id="toc-Commands-91" href="#Commands-91">32.125.1 Commands</a></li>
  1101. </ul></li>
  1102. <li><a id="toc-loop" href="#loop">32.126 loop</a>
  1103. <ul class="no-bullet">
  1104. <li><a id="toc-Examples-94" href="#Examples-94">32.126.1 Examples</a></li>
  1105. </ul></li>
  1106. <li><a id="toc-lut1d" href="#lut1d">32.127 lut1d</a>
  1107. <ul class="no-bullet">
  1108. <li><a id="toc-Commands-92" href="#Commands-92">32.127.1 Commands</a></li>
  1109. </ul></li>
  1110. <li><a id="toc-lut3d-1" href="#lut3d-1">32.128 lut3d</a>
  1111. <ul class="no-bullet">
  1112. <li><a id="toc-Commands-93" href="#Commands-93">32.128.1 Commands</a></li>
  1113. </ul></li>
  1114. <li><a id="toc-lumakey" href="#lumakey">32.129 lumakey</a>
  1115. <ul class="no-bullet">
  1116. <li><a id="toc-Commands-94" href="#Commands-94">32.129.1 Commands</a></li>
  1117. </ul></li>
  1118. <li><a id="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">32.130 lut, lutrgb, lutyuv</a>
  1119. <ul class="no-bullet">
  1120. <li><a id="toc-Commands-95" href="#Commands-95">32.130.1 Commands</a></li>
  1121. <li><a id="toc-Examples-95" href="#Examples-95">32.130.2 Examples</a></li>
  1122. </ul></li>
  1123. <li><a id="toc-lut2_002c-tlut2" href="#lut2_002c-tlut2">32.131 lut2, tlut2</a>
  1124. <ul class="no-bullet">
  1125. <li><a id="toc-Commands-96" href="#Commands-96">32.131.1 Commands</a></li>
  1126. <li><a id="toc-Examples-96" href="#Examples-96">32.131.2 Examples</a></li>
  1127. </ul></li>
  1128. <li><a id="toc-maskedclamp" href="#maskedclamp">32.132 maskedclamp</a>
  1129. <ul class="no-bullet">
  1130. <li><a id="toc-Commands-97" href="#Commands-97">32.132.1 Commands</a></li>
  1131. </ul></li>
  1132. <li><a id="toc-maskedmax" href="#maskedmax">32.133 maskedmax</a>
  1133. <ul class="no-bullet">
  1134. <li><a id="toc-Commands-98" href="#Commands-98">32.133.1 Commands</a></li>
  1135. </ul></li>
  1136. <li><a id="toc-maskedmerge" href="#maskedmerge">32.134 maskedmerge</a>
  1137. <ul class="no-bullet">
  1138. <li><a id="toc-Commands-99" href="#Commands-99">32.134.1 Commands</a></li>
  1139. </ul></li>
  1140. <li><a id="toc-maskedmin" href="#maskedmin">32.135 maskedmin</a>
  1141. <ul class="no-bullet">
  1142. <li><a id="toc-Commands-100" href="#Commands-100">32.135.1 Commands</a></li>
  1143. </ul></li>
  1144. <li><a id="toc-maskedthreshold" href="#maskedthreshold">32.136 maskedthreshold</a>
  1145. <ul class="no-bullet">
  1146. <li><a id="toc-Commands-101" href="#Commands-101">32.136.1 Commands</a></li>
  1147. </ul></li>
  1148. <li><a id="toc-maskfun" href="#maskfun">32.137 maskfun</a>
  1149. <ul class="no-bullet">
  1150. <li><a id="toc-Commands-102" href="#Commands-102">32.137.1 Commands</a></li>
  1151. </ul></li>
  1152. <li><a id="toc-mcdeint" href="#mcdeint">32.138 mcdeint</a></li>
  1153. <li><a id="toc-median" href="#median">32.139 median</a>
  1154. <ul class="no-bullet">
  1155. <li><a id="toc-Commands-103" href="#Commands-103">32.139.1 Commands</a></li>
  1156. </ul></li>
  1157. <li><a id="toc-mergeplanes" href="#mergeplanes">32.140 mergeplanes</a>
  1158. <ul class="no-bullet">
  1159. <li><a id="toc-Examples-97" href="#Examples-97">32.140.1 Examples</a></li>
  1160. </ul></li>
  1161. <li><a id="toc-mestimate" href="#mestimate">32.141 mestimate</a></li>
  1162. <li><a id="toc-midequalizer" href="#midequalizer">32.142 midequalizer</a></li>
  1163. <li><a id="toc-minterpolate" href="#minterpolate">32.143 minterpolate</a></li>
  1164. <li><a id="toc-mix" href="#mix">32.144 mix</a>
  1165. <ul class="no-bullet">
  1166. <li><a id="toc-Commands-104" href="#Commands-104">32.144.1 Commands</a></li>
  1167. </ul></li>
  1168. <li><a id="toc-monochrome" href="#monochrome">32.145 monochrome</a>
  1169. <ul class="no-bullet">
  1170. <li><a id="toc-Commands-105" href="#Commands-105">32.145.1 Commands</a></li>
  1171. </ul></li>
  1172. <li><a id="toc-mpdecimate" href="#mpdecimate">32.146 mpdecimate</a></li>
  1173. <li><a id="toc-msad" href="#msad">32.147 msad</a></li>
  1174. <li><a id="toc-negate" href="#negate">32.148 negate</a>
  1175. <ul class="no-bullet">
  1176. <li><a id="toc-Commands-106" href="#Commands-106">32.148.1 Commands</a></li>
  1177. </ul></li>
  1178. <li><a id="toc-nlmeans-1" href="#nlmeans-1">32.149 nlmeans</a></li>
  1179. <li><a id="toc-nnedi" href="#nnedi">32.150 nnedi</a>
  1180. <ul class="no-bullet">
  1181. <li><a id="toc-Commands-107" href="#Commands-107">32.150.1 Commands</a></li>
  1182. </ul></li>
  1183. <li><a id="toc-noformat" href="#noformat">32.151 noformat</a>
  1184. <ul class="no-bullet">
  1185. <li><a id="toc-Examples-98" href="#Examples-98">32.151.1 Examples</a></li>
  1186. </ul></li>
  1187. <li><a id="toc-noise-1" href="#noise-1">32.152 noise</a>
  1188. <ul class="no-bullet">
  1189. <li><a id="toc-Examples-99" href="#Examples-99">32.152.1 Examples</a></li>
  1190. </ul></li>
  1191. <li><a id="toc-normalize" href="#normalize">32.153 normalize</a>
  1192. <ul class="no-bullet">
  1193. <li><a id="toc-Commands-108" href="#Commands-108">32.153.1 Commands</a></li>
  1194. <li><a id="toc-Examples-100" href="#Examples-100">32.153.2 Examples</a></li>
  1195. </ul></li>
  1196. <li><a id="toc-null-1" href="#null-1">32.154 null</a></li>
  1197. <li><a id="toc-ocr" href="#ocr">32.155 ocr</a></li>
  1198. <li><a id="toc-ocv" href="#ocv">32.156 ocv</a>
  1199. <ul class="no-bullet">
  1200. <li><a id="toc-dilate-1" href="#dilate-1">32.156.1 dilate</a></li>
  1201. <li><a id="toc-erode" href="#erode">32.156.2 erode</a></li>
  1202. <li><a id="toc-smooth" href="#smooth">32.156.3 smooth</a></li>
  1203. </ul></li>
  1204. <li><a id="toc-oscilloscope" href="#oscilloscope">32.157 oscilloscope</a>
  1205. <ul class="no-bullet">
  1206. <li><a id="toc-Commands-109" href="#Commands-109">32.157.1 Commands</a></li>
  1207. <li><a id="toc-Examples-101" href="#Examples-101">32.157.2 Examples</a></li>
  1208. </ul></li>
  1209. <li><a id="toc-overlay-1" href="#overlay-1">32.158 overlay</a>
  1210. <ul class="no-bullet">
  1211. <li><a id="toc-Commands-110" href="#Commands-110">32.158.1 Commands</a></li>
  1212. <li><a id="toc-Examples-102" href="#Examples-102">32.158.2 Examples</a></li>
  1213. </ul></li>
  1214. <li><a id="toc-overlay_005fcuda-1" href="#overlay_005fcuda-1">32.159 overlay_cuda</a></li>
  1215. <li><a id="toc-owdenoise" href="#owdenoise">32.160 owdenoise</a></li>
  1216. <li><a id="toc-pad-1" href="#pad-1">32.161 pad</a>
  1217. <ul class="no-bullet">
  1218. <li><a id="toc-Examples-103" href="#Examples-103">32.161.1 Examples</a></li>
  1219. </ul></li>
  1220. <li><a id="toc-palettegen-1" href="#palettegen-1">32.162 palettegen</a>
  1221. <ul class="no-bullet">
  1222. <li><a id="toc-Examples-104" href="#Examples-104">32.162.1 Examples</a></li>
  1223. </ul></li>
  1224. <li><a id="toc-paletteuse" href="#paletteuse">32.163 paletteuse</a>
  1225. <ul class="no-bullet">
  1226. <li><a id="toc-Examples-105" href="#Examples-105">32.163.1 Examples</a></li>
  1227. </ul></li>
  1228. <li><a id="toc-perspective" href="#perspective">32.164 perspective</a></li>
  1229. <li><a id="toc-phase" href="#phase">32.165 phase</a>
  1230. <ul class="no-bullet">
  1231. <li><a id="toc-Commands-111" href="#Commands-111">32.165.1 Commands</a></li>
  1232. </ul></li>
  1233. <li><a id="toc-photosensitivity" href="#photosensitivity">32.166 photosensitivity</a></li>
  1234. <li><a id="toc-pixdesctest" href="#pixdesctest">32.167 pixdesctest</a></li>
  1235. <li><a id="toc-pixscope" href="#pixscope">32.168 pixscope</a>
  1236. <ul class="no-bullet">
  1237. <li><a id="toc-Commands-112" href="#Commands-112">32.168.1 Commands</a></li>
  1238. </ul></li>
  1239. <li><a id="toc-pp" href="#pp">32.169 pp</a>
  1240. <ul class="no-bullet">
  1241. <li><a id="toc-Examples-106" href="#Examples-106">32.169.1 Examples</a></li>
  1242. </ul></li>
  1243. <li><a id="toc-pp7" href="#pp7">32.170 pp7</a></li>
  1244. <li><a id="toc-premultiply" href="#premultiply">32.171 premultiply</a></li>
  1245. <li><a id="toc-prewitt" href="#prewitt">32.172 prewitt</a>
  1246. <ul class="no-bullet">
  1247. <li><a id="toc-Commands-113" href="#Commands-113">32.172.1 Commands</a></li>
  1248. </ul></li>
  1249. <li><a id="toc-pseudocolor" href="#pseudocolor">32.173 pseudocolor</a>
  1250. <ul class="no-bullet">
  1251. <li><a id="toc-Commands-114" href="#Commands-114">32.173.1 Commands</a></li>
  1252. <li><a id="toc-Examples-107" href="#Examples-107">32.173.2 Examples</a></li>
  1253. </ul></li>
  1254. <li><a id="toc-psnr" href="#psnr">32.174 psnr</a>
  1255. <ul class="no-bullet">
  1256. <li><a id="toc-Examples-108" href="#Examples-108">32.174.1 Examples</a></li>
  1257. </ul></li>
  1258. <li><a id="toc-pullup-1" href="#pullup-1">32.175 pullup</a></li>
  1259. <li><a id="toc-qp" href="#qp">32.176 qp</a>
  1260. <ul class="no-bullet">
  1261. <li><a id="toc-Examples-109" href="#Examples-109">32.176.1 Examples</a></li>
  1262. </ul></li>
  1263. <li><a id="toc-random" href="#random">32.177 random</a></li>
  1264. <li><a id="toc-readeia608" href="#readeia608">32.178 readeia608</a>
  1265. <ul class="no-bullet">
  1266. <li><a id="toc-Commands-115" href="#Commands-115">32.178.1 Commands</a></li>
  1267. <li><a id="toc-Examples-110" href="#Examples-110">32.178.2 Examples</a></li>
  1268. </ul></li>
  1269. <li><a id="toc-readvitc" href="#readvitc">32.179 readvitc</a>
  1270. <ul class="no-bullet">
  1271. <li><a id="toc-Examples-111" href="#Examples-111">32.179.1 Examples</a></li>
  1272. </ul></li>
  1273. <li><a id="toc-remap" href="#remap">32.180 remap</a></li>
  1274. <li><a id="toc-removegrain" href="#removegrain">32.181 removegrain</a></li>
  1275. <li><a id="toc-removelogo" href="#removelogo">32.182 removelogo</a></li>
  1276. <li><a id="toc-repeatfields" href="#repeatfields">32.183 repeatfields</a></li>
  1277. <li><a id="toc-reverse" href="#reverse">32.184 reverse</a>
  1278. <ul class="no-bullet">
  1279. <li><a id="toc-Examples-112" href="#Examples-112">32.184.1 Examples</a></li>
  1280. </ul></li>
  1281. <li><a id="toc-rgbashift" href="#rgbashift">32.185 rgbashift</a>
  1282. <ul class="no-bullet">
  1283. <li><a id="toc-Commands-116" href="#Commands-116">32.185.1 Commands</a></li>
  1284. </ul></li>
  1285. <li><a id="toc-roberts" href="#roberts">32.186 roberts</a>
  1286. <ul class="no-bullet">
  1287. <li><a id="toc-Commands-117" href="#Commands-117">32.186.1 Commands</a></li>
  1288. </ul></li>
  1289. <li><a id="toc-rotate" href="#rotate">32.187 rotate</a>
  1290. <ul class="no-bullet">
  1291. <li><a id="toc-Examples-113" href="#Examples-113">32.187.1 Examples</a></li>
  1292. <li><a id="toc-Commands-118" href="#Commands-118">32.187.2 Commands</a></li>
  1293. </ul></li>
  1294. <li><a id="toc-sab" href="#sab">32.188 sab</a></li>
  1295. <li><a id="toc-scale-1" href="#scale-1">32.189 scale</a>
  1296. <ul class="no-bullet">
  1297. <li><a id="toc-Options-33" href="#Options-33">32.189.1 Options</a></li>
  1298. <li><a id="toc-Examples-114" href="#Examples-114">32.189.2 Examples</a></li>
  1299. <li><a id="toc-Commands-119" href="#Commands-119">32.189.3 Commands</a></li>
  1300. </ul></li>
  1301. <li><a id="toc-scale_005fnpp" href="#scale_005fnpp">32.190 scale_npp</a></li>
  1302. <li><a id="toc-scale2ref" href="#scale2ref">32.191 scale2ref</a>
  1303. <ul class="no-bullet">
  1304. <li><a id="toc-Examples-115" href="#Examples-115">32.191.1 Examples</a></li>
  1305. <li><a id="toc-Commands-120" href="#Commands-120">32.191.2 Commands</a></li>
  1306. </ul></li>
  1307. <li><a id="toc-scroll" href="#scroll">32.192 scroll</a>
  1308. <ul class="no-bullet">
  1309. <li><a id="toc-Commands-121" href="#Commands-121">32.192.1 Commands</a></li>
  1310. </ul></li>
  1311. <li><a id="toc-scdet-1" href="#scdet-1">32.193 scdet</a></li>
  1312. <li><a id="toc-selectivecolor-1" href="#selectivecolor-1">32.194 selectivecolor</a>
  1313. <ul class="no-bullet">
  1314. <li><a id="toc-Examples-116" href="#Examples-116">32.194.1 Examples</a></li>
  1315. </ul></li>
  1316. <li><a id="toc-separatefields-1" href="#separatefields-1">32.195 separatefields</a></li>
  1317. <li><a id="toc-setdar_002c-setsar" href="#setdar_002c-setsar">32.196 setdar, setsar</a>
  1318. <ul class="no-bullet">
  1319. <li><a id="toc-Examples-117" href="#Examples-117">32.196.1 Examples</a></li>
  1320. </ul></li>
  1321. <li><a id="toc-setfield-1" href="#setfield-1">32.197 setfield</a></li>
  1322. <li><a id="toc-setparams-1" href="#setparams-1">32.198 setparams</a></li>
  1323. <li><a id="toc-shear" href="#shear">32.199 shear</a>
  1324. <ul class="no-bullet">
  1325. <li><a id="toc-Commands-122" href="#Commands-122">32.199.1 Commands</a></li>
  1326. </ul></li>
  1327. <li><a id="toc-showinfo" href="#showinfo">32.200 showinfo</a></li>
  1328. <li><a id="toc-showpalette" href="#showpalette">32.201 showpalette</a></li>
  1329. <li><a id="toc-shuffleframes" href="#shuffleframes">32.202 shuffleframes</a>
  1330. <ul class="no-bullet">
  1331. <li><a id="toc-Examples-118" href="#Examples-118">32.202.1 Examples</a></li>
  1332. </ul></li>
  1333. <li><a id="toc-shufflepixels" href="#shufflepixels">32.203 shufflepixels</a></li>
  1334. <li><a id="toc-shuffleplanes" href="#shuffleplanes">32.204 shuffleplanes</a>
  1335. <ul class="no-bullet">
  1336. <li><a id="toc-Examples-119" href="#Examples-119">32.204.1 Examples</a></li>
  1337. </ul></li>
  1338. <li><a id="toc-signalstats-1" href="#signalstats-1">32.205 signalstats</a>
  1339. <ul class="no-bullet">
  1340. <li><a id="toc-Examples-120" href="#Examples-120">32.205.1 Examples</a></li>
  1341. </ul></li>
  1342. <li><a id="toc-signature-1" href="#signature-1">32.206 signature</a>
  1343. <ul class="no-bullet">
  1344. <li><a id="toc-Examples-121" href="#Examples-121">32.206.1 Examples</a></li>
  1345. </ul></li>
  1346. <li><a id="toc-smartblur-1" href="#smartblur-1">32.207 smartblur</a></li>
  1347. <li><a id="toc-sobel" href="#sobel">32.208 sobel</a>
  1348. <ul class="no-bullet">
  1349. <li><a id="toc-Commands-123" href="#Commands-123">32.208.1 Commands</a></li>
  1350. </ul></li>
  1351. <li><a id="toc-spp-1" href="#spp-1">32.209 spp</a>
  1352. <ul class="no-bullet">
  1353. <li><a id="toc-Commands-124" href="#Commands-124">32.209.1 Commands</a></li>
  1354. </ul></li>
  1355. <li><a id="toc-sr-1" href="#sr-1">32.210 sr</a></li>
  1356. <li><a id="toc-ssim" href="#ssim">32.211 ssim</a>
  1357. <ul class="no-bullet">
  1358. <li><a id="toc-Examples-122" href="#Examples-122">32.211.1 Examples</a></li>
  1359. </ul></li>
  1360. <li><a id="toc-stereo3d" href="#stereo3d">32.212 stereo3d</a>
  1361. <ul class="no-bullet">
  1362. <li><a id="toc-Examples-123" href="#Examples-123">32.212.1 Examples</a></li>
  1363. </ul></li>
  1364. <li><a id="toc-streamselect_002c-astreamselect" href="#streamselect_002c-astreamselect">32.213 streamselect, astreamselect</a>
  1365. <ul class="no-bullet">
  1366. <li><a id="toc-Commands-125" href="#Commands-125">32.213.1 Commands</a></li>
  1367. <li><a id="toc-Examples-124" href="#Examples-124">32.213.2 Examples</a></li>
  1368. </ul></li>
  1369. <li><a id="toc-subtitles-1" href="#subtitles-1">32.214 subtitles</a></li>
  1370. <li><a id="toc-super2xsai" href="#super2xsai">32.215 super2xsai</a></li>
  1371. <li><a id="toc-swaprect" href="#swaprect">32.216 swaprect</a>
  1372. <ul class="no-bullet">
  1373. <li><a id="toc-Commands-126" href="#Commands-126">32.216.1 Commands</a></li>
  1374. </ul></li>
  1375. <li><a id="toc-swapuv" href="#swapuv">32.217 swapuv</a></li>
  1376. <li><a id="toc-tblend" href="#tblend">32.218 tblend</a></li>
  1377. <li><a id="toc-telecine" href="#telecine">32.219 telecine</a></li>
  1378. <li><a id="toc-thistogram" href="#thistogram">32.220 thistogram</a></li>
  1379. <li><a id="toc-threshold" href="#threshold">32.221 threshold</a>
  1380. <ul class="no-bullet">
  1381. <li><a id="toc-Examples-125" href="#Examples-125">32.221.1 Examples</a></li>
  1382. </ul></li>
  1383. <li><a id="toc-thumbnail" href="#thumbnail">32.222 thumbnail</a>
  1384. <ul class="no-bullet">
  1385. <li><a id="toc-Examples-126" href="#Examples-126">32.222.1 Examples</a></li>
  1386. </ul></li>
  1387. <li><a id="toc-tile-1" href="#tile-1">32.223 tile</a>
  1388. <ul class="no-bullet">
  1389. <li><a id="toc-Examples-127" href="#Examples-127">32.223.1 Examples</a></li>
  1390. </ul></li>
  1391. <li><a id="toc-tinterlace" href="#tinterlace">32.224 tinterlace</a></li>
  1392. <li><a id="toc-tmedian" href="#tmedian">32.225 tmedian</a>
  1393. <ul class="no-bullet">
  1394. <li><a id="toc-Commands-127" href="#Commands-127">32.225.1 Commands</a></li>
  1395. </ul></li>
  1396. <li><a id="toc-tmidequalizer" href="#tmidequalizer">32.226 tmidequalizer</a></li>
  1397. <li><a id="toc-tmix" href="#tmix">32.227 tmix</a>
  1398. <ul class="no-bullet">
  1399. <li><a id="toc-Examples-128" href="#Examples-128">32.227.1 Examples</a></li>
  1400. <li><a id="toc-Commands-128" href="#Commands-128">32.227.2 Commands</a></li>
  1401. </ul></li>
  1402. <li><a id="toc-tonemap-1" href="#tonemap-1">32.228 tonemap</a>
  1403. <ul class="no-bullet">
  1404. <li><a id="toc-Options-34" href="#Options-34">32.228.1 Options</a></li>
  1405. </ul></li>
  1406. <li><a id="toc-tpad" href="#tpad">32.229 tpad</a></li>
  1407. <li><a id="toc-transpose-1" href="#transpose-1">32.230 transpose</a></li>
  1408. <li><a id="toc-transpose_005fnpp" href="#transpose_005fnpp">32.231 transpose_npp</a></li>
  1409. <li><a id="toc-trim" href="#trim">32.232 trim</a></li>
  1410. <li><a id="toc-unpremultiply" href="#unpremultiply">32.233 unpremultiply</a></li>
  1411. <li><a id="toc-unsharp-1" href="#unsharp-1">32.234 unsharp</a>
  1412. <ul class="no-bullet">
  1413. <li><a id="toc-Examples-129" href="#Examples-129">32.234.1 Examples</a></li>
  1414. </ul></li>
  1415. <li><a id="toc-untile-1" href="#untile-1">32.235 untile</a>
  1416. <ul class="no-bullet">
  1417. <li><a id="toc-Examples-130" href="#Examples-130">32.235.1 Examples</a></li>
  1418. </ul></li>
  1419. <li><a id="toc-uspp" href="#uspp">32.236 uspp</a></li>
  1420. <li><a id="toc-v360" href="#v360">32.237 v360</a>
  1421. <ul class="no-bullet">
  1422. <li><a id="toc-Examples-131" href="#Examples-131">32.237.1 Examples</a></li>
  1423. <li><a id="toc-Commands-129" href="#Commands-129">32.237.2 Commands</a></li>
  1424. </ul></li>
  1425. <li><a id="toc-vaguedenoiser" href="#vaguedenoiser">32.238 vaguedenoiser</a></li>
  1426. <li><a id="toc-vectorscope" href="#vectorscope">32.239 vectorscope</a></li>
  1427. <li><a id="toc-vidstabdetect-1" href="#vidstabdetect-1">32.240 vidstabdetect</a>
  1428. <ul class="no-bullet">
  1429. <li><a id="toc-Examples-132" href="#Examples-132">32.240.1 Examples</a></li>
  1430. </ul></li>
  1431. <li><a id="toc-vidstabtransform-1" href="#vidstabtransform-1">32.241 vidstabtransform</a>
  1432. <ul class="no-bullet">
  1433. <li><a id="toc-Options-35" href="#Options-35">32.241.1 Options</a></li>
  1434. <li><a id="toc-Examples-133" href="#Examples-133">32.241.2 Examples</a></li>
  1435. </ul></li>
  1436. <li><a id="toc-vflip" href="#vflip">32.242 vflip</a></li>
  1437. <li><a id="toc-vfrdet" href="#vfrdet">32.243 vfrdet</a></li>
  1438. <li><a id="toc-vibrance" href="#vibrance">32.244 vibrance</a>
  1439. <ul class="no-bullet">
  1440. <li><a id="toc-Commands-130" href="#Commands-130">32.244.1 Commands</a></li>
  1441. </ul></li>
  1442. <li><a id="toc-vif" href="#vif">32.245 vif</a></li>
  1443. <li><a id="toc-vignette-1" href="#vignette-1">32.246 vignette</a>
  1444. <ul class="no-bullet">
  1445. <li><a id="toc-Expressions" href="#Expressions">32.246.1 Expressions</a></li>
  1446. <li><a id="toc-Examples-134" href="#Examples-134">32.246.2 Examples</a></li>
  1447. </ul></li>
  1448. <li><a id="toc-vmafmotion" href="#vmafmotion">32.247 vmafmotion</a></li>
  1449. <li><a id="toc-vstack" href="#vstack">32.248 vstack</a></li>
  1450. <li><a id="toc-w3fdif" href="#w3fdif">32.249 w3fdif</a>
  1451. <ul class="no-bullet">
  1452. <li><a id="toc-Commands-131" href="#Commands-131">32.249.1 Commands</a></li>
  1453. </ul></li>
  1454. <li><a id="toc-waveform" href="#waveform">32.250 waveform</a></li>
  1455. <li><a id="toc-weave_002c-doubleweave" href="#weave_002c-doubleweave">32.251 weave, doubleweave</a>
  1456. <ul class="no-bullet">
  1457. <li><a id="toc-Examples-135" href="#Examples-135">32.251.1 Examples</a></li>
  1458. </ul></li>
  1459. <li><a id="toc-xbr" href="#xbr">32.252 xbr</a></li>
  1460. <li><a id="toc-xfade" href="#xfade">32.253 xfade</a>
  1461. <ul class="no-bullet">
  1462. <li><a id="toc-Examples-136" href="#Examples-136">32.253.1 Examples</a></li>
  1463. </ul></li>
  1464. <li><a id="toc-xmedian" href="#xmedian">32.254 xmedian</a>
  1465. <ul class="no-bullet">
  1466. <li><a id="toc-Commands-132" href="#Commands-132">32.254.1 Commands</a></li>
  1467. </ul></li>
  1468. <li><a id="toc-xstack" href="#xstack">32.255 xstack</a>
  1469. <ul class="no-bullet">
  1470. <li><a id="toc-Examples-137" href="#Examples-137">32.255.1 Examples</a></li>
  1471. </ul></li>
  1472. <li><a id="toc-yadif-1" href="#yadif-1">32.256 yadif</a></li>
  1473. <li><a id="toc-yadif_005fcuda" href="#yadif_005fcuda">32.257 yadif_cuda</a></li>
  1474. <li><a id="toc-yaepblur" href="#yaepblur">32.258 yaepblur</a>
  1475. <ul class="no-bullet">
  1476. <li><a id="toc-Commands-133" href="#Commands-133">32.258.1 Commands</a></li>
  1477. </ul></li>
  1478. <li><a id="toc-zoompan" href="#zoompan">32.259 zoompan</a>
  1479. <ul class="no-bullet">
  1480. <li><a id="toc-Examples-138" href="#Examples-138">32.259.1 Examples</a></li>
  1481. </ul></li>
  1482. <li><a id="toc-zscale-1" href="#zscale-1">32.260 zscale</a>
  1483. <ul class="no-bullet">
  1484. <li><a id="toc-Options-36" href="#Options-36">32.260.1 Options</a></li>
  1485. <li><a id="toc-Commands-134" href="#Commands-134">32.260.2 Commands</a></li>
  1486. </ul></li>
  1487. </ul></li>
  1488. <li><a id="toc-OpenCL-Video-Filters" href="#OpenCL-Video-Filters">33 OpenCL Video Filters</a>
  1489. <ul class="no-bullet">
  1490. <li><a id="toc-avgblur_005fopencl" href="#avgblur_005fopencl">33.1 avgblur_opencl</a>
  1491. <ul class="no-bullet">
  1492. <li><a id="toc-Example" href="#Example">33.1.1 Example</a></li>
  1493. </ul></li>
  1494. <li><a id="toc-boxblur_005fopencl" href="#boxblur_005fopencl">33.2 boxblur_opencl</a>
  1495. <ul class="no-bullet">
  1496. <li><a id="toc-Examples-139" href="#Examples-139">33.2.1 Examples</a></li>
  1497. </ul></li>
  1498. <li><a id="toc-colorkey_005fopencl" href="#colorkey_005fopencl">33.3 colorkey_opencl</a>
  1499. <ul class="no-bullet">
  1500. <li><a id="toc-Examples-140" href="#Examples-140">33.3.1 Examples</a></li>
  1501. </ul></li>
  1502. <li><a id="toc-convolution_005fopencl" href="#convolution_005fopencl">33.4 convolution_opencl</a>
  1503. <ul class="no-bullet">
  1504. <li><a id="toc-Examples-141" href="#Examples-141">33.4.1 Examples</a></li>
  1505. </ul></li>
  1506. <li><a id="toc-erosion_005fopencl" href="#erosion_005fopencl">33.5 erosion_opencl</a>
  1507. <ul class="no-bullet">
  1508. <li><a id="toc-Example-1" href="#Example-1">33.5.1 Example</a></li>
  1509. </ul></li>
  1510. <li><a id="toc-deshake_005fopencl" href="#deshake_005fopencl">33.6 deshake_opencl</a>
  1511. <ul class="no-bullet">
  1512. <li><a id="toc-Examples-142" href="#Examples-142">33.6.1 Examples</a></li>
  1513. </ul></li>
  1514. <li><a id="toc-dilation_005fopencl" href="#dilation_005fopencl">33.7 dilation_opencl</a>
  1515. <ul class="no-bullet">
  1516. <li><a id="toc-Example-2" href="#Example-2">33.7.1 Example</a></li>
  1517. </ul></li>
  1518. <li><a id="toc-nlmeans_005fopencl" href="#nlmeans_005fopencl">33.8 nlmeans_opencl</a></li>
  1519. <li><a id="toc-overlay_005fopencl" href="#overlay_005fopencl">33.9 overlay_opencl</a>
  1520. <ul class="no-bullet">
  1521. <li><a id="toc-Examples-143" href="#Examples-143">33.9.1 Examples</a></li>
  1522. </ul></li>
  1523. <li><a id="toc-pad_005fopencl" href="#pad_005fopencl">33.10 pad_opencl</a></li>
  1524. <li><a id="toc-prewitt_005fopencl" href="#prewitt_005fopencl">33.11 prewitt_opencl</a>
  1525. <ul class="no-bullet">
  1526. <li><a id="toc-Example-3" href="#Example-3">33.11.1 Example</a></li>
  1527. </ul></li>
  1528. <li><a id="toc-program_005fopencl-1" href="#program_005fopencl-1">33.12 program_opencl</a></li>
  1529. <li><a id="toc-roberts_005fopencl" href="#roberts_005fopencl">33.13 roberts_opencl</a>
  1530. <ul class="no-bullet">
  1531. <li><a id="toc-Example-4" href="#Example-4">33.13.1 Example</a></li>
  1532. </ul></li>
  1533. <li><a id="toc-sobel_005fopencl" href="#sobel_005fopencl">33.14 sobel_opencl</a>
  1534. <ul class="no-bullet">
  1535. <li><a id="toc-Example-5" href="#Example-5">33.14.1 Example</a></li>
  1536. </ul></li>
  1537. <li><a id="toc-tonemap_005fopencl" href="#tonemap_005fopencl">33.15 tonemap_opencl</a>
  1538. <ul class="no-bullet">
  1539. <li><a id="toc-Example-6" href="#Example-6">33.15.1 Example</a></li>
  1540. </ul></li>
  1541. <li><a id="toc-unsharp_005fopencl" href="#unsharp_005fopencl">33.16 unsharp_opencl</a>
  1542. <ul class="no-bullet">
  1543. <li><a id="toc-Examples-144" href="#Examples-144">33.16.1 Examples</a></li>
  1544. </ul></li>
  1545. <li><a id="toc-xfade_005fopencl" href="#xfade_005fopencl">33.17 xfade_opencl</a></li>
  1546. </ul></li>
  1547. <li><a id="toc-VAAPI-Video-Filters" href="#VAAPI-Video-Filters">34 VAAPI Video Filters</a>
  1548. <ul class="no-bullet">
  1549. <li><a id="toc-tonemap_005fvaapi" href="#tonemap_005fvaapi">34.1 tonemap_vaapi</a>
  1550. <ul class="no-bullet">
  1551. <li><a id="toc-Example-7" href="#Example-7">34.1.1 Example</a></li>
  1552. </ul></li>
  1553. </ul></li>
  1554. <li><a id="toc-Video-Sources" href="#Video-Sources">35 Video Sources</a>
  1555. <ul class="no-bullet">
  1556. <li><a id="toc-buffer" href="#buffer">35.1 buffer</a></li>
  1557. <li><a id="toc-cellauto" href="#cellauto">35.2 cellauto</a>
  1558. <ul class="no-bullet">
  1559. <li><a id="toc-Examples-145" href="#Examples-145">35.2.1 Examples</a></li>
  1560. </ul></li>
  1561. <li><a id="toc-coreimagesrc-1" href="#coreimagesrc-1">35.3 coreimagesrc</a>
  1562. <ul class="no-bullet">
  1563. <li><a id="toc-Examples-146" href="#Examples-146">35.3.1 Examples</a></li>
  1564. </ul></li>
  1565. <li><a id="toc-gradients" href="#gradients">35.4 gradients</a></li>
  1566. <li><a id="toc-mandelbrot" href="#mandelbrot">35.5 mandelbrot</a></li>
  1567. <li><a id="toc-mptestsrc" href="#mptestsrc">35.6 mptestsrc</a></li>
  1568. <li><a id="toc-frei0r_005fsrc" href="#frei0r_005fsrc">35.7 frei0r_src</a></li>
  1569. <li><a id="toc-life" href="#life">35.8 life</a>
  1570. <ul class="no-bullet">
  1571. <li><a id="toc-Examples-147" href="#Examples-147">35.8.1 Examples</a></li>
  1572. </ul></li>
  1573. <li><a id="toc-allrgb_002c-allyuv_002c-color_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-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc">35.9 allrgb, allyuv, color, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc</a>
  1574. <ul class="no-bullet">
  1575. <li><a id="toc-Examples-148" href="#Examples-148">35.9.1 Examples</a></li>
  1576. <li><a id="toc-Commands-135" href="#Commands-135">35.9.2 Commands</a></li>
  1577. </ul></li>
  1578. <li><a id="toc-openclsrc" href="#openclsrc">35.10 openclsrc</a></li>
  1579. <li><a id="toc-sierpinski" href="#sierpinski">35.11 sierpinski</a></li>
  1580. </ul></li>
  1581. <li><a id="toc-Video-Sinks" href="#Video-Sinks">36 Video Sinks</a>
  1582. <ul class="no-bullet">
  1583. <li><a id="toc-buffersink" href="#buffersink">36.1 buffersink</a></li>
  1584. <li><a id="toc-nullsink" href="#nullsink">36.2 nullsink</a></li>
  1585. </ul></li>
  1586. <li><a id="toc-Multimedia-Filters" href="#Multimedia-Filters">37 Multimedia Filters</a>
  1587. <ul class="no-bullet">
  1588. <li><a id="toc-abitscope" href="#abitscope">37.1 abitscope</a></li>
  1589. <li><a id="toc-adrawgraph" href="#adrawgraph">37.2 adrawgraph</a></li>
  1590. <li><a id="toc-agraphmonitor" href="#agraphmonitor">37.3 agraphmonitor</a></li>
  1591. <li><a id="toc-ahistogram" href="#ahistogram">37.4 ahistogram</a></li>
  1592. <li><a id="toc-aphasemeter" href="#aphasemeter">37.5 aphasemeter</a>
  1593. <ul class="no-bullet">
  1594. <li><a id="toc-phasing-detection" href="#phasing-detection">37.5.1 phasing detection</a></li>
  1595. <li><a id="toc-Examples-149" href="#Examples-149">37.5.2 Examples</a></li>
  1596. </ul></li>
  1597. <li><a id="toc-avectorscope" href="#avectorscope">37.6 avectorscope</a>
  1598. <ul class="no-bullet">
  1599. <li><a id="toc-Examples-150" href="#Examples-150">37.6.1 Examples</a></li>
  1600. </ul></li>
  1601. <li><a id="toc-bench_002c-abench" href="#bench_002c-abench">37.7 bench, abench</a>
  1602. <ul class="no-bullet">
  1603. <li><a id="toc-Examples-151" href="#Examples-151">37.7.1 Examples</a></li>
  1604. </ul></li>
  1605. <li><a id="toc-concat-3" href="#concat-3">37.8 concat</a>
  1606. <ul class="no-bullet">
  1607. <li><a id="toc-Examples-152" href="#Examples-152">37.8.1 Examples</a></li>
  1608. <li><a id="toc-Commands-136" href="#Commands-136">37.8.2 Commands</a></li>
  1609. </ul></li>
  1610. <li><a id="toc-ebur128-1" href="#ebur128-1">37.9 ebur128</a>
  1611. <ul class="no-bullet">
  1612. <li><a id="toc-Examples-153" href="#Examples-153">37.9.1 Examples</a></li>
  1613. </ul></li>
  1614. <li><a id="toc-interleave_002c-ainterleave" href="#interleave_002c-ainterleave">37.10 interleave, ainterleave</a>
  1615. <ul class="no-bullet">
  1616. <li><a id="toc-Examples-154" href="#Examples-154">37.10.1 Examples</a></li>
  1617. </ul></li>
  1618. <li><a id="toc-metadata_002c-ametadata" href="#metadata_002c-ametadata">37.11 metadata, ametadata</a>
  1619. <ul class="no-bullet">
  1620. <li><a id="toc-Examples-155" href="#Examples-155">37.11.1 Examples</a></li>
  1621. </ul></li>
  1622. <li><a id="toc-perms_002c-aperms" href="#perms_002c-aperms">37.12 perms, aperms</a></li>
  1623. <li><a id="toc-realtime_002c-arealtime" href="#realtime_002c-arealtime">37.13 realtime, arealtime</a></li>
  1624. <li><a id="toc-select_002c-aselect" href="#select_002c-aselect">37.14 select, aselect</a>
  1625. <ul class="no-bullet">
  1626. <li><a id="toc-Examples-156" href="#Examples-156">37.14.1 Examples</a></li>
  1627. </ul></li>
  1628. <li><a id="toc-sendcmd_002c-asendcmd" href="#sendcmd_002c-asendcmd">37.15 sendcmd, asendcmd</a>
  1629. <ul class="no-bullet">
  1630. <li><a id="toc-Commands-syntax" href="#Commands-syntax">37.15.1 Commands syntax</a></li>
  1631. <li><a id="toc-Examples-157" href="#Examples-157">37.15.2 Examples</a></li>
  1632. </ul></li>
  1633. <li><a id="toc-setpts_002c-asetpts" href="#setpts_002c-asetpts">37.16 setpts, asetpts</a>
  1634. <ul class="no-bullet">
  1635. <li><a id="toc-Examples-158" href="#Examples-158">37.16.1 Examples</a></li>
  1636. </ul></li>
  1637. <li><a id="toc-setrange" href="#setrange">37.17 setrange</a></li>
  1638. <li><a id="toc-settb_002c-asettb" href="#settb_002c-asettb">37.18 settb, asettb</a>
  1639. <ul class="no-bullet">
  1640. <li><a id="toc-Examples-159" href="#Examples-159">37.18.1 Examples</a></li>
  1641. </ul></li>
  1642. <li><a id="toc-showcqt" href="#showcqt">37.19 showcqt</a>
  1643. <ul class="no-bullet">
  1644. <li><a id="toc-Examples-160" href="#Examples-160">37.19.1 Examples</a></li>
  1645. </ul></li>
  1646. <li><a id="toc-showfreqs" href="#showfreqs">37.20 showfreqs</a></li>
  1647. <li><a id="toc-showspatial" href="#showspatial">37.21 showspatial</a></li>
  1648. <li><a id="toc-showspectrum-1" href="#showspectrum-1">37.22 showspectrum</a>
  1649. <ul class="no-bullet">
  1650. <li><a id="toc-Examples-161" href="#Examples-161">37.22.1 Examples</a></li>
  1651. </ul></li>
  1652. <li><a id="toc-showspectrumpic" href="#showspectrumpic">37.23 showspectrumpic</a>
  1653. <ul class="no-bullet">
  1654. <li><a id="toc-Examples-162" href="#Examples-162">37.23.1 Examples</a></li>
  1655. </ul></li>
  1656. <li><a id="toc-showvolume" href="#showvolume">37.24 showvolume</a></li>
  1657. <li><a id="toc-showwaves" href="#showwaves">37.25 showwaves</a>
  1658. <ul class="no-bullet">
  1659. <li><a id="toc-Examples-163" href="#Examples-163">37.25.1 Examples</a></li>
  1660. </ul></li>
  1661. <li><a id="toc-showwavespic" href="#showwavespic">37.26 showwavespic</a>
  1662. <ul class="no-bullet">
  1663. <li><a id="toc-Examples-164" href="#Examples-164">37.26.1 Examples</a></li>
  1664. </ul></li>
  1665. <li><a id="toc-sidedata_002c-asidedata" href="#sidedata_002c-asidedata">37.27 sidedata, asidedata</a></li>
  1666. <li><a id="toc-spectrumsynth" href="#spectrumsynth">37.28 spectrumsynth</a>
  1667. <ul class="no-bullet">
  1668. <li><a id="toc-Examples-165" href="#Examples-165">37.28.1 Examples</a></li>
  1669. </ul></li>
  1670. <li><a id="toc-split_002c-asplit" href="#split_002c-asplit">37.29 split, asplit</a>
  1671. <ul class="no-bullet">
  1672. <li><a id="toc-Examples-166" href="#Examples-166">37.29.1 Examples</a></li>
  1673. </ul></li>
  1674. <li><a id="toc-zmq_002c-azmq" href="#zmq_002c-azmq">37.30 zmq, azmq</a>
  1675. <ul class="no-bullet">
  1676. <li><a id="toc-Examples-167" href="#Examples-167">37.30.1 Examples</a></li>
  1677. </ul></li>
  1678. </ul></li>
  1679. <li><a id="toc-Multimedia-Sources" href="#Multimedia-Sources">38 Multimedia Sources</a>
  1680. <ul class="no-bullet">
  1681. <li><a id="toc-amovie" href="#amovie">38.1 amovie</a></li>
  1682. <li><a id="toc-movie-1" href="#movie-1">38.2 movie</a>
  1683. <ul class="no-bullet">
  1684. <li><a id="toc-Examples-168" href="#Examples-168">38.2.1 Examples</a></li>
  1685. <li><a id="toc-Commands-137" href="#Commands-137">38.2.2 Commands</a></li>
  1686. </ul></li>
  1687. </ul></li>
  1688. <li><a id="toc-External-libraries" href="#External-libraries">39 External libraries</a>
  1689. <ul class="no-bullet">
  1690. <li><a id="toc-Alliance-for-Open-Media-_0028AOM_0029" href="#Alliance-for-Open-Media-_0028AOM_0029">39.1 Alliance for Open Media (AOM)</a></li>
  1691. <li><a id="toc-AMD-AMF_002fVCE" href="#AMD-AMF_002fVCE">39.2 AMD AMF/VCE</a></li>
  1692. <li><a id="toc-AviSynth" href="#AviSynth">39.3 AviSynth</a></li>
  1693. <li><a id="toc-Chromaprint" href="#Chromaprint">39.4 Chromaprint</a></li>
  1694. <li><a id="toc-codec2" href="#codec2">39.5 codec2</a></li>
  1695. <li><a id="toc-dav1d" href="#dav1d">39.6 dav1d</a></li>
  1696. <li><a id="toc-davs2" href="#davs2">39.7 davs2</a></li>
  1697. <li><a id="toc-uavs3d" href="#uavs3d">39.8 uavs3d</a></li>
  1698. <li><a id="toc-Game-Music-Emu" href="#Game-Music-Emu">39.9 Game Music Emu</a></li>
  1699. <li><a id="toc-Intel-QuickSync-Video" href="#Intel-QuickSync-Video">39.10 Intel QuickSync Video</a></li>
  1700. <li><a id="toc-Kvazaar" href="#Kvazaar">39.11 Kvazaar</a></li>
  1701. <li><a id="toc-LAME" href="#LAME">39.12 LAME</a></li>
  1702. <li><a id="toc-libilbc-1" href="#libilbc-1">39.13 libilbc</a></li>
  1703. <li><a id="toc-libvpx" href="#libvpx">39.14 libvpx</a></li>
  1704. <li><a id="toc-ModPlug" href="#ModPlug">39.15 ModPlug</a></li>
  1705. <li><a id="toc-OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries" href="#OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries">39.16 OpenCORE, VisualOn, and Fraunhofer libraries</a>
  1706. <ul class="no-bullet">
  1707. <li><a id="toc-OpenCORE-AMR" href="#OpenCORE-AMR">39.16.1 OpenCORE AMR</a></li>
  1708. <li><a id="toc-VisualOn-AMR_002dWB-encoder-library" href="#VisualOn-AMR_002dWB-encoder-library">39.16.2 VisualOn AMR-WB encoder library</a></li>
  1709. <li><a id="toc-Fraunhofer-AAC-library" href="#Fraunhofer-AAC-library">39.16.3 Fraunhofer AAC library</a></li>
  1710. </ul></li>
  1711. <li><a id="toc-OpenH264" href="#OpenH264">39.17 OpenH264</a></li>
  1712. <li><a id="toc-OpenJPEG" href="#OpenJPEG">39.18 OpenJPEG</a></li>
  1713. <li><a id="toc-rav1e" href="#rav1e">39.19 rav1e</a></li>
  1714. <li><a id="toc-SVT_002dAV1" href="#SVT_002dAV1">39.20 SVT-AV1</a></li>
  1715. <li><a id="toc-TwoLAME" href="#TwoLAME">39.21 TwoLAME</a></li>
  1716. <li><a id="toc-VapourSynth" href="#VapourSynth">39.22 VapourSynth</a></li>
  1717. <li><a id="toc-x264" href="#x264">39.23 x264</a></li>
  1718. <li><a id="toc-x265" href="#x265">39.24 x265</a></li>
  1719. <li><a id="toc-xavs" href="#xavs">39.25 xavs</a></li>
  1720. <li><a id="toc-xavs2" href="#xavs2">39.26 xavs2</a></li>
  1721. <li><a id="toc-ZVBI" href="#ZVBI">39.27 ZVBI</a></li>
  1722. </ul></li>
  1723. <li><a id="toc-Supported-File-Formats_002c-Codecs-or-Features" href="#Supported-File-Formats_002c-Codecs-or-Features">40 Supported File Formats, Codecs or Features</a>
  1724. <ul class="no-bullet">
  1725. <li><a id="toc-File-Formats" href="#File-Formats">40.1 File Formats</a></li>
  1726. <li><a id="toc-Image-Formats" href="#Image-Formats">40.2 Image Formats</a></li>
  1727. <li><a id="toc-Video-Codecs" href="#Video-Codecs">40.3 Video Codecs</a></li>
  1728. <li><a id="toc-Audio-Codecs" href="#Audio-Codecs">40.4 Audio Codecs</a></li>
  1729. <li><a id="toc-Subtitle-Formats" href="#Subtitle-Formats">40.5 Subtitle Formats</a></li>
  1730. <li><a id="toc-Network-Protocols" href="#Network-Protocols">40.6 Network Protocols</a></li>
  1731. <li><a id="toc-Input_002fOutput-Devices" href="#Input_002fOutput-Devices">40.7 Input/Output Devices</a></li>
  1732. <li><a id="toc-Timecode-1" href="#Timecode-1">40.8 Timecode</a></li>
  1733. </ul></li>
  1734. <li><a id="toc-See-Also" href="#See-Also">41 See Also</a></li>
  1735. <li><a id="toc-Authors" href="#Authors">42 Authors</a></li>
  1736. </ul>
  1737. </div>
  1738. <a name="Synopsis"></a>
  1739. <h2 class="chapter">1 Synopsis<span class="pull-right"><a class="anchor hidden-xs" href="#Synopsis" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Synopsis" aria-hidden="true">TOC</a></span></h2>
  1740. <p>ffprobe [<var>options</var>] [<samp>input_url</samp>]
  1741. </p>
  1742. <a name="Description"></a>
  1743. <h2 class="chapter">2 Description<span class="pull-right"><a class="anchor hidden-xs" href="#Description" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Description" aria-hidden="true">TOC</a></span></h2>
  1744. <p>ffprobe gathers information from multimedia streams and prints it in
  1745. human- and machine-readable fashion.
  1746. </p>
  1747. <p>For example it can be used to check the format of the container used
  1748. by a multimedia stream and the format and type of each media stream
  1749. contained in it.
  1750. </p>
  1751. <p>If a url is specified in input, ffprobe will try to open and
  1752. probe the url content. If the url cannot be opened or recognized as
  1753. a multimedia file, a positive exit code is returned.
  1754. </p>
  1755. <p>ffprobe may be employed both as a standalone application or in
  1756. combination with a textual filter, which may perform more
  1757. sophisticated processing, e.g. statistical processing or plotting.
  1758. </p>
  1759. <p>Options are used to list some of the formats supported by ffprobe or
  1760. for specifying which information to display, and for setting how
  1761. ffprobe will show it.
  1762. </p>
  1763. <p>ffprobe output is designed to be easily parsable by a textual filter,
  1764. and consists of one or more sections of a form defined by the selected
  1765. writer, which is specified by the <samp>print_format</samp> option.
  1766. </p>
  1767. <p>Sections may contain other nested sections, and are identified by a
  1768. name (which may be shared by other sections), and an unique
  1769. name. See the output of <samp>sections</samp>.
  1770. </p>
  1771. <p>Metadata tags stored in the container or in the streams are recognized
  1772. and printed in the corresponding &quot;FORMAT&quot;, &quot;STREAM&quot; or &quot;PROGRAM_STREAM&quot;
  1773. section.
  1774. </p>
  1775. <a name="Options"></a>
  1776. <h2 class="chapter">3 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options" aria-hidden="true">TOC</a></span></h2>
  1777. <p>All the numerical options, if not specified otherwise, accept a string
  1778. representing a number as input, which may be followed by one of the SI
  1779. unit prefixes, for example: &rsquo;K&rsquo;, &rsquo;M&rsquo;, or &rsquo;G&rsquo;.
  1780. </p>
  1781. <p>If &rsquo;i&rsquo; is appended to the SI unit prefix, the complete prefix will be
  1782. interpreted as a unit prefix for binary multiples, which are based on
  1783. powers of 1024 instead of powers of 1000. Appending &rsquo;B&rsquo; to the SI unit
  1784. prefix multiplies the value by 8. This allows using, for example:
  1785. &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as number suffixes.
  1786. </p>
  1787. <p>Options which do not take arguments are boolean options, and set the
  1788. corresponding value to true. They can be set to false by prefixing
  1789. the option name with &quot;no&quot;. For example using &quot;-nofoo&quot;
  1790. will set the boolean option with name &quot;foo&quot; to false.
  1791. </p>
  1792. <span id="Stream-specifiers"></span><a name="Stream-specifiers-1"></a>
  1793. <h3 class="section">3.1 Stream specifiers<span class="pull-right"><a class="anchor hidden-xs" href="#Stream-specifiers-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Stream-specifiers-1" aria-hidden="true">TOC</a></span></h3>
  1794. <p>Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
  1795. are used to precisely specify which stream(s) a given option belongs to.
  1796. </p>
  1797. <p>A stream specifier is a string generally appended to the option name and
  1798. separated from it by a colon. E.g. <code>-codec:a:1 ac3</code> contains the
  1799. <code>a:1</code> stream specifier, which matches the second audio stream. Therefore, it
  1800. would select the ac3 codec for the second audio stream.
  1801. </p>
  1802. <p>A stream specifier can match several streams, so that the option is applied to all
  1803. of them. E.g. the stream specifier in <code>-b:a 128k</code> matches all audio
  1804. streams.
  1805. </p>
  1806. <p>An empty stream specifier matches all streams. For example, <code>-codec copy</code>
  1807. or <code>-codec: copy</code> would copy all the streams without reencoding.
  1808. </p>
  1809. <p>Possible forms of stream specifiers are:
  1810. </p><dl compact="compact">
  1811. <dt><samp><var>stream_index</var></samp></dt>
  1812. <dd><p>Matches the stream with this index. E.g. <code>-threads:1 4</code> would set the
  1813. thread count for the second stream to 4. If <var>stream_index</var> is used as an
  1814. additional stream specifier (see below), then it selects stream number
  1815. <var>stream_index</var> from the matching streams. Stream numbering is based on the
  1816. order of the streams as detected by libavformat except when a program ID is
  1817. also specified. In this case it is based on the ordering of the streams in the
  1818. program.
  1819. </p></dd>
  1820. <dt><samp><var>stream_type</var>[:<var>additional_stream_specifier</var>]</samp></dt>
  1821. <dd><p><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;
  1822. for subtitle, &rsquo;d&rsquo; for data, and &rsquo;t&rsquo; for attachments. &rsquo;v&rsquo; matches all video
  1823. streams, &rsquo;V&rsquo; only matches video streams which are not attached pictures, video
  1824. thumbnails or cover arts. If <var>additional_stream_specifier</var> is used, then
  1825. it matches streams which both have this type and match the
  1826. <var>additional_stream_specifier</var>. Otherwise, it matches all streams of the
  1827. specified type.
  1828. </p></dd>
  1829. <dt><samp>p:<var>program_id</var>[:<var>additional_stream_specifier</var>]</samp></dt>
  1830. <dd><p>Matches streams which are in the program with the id <var>program_id</var>. If
  1831. <var>additional_stream_specifier</var> is used, then it matches streams which both
  1832. are part of the program and match the <var>additional_stream_specifier</var>.
  1833. </p>
  1834. </dd>
  1835. <dt><samp>#<var>stream_id</var> or i:<var>stream_id</var></samp></dt>
  1836. <dd><p>Match the stream by stream id (e.g. PID in MPEG-TS container).
  1837. </p></dd>
  1838. <dt><samp>m:<var>key</var>[:<var>value</var>]</samp></dt>
  1839. <dd><p>Matches streams with the metadata tag <var>key</var> having the specified value. If
  1840. <var>value</var> is not given, matches streams that contain the given tag with any
  1841. value.
  1842. </p></dd>
  1843. <dt><samp>u</samp></dt>
  1844. <dd><p>Matches streams with usable configuration, the codec must be defined and the
  1845. essential information such as video dimension or audio sample rate must be present.
  1846. </p>
  1847. <p>Note that in <code>ffmpeg</code>, matching by metadata will only work properly for
  1848. input files.
  1849. </p></dd>
  1850. </dl>
  1851. <a name="Generic-options"></a>
  1852. <h3 class="section">3.2 Generic options<span class="pull-right"><a class="anchor hidden-xs" href="#Generic-options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Generic-options" aria-hidden="true">TOC</a></span></h3>
  1853. <p>These options are shared amongst the ff* tools.
  1854. </p>
  1855. <dl compact="compact">
  1856. <dt><samp>-L</samp></dt>
  1857. <dd><p>Show license.
  1858. </p>
  1859. </dd>
  1860. <dt><samp>-h, -?, -help, --help [<var>arg</var>]</samp></dt>
  1861. <dd><p>Show help. An optional parameter may be specified to print help about a specific
  1862. item. If no argument is specified, only basic (non advanced) tool
  1863. options are shown.
  1864. </p>
  1865. <p>Possible values of <var>arg</var> are:
  1866. </p><dl compact="compact">
  1867. <dt><samp>long</samp></dt>
  1868. <dd><p>Print advanced tool options in addition to the basic tool options.
  1869. </p>
  1870. </dd>
  1871. <dt><samp>full</samp></dt>
  1872. <dd><p>Print complete list of options, including shared and private options
  1873. for encoders, decoders, demuxers, muxers, filters, etc.
  1874. </p>
  1875. </dd>
  1876. <dt><samp>decoder=<var>decoder_name</var></samp></dt>
  1877. <dd><p>Print detailed information about the decoder named <var>decoder_name</var>. Use the
  1878. <samp>-decoders</samp> option to get a list of all decoders.
  1879. </p>
  1880. </dd>
  1881. <dt><samp>encoder=<var>encoder_name</var></samp></dt>
  1882. <dd><p>Print detailed information about the encoder named <var>encoder_name</var>. Use the
  1883. <samp>-encoders</samp> option to get a list of all encoders.
  1884. </p>
  1885. </dd>
  1886. <dt><samp>demuxer=<var>demuxer_name</var></samp></dt>
  1887. <dd><p>Print detailed information about the demuxer named <var>demuxer_name</var>. Use the
  1888. <samp>-formats</samp> option to get a list of all demuxers and muxers.
  1889. </p>
  1890. </dd>
  1891. <dt><samp>muxer=<var>muxer_name</var></samp></dt>
  1892. <dd><p>Print detailed information about the muxer named <var>muxer_name</var>. Use the
  1893. <samp>-formats</samp> option to get a list of all muxers and demuxers.
  1894. </p>
  1895. </dd>
  1896. <dt><samp>filter=<var>filter_name</var></samp></dt>
  1897. <dd><p>Print detailed information about the filter named <var>filter_name</var>. Use the
  1898. <samp>-filters</samp> option to get a list of all filters.
  1899. </p>
  1900. </dd>
  1901. <dt><samp>bsf=<var>bitstream_filter_name</var></samp></dt>
  1902. <dd><p>Print detailed information about the bitstream filter named <var>bitstream_filter_name</var>.
  1903. Use the <samp>-bsfs</samp> option to get a list of all bitstream filters.
  1904. </p>
  1905. </dd>
  1906. <dt><samp>protocol=<var>protocol_name</var></samp></dt>
  1907. <dd><p>Print detailed information about the protocol named <var>protocol_name</var>.
  1908. Use the <samp>-protocols</samp> option to get a list of all protocols.
  1909. </p></dd>
  1910. </dl>
  1911. </dd>
  1912. <dt><samp>-version</samp></dt>
  1913. <dd><p>Show version.
  1914. </p>
  1915. </dd>
  1916. <dt><samp>-buildconf</samp></dt>
  1917. <dd><p>Show the build configuration, one option per line.
  1918. </p>
  1919. </dd>
  1920. <dt><samp>-formats</samp></dt>
  1921. <dd><p>Show available formats (including devices).
  1922. </p>
  1923. </dd>
  1924. <dt><samp>-demuxers</samp></dt>
  1925. <dd><p>Show available demuxers.
  1926. </p>
  1927. </dd>
  1928. <dt><samp>-muxers</samp></dt>
  1929. <dd><p>Show available muxers.
  1930. </p>
  1931. </dd>
  1932. <dt><samp>-devices</samp></dt>
  1933. <dd><p>Show available devices.
  1934. </p>
  1935. </dd>
  1936. <dt><samp>-codecs</samp></dt>
  1937. <dd><p>Show all codecs known to libavcodec.
  1938. </p>
  1939. <p>Note that the term &rsquo;codec&rsquo; is used throughout this documentation as a shortcut
  1940. for what is more correctly called a media bitstream format.
  1941. </p>
  1942. </dd>
  1943. <dt><samp>-decoders</samp></dt>
  1944. <dd><p>Show available decoders.
  1945. </p>
  1946. </dd>
  1947. <dt><samp>-encoders</samp></dt>
  1948. <dd><p>Show all available encoders.
  1949. </p>
  1950. </dd>
  1951. <dt><samp>-bsfs</samp></dt>
  1952. <dd><p>Show available bitstream filters.
  1953. </p>
  1954. </dd>
  1955. <dt><samp>-protocols</samp></dt>
  1956. <dd><p>Show available protocols.
  1957. </p>
  1958. </dd>
  1959. <dt><samp>-filters</samp></dt>
  1960. <dd><p>Show available libavfilter filters.
  1961. </p>
  1962. </dd>
  1963. <dt><samp>-pix_fmts</samp></dt>
  1964. <dd><p>Show available pixel formats.
  1965. </p>
  1966. </dd>
  1967. <dt><samp>-sample_fmts</samp></dt>
  1968. <dd><p>Show available sample formats.
  1969. </p>
  1970. </dd>
  1971. <dt><samp>-layouts</samp></dt>
  1972. <dd><p>Show channel names and standard channel layouts.
  1973. </p>
  1974. </dd>
  1975. <dt><samp>-colors</samp></dt>
  1976. <dd><p>Show recognized color names.
  1977. </p>
  1978. </dd>
  1979. <dt><samp>-sources <var>device</var>[,<var>opt1</var>=<var>val1</var>[,<var>opt2</var>=<var>val2</var>]...]</samp></dt>
  1980. <dd><p>Show autodetected sources of the input device.
  1981. Some devices may provide system-dependent source names that cannot be autodetected.
  1982. The returned list cannot be assumed to be always complete.
  1983. </p><div class="example">
  1984. <pre class="example">ffmpeg -sources pulse,server=192.168.0.4
  1985. </pre></div>
  1986. </dd>
  1987. <dt><samp>-sinks <var>device</var>[,<var>opt1</var>=<var>val1</var>[,<var>opt2</var>=<var>val2</var>]...]</samp></dt>
  1988. <dd><p>Show autodetected sinks of the output device.
  1989. Some devices may provide system-dependent sink names that cannot be autodetected.
  1990. The returned list cannot be assumed to be always complete.
  1991. </p><div class="example">
  1992. <pre class="example">ffmpeg -sinks pulse,server=192.168.0.4
  1993. </pre></div>
  1994. </dd>
  1995. <dt><samp>-loglevel [<var>flags</var>+]<var>loglevel</var> | -v [<var>flags</var>+]<var>loglevel</var></samp></dt>
  1996. <dd><p>Set logging level and flags used by the library.
  1997. </p>
  1998. <p>The optional <var>flags</var> prefix can consist of the following values:
  1999. </p><dl compact="compact">
  2000. <dt>&lsquo;<samp>repeat</samp>&rsquo;</dt>
  2001. <dd><p>Indicates that repeated log output should not be compressed to the first line
  2002. and the &quot;Last message repeated n times&quot; line will be omitted.
  2003. </p></dd>
  2004. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  2005. <dd><p>Indicates that log output should add a <code>[level]</code> prefix to each message
  2006. line. This can be used as an alternative to log coloring, e.g. when dumping the
  2007. log to file.
  2008. </p></dd>
  2009. </dl>
  2010. <p>Flags can also be used alone by adding a &rsquo;+&rsquo;/&rsquo;-&rsquo; prefix to set/reset a single
  2011. flag without affecting other <var>flags</var> or changing <var>loglevel</var>. When
  2012. setting both <var>flags</var> and <var>loglevel</var>, a &rsquo;+&rsquo; separator is expected
  2013. between the last <var>flags</var> value and before <var>loglevel</var>.
  2014. </p>
  2015. <p><var>loglevel</var> is a string or a number containing one of the following values:
  2016. </p><dl compact="compact">
  2017. <dt>&lsquo;<samp>quiet, -8</samp>&rsquo;</dt>
  2018. <dd><p>Show nothing at all; be silent.
  2019. </p></dd>
  2020. <dt>&lsquo;<samp>panic, 0</samp>&rsquo;</dt>
  2021. <dd><p>Only show fatal errors which could lead the process to crash, such as
  2022. an assertion failure. This is not currently used for anything.
  2023. </p></dd>
  2024. <dt>&lsquo;<samp>fatal, 8</samp>&rsquo;</dt>
  2025. <dd><p>Only show fatal errors. These are errors after which the process absolutely
  2026. cannot continue.
  2027. </p></dd>
  2028. <dt>&lsquo;<samp>error, 16</samp>&rsquo;</dt>
  2029. <dd><p>Show all errors, including ones which can be recovered from.
  2030. </p></dd>
  2031. <dt>&lsquo;<samp>warning, 24</samp>&rsquo;</dt>
  2032. <dd><p>Show all warnings and errors. Any message related to possibly
  2033. incorrect or unexpected events will be shown.
  2034. </p></dd>
  2035. <dt>&lsquo;<samp>info, 32</samp>&rsquo;</dt>
  2036. <dd><p>Show informative messages during processing. This is in addition to
  2037. warnings and errors. This is the default value.
  2038. </p></dd>
  2039. <dt>&lsquo;<samp>verbose, 40</samp>&rsquo;</dt>
  2040. <dd><p>Same as <code>info</code>, except more verbose.
  2041. </p></dd>
  2042. <dt>&lsquo;<samp>debug, 48</samp>&rsquo;</dt>
  2043. <dd><p>Show everything, including debugging information.
  2044. </p></dd>
  2045. <dt>&lsquo;<samp>trace, 56</samp>&rsquo;</dt>
  2046. </dl>
  2047. <p>For example to enable repeated log output, add the <code>level</code> prefix, and set
  2048. <var>loglevel</var> to <code>verbose</code>:
  2049. </p><div class="example">
  2050. <pre class="example">ffmpeg -loglevel repeat+level+verbose -i input output
  2051. </pre></div>
  2052. <p>Another example that enables repeated log output without affecting current
  2053. state of <code>level</code> prefix flag or <var>loglevel</var>:
  2054. </p><div class="example">
  2055. <pre class="example">ffmpeg [...] -loglevel +repeat
  2056. </pre></div>
  2057. <p>By default the program logs to stderr. If coloring is supported by the
  2058. terminal, colors are used to mark errors and warnings. Log coloring
  2059. can be disabled setting the environment variable
  2060. <code>AV_LOG_FORCE_NOCOLOR</code>, or can be forced setting
  2061. the environment variable <code>AV_LOG_FORCE_COLOR</code>.
  2062. </p>
  2063. </dd>
  2064. <dt><samp>-report</samp></dt>
  2065. <dd><p>Dump full command line and log output to a file named
  2066. <code><var>program</var>-<var>YYYYMMDD</var>-<var>HHMMSS</var>.log</code> in the current
  2067. directory.
  2068. This file can be useful for bug reports.
  2069. It also implies <code>-loglevel debug</code>.
  2070. </p>
  2071. <p>Setting the environment variable <code>FFREPORT</code> to any value has the
  2072. same effect. If the value is a &rsquo;:&rsquo;-separated key=value sequence, these
  2073. options will affect the report; option values must be escaped if they
  2074. contain special characters or the options delimiter &rsquo;:&rsquo; (see the
  2075. &ldquo;Quoting and escaping&rdquo; section in the ffmpeg-utils manual).
  2076. </p>
  2077. <p>The following options are recognized:
  2078. </p><dl compact="compact">
  2079. <dt><samp>file</samp></dt>
  2080. <dd><p>set the file name to use for the report; <code>%p</code> is expanded to the name
  2081. of the program, <code>%t</code> is expanded to a timestamp, <code>%%</code> is expanded
  2082. to a plain <code>%</code>
  2083. </p></dd>
  2084. <dt><samp>level</samp></dt>
  2085. <dd><p>set the log verbosity level using a numerical value (see <code>-loglevel</code>).
  2086. </p></dd>
  2087. </dl>
  2088. <p>For example, to output a report to a file named <samp>ffreport.log</samp>
  2089. using a log level of <code>32</code> (alias for log level <code>info</code>):
  2090. </p>
  2091. <div class="example">
  2092. <pre class="example">FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
  2093. </pre></div>
  2094. <p>Errors in parsing the environment variable are not fatal, and will not
  2095. appear in the report.
  2096. </p>
  2097. </dd>
  2098. <dt><samp>-hide_banner</samp></dt>
  2099. <dd><p>Suppress printing banner.
  2100. </p>
  2101. <p>All FFmpeg tools will normally show a copyright notice, build options
  2102. and library versions. This option can be used to suppress printing
  2103. this information.
  2104. </p>
  2105. </dd>
  2106. <dt><samp>-cpuflags flags (<em>global</em>)</samp></dt>
  2107. <dd><p>Allows setting and clearing cpu flags. This option is intended
  2108. for testing. Do not use it unless you know what you&rsquo;re doing.
  2109. </p><div class="example">
  2110. <pre class="example">ffmpeg -cpuflags -sse+mmx ...
  2111. ffmpeg -cpuflags mmx ...
  2112. ffmpeg -cpuflags 0 ...
  2113. </pre></div>
  2114. <p>Possible flags for this option are:
  2115. </p><dl compact="compact">
  2116. <dt>&lsquo;<samp>x86</samp>&rsquo;</dt>
  2117. <dd><dl compact="compact">
  2118. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  2119. <dt>&lsquo;<samp>mmxext</samp>&rsquo;</dt>
  2120. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  2121. <dt>&lsquo;<samp>sse2</samp>&rsquo;</dt>
  2122. <dt>&lsquo;<samp>sse2slow</samp>&rsquo;</dt>
  2123. <dt>&lsquo;<samp>sse3</samp>&rsquo;</dt>
  2124. <dt>&lsquo;<samp>sse3slow</samp>&rsquo;</dt>
  2125. <dt>&lsquo;<samp>ssse3</samp>&rsquo;</dt>
  2126. <dt>&lsquo;<samp>atom</samp>&rsquo;</dt>
  2127. <dt>&lsquo;<samp>sse4.1</samp>&rsquo;</dt>
  2128. <dt>&lsquo;<samp>sse4.2</samp>&rsquo;</dt>
  2129. <dt>&lsquo;<samp>avx</samp>&rsquo;</dt>
  2130. <dt>&lsquo;<samp>avx2</samp>&rsquo;</dt>
  2131. <dt>&lsquo;<samp>xop</samp>&rsquo;</dt>
  2132. <dt>&lsquo;<samp>fma3</samp>&rsquo;</dt>
  2133. <dt>&lsquo;<samp>fma4</samp>&rsquo;</dt>
  2134. <dt>&lsquo;<samp>3dnow</samp>&rsquo;</dt>
  2135. <dt>&lsquo;<samp>3dnowext</samp>&rsquo;</dt>
  2136. <dt>&lsquo;<samp>bmi1</samp>&rsquo;</dt>
  2137. <dt>&lsquo;<samp>bmi2</samp>&rsquo;</dt>
  2138. <dt>&lsquo;<samp>cmov</samp>&rsquo;</dt>
  2139. </dl>
  2140. </dd>
  2141. <dt>&lsquo;<samp>ARM</samp>&rsquo;</dt>
  2142. <dd><dl compact="compact">
  2143. <dt>&lsquo;<samp>armv5te</samp>&rsquo;</dt>
  2144. <dt>&lsquo;<samp>armv6</samp>&rsquo;</dt>
  2145. <dt>&lsquo;<samp>armv6t2</samp>&rsquo;</dt>
  2146. <dt>&lsquo;<samp>vfp</samp>&rsquo;</dt>
  2147. <dt>&lsquo;<samp>vfpv3</samp>&rsquo;</dt>
  2148. <dt>&lsquo;<samp>neon</samp>&rsquo;</dt>
  2149. <dt>&lsquo;<samp>setend</samp>&rsquo;</dt>
  2150. </dl>
  2151. </dd>
  2152. <dt>&lsquo;<samp>AArch64</samp>&rsquo;</dt>
  2153. <dd><dl compact="compact">
  2154. <dt>&lsquo;<samp>armv8</samp>&rsquo;</dt>
  2155. <dt>&lsquo;<samp>vfp</samp>&rsquo;</dt>
  2156. <dt>&lsquo;<samp>neon</samp>&rsquo;</dt>
  2157. </dl>
  2158. </dd>
  2159. <dt>&lsquo;<samp>PowerPC</samp>&rsquo;</dt>
  2160. <dd><dl compact="compact">
  2161. <dt>&lsquo;<samp>altivec</samp>&rsquo;</dt>
  2162. </dl>
  2163. </dd>
  2164. <dt>&lsquo;<samp>Specific Processors</samp>&rsquo;</dt>
  2165. <dd><dl compact="compact">
  2166. <dt>&lsquo;<samp>pentium2</samp>&rsquo;</dt>
  2167. <dt>&lsquo;<samp>pentium3</samp>&rsquo;</dt>
  2168. <dt>&lsquo;<samp>pentium4</samp>&rsquo;</dt>
  2169. <dt>&lsquo;<samp>k6</samp>&rsquo;</dt>
  2170. <dt>&lsquo;<samp>k62</samp>&rsquo;</dt>
  2171. <dt>&lsquo;<samp>athlon</samp>&rsquo;</dt>
  2172. <dt>&lsquo;<samp>athlonxp</samp>&rsquo;</dt>
  2173. <dt>&lsquo;<samp>k8</samp>&rsquo;</dt>
  2174. </dl>
  2175. </dd>
  2176. </dl>
  2177. </dd>
  2178. <dt><samp>-max_alloc <var>bytes</var></samp></dt>
  2179. <dd><p>Set the maximum size limit for allocating a block on the heap by ffmpeg&rsquo;s
  2180. family of malloc functions. Exercise <strong>extreme caution</strong> when using
  2181. this option. Don&rsquo;t use if you do not understand the full consequence of doing so.
  2182. Default is INT_MAX.
  2183. </p></dd>
  2184. </dl>
  2185. <a name="AVOptions"></a>
  2186. <h3 class="section">3.3 AVOptions<span class="pull-right"><a class="anchor hidden-xs" href="#AVOptions" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-AVOptions" aria-hidden="true">TOC</a></span></h3>
  2187. <p>These options are provided directly by the libavformat, libavdevice and
  2188. libavcodec libraries. To see the list of available AVOptions, use the
  2189. <samp>-help</samp> option. They are separated into two categories:
  2190. </p><dl compact="compact">
  2191. <dt><samp>generic</samp></dt>
  2192. <dd><p>These options can be set for any container, codec or device. Generic options
  2193. are listed under AVFormatContext options for containers/devices and under
  2194. AVCodecContext options for codecs.
  2195. </p></dd>
  2196. <dt><samp>private</samp></dt>
  2197. <dd><p>These options are specific to the given container, device or codec. Private
  2198. options are listed under their corresponding containers/devices/codecs.
  2199. </p></dd>
  2200. </dl>
  2201. <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  2202. an MP3 file, use the <samp>id3v2_version</samp> private option of the MP3
  2203. muxer:
  2204. </p><div class="example">
  2205. <pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
  2206. </pre></div>
  2207. <p>All codec AVOptions are per-stream, and thus a stream specifier
  2208. should be attached to them:
  2209. </p><div class="example">
  2210. <pre class="example">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
  2211. </pre></div>
  2212. <p>In the above example, a multichannel audio stream is mapped twice for output.
  2213. The first instance is encoded with codec ac3 and bitrate 640k.
  2214. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using
  2215. absolute index of the output stream.
  2216. </p>
  2217. <p>Note: the <samp>-nooption</samp> syntax cannot be used for boolean
  2218. AVOptions, use <samp>-option 0</samp>/<samp>-option 1</samp>.
  2219. </p>
  2220. <p>Note: the old undocumented way of specifying per-stream AVOptions by
  2221. prepending v/a/s to the options name is now obsolete and will be
  2222. removed soon.
  2223. </p>
  2224. <a name="Main-options"></a>
  2225. <h3 class="section">3.4 Main options<span class="pull-right"><a class="anchor hidden-xs" href="#Main-options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Main-options" aria-hidden="true">TOC</a></span></h3>
  2226. <dl compact="compact">
  2227. <dt><samp>-f <var>format</var></samp></dt>
  2228. <dd><p>Force format to use.
  2229. </p>
  2230. </dd>
  2231. <dt><samp>-unit</samp></dt>
  2232. <dd><p>Show the unit of the displayed values.
  2233. </p>
  2234. </dd>
  2235. <dt><samp>-prefix</samp></dt>
  2236. <dd><p>Use SI prefixes for the displayed values.
  2237. Unless the &quot;-byte_binary_prefix&quot; option is used all the prefixes
  2238. are decimal.
  2239. </p>
  2240. </dd>
  2241. <dt><samp>-byte_binary_prefix</samp></dt>
  2242. <dd><p>Force the use of binary prefixes for byte values.
  2243. </p>
  2244. </dd>
  2245. <dt><samp>-sexagesimal</samp></dt>
  2246. <dd><p>Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
  2247. </p>
  2248. </dd>
  2249. <dt><samp>-pretty</samp></dt>
  2250. <dd><p>Prettify the format of the displayed values, it corresponds to the
  2251. options &quot;-unit -prefix -byte_binary_prefix -sexagesimal&quot;.
  2252. </p>
  2253. </dd>
  2254. <dt><samp>-of, -print_format <var>writer_name</var>[=<var>writer_options</var>]</samp></dt>
  2255. <dd><p>Set the output printing format.
  2256. </p>
  2257. <p><var>writer_name</var> specifies the name of the writer, and
  2258. <var>writer_options</var> specifies the options to be passed to the writer.
  2259. </p>
  2260. <p>For example for printing the output in JSON format, specify:
  2261. </p><div class="example">
  2262. <pre class="example">-print_format json
  2263. </pre></div>
  2264. <p>For more details on the available output printing formats, see the
  2265. Writers section below.
  2266. </p>
  2267. </dd>
  2268. <dt><samp>-sections</samp></dt>
  2269. <dd><p>Print sections structure and section information, and exit. The output
  2270. is not meant to be parsed by a machine.
  2271. </p>
  2272. </dd>
  2273. <dt><samp>-select_streams <var>stream_specifier</var></samp></dt>
  2274. <dd><p>Select only the streams specified by <var>stream_specifier</var>. This
  2275. option affects only the options related to streams
  2276. (e.g. <code>show_streams</code>, <code>show_packets</code>, etc.).
  2277. </p>
  2278. <p>For example to show only audio streams, you can use the command:
  2279. </p><div class="example">
  2280. <pre class="example">ffprobe -show_streams -select_streams a INPUT
  2281. </pre></div>
  2282. <p>To show only video packets belonging to the video stream with index 1:
  2283. </p><div class="example">
  2284. <pre class="example">ffprobe -show_packets -select_streams v:1 INPUT
  2285. </pre></div>
  2286. </dd>
  2287. <dt><samp>-show_data</samp></dt>
  2288. <dd><p>Show payload data, as a hexadecimal and ASCII dump. Coupled with
  2289. <samp>-show_packets</samp>, it will dump the packets&rsquo; data. Coupled with
  2290. <samp>-show_streams</samp>, it will dump the codec extradata.
  2291. </p>
  2292. <p>The dump is printed as the &quot;data&quot; field. It may contain newlines.
  2293. </p>
  2294. </dd>
  2295. <dt><samp>-show_data_hash <var>algorithm</var></samp></dt>
  2296. <dd><p>Show a hash of payload data, for packets with <samp>-show_packets</samp> and for
  2297. codec extradata with <samp>-show_streams</samp>.
  2298. </p>
  2299. </dd>
  2300. <dt><samp>-show_error</samp></dt>
  2301. <dd><p>Show information about the error found when trying to probe the input.
  2302. </p>
  2303. <p>The error information is printed within a section with name &quot;ERROR&quot;.
  2304. </p>
  2305. </dd>
  2306. <dt><samp>-show_format</samp></dt>
  2307. <dd><p>Show information about the container format of the input multimedia
  2308. stream.
  2309. </p>
  2310. <p>All the container format information is printed within a section with
  2311. name &quot;FORMAT&quot;.
  2312. </p>
  2313. </dd>
  2314. <dt><samp>-show_format_entry <var>name</var></samp></dt>
  2315. <dd><p>Like <samp>-show_format</samp>, but only prints the specified entry of the
  2316. container format information, rather than all. This option may be given more
  2317. than once, then all specified entries will be shown.
  2318. </p>
  2319. <p>This option is deprecated, use <code>show_entries</code> instead.
  2320. </p>
  2321. </dd>
  2322. <dt><samp>-show_entries <var>section_entries</var></samp></dt>
  2323. <dd><p>Set list of entries to show.
  2324. </p>
  2325. <p>Entries are specified according to the following
  2326. syntax. <var>section_entries</var> contains a list of section entries
  2327. separated by <code>:</code>. Each section entry is composed by a section
  2328. name (or unique name), optionally followed by a list of entries local
  2329. to that section, separated by <code>,</code>.
  2330. </p>
  2331. <p>If section name is specified but is followed by no <code>=</code>, all
  2332. entries are printed to output, together with all the contained
  2333. sections. Otherwise only the entries specified in the local section
  2334. entries list are printed. In particular, if <code>=</code> is specified but
  2335. the list of local entries is empty, then no entries will be shown for
  2336. that section.
  2337. </p>
  2338. <p>Note that the order of specification of the local section entries is
  2339. not honored in the output, and the usual display order will be
  2340. retained.
  2341. </p>
  2342. <p>The formal syntax is given by:
  2343. </p><div class="example">
  2344. <pre class="example"><var>LOCAL_SECTION_ENTRIES</var> ::= <var>SECTION_ENTRY_NAME</var>[,<var>LOCAL_SECTION_ENTRIES</var>]
  2345. <var>SECTION_ENTRY</var> ::= <var>SECTION_NAME</var>[=[<var>LOCAL_SECTION_ENTRIES</var>]]
  2346. <var>SECTION_ENTRIES</var> ::= <var>SECTION_ENTRY</var>[:<var>SECTION_ENTRIES</var>]
  2347. </pre></div>
  2348. <p>For example, to show only the index and type of each stream, and the PTS
  2349. time, duration time, and stream index of the packets, you can specify
  2350. the argument:
  2351. </p><div class="example">
  2352. <pre class="example">packet=pts_time,duration_time,stream_index : stream=index,codec_type
  2353. </pre></div>
  2354. <p>To show all the entries in the section &quot;format&quot;, but only the codec
  2355. type in the section &quot;stream&quot;, specify the argument:
  2356. </p><div class="example">
  2357. <pre class="example">format : stream=codec_type
  2358. </pre></div>
  2359. <p>To show all the tags in the stream and format sections:
  2360. </p><div class="example">
  2361. <pre class="example">stream_tags : format_tags
  2362. </pre></div>
  2363. <p>To show only the <code>title</code> tag (if available) in the stream
  2364. sections:
  2365. </p><div class="example">
  2366. <pre class="example">stream_tags=title
  2367. </pre></div>
  2368. </dd>
  2369. <dt><samp>-show_packets</samp></dt>
  2370. <dd><p>Show information about each packet contained in the input multimedia
  2371. stream.
  2372. </p>
  2373. <p>The information for each single packet is printed within a dedicated
  2374. section with name &quot;PACKET&quot;.
  2375. </p>
  2376. </dd>
  2377. <dt><samp>-show_frames</samp></dt>
  2378. <dd><p>Show information about each frame and subtitle contained in the input
  2379. multimedia stream.
  2380. </p>
  2381. <p>The information for each single frame is printed within a dedicated
  2382. section with name &quot;FRAME&quot; or &quot;SUBTITLE&quot;.
  2383. </p>
  2384. </dd>
  2385. <dt><samp>-show_log <var>loglevel</var></samp></dt>
  2386. <dd><p>Show logging information from the decoder about each frame according to
  2387. the value set in <var>loglevel</var>, (see <code>-loglevel</code>). This option requires <code>-show_frames</code>.
  2388. </p>
  2389. <p>The information for each log message is printed within a dedicated
  2390. section with name &quot;LOG&quot;.
  2391. </p>
  2392. </dd>
  2393. <dt><samp>-show_streams</samp></dt>
  2394. <dd><p>Show information about each media stream contained in the input
  2395. multimedia stream.
  2396. </p>
  2397. <p>Each media stream information is printed within a dedicated section
  2398. with name &quot;STREAM&quot;.
  2399. </p>
  2400. </dd>
  2401. <dt><samp>-show_programs</samp></dt>
  2402. <dd><p>Show information about programs and their streams contained in the input
  2403. multimedia stream.
  2404. </p>
  2405. <p>Each media stream information is printed within a dedicated section
  2406. with name &quot;PROGRAM_STREAM&quot;.
  2407. </p>
  2408. </dd>
  2409. <dt><samp>-show_chapters</samp></dt>
  2410. <dd><p>Show information about chapters stored in the format.
  2411. </p>
  2412. <p>Each chapter is printed within a dedicated section with name &quot;CHAPTER&quot;.
  2413. </p>
  2414. </dd>
  2415. <dt><samp>-count_frames</samp></dt>
  2416. <dd><p>Count the number of frames per stream and report it in the
  2417. corresponding stream section.
  2418. </p>
  2419. </dd>
  2420. <dt><samp>-count_packets</samp></dt>
  2421. <dd><p>Count the number of packets per stream and report it in the
  2422. corresponding stream section.
  2423. </p>
  2424. </dd>
  2425. <dt><samp>-read_intervals <var>read_intervals</var></samp></dt>
  2426. <dd>
  2427. <p>Read only the specified intervals. <var>read_intervals</var> must be a
  2428. sequence of interval specifications separated by &quot;,&quot;.
  2429. <code>ffprobe</code> will seek to the interval starting point, and will
  2430. continue reading from that.
  2431. </p>
  2432. <p>Each interval is specified by two optional parts, separated by &quot;%&quot;.
  2433. </p>
  2434. <p>The first part specifies the interval start position. It is
  2435. interpreted as an absolute position, or as a relative offset from the
  2436. current position if it is preceded by the &quot;+&quot; character. If this first
  2437. part is not specified, no seeking will be performed when reading this
  2438. interval.
  2439. </p>
  2440. <p>The second part specifies the interval end position. It is interpreted
  2441. as an absolute position, or as a relative offset from the current
  2442. position if it is preceded by the &quot;+&quot; character. If the offset
  2443. specification starts with &quot;#&quot;, it is interpreted as the number of
  2444. packets to read (not including the flushing packets) from the interval
  2445. start. If no second part is specified, the program will read until the
  2446. end of the input.
  2447. </p>
  2448. <p>Note that seeking is not accurate, thus the actual interval start
  2449. point may be different from the specified position. Also, when an
  2450. interval duration is specified, the absolute end time will be computed
  2451. by adding the duration to the interval start point found by seeking
  2452. the file, rather than to the specified start value.
  2453. </p>
  2454. <p>The formal syntax is given by:
  2455. </p><div class="example">
  2456. <pre class="example"><var>INTERVAL</var> ::= [<var>START</var>|+<var>START_OFFSET</var>][%[<var>END</var>|+<var>END_OFFSET</var>]]
  2457. <var>INTERVALS</var> ::= <var>INTERVAL</var>[,<var>INTERVALS</var>]
  2458. </pre></div>
  2459. <p>A few examples follow.
  2460. </p><ul>
  2461. <li> Seek to time 10, read packets until 20 seconds after the found seek
  2462. point, then seek to position <code>01:30</code> (1 minute and thirty
  2463. seconds) and read packets until position <code>01:45</code>.
  2464. <div class="example">
  2465. <pre class="example">10%+20,01:30%01:45
  2466. </pre></div>
  2467. </li><li> Read only 42 packets after seeking to position <code>01:23</code>:
  2468. <div class="example">
  2469. <pre class="example">01:23%+#42
  2470. </pre></div>
  2471. </li><li> Read only the first 20 seconds from the start:
  2472. <div class="example">
  2473. <pre class="example">%+20
  2474. </pre></div>
  2475. </li><li> Read from the start until position <code>02:30</code>:
  2476. <div class="example">
  2477. <pre class="example">%02:30
  2478. </pre></div>
  2479. </li></ul>
  2480. </dd>
  2481. <dt><samp>-show_private_data, -private</samp></dt>
  2482. <dd><p>Show private data, that is data depending on the format of the
  2483. particular shown element.
  2484. This option is enabled by default, but you may need to disable it
  2485. for specific uses, for example when creating XSD-compliant XML output.
  2486. </p>
  2487. </dd>
  2488. <dt><samp>-show_program_version</samp></dt>
  2489. <dd><p>Show information related to program version.
  2490. </p>
  2491. <p>Version information is printed within a section with name
  2492. &quot;PROGRAM_VERSION&quot;.
  2493. </p>
  2494. </dd>
  2495. <dt><samp>-show_library_versions</samp></dt>
  2496. <dd><p>Show information related to library versions.
  2497. </p>
  2498. <p>Version information for each library is printed within a section with
  2499. name &quot;LIBRARY_VERSION&quot;.
  2500. </p>
  2501. </dd>
  2502. <dt><samp>-show_versions</samp></dt>
  2503. <dd><p>Show information related to program and library versions. This is the
  2504. equivalent of setting both <samp>-show_program_version</samp> and
  2505. <samp>-show_library_versions</samp> options.
  2506. </p>
  2507. </dd>
  2508. <dt><samp>-show_pixel_formats</samp></dt>
  2509. <dd><p>Show information about all pixel formats supported by FFmpeg.
  2510. </p>
  2511. <p>Pixel format information for each format is printed within a section
  2512. with name &quot;PIXEL_FORMAT&quot;.
  2513. </p>
  2514. </dd>
  2515. <dt><samp>-bitexact</samp></dt>
  2516. <dd><p>Force bitexact output, useful to produce output which is not dependent
  2517. on the specific build.
  2518. </p>
  2519. </dd>
  2520. <dt><samp>-i <var>input_url</var></samp></dt>
  2521. <dd><p>Read <var>input_url</var>.
  2522. </p>
  2523. </dd>
  2524. </dl>
  2525. <a name="Writers"></a>
  2526. <h2 class="chapter">4 Writers<span class="pull-right"><a class="anchor hidden-xs" href="#Writers" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Writers" aria-hidden="true">TOC</a></span></h2>
  2527. <p>A writer defines the output format adopted by <code>ffprobe</code>, and will be
  2528. used for printing all the parts of the output.
  2529. </p>
  2530. <p>A writer may accept one or more arguments, which specify the options
  2531. to adopt. The options are specified as a list of <var>key</var>=<var>value</var>
  2532. pairs, separated by &quot;:&quot;.
  2533. </p>
  2534. <p>All writers support the following options:
  2535. </p>
  2536. <dl compact="compact">
  2537. <dt><samp>string_validation, sv</samp></dt>
  2538. <dd><p>Set string validation mode.
  2539. </p>
  2540. <p>The following values are accepted.
  2541. </p><dl compact="compact">
  2542. <dt>&lsquo;<samp>fail</samp>&rsquo;</dt>
  2543. <dd><p>The writer will fail immediately in case an invalid string (UTF-8)
  2544. sequence or code point is found in the input. This is especially
  2545. useful to validate input metadata.
  2546. </p>
  2547. </dd>
  2548. <dt>&lsquo;<samp>ignore</samp>&rsquo;</dt>
  2549. <dd><p>Any validation error will be ignored. This will result in possibly
  2550. broken output, especially with the json or xml writer.
  2551. </p>
  2552. </dd>
  2553. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  2554. <dd><p>The writer will substitute invalid UTF-8 sequences or code points with
  2555. the string specified with the <samp>string_validation_replacement</samp>.
  2556. </p></dd>
  2557. </dl>
  2558. <p>Default value is &lsquo;<samp>replace</samp>&rsquo;.
  2559. </p>
  2560. </dd>
  2561. <dt><samp>string_validation_replacement, svr</samp></dt>
  2562. <dd><p>Set replacement string to use in case <samp>string_validation</samp> is
  2563. set to &lsquo;<samp>replace</samp>&rsquo;.
  2564. </p>
  2565. <p>In case the option is not specified, the writer will assume the empty
  2566. string, that is it will remove the invalid sequences from the input
  2567. strings.
  2568. </p></dd>
  2569. </dl>
  2570. <p>A description of the currently available writers follows.
  2571. </p>
  2572. <a name="default"></a>
  2573. <h3 class="section">4.1 default<span class="pull-right"><a class="anchor hidden-xs" href="#default" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-default" aria-hidden="true">TOC</a></span></h3>
  2574. <p>Default format.
  2575. </p>
  2576. <p>Print each section in the form:
  2577. </p><div class="example">
  2578. <pre class="example">[SECTION]
  2579. key1=val1
  2580. ...
  2581. keyN=valN
  2582. [/SECTION]
  2583. </pre></div>
  2584. <p>Metadata tags are printed as a line in the corresponding FORMAT, STREAM or
  2585. PROGRAM_STREAM section, and are prefixed by the string &quot;TAG:&quot;.
  2586. </p>
  2587. <p>A description of the accepted options follows.
  2588. </p>
  2589. <dl compact="compact">
  2590. <dt><samp>nokey, nk</samp></dt>
  2591. <dd><p>If set to 1 specify not to print the key of each field. Default value
  2592. is 0.
  2593. </p>
  2594. </dd>
  2595. <dt><samp>noprint_wrappers, nw</samp></dt>
  2596. <dd><p>If set to 1 specify not to print the section header and footer.
  2597. Default value is 0.
  2598. </p></dd>
  2599. </dl>
  2600. <a name="compact_002c-csv"></a>
  2601. <h3 class="section">4.2 compact, csv<span class="pull-right"><a class="anchor hidden-xs" href="#compact_002c-csv" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-compact_002c-csv" aria-hidden="true">TOC</a></span></h3>
  2602. <p>Compact and CSV format.
  2603. </p>
  2604. <p>The <code>csv</code> writer is equivalent to <code>compact</code>, but supports
  2605. different defaults.
  2606. </p>
  2607. <p>Each section is printed on a single line.
  2608. If no option is specified, the output has the form:
  2609. </p><div class="example">
  2610. <pre class="example">section|key1=val1| ... |keyN=valN
  2611. </pre></div>
  2612. <p>Metadata tags are printed in the corresponding &quot;format&quot; or &quot;stream&quot;
  2613. section. A metadata tag key, if printed, is prefixed by the string
  2614. &quot;tag:&quot;.
  2615. </p>
  2616. <p>The description of the accepted options follows.
  2617. </p>
  2618. <dl compact="compact">
  2619. <dt><samp>item_sep, s</samp></dt>
  2620. <dd><p>Specify the character to use for separating fields in the output line.
  2621. It must be a single printable character, it is &quot;|&quot; by default (&quot;,&quot; for
  2622. the <code>csv</code> writer).
  2623. </p>
  2624. </dd>
  2625. <dt><samp>nokey, nk</samp></dt>
  2626. <dd><p>If set to 1 specify not to print the key of each field. Its default
  2627. value is 0 (1 for the <code>csv</code> writer).
  2628. </p>
  2629. </dd>
  2630. <dt><samp>escape, e</samp></dt>
  2631. <dd><p>Set the escape mode to use, default to &quot;c&quot; (&quot;csv&quot; for the <code>csv</code>
  2632. writer).
  2633. </p>
  2634. <p>It can assume one of the following values:
  2635. </p><dl compact="compact">
  2636. <dt><samp>c</samp></dt>
  2637. <dd><p>Perform C-like escaping. Strings containing a newline (&lsquo;<samp>\n</samp>&rsquo;), carriage
  2638. return (&lsquo;<samp>\r</samp>&rsquo;), a tab (&lsquo;<samp>\t</samp>&rsquo;), a form feed (&lsquo;<samp>\f</samp>&rsquo;), the escaping
  2639. character (&lsquo;<samp>\</samp>&rsquo;) or the item separator character <var>SEP</var> are escaped
  2640. using C-like fashioned escaping, so that a newline is converted to the
  2641. sequence &lsquo;<samp>\n</samp>&rsquo;, a carriage return to &lsquo;<samp>\r</samp>&rsquo;, &lsquo;<samp>\</samp>&rsquo; to &lsquo;<samp>\\</samp>&rsquo; and
  2642. the separator <var>SEP</var> is converted to &lsquo;<samp>\<var>SEP</var></samp>&rsquo;.
  2643. </p>
  2644. </dd>
  2645. <dt><samp>csv</samp></dt>
  2646. <dd><p>Perform CSV-like escaping, as described in RFC4180. Strings
  2647. containing a newline (&lsquo;<samp>\n</samp>&rsquo;), a carriage return (&lsquo;<samp>\r</samp>&rsquo;), a double quote
  2648. (&lsquo;<samp>&quot;</samp>&rsquo;), or <var>SEP</var> are enclosed in double-quotes.
  2649. </p>
  2650. </dd>
  2651. <dt><samp>none</samp></dt>
  2652. <dd><p>Perform no escaping.
  2653. </p></dd>
  2654. </dl>
  2655. </dd>
  2656. <dt><samp>print_section, p</samp></dt>
  2657. <dd><p>Print the section name at the beginning of each line if the value is
  2658. <code>1</code>, disable it with value set to <code>0</code>. Default value is
  2659. <code>1</code>.
  2660. </p>
  2661. </dd>
  2662. </dl>
  2663. <a name="flat"></a>
  2664. <h3 class="section">4.3 flat<span class="pull-right"><a class="anchor hidden-xs" href="#flat" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-flat" aria-hidden="true">TOC</a></span></h3>
  2665. <p>Flat format.
  2666. </p>
  2667. <p>A free-form output where each line contains an explicit key=value, such as
  2668. &quot;streams.stream.3.tags.foo=bar&quot;. The output is shell escaped, so it can be
  2669. directly embedded in sh scripts as long as the separator character is an
  2670. alphanumeric character or an underscore (see <var>sep_char</var> option).
  2671. </p>
  2672. <p>The description of the accepted options follows.
  2673. </p>
  2674. <dl compact="compact">
  2675. <dt><samp>sep_char, s</samp></dt>
  2676. <dd><p>Separator character used to separate the chapter, the section name, IDs and
  2677. potential tags in the printed field key.
  2678. </p>
  2679. <p>Default value is &lsquo;<samp>.</samp>&rsquo;.
  2680. </p>
  2681. </dd>
  2682. <dt><samp>hierarchical, h</samp></dt>
  2683. <dd><p>Specify if the section name specification should be hierarchical. If
  2684. set to 1, and if there is more than one section in the current
  2685. chapter, the section name will be prefixed by the name of the
  2686. chapter. A value of 0 will disable this behavior.
  2687. </p>
  2688. <p>Default value is 1.
  2689. </p></dd>
  2690. </dl>
  2691. <a name="ini"></a>
  2692. <h3 class="section">4.4 ini<span class="pull-right"><a class="anchor hidden-xs" href="#ini" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ini" aria-hidden="true">TOC</a></span></h3>
  2693. <p>INI format output.
  2694. </p>
  2695. <p>Print output in an INI based format.
  2696. </p>
  2697. <p>The following conventions are adopted:
  2698. </p>
  2699. <ul>
  2700. <li> all key and values are UTF-8
  2701. </li><li> &lsquo;<samp>.</samp>&rsquo; is the subgroup separator
  2702. </li><li> newline, &lsquo;<samp>\t</samp>&rsquo;, &lsquo;<samp>\f</samp>&rsquo;, &lsquo;<samp>\b</samp>&rsquo; and the following characters are
  2703. escaped
  2704. </li><li> &lsquo;<samp>\</samp>&rsquo; is the escape character
  2705. </li><li> &lsquo;<samp>#</samp>&rsquo; is the comment indicator
  2706. </li><li> &lsquo;<samp>=</samp>&rsquo; is the key/value separator
  2707. </li><li> &lsquo;<samp>:</samp>&rsquo; is not used but usually parsed as key/value separator
  2708. </li></ul>
  2709. <p>This writer accepts options as a list of <var>key</var>=<var>value</var> pairs,
  2710. separated by &lsquo;<samp>:</samp>&rsquo;.
  2711. </p>
  2712. <p>The description of the accepted options follows.
  2713. </p>
  2714. <dl compact="compact">
  2715. <dt><samp>hierarchical, h</samp></dt>
  2716. <dd><p>Specify if the section name specification should be hierarchical. If
  2717. set to 1, and if there is more than one section in the current
  2718. chapter, the section name will be prefixed by the name of the
  2719. chapter. A value of 0 will disable this behavior.
  2720. </p>
  2721. <p>Default value is 1.
  2722. </p></dd>
  2723. </dl>
  2724. <a name="json"></a>
  2725. <h3 class="section">4.5 json<span class="pull-right"><a class="anchor hidden-xs" href="#json" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-json" aria-hidden="true">TOC</a></span></h3>
  2726. <p>JSON based format.
  2727. </p>
  2728. <p>Each section is printed using JSON notation.
  2729. </p>
  2730. <p>The description of the accepted options follows.
  2731. </p>
  2732. <dl compact="compact">
  2733. <dt><samp>compact, c</samp></dt>
  2734. <dd><p>If set to 1 enable compact output, that is each section will be
  2735. printed on a single line. Default value is 0.
  2736. </p></dd>
  2737. </dl>
  2738. <p>For more information about JSON, see <a href="http://www.json.org/">http://www.json.org/</a>.
  2739. </p>
  2740. <a name="xml"></a>
  2741. <h3 class="section">4.6 xml<span class="pull-right"><a class="anchor hidden-xs" href="#xml" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xml" aria-hidden="true">TOC</a></span></h3>
  2742. <p>XML based format.
  2743. </p>
  2744. <p>The XML output is described in the XML schema description file
  2745. <samp>ffprobe.xsd</samp> installed in the FFmpeg datadir.
  2746. </p>
  2747. <p>An updated version of the schema can be retrieved at the url
  2748. <a href="http://www.ffmpeg.org/schema/ffprobe.xsd">http://www.ffmpeg.org/schema/ffprobe.xsd</a>, which redirects to the
  2749. latest schema committed into the FFmpeg development source code tree.
  2750. </p>
  2751. <p>Note that the output issued will be compliant to the
  2752. <samp>ffprobe.xsd</samp> schema only when no special global output options
  2753. (<samp>unit</samp>, <samp>prefix</samp>, <samp>byte_binary_prefix</samp>,
  2754. <samp>sexagesimal</samp> etc.) are specified.
  2755. </p>
  2756. <p>The description of the accepted options follows.
  2757. </p>
  2758. <dl compact="compact">
  2759. <dt><samp>fully_qualified, q</samp></dt>
  2760. <dd><p>If set to 1 specify if the output should be fully qualified. Default
  2761. value is 0.
  2762. This is required for generating an XML file which can be validated
  2763. through an XSD file.
  2764. </p>
  2765. </dd>
  2766. <dt><samp>xsd_strict, x</samp></dt>
  2767. <dd><p>If set to 1 perform more checks for ensuring that the output is XSD
  2768. compliant. Default value is 0.
  2769. This option automatically sets <samp>fully_qualified</samp> to 1.
  2770. </p></dd>
  2771. </dl>
  2772. <p>For more information about the XML format, see
  2773. <a href="https://www.w3.org/XML/">https://www.w3.org/XML/</a>.
  2774. </p>
  2775. <a name="Timecode"></a>
  2776. <h2 class="chapter">5 Timecode<span class="pull-right"><a class="anchor hidden-xs" href="#Timecode" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Timecode" aria-hidden="true">TOC</a></span></h2>
  2777. <p><code>ffprobe</code> supports Timecode extraction:
  2778. </p>
  2779. <ul>
  2780. <li> MPEG1/2 timecode is extracted from the GOP, and is available in the video
  2781. stream details (<samp>-show_streams</samp>, see <var>timecode</var>).
  2782. </li><li> MOV timecode is extracted from tmcd track, so is available in the tmcd
  2783. stream metadata (<samp>-show_streams</samp>, see <var>TAG:timecode</var>).
  2784. </li><li> DV, GXF and AVI timecodes are available in format metadata
  2785. (<samp>-show_format</samp>, see <var>TAG:timecode</var>).
  2786. </li></ul>
  2787. <a name="Syntax"></a>
  2788. <h2 class="chapter">6 Syntax<span class="pull-right"><a class="anchor hidden-xs" href="#Syntax" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Syntax" aria-hidden="true">TOC</a></span></h2>
  2789. <p>This section documents the syntax and formats employed by the FFmpeg
  2790. libraries and tools.
  2791. </p>
  2792. <span id="quoting_005fand_005fescaping"></span><a name="Quoting-and-escaping"></a>
  2793. <h3 class="section">6.1 Quoting and escaping<span class="pull-right"><a class="anchor hidden-xs" href="#Quoting-and-escaping" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Quoting-and-escaping" aria-hidden="true">TOC</a></span></h3>
  2794. <p>FFmpeg adopts the following quoting and escaping mechanism, unless
  2795. explicitly specified. The following rules are applied:
  2796. </p>
  2797. <ul>
  2798. <li> &lsquo;<samp>'</samp>&rsquo; and &lsquo;<samp>\</samp>&rsquo; are special characters (respectively used for
  2799. quoting and escaping). In addition to them, there might be other
  2800. special characters depending on the specific syntax where the escaping
  2801. and quoting are employed.
  2802. </li><li> A special character is escaped by prefixing it with a &lsquo;<samp>\</samp>&rsquo;.
  2803. </li><li> All characters enclosed between &lsquo;<samp>''</samp>&rsquo; are included literally in the
  2804. parsed string. The quote character &lsquo;<samp>'</samp>&rsquo; itself cannot be quoted,
  2805. so you may need to close the quote and escape it.
  2806. </li><li> Leading and trailing whitespaces, unless escaped or quoted, are
  2807. removed from the parsed string.
  2808. </li></ul>
  2809. <p>Note that you may need to add a second level of escaping when using
  2810. the command line or a script, which depends on the syntax of the
  2811. adopted shell language.
  2812. </p>
  2813. <p>The function <code>av_get_token</code> defined in
  2814. <samp>libavutil/avstring.h</samp> can be used to parse a token quoted or
  2815. escaped according to the rules defined above.
  2816. </p>
  2817. <p>The tool <samp>tools/ffescape</samp> in the FFmpeg source tree can be used
  2818. to automatically quote or escape a string in a script.
  2819. </p>
  2820. <a name="Examples"></a>
  2821. <h4 class="subsection">6.1.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples" aria-hidden="true">TOC</a></span></h4>
  2822. <ul>
  2823. <li> Escape the string <code>Crime d'Amour</code> containing the <code>'</code> special
  2824. character:
  2825. <div class="example">
  2826. <pre class="example">Crime d\'Amour
  2827. </pre></div>
  2828. </li><li> The string above contains a quote, so the <code>'</code> needs to be escaped
  2829. when quoting it:
  2830. <div class="example">
  2831. <pre class="example">'Crime d'\''Amour'
  2832. </pre></div>
  2833. </li><li> Include leading or trailing whitespaces using quoting:
  2834. <div class="example">
  2835. <pre class="example">' this string starts and ends with whitespaces '
  2836. </pre></div>
  2837. </li><li> Escaping and quoting can be mixed together:
  2838. <div class="example">
  2839. <pre class="example">' The string '\'string\'' is a string '
  2840. </pre></div>
  2841. </li><li> To include a literal &lsquo;<samp>\</samp>&rsquo; you can use either escaping or quoting:
  2842. <div class="example">
  2843. <pre class="example">'c:\foo' can be written as c:\\foo
  2844. </pre></div>
  2845. </li></ul>
  2846. <span id="date-syntax"></span><a name="Date"></a>
  2847. <h3 class="section">6.2 Date<span class="pull-right"><a class="anchor hidden-xs" href="#Date" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Date" aria-hidden="true">TOC</a></span></h3>
  2848. <p>The accepted syntax is:
  2849. </p><div class="example">
  2850. <pre class="example">[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
  2851. now
  2852. </pre></div>
  2853. <p>If the value is &quot;now&quot; it takes the current time.
  2854. </p>
  2855. <p>Time is local time unless Z is appended, in which case it is
  2856. interpreted as UTC.
  2857. If the year-month-day part is not specified it takes the current
  2858. year-month-day.
  2859. </p>
  2860. <span id="time-duration-syntax"></span><a name="Time-duration"></a>
  2861. <h3 class="section">6.3 Time duration<span class="pull-right"><a class="anchor hidden-xs" href="#Time-duration" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Time-duration" aria-hidden="true">TOC</a></span></h3>
  2862. <p>There are two accepted syntaxes for expressing time duration.
  2863. </p>
  2864. <div class="example">
  2865. <pre class="example">[-][<var>HH</var>:]<var>MM</var>:<var>SS</var>[.<var>m</var>...]
  2866. </pre></div>
  2867. <p><var>HH</var> expresses the number of hours, <var>MM</var> the number of minutes
  2868. for a maximum of 2 digits, and <var>SS</var> the number of seconds for a
  2869. maximum of 2 digits. The <var>m</var> at the end expresses decimal value for
  2870. <var>SS</var>.
  2871. </p>
  2872. <p><em>or</em>
  2873. </p>
  2874. <div class="example">
  2875. <pre class="example">[-]<var>S</var>+[.<var>m</var>...][s|ms|us]
  2876. </pre></div>
  2877. <p><var>S</var> expresses the number of seconds, with the optional decimal part
  2878. <var>m</var>. The optional literal suffixes &lsquo;<samp>s</samp>&rsquo;, &lsquo;<samp>ms</samp>&rsquo; or &lsquo;<samp>us</samp>&rsquo;
  2879. indicate to interpret the value as seconds, milliseconds or microseconds,
  2880. respectively.
  2881. </p>
  2882. <p>In both expressions, the optional &lsquo;<samp>-</samp>&rsquo; indicates negative duration.
  2883. </p>
  2884. <a name="Examples-1"></a>
  2885. <h4 class="subsection">6.3.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-1" aria-hidden="true">TOC</a></span></h4>
  2886. <p>The following examples are all valid time duration:
  2887. </p>
  2888. <dl compact="compact">
  2889. <dt>&lsquo;<samp>55</samp>&rsquo;</dt>
  2890. <dd><p>55 seconds
  2891. </p>
  2892. </dd>
  2893. <dt>&lsquo;<samp>0.2</samp>&rsquo;</dt>
  2894. <dd><p>0.2 seconds
  2895. </p>
  2896. </dd>
  2897. <dt>&lsquo;<samp>200ms</samp>&rsquo;</dt>
  2898. <dd><p>200 milliseconds, that&rsquo;s 0.2s
  2899. </p>
  2900. </dd>
  2901. <dt>&lsquo;<samp>200000us</samp>&rsquo;</dt>
  2902. <dd><p>200000 microseconds, that&rsquo;s 0.2s
  2903. </p>
  2904. </dd>
  2905. <dt>&lsquo;<samp>12:03:45</samp>&rsquo;</dt>
  2906. <dd><p>12 hours, 03 minutes and 45 seconds
  2907. </p>
  2908. </dd>
  2909. <dt>&lsquo;<samp>23.189</samp>&rsquo;</dt>
  2910. <dd><p>23.189 seconds
  2911. </p></dd>
  2912. </dl>
  2913. <span id="video-size-syntax"></span><a name="Video-size"></a>
  2914. <h3 class="section">6.4 Video size<span class="pull-right"><a class="anchor hidden-xs" href="#Video-size" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Video-size" aria-hidden="true">TOC</a></span></h3>
  2915. <p>Specify the size of the sourced video, it may be a string of the form
  2916. <var>width</var>x<var>height</var>, or the name of a size abbreviation.
  2917. </p>
  2918. <p>The following abbreviations are recognized:
  2919. </p><dl compact="compact">
  2920. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  2921. <dd><p>720x480
  2922. </p></dd>
  2923. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  2924. <dd><p>720x576
  2925. </p></dd>
  2926. <dt>&lsquo;<samp>qntsc</samp>&rsquo;</dt>
  2927. <dd><p>352x240
  2928. </p></dd>
  2929. <dt>&lsquo;<samp>qpal</samp>&rsquo;</dt>
  2930. <dd><p>352x288
  2931. </p></dd>
  2932. <dt>&lsquo;<samp>sntsc</samp>&rsquo;</dt>
  2933. <dd><p>640x480
  2934. </p></dd>
  2935. <dt>&lsquo;<samp>spal</samp>&rsquo;</dt>
  2936. <dd><p>768x576
  2937. </p></dd>
  2938. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  2939. <dd><p>352x240
  2940. </p></dd>
  2941. <dt>&lsquo;<samp>ntsc-film</samp>&rsquo;</dt>
  2942. <dd><p>352x240
  2943. </p></dd>
  2944. <dt>&lsquo;<samp>sqcif</samp>&rsquo;</dt>
  2945. <dd><p>128x96
  2946. </p></dd>
  2947. <dt>&lsquo;<samp>qcif</samp>&rsquo;</dt>
  2948. <dd><p>176x144
  2949. </p></dd>
  2950. <dt>&lsquo;<samp>cif</samp>&rsquo;</dt>
  2951. <dd><p>352x288
  2952. </p></dd>
  2953. <dt>&lsquo;<samp>4cif</samp>&rsquo;</dt>
  2954. <dd><p>704x576
  2955. </p></dd>
  2956. <dt>&lsquo;<samp>16cif</samp>&rsquo;</dt>
  2957. <dd><p>1408x1152
  2958. </p></dd>
  2959. <dt>&lsquo;<samp>qqvga</samp>&rsquo;</dt>
  2960. <dd><p>160x120
  2961. </p></dd>
  2962. <dt>&lsquo;<samp>qvga</samp>&rsquo;</dt>
  2963. <dd><p>320x240
  2964. </p></dd>
  2965. <dt>&lsquo;<samp>vga</samp>&rsquo;</dt>
  2966. <dd><p>640x480
  2967. </p></dd>
  2968. <dt>&lsquo;<samp>svga</samp>&rsquo;</dt>
  2969. <dd><p>800x600
  2970. </p></dd>
  2971. <dt>&lsquo;<samp>xga</samp>&rsquo;</dt>
  2972. <dd><p>1024x768
  2973. </p></dd>
  2974. <dt>&lsquo;<samp>uxga</samp>&rsquo;</dt>
  2975. <dd><p>1600x1200
  2976. </p></dd>
  2977. <dt>&lsquo;<samp>qxga</samp>&rsquo;</dt>
  2978. <dd><p>2048x1536
  2979. </p></dd>
  2980. <dt>&lsquo;<samp>sxga</samp>&rsquo;</dt>
  2981. <dd><p>1280x1024
  2982. </p></dd>
  2983. <dt>&lsquo;<samp>qsxga</samp>&rsquo;</dt>
  2984. <dd><p>2560x2048
  2985. </p></dd>
  2986. <dt>&lsquo;<samp>hsxga</samp>&rsquo;</dt>
  2987. <dd><p>5120x4096
  2988. </p></dd>
  2989. <dt>&lsquo;<samp>wvga</samp>&rsquo;</dt>
  2990. <dd><p>852x480
  2991. </p></dd>
  2992. <dt>&lsquo;<samp>wxga</samp>&rsquo;</dt>
  2993. <dd><p>1366x768
  2994. </p></dd>
  2995. <dt>&lsquo;<samp>wsxga</samp>&rsquo;</dt>
  2996. <dd><p>1600x1024
  2997. </p></dd>
  2998. <dt>&lsquo;<samp>wuxga</samp>&rsquo;</dt>
  2999. <dd><p>1920x1200
  3000. </p></dd>
  3001. <dt>&lsquo;<samp>woxga</samp>&rsquo;</dt>
  3002. <dd><p>2560x1600
  3003. </p></dd>
  3004. <dt>&lsquo;<samp>wqsxga</samp>&rsquo;</dt>
  3005. <dd><p>3200x2048
  3006. </p></dd>
  3007. <dt>&lsquo;<samp>wquxga</samp>&rsquo;</dt>
  3008. <dd><p>3840x2400
  3009. </p></dd>
  3010. <dt>&lsquo;<samp>whsxga</samp>&rsquo;</dt>
  3011. <dd><p>6400x4096
  3012. </p></dd>
  3013. <dt>&lsquo;<samp>whuxga</samp>&rsquo;</dt>
  3014. <dd><p>7680x4800
  3015. </p></dd>
  3016. <dt>&lsquo;<samp>cga</samp>&rsquo;</dt>
  3017. <dd><p>320x200
  3018. </p></dd>
  3019. <dt>&lsquo;<samp>ega</samp>&rsquo;</dt>
  3020. <dd><p>640x350
  3021. </p></dd>
  3022. <dt>&lsquo;<samp>hd480</samp>&rsquo;</dt>
  3023. <dd><p>852x480
  3024. </p></dd>
  3025. <dt>&lsquo;<samp>hd720</samp>&rsquo;</dt>
  3026. <dd><p>1280x720
  3027. </p></dd>
  3028. <dt>&lsquo;<samp>hd1080</samp>&rsquo;</dt>
  3029. <dd><p>1920x1080
  3030. </p></dd>
  3031. <dt>&lsquo;<samp>2k</samp>&rsquo;</dt>
  3032. <dd><p>2048x1080
  3033. </p></dd>
  3034. <dt>&lsquo;<samp>2kflat</samp>&rsquo;</dt>
  3035. <dd><p>1998x1080
  3036. </p></dd>
  3037. <dt>&lsquo;<samp>2kscope</samp>&rsquo;</dt>
  3038. <dd><p>2048x858
  3039. </p></dd>
  3040. <dt>&lsquo;<samp>4k</samp>&rsquo;</dt>
  3041. <dd><p>4096x2160
  3042. </p></dd>
  3043. <dt>&lsquo;<samp>4kflat</samp>&rsquo;</dt>
  3044. <dd><p>3996x2160
  3045. </p></dd>
  3046. <dt>&lsquo;<samp>4kscope</samp>&rsquo;</dt>
  3047. <dd><p>4096x1716
  3048. </p></dd>
  3049. <dt>&lsquo;<samp>nhd</samp>&rsquo;</dt>
  3050. <dd><p>640x360
  3051. </p></dd>
  3052. <dt>&lsquo;<samp>hqvga</samp>&rsquo;</dt>
  3053. <dd><p>240x160
  3054. </p></dd>
  3055. <dt>&lsquo;<samp>wqvga</samp>&rsquo;</dt>
  3056. <dd><p>400x240
  3057. </p></dd>
  3058. <dt>&lsquo;<samp>fwqvga</samp>&rsquo;</dt>
  3059. <dd><p>432x240
  3060. </p></dd>
  3061. <dt>&lsquo;<samp>hvga</samp>&rsquo;</dt>
  3062. <dd><p>480x320
  3063. </p></dd>
  3064. <dt>&lsquo;<samp>qhd</samp>&rsquo;</dt>
  3065. <dd><p>960x540
  3066. </p></dd>
  3067. <dt>&lsquo;<samp>2kdci</samp>&rsquo;</dt>
  3068. <dd><p>2048x1080
  3069. </p></dd>
  3070. <dt>&lsquo;<samp>4kdci</samp>&rsquo;</dt>
  3071. <dd><p>4096x2160
  3072. </p></dd>
  3073. <dt>&lsquo;<samp>uhd2160</samp>&rsquo;</dt>
  3074. <dd><p>3840x2160
  3075. </p></dd>
  3076. <dt>&lsquo;<samp>uhd4320</samp>&rsquo;</dt>
  3077. <dd><p>7680x4320
  3078. </p></dd>
  3079. </dl>
  3080. <span id="video-rate-syntax"></span><a name="Video-rate"></a>
  3081. <h3 class="section">6.5 Video rate<span class="pull-right"><a class="anchor hidden-xs" href="#Video-rate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Video-rate" aria-hidden="true">TOC</a></span></h3>
  3082. <p>Specify the frame rate of a video, expressed as the number of frames
  3083. generated per second. It has to be a string in the format
  3084. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
  3085. number or a valid video frame rate abbreviation.
  3086. </p>
  3087. <p>The following abbreviations are recognized:
  3088. </p><dl compact="compact">
  3089. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  3090. <dd><p>30000/1001
  3091. </p></dd>
  3092. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  3093. <dd><p>25/1
  3094. </p></dd>
  3095. <dt>&lsquo;<samp>qntsc</samp>&rsquo;</dt>
  3096. <dd><p>30000/1001
  3097. </p></dd>
  3098. <dt>&lsquo;<samp>qpal</samp>&rsquo;</dt>
  3099. <dd><p>25/1
  3100. </p></dd>
  3101. <dt>&lsquo;<samp>sntsc</samp>&rsquo;</dt>
  3102. <dd><p>30000/1001
  3103. </p></dd>
  3104. <dt>&lsquo;<samp>spal</samp>&rsquo;</dt>
  3105. <dd><p>25/1
  3106. </p></dd>
  3107. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  3108. <dd><p>24/1
  3109. </p></dd>
  3110. <dt>&lsquo;<samp>ntsc-film</samp>&rsquo;</dt>
  3111. <dd><p>24000/1001
  3112. </p></dd>
  3113. </dl>
  3114. <span id="ratio-syntax"></span><a name="Ratio"></a>
  3115. <h3 class="section">6.6 Ratio<span class="pull-right"><a class="anchor hidden-xs" href="#Ratio" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Ratio" aria-hidden="true">TOC</a></span></h3>
  3116. <p>A ratio can be expressed as an expression, or in the form
  3117. <var>numerator</var>:<var>denominator</var>.
  3118. </p>
  3119. <p>Note that a ratio with infinite (1/0) or negative value is
  3120. considered valid, so you should check on the returned value if you
  3121. want to exclude those values.
  3122. </p>
  3123. <p>The undefined value can be expressed using the &quot;0:0&quot; string.
  3124. </p>
  3125. <span id="color-syntax"></span><a name="Color"></a>
  3126. <h3 class="section">6.7 Color<span class="pull-right"><a class="anchor hidden-xs" href="#Color" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Color" aria-hidden="true">TOC</a></span></h3>
  3127. <p>It can be the name of a color as defined below (case insensitive match) or a
  3128. <code>[0x|#]RRGGBB[AA]</code> sequence, possibly followed by @ and a string
  3129. representing the alpha component.
  3130. </p>
  3131. <p>The alpha component may be a string composed by &quot;0x&quot; followed by an
  3132. hexadecimal number or a decimal number between 0.0 and 1.0, which
  3133. represents the opacity value (&lsquo;<samp>0x00</samp>&rsquo; or &lsquo;<samp>0.0</samp>&rsquo; means completely
  3134. transparent, &lsquo;<samp>0xff</samp>&rsquo; or &lsquo;<samp>1.0</samp>&rsquo; completely opaque). If the alpha
  3135. component is not specified then &lsquo;<samp>0xff</samp>&rsquo; is assumed.
  3136. </p>
  3137. <p>The string &lsquo;<samp>random</samp>&rsquo; will result in a random color.
  3138. </p>
  3139. <p>The following names of colors are recognized:
  3140. </p><dl compact="compact">
  3141. <dt>&lsquo;<samp>AliceBlue</samp>&rsquo;</dt>
  3142. <dd><p>0xF0F8FF
  3143. </p></dd>
  3144. <dt>&lsquo;<samp>AntiqueWhite</samp>&rsquo;</dt>
  3145. <dd><p>0xFAEBD7
  3146. </p></dd>
  3147. <dt>&lsquo;<samp>Aqua</samp>&rsquo;</dt>
  3148. <dd><p>0x00FFFF
  3149. </p></dd>
  3150. <dt>&lsquo;<samp>Aquamarine</samp>&rsquo;</dt>
  3151. <dd><p>0x7FFFD4
  3152. </p></dd>
  3153. <dt>&lsquo;<samp>Azure</samp>&rsquo;</dt>
  3154. <dd><p>0xF0FFFF
  3155. </p></dd>
  3156. <dt>&lsquo;<samp>Beige</samp>&rsquo;</dt>
  3157. <dd><p>0xF5F5DC
  3158. </p></dd>
  3159. <dt>&lsquo;<samp>Bisque</samp>&rsquo;</dt>
  3160. <dd><p>0xFFE4C4
  3161. </p></dd>
  3162. <dt>&lsquo;<samp>Black</samp>&rsquo;</dt>
  3163. <dd><p>0x000000
  3164. </p></dd>
  3165. <dt>&lsquo;<samp>BlanchedAlmond</samp>&rsquo;</dt>
  3166. <dd><p>0xFFEBCD
  3167. </p></dd>
  3168. <dt>&lsquo;<samp>Blue</samp>&rsquo;</dt>
  3169. <dd><p>0x0000FF
  3170. </p></dd>
  3171. <dt>&lsquo;<samp>BlueViolet</samp>&rsquo;</dt>
  3172. <dd><p>0x8A2BE2
  3173. </p></dd>
  3174. <dt>&lsquo;<samp>Brown</samp>&rsquo;</dt>
  3175. <dd><p>0xA52A2A
  3176. </p></dd>
  3177. <dt>&lsquo;<samp>BurlyWood</samp>&rsquo;</dt>
  3178. <dd><p>0xDEB887
  3179. </p></dd>
  3180. <dt>&lsquo;<samp>CadetBlue</samp>&rsquo;</dt>
  3181. <dd><p>0x5F9EA0
  3182. </p></dd>
  3183. <dt>&lsquo;<samp>Chartreuse</samp>&rsquo;</dt>
  3184. <dd><p>0x7FFF00
  3185. </p></dd>
  3186. <dt>&lsquo;<samp>Chocolate</samp>&rsquo;</dt>
  3187. <dd><p>0xD2691E
  3188. </p></dd>
  3189. <dt>&lsquo;<samp>Coral</samp>&rsquo;</dt>
  3190. <dd><p>0xFF7F50
  3191. </p></dd>
  3192. <dt>&lsquo;<samp>CornflowerBlue</samp>&rsquo;</dt>
  3193. <dd><p>0x6495ED
  3194. </p></dd>
  3195. <dt>&lsquo;<samp>Cornsilk</samp>&rsquo;</dt>
  3196. <dd><p>0xFFF8DC
  3197. </p></dd>
  3198. <dt>&lsquo;<samp>Crimson</samp>&rsquo;</dt>
  3199. <dd><p>0xDC143C
  3200. </p></dd>
  3201. <dt>&lsquo;<samp>Cyan</samp>&rsquo;</dt>
  3202. <dd><p>0x00FFFF
  3203. </p></dd>
  3204. <dt>&lsquo;<samp>DarkBlue</samp>&rsquo;</dt>
  3205. <dd><p>0x00008B
  3206. </p></dd>
  3207. <dt>&lsquo;<samp>DarkCyan</samp>&rsquo;</dt>
  3208. <dd><p>0x008B8B
  3209. </p></dd>
  3210. <dt>&lsquo;<samp>DarkGoldenRod</samp>&rsquo;</dt>
  3211. <dd><p>0xB8860B
  3212. </p></dd>
  3213. <dt>&lsquo;<samp>DarkGray</samp>&rsquo;</dt>
  3214. <dd><p>0xA9A9A9
  3215. </p></dd>
  3216. <dt>&lsquo;<samp>DarkGreen</samp>&rsquo;</dt>
  3217. <dd><p>0x006400
  3218. </p></dd>
  3219. <dt>&lsquo;<samp>DarkKhaki</samp>&rsquo;</dt>
  3220. <dd><p>0xBDB76B
  3221. </p></dd>
  3222. <dt>&lsquo;<samp>DarkMagenta</samp>&rsquo;</dt>
  3223. <dd><p>0x8B008B
  3224. </p></dd>
  3225. <dt>&lsquo;<samp>DarkOliveGreen</samp>&rsquo;</dt>
  3226. <dd><p>0x556B2F
  3227. </p></dd>
  3228. <dt>&lsquo;<samp>Darkorange</samp>&rsquo;</dt>
  3229. <dd><p>0xFF8C00
  3230. </p></dd>
  3231. <dt>&lsquo;<samp>DarkOrchid</samp>&rsquo;</dt>
  3232. <dd><p>0x9932CC
  3233. </p></dd>
  3234. <dt>&lsquo;<samp>DarkRed</samp>&rsquo;</dt>
  3235. <dd><p>0x8B0000
  3236. </p></dd>
  3237. <dt>&lsquo;<samp>DarkSalmon</samp>&rsquo;</dt>
  3238. <dd><p>0xE9967A
  3239. </p></dd>
  3240. <dt>&lsquo;<samp>DarkSeaGreen</samp>&rsquo;</dt>
  3241. <dd><p>0x8FBC8F
  3242. </p></dd>
  3243. <dt>&lsquo;<samp>DarkSlateBlue</samp>&rsquo;</dt>
  3244. <dd><p>0x483D8B
  3245. </p></dd>
  3246. <dt>&lsquo;<samp>DarkSlateGray</samp>&rsquo;</dt>
  3247. <dd><p>0x2F4F4F
  3248. </p></dd>
  3249. <dt>&lsquo;<samp>DarkTurquoise</samp>&rsquo;</dt>
  3250. <dd><p>0x00CED1
  3251. </p></dd>
  3252. <dt>&lsquo;<samp>DarkViolet</samp>&rsquo;</dt>
  3253. <dd><p>0x9400D3
  3254. </p></dd>
  3255. <dt>&lsquo;<samp>DeepPink</samp>&rsquo;</dt>
  3256. <dd><p>0xFF1493
  3257. </p></dd>
  3258. <dt>&lsquo;<samp>DeepSkyBlue</samp>&rsquo;</dt>
  3259. <dd><p>0x00BFFF
  3260. </p></dd>
  3261. <dt>&lsquo;<samp>DimGray</samp>&rsquo;</dt>
  3262. <dd><p>0x696969
  3263. </p></dd>
  3264. <dt>&lsquo;<samp>DodgerBlue</samp>&rsquo;</dt>
  3265. <dd><p>0x1E90FF
  3266. </p></dd>
  3267. <dt>&lsquo;<samp>FireBrick</samp>&rsquo;</dt>
  3268. <dd><p>0xB22222
  3269. </p></dd>
  3270. <dt>&lsquo;<samp>FloralWhite</samp>&rsquo;</dt>
  3271. <dd><p>0xFFFAF0
  3272. </p></dd>
  3273. <dt>&lsquo;<samp>ForestGreen</samp>&rsquo;</dt>
  3274. <dd><p>0x228B22
  3275. </p></dd>
  3276. <dt>&lsquo;<samp>Fuchsia</samp>&rsquo;</dt>
  3277. <dd><p>0xFF00FF
  3278. </p></dd>
  3279. <dt>&lsquo;<samp>Gainsboro</samp>&rsquo;</dt>
  3280. <dd><p>0xDCDCDC
  3281. </p></dd>
  3282. <dt>&lsquo;<samp>GhostWhite</samp>&rsquo;</dt>
  3283. <dd><p>0xF8F8FF
  3284. </p></dd>
  3285. <dt>&lsquo;<samp>Gold</samp>&rsquo;</dt>
  3286. <dd><p>0xFFD700
  3287. </p></dd>
  3288. <dt>&lsquo;<samp>GoldenRod</samp>&rsquo;</dt>
  3289. <dd><p>0xDAA520
  3290. </p></dd>
  3291. <dt>&lsquo;<samp>Gray</samp>&rsquo;</dt>
  3292. <dd><p>0x808080
  3293. </p></dd>
  3294. <dt>&lsquo;<samp>Green</samp>&rsquo;</dt>
  3295. <dd><p>0x008000
  3296. </p></dd>
  3297. <dt>&lsquo;<samp>GreenYellow</samp>&rsquo;</dt>
  3298. <dd><p>0xADFF2F
  3299. </p></dd>
  3300. <dt>&lsquo;<samp>HoneyDew</samp>&rsquo;</dt>
  3301. <dd><p>0xF0FFF0
  3302. </p></dd>
  3303. <dt>&lsquo;<samp>HotPink</samp>&rsquo;</dt>
  3304. <dd><p>0xFF69B4
  3305. </p></dd>
  3306. <dt>&lsquo;<samp>IndianRed</samp>&rsquo;</dt>
  3307. <dd><p>0xCD5C5C
  3308. </p></dd>
  3309. <dt>&lsquo;<samp>Indigo</samp>&rsquo;</dt>
  3310. <dd><p>0x4B0082
  3311. </p></dd>
  3312. <dt>&lsquo;<samp>Ivory</samp>&rsquo;</dt>
  3313. <dd><p>0xFFFFF0
  3314. </p></dd>
  3315. <dt>&lsquo;<samp>Khaki</samp>&rsquo;</dt>
  3316. <dd><p>0xF0E68C
  3317. </p></dd>
  3318. <dt>&lsquo;<samp>Lavender</samp>&rsquo;</dt>
  3319. <dd><p>0xE6E6FA
  3320. </p></dd>
  3321. <dt>&lsquo;<samp>LavenderBlush</samp>&rsquo;</dt>
  3322. <dd><p>0xFFF0F5
  3323. </p></dd>
  3324. <dt>&lsquo;<samp>LawnGreen</samp>&rsquo;</dt>
  3325. <dd><p>0x7CFC00
  3326. </p></dd>
  3327. <dt>&lsquo;<samp>LemonChiffon</samp>&rsquo;</dt>
  3328. <dd><p>0xFFFACD
  3329. </p></dd>
  3330. <dt>&lsquo;<samp>LightBlue</samp>&rsquo;</dt>
  3331. <dd><p>0xADD8E6
  3332. </p></dd>
  3333. <dt>&lsquo;<samp>LightCoral</samp>&rsquo;</dt>
  3334. <dd><p>0xF08080
  3335. </p></dd>
  3336. <dt>&lsquo;<samp>LightCyan</samp>&rsquo;</dt>
  3337. <dd><p>0xE0FFFF
  3338. </p></dd>
  3339. <dt>&lsquo;<samp>LightGoldenRodYellow</samp>&rsquo;</dt>
  3340. <dd><p>0xFAFAD2
  3341. </p></dd>
  3342. <dt>&lsquo;<samp>LightGreen</samp>&rsquo;</dt>
  3343. <dd><p>0x90EE90
  3344. </p></dd>
  3345. <dt>&lsquo;<samp>LightGrey</samp>&rsquo;</dt>
  3346. <dd><p>0xD3D3D3
  3347. </p></dd>
  3348. <dt>&lsquo;<samp>LightPink</samp>&rsquo;</dt>
  3349. <dd><p>0xFFB6C1
  3350. </p></dd>
  3351. <dt>&lsquo;<samp>LightSalmon</samp>&rsquo;</dt>
  3352. <dd><p>0xFFA07A
  3353. </p></dd>
  3354. <dt>&lsquo;<samp>LightSeaGreen</samp>&rsquo;</dt>
  3355. <dd><p>0x20B2AA
  3356. </p></dd>
  3357. <dt>&lsquo;<samp>LightSkyBlue</samp>&rsquo;</dt>
  3358. <dd><p>0x87CEFA
  3359. </p></dd>
  3360. <dt>&lsquo;<samp>LightSlateGray</samp>&rsquo;</dt>
  3361. <dd><p>0x778899
  3362. </p></dd>
  3363. <dt>&lsquo;<samp>LightSteelBlue</samp>&rsquo;</dt>
  3364. <dd><p>0xB0C4DE
  3365. </p></dd>
  3366. <dt>&lsquo;<samp>LightYellow</samp>&rsquo;</dt>
  3367. <dd><p>0xFFFFE0
  3368. </p></dd>
  3369. <dt>&lsquo;<samp>Lime</samp>&rsquo;</dt>
  3370. <dd><p>0x00FF00
  3371. </p></dd>
  3372. <dt>&lsquo;<samp>LimeGreen</samp>&rsquo;</dt>
  3373. <dd><p>0x32CD32
  3374. </p></dd>
  3375. <dt>&lsquo;<samp>Linen</samp>&rsquo;</dt>
  3376. <dd><p>0xFAF0E6
  3377. </p></dd>
  3378. <dt>&lsquo;<samp>Magenta</samp>&rsquo;</dt>
  3379. <dd><p>0xFF00FF
  3380. </p></dd>
  3381. <dt>&lsquo;<samp>Maroon</samp>&rsquo;</dt>
  3382. <dd><p>0x800000
  3383. </p></dd>
  3384. <dt>&lsquo;<samp>MediumAquaMarine</samp>&rsquo;</dt>
  3385. <dd><p>0x66CDAA
  3386. </p></dd>
  3387. <dt>&lsquo;<samp>MediumBlue</samp>&rsquo;</dt>
  3388. <dd><p>0x0000CD
  3389. </p></dd>
  3390. <dt>&lsquo;<samp>MediumOrchid</samp>&rsquo;</dt>
  3391. <dd><p>0xBA55D3
  3392. </p></dd>
  3393. <dt>&lsquo;<samp>MediumPurple</samp>&rsquo;</dt>
  3394. <dd><p>0x9370D8
  3395. </p></dd>
  3396. <dt>&lsquo;<samp>MediumSeaGreen</samp>&rsquo;</dt>
  3397. <dd><p>0x3CB371
  3398. </p></dd>
  3399. <dt>&lsquo;<samp>MediumSlateBlue</samp>&rsquo;</dt>
  3400. <dd><p>0x7B68EE
  3401. </p></dd>
  3402. <dt>&lsquo;<samp>MediumSpringGreen</samp>&rsquo;</dt>
  3403. <dd><p>0x00FA9A
  3404. </p></dd>
  3405. <dt>&lsquo;<samp>MediumTurquoise</samp>&rsquo;</dt>
  3406. <dd><p>0x48D1CC
  3407. </p></dd>
  3408. <dt>&lsquo;<samp>MediumVioletRed</samp>&rsquo;</dt>
  3409. <dd><p>0xC71585
  3410. </p></dd>
  3411. <dt>&lsquo;<samp>MidnightBlue</samp>&rsquo;</dt>
  3412. <dd><p>0x191970
  3413. </p></dd>
  3414. <dt>&lsquo;<samp>MintCream</samp>&rsquo;</dt>
  3415. <dd><p>0xF5FFFA
  3416. </p></dd>
  3417. <dt>&lsquo;<samp>MistyRose</samp>&rsquo;</dt>
  3418. <dd><p>0xFFE4E1
  3419. </p></dd>
  3420. <dt>&lsquo;<samp>Moccasin</samp>&rsquo;</dt>
  3421. <dd><p>0xFFE4B5
  3422. </p></dd>
  3423. <dt>&lsquo;<samp>NavajoWhite</samp>&rsquo;</dt>
  3424. <dd><p>0xFFDEAD
  3425. </p></dd>
  3426. <dt>&lsquo;<samp>Navy</samp>&rsquo;</dt>
  3427. <dd><p>0x000080
  3428. </p></dd>
  3429. <dt>&lsquo;<samp>OldLace</samp>&rsquo;</dt>
  3430. <dd><p>0xFDF5E6
  3431. </p></dd>
  3432. <dt>&lsquo;<samp>Olive</samp>&rsquo;</dt>
  3433. <dd><p>0x808000
  3434. </p></dd>
  3435. <dt>&lsquo;<samp>OliveDrab</samp>&rsquo;</dt>
  3436. <dd><p>0x6B8E23
  3437. </p></dd>
  3438. <dt>&lsquo;<samp>Orange</samp>&rsquo;</dt>
  3439. <dd><p>0xFFA500
  3440. </p></dd>
  3441. <dt>&lsquo;<samp>OrangeRed</samp>&rsquo;</dt>
  3442. <dd><p>0xFF4500
  3443. </p></dd>
  3444. <dt>&lsquo;<samp>Orchid</samp>&rsquo;</dt>
  3445. <dd><p>0xDA70D6
  3446. </p></dd>
  3447. <dt>&lsquo;<samp>PaleGoldenRod</samp>&rsquo;</dt>
  3448. <dd><p>0xEEE8AA
  3449. </p></dd>
  3450. <dt>&lsquo;<samp>PaleGreen</samp>&rsquo;</dt>
  3451. <dd><p>0x98FB98
  3452. </p></dd>
  3453. <dt>&lsquo;<samp>PaleTurquoise</samp>&rsquo;</dt>
  3454. <dd><p>0xAFEEEE
  3455. </p></dd>
  3456. <dt>&lsquo;<samp>PaleVioletRed</samp>&rsquo;</dt>
  3457. <dd><p>0xD87093
  3458. </p></dd>
  3459. <dt>&lsquo;<samp>PapayaWhip</samp>&rsquo;</dt>
  3460. <dd><p>0xFFEFD5
  3461. </p></dd>
  3462. <dt>&lsquo;<samp>PeachPuff</samp>&rsquo;</dt>
  3463. <dd><p>0xFFDAB9
  3464. </p></dd>
  3465. <dt>&lsquo;<samp>Peru</samp>&rsquo;</dt>
  3466. <dd><p>0xCD853F
  3467. </p></dd>
  3468. <dt>&lsquo;<samp>Pink</samp>&rsquo;</dt>
  3469. <dd><p>0xFFC0CB
  3470. </p></dd>
  3471. <dt>&lsquo;<samp>Plum</samp>&rsquo;</dt>
  3472. <dd><p>0xDDA0DD
  3473. </p></dd>
  3474. <dt>&lsquo;<samp>PowderBlue</samp>&rsquo;</dt>
  3475. <dd><p>0xB0E0E6
  3476. </p></dd>
  3477. <dt>&lsquo;<samp>Purple</samp>&rsquo;</dt>
  3478. <dd><p>0x800080
  3479. </p></dd>
  3480. <dt>&lsquo;<samp>Red</samp>&rsquo;</dt>
  3481. <dd><p>0xFF0000
  3482. </p></dd>
  3483. <dt>&lsquo;<samp>RosyBrown</samp>&rsquo;</dt>
  3484. <dd><p>0xBC8F8F
  3485. </p></dd>
  3486. <dt>&lsquo;<samp>RoyalBlue</samp>&rsquo;</dt>
  3487. <dd><p>0x4169E1
  3488. </p></dd>
  3489. <dt>&lsquo;<samp>SaddleBrown</samp>&rsquo;</dt>
  3490. <dd><p>0x8B4513
  3491. </p></dd>
  3492. <dt>&lsquo;<samp>Salmon</samp>&rsquo;</dt>
  3493. <dd><p>0xFA8072
  3494. </p></dd>
  3495. <dt>&lsquo;<samp>SandyBrown</samp>&rsquo;</dt>
  3496. <dd><p>0xF4A460
  3497. </p></dd>
  3498. <dt>&lsquo;<samp>SeaGreen</samp>&rsquo;</dt>
  3499. <dd><p>0x2E8B57
  3500. </p></dd>
  3501. <dt>&lsquo;<samp>SeaShell</samp>&rsquo;</dt>
  3502. <dd><p>0xFFF5EE
  3503. </p></dd>
  3504. <dt>&lsquo;<samp>Sienna</samp>&rsquo;</dt>
  3505. <dd><p>0xA0522D
  3506. </p></dd>
  3507. <dt>&lsquo;<samp>Silver</samp>&rsquo;</dt>
  3508. <dd><p>0xC0C0C0
  3509. </p></dd>
  3510. <dt>&lsquo;<samp>SkyBlue</samp>&rsquo;</dt>
  3511. <dd><p>0x87CEEB
  3512. </p></dd>
  3513. <dt>&lsquo;<samp>SlateBlue</samp>&rsquo;</dt>
  3514. <dd><p>0x6A5ACD
  3515. </p></dd>
  3516. <dt>&lsquo;<samp>SlateGray</samp>&rsquo;</dt>
  3517. <dd><p>0x708090
  3518. </p></dd>
  3519. <dt>&lsquo;<samp>Snow</samp>&rsquo;</dt>
  3520. <dd><p>0xFFFAFA
  3521. </p></dd>
  3522. <dt>&lsquo;<samp>SpringGreen</samp>&rsquo;</dt>
  3523. <dd><p>0x00FF7F
  3524. </p></dd>
  3525. <dt>&lsquo;<samp>SteelBlue</samp>&rsquo;</dt>
  3526. <dd><p>0x4682B4
  3527. </p></dd>
  3528. <dt>&lsquo;<samp>Tan</samp>&rsquo;</dt>
  3529. <dd><p>0xD2B48C
  3530. </p></dd>
  3531. <dt>&lsquo;<samp>Teal</samp>&rsquo;</dt>
  3532. <dd><p>0x008080
  3533. </p></dd>
  3534. <dt>&lsquo;<samp>Thistle</samp>&rsquo;</dt>
  3535. <dd><p>0xD8BFD8
  3536. </p></dd>
  3537. <dt>&lsquo;<samp>Tomato</samp>&rsquo;</dt>
  3538. <dd><p>0xFF6347
  3539. </p></dd>
  3540. <dt>&lsquo;<samp>Turquoise</samp>&rsquo;</dt>
  3541. <dd><p>0x40E0D0
  3542. </p></dd>
  3543. <dt>&lsquo;<samp>Violet</samp>&rsquo;</dt>
  3544. <dd><p>0xEE82EE
  3545. </p></dd>
  3546. <dt>&lsquo;<samp>Wheat</samp>&rsquo;</dt>
  3547. <dd><p>0xF5DEB3
  3548. </p></dd>
  3549. <dt>&lsquo;<samp>White</samp>&rsquo;</dt>
  3550. <dd><p>0xFFFFFF
  3551. </p></dd>
  3552. <dt>&lsquo;<samp>WhiteSmoke</samp>&rsquo;</dt>
  3553. <dd><p>0xF5F5F5
  3554. </p></dd>
  3555. <dt>&lsquo;<samp>Yellow</samp>&rsquo;</dt>
  3556. <dd><p>0xFFFF00
  3557. </p></dd>
  3558. <dt>&lsquo;<samp>YellowGreen</samp>&rsquo;</dt>
  3559. <dd><p>0x9ACD32
  3560. </p></dd>
  3561. </dl>
  3562. <span id="channel-layout-syntax"></span><a name="Channel-Layout"></a>
  3563. <h3 class="section">6.8 Channel Layout<span class="pull-right"><a class="anchor hidden-xs" href="#Channel-Layout" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Channel-Layout" aria-hidden="true">TOC</a></span></h3>
  3564. <p>A channel layout specifies the spatial disposition of the channels in
  3565. a multi-channel audio stream. To specify a channel layout, FFmpeg
  3566. makes use of a special syntax.
  3567. </p>
  3568. <p>Individual channels are identified by an id, as given by the table
  3569. below:
  3570. </p><dl compact="compact">
  3571. <dt>&lsquo;<samp>FL</samp>&rsquo;</dt>
  3572. <dd><p>front left
  3573. </p></dd>
  3574. <dt>&lsquo;<samp>FR</samp>&rsquo;</dt>
  3575. <dd><p>front right
  3576. </p></dd>
  3577. <dt>&lsquo;<samp>FC</samp>&rsquo;</dt>
  3578. <dd><p>front center
  3579. </p></dd>
  3580. <dt>&lsquo;<samp>LFE</samp>&rsquo;</dt>
  3581. <dd><p>low frequency
  3582. </p></dd>
  3583. <dt>&lsquo;<samp>BL</samp>&rsquo;</dt>
  3584. <dd><p>back left
  3585. </p></dd>
  3586. <dt>&lsquo;<samp>BR</samp>&rsquo;</dt>
  3587. <dd><p>back right
  3588. </p></dd>
  3589. <dt>&lsquo;<samp>FLC</samp>&rsquo;</dt>
  3590. <dd><p>front left-of-center
  3591. </p></dd>
  3592. <dt>&lsquo;<samp>FRC</samp>&rsquo;</dt>
  3593. <dd><p>front right-of-center
  3594. </p></dd>
  3595. <dt>&lsquo;<samp>BC</samp>&rsquo;</dt>
  3596. <dd><p>back center
  3597. </p></dd>
  3598. <dt>&lsquo;<samp>SL</samp>&rsquo;</dt>
  3599. <dd><p>side left
  3600. </p></dd>
  3601. <dt>&lsquo;<samp>SR</samp>&rsquo;</dt>
  3602. <dd><p>side right
  3603. </p></dd>
  3604. <dt>&lsquo;<samp>TC</samp>&rsquo;</dt>
  3605. <dd><p>top center
  3606. </p></dd>
  3607. <dt>&lsquo;<samp>TFL</samp>&rsquo;</dt>
  3608. <dd><p>top front left
  3609. </p></dd>
  3610. <dt>&lsquo;<samp>TFC</samp>&rsquo;</dt>
  3611. <dd><p>top front center
  3612. </p></dd>
  3613. <dt>&lsquo;<samp>TFR</samp>&rsquo;</dt>
  3614. <dd><p>top front right
  3615. </p></dd>
  3616. <dt>&lsquo;<samp>TBL</samp>&rsquo;</dt>
  3617. <dd><p>top back left
  3618. </p></dd>
  3619. <dt>&lsquo;<samp>TBC</samp>&rsquo;</dt>
  3620. <dd><p>top back center
  3621. </p></dd>
  3622. <dt>&lsquo;<samp>TBR</samp>&rsquo;</dt>
  3623. <dd><p>top back right
  3624. </p></dd>
  3625. <dt>&lsquo;<samp>DL</samp>&rsquo;</dt>
  3626. <dd><p>downmix left
  3627. </p></dd>
  3628. <dt>&lsquo;<samp>DR</samp>&rsquo;</dt>
  3629. <dd><p>downmix right
  3630. </p></dd>
  3631. <dt>&lsquo;<samp>WL</samp>&rsquo;</dt>
  3632. <dd><p>wide left
  3633. </p></dd>
  3634. <dt>&lsquo;<samp>WR</samp>&rsquo;</dt>
  3635. <dd><p>wide right
  3636. </p></dd>
  3637. <dt>&lsquo;<samp>SDL</samp>&rsquo;</dt>
  3638. <dd><p>surround direct left
  3639. </p></dd>
  3640. <dt>&lsquo;<samp>SDR</samp>&rsquo;</dt>
  3641. <dd><p>surround direct right
  3642. </p></dd>
  3643. <dt>&lsquo;<samp>LFE2</samp>&rsquo;</dt>
  3644. <dd><p>low frequency 2
  3645. </p></dd>
  3646. </dl>
  3647. <p>Standard channel layout compositions can be specified by using the
  3648. following identifiers:
  3649. </p><dl compact="compact">
  3650. <dt>&lsquo;<samp>mono</samp>&rsquo;</dt>
  3651. <dd><p>FC
  3652. </p></dd>
  3653. <dt>&lsquo;<samp>stereo</samp>&rsquo;</dt>
  3654. <dd><p>FL+FR
  3655. </p></dd>
  3656. <dt>&lsquo;<samp>2.1</samp>&rsquo;</dt>
  3657. <dd><p>FL+FR+LFE
  3658. </p></dd>
  3659. <dt>&lsquo;<samp>3.0</samp>&rsquo;</dt>
  3660. <dd><p>FL+FR+FC
  3661. </p></dd>
  3662. <dt>&lsquo;<samp>3.0(back)</samp>&rsquo;</dt>
  3663. <dd><p>FL+FR+BC
  3664. </p></dd>
  3665. <dt>&lsquo;<samp>4.0</samp>&rsquo;</dt>
  3666. <dd><p>FL+FR+FC+BC
  3667. </p></dd>
  3668. <dt>&lsquo;<samp>quad</samp>&rsquo;</dt>
  3669. <dd><p>FL+FR+BL+BR
  3670. </p></dd>
  3671. <dt>&lsquo;<samp>quad(side)</samp>&rsquo;</dt>
  3672. <dd><p>FL+FR+SL+SR
  3673. </p></dd>
  3674. <dt>&lsquo;<samp>3.1</samp>&rsquo;</dt>
  3675. <dd><p>FL+FR+FC+LFE
  3676. </p></dd>
  3677. <dt>&lsquo;<samp>5.0</samp>&rsquo;</dt>
  3678. <dd><p>FL+FR+FC+BL+BR
  3679. </p></dd>
  3680. <dt>&lsquo;<samp>5.0(side)</samp>&rsquo;</dt>
  3681. <dd><p>FL+FR+FC+SL+SR
  3682. </p></dd>
  3683. <dt>&lsquo;<samp>4.1</samp>&rsquo;</dt>
  3684. <dd><p>FL+FR+FC+LFE+BC
  3685. </p></dd>
  3686. <dt>&lsquo;<samp>5.1</samp>&rsquo;</dt>
  3687. <dd><p>FL+FR+FC+LFE+BL+BR
  3688. </p></dd>
  3689. <dt>&lsquo;<samp>5.1(side)</samp>&rsquo;</dt>
  3690. <dd><p>FL+FR+FC+LFE+SL+SR
  3691. </p></dd>
  3692. <dt>&lsquo;<samp>6.0</samp>&rsquo;</dt>
  3693. <dd><p>FL+FR+FC+BC+SL+SR
  3694. </p></dd>
  3695. <dt>&lsquo;<samp>6.0(front)</samp>&rsquo;</dt>
  3696. <dd><p>FL+FR+FLC+FRC+SL+SR
  3697. </p></dd>
  3698. <dt>&lsquo;<samp>hexagonal</samp>&rsquo;</dt>
  3699. <dd><p>FL+FR+FC+BL+BR+BC
  3700. </p></dd>
  3701. <dt>&lsquo;<samp>6.1</samp>&rsquo;</dt>
  3702. <dd><p>FL+FR+FC+LFE+BC+SL+SR
  3703. </p></dd>
  3704. <dt>&lsquo;<samp>6.1</samp>&rsquo;</dt>
  3705. <dd><p>FL+FR+FC+LFE+BL+BR+BC
  3706. </p></dd>
  3707. <dt>&lsquo;<samp>6.1(front)</samp>&rsquo;</dt>
  3708. <dd><p>FL+FR+LFE+FLC+FRC+SL+SR
  3709. </p></dd>
  3710. <dt>&lsquo;<samp>7.0</samp>&rsquo;</dt>
  3711. <dd><p>FL+FR+FC+BL+BR+SL+SR
  3712. </p></dd>
  3713. <dt>&lsquo;<samp>7.0(front)</samp>&rsquo;</dt>
  3714. <dd><p>FL+FR+FC+FLC+FRC+SL+SR
  3715. </p></dd>
  3716. <dt>&lsquo;<samp>7.1</samp>&rsquo;</dt>
  3717. <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR
  3718. </p></dd>
  3719. <dt>&lsquo;<samp>7.1(wide)</samp>&rsquo;</dt>
  3720. <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC
  3721. </p></dd>
  3722. <dt>&lsquo;<samp>7.1(wide-side)</samp>&rsquo;</dt>
  3723. <dd><p>FL+FR+FC+LFE+FLC+FRC+SL+SR
  3724. </p></dd>
  3725. <dt>&lsquo;<samp>octagonal</samp>&rsquo;</dt>
  3726. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR
  3727. </p></dd>
  3728. <dt>&lsquo;<samp>hexadecagonal</samp>&rsquo;</dt>
  3729. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
  3730. </p></dd>
  3731. <dt>&lsquo;<samp>downmix</samp>&rsquo;</dt>
  3732. <dd><p>DL+DR
  3733. </p></dd>
  3734. </dl>
  3735. <p>A custom channel layout can be specified as a sequence of terms, separated by
  3736. &rsquo;+&rsquo; or &rsquo;|&rsquo;. Each term can be:
  3737. </p><ul>
  3738. <li> the name of a standard channel layout (e.g. &lsquo;<samp>mono</samp>&rsquo;,
  3739. &lsquo;<samp>stereo</samp>&rsquo;, &lsquo;<samp>4.0</samp>&rsquo;, &lsquo;<samp>quad</samp>&rsquo;, &lsquo;<samp>5.0</samp>&rsquo;, etc.)
  3740. </li><li> the name of a single channel (e.g. &lsquo;<samp>FL</samp>&rsquo;, &lsquo;<samp>FR</samp>&rsquo;, &lsquo;<samp>FC</samp>&rsquo;, &lsquo;<samp>LFE</samp>&rsquo;, etc.)
  3741. </li><li> a number of channels, in decimal, followed by &rsquo;c&rsquo;, yielding the default channel
  3742. layout for that number of channels (see the function
  3743. <code>av_get_default_channel_layout</code>). Note that not all channel counts have a
  3744. default layout.
  3745. </li><li> a number of channels, in decimal, followed by &rsquo;C&rsquo;, yielding an unknown channel
  3746. layout with the specified number of channels. Note that not all channel layout
  3747. specification strings support unknown channel layouts.
  3748. </li><li> a channel layout mask, in hexadecimal starting with &quot;0x&quot; (see the
  3749. <code>AV_CH_*</code> macros in <samp>libavutil/channel_layout.h</samp>.
  3750. </li></ul>
  3751. <p>Before libavutil version 53 the trailing character &quot;c&quot; to specify a number of
  3752. channels was optional, but now it is required, while a channel layout mask can
  3753. also be specified as a decimal number (if and only if not followed by &quot;c&quot; or &quot;C&quot;).
  3754. </p>
  3755. <p>See also the function <code>av_get_channel_layout</code> defined in
  3756. <samp>libavutil/channel_layout.h</samp>.
  3757. </p>
  3758. <a name="Expression-Evaluation"></a>
  3759. <h2 class="chapter">7 Expression Evaluation<span class="pull-right"><a class="anchor hidden-xs" href="#Expression-Evaluation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Expression-Evaluation" aria-hidden="true">TOC</a></span></h2>
  3760. <p>When evaluating an arithmetic expression, FFmpeg uses an internal
  3761. formula evaluator, implemented through the <samp>libavutil/eval.h</samp>
  3762. interface.
  3763. </p>
  3764. <p>An expression may contain unary, binary operators, constants, and
  3765. functions.
  3766. </p>
  3767. <p>Two expressions <var>expr1</var> and <var>expr2</var> can be combined to form
  3768. another expression &quot;<var>expr1</var>;<var>expr2</var>&quot;.
  3769. <var>expr1</var> and <var>expr2</var> are evaluated in turn, and the new
  3770. expression evaluates to the value of <var>expr2</var>.
  3771. </p>
  3772. <p>The following binary operators are available: <code>+</code>, <code>-</code>,
  3773. <code>*</code>, <code>/</code>, <code>^</code>.
  3774. </p>
  3775. <p>The following unary operators are available: <code>+</code>, <code>-</code>.
  3776. </p>
  3777. <p>The following functions are available:
  3778. </p><dl compact="compact">
  3779. <dt><samp>abs(x)</samp></dt>
  3780. <dd><p>Compute absolute value of <var>x</var>.
  3781. </p>
  3782. </dd>
  3783. <dt><samp>acos(x)</samp></dt>
  3784. <dd><p>Compute arccosine of <var>x</var>.
  3785. </p>
  3786. </dd>
  3787. <dt><samp>asin(x)</samp></dt>
  3788. <dd><p>Compute arcsine of <var>x</var>.
  3789. </p>
  3790. </dd>
  3791. <dt><samp>atan(x)</samp></dt>
  3792. <dd><p>Compute arctangent of <var>x</var>.
  3793. </p>
  3794. </dd>
  3795. <dt><samp>atan2(x, y)</samp></dt>
  3796. <dd><p>Compute principal value of the arc tangent of <var>y</var>/<var>x</var>.
  3797. </p>
  3798. </dd>
  3799. <dt><samp>between(x, min, max)</samp></dt>
  3800. <dd><p>Return 1 if <var>x</var> is greater than or equal to <var>min</var> and lesser than or
  3801. equal to <var>max</var>, 0 otherwise.
  3802. </p>
  3803. </dd>
  3804. <dt><samp>bitand(x, y)</samp></dt>
  3805. <dt><samp>bitor(x, y)</samp></dt>
  3806. <dd><p>Compute bitwise and/or operation on <var>x</var> and <var>y</var>.
  3807. </p>
  3808. <p>The results of the evaluation of <var>x</var> and <var>y</var> are converted to
  3809. integers before executing the bitwise operation.
  3810. </p>
  3811. <p>Note that both the conversion to integer and the conversion back to
  3812. floating point can lose precision. Beware of unexpected results for
  3813. large numbers (usually 2^53 and larger).
  3814. </p>
  3815. </dd>
  3816. <dt><samp>ceil(expr)</samp></dt>
  3817. <dd><p>Round the value of expression <var>expr</var> upwards to the nearest
  3818. integer. For example, &quot;ceil(1.5)&quot; is &quot;2.0&quot;.
  3819. </p>
  3820. </dd>
  3821. <dt><samp>clip(x, min, max)</samp></dt>
  3822. <dd><p>Return the value of <var>x</var> clipped between <var>min</var> and <var>max</var>.
  3823. </p>
  3824. </dd>
  3825. <dt><samp>cos(x)</samp></dt>
  3826. <dd><p>Compute cosine of <var>x</var>.
  3827. </p>
  3828. </dd>
  3829. <dt><samp>cosh(x)</samp></dt>
  3830. <dd><p>Compute hyperbolic cosine of <var>x</var>.
  3831. </p>
  3832. </dd>
  3833. <dt><samp>eq(x, y)</samp></dt>
  3834. <dd><p>Return 1 if <var>x</var> and <var>y</var> are equivalent, 0 otherwise.
  3835. </p>
  3836. </dd>
  3837. <dt><samp>exp(x)</samp></dt>
  3838. <dd><p>Compute exponential of <var>x</var> (with base <code>e</code>, the Euler&rsquo;s number).
  3839. </p>
  3840. </dd>
  3841. <dt><samp>floor(expr)</samp></dt>
  3842. <dd><p>Round the value of expression <var>expr</var> downwards to the nearest
  3843. integer. For example, &quot;floor(-1.5)&quot; is &quot;-2.0&quot;.
  3844. </p>
  3845. </dd>
  3846. <dt><samp>gauss(x)</samp></dt>
  3847. <dd><p>Compute Gauss function of <var>x</var>, corresponding to
  3848. <code>exp(-x*x/2) / sqrt(2*PI)</code>.
  3849. </p>
  3850. </dd>
  3851. <dt><samp>gcd(x, y)</samp></dt>
  3852. <dd><p>Return the greatest common divisor of <var>x</var> and <var>y</var>. If both <var>x</var> and
  3853. <var>y</var> are 0 or either or both are less than zero then behavior is undefined.
  3854. </p>
  3855. </dd>
  3856. <dt><samp>gt(x, y)</samp></dt>
  3857. <dd><p>Return 1 if <var>x</var> is greater than <var>y</var>, 0 otherwise.
  3858. </p>
  3859. </dd>
  3860. <dt><samp>gte(x, y)</samp></dt>
  3861. <dd><p>Return 1 if <var>x</var> is greater than or equal to <var>y</var>, 0 otherwise.
  3862. </p>
  3863. </dd>
  3864. <dt><samp>hypot(x, y)</samp></dt>
  3865. <dd><p>This function is similar to the C function with the same name; it returns
  3866. &quot;sqrt(<var>x</var>*<var>x</var> + <var>y</var>*<var>y</var>)&quot;, the length of the hypotenuse of a
  3867. right triangle with sides of length <var>x</var> and <var>y</var>, or the distance of the
  3868. point (<var>x</var>, <var>y</var>) from the origin.
  3869. </p>
  3870. </dd>
  3871. <dt><samp>if(x, y)</samp></dt>
  3872. <dd><p>Evaluate <var>x</var>, and if the result is non-zero return the result of
  3873. the evaluation of <var>y</var>, return 0 otherwise.
  3874. </p>
  3875. </dd>
  3876. <dt><samp>if(x, y, z)</samp></dt>
  3877. <dd><p>Evaluate <var>x</var>, and if the result is non-zero return the evaluation
  3878. result of <var>y</var>, otherwise the evaluation result of <var>z</var>.
  3879. </p>
  3880. </dd>
  3881. <dt><samp>ifnot(x, y)</samp></dt>
  3882. <dd><p>Evaluate <var>x</var>, and if the result is zero return the result of the
  3883. evaluation of <var>y</var>, return 0 otherwise.
  3884. </p>
  3885. </dd>
  3886. <dt><samp>ifnot(x, y, z)</samp></dt>
  3887. <dd><p>Evaluate <var>x</var>, and if the result is zero return the evaluation
  3888. result of <var>y</var>, otherwise the evaluation result of <var>z</var>.
  3889. </p>
  3890. </dd>
  3891. <dt><samp>isinf(x)</samp></dt>
  3892. <dd><p>Return 1.0 if <var>x</var> is +/-INFINITY, 0.0 otherwise.
  3893. </p>
  3894. </dd>
  3895. <dt><samp>isnan(x)</samp></dt>
  3896. <dd><p>Return 1.0 if <var>x</var> is NAN, 0.0 otherwise.
  3897. </p>
  3898. </dd>
  3899. <dt><samp>ld(var)</samp></dt>
  3900. <dd><p>Load the value of the internal variable with number
  3901. <var>var</var>, which was previously stored with st(<var>var</var>, <var>expr</var>).
  3902. The function returns the loaded value.
  3903. </p>
  3904. </dd>
  3905. <dt><samp>lerp(x, y, z)</samp></dt>
  3906. <dd><p>Return linear interpolation between <var>x</var> and <var>y</var> by amount of <var>z</var>.
  3907. </p>
  3908. </dd>
  3909. <dt><samp>log(x)</samp></dt>
  3910. <dd><p>Compute natural logarithm of <var>x</var>.
  3911. </p>
  3912. </dd>
  3913. <dt><samp>lt(x, y)</samp></dt>
  3914. <dd><p>Return 1 if <var>x</var> is lesser than <var>y</var>, 0 otherwise.
  3915. </p>
  3916. </dd>
  3917. <dt><samp>lte(x, y)</samp></dt>
  3918. <dd><p>Return 1 if <var>x</var> is lesser than or equal to <var>y</var>, 0 otherwise.
  3919. </p>
  3920. </dd>
  3921. <dt><samp>max(x, y)</samp></dt>
  3922. <dd><p>Return the maximum between <var>x</var> and <var>y</var>.
  3923. </p>
  3924. </dd>
  3925. <dt><samp>min(x, y)</samp></dt>
  3926. <dd><p>Return the minimum between <var>x</var> and <var>y</var>.
  3927. </p>
  3928. </dd>
  3929. <dt><samp>mod(x, y)</samp></dt>
  3930. <dd><p>Compute the remainder of division of <var>x</var> by <var>y</var>.
  3931. </p>
  3932. </dd>
  3933. <dt><samp>not(expr)</samp></dt>
  3934. <dd><p>Return 1.0 if <var>expr</var> is zero, 0.0 otherwise.
  3935. </p>
  3936. </dd>
  3937. <dt><samp>pow(x, y)</samp></dt>
  3938. <dd><p>Compute the power of <var>x</var> elevated <var>y</var>, it is equivalent to
  3939. &quot;(<var>x</var>)^(<var>y</var>)&quot;.
  3940. </p>
  3941. </dd>
  3942. <dt><samp>print(t)</samp></dt>
  3943. <dt><samp>print(t, l)</samp></dt>
  3944. <dd><p>Print the value of expression <var>t</var> with loglevel <var>l</var>. If
  3945. <var>l</var> is not specified then a default log level is used.
  3946. Returns the value of the expression printed.
  3947. </p>
  3948. <p>Prints t with loglevel l
  3949. </p>
  3950. </dd>
  3951. <dt><samp>random(x)</samp></dt>
  3952. <dd><p>Return a pseudo random value between 0.0 and 1.0. <var>x</var> is the index of the
  3953. internal variable which will be used to save the seed/state.
  3954. </p>
  3955. </dd>
  3956. <dt><samp>root(expr, max)</samp></dt>
  3957. <dd><p>Find an input value for which the function represented by <var>expr</var>
  3958. with argument <var>ld(0)</var> is 0 in the interval 0..<var>max</var>.
  3959. </p>
  3960. <p>The expression in <var>expr</var> must denote a continuous function or the
  3961. result is undefined.
  3962. </p>
  3963. <p><var>ld(0)</var> is used to represent the function input value, which means
  3964. that the given expression will be evaluated multiple times with
  3965. various input values that the expression can access through
  3966. <code>ld(0)</code>. When the expression evaluates to 0 then the
  3967. corresponding input value will be returned.
  3968. </p>
  3969. </dd>
  3970. <dt><samp>round(expr)</samp></dt>
  3971. <dd><p>Round the value of expression <var>expr</var> to the nearest integer. For example, &quot;round(1.5)&quot; is &quot;2.0&quot;.
  3972. </p>
  3973. </dd>
  3974. <dt><samp>sgn(x)</samp></dt>
  3975. <dd><p>Compute sign of <var>x</var>.
  3976. </p>
  3977. </dd>
  3978. <dt><samp>sin(x)</samp></dt>
  3979. <dd><p>Compute sine of <var>x</var>.
  3980. </p>
  3981. </dd>
  3982. <dt><samp>sinh(x)</samp></dt>
  3983. <dd><p>Compute hyperbolic sine of <var>x</var>.
  3984. </p>
  3985. </dd>
  3986. <dt><samp>sqrt(expr)</samp></dt>
  3987. <dd><p>Compute the square root of <var>expr</var>. This is equivalent to
  3988. &quot;(<var>expr</var>)^.5&quot;.
  3989. </p>
  3990. </dd>
  3991. <dt><samp>squish(x)</samp></dt>
  3992. <dd><p>Compute expression <code>1/(1 + exp(4*x))</code>.
  3993. </p>
  3994. </dd>
  3995. <dt><samp>st(var, expr)</samp></dt>
  3996. <dd><p>Store the value of the expression <var>expr</var> in an internal
  3997. variable. <var>var</var> specifies the number of the variable where to
  3998. store the value, and it is a value ranging from 0 to 9. The function
  3999. returns the value stored in the internal variable.
  4000. Note, Variables are currently not shared between expressions.
  4001. </p>
  4002. </dd>
  4003. <dt><samp>tan(x)</samp></dt>
  4004. <dd><p>Compute tangent of <var>x</var>.
  4005. </p>
  4006. </dd>
  4007. <dt><samp>tanh(x)</samp></dt>
  4008. <dd><p>Compute hyperbolic tangent of <var>x</var>.
  4009. </p>
  4010. </dd>
  4011. <dt><samp>taylor(expr, x)</samp></dt>
  4012. <dt><samp>taylor(expr, x, id)</samp></dt>
  4013. <dd><p>Evaluate a Taylor series at <var>x</var>, given an expression representing
  4014. the <code>ld(id)</code>-th derivative of a function at 0.
  4015. </p>
  4016. <p>When the series does not converge the result is undefined.
  4017. </p>
  4018. <p><var>ld(id)</var> is used to represent the derivative order in <var>expr</var>,
  4019. which means that the given expression will be evaluated multiple times
  4020. with various input values that the expression can access through
  4021. <code>ld(id)</code>. If <var>id</var> is not specified then 0 is assumed.
  4022. </p>
  4023. <p>Note, when you have the derivatives at y instead of 0,
  4024. <code>taylor(expr, x-y)</code> can be used.
  4025. </p>
  4026. </dd>
  4027. <dt><samp>time(0)</samp></dt>
  4028. <dd><p>Return the current (wallclock) time in seconds.
  4029. </p>
  4030. </dd>
  4031. <dt><samp>trunc(expr)</samp></dt>
  4032. <dd><p>Round the value of expression <var>expr</var> towards zero to the nearest
  4033. integer. For example, &quot;trunc(-1.5)&quot; is &quot;-1.0&quot;.
  4034. </p>
  4035. </dd>
  4036. <dt><samp>while(cond, expr)</samp></dt>
  4037. <dd><p>Evaluate expression <var>expr</var> while the expression <var>cond</var> is
  4038. non-zero, and returns the value of the last <var>expr</var> evaluation, or
  4039. NAN if <var>cond</var> was always false.
  4040. </p></dd>
  4041. </dl>
  4042. <p>The following constants are available:
  4043. </p><dl compact="compact">
  4044. <dt><samp>PI</samp></dt>
  4045. <dd><p>area of the unit disc, approximately 3.14
  4046. </p></dd>
  4047. <dt><samp>E</samp></dt>
  4048. <dd><p>exp(1) (Euler&rsquo;s number), approximately 2.718
  4049. </p></dd>
  4050. <dt><samp>PHI</samp></dt>
  4051. <dd><p>golden ratio (1+sqrt(5))/2, approximately 1.618
  4052. </p></dd>
  4053. </dl>
  4054. <p>Assuming that an expression is considered &quot;true&quot; if it has a non-zero
  4055. value, note that:
  4056. </p>
  4057. <p><code>*</code> works like AND
  4058. </p>
  4059. <p><code>+</code> works like OR
  4060. </p>
  4061. <p>For example the construct:
  4062. </p><div class="example">
  4063. <pre class="example">if (A AND B) then C
  4064. </pre></div>
  4065. <p>is equivalent to:
  4066. </p><div class="example">
  4067. <pre class="example">if(A*B, C)
  4068. </pre></div>
  4069. <p>In your C code, you can extend the list of unary and binary functions,
  4070. and define recognized constants, so that they are available for your
  4071. expressions.
  4072. </p>
  4073. <p>The evaluator also recognizes the International System unit prefixes.
  4074. If &rsquo;i&rsquo; is appended after the prefix, binary prefixes are used, which
  4075. are based on powers of 1024 instead of powers of 1000.
  4076. The &rsquo;B&rsquo; postfix multiplies the value by 8, and can be appended after a
  4077. unit prefix or used alone. This allows using for example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;,
  4078. &rsquo;G&rsquo; and &rsquo;B&rsquo; as number postfix.
  4079. </p>
  4080. <p>The list of available International System prefixes follows, with
  4081. indication of the corresponding powers of 10 and of 2.
  4082. </p><dl compact="compact">
  4083. <dt><samp>y</samp></dt>
  4084. <dd><p>10^-24 / 2^-80
  4085. </p></dd>
  4086. <dt><samp>z</samp></dt>
  4087. <dd><p>10^-21 / 2^-70
  4088. </p></dd>
  4089. <dt><samp>a</samp></dt>
  4090. <dd><p>10^-18 / 2^-60
  4091. </p></dd>
  4092. <dt><samp>f</samp></dt>
  4093. <dd><p>10^-15 / 2^-50
  4094. </p></dd>
  4095. <dt><samp>p</samp></dt>
  4096. <dd><p>10^-12 / 2^-40
  4097. </p></dd>
  4098. <dt><samp>n</samp></dt>
  4099. <dd><p>10^-9 / 2^-30
  4100. </p></dd>
  4101. <dt><samp>u</samp></dt>
  4102. <dd><p>10^-6 / 2^-20
  4103. </p></dd>
  4104. <dt><samp>m</samp></dt>
  4105. <dd><p>10^-3 / 2^-10
  4106. </p></dd>
  4107. <dt><samp>c</samp></dt>
  4108. <dd><p>10^-2
  4109. </p></dd>
  4110. <dt><samp>d</samp></dt>
  4111. <dd><p>10^-1
  4112. </p></dd>
  4113. <dt><samp>h</samp></dt>
  4114. <dd><p>10^2
  4115. </p></dd>
  4116. <dt><samp>k</samp></dt>
  4117. <dd><p>10^3 / 2^10
  4118. </p></dd>
  4119. <dt><samp>K</samp></dt>
  4120. <dd><p>10^3 / 2^10
  4121. </p></dd>
  4122. <dt><samp>M</samp></dt>
  4123. <dd><p>10^6 / 2^20
  4124. </p></dd>
  4125. <dt><samp>G</samp></dt>
  4126. <dd><p>10^9 / 2^30
  4127. </p></dd>
  4128. <dt><samp>T</samp></dt>
  4129. <dd><p>10^12 / 2^40
  4130. </p></dd>
  4131. <dt><samp>P</samp></dt>
  4132. <dd><p>10^15 / 2^40
  4133. </p></dd>
  4134. <dt><samp>E</samp></dt>
  4135. <dd><p>10^18 / 2^50
  4136. </p></dd>
  4137. <dt><samp>Z</samp></dt>
  4138. <dd><p>10^21 / 2^60
  4139. </p></dd>
  4140. <dt><samp>Y</samp></dt>
  4141. <dd><p>10^24 / 2^70
  4142. </p></dd>
  4143. </dl>
  4144. <span id="codec_002doptions"></span><a name="Codec-Options"></a>
  4145. <h2 class="chapter">8 Codec Options<span class="pull-right"><a class="anchor hidden-xs" href="#Codec-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Codec-Options" aria-hidden="true">TOC</a></span></h2>
  4146. <p>libavcodec provides some generic global options, which can be set on
  4147. all the encoders and decoders. In addition each codec may support
  4148. so-called private options, which are specific for a given codec.
  4149. </p>
  4150. <p>Sometimes, a global option may only affect a specific kind of codec,
  4151. and may be nonsensical or ignored by another, so you need to be aware
  4152. of the meaning of the specified options. Also some options are
  4153. meant only for decoding or encoding.
  4154. </p>
  4155. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  4156. FFmpeg tools, or by setting the value explicitly in the
  4157. <code>AVCodecContext</code> options or using the <samp>libavutil/opt.h</samp> API
  4158. for programmatic use.
  4159. </p>
  4160. <p>The list of supported options follow:
  4161. </p>
  4162. <dl compact="compact">
  4163. <dt><samp>b <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  4164. <dd><p>Set bitrate in bits/s. Default value is 200K.
  4165. </p>
  4166. </dd>
  4167. <dt><samp>ab <var>integer</var> (<em>encoding,audio</em>)</samp></dt>
  4168. <dd><p>Set audio bitrate (in bits/s). Default value is 128K.
  4169. </p>
  4170. </dd>
  4171. <dt><samp>bt <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4172. <dd><p>Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
  4173. tolerance specifies how far ratecontrol is willing to deviate from the
  4174. target average bitrate value. This is not related to min/max
  4175. bitrate. Lowering tolerance too much has an adverse effect on quality.
  4176. </p>
  4177. </dd>
  4178. <dt><samp>flags <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  4179. <dd><p>Set generic flags.
  4180. </p>
  4181. <p>Possible values:
  4182. </p><dl compact="compact">
  4183. <dt>&lsquo;<samp>mv4</samp>&rsquo;</dt>
  4184. <dd><p>Use four motion vector by macroblock (mpeg4).
  4185. </p></dd>
  4186. <dt>&lsquo;<samp>qpel</samp>&rsquo;</dt>
  4187. <dd><p>Use 1/4 pel motion compensation.
  4188. </p></dd>
  4189. <dt>&lsquo;<samp>loop</samp>&rsquo;</dt>
  4190. <dd><p>Use loop filter.
  4191. </p></dd>
  4192. <dt>&lsquo;<samp>qscale</samp>&rsquo;</dt>
  4193. <dd><p>Use fixed qscale.
  4194. </p></dd>
  4195. <dt>&lsquo;<samp>pass1</samp>&rsquo;</dt>
  4196. <dd><p>Use internal 2pass ratecontrol in first pass mode.
  4197. </p></dd>
  4198. <dt>&lsquo;<samp>pass2</samp>&rsquo;</dt>
  4199. <dd><p>Use internal 2pass ratecontrol in second pass mode.
  4200. </p></dd>
  4201. <dt>&lsquo;<samp>gray</samp>&rsquo;</dt>
  4202. <dd><p>Only decode/encode grayscale.
  4203. </p></dd>
  4204. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4205. <dd><p>Set error[?] variables during encoding.
  4206. </p></dd>
  4207. <dt>&lsquo;<samp>truncated</samp>&rsquo;</dt>
  4208. <dd><p>Input bitstream might be randomly truncated.
  4209. </p></dd>
  4210. <dt>&lsquo;<samp>drop_changed</samp>&rsquo;</dt>
  4211. <dd><p>Don&rsquo;t output frames whose parameters differ from first decoded frame in stream.
  4212. Error AVERROR_INPUT_CHANGED is returned when a frame is dropped.
  4213. </p>
  4214. </dd>
  4215. <dt>&lsquo;<samp>ildct</samp>&rsquo;</dt>
  4216. <dd><p>Use interlaced DCT.
  4217. </p></dd>
  4218. <dt>&lsquo;<samp>low_delay</samp>&rsquo;</dt>
  4219. <dd><p>Force low delay.
  4220. </p></dd>
  4221. <dt>&lsquo;<samp>global_header</samp>&rsquo;</dt>
  4222. <dd><p>Place global headers in extradata instead of every keyframe.
  4223. </p></dd>
  4224. <dt>&lsquo;<samp>bitexact</samp>&rsquo;</dt>
  4225. <dd><p>Only write platform-, build- and time-independent data. (except (I)DCT).
  4226. This ensures that file and data checksums are reproducible and match between
  4227. platforms. Its primary use is for regression testing.
  4228. </p></dd>
  4229. <dt>&lsquo;<samp>aic</samp>&rsquo;</dt>
  4230. <dd><p>Apply H263 advanced intra coding / mpeg4 ac prediction.
  4231. </p></dd>
  4232. <dt>&lsquo;<samp>ilme</samp>&rsquo;</dt>
  4233. <dd><p>Apply interlaced motion estimation.
  4234. </p></dd>
  4235. <dt>&lsquo;<samp>cgop</samp>&rsquo;</dt>
  4236. <dd><p>Use closed gop.
  4237. </p></dd>
  4238. <dt>&lsquo;<samp>output_corrupt</samp>&rsquo;</dt>
  4239. <dd><p>Output even potentially corrupted frames.
  4240. </p></dd>
  4241. </dl>
  4242. </dd>
  4243. <dt><samp>time_base <var>rational number</var></samp></dt>
  4244. <dd><p>Set codec time base.
  4245. </p>
  4246. <p>It is the fundamental unit of time (in seconds) in terms of which
  4247. frame timestamps are represented. For fixed-fps content, timebase
  4248. should be <code>1 / frame_rate</code> and timestamp increments should be
  4249. identically 1.
  4250. </p>
  4251. </dd>
  4252. <dt><samp>g <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4253. <dd><p>Set the group of picture (GOP) size. Default value is 12.
  4254. </p>
  4255. </dd>
  4256. <dt><samp>ar <var>integer</var> (<em>decoding/encoding,audio</em>)</samp></dt>
  4257. <dd><p>Set audio sampling rate (in Hz).
  4258. </p>
  4259. </dd>
  4260. <dt><samp>ac <var>integer</var> (<em>decoding/encoding,audio</em>)</samp></dt>
  4261. <dd><p>Set number of audio channels.
  4262. </p>
  4263. </dd>
  4264. <dt><samp>cutoff <var>integer</var> (<em>encoding,audio</em>)</samp></dt>
  4265. <dd><p>Set cutoff bandwidth. (Supported only by selected encoders, see
  4266. their respective documentation sections.)
  4267. </p>
  4268. </dd>
  4269. <dt><samp>frame_size <var>integer</var> (<em>encoding,audio</em>)</samp></dt>
  4270. <dd><p>Set audio frame size.
  4271. </p>
  4272. <p>Each submitted frame except the last must contain exactly frame_size
  4273. samples per channel. May be 0 when the codec has
  4274. CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
  4275. restricted. It is set by some decoders to indicate constant frame
  4276. size.
  4277. </p>
  4278. </dd>
  4279. <dt><samp>frame_number <var>integer</var></samp></dt>
  4280. <dd><p>Set the frame number.
  4281. </p>
  4282. </dd>
  4283. <dt><samp>delay <var>integer</var></samp></dt>
  4284. <dt><samp>qcomp <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4285. <dd><p>Set video quantizer scale compression (VBR). It is used as a constant
  4286. in the ratecontrol equation. Recommended range for default rc_eq:
  4287. 0.0-1.0.
  4288. </p>
  4289. </dd>
  4290. <dt><samp>qblur <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4291. <dd><p>Set video quantizer scale blur (VBR).
  4292. </p>
  4293. </dd>
  4294. <dt><samp>qmin <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4295. <dd><p>Set min video quantizer scale (VBR). Must be included between -1 and
  4296. 69, default value is 2.
  4297. </p>
  4298. </dd>
  4299. <dt><samp>qmax <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4300. <dd><p>Set max video quantizer scale (VBR). Must be included between -1 and
  4301. 1024, default value is 31.
  4302. </p>
  4303. </dd>
  4304. <dt><samp>qdiff <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4305. <dd><p>Set max difference between the quantizer scale (VBR).
  4306. </p>
  4307. </dd>
  4308. <dt><samp>bf <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4309. <dd><p>Set max number of B frames between non-B-frames.
  4310. </p>
  4311. <p>Must be an integer between -1 and 16. 0 means that B-frames are
  4312. disabled. If a value of -1 is used, it will choose an automatic value
  4313. depending on the encoder.
  4314. </p>
  4315. <p>Default value is 0.
  4316. </p>
  4317. </dd>
  4318. <dt><samp>b_qfactor <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4319. <dd><p>Set qp factor between P and B frames.
  4320. </p>
  4321. </dd>
  4322. <dt><samp>b_strategy <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4323. <dd><p>Set strategy to choose between I/P/B-frames.
  4324. </p>
  4325. </dd>
  4326. <dt><samp>ps <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4327. <dd><p>Set RTP payload size in bytes.
  4328. </p>
  4329. </dd>
  4330. <dt><samp>mv_bits <var>integer</var></samp></dt>
  4331. <dt><samp>header_bits <var>integer</var></samp></dt>
  4332. <dt><samp>i_tex_bits <var>integer</var></samp></dt>
  4333. <dt><samp>p_tex_bits <var>integer</var></samp></dt>
  4334. <dt><samp>i_count <var>integer</var></samp></dt>
  4335. <dt><samp>p_count <var>integer</var></samp></dt>
  4336. <dt><samp>skip_count <var>integer</var></samp></dt>
  4337. <dt><samp>misc_bits <var>integer</var></samp></dt>
  4338. <dt><samp>frame_bits <var>integer</var></samp></dt>
  4339. <dt><samp>codec_tag <var>integer</var></samp></dt>
  4340. <dt><samp>bug <var>flags</var> (<em>decoding,video</em>)</samp></dt>
  4341. <dd><p>Workaround not auto detected encoder bugs.
  4342. </p>
  4343. <p>Possible values:
  4344. </p><dl compact="compact">
  4345. <dt>&lsquo;<samp>autodetect</samp>&rsquo;</dt>
  4346. <dt>&lsquo;<samp>xvid_ilace</samp>&rsquo;</dt>
  4347. <dd><p>Xvid interlacing bug (autodetected if fourcc==XVIX)
  4348. </p></dd>
  4349. <dt>&lsquo;<samp>ump4</samp>&rsquo;</dt>
  4350. <dd><p>(autodetected if fourcc==UMP4)
  4351. </p></dd>
  4352. <dt>&lsquo;<samp>no_padding</samp>&rsquo;</dt>
  4353. <dd><p>padding bug (autodetected)
  4354. </p></dd>
  4355. <dt>&lsquo;<samp>amv</samp>&rsquo;</dt>
  4356. <dt>&lsquo;<samp>qpel_chroma</samp>&rsquo;</dt>
  4357. <dt>&lsquo;<samp>std_qpel</samp>&rsquo;</dt>
  4358. <dd><p>old standard qpel (autodetected per fourcc/version)
  4359. </p></dd>
  4360. <dt>&lsquo;<samp>qpel_chroma2</samp>&rsquo;</dt>
  4361. <dt>&lsquo;<samp>direct_blocksize</samp>&rsquo;</dt>
  4362. <dd><p>direct-qpel-blocksize bug (autodetected per fourcc/version)
  4363. </p></dd>
  4364. <dt>&lsquo;<samp>edge</samp>&rsquo;</dt>
  4365. <dd><p>edge padding bug (autodetected per fourcc/version)
  4366. </p></dd>
  4367. <dt>&lsquo;<samp>hpel_chroma</samp>&rsquo;</dt>
  4368. <dt>&lsquo;<samp>dc_clip</samp>&rsquo;</dt>
  4369. <dt>&lsquo;<samp>ms</samp>&rsquo;</dt>
  4370. <dd><p>Workaround various bugs in microsoft broken decoders.
  4371. </p></dd>
  4372. <dt>&lsquo;<samp>trunc</samp>&rsquo;</dt>
  4373. <dd><p>trancated frames
  4374. </p></dd>
  4375. </dl>
  4376. </dd>
  4377. <dt><samp>strict <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp></dt>
  4378. <dd><p>Specify how strictly to follow the standards.
  4379. </p>
  4380. <p>Possible values:
  4381. </p><dl compact="compact">
  4382. <dt>&lsquo;<samp>very</samp>&rsquo;</dt>
  4383. <dd><p>strictly conform to an older more strict version of the spec or reference software
  4384. </p></dd>
  4385. <dt>&lsquo;<samp>strict</samp>&rsquo;</dt>
  4386. <dd><p>strictly conform to all the things in the spec no matter what consequences
  4387. </p></dd>
  4388. <dt>&lsquo;<samp>normal</samp>&rsquo;</dt>
  4389. <dt>&lsquo;<samp>unofficial</samp>&rsquo;</dt>
  4390. <dd><p>allow unofficial extensions
  4391. </p></dd>
  4392. <dt>&lsquo;<samp>experimental</samp>&rsquo;</dt>
  4393. <dd><p>allow non standardized experimental things, experimental
  4394. (unfinished/work in progress/not well tested) decoders and encoders.
  4395. Note: experimental decoders can pose a security risk, do not use this for
  4396. decoding untrusted input.
  4397. </p></dd>
  4398. </dl>
  4399. </dd>
  4400. <dt><samp>b_qoffset <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4401. <dd><p>Set QP offset between P and B frames.
  4402. </p>
  4403. </dd>
  4404. <dt><samp>err_detect <var>flags</var> (<em>decoding,audio,video</em>)</samp></dt>
  4405. <dd><p>Set error detection flags.
  4406. </p>
  4407. <p>Possible values:
  4408. </p><dl compact="compact">
  4409. <dt>&lsquo;<samp>crccheck</samp>&rsquo;</dt>
  4410. <dd><p>verify embedded CRCs
  4411. </p></dd>
  4412. <dt>&lsquo;<samp>bitstream</samp>&rsquo;</dt>
  4413. <dd><p>detect bitstream specification deviations
  4414. </p></dd>
  4415. <dt>&lsquo;<samp>buffer</samp>&rsquo;</dt>
  4416. <dd><p>detect improper bitstream length
  4417. </p></dd>
  4418. <dt>&lsquo;<samp>explode</samp>&rsquo;</dt>
  4419. <dd><p>abort decoding on minor error detection
  4420. </p></dd>
  4421. <dt>&lsquo;<samp>ignore_err</samp>&rsquo;</dt>
  4422. <dd><p>ignore decoding errors, and continue decoding.
  4423. This is useful if you want to analyze the content of a video and thus want
  4424. everything to be decoded no matter what. This option will not result in a video
  4425. that is pleasing to watch in case of errors.
  4426. </p></dd>
  4427. <dt>&lsquo;<samp>careful</samp>&rsquo;</dt>
  4428. <dd><p>consider things that violate the spec and have not been seen in the wild as errors
  4429. </p></dd>
  4430. <dt>&lsquo;<samp>compliant</samp>&rsquo;</dt>
  4431. <dd><p>consider all spec non compliancies as errors
  4432. </p></dd>
  4433. <dt>&lsquo;<samp>aggressive</samp>&rsquo;</dt>
  4434. <dd><p>consider things that a sane encoder should not do as an error
  4435. </p></dd>
  4436. </dl>
  4437. </dd>
  4438. <dt><samp>has_b_frames <var>integer</var></samp></dt>
  4439. <dt><samp>block_align <var>integer</var></samp></dt>
  4440. <dt><samp>mpeg_quant <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4441. <dd><p>Use MPEG quantizers instead of H.263.
  4442. </p>
  4443. </dd>
  4444. <dt><samp>rc_override_count <var>integer</var></samp></dt>
  4445. <dt><samp>maxrate <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  4446. <dd><p>Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
  4447. </p>
  4448. </dd>
  4449. <dt><samp>minrate <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  4450. <dd><p>Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
  4451. encode. It is of little use elsewise.
  4452. </p>
  4453. </dd>
  4454. <dt><samp>bufsize <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  4455. <dd><p>Set ratecontrol buffer size (in bits).
  4456. </p>
  4457. </dd>
  4458. <dt><samp>i_qfactor <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4459. <dd><p>Set QP factor between P and I frames.
  4460. </p>
  4461. </dd>
  4462. <dt><samp>i_qoffset <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4463. <dd><p>Set QP offset between P and I frames.
  4464. </p>
  4465. </dd>
  4466. <dt><samp>dct <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4467. <dd><p>Set DCT algorithm.
  4468. </p>
  4469. <p>Possible values:
  4470. </p><dl compact="compact">
  4471. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  4472. <dd><p>autoselect a good one (default)
  4473. </p></dd>
  4474. <dt>&lsquo;<samp>fastint</samp>&rsquo;</dt>
  4475. <dd><p>fast integer
  4476. </p></dd>
  4477. <dt>&lsquo;<samp>int</samp>&rsquo;</dt>
  4478. <dd><p>accurate integer
  4479. </p></dd>
  4480. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  4481. <dt>&lsquo;<samp>altivec</samp>&rsquo;</dt>
  4482. <dt>&lsquo;<samp>faan</samp>&rsquo;</dt>
  4483. <dd><p>floating point AAN DCT
  4484. </p></dd>
  4485. </dl>
  4486. </dd>
  4487. <dt><samp>lumi_mask <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4488. <dd><p>Compress bright areas stronger than medium ones.
  4489. </p>
  4490. </dd>
  4491. <dt><samp>tcplx_mask <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4492. <dd><p>Set temporal complexity masking.
  4493. </p>
  4494. </dd>
  4495. <dt><samp>scplx_mask <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4496. <dd><p>Set spatial complexity masking.
  4497. </p>
  4498. </dd>
  4499. <dt><samp>p_mask <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4500. <dd><p>Set inter masking.
  4501. </p>
  4502. </dd>
  4503. <dt><samp>dark_mask <var>float</var> (<em>encoding,video</em>)</samp></dt>
  4504. <dd><p>Compress dark areas stronger than medium ones.
  4505. </p>
  4506. </dd>
  4507. <dt><samp>idct <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  4508. <dd><p>Select IDCT implementation.
  4509. </p>
  4510. <p>Possible values:
  4511. </p><dl compact="compact">
  4512. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  4513. <dt>&lsquo;<samp>int</samp>&rsquo;</dt>
  4514. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  4515. <dt>&lsquo;<samp>simplemmx</samp>&rsquo;</dt>
  4516. <dt>&lsquo;<samp>simpleauto</samp>&rsquo;</dt>
  4517. <dd><p>Automatically pick a IDCT compatible with the simple one
  4518. </p>
  4519. </dd>
  4520. <dt>&lsquo;<samp>arm</samp>&rsquo;</dt>
  4521. <dt>&lsquo;<samp>altivec</samp>&rsquo;</dt>
  4522. <dt>&lsquo;<samp>sh4</samp>&rsquo;</dt>
  4523. <dt>&lsquo;<samp>simplearm</samp>&rsquo;</dt>
  4524. <dt>&lsquo;<samp>simplearmv5te</samp>&rsquo;</dt>
  4525. <dt>&lsquo;<samp>simplearmv6</samp>&rsquo;</dt>
  4526. <dt>&lsquo;<samp>simpleneon</samp>&rsquo;</dt>
  4527. <dt>&lsquo;<samp>xvid</samp>&rsquo;</dt>
  4528. <dt>&lsquo;<samp>faani</samp>&rsquo;</dt>
  4529. <dd><p>floating point AAN IDCT
  4530. </p></dd>
  4531. </dl>
  4532. </dd>
  4533. <dt><samp>slice_count <var>integer</var></samp></dt>
  4534. <dt><samp>ec <var>flags</var> (<em>decoding,video</em>)</samp></dt>
  4535. <dd><p>Set error concealment strategy.
  4536. </p>
  4537. <p>Possible values:
  4538. </p><dl compact="compact">
  4539. <dt>&lsquo;<samp>guess_mvs</samp>&rsquo;</dt>
  4540. <dd><p>iterative motion vector (MV) search (slow)
  4541. </p></dd>
  4542. <dt>&lsquo;<samp>deblock</samp>&rsquo;</dt>
  4543. <dd><p>use strong deblock filter for damaged MBs
  4544. </p></dd>
  4545. <dt>&lsquo;<samp>favor_inter</samp>&rsquo;</dt>
  4546. <dd><p>favor predicting from the previous frame instead of the current
  4547. </p></dd>
  4548. </dl>
  4549. </dd>
  4550. <dt><samp>bits_per_coded_sample <var>integer</var></samp></dt>
  4551. <dt><samp>pred <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4552. <dd><p>Set prediction method.
  4553. </p>
  4554. <p>Possible values:
  4555. </p><dl compact="compact">
  4556. <dt>&lsquo;<samp>left</samp>&rsquo;</dt>
  4557. <dt>&lsquo;<samp>plane</samp>&rsquo;</dt>
  4558. <dt>&lsquo;<samp>median</samp>&rsquo;</dt>
  4559. </dl>
  4560. </dd>
  4561. <dt><samp>aspect <var>rational number</var> (<em>encoding,video</em>)</samp></dt>
  4562. <dd><p>Set sample aspect ratio.
  4563. </p>
  4564. </dd>
  4565. <dt><samp>sar <var>rational number</var> (<em>encoding,video</em>)</samp></dt>
  4566. <dd><p>Set sample aspect ratio. Alias to <var>aspect</var>.
  4567. </p>
  4568. </dd>
  4569. <dt><samp>debug <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  4570. <dd><p>Print specific debug info.
  4571. </p>
  4572. <p>Possible values:
  4573. </p><dl compact="compact">
  4574. <dt>&lsquo;<samp>pict</samp>&rsquo;</dt>
  4575. <dd><p>picture info
  4576. </p></dd>
  4577. <dt>&lsquo;<samp>rc</samp>&rsquo;</dt>
  4578. <dd><p>rate control
  4579. </p></dd>
  4580. <dt>&lsquo;<samp>bitstream</samp>&rsquo;</dt>
  4581. <dt>&lsquo;<samp>mb_type</samp>&rsquo;</dt>
  4582. <dd><p>macroblock (MB) type
  4583. </p></dd>
  4584. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  4585. <dd><p>per-block quantization parameter (QP)
  4586. </p></dd>
  4587. <dt>&lsquo;<samp>dct_coeff</samp>&rsquo;</dt>
  4588. <dt>&lsquo;<samp>green_metadata</samp>&rsquo;</dt>
  4589. <dd><p>display complexity metadata for the upcoming frame, GoP or for a given duration.
  4590. </p>
  4591. </dd>
  4592. <dt>&lsquo;<samp>skip</samp>&rsquo;</dt>
  4593. <dt>&lsquo;<samp>startcode</samp>&rsquo;</dt>
  4594. <dt>&lsquo;<samp>er</samp>&rsquo;</dt>
  4595. <dd><p>error recognition
  4596. </p></dd>
  4597. <dt>&lsquo;<samp>mmco</samp>&rsquo;</dt>
  4598. <dd><p>memory management control operations (H.264)
  4599. </p></dd>
  4600. <dt>&lsquo;<samp>bugs</samp>&rsquo;</dt>
  4601. <dt>&lsquo;<samp>buffers</samp>&rsquo;</dt>
  4602. <dd><p>picture buffer allocations
  4603. </p></dd>
  4604. <dt>&lsquo;<samp>thread_ops</samp>&rsquo;</dt>
  4605. <dd><p>threading operations
  4606. </p></dd>
  4607. <dt>&lsquo;<samp>nomc</samp>&rsquo;</dt>
  4608. <dd><p>skip motion compensation
  4609. </p></dd>
  4610. </dl>
  4611. </dd>
  4612. <dt><samp>cmp <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4613. <dd><p>Set full pel me compare function.
  4614. </p>
  4615. <p>Possible values:
  4616. </p><dl compact="compact">
  4617. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4618. <dd><p>sum of absolute differences, fast (default)
  4619. </p></dd>
  4620. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4621. <dd><p>sum of squared errors
  4622. </p></dd>
  4623. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4624. <dd><p>sum of absolute Hadamard transformed differences
  4625. </p></dd>
  4626. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4627. <dd><p>sum of absolute DCT transformed differences
  4628. </p></dd>
  4629. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4630. <dd><p>sum of squared quantization errors (avoid, low quality)
  4631. </p></dd>
  4632. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4633. <dd><p>number of bits needed for the block
  4634. </p></dd>
  4635. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4636. <dd><p>rate distortion optimal, slow
  4637. </p></dd>
  4638. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4639. <dd><p>0
  4640. </p></dd>
  4641. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4642. <dd><p>sum of absolute vertical differences
  4643. </p></dd>
  4644. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4645. <dd><p>sum of squared vertical differences
  4646. </p></dd>
  4647. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4648. <dd><p>noise preserving sum of squared differences
  4649. </p></dd>
  4650. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4651. <dd><p>5/3 wavelet, only used in snow
  4652. </p></dd>
  4653. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4654. <dd><p>9/7 wavelet, only used in snow
  4655. </p></dd>
  4656. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4657. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4658. </dl>
  4659. </dd>
  4660. <dt><samp>subcmp <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4661. <dd><p>Set sub pel me compare function.
  4662. </p>
  4663. <p>Possible values:
  4664. </p><dl compact="compact">
  4665. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4666. <dd><p>sum of absolute differences, fast (default)
  4667. </p></dd>
  4668. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4669. <dd><p>sum of squared errors
  4670. </p></dd>
  4671. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4672. <dd><p>sum of absolute Hadamard transformed differences
  4673. </p></dd>
  4674. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4675. <dd><p>sum of absolute DCT transformed differences
  4676. </p></dd>
  4677. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4678. <dd><p>sum of squared quantization errors (avoid, low quality)
  4679. </p></dd>
  4680. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4681. <dd><p>number of bits needed for the block
  4682. </p></dd>
  4683. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4684. <dd><p>rate distortion optimal, slow
  4685. </p></dd>
  4686. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4687. <dd><p>0
  4688. </p></dd>
  4689. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4690. <dd><p>sum of absolute vertical differences
  4691. </p></dd>
  4692. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4693. <dd><p>sum of squared vertical differences
  4694. </p></dd>
  4695. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4696. <dd><p>noise preserving sum of squared differences
  4697. </p></dd>
  4698. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4699. <dd><p>5/3 wavelet, only used in snow
  4700. </p></dd>
  4701. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4702. <dd><p>9/7 wavelet, only used in snow
  4703. </p></dd>
  4704. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4705. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4706. </dl>
  4707. </dd>
  4708. <dt><samp>mbcmp <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4709. <dd><p>Set macroblock compare function.
  4710. </p>
  4711. <p>Possible values:
  4712. </p><dl compact="compact">
  4713. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4714. <dd><p>sum of absolute differences, fast (default)
  4715. </p></dd>
  4716. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4717. <dd><p>sum of squared errors
  4718. </p></dd>
  4719. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4720. <dd><p>sum of absolute Hadamard transformed differences
  4721. </p></dd>
  4722. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4723. <dd><p>sum of absolute DCT transformed differences
  4724. </p></dd>
  4725. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4726. <dd><p>sum of squared quantization errors (avoid, low quality)
  4727. </p></dd>
  4728. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4729. <dd><p>number of bits needed for the block
  4730. </p></dd>
  4731. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4732. <dd><p>rate distortion optimal, slow
  4733. </p></dd>
  4734. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4735. <dd><p>0
  4736. </p></dd>
  4737. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4738. <dd><p>sum of absolute vertical differences
  4739. </p></dd>
  4740. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4741. <dd><p>sum of squared vertical differences
  4742. </p></dd>
  4743. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4744. <dd><p>noise preserving sum of squared differences
  4745. </p></dd>
  4746. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4747. <dd><p>5/3 wavelet, only used in snow
  4748. </p></dd>
  4749. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4750. <dd><p>9/7 wavelet, only used in snow
  4751. </p></dd>
  4752. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4753. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4754. </dl>
  4755. </dd>
  4756. <dt><samp>ildctcmp <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4757. <dd><p>Set interlaced dct compare function.
  4758. </p>
  4759. <p>Possible values:
  4760. </p><dl compact="compact">
  4761. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4762. <dd><p>sum of absolute differences, fast (default)
  4763. </p></dd>
  4764. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4765. <dd><p>sum of squared errors
  4766. </p></dd>
  4767. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4768. <dd><p>sum of absolute Hadamard transformed differences
  4769. </p></dd>
  4770. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4771. <dd><p>sum of absolute DCT transformed differences
  4772. </p></dd>
  4773. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4774. <dd><p>sum of squared quantization errors (avoid, low quality)
  4775. </p></dd>
  4776. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4777. <dd><p>number of bits needed for the block
  4778. </p></dd>
  4779. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4780. <dd><p>rate distortion optimal, slow
  4781. </p></dd>
  4782. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4783. <dd><p>0
  4784. </p></dd>
  4785. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4786. <dd><p>sum of absolute vertical differences
  4787. </p></dd>
  4788. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4789. <dd><p>sum of squared vertical differences
  4790. </p></dd>
  4791. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4792. <dd><p>noise preserving sum of squared differences
  4793. </p></dd>
  4794. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4795. <dd><p>5/3 wavelet, only used in snow
  4796. </p></dd>
  4797. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4798. <dd><p>9/7 wavelet, only used in snow
  4799. </p></dd>
  4800. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4801. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4802. </dl>
  4803. </dd>
  4804. <dt><samp>dia_size <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4805. <dd><p>Set diamond type &amp; size for motion estimation.
  4806. </p><dl compact="compact">
  4807. <dt>&lsquo;<samp>(1024, INT_MAX)</samp>&rsquo;</dt>
  4808. <dd><p>full motion estimation(slowest)
  4809. </p></dd>
  4810. <dt>&lsquo;<samp>(768, 1024]</samp>&rsquo;</dt>
  4811. <dd><p>umh motion estimation
  4812. </p></dd>
  4813. <dt>&lsquo;<samp>(512, 768]</samp>&rsquo;</dt>
  4814. <dd><p>hex motion estimation
  4815. </p></dd>
  4816. <dt>&lsquo;<samp>(256, 512]</samp>&rsquo;</dt>
  4817. <dd><p>l2s diamond motion estimation
  4818. </p></dd>
  4819. <dt>&lsquo;<samp>[2,256]</samp>&rsquo;</dt>
  4820. <dd><p>var diamond motion estimation
  4821. </p></dd>
  4822. <dt>&lsquo;<samp>(-1, 2)</samp>&rsquo;</dt>
  4823. <dd><p>small diamond motion estimation
  4824. </p></dd>
  4825. <dt>&lsquo;<samp>-1</samp>&rsquo;</dt>
  4826. <dd><p>funny diamond motion estimation
  4827. </p></dd>
  4828. <dt>&lsquo;<samp>(INT_MIN, -1)</samp>&rsquo;</dt>
  4829. <dd><p>sab diamond motion estimation
  4830. </p></dd>
  4831. </dl>
  4832. </dd>
  4833. <dt><samp>last_pred <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4834. <dd><p>Set amount of motion predictors from the previous frame.
  4835. </p>
  4836. </dd>
  4837. <dt><samp>preme <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4838. <dd><p>Set pre motion estimation.
  4839. </p>
  4840. </dd>
  4841. <dt><samp>precmp <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4842. <dd><p>Set pre motion estimation compare function.
  4843. </p>
  4844. <p>Possible values:
  4845. </p><dl compact="compact">
  4846. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4847. <dd><p>sum of absolute differences, fast (default)
  4848. </p></dd>
  4849. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4850. <dd><p>sum of squared errors
  4851. </p></dd>
  4852. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4853. <dd><p>sum of absolute Hadamard transformed differences
  4854. </p></dd>
  4855. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4856. <dd><p>sum of absolute DCT transformed differences
  4857. </p></dd>
  4858. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4859. <dd><p>sum of squared quantization errors (avoid, low quality)
  4860. </p></dd>
  4861. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4862. <dd><p>number of bits needed for the block
  4863. </p></dd>
  4864. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4865. <dd><p>rate distortion optimal, slow
  4866. </p></dd>
  4867. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4868. <dd><p>0
  4869. </p></dd>
  4870. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4871. <dd><p>sum of absolute vertical differences
  4872. </p></dd>
  4873. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4874. <dd><p>sum of squared vertical differences
  4875. </p></dd>
  4876. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4877. <dd><p>noise preserving sum of squared differences
  4878. </p></dd>
  4879. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4880. <dd><p>5/3 wavelet, only used in snow
  4881. </p></dd>
  4882. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4883. <dd><p>9/7 wavelet, only used in snow
  4884. </p></dd>
  4885. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4886. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4887. </dl>
  4888. </dd>
  4889. <dt><samp>pre_dia_size <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4890. <dd><p>Set diamond type &amp; size for motion estimation pre-pass.
  4891. </p>
  4892. </dd>
  4893. <dt><samp>subq <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4894. <dd><p>Set sub pel motion estimation quality.
  4895. </p>
  4896. </dd>
  4897. <dt><samp>me_range <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4898. <dd><p>Set limit motion vectors range (1023 for DivX player).
  4899. </p>
  4900. </dd>
  4901. <dt><samp>global_quality <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  4902. <dt><samp>coder <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4903. <dd>
  4904. <p>Possible values:
  4905. </p><dl compact="compact">
  4906. <dt>&lsquo;<samp>vlc</samp>&rsquo;</dt>
  4907. <dd><p>variable length coder / huffman coder
  4908. </p></dd>
  4909. <dt>&lsquo;<samp>ac</samp>&rsquo;</dt>
  4910. <dd><p>arithmetic coder
  4911. </p></dd>
  4912. <dt>&lsquo;<samp>raw</samp>&rsquo;</dt>
  4913. <dd><p>raw (no encoding)
  4914. </p></dd>
  4915. <dt>&lsquo;<samp>rle</samp>&rsquo;</dt>
  4916. <dd><p>run-length coder
  4917. </p></dd>
  4918. </dl>
  4919. </dd>
  4920. <dt><samp>context <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4921. <dd><p>Set context model.
  4922. </p>
  4923. </dd>
  4924. <dt><samp>slice_flags <var>integer</var></samp></dt>
  4925. <dt><samp>mbd <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4926. <dd><p>Set macroblock decision algorithm (high quality mode).
  4927. </p>
  4928. <p>Possible values:
  4929. </p><dl compact="compact">
  4930. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  4931. <dd><p>use mbcmp (default)
  4932. </p></dd>
  4933. <dt>&lsquo;<samp>bits</samp>&rsquo;</dt>
  4934. <dd><p>use fewest bits
  4935. </p></dd>
  4936. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4937. <dd><p>use best rate distortion
  4938. </p></dd>
  4939. </dl>
  4940. </dd>
  4941. <dt><samp>sc_threshold <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4942. <dd><p>Set scene change threshold.
  4943. </p>
  4944. </dd>
  4945. <dt><samp>nr <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4946. <dd><p>Set noise reduction.
  4947. </p>
  4948. </dd>
  4949. <dt><samp>rc_init_occupancy <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  4950. <dd><p>Set number of bits which should be loaded into the rc buffer before
  4951. decoding starts.
  4952. </p>
  4953. </dd>
  4954. <dt><samp>flags2 <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  4955. <dd>
  4956. <p>Possible values:
  4957. </p><dl compact="compact">
  4958. <dt>&lsquo;<samp>fast</samp>&rsquo;</dt>
  4959. <dd><p>Allow non spec compliant speedup tricks.
  4960. </p></dd>
  4961. <dt>&lsquo;<samp>noout</samp>&rsquo;</dt>
  4962. <dd><p>Skip bitstream encoding.
  4963. </p></dd>
  4964. <dt>&lsquo;<samp>ignorecrop</samp>&rsquo;</dt>
  4965. <dd><p>Ignore cropping information from sps.
  4966. </p></dd>
  4967. <dt>&lsquo;<samp>local_header</samp>&rsquo;</dt>
  4968. <dd><p>Place global headers at every keyframe instead of in extradata.
  4969. </p></dd>
  4970. <dt>&lsquo;<samp>chunks</samp>&rsquo;</dt>
  4971. <dd><p>Frame data might be split into multiple chunks.
  4972. </p></dd>
  4973. <dt>&lsquo;<samp>showall</samp>&rsquo;</dt>
  4974. <dd><p>Show all frames before the first keyframe.
  4975. </p></dd>
  4976. <dt>&lsquo;<samp>export_mvs</samp>&rsquo;</dt>
  4977. <dd><p>Export motion vectors into frame side-data (see <code>AV_FRAME_DATA_MOTION_VECTORS</code>)
  4978. for codecs that support it. See also <samp>doc/examples/export_mvs.c</samp>.
  4979. </p></dd>
  4980. <dt>&lsquo;<samp>skip_manual</samp>&rsquo;</dt>
  4981. <dd><p>Do not skip samples and export skip information as frame side data.
  4982. </p></dd>
  4983. <dt>&lsquo;<samp>ass_ro_flush_noop</samp>&rsquo;</dt>
  4984. <dd><p>Do not reset ASS ReadOrder field on flush.
  4985. </p></dd>
  4986. </dl>
  4987. </dd>
  4988. <dt><samp>export_side_data <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp></dt>
  4989. <dd>
  4990. <p>Possible values:
  4991. </p><dl compact="compact">
  4992. <dt>&lsquo;<samp>mvs</samp>&rsquo;</dt>
  4993. <dd><p>Export motion vectors into frame side-data (see <code>AV_FRAME_DATA_MOTION_VECTORS</code>)
  4994. for codecs that support it. See also <samp>doc/examples/export_mvs.c</samp>.
  4995. </p></dd>
  4996. <dt>&lsquo;<samp>prft</samp>&rsquo;</dt>
  4997. <dd><p>Export encoder Producer Reference Time into packet side-data (see <code>AV_PKT_DATA_PRFT</code>)
  4998. for codecs that support it.
  4999. </p></dd>
  5000. <dt>&lsquo;<samp>venc_params</samp>&rsquo;</dt>
  5001. <dd><p>Export video encoding parameters through frame side data (see <code>AV_FRAME_DATA_VIDEO_ENC_PARAMS</code>)
  5002. for codecs that support it. At present, those are H.264 and VP9.
  5003. </p></dd>
  5004. <dt>&lsquo;<samp>film_grain</samp>&rsquo;</dt>
  5005. <dd><p>Export film grain parameters through frame side data (see <code>AV_FRAME_DATA_FILM_GRAIN_PARAMS</code>).
  5006. Supported at present by AV1 decoders.
  5007. </p></dd>
  5008. </dl>
  5009. </dd>
  5010. <dt><samp>threads <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5011. <dd><p>Set the number of threads to be used, in case the selected codec
  5012. implementation supports multi-threading.
  5013. </p>
  5014. <p>Possible values:
  5015. </p><dl compact="compact">
  5016. <dt>&lsquo;<samp>auto, 0</samp>&rsquo;</dt>
  5017. <dd><p>automatically select the number of threads to set
  5018. </p></dd>
  5019. </dl>
  5020. <p>Default value is &lsquo;<samp>auto</samp>&rsquo;.
  5021. </p>
  5022. </dd>
  5023. <dt><samp>dc <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5024. <dd><p>Set intra_dc_precision.
  5025. </p>
  5026. </dd>
  5027. <dt><samp>nssew <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5028. <dd><p>Set nsse weight.
  5029. </p>
  5030. </dd>
  5031. <dt><samp>skip_top <var>integer</var> (<em>decoding,video</em>)</samp></dt>
  5032. <dd><p>Set number of macroblock rows at the top which are skipped.
  5033. </p>
  5034. </dd>
  5035. <dt><samp>skip_bottom <var>integer</var> (<em>decoding,video</em>)</samp></dt>
  5036. <dd><p>Set number of macroblock rows at the bottom which are skipped.
  5037. </p>
  5038. </dd>
  5039. <dt><samp>profile <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  5040. <dd>
  5041. <p>Set encoder codec profile. Default value is &lsquo;<samp>unknown</samp>&rsquo;. Encoder specific
  5042. profiles are documented in the relevant encoder documentation.
  5043. </p>
  5044. </dd>
  5045. <dt><samp>level <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  5046. <dd>
  5047. <p>Possible values:
  5048. </p><dl compact="compact">
  5049. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  5050. </dl>
  5051. </dd>
  5052. <dt><samp>lowres <var>integer</var> (<em>decoding,audio,video</em>)</samp></dt>
  5053. <dd><p>Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
  5054. </p>
  5055. </dd>
  5056. <dt><samp>skip_threshold <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5057. <dd><p>Set frame skip threshold.
  5058. </p>
  5059. </dd>
  5060. <dt><samp>skip_factor <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5061. <dd><p>Set frame skip factor.
  5062. </p>
  5063. </dd>
  5064. <dt><samp>skip_exp <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5065. <dd><p>Set frame skip exponent.
  5066. Negative values behave identical to the corresponding positive ones, except
  5067. that the score is normalized.
  5068. Positive values exist primarily for compatibility reasons and are not so useful.
  5069. </p>
  5070. </dd>
  5071. <dt><samp>skipcmp <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5072. <dd><p>Set frame skip compare function.
  5073. </p>
  5074. <p>Possible values:
  5075. </p><dl compact="compact">
  5076. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  5077. <dd><p>sum of absolute differences, fast (default)
  5078. </p></dd>
  5079. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  5080. <dd><p>sum of squared errors
  5081. </p></dd>
  5082. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  5083. <dd><p>sum of absolute Hadamard transformed differences
  5084. </p></dd>
  5085. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  5086. <dd><p>sum of absolute DCT transformed differences
  5087. </p></dd>
  5088. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  5089. <dd><p>sum of squared quantization errors (avoid, low quality)
  5090. </p></dd>
  5091. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  5092. <dd><p>number of bits needed for the block
  5093. </p></dd>
  5094. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  5095. <dd><p>rate distortion optimal, slow
  5096. </p></dd>
  5097. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  5098. <dd><p>0
  5099. </p></dd>
  5100. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  5101. <dd><p>sum of absolute vertical differences
  5102. </p></dd>
  5103. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  5104. <dd><p>sum of squared vertical differences
  5105. </p></dd>
  5106. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  5107. <dd><p>noise preserving sum of squared differences
  5108. </p></dd>
  5109. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  5110. <dd><p>5/3 wavelet, only used in snow
  5111. </p></dd>
  5112. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  5113. <dd><p>9/7 wavelet, only used in snow
  5114. </p></dd>
  5115. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  5116. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  5117. </dl>
  5118. </dd>
  5119. <dt><samp>mblmin <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5120. <dd><p>Set min macroblock lagrange factor (VBR).
  5121. </p>
  5122. </dd>
  5123. <dt><samp>mblmax <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5124. <dd><p>Set max macroblock lagrange factor (VBR).
  5125. </p>
  5126. </dd>
  5127. <dt><samp>mepc <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5128. <dd><p>Set motion estimation bitrate penalty compensation (1.0 = 256).
  5129. </p>
  5130. </dd>
  5131. <dt><samp>skip_loop_filter <var>integer</var> (<em>decoding,video</em>)</samp></dt>
  5132. <dt><samp>skip_idct <var>integer</var> (<em>decoding,video</em>)</samp></dt>
  5133. <dt><samp>skip_frame <var>integer</var> (<em>decoding,video</em>)</samp></dt>
  5134. <dd>
  5135. <p>Make decoder discard processing depending on the frame type selected
  5136. by the option value.
  5137. </p>
  5138. <p><samp>skip_loop_filter</samp> skips frame loop filtering, <samp>skip_idct</samp>
  5139. skips frame IDCT/dequantization, <samp>skip_frame</samp> skips decoding.
  5140. </p>
  5141. <p>Possible values:
  5142. </p><dl compact="compact">
  5143. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  5144. <dd><p>Discard no frame.
  5145. </p>
  5146. </dd>
  5147. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  5148. <dd><p>Discard useless frames like 0-sized frames.
  5149. </p>
  5150. </dd>
  5151. <dt>&lsquo;<samp>noref</samp>&rsquo;</dt>
  5152. <dd><p>Discard all non-reference frames.
  5153. </p>
  5154. </dd>
  5155. <dt>&lsquo;<samp>bidir</samp>&rsquo;</dt>
  5156. <dd><p>Discard all bidirectional frames.
  5157. </p>
  5158. </dd>
  5159. <dt>&lsquo;<samp>nokey</samp>&rsquo;</dt>
  5160. <dd><p>Discard all frames excepts keyframes.
  5161. </p>
  5162. </dd>
  5163. <dt>&lsquo;<samp>nointra</samp>&rsquo;</dt>
  5164. <dd><p>Discard all frames except I frames.
  5165. </p>
  5166. </dd>
  5167. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  5168. <dd><p>Discard all frames.
  5169. </p></dd>
  5170. </dl>
  5171. <p>Default value is &lsquo;<samp>default</samp>&rsquo;.
  5172. </p>
  5173. </dd>
  5174. <dt><samp>bidir_refine <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5175. <dd><p>Refine the two motion vectors used in bidirectional macroblocks.
  5176. </p>
  5177. </dd>
  5178. <dt><samp>brd_scale <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5179. <dd><p>Downscale frames for dynamic B-frame decision.
  5180. </p>
  5181. </dd>
  5182. <dt><samp>keyint_min <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5183. <dd><p>Set minimum interval between IDR-frames.
  5184. </p>
  5185. </dd>
  5186. <dt><samp>refs <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5187. <dd><p>Set reference frames to consider for motion compensation.
  5188. </p>
  5189. </dd>
  5190. <dt><samp>chromaoffset <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5191. <dd><p>Set chroma qp offset from luma.
  5192. </p>
  5193. </dd>
  5194. <dt><samp>trellis <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  5195. <dd><p>Set rate-distortion optimal quantization.
  5196. </p>
  5197. </dd>
  5198. <dt><samp>mv0_threshold <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5199. <dt><samp>b_sensitivity <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5200. <dd><p>Adjust sensitivity of b_frame_strategy 1.
  5201. </p>
  5202. </dd>
  5203. <dt><samp>compression_level <var>integer</var> (<em>encoding,audio,video</em>)</samp></dt>
  5204. <dt><samp>min_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp></dt>
  5205. <dt><samp>max_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp></dt>
  5206. <dt><samp>timecode_frame_start <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5207. <dd><p>Set GOP timecode frame start number, in non drop frame format.
  5208. </p>
  5209. </dd>
  5210. <dt><samp>bits_per_raw_sample <var>integer</var></samp></dt>
  5211. <dt><samp>channel_layout <var>integer</var> (<em>decoding/encoding,audio</em>)</samp></dt>
  5212. <dd>
  5213. <p>Possible values:
  5214. </p></dd>
  5215. <dt><samp>request_channel_layout <var>integer</var> (<em>decoding,audio</em>)</samp></dt>
  5216. <dd>
  5217. <p>Possible values:
  5218. </p></dd>
  5219. <dt><samp>rc_max_vbv_use <var>float</var> (<em>encoding,video</em>)</samp></dt>
  5220. <dt><samp>rc_min_vbv_use <var>float</var> (<em>encoding,video</em>)</samp></dt>
  5221. <dt><samp>ticks_per_frame <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp></dt>
  5222. <dt><samp>color_primaries <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5223. <dd><p>Possible values:
  5224. </p><dl compact="compact">
  5225. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  5226. <dd><p>BT.709
  5227. </p></dd>
  5228. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  5229. <dd><p>BT.470 M
  5230. </p></dd>
  5231. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  5232. <dd><p>BT.470 BG
  5233. </p></dd>
  5234. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  5235. <dd><p>SMPTE 170 M
  5236. </p></dd>
  5237. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  5238. <dd><p>SMPTE 240 M
  5239. </p></dd>
  5240. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  5241. <dd><p>Film
  5242. </p></dd>
  5243. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  5244. <dd><p>BT.2020
  5245. </p></dd>
  5246. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  5247. <dt>&lsquo;<samp>smpte428_1</samp>&rsquo;</dt>
  5248. <dd><p>SMPTE ST 428-1
  5249. </p></dd>
  5250. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  5251. <dd><p>SMPTE 431-2
  5252. </p></dd>
  5253. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  5254. <dd><p>SMPTE 432-1
  5255. </p></dd>
  5256. <dt>&lsquo;<samp>jedec-p22</samp>&rsquo;</dt>
  5257. <dd><p>JEDEC P22
  5258. </p></dd>
  5259. </dl>
  5260. </dd>
  5261. <dt><samp>color_trc <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5262. <dd><p>Possible values:
  5263. </p><dl compact="compact">
  5264. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  5265. <dd><p>BT.709
  5266. </p></dd>
  5267. <dt>&lsquo;<samp>gamma22</samp>&rsquo;</dt>
  5268. <dd><p>BT.470 M
  5269. </p></dd>
  5270. <dt>&lsquo;<samp>gamma28</samp>&rsquo;</dt>
  5271. <dd><p>BT.470 BG
  5272. </p></dd>
  5273. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  5274. <dd><p>SMPTE 170 M
  5275. </p></dd>
  5276. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  5277. <dd><p>SMPTE 240 M
  5278. </p></dd>
  5279. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  5280. <dd><p>Linear
  5281. </p></dd>
  5282. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  5283. <dt>&lsquo;<samp>log100</samp>&rsquo;</dt>
  5284. <dd><p>Log
  5285. </p></dd>
  5286. <dt>&lsquo;<samp>log_sqrt</samp>&rsquo;</dt>
  5287. <dt>&lsquo;<samp>log316</samp>&rsquo;</dt>
  5288. <dd><p>Log square root
  5289. </p></dd>
  5290. <dt>&lsquo;<samp>iec61966_2_4</samp>&rsquo;</dt>
  5291. <dt>&lsquo;<samp>iec61966-2-4</samp>&rsquo;</dt>
  5292. <dd><p>IEC 61966-2-4
  5293. </p></dd>
  5294. <dt>&lsquo;<samp>bt1361</samp>&rsquo;</dt>
  5295. <dt>&lsquo;<samp>bt1361e</samp>&rsquo;</dt>
  5296. <dd><p>BT.1361
  5297. </p></dd>
  5298. <dt>&lsquo;<samp>iec61966_2_1</samp>&rsquo;</dt>
  5299. <dt>&lsquo;<samp>iec61966-2-1</samp>&rsquo;</dt>
  5300. <dd><p>IEC 61966-2-1
  5301. </p></dd>
  5302. <dt>&lsquo;<samp>bt2020_10</samp>&rsquo;</dt>
  5303. <dt>&lsquo;<samp>bt2020_10bit</samp>&rsquo;</dt>
  5304. <dd><p>BT.2020 - 10 bit
  5305. </p></dd>
  5306. <dt>&lsquo;<samp>bt2020_12</samp>&rsquo;</dt>
  5307. <dt>&lsquo;<samp>bt2020_12bit</samp>&rsquo;</dt>
  5308. <dd><p>BT.2020 - 12 bit
  5309. </p></dd>
  5310. <dt>&lsquo;<samp>smpte2084</samp>&rsquo;</dt>
  5311. <dd><p>SMPTE ST 2084
  5312. </p></dd>
  5313. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  5314. <dt>&lsquo;<samp>smpte428_1</samp>&rsquo;</dt>
  5315. <dd><p>SMPTE ST 428-1
  5316. </p></dd>
  5317. <dt>&lsquo;<samp>arib-std-b67</samp>&rsquo;</dt>
  5318. <dd><p>ARIB STD-B67
  5319. </p></dd>
  5320. </dl>
  5321. </dd>
  5322. <dt><samp>colorspace <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5323. <dd><p>Possible values:
  5324. </p><dl compact="compact">
  5325. <dt>&lsquo;<samp>rgb</samp>&rsquo;</dt>
  5326. <dd><p>RGB
  5327. </p></dd>
  5328. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  5329. <dd><p>BT.709
  5330. </p></dd>
  5331. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  5332. <dd><p>FCC
  5333. </p></dd>
  5334. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  5335. <dd><p>BT.470 BG
  5336. </p></dd>
  5337. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  5338. <dd><p>SMPTE 170 M
  5339. </p></dd>
  5340. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  5341. <dd><p>SMPTE 240 M
  5342. </p></dd>
  5343. <dt>&lsquo;<samp>ycocg</samp>&rsquo;</dt>
  5344. <dd><p>YCOCG
  5345. </p></dd>
  5346. <dt>&lsquo;<samp>bt2020nc</samp>&rsquo;</dt>
  5347. <dt>&lsquo;<samp>bt2020_ncl</samp>&rsquo;</dt>
  5348. <dd><p>BT.2020 NCL
  5349. </p></dd>
  5350. <dt>&lsquo;<samp>bt2020c</samp>&rsquo;</dt>
  5351. <dt>&lsquo;<samp>bt2020_cl</samp>&rsquo;</dt>
  5352. <dd><p>BT.2020 CL
  5353. </p></dd>
  5354. <dt>&lsquo;<samp>smpte2085</samp>&rsquo;</dt>
  5355. <dd><p>SMPTE 2085
  5356. </p></dd>
  5357. <dt>&lsquo;<samp>chroma-derived-nc</samp>&rsquo;</dt>
  5358. <dd><p>Chroma-derived NCL
  5359. </p></dd>
  5360. <dt>&lsquo;<samp>chroma-derived-c</samp>&rsquo;</dt>
  5361. <dd><p>Chroma-derived CL
  5362. </p></dd>
  5363. <dt>&lsquo;<samp>ictcp</samp>&rsquo;</dt>
  5364. <dd><p>ICtCp
  5365. </p></dd>
  5366. </dl>
  5367. </dd>
  5368. <dt><samp>color_range <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5369. <dd><p>If used as input parameter, it serves as a hint to the decoder, which
  5370. color_range the input has.
  5371. Possible values:
  5372. </p><dl compact="compact">
  5373. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  5374. <dt>&lsquo;<samp>mpeg</samp>&rsquo;</dt>
  5375. <dd><p>MPEG (219*2^(n-8))
  5376. </p></dd>
  5377. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  5378. <dt>&lsquo;<samp>jpeg</samp>&rsquo;</dt>
  5379. <dd><p>JPEG (2^n-1)
  5380. </p></dd>
  5381. </dl>
  5382. </dd>
  5383. <dt><samp>chroma_sample_location <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5384. <dd><p>Possible values:
  5385. </p><dl compact="compact">
  5386. <dt>&lsquo;<samp>left</samp>&rsquo;</dt>
  5387. <dt>&lsquo;<samp>center</samp>&rsquo;</dt>
  5388. <dt>&lsquo;<samp>topleft</samp>&rsquo;</dt>
  5389. <dt>&lsquo;<samp>top</samp>&rsquo;</dt>
  5390. <dt>&lsquo;<samp>bottomleft</samp>&rsquo;</dt>
  5391. <dt>&lsquo;<samp>bottom</samp>&rsquo;</dt>
  5392. </dl>
  5393. </dd>
  5394. <dt><samp>log_level_offset <var>integer</var></samp></dt>
  5395. <dd><p>Set the log level offset.
  5396. </p>
  5397. </dd>
  5398. <dt><samp>slices <var>integer</var> (<em>encoding,video</em>)</samp></dt>
  5399. <dd><p>Number of slices, used in parallelized encoding.
  5400. </p>
  5401. </dd>
  5402. <dt><samp>thread_type <var>flags</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5403. <dd><p>Select which multithreading methods to use.
  5404. </p>
  5405. <p>Use of &lsquo;<samp>frame</samp>&rsquo; will increase decoding delay by one frame per
  5406. thread, so clients which cannot provide future frames should not use
  5407. it.
  5408. </p>
  5409. <p>Possible values:
  5410. </p><dl compact="compact">
  5411. <dt>&lsquo;<samp>slice</samp>&rsquo;</dt>
  5412. <dd><p>Decode more than one part of a single frame at once.
  5413. </p>
  5414. <p>Multithreading using slices works only when the video was encoded with
  5415. slices.
  5416. </p>
  5417. </dd>
  5418. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  5419. <dd><p>Decode more than one frame at once.
  5420. </p></dd>
  5421. </dl>
  5422. <p>Default value is &lsquo;<samp>slice+frame</samp>&rsquo;.
  5423. </p>
  5424. </dd>
  5425. <dt><samp>audio_service_type <var>integer</var> (<em>encoding,audio</em>)</samp></dt>
  5426. <dd><p>Set audio service type.
  5427. </p>
  5428. <p>Possible values:
  5429. </p><dl compact="compact">
  5430. <dt>&lsquo;<samp>ma</samp>&rsquo;</dt>
  5431. <dd><p>Main Audio Service
  5432. </p></dd>
  5433. <dt>&lsquo;<samp>ef</samp>&rsquo;</dt>
  5434. <dd><p>Effects
  5435. </p></dd>
  5436. <dt>&lsquo;<samp>vi</samp>&rsquo;</dt>
  5437. <dd><p>Visually Impaired
  5438. </p></dd>
  5439. <dt>&lsquo;<samp>hi</samp>&rsquo;</dt>
  5440. <dd><p>Hearing Impaired
  5441. </p></dd>
  5442. <dt>&lsquo;<samp>di</samp>&rsquo;</dt>
  5443. <dd><p>Dialogue
  5444. </p></dd>
  5445. <dt>&lsquo;<samp>co</samp>&rsquo;</dt>
  5446. <dd><p>Commentary
  5447. </p></dd>
  5448. <dt>&lsquo;<samp>em</samp>&rsquo;</dt>
  5449. <dd><p>Emergency
  5450. </p></dd>
  5451. <dt>&lsquo;<samp>vo</samp>&rsquo;</dt>
  5452. <dd><p>Voice Over
  5453. </p></dd>
  5454. <dt>&lsquo;<samp>ka</samp>&rsquo;</dt>
  5455. <dd><p>Karaoke
  5456. </p></dd>
  5457. </dl>
  5458. </dd>
  5459. <dt><samp>request_sample_fmt <var>sample_fmt</var> (<em>decoding,audio</em>)</samp></dt>
  5460. <dd><p>Set sample format audio decoders should prefer. Default value is
  5461. <code>none</code>.
  5462. </p>
  5463. </dd>
  5464. <dt><samp>pkt_timebase <var>rational number</var></samp></dt>
  5465. <dt><samp>sub_charenc <var>encoding</var> (<em>decoding,subtitles</em>)</samp></dt>
  5466. <dd><p>Set the input subtitles character encoding.
  5467. </p>
  5468. </dd>
  5469. <dt><samp>field_order <var>field_order</var> (<em>video</em>)</samp></dt>
  5470. <dd><p>Set/override the field order of the video.
  5471. Possible values:
  5472. </p><dl compact="compact">
  5473. <dt>&lsquo;<samp>progressive</samp>&rsquo;</dt>
  5474. <dd><p>Progressive video
  5475. </p></dd>
  5476. <dt>&lsquo;<samp>tt</samp>&rsquo;</dt>
  5477. <dd><p>Interlaced video, top field coded and displayed first
  5478. </p></dd>
  5479. <dt>&lsquo;<samp>bb</samp>&rsquo;</dt>
  5480. <dd><p>Interlaced video, bottom field coded and displayed first
  5481. </p></dd>
  5482. <dt>&lsquo;<samp>tb</samp>&rsquo;</dt>
  5483. <dd><p>Interlaced video, top coded first, bottom displayed first
  5484. </p></dd>
  5485. <dt>&lsquo;<samp>bt</samp>&rsquo;</dt>
  5486. <dd><p>Interlaced video, bottom coded first, top displayed first
  5487. </p></dd>
  5488. </dl>
  5489. </dd>
  5490. <dt><samp>skip_alpha <var>bool</var> (<em>decoding,video</em>)</samp></dt>
  5491. <dd><p>Set to 1 to disable processing alpha (transparency). This works like the
  5492. &lsquo;<samp>gray</samp>&rsquo; flag in the <samp>flags</samp> option which skips chroma information
  5493. instead of alpha. Default is 0.
  5494. </p>
  5495. </dd>
  5496. <dt><samp>codec_whitelist <var>list</var> (<em>input</em>)</samp></dt>
  5497. <dd><p>&quot;,&quot; separated list of allowed decoders. By default all are allowed.
  5498. </p>
  5499. </dd>
  5500. <dt><samp>dump_separator <var>string</var> (<em>input</em>)</samp></dt>
  5501. <dd><p>Separator used to separate the fields printed on the command line about the
  5502. Stream parameters.
  5503. For example, to separate the fields with newlines and indentation:
  5504. </p><div class="example">
  5505. <pre class="example">ffprobe -dump_separator &quot;
  5506. &quot; -i ~/videos/matrixbench_mpeg2.mpg
  5507. </pre></div>
  5508. </dd>
  5509. <dt><samp>max_pixels <var>integer</var> (<em>decoding/encoding,video</em>)</samp></dt>
  5510. <dd><p>Maximum number of pixels per image. This value can be used to avoid out of
  5511. memory failures due to large images.
  5512. </p>
  5513. </dd>
  5514. <dt><samp>apply_cropping <var>bool</var> (<em>decoding,video</em>)</samp></dt>
  5515. <dd><p>Enable cropping if cropping parameters are multiples of the required
  5516. alignment for the left and top parameters. If the alignment is not met the
  5517. cropping will be partially applied to maintain alignment.
  5518. Default is 1 (enabled).
  5519. Note: The required alignment depends on if <code>AV_CODEC_FLAG_UNALIGNED</code> is set and the
  5520. CPU. <code>AV_CODEC_FLAG_UNALIGNED</code> cannot be changed from the command line. Also hardware
  5521. decoders will not apply left/top Cropping.
  5522. </p>
  5523. </dd>
  5524. </dl>
  5525. <a name="Decoders"></a>
  5526. <h2 class="chapter">9 Decoders<span class="pull-right"><a class="anchor hidden-xs" href="#Decoders" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Decoders" aria-hidden="true">TOC</a></span></h2>
  5527. <p>Decoders are configured elements in FFmpeg which allow the decoding of
  5528. multimedia streams.
  5529. </p>
  5530. <p>When you configure your FFmpeg build, all the supported native decoders
  5531. are enabled by default. Decoders requiring an external library must be enabled
  5532. manually via the corresponding <code>--enable-lib</code> option. You can list all
  5533. available decoders using the configure option <code>--list-decoders</code>.
  5534. </p>
  5535. <p>You can disable all the decoders with the configure option
  5536. <code>--disable-decoders</code> and selectively enable / disable single decoders
  5537. with the options <code>--enable-decoder=<var>DECODER</var></code> /
  5538. <code>--disable-decoder=<var>DECODER</var></code>.
  5539. </p>
  5540. <p>The option <code>-decoders</code> of the ff* tools will display the list of
  5541. enabled decoders.
  5542. </p>
  5543. <a name="Video-Decoders"></a>
  5544. <h2 class="chapter">10 Video Decoders<span class="pull-right"><a class="anchor hidden-xs" href="#Video-Decoders" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Video-Decoders" aria-hidden="true">TOC</a></span></h2>
  5545. <p>A description of some of the currently available video decoders
  5546. follows.
  5547. </p>
  5548. <a name="av1"></a>
  5549. <h3 class="section">10.1 av1<span class="pull-right"><a class="anchor hidden-xs" href="#av1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-av1" aria-hidden="true">TOC</a></span></h3>
  5550. <p>AOMedia Video 1 (AV1) decoder.
  5551. </p>
  5552. <a name="Options-1"></a>
  5553. <h4 class="subsection">10.1.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-1" aria-hidden="true">TOC</a></span></h4>
  5554. <dl compact="compact">
  5555. <dt><samp>operating_point</samp></dt>
  5556. <dd><p>Select an operating point of a scalable AV1 bitstream (0 - 31). Default is 0.
  5557. </p>
  5558. </dd>
  5559. </dl>
  5560. <a name="rawvideo"></a>
  5561. <h3 class="section">10.2 rawvideo<span class="pull-right"><a class="anchor hidden-xs" href="#rawvideo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rawvideo" aria-hidden="true">TOC</a></span></h3>
  5562. <p>Raw video decoder.
  5563. </p>
  5564. <p>This decoder decodes rawvideo streams.
  5565. </p>
  5566. <a name="Options-2"></a>
  5567. <h4 class="subsection">10.2.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-2" aria-hidden="true">TOC</a></span></h4>
  5568. <dl compact="compact">
  5569. <dt><samp>top <var>top_field_first</var></samp></dt>
  5570. <dd><p>Specify the assumed field type of the input video.
  5571. </p><dl compact="compact">
  5572. <dt><samp>-1</samp></dt>
  5573. <dd><p>the video is assumed to be progressive (default)
  5574. </p></dd>
  5575. <dt><samp>0</samp></dt>
  5576. <dd><p>bottom-field-first is assumed
  5577. </p></dd>
  5578. <dt><samp>1</samp></dt>
  5579. <dd><p>top-field-first is assumed
  5580. </p></dd>
  5581. </dl>
  5582. </dd>
  5583. </dl>
  5584. <a name="libdav1d"></a>
  5585. <h3 class="section">10.3 libdav1d<span class="pull-right"><a class="anchor hidden-xs" href="#libdav1d" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libdav1d" aria-hidden="true">TOC</a></span></h3>
  5586. <p>dav1d AV1 decoder.
  5587. </p>
  5588. <p>libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
  5589. Requires the presence of the libdav1d headers and library during configuration.
  5590. You need to explicitly configure the build with <code>--enable-libdav1d</code>.
  5591. </p>
  5592. <a name="Options-3"></a>
  5593. <h4 class="subsection">10.3.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-3" aria-hidden="true">TOC</a></span></h4>
  5594. <p>The following options are supported by the libdav1d wrapper.
  5595. </p>
  5596. <dl compact="compact">
  5597. <dt><samp>framethreads</samp></dt>
  5598. <dd><p>Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
  5599. </p>
  5600. </dd>
  5601. <dt><samp>tilethreads</samp></dt>
  5602. <dd><p>Set amount of tile threads to use during decoding. The default value is 0 (autodetect).
  5603. </p>
  5604. </dd>
  5605. <dt><samp>filmgrain</samp></dt>
  5606. <dd><p>Apply film grain to the decoded video if present in the bitstream. Defaults to the
  5607. internal default of the library.
  5608. </p>
  5609. </dd>
  5610. <dt><samp>oppoint</samp></dt>
  5611. <dd><p>Select an operating point of a scalable AV1 bitstream (0 - 31). Defaults to the
  5612. internal default of the library.
  5613. </p>
  5614. </dd>
  5615. <dt><samp>alllayers</samp></dt>
  5616. <dd><p>Output all spatial layers of a scalable AV1 bitstream. The default value is false.
  5617. </p>
  5618. </dd>
  5619. </dl>
  5620. <a name="libdavs2"></a>
  5621. <h3 class="section">10.4 libdavs2<span class="pull-right"><a class="anchor hidden-xs" href="#libdavs2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libdavs2" aria-hidden="true">TOC</a></span></h3>
  5622. <p>AVS2-P2/IEEE1857.4 video decoder wrapper.
  5623. </p>
  5624. <p>This decoder allows libavcodec to decode AVS2 streams with davs2 library.
  5625. </p>
  5626. <a name="libuavs3d"></a>
  5627. <h3 class="section">10.5 libuavs3d<span class="pull-right"><a class="anchor hidden-xs" href="#libuavs3d" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libuavs3d" aria-hidden="true">TOC</a></span></h3>
  5628. <p>AVS3-P2/IEEE1857.10 video decoder.
  5629. </p>
  5630. <p>libuavs3d allows libavcodec to decode AVS3 streams.
  5631. Requires the presence of the libuavs3d headers and library during configuration.
  5632. You need to explicitly configure the build with <code>--enable-libuavs3d</code>.
  5633. </p>
  5634. <a name="Options-4"></a>
  5635. <h4 class="subsection">10.5.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-4" aria-hidden="true">TOC</a></span></h4>
  5636. <p>The following option is supported by the libuavs3d wrapper.
  5637. </p>
  5638. <dl compact="compact">
  5639. <dt><samp>frame_threads</samp></dt>
  5640. <dd><p>Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
  5641. </p>
  5642. </dd>
  5643. </dl>
  5644. <a name="Audio-Decoders"></a>
  5645. <h2 class="chapter">11 Audio Decoders<span class="pull-right"><a class="anchor hidden-xs" href="#Audio-Decoders" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Audio-Decoders" aria-hidden="true">TOC</a></span></h2>
  5646. <p>A description of some of the currently available audio decoders
  5647. follows.
  5648. </p>
  5649. <a name="ac3"></a>
  5650. <h3 class="section">11.1 ac3<span class="pull-right"><a class="anchor hidden-xs" href="#ac3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ac3" aria-hidden="true">TOC</a></span></h3>
  5651. <p>AC-3 audio decoder.
  5652. </p>
  5653. <p>This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
  5654. the undocumented RealAudio 3 (a.k.a. dnet).
  5655. </p>
  5656. <a name="AC_002d3-Decoder-Options"></a>
  5657. <h4 class="subsection">11.1.1 AC-3 Decoder Options<span class="pull-right"><a class="anchor hidden-xs" href="#AC_002d3-Decoder-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-AC_002d3-Decoder-Options" aria-hidden="true">TOC</a></span></h4>
  5658. <dl compact="compact">
  5659. <dt><samp>-drc_scale <var>value</var></samp></dt>
  5660. <dd><p>Dynamic Range Scale Factor. The factor to apply to dynamic range values
  5661. from the AC-3 stream. This factor is applied exponentially. The default value is 1.
  5662. There are 3 notable scale factor ranges:
  5663. </p><dl compact="compact">
  5664. <dt><samp>drc_scale == 0</samp></dt>
  5665. <dd><p>DRC disabled. Produces full range audio.
  5666. </p></dd>
  5667. <dt><samp>0 &lt; drc_scale &lt;= 1</samp></dt>
  5668. <dd><p>DRC enabled. Applies a fraction of the stream DRC value.
  5669. Audio reproduction is between full range and full compression.
  5670. </p></dd>
  5671. <dt><samp>drc_scale &gt; 1</samp></dt>
  5672. <dd><p>DRC enabled. Applies drc_scale asymmetrically.
  5673. Loud sounds are fully compressed. Soft sounds are enhanced.
  5674. </p></dd>
  5675. </dl>
  5676. </dd>
  5677. </dl>
  5678. <a name="flac"></a>
  5679. <h3 class="section">11.2 flac<span class="pull-right"><a class="anchor hidden-xs" href="#flac" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-flac" aria-hidden="true">TOC</a></span></h3>
  5680. <p>FLAC audio decoder.
  5681. </p>
  5682. <p>This decoder aims to implement the complete FLAC specification from Xiph.
  5683. </p>
  5684. <a name="FLAC-Decoder-options"></a>
  5685. <h4 class="subsection">11.2.1 FLAC Decoder options<span class="pull-right"><a class="anchor hidden-xs" href="#FLAC-Decoder-options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-FLAC-Decoder-options" aria-hidden="true">TOC</a></span></h4>
  5686. <dl compact="compact">
  5687. <dt><samp>-use_buggy_lpc</samp></dt>
  5688. <dd><p>The lavc FLAC encoder used to produce buggy streams with high lpc values
  5689. (like the default value). This option makes it possible to decode such streams
  5690. correctly by using lavc&rsquo;s old buggy lpc logic for decoding.
  5691. </p>
  5692. </dd>
  5693. </dl>
  5694. <a name="ffwavesynth"></a>
  5695. <h3 class="section">11.3 ffwavesynth<span class="pull-right"><a class="anchor hidden-xs" href="#ffwavesynth" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ffwavesynth" aria-hidden="true">TOC</a></span></h3>
  5696. <p>Internal wave synthesizer.
  5697. </p>
  5698. <p>This decoder generates wave patterns according to predefined sequences. Its
  5699. use is purely internal and the format of the data it accepts is not publicly
  5700. documented.
  5701. </p>
  5702. <a name="libcelt"></a>
  5703. <h3 class="section">11.4 libcelt<span class="pull-right"><a class="anchor hidden-xs" href="#libcelt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libcelt" aria-hidden="true">TOC</a></span></h3>
  5704. <p>libcelt decoder wrapper.
  5705. </p>
  5706. <p>libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
  5707. Requires the presence of the libcelt headers and library during configuration.
  5708. You need to explicitly configure the build with <code>--enable-libcelt</code>.
  5709. </p>
  5710. <a name="libgsm"></a>
  5711. <h3 class="section">11.5 libgsm<span class="pull-right"><a class="anchor hidden-xs" href="#libgsm" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libgsm" aria-hidden="true">TOC</a></span></h3>
  5712. <p>libgsm decoder wrapper.
  5713. </p>
  5714. <p>libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
  5715. the presence of the libgsm headers and library during configuration. You need
  5716. to explicitly configure the build with <code>--enable-libgsm</code>.
  5717. </p>
  5718. <p>This decoder supports both the ordinary GSM and the Microsoft variant.
  5719. </p>
  5720. <a name="libilbc"></a>
  5721. <h3 class="section">11.6 libilbc<span class="pull-right"><a class="anchor hidden-xs" href="#libilbc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libilbc" aria-hidden="true">TOC</a></span></h3>
  5722. <p>libilbc decoder wrapper.
  5723. </p>
  5724. <p>libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
  5725. audio codec. Requires the presence of the libilbc headers and library during
  5726. configuration. You need to explicitly configure the build with
  5727. <code>--enable-libilbc</code>.
  5728. </p>
  5729. <a name="Options-5"></a>
  5730. <h4 class="subsection">11.6.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-5" aria-hidden="true">TOC</a></span></h4>
  5731. <p>The following option is supported by the libilbc wrapper.
  5732. </p>
  5733. <dl compact="compact">
  5734. <dt><samp>enhance</samp></dt>
  5735. <dd>
  5736. <p>Enable the enhancement of the decoded audio when set to 1. The default
  5737. value is 0 (disabled).
  5738. </p>
  5739. </dd>
  5740. </dl>
  5741. <a name="libopencore_002damrnb"></a>
  5742. <h3 class="section">11.7 libopencore-amrnb<span class="pull-right"><a class="anchor hidden-xs" href="#libopencore_002damrnb" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libopencore_002damrnb" aria-hidden="true">TOC</a></span></h3>
  5743. <p>libopencore-amrnb decoder wrapper.
  5744. </p>
  5745. <p>libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
  5746. Narrowband audio codec. Using it requires the presence of the
  5747. libopencore-amrnb headers and library during configuration. You need to
  5748. explicitly configure the build with <code>--enable-libopencore-amrnb</code>.
  5749. </p>
  5750. <p>An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
  5751. without this library.
  5752. </p>
  5753. <a name="libopencore_002damrwb"></a>
  5754. <h3 class="section">11.8 libopencore-amrwb<span class="pull-right"><a class="anchor hidden-xs" href="#libopencore_002damrwb" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libopencore_002damrwb" aria-hidden="true">TOC</a></span></h3>
  5755. <p>libopencore-amrwb decoder wrapper.
  5756. </p>
  5757. <p>libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
  5758. Wideband audio codec. Using it requires the presence of the
  5759. libopencore-amrwb headers and library during configuration. You need to
  5760. explicitly configure the build with <code>--enable-libopencore-amrwb</code>.
  5761. </p>
  5762. <p>An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
  5763. without this library.
  5764. </p>
  5765. <a name="libopus"></a>
  5766. <h3 class="section">11.9 libopus<span class="pull-right"><a class="anchor hidden-xs" href="#libopus" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libopus" aria-hidden="true">TOC</a></span></h3>
  5767. <p>libopus decoder wrapper.
  5768. </p>
  5769. <p>libopus allows libavcodec to decode the Opus Interactive Audio Codec.
  5770. Requires the presence of the libopus headers and library during
  5771. configuration. You need to explicitly configure the build with
  5772. <code>--enable-libopus</code>.
  5773. </p>
  5774. <p>An FFmpeg native decoder for Opus exists, so users can decode Opus
  5775. without this library.
  5776. </p>
  5777. <a name="Subtitles-Decoders"></a>
  5778. <h2 class="chapter">12 Subtitles Decoders<span class="pull-right"><a class="anchor hidden-xs" href="#Subtitles-Decoders" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Subtitles-Decoders" aria-hidden="true">TOC</a></span></h2>
  5779. <a name="libaribb24"></a>
  5780. <h3 class="section">12.1 libaribb24<span class="pull-right"><a class="anchor hidden-xs" href="#libaribb24" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libaribb24" aria-hidden="true">TOC</a></span></h3>
  5781. <p>ARIB STD-B24 caption decoder.
  5782. </p>
  5783. <p>Implements profiles A and C of the ARIB STD-B24 standard.
  5784. </p>
  5785. <a name="libaribb24-Decoder-Options"></a>
  5786. <h4 class="subsection">12.1.1 libaribb24 Decoder Options<span class="pull-right"><a class="anchor hidden-xs" href="#libaribb24-Decoder-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libaribb24-Decoder-Options" aria-hidden="true">TOC</a></span></h4>
  5787. <dl compact="compact">
  5788. <dt><samp>-aribb24-base-path <var>path</var></samp></dt>
  5789. <dd><p>Sets the base path for the libaribb24 library. This is utilized for reading of
  5790. configuration files (for custom unicode conversions), and for dumping of
  5791. non-text symbols as images under that location.
  5792. </p>
  5793. <p>Unset by default.
  5794. </p>
  5795. </dd>
  5796. <dt><samp>-aribb24-skip-ruby-text <var>boolean</var></samp></dt>
  5797. <dd><p>Tells the decoder wrapper to skip text blocks that contain half-height ruby
  5798. text.
  5799. </p>
  5800. <p>Enabled by default.
  5801. </p>
  5802. </dd>
  5803. </dl>
  5804. <a name="dvbsub"></a>
  5805. <h3 class="section">12.2 dvbsub<span class="pull-right"><a class="anchor hidden-xs" href="#dvbsub" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dvbsub" aria-hidden="true">TOC</a></span></h3>
  5806. <a name="Options-6"></a>
  5807. <h4 class="subsection">12.2.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-6" aria-hidden="true">TOC</a></span></h4>
  5808. <dl compact="compact">
  5809. <dt><samp>compute_clut</samp></dt>
  5810. <dd><dl compact="compact">
  5811. <dt><samp>-1</samp></dt>
  5812. <dd><p>Compute clut if no matching CLUT is in the stream.
  5813. </p></dd>
  5814. <dt><samp>0</samp></dt>
  5815. <dd><p>Never compute CLUT
  5816. </p></dd>
  5817. <dt><samp>1</samp></dt>
  5818. <dd><p>Always compute CLUT and override the one provided in the stream.
  5819. </p></dd>
  5820. </dl>
  5821. </dd>
  5822. <dt><samp>dvb_substream</samp></dt>
  5823. <dd><p>Selects the dvb substream, or all substreams if -1 which is default.
  5824. </p>
  5825. </dd>
  5826. </dl>
  5827. <a name="dvdsub"></a>
  5828. <h3 class="section">12.3 dvdsub<span class="pull-right"><a class="anchor hidden-xs" href="#dvdsub" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dvdsub" aria-hidden="true">TOC</a></span></h3>
  5829. <p>This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
  5830. also be found in VobSub file pairs and in some Matroska files.
  5831. </p>
  5832. <a name="Options-7"></a>
  5833. <h4 class="subsection">12.3.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-7" aria-hidden="true">TOC</a></span></h4>
  5834. <dl compact="compact">
  5835. <dt><samp>palette</samp></dt>
  5836. <dd><p>Specify the global palette used by the bitmaps. When stored in VobSub, the
  5837. palette is normally specified in the index file; in Matroska, the palette is
  5838. stored in the codec extra-data in the same format as in VobSub. In DVDs, the
  5839. palette is stored in the IFO file, and therefore not available when reading
  5840. from dumped VOB files.
  5841. </p>
  5842. <p>The format for this option is a string containing 16 24-bits hexadecimal
  5843. numbers (without 0x prefix) separated by commas, for example <code>0d00ee,
  5844. ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
  5845. 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b</code>.
  5846. </p>
  5847. </dd>
  5848. <dt><samp>ifo_palette</samp></dt>
  5849. <dd><p>Specify the IFO file from which the global palette is obtained.
  5850. (experimental)
  5851. </p>
  5852. </dd>
  5853. <dt><samp>forced_subs_only</samp></dt>
  5854. <dd><p>Only decode subtitle entries marked as forced. Some titles have forced
  5855. and non-forced subtitles in the same track. Setting this flag to <code>1</code>
  5856. will only keep the forced subtitles. Default value is <code>0</code>.
  5857. </p></dd>
  5858. </dl>
  5859. <a name="libzvbi_002dteletext"></a>
  5860. <h3 class="section">12.4 libzvbi-teletext<span class="pull-right"><a class="anchor hidden-xs" href="#libzvbi_002dteletext" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libzvbi_002dteletext" aria-hidden="true">TOC</a></span></h3>
  5861. <p>Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
  5862. subtitles. Requires the presence of the libzvbi headers and library during
  5863. configuration. You need to explicitly configure the build with
  5864. <code>--enable-libzvbi</code>.
  5865. </p>
  5866. <a name="Options-8"></a>
  5867. <h4 class="subsection">12.4.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-8" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-8" aria-hidden="true">TOC</a></span></h4>
  5868. <dl compact="compact">
  5869. <dt><samp>txt_page</samp></dt>
  5870. <dd><p>List of teletext page numbers to decode. Pages that do not match the specified
  5871. list are dropped. You may use the special <code>*</code> string to match all pages,
  5872. or <code>subtitle</code> to match all subtitle pages.
  5873. Default value is *.
  5874. </p></dd>
  5875. <dt><samp>txt_default_region</samp></dt>
  5876. <dd><p>Set default character set used for decoding, a value between 0 and 87 (see
  5877. ETS 300 706, Section 15, Table 32). Default value is -1, which does not
  5878. override the libzvbi default. This option is needed for some legacy level 1.0
  5879. transmissions which cannot signal the proper charset.
  5880. </p></dd>
  5881. <dt><samp>txt_chop_top</samp></dt>
  5882. <dd><p>Discards the top teletext line. Default value is 1.
  5883. </p></dd>
  5884. <dt><samp>txt_format</samp></dt>
  5885. <dd><p>Specifies the format of the decoded subtitles.
  5886. </p><dl compact="compact">
  5887. <dt><samp>bitmap</samp></dt>
  5888. <dd><p>The default format, you should use this for teletext pages, because certain
  5889. graphics and colors cannot be expressed in simple text or even ASS.
  5890. </p></dd>
  5891. <dt><samp>text</samp></dt>
  5892. <dd><p>Simple text based output without formatting.
  5893. </p></dd>
  5894. <dt><samp>ass</samp></dt>
  5895. <dd><p>Formatted ASS output, subtitle pages and teletext pages are returned in
  5896. different styles, subtitle pages are stripped down to text, but an effort is
  5897. made to keep the text alignment and the formatting.
  5898. </p></dd>
  5899. </dl>
  5900. </dd>
  5901. <dt><samp>txt_left</samp></dt>
  5902. <dd><p>X offset of generated bitmaps, default is 0.
  5903. </p></dd>
  5904. <dt><samp>txt_top</samp></dt>
  5905. <dd><p>Y offset of generated bitmaps, default is 0.
  5906. </p></dd>
  5907. <dt><samp>txt_chop_spaces</samp></dt>
  5908. <dd><p>Chops leading and trailing spaces and removes empty lines from the generated
  5909. text. This option is useful for teletext based subtitles where empty spaces may
  5910. be present at the start or at the end of the lines or empty lines may be
  5911. present between the subtitle lines because of double-sized teletext characters.
  5912. Default value is 1.
  5913. </p></dd>
  5914. <dt><samp>txt_duration</samp></dt>
  5915. <dd><p>Sets the display duration of the decoded teletext pages or subtitles in
  5916. milliseconds. Default value is -1 which means infinity or until the next
  5917. subtitle event comes.
  5918. </p></dd>
  5919. <dt><samp>txt_transparent</samp></dt>
  5920. <dd><p>Force transparent background of the generated teletext bitmaps. Default value
  5921. is 0 which means an opaque background.
  5922. </p></dd>
  5923. <dt><samp>txt_opacity</samp></dt>
  5924. <dd><p>Sets the opacity (0-255) of the teletext background. If
  5925. <samp>txt_transparent</samp> is not set, it only affects characters between a start
  5926. box and an end box, typically subtitles. Default value is 0 if
  5927. <samp>txt_transparent</samp> is set, 255 otherwise.
  5928. </p>
  5929. </dd>
  5930. </dl>
  5931. <a name="Bitstream-Filters"></a>
  5932. <h2 class="chapter">13 Bitstream Filters<span class="pull-right"><a class="anchor hidden-xs" href="#Bitstream-Filters" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Bitstream-Filters" aria-hidden="true">TOC</a></span></h2>
  5933. <p>When you configure your FFmpeg build, all the supported bitstream
  5934. filters are enabled by default. You can list all available ones using
  5935. the configure option <code>--list-bsfs</code>.
  5936. </p>
  5937. <p>You can disable all the bitstream filters using the configure option
  5938. <code>--disable-bsfs</code>, and selectively enable any bitstream filter using
  5939. the option <code>--enable-bsf=BSF</code>, or you can disable a particular
  5940. bitstream filter using the option <code>--disable-bsf=BSF</code>.
  5941. </p>
  5942. <p>The option <code>-bsfs</code> of the ff* tools will display the list of
  5943. all the supported bitstream filters included in your build.
  5944. </p>
  5945. <p>The ff* tools have a -bsf option applied per stream, taking a
  5946. comma-separated list of filters, whose parameters follow the filter
  5947. name after a &rsquo;=&rsquo;.
  5948. </p>
  5949. <div class="example">
  5950. <pre class="example">ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
  5951. </pre></div>
  5952. <p>Below is a description of the currently available bitstream filters,
  5953. with their parameters, if any.
  5954. </p>
  5955. <a name="aac_005fadtstoasc"></a>
  5956. <h3 class="section">13.1 aac_adtstoasc<span class="pull-right"><a class="anchor hidden-xs" href="#aac_005fadtstoasc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aac_005fadtstoasc" aria-hidden="true">TOC</a></span></h3>
  5957. <p>Convert MPEG-2/4 AAC ADTS to an MPEG-4 Audio Specific Configuration
  5958. bitstream.
  5959. </p>
  5960. <p>This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4
  5961. ADTS header and removes the ADTS header.
  5962. </p>
  5963. <p>This filter is required for example when copying an AAC stream from a
  5964. raw ADTS AAC or an MPEG-TS container to MP4A-LATM, to an FLV file, or
  5965. to MOV/MP4 files and related formats such as 3GP or M4A. Please note
  5966. that it is auto-inserted for MP4A-LATM and MOV/MP4 and related formats.
  5967. </p>
  5968. <a name="av1_005fmetadata"></a>
  5969. <h3 class="section">13.2 av1_metadata<span class="pull-right"><a class="anchor hidden-xs" href="#av1_005fmetadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-av1_005fmetadata" aria-hidden="true">TOC</a></span></h3>
  5970. <p>Modify metadata embedded in an AV1 stream.
  5971. </p>
  5972. <dl compact="compact">
  5973. <dt><samp>td</samp></dt>
  5974. <dd><p>Insert or remove temporal delimiter OBUs in all temporal units of the
  5975. stream.
  5976. </p>
  5977. <dl compact="compact">
  5978. <dt>&lsquo;<samp>insert</samp>&rsquo;</dt>
  5979. <dd><p>Insert a TD at the beginning of every TU which does not already have one.
  5980. </p></dd>
  5981. <dt>&lsquo;<samp>remove</samp>&rsquo;</dt>
  5982. <dd><p>Remove the TD from the beginning of every TU which has one.
  5983. </p></dd>
  5984. </dl>
  5985. </dd>
  5986. <dt><samp>color_primaries</samp></dt>
  5987. <dt><samp>transfer_characteristics</samp></dt>
  5988. <dt><samp>matrix_coefficients</samp></dt>
  5989. <dd><p>Set the color description fields in the stream (see AV1 section 6.4.2).
  5990. </p>
  5991. </dd>
  5992. <dt><samp>color_range</samp></dt>
  5993. <dd><p>Set the color range in the stream (see AV1 section 6.4.2; note that
  5994. this cannot be set for streams using BT.709 primaries, sRGB transfer
  5995. characteristic and identity (RGB) matrix coefficients).
  5996. </p><dl compact="compact">
  5997. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  5998. <dd><p>Limited range.
  5999. </p></dd>
  6000. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  6001. <dd><p>Full range.
  6002. </p></dd>
  6003. </dl>
  6004. </dd>
  6005. <dt><samp>chroma_sample_position</samp></dt>
  6006. <dd><p>Set the chroma sample location in the stream (see AV1 section 6.4.2).
  6007. This can only be set for 4:2:0 streams.
  6008. </p>
  6009. <dl compact="compact">
  6010. <dt>&lsquo;<samp>vertical</samp>&rsquo;</dt>
  6011. <dd><p>Left position (matching the default in MPEG-2 and H.264).
  6012. </p></dd>
  6013. <dt>&lsquo;<samp>colocated</samp>&rsquo;</dt>
  6014. <dd><p>Top-left position.
  6015. </p></dd>
  6016. </dl>
  6017. </dd>
  6018. <dt><samp>tick_rate</samp></dt>
  6019. <dd><p>Set the tick rate (<em>num_units_in_display_tick / time_scale</em>) in
  6020. the timing info in the sequence header.
  6021. </p></dd>
  6022. <dt><samp>num_ticks_per_picture</samp></dt>
  6023. <dd><p>Set the number of ticks in each picture, to indicate that the stream
  6024. has a fixed framerate. Ignored if <samp>tick_rate</samp> is not also set.
  6025. </p>
  6026. </dd>
  6027. <dt><samp>delete_padding</samp></dt>
  6028. <dd><p>Deletes Padding OBUs.
  6029. </p>
  6030. </dd>
  6031. </dl>
  6032. <a name="chomp"></a>
  6033. <h3 class="section">13.3 chomp<span class="pull-right"><a class="anchor hidden-xs" href="#chomp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-chomp" aria-hidden="true">TOC</a></span></h3>
  6034. <p>Remove zero padding at the end of a packet.
  6035. </p>
  6036. <a name="dca_005fcore"></a>
  6037. <h3 class="section">13.4 dca_core<span class="pull-right"><a class="anchor hidden-xs" href="#dca_005fcore" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dca_005fcore" aria-hidden="true">TOC</a></span></h3>
  6038. <p>Extract the core from a DCA/DTS stream, dropping extensions such as
  6039. DTS-HD.
  6040. </p>
  6041. <a name="dump_005fextra"></a>
  6042. <h3 class="section">13.5 dump_extra<span class="pull-right"><a class="anchor hidden-xs" href="#dump_005fextra" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dump_005fextra" aria-hidden="true">TOC</a></span></h3>
  6043. <p>Add extradata to the beginning of the filtered packets except when
  6044. said packets already exactly begin with the extradata that is intended
  6045. to be added.
  6046. </p>
  6047. <dl compact="compact">
  6048. <dt><samp>freq</samp></dt>
  6049. <dd><p>The additional argument specifies which packets should be filtered.
  6050. It accepts the values:
  6051. </p><dl compact="compact">
  6052. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  6053. <dt>&lsquo;<samp>keyframe</samp>&rsquo;</dt>
  6054. <dd><p>add extradata to all key packets
  6055. </p>
  6056. </dd>
  6057. <dt>&lsquo;<samp>e</samp>&rsquo;</dt>
  6058. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  6059. <dd><p>add extradata to all packets
  6060. </p></dd>
  6061. </dl>
  6062. </dd>
  6063. </dl>
  6064. <p>If not specified it is assumed &lsquo;<samp>k</samp>&rsquo;.
  6065. </p>
  6066. <p>For example the following <code>ffmpeg</code> command forces a global
  6067. header (thus disabling individual packet headers) in the H.264 packets
  6068. generated by the <code>libx264</code> encoder, but corrects them by adding
  6069. the header stored in extradata to the key packets:
  6070. </p><div class="example">
  6071. <pre class="example">ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
  6072. </pre></div>
  6073. <a name="eac3_005fcore"></a>
  6074. <h3 class="section">13.6 eac3_core<span class="pull-right"><a class="anchor hidden-xs" href="#eac3_005fcore" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-eac3_005fcore" aria-hidden="true">TOC</a></span></h3>
  6075. <p>Extract the core from a E-AC-3 stream, dropping extra channels.
  6076. </p>
  6077. <a name="extract_005fextradata"></a>
  6078. <h3 class="section">13.7 extract_extradata<span class="pull-right"><a class="anchor hidden-xs" href="#extract_005fextradata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-extract_005fextradata" aria-hidden="true">TOC</a></span></h3>
  6079. <p>Extract the in-band extradata.
  6080. </p>
  6081. <p>Certain codecs allow the long-term headers (e.g. MPEG-2 sequence headers,
  6082. or H.264/HEVC (VPS/)SPS/PPS) to be transmitted either &quot;in-band&quot; (i.e. as a part
  6083. of the bitstream containing the coded frames) or &quot;out of band&quot; (e.g. on the
  6084. container level). This latter form is called &quot;extradata&quot; in FFmpeg terminology.
  6085. </p>
  6086. <p>This bitstream filter detects the in-band headers and makes them available as
  6087. extradata.
  6088. </p>
  6089. <dl compact="compact">
  6090. <dt><samp>remove</samp></dt>
  6091. <dd><p>When this option is enabled, the long-term headers are removed from the
  6092. bitstream after extraction.
  6093. </p></dd>
  6094. </dl>
  6095. <a name="filter_005funits"></a>
  6096. <h3 class="section">13.8 filter_units<span class="pull-right"><a class="anchor hidden-xs" href="#filter_005funits" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-filter_005funits" aria-hidden="true">TOC</a></span></h3>
  6097. <p>Remove units with types in or not in a given set from the stream.
  6098. </p>
  6099. <dl compact="compact">
  6100. <dt><samp>pass_types</samp></dt>
  6101. <dd><p>List of unit types or ranges of unit types to pass through while removing
  6102. all others. This is specified as a &rsquo;|&rsquo;-separated list of unit type values
  6103. or ranges of values with &rsquo;-&rsquo;.
  6104. </p>
  6105. </dd>
  6106. <dt><samp>remove_types</samp></dt>
  6107. <dd><p>Identical to <samp>pass_types</samp>, except the units in the given set
  6108. removed and all others passed through.
  6109. </p></dd>
  6110. </dl>
  6111. <p>Extradata is unchanged by this transformation, but note that if the stream
  6112. contains inline parameter sets then the output may be unusable if they are
  6113. removed.
  6114. </p>
  6115. <p>For example, to remove all non-VCL NAL units from an H.264 stream:
  6116. </p><div class="example">
  6117. <pre class="example">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT
  6118. </pre></div>
  6119. <p>To remove all AUDs, SEI and filler from an H.265 stream:
  6120. </p><div class="example">
  6121. <pre class="example">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
  6122. </pre></div>
  6123. <a name="hapqa_005fextract"></a>
  6124. <h3 class="section">13.9 hapqa_extract<span class="pull-right"><a class="anchor hidden-xs" href="#hapqa_005fextract" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hapqa_005fextract" aria-hidden="true">TOC</a></span></h3>
  6125. <p>Extract Rgb or Alpha part of an HAPQA file, without recompression, in order to create an HAPQ or an HAPAlphaOnly file.
  6126. </p>
  6127. <dl compact="compact">
  6128. <dt><samp>texture</samp></dt>
  6129. <dd><p>Specifies the texture to keep.
  6130. </p>
  6131. <dl compact="compact">
  6132. <dt><samp>color</samp></dt>
  6133. <dt><samp>alpha</samp></dt>
  6134. </dl>
  6135. </dd>
  6136. </dl>
  6137. <p>Convert HAPQA to HAPQ
  6138. </p><div class="example">
  6139. <pre class="example">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
  6140. </pre></div>
  6141. <p>Convert HAPQA to HAPAlphaOnly
  6142. </p><div class="example">
  6143. <pre class="example">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
  6144. </pre></div>
  6145. <a name="h264_005fmetadata"></a>
  6146. <h3 class="section">13.10 h264_metadata<span class="pull-right"><a class="anchor hidden-xs" href="#h264_005fmetadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-h264_005fmetadata" aria-hidden="true">TOC</a></span></h3>
  6147. <p>Modify metadata embedded in an H.264 stream.
  6148. </p>
  6149. <dl compact="compact">
  6150. <dt><samp>aud</samp></dt>
  6151. <dd><p>Insert or remove AUD NAL units in all access units of the stream.
  6152. </p>
  6153. <dl compact="compact">
  6154. <dt>&lsquo;<samp>insert</samp>&rsquo;</dt>
  6155. <dt>&lsquo;<samp>remove</samp>&rsquo;</dt>
  6156. </dl>
  6157. </dd>
  6158. <dt><samp>sample_aspect_ratio</samp></dt>
  6159. <dd><p>Set the sample aspect ratio of the stream in the VUI parameters.
  6160. </p>
  6161. </dd>
  6162. <dt><samp>overscan_appropriate_flag</samp></dt>
  6163. <dd><p>Set whether the stream is suitable for display using overscan
  6164. or not (see H.264 section E.2.1).
  6165. </p>
  6166. </dd>
  6167. <dt><samp>video_format</samp></dt>
  6168. <dt><samp>video_full_range_flag</samp></dt>
  6169. <dd><p>Set the video format in the stream (see H.264 section E.2.1 and
  6170. table E-2).
  6171. </p>
  6172. </dd>
  6173. <dt><samp>colour_primaries</samp></dt>
  6174. <dt><samp>transfer_characteristics</samp></dt>
  6175. <dt><samp>matrix_coefficients</samp></dt>
  6176. <dd><p>Set the colour description in the stream (see H.264 section E.2.1
  6177. and tables E-3, E-4 and E-5).
  6178. </p>
  6179. </dd>
  6180. <dt><samp>chroma_sample_loc_type</samp></dt>
  6181. <dd><p>Set the chroma sample location in the stream (see H.264 section
  6182. E.2.1 and figure E-1).
  6183. </p>
  6184. </dd>
  6185. <dt><samp>tick_rate</samp></dt>
  6186. <dd><p>Set the tick rate (num_units_in_tick / time_scale) in the VUI
  6187. parameters. This is the smallest time unit representable in the
  6188. stream, and in many cases represents the field rate of the stream
  6189. (double the frame rate).
  6190. </p></dd>
  6191. <dt><samp>fixed_frame_rate_flag</samp></dt>
  6192. <dd><p>Set whether the stream has fixed framerate - typically this indicates
  6193. that the framerate is exactly half the tick rate, but the exact
  6194. meaning is dependent on interlacing and the picture structure (see
  6195. H.264 section E.2.1 and table E-6).
  6196. </p>
  6197. </dd>
  6198. <dt><samp>crop_left</samp></dt>
  6199. <dt><samp>crop_right</samp></dt>
  6200. <dt><samp>crop_top</samp></dt>
  6201. <dt><samp>crop_bottom</samp></dt>
  6202. <dd><p>Set the frame cropping offsets in the SPS. These values will replace
  6203. the current ones if the stream is already cropped.
  6204. </p>
  6205. <p>These fields are set in pixels. Note that some sizes may not be
  6206. representable if the chroma is subsampled or the stream is interlaced
  6207. (see H.264 section 7.4.2.1.1).
  6208. </p>
  6209. </dd>
  6210. <dt><samp>sei_user_data</samp></dt>
  6211. <dd><p>Insert a string as SEI unregistered user data. The argument must
  6212. be of the form <em>UUID+string</em>, where the UUID is as hex digits
  6213. possibly separated by hyphens, and the string can be anything.
  6214. </p>
  6215. <p>For example, &lsquo;<samp>086f3693-b7b3-4f2c-9653-21492feee5b8+hello</samp>&rsquo; will
  6216. insert the string &ldquo;hello&rdquo; associated with the given UUID.
  6217. </p>
  6218. </dd>
  6219. <dt><samp>delete_filler</samp></dt>
  6220. <dd><p>Deletes both filler NAL units and filler SEI messages.
  6221. </p>
  6222. </dd>
  6223. <dt><samp>level</samp></dt>
  6224. <dd><p>Set the level in the SPS. Refer to H.264 section A.3 and tables A-1
  6225. to A-5.
  6226. </p>
  6227. <p>The argument must be the name of a level (for example, &lsquo;<samp>4.2</samp>&rsquo;), a
  6228. level_idc value (for example, &lsquo;<samp>42</samp>&rsquo;), or the special name &lsquo;<samp>auto</samp>&rsquo;
  6229. indicating that the filter should attempt to guess the level from the
  6230. input stream properties.
  6231. </p>
  6232. </dd>
  6233. </dl>
  6234. <a name="h264_005fmp4toannexb"></a>
  6235. <h3 class="section">13.11 h264_mp4toannexb<span class="pull-right"><a class="anchor hidden-xs" href="#h264_005fmp4toannexb" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-h264_005fmp4toannexb" aria-hidden="true">TOC</a></span></h3>
  6236. <p>Convert an H.264 bitstream from length prefixed mode to start code
  6237. prefixed mode (as defined in the Annex B of the ITU-T H.264
  6238. specification).
  6239. </p>
  6240. <p>This is required by some streaming formats, typically the MPEG-2
  6241. transport stream format (muxer <code>mpegts</code>).
  6242. </p>
  6243. <p>For example to remux an MP4 file containing an H.264 stream to mpegts
  6244. format with <code>ffmpeg</code>, you can use the command:
  6245. </p>
  6246. <div class="example">
  6247. <pre class="example">ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
  6248. </pre></div>
  6249. <p>Please note that this filter is auto-inserted for MPEG-TS (muxer
  6250. <code>mpegts</code>) and raw H.264 (muxer <code>h264</code>) output formats.
  6251. </p>
  6252. <a name="h264_005fredundant_005fpps"></a>
  6253. <h3 class="section">13.12 h264_redundant_pps<span class="pull-right"><a class="anchor hidden-xs" href="#h264_005fredundant_005fpps" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-h264_005fredundant_005fpps" aria-hidden="true">TOC</a></span></h3>
  6254. <p>This applies a specific fixup to some Blu-ray streams which contain
  6255. redundant PPSs modifying irrelevant parameters of the stream which
  6256. confuse other transformations which require correct extradata.
  6257. </p>
  6258. <p>A new single global PPS is created, and all of the redundant PPSs
  6259. within the stream are removed.
  6260. </p>
  6261. <a name="hevc_005fmetadata"></a>
  6262. <h3 class="section">13.13 hevc_metadata<span class="pull-right"><a class="anchor hidden-xs" href="#hevc_005fmetadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hevc_005fmetadata" aria-hidden="true">TOC</a></span></h3>
  6263. <p>Modify metadata embedded in an HEVC stream.
  6264. </p>
  6265. <dl compact="compact">
  6266. <dt><samp>aud</samp></dt>
  6267. <dd><p>Insert or remove AUD NAL units in all access units of the stream.
  6268. </p>
  6269. <dl compact="compact">
  6270. <dt>&lsquo;<samp>insert</samp>&rsquo;</dt>
  6271. <dt>&lsquo;<samp>remove</samp>&rsquo;</dt>
  6272. </dl>
  6273. </dd>
  6274. <dt><samp>sample_aspect_ratio</samp></dt>
  6275. <dd><p>Set the sample aspect ratio in the stream in the VUI parameters.
  6276. </p>
  6277. </dd>
  6278. <dt><samp>video_format</samp></dt>
  6279. <dt><samp>video_full_range_flag</samp></dt>
  6280. <dd><p>Set the video format in the stream (see H.265 section E.3.1 and
  6281. table E.2).
  6282. </p>
  6283. </dd>
  6284. <dt><samp>colour_primaries</samp></dt>
  6285. <dt><samp>transfer_characteristics</samp></dt>
  6286. <dt><samp>matrix_coefficients</samp></dt>
  6287. <dd><p>Set the colour description in the stream (see H.265 section E.3.1
  6288. and tables E.3, E.4 and E.5).
  6289. </p>
  6290. </dd>
  6291. <dt><samp>chroma_sample_loc_type</samp></dt>
  6292. <dd><p>Set the chroma sample location in the stream (see H.265 section
  6293. E.3.1 and figure E.1).
  6294. </p>
  6295. </dd>
  6296. <dt><samp>tick_rate</samp></dt>
  6297. <dd><p>Set the tick rate in the VPS and VUI parameters (num_units_in_tick /
  6298. time_scale). Combined with <samp>num_ticks_poc_diff_one</samp>, this can
  6299. set a constant framerate in the stream. Note that it is likely to be
  6300. overridden by container parameters when the stream is in a container.
  6301. </p>
  6302. </dd>
  6303. <dt><samp>num_ticks_poc_diff_one</samp></dt>
  6304. <dd><p>Set poc_proportional_to_timing_flag in VPS and VUI and use this value
  6305. to set num_ticks_poc_diff_one_minus1 (see H.265 sections 7.4.3.1 and
  6306. E.3.1). Ignored if <samp>tick_rate</samp> is not also set.
  6307. </p>
  6308. </dd>
  6309. <dt><samp>crop_left</samp></dt>
  6310. <dt><samp>crop_right</samp></dt>
  6311. <dt><samp>crop_top</samp></dt>
  6312. <dt><samp>crop_bottom</samp></dt>
  6313. <dd><p>Set the conformance window cropping offsets in the SPS. These values
  6314. will replace the current ones if the stream is already cropped.
  6315. </p>
  6316. <p>These fields are set in pixels. Note that some sizes may not be
  6317. representable if the chroma is subsampled (H.265 section 7.4.3.2.1).
  6318. </p>
  6319. </dd>
  6320. <dt><samp>level</samp></dt>
  6321. <dd><p>Set the level in the VPS and SPS. See H.265 section A.4 and tables
  6322. A.6 and A.7.
  6323. </p>
  6324. <p>The argument must be the name of a level (for example, &lsquo;<samp>5.1</samp>&rsquo;), a
  6325. <em>general_level_idc</em> value (for example, &lsquo;<samp>153</samp>&rsquo; for level 5.1),
  6326. or the special name &lsquo;<samp>auto</samp>&rsquo; indicating that the filter should
  6327. attempt to guess the level from the input stream properties.
  6328. </p>
  6329. </dd>
  6330. </dl>
  6331. <a name="hevc_005fmp4toannexb"></a>
  6332. <h3 class="section">13.14 hevc_mp4toannexb<span class="pull-right"><a class="anchor hidden-xs" href="#hevc_005fmp4toannexb" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hevc_005fmp4toannexb" aria-hidden="true">TOC</a></span></h3>
  6333. <p>Convert an HEVC/H.265 bitstream from length prefixed mode to start code
  6334. prefixed mode (as defined in the Annex B of the ITU-T H.265
  6335. specification).
  6336. </p>
  6337. <p>This is required by some streaming formats, typically the MPEG-2
  6338. transport stream format (muxer <code>mpegts</code>).
  6339. </p>
  6340. <p>For example to remux an MP4 file containing an HEVC stream to mpegts
  6341. format with <code>ffmpeg</code>, you can use the command:
  6342. </p>
  6343. <div class="example">
  6344. <pre class="example">ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
  6345. </pre></div>
  6346. <p>Please note that this filter is auto-inserted for MPEG-TS (muxer
  6347. <code>mpegts</code>) and raw HEVC/H.265 (muxer <code>h265</code> or
  6348. <code>hevc</code>) output formats.
  6349. </p>
  6350. <a name="imxdump"></a>
  6351. <h3 class="section">13.15 imxdump<span class="pull-right"><a class="anchor hidden-xs" href="#imxdump" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-imxdump" aria-hidden="true">TOC</a></span></h3>
  6352. <p>Modifies the bitstream to fit in MOV and to be usable by the Final Cut
  6353. Pro decoder. This filter only applies to the mpeg2video codec, and is
  6354. likely not needed for Final Cut Pro 7 and newer with the appropriate
  6355. <samp>-tag:v</samp>.
  6356. </p>
  6357. <p>For example, to remux 30 MB/sec NTSC IMX to MOV:
  6358. </p>
  6359. <div class="example">
  6360. <pre class="example">ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
  6361. </pre></div>
  6362. <a name="mjpeg2jpeg"></a>
  6363. <h3 class="section">13.16 mjpeg2jpeg<span class="pull-right"><a class="anchor hidden-xs" href="#mjpeg2jpeg" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mjpeg2jpeg" aria-hidden="true">TOC</a></span></h3>
  6364. <p>Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
  6365. </p>
  6366. <p>MJPEG is a video codec wherein each video frame is essentially a
  6367. JPEG image. The individual frames can be extracted without loss,
  6368. e.g. by
  6369. </p>
  6370. <div class="example">
  6371. <pre class="example">ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
  6372. </pre></div>
  6373. <p>Unfortunately, these chunks are incomplete JPEG images, because
  6374. they lack the DHT segment required for decoding. Quoting from
  6375. <a href="http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml">http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml</a>:
  6376. </p>
  6377. <p>Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
  6378. commented that &quot;MJPEG, or at least the MJPEG in AVIs having the
  6379. MJPG fourcc, is restricted JPEG with a fixed &ndash; and *omitted* &ndash;
  6380. Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2,
  6381. and it must use basic Huffman encoding, not arithmetic or
  6382. progressive. . . . You can indeed extract the MJPEG frames and
  6383. decode them with a regular JPEG decoder, but you have to prepend
  6384. the DHT segment to them, or else the decoder won&rsquo;t have any idea
  6385. how to decompress the data. The exact table necessary is given in
  6386. the OpenDML spec.&quot;
  6387. </p>
  6388. <p>This bitstream filter patches the header of frames extracted from an MJPEG
  6389. stream (carrying the AVI1 header ID and lacking a DHT segment) to
  6390. produce fully qualified JPEG images.
  6391. </p>
  6392. <div class="example">
  6393. <pre class="example">ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
  6394. exiftran -i -9 frame*.jpg
  6395. ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
  6396. </pre></div>
  6397. <a name="mjpegadump"></a>
  6398. <h3 class="section">13.17 mjpegadump<span class="pull-right"><a class="anchor hidden-xs" href="#mjpegadump" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mjpegadump" aria-hidden="true">TOC</a></span></h3>
  6399. <p>Add an MJPEG A header to the bitstream, to enable decoding by
  6400. Quicktime.
  6401. </p>
  6402. <span id="mov2textsub"></span><a name="mov2textsub-1"></a>
  6403. <h3 class="section">13.18 mov2textsub<span class="pull-right"><a class="anchor hidden-xs" href="#mov2textsub-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mov2textsub-1" aria-hidden="true">TOC</a></span></h3>
  6404. <p>Extract a representable text file from MOV subtitles, stripping the
  6405. metadata header from each subtitle packet.
  6406. </p>
  6407. <p>See also the <a href="#text2movsub">text2movsub</a> filter.
  6408. </p>
  6409. <a name="mp3decomp"></a>
  6410. <h3 class="section">13.19 mp3decomp<span class="pull-right"><a class="anchor hidden-xs" href="#mp3decomp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mp3decomp" aria-hidden="true">TOC</a></span></h3>
  6411. <p>Decompress non-standard compressed MP3 audio headers.
  6412. </p>
  6413. <a name="mpeg2_005fmetadata"></a>
  6414. <h3 class="section">13.20 mpeg2_metadata<span class="pull-right"><a class="anchor hidden-xs" href="#mpeg2_005fmetadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mpeg2_005fmetadata" aria-hidden="true">TOC</a></span></h3>
  6415. <p>Modify metadata embedded in an MPEG-2 stream.
  6416. </p>
  6417. <dl compact="compact">
  6418. <dt><samp>display_aspect_ratio</samp></dt>
  6419. <dd><p>Set the display aspect ratio in the stream.
  6420. </p>
  6421. <p>The following fixed values are supported:
  6422. </p><dl compact="compact">
  6423. <dt><samp>4/3</samp></dt>
  6424. <dt><samp>16/9</samp></dt>
  6425. <dt><samp>221/100</samp></dt>
  6426. </dl>
  6427. <p>Any other value will result in square pixels being signalled instead
  6428. (see H.262 section 6.3.3 and table 6-3).
  6429. </p>
  6430. </dd>
  6431. <dt><samp>frame_rate</samp></dt>
  6432. <dd><p>Set the frame rate in the stream. This is constructed from a table
  6433. of known values combined with a small multiplier and divisor - if
  6434. the supplied value is not exactly representable, the nearest
  6435. representable value will be used instead (see H.262 section 6.3.3
  6436. and table 6-4).
  6437. </p>
  6438. </dd>
  6439. <dt><samp>video_format</samp></dt>
  6440. <dd><p>Set the video format in the stream (see H.262 section 6.3.6 and
  6441. table 6-6).
  6442. </p>
  6443. </dd>
  6444. <dt><samp>colour_primaries</samp></dt>
  6445. <dt><samp>transfer_characteristics</samp></dt>
  6446. <dt><samp>matrix_coefficients</samp></dt>
  6447. <dd><p>Set the colour description in the stream (see H.262 section 6.3.6
  6448. and tables 6-7, 6-8 and 6-9).
  6449. </p>
  6450. </dd>
  6451. </dl>
  6452. <a name="mpeg4_005funpack_005fbframes"></a>
  6453. <h3 class="section">13.21 mpeg4_unpack_bframes<span class="pull-right"><a class="anchor hidden-xs" href="#mpeg4_005funpack_005fbframes" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mpeg4_005funpack_005fbframes" aria-hidden="true">TOC</a></span></h3>
  6454. <p>Unpack DivX-style packed B-frames.
  6455. </p>
  6456. <p>DivX-style packed B-frames are not valid MPEG-4 and were only a
  6457. workaround for the broken Video for Windows subsystem.
  6458. They use more space, can cause minor AV sync issues, require more
  6459. CPU power to decode (unless the player has some decoded picture queue
  6460. to compensate the 2,0,2,0 frame per packet style) and cause
  6461. trouble if copied into a standard container like mp4 or mpeg-ps/ts,
  6462. because MPEG-4 decoders may not be able to decode them, since they are
  6463. not valid MPEG-4.
  6464. </p>
  6465. <p>For example to fix an AVI file containing an MPEG-4 stream with
  6466. DivX-style packed B-frames using <code>ffmpeg</code>, you can use the command:
  6467. </p>
  6468. <div class="example">
  6469. <pre class="example">ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
  6470. </pre></div>
  6471. <a name="noise"></a>
  6472. <h3 class="section">13.22 noise<span class="pull-right"><a class="anchor hidden-xs" href="#noise" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-noise" aria-hidden="true">TOC</a></span></h3>
  6473. <p>Damages the contents of packets or simply drops them without damaging the
  6474. container. Can be used for fuzzing or testing error resilience/concealment.
  6475. </p>
  6476. <p>Parameters:
  6477. </p><dl compact="compact">
  6478. <dt><samp>amount</samp></dt>
  6479. <dd><p>A numeral string, whose value is related to how often output bytes will
  6480. be modified. Therefore, values below or equal to 0 are forbidden, and
  6481. the lower the more frequent bytes will be modified, with 1 meaning
  6482. every byte is modified.
  6483. </p></dd>
  6484. <dt><samp>dropamount</samp></dt>
  6485. <dd><p>A numeral string, whose value is related to how often packets will be dropped.
  6486. Therefore, values below or equal to 0 are forbidden, and the lower the more
  6487. frequent packets will be dropped, with 1 meaning every packet is dropped.
  6488. </p></dd>
  6489. </dl>
  6490. <p>The following example applies the modification to every byte but does not drop
  6491. any packets.
  6492. </p><div class="example">
  6493. <pre class="example">ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv
  6494. </pre></div>
  6495. <a name="null"></a>
  6496. <h3 class="section">13.23 null<span class="pull-right"><a class="anchor hidden-xs" href="#null" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-null" aria-hidden="true">TOC</a></span></h3>
  6497. <p>This bitstream filter passes the packets through unchanged.
  6498. </p>
  6499. <a name="pcm_005frechunk"></a>
  6500. <h3 class="section">13.24 pcm_rechunk<span class="pull-right"><a class="anchor hidden-xs" href="#pcm_005frechunk" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pcm_005frechunk" aria-hidden="true">TOC</a></span></h3>
  6501. <p>Repacketize PCM audio to a fixed number of samples per packet or a fixed packet
  6502. rate per second. This is similar to the <a href="ffmpeg-filters.html#asetnsamples">(ffmpeg-filters)asetnsamples audio
  6503. filter</a> but works on audio packets instead of audio frames.
  6504. </p>
  6505. <dl compact="compact">
  6506. <dt><samp>nb_out_samples, n</samp></dt>
  6507. <dd><p>Set the number of samples per each output audio packet. The number is intended
  6508. as the number of samples <em>per each channel</em>. Default value is 1024.
  6509. </p>
  6510. </dd>
  6511. <dt><samp>pad, p</samp></dt>
  6512. <dd><p>If set to 1, the filter will pad the last audio packet with silence, so that it
  6513. will contain the same number of samples (or roughly the same number of samples,
  6514. see <samp>frame_rate</samp>) as the previous ones. Default value is 1.
  6515. </p>
  6516. </dd>
  6517. <dt><samp>frame_rate, r</samp></dt>
  6518. <dd><p>This option makes the filter output a fixed number of packets per second instead
  6519. of a fixed number of samples per packet. If the audio sample rate is not
  6520. divisible by the frame rate then the number of samples will not be constant but
  6521. will vary slightly so that each packet will start as close to the frame
  6522. boundary as possible. Using this option has precedence over <samp>nb_out_samples</samp>.
  6523. </p></dd>
  6524. </dl>
  6525. <p>You can generate the well known 1602-1601-1602-1601-1602 pattern of 48kHz audio
  6526. for NTSC frame rate using the <samp>frame_rate</samp> option.
  6527. </p><div class="example">
  6528. <pre class="example">ffmpeg -f lavfi -i sine=r=48000:d=1 -c pcm_s16le -bsf pcm_rechunk=r=30000/1001 -f framecrc -
  6529. </pre></div>
  6530. <a name="prores_005fmetadata"></a>
  6531. <h3 class="section">13.25 prores_metadata<span class="pull-right"><a class="anchor hidden-xs" href="#prores_005fmetadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-prores_005fmetadata" aria-hidden="true">TOC</a></span></h3>
  6532. <p>Modify color property metadata embedded in prores stream.
  6533. </p>
  6534. <dl compact="compact">
  6535. <dt><samp>color_primaries</samp></dt>
  6536. <dd><p>Set the color primaries.
  6537. Available values are:
  6538. </p>
  6539. <dl compact="compact">
  6540. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  6541. <dd><p>Keep the same color primaries property (default).
  6542. </p>
  6543. </dd>
  6544. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6545. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6546. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  6547. <dd><p>BT601 625
  6548. </p>
  6549. </dd>
  6550. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  6551. <dd><p>BT601 525
  6552. </p>
  6553. </dd>
  6554. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  6555. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  6556. <dd><p>DCI P3
  6557. </p>
  6558. </dd>
  6559. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  6560. <dd><p>P3 D65
  6561. </p>
  6562. </dd>
  6563. </dl>
  6564. </dd>
  6565. <dt><samp>transfer_characteristics</samp></dt>
  6566. <dd><p>Set the color transfer.
  6567. Available values are:
  6568. </p>
  6569. <dl compact="compact">
  6570. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  6571. <dd><p>Keep the same transfer characteristics property (default).
  6572. </p>
  6573. </dd>
  6574. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6575. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6576. <dd><p>BT 601, BT 709, BT 2020
  6577. </p></dd>
  6578. <dt>&lsquo;<samp>smpte2084</samp>&rsquo;</dt>
  6579. <dd><p>SMPTE ST 2084
  6580. </p></dd>
  6581. <dt>&lsquo;<samp>arib-std-b67</samp>&rsquo;</dt>
  6582. <dd><p>ARIB STD-B67
  6583. </p></dd>
  6584. </dl>
  6585. </dd>
  6586. <dt><samp>matrix_coefficients</samp></dt>
  6587. <dd><p>Set the matrix coefficient.
  6588. Available values are:
  6589. </p>
  6590. <dl compact="compact">
  6591. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  6592. <dd><p>Keep the same colorspace property (default).
  6593. </p>
  6594. </dd>
  6595. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6596. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6597. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  6598. <dd><p>BT 601
  6599. </p>
  6600. </dd>
  6601. <dt>&lsquo;<samp>bt2020nc</samp>&rsquo;</dt>
  6602. </dl>
  6603. </dd>
  6604. </dl>
  6605. <p>Set Rec709 colorspace for each frame of the file
  6606. </p><div class="example">
  6607. <pre class="example">ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
  6608. </pre></div>
  6609. <p>Set Hybrid Log-Gamma parameters for each frame of the file
  6610. </p><div class="example">
  6611. <pre class="example">ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov
  6612. </pre></div>
  6613. <a name="remove_005fextra"></a>
  6614. <h3 class="section">13.26 remove_extra<span class="pull-right"><a class="anchor hidden-xs" href="#remove_005fextra" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-remove_005fextra" aria-hidden="true">TOC</a></span></h3>
  6615. <p>Remove extradata from packets.
  6616. </p>
  6617. <p>It accepts the following parameter:
  6618. </p><dl compact="compact">
  6619. <dt><samp>freq</samp></dt>
  6620. <dd><p>Set which frame types to remove extradata from.
  6621. </p>
  6622. <dl compact="compact">
  6623. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  6624. <dd><p>Remove extradata from non-keyframes only.
  6625. </p>
  6626. </dd>
  6627. <dt>&lsquo;<samp>keyframe</samp>&rsquo;</dt>
  6628. <dd><p>Remove extradata from keyframes only.
  6629. </p>
  6630. </dd>
  6631. <dt>&lsquo;<samp>e, all</samp>&rsquo;</dt>
  6632. <dd><p>Remove extradata from all frames.
  6633. </p>
  6634. </dd>
  6635. </dl>
  6636. </dd>
  6637. </dl>
  6638. <a name="setts"></a>
  6639. <h3 class="section">13.27 setts<span class="pull-right"><a class="anchor hidden-xs" href="#setts" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-setts" aria-hidden="true">TOC</a></span></h3>
  6640. <p>Set PTS and DTS in packets.
  6641. </p>
  6642. <p>It accepts the following parameters:
  6643. </p><dl compact="compact">
  6644. <dt><samp>ts</samp></dt>
  6645. <dt><samp>pts</samp></dt>
  6646. <dt><samp>dts</samp></dt>
  6647. <dd><p>Set expressions for PTS, DTS or both.
  6648. </p></dd>
  6649. </dl>
  6650. <p>The expressions are evaluated through the eval API and can contain the following
  6651. constants:
  6652. </p>
  6653. <dl compact="compact">
  6654. <dt><samp>N</samp></dt>
  6655. <dd><p>The count of the input packet. Starting from 0.
  6656. </p>
  6657. </dd>
  6658. <dt><samp>TS</samp></dt>
  6659. <dd><p>The demux timestamp in input in case of <code>ts</code> or <code>dts</code> option or presentation
  6660. timestamp in case of <code>pts</code> option.
  6661. </p>
  6662. </dd>
  6663. <dt><samp>POS</samp></dt>
  6664. <dd><p>The original position in the file of the packet, or undefined if undefined
  6665. for the current packet
  6666. </p>
  6667. </dd>
  6668. <dt><samp>DTS</samp></dt>
  6669. <dd><p>The demux timestamp in input.
  6670. </p>
  6671. </dd>
  6672. <dt><samp>PTS</samp></dt>
  6673. <dd><p>The presentation timestamp in input.
  6674. </p>
  6675. </dd>
  6676. <dt><samp>STARTDTS</samp></dt>
  6677. <dd><p>The DTS of the first packet.
  6678. </p>
  6679. </dd>
  6680. <dt><samp>STARTPTS</samp></dt>
  6681. <dd><p>The PTS of the first packet.
  6682. </p>
  6683. </dd>
  6684. <dt><samp>PREV_INDTS</samp></dt>
  6685. <dd><p>The previous input DTS.
  6686. </p>
  6687. </dd>
  6688. <dt><samp>PREV_INPTS</samp></dt>
  6689. <dd><p>The previous input PTS.
  6690. </p>
  6691. </dd>
  6692. <dt><samp>PREV_OUTDTS</samp></dt>
  6693. <dd><p>The previous output DTS.
  6694. </p>
  6695. </dd>
  6696. <dt><samp>PREV_OUTPTS</samp></dt>
  6697. <dd><p>The previous output PTS.
  6698. </p>
  6699. </dd>
  6700. <dt><samp>TB</samp></dt>
  6701. <dd><p>The timebase of stream packet belongs.
  6702. </p>
  6703. </dd>
  6704. <dt><samp>SR</samp></dt>
  6705. <dd><p>The sample rate of stream packet belongs.
  6706. </p></dd>
  6707. </dl>
  6708. <span id="text2movsub"></span><a name="text2movsub-1"></a>
  6709. <h3 class="section">13.28 text2movsub<span class="pull-right"><a class="anchor hidden-xs" href="#text2movsub-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-text2movsub-1" aria-hidden="true">TOC</a></span></h3>
  6710. <p>Convert text subtitles to MOV subtitles (as used by the <code>mov_text</code>
  6711. codec) with metadata headers.
  6712. </p>
  6713. <p>See also the <a href="#mov2textsub">mov2textsub</a> filter.
  6714. </p>
  6715. <a name="trace_005fheaders"></a>
  6716. <h3 class="section">13.29 trace_headers<span class="pull-right"><a class="anchor hidden-xs" href="#trace_005fheaders" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-trace_005fheaders" aria-hidden="true">TOC</a></span></h3>
  6717. <p>Log trace output containing all syntax elements in the coded stream
  6718. headers (everything above the level of individual coded blocks).
  6719. This can be useful for debugging low-level stream issues.
  6720. </p>
  6721. <p>Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending
  6722. on the build only a subset of these may be available.
  6723. </p>
  6724. <a name="truehd_005fcore"></a>
  6725. <h3 class="section">13.30 truehd_core<span class="pull-right"><a class="anchor hidden-xs" href="#truehd_005fcore" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-truehd_005fcore" aria-hidden="true">TOC</a></span></h3>
  6726. <p>Extract the core from a TrueHD stream, dropping ATMOS data.
  6727. </p>
  6728. <a name="vp9_005fmetadata"></a>
  6729. <h3 class="section">13.31 vp9_metadata<span class="pull-right"><a class="anchor hidden-xs" href="#vp9_005fmetadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vp9_005fmetadata" aria-hidden="true">TOC</a></span></h3>
  6730. <p>Modify metadata embedded in a VP9 stream.
  6731. </p>
  6732. <dl compact="compact">
  6733. <dt><samp>color_space</samp></dt>
  6734. <dd><p>Set the color space value in the frame header. Note that any frame
  6735. set to RGB will be implicitly set to PC range and that RGB is
  6736. incompatible with profiles 0 and 2.
  6737. </p><dl compact="compact">
  6738. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6739. <dt>&lsquo;<samp>bt601</samp>&rsquo;</dt>
  6740. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6741. <dt>&lsquo;<samp>smpte170</samp>&rsquo;</dt>
  6742. <dt>&lsquo;<samp>smpte240</samp>&rsquo;</dt>
  6743. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  6744. <dt>&lsquo;<samp>rgb</samp>&rsquo;</dt>
  6745. </dl>
  6746. </dd>
  6747. <dt><samp>color_range</samp></dt>
  6748. <dd><p>Set the color range value in the frame header. Note that any value
  6749. imposed by the color space will take precedence over this value.
  6750. </p><dl compact="compact">
  6751. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  6752. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  6753. </dl>
  6754. </dd>
  6755. </dl>
  6756. <a name="vp9_005fsuperframe"></a>
  6757. <h3 class="section">13.32 vp9_superframe<span class="pull-right"><a class="anchor hidden-xs" href="#vp9_005fsuperframe" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vp9_005fsuperframe" aria-hidden="true">TOC</a></span></h3>
  6758. <p>Merge VP9 invisible (alt-ref) frames back into VP9 superframes. This
  6759. fixes merging of split/segmented VP9 streams where the alt-ref frame
  6760. was split from its visible counterpart.
  6761. </p>
  6762. <a name="vp9_005fsuperframe_005fsplit"></a>
  6763. <h3 class="section">13.33 vp9_superframe_split<span class="pull-right"><a class="anchor hidden-xs" href="#vp9_005fsuperframe_005fsplit" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vp9_005fsuperframe_005fsplit" aria-hidden="true">TOC</a></span></h3>
  6764. <p>Split VP9 superframes into single frames.
  6765. </p>
  6766. <a name="vp9_005fraw_005freorder"></a>
  6767. <h3 class="section">13.34 vp9_raw_reorder<span class="pull-right"><a class="anchor hidden-xs" href="#vp9_005fraw_005freorder" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vp9_005fraw_005freorder" aria-hidden="true">TOC</a></span></h3>
  6768. <p>Given a VP9 stream with correct timestamps but possibly out of order,
  6769. insert additional show-existing-frame packets to correct the ordering.
  6770. </p>
  6771. <a name="Format-Options"></a>
  6772. <h2 class="chapter">14 Format Options<span class="pull-right"><a class="anchor hidden-xs" href="#Format-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Format-Options" aria-hidden="true">TOC</a></span></h2>
  6773. <p>The libavformat library provides some generic global options, which
  6774. can be set on all the muxers and demuxers. In addition each muxer or
  6775. demuxer may support so-called private options, which are specific for
  6776. that component.
  6777. </p>
  6778. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  6779. FFmpeg tools, or by setting the value explicitly in the
  6780. <code>AVFormatContext</code> options or using the <samp>libavutil/opt.h</samp> API
  6781. for programmatic use.
  6782. </p>
  6783. <p>The list of supported options follows:
  6784. </p>
  6785. <dl compact="compact">
  6786. <dt><samp>avioflags <var>flags</var> (<em>input/output</em>)</samp></dt>
  6787. <dd><p>Possible values:
  6788. </p><dl compact="compact">
  6789. <dt>&lsquo;<samp>direct</samp>&rsquo;</dt>
  6790. <dd><p>Reduce buffering.
  6791. </p></dd>
  6792. </dl>
  6793. </dd>
  6794. <dt><samp>probesize <var>integer</var> (<em>input</em>)</samp></dt>
  6795. <dd><p>Set probing size in bytes, i.e. the size of the data to analyze to get
  6796. stream information. A higher value will enable detecting more
  6797. information in case it is dispersed into the stream, but will increase
  6798. latency. Must be an integer not lesser than 32. It is 5000000 by default.
  6799. </p>
  6800. </dd>
  6801. <dt><samp>max_probe_packets <var>integer</var> (<em>input</em>)</samp></dt>
  6802. <dd><p>Set the maximum number of buffered packets when probing a codec.
  6803. Default is 2500 packets.
  6804. </p>
  6805. </dd>
  6806. <dt><samp>packetsize <var>integer</var> (<em>output</em>)</samp></dt>
  6807. <dd><p>Set packet size.
  6808. </p>
  6809. </dd>
  6810. <dt><samp>fflags <var>flags</var></samp></dt>
  6811. <dd><p>Set format flags. Some are implemented for a limited number of formats.
  6812. </p>
  6813. <p>Possible values for input files:
  6814. </p><dl compact="compact">
  6815. <dt>&lsquo;<samp>discardcorrupt</samp>&rsquo;</dt>
  6816. <dd><p>Discard corrupted packets.
  6817. </p></dd>
  6818. <dt>&lsquo;<samp>fastseek</samp>&rsquo;</dt>
  6819. <dd><p>Enable fast, but inaccurate seeks for some formats.
  6820. </p></dd>
  6821. <dt>&lsquo;<samp>genpts</samp>&rsquo;</dt>
  6822. <dd><p>Generate missing PTS if DTS is present.
  6823. </p></dd>
  6824. <dt>&lsquo;<samp>igndts</samp>&rsquo;</dt>
  6825. <dd><p>Ignore DTS if PTS is set. Inert when nofillin is set.
  6826. </p></dd>
  6827. <dt>&lsquo;<samp>ignidx</samp>&rsquo;</dt>
  6828. <dd><p>Ignore index.
  6829. </p></dd>
  6830. <dt>&lsquo;<samp>keepside (<em>deprecated</em>,<em>inert</em>)</samp>&rsquo;</dt>
  6831. <dt>&lsquo;<samp>nobuffer</samp>&rsquo;</dt>
  6832. <dd><p>Reduce the latency introduced by buffering during initial input streams analysis.
  6833. </p></dd>
  6834. <dt>&lsquo;<samp>nofillin</samp>&rsquo;</dt>
  6835. <dd><p>Do not fill in missing values in packet fields that can be exactly calculated.
  6836. </p></dd>
  6837. <dt>&lsquo;<samp>noparse</samp>&rsquo;</dt>
  6838. <dd><p>Disable AVParsers, this needs <code>+nofillin</code> too.
  6839. </p></dd>
  6840. <dt>&lsquo;<samp>sortdts</samp>&rsquo;</dt>
  6841. <dd><p>Try to interleave output packets by DTS. At present, available only for AVIs with an index.
  6842. </p></dd>
  6843. </dl>
  6844. <p>Possible values for output files:
  6845. </p><dl compact="compact">
  6846. <dt>&lsquo;<samp>autobsf</samp>&rsquo;</dt>
  6847. <dd><p>Automatically apply bitstream filters as required by the output format. Enabled by default.
  6848. </p></dd>
  6849. <dt>&lsquo;<samp>bitexact</samp>&rsquo;</dt>
  6850. <dd><p>Only write platform-, build- and time-independent data.
  6851. This ensures that file and data checksums are reproducible and match between
  6852. platforms. Its primary use is for regression testing.
  6853. </p></dd>
  6854. <dt>&lsquo;<samp>flush_packets</samp>&rsquo;</dt>
  6855. <dd><p>Write out packets immediately.
  6856. </p></dd>
  6857. <dt>&lsquo;<samp>latm (<em>deprecated</em>,<em>inert</em>)</samp>&rsquo;</dt>
  6858. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  6859. <dd><p>Stop muxing at the end of the shortest stream.
  6860. It may be needed to increase max_interleave_delta to avoid flushing the longer
  6861. streams before EOF.
  6862. </p></dd>
  6863. </dl>
  6864. </dd>
  6865. <dt><samp>seek2any <var>integer</var> (<em>input</em>)</samp></dt>
  6866. <dd><p>Allow seeking to non-keyframes on demuxer level when supported if set to 1.
  6867. Default is 0.
  6868. </p>
  6869. </dd>
  6870. <dt><samp>analyzeduration <var>integer</var> (<em>input</em>)</samp></dt>
  6871. <dd><p>Specify how many microseconds are analyzed to probe the input. A
  6872. higher value will enable detecting more accurate information, but will
  6873. increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
  6874. </p>
  6875. </dd>
  6876. <dt><samp>cryptokey <var>hexadecimal string</var> (<em>input</em>)</samp></dt>
  6877. <dd><p>Set decryption key.
  6878. </p>
  6879. </dd>
  6880. <dt><samp>indexmem <var>integer</var> (<em>input</em>)</samp></dt>
  6881. <dd><p>Set max memory used for timestamp index (per stream).
  6882. </p>
  6883. </dd>
  6884. <dt><samp>rtbufsize <var>integer</var> (<em>input</em>)</samp></dt>
  6885. <dd><p>Set max memory used for buffering real-time frames.
  6886. </p>
  6887. </dd>
  6888. <dt><samp>fdebug <var>flags</var> (<em>input/output</em>)</samp></dt>
  6889. <dd><p>Print specific debug info.
  6890. </p>
  6891. <p>Possible values:
  6892. </p><dl compact="compact">
  6893. <dt>&lsquo;<samp>ts</samp>&rsquo;</dt>
  6894. </dl>
  6895. </dd>
  6896. <dt><samp>max_delay <var>integer</var> (<em>input/output</em>)</samp></dt>
  6897. <dd><p>Set maximum muxing or demuxing delay in microseconds.
  6898. </p>
  6899. </dd>
  6900. <dt><samp>fpsprobesize <var>integer</var> (<em>input</em>)</samp></dt>
  6901. <dd><p>Set number of frames used to probe fps.
  6902. </p>
  6903. </dd>
  6904. <dt><samp>audio_preload <var>integer</var> (<em>output</em>)</samp></dt>
  6905. <dd><p>Set microseconds by which audio packets should be interleaved earlier.
  6906. </p>
  6907. </dd>
  6908. <dt><samp>chunk_duration <var>integer</var> (<em>output</em>)</samp></dt>
  6909. <dd><p>Set microseconds for each chunk.
  6910. </p>
  6911. </dd>
  6912. <dt><samp>chunk_size <var>integer</var> (<em>output</em>)</samp></dt>
  6913. <dd><p>Set size in bytes for each chunk.
  6914. </p>
  6915. </dd>
  6916. <dt><samp>err_detect, f_err_detect <var>flags</var> (<em>input</em>)</samp></dt>
  6917. <dd><p>Set error detection flags. <code>f_err_detect</code> is deprecated and
  6918. should be used only via the <code>ffmpeg</code> tool.
  6919. </p>
  6920. <p>Possible values:
  6921. </p><dl compact="compact">
  6922. <dt>&lsquo;<samp>crccheck</samp>&rsquo;</dt>
  6923. <dd><p>Verify embedded CRCs.
  6924. </p></dd>
  6925. <dt>&lsquo;<samp>bitstream</samp>&rsquo;</dt>
  6926. <dd><p>Detect bitstream specification deviations.
  6927. </p></dd>
  6928. <dt>&lsquo;<samp>buffer</samp>&rsquo;</dt>
  6929. <dd><p>Detect improper bitstream length.
  6930. </p></dd>
  6931. <dt>&lsquo;<samp>explode</samp>&rsquo;</dt>
  6932. <dd><p>Abort decoding on minor error detection.
  6933. </p></dd>
  6934. <dt>&lsquo;<samp>careful</samp>&rsquo;</dt>
  6935. <dd><p>Consider things that violate the spec and have not been seen in the
  6936. wild as errors.
  6937. </p></dd>
  6938. <dt>&lsquo;<samp>compliant</samp>&rsquo;</dt>
  6939. <dd><p>Consider all spec non compliancies as errors.
  6940. </p></dd>
  6941. <dt>&lsquo;<samp>aggressive</samp>&rsquo;</dt>
  6942. <dd><p>Consider things that a sane encoder should not do as an error.
  6943. </p></dd>
  6944. </dl>
  6945. </dd>
  6946. <dt><samp>max_interleave_delta <var>integer</var> (<em>output</em>)</samp></dt>
  6947. <dd><p>Set maximum buffering duration for interleaving. The duration is
  6948. expressed in microseconds, and defaults to 10000000 (10 seconds).
  6949. </p>
  6950. <p>To ensure all the streams are interleaved correctly, libavformat will
  6951. wait until it has at least one packet for each stream before actually
  6952. writing any packets to the output file. When some streams are
  6953. &quot;sparse&quot; (i.e. there are large gaps between successive packets), this
  6954. can result in excessive buffering.
  6955. </p>
  6956. <p>This field specifies the maximum difference between the timestamps of the
  6957. first and the last packet in the muxing queue, above which libavformat
  6958. will output a packet regardless of whether it has queued a packet for all
  6959. the streams.
  6960. </p>
  6961. <p>If set to 0, libavformat will continue buffering packets until it has
  6962. a packet for each stream, regardless of the maximum timestamp
  6963. difference between the buffered packets.
  6964. </p>
  6965. </dd>
  6966. <dt><samp>use_wallclock_as_timestamps <var>integer</var> (<em>input</em>)</samp></dt>
  6967. <dd><p>Use wallclock as timestamps if set to 1. Default is 0.
  6968. </p>
  6969. </dd>
  6970. <dt><samp>avoid_negative_ts <var>integer</var> (<em>output</em>)</samp></dt>
  6971. <dd>
  6972. <p>Possible values:
  6973. </p><dl compact="compact">
  6974. <dt>&lsquo;<samp>make_non_negative</samp>&rsquo;</dt>
  6975. <dd><p>Shift timestamps to make them non-negative.
  6976. Also note that this affects only leading negative timestamps, and not
  6977. non-monotonic negative timestamps.
  6978. </p></dd>
  6979. <dt>&lsquo;<samp>make_zero</samp>&rsquo;</dt>
  6980. <dd><p>Shift timestamps so that the first timestamp is 0.
  6981. </p></dd>
  6982. <dt>&lsquo;<samp>auto (default)</samp>&rsquo;</dt>
  6983. <dd><p>Enables shifting when required by the target format.
  6984. </p></dd>
  6985. <dt>&lsquo;<samp>disabled</samp>&rsquo;</dt>
  6986. <dd><p>Disables shifting of timestamp.
  6987. </p></dd>
  6988. </dl>
  6989. <p>When shifting is enabled, all output timestamps are shifted by the
  6990. same amount. Audio, video, and subtitles desynching and relative
  6991. timestamp differences are preserved compared to how they would have
  6992. been without shifting.
  6993. </p>
  6994. </dd>
  6995. <dt><samp>skip_initial_bytes <var>integer</var> (<em>input</em>)</samp></dt>
  6996. <dd><p>Set number of bytes to skip before reading header and frames if set to 1.
  6997. Default is 0.
  6998. </p>
  6999. </dd>
  7000. <dt><samp>correct_ts_overflow <var>integer</var> (<em>input</em>)</samp></dt>
  7001. <dd><p>Correct single timestamp overflows if set to 1. Default is 1.
  7002. </p>
  7003. </dd>
  7004. <dt><samp>flush_packets <var>integer</var> (<em>output</em>)</samp></dt>
  7005. <dd><p>Flush the underlying I/O stream after each packet. Default is -1 (auto), which
  7006. means that the underlying protocol will decide, 1 enables it, and has the
  7007. effect of reducing the latency, 0 disables it and may increase IO throughput in
  7008. some cases.
  7009. </p>
  7010. </dd>
  7011. <dt><samp>output_ts_offset <var>offset</var> (<em>output</em>)</samp></dt>
  7012. <dd><p>Set the output time offset.
  7013. </p>
  7014. <p><var>offset</var> must be a time duration specification,
  7015. see <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  7016. </p>
  7017. <p>The offset is added by the muxer to the output timestamps.
  7018. </p>
  7019. <p>Specifying a positive offset means that the corresponding streams are
  7020. delayed bt the time duration specified in <var>offset</var>. Default value
  7021. is <code>0</code> (meaning that no offset is applied).
  7022. </p>
  7023. </dd>
  7024. <dt><samp>format_whitelist <var>list</var> (<em>input</em>)</samp></dt>
  7025. <dd><p>&quot;,&quot; separated list of allowed demuxers. By default all are allowed.
  7026. </p>
  7027. </dd>
  7028. <dt><samp>dump_separator <var>string</var> (<em>input</em>)</samp></dt>
  7029. <dd><p>Separator used to separate the fields printed on the command line about the
  7030. Stream parameters.
  7031. For example, to separate the fields with newlines and indentation:
  7032. </p><div class="example">
  7033. <pre class="example">ffprobe -dump_separator &quot;
  7034. &quot; -i ~/videos/matrixbench_mpeg2.mpg
  7035. </pre></div>
  7036. </dd>
  7037. <dt><samp>max_streams <var>integer</var> (<em>input</em>)</samp></dt>
  7038. <dd><p>Specifies the maximum number of streams. This can be used to reject files that
  7039. would require too many resources due to a large number of streams.
  7040. </p>
  7041. </dd>
  7042. <dt><samp>skip_estimate_duration_from_pts <var>bool</var> (<em>input</em>)</samp></dt>
  7043. <dd><p>Skip estimation of input duration when calculated using PTS.
  7044. At present, applicable for MPEG-PS and MPEG-TS.
  7045. </p>
  7046. </dd>
  7047. <dt><samp>strict, f_strict <var>integer</var> (<em>input/output</em>)</samp></dt>
  7048. <dd><p>Specify how strictly to follow the standards. <code>f_strict</code> is deprecated and
  7049. should be used only via the <code>ffmpeg</code> tool.
  7050. </p>
  7051. <p>Possible values:
  7052. </p><dl compact="compact">
  7053. <dt>&lsquo;<samp>very</samp>&rsquo;</dt>
  7054. <dd><p>strictly conform to an older more strict version of the spec or reference software
  7055. </p></dd>
  7056. <dt>&lsquo;<samp>strict</samp>&rsquo;</dt>
  7057. <dd><p>strictly conform to all the things in the spec no matter what consequences
  7058. </p></dd>
  7059. <dt>&lsquo;<samp>normal</samp>&rsquo;</dt>
  7060. <dt>&lsquo;<samp>unofficial</samp>&rsquo;</dt>
  7061. <dd><p>allow unofficial extensions
  7062. </p></dd>
  7063. <dt>&lsquo;<samp>experimental</samp>&rsquo;</dt>
  7064. <dd><p>allow non standardized experimental things, experimental
  7065. (unfinished/work in progress/not well tested) decoders and encoders.
  7066. Note: experimental decoders can pose a security risk, do not use this for
  7067. decoding untrusted input.
  7068. </p></dd>
  7069. </dl>
  7070. </dd>
  7071. </dl>
  7072. <span id="Format-stream-specifiers"></span><a name="Format-stream-specifiers-1"></a>
  7073. <h3 class="section">14.1 Format stream specifiers<span class="pull-right"><a class="anchor hidden-xs" href="#Format-stream-specifiers-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Format-stream-specifiers-1" aria-hidden="true">TOC</a></span></h3>
  7074. <p>Format stream specifiers allow selection of one or more streams that
  7075. match specific properties.
  7076. </p>
  7077. <p>The exact semantics of stream specifiers is defined by the
  7078. <code>avformat_match_stream_specifier()</code> function declared in the
  7079. <samp>libavformat/avformat.h</samp> header and documented in the
  7080. <a href="ffmpeg.html#Stream-specifiers">(ffmpeg)Stream specifiers section in the ffmpeg(1) manual</a>.
  7081. </p>
  7082. <a name="Demuxers"></a>
  7083. <h2 class="chapter">15 Demuxers<span class="pull-right"><a class="anchor hidden-xs" href="#Demuxers" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Demuxers" aria-hidden="true">TOC</a></span></h2>
  7084. <p>Demuxers are configured elements in FFmpeg that can read the
  7085. multimedia streams from a particular type of file.
  7086. </p>
  7087. <p>When you configure your FFmpeg build, all the supported demuxers
  7088. are enabled by default. You can list all available ones using the
  7089. configure option <code>--list-demuxers</code>.
  7090. </p>
  7091. <p>You can disable all the demuxers using the configure option
  7092. <code>--disable-demuxers</code>, and selectively enable a single demuxer with
  7093. the option <code>--enable-demuxer=<var>DEMUXER</var></code>, or disable it
  7094. with the option <code>--disable-demuxer=<var>DEMUXER</var></code>.
  7095. </p>
  7096. <p>The option <code>-demuxers</code> of the ff* tools will display the list of
  7097. enabled demuxers. Use <code>-formats</code> to view a combined list of
  7098. enabled demuxers and muxers.
  7099. </p>
  7100. <p>The description of some of the currently available demuxers follows.
  7101. </p>
  7102. <a name="aa"></a>
  7103. <h3 class="section">15.1 aa<span class="pull-right"><a class="anchor hidden-xs" href="#aa" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aa" aria-hidden="true">TOC</a></span></h3>
  7104. <p>Audible Format 2, 3, and 4 demuxer.
  7105. </p>
  7106. <p>This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files.
  7107. </p>
  7108. <a name="apng"></a>
  7109. <h3 class="section">15.2 apng<span class="pull-right"><a class="anchor hidden-xs" href="#apng" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-apng" aria-hidden="true">TOC</a></span></h3>
  7110. <p>Animated Portable Network Graphics demuxer.
  7111. </p>
  7112. <p>This demuxer is used to demux APNG files.
  7113. All headers, but the PNG signature, up to (but not including) the first
  7114. fcTL chunk are transmitted as extradata.
  7115. Frames are then split as being all the chunks between two fcTL ones, or
  7116. between the last fcTL and IEND chunks.
  7117. </p>
  7118. <dl compact="compact">
  7119. <dt><samp>-ignore_loop <var>bool</var></samp></dt>
  7120. <dd><p>Ignore the loop variable in the file if set.
  7121. </p></dd>
  7122. <dt><samp>-max_fps <var>int</var></samp></dt>
  7123. <dd><p>Maximum framerate in frames per second (0 for no limit).
  7124. </p></dd>
  7125. <dt><samp>-default_fps <var>int</var></samp></dt>
  7126. <dd><p>Default framerate in frames per second when none is specified in the file
  7127. (0 meaning as fast as possible).
  7128. </p></dd>
  7129. </dl>
  7130. <a name="asf"></a>
  7131. <h3 class="section">15.3 asf<span class="pull-right"><a class="anchor hidden-xs" href="#asf" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asf" aria-hidden="true">TOC</a></span></h3>
  7132. <p>Advanced Systems Format demuxer.
  7133. </p>
  7134. <p>This demuxer is used to demux ASF files and MMS network streams.
  7135. </p>
  7136. <dl compact="compact">
  7137. <dt><samp>-no_resync_search <var>bool</var></samp></dt>
  7138. <dd><p>Do not try to resynchronize by looking for a certain optional start code.
  7139. </p></dd>
  7140. </dl>
  7141. <span id="concat"></span><a name="concat-1"></a>
  7142. <h3 class="section">15.4 concat<span class="pull-right"><a class="anchor hidden-xs" href="#concat-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-concat-1" aria-hidden="true">TOC</a></span></h3>
  7143. <p>Virtual concatenation script demuxer.
  7144. </p>
  7145. <p>This demuxer reads a list of files and other directives from a text file and
  7146. demuxes them one after the other, as if all their packets had been muxed
  7147. together.
  7148. </p>
  7149. <p>The timestamps in the files are adjusted so that the first file starts at 0
  7150. and each next file starts where the previous one finishes. Note that it is
  7151. done globally and may cause gaps if all streams do not have exactly the same
  7152. length.
  7153. </p>
  7154. <p>All files must have the same streams (same codecs, same time base, etc.).
  7155. </p>
  7156. <p>The duration of each file is used to adjust the timestamps of the next file:
  7157. if the duration is incorrect (because it was computed using the bit-rate or
  7158. because the file is truncated, for example), it can cause artifacts. The
  7159. <code>duration</code> directive can be used to override the duration stored in
  7160. each file.
  7161. </p>
  7162. <a name="Syntax-1"></a>
  7163. <h4 class="subsection">15.4.1 Syntax<span class="pull-right"><a class="anchor hidden-xs" href="#Syntax-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Syntax-1" aria-hidden="true">TOC</a></span></h4>
  7164. <p>The script is a text file in extended-ASCII, with one directive per line.
  7165. Empty lines, leading spaces and lines starting with &rsquo;#&rsquo; are ignored. The
  7166. following directive is recognized:
  7167. </p>
  7168. <dl compact="compact">
  7169. <dt><samp><code>file <var>path</var></code></samp></dt>
  7170. <dd><p>Path to a file to read; special characters and spaces must be escaped with
  7171. backslash or single quotes.
  7172. </p>
  7173. <p>All subsequent file-related directives apply to that file.
  7174. </p>
  7175. </dd>
  7176. <dt><samp><code>ffconcat version 1.0</code></samp></dt>
  7177. <dd><p>Identify the script type and version. It also sets the <samp>safe</samp> option
  7178. to 1 if it was -1.
  7179. </p>
  7180. <p>To make FFmpeg recognize the format automatically, this directive must
  7181. appear exactly as is (no extra space or byte-order-mark) on the very first
  7182. line of the script.
  7183. </p>
  7184. </dd>
  7185. <dt><samp><code>duration <var>dur</var></code></samp></dt>
  7186. <dd><p>Duration of the file. This information can be specified from the file;
  7187. specifying it here may be more efficient or help if the information from the
  7188. file is not available or accurate.
  7189. </p>
  7190. <p>If the duration is set for all files, then it is possible to seek in the
  7191. whole concatenated video.
  7192. </p>
  7193. </dd>
  7194. <dt><samp><code>inpoint <var>timestamp</var></code></samp></dt>
  7195. <dd><p>In point of the file. When the demuxer opens the file it instantly seeks to the
  7196. specified timestamp. Seeking is done so that all streams can be presented
  7197. successfully at In point.
  7198. </p>
  7199. <p>This directive works best with intra frame codecs, because for non-intra frame
  7200. ones you will usually get extra packets before the actual In point and the
  7201. decoded content will most likely contain frames before In point too.
  7202. </p>
  7203. <p>For each file, packets before the file In point will have timestamps less than
  7204. the calculated start timestamp of the file (negative in case of the first
  7205. file), and the duration of the files (if not specified by the <code>duration</code>
  7206. directive) will be reduced based on their specified In point.
  7207. </p>
  7208. <p>Because of potential packets before the specified In point, packet timestamps
  7209. may overlap between two concatenated files.
  7210. </p>
  7211. </dd>
  7212. <dt><samp><code>outpoint <var>timestamp</var></code></samp></dt>
  7213. <dd><p>Out point of the file. When the demuxer reaches the specified decoding
  7214. timestamp in any of the streams, it handles it as an end of file condition and
  7215. skips the current and all the remaining packets from all streams.
  7216. </p>
  7217. <p>Out point is exclusive, which means that the demuxer will not output packets
  7218. with a decoding timestamp greater or equal to Out point.
  7219. </p>
  7220. <p>This directive works best with intra frame codecs and formats where all streams
  7221. are tightly interleaved. For non-intra frame codecs you will usually get
  7222. additional packets with presentation timestamp after Out point therefore the
  7223. decoded content will most likely contain frames after Out point too. If your
  7224. streams are not tightly interleaved you may not get all the packets from all
  7225. streams before Out point and you may only will be able to decode the earliest
  7226. stream until Out point.
  7227. </p>
  7228. <p>The duration of the files (if not specified by the <code>duration</code>
  7229. directive) will be reduced based on their specified Out point.
  7230. </p>
  7231. </dd>
  7232. <dt><samp><code>file_packet_metadata <var>key=value</var></code></samp></dt>
  7233. <dd><p>Metadata of the packets of the file. The specified metadata will be set for
  7234. each file packet. You can specify this directive multiple times to add multiple
  7235. metadata entries.
  7236. </p>
  7237. </dd>
  7238. <dt><samp><code>stream</code></samp></dt>
  7239. <dd><p>Introduce a stream in the virtual file.
  7240. All subsequent stream-related directives apply to the last introduced
  7241. stream.
  7242. Some streams properties must be set in order to allow identifying the
  7243. matching streams in the subfiles.
  7244. If no streams are defined in the script, the streams from the first file are
  7245. copied.
  7246. </p>
  7247. </dd>
  7248. <dt><samp><code>exact_stream_id <var>id</var></code></samp></dt>
  7249. <dd><p>Set the id of the stream.
  7250. If this directive is given, the string with the corresponding id in the
  7251. subfiles will be used.
  7252. This is especially useful for MPEG-PS (VOB) files, where the order of the
  7253. streams is not reliable.
  7254. </p>
  7255. </dd>
  7256. </dl>
  7257. <a name="Options-9"></a>
  7258. <h4 class="subsection">15.4.2 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-9" aria-hidden="true">TOC</a></span></h4>
  7259. <p>This demuxer accepts the following option:
  7260. </p>
  7261. <dl compact="compact">
  7262. <dt><samp>safe</samp></dt>
  7263. <dd><p>If set to 1, reject unsafe file paths. A file path is considered safe if it
  7264. does not contain a protocol specification and is relative and all components
  7265. only contain characters from the portable character set (letters, digits,
  7266. period, underscore and hyphen) and have no period at the beginning of a
  7267. component.
  7268. </p>
  7269. <p>If set to 0, any file name is accepted.
  7270. </p>
  7271. <p>The default is 1.
  7272. </p>
  7273. <p>-1 is equivalent to 1 if the format was automatically
  7274. probed and 0 otherwise.
  7275. </p>
  7276. </dd>
  7277. <dt><samp>auto_convert</samp></dt>
  7278. <dd><p>If set to 1, try to perform automatic conversions on packet data to make the
  7279. streams concatenable.
  7280. The default is 1.
  7281. </p>
  7282. <p>Currently, the only conversion is adding the h264_mp4toannexb bitstream
  7283. filter to H.264 streams in MP4 format. This is necessary in particular if
  7284. there are resolution changes.
  7285. </p>
  7286. </dd>
  7287. <dt><samp>segment_time_metadata</samp></dt>
  7288. <dd><p>If set to 1, every packet will contain the <var>lavf.concat.start_time</var> and the
  7289. <var>lavf.concat.duration</var> packet metadata values which are the start_time and
  7290. the duration of the respective file segments in the concatenated output
  7291. expressed in microseconds. The duration metadata is only set if it is known
  7292. based on the concat file.
  7293. The default is 0.
  7294. </p>
  7295. </dd>
  7296. </dl>
  7297. <a name="Examples-2"></a>
  7298. <h4 class="subsection">15.4.3 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-2" aria-hidden="true">TOC</a></span></h4>
  7299. <ul>
  7300. <li> Use absolute filenames and include some comments:
  7301. <div class="example">
  7302. <pre class="example"># my first filename
  7303. file /mnt/share/file-1.wav
  7304. # my second filename including whitespace
  7305. file '/mnt/share/file 2.wav'
  7306. # my third filename including whitespace plus single quote
  7307. file '/mnt/share/file 3'\''.wav'
  7308. </pre></div>
  7309. </li><li> Allow for input format auto-probing, use safe filenames and set the duration of
  7310. the first file:
  7311. <div class="example">
  7312. <pre class="example">ffconcat version 1.0
  7313. file file-1.wav
  7314. duration 20.0
  7315. file subdir/file-2.wav
  7316. </pre></div>
  7317. </li></ul>
  7318. <a name="dash"></a>
  7319. <h3 class="section">15.5 dash<span class="pull-right"><a class="anchor hidden-xs" href="#dash" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dash" aria-hidden="true">TOC</a></span></h3>
  7320. <p>Dynamic Adaptive Streaming over HTTP demuxer.
  7321. </p>
  7322. <p>This demuxer presents all AVStreams found in the manifest.
  7323. By setting the discard flags on AVStreams the caller can decide
  7324. which streams to actually receive.
  7325. Each stream mirrors the <code>id</code> and <code>bandwidth</code> properties from the
  7326. <code>&lt;Representation&gt;</code> as metadata keys named &quot;id&quot; and &quot;variant_bitrate&quot; respectively.
  7327. </p>
  7328. <a name="flv_002c-live_005fflv"></a>
  7329. <h3 class="section">15.6 flv, live_flv<span class="pull-right"><a class="anchor hidden-xs" href="#flv_002c-live_005fflv" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-flv_002c-live_005fflv" aria-hidden="true">TOC</a></span></h3>
  7330. <p>Adobe Flash Video Format demuxer.
  7331. </p>
  7332. <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.
  7333. </p>
  7334. <div class="example">
  7335. <pre class="example">ffmpeg -f flv -i myfile.flv ...
  7336. ffmpeg -f live_flv -i rtmp://&lt;any.server&gt;/anything/key ....
  7337. </pre></div>
  7338. <dl compact="compact">
  7339. <dt><samp>-flv_metadata <var>bool</var></samp></dt>
  7340. <dd><p>Allocate the streams according to the onMetaData array content.
  7341. </p>
  7342. </dd>
  7343. <dt><samp>-flv_ignore_prevtag <var>bool</var></samp></dt>
  7344. <dd><p>Ignore the size of previous tag value.
  7345. </p>
  7346. </dd>
  7347. <dt><samp>-flv_full_metadata <var>bool</var></samp></dt>
  7348. <dd><p>Output all context of the onMetadata.
  7349. </p></dd>
  7350. </dl>
  7351. <a name="gif"></a>
  7352. <h3 class="section">15.7 gif<span class="pull-right"><a class="anchor hidden-xs" href="#gif" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gif" aria-hidden="true">TOC</a></span></h3>
  7353. <p>Animated GIF demuxer.
  7354. </p>
  7355. <p>It accepts the following options:
  7356. </p>
  7357. <dl compact="compact">
  7358. <dt><samp>min_delay</samp></dt>
  7359. <dd><p>Set the minimum valid delay between frames in hundredths of seconds.
  7360. Range is 0 to 6000. Default value is 2.
  7361. </p>
  7362. </dd>
  7363. <dt><samp>max_gif_delay</samp></dt>
  7364. <dd><p>Set the maximum valid delay between frames in hundredth of seconds.
  7365. Range is 0 to 65535. Default value is 65535 (nearly eleven minutes),
  7366. the maximum value allowed by the specification.
  7367. </p>
  7368. </dd>
  7369. <dt><samp>default_delay</samp></dt>
  7370. <dd><p>Set the default delay between frames in hundredths of seconds.
  7371. Range is 0 to 6000. Default value is 10.
  7372. </p>
  7373. </dd>
  7374. <dt><samp>ignore_loop</samp></dt>
  7375. <dd><p>GIF files can contain information to loop a certain number of times (or
  7376. infinitely). If <samp>ignore_loop</samp> is set to 1, then the loop setting
  7377. from the input will be ignored and looping will not occur. If set to 0,
  7378. then looping will occur and will cycle the number of times according to
  7379. the GIF. Default value is 1.
  7380. </p></dd>
  7381. </dl>
  7382. <p>For example, with the overlay filter, place an infinitely looping GIF
  7383. over another video:
  7384. </p><div class="example">
  7385. <pre class="example">ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv
  7386. </pre></div>
  7387. <p>Note that in the above example the shortest option for overlay filter is
  7388. used to end the output video at the length of the shortest input file,
  7389. which in this case is <samp>input.mp4</samp> as the GIF in this example loops
  7390. infinitely.
  7391. </p>
  7392. <a name="hls"></a>
  7393. <h3 class="section">15.8 hls<span class="pull-right"><a class="anchor hidden-xs" href="#hls" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hls" aria-hidden="true">TOC</a></span></h3>
  7394. <p>HLS demuxer
  7395. </p>
  7396. <p>Apple HTTP Live Streaming demuxer.
  7397. </p>
  7398. <p>This demuxer presents all AVStreams from all variant streams.
  7399. The id field is set to the bitrate variant index number. By setting
  7400. the discard flags on AVStreams (by pressing &rsquo;a&rsquo; or &rsquo;v&rsquo; in ffplay),
  7401. the caller can decide which variant streams to actually receive.
  7402. The total bitrate of the variant that the stream belongs to is
  7403. available in a metadata key named &quot;variant_bitrate&quot;.
  7404. </p>
  7405. <p>It accepts the following options:
  7406. </p>
  7407. <dl compact="compact">
  7408. <dt><samp>live_start_index</samp></dt>
  7409. <dd><p>segment index to start live streams at (negative values are from the end).
  7410. </p>
  7411. </dd>
  7412. <dt><samp>allowed_extensions</samp></dt>
  7413. <dd><p>&rsquo;,&rsquo; separated list of file extensions that hls is allowed to access.
  7414. </p>
  7415. </dd>
  7416. <dt><samp>max_reload</samp></dt>
  7417. <dd><p>Maximum number of times a insufficient list is attempted to be reloaded.
  7418. Default value is 1000.
  7419. </p>
  7420. </dd>
  7421. <dt><samp>m3u8_hold_counters</samp></dt>
  7422. <dd><p>The maximum number of times to load m3u8 when it refreshes without new segments.
  7423. Default value is 1000.
  7424. </p>
  7425. </dd>
  7426. <dt><samp>http_persistent</samp></dt>
  7427. <dd><p>Use persistent HTTP connections. Applicable only for HTTP streams.
  7428. Enabled by default.
  7429. </p>
  7430. </dd>
  7431. <dt><samp>http_multiple</samp></dt>
  7432. <dd><p>Use multiple HTTP connections for downloading HTTP segments.
  7433. Enabled by default for HTTP/1.1 servers.
  7434. </p>
  7435. </dd>
  7436. <dt><samp>http_seekable</samp></dt>
  7437. <dd><p>Use HTTP partial requests for downloading HTTP segments.
  7438. 0 = disable, 1 = enable, -1 = auto, Default is auto.
  7439. </p></dd>
  7440. </dl>
  7441. <a name="image2"></a>
  7442. <h3 class="section">15.9 image2<span class="pull-right"><a class="anchor hidden-xs" href="#image2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-image2" aria-hidden="true">TOC</a></span></h3>
  7443. <p>Image file demuxer.
  7444. </p>
  7445. <p>This demuxer reads from a list of image files specified by a pattern.
  7446. The syntax and meaning of the pattern is specified by the
  7447. option <var>pattern_type</var>.
  7448. </p>
  7449. <p>The pattern may contain a suffix which is used to automatically
  7450. determine the format of the images contained in the files.
  7451. </p>
  7452. <p>The size, the pixel format, and the format of each image must be the
  7453. same for all the files in the sequence.
  7454. </p>
  7455. <p>This demuxer accepts the following options:
  7456. </p><dl compact="compact">
  7457. <dt><samp>framerate</samp></dt>
  7458. <dd><p>Set the frame rate for the video stream. It defaults to 25.
  7459. </p></dd>
  7460. <dt><samp>loop</samp></dt>
  7461. <dd><p>If set to 1, loop over the input. Default value is 0.
  7462. </p></dd>
  7463. <dt><samp>pattern_type</samp></dt>
  7464. <dd><p>Select the pattern type used to interpret the provided filename.
  7465. </p>
  7466. <p><var>pattern_type</var> accepts one of the following values.
  7467. </p><dl compact="compact">
  7468. <dt><samp>none</samp></dt>
  7469. <dd><p>Disable pattern matching, therefore the video will only contain the specified
  7470. image. You should use this option if you do not want to create sequences from
  7471. multiple images and your filenames may contain special pattern characters.
  7472. </p></dd>
  7473. <dt><samp>sequence</samp></dt>
  7474. <dd><p>Select a sequence pattern type, used to specify a sequence of files
  7475. indexed by sequential numbers.
  7476. </p>
  7477. <p>A sequence pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, which
  7478. specifies the position of the characters representing a sequential
  7479. number in each filename matched by the pattern. If the form
  7480. &quot;%d0<var>N</var>d&quot; is used, the string representing the number in each
  7481. filename is 0-padded and <var>N</var> is the total number of 0-padded
  7482. digits representing the number. The literal character &rsquo;%&rsquo; can be
  7483. specified in the pattern with the string &quot;%%&quot;.
  7484. </p>
  7485. <p>If the sequence pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
  7486. the file list specified by the pattern must contain a number
  7487. inclusively contained between <var>start_number</var> and
  7488. <var>start_number</var>+<var>start_number_range</var>-1, and all the following
  7489. numbers must be sequential.
  7490. </p>
  7491. <p>For example the pattern &quot;img-%03d.bmp&quot; will match a sequence of
  7492. filenames of the form <samp>img-001.bmp</samp>, <samp>img-002.bmp</samp>, ...,
  7493. <samp>img-010.bmp</samp>, etc.; the pattern &quot;i%%m%%g-%d.jpg&quot; will match a
  7494. sequence of filenames of the form <samp>i%m%g-1.jpg</samp>,
  7495. <samp>i%m%g-2.jpg</samp>, ..., <samp>i%m%g-10.jpg</samp>, etc.
  7496. </p>
  7497. <p>Note that the pattern must not necessarily contain &quot;%d&quot; or
  7498. &quot;%0<var>N</var>d&quot;, for example to convert a single image file
  7499. <samp>img.jpeg</samp> you can employ the command:
  7500. </p><div class="example">
  7501. <pre class="example">ffmpeg -i img.jpeg img.png
  7502. </pre></div>
  7503. </dd>
  7504. <dt><samp>glob</samp></dt>
  7505. <dd><p>Select a glob wildcard pattern type.
  7506. </p>
  7507. <p>The pattern is interpreted like a <code>glob()</code> pattern. This is only
  7508. selectable if libavformat was compiled with globbing support.
  7509. </p>
  7510. </dd>
  7511. <dt><samp>glob_sequence <em>(deprecated, will be removed)</em></samp></dt>
  7512. <dd><p>Select a mixed glob wildcard/sequence pattern.
  7513. </p>
  7514. <p>If your version of libavformat was compiled with globbing support, and
  7515. the provided pattern contains at least one glob meta character among
  7516. <code>%*?[]{}</code> that is preceded by an unescaped &quot;%&quot;, the pattern is
  7517. interpreted like a <code>glob()</code> pattern, otherwise it is interpreted
  7518. like a sequence pattern.
  7519. </p>
  7520. <p>All glob special characters <code>%*?[]{}</code> must be prefixed
  7521. with &quot;%&quot;. To escape a literal &quot;%&quot; you shall use &quot;%%&quot;.
  7522. </p>
  7523. <p>For example the pattern <code>foo-%*.jpeg</code> will match all the
  7524. filenames prefixed by &quot;foo-&quot; and terminating with &quot;.jpeg&quot;, and
  7525. <code>foo-%?%?%?.jpeg</code> will match all the filenames prefixed with
  7526. &quot;foo-&quot;, followed by a sequence of three characters, and terminating
  7527. with &quot;.jpeg&quot;.
  7528. </p>
  7529. <p>This pattern type is deprecated in favor of <var>glob</var> and
  7530. <var>sequence</var>.
  7531. </p></dd>
  7532. </dl>
  7533. <p>Default value is <var>glob_sequence</var>.
  7534. </p></dd>
  7535. <dt><samp>pixel_format</samp></dt>
  7536. <dd><p>Set the pixel format of the images to read. If not specified the pixel
  7537. format is guessed from the first image file in the sequence.
  7538. </p></dd>
  7539. <dt><samp>start_number</samp></dt>
  7540. <dd><p>Set the index of the file matched by the image file pattern to start
  7541. to read from. Default value is 0.
  7542. </p></dd>
  7543. <dt><samp>start_number_range</samp></dt>
  7544. <dd><p>Set the index interval range to check when looking for the first image
  7545. file in the sequence, starting from <var>start_number</var>. Default value
  7546. is 5.
  7547. </p></dd>
  7548. <dt><samp>ts_from_file</samp></dt>
  7549. <dd><p>If set to 1, will set frame timestamp to modification time of image file. Note
  7550. that monotonity of timestamps is not provided: images go in the same order as
  7551. without this option. Default value is 0.
  7552. If set to 2, will set frame timestamp to the modification time of the image file in
  7553. nanosecond precision.
  7554. </p></dd>
  7555. <dt><samp>video_size</samp></dt>
  7556. <dd><p>Set the video size of the images to read. If not specified the video
  7557. size is guessed from the first image file in the sequence.
  7558. </p></dd>
  7559. <dt><samp>export_path_metadata</samp></dt>
  7560. <dd><p>If set to 1, will add two extra fields to the metadata found in input, making them
  7561. also available for other filters (see <var>drawtext</var> filter for examples). Default
  7562. value is 0. The extra fields are described below:
  7563. </p><dl compact="compact">
  7564. <dt><samp>lavf.image2dec.source_path</samp></dt>
  7565. <dd><p>Corresponds to the full path to the input file being read.
  7566. </p></dd>
  7567. <dt><samp>lavf.image2dec.source_basename</samp></dt>
  7568. <dd><p>Corresponds to the name of the file being read.
  7569. </p></dd>
  7570. </dl>
  7571. </dd>
  7572. </dl>
  7573. <a name="Examples-3"></a>
  7574. <h4 class="subsection">15.9.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-3" aria-hidden="true">TOC</a></span></h4>
  7575. <ul>
  7576. <li> Use <code>ffmpeg</code> for creating a video from the images in the file
  7577. sequence <samp>img-001.jpeg</samp>, <samp>img-002.jpeg</samp>, ..., assuming an
  7578. input frame rate of 10 frames per second:
  7579. <div class="example">
  7580. <pre class="example">ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
  7581. </pre></div>
  7582. </li><li> As above, but start by reading from a file with index 100 in the sequence:
  7583. <div class="example">
  7584. <pre class="example">ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
  7585. </pre></div>
  7586. </li><li> Read images matching the &quot;*.png&quot; glob pattern , that is all the files
  7587. terminating with the &quot;.png&quot; suffix:
  7588. <div class="example">
  7589. <pre class="example">ffmpeg -framerate 10 -pattern_type glob -i &quot;*.png&quot; out.mkv
  7590. </pre></div>
  7591. </li></ul>
  7592. <a name="libgme"></a>
  7593. <h3 class="section">15.10 libgme<span class="pull-right"><a class="anchor hidden-xs" href="#libgme" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libgme" aria-hidden="true">TOC</a></span></h3>
  7594. <p>The Game Music Emu library is a collection of video game music file emulators.
  7595. </p>
  7596. <p>See <a href="https://bitbucket.org/mpyne/game-music-emu/overview">https://bitbucket.org/mpyne/game-music-emu/overview</a> for more information.
  7597. </p>
  7598. <p>It accepts the following options:
  7599. </p>
  7600. <dl compact="compact">
  7601. <dt><samp>track_index</samp></dt>
  7602. <dd><p>Set the index of which track to demux. The demuxer can only export one track.
  7603. Track indexes start at 0. Default is to pick the first track. Number of tracks
  7604. is exported as <var>tracks</var> metadata entry.
  7605. </p>
  7606. </dd>
  7607. <dt><samp>sample_rate</samp></dt>
  7608. <dd><p>Set the sampling rate of the exported track. Range is 1000 to 999999. Default is 44100.
  7609. </p>
  7610. </dd>
  7611. <dt><samp>max_size <em>(bytes)</em></samp></dt>
  7612. <dd><p>The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size,
  7613. which in turn, acts as a ceiling for the size of files that can be read.
  7614. Default is 50 MiB.
  7615. </p>
  7616. </dd>
  7617. </dl>
  7618. <a name="libmodplug"></a>
  7619. <h3 class="section">15.11 libmodplug<span class="pull-right"><a class="anchor hidden-xs" href="#libmodplug" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libmodplug" aria-hidden="true">TOC</a></span></h3>
  7620. <p>ModPlug based module demuxer
  7621. </p>
  7622. <p>See <a href="https://github.com/Konstanty/libmodplug">https://github.com/Konstanty/libmodplug</a>
  7623. </p>
  7624. <p>It will export one 2-channel 16-bit 44.1 kHz audio stream.
  7625. Optionally, a <code>pal8</code> 16-color video stream can be exported with or without printed metadata.
  7626. </p>
  7627. <p>It accepts the following options:
  7628. </p>
  7629. <dl compact="compact">
  7630. <dt><samp>noise_reduction</samp></dt>
  7631. <dd><p>Apply a simple low-pass filter. Can be 1 (on) or 0 (off). Default is 0.
  7632. </p>
  7633. </dd>
  7634. <dt><samp>reverb_depth</samp></dt>
  7635. <dd><p>Set amount of reverb. Range 0-100. Default is 0.
  7636. </p>
  7637. </dd>
  7638. <dt><samp>reverb_delay</samp></dt>
  7639. <dd><p>Set delay in ms, clamped to 40-250 ms. Default is 0.
  7640. </p>
  7641. </dd>
  7642. <dt><samp>bass_amount</samp></dt>
  7643. <dd><p>Apply bass expansion a.k.a. XBass or megabass. Range is 0 (quiet) to 100 (loud). Default is 0.
  7644. </p>
  7645. </dd>
  7646. <dt><samp>bass_range</samp></dt>
  7647. <dd><p>Set cutoff i.e. upper-bound for bass frequencies. Range is 10-100 Hz. Default is 0.
  7648. </p>
  7649. </dd>
  7650. <dt><samp>surround_depth</samp></dt>
  7651. <dd><p>Apply a Dolby Pro-Logic surround effect. Range is 0 (quiet) to 100 (heavy). Default is 0.
  7652. </p>
  7653. </dd>
  7654. <dt><samp>surround_delay</samp></dt>
  7655. <dd><p>Set surround delay in ms, clamped to 5-40 ms. Default is 0.
  7656. </p>
  7657. </dd>
  7658. <dt><samp>max_size</samp></dt>
  7659. <dd><p>The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size,
  7660. which in turn, acts as a ceiling for the size of files that can be read. Range is 0 to 100 MiB.
  7661. 0 removes buffer size limit (not recommended). Default is 5 MiB.
  7662. </p>
  7663. </dd>
  7664. <dt><samp>video_stream_expr</samp></dt>
  7665. <dd><p>String which is evaluated using the eval API to assign colors to the generated video stream.
  7666. Variables which can be used are <code>x</code>, <code>y</code>, <code>w</code>, <code>h</code>, <code>t</code>, <code>speed</code>,
  7667. <code>tempo</code>, <code>order</code>, <code>pattern</code> and <code>row</code>.
  7668. </p>
  7669. </dd>
  7670. <dt><samp>video_stream</samp></dt>
  7671. <dd><p>Generate video stream. Can be 1 (on) or 0 (off). Default is 0.
  7672. </p>
  7673. </dd>
  7674. <dt><samp>video_stream_w</samp></dt>
  7675. <dd><p>Set video frame width in &rsquo;chars&rsquo; where one char indicates 8 pixels. Range is 20-512. Default is 30.
  7676. </p>
  7677. </dd>
  7678. <dt><samp>video_stream_h</samp></dt>
  7679. <dd><p>Set video frame height in &rsquo;chars&rsquo; where one char indicates 8 pixels. Range is 20-512. Default is 30.
  7680. </p>
  7681. </dd>
  7682. <dt><samp>video_stream_ptxt</samp></dt>
  7683. <dd><p>Print metadata on video stream. Includes <code>speed</code>, <code>tempo</code>, <code>order</code>, <code>pattern</code>,
  7684. <code>row</code> and <code>ts</code> (time in ms). Can be 1 (on) or 0 (off). Default is 1.
  7685. </p>
  7686. </dd>
  7687. </dl>
  7688. <a name="libopenmpt"></a>
  7689. <h3 class="section">15.12 libopenmpt<span class="pull-right"><a class="anchor hidden-xs" href="#libopenmpt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libopenmpt" aria-hidden="true">TOC</a></span></h3>
  7690. <p>libopenmpt based module demuxer
  7691. </p>
  7692. <p>See <a href="https://lib.openmpt.org/libopenmpt/">https://lib.openmpt.org/libopenmpt/</a> for more information.
  7693. </p>
  7694. <p>Some files have multiple subsongs (tracks) this can be set with the <samp>subsong</samp>
  7695. option.
  7696. </p>
  7697. <p>It accepts the following options:
  7698. </p>
  7699. <dl compact="compact">
  7700. <dt><samp>subsong</samp></dt>
  7701. <dd><p>Set the subsong index. This can be either &rsquo;all&rsquo;, &rsquo;auto&rsquo;, or the index of the
  7702. subsong. Subsong indexes start at 0. The default is &rsquo;auto&rsquo;.
  7703. </p>
  7704. <p>The default value is to let libopenmpt choose.
  7705. </p>
  7706. </dd>
  7707. <dt><samp>layout</samp></dt>
  7708. <dd><p>Set the channel layout. Valid values are 1, 2, and 4 channel layouts.
  7709. The default value is STEREO.
  7710. </p>
  7711. </dd>
  7712. <dt><samp>sample_rate</samp></dt>
  7713. <dd><p>Set the sample rate for libopenmpt to output.
  7714. Range is from 1000 to INT_MAX. The value default is 48000.
  7715. </p></dd>
  7716. </dl>
  7717. <a name="mov_002fmp4_002f3gp"></a>
  7718. <h3 class="section">15.13 mov/mp4/3gp<span class="pull-right"><a class="anchor hidden-xs" href="#mov_002fmp4_002f3gp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mov_002fmp4_002f3gp" aria-hidden="true">TOC</a></span></h3>
  7719. <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).
  7720. </p>
  7721. <p>Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism, ismv, isma, f4v
  7722. </p>
  7723. <a name="Options-10"></a>
  7724. <h4 class="subsection">15.13.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-10" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-10" aria-hidden="true">TOC</a></span></h4>
  7725. <p>This demuxer accepts the following options:
  7726. </p><dl compact="compact">
  7727. <dt><samp>enable_drefs</samp></dt>
  7728. <dd><p>Enable loading of external tracks, disabled by default.
  7729. Enabling this can theoretically leak information in some use cases.
  7730. </p>
  7731. </dd>
  7732. <dt><samp>use_absolute_path</samp></dt>
  7733. <dd><p>Allows loading of external tracks via absolute paths, disabled by default.
  7734. Enabling this poses a security risk. It should only be enabled if the source
  7735. is known to be non-malicious.
  7736. </p>
  7737. </dd>
  7738. <dt><samp>seek_streams_individually</samp></dt>
  7739. <dd><p>When seeking, identify the closest point in each stream individually and demux packets in
  7740. that stream from identified point. This can lead to a different sequence of packets compared
  7741. to demuxing linearly from the beginning. Default is true.
  7742. </p>
  7743. </dd>
  7744. <dt><samp>ignore_editlist</samp></dt>
  7745. <dd><p>Ignore any edit list atoms. The demuxer, by default, modifies the stream index to reflect the
  7746. timeline described by the edit list. Default is false.
  7747. </p>
  7748. </dd>
  7749. <dt><samp>advanced_editlist</samp></dt>
  7750. <dd><p>Modify the stream index to reflect the timeline described by the edit list. <code>ignore_editlist</code>
  7751. must be set to false for this option to be effective.
  7752. If both <code>ignore_editlist</code> and this option are set to false, then only the
  7753. start of the stream index is modified to reflect initial dwell time or starting timestamp
  7754. described by the edit list. Default is true.
  7755. </p>
  7756. </dd>
  7757. <dt><samp>ignore_chapters</samp></dt>
  7758. <dd><p>Don&rsquo;t parse chapters. This includes GoPro &rsquo;HiLight&rsquo; tags/moments. Note that chapters are
  7759. only parsed when input is seekable. Default is false.
  7760. </p>
  7761. </dd>
  7762. <dt><samp>use_mfra_for</samp></dt>
  7763. <dd><p>For seekable fragmented input, set fragment&rsquo;s starting timestamp from media fragment random access box, if present.
  7764. </p>
  7765. <p>Following options are available:
  7766. </p><dl compact="compact">
  7767. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  7768. <dd><p>Auto-detect whether to set mfra timestamps as PTS or DTS <em>(default)</em>
  7769. </p>
  7770. </dd>
  7771. <dt>&lsquo;<samp>dts</samp>&rsquo;</dt>
  7772. <dd><p>Set mfra timestamps as DTS
  7773. </p>
  7774. </dd>
  7775. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  7776. <dd><p>Set mfra timestamps as PTS
  7777. </p>
  7778. </dd>
  7779. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  7780. <dd><p>Don&rsquo;t use mfra box to set timestamps
  7781. </p></dd>
  7782. </dl>
  7783. </dd>
  7784. <dt><samp>export_all</samp></dt>
  7785. <dd><p>Export unrecognized boxes within the <var>udta</var> box as metadata entries. The first four
  7786. characters of the box type are set as the key. Default is false.
  7787. </p>
  7788. </dd>
  7789. <dt><samp>export_xmp</samp></dt>
  7790. <dd><p>Export entire contents of <var>XMP_</var> box and <var>uuid</var> box as a string with key <code>xmp</code>. Note that
  7791. if <code>export_all</code> is set and this option isn&rsquo;t, the contents of <var>XMP_</var> box are still exported
  7792. but with key <code>XMP_</code>. Default is false.
  7793. </p>
  7794. </dd>
  7795. <dt><samp>activation_bytes</samp></dt>
  7796. <dd><p>4-byte key required to decrypt Audible AAX and AAX+ files. See Audible AAX subsection below.
  7797. </p>
  7798. </dd>
  7799. <dt><samp>audible_fixed_key</samp></dt>
  7800. <dd><p>Fixed key used for handling Audible AAX/AAX+ files. It has been pre-set so should not be necessary to
  7801. specify.
  7802. </p>
  7803. </dd>
  7804. <dt><samp>decryption_key</samp></dt>
  7805. <dd><p>16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
  7806. </p></dd>
  7807. </dl>
  7808. <a name="Audible-AAX"></a>
  7809. <h4 class="subsection">15.13.2 Audible AAX<span class="pull-right"><a class="anchor hidden-xs" href="#Audible-AAX" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Audible-AAX" aria-hidden="true">TOC</a></span></h4>
  7810. <p>Audible AAX files are encrypted M4B files, and they can be decrypted by specifying a 4 byte activation secret.
  7811. </p><div class="example">
  7812. <pre class="example">ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
  7813. </pre></div>
  7814. <a name="mpegts"></a>
  7815. <h3 class="section">15.14 mpegts<span class="pull-right"><a class="anchor hidden-xs" href="#mpegts" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mpegts" aria-hidden="true">TOC</a></span></h3>
  7816. <p>MPEG-2 transport stream demuxer.
  7817. </p>
  7818. <p>This demuxer accepts the following options:
  7819. </p><dl compact="compact">
  7820. <dt><samp>resync_size</samp></dt>
  7821. <dd><p>Set size limit for looking up a new synchronization. Default value is
  7822. 65536.
  7823. </p>
  7824. </dd>
  7825. <dt><samp>skip_unknown_pmt</samp></dt>
  7826. <dd><p>Skip PMTs for programs not defined in the PAT. Default value is 0.
  7827. </p>
  7828. </dd>
  7829. <dt><samp>fix_teletext_pts</samp></dt>
  7830. <dd><p>Override teletext packet PTS and DTS values with the timestamps calculated
  7831. from the PCR of the first program which the teletext stream is part of and is
  7832. not discarded. Default value is 1, set this option to 0 if you want your
  7833. teletext packet PTS and DTS values untouched.
  7834. </p>
  7835. </dd>
  7836. <dt><samp>ts_packetsize</samp></dt>
  7837. <dd><p>Output option carrying the raw packet size in bytes.
  7838. Show the detected raw packet size, cannot be set by the user.
  7839. </p>
  7840. </dd>
  7841. <dt><samp>scan_all_pmts</samp></dt>
  7842. <dd><p>Scan and combine all PMTs. The value is an integer with value from -1
  7843. to 1 (-1 means automatic setting, 1 means enabled, 0 means
  7844. disabled). Default value is -1.
  7845. </p>
  7846. </dd>
  7847. <dt><samp>merge_pmt_versions</samp></dt>
  7848. <dd><p>Re-use existing streams when a PMT&rsquo;s version is updated and elementary
  7849. streams move to different PIDs. Default value is 0.
  7850. </p></dd>
  7851. </dl>
  7852. <a name="mpjpeg"></a>
  7853. <h3 class="section">15.15 mpjpeg<span class="pull-right"><a class="anchor hidden-xs" href="#mpjpeg" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mpjpeg" aria-hidden="true">TOC</a></span></h3>
  7854. <p>MJPEG encapsulated in multi-part MIME demuxer.
  7855. </p>
  7856. <p>This demuxer allows reading of MJPEG, where each frame is represented as a part of
  7857. multipart/x-mixed-replace stream.
  7858. </p><dl compact="compact">
  7859. <dt><samp>strict_mime_boundary</samp></dt>
  7860. <dd><p>Default implementation applies a relaxed standard to multi-part MIME boundary detection,
  7861. to prevent regression with numerous existing endpoints not generating a proper MIME
  7862. MJPEG stream. Turning this option on by setting it to 1 will result in a stricter check
  7863. of the boundary value.
  7864. </p></dd>
  7865. </dl>
  7866. <a name="rawvideo-1"></a>
  7867. <h3 class="section">15.16 rawvideo<span class="pull-right"><a class="anchor hidden-xs" href="#rawvideo-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rawvideo-1" aria-hidden="true">TOC</a></span></h3>
  7868. <p>Raw video demuxer.
  7869. </p>
  7870. <p>This demuxer allows one to read raw video data. Since there is no header
  7871. specifying the assumed video parameters, the user must specify them
  7872. in order to be able to decode the data correctly.
  7873. </p>
  7874. <p>This demuxer accepts the following options:
  7875. </p><dl compact="compact">
  7876. <dt><samp>framerate</samp></dt>
  7877. <dd><p>Set input video frame rate. Default value is 25.
  7878. </p>
  7879. </dd>
  7880. <dt><samp>pixel_format</samp></dt>
  7881. <dd><p>Set the input video pixel format. Default value is <code>yuv420p</code>.
  7882. </p>
  7883. </dd>
  7884. <dt><samp>video_size</samp></dt>
  7885. <dd><p>Set the input video size. This value must be specified explicitly.
  7886. </p></dd>
  7887. </dl>
  7888. <p>For example to read a rawvideo file <samp>input.raw</samp> with
  7889. <code>ffplay</code>, assuming a pixel format of <code>rgb24</code>, a video
  7890. size of <code>320x240</code>, and a frame rate of 10 images per second, use
  7891. the command:
  7892. </p><div class="example">
  7893. <pre class="example">ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw
  7894. </pre></div>
  7895. <a name="sbg"></a>
  7896. <h3 class="section">15.17 sbg<span class="pull-right"><a class="anchor hidden-xs" href="#sbg" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sbg" aria-hidden="true">TOC</a></span></h3>
  7897. <p>SBaGen script demuxer.
  7898. </p>
  7899. <p>This demuxer reads the script language used by SBaGen
  7900. <a href="http://uazu.net/sbagen/">http://uazu.net/sbagen/</a> to generate binaural beats sessions. A SBG
  7901. script looks like that:
  7902. </p><div class="example">
  7903. <pre class="example">-SE
  7904. a: 300-2.5/3 440+4.5/0
  7905. b: 300-2.5/0 440+4.5/3
  7906. off: -
  7907. NOW == a
  7908. +0:07:00 == b
  7909. +0:14:00 == a
  7910. +0:21:00 == b
  7911. +0:30:00 off
  7912. </pre></div>
  7913. <p>A SBG script can mix absolute and relative timestamps. If the script uses
  7914. either only absolute timestamps (including the script start time) or only
  7915. relative ones, then its layout is fixed, and the conversion is
  7916. straightforward. On the other hand, if the script mixes both kind of
  7917. timestamps, then the <var>NOW</var> reference for relative timestamps will be
  7918. taken from the current time of day at the time the script is read, and the
  7919. script layout will be frozen according to that reference. That means that if
  7920. the script is directly played, the actual times will match the absolute
  7921. timestamps up to the sound controller&rsquo;s clock accuracy, but if the user
  7922. somehow pauses the playback or seeks, all times will be shifted accordingly.
  7923. </p>
  7924. <a name="tedcaptions"></a>
  7925. <h3 class="section">15.18 tedcaptions<span class="pull-right"><a class="anchor hidden-xs" href="#tedcaptions" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tedcaptions" aria-hidden="true">TOC</a></span></h3>
  7926. <p>JSON captions used for <a href="http://www.ted.com/">TED Talks</a>.
  7927. </p>
  7928. <p>TED does not provide links to the captions, but they can be guessed from the
  7929. page. The file <samp>tools/bookmarklets.html</samp> from the FFmpeg source tree
  7930. contains a bookmarklet to expose them.
  7931. </p>
  7932. <p>This demuxer accepts the following option:
  7933. </p><dl compact="compact">
  7934. <dt><samp>start_time</samp></dt>
  7935. <dd><p>Set the start time of the TED talk, in milliseconds. The default is 15000
  7936. (15s). It is used to sync the captions with the downloadable videos, because
  7937. they include a 15s intro.
  7938. </p></dd>
  7939. </dl>
  7940. <p>Example: convert the captions to a format most players understand:
  7941. </p><div class="example">
  7942. <pre class="example">ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt
  7943. </pre></div>
  7944. <a name="vapoursynth"></a>
  7945. <h3 class="section">15.19 vapoursynth<span class="pull-right"><a class="anchor hidden-xs" href="#vapoursynth" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vapoursynth" aria-hidden="true">TOC</a></span></h3>
  7946. <p>Vapoursynth wrapper.
  7947. </p>
  7948. <p>Due to security concerns, Vapoursynth scripts will not
  7949. be autodetected so the input format has to be forced. For ff* CLI tools,
  7950. add <code>-f vapoursynth</code> before the input <code>-i yourscript.vpy</code>.
  7951. </p>
  7952. <p>This demuxer accepts the following option:
  7953. </p><dl compact="compact">
  7954. <dt><samp>max_script_size</samp></dt>
  7955. <dd><p>The demuxer buffers the entire script into memory. Adjust this value to set the maximum buffer size,
  7956. which in turn, acts as a ceiling for the size of scripts that can be read.
  7957. Default is 1 MiB.
  7958. </p></dd>
  7959. </dl>
  7960. <a name="Metadata"></a>
  7961. <h2 class="chapter">16 Metadata<span class="pull-right"><a class="anchor hidden-xs" href="#Metadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Metadata" aria-hidden="true">TOC</a></span></h2>
  7962. <p>FFmpeg is able to dump metadata from media files into a simple UTF-8-encoded
  7963. INI-like text file and then load it back using the metadata muxer/demuxer.
  7964. </p>
  7965. <p>The file format is as follows:
  7966. </p><ol>
  7967. <li> A file consists of a header and a number of metadata tags divided into sections,
  7968. each on its own line.
  7969. </li><li> The header is a &lsquo;<samp>;FFMETADATA</samp>&rsquo; string, followed by a version number (now 1).
  7970. </li><li> Metadata tags are of the form &lsquo;<samp>key=value</samp>&rsquo;
  7971. </li><li> Immediately after header follows global metadata
  7972. </li><li> After global metadata there may be sections with per-stream/per-chapter
  7973. metadata.
  7974. </li><li> A section starts with the section name in uppercase (i.e. STREAM or CHAPTER) in
  7975. brackets (&lsquo;<samp>[</samp>&rsquo;, &lsquo;<samp>]</samp>&rsquo;) and ends with next section or end of file.
  7976. </li><li> At the beginning of a chapter section there may be an optional timebase to be
  7977. used for start/end values. It must be in form
  7978. &lsquo;<samp>TIMEBASE=<var>num</var>/<var>den</var></samp>&rsquo;, where <var>num</var> and <var>den</var> are
  7979. integers. If the timebase is missing then start/end times are assumed to
  7980. be in nanoseconds.
  7981. <p>Next a chapter section must contain chapter start and end times in form
  7982. &lsquo;<samp>START=<var>num</var></samp>&rsquo;, &lsquo;<samp>END=<var>num</var></samp>&rsquo;, where <var>num</var> is a positive
  7983. integer.
  7984. </p>
  7985. </li><li> Empty lines and lines starting with &lsquo;<samp>;</samp>&rsquo; or &lsquo;<samp>#</samp>&rsquo; are ignored.
  7986. </li><li> Metadata keys or values containing special characters (&lsquo;<samp>=</samp>&rsquo;, &lsquo;<samp>;</samp>&rsquo;,
  7987. &lsquo;<samp>#</samp>&rsquo;, &lsquo;<samp>\</samp>&rsquo; and a newline) must be escaped with a backslash &lsquo;<samp>\</samp>&rsquo;.
  7988. </li><li> Note that whitespace in metadata (e.g. &lsquo;<samp>foo = bar</samp>&rsquo;) is considered to be
  7989. a part of the tag (in the example above key is &lsquo;<samp>foo </samp>&rsquo;, value is
  7990. &lsquo;<samp> bar</samp>&rsquo;).
  7991. </li></ol>
  7992. <p>A ffmetadata file might look like this:
  7993. </p><div class="example">
  7994. <pre class="example">;FFMETADATA1
  7995. title=bike\\shed
  7996. ;this is a comment
  7997. artist=FFmpeg troll team
  7998. [CHAPTER]
  7999. TIMEBASE=1/1000
  8000. START=0
  8001. #chapter ends at 0:01:00
  8002. END=60000
  8003. title=chapter \#1
  8004. [STREAM]
  8005. title=multi\
  8006. line
  8007. </pre></div>
  8008. <p>By using the ffmetadata muxer and demuxer it is possible to extract
  8009. metadata from an input file to an ffmetadata file, and then transcode
  8010. the file into an output file with the edited ffmetadata file.
  8011. </p>
  8012. <p>Extracting an ffmetadata file with <samp>ffmpeg</samp> goes as follows:
  8013. </p><div class="example">
  8014. <pre class="example">ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE
  8015. </pre></div>
  8016. <p>Reinserting edited metadata information from the FFMETADATAFILE file can
  8017. be done as:
  8018. </p><div class="example">
  8019. <pre class="example">ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
  8020. </pre></div>
  8021. <a name="Protocol-Options"></a>
  8022. <h2 class="chapter">17 Protocol Options<span class="pull-right"><a class="anchor hidden-xs" href="#Protocol-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Protocol-Options" aria-hidden="true">TOC</a></span></h2>
  8023. <p>The libavformat library provides some generic global options, which
  8024. can be set on all the protocols. In addition each protocol may support
  8025. so-called private options, which are specific for that component.
  8026. </p>
  8027. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  8028. FFmpeg tools, or by setting the value explicitly in the
  8029. <code>AVFormatContext</code> options or using the <samp>libavutil/opt.h</samp> API
  8030. for programmatic use.
  8031. </p>
  8032. <p>The list of supported options follows:
  8033. </p>
  8034. <dl compact="compact">
  8035. <dt><samp>protocol_whitelist <var>list</var> (<em>input</em>)</samp></dt>
  8036. <dd><p>Set a &quot;,&quot;-separated list of allowed protocols. &quot;ALL&quot; matches all protocols. Protocols
  8037. prefixed by &quot;-&quot; are disabled.
  8038. All protocols are allowed by default but protocols used by an another
  8039. protocol (nested protocols) are restricted to a per protocol subset.
  8040. </p></dd>
  8041. </dl>
  8042. <a name="Protocols"></a>
  8043. <h2 class="chapter">18 Protocols<span class="pull-right"><a class="anchor hidden-xs" href="#Protocols" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Protocols" aria-hidden="true">TOC</a></span></h2>
  8044. <p>Protocols are configured elements in FFmpeg that enable access to
  8045. resources that require specific protocols.
  8046. </p>
  8047. <p>When you configure your FFmpeg build, all the supported protocols are
  8048. enabled by default. You can list all available ones using the
  8049. configure option &quot;&ndash;list-protocols&quot;.
  8050. </p>
  8051. <p>You can disable all the protocols using the configure option
  8052. &quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
  8053. option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
  8054. particular protocol using the option
  8055. &quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
  8056. </p>
  8057. <p>The option &quot;-protocols&quot; of the ff* tools will display the list of
  8058. supported protocols.
  8059. </p>
  8060. <p>All protocols accept the following options:
  8061. </p>
  8062. <dl compact="compact">
  8063. <dt><samp>rw_timeout</samp></dt>
  8064. <dd><p>Maximum time to wait for (network) read/write operations to complete,
  8065. in microseconds.
  8066. </p></dd>
  8067. </dl>
  8068. <p>A description of the currently available protocols follows.
  8069. </p>
  8070. <a name="amqp"></a>
  8071. <h3 class="section">18.1 amqp<span class="pull-right"><a class="anchor hidden-xs" href="#amqp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-amqp" aria-hidden="true">TOC</a></span></h3>
  8072. <p>Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker based
  8073. publish-subscribe communication protocol.
  8074. </p>
  8075. <p>FFmpeg must be compiled with &ndash;enable-librabbitmq to support AMQP. A separate
  8076. AMQP broker must also be run. An example open-source AMQP broker is RabbitMQ.
  8077. </p>
  8078. <p>After starting the broker, an FFmpeg client may stream data to the broker using
  8079. the command:
  8080. </p>
  8081. <div class="example">
  8082. <pre class="example">ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@]hostname[:port][/vhost]
  8083. </pre></div>
  8084. <p>Where hostname and port (default is 5672) is the address of the broker. The
  8085. client may also set a user/password for authentication. The default for both
  8086. fields is &quot;guest&quot;. Name of virtual host on broker can be set with vhost. The
  8087. default value is &quot;/&quot;.
  8088. </p>
  8089. <p>Muliple subscribers may stream from the broker using the command:
  8090. </p><div class="example">
  8091. <pre class="example">ffplay amqp://[[user]:[password]@]hostname[:port][/vhost]
  8092. </pre></div>
  8093. <p>In RabbitMQ all data published to the broker flows through a specific exchange,
  8094. and each subscribing client has an assigned queue/buffer. When a packet arrives
  8095. at an exchange, it may be copied to a client&rsquo;s queue depending on the exchange
  8096. and routing_key fields.
  8097. </p>
  8098. <p>The following options are supported:
  8099. </p>
  8100. <dl compact="compact">
  8101. <dt><samp>exchange</samp></dt>
  8102. <dd><p>Sets the exchange to use on the broker. RabbitMQ has several predefined
  8103. exchanges: &quot;amq.direct&quot; is the default exchange, where the publisher and
  8104. subscriber must have a matching routing_key; &quot;amq.fanout&quot; is the same as a
  8105. broadcast operation (i.e. the data is forwarded to all queues on the fanout
  8106. exchange independent of the routing_key); and &quot;amq.topic&quot; is similar to
  8107. &quot;amq.direct&quot;, but allows for more complex pattern matching (refer to the RabbitMQ
  8108. documentation).
  8109. </p>
  8110. </dd>
  8111. <dt><samp>routing_key</samp></dt>
  8112. <dd><p>Sets the routing key. The default value is &quot;amqp&quot;. The routing key is used on
  8113. the &quot;amq.direct&quot; and &quot;amq.topic&quot; exchanges to decide whether packets are written
  8114. to the queue of a subscriber.
  8115. </p>
  8116. </dd>
  8117. <dt><samp>pkt_size</samp></dt>
  8118. <dd><p>Maximum size of each packet sent/received to the broker. Default is 131072.
  8119. Minimum is 4096 and max is any large value (representable by an int). When
  8120. receiving packets, this sets an internal buffer size in FFmpeg. It should be
  8121. equal to or greater than the size of the published packets to the broker. Otherwise
  8122. the received message may be truncated causing decoding errors.
  8123. </p>
  8124. </dd>
  8125. <dt><samp>connection_timeout</samp></dt>
  8126. <dd><p>The timeout in seconds during the initial connection to the broker. The
  8127. default value is rw_timeout, or 5 seconds if rw_timeout is not set.
  8128. </p>
  8129. </dd>
  8130. <dt><samp>delivery_mode <var>mode</var></samp></dt>
  8131. <dd><p>Sets the delivery mode of each message sent to broker.
  8132. The following values are accepted:
  8133. </p><dl compact="compact">
  8134. <dt>&lsquo;<samp>persistent</samp>&rsquo;</dt>
  8135. <dd><p>Delivery mode set to &quot;persistent&quot; (2). This is the default value.
  8136. Messages may be written to the broker&rsquo;s disk depending on its setup.
  8137. </p>
  8138. </dd>
  8139. <dt>&lsquo;<samp>non-persistent</samp>&rsquo;</dt>
  8140. <dd><p>Delivery mode set to &quot;non-persistent&quot; (1).
  8141. Messages will stay in broker&rsquo;s memory unless the broker is under memory
  8142. pressure.
  8143. </p>
  8144. </dd>
  8145. </dl>
  8146. </dd>
  8147. </dl>
  8148. <a name="async"></a>
  8149. <h3 class="section">18.2 async<span class="pull-right"><a class="anchor hidden-xs" href="#async" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-async" aria-hidden="true">TOC</a></span></h3>
  8150. <p>Asynchronous data filling wrapper for input stream.
  8151. </p>
  8152. <p>Fill data in a background thread, to decouple I/O operation from demux thread.
  8153. </p>
  8154. <div class="example">
  8155. <pre class="example">async:<var>URL</var>
  8156. async:http://host/resource
  8157. async:cache:http://host/resource
  8158. </pre></div>
  8159. <a name="bluray"></a>
  8160. <h3 class="section">18.3 bluray<span class="pull-right"><a class="anchor hidden-xs" href="#bluray" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bluray" aria-hidden="true">TOC</a></span></h3>
  8161. <p>Read BluRay playlist.
  8162. </p>
  8163. <p>The accepted options are:
  8164. </p><dl compact="compact">
  8165. <dt><samp>angle</samp></dt>
  8166. <dd><p>BluRay angle
  8167. </p>
  8168. </dd>
  8169. <dt><samp>chapter</samp></dt>
  8170. <dd><p>Start chapter (1...N)
  8171. </p>
  8172. </dd>
  8173. <dt><samp>playlist</samp></dt>
  8174. <dd><p>Playlist to read (BDMV/PLAYLIST/?????.mpls)
  8175. </p>
  8176. </dd>
  8177. </dl>
  8178. <p>Examples:
  8179. </p>
  8180. <p>Read longest playlist from BluRay mounted to /mnt/bluray:
  8181. </p><div class="example">
  8182. <pre class="example">bluray:/mnt/bluray
  8183. </pre></div>
  8184. <p>Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
  8185. </p><div class="example">
  8186. <pre class="example">-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
  8187. </pre></div>
  8188. <a name="cache"></a>
  8189. <h3 class="section">18.4 cache<span class="pull-right"><a class="anchor hidden-xs" href="#cache" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-cache" aria-hidden="true">TOC</a></span></h3>
  8190. <p>Caching wrapper for input stream.
  8191. </p>
  8192. <p>Cache the input stream to temporary file. It brings seeking capability to live streams.
  8193. </p>
  8194. <p>The accepted options are:
  8195. </p><dl compact="compact">
  8196. <dt><samp>read_ahead_limit</samp></dt>
  8197. <dd><p>Amount in bytes that may be read ahead when seeking isn&rsquo;t supported. Range is -1 to INT_MAX.
  8198. -1 for unlimited. Default is 65536.
  8199. </p>
  8200. </dd>
  8201. </dl>
  8202. <p>URL Syntax is
  8203. </p><div class="example">
  8204. <pre class="example">cache:<var>URL</var>
  8205. </pre></div>
  8206. <a name="concat-2"></a>
  8207. <h3 class="section">18.5 concat<span class="pull-right"><a class="anchor hidden-xs" href="#concat-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-concat-2" aria-hidden="true">TOC</a></span></h3>
  8208. <p>Physical concatenation protocol.
  8209. </p>
  8210. <p>Read and seek from many resources in sequence as if they were
  8211. a unique resource.
  8212. </p>
  8213. <p>A URL accepted by this protocol has the syntax:
  8214. </p><div class="example">
  8215. <pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
  8216. </pre></div>
  8217. <p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
  8218. resource to be concatenated, each one possibly specifying a distinct
  8219. protocol.
  8220. </p>
  8221. <p>For example to read a sequence of files <samp>split1.mpeg</samp>,
  8222. <samp>split2.mpeg</samp>, <samp>split3.mpeg</samp> with <code>ffplay</code> use the
  8223. command:
  8224. </p><div class="example">
  8225. <pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
  8226. </pre></div>
  8227. <p>Note that you may need to escape the character &quot;|&quot; which is special for
  8228. many shells.
  8229. </p>
  8230. <a name="crypto"></a>
  8231. <h3 class="section">18.6 crypto<span class="pull-right"><a class="anchor hidden-xs" href="#crypto" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-crypto" aria-hidden="true">TOC</a></span></h3>
  8232. <p>AES-encrypted stream reading protocol.
  8233. </p>
  8234. <p>The accepted options are:
  8235. </p><dl compact="compact">
  8236. <dt><samp>key</samp></dt>
  8237. <dd><p>Set the AES decryption key binary block from given hexadecimal representation.
  8238. </p>
  8239. </dd>
  8240. <dt><samp>iv</samp></dt>
  8241. <dd><p>Set the AES decryption initialization vector binary block from given hexadecimal representation.
  8242. </p></dd>
  8243. </dl>
  8244. <p>Accepted URL formats:
  8245. </p><div class="example">
  8246. <pre class="example">crypto:<var>URL</var>
  8247. crypto+<var>URL</var>
  8248. </pre></div>
  8249. <a name="data"></a>
  8250. <h3 class="section">18.7 data<span class="pull-right"><a class="anchor hidden-xs" href="#data" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-data" aria-hidden="true">TOC</a></span></h3>
  8251. <p>Data in-line in the URI. See <a href="http://en.wikipedia.org/wiki/Data_URI_scheme">http://en.wikipedia.org/wiki/Data_URI_scheme</a>.
  8252. </p>
  8253. <p>For example, to convert a GIF file given inline with <code>ffmpeg</code>:
  8254. </p><div class="example">
  8255. <pre class="example">ffmpeg -i &quot;data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=&quot; smiley.png
  8256. </pre></div>
  8257. <a name="file"></a>
  8258. <h3 class="section">18.8 file<span class="pull-right"><a class="anchor hidden-xs" href="#file" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-file" aria-hidden="true">TOC</a></span></h3>
  8259. <p>File access protocol.
  8260. </p>
  8261. <p>Read from or write to a file.
  8262. </p>
  8263. <p>A file URL can have the form:
  8264. </p><div class="example">
  8265. <pre class="example">file:<var>filename</var>
  8266. </pre></div>
  8267. <p>where <var>filename</var> is the path of the file to read.
  8268. </p>
  8269. <p>An URL that does not have a protocol prefix will be assumed to be a
  8270. file URL. Depending on the build, an URL that looks like a Windows
  8271. path with the drive letter at the beginning will also be assumed to be
  8272. a file URL (usually not the case in builds for unix-like systems).
  8273. </p>
  8274. <p>For example to read from a file <samp>input.mpeg</samp> with <code>ffmpeg</code>
  8275. use the command:
  8276. </p><div class="example">
  8277. <pre class="example">ffmpeg -i file:input.mpeg output.mpeg
  8278. </pre></div>
  8279. <p>This protocol accepts the following options:
  8280. </p>
  8281. <dl compact="compact">
  8282. <dt><samp>truncate</samp></dt>
  8283. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  8284. truncating. Default value is 1.
  8285. </p>
  8286. </dd>
  8287. <dt><samp>blocksize</samp></dt>
  8288. <dd><p>Set I/O operation maximum block size, in bytes. Default value is
  8289. <code>INT_MAX</code>, which results in not limiting the requested block size.
  8290. Setting this value reasonably low improves user termination request reaction
  8291. time, which is valuable for files on slow medium.
  8292. </p>
  8293. </dd>
  8294. <dt><samp>follow</samp></dt>
  8295. <dd><p>If set to 1, the protocol will retry reading at the end of the file, allowing
  8296. reading files that still are being written. In order for this to terminate,
  8297. you either need to use the rw_timeout option, or use the interrupt callback
  8298. (for API users).
  8299. </p>
  8300. </dd>
  8301. <dt><samp>seekable</samp></dt>
  8302. <dd><p>Controls if seekability is advertised on the file. 0 means non-seekable, -1
  8303. means auto (seekable for normal files, non-seekable for named pipes).
  8304. </p>
  8305. <p>Many demuxers handle seekable and non-seekable resources differently,
  8306. overriding this might speed up opening certain files at the cost of losing some
  8307. features (e.g. accurate seeking).
  8308. </p></dd>
  8309. </dl>
  8310. <a name="ftp"></a>
  8311. <h3 class="section">18.9 ftp<span class="pull-right"><a class="anchor hidden-xs" href="#ftp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ftp" aria-hidden="true">TOC</a></span></h3>
  8312. <p>FTP (File Transfer Protocol).
  8313. </p>
  8314. <p>Read from or write to remote resources using FTP protocol.
  8315. </p>
  8316. <p>Following syntax is required.
  8317. </p><div class="example">
  8318. <pre class="example">ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  8319. </pre></div>
  8320. <p>This protocol accepts the following options.
  8321. </p>
  8322. <dl compact="compact">
  8323. <dt><samp>timeout</samp></dt>
  8324. <dd><p>Set timeout in microseconds of socket I/O operations used by the underlying low level
  8325. operation. By default it is set to -1, which means that the timeout is
  8326. not specified.
  8327. </p>
  8328. </dd>
  8329. <dt><samp>ftp-user</samp></dt>
  8330. <dd><p>Set a user to be used for authenticating to the FTP server. This is overridden by the
  8331. user in the FTP URL.
  8332. </p>
  8333. </dd>
  8334. <dt><samp>ftp-password</samp></dt>
  8335. <dd><p>Set a password to be used for authenticating to the FTP server. This is overridden by
  8336. the password in the FTP URL, or by <samp>ftp-anonymous-password</samp> if no user is set.
  8337. </p>
  8338. </dd>
  8339. <dt><samp>ftp-anonymous-password</samp></dt>
  8340. <dd><p>Password used when login as anonymous user. Typically an e-mail address
  8341. should be used.
  8342. </p>
  8343. </dd>
  8344. <dt><samp>ftp-write-seekable</samp></dt>
  8345. <dd><p>Control seekability of connection during encoding. If set to 1 the
  8346. resource is supposed to be seekable, if set to 0 it is assumed not
  8347. to be seekable. Default value is 0.
  8348. </p></dd>
  8349. </dl>
  8350. <p>NOTE: Protocol can be used as output, but it is recommended to not do
  8351. it, unless special care is taken (tests, customized server configuration
  8352. etc.). Different FTP servers behave in different way during seek
  8353. operation. ff* tools may produce incomplete content due to server limitations.
  8354. </p>
  8355. <a name="gopher"></a>
  8356. <h3 class="section">18.10 gopher<span class="pull-right"><a class="anchor hidden-xs" href="#gopher" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gopher" aria-hidden="true">TOC</a></span></h3>
  8357. <p>Gopher protocol.
  8358. </p>
  8359. <a name="gophers"></a>
  8360. <h3 class="section">18.11 gophers<span class="pull-right"><a class="anchor hidden-xs" href="#gophers" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gophers" aria-hidden="true">TOC</a></span></h3>
  8361. <p>Gophers protocol.
  8362. </p>
  8363. <p>The Gopher protocol with TLS encapsulation.
  8364. </p>
  8365. <a name="hls-1"></a>
  8366. <h3 class="section">18.12 hls<span class="pull-right"><a class="anchor hidden-xs" href="#hls-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hls-1" aria-hidden="true">TOC</a></span></h3>
  8367. <p>Read Apple HTTP Live Streaming compliant segmented stream as
  8368. a uniform one. The M3U8 playlists describing the segments can be
  8369. remote HTTP resources or local files, accessed using the standard
  8370. file protocol.
  8371. The nested protocol is declared by specifying
  8372. &quot;+<var>proto</var>&quot; after the hls URI scheme name, where <var>proto</var>
  8373. is either &quot;file&quot; or &quot;http&quot;.
  8374. </p>
  8375. <div class="example">
  8376. <pre class="example">hls+http://host/path/to/remote/resource.m3u8
  8377. hls+file://path/to/local/resource.m3u8
  8378. </pre></div>
  8379. <p>Using this protocol is discouraged - the hls demuxer should work
  8380. just as well (if not, please report the issues) and is more complete.
  8381. To use the hls demuxer instead, simply use the direct URLs to the
  8382. m3u8 files.
  8383. </p>
  8384. <a name="http"></a>
  8385. <h3 class="section">18.13 http<span class="pull-right"><a class="anchor hidden-xs" href="#http" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-http" aria-hidden="true">TOC</a></span></h3>
  8386. <p>HTTP (Hyper Text Transfer Protocol).
  8387. </p>
  8388. <p>This protocol accepts the following options:
  8389. </p>
  8390. <dl compact="compact">
  8391. <dt><samp>seekable</samp></dt>
  8392. <dd><p>Control seekability of connection. If set to 1 the resource is
  8393. supposed to be seekable, if set to 0 it is assumed not to be seekable,
  8394. if set to -1 it will try to autodetect if it is seekable. Default
  8395. value is -1.
  8396. </p>
  8397. </dd>
  8398. <dt><samp>chunked_post</samp></dt>
  8399. <dd><p>If set to 1 use chunked Transfer-Encoding for posts, default is 1.
  8400. </p>
  8401. </dd>
  8402. <dt><samp>content_type</samp></dt>
  8403. <dd><p>Set a specific content type for the POST messages or for listen mode.
  8404. </p>
  8405. </dd>
  8406. <dt><samp>http_proxy</samp></dt>
  8407. <dd><p>set HTTP proxy to tunnel through e.g. http://example.com:1234
  8408. </p>
  8409. </dd>
  8410. <dt><samp>headers</samp></dt>
  8411. <dd><p>Set custom HTTP headers, can override built in default headers. The
  8412. value must be a string encoding the headers.
  8413. </p>
  8414. </dd>
  8415. <dt><samp>multiple_requests</samp></dt>
  8416. <dd><p>Use persistent connections if set to 1, default is 0.
  8417. </p>
  8418. </dd>
  8419. <dt><samp>post_data</samp></dt>
  8420. <dd><p>Set custom HTTP post data.
  8421. </p>
  8422. </dd>
  8423. <dt><samp>referer</samp></dt>
  8424. <dd><p>Set the Referer header. Include &rsquo;Referer: URL&rsquo; header in HTTP request.
  8425. </p>
  8426. </dd>
  8427. <dt><samp>user_agent</samp></dt>
  8428. <dd><p>Override the User-Agent header. If not specified the protocol will use a
  8429. string describing the libavformat build. (&quot;Lavf/&lt;version&gt;&quot;)
  8430. </p>
  8431. </dd>
  8432. <dt><samp>user-agent</samp></dt>
  8433. <dd><p>This is a deprecated option, you can use user_agent instead it.
  8434. </p>
  8435. </dd>
  8436. <dt><samp>reconnect_at_eof</samp></dt>
  8437. <dd><p>If set then eof is treated like an error and causes reconnection, this is useful
  8438. for live / endless streams.
  8439. </p>
  8440. </dd>
  8441. <dt><samp>reconnect_streamed</samp></dt>
  8442. <dd><p>If set then even streamed/non seekable streams will be reconnected on errors.
  8443. </p>
  8444. </dd>
  8445. <dt><samp>reconnect_on_network_error</samp></dt>
  8446. <dd><p>Reconnect automatically in case of TCP/TLS errors during connect.
  8447. </p>
  8448. </dd>
  8449. <dt><samp>reconnect_on_http_error</samp></dt>
  8450. <dd><p>A comma separated list of HTTP status codes to reconnect on. The list can
  8451. include specific status codes (e.g. &rsquo;503&rsquo;) or the strings &rsquo;4xx&rsquo; / &rsquo;5xx&rsquo;.
  8452. </p>
  8453. </dd>
  8454. <dt><samp>reconnect_delay_max</samp></dt>
  8455. <dd><p>Sets the maximum delay in seconds after which to give up reconnecting
  8456. </p>
  8457. </dd>
  8458. <dt><samp>mime_type</samp></dt>
  8459. <dd><p>Export the MIME type.
  8460. </p>
  8461. </dd>
  8462. <dt><samp>http_version</samp></dt>
  8463. <dd><p>Exports the HTTP response version number. Usually &quot;1.0&quot; or &quot;1.1&quot;.
  8464. </p>
  8465. </dd>
  8466. <dt><samp>icy</samp></dt>
  8467. <dd><p>If set to 1 request ICY (SHOUTcast) metadata from the server. If the server
  8468. supports this, the metadata has to be retrieved by the application by reading
  8469. the <samp>icy_metadata_headers</samp> and <samp>icy_metadata_packet</samp> options.
  8470. The default is 1.
  8471. </p>
  8472. </dd>
  8473. <dt><samp>icy_metadata_headers</samp></dt>
  8474. <dd><p>If the server supports ICY metadata, this contains the ICY-specific HTTP reply
  8475. headers, separated by newline characters.
  8476. </p>
  8477. </dd>
  8478. <dt><samp>icy_metadata_packet</samp></dt>
  8479. <dd><p>If the server supports ICY metadata, and <samp>icy</samp> was set to 1, this
  8480. contains the last non-empty metadata packet sent by the server. It should be
  8481. polled in regular intervals by applications interested in mid-stream metadata
  8482. updates.
  8483. </p>
  8484. </dd>
  8485. <dt><samp>cookies</samp></dt>
  8486. <dd><p>Set the cookies to be sent in future requests. The format of each cookie is the
  8487. same as the value of a Set-Cookie HTTP response field. Multiple cookies can be
  8488. delimited by a newline character.
  8489. </p>
  8490. </dd>
  8491. <dt><samp>offset</samp></dt>
  8492. <dd><p>Set initial byte offset.
  8493. </p>
  8494. </dd>
  8495. <dt><samp>end_offset</samp></dt>
  8496. <dd><p>Try to limit the request to bytes preceding this offset.
  8497. </p>
  8498. </dd>
  8499. <dt><samp>method</samp></dt>
  8500. <dd><p>When used as a client option it sets the HTTP method for the request.
  8501. </p>
  8502. <p>When used as a server option it sets the HTTP method that is going to be
  8503. expected from the client(s).
  8504. If the expected and the received HTTP method do not match the client will
  8505. be given a Bad Request response.
  8506. When unset the HTTP method is not checked for now. This will be replaced by
  8507. autodetection in the future.
  8508. </p>
  8509. </dd>
  8510. <dt><samp>listen</samp></dt>
  8511. <dd><p>If set to 1 enables experimental HTTP server. This can be used to send data when
  8512. used as an output option, or read data from a client with HTTP POST when used as
  8513. an input option.
  8514. If set to 2 enables experimental multi-client HTTP server. This is not yet implemented
  8515. in ffmpeg.c and thus must not be used as a command line option.
  8516. </p><div class="example">
  8517. <pre class="example"># Server side (sending):
  8518. ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<var>server</var>:<var>port</var>
  8519. # Client side (receiving):
  8520. ffmpeg -i http://<var>server</var>:<var>port</var> -c copy somefile.ogg
  8521. # Client can also be done with wget:
  8522. wget http://<var>server</var>:<var>port</var> -O somefile.ogg
  8523. # Server side (receiving):
  8524. ffmpeg -listen 1 -i http://<var>server</var>:<var>port</var> -c copy somefile.ogg
  8525. # Client side (sending):
  8526. ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<var>server</var>:<var>port</var>
  8527. # Client can also be done with wget:
  8528. wget --post-file=somefile.ogg http://<var>server</var>:<var>port</var>
  8529. </pre></div>
  8530. </dd>
  8531. <dt><samp>send_expect_100</samp></dt>
  8532. <dd><p>Send an Expect: 100-continue header for POST. If set to 1 it will send, if set
  8533. to 0 it won&rsquo;t, if set to -1 it will try to send if it is applicable. Default
  8534. value is -1.
  8535. </p>
  8536. </dd>
  8537. <dt><samp>auth_type</samp></dt>
  8538. <dd>
  8539. <p>Set HTTP authentication type. No option for Digest, since this method requires
  8540. getting nonce parameters from the server first and can&rsquo;t be used straight away like
  8541. Basic.
  8542. </p>
  8543. <dl compact="compact">
  8544. <dt><samp>none</samp></dt>
  8545. <dd><p>Choose the HTTP authentication type automatically. This is the default.
  8546. </p></dd>
  8547. <dt><samp>basic</samp></dt>
  8548. <dd>
  8549. <p>Choose the HTTP basic authentication.
  8550. </p>
  8551. <p>Basic authentication sends a Base64-encoded string that contains a user name and password
  8552. for the client. Base64 is not a form of encryption and should be considered the same as
  8553. sending the user name and password in clear text (Base64 is a reversible encoding).
  8554. If a resource needs to be protected, strongly consider using an authentication scheme
  8555. other than basic authentication. HTTPS/TLS should be used with basic authentication.
  8556. Without these additional security enhancements, basic authentication should not be used
  8557. to protect sensitive or valuable information.
  8558. </p></dd>
  8559. </dl>
  8560. </dd>
  8561. </dl>
  8562. <a name="HTTP-Cookies"></a>
  8563. <h4 class="subsection">18.13.1 HTTP Cookies<span class="pull-right"><a class="anchor hidden-xs" href="#HTTP-Cookies" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-HTTP-Cookies" aria-hidden="true">TOC</a></span></h4>
  8564. <p>Some HTTP requests will be denied unless cookie values are passed in with the
  8565. request. The <samp>cookies</samp> option allows these cookies to be specified. At
  8566. the very least, each cookie must specify a value along with a path and domain.
  8567. HTTP requests that match both the domain and path will automatically include the
  8568. cookie value in the HTTP Cookie header field. Multiple cookies can be delimited
  8569. by a newline.
  8570. </p>
  8571. <p>The required syntax to play a stream specifying a cookie is:
  8572. </p><div class="example">
  8573. <pre class="example">ffplay -cookies &quot;nlqptid=nltid=tsn; path=/; domain=somedomain.com;&quot; http://somedomain.com/somestream.m3u8
  8574. </pre></div>
  8575. <a name="Icecast"></a>
  8576. <h3 class="section">18.14 Icecast<span class="pull-right"><a class="anchor hidden-xs" href="#Icecast" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Icecast" aria-hidden="true">TOC</a></span></h3>
  8577. <p>Icecast protocol (stream to Icecast servers)
  8578. </p>
  8579. <p>This protocol accepts the following options:
  8580. </p>
  8581. <dl compact="compact">
  8582. <dt><samp>ice_genre</samp></dt>
  8583. <dd><p>Set the stream genre.
  8584. </p>
  8585. </dd>
  8586. <dt><samp>ice_name</samp></dt>
  8587. <dd><p>Set the stream name.
  8588. </p>
  8589. </dd>
  8590. <dt><samp>ice_description</samp></dt>
  8591. <dd><p>Set the stream description.
  8592. </p>
  8593. </dd>
  8594. <dt><samp>ice_url</samp></dt>
  8595. <dd><p>Set the stream website URL.
  8596. </p>
  8597. </dd>
  8598. <dt><samp>ice_public</samp></dt>
  8599. <dd><p>Set if the stream should be public.
  8600. The default is 0 (not public).
  8601. </p>
  8602. </dd>
  8603. <dt><samp>user_agent</samp></dt>
  8604. <dd><p>Override the User-Agent header. If not specified a string of the form
  8605. &quot;Lavf/&lt;version&gt;&quot; will be used.
  8606. </p>
  8607. </dd>
  8608. <dt><samp>password</samp></dt>
  8609. <dd><p>Set the Icecast mountpoint password.
  8610. </p>
  8611. </dd>
  8612. <dt><samp>content_type</samp></dt>
  8613. <dd><p>Set the stream content type. This must be set if it is different from
  8614. audio/mpeg.
  8615. </p>
  8616. </dd>
  8617. <dt><samp>legacy_icecast</samp></dt>
  8618. <dd><p>This enables support for Icecast versions &lt; 2.4.0, that do not support the
  8619. HTTP PUT method but the SOURCE method.
  8620. </p>
  8621. </dd>
  8622. <dt><samp>tls</samp></dt>
  8623. <dd><p>Establish a TLS (HTTPS) connection to Icecast.
  8624. </p>
  8625. </dd>
  8626. </dl>
  8627. <div class="example">
  8628. <pre class="example">icecast://[<var>username</var>[:<var>password</var>]@]<var>server</var>:<var>port</var>/<var>mountpoint</var>
  8629. </pre></div>
  8630. <a name="mmst"></a>
  8631. <h3 class="section">18.15 mmst<span class="pull-right"><a class="anchor hidden-xs" href="#mmst" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mmst" aria-hidden="true">TOC</a></span></h3>
  8632. <p>MMS (Microsoft Media Server) protocol over TCP.
  8633. </p>
  8634. <a name="mmsh"></a>
  8635. <h3 class="section">18.16 mmsh<span class="pull-right"><a class="anchor hidden-xs" href="#mmsh" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mmsh" aria-hidden="true">TOC</a></span></h3>
  8636. <p>MMS (Microsoft Media Server) protocol over HTTP.
  8637. </p>
  8638. <p>The required syntax is:
  8639. </p><div class="example">
  8640. <pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
  8641. </pre></div>
  8642. <a name="md5"></a>
  8643. <h3 class="section">18.17 md5<span class="pull-right"><a class="anchor hidden-xs" href="#md5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-md5" aria-hidden="true">TOC</a></span></h3>
  8644. <p>MD5 output protocol.
  8645. </p>
  8646. <p>Computes the MD5 hash of the data to be written, and on close writes
  8647. this to the designated output or stdout if none is specified. It can
  8648. be used to test muxers without writing an actual file.
  8649. </p>
  8650. <p>Some examples follow.
  8651. </p><div class="example">
  8652. <pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
  8653. ffmpeg -i input.flv -f avi -y md5:output.avi.md5
  8654. # Write the MD5 hash of the encoded AVI file to stdout.
  8655. ffmpeg -i input.flv -f avi -y md5:
  8656. </pre></div>
  8657. <p>Note that some formats (typically MOV) require the output protocol to
  8658. be seekable, so they will fail with the MD5 output protocol.
  8659. </p>
  8660. <a name="pipe"></a>
  8661. <h3 class="section">18.18 pipe<span class="pull-right"><a class="anchor hidden-xs" href="#pipe" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pipe" aria-hidden="true">TOC</a></span></h3>
  8662. <p>UNIX pipe access protocol.
  8663. </p>
  8664. <p>Read and write from UNIX pipes.
  8665. </p>
  8666. <p>The accepted syntax is:
  8667. </p><div class="example">
  8668. <pre class="example">pipe:[<var>number</var>]
  8669. </pre></div>
  8670. <p><var>number</var> is the number corresponding to the file descriptor of the
  8671. pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If <var>number</var>
  8672. is not specified, by default the stdout file descriptor will be used
  8673. for writing, stdin for reading.
  8674. </p>
  8675. <p>For example to read from stdin with <code>ffmpeg</code>:
  8676. </p><div class="example">
  8677. <pre class="example">cat test.wav | ffmpeg -i pipe:0
  8678. # ...this is the same as...
  8679. cat test.wav | ffmpeg -i pipe:
  8680. </pre></div>
  8681. <p>For writing to stdout with <code>ffmpeg</code>:
  8682. </p><div class="example">
  8683. <pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
  8684. # ...this is the same as...
  8685. ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
  8686. </pre></div>
  8687. <p>This protocol accepts the following options:
  8688. </p>
  8689. <dl compact="compact">
  8690. <dt><samp>blocksize</samp></dt>
  8691. <dd><p>Set I/O operation maximum block size, in bytes. Default value is
  8692. <code>INT_MAX</code>, which results in not limiting the requested block size.
  8693. Setting this value reasonably low improves user termination request reaction
  8694. time, which is valuable if data transmission is slow.
  8695. </p></dd>
  8696. </dl>
  8697. <p>Note that some formats (typically MOV), require the output protocol to
  8698. be seekable, so they will fail with the pipe output protocol.
  8699. </p>
  8700. <a name="prompeg"></a>
  8701. <h3 class="section">18.19 prompeg<span class="pull-right"><a class="anchor hidden-xs" href="#prompeg" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-prompeg" aria-hidden="true">TOC</a></span></h3>
  8702. <p>Pro-MPEG Code of Practice #3 Release 2 FEC protocol.
  8703. </p>
  8704. <p>The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction mechanism
  8705. for MPEG-2 Transport Streams sent over RTP.
  8706. </p>
  8707. <p>This protocol must be used in conjunction with the <code>rtp_mpegts</code> muxer and
  8708. the <code>rtp</code> protocol.
  8709. </p>
  8710. <p>The required syntax is:
  8711. </p><div class="example">
  8712. <pre class="example">-f rtp_mpegts -fec prompeg=<var>option</var>=<var>val</var>... rtp://<var>hostname</var>:<var>port</var>
  8713. </pre></div>
  8714. <p>The destination UDP ports are <code>port + 2</code> for the column FEC stream
  8715. and <code>port + 4</code> for the row FEC stream.
  8716. </p>
  8717. <p>This protocol accepts the following options:
  8718. </p><dl compact="compact">
  8719. <dt><samp>l=<var>n</var></samp></dt>
  8720. <dd><p>The number of columns (4-20, LxD &lt;= 100)
  8721. </p>
  8722. </dd>
  8723. <dt><samp>d=<var>n</var></samp></dt>
  8724. <dd><p>The number of rows (4-20, LxD &lt;= 100)
  8725. </p>
  8726. </dd>
  8727. </dl>
  8728. <p>Example usage:
  8729. </p>
  8730. <div class="example">
  8731. <pre class="example">-f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<var>hostname</var>:<var>port</var>
  8732. </pre></div>
  8733. <a name="rist"></a>
  8734. <h3 class="section">18.20 rist<span class="pull-right"><a class="anchor hidden-xs" href="#rist" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rist" aria-hidden="true">TOC</a></span></h3>
  8735. <p>Reliable Internet Streaming Transport protocol
  8736. </p>
  8737. <p>The accepted options are:
  8738. </p><dl compact="compact">
  8739. <dt><samp>rist_profile</samp></dt>
  8740. <dd><p>Supported values:
  8741. </p><dl compact="compact">
  8742. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  8743. <dt>&lsquo;<samp>main</samp>&rsquo;</dt>
  8744. <dd><p>This one is default.
  8745. </p></dd>
  8746. <dt>&lsquo;<samp>advanced</samp>&rsquo;</dt>
  8747. </dl>
  8748. </dd>
  8749. <dt><samp>buffer_size</samp></dt>
  8750. <dd><p>Set internal RIST buffer size in milliseconds for retransmission of data.
  8751. Default value is 0 which means the librist default (1 sec). Maximum value is 30
  8752. seconds.
  8753. </p>
  8754. </dd>
  8755. <dt><samp>pkt_size</samp></dt>
  8756. <dd><p>Set maximum packet size for sending data. 1316 by default.
  8757. </p>
  8758. </dd>
  8759. <dt><samp>log_level</samp></dt>
  8760. <dd><p>Set loglevel for RIST logging messages. You only need to set this if you
  8761. explicitly want to enable debug level messages or packet loss simulation,
  8762. otherwise the regular loglevel is respected.
  8763. </p>
  8764. </dd>
  8765. <dt><samp>secret</samp></dt>
  8766. <dd><p>Set override of encryption secret, by default is unset.
  8767. </p>
  8768. </dd>
  8769. <dt><samp>encryption</samp></dt>
  8770. <dd><p>Set encryption type, by default is disabled.
  8771. Acceptable values are 128 and 256.
  8772. </p></dd>
  8773. </dl>
  8774. <a name="rtmp"></a>
  8775. <h3 class="section">18.21 rtmp<span class="pull-right"><a class="anchor hidden-xs" href="#rtmp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmp" aria-hidden="true">TOC</a></span></h3>
  8776. <p>Real-Time Messaging Protocol.
  8777. </p>
  8778. <p>The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
  8779. content across a TCP/IP network.
  8780. </p>
  8781. <p>The required syntax is:
  8782. </p><div class="example">
  8783. <pre class="example">rtmp://[<var>username</var>:<var>password</var>@]<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>instance</var>][/<var>playpath</var>]
  8784. </pre></div>
  8785. <p>The accepted parameters are:
  8786. </p><dl compact="compact">
  8787. <dt><samp>username</samp></dt>
  8788. <dd><p>An optional username (mostly for publishing).
  8789. </p>
  8790. </dd>
  8791. <dt><samp>password</samp></dt>
  8792. <dd><p>An optional password (mostly for publishing).
  8793. </p>
  8794. </dd>
  8795. <dt><samp>server</samp></dt>
  8796. <dd><p>The address of the RTMP server.
  8797. </p>
  8798. </dd>
  8799. <dt><samp>port</samp></dt>
  8800. <dd><p>The number of the TCP port to use (by default is 1935).
  8801. </p>
  8802. </dd>
  8803. <dt><samp>app</samp></dt>
  8804. <dd><p>It is the name of the application to access. It usually corresponds to
  8805. the path where the application is installed on the RTMP server
  8806. (e.g. <samp>/ondemand/</samp>, <samp>/flash/live/</samp>, etc.). You can override
  8807. the value parsed from the URI through the <code>rtmp_app</code> option, too.
  8808. </p>
  8809. </dd>
  8810. <dt><samp>playpath</samp></dt>
  8811. <dd><p>It is the path or name of the resource to play with reference to the
  8812. application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;. You
  8813. can override the value parsed from the URI through the <code>rtmp_playpath</code>
  8814. option, too.
  8815. </p>
  8816. </dd>
  8817. <dt><samp>listen</samp></dt>
  8818. <dd><p>Act as a server, listening for an incoming connection.
  8819. </p>
  8820. </dd>
  8821. <dt><samp>timeout</samp></dt>
  8822. <dd><p>Maximum time to wait for the incoming connection. Implies listen.
  8823. </p></dd>
  8824. </dl>
  8825. <p>Additionally, the following parameters can be set via command line options
  8826. (or in code via <code>AVOption</code>s):
  8827. </p><dl compact="compact">
  8828. <dt><samp>rtmp_app</samp></dt>
  8829. <dd><p>Name of application to connect on the RTMP server. This option
  8830. overrides the parameter specified in the URI.
  8831. </p>
  8832. </dd>
  8833. <dt><samp>rtmp_buffer</samp></dt>
  8834. <dd><p>Set the client buffer time in milliseconds. The default is 3000.
  8835. </p>
  8836. </dd>
  8837. <dt><samp>rtmp_conn</samp></dt>
  8838. <dd><p>Extra arbitrary AMF connection parameters, parsed from a string,
  8839. e.g. like <code>B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0</code>.
  8840. Each value is prefixed by a single character denoting the type,
  8841. B for Boolean, N for number, S for string, O for object, or Z for null,
  8842. followed by a colon. For Booleans the data must be either 0 or 1 for
  8843. FALSE or TRUE, respectively. Likewise for Objects the data must be 0 or
  8844. 1 to end or begin an object, respectively. Data items in subobjects may
  8845. be named, by prefixing the type with &rsquo;N&rsquo; and specifying the name before
  8846. the value (i.e. <code>NB:myFlag:1</code>). This option may be used multiple
  8847. times to construct arbitrary AMF sequences.
  8848. </p>
  8849. </dd>
  8850. <dt><samp>rtmp_flashver</samp></dt>
  8851. <dd><p>Version of the Flash plugin used to run the SWF player. The default
  8852. is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;
  8853. &lt;libavformat version&gt;).)
  8854. </p>
  8855. </dd>
  8856. <dt><samp>rtmp_flush_interval</samp></dt>
  8857. <dd><p>Number of packets flushed in the same request (RTMPT only). The default
  8858. is 10.
  8859. </p>
  8860. </dd>
  8861. <dt><samp>rtmp_live</samp></dt>
  8862. <dd><p>Specify that the media is a live stream. No resuming or seeking in
  8863. live streams is possible. The default value is <code>any</code>, which means the
  8864. subscriber first tries to play the live stream specified in the
  8865. playpath. If a live stream of that name is not found, it plays the
  8866. recorded stream. The other possible values are <code>live</code> and
  8867. <code>recorded</code>.
  8868. </p>
  8869. </dd>
  8870. <dt><samp>rtmp_pageurl</samp></dt>
  8871. <dd><p>URL of the web page in which the media was embedded. By default no
  8872. value will be sent.
  8873. </p>
  8874. </dd>
  8875. <dt><samp>rtmp_playpath</samp></dt>
  8876. <dd><p>Stream identifier to play or to publish. This option overrides the
  8877. parameter specified in the URI.
  8878. </p>
  8879. </dd>
  8880. <dt><samp>rtmp_subscribe</samp></dt>
  8881. <dd><p>Name of live stream to subscribe to. By default no value will be sent.
  8882. It is only sent if the option is specified or if rtmp_live
  8883. is set to live.
  8884. </p>
  8885. </dd>
  8886. <dt><samp>rtmp_swfhash</samp></dt>
  8887. <dd><p>SHA256 hash of the decompressed SWF file (32 bytes).
  8888. </p>
  8889. </dd>
  8890. <dt><samp>rtmp_swfsize</samp></dt>
  8891. <dd><p>Size of the decompressed SWF file, required for SWFVerification.
  8892. </p>
  8893. </dd>
  8894. <dt><samp>rtmp_swfurl</samp></dt>
  8895. <dd><p>URL of the SWF player for the media. By default no value will be sent.
  8896. </p>
  8897. </dd>
  8898. <dt><samp>rtmp_swfverify</samp></dt>
  8899. <dd><p>URL to player swf file, compute hash/size automatically.
  8900. </p>
  8901. </dd>
  8902. <dt><samp>rtmp_tcurl</samp></dt>
  8903. <dd><p>URL of the target stream. Defaults to proto://host[:port]/app.
  8904. </p>
  8905. </dd>
  8906. </dl>
  8907. <p>For example to read with <code>ffplay</code> a multimedia resource named
  8908. &quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
  8909. </p><div class="example">
  8910. <pre class="example">ffplay rtmp://myserver/vod/sample
  8911. </pre></div>
  8912. <p>To publish to a password protected server, passing the playpath and
  8913. app names separately:
  8914. </p><div class="example">
  8915. <pre class="example">ffmpeg -re -i &lt;input&gt; -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@myserver/
  8916. </pre></div>
  8917. <a name="rtmpe"></a>
  8918. <h3 class="section">18.22 rtmpe<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpe" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpe" aria-hidden="true">TOC</a></span></h3>
  8919. <p>Encrypted Real-Time Messaging Protocol.
  8920. </p>
  8921. <p>The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
  8922. streaming multimedia content within standard cryptographic primitives,
  8923. consisting of Diffie-Hellman key exchange and HMACSHA256, generating
  8924. a pair of RC4 keys.
  8925. </p>
  8926. <a name="rtmps"></a>
  8927. <h3 class="section">18.23 rtmps<span class="pull-right"><a class="anchor hidden-xs" href="#rtmps" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmps" aria-hidden="true">TOC</a></span></h3>
  8928. <p>Real-Time Messaging Protocol over a secure SSL connection.
  8929. </p>
  8930. <p>The Real-Time Messaging Protocol (RTMPS) is used for streaming
  8931. multimedia content across an encrypted connection.
  8932. </p>
  8933. <a name="rtmpt"></a>
  8934. <h3 class="section">18.24 rtmpt<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpt" aria-hidden="true">TOC</a></span></h3>
  8935. <p>Real-Time Messaging Protocol tunneled through HTTP.
  8936. </p>
  8937. <p>The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
  8938. for streaming multimedia content within HTTP requests to traverse
  8939. firewalls.
  8940. </p>
  8941. <a name="rtmpte"></a>
  8942. <h3 class="section">18.25 rtmpte<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpte" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpte" aria-hidden="true">TOC</a></span></h3>
  8943. <p>Encrypted Real-Time Messaging Protocol tunneled through HTTP.
  8944. </p>
  8945. <p>The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
  8946. is used for streaming multimedia content within HTTP requests to traverse
  8947. firewalls.
  8948. </p>
  8949. <a name="rtmpts"></a>
  8950. <h3 class="section">18.26 rtmpts<span class="pull-right"><a class="anchor hidden-xs" href="#rtmpts" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtmpts" aria-hidden="true">TOC</a></span></h3>
  8951. <p>Real-Time Messaging Protocol tunneled through HTTPS.
  8952. </p>
  8953. <p>The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
  8954. for streaming multimedia content within HTTPS requests to traverse
  8955. firewalls.
  8956. </p>
  8957. <a name="libsmbclient"></a>
  8958. <h3 class="section">18.27 libsmbclient<span class="pull-right"><a class="anchor hidden-xs" href="#libsmbclient" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libsmbclient" aria-hidden="true">TOC</a></span></h3>
  8959. <p>libsmbclient permits one to manipulate CIFS/SMB network resources.
  8960. </p>
  8961. <p>Following syntax is required.
  8962. </p>
  8963. <div class="example">
  8964. <pre class="example">smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
  8965. </pre></div>
  8966. <p>This protocol accepts the following options.
  8967. </p>
  8968. <dl compact="compact">
  8969. <dt><samp>timeout</samp></dt>
  8970. <dd><p>Set timeout in milliseconds of socket I/O operations used by the underlying
  8971. low level operation. By default it is set to -1, which means that the timeout
  8972. is not specified.
  8973. </p>
  8974. </dd>
  8975. <dt><samp>truncate</samp></dt>
  8976. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  8977. truncating. Default value is 1.
  8978. </p>
  8979. </dd>
  8980. <dt><samp>workgroup</samp></dt>
  8981. <dd><p>Set the workgroup used for making connections. By default workgroup is not specified.
  8982. </p>
  8983. </dd>
  8984. </dl>
  8985. <p>For more information see: <a href="http://www.samba.org/">http://www.samba.org/</a>.
  8986. </p>
  8987. <a name="libssh"></a>
  8988. <h3 class="section">18.28 libssh<span class="pull-right"><a class="anchor hidden-xs" href="#libssh" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libssh" aria-hidden="true">TOC</a></span></h3>
  8989. <p>Secure File Transfer Protocol via libssh
  8990. </p>
  8991. <p>Read from or write to remote resources using SFTP protocol.
  8992. </p>
  8993. <p>Following syntax is required.
  8994. </p>
  8995. <div class="example">
  8996. <pre class="example">sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  8997. </pre></div>
  8998. <p>This protocol accepts the following options.
  8999. </p>
  9000. <dl compact="compact">
  9001. <dt><samp>timeout</samp></dt>
  9002. <dd><p>Set timeout of socket I/O operations used by the underlying low level
  9003. operation. By default it is set to -1, which means that the timeout
  9004. is not specified.
  9005. </p>
  9006. </dd>
  9007. <dt><samp>truncate</samp></dt>
  9008. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  9009. truncating. Default value is 1.
  9010. </p>
  9011. </dd>
  9012. <dt><samp>private_key</samp></dt>
  9013. <dd><p>Specify the path of the file containing private key to use during authorization.
  9014. By default libssh searches for keys in the <samp>~/.ssh/</samp> directory.
  9015. </p>
  9016. </dd>
  9017. </dl>
  9018. <p>Example: Play a file stored on remote server.
  9019. </p>
  9020. <div class="example">
  9021. <pre class="example">ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
  9022. </pre></div>
  9023. <a name="librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
  9024. <h3 class="section">18.29 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte<span class="pull-right"><a class="anchor hidden-xs" href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" aria-hidden="true">TOC</a></span></h3>
  9025. <p>Real-Time Messaging Protocol and its variants supported through
  9026. librtmp.
  9027. </p>
  9028. <p>Requires the presence of the librtmp headers and library during
  9029. configuration. You need to explicitly configure the build with
  9030. &quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
  9031. protocol.
  9032. </p>
  9033. <p>This protocol provides most client functions and a few server
  9034. functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
  9035. encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
  9036. variants of these encrypted types (RTMPTE, RTMPTS).
  9037. </p>
  9038. <p>The required syntax is:
  9039. </p><div class="example">
  9040. <pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
  9041. </pre></div>
  9042. <p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
  9043. &quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
  9044. <var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
  9045. meaning as specified for the RTMP native protocol.
  9046. <var>options</var> contains a list of space-separated options of the form
  9047. <var>key</var>=<var>val</var>.
  9048. </p>
  9049. <p>See the librtmp manual page (man 3 librtmp) for more information.
  9050. </p>
  9051. <p>For example, to stream a file in real-time to an RTMP server using
  9052. <code>ffmpeg</code>:
  9053. </p><div class="example">
  9054. <pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
  9055. </pre></div>
  9056. <p>To play the same stream using <code>ffplay</code>:
  9057. </p><div class="example">
  9058. <pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
  9059. </pre></div>
  9060. <a name="rtp"></a>
  9061. <h3 class="section">18.30 rtp<span class="pull-right"><a class="anchor hidden-xs" href="#rtp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtp" aria-hidden="true">TOC</a></span></h3>
  9062. <p>Real-time Transport Protocol.
  9063. </p>
  9064. <p>The required syntax for an RTP URL is:
  9065. rtp://<var>hostname</var>[:<var>port</var>][?<var>option</var>=<var>val</var>...]
  9066. </p>
  9067. <p><var>port</var> specifies the RTP port to use.
  9068. </p>
  9069. <p>The following URL options are supported:
  9070. </p>
  9071. <dl compact="compact">
  9072. <dt><samp>ttl=<var>n</var></samp></dt>
  9073. <dd><p>Set the TTL (Time-To-Live) value (for multicast only).
  9074. </p>
  9075. </dd>
  9076. <dt><samp>rtcpport=<var>n</var></samp></dt>
  9077. <dd><p>Set the remote RTCP port to <var>n</var>.
  9078. </p>
  9079. </dd>
  9080. <dt><samp>localrtpport=<var>n</var></samp></dt>
  9081. <dd><p>Set the local RTP port to <var>n</var>.
  9082. </p>
  9083. </dd>
  9084. <dt><samp>localrtcpport=<var>n</var>'</samp></dt>
  9085. <dd><p>Set the local RTCP port to <var>n</var>.
  9086. </p>
  9087. </dd>
  9088. <dt><samp>pkt_size=<var>n</var></samp></dt>
  9089. <dd><p>Set max packet size (in bytes) to <var>n</var>.
  9090. </p>
  9091. </dd>
  9092. <dt><samp>buffer_size=<var>size</var></samp></dt>
  9093. <dd><p>Set the maximum UDP socket buffer size in bytes.
  9094. </p>
  9095. </dd>
  9096. <dt><samp>connect=0|1</samp></dt>
  9097. <dd><p>Do a <code>connect()</code> on the UDP socket (if set to 1) or not (if set
  9098. to 0).
  9099. </p>
  9100. </dd>
  9101. <dt><samp>sources=<var>ip</var>[,<var>ip</var>]</samp></dt>
  9102. <dd><p>List allowed source IP addresses.
  9103. </p>
  9104. </dd>
  9105. <dt><samp>block=<var>ip</var>[,<var>ip</var>]</samp></dt>
  9106. <dd><p>List disallowed (blocked) source IP addresses.
  9107. </p>
  9108. </dd>
  9109. <dt><samp>write_to_source=0|1</samp></dt>
  9110. <dd><p>Send packets to the source address of the latest received packet (if
  9111. set to 1) or to a default remote address (if set to 0).
  9112. </p>
  9113. </dd>
  9114. <dt><samp>localport=<var>n</var></samp></dt>
  9115. <dd><p>Set the local RTP port to <var>n</var>.
  9116. </p>
  9117. </dd>
  9118. <dt><samp>timeout=<var>n</var></samp></dt>
  9119. <dd><p>Set timeout (in microseconds) of socket I/O operations to <var>n</var>.
  9120. </p>
  9121. <p>This is a deprecated option. Instead, <samp>localrtpport</samp> should be
  9122. used.
  9123. </p>
  9124. </dd>
  9125. </dl>
  9126. <p>Important notes:
  9127. </p>
  9128. <ol>
  9129. <li> If <samp>rtcpport</samp> is not set the RTCP port will be set to the RTP
  9130. port value plus 1.
  9131. </li><li> If <samp>localrtpport</samp> (the local RTP port) is not set any available
  9132. port will be used for the local RTP and RTCP ports.
  9133. </li><li> If <samp>localrtcpport</samp> (the local RTCP port) is not set it will be
  9134. set to the local RTP port value plus 1.
  9135. </li></ol>
  9136. <a name="rtsp"></a>
  9137. <h3 class="section">18.31 rtsp<span class="pull-right"><a class="anchor hidden-xs" href="#rtsp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rtsp" aria-hidden="true">TOC</a></span></h3>
  9138. <p>Real-Time Streaming Protocol.
  9139. </p>
  9140. <p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
  9141. and muxer. The demuxer supports both normal RTSP (with data transferred
  9142. over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
  9143. data transferred over RDT).
  9144. </p>
  9145. <p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
  9146. supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
  9147. <a href="https://github.com/revmischa/rtsp-server">RTSP server</a>).
  9148. </p>
  9149. <p>The required syntax for a RTSP url is:
  9150. </p><div class="example">
  9151. <pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>
  9152. </pre></div>
  9153. <p>Options can be set on the <code>ffmpeg</code>/<code>ffplay</code> command
  9154. line, or set in code via <code>AVOption</code>s or in
  9155. <code>avformat_open_input</code>.
  9156. </p>
  9157. <p>The following options are supported.
  9158. </p>
  9159. <dl compact="compact">
  9160. <dt><samp>initial_pause</samp></dt>
  9161. <dd><p>Do not start playing the stream immediately if set to 1. Default value
  9162. is 0.
  9163. </p>
  9164. </dd>
  9165. <dt><samp>rtsp_transport</samp></dt>
  9166. <dd><p>Set RTSP transport protocols.
  9167. </p>
  9168. <p>It accepts the following values:
  9169. </p><dl compact="compact">
  9170. <dt>&lsquo;<samp>udp</samp>&rsquo;</dt>
  9171. <dd><p>Use UDP as lower transport protocol.
  9172. </p>
  9173. </dd>
  9174. <dt>&lsquo;<samp>tcp</samp>&rsquo;</dt>
  9175. <dd><p>Use TCP (interleaving within the RTSP control channel) as lower
  9176. transport protocol.
  9177. </p>
  9178. </dd>
  9179. <dt>&lsquo;<samp>udp_multicast</samp>&rsquo;</dt>
  9180. <dd><p>Use UDP multicast as lower transport protocol.
  9181. </p>
  9182. </dd>
  9183. <dt>&lsquo;<samp>http</samp>&rsquo;</dt>
  9184. <dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
  9185. passing proxies.
  9186. </p></dd>
  9187. </dl>
  9188. <p>Multiple lower transport protocols may be specified, in that case they are
  9189. tried one at a time (if the setup of one fails, the next one is tried).
  9190. For the muxer, only the &lsquo;<samp>tcp</samp>&rsquo; and &lsquo;<samp>udp</samp>&rsquo; options are supported.
  9191. </p>
  9192. </dd>
  9193. <dt><samp>rtsp_flags</samp></dt>
  9194. <dd><p>Set RTSP flags.
  9195. </p>
  9196. <p>The following values are accepted:
  9197. </p><dl compact="compact">
  9198. <dt>&lsquo;<samp>filter_src</samp>&rsquo;</dt>
  9199. <dd><p>Accept packets only from negotiated peer address and port.
  9200. </p></dd>
  9201. <dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
  9202. <dd><p>Act as a server, listening for an incoming connection.
  9203. </p></dd>
  9204. <dt>&lsquo;<samp>prefer_tcp</samp>&rsquo;</dt>
  9205. <dd><p>Try TCP for RTP transport first, if TCP is available as RTSP RTP transport.
  9206. </p></dd>
  9207. </dl>
  9208. <p>Default value is &lsquo;<samp>none</samp>&rsquo;.
  9209. </p>
  9210. </dd>
  9211. <dt><samp>allowed_media_types</samp></dt>
  9212. <dd><p>Set media types to accept from the server.
  9213. </p>
  9214. <p>The following flags are accepted:
  9215. </p><dl compact="compact">
  9216. <dt>&lsquo;<samp>video</samp>&rsquo;</dt>
  9217. <dt>&lsquo;<samp>audio</samp>&rsquo;</dt>
  9218. <dt>&lsquo;<samp>data</samp>&rsquo;</dt>
  9219. </dl>
  9220. <p>By default it accepts all media types.
  9221. </p>
  9222. </dd>
  9223. <dt><samp>min_port</samp></dt>
  9224. <dd><p>Set minimum local UDP port. Default value is 5000.
  9225. </p>
  9226. </dd>
  9227. <dt><samp>max_port</samp></dt>
  9228. <dd><p>Set maximum local UDP port. Default value is 65000.
  9229. </p>
  9230. </dd>
  9231. <dt><samp>timeout</samp></dt>
  9232. <dd><p>Set maximum timeout (in seconds) to wait for incoming connections.
  9233. </p>
  9234. <p>A value of -1 means infinite (default). This option implies the
  9235. <samp>rtsp_flags</samp> set to &lsquo;<samp>listen</samp>&rsquo;.
  9236. </p>
  9237. </dd>
  9238. <dt><samp>reorder_queue_size</samp></dt>
  9239. <dd><p>Set number of packets to buffer for handling of reordered packets.
  9240. </p>
  9241. </dd>
  9242. <dt><samp>stimeout</samp></dt>
  9243. <dd><p>Set socket TCP I/O timeout in microseconds.
  9244. </p>
  9245. </dd>
  9246. <dt><samp>user-agent</samp></dt>
  9247. <dd><p>Override User-Agent header. If not specified, it defaults to the
  9248. libavformat identifier string.
  9249. </p></dd>
  9250. </dl>
  9251. <p>When receiving data over UDP, the demuxer tries to reorder received packets
  9252. (since they may arrive out of order, or packets may get lost totally). This
  9253. can be disabled by setting the maximum demuxing delay to zero (via
  9254. the <code>max_delay</code> field of AVFormatContext).
  9255. </p>
  9256. <p>When watching multi-bitrate Real-RTSP streams with <code>ffplay</code>, the
  9257. streams to display can be chosen with <code>-vst</code> <var>n</var> and
  9258. <code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
  9259. on the fly by pressing <code>v</code> and <code>a</code>.
  9260. </p>
  9261. <a name="Examples-4"></a>
  9262. <h4 class="subsection">18.31.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-4" aria-hidden="true">TOC</a></span></h4>
  9263. <p>The following examples all make use of the <code>ffplay</code> and
  9264. <code>ffmpeg</code> tools.
  9265. </p>
  9266. <ul>
  9267. <li> Watch a stream over UDP, with a max reordering delay of 0.5 seconds:
  9268. <div class="example">
  9269. <pre class="example">ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
  9270. </pre></div>
  9271. </li><li> Watch a stream tunneled over HTTP:
  9272. <div class="example">
  9273. <pre class="example">ffplay -rtsp_transport http rtsp://server/video.mp4
  9274. </pre></div>
  9275. </li><li> Send a stream in realtime to a RTSP server, for others to watch:
  9276. <div class="example">
  9277. <pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
  9278. </pre></div>
  9279. </li><li> Receive a stream in realtime:
  9280. <div class="example">
  9281. <pre class="example">ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <var>output</var>
  9282. </pre></div>
  9283. </li></ul>
  9284. <a name="sap"></a>
  9285. <h3 class="section">18.32 sap<span class="pull-right"><a class="anchor hidden-xs" href="#sap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sap" aria-hidden="true">TOC</a></span></h3>
  9286. <p>Session Announcement Protocol (RFC 2974). This is not technically a
  9287. protocol handler in libavformat, it is a muxer and demuxer.
  9288. It is used for signalling of RTP streams, by announcing the SDP for the
  9289. streams regularly on a separate port.
  9290. </p>
  9291. <a name="Muxer"></a>
  9292. <h4 class="subsection">18.32.1 Muxer<span class="pull-right"><a class="anchor hidden-xs" href="#Muxer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Muxer" aria-hidden="true">TOC</a></span></h4>
  9293. <p>The syntax for a SAP url given to the muxer is:
  9294. </p><div class="example">
  9295. <pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
  9296. </pre></div>
  9297. <p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
  9298. or to port 5004 if no port is specified.
  9299. <var>options</var> is a <code>&amp;</code>-separated list. The following options
  9300. are supported:
  9301. </p>
  9302. <dl compact="compact">
  9303. <dt><samp>announce_addr=<var>address</var></samp></dt>
  9304. <dd><p>Specify the destination IP address for sending the announcements to.
  9305. If omitted, the announcements are sent to the commonly used SAP
  9306. announcement multicast address 224.2.127.254 (sap.mcast.net), or
  9307. ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
  9308. </p>
  9309. </dd>
  9310. <dt><samp>announce_port=<var>port</var></samp></dt>
  9311. <dd><p>Specify the port to send the announcements on, defaults to
  9312. 9875 if not specified.
  9313. </p>
  9314. </dd>
  9315. <dt><samp>ttl=<var>ttl</var></samp></dt>
  9316. <dd><p>Specify the time to live value for the announcements and RTP packets,
  9317. defaults to 255.
  9318. </p>
  9319. </dd>
  9320. <dt><samp>same_port=<var>0|1</var></samp></dt>
  9321. <dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
  9322. default), all streams are sent on unique ports, with each stream on a
  9323. port 2 numbers higher than the previous.
  9324. VLC/Live555 requires this to be set to 1, to be able to receive the stream.
  9325. The RTP stack in libavformat for receiving requires all streams to be sent
  9326. on unique ports.
  9327. </p></dd>
  9328. </dl>
  9329. <p>Example command lines follow.
  9330. </p>
  9331. <p>To broadcast a stream on the local subnet, for watching in VLC:
  9332. </p>
  9333. <div class="example">
  9334. <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
  9335. </pre></div>
  9336. <p>Similarly, for watching in <code>ffplay</code>:
  9337. </p>
  9338. <div class="example">
  9339. <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
  9340. </pre></div>
  9341. <p>And for watching in <code>ffplay</code>, over IPv6:
  9342. </p>
  9343. <div class="example">
  9344. <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
  9345. </pre></div>
  9346. <a name="Demuxer"></a>
  9347. <h4 class="subsection">18.32.2 Demuxer<span class="pull-right"><a class="anchor hidden-xs" href="#Demuxer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Demuxer" aria-hidden="true">TOC</a></span></h4>
  9348. <p>The syntax for a SAP url given to the demuxer is:
  9349. </p><div class="example">
  9350. <pre class="example">sap://[<var>address</var>][:<var>port</var>]
  9351. </pre></div>
  9352. <p><var>address</var> is the multicast address to listen for announcements on,
  9353. if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
  9354. is the port that is listened on, 9875 if omitted.
  9355. </p>
  9356. <p>The demuxers listens for announcements on the given address and port.
  9357. Once an announcement is received, it tries to receive that particular stream.
  9358. </p>
  9359. <p>Example command lines follow.
  9360. </p>
  9361. <p>To play back the first stream announced on the normal SAP multicast address:
  9362. </p>
  9363. <div class="example">
  9364. <pre class="example">ffplay sap://
  9365. </pre></div>
  9366. <p>To play back the first stream announced on one the default IPv6 SAP multicast address:
  9367. </p>
  9368. <div class="example">
  9369. <pre class="example">ffplay sap://[ff0e::2:7ffe]
  9370. </pre></div>
  9371. <a name="sctp"></a>
  9372. <h3 class="section">18.33 sctp<span class="pull-right"><a class="anchor hidden-xs" href="#sctp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sctp" aria-hidden="true">TOC</a></span></h3>
  9373. <p>Stream Control Transmission Protocol.
  9374. </p>
  9375. <p>The accepted URL syntax is:
  9376. </p><div class="example">
  9377. <pre class="example">sctp://<var>host</var>:<var>port</var>[?<var>options</var>]
  9378. </pre></div>
  9379. <p>The protocol accepts the following options:
  9380. </p><dl compact="compact">
  9381. <dt><samp>listen</samp></dt>
  9382. <dd><p>If set to any value, listen for an incoming connection. Outgoing connection is done by default.
  9383. </p>
  9384. </dd>
  9385. <dt><samp>max_streams</samp></dt>
  9386. <dd><p>Set the maximum number of streams. By default no limit is set.
  9387. </p></dd>
  9388. </dl>
  9389. <a name="srt"></a>
  9390. <h3 class="section">18.34 srt<span class="pull-right"><a class="anchor hidden-xs" href="#srt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-srt" aria-hidden="true">TOC</a></span></h3>
  9391. <p>Haivision Secure Reliable Transport Protocol via libsrt.
  9392. </p>
  9393. <p>The supported syntax for a SRT URL is:
  9394. </p><div class="example">
  9395. <pre class="example">srt://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  9396. </pre></div>
  9397. <p><var>options</var> contains a list of &amp;-separated options of the form
  9398. <var>key</var>=<var>val</var>.
  9399. </p>
  9400. <p>or
  9401. </p>
  9402. <div class="example">
  9403. <pre class="example"><var>options</var> srt://<var>hostname</var>:<var>port</var>
  9404. </pre></div>
  9405. <p><var>options</var> contains a list of &rsquo;-<var>key</var> <var>val</var>&rsquo;
  9406. options.
  9407. </p>
  9408. <p>This protocol accepts the following options.
  9409. </p>
  9410. <dl compact="compact">
  9411. <dt><samp>connect_timeout=<var>milliseconds</var></samp></dt>
  9412. <dd><p>Connection timeout; SRT cannot connect for RTT &gt; 1500 msec
  9413. (2 handshake exchanges) with the default connect timeout of
  9414. 3 seconds. This option applies to the caller and rendezvous
  9415. connection modes. The connect timeout is 10 times the value
  9416. set for the rendezvous mode (which can be used as a
  9417. workaround for this connection problem with earlier versions).
  9418. </p>
  9419. </dd>
  9420. <dt><samp>ffs=<var>bytes</var></samp></dt>
  9421. <dd><p>Flight Flag Size (Window Size), in bytes. FFS is actually an
  9422. internal parameter and you should set it to not less than
  9423. <samp>recv_buffer_size</samp> and <samp>mss</samp>. The default value
  9424. is relatively large, therefore unless you set a very large receiver buffer,
  9425. you do not need to change this option. Default value is 25600.
  9426. </p>
  9427. </dd>
  9428. <dt><samp>inputbw=<var>bytes/seconds</var></samp></dt>
  9429. <dd><p>Sender nominal input rate, in bytes per seconds. Used along with
  9430. <samp>oheadbw</samp>, when <samp>maxbw</samp> is set to relative (0), to
  9431. calculate maximum sending rate when recovery packets are sent
  9432. along with the main media stream:
  9433. <samp>inputbw</samp> * (100 + <samp>oheadbw</samp>) / 100
  9434. if <samp>inputbw</samp> is not set while <samp>maxbw</samp> is set to
  9435. relative (0), the actual input rate is evaluated inside
  9436. the library. Default value is 0.
  9437. </p>
  9438. </dd>
  9439. <dt><samp>iptos=<var>tos</var></samp></dt>
  9440. <dd><p>IP Type of Service. Applies to sender only. Default value is 0xB8.
  9441. </p>
  9442. </dd>
  9443. <dt><samp>ipttl=<var>ttl</var></samp></dt>
  9444. <dd><p>IP Time To Live. Applies to sender only. Default value is 64.
  9445. </p>
  9446. </dd>
  9447. <dt><samp>latency=<var>microseconds</var></samp></dt>
  9448. <dd><p>Timestamp-based Packet Delivery Delay.
  9449. Used to absorb bursts of missed packet retransmissions.
  9450. This flag sets both <samp>rcvlatency</samp> and <samp>peerlatency</samp>
  9451. to the same value. Note that prior to version 1.3.0
  9452. this is the only flag to set the latency, however
  9453. this is effectively equivalent to setting <samp>peerlatency</samp>,
  9454. when side is sender and <samp>rcvlatency</samp>
  9455. when side is receiver, and the bidirectional stream
  9456. sending is not supported.
  9457. </p>
  9458. </dd>
  9459. <dt><samp>listen_timeout=<var>microseconds</var></samp></dt>
  9460. <dd><p>Set socket listen timeout.
  9461. </p>
  9462. </dd>
  9463. <dt><samp>maxbw=<var>bytes/seconds</var></samp></dt>
  9464. <dd><p>Maximum sending bandwidth, in bytes per seconds.
  9465. -1 infinite (CSRTCC limit is 30mbps)
  9466. 0 relative to input rate (see <samp>inputbw</samp>)
  9467. &gt;0 absolute limit value
  9468. Default value is 0 (relative)
  9469. </p>
  9470. </dd>
  9471. <dt><samp>mode=<var>caller|listener|rendezvous</var></samp></dt>
  9472. <dd><p>Connection mode.
  9473. <samp>caller</samp> opens client connection.
  9474. <samp>listener</samp> starts server to listen for incoming connections.
  9475. <samp>rendezvous</samp> use Rendez-Vous connection mode.
  9476. Default value is caller.
  9477. </p>
  9478. </dd>
  9479. <dt><samp>mss=<var>bytes</var></samp></dt>
  9480. <dd><p>Maximum Segment Size, in bytes. Used for buffer allocation
  9481. and rate calculation using a packet counter assuming fully
  9482. filled packets. The smallest MSS between the peers is
  9483. used. This is 1500 by default in the overall internet.
  9484. This is the maximum size of the UDP packet and can be
  9485. only decreased, unless you have some unusual dedicated
  9486. network settings. Default value is 1500.
  9487. </p>
  9488. </dd>
  9489. <dt><samp>nakreport=<var>1|0</var></samp></dt>
  9490. <dd><p>If set to 1, Receiver will send &lsquo;UMSG_LOSSREPORT&lsquo; messages
  9491. periodically until a lost packet is retransmitted or
  9492. intentionally dropped. Default value is 1.
  9493. </p>
  9494. </dd>
  9495. <dt><samp>oheadbw=<var>percents</var></samp></dt>
  9496. <dd><p>Recovery bandwidth overhead above input rate, in percents.
  9497. See <samp>inputbw</samp>. Default value is 25%.
  9498. </p>
  9499. </dd>
  9500. <dt><samp>passphrase=<var>string</var></samp></dt>
  9501. <dd><p>HaiCrypt Encryption/Decryption Passphrase string, length
  9502. from 10 to 79 characters. The passphrase is the shared
  9503. secret between the sender and the receiver. It is used
  9504. to generate the Key Encrypting Key using PBKDF2
  9505. (Password-Based Key Derivation Function). It is used
  9506. only if <samp>pbkeylen</samp> is non-zero. It is used on
  9507. the receiver only if the received data is encrypted.
  9508. The configured passphrase cannot be recovered (write-only).
  9509. </p>
  9510. </dd>
  9511. <dt><samp>enforced_encryption=<var>1|0</var></samp></dt>
  9512. <dd><p>If true, both connection parties must have the same password
  9513. set (including empty, that is, with no encryption). If the
  9514. password doesn&rsquo;t match or only one side is unencrypted,
  9515. the connection is rejected. Default is true.
  9516. </p>
  9517. </dd>
  9518. <dt><samp>kmrefreshrate=<var>packets</var></samp></dt>
  9519. <dd><p>The number of packets to be transmitted after which the
  9520. encryption key is switched to a new key. Default is -1.
  9521. -1 means auto (0x1000000 in srt library). The range for
  9522. this option is integers in the 0 - <code>INT_MAX</code>.
  9523. </p>
  9524. </dd>
  9525. <dt><samp>kmpreannounce=<var>packets</var></samp></dt>
  9526. <dd><p>The interval between when a new encryption key is sent and
  9527. when switchover occurs. This value also applies to the
  9528. subsequent interval between when switchover occurs and
  9529. when the old encryption key is decommissioned. Default is -1.
  9530. -1 means auto (0x1000 in srt library). The range for
  9531. this option is integers in the 0 - <code>INT_MAX</code>.
  9532. </p>
  9533. </dd>
  9534. <dt><samp>payload_size=<var>bytes</var></samp></dt>
  9535. <dd><p>Sets the maximum declared size of a packet transferred
  9536. during the single call to the sending function in Live
  9537. mode. Use 0 if this value isn&rsquo;t used (which is default in
  9538. file mode).
  9539. Default is -1 (automatic), which typically means MPEG-TS;
  9540. if you are going to use SRT
  9541. to send any different kind of payload, such as, for example,
  9542. wrapping a live stream in very small frames, then you can
  9543. use a bigger maximum frame size, though not greater than
  9544. 1456 bytes.
  9545. </p>
  9546. </dd>
  9547. <dt><samp>pkt_size=<var>bytes</var></samp></dt>
  9548. <dd><p>Alias for &lsquo;<samp>payload_size</samp>&rsquo;.
  9549. </p>
  9550. </dd>
  9551. <dt><samp>peerlatency=<var>microseconds</var></samp></dt>
  9552. <dd><p>The latency value (as described in <samp>rcvlatency</samp>) that is
  9553. set by the sender side as a minimum value for the receiver.
  9554. </p>
  9555. </dd>
  9556. <dt><samp>pbkeylen=<var>bytes</var></samp></dt>
  9557. <dd><p>Sender encryption key length, in bytes.
  9558. Only can be set to 0, 16, 24 and 32.
  9559. Enable sender encryption if not 0.
  9560. Not required on receiver (set to 0),
  9561. key size obtained from sender in HaiCrypt handshake.
  9562. Default value is 0.
  9563. </p>
  9564. </dd>
  9565. <dt><samp>rcvlatency=<var>microseconds</var></samp></dt>
  9566. <dd><p>The time that should elapse since the moment when the
  9567. packet was sent and the moment when it&rsquo;s delivered to
  9568. the receiver application in the receiving function.
  9569. This time should be a buffer time large enough to cover
  9570. the time spent for sending, unexpectedly extended RTT
  9571. time, and the time needed to retransmit the lost UDP
  9572. packet. The effective latency value will be the maximum
  9573. of this options&rsquo; value and the value of <samp>peerlatency</samp>
  9574. set by the peer side. Before version 1.3.0 this option
  9575. is only available as <samp>latency</samp>.
  9576. </p>
  9577. </dd>
  9578. <dt><samp>recv_buffer_size=<var>bytes</var></samp></dt>
  9579. <dd><p>Set UDP receive buffer size, expressed in bytes.
  9580. </p>
  9581. </dd>
  9582. <dt><samp>send_buffer_size=<var>bytes</var></samp></dt>
  9583. <dd><p>Set UDP send buffer size, expressed in bytes.
  9584. </p>
  9585. </dd>
  9586. <dt><samp>timeout=<var>microseconds</var></samp></dt>
  9587. <dd><p>Set raise error timeouts for read, write and connect operations. Note that the
  9588. SRT library has internal timeouts which can be controlled separately, the
  9589. value set here is only a cap on those.
  9590. </p>
  9591. </dd>
  9592. <dt><samp>tlpktdrop=<var>1|0</var></samp></dt>
  9593. <dd><p>Too-late Packet Drop. When enabled on receiver, it skips
  9594. missing packets that have not been delivered in time and
  9595. delivers the following packets to the application when
  9596. their time-to-play has come. It also sends a fake ACK to
  9597. the sender. When enabled on sender and enabled on the
  9598. receiving peer, the sender drops the older packets that
  9599. have no chance of being delivered in time. It was
  9600. automatically enabled in the sender if the receiver
  9601. supports it.
  9602. </p>
  9603. </dd>
  9604. <dt><samp>sndbuf=<var>bytes</var></samp></dt>
  9605. <dd><p>Set send buffer size, expressed in bytes.
  9606. </p>
  9607. </dd>
  9608. <dt><samp>rcvbuf=<var>bytes</var></samp></dt>
  9609. <dd><p>Set receive buffer size, expressed in bytes.
  9610. </p>
  9611. <p>Receive buffer must not be greater than <samp>ffs</samp>.
  9612. </p>
  9613. </dd>
  9614. <dt><samp>lossmaxttl=<var>packets</var></samp></dt>
  9615. <dd><p>The value up to which the Reorder Tolerance may grow. When
  9616. Reorder Tolerance is &gt; 0, then packet loss report is delayed
  9617. until that number of packets come in. Reorder Tolerance
  9618. increases every time a &quot;belated&quot; packet has come, but it
  9619. wasn&rsquo;t due to retransmission (that is, when UDP packets tend
  9620. to come out of order), with the difference between the latest
  9621. sequence and this packet&rsquo;s sequence, and not more than the
  9622. value of this option. By default it&rsquo;s 0, which means that this
  9623. mechanism is turned off, and the loss report is always sent
  9624. immediately upon experiencing a &quot;gap&quot; in sequences.
  9625. </p>
  9626. </dd>
  9627. <dt><samp>minversion</samp></dt>
  9628. <dd><p>The minimum SRT version that is required from the peer. A connection
  9629. to a peer that does not satisfy the minimum version requirement
  9630. will be rejected.
  9631. </p>
  9632. <p>The version format in hex is 0xXXYYZZ for x.y.z in human readable
  9633. form.
  9634. </p>
  9635. </dd>
  9636. <dt><samp>streamid=<var>string</var></samp></dt>
  9637. <dd><p>A string limited to 512 characters that can be set on the socket prior
  9638. to connecting. This stream ID will be able to be retrieved by the
  9639. listener side from the socket that is returned from srt_accept and
  9640. was connected by a socket with that set stream ID. SRT does not enforce
  9641. any special interpretation of the contents of this string.
  9642. This option doesn’t make sense in Rendezvous connection; the result
  9643. might be that simply one side will override the value from the other
  9644. side and it’s the matter of luck which one would win
  9645. </p>
  9646. </dd>
  9647. <dt><samp>smoother=<var>live|file</var></samp></dt>
  9648. <dd><p>The type of Smoother used for the transmission for that socket, which
  9649. is responsible for the transmission and congestion control. The Smoother
  9650. type must be exactly the same on both connecting parties, otherwise
  9651. the connection is rejected.
  9652. </p>
  9653. </dd>
  9654. <dt><samp>messageapi=<var>1|0</var></samp></dt>
  9655. <dd><p>When set, this socket uses the Message API, otherwise it uses Buffer
  9656. API. Note that in live mode (see <samp>transtype</samp>) there’s only
  9657. message API available. In File mode you can chose to use one of two modes:
  9658. </p>
  9659. <p>Stream API (default, when this option is false). In this mode you may
  9660. send as many data as you wish with one sending instruction, or even use
  9661. dedicated functions that read directly from a file. The internal facility
  9662. will take care of any speed and congestion control. When receiving, you
  9663. can also receive as many data as desired, the data not extracted will be
  9664. waiting for the next call. There is no boundary between data portions in
  9665. the Stream mode.
  9666. </p>
  9667. <p>Message API. In this mode your single sending instruction passes exactly
  9668. one piece of data that has boundaries (a message). Contrary to Live mode,
  9669. this message may span across multiple UDP packets and the only size
  9670. limitation is that it shall fit as a whole in the sending buffer. The
  9671. receiver shall use as large buffer as necessary to receive the message,
  9672. otherwise the message will not be given up. When the message is not
  9673. complete (not all packets received or there was a packet loss) it will
  9674. not be given up.
  9675. </p>
  9676. </dd>
  9677. <dt><samp>transtype=<var>live|file</var></samp></dt>
  9678. <dd><p>Sets the transmission type for the socket, in particular, setting this
  9679. option sets multiple other parameters to their default values as required
  9680. for a particular transmission type.
  9681. </p>
  9682. <p>live: Set options as for live transmission. In this mode, you should
  9683. send by one sending instruction only so many data that fit in one UDP packet,
  9684. and limited to the value defined first in <samp>payload_size</samp> (1316 is
  9685. default in this mode). There is no speed control in this mode, only the
  9686. bandwidth control, if configured, in order to not exceed the bandwidth with
  9687. the overhead transmission (retransmitted and control packets).
  9688. </p>
  9689. <p>file: Set options as for non-live transmission. See <samp>messageapi</samp>
  9690. for further explanations
  9691. </p>
  9692. </dd>
  9693. <dt><samp>linger=<var>seconds</var></samp></dt>
  9694. <dd><p>The number of seconds that the socket waits for unsent data when closing.
  9695. Default is -1. -1 means auto (off with 0 seconds in live mode, on with 180
  9696. seconds in file mode). The range for this option is integers in the
  9697. 0 - <code>INT_MAX</code>.
  9698. </p>
  9699. </dd>
  9700. </dl>
  9701. <p>For more information see: <a href="https://github.com/Haivision/srt">https://github.com/Haivision/srt</a>.
  9702. </p>
  9703. <a name="srtp"></a>
  9704. <h3 class="section">18.35 srtp<span class="pull-right"><a class="anchor hidden-xs" href="#srtp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-srtp" aria-hidden="true">TOC</a></span></h3>
  9705. <p>Secure Real-time Transport Protocol.
  9706. </p>
  9707. <p>The accepted options are:
  9708. </p><dl compact="compact">
  9709. <dt><samp>srtp_in_suite</samp></dt>
  9710. <dt><samp>srtp_out_suite</samp></dt>
  9711. <dd><p>Select input and output encoding suites.
  9712. </p>
  9713. <p>Supported values:
  9714. </p><dl compact="compact">
  9715. <dt>&lsquo;<samp>AES_CM_128_HMAC_SHA1_80</samp>&rsquo;</dt>
  9716. <dt>&lsquo;<samp>SRTP_AES128_CM_HMAC_SHA1_80</samp>&rsquo;</dt>
  9717. <dt>&lsquo;<samp>AES_CM_128_HMAC_SHA1_32</samp>&rsquo;</dt>
  9718. <dt>&lsquo;<samp>SRTP_AES128_CM_HMAC_SHA1_32</samp>&rsquo;</dt>
  9719. </dl>
  9720. </dd>
  9721. <dt><samp>srtp_in_params</samp></dt>
  9722. <dt><samp>srtp_out_params</samp></dt>
  9723. <dd><p>Set input and output encoding parameters, which are expressed by a
  9724. base64-encoded representation of a binary block. The first 16 bytes of
  9725. this binary block are used as master key, the following 14 bytes are
  9726. used as master salt.
  9727. </p></dd>
  9728. </dl>
  9729. <a name="subfile"></a>
  9730. <h3 class="section">18.36 subfile<span class="pull-right"><a class="anchor hidden-xs" href="#subfile" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-subfile" aria-hidden="true">TOC</a></span></h3>
  9731. <p>Virtually extract a segment of a file or another stream.
  9732. The underlying stream must be seekable.
  9733. </p>
  9734. <p>Accepted options:
  9735. </p><dl compact="compact">
  9736. <dt><samp>start</samp></dt>
  9737. <dd><p>Start offset of the extracted segment, in bytes.
  9738. </p></dd>
  9739. <dt><samp>end</samp></dt>
  9740. <dd><p>End offset of the extracted segment, in bytes.
  9741. If set to 0, extract till end of file.
  9742. </p></dd>
  9743. </dl>
  9744. <p>Examples:
  9745. </p>
  9746. <p>Extract a chapter from a DVD VOB file (start and end sectors obtained
  9747. externally and multiplied by 2048):
  9748. </p><div class="example">
  9749. <pre class="example">subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
  9750. </pre></div>
  9751. <p>Play an AVI file directly from a TAR archive:
  9752. </p><div class="example">
  9753. <pre class="example">subfile,,start,183241728,end,366490624,,:archive.tar
  9754. </pre></div>
  9755. <p>Play a MPEG-TS file from start offset till end:
  9756. </p><div class="example">
  9757. <pre class="example">subfile,,start,32815239,end,0,,:video.ts
  9758. </pre></div>
  9759. <a name="tee"></a>
  9760. <h3 class="section">18.37 tee<span class="pull-right"><a class="anchor hidden-xs" href="#tee" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tee" aria-hidden="true">TOC</a></span></h3>
  9761. <p>Writes the output to multiple protocols. The individual outputs are separated
  9762. by |
  9763. </p>
  9764. <div class="example">
  9765. <pre class="example">tee:file://path/to/local/this.avi|file://path/to/local/that.avi
  9766. </pre></div>
  9767. <a name="tcp"></a>
  9768. <h3 class="section">18.38 tcp<span class="pull-right"><a class="anchor hidden-xs" href="#tcp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tcp" aria-hidden="true">TOC</a></span></h3>
  9769. <p>Transmission Control Protocol.
  9770. </p>
  9771. <p>The required syntax for a TCP url is:
  9772. </p><div class="example">
  9773. <pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  9774. </pre></div>
  9775. <p><var>options</var> contains a list of &amp;-separated options of the form
  9776. <var>key</var>=<var>val</var>.
  9777. </p>
  9778. <p>The list of supported options follows.
  9779. </p>
  9780. <dl compact="compact">
  9781. <dt><samp>listen=<var>2|1|0</var></samp></dt>
  9782. <dd><p>Listen for an incoming connection. 0 disables listen, 1 enables listen in
  9783. single client mode, 2 enables listen in multi-client mode. Default value is 0.
  9784. </p>
  9785. </dd>
  9786. <dt><samp>timeout=<var>microseconds</var></samp></dt>
  9787. <dd><p>Set raise error timeout, expressed in microseconds.
  9788. </p>
  9789. <p>This option is only relevant in read mode: if no data arrived in more
  9790. than this time interval, raise error.
  9791. </p>
  9792. </dd>
  9793. <dt><samp>listen_timeout=<var>milliseconds</var></samp></dt>
  9794. <dd><p>Set listen timeout, expressed in milliseconds.
  9795. </p>
  9796. </dd>
  9797. <dt><samp>recv_buffer_size=<var>bytes</var></samp></dt>
  9798. <dd><p>Set receive buffer size, expressed bytes.
  9799. </p>
  9800. </dd>
  9801. <dt><samp>send_buffer_size=<var>bytes</var></samp></dt>
  9802. <dd><p>Set send buffer size, expressed bytes.
  9803. </p>
  9804. </dd>
  9805. <dt><samp>tcp_nodelay=<var>1|0</var></samp></dt>
  9806. <dd><p>Set TCP_NODELAY to disable Nagle&rsquo;s algorithm. Default value is 0.
  9807. </p>
  9808. </dd>
  9809. <dt><samp>tcp_mss=<var>bytes</var></samp></dt>
  9810. <dd><p>Set maximum segment size for outgoing TCP packets, expressed in bytes.
  9811. </p></dd>
  9812. </dl>
  9813. <p>The following example shows how to setup a listening TCP connection
  9814. with <code>ffmpeg</code>, which is then accessed with <code>ffplay</code>:
  9815. </p><div class="example">
  9816. <pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
  9817. ffplay tcp://<var>hostname</var>:<var>port</var>
  9818. </pre></div>
  9819. <a name="tls"></a>
  9820. <h3 class="section">18.39 tls<span class="pull-right"><a class="anchor hidden-xs" href="#tls" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tls" aria-hidden="true">TOC</a></span></h3>
  9821. <p>Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
  9822. </p>
  9823. <p>The required syntax for a TLS/SSL url is:
  9824. </p><div class="example">
  9825. <pre class="example">tls://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  9826. </pre></div>
  9827. <p>The following parameters can be set via command line options
  9828. (or in code via <code>AVOption</code>s):
  9829. </p>
  9830. <dl compact="compact">
  9831. <dt><samp>ca_file, cafile=<var>filename</var></samp></dt>
  9832. <dd><p>A file containing certificate authority (CA) root certificates to treat
  9833. as trusted. If the linked TLS library contains a default this might not
  9834. need to be specified for verification to work, but not all libraries and
  9835. setups have defaults built in.
  9836. The file must be in OpenSSL PEM format.
  9837. </p>
  9838. </dd>
  9839. <dt><samp>tls_verify=<var>1|0</var></samp></dt>
  9840. <dd><p>If enabled, try to verify the peer that we are communicating with.
  9841. Note, if using OpenSSL, this currently only makes sure that the
  9842. peer certificate is signed by one of the root certificates in the CA
  9843. database, but it does not validate that the certificate actually
  9844. matches the host name we are trying to connect to. (With other backends,
  9845. the host name is validated as well.)
  9846. </p>
  9847. <p>This is disabled by default since it requires a CA database to be
  9848. provided by the caller in many cases.
  9849. </p>
  9850. </dd>
  9851. <dt><samp>cert_file, cert=<var>filename</var></samp></dt>
  9852. <dd><p>A file containing a certificate to use in the handshake with the peer.
  9853. (When operating as server, in listen mode, this is more often required
  9854. by the peer, while client certificates only are mandated in certain
  9855. setups.)
  9856. </p>
  9857. </dd>
  9858. <dt><samp>key_file, key=<var>filename</var></samp></dt>
  9859. <dd><p>A file containing the private key for the certificate.
  9860. </p>
  9861. </dd>
  9862. <dt><samp>listen=<var>1|0</var></samp></dt>
  9863. <dd><p>If enabled, listen for connections on the provided port, and assume
  9864. the server role in the handshake instead of the client role.
  9865. </p>
  9866. </dd>
  9867. <dt><samp>http_proxy</samp></dt>
  9868. <dd><p>The HTTP proxy to tunnel through, e.g. <code>http://example.com:1234</code>.
  9869. The proxy must support the CONNECT method.
  9870. </p>
  9871. </dd>
  9872. </dl>
  9873. <p>Example command lines:
  9874. </p>
  9875. <p>To create a TLS/SSL server that serves an input stream.
  9876. </p>
  9877. <div class="example">
  9878. <pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tls://<var>hostname</var>:<var>port</var>?listen&amp;cert=<var>server.crt</var>&amp;key=<var>server.key</var>
  9879. </pre></div>
  9880. <p>To play back a stream from the TLS/SSL server using <code>ffplay</code>:
  9881. </p>
  9882. <div class="example">
  9883. <pre class="example">ffplay tls://<var>hostname</var>:<var>port</var>
  9884. </pre></div>
  9885. <a name="udp"></a>
  9886. <h3 class="section">18.40 udp<span class="pull-right"><a class="anchor hidden-xs" href="#udp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-udp" aria-hidden="true">TOC</a></span></h3>
  9887. <p>User Datagram Protocol.
  9888. </p>
  9889. <p>The required syntax for an UDP URL is:
  9890. </p><div class="example">
  9891. <pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  9892. </pre></div>
  9893. <p><var>options</var> contains a list of &amp;-separated options of the form <var>key</var>=<var>val</var>.
  9894. </p>
  9895. <p>In case threading is enabled on the system, a circular buffer is used
  9896. to store the incoming data, which allows one to reduce loss of data due to
  9897. UDP socket buffer overruns. The <var>fifo_size</var> and
  9898. <var>overrun_nonfatal</var> options are related to this buffer.
  9899. </p>
  9900. <p>The list of supported options follows.
  9901. </p>
  9902. <dl compact="compact">
  9903. <dt><samp>buffer_size=<var>size</var></samp></dt>
  9904. <dd><p>Set the UDP maximum socket buffer size in bytes. This is used to set either
  9905. the receive or send buffer size, depending on what the socket is used for.
  9906. Default is 32 KB for output, 384 KB for input. See also <var>fifo_size</var>.
  9907. </p>
  9908. </dd>
  9909. <dt><samp>bitrate=<var>bitrate</var></samp></dt>
  9910. <dd><p>If set to nonzero, the output will have the specified constant bitrate if the
  9911. input has enough packets to sustain it.
  9912. </p>
  9913. </dd>
  9914. <dt><samp>burst_bits=<var>bits</var></samp></dt>
  9915. <dd><p>When using <var>bitrate</var> this specifies the maximum number of bits in
  9916. packet bursts.
  9917. </p>
  9918. </dd>
  9919. <dt><samp>localport=<var>port</var></samp></dt>
  9920. <dd><p>Override the local UDP port to bind with.
  9921. </p>
  9922. </dd>
  9923. <dt><samp>localaddr=<var>addr</var></samp></dt>
  9924. <dd><p>Local IP address of a network interface used for sending packets or joining
  9925. multicast groups.
  9926. </p>
  9927. </dd>
  9928. <dt><samp>pkt_size=<var>size</var></samp></dt>
  9929. <dd><p>Set the size in bytes of UDP packets.
  9930. </p>
  9931. </dd>
  9932. <dt><samp>reuse=<var>1|0</var></samp></dt>
  9933. <dd><p>Explicitly allow or disallow reusing UDP sockets.
  9934. </p>
  9935. </dd>
  9936. <dt><samp>ttl=<var>ttl</var></samp></dt>
  9937. <dd><p>Set the time to live value (for multicast only).
  9938. </p>
  9939. </dd>
  9940. <dt><samp>connect=<var>1|0</var></samp></dt>
  9941. <dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
  9942. destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
  9943. If the destination address isn&rsquo;t known at the start, this option can
  9944. be specified in ff_udp_set_remote_url, too.
  9945. This allows finding out the source address for the packets with getsockname,
  9946. and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
  9947. unreachable&quot; is received.
  9948. For receiving, this gives the benefit of only receiving packets from
  9949. the specified peer address/port.
  9950. </p>
  9951. </dd>
  9952. <dt><samp>sources=<var>address</var>[,<var>address</var>]</samp></dt>
  9953. <dd><p>Only receive packets sent from the specified addresses. In case of multicast,
  9954. also subscribe to multicast traffic coming from these addresses only.
  9955. </p>
  9956. </dd>
  9957. <dt><samp>block=<var>address</var>[,<var>address</var>]</samp></dt>
  9958. <dd><p>Ignore packets sent from the specified addresses. In case of multicast, also
  9959. exclude the source addresses in the multicast subscription.
  9960. </p>
  9961. </dd>
  9962. <dt><samp>fifo_size=<var>units</var></samp></dt>
  9963. <dd><p>Set the UDP receiving circular buffer size, expressed as a number of
  9964. packets with size of 188 bytes. If not specified defaults to 7*4096.
  9965. </p>
  9966. </dd>
  9967. <dt><samp>overrun_nonfatal=<var>1|0</var></samp></dt>
  9968. <dd><p>Survive in case of UDP receiving circular buffer overrun. Default
  9969. value is 0.
  9970. </p>
  9971. </dd>
  9972. <dt><samp>timeout=<var>microseconds</var></samp></dt>
  9973. <dd><p>Set raise error timeout, expressed in microseconds.
  9974. </p>
  9975. <p>This option is only relevant in read mode: if no data arrived in more
  9976. than this time interval, raise error.
  9977. </p>
  9978. </dd>
  9979. <dt><samp>broadcast=<var>1|0</var></samp></dt>
  9980. <dd><p>Explicitly allow or disallow UDP broadcasting.
  9981. </p>
  9982. <p>Note that broadcasting may not work properly on networks having
  9983. a broadcast storm protection.
  9984. </p></dd>
  9985. </dl>
  9986. <a name="Examples-5"></a>
  9987. <h4 class="subsection">18.40.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-5" aria-hidden="true">TOC</a></span></h4>
  9988. <ul>
  9989. <li> Use <code>ffmpeg</code> to stream over UDP to a remote endpoint:
  9990. <div class="example">
  9991. <pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
  9992. </pre></div>
  9993. </li><li> Use <code>ffmpeg</code> to stream in mpegts format over UDP using 188
  9994. sized UDP packets, using a large input buffer:
  9995. <div class="example">
  9996. <pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
  9997. </pre></div>
  9998. </li><li> Use <code>ffmpeg</code> to receive over UDP from a remote endpoint:
  9999. <div class="example">
  10000. <pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var> ...
  10001. </pre></div>
  10002. </li></ul>
  10003. <a name="unix"></a>
  10004. <h3 class="section">18.41 unix<span class="pull-right"><a class="anchor hidden-xs" href="#unix" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-unix" aria-hidden="true">TOC</a></span></h3>
  10005. <p>Unix local socket
  10006. </p>
  10007. <p>The required syntax for a Unix socket URL is:
  10008. </p>
  10009. <div class="example">
  10010. <pre class="example">unix://<var>filepath</var>
  10011. </pre></div>
  10012. <p>The following parameters can be set via command line options
  10013. (or in code via <code>AVOption</code>s):
  10014. </p>
  10015. <dl compact="compact">
  10016. <dt><samp>timeout</samp></dt>
  10017. <dd><p>Timeout in ms.
  10018. </p></dd>
  10019. <dt><samp>listen</samp></dt>
  10020. <dd><p>Create the Unix socket in listening mode.
  10021. </p></dd>
  10022. </dl>
  10023. <a name="zmq"></a>
  10024. <h3 class="section">18.42 zmq<span class="pull-right"><a class="anchor hidden-xs" href="#zmq" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-zmq" aria-hidden="true">TOC</a></span></h3>
  10025. <p>ZeroMQ asynchronous messaging using the libzmq library.
  10026. </p>
  10027. <p>This library supports unicast streaming to multiple clients without relying on
  10028. an external server.
  10029. </p>
  10030. <p>The required syntax for streaming or connecting to a stream is:
  10031. </p><div class="example">
  10032. <pre class="example">zmq:tcp://ip-address:port
  10033. </pre></div>
  10034. <p>Example:
  10035. Create a localhost stream on port 5555:
  10036. </p><div class="example">
  10037. <pre class="example">ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555
  10038. </pre></div>
  10039. <p>Multiple clients may connect to the stream using:
  10040. </p><div class="example">
  10041. <pre class="example">ffplay zmq:tcp://127.0.0.1:5555
  10042. </pre></div>
  10043. <p>Streaming to multiple clients is implemented using a ZeroMQ Pub-Sub pattern.
  10044. The server side binds to a port and publishes data. Clients connect to the
  10045. server (via IP address/port) and subscribe to the stream. The order in which
  10046. the server and client start generally does not matter.
  10047. </p>
  10048. <p>ffmpeg must be compiled with the &ndash;enable-libzmq option to support
  10049. this protocol.
  10050. </p>
  10051. <p>Options can be set on the <code>ffmpeg</code>/<code>ffplay</code> command
  10052. line. The following options are supported:
  10053. </p>
  10054. <dl compact="compact">
  10055. <dt><samp>pkt_size</samp></dt>
  10056. <dd><p>Forces the maximum packet size for sending/receiving data. The default value is
  10057. 131,072 bytes. On the server side, this sets the maximum size of sent packets
  10058. via ZeroMQ. On the clients, it sets an internal buffer size for receiving
  10059. packets. Note that pkt_size on the clients should be equal to or greater than
  10060. pkt_size on the server. Otherwise the received message may be truncated causing
  10061. decoding errors.
  10062. </p>
  10063. </dd>
  10064. </dl>
  10065. <a name="Device-Options"></a>
  10066. <h2 class="chapter">19 Device Options<span class="pull-right"><a class="anchor hidden-xs" href="#Device-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Device-Options" aria-hidden="true">TOC</a></span></h2>
  10067. <p>The libavdevice library provides the same interface as
  10068. libavformat. Namely, an input device is considered like a demuxer, and
  10069. an output device like a muxer, and the interface and generic device
  10070. options are the same provided by libavformat (see the ffmpeg-formats
  10071. manual).
  10072. </p>
  10073. <p>In addition each input or output device may support so-called private
  10074. options, which are specific for that component.
  10075. </p>
  10076. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  10077. FFmpeg tools, or by setting the value explicitly in the device
  10078. <code>AVFormatContext</code> options or using the <samp>libavutil/opt.h</samp> API
  10079. for programmatic use.
  10080. </p>
  10081. <a name="Input-Devices"></a>
  10082. <h2 class="chapter">20 Input Devices<span class="pull-right"><a class="anchor hidden-xs" href="#Input-Devices" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Input-Devices" aria-hidden="true">TOC</a></span></h2>
  10083. <p>Input devices are configured elements in FFmpeg which enable accessing
  10084. the data coming from a multimedia device attached to your system.
  10085. </p>
  10086. <p>When you configure your FFmpeg build, all the supported input devices
  10087. are enabled by default. You can list all available ones using the
  10088. configure option &quot;&ndash;list-indevs&quot;.
  10089. </p>
  10090. <p>You can disable all the input devices using the configure option
  10091. &quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
  10092. option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
  10093. input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
  10094. </p>
  10095. <p>The option &quot;-devices&quot; of the ff* tools will display the list of
  10096. supported input devices.
  10097. </p>
  10098. <p>A description of the currently available input devices follows.
  10099. </p>
  10100. <a name="alsa"></a>
  10101. <h3 class="section">20.1 alsa<span class="pull-right"><a class="anchor hidden-xs" href="#alsa" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alsa" aria-hidden="true">TOC</a></span></h3>
  10102. <p>ALSA (Advanced Linux Sound Architecture) input device.
  10103. </p>
  10104. <p>To enable this input device during configuration you need libasound
  10105. installed on your system.
  10106. </p>
  10107. <p>This device allows capturing from an ALSA device. The name of the
  10108. device to capture has to be an ALSA card identifier.
  10109. </p>
  10110. <p>An ALSA identifier has the syntax:
  10111. </p><div class="example">
  10112. <pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
  10113. </pre></div>
  10114. <p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
  10115. </p>
  10116. <p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
  10117. specify card number or identifier, device number and subdevice number
  10118. (-1 means any).
  10119. </p>
  10120. <p>To see the list of cards currently recognized by your system check the
  10121. files <samp>/proc/asound/cards</samp> and <samp>/proc/asound/devices</samp>.
  10122. </p>
  10123. <p>For example to capture with <code>ffmpeg</code> from an ALSA device with
  10124. card id 0, you may run the command:
  10125. </p><div class="example">
  10126. <pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
  10127. </pre></div>
  10128. <p>For more information see:
  10129. <a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
  10130. </p>
  10131. <a name="Options-11"></a>
  10132. <h4 class="subsection">20.1.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-11" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-11" aria-hidden="true">TOC</a></span></h4>
  10133. <dl compact="compact">
  10134. <dt><samp>sample_rate</samp></dt>
  10135. <dd><p>Set the sample rate in Hz. Default is 48000.
  10136. </p>
  10137. </dd>
  10138. <dt><samp>channels</samp></dt>
  10139. <dd><p>Set the number of channels. Default is 2.
  10140. </p>
  10141. </dd>
  10142. </dl>
  10143. <a name="android_005fcamera"></a>
  10144. <h3 class="section">20.2 android_camera<span class="pull-right"><a class="anchor hidden-xs" href="#android_005fcamera" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-android_005fcamera" aria-hidden="true">TOC</a></span></h3>
  10145. <p>Android camera input device.
  10146. </p>
  10147. <p>This input devices uses the Android Camera2 NDK API which is
  10148. available on devices with API level 24+. The availability of
  10149. android_camera is autodetected during configuration.
  10150. </p>
  10151. <p>This device allows capturing from all cameras on an Android device,
  10152. which are integrated into the Camera2 NDK API.
  10153. </p>
  10154. <p>The available cameras are enumerated internally and can be selected
  10155. with the <var>camera_index</var> parameter. The input file string is
  10156. discarded.
  10157. </p>
  10158. <p>Generally the back facing camera has index 0 while the front facing
  10159. camera has index 1.
  10160. </p>
  10161. <a name="Options-12"></a>
  10162. <h4 class="subsection">20.2.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-12" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-12" aria-hidden="true">TOC</a></span></h4>
  10163. <dl compact="compact">
  10164. <dt><samp>video_size</samp></dt>
  10165. <dd><p>Set the video size given as a string such as 640x480 or hd720.
  10166. Falls back to the first available configuration reported by
  10167. Android if requested video size is not available or by default.
  10168. </p>
  10169. </dd>
  10170. <dt><samp>framerate</samp></dt>
  10171. <dd><p>Set the video framerate.
  10172. Falls back to the first available configuration reported by
  10173. Android if requested framerate is not available or by default (-1).
  10174. </p>
  10175. </dd>
  10176. <dt><samp>camera_index</samp></dt>
  10177. <dd><p>Set the index of the camera to use. Default is 0.
  10178. </p>
  10179. </dd>
  10180. <dt><samp>input_queue_size</samp></dt>
  10181. <dd><p>Set the maximum number of frames to buffer. Default is 5.
  10182. </p>
  10183. </dd>
  10184. </dl>
  10185. <a name="avfoundation"></a>
  10186. <h3 class="section">20.3 avfoundation<span class="pull-right"><a class="anchor hidden-xs" href="#avfoundation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-avfoundation" aria-hidden="true">TOC</a></span></h3>
  10187. <p>AVFoundation input device.
  10188. </p>
  10189. <p>AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX &gt;= 10.7 as well as on iOS.
  10190. </p>
  10191. <p>The input filename has to be given in the following syntax:
  10192. </p><div class="example">
  10193. <pre class="example">-i &quot;[[VIDEO]:[AUDIO]]&quot;
  10194. </pre></div>
  10195. <p>The first entry selects the video input while the latter selects the audio input.
  10196. The stream has to be specified by the device name or the device index as shown by the device list.
  10197. Alternatively, the video and/or audio input device can be chosen by index using the
  10198. <samp>
  10199. -video_device_index &lt;INDEX&gt;
  10200. </samp>
  10201. and/or
  10202. <samp>
  10203. -audio_device_index &lt;INDEX&gt;
  10204. </samp>
  10205. , overriding any
  10206. device name or index given in the input filename.
  10207. </p>
  10208. <p>All available devices can be enumerated by using <samp>-list_devices true</samp>, listing
  10209. all device names and corresponding indices.
  10210. </p>
  10211. <p>There are two device name aliases:
  10212. </p><dl compact="compact">
  10213. <dt><code>default</code></dt>
  10214. <dd><p>Select the AVFoundation default device of the corresponding type.
  10215. </p>
  10216. </dd>
  10217. <dt><code>none</code></dt>
  10218. <dd><p>Do not record the corresponding media type.
  10219. This is equivalent to specifying an empty device name or index.
  10220. </p>
  10221. </dd>
  10222. </dl>
  10223. <a name="Options-13"></a>
  10224. <h4 class="subsection">20.3.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-13" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-13" aria-hidden="true">TOC</a></span></h4>
  10225. <p>AVFoundation supports the following options:
  10226. </p>
  10227. <dl compact="compact">
  10228. <dt><samp>-list_devices &lt;TRUE|FALSE&gt;</samp></dt>
  10229. <dd><p>If set to true, a list of all available input devices is given showing all
  10230. device names and indices.
  10231. </p>
  10232. </dd>
  10233. <dt><samp>-video_device_index &lt;INDEX&gt;</samp></dt>
  10234. <dd><p>Specify the video device by its index. Overrides anything given in the input filename.
  10235. </p>
  10236. </dd>
  10237. <dt><samp>-audio_device_index &lt;INDEX&gt;</samp></dt>
  10238. <dd><p>Specify the audio device by its index. Overrides anything given in the input filename.
  10239. </p>
  10240. </dd>
  10241. <dt><samp>-pixel_format &lt;FORMAT&gt;</samp></dt>
  10242. <dd><p>Request the video device to use a specific pixel format.
  10243. If the specified format is not supported, a list of available formats is given
  10244. and the first one in this list is used instead. Available pixel formats are:
  10245. <code>monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
  10246. bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,
  10247. yuv420p, nv12, yuyv422, gray</code>
  10248. </p>
  10249. </dd>
  10250. <dt><samp>-framerate</samp></dt>
  10251. <dd><p>Set the grabbing frame rate. Default is <code>ntsc</code>, corresponding to a
  10252. frame rate of <code>30000/1001</code>.
  10253. </p>
  10254. </dd>
  10255. <dt><samp>-video_size</samp></dt>
  10256. <dd><p>Set the video frame size.
  10257. </p>
  10258. </dd>
  10259. <dt><samp>-capture_cursor</samp></dt>
  10260. <dd><p>Capture the mouse pointer. Default is 0.
  10261. </p>
  10262. </dd>
  10263. <dt><samp>-capture_mouse_clicks</samp></dt>
  10264. <dd><p>Capture the screen mouse clicks. Default is 0.
  10265. </p>
  10266. </dd>
  10267. <dt><samp>-capture_raw_data</samp></dt>
  10268. <dd><p>Capture the raw device data. Default is 0.
  10269. 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.
  10270. </p></dd>
  10271. </dl>
  10272. <a name="Examples-6"></a>
  10273. <h4 class="subsection">20.3.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-6" aria-hidden="true">TOC</a></span></h4>
  10274. <ul>
  10275. <li> Print the list of AVFoundation supported devices and exit:
  10276. <div class="example">
  10277. <pre class="example">$ ffmpeg -f avfoundation -list_devices true -i &quot;&quot;
  10278. </pre></div>
  10279. </li><li> Record video from video device 0 and audio from audio device 0 into out.avi:
  10280. <div class="example">
  10281. <pre class="example">$ ffmpeg -f avfoundation -i &quot;0:0&quot; out.avi
  10282. </pre></div>
  10283. </li><li> Record video from video device 2 and audio from audio device 1 into out.avi:
  10284. <div class="example">
  10285. <pre class="example">$ ffmpeg -f avfoundation -video_device_index 2 -i &quot;:1&quot; out.avi
  10286. </pre></div>
  10287. </li><li> Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:
  10288. <div class="example">
  10289. <pre class="example">$ ffmpeg -f avfoundation -pixel_format bgr0 -i &quot;default:none&quot; out.avi
  10290. </pre></div>
  10291. </li><li> Record raw DV data from a suitable input device and write the output into out.dv:
  10292. <div class="example">
  10293. <pre class="example">$ ffmpeg -f avfoundation -capture_raw_data true -i &quot;zr100:none&quot; out.dv
  10294. </pre></div>
  10295. </li></ul>
  10296. <a name="bktr"></a>
  10297. <h3 class="section">20.4 bktr<span class="pull-right"><a class="anchor hidden-xs" href="#bktr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bktr" aria-hidden="true">TOC</a></span></h3>
  10298. <p>BSD video input device.
  10299. </p>
  10300. <a name="Options-14"></a>
  10301. <h4 class="subsection">20.4.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-14" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-14" aria-hidden="true">TOC</a></span></h4>
  10302. <dl compact="compact">
  10303. <dt><samp>framerate</samp></dt>
  10304. <dd><p>Set the frame rate.
  10305. </p>
  10306. </dd>
  10307. <dt><samp>video_size</samp></dt>
  10308. <dd><p>Set the video frame size. Default is <code>vga</code>.
  10309. </p>
  10310. </dd>
  10311. <dt><samp>standard</samp></dt>
  10312. <dd>
  10313. <p>Available values are:
  10314. </p><dl compact="compact">
  10315. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  10316. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  10317. <dt>&lsquo;<samp>secam</samp>&rsquo;</dt>
  10318. <dt>&lsquo;<samp>paln</samp>&rsquo;</dt>
  10319. <dt>&lsquo;<samp>palm</samp>&rsquo;</dt>
  10320. <dt>&lsquo;<samp>ntscj</samp>&rsquo;</dt>
  10321. </dl>
  10322. </dd>
  10323. </dl>
  10324. <a name="decklink"></a>
  10325. <h3 class="section">20.5 decklink<span class="pull-right"><a class="anchor hidden-xs" href="#decklink" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-decklink" aria-hidden="true">TOC</a></span></h3>
  10326. <p>The decklink input device provides capture capabilities for Blackmagic
  10327. DeckLink devices.
  10328. </p>
  10329. <p>To enable this input device, you need the Blackmagic DeckLink SDK and you
  10330. need to configure with the appropriate <code>--extra-cflags</code>
  10331. and <code>--extra-ldflags</code>.
  10332. On Windows, you need to run the IDL files through <code>widl</code>.
  10333. </p>
  10334. <p>DeckLink is very picky about the formats it supports. Pixel format of the
  10335. input can be set with <samp>raw_format</samp>.
  10336. Framerate and video size must be determined for your device with
  10337. <code>-list_formats 1</code>. Audio sample rate is always 48 kHz and the number
  10338. of channels can be 2, 8 or 16. Note that all audio channels are bundled in one single
  10339. audio track.
  10340. </p>
  10341. <a name="Options-15"></a>
  10342. <h4 class="subsection">20.5.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-15" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-15" aria-hidden="true">TOC</a></span></h4>
  10343. <dl compact="compact">
  10344. <dt><samp>list_devices</samp></dt>
  10345. <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
  10346. Defaults to <samp>false</samp>. This option is deprecated, please use the
  10347. <code>-sources</code> option of ffmpeg to list the available input devices.
  10348. </p>
  10349. </dd>
  10350. <dt><samp>list_formats</samp></dt>
  10351. <dd><p>If set to <samp>true</samp>, print a list of supported formats and exit.
  10352. Defaults to <samp>false</samp>.
  10353. </p>
  10354. </dd>
  10355. <dt><samp>format_code &lt;FourCC&gt;</samp></dt>
  10356. <dd><p>This sets the input video format to the format given by the FourCC. To see
  10357. the supported values of your device(s) use <samp>list_formats</samp>.
  10358. Note that there is a FourCC <samp>'pal '</samp> that can also be used
  10359. as <samp>pal</samp> (3 letters).
  10360. Default behavior is autodetection of the input video format, if the hardware
  10361. supports it.
  10362. </p>
  10363. </dd>
  10364. <dt><samp>raw_format</samp></dt>
  10365. <dd><p>Set the pixel format of the captured video.
  10366. Available values are:
  10367. </p><dl compact="compact">
  10368. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  10369. <dd>
  10370. <p>This is the default which means 8-bit YUV 422 or 8-bit ARGB if format
  10371. autodetection is used, 8-bit YUV 422 otherwise.
  10372. </p>
  10373. </dd>
  10374. <dt>&lsquo;<samp>uyvy422</samp>&rsquo;</dt>
  10375. <dd>
  10376. <p>8-bit YUV 422.
  10377. </p>
  10378. </dd>
  10379. <dt>&lsquo;<samp>yuv422p10</samp>&rsquo;</dt>
  10380. <dd>
  10381. <p>10-bit YUV 422.
  10382. </p>
  10383. </dd>
  10384. <dt>&lsquo;<samp>argb</samp>&rsquo;</dt>
  10385. <dd>
  10386. <p>8-bit RGB.
  10387. </p>
  10388. </dd>
  10389. <dt>&lsquo;<samp>bgra</samp>&rsquo;</dt>
  10390. <dd>
  10391. <p>8-bit RGB.
  10392. </p>
  10393. </dd>
  10394. <dt>&lsquo;<samp>rgb10</samp>&rsquo;</dt>
  10395. <dd>
  10396. <p>10-bit RGB.
  10397. </p>
  10398. </dd>
  10399. </dl>
  10400. </dd>
  10401. <dt><samp>teletext_lines</samp></dt>
  10402. <dd><p>If set to nonzero, an additional teletext stream will be captured from the
  10403. vertical ancillary data. Both SD PAL (576i) and HD (1080i or 1080p)
  10404. sources are supported. In case of HD sources, OP47 packets are decoded.
  10405. </p>
  10406. <p>This option is a bitmask of the SD PAL VBI lines captured, specifically lines 6
  10407. to 22, and lines 318 to 335. Line 6 is the LSB in the mask. Selected lines
  10408. which do not contain teletext information will be ignored. You can use the
  10409. special <samp>all</samp> constant to select all possible lines, or
  10410. <samp>standard</samp> to skip lines 6, 318 and 319, which are not compatible with
  10411. all receivers.
  10412. </p>
  10413. <p>For SD sources, ffmpeg needs to be compiled with <code>--enable-libzvbi</code>. For
  10414. HD sources, on older (pre-4K) DeckLink card models you have to capture in 10
  10415. bit mode.
  10416. </p>
  10417. </dd>
  10418. <dt><samp>channels</samp></dt>
  10419. <dd><p>Defines number of audio channels to capture. Must be &lsquo;<samp>2</samp>&rsquo;, &lsquo;<samp>8</samp>&rsquo; or &lsquo;<samp>16</samp>&rsquo;.
  10420. Defaults to &lsquo;<samp>2</samp>&rsquo;.
  10421. </p>
  10422. </dd>
  10423. <dt><samp>duplex_mode</samp></dt>
  10424. <dd><p>Sets the decklink device duplex mode. Must be &lsquo;<samp>unset</samp>&rsquo;, &lsquo;<samp>half</samp>&rsquo; or &lsquo;<samp>full</samp>&rsquo;.
  10425. Defaults to &lsquo;<samp>unset</samp>&rsquo;.
  10426. </p>
  10427. </dd>
  10428. <dt><samp>timecode_format</samp></dt>
  10429. <dd><p>Timecode type to include in the frame and video stream metadata. Must be
  10430. &lsquo;<samp>none</samp>&rsquo;, &lsquo;<samp>rp188vitc</samp>&rsquo;, &lsquo;<samp>rp188vitc2</samp>&rsquo;, &lsquo;<samp>rp188ltc</samp>&rsquo;,
  10431. &lsquo;<samp>rp188hfr</samp>&rsquo;, &lsquo;<samp>rp188any</samp>&rsquo;, &lsquo;<samp>vitc</samp>&rsquo;, &lsquo;<samp>vitc2</samp>&rsquo;, or &lsquo;<samp>serial</samp>&rsquo;.
  10432. Defaults to &lsquo;<samp>none</samp>&rsquo; (not included).
  10433. </p>
  10434. <p>In order to properly support 50/60 fps timecodes, the ordering of the queried
  10435. timecode types for &lsquo;<samp>rp188any</samp>&rsquo; is HFR, VITC1, VITC2 and LTC for &gt;30 fps
  10436. content. Note that this is slightly different to the ordering used by the
  10437. DeckLink API, which is HFR, VITC1, LTC, VITC2.
  10438. </p>
  10439. </dd>
  10440. <dt><samp>video_input</samp></dt>
  10441. <dd><p>Sets the video input source. Must be &lsquo;<samp>unset</samp>&rsquo;, &lsquo;<samp>sdi</samp>&rsquo;, &lsquo;<samp>hdmi</samp>&rsquo;,
  10442. &lsquo;<samp>optical_sdi</samp>&rsquo;, &lsquo;<samp>component</samp>&rsquo;, &lsquo;<samp>composite</samp>&rsquo; or &lsquo;<samp>s_video</samp>&rsquo;.
  10443. Defaults to &lsquo;<samp>unset</samp>&rsquo;.
  10444. </p>
  10445. </dd>
  10446. <dt><samp>audio_input</samp></dt>
  10447. <dd><p>Sets the audio input source. Must be &lsquo;<samp>unset</samp>&rsquo;, &lsquo;<samp>embedded</samp>&rsquo;,
  10448. &lsquo;<samp>aes_ebu</samp>&rsquo;, &lsquo;<samp>analog</samp>&rsquo;, &lsquo;<samp>analog_xlr</samp>&rsquo;, &lsquo;<samp>analog_rca</samp>&rsquo; or
  10449. &lsquo;<samp>microphone</samp>&rsquo;. Defaults to &lsquo;<samp>unset</samp>&rsquo;.
  10450. </p>
  10451. </dd>
  10452. <dt><samp>video_pts</samp></dt>
  10453. <dd><p>Sets the video packet timestamp source. Must be &lsquo;<samp>video</samp>&rsquo;, &lsquo;<samp>audio</samp>&rsquo;,
  10454. &lsquo;<samp>reference</samp>&rsquo;, &lsquo;<samp>wallclock</samp>&rsquo; or &lsquo;<samp>abs_wallclock</samp>&rsquo;.
  10455. Defaults to &lsquo;<samp>video</samp>&rsquo;.
  10456. </p>
  10457. </dd>
  10458. <dt><samp>audio_pts</samp></dt>
  10459. <dd><p>Sets the audio packet timestamp source. Must be &lsquo;<samp>video</samp>&rsquo;, &lsquo;<samp>audio</samp>&rsquo;,
  10460. &lsquo;<samp>reference</samp>&rsquo;, &lsquo;<samp>wallclock</samp>&rsquo; or &lsquo;<samp>abs_wallclock</samp>&rsquo;.
  10461. Defaults to &lsquo;<samp>audio</samp>&rsquo;.
  10462. </p>
  10463. </dd>
  10464. <dt><samp>draw_bars</samp></dt>
  10465. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, color bars are drawn in the event of a signal loss.
  10466. Defaults to &lsquo;<samp>true</samp>&rsquo;.
  10467. </p>
  10468. </dd>
  10469. <dt><samp>queue_size</samp></dt>
  10470. <dd><p>Sets maximum input buffer size in bytes. If the buffering reaches this value,
  10471. incoming frames will be dropped.
  10472. Defaults to &lsquo;<samp>1073741824</samp>&rsquo;.
  10473. </p>
  10474. </dd>
  10475. <dt><samp>audio_depth</samp></dt>
  10476. <dd><p>Sets the audio sample bit depth. Must be &lsquo;<samp>16</samp>&rsquo; or &lsquo;<samp>32</samp>&rsquo;.
  10477. Defaults to &lsquo;<samp>16</samp>&rsquo;.
  10478. </p>
  10479. </dd>
  10480. <dt><samp>decklink_copyts</samp></dt>
  10481. <dd><p>If set to <samp>true</samp>, timestamps are forwarded as they are without removing
  10482. the initial offset.
  10483. Defaults to <samp>false</samp>.
  10484. </p>
  10485. </dd>
  10486. <dt><samp>timestamp_align</samp></dt>
  10487. <dd><p>Capture start time alignment in seconds. If set to nonzero, input frames are
  10488. dropped till the system timestamp aligns with configured value.
  10489. Alignment difference of up to one frame duration is tolerated.
  10490. This is useful for maintaining input synchronization across N different
  10491. hardware devices deployed for &rsquo;N-way&rsquo; redundancy. The system time of different
  10492. hardware devices should be synchronized with protocols such as NTP or PTP,
  10493. before using this option.
  10494. Note that this method is not foolproof. In some border cases input
  10495. synchronization may not happen due to thread scheduling jitters in the OS.
  10496. Either sync could go wrong by 1 frame or in a rarer case
  10497. <samp>timestamp_align</samp> seconds.
  10498. Defaults to &lsquo;<samp>0</samp>&rsquo;.
  10499. </p>
  10500. </dd>
  10501. <dt><samp>wait_for_tc (<em>bool</em>)</samp></dt>
  10502. <dd><p>Drop frames till a frame with timecode is received. Sometimes serial timecode
  10503. isn&rsquo;t received with the first input frame. If that happens, the stored stream
  10504. timecode will be inaccurate. If this option is set to <samp>true</samp>, input frames
  10505. are dropped till a frame with timecode is received.
  10506. Option <var>timecode_format</var> must be specified.
  10507. Defaults to <samp>false</samp>.
  10508. </p>
  10509. </dd>
  10510. <dt><samp>enable_klv(<em>bool</em>)</samp></dt>
  10511. <dd><p>If set to <samp>true</samp>, extracts KLV data from VANC and outputs KLV packets.
  10512. KLV VANC packets are joined based on MID and PSC fields and aggregated into
  10513. one KLV packet.
  10514. Defaults to <samp>false</samp>.
  10515. </p>
  10516. </dd>
  10517. </dl>
  10518. <a name="Examples-7"></a>
  10519. <h4 class="subsection">20.5.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-7" aria-hidden="true">TOC</a></span></h4>
  10520. <ul>
  10521. <li> List input devices:
  10522. <div class="example">
  10523. <pre class="example">ffmpeg -sources decklink
  10524. </pre></div>
  10525. </li><li> List supported formats:
  10526. <div class="example">
  10527. <pre class="example">ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
  10528. </pre></div>
  10529. </li><li> Capture video clip at 1080i50:
  10530. <div class="example">
  10531. <pre class="example">ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi
  10532. </pre></div>
  10533. </li><li> Capture video clip at 1080i50 10 bit:
  10534. <div class="example">
  10535. <pre class="example">ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
  10536. </pre></div>
  10537. </li><li> Capture video clip at 1080i50 with 16 audio channels:
  10538. <div class="example">
  10539. <pre class="example">ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
  10540. </pre></div>
  10541. </li></ul>
  10542. <a name="dshow"></a>
  10543. <h3 class="section">20.6 dshow<span class="pull-right"><a class="anchor hidden-xs" href="#dshow" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dshow" aria-hidden="true">TOC</a></span></h3>
  10544. <p>Windows DirectShow input device.
  10545. </p>
  10546. <p>DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
  10547. Currently only audio and video devices are supported.
  10548. </p>
  10549. <p>Multiple devices may be opened as separate inputs, but they may also be
  10550. opened on the same input, which should improve synchronism between them.
  10551. </p>
  10552. <p>The input name should be in the format:
  10553. </p>
  10554. <div class="example">
  10555. <pre class="example"><var>TYPE</var>=<var>NAME</var>[:<var>TYPE</var>=<var>NAME</var>]
  10556. </pre></div>
  10557. <p>where <var>TYPE</var> can be either <var>audio</var> or <var>video</var>,
  10558. and <var>NAME</var> is the device&rsquo;s name or alternative name..
  10559. </p>
  10560. <a name="Options-16"></a>
  10561. <h4 class="subsection">20.6.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-16" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-16" aria-hidden="true">TOC</a></span></h4>
  10562. <p>If no options are specified, the device&rsquo;s defaults are used.
  10563. If the device does not support the requested options, it will
  10564. fail to open.
  10565. </p>
  10566. <dl compact="compact">
  10567. <dt><samp>video_size</samp></dt>
  10568. <dd><p>Set the video size in the captured video.
  10569. </p>
  10570. </dd>
  10571. <dt><samp>framerate</samp></dt>
  10572. <dd><p>Set the frame rate in the captured video.
  10573. </p>
  10574. </dd>
  10575. <dt><samp>sample_rate</samp></dt>
  10576. <dd><p>Set the sample rate (in Hz) of the captured audio.
  10577. </p>
  10578. </dd>
  10579. <dt><samp>sample_size</samp></dt>
  10580. <dd><p>Set the sample size (in bits) of the captured audio.
  10581. </p>
  10582. </dd>
  10583. <dt><samp>channels</samp></dt>
  10584. <dd><p>Set the number of channels in the captured audio.
  10585. </p>
  10586. </dd>
  10587. <dt><samp>list_devices</samp></dt>
  10588. <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
  10589. </p>
  10590. </dd>
  10591. <dt><samp>list_options</samp></dt>
  10592. <dd><p>If set to <samp>true</samp>, print a list of selected device&rsquo;s options
  10593. and exit.
  10594. </p>
  10595. </dd>
  10596. <dt><samp>video_device_number</samp></dt>
  10597. <dd><p>Set video device number for devices with the same name (starts at 0,
  10598. defaults to 0).
  10599. </p>
  10600. </dd>
  10601. <dt><samp>audio_device_number</samp></dt>
  10602. <dd><p>Set audio device number for devices with the same name (starts at 0,
  10603. defaults to 0).
  10604. </p>
  10605. </dd>
  10606. <dt><samp>pixel_format</samp></dt>
  10607. <dd><p>Select pixel format to be used by DirectShow. This may only be set when
  10608. the video codec is not set or set to rawvideo.
  10609. </p>
  10610. </dd>
  10611. <dt><samp>audio_buffer_size</samp></dt>
  10612. <dd><p>Set audio device buffer size in milliseconds (which can directly
  10613. impact latency, depending on the device).
  10614. Defaults to using the audio device&rsquo;s
  10615. default buffer size (typically some multiple of 500ms).
  10616. Setting this value too low can degrade performance.
  10617. See also
  10618. <a 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>
  10619. </p>
  10620. </dd>
  10621. <dt><samp>video_pin_name</samp></dt>
  10622. <dd><p>Select video capture pin to use by name or alternative name.
  10623. </p>
  10624. </dd>
  10625. <dt><samp>audio_pin_name</samp></dt>
  10626. <dd><p>Select audio capture pin to use by name or alternative name.
  10627. </p>
  10628. </dd>
  10629. <dt><samp>crossbar_video_input_pin_number</samp></dt>
  10630. <dd><p>Select video input pin number for crossbar device. This will be
  10631. routed to the crossbar device&rsquo;s Video Decoder output pin.
  10632. Note that changing this value can affect future invocations
  10633. (sets a new default) until system reboot occurs.
  10634. </p>
  10635. </dd>
  10636. <dt><samp>crossbar_audio_input_pin_number</samp></dt>
  10637. <dd><p>Select audio input pin number for crossbar device. This will be
  10638. routed to the crossbar device&rsquo;s Audio Decoder output pin.
  10639. Note that changing this value can affect future invocations
  10640. (sets a new default) until system reboot occurs.
  10641. </p>
  10642. </dd>
  10643. <dt><samp>show_video_device_dialog</samp></dt>
  10644. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display dialog
  10645. to the end user, allowing them to change video filter properties
  10646. and configurations manually.
  10647. Note that for crossbar devices, adjusting values in this dialog
  10648. may be needed at times to toggle between PAL (25 fps) and NTSC (29.97)
  10649. input frame rates, sizes, interlacing, etc. Changing these values can
  10650. enable different scan rates/frame rates and avoiding green bars at
  10651. the bottom, flickering scan lines, etc.
  10652. Note that with some devices, changing these properties can also affect future
  10653. invocations (sets new defaults) until system reboot occurs.
  10654. </p>
  10655. </dd>
  10656. <dt><samp>show_audio_device_dialog</samp></dt>
  10657. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display dialog
  10658. to the end user, allowing them to change audio filter properties
  10659. and configurations manually.
  10660. </p>
  10661. </dd>
  10662. <dt><samp>show_video_crossbar_connection_dialog</samp></dt>
  10663. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  10664. dialog to the end user, allowing them to manually
  10665. modify crossbar pin routings, when it opens a video device.
  10666. </p>
  10667. </dd>
  10668. <dt><samp>show_audio_crossbar_connection_dialog</samp></dt>
  10669. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  10670. dialog to the end user, allowing them to manually
  10671. modify crossbar pin routings, when it opens an audio device.
  10672. </p>
  10673. </dd>
  10674. <dt><samp>show_analog_tv_tuner_dialog</samp></dt>
  10675. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  10676. dialog to the end user, allowing them to manually
  10677. modify TV channels and frequencies.
  10678. </p>
  10679. </dd>
  10680. <dt><samp>show_analog_tv_tuner_audio_dialog</samp></dt>
  10681. <dd><p>If set to <samp>true</samp>, before capture starts, popup a display
  10682. dialog to the end user, allowing them to manually
  10683. modify TV audio (like mono vs. stereo, Language A,B or C).
  10684. </p>
  10685. </dd>
  10686. <dt><samp>audio_device_load</samp></dt>
  10687. <dd><p>Load an audio capture filter device from file instead of searching
  10688. it by name. It may load additional parameters too, if the filter
  10689. supports the serialization of its properties to.
  10690. To use this an audio capture source has to be specified, but it can
  10691. be anything even fake one.
  10692. </p>
  10693. </dd>
  10694. <dt><samp>audio_device_save</samp></dt>
  10695. <dd><p>Save the currently used audio capture filter device and its
  10696. parameters (if the filter supports it) to a file.
  10697. If a file with the same name exists it will be overwritten.
  10698. </p>
  10699. </dd>
  10700. <dt><samp>video_device_load</samp></dt>
  10701. <dd><p>Load a video capture filter device from file instead of searching
  10702. it by name. It may load additional parameters too, if the filter
  10703. supports the serialization of its properties to.
  10704. To use this a video capture source has to be specified, but it can
  10705. be anything even fake one.
  10706. </p>
  10707. </dd>
  10708. <dt><samp>video_device_save</samp></dt>
  10709. <dd><p>Save the currently used video capture filter device and its
  10710. parameters (if the filter supports it) to a file.
  10711. If a file with the same name exists it will be overwritten.
  10712. </p>
  10713. </dd>
  10714. </dl>
  10715. <a name="Examples-8"></a>
  10716. <h4 class="subsection">20.6.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-8" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-8" aria-hidden="true">TOC</a></span></h4>
  10717. <ul>
  10718. <li> Print the list of DirectShow supported devices and exit:
  10719. <div class="example">
  10720. <pre class="example">$ ffmpeg -list_devices true -f dshow -i dummy
  10721. </pre></div>
  10722. </li><li> Open video device <var>Camera</var>:
  10723. <div class="example">
  10724. <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;
  10725. </pre></div>
  10726. </li><li> Open second video device with name <var>Camera</var>:
  10727. <div class="example">
  10728. <pre class="example">$ ffmpeg -f dshow -video_device_number 1 -i video=&quot;Camera&quot;
  10729. </pre></div>
  10730. </li><li> Open video device <var>Camera</var> and audio device <var>Microphone</var>:
  10731. <div class="example">
  10732. <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;:audio=&quot;Microphone&quot;
  10733. </pre></div>
  10734. </li><li> Print the list of supported options in selected device and exit:
  10735. <div class="example">
  10736. <pre class="example">$ ffmpeg -list_options true -f dshow -i video=&quot;Camera&quot;
  10737. </pre></div>
  10738. </li><li> Specify pin names to capture by name or alternative name, specify alternative device name:
  10739. <div class="example">
  10740. <pre class="example">$ 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;
  10741. </pre></div>
  10742. </li><li> Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:
  10743. <div class="example">
  10744. <pre class="example">$ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
  10745. -crossbar_audio_input_pin_number 3 -i video=&quot;AVerMedia BDA Analog Capture&quot;:audio=&quot;AVerMedia BDA Analog Capture&quot;
  10746. </pre></div>
  10747. </li></ul>
  10748. <a name="fbdev"></a>
  10749. <h3 class="section">20.7 fbdev<span class="pull-right"><a class="anchor hidden-xs" href="#fbdev" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fbdev" aria-hidden="true">TOC</a></span></h3>
  10750. <p>Linux framebuffer input device.
  10751. </p>
  10752. <p>The Linux framebuffer is a graphic hardware-independent abstraction
  10753. layer to show graphics on a computer monitor, typically on the
  10754. console. It is accessed through a file device node, usually
  10755. <samp>/dev/fb0</samp>.
  10756. </p>
  10757. <p>For more detailed information read the file
  10758. Documentation/fb/framebuffer.txt included in the Linux source tree.
  10759. </p>
  10760. <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
  10761. </p>
  10762. <p>To record from the framebuffer device <samp>/dev/fb0</samp> with
  10763. <code>ffmpeg</code>:
  10764. </p><div class="example">
  10765. <pre class="example">ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
  10766. </pre></div>
  10767. <p>You can take a single screenshot image with the command:
  10768. </p><div class="example">
  10769. <pre class="example">ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
  10770. </pre></div>
  10771. <a name="Options-17"></a>
  10772. <h4 class="subsection">20.7.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-17" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-17" aria-hidden="true">TOC</a></span></h4>
  10773. <dl compact="compact">
  10774. <dt><samp>framerate</samp></dt>
  10775. <dd><p>Set the frame rate. Default is 25.
  10776. </p>
  10777. </dd>
  10778. </dl>
  10779. <a name="gdigrab"></a>
  10780. <h3 class="section">20.8 gdigrab<span class="pull-right"><a class="anchor hidden-xs" href="#gdigrab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gdigrab" aria-hidden="true">TOC</a></span></h3>
  10781. <p>Win32 GDI-based screen capture device.
  10782. </p>
  10783. <p>This device allows you to capture a region of the display on Windows.
  10784. </p>
  10785. <p>There are two options for the input filename:
  10786. </p><div class="example">
  10787. <pre class="example">desktop
  10788. </pre></div>
  10789. <p>or
  10790. </p><div class="example">
  10791. <pre class="example">title=<var>window_title</var>
  10792. </pre></div>
  10793. <p>The first option will capture the entire desktop, or a fixed region of the
  10794. desktop. The second option will instead capture the contents of a single
  10795. window, regardless of its position on the screen.
  10796. </p>
  10797. <p>For example, to grab the entire desktop using <code>ffmpeg</code>:
  10798. </p><div class="example">
  10799. <pre class="example">ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
  10800. </pre></div>
  10801. <p>Grab a 640x480 region at position <code>10,20</code>:
  10802. </p><div class="example">
  10803. <pre class="example">ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
  10804. </pre></div>
  10805. <p>Grab the contents of the window named &quot;Calculator&quot;
  10806. </p><div class="example">
  10807. <pre class="example">ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
  10808. </pre></div>
  10809. <a name="Options-18"></a>
  10810. <h4 class="subsection">20.8.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-18" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-18" aria-hidden="true">TOC</a></span></h4>
  10811. <dl compact="compact">
  10812. <dt><samp>draw_mouse</samp></dt>
  10813. <dd><p>Specify whether to draw the mouse pointer. Use the value <code>0</code> to
  10814. not draw the pointer. Default value is <code>1</code>.
  10815. </p>
  10816. </dd>
  10817. <dt><samp>framerate</samp></dt>
  10818. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  10819. corresponding to a frame rate of <code>30000/1001</code>.
  10820. </p>
  10821. </dd>
  10822. <dt><samp>show_region</samp></dt>
  10823. <dd><p>Show grabbed region on screen.
  10824. </p>
  10825. <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
  10826. region will be indicated on screen. With this option, it is easy to
  10827. know what is being grabbed if only a portion of the screen is grabbed.
  10828. </p>
  10829. <p>Note that <var>show_region</var> is incompatible with grabbing the contents
  10830. of a single window.
  10831. </p>
  10832. <p>For example:
  10833. </p><div class="example">
  10834. <pre class="example">ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
  10835. </pre></div>
  10836. </dd>
  10837. <dt><samp>video_size</samp></dt>
  10838. <dd><p>Set the video frame size. The default is to capture the full screen if <samp>desktop</samp> is selected, or the full window size if <samp>title=<var>window_title</var></samp> is selected.
  10839. </p>
  10840. </dd>
  10841. <dt><samp>offset_x</samp></dt>
  10842. <dd><p>When capturing a region with <var>video_size</var>, set the distance from the left edge of the screen or desktop.
  10843. </p>
  10844. <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>offset_x</var> value to move the region to that monitor.
  10845. </p>
  10846. </dd>
  10847. <dt><samp>offset_y</samp></dt>
  10848. <dd><p>When capturing a region with <var>video_size</var>, set the distance from the top edge of the screen or desktop.
  10849. </p>
  10850. <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>offset_y</var> value to move the region to that monitor.
  10851. </p>
  10852. </dd>
  10853. </dl>
  10854. <a name="iec61883"></a>
  10855. <h3 class="section">20.9 iec61883<span class="pull-right"><a class="anchor hidden-xs" href="#iec61883" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-iec61883" aria-hidden="true">TOC</a></span></h3>
  10856. <p>FireWire DV/HDV input device using libiec61883.
  10857. </p>
  10858. <p>To enable this input device, you need libiec61883, libraw1394 and
  10859. libavc1394 installed on your system. Use the configure option
  10860. <code>--enable-libiec61883</code> to compile with the device enabled.
  10861. </p>
  10862. <p>The iec61883 capture device supports capturing from a video device
  10863. connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
  10864. FireWire stack (juju). This is the default DV/HDV input method in Linux
  10865. Kernel 2.6.37 and later, since the old FireWire stack was removed.
  10866. </p>
  10867. <p>Specify the FireWire port to be used as input file, or &quot;auto&quot;
  10868. to choose the first port connected.
  10869. </p>
  10870. <a name="Options-19"></a>
  10871. <h4 class="subsection">20.9.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-19" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-19" aria-hidden="true">TOC</a></span></h4>
  10872. <dl compact="compact">
  10873. <dt><samp>dvtype</samp></dt>
  10874. <dd><p>Override autodetection of DV/HDV. This should only be used if auto
  10875. detection does not work, or if usage of a different device type
  10876. should be prohibited. Treating a DV device as HDV (or vice versa) will
  10877. not work and result in undefined behavior.
  10878. The values <samp>auto</samp>, <samp>dv</samp> and <samp>hdv</samp> are supported.
  10879. </p>
  10880. </dd>
  10881. <dt><samp>dvbuffer</samp></dt>
  10882. <dd><p>Set maximum size of buffer for incoming data, in frames. For DV, this
  10883. is an exact value. For HDV, it is not frame exact, since HDV does
  10884. not have a fixed frame size.
  10885. </p>
  10886. </dd>
  10887. <dt><samp>dvguid</samp></dt>
  10888. <dd><p>Select the capture device by specifying its GUID. Capturing will only
  10889. be performed from the specified device and fails if no device with the
  10890. given GUID is found. This is useful to select the input if multiple
  10891. devices are connected at the same time.
  10892. Look at /sys/bus/firewire/devices to find out the GUIDs.
  10893. </p>
  10894. </dd>
  10895. </dl>
  10896. <a name="Examples-9"></a>
  10897. <h4 class="subsection">20.9.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-9" aria-hidden="true">TOC</a></span></h4>
  10898. <ul>
  10899. <li> Grab and show the input of a FireWire DV/HDV device.
  10900. <div class="example">
  10901. <pre class="example">ffplay -f iec61883 -i auto
  10902. </pre></div>
  10903. </li><li> Grab and record the input of a FireWire DV/HDV device,
  10904. using a packet buffer of 100000 packets if the source is HDV.
  10905. <div class="example">
  10906. <pre class="example">ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
  10907. </pre></div>
  10908. </li></ul>
  10909. <a name="jack"></a>
  10910. <h3 class="section">20.10 jack<span class="pull-right"><a class="anchor hidden-xs" href="#jack" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-jack" aria-hidden="true">TOC</a></span></h3>
  10911. <p>JACK input device.
  10912. </p>
  10913. <p>To enable this input device during configuration you need libjack
  10914. installed on your system.
  10915. </p>
  10916. <p>A JACK input device creates one or more JACK writable clients, one for
  10917. each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
  10918. <var>client_name</var> is the name provided by the application, and <var>N</var>
  10919. is a number which identifies the channel.
  10920. Each writable client will send the acquired data to the FFmpeg input
  10921. device.
  10922. </p>
  10923. <p>Once you have created one or more JACK readable clients, you need to
  10924. connect them to one or more JACK writable clients.
  10925. </p>
  10926. <p>To connect or disconnect JACK clients you can use the <code>jack_connect</code>
  10927. and <code>jack_disconnect</code> programs, or do it through a graphical interface,
  10928. for example with <code>qjackctl</code>.
  10929. </p>
  10930. <p>To list the JACK clients and their properties you can invoke the command
  10931. <code>jack_lsp</code>.
  10932. </p>
  10933. <p>Follows an example which shows how to capture a JACK readable client
  10934. with <code>ffmpeg</code>.
  10935. </p><div class="example">
  10936. <pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
  10937. $ ffmpeg -f jack -i ffmpeg -y out.wav
  10938. # Start the sample jack_metro readable client.
  10939. $ jack_metro -b 120 -d 0.2 -f 4000
  10940. # List the current JACK clients.
  10941. $ jack_lsp -c
  10942. system:capture_1
  10943. system:capture_2
  10944. system:playback_1
  10945. system:playback_2
  10946. ffmpeg:input_1
  10947. metro:120_bpm
  10948. # Connect metro to the ffmpeg writable client.
  10949. $ jack_connect metro:120_bpm ffmpeg:input_1
  10950. </pre></div>
  10951. <p>For more information read:
  10952. <a href="http://jackaudio.org/">http://jackaudio.org/</a>
  10953. </p>
  10954. <a name="Options-20"></a>
  10955. <h4 class="subsection">20.10.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-20" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-20" aria-hidden="true">TOC</a></span></h4>
  10956. <dl compact="compact">
  10957. <dt><samp>channels</samp></dt>
  10958. <dd><p>Set the number of channels. Default is 2.
  10959. </p>
  10960. </dd>
  10961. </dl>
  10962. <a name="kmsgrab"></a>
  10963. <h3 class="section">20.11 kmsgrab<span class="pull-right"><a class="anchor hidden-xs" href="#kmsgrab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-kmsgrab" aria-hidden="true">TOC</a></span></h3>
  10964. <p>KMS video input device.
  10965. </p>
  10966. <p>Captures the KMS scanout framebuffer associated with a specified CRTC or plane as a
  10967. DRM object that can be passed to other hardware functions.
  10968. </p>
  10969. <p>Requires either DRM master or CAP_SYS_ADMIN to run.
  10970. </p>
  10971. <p>If you don&rsquo;t understand what all of that means, you probably don&rsquo;t want this. Look at
  10972. <samp>x11grab</samp> instead.
  10973. </p>
  10974. <a name="Options-21"></a>
  10975. <h4 class="subsection">20.11.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-21" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-21" aria-hidden="true">TOC</a></span></h4>
  10976. <dl compact="compact">
  10977. <dt><samp>device</samp></dt>
  10978. <dd><p>DRM device to capture on. Defaults to <samp>/dev/dri/card0</samp>.
  10979. </p>
  10980. </dd>
  10981. <dt><samp>format</samp></dt>
  10982. <dd><p>Pixel format of the framebuffer. This can be autodetected if you are running Linux 5.7
  10983. or later, but needs to be provided for earlier versions. Defaults to <samp>bgr0</samp>,
  10984. which is the most common format used by the Linux console and Xorg X server.
  10985. </p>
  10986. </dd>
  10987. <dt><samp>format_modifier</samp></dt>
  10988. <dd><p>Format modifier to signal on output frames. This is necessary to import correctly into
  10989. some APIs. It can be autodetected if you are running Linux 5.7 or later, but will need
  10990. to be provided explicitly when needed in earlier versions. See the libdrm documentation
  10991. for possible values.
  10992. </p>
  10993. </dd>
  10994. <dt><samp>crtc_id</samp></dt>
  10995. <dd><p>KMS CRTC ID to define the capture source. The first active plane on the given CRTC
  10996. will be used.
  10997. </p>
  10998. </dd>
  10999. <dt><samp>plane_id</samp></dt>
  11000. <dd><p>KMS plane ID to define the capture source. Defaults to the first active plane found if
  11001. neither <samp>crtc_id</samp> nor <samp>plane_id</samp> are specified.
  11002. </p>
  11003. </dd>
  11004. <dt><samp>framerate</samp></dt>
  11005. <dd><p>Framerate to capture at. This is not synchronised to any page flipping or framebuffer
  11006. changes - it just defines the interval at which the framebuffer is sampled. Sampling
  11007. faster than the framebuffer update rate will generate independent frames with the same
  11008. content. Defaults to <code>30</code>.
  11009. </p>
  11010. </dd>
  11011. </dl>
  11012. <a name="Examples-10"></a>
  11013. <h4 class="subsection">20.11.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-10" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-10" aria-hidden="true">TOC</a></span></h4>
  11014. <ul>
  11015. <li> Capture from the first active plane, download the result to normal frames and encode.
  11016. This will only work if the framebuffer is both linear and mappable - if not, the result
  11017. may be scrambled or fail to download.
  11018. <div class="example">
  11019. <pre class="example">ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
  11020. </pre></div>
  11021. </li><li> Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and encode as H.264.
  11022. <div class="example">
  11023. <pre class="example">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
  11024. </pre></div>
  11025. </li><li> To capture only part of a plane the output can be cropped - this can be used to capture
  11026. a single window, as long as it has a known absolute position and size. For example, to
  11027. capture and encode the middle quarter of a 1920x1080 plane:
  11028. <div class="example">
  11029. <pre class="example">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
  11030. </pre></div>
  11031. </li></ul>
  11032. <a name="lavfi"></a>
  11033. <h3 class="section">20.12 lavfi<span class="pull-right"><a class="anchor hidden-xs" href="#lavfi" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lavfi" aria-hidden="true">TOC</a></span></h3>
  11034. <p>Libavfilter input virtual device.
  11035. </p>
  11036. <p>This input device reads data from the open output pads of a libavfilter
  11037. filtergraph.
  11038. </p>
  11039. <p>For each filtergraph open output, the input device will create a
  11040. corresponding stream which is mapped to the generated output. Currently
  11041. only video data is supported. The filtergraph is specified through the
  11042. option <samp>graph</samp>.
  11043. </p>
  11044. <a name="Options-22"></a>
  11045. <h4 class="subsection">20.12.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-22" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-22" aria-hidden="true">TOC</a></span></h4>
  11046. <dl compact="compact">
  11047. <dt><samp>graph</samp></dt>
  11048. <dd><p>Specify the filtergraph to use as input. Each video open output must be
  11049. labelled by a unique string of the form &quot;out<var>N</var>&quot;, where <var>N</var> is a
  11050. number starting from 0 corresponding to the mapped input stream
  11051. generated by the device.
  11052. The first unlabelled output is automatically assigned to the &quot;out0&quot;
  11053. label, but all the others need to be specified explicitly.
  11054. </p>
  11055. <p>The suffix &quot;+subcc&quot; can be appended to the output label to create an extra
  11056. stream with the closed captions packets attached to that output
  11057. (experimental; only for EIA-608 / CEA-708 for now).
  11058. The subcc streams are created after all the normal streams, in the order of
  11059. the corresponding stream.
  11060. For example, if there is &quot;out19+subcc&quot;, &quot;out7+subcc&quot; and up to &quot;out42&quot;, the
  11061. stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19.
  11062. </p>
  11063. <p>If not specified defaults to the filename specified for the input
  11064. device.
  11065. </p>
  11066. </dd>
  11067. <dt><samp>graph_file</samp></dt>
  11068. <dd><p>Set the filename of the filtergraph to be read and sent to the other
  11069. filters. Syntax of the filtergraph is the same as the one specified by
  11070. the option <var>graph</var>.
  11071. </p>
  11072. </dd>
  11073. <dt><samp>dumpgraph</samp></dt>
  11074. <dd><p>Dump graph to stderr.
  11075. </p>
  11076. </dd>
  11077. </dl>
  11078. <a name="Examples-11"></a>
  11079. <h4 class="subsection">20.12.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-11" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-11" aria-hidden="true">TOC</a></span></h4>
  11080. <ul>
  11081. <li> Create a color video stream and play it back with <code>ffplay</code>:
  11082. <div class="example">
  11083. <pre class="example">ffplay -f lavfi -graph &quot;color=c=pink [out0]&quot; dummy
  11084. </pre></div>
  11085. </li><li> As the previous example, but use filename for specifying the graph
  11086. description, and omit the &quot;out0&quot; label:
  11087. <div class="example">
  11088. <pre class="example">ffplay -f lavfi color=c=pink
  11089. </pre></div>
  11090. </li><li> Create three different video test filtered sources and play them:
  11091. <div class="example">
  11092. <pre class="example">ffplay -f lavfi -graph &quot;testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]&quot; test3
  11093. </pre></div>
  11094. </li><li> Read an audio stream from a file using the amovie source and play it
  11095. back with <code>ffplay</code>:
  11096. <div class="example">
  11097. <pre class="example">ffplay -f lavfi &quot;amovie=test.wav&quot;
  11098. </pre></div>
  11099. </li><li> Read an audio stream and a video stream and play it back with
  11100. <code>ffplay</code>:
  11101. <div class="example">
  11102. <pre class="example">ffplay -f lavfi &quot;movie=test.avi[out0];amovie=test.wav[out1]&quot;
  11103. </pre></div>
  11104. </li><li> Dump decoded frames to images and closed captions to a file (experimental):
  11105. <div class="example">
  11106. <pre class="example">ffmpeg -f lavfi -i &quot;movie=test.ts[out0+subcc]&quot; -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
  11107. </pre></div>
  11108. </li></ul>
  11109. <a name="libcdio"></a>
  11110. <h3 class="section">20.13 libcdio<span class="pull-right"><a class="anchor hidden-xs" href="#libcdio" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libcdio" aria-hidden="true">TOC</a></span></h3>
  11111. <p>Audio-CD input device based on libcdio.
  11112. </p>
  11113. <p>To enable this input device during configuration you need libcdio
  11114. installed on your system. It requires the configure option
  11115. <code>--enable-libcdio</code>.
  11116. </p>
  11117. <p>This device allows playing and grabbing from an Audio-CD.
  11118. </p>
  11119. <p>For example to copy with <code>ffmpeg</code> the entire Audio-CD in <samp>/dev/sr0</samp>,
  11120. you may run the command:
  11121. </p><div class="example">
  11122. <pre class="example">ffmpeg -f libcdio -i /dev/sr0 cd.wav
  11123. </pre></div>
  11124. <a name="Options-23"></a>
  11125. <h4 class="subsection">20.13.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-23" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-23" aria-hidden="true">TOC</a></span></h4>
  11126. <dl compact="compact">
  11127. <dt><samp>speed</samp></dt>
  11128. <dd><p>Set drive reading speed. Default value is 0.
  11129. </p>
  11130. <p>The speed is specified CD-ROM speed units. The speed is set through
  11131. the libcdio <code>cdio_cddap_speed_set</code> function. On many CD-ROM
  11132. drives, specifying a value too large will result in using the fastest
  11133. speed.
  11134. </p>
  11135. </dd>
  11136. <dt><samp>paranoia_mode</samp></dt>
  11137. <dd><p>Set paranoia recovery mode flags. It accepts one of the following values:
  11138. </p>
  11139. <dl compact="compact">
  11140. <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
  11141. <dt>&lsquo;<samp>verify</samp>&rsquo;</dt>
  11142. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  11143. <dt>&lsquo;<samp>neverskip</samp>&rsquo;</dt>
  11144. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  11145. </dl>
  11146. <p>Default value is &lsquo;<samp>disable</samp>&rsquo;.
  11147. </p>
  11148. <p>For more information about the available recovery modes, consult the
  11149. paranoia project documentation.
  11150. </p></dd>
  11151. </dl>
  11152. <a name="libdc1394"></a>
  11153. <h3 class="section">20.14 libdc1394<span class="pull-right"><a class="anchor hidden-xs" href="#libdc1394" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libdc1394" aria-hidden="true">TOC</a></span></h3>
  11154. <p>IIDC1394 input device, based on libdc1394 and libraw1394.
  11155. </p>
  11156. <p>Requires the configure option <code>--enable-libdc1394</code>.
  11157. </p>
  11158. <a name="Options-24"></a>
  11159. <h4 class="subsection">20.14.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-24" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-24" aria-hidden="true">TOC</a></span></h4>
  11160. <dl compact="compact">
  11161. <dt><samp>framerate</samp></dt>
  11162. <dd><p>Set the frame rate. Default is <code>ntsc</code>, corresponding to a frame
  11163. rate of <code>30000/1001</code>.
  11164. </p>
  11165. </dd>
  11166. <dt><samp>pixel_format</samp></dt>
  11167. <dd><p>Select the pixel format. Default is <code>uyvy422</code>.
  11168. </p>
  11169. </dd>
  11170. <dt><samp>video_size</samp></dt>
  11171. <dd><p>Set the video size given as a string such as <code>640x480</code> or <code>hd720</code>.
  11172. Default is <code>qvga</code>.
  11173. </p></dd>
  11174. </dl>
  11175. <a name="openal"></a>
  11176. <h3 class="section">20.15 openal<span class="pull-right"><a class="anchor hidden-xs" href="#openal" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-openal" aria-hidden="true">TOC</a></span></h3>
  11177. <p>The OpenAL input device provides audio capture on all systems with a
  11178. working OpenAL 1.1 implementation.
  11179. </p>
  11180. <p>To enable this input device during configuration, you need OpenAL
  11181. headers and libraries installed on your system, and need to configure
  11182. FFmpeg with <code>--enable-openal</code>.
  11183. </p>
  11184. <p>OpenAL headers and libraries should be provided as part of your OpenAL
  11185. implementation, or as an additional download (an SDK). Depending on your
  11186. installation you may need to specify additional flags via the
  11187. <code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
  11188. system to locate the OpenAL headers and libraries.
  11189. </p>
  11190. <p>An incomplete list of OpenAL implementations follows:
  11191. </p>
  11192. <dl compact="compact">
  11193. <dt><strong>Creative</strong></dt>
  11194. <dd><p>The official Windows implementation, providing hardware acceleration
  11195. with supported devices and software fallback.
  11196. See <a href="http://openal.org/">http://openal.org/</a>.
  11197. </p></dd>
  11198. <dt><strong>OpenAL Soft</strong></dt>
  11199. <dd><p>Portable, open source (LGPL) software implementation. Includes
  11200. backends for the most common sound APIs on the Windows, Linux,
  11201. Solaris, and BSD operating systems.
  11202. See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
  11203. </p></dd>
  11204. <dt><strong>Apple</strong></dt>
  11205. <dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
  11206. See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
  11207. </p></dd>
  11208. </dl>
  11209. <p>This device allows one to capture from an audio input device handled
  11210. through OpenAL.
  11211. </p>
  11212. <p>You need to specify the name of the device to capture in the provided
  11213. filename. If the empty string is provided, the device will
  11214. automatically select the default device. You can get the list of the
  11215. supported devices by using the option <var>list_devices</var>.
  11216. </p>
  11217. <a name="Options-25"></a>
  11218. <h4 class="subsection">20.15.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-25" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-25" aria-hidden="true">TOC</a></span></h4>
  11219. <dl compact="compact">
  11220. <dt><samp>channels</samp></dt>
  11221. <dd><p>Set the number of channels in the captured audio. Only the values
  11222. <samp>1</samp> (monaural) and <samp>2</samp> (stereo) are currently supported.
  11223. Defaults to <samp>2</samp>.
  11224. </p>
  11225. </dd>
  11226. <dt><samp>sample_size</samp></dt>
  11227. <dd><p>Set the sample size (in bits) of the captured audio. Only the values
  11228. <samp>8</samp> and <samp>16</samp> are currently supported. Defaults to
  11229. <samp>16</samp>.
  11230. </p>
  11231. </dd>
  11232. <dt><samp>sample_rate</samp></dt>
  11233. <dd><p>Set the sample rate (in Hz) of the captured audio.
  11234. Defaults to <samp>44.1k</samp>.
  11235. </p>
  11236. </dd>
  11237. <dt><samp>list_devices</samp></dt>
  11238. <dd><p>If set to <samp>true</samp>, print a list of devices and exit.
  11239. Defaults to <samp>false</samp>.
  11240. </p>
  11241. </dd>
  11242. </dl>
  11243. <a name="Examples-12"></a>
  11244. <h4 class="subsection">20.15.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-12" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-12" aria-hidden="true">TOC</a></span></h4>
  11245. <p>Print the list of OpenAL supported devices and exit:
  11246. </p><div class="example">
  11247. <pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
  11248. </pre></div>
  11249. <p>Capture from the OpenAL device <samp>DR-BT101 via PulseAudio</samp>:
  11250. </p><div class="example">
  11251. <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
  11252. </pre></div>
  11253. <p>Capture from the default device (note the empty string &rdquo; as filename):
  11254. </p><div class="example">
  11255. <pre class="example">$ ffmpeg -f openal -i '' out.ogg
  11256. </pre></div>
  11257. <p>Capture from two devices simultaneously, writing to two different files,
  11258. within the same <code>ffmpeg</code> command:
  11259. </p><div class="example">
  11260. <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
  11261. </pre></div>
  11262. <p>Note: not all OpenAL implementations support multiple simultaneous capture -
  11263. try the latest OpenAL Soft if the above does not work.
  11264. </p>
  11265. <a name="oss"></a>
  11266. <h3 class="section">20.16 oss<span class="pull-right"><a class="anchor hidden-xs" href="#oss" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-oss" aria-hidden="true">TOC</a></span></h3>
  11267. <p>Open Sound System input device.
  11268. </p>
  11269. <p>The filename to provide to the input device is the device node
  11270. representing the OSS input device, and is usually set to
  11271. <samp>/dev/dsp</samp>.
  11272. </p>
  11273. <p>For example to grab from <samp>/dev/dsp</samp> using <code>ffmpeg</code> use the
  11274. command:
  11275. </p><div class="example">
  11276. <pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
  11277. </pre></div>
  11278. <p>For more information about OSS see:
  11279. <a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
  11280. </p>
  11281. <a name="Options-26"></a>
  11282. <h4 class="subsection">20.16.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-26" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-26" aria-hidden="true">TOC</a></span></h4>
  11283. <dl compact="compact">
  11284. <dt><samp>sample_rate</samp></dt>
  11285. <dd><p>Set the sample rate in Hz. Default is 48000.
  11286. </p>
  11287. </dd>
  11288. <dt><samp>channels</samp></dt>
  11289. <dd><p>Set the number of channels. Default is 2.
  11290. </p>
  11291. </dd>
  11292. </dl>
  11293. <a name="pulse"></a>
  11294. <h3 class="section">20.17 pulse<span class="pull-right"><a class="anchor hidden-xs" href="#pulse" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pulse" aria-hidden="true">TOC</a></span></h3>
  11295. <p>PulseAudio input device.
  11296. </p>
  11297. <p>To enable this output device you need to configure FFmpeg with <code>--enable-libpulse</code>.
  11298. </p>
  11299. <p>The filename to provide to the input device is a source device or the
  11300. string &quot;default&quot;
  11301. </p>
  11302. <p>To list the PulseAudio source devices and their properties you can invoke
  11303. the command <code>pactl list sources</code>.
  11304. </p>
  11305. <p>More information about PulseAudio can be found on <a href="http://www.pulseaudio.org">http://www.pulseaudio.org</a>.
  11306. </p>
  11307. <a name="Options-27"></a>
  11308. <h4 class="subsection">20.17.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-27" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-27" aria-hidden="true">TOC</a></span></h4>
  11309. <dl compact="compact">
  11310. <dt><samp>server</samp></dt>
  11311. <dd><p>Connect to a specific PulseAudio server, specified by an IP address.
  11312. Default server is used when not provided.
  11313. </p>
  11314. </dd>
  11315. <dt><samp>name</samp></dt>
  11316. <dd><p>Specify the application name PulseAudio will use when showing active clients,
  11317. by default it is the <code>LIBAVFORMAT_IDENT</code> string.
  11318. </p>
  11319. </dd>
  11320. <dt><samp>stream_name</samp></dt>
  11321. <dd><p>Specify the stream name PulseAudio will use when showing active streams,
  11322. by default it is &quot;record&quot;.
  11323. </p>
  11324. </dd>
  11325. <dt><samp>sample_rate</samp></dt>
  11326. <dd><p>Specify the samplerate in Hz, by default 48kHz is used.
  11327. </p>
  11328. </dd>
  11329. <dt><samp>channels</samp></dt>
  11330. <dd><p>Specify the channels in use, by default 2 (stereo) is set.
  11331. </p>
  11332. </dd>
  11333. <dt><samp>frame_size</samp></dt>
  11334. <dd><p>Specify the number of bytes per frame, by default it is set to 1024.
  11335. </p>
  11336. </dd>
  11337. <dt><samp>fragment_size</samp></dt>
  11338. <dd><p>Specify the minimal buffering fragment in PulseAudio, it will affect the
  11339. audio latency. By default it is unset.
  11340. </p>
  11341. </dd>
  11342. <dt><samp>wallclock</samp></dt>
  11343. <dd><p>Set the initial PTS using the current time. Default is 1.
  11344. </p>
  11345. </dd>
  11346. </dl>
  11347. <a name="Examples-13"></a>
  11348. <h4 class="subsection">20.17.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-13" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-13" aria-hidden="true">TOC</a></span></h4>
  11349. <p>Record a stream from default device:
  11350. </p><div class="example">
  11351. <pre class="example">ffmpeg -f pulse -i default /tmp/pulse.wav
  11352. </pre></div>
  11353. <a name="sndio"></a>
  11354. <h3 class="section">20.18 sndio<span class="pull-right"><a class="anchor hidden-xs" href="#sndio" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sndio" aria-hidden="true">TOC</a></span></h3>
  11355. <p>sndio input device.
  11356. </p>
  11357. <p>To enable this input device during configuration you need libsndio
  11358. installed on your system.
  11359. </p>
  11360. <p>The filename to provide to the input device is the device node
  11361. representing the sndio input device, and is usually set to
  11362. <samp>/dev/audio0</samp>.
  11363. </p>
  11364. <p>For example to grab from <samp>/dev/audio0</samp> using <code>ffmpeg</code> use the
  11365. command:
  11366. </p><div class="example">
  11367. <pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
  11368. </pre></div>
  11369. <a name="Options-28"></a>
  11370. <h4 class="subsection">20.18.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-28" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-28" aria-hidden="true">TOC</a></span></h4>
  11371. <dl compact="compact">
  11372. <dt><samp>sample_rate</samp></dt>
  11373. <dd><p>Set the sample rate in Hz. Default is 48000.
  11374. </p>
  11375. </dd>
  11376. <dt><samp>channels</samp></dt>
  11377. <dd><p>Set the number of channels. Default is 2.
  11378. </p>
  11379. </dd>
  11380. </dl>
  11381. <a name="video4linux2_002c-v4l2"></a>
  11382. <h3 class="section">20.19 video4linux2, v4l2<span class="pull-right"><a class="anchor hidden-xs" href="#video4linux2_002c-v4l2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-video4linux2_002c-v4l2" aria-hidden="true">TOC</a></span></h3>
  11383. <p>Video4Linux2 input video device.
  11384. </p>
  11385. <p>&quot;v4l2&quot; can be used as alias for &quot;video4linux2&quot;.
  11386. </p>
  11387. <p>If FFmpeg is built with v4l-utils support (by using the
  11388. <code>--enable-libv4l2</code> configure option), it is possible to use it with the
  11389. <code>-use_libv4l2</code> input device option.
  11390. </p>
  11391. <p>The name of the device to grab is a file device node, usually Linux
  11392. systems tend to automatically create such nodes when the device
  11393. (e.g. an USB webcam) is plugged into the system, and has a name of the
  11394. kind <samp>/dev/video<var>N</var></samp>, where <var>N</var> is a number associated to
  11395. the device.
  11396. </p>
  11397. <p>Video4Linux2 devices usually support a limited set of
  11398. <var>width</var>x<var>height</var> sizes and frame rates. You can check which are
  11399. supported using <code>-list_formats all</code> for Video4Linux2 devices.
  11400. Some devices, like TV cards, support one or more standards. It is possible
  11401. to list all the supported standards using <code>-list_standards all</code>.
  11402. </p>
  11403. <p>The time base for the timestamps is 1 microsecond. Depending on the kernel
  11404. version and configuration, the timestamps may be derived from the real time
  11405. clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
  11406. boot time, unaffected by NTP or manual changes to the clock). The
  11407. <samp>-timestamps abs</samp> or <samp>-ts abs</samp> option can be used to force
  11408. conversion into the real time clock.
  11409. </p>
  11410. <p>Some usage examples of the video4linux2 device with <code>ffmpeg</code>
  11411. and <code>ffplay</code>:
  11412. </p><ul>
  11413. <li> List supported formats for a video4linux2 device:
  11414. <div class="example">
  11415. <pre class="example">ffplay -f video4linux2 -list_formats all /dev/video0
  11416. </pre></div>
  11417. </li><li> Grab and show the input of a video4linux2 device:
  11418. <div class="example">
  11419. <pre class="example">ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
  11420. </pre></div>
  11421. </li><li> Grab and record the input of a video4linux2 device, leave the
  11422. frame rate and size as previously set:
  11423. <div class="example">
  11424. <pre class="example">ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
  11425. </pre></div>
  11426. </li></ul>
  11427. <p>For more information about Video4Linux, check <a href="http://linuxtv.org/">http://linuxtv.org/</a>.
  11428. </p>
  11429. <a name="Options-29"></a>
  11430. <h4 class="subsection">20.19.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-29" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-29" aria-hidden="true">TOC</a></span></h4>
  11431. <dl compact="compact">
  11432. <dt><samp>standard</samp></dt>
  11433. <dd><p>Set the standard. Must be the name of a supported standard. To get a
  11434. list of the supported standards, use the <samp>list_standards</samp>
  11435. option.
  11436. </p>
  11437. </dd>
  11438. <dt><samp>channel</samp></dt>
  11439. <dd><p>Set the input channel number. Default to -1, which means using the
  11440. previously selected channel.
  11441. </p>
  11442. </dd>
  11443. <dt><samp>video_size</samp></dt>
  11444. <dd><p>Set the video frame size. The argument must be a string in the form
  11445. <var>WIDTH</var>x<var>HEIGHT</var> or a valid size abbreviation.
  11446. </p>
  11447. </dd>
  11448. <dt><samp>pixel_format</samp></dt>
  11449. <dd><p>Select the pixel format (only valid for raw video input).
  11450. </p>
  11451. </dd>
  11452. <dt><samp>input_format</samp></dt>
  11453. <dd><p>Set the preferred pixel format (for raw video) or a codec name.
  11454. This option allows one to select the input format, when several are
  11455. available.
  11456. </p>
  11457. </dd>
  11458. <dt><samp>framerate</samp></dt>
  11459. <dd><p>Set the preferred video frame rate.
  11460. </p>
  11461. </dd>
  11462. <dt><samp>list_formats</samp></dt>
  11463. <dd><p>List available formats (supported pixel formats, codecs, and frame
  11464. sizes) and exit.
  11465. </p>
  11466. <p>Available values are:
  11467. </p><dl compact="compact">
  11468. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  11469. <dd><p>Show all available (compressed and non-compressed) formats.
  11470. </p>
  11471. </dd>
  11472. <dt>&lsquo;<samp>raw</samp>&rsquo;</dt>
  11473. <dd><p>Show only raw video (non-compressed) formats.
  11474. </p>
  11475. </dd>
  11476. <dt>&lsquo;<samp>compressed</samp>&rsquo;</dt>
  11477. <dd><p>Show only compressed formats.
  11478. </p></dd>
  11479. </dl>
  11480. </dd>
  11481. <dt><samp>list_standards</samp></dt>
  11482. <dd><p>List supported standards and exit.
  11483. </p>
  11484. <p>Available values are:
  11485. </p><dl compact="compact">
  11486. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  11487. <dd><p>Show all supported standards.
  11488. </p></dd>
  11489. </dl>
  11490. </dd>
  11491. <dt><samp>timestamps, ts</samp></dt>
  11492. <dd><p>Set type of timestamps for grabbed frames.
  11493. </p>
  11494. <p>Available values are:
  11495. </p><dl compact="compact">
  11496. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  11497. <dd><p>Use timestamps from the kernel.
  11498. </p>
  11499. </dd>
  11500. <dt>&lsquo;<samp>abs</samp>&rsquo;</dt>
  11501. <dd><p>Use absolute timestamps (wall clock).
  11502. </p>
  11503. </dd>
  11504. <dt>&lsquo;<samp>mono2abs</samp>&rsquo;</dt>
  11505. <dd><p>Force conversion from monotonic to absolute timestamps.
  11506. </p></dd>
  11507. </dl>
  11508. <p>Default value is <code>default</code>.
  11509. </p>
  11510. </dd>
  11511. <dt><samp>use_libv4l2</samp></dt>
  11512. <dd><p>Use libv4l2 (v4l-utils) conversion functions. Default is 0.
  11513. </p>
  11514. </dd>
  11515. </dl>
  11516. <a name="vfwcap"></a>
  11517. <h3 class="section">20.20 vfwcap<span class="pull-right"><a class="anchor hidden-xs" href="#vfwcap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vfwcap" aria-hidden="true">TOC</a></span></h3>
  11518. <p>VfW (Video for Windows) capture input device.
  11519. </p>
  11520. <p>The filename passed as input is the capture driver number, ranging from
  11521. 0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
  11522. other filename will be interpreted as device number 0.
  11523. </p>
  11524. <a name="Options-30"></a>
  11525. <h4 class="subsection">20.20.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-30" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-30" aria-hidden="true">TOC</a></span></h4>
  11526. <dl compact="compact">
  11527. <dt><samp>video_size</samp></dt>
  11528. <dd><p>Set the video frame size.
  11529. </p>
  11530. </dd>
  11531. <dt><samp>framerate</samp></dt>
  11532. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  11533. corresponding to a frame rate of <code>30000/1001</code>.
  11534. </p>
  11535. </dd>
  11536. </dl>
  11537. <a name="x11grab"></a>
  11538. <h3 class="section">20.21 x11grab<span class="pull-right"><a class="anchor hidden-xs" href="#x11grab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-x11grab" aria-hidden="true">TOC</a></span></h3>
  11539. <p>X11 video input device.
  11540. </p>
  11541. <p>To enable this input device during configuration you need libxcb
  11542. installed on your system. It will be automatically detected during
  11543. configuration.
  11544. </p>
  11545. <p>This device allows one to capture a region of an X11 display.
  11546. </p>
  11547. <p>The filename passed as input has the syntax:
  11548. </p><div class="example">
  11549. <pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
  11550. </pre></div>
  11551. <p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
  11552. X11 display name of the screen to grab from. <var>hostname</var> can be
  11553. omitted, and defaults to &quot;localhost&quot;. The environment variable
  11554. <code>DISPLAY</code> contains the default display name.
  11555. </p>
  11556. <p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
  11557. area with respect to the top-left border of the X11 screen. They
  11558. default to 0.
  11559. </p>
  11560. <p>Check the X11 documentation (e.g. <code>man X</code>) for more detailed
  11561. information.
  11562. </p>
  11563. <p>Use the <code>xdpyinfo</code> program for getting basic information about
  11564. the properties of your X11 display (e.g. grep for &quot;name&quot; or
  11565. &quot;dimensions&quot;).
  11566. </p>
  11567. <p>For example to grab from <samp>:0.0</samp> using <code>ffmpeg</code>:
  11568. </p><div class="example">
  11569. <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
  11570. </pre></div>
  11571. <p>Grab at position <code>10,20</code>:
  11572. </p><div class="example">
  11573. <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  11574. </pre></div>
  11575. <a name="Options-31"></a>
  11576. <h4 class="subsection">20.21.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-31" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-31" aria-hidden="true">TOC</a></span></h4>
  11577. <dl compact="compact">
  11578. <dt><samp>select_region</samp></dt>
  11579. <dd><p>Specify whether to select the grabbing area graphically using the pointer.
  11580. A value of <code>1</code> prompts the user to select the grabbing area graphically
  11581. by clicking and dragging. A single click with no dragging will select the
  11582. whole screen. A region with zero width or height will also select the whole
  11583. screen. This option overwrites the <var>video_size</var>, <var>grab_x</var>, and
  11584. <var>grab_y</var> options. Default value is <code>0</code>.
  11585. </p>
  11586. </dd>
  11587. <dt><samp>draw_mouse</samp></dt>
  11588. <dd><p>Specify whether to draw the mouse pointer. A value of <code>0</code> specifies
  11589. not to draw the pointer. Default value is <code>1</code>.
  11590. </p>
  11591. </dd>
  11592. <dt><samp>follow_mouse</samp></dt>
  11593. <dd><p>Make the grabbed area follow the mouse. The argument can be
  11594. <code>centered</code> or a number of pixels <var>PIXELS</var>.
  11595. </p>
  11596. <p>When it is specified with &quot;centered&quot;, the grabbing region follows the mouse
  11597. pointer and keeps the pointer at the center of region; otherwise, the region
  11598. follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
  11599. zero) to the edge of region.
  11600. </p>
  11601. <p>For example:
  11602. </p><div class="example">
  11603. <pre class="example">ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
  11604. </pre></div>
  11605. <p>To follow only when the mouse pointer reaches within 100 pixels to edge:
  11606. </p><div class="example">
  11607. <pre class="example">ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
  11608. </pre></div>
  11609. </dd>
  11610. <dt><samp>framerate</samp></dt>
  11611. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  11612. corresponding to a frame rate of <code>30000/1001</code>.
  11613. </p>
  11614. </dd>
  11615. <dt><samp>show_region</samp></dt>
  11616. <dd><p>Show grabbed region on screen.
  11617. </p>
  11618. <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
  11619. region will be indicated on screen. With this option, it is easy to
  11620. know what is being grabbed if only a portion of the screen is grabbed.
  11621. </p>
  11622. </dd>
  11623. <dt><samp>region_border</samp></dt>
  11624. <dd><p>Set the region border thickness if <samp>-show_region 1</samp> is used.
  11625. Range is 1 to 128 and default is 3 (XCB-based x11grab only).
  11626. </p>
  11627. <p>For example:
  11628. </p><div class="example">
  11629. <pre class="example">ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  11630. </pre></div>
  11631. <p>With <var>follow_mouse</var>:
  11632. </p><div class="example">
  11633. <pre class="example">ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
  11634. </pre></div>
  11635. </dd>
  11636. <dt><samp>window_id</samp></dt>
  11637. <dd><p>Grab this window, instead of the whole screen. Default value is 0, which maps to
  11638. the whole screen (root window).
  11639. </p>
  11640. <p>The id of a window can be found using the <code>xwininfo</code> program, possibly with options -tree and
  11641. -root.
  11642. </p>
  11643. <p>If the window is later enlarged, the new area is not recorded. Video ends when
  11644. the window is closed, unmapped (i.e., iconified) or shrunk beyond the video
  11645. size (which defaults to the initial window size).
  11646. </p>
  11647. <p>This option disables options <samp>follow_mouse</samp> and <samp>select_region</samp>.
  11648. </p>
  11649. </dd>
  11650. <dt><samp>video_size</samp></dt>
  11651. <dd><p>Set the video frame size. Default is the full desktop or window.
  11652. </p>
  11653. </dd>
  11654. <dt><samp>grab_x</samp></dt>
  11655. <dt><samp>grab_y</samp></dt>
  11656. <dd><p>Set the grabbing region coordinates. They are expressed as offset from
  11657. the top left corner of the X11 window and correspond to the
  11658. <var>x_offset</var> and <var>y_offset</var> parameters in the device name. The
  11659. default value for both options is 0.
  11660. </p></dd>
  11661. </dl>
  11662. <a name="Resampler-Options"></a>
  11663. <h2 class="chapter">21 Resampler Options<span class="pull-right"><a class="anchor hidden-xs" href="#Resampler-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Resampler-Options" aria-hidden="true">TOC</a></span></h2>
  11664. <p>The audio resampler supports the following named options.
  11665. </p>
  11666. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  11667. FFmpeg tools, <var>option</var>=<var>value</var> for the aresample filter,
  11668. by setting the value explicitly in the
  11669. <code>SwrContext</code> options or using the <samp>libavutil/opt.h</samp> API for
  11670. programmatic use.
  11671. </p>
  11672. <dl compact="compact">
  11673. <dt><samp>ich, in_channel_count</samp></dt>
  11674. <dd><p>Set the number of input channels. Default value is 0. Setting this
  11675. value is not mandatory if the corresponding channel layout
  11676. <samp>in_channel_layout</samp> is set.
  11677. </p>
  11678. </dd>
  11679. <dt><samp>och, out_channel_count</samp></dt>
  11680. <dd><p>Set the number of output channels. Default value is 0. Setting this
  11681. value is not mandatory if the corresponding channel layout
  11682. <samp>out_channel_layout</samp> is set.
  11683. </p>
  11684. </dd>
  11685. <dt><samp>uch, used_channel_count</samp></dt>
  11686. <dd><p>Set the number of used input channels. Default value is 0. This option is
  11687. only used for special remapping.
  11688. </p>
  11689. </dd>
  11690. <dt><samp>isr, in_sample_rate</samp></dt>
  11691. <dd><p>Set the input sample rate. Default value is 0.
  11692. </p>
  11693. </dd>
  11694. <dt><samp>osr, out_sample_rate</samp></dt>
  11695. <dd><p>Set the output sample rate. Default value is 0.
  11696. </p>
  11697. </dd>
  11698. <dt><samp>isf, in_sample_fmt</samp></dt>
  11699. <dd><p>Specify the input sample format. It is set by default to <code>none</code>.
  11700. </p>
  11701. </dd>
  11702. <dt><samp>osf, out_sample_fmt</samp></dt>
  11703. <dd><p>Specify the output sample format. It is set by default to <code>none</code>.
  11704. </p>
  11705. </dd>
  11706. <dt><samp>tsf, internal_sample_fmt</samp></dt>
  11707. <dd><p>Set the internal sample format. Default value is <code>none</code>.
  11708. This will automatically be chosen when it is not explicitly set.
  11709. </p>
  11710. </dd>
  11711. <dt><samp>icl, in_channel_layout</samp></dt>
  11712. <dt><samp>ocl, out_channel_layout</samp></dt>
  11713. <dd><p>Set the input/output channel layout.
  11714. </p>
  11715. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  11716. for the required syntax.
  11717. </p>
  11718. </dd>
  11719. <dt><samp>clev, center_mix_level</samp></dt>
  11720. <dd><p>Set the center mix level. It is a value expressed in deciBel, and must be
  11721. in the interval [-32,32].
  11722. </p>
  11723. </dd>
  11724. <dt><samp>slev, surround_mix_level</samp></dt>
  11725. <dd><p>Set the surround mix level. It is a value expressed in deciBel, and must
  11726. be in the interval [-32,32].
  11727. </p>
  11728. </dd>
  11729. <dt><samp>lfe_mix_level</samp></dt>
  11730. <dd><p>Set LFE mix into non LFE level. It is used when there is a LFE input but no
  11731. LFE output. It is a value expressed in deciBel, and must
  11732. be in the interval [-32,32].
  11733. </p>
  11734. </dd>
  11735. <dt><samp>rmvol, rematrix_volume</samp></dt>
  11736. <dd><p>Set rematrix volume. Default value is 1.0.
  11737. </p>
  11738. </dd>
  11739. <dt><samp>rematrix_maxval</samp></dt>
  11740. <dd><p>Set maximum output value for rematrixing.
  11741. This can be used to prevent clipping vs. preventing volume reduction.
  11742. A value of 1.0 prevents clipping.
  11743. </p>
  11744. </dd>
  11745. <dt><samp>flags, swr_flags</samp></dt>
  11746. <dd><p>Set flags used by the converter. Default value is 0.
  11747. </p>
  11748. <p>It supports the following individual flags:
  11749. </p><dl compact="compact">
  11750. <dt><samp>res</samp></dt>
  11751. <dd><p>force resampling, this flag forces resampling to be used even when the
  11752. input and output sample rates match.
  11753. </p></dd>
  11754. </dl>
  11755. </dd>
  11756. <dt><samp>dither_scale</samp></dt>
  11757. <dd><p>Set the dither scale. Default value is 1.
  11758. </p>
  11759. </dd>
  11760. <dt><samp>dither_method</samp></dt>
  11761. <dd><p>Set dither method. Default value is 0.
  11762. </p>
  11763. <p>Supported values:
  11764. </p><dl compact="compact">
  11765. <dt>&lsquo;<samp>rectangular</samp>&rsquo;</dt>
  11766. <dd><p>select rectangular dither
  11767. </p></dd>
  11768. <dt>&lsquo;<samp>triangular</samp>&rsquo;</dt>
  11769. <dd><p>select triangular dither
  11770. </p></dd>
  11771. <dt>&lsquo;<samp>triangular_hp</samp>&rsquo;</dt>
  11772. <dd><p>select triangular dither with high pass
  11773. </p></dd>
  11774. <dt>&lsquo;<samp>lipshitz</samp>&rsquo;</dt>
  11775. <dd><p>select Lipshitz noise shaping dither.
  11776. </p></dd>
  11777. <dt>&lsquo;<samp>shibata</samp>&rsquo;</dt>
  11778. <dd><p>select Shibata noise shaping dither.
  11779. </p></dd>
  11780. <dt>&lsquo;<samp>low_shibata</samp>&rsquo;</dt>
  11781. <dd><p>select low Shibata noise shaping dither.
  11782. </p></dd>
  11783. <dt>&lsquo;<samp>high_shibata</samp>&rsquo;</dt>
  11784. <dd><p>select high Shibata noise shaping dither.
  11785. </p></dd>
  11786. <dt>&lsquo;<samp>f_weighted</samp>&rsquo;</dt>
  11787. <dd><p>select f-weighted noise shaping dither
  11788. </p></dd>
  11789. <dt>&lsquo;<samp>modified_e_weighted</samp>&rsquo;</dt>
  11790. <dd><p>select modified-e-weighted noise shaping dither
  11791. </p></dd>
  11792. <dt>&lsquo;<samp>improved_e_weighted</samp>&rsquo;</dt>
  11793. <dd><p>select improved-e-weighted noise shaping dither
  11794. </p>
  11795. </dd>
  11796. </dl>
  11797. </dd>
  11798. <dt><samp>resampler</samp></dt>
  11799. <dd><p>Set resampling engine. Default value is swr.
  11800. </p>
  11801. <p>Supported values:
  11802. </p><dl compact="compact">
  11803. <dt>&lsquo;<samp>swr</samp>&rsquo;</dt>
  11804. <dd><p>select the native SW Resampler; filter options precision and cheby are not
  11805. applicable in this case.
  11806. </p></dd>
  11807. <dt>&lsquo;<samp>soxr</samp>&rsquo;</dt>
  11808. <dd><p>select the SoX Resampler (where available); compensation, and filter options
  11809. filter_size, phase_shift, exact_rational, filter_type &amp; kaiser_beta, are not
  11810. applicable in this case.
  11811. </p></dd>
  11812. </dl>
  11813. </dd>
  11814. <dt><samp>filter_size</samp></dt>
  11815. <dd><p>For swr only, set resampling filter size, default value is 32.
  11816. </p>
  11817. </dd>
  11818. <dt><samp>phase_shift</samp></dt>
  11819. <dd><p>For swr only, set resampling phase shift, default value is 10, and must be in
  11820. the interval [0,30].
  11821. </p>
  11822. </dd>
  11823. <dt><samp>linear_interp</samp></dt>
  11824. <dd><p>Use linear interpolation when enabled (the default). Disable it if you want
  11825. to preserve speed instead of quality when exact_rational fails.
  11826. </p>
  11827. </dd>
  11828. <dt><samp>exact_rational</samp></dt>
  11829. <dd><p>For swr only, when enabled, try to use exact phase_count based on input and
  11830. output sample rate. However, if it is larger than <code>1 &lt;&lt; phase_shift</code>,
  11831. the phase_count will be <code>1 &lt;&lt; phase_shift</code> as fallback. Default is enabled.
  11832. </p>
  11833. </dd>
  11834. <dt><samp>cutoff</samp></dt>
  11835. <dd><p>Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
  11836. value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
  11837. (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
  11838. </p>
  11839. </dd>
  11840. <dt><samp>precision</samp></dt>
  11841. <dd><p>For soxr only, the precision in bits to which the resampled signal will be
  11842. calculated. The default value of 20 (which, with suitable dithering, is
  11843. appropriate for a destination bit-depth of 16) gives SoX&rsquo;s &rsquo;High Quality&rsquo;; a
  11844. value of 28 gives SoX&rsquo;s &rsquo;Very High Quality&rsquo;.
  11845. </p>
  11846. </dd>
  11847. <dt><samp>cheby</samp></dt>
  11848. <dd><p>For soxr only, selects passband rolloff none (Chebyshev) &amp; higher-precision
  11849. approximation for &rsquo;irrational&rsquo; ratios. Default value is 0.
  11850. </p>
  11851. </dd>
  11852. <dt><samp>async</samp></dt>
  11853. <dd><p>For swr only, simple 1 parameter audio sync to timestamps using stretching,
  11854. squeezing, filling and trimming. Setting this to 1 will enable filling and
  11855. trimming, larger values represent the maximum amount in samples that the data
  11856. may be stretched or squeezed for each second.
  11857. Default value is 0, thus no compensation is applied to make the samples match
  11858. the audio timestamps.
  11859. </p>
  11860. </dd>
  11861. <dt><samp>first_pts</samp></dt>
  11862. <dd><p>For swr only, assume the first pts should be this value. The time unit is 1 / sample rate.
  11863. This allows for padding/trimming at the start of stream. By default, no
  11864. assumption is made about the first frame&rsquo;s expected pts, so no padding or
  11865. trimming is done. For example, this could be set to 0 to pad the beginning with
  11866. silence if an audio stream starts after the video stream or to trim any samples
  11867. with a negative pts due to encoder delay.
  11868. </p>
  11869. </dd>
  11870. <dt><samp>min_comp</samp></dt>
  11871. <dd><p>For swr only, set the minimum difference between timestamps and audio data (in
  11872. seconds) to trigger stretching/squeezing/filling or trimming of the
  11873. data to make it match the timestamps. The default is that
  11874. stretching/squeezing/filling and trimming is disabled
  11875. (<samp>min_comp</samp> = <code>FLT_MAX</code>).
  11876. </p>
  11877. </dd>
  11878. <dt><samp>min_hard_comp</samp></dt>
  11879. <dd><p>For swr only, set the minimum difference between timestamps and audio data (in
  11880. seconds) to trigger adding/dropping samples to make it match the
  11881. timestamps. This option effectively is a threshold to select between
  11882. hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
  11883. all compensation is by default disabled through <samp>min_comp</samp>.
  11884. The default is 0.1.
  11885. </p>
  11886. </dd>
  11887. <dt><samp>comp_duration</samp></dt>
  11888. <dd><p>For swr only, set duration (in seconds) over which data is stretched/squeezed
  11889. to make it match the timestamps. Must be a non-negative double float value,
  11890. default value is 1.0.
  11891. </p>
  11892. </dd>
  11893. <dt><samp>max_soft_comp</samp></dt>
  11894. <dd><p>For swr only, set maximum factor by which data is stretched/squeezed to make it
  11895. match the timestamps. Must be a non-negative double float value, default value
  11896. is 0.
  11897. </p>
  11898. </dd>
  11899. <dt><samp>matrix_encoding</samp></dt>
  11900. <dd><p>Select matrixed stereo encoding.
  11901. </p>
  11902. <p>It accepts the following values:
  11903. </p><dl compact="compact">
  11904. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  11905. <dd><p>select none
  11906. </p></dd>
  11907. <dt>&lsquo;<samp>dolby</samp>&rsquo;</dt>
  11908. <dd><p>select Dolby
  11909. </p></dd>
  11910. <dt>&lsquo;<samp>dplii</samp>&rsquo;</dt>
  11911. <dd><p>select Dolby Pro Logic II
  11912. </p></dd>
  11913. </dl>
  11914. <p>Default value is <code>none</code>.
  11915. </p>
  11916. </dd>
  11917. <dt><samp>filter_type</samp></dt>
  11918. <dd><p>For swr only, select resampling filter type. This only affects resampling
  11919. operations.
  11920. </p>
  11921. <p>It accepts the following values:
  11922. </p><dl compact="compact">
  11923. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  11924. <dd><p>select cubic
  11925. </p></dd>
  11926. <dt>&lsquo;<samp>blackman_nuttall</samp>&rsquo;</dt>
  11927. <dd><p>select Blackman Nuttall windowed sinc
  11928. </p></dd>
  11929. <dt>&lsquo;<samp>kaiser</samp>&rsquo;</dt>
  11930. <dd><p>select Kaiser windowed sinc
  11931. </p></dd>
  11932. </dl>
  11933. </dd>
  11934. <dt><samp>kaiser_beta</samp></dt>
  11935. <dd><p>For swr only, set Kaiser window beta value. Must be a double float value in the
  11936. interval [2,16], default value is 9.
  11937. </p>
  11938. </dd>
  11939. <dt><samp>output_sample_bits</samp></dt>
  11940. <dd><p>For swr only, set number of used output sample bits for dithering. Must be an integer in the
  11941. interval [0,64], default value is 0, which means it&rsquo;s not used.
  11942. </p>
  11943. </dd>
  11944. </dl>
  11945. <span id="scaler_005foptions"></span><a name="Scaler-Options"></a>
  11946. <h2 class="chapter">22 Scaler Options<span class="pull-right"><a class="anchor hidden-xs" href="#Scaler-Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Scaler-Options" aria-hidden="true">TOC</a></span></h2>
  11947. <p>The video scaler supports the following named options.
  11948. </p>
  11949. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  11950. FFmpeg tools, with a few API-only exceptions noted below.
  11951. For programmatic use, they can be set explicitly in the
  11952. <code>SwsContext</code> options or through the <samp>libavutil/opt.h</samp> API.
  11953. </p>
  11954. <dl compact="compact">
  11955. <dd>
  11956. <span id="sws_005fflags"></span></dd>
  11957. <dt><samp>sws_flags</samp></dt>
  11958. <dd><p>Set the scaler flags. This is also used to set the scaling
  11959. algorithm. Only a single algorithm should be selected. Default
  11960. value is &lsquo;<samp>bicubic</samp>&rsquo;.
  11961. </p>
  11962. <p>It accepts the following values:
  11963. </p><dl compact="compact">
  11964. <dt>&lsquo;<samp>fast_bilinear</samp>&rsquo;</dt>
  11965. <dd><p>Select fast bilinear scaling algorithm.
  11966. </p>
  11967. </dd>
  11968. <dt>&lsquo;<samp>bilinear</samp>&rsquo;</dt>
  11969. <dd><p>Select bilinear scaling algorithm.
  11970. </p>
  11971. </dd>
  11972. <dt>&lsquo;<samp>bicubic</samp>&rsquo;</dt>
  11973. <dd><p>Select bicubic scaling algorithm.
  11974. </p>
  11975. </dd>
  11976. <dt>&lsquo;<samp>experimental</samp>&rsquo;</dt>
  11977. <dd><p>Select experimental scaling algorithm.
  11978. </p>
  11979. </dd>
  11980. <dt>&lsquo;<samp>neighbor</samp>&rsquo;</dt>
  11981. <dd><p>Select nearest neighbor rescaling algorithm.
  11982. </p>
  11983. </dd>
  11984. <dt>&lsquo;<samp>area</samp>&rsquo;</dt>
  11985. <dd><p>Select averaging area rescaling algorithm.
  11986. </p>
  11987. </dd>
  11988. <dt>&lsquo;<samp>bicublin</samp>&rsquo;</dt>
  11989. <dd><p>Select bicubic scaling algorithm for the luma component, bilinear for
  11990. chroma components.
  11991. </p>
  11992. </dd>
  11993. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  11994. <dd><p>Select Gaussian rescaling algorithm.
  11995. </p>
  11996. </dd>
  11997. <dt>&lsquo;<samp>sinc</samp>&rsquo;</dt>
  11998. <dd><p>Select sinc rescaling algorithm.
  11999. </p>
  12000. </dd>
  12001. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  12002. <dd><p>Select Lanczos rescaling algorithm. The default width (alpha) is 3 and can be
  12003. changed by setting <code>param0</code>.
  12004. </p>
  12005. </dd>
  12006. <dt>&lsquo;<samp>spline</samp>&rsquo;</dt>
  12007. <dd><p>Select natural bicubic spline rescaling algorithm.
  12008. </p>
  12009. </dd>
  12010. <dt>&lsquo;<samp>print_info</samp>&rsquo;</dt>
  12011. <dd><p>Enable printing/debug logging.
  12012. </p>
  12013. </dd>
  12014. <dt>&lsquo;<samp>accurate_rnd</samp>&rsquo;</dt>
  12015. <dd><p>Enable accurate rounding.
  12016. </p>
  12017. </dd>
  12018. <dt>&lsquo;<samp>full_chroma_int</samp>&rsquo;</dt>
  12019. <dd><p>Enable full chroma interpolation.
  12020. </p>
  12021. </dd>
  12022. <dt>&lsquo;<samp>full_chroma_inp</samp>&rsquo;</dt>
  12023. <dd><p>Select full chroma input.
  12024. </p>
  12025. </dd>
  12026. <dt>&lsquo;<samp>bitexact</samp>&rsquo;</dt>
  12027. <dd><p>Enable bitexact output.
  12028. </p></dd>
  12029. </dl>
  12030. </dd>
  12031. <dt><samp>srcw <var>(API only)</var></samp></dt>
  12032. <dd><p>Set source width.
  12033. </p>
  12034. </dd>
  12035. <dt><samp>srch <var>(API only)</var></samp></dt>
  12036. <dd><p>Set source height.
  12037. </p>
  12038. </dd>
  12039. <dt><samp>dstw <var>(API only)</var></samp></dt>
  12040. <dd><p>Set destination width.
  12041. </p>
  12042. </dd>
  12043. <dt><samp>dsth <var>(API only)</var></samp></dt>
  12044. <dd><p>Set destination height.
  12045. </p>
  12046. </dd>
  12047. <dt><samp>src_format <var>(API only)</var></samp></dt>
  12048. <dd><p>Set source pixel format (must be expressed as an integer).
  12049. </p>
  12050. </dd>
  12051. <dt><samp>dst_format <var>(API only)</var></samp></dt>
  12052. <dd><p>Set destination pixel format (must be expressed as an integer).
  12053. </p>
  12054. </dd>
  12055. <dt><samp>src_range <var>(boolean)</var></samp></dt>
  12056. <dd><p>If value is set to <code>1</code>, indicates source is full range. Default value is
  12057. <code>0</code>, which indicates source is limited range.
  12058. </p>
  12059. </dd>
  12060. <dt><samp>dst_range <var>(boolean)</var></samp></dt>
  12061. <dd><p>If value is set to <code>1</code>, enable full range for destination. Default value
  12062. is <code>0</code>, which enables limited range.
  12063. </p>
  12064. <span id="sws_005fparams"></span></dd>
  12065. <dt><samp>param0, param1</samp></dt>
  12066. <dd><p>Set scaling algorithm parameters. The specified values are specific of
  12067. some scaling algorithms and ignored by others. The specified values
  12068. are floating point number values.
  12069. </p>
  12070. </dd>
  12071. <dt><samp>sws_dither</samp></dt>
  12072. <dd><p>Set the dithering algorithm. Accepts one of the following
  12073. values. Default value is &lsquo;<samp>auto</samp>&rsquo;.
  12074. </p>
  12075. <dl compact="compact">
  12076. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  12077. <dd><p>automatic choice
  12078. </p>
  12079. </dd>
  12080. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  12081. <dd><p>no dithering
  12082. </p>
  12083. </dd>
  12084. <dt>&lsquo;<samp>bayer</samp>&rsquo;</dt>
  12085. <dd><p>bayer dither
  12086. </p>
  12087. </dd>
  12088. <dt>&lsquo;<samp>ed</samp>&rsquo;</dt>
  12089. <dd><p>error diffusion dither
  12090. </p>
  12091. </dd>
  12092. <dt>&lsquo;<samp>a_dither</samp>&rsquo;</dt>
  12093. <dd><p>arithmetic dither, based using addition
  12094. </p>
  12095. </dd>
  12096. <dt>&lsquo;<samp>x_dither</samp>&rsquo;</dt>
  12097. <dd><p>arithmetic dither, based using xor (more random/less apparent patterning that
  12098. a_dither).
  12099. </p>
  12100. </dd>
  12101. </dl>
  12102. </dd>
  12103. <dt><samp>alphablend</samp></dt>
  12104. <dd><p>Set the alpha blending to use when the input has alpha but the output does not.
  12105. Default value is &lsquo;<samp>none</samp>&rsquo;.
  12106. </p>
  12107. <dl compact="compact">
  12108. <dt>&lsquo;<samp>uniform_color</samp>&rsquo;</dt>
  12109. <dd><p>Blend onto a uniform background color
  12110. </p>
  12111. </dd>
  12112. <dt>&lsquo;<samp>checkerboard</samp>&rsquo;</dt>
  12113. <dd><p>Blend onto a checkerboard
  12114. </p>
  12115. </dd>
  12116. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  12117. <dd><p>No blending
  12118. </p>
  12119. </dd>
  12120. </dl>
  12121. </dd>
  12122. </dl>
  12123. <a name="Filtering-Introduction"></a>
  12124. <h2 class="chapter">23 Filtering Introduction<span class="pull-right"><a class="anchor hidden-xs" href="#Filtering-Introduction" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Filtering-Introduction" aria-hidden="true">TOC</a></span></h2>
  12125. <p>Filtering in FFmpeg is enabled through the libavfilter library.
  12126. </p>
  12127. <p>In libavfilter, a filter can have multiple inputs and multiple
  12128. outputs.
  12129. To illustrate the sorts of things that are possible, we consider the
  12130. following filtergraph.
  12131. </p>
  12132. <pre class="verbatim"> [main]
  12133. input --&gt; split ---------------------&gt; overlay --&gt; output
  12134. | ^
  12135. |[tmp] [flip]|
  12136. +-----&gt; crop --&gt; vflip -------+
  12137. </pre>
  12138. <p>This filtergraph splits the input stream in two streams, then sends one
  12139. stream through the crop filter and the vflip filter, before merging it
  12140. back with the other stream by overlaying it on top. You can use the
  12141. following command to achieve this:
  12142. </p>
  12143. <div class="example">
  12144. <pre class="example">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
  12145. </pre></div>
  12146. <p>The result will be that the top half of the video is mirrored
  12147. onto the bottom half of the output video.
  12148. </p>
  12149. <p>Filters in the same linear chain are separated by commas, and distinct
  12150. linear chains of filters are separated by semicolons. In our example,
  12151. <var>crop,vflip</var> are in one linear chain, <var>split</var> and
  12152. <var>overlay</var> are separately in another. The points where the linear
  12153. chains join are labelled by names enclosed in square brackets. In the
  12154. example, the split filter generates two outputs that are associated to
  12155. the labels <var>[main]</var> and <var>[tmp]</var>.
  12156. </p>
  12157. <p>The stream sent to the second output of <var>split</var>, labelled as
  12158. <var>[tmp]</var>, is processed through the <var>crop</var> filter, which crops
  12159. away the lower half part of the video, and then vertically flipped. The
  12160. <var>overlay</var> filter takes in input the first unchanged output of the
  12161. split filter (which was labelled as <var>[main]</var>), and overlay on its
  12162. lower half the output generated by the <var>crop,vflip</var> filterchain.
  12163. </p>
  12164. <p>Some filters take in input a list of parameters: they are specified
  12165. after the filter name and an equal sign, and are separated from each other
  12166. by a colon.
  12167. </p>
  12168. <p>There exist so-called <var>source filters</var> that do not have an
  12169. audio/video input, and <var>sink filters</var> that will not have audio/video
  12170. output.
  12171. </p>
  12172. <a name="graph2dot"></a>
  12173. <h2 class="chapter">24 graph2dot<span class="pull-right"><a class="anchor hidden-xs" href="#graph2dot" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-graph2dot" aria-hidden="true">TOC</a></span></h2>
  12174. <p>The <samp>graph2dot</samp> program included in the FFmpeg <samp>tools</samp>
  12175. directory can be used to parse a filtergraph description and issue a
  12176. corresponding textual representation in the dot language.
  12177. </p>
  12178. <p>Invoke the command:
  12179. </p><div class="example">
  12180. <pre class="example">graph2dot -h
  12181. </pre></div>
  12182. <p>to see how to use <samp>graph2dot</samp>.
  12183. </p>
  12184. <p>You can then pass the dot description to the <samp>dot</samp> program (from
  12185. the graphviz suite of programs) and obtain a graphical representation
  12186. of the filtergraph.
  12187. </p>
  12188. <p>For example the sequence of commands:
  12189. </p><div class="example">
  12190. <pre class="example">echo <var>GRAPH_DESCRIPTION</var> | \
  12191. tools/graph2dot -o graph.tmp &amp;&amp; \
  12192. dot -Tpng graph.tmp -o graph.png &amp;&amp; \
  12193. display graph.png
  12194. </pre></div>
  12195. <p>can be used to create and display an image representing the graph
  12196. described by the <var>GRAPH_DESCRIPTION</var> string. Note that this string must be
  12197. a complete self-contained graph, with its inputs and outputs explicitly defined.
  12198. For example if your command line is of the form:
  12199. </p><div class="example">
  12200. <pre class="example">ffmpeg -i infile -vf scale=640:360 outfile
  12201. </pre></div>
  12202. <p>your <var>GRAPH_DESCRIPTION</var> string will need to be of the form:
  12203. </p><div class="example">
  12204. <pre class="example">nullsrc,scale=640:360,nullsink
  12205. </pre></div>
  12206. <p>you may also need to set the <var>nullsrc</var> parameters and add a <var>format</var>
  12207. filter in order to simulate a specific input file.
  12208. </p>
  12209. <a name="Filtergraph-description"></a>
  12210. <h2 class="chapter">25 Filtergraph description<span class="pull-right"><a class="anchor hidden-xs" href="#Filtergraph-description" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Filtergraph-description" aria-hidden="true">TOC</a></span></h2>
  12211. <p>A filtergraph is a directed graph of connected filters. It can contain
  12212. cycles, and there can be multiple links between a pair of
  12213. filters. Each link has one input pad on one side connecting it to one
  12214. filter from which it takes its input, and one output pad on the other
  12215. side connecting it to one filter accepting its output.
  12216. </p>
  12217. <p>Each filter in a filtergraph is an instance of a filter class
  12218. registered in the application, which defines the features and the
  12219. number of input and output pads of the filter.
  12220. </p>
  12221. <p>A filter with no input pads is called a &quot;source&quot;, and a filter with no
  12222. output pads is called a &quot;sink&quot;.
  12223. </p>
  12224. <span id="Filtergraph-syntax"></span><a name="Filtergraph-syntax-1"></a>
  12225. <h3 class="section">25.1 Filtergraph syntax<span class="pull-right"><a class="anchor hidden-xs" href="#Filtergraph-syntax-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Filtergraph-syntax-1" aria-hidden="true">TOC</a></span></h3>
  12226. <p>A filtergraph has a textual representation, which is recognized by the
  12227. <samp>-filter</samp>/<samp>-vf</samp>/<samp>-af</samp> and
  12228. <samp>-filter_complex</samp> options in <code>ffmpeg</code> and
  12229. <samp>-vf</samp>/<samp>-af</samp> in <code>ffplay</code>, and by the
  12230. <code>avfilter_graph_parse_ptr()</code> function defined in
  12231. <samp>libavfilter/avfilter.h</samp>.
  12232. </p>
  12233. <p>A filterchain consists of a sequence of connected filters, each one
  12234. connected to the previous one in the sequence. A filterchain is
  12235. represented by a list of &quot;,&quot;-separated filter descriptions.
  12236. </p>
  12237. <p>A filtergraph consists of a sequence of filterchains. A sequence of
  12238. filterchains is represented by a list of &quot;;&quot;-separated filterchain
  12239. descriptions.
  12240. </p>
  12241. <p>A filter is represented by a string of the form:
  12242. [<var>in_link_1</var>]...[<var>in_link_N</var>]<var>filter_name</var>@<var>id</var>=<var>arguments</var>[<var>out_link_1</var>]...[<var>out_link_M</var>]
  12243. </p>
  12244. <p><var>filter_name</var> is the name of the filter class of which the
  12245. described filter is an instance of, and has to be the name of one of
  12246. the filter classes registered in the program optionally followed by &quot;@<var>id</var>&quot;.
  12247. The name of the filter class is optionally followed by a string
  12248. &quot;=<var>arguments</var>&quot;.
  12249. </p>
  12250. <p><var>arguments</var> is a string which contains the parameters used to
  12251. initialize the filter instance. It may have one of two forms:
  12252. </p><ul>
  12253. <li> A &rsquo;:&rsquo;-separated list of <var>key=value</var> pairs.
  12254. </li><li> A &rsquo;:&rsquo;-separated list of <var>value</var>. In this case, the keys are assumed to be
  12255. the option names in the order they are declared. E.g. the <code>fade</code> filter
  12256. declares three options in this order &ndash; <samp>type</samp>, <samp>start_frame</samp> and
  12257. <samp>nb_frames</samp>. Then the parameter list <var>in:0:30</var> means that the value
  12258. <var>in</var> is assigned to the option <samp>type</samp>, <var>0</var> to
  12259. <samp>start_frame</samp> and <var>30</var> to <samp>nb_frames</samp>.
  12260. </li><li> A &rsquo;:&rsquo;-separated list of mixed direct <var>value</var> and long <var>key=value</var>
  12261. pairs. The direct <var>value</var> must precede the <var>key=value</var> pairs, and
  12262. follow the same constraints order of the previous point. The following
  12263. <var>key=value</var> pairs can be set in any preferred order.
  12264. </li></ul>
  12265. <p>If the option value itself is a list of items (e.g. the <code>format</code> filter
  12266. takes a list of pixel formats), the items in the list are usually separated by
  12267. &lsquo;<samp>|</samp>&rsquo;.
  12268. </p>
  12269. <p>The list of arguments can be quoted using the character &lsquo;<samp>'</samp>&rsquo; as initial
  12270. and ending mark, and the character &lsquo;<samp>\</samp>&rsquo; for escaping the characters
  12271. within the quoted text; otherwise the argument string is considered
  12272. terminated when the next special character (belonging to the set
  12273. &lsquo;<samp>[]=;,</samp>&rsquo;) is encountered.
  12274. </p>
  12275. <p>The name and arguments of the filter are optionally preceded and
  12276. followed by a list of link labels.
  12277. A link label allows one to name a link and associate it to a filter output
  12278. or input pad. The preceding labels <var>in_link_1</var>
  12279. ... <var>in_link_N</var>, are associated to the filter input pads,
  12280. the following labels <var>out_link_1</var> ... <var>out_link_M</var>, are
  12281. associated to the output pads.
  12282. </p>
  12283. <p>When two link labels with the same name are found in the
  12284. filtergraph, a link between the corresponding input and output pad is
  12285. created.
  12286. </p>
  12287. <p>If an output pad is not labelled, it is linked by default to the first
  12288. unlabelled input pad of the next filter in the filterchain.
  12289. For example in the filterchain
  12290. </p><div class="example">
  12291. <pre class="example">nullsrc, split[L1], [L2]overlay, nullsink
  12292. </pre></div>
  12293. <p>the split filter instance has two output pads, and the overlay filter
  12294. instance two input pads. The first output pad of split is labelled
  12295. &quot;L1&quot;, the first input pad of overlay is labelled &quot;L2&quot;, and the second
  12296. output pad of split is linked to the second input pad of overlay,
  12297. which are both unlabelled.
  12298. </p>
  12299. <p>In a filter description, if the input label of the first filter is not
  12300. specified, &quot;in&quot; is assumed; if the output label of the last filter is not
  12301. specified, &quot;out&quot; is assumed.
  12302. </p>
  12303. <p>In a complete filterchain all the unlabelled filter input and output
  12304. pads must be connected. A filtergraph is considered valid if all the
  12305. filter input and output pads of all the filterchains are connected.
  12306. </p>
  12307. <p>Libavfilter will automatically insert <a href="#scale">scale</a> filters where format
  12308. conversion is required. It is possible to specify swscale flags
  12309. for those automatically inserted scalers by prepending
  12310. <code>sws_flags=<var>flags</var>;</code>
  12311. to the filtergraph description.
  12312. </p>
  12313. <p>Here is a BNF description of the filtergraph syntax:
  12314. </p><div class="example">
  12315. <pre class="example"><var>NAME</var> ::= sequence of alphanumeric characters and '_'
  12316. <var>FILTER_NAME</var> ::= <var>NAME</var>[&quot;@&quot;<var>NAME</var>]
  12317. <var>LINKLABEL</var> ::= &quot;[&quot; <var>NAME</var> &quot;]&quot;
  12318. <var>LINKLABELS</var> ::= <var>LINKLABEL</var> [<var>LINKLABELS</var>]
  12319. <var>FILTER_ARGUMENTS</var> ::= sequence of chars (possibly quoted)
  12320. <var>FILTER</var> ::= [<var>LINKLABELS</var>] <var>FILTER_NAME</var> [&quot;=&quot; <var>FILTER_ARGUMENTS</var>] [<var>LINKLABELS</var>]
  12321. <var>FILTERCHAIN</var> ::= <var>FILTER</var> [,<var>FILTERCHAIN</var>]
  12322. <var>FILTERGRAPH</var> ::= [sws_flags=<var>flags</var>;] <var>FILTERCHAIN</var> [;<var>FILTERGRAPH</var>]
  12323. </pre></div>
  12324. <span id="filtergraph-escaping"></span><a name="Notes-on-filtergraph-escaping"></a>
  12325. <h3 class="section">25.2 Notes on filtergraph escaping<span class="pull-right"><a class="anchor hidden-xs" href="#Notes-on-filtergraph-escaping" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Notes-on-filtergraph-escaping" aria-hidden="true">TOC</a></span></h3>
  12326. <p>Filtergraph description composition entails several levels of
  12327. escaping. See <a href="ffmpeg-utils.html#quoting_005fand_005fescaping">(ffmpeg-utils)the &quot;Quoting and escaping&quot;
  12328. section in the ffmpeg-utils(1) manual</a> for more
  12329. information about the employed escaping procedure.
  12330. </p>
  12331. <p>A first level escaping affects the content of each filter option
  12332. value, which may contain the special character <code>:</code> used to
  12333. separate values, or one of the escaping characters <code>\'</code>.
  12334. </p>
  12335. <p>A second level escaping affects the whole filter description, which
  12336. may contain the escaping characters <code>\'</code> or the special
  12337. characters <code>[],;</code> used by the filtergraph description.
  12338. </p>
  12339. <p>Finally, when you specify a filtergraph on a shell commandline, you
  12340. need to perform a third level escaping for the shell special
  12341. characters contained within it.
  12342. </p>
  12343. <p>For example, consider the following string to be embedded in
  12344. the <a href="#drawtext">drawtext</a> filter description <samp>text</samp> value:
  12345. </p><div class="example">
  12346. <pre class="example">this is a 'string': may contain one, or more, special characters
  12347. </pre></div>
  12348. <p>This string contains the <code>'</code> special escaping character, and the
  12349. <code>:</code> special character, so it needs to be escaped in this way:
  12350. </p><div class="example">
  12351. <pre class="example">text=this is a \'string\'\: may contain one, or more, special characters
  12352. </pre></div>
  12353. <p>A second level of escaping is required when embedding the filter
  12354. description in a filtergraph description, in order to escape all the
  12355. filtergraph special characters. Thus the example above becomes:
  12356. </p><div class="example">
  12357. <pre class="example">drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
  12358. </pre></div>
  12359. <p>(note that in addition to the <code>\'</code> escaping special characters,
  12360. also <code>,</code> needs to be escaped).
  12361. </p>
  12362. <p>Finally an additional level of escaping is needed when writing the
  12363. filtergraph description in a shell command, which depends on the
  12364. escaping rules of the adopted shell. For example, assuming that
  12365. <code>\</code> is special and needs to be escaped with another <code>\</code>, the
  12366. previous string will finally result in:
  12367. </p><div class="example">
  12368. <pre class="example">-vf &quot;drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters&quot;
  12369. </pre></div>
  12370. <a name="Timeline-editing"></a>
  12371. <h2 class="chapter">26 Timeline editing<span class="pull-right"><a class="anchor hidden-xs" href="#Timeline-editing" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Timeline-editing" aria-hidden="true">TOC</a></span></h2>
  12372. <p>Some filters support a generic <samp>enable</samp> option. For the filters
  12373. supporting timeline editing, this option can be set to an expression which is
  12374. evaluated before sending a frame to the filter. If the evaluation is non-zero,
  12375. the filter will be enabled, otherwise the frame will be sent unchanged to the
  12376. next filter in the filtergraph.
  12377. </p>
  12378. <p>The expression accepts the following values:
  12379. </p><dl compact="compact">
  12380. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  12381. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  12382. </p>
  12383. </dd>
  12384. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  12385. <dd><p>sequential number of the input frame, starting from 0
  12386. </p>
  12387. </dd>
  12388. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  12389. <dd><p>the position in the file of the input frame, NAN if unknown
  12390. </p>
  12391. </dd>
  12392. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  12393. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  12394. <dd><p>width and height of the input frame if video
  12395. </p></dd>
  12396. </dl>
  12397. <p>Additionally, these filters support an <samp>enable</samp> command that can be used
  12398. to re-define the expression.
  12399. </p>
  12400. <p>Like any other filtering option, the <samp>enable</samp> option follows the same
  12401. rules.
  12402. </p>
  12403. <p>For example, to enable a blur filter (<a href="#smartblur">smartblur</a>) from 10 seconds to 3
  12404. minutes, and a <a href="#curves">curves</a> filter starting at 3 seconds:
  12405. </p><div class="example">
  12406. <pre class="example">smartblur = enable='between(t,10,3*60)',
  12407. curves = enable='gte(t,3)' : preset=cross_process
  12408. </pre></div>
  12409. <p>See <code>ffmpeg -filters</code> to view which filters have timeline support.
  12410. </p>
  12411. <span id="commands"></span><a name="Changing-options-at-runtime-with-a-command"></a>
  12412. <h2 class="chapter">27 Changing options at runtime with a command<span class="pull-right"><a class="anchor hidden-xs" href="#Changing-options-at-runtime-with-a-command" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Changing-options-at-runtime-with-a-command" aria-hidden="true">TOC</a></span></h2>
  12413. <p>Some options can be changed during the operation of the filter using
  12414. a command. These options are marked &rsquo;T&rsquo; on the output of
  12415. <code>ffmpeg</code> <samp>-h filter=&lt;name of filter&gt;</samp>.
  12416. The name of the command is the name of the option and the argument is
  12417. the new value.
  12418. </p>
  12419. <span id="framesync"></span><a name="Options-for-filters-with-several-inputs-_0028framesync_0029"></a>
  12420. <h2 class="chapter">28 Options for filters with several inputs (framesync)<span class="pull-right"><a class="anchor hidden-xs" href="#Options-for-filters-with-several-inputs-_0028framesync_0029" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-for-filters-with-several-inputs-_0028framesync_0029" aria-hidden="true">TOC</a></span></h2>
  12421. <p>Some filters with several inputs support a common set of options.
  12422. These options can only be set by name, not with the short notation.
  12423. </p>
  12424. <dl compact="compact">
  12425. <dt><samp>eof_action</samp></dt>
  12426. <dd><p>The action to take when EOF is encountered on the secondary input; it accepts
  12427. one of the following values:
  12428. </p>
  12429. <dl compact="compact">
  12430. <dt><samp>repeat</samp></dt>
  12431. <dd><p>Repeat the last frame (the default).
  12432. </p></dd>
  12433. <dt><samp>endall</samp></dt>
  12434. <dd><p>End both streams.
  12435. </p></dd>
  12436. <dt><samp>pass</samp></dt>
  12437. <dd><p>Pass the main input through.
  12438. </p></dd>
  12439. </dl>
  12440. </dd>
  12441. <dt><samp>shortest</samp></dt>
  12442. <dd><p>If set to 1, force the output to terminate when the shortest input
  12443. terminates. Default value is 0.
  12444. </p>
  12445. </dd>
  12446. <dt><samp>repeatlast</samp></dt>
  12447. <dd><p>If set to 1, force the filter to extend the last frame of secondary streams
  12448. until the end of the primary stream. A value of 0 disables this behavior.
  12449. Default value is 1.
  12450. </p></dd>
  12451. </dl>
  12452. <a name="Audio-Filters"></a>
  12453. <h2 class="chapter">29 Audio Filters<span class="pull-right"><a class="anchor hidden-xs" href="#Audio-Filters" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Audio-Filters" aria-hidden="true">TOC</a></span></h2>
  12454. <p>When you configure your FFmpeg build, you can disable any of the
  12455. existing filters using <code>--disable-filters</code>.
  12456. The configure output will show the audio filters included in your
  12457. build.
  12458. </p>
  12459. <p>Below is a description of the currently available audio filters.
  12460. </p>
  12461. <a name="acompressor"></a>
  12462. <h3 class="section">29.1 acompressor<span class="pull-right"><a class="anchor hidden-xs" href="#acompressor" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-acompressor" aria-hidden="true">TOC</a></span></h3>
  12463. <p>A compressor is mainly used to reduce the dynamic range of a signal.
  12464. Especially modern music is mostly compressed at a high ratio to
  12465. improve the overall loudness. It&rsquo;s done to get the highest attention
  12466. of a listener, &quot;fatten&quot; the sound and bring more &quot;power&quot; to the track.
  12467. If a signal is compressed too much it may sound dull or &quot;dead&quot;
  12468. afterwards or it may start to &quot;pump&quot; (which could be a powerful effect
  12469. but can also destroy a track completely).
  12470. The right compression is the key to reach a professional sound and is
  12471. the high art of mixing and mastering. Because of its complex settings
  12472. it may take a long time to get the right feeling for this kind of effect.
  12473. </p>
  12474. <p>Compression is done by detecting the volume above a chosen level
  12475. <code>threshold</code> and dividing it by the factor set with <code>ratio</code>.
  12476. So if you set the threshold to -12dB and your signal reaches -6dB a ratio
  12477. of 2:1 will result in a signal at -9dB. Because an exact manipulation of
  12478. the signal would cause distortion of the waveform the reduction can be
  12479. levelled over the time. This is done by setting &quot;Attack&quot; and &quot;Release&quot;.
  12480. <code>attack</code> determines how long the signal has to rise above the threshold
  12481. before any reduction will occur and <code>release</code> sets the time the signal
  12482. has to fall below the threshold to reduce the reduction again. Shorter signals
  12483. than the chosen attack time will be left untouched.
  12484. The overall reduction of the signal can be made up afterwards with the
  12485. <code>makeup</code> setting. So compressing the peaks of a signal about 6dB and
  12486. raising the makeup to this level results in a signal twice as loud than the
  12487. source. To gain a softer entry in the compression the <code>knee</code> flattens the
  12488. hard edge at the threshold in the range of the chosen decibels.
  12489. </p>
  12490. <p>The filter accepts the following options:
  12491. </p>
  12492. <dl compact="compact">
  12493. <dt><samp>level_in</samp></dt>
  12494. <dd><p>Set input gain. Default is 1. Range is between 0.015625 and 64.
  12495. </p>
  12496. </dd>
  12497. <dt><samp>mode</samp></dt>
  12498. <dd><p>Set mode of compressor operation. Can be <code>upward</code> or <code>downward</code>.
  12499. Default is <code>downward</code>.
  12500. </p>
  12501. </dd>
  12502. <dt><samp>threshold</samp></dt>
  12503. <dd><p>If a signal of stream rises above this level it will affect the gain
  12504. reduction.
  12505. By default it is 0.125. Range is between 0.00097563 and 1.
  12506. </p>
  12507. </dd>
  12508. <dt><samp>ratio</samp></dt>
  12509. <dd><p>Set a ratio by which the signal is reduced. 1:2 means that if the level
  12510. rose 4dB above the threshold, it will be only 2dB above after the reduction.
  12511. Default is 2. Range is between 1 and 20.
  12512. </p>
  12513. </dd>
  12514. <dt><samp>attack</samp></dt>
  12515. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  12516. reduction starts. Default is 20. Range is between 0.01 and 2000.
  12517. </p>
  12518. </dd>
  12519. <dt><samp>release</samp></dt>
  12520. <dd><p>Amount of milliseconds the signal has to fall below the threshold before
  12521. reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
  12522. </p>
  12523. </dd>
  12524. <dt><samp>makeup</samp></dt>
  12525. <dd><p>Set the amount by how much signal will be amplified after processing.
  12526. Default is 1. Range is from 1 to 64.
  12527. </p>
  12528. </dd>
  12529. <dt><samp>knee</samp></dt>
  12530. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  12531. Default is 2.82843. Range is between 1 and 8.
  12532. </p>
  12533. </dd>
  12534. <dt><samp>link</samp></dt>
  12535. <dd><p>Choose if the <code>average</code> level between all channels of input stream
  12536. or the louder(<code>maximum</code>) channel of input stream affects the
  12537. reduction. Default is <code>average</code>.
  12538. </p>
  12539. </dd>
  12540. <dt><samp>detection</samp></dt>
  12541. <dd><p>Should the exact signal be taken in case of <code>peak</code> or an RMS one in case
  12542. of <code>rms</code>. Default is <code>rms</code> which is mostly smoother.
  12543. </p>
  12544. </dd>
  12545. <dt><samp>mix</samp></dt>
  12546. <dd><p>How much to use compressed signal in output. Default is 1.
  12547. Range is between 0 and 1.
  12548. </p></dd>
  12549. </dl>
  12550. <a name="Commands"></a>
  12551. <h4 class="subsection">29.1.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands" aria-hidden="true">TOC</a></span></h4>
  12552. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  12553. </p>
  12554. <a name="acontrast"></a>
  12555. <h3 class="section">29.2 acontrast<span class="pull-right"><a class="anchor hidden-xs" href="#acontrast" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-acontrast" aria-hidden="true">TOC</a></span></h3>
  12556. <p>Simple audio dynamic range compression/expansion filter.
  12557. </p>
  12558. <p>The filter accepts the following options:
  12559. </p>
  12560. <dl compact="compact">
  12561. <dt><samp>contrast</samp></dt>
  12562. <dd><p>Set contrast. Default is 33. Allowed range is between 0 and 100.
  12563. </p></dd>
  12564. </dl>
  12565. <a name="acopy"></a>
  12566. <h3 class="section">29.3 acopy<span class="pull-right"><a class="anchor hidden-xs" href="#acopy" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-acopy" aria-hidden="true">TOC</a></span></h3>
  12567. <p>Copy the input audio source unchanged to the output. This is mainly useful for
  12568. testing purposes.
  12569. </p>
  12570. <a name="acrossfade"></a>
  12571. <h3 class="section">29.4 acrossfade<span class="pull-right"><a class="anchor hidden-xs" href="#acrossfade" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-acrossfade" aria-hidden="true">TOC</a></span></h3>
  12572. <p>Apply cross fade from one input audio stream to another input audio stream.
  12573. The cross fade is applied for specified duration near the end of first stream.
  12574. </p>
  12575. <p>The filter accepts the following options:
  12576. </p>
  12577. <dl compact="compact">
  12578. <dt><samp>nb_samples, ns</samp></dt>
  12579. <dd><p>Specify the number of samples for which the cross fade effect has to last.
  12580. At the end of the cross fade effect the first input audio will be completely
  12581. silent. Default is 44100.
  12582. </p>
  12583. </dd>
  12584. <dt><samp>duration, d</samp></dt>
  12585. <dd><p>Specify the duration of the cross fade effect. See
  12586. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  12587. for the accepted syntax.
  12588. By default the duration is determined by <var>nb_samples</var>.
  12589. If set this option is used instead of <var>nb_samples</var>.
  12590. </p>
  12591. </dd>
  12592. <dt><samp>overlap, o</samp></dt>
  12593. <dd><p>Should first stream end overlap with second stream start. Default is enabled.
  12594. </p>
  12595. </dd>
  12596. <dt><samp>curve1</samp></dt>
  12597. <dd><p>Set curve for cross fade transition for first stream.
  12598. </p>
  12599. </dd>
  12600. <dt><samp>curve2</samp></dt>
  12601. <dd><p>Set curve for cross fade transition for second stream.
  12602. </p>
  12603. <p>For description of available curve types see <a href="#afade">afade</a> filter description.
  12604. </p></dd>
  12605. </dl>
  12606. <a name="Examples-14"></a>
  12607. <h4 class="subsection">29.4.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-14" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-14" aria-hidden="true">TOC</a></span></h4>
  12608. <ul>
  12609. <li> Cross fade from one input to another:
  12610. <div class="example">
  12611. <pre class="example">ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
  12612. </pre></div>
  12613. </li><li> Cross fade from one input to another but without overlapping:
  12614. <div class="example">
  12615. <pre class="example">ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
  12616. </pre></div>
  12617. </li></ul>
  12618. <a name="acrossover"></a>
  12619. <h3 class="section">29.5 acrossover<span class="pull-right"><a class="anchor hidden-xs" href="#acrossover" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-acrossover" aria-hidden="true">TOC</a></span></h3>
  12620. <p>Split audio stream into several bands.
  12621. </p>
  12622. <p>This filter splits audio stream into two or more frequency ranges.
  12623. Summing all streams back will give flat output.
  12624. </p>
  12625. <p>The filter accepts the following options:
  12626. </p>
  12627. <dl compact="compact">
  12628. <dt><samp>split</samp></dt>
  12629. <dd><p>Set split frequencies. Those must be positive and increasing.
  12630. </p>
  12631. </dd>
  12632. <dt><samp>order</samp></dt>
  12633. <dd><p>Set filter order for each band split. This controls filter roll-off or steepness
  12634. of filter transfer function.
  12635. Available values are:
  12636. </p>
  12637. <dl compact="compact">
  12638. <dt>&lsquo;<samp>2nd</samp>&rsquo;</dt>
  12639. <dd><p>12 dB per octave.
  12640. </p></dd>
  12641. <dt>&lsquo;<samp>4th</samp>&rsquo;</dt>
  12642. <dd><p>24 dB per octave.
  12643. </p></dd>
  12644. <dt>&lsquo;<samp>6th</samp>&rsquo;</dt>
  12645. <dd><p>36 dB per octave.
  12646. </p></dd>
  12647. <dt>&lsquo;<samp>8th</samp>&rsquo;</dt>
  12648. <dd><p>48 dB per octave.
  12649. </p></dd>
  12650. <dt>&lsquo;<samp>10th</samp>&rsquo;</dt>
  12651. <dd><p>60 dB per octave.
  12652. </p></dd>
  12653. <dt>&lsquo;<samp>12th</samp>&rsquo;</dt>
  12654. <dd><p>72 dB per octave.
  12655. </p></dd>
  12656. <dt>&lsquo;<samp>14th</samp>&rsquo;</dt>
  12657. <dd><p>84 dB per octave.
  12658. </p></dd>
  12659. <dt>&lsquo;<samp>16th</samp>&rsquo;</dt>
  12660. <dd><p>96 dB per octave.
  12661. </p></dd>
  12662. <dt>&lsquo;<samp>18th</samp>&rsquo;</dt>
  12663. <dd><p>108 dB per octave.
  12664. </p></dd>
  12665. <dt>&lsquo;<samp>20th</samp>&rsquo;</dt>
  12666. <dd><p>120 dB per octave.
  12667. </p></dd>
  12668. </dl>
  12669. <p>Default is <var>4th</var>.
  12670. </p>
  12671. </dd>
  12672. <dt><samp>level</samp></dt>
  12673. <dd><p>Set input gain level. Allowed range is from 0 to 1. Default value is 1.
  12674. </p>
  12675. </dd>
  12676. <dt><samp>gains</samp></dt>
  12677. <dd><p>Set output gain for each band. Default value is 1 for all bands.
  12678. </p></dd>
  12679. </dl>
  12680. <a name="Examples-15"></a>
  12681. <h4 class="subsection">29.5.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-15" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-15" aria-hidden="true">TOC</a></span></h4>
  12682. <ul>
  12683. <li> Split input audio stream into two bands (low and high) with split frequency of 1500 Hz,
  12684. each band will be in separate stream:
  12685. <div class="example">
  12686. <pre class="example">ffmpeg -i in.flac -filter_complex 'acrossover=split=1500[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
  12687. </pre></div>
  12688. </li><li> Same as above, but with higher filter order:
  12689. <div class="example">
  12690. <pre class="example">ffmpeg -i in.flac -filter_complex 'acrossover=split=1500:order=8th[LOW][HIGH]' -map '[LOW]' low.wav -map '[HIGH]' high.wav
  12691. </pre></div>
  12692. </li><li> Same as above, but also with additional middle band (frequencies between 1500 and 8000):
  12693. <div class="example">
  12694. <pre class="example">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
  12695. </pre></div>
  12696. </li></ul>
  12697. <a name="acrusher"></a>
  12698. <h3 class="section">29.6 acrusher<span class="pull-right"><a class="anchor hidden-xs" href="#acrusher" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-acrusher" aria-hidden="true">TOC</a></span></h3>
  12699. <p>Reduce audio bit resolution.
  12700. </p>
  12701. <p>This filter is bit crusher with enhanced functionality. A bit crusher
  12702. is used to audibly reduce number of bits an audio signal is sampled
  12703. with. This doesn&rsquo;t change the bit depth at all, it just produces the
  12704. effect. Material reduced in bit depth sounds more harsh and &quot;digital&quot;.
  12705. This filter is able to even round to continuous values instead of discrete
  12706. bit depths.
  12707. Additionally it has a D/C offset which results in different crushing of
  12708. the lower and the upper half of the signal.
  12709. An Anti-Aliasing setting is able to produce &quot;softer&quot; crushing sounds.
  12710. </p>
  12711. <p>Another feature of this filter is the logarithmic mode.
  12712. This setting switches from linear distances between bits to logarithmic ones.
  12713. The result is a much more &quot;natural&quot; sounding crusher which doesn&rsquo;t gate low
  12714. signals for example. The human ear has a logarithmic perception,
  12715. so this kind of crushing is much more pleasant.
  12716. Logarithmic crushing is also able to get anti-aliased.
  12717. </p>
  12718. <p>The filter accepts the following options:
  12719. </p>
  12720. <dl compact="compact">
  12721. <dt><samp>level_in</samp></dt>
  12722. <dd><p>Set level in.
  12723. </p>
  12724. </dd>
  12725. <dt><samp>level_out</samp></dt>
  12726. <dd><p>Set level out.
  12727. </p>
  12728. </dd>
  12729. <dt><samp>bits</samp></dt>
  12730. <dd><p>Set bit reduction.
  12731. </p>
  12732. </dd>
  12733. <dt><samp>mix</samp></dt>
  12734. <dd><p>Set mixing amount.
  12735. </p>
  12736. </dd>
  12737. <dt><samp>mode</samp></dt>
  12738. <dd><p>Can be linear: <code>lin</code> or logarithmic: <code>log</code>.
  12739. </p>
  12740. </dd>
  12741. <dt><samp>dc</samp></dt>
  12742. <dd><p>Set DC.
  12743. </p>
  12744. </dd>
  12745. <dt><samp>aa</samp></dt>
  12746. <dd><p>Set anti-aliasing.
  12747. </p>
  12748. </dd>
  12749. <dt><samp>samples</samp></dt>
  12750. <dd><p>Set sample reduction.
  12751. </p>
  12752. </dd>
  12753. <dt><samp>lfo</samp></dt>
  12754. <dd><p>Enable LFO. By default disabled.
  12755. </p>
  12756. </dd>
  12757. <dt><samp>lforange</samp></dt>
  12758. <dd><p>Set LFO range.
  12759. </p>
  12760. </dd>
  12761. <dt><samp>lforate</samp></dt>
  12762. <dd><p>Set LFO rate.
  12763. </p></dd>
  12764. </dl>
  12765. <a name="Commands-1"></a>
  12766. <h4 class="subsection">29.6.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-1" aria-hidden="true">TOC</a></span></h4>
  12767. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  12768. </p>
  12769. <a name="acue"></a>
  12770. <h3 class="section">29.7 acue<span class="pull-right"><a class="anchor hidden-xs" href="#acue" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-acue" aria-hidden="true">TOC</a></span></h3>
  12771. <p>Delay audio filtering until a given wallclock timestamp. See the <a href="#cue">cue</a>
  12772. filter.
  12773. </p>
  12774. <a name="adeclick"></a>
  12775. <h3 class="section">29.8 adeclick<span class="pull-right"><a class="anchor hidden-xs" href="#adeclick" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-adeclick" aria-hidden="true">TOC</a></span></h3>
  12776. <p>Remove impulsive noise from input audio.
  12777. </p>
  12778. <p>Samples detected as impulsive noise are replaced by interpolated samples using
  12779. autoregressive modelling.
  12780. </p>
  12781. <dl compact="compact">
  12782. <dt><samp>window, w</samp></dt>
  12783. <dd><p>Set window size, in milliseconds. Allowed range is from <code>10</code> to
  12784. <code>100</code>. Default value is <code>55</code> milliseconds.
  12785. This sets size of window which will be processed at once.
  12786. </p>
  12787. </dd>
  12788. <dt><samp>overlap, o</samp></dt>
  12789. <dd><p>Set window overlap, in percentage of window size. Allowed range is from
  12790. <code>50</code> to <code>95</code>. Default value is <code>75</code> percent.
  12791. Setting this to a very high value increases impulsive noise removal but makes
  12792. whole process much slower.
  12793. </p>
  12794. </dd>
  12795. <dt><samp>arorder, a</samp></dt>
  12796. <dd><p>Set autoregression order, in percentage of window size. Allowed range is from
  12797. <code>0</code> to <code>25</code>. Default value is <code>2</code> percent. This option also
  12798. controls quality of interpolated samples using neighbour good samples.
  12799. </p>
  12800. </dd>
  12801. <dt><samp>threshold, t</samp></dt>
  12802. <dd><p>Set threshold value. Allowed range is from <code>1</code> to <code>100</code>.
  12803. Default value is <code>2</code>.
  12804. This controls the strength of impulsive noise which is going to be removed.
  12805. The lower value, the more samples will be detected as impulsive noise.
  12806. </p>
  12807. </dd>
  12808. <dt><samp>burst, b</samp></dt>
  12809. <dd><p>Set burst fusion, in percentage of window size. Allowed range is <code>0</code> to
  12810. <code>10</code>. Default value is <code>2</code>.
  12811. If any two samples detected as noise are spaced less than this value then any
  12812. sample between those two samples will be also detected as noise.
  12813. </p>
  12814. </dd>
  12815. <dt><samp>method, m</samp></dt>
  12816. <dd><p>Set overlap method.
  12817. </p>
  12818. <p>It accepts the following values:
  12819. </p><dl compact="compact">
  12820. <dt><samp>add, a</samp></dt>
  12821. <dd><p>Select overlap-add method. Even not interpolated samples are slightly
  12822. changed with this method.
  12823. </p>
  12824. </dd>
  12825. <dt><samp>save, s</samp></dt>
  12826. <dd><p>Select overlap-save method. Not interpolated samples remain unchanged.
  12827. </p></dd>
  12828. </dl>
  12829. <p>Default value is <code>a</code>.
  12830. </p></dd>
  12831. </dl>
  12832. <a name="adeclip"></a>
  12833. <h3 class="section">29.9 adeclip<span class="pull-right"><a class="anchor hidden-xs" href="#adeclip" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-adeclip" aria-hidden="true">TOC</a></span></h3>
  12834. <p>Remove clipped samples from input audio.
  12835. </p>
  12836. <p>Samples detected as clipped are replaced by interpolated samples using
  12837. autoregressive modelling.
  12838. </p>
  12839. <dl compact="compact">
  12840. <dt><samp>window, w</samp></dt>
  12841. <dd><p>Set window size, in milliseconds. Allowed range is from <code>10</code> to <code>100</code>.
  12842. Default value is <code>55</code> milliseconds.
  12843. This sets size of window which will be processed at once.
  12844. </p>
  12845. </dd>
  12846. <dt><samp>overlap, o</samp></dt>
  12847. <dd><p>Set window overlap, in percentage of window size. Allowed range is from <code>50</code>
  12848. to <code>95</code>. Default value is <code>75</code> percent.
  12849. </p>
  12850. </dd>
  12851. <dt><samp>arorder, a</samp></dt>
  12852. <dd><p>Set autoregression order, in percentage of window size. Allowed range is from
  12853. <code>0</code> to <code>25</code>. Default value is <code>8</code> percent. This option also controls
  12854. quality of interpolated samples using neighbour good samples.
  12855. </p>
  12856. </dd>
  12857. <dt><samp>threshold, t</samp></dt>
  12858. <dd><p>Set threshold value. Allowed range is from <code>1</code> to <code>100</code>.
  12859. Default value is <code>10</code>. Higher values make clip detection less aggressive.
  12860. </p>
  12861. </dd>
  12862. <dt><samp>hsize, n</samp></dt>
  12863. <dd><p>Set size of histogram used to detect clips. Allowed range is from <code>100</code> to <code>9999</code>.
  12864. Default value is <code>1000</code>. Higher values make clip detection less aggressive.
  12865. </p>
  12866. </dd>
  12867. <dt><samp>method, m</samp></dt>
  12868. <dd><p>Set overlap method.
  12869. </p>
  12870. <p>It accepts the following values:
  12871. </p><dl compact="compact">
  12872. <dt><samp>add, a</samp></dt>
  12873. <dd><p>Select overlap-add method. Even not interpolated samples are slightly changed
  12874. with this method.
  12875. </p>
  12876. </dd>
  12877. <dt><samp>save, s</samp></dt>
  12878. <dd><p>Select overlap-save method. Not interpolated samples remain unchanged.
  12879. </p></dd>
  12880. </dl>
  12881. <p>Default value is <code>a</code>.
  12882. </p></dd>
  12883. </dl>
  12884. <a name="adelay"></a>
  12885. <h3 class="section">29.10 adelay<span class="pull-right"><a class="anchor hidden-xs" href="#adelay" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-adelay" aria-hidden="true">TOC</a></span></h3>
  12886. <p>Delay one or more audio channels.
  12887. </p>
  12888. <p>Samples in delayed channel are filled with silence.
  12889. </p>
  12890. <p>The filter accepts the following option:
  12891. </p>
  12892. <dl compact="compact">
  12893. <dt><samp>delays</samp></dt>
  12894. <dd><p>Set list of delays in milliseconds for each channel separated by &rsquo;|&rsquo;.
  12895. Unused delays will be silently ignored. If number of given delays is
  12896. smaller than number of channels all remaining channels will not be delayed.
  12897. If you want to delay exact number of samples, append &rsquo;S&rsquo; to number.
  12898. If you want instead to delay in seconds, append &rsquo;s&rsquo; to number.
  12899. </p>
  12900. </dd>
  12901. <dt><samp>all</samp></dt>
  12902. <dd><p>Use last set delay for all remaining channels. By default is disabled.
  12903. This option if enabled changes how option <code>delays</code> is interpreted.
  12904. </p></dd>
  12905. </dl>
  12906. <a name="Examples-16"></a>
  12907. <h4 class="subsection">29.10.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-16" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-16" aria-hidden="true">TOC</a></span></h4>
  12908. <ul>
  12909. <li> Delay first channel by 1.5 seconds, the third channel by 0.5 seconds and leave
  12910. the second channel (and any other channels that may be present) unchanged.
  12911. <div class="example">
  12912. <pre class="example">adelay=1500|0|500
  12913. </pre></div>
  12914. </li><li> Delay second channel by 500 samples, the third channel by 700 samples and leave
  12915. the first channel (and any other channels that may be present) unchanged.
  12916. <div class="example">
  12917. <pre class="example">adelay=0|500S|700S
  12918. </pre></div>
  12919. </li><li> Delay all channels by same number of samples:
  12920. <div class="example">
  12921. <pre class="example">adelay=delays=64S:all=1
  12922. </pre></div>
  12923. </li></ul>
  12924. <a name="adenorm"></a>
  12925. <h3 class="section">29.11 adenorm<span class="pull-right"><a class="anchor hidden-xs" href="#adenorm" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-adenorm" aria-hidden="true">TOC</a></span></h3>
  12926. <p>Remedy denormals in audio by adding extremely low-level noise.
  12927. </p>
  12928. <p>This filter shall be placed before any filter that can produce denormals.
  12929. </p>
  12930. <p>A description of the accepted parameters follows.
  12931. </p>
  12932. <dl compact="compact">
  12933. <dt><samp>level</samp></dt>
  12934. <dd><p>Set level of added noise in dB. Default is <code>-351</code>.
  12935. Allowed range is from -451 to -90.
  12936. </p>
  12937. </dd>
  12938. <dt><samp>type</samp></dt>
  12939. <dd><p>Set type of added noise.
  12940. </p>
  12941. <dl compact="compact">
  12942. <dt><samp>dc</samp></dt>
  12943. <dd><p>Add DC signal.
  12944. </p></dd>
  12945. <dt><samp>ac</samp></dt>
  12946. <dd><p>Add AC signal.
  12947. </p></dd>
  12948. <dt><samp>square</samp></dt>
  12949. <dd><p>Add square signal.
  12950. </p></dd>
  12951. <dt><samp>pulse</samp></dt>
  12952. <dd><p>Add pulse signal.
  12953. </p></dd>
  12954. </dl>
  12955. <p>Default is <code>dc</code>.
  12956. </p></dd>
  12957. </dl>
  12958. <a name="Commands-2"></a>
  12959. <h4 class="subsection">29.11.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-2" aria-hidden="true">TOC</a></span></h4>
  12960. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  12961. </p>
  12962. <a name="aderivative_002c-aintegral"></a>
  12963. <h3 class="section">29.12 aderivative, aintegral<span class="pull-right"><a class="anchor hidden-xs" href="#aderivative_002c-aintegral" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aderivative_002c-aintegral" aria-hidden="true">TOC</a></span></h3>
  12964. <p>Compute derivative/integral of audio stream.
  12965. </p>
  12966. <p>Applying both filters one after another produces original audio.
  12967. </p>
  12968. <a name="aecho"></a>
  12969. <h3 class="section">29.13 aecho<span class="pull-right"><a class="anchor hidden-xs" href="#aecho" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aecho" aria-hidden="true">TOC</a></span></h3>
  12970. <p>Apply echoing to the input audio.
  12971. </p>
  12972. <p>Echoes are reflected sound and can occur naturally amongst mountains
  12973. (and sometimes large buildings) when talking or shouting; digital echo
  12974. effects emulate this behaviour and are often used to help fill out the
  12975. sound of a single instrument or vocal. The time difference between the
  12976. original signal and the reflection is the <code>delay</code>, and the
  12977. loudness of the reflected signal is the <code>decay</code>.
  12978. Multiple echoes can have different delays and decays.
  12979. </p>
  12980. <p>A description of the accepted parameters follows.
  12981. </p>
  12982. <dl compact="compact">
  12983. <dt><samp>in_gain</samp></dt>
  12984. <dd><p>Set input gain of reflected signal. Default is <code>0.6</code>.
  12985. </p>
  12986. </dd>
  12987. <dt><samp>out_gain</samp></dt>
  12988. <dd><p>Set output gain of reflected signal. Default is <code>0.3</code>.
  12989. </p>
  12990. </dd>
  12991. <dt><samp>delays</samp></dt>
  12992. <dd><p>Set list of time intervals in milliseconds between original signal and reflections
  12993. separated by &rsquo;|&rsquo;. Allowed range for each <code>delay</code> is <code>(0 - 90000.0]</code>.
  12994. Default is <code>1000</code>.
  12995. </p>
  12996. </dd>
  12997. <dt><samp>decays</samp></dt>
  12998. <dd><p>Set list of loudness of reflected signals separated by &rsquo;|&rsquo;.
  12999. Allowed range for each <code>decay</code> is <code>(0 - 1.0]</code>.
  13000. Default is <code>0.5</code>.
  13001. </p></dd>
  13002. </dl>
  13003. <a name="Examples-17"></a>
  13004. <h4 class="subsection">29.13.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-17" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-17" aria-hidden="true">TOC</a></span></h4>
  13005. <ul>
  13006. <li> Make it sound as if there are twice as many instruments as are actually playing:
  13007. <div class="example">
  13008. <pre class="example">aecho=0.8:0.88:60:0.4
  13009. </pre></div>
  13010. </li><li> If delay is very short, then it sounds like a (metallic) robot playing music:
  13011. <div class="example">
  13012. <pre class="example">aecho=0.8:0.88:6:0.4
  13013. </pre></div>
  13014. </li><li> A longer delay will sound like an open air concert in the mountains:
  13015. <div class="example">
  13016. <pre class="example">aecho=0.8:0.9:1000:0.3
  13017. </pre></div>
  13018. </li><li> Same as above but with one more mountain:
  13019. <div class="example">
  13020. <pre class="example">aecho=0.8:0.9:1000|1800:0.3|0.25
  13021. </pre></div>
  13022. </li></ul>
  13023. <a name="aemphasis"></a>
  13024. <h3 class="section">29.14 aemphasis<span class="pull-right"><a class="anchor hidden-xs" href="#aemphasis" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aemphasis" aria-hidden="true">TOC</a></span></h3>
  13025. <p>Audio emphasis filter creates or restores material directly taken from LPs or
  13026. emphased CDs with different filter curves. E.g. to store music on vinyl the
  13027. signal has to be altered by a filter first to even out the disadvantages of
  13028. this recording medium.
  13029. Once the material is played back the inverse filter has to be applied to
  13030. restore the distortion of the frequency response.
  13031. </p>
  13032. <p>The filter accepts the following options:
  13033. </p>
  13034. <dl compact="compact">
  13035. <dt><samp>level_in</samp></dt>
  13036. <dd><p>Set input gain.
  13037. </p>
  13038. </dd>
  13039. <dt><samp>level_out</samp></dt>
  13040. <dd><p>Set output gain.
  13041. </p>
  13042. </dd>
  13043. <dt><samp>mode</samp></dt>
  13044. <dd><p>Set filter mode. For restoring material use <code>reproduction</code> mode, otherwise
  13045. use <code>production</code> mode. Default is <code>reproduction</code> mode.
  13046. </p>
  13047. </dd>
  13048. <dt><samp>type</samp></dt>
  13049. <dd><p>Set filter type. Selects medium. Can be one of the following:
  13050. </p>
  13051. <dl compact="compact">
  13052. <dt><samp>col</samp></dt>
  13053. <dd><p>select Columbia.
  13054. </p></dd>
  13055. <dt><samp>emi</samp></dt>
  13056. <dd><p>select EMI.
  13057. </p></dd>
  13058. <dt><samp>bsi</samp></dt>
  13059. <dd><p>select BSI (78RPM).
  13060. </p></dd>
  13061. <dt><samp>riaa</samp></dt>
  13062. <dd><p>select RIAA.
  13063. </p></dd>
  13064. <dt><samp>cd</samp></dt>
  13065. <dd><p>select Compact Disc (CD).
  13066. </p></dd>
  13067. <dt><samp>50fm</samp></dt>
  13068. <dd><p>select 50µs (FM).
  13069. </p></dd>
  13070. <dt><samp>75fm</samp></dt>
  13071. <dd><p>select 75µs (FM).
  13072. </p></dd>
  13073. <dt><samp>50kf</samp></dt>
  13074. <dd><p>select 50µs (FM-KF).
  13075. </p></dd>
  13076. <dt><samp>75kf</samp></dt>
  13077. <dd><p>select 75µs (FM-KF).
  13078. </p></dd>
  13079. </dl>
  13080. </dd>
  13081. </dl>
  13082. <a name="Commands-3"></a>
  13083. <h4 class="subsection">29.14.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-3" aria-hidden="true">TOC</a></span></h4>
  13084. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  13085. </p>
  13086. <a name="aeval"></a>
  13087. <h3 class="section">29.15 aeval<span class="pull-right"><a class="anchor hidden-xs" href="#aeval" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aeval" aria-hidden="true">TOC</a></span></h3>
  13088. <p>Modify an audio signal according to the specified expressions.
  13089. </p>
  13090. <p>This filter accepts one or more expressions (one for each channel),
  13091. which are evaluated and used to modify a corresponding audio signal.
  13092. </p>
  13093. <p>It accepts the following parameters:
  13094. </p>
  13095. <dl compact="compact">
  13096. <dt><samp>exprs</samp></dt>
  13097. <dd><p>Set the &rsquo;|&rsquo;-separated expressions list for each separate channel. If
  13098. the number of input channels is greater than the number of
  13099. expressions, the last specified expression is used for the remaining
  13100. output channels.
  13101. </p>
  13102. </dd>
  13103. <dt><samp>channel_layout, c</samp></dt>
  13104. <dd><p>Set output channel layout. If not specified, the channel layout is
  13105. specified by the number of expressions. If set to &lsquo;<samp>same</samp>&rsquo;, it will
  13106. use by default the same input channel layout.
  13107. </p></dd>
  13108. </dl>
  13109. <p>Each expression in <var>exprs</var> can contain the following constants and functions:
  13110. </p>
  13111. <dl compact="compact">
  13112. <dt><samp>ch</samp></dt>
  13113. <dd><p>channel number of the current expression
  13114. </p>
  13115. </dd>
  13116. <dt><samp>n</samp></dt>
  13117. <dd><p>number of the evaluated sample, starting from 0
  13118. </p>
  13119. </dd>
  13120. <dt><samp>s</samp></dt>
  13121. <dd><p>sample rate
  13122. </p>
  13123. </dd>
  13124. <dt><samp>t</samp></dt>
  13125. <dd><p>time of the evaluated sample expressed in seconds
  13126. </p>
  13127. </dd>
  13128. <dt><samp>nb_in_channels</samp></dt>
  13129. <dt><samp>nb_out_channels</samp></dt>
  13130. <dd><p>input and output number of channels
  13131. </p>
  13132. </dd>
  13133. <dt><samp>val(CH)</samp></dt>
  13134. <dd><p>the value of input channel with number <var>CH</var>
  13135. </p></dd>
  13136. </dl>
  13137. <p>Note: this filter is slow. For faster processing you should use a
  13138. dedicated filter.
  13139. </p>
  13140. <a name="Examples-18"></a>
  13141. <h4 class="subsection">29.15.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-18" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-18" aria-hidden="true">TOC</a></span></h4>
  13142. <ul>
  13143. <li> Half volume:
  13144. <div class="example">
  13145. <pre class="example">aeval=val(ch)/2:c=same
  13146. </pre></div>
  13147. </li><li> Invert phase of the second channel:
  13148. <div class="example">
  13149. <pre class="example">aeval=val(0)|-val(1)
  13150. </pre></div>
  13151. </li></ul>
  13152. <a name="aexciter"></a>
  13153. <h3 class="section">29.16 aexciter<span class="pull-right"><a class="anchor hidden-xs" href="#aexciter" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aexciter" aria-hidden="true">TOC</a></span></h3>
  13154. <p>An exciter is used to produce high sound that is not present in the
  13155. original signal. This is done by creating harmonic distortions of the
  13156. signal which are restricted in range and added to the original signal.
  13157. An Exciter raises the upper end of an audio signal without simply raising
  13158. the higher frequencies like an equalizer would do to create a more
  13159. &quot;crisp&quot; or &quot;brilliant&quot; sound.
  13160. </p>
  13161. <p>The filter accepts the following options:
  13162. </p>
  13163. <dl compact="compact">
  13164. <dt><samp>level_in</samp></dt>
  13165. <dd><p>Set input level prior processing of signal.
  13166. Allowed range is from 0 to 64.
  13167. Default value is 1.
  13168. </p>
  13169. </dd>
  13170. <dt><samp>level_out</samp></dt>
  13171. <dd><p>Set output level after processing of signal.
  13172. Allowed range is from 0 to 64.
  13173. Default value is 1.
  13174. </p>
  13175. </dd>
  13176. <dt><samp>amount</samp></dt>
  13177. <dd><p>Set the amount of harmonics added to original signal.
  13178. Allowed range is from 0 to 64.
  13179. Default value is 1.
  13180. </p>
  13181. </dd>
  13182. <dt><samp>drive</samp></dt>
  13183. <dd><p>Set the amount of newly created harmonics.
  13184. Allowed range is from 0.1 to 10.
  13185. Default value is 8.5.
  13186. </p>
  13187. </dd>
  13188. <dt><samp>blend</samp></dt>
  13189. <dd><p>Set the octave of newly created harmonics.
  13190. Allowed range is from -10 to 10.
  13191. Default value is 0.
  13192. </p>
  13193. </dd>
  13194. <dt><samp>freq</samp></dt>
  13195. <dd><p>Set the lower frequency limit of producing harmonics in Hz.
  13196. Allowed range is from 2000 to 12000 Hz.
  13197. Default is 7500 Hz.
  13198. </p>
  13199. </dd>
  13200. <dt><samp>ceil</samp></dt>
  13201. <dd><p>Set the upper frequency limit of producing harmonics.
  13202. Allowed range is from 9999 to 20000 Hz.
  13203. If value is lower than 10000 Hz no limit is applied.
  13204. </p>
  13205. </dd>
  13206. <dt><samp>listen</samp></dt>
  13207. <dd><p>Mute the original signal and output only added harmonics.
  13208. By default is disabled.
  13209. </p></dd>
  13210. </dl>
  13211. <a name="Commands-4"></a>
  13212. <h4 class="subsection">29.16.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-4" aria-hidden="true">TOC</a></span></h4>
  13213. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  13214. </p>
  13215. <span id="afade"></span><a name="afade-1"></a>
  13216. <h3 class="section">29.17 afade<span class="pull-right"><a class="anchor hidden-xs" href="#afade-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-afade-1" aria-hidden="true">TOC</a></span></h3>
  13217. <p>Apply fade-in/out effect to input audio.
  13218. </p>
  13219. <p>A description of the accepted parameters follows.
  13220. </p>
  13221. <dl compact="compact">
  13222. <dt><samp>type, t</samp></dt>
  13223. <dd><p>Specify the effect type, can be either <code>in</code> for fade-in, or
  13224. <code>out</code> for a fade-out effect. Default is <code>in</code>.
  13225. </p>
  13226. </dd>
  13227. <dt><samp>start_sample, ss</samp></dt>
  13228. <dd><p>Specify the number of the start sample for starting to apply the fade
  13229. effect. Default is 0.
  13230. </p>
  13231. </dd>
  13232. <dt><samp>nb_samples, ns</samp></dt>
  13233. <dd><p>Specify the number of samples for which the fade effect has to last. At
  13234. the end of the fade-in effect the output audio will have the same
  13235. volume as the input audio, at the end of the fade-out transition
  13236. the output audio will be silence. Default is 44100.
  13237. </p>
  13238. </dd>
  13239. <dt><samp>start_time, st</samp></dt>
  13240. <dd><p>Specify the start time of the fade effect. Default is 0.
  13241. The value must be specified as a time duration; see
  13242. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  13243. for the accepted syntax.
  13244. If set this option is used instead of <var>start_sample</var>.
  13245. </p>
  13246. </dd>
  13247. <dt><samp>duration, d</samp></dt>
  13248. <dd><p>Specify the duration of the fade effect. See
  13249. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  13250. for the accepted syntax.
  13251. At the end of the fade-in effect the output audio will have the same
  13252. volume as the input audio, at the end of the fade-out transition
  13253. the output audio will be silence.
  13254. By default the duration is determined by <var>nb_samples</var>.
  13255. If set this option is used instead of <var>nb_samples</var>.
  13256. </p>
  13257. </dd>
  13258. <dt><samp>curve</samp></dt>
  13259. <dd><p>Set curve for fade transition.
  13260. </p>
  13261. <p>It accepts the following values:
  13262. </p><dl compact="compact">
  13263. <dt><samp>tri</samp></dt>
  13264. <dd><p>select triangular, linear slope (default)
  13265. </p></dd>
  13266. <dt><samp>qsin</samp></dt>
  13267. <dd><p>select quarter of sine wave
  13268. </p></dd>
  13269. <dt><samp>hsin</samp></dt>
  13270. <dd><p>select half of sine wave
  13271. </p></dd>
  13272. <dt><samp>esin</samp></dt>
  13273. <dd><p>select exponential sine wave
  13274. </p></dd>
  13275. <dt><samp>log</samp></dt>
  13276. <dd><p>select logarithmic
  13277. </p></dd>
  13278. <dt><samp>ipar</samp></dt>
  13279. <dd><p>select inverted parabola
  13280. </p></dd>
  13281. <dt><samp>qua</samp></dt>
  13282. <dd><p>select quadratic
  13283. </p></dd>
  13284. <dt><samp>cub</samp></dt>
  13285. <dd><p>select cubic
  13286. </p></dd>
  13287. <dt><samp>squ</samp></dt>
  13288. <dd><p>select square root
  13289. </p></dd>
  13290. <dt><samp>cbr</samp></dt>
  13291. <dd><p>select cubic root
  13292. </p></dd>
  13293. <dt><samp>par</samp></dt>
  13294. <dd><p>select parabola
  13295. </p></dd>
  13296. <dt><samp>exp</samp></dt>
  13297. <dd><p>select exponential
  13298. </p></dd>
  13299. <dt><samp>iqsin</samp></dt>
  13300. <dd><p>select inverted quarter of sine wave
  13301. </p></dd>
  13302. <dt><samp>ihsin</samp></dt>
  13303. <dd><p>select inverted half of sine wave
  13304. </p></dd>
  13305. <dt><samp>dese</samp></dt>
  13306. <dd><p>select double-exponential seat
  13307. </p></dd>
  13308. <dt><samp>desi</samp></dt>
  13309. <dd><p>select double-exponential sigmoid
  13310. </p></dd>
  13311. <dt><samp>losi</samp></dt>
  13312. <dd><p>select logistic sigmoid
  13313. </p></dd>
  13314. <dt><samp>sinc</samp></dt>
  13315. <dd><p>select sine cardinal function
  13316. </p></dd>
  13317. <dt><samp>isinc</samp></dt>
  13318. <dd><p>select inverted sine cardinal function
  13319. </p></dd>
  13320. <dt><samp>nofade</samp></dt>
  13321. <dd><p>no fade applied
  13322. </p></dd>
  13323. </dl>
  13324. </dd>
  13325. </dl>
  13326. <a name="Commands-5"></a>
  13327. <h4 class="subsection">29.17.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-5" aria-hidden="true">TOC</a></span></h4>
  13328. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  13329. </p>
  13330. <a name="Examples-19"></a>
  13331. <h4 class="subsection">29.17.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-19" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-19" aria-hidden="true">TOC</a></span></h4>
  13332. <ul>
  13333. <li> Fade in first 15 seconds of audio:
  13334. <div class="example">
  13335. <pre class="example">afade=t=in:ss=0:d=15
  13336. </pre></div>
  13337. </li><li> Fade out last 25 seconds of a 900 seconds audio:
  13338. <div class="example">
  13339. <pre class="example">afade=t=out:st=875:d=25
  13340. </pre></div>
  13341. </li></ul>
  13342. <a name="afftdn"></a>
  13343. <h3 class="section">29.18 afftdn<span class="pull-right"><a class="anchor hidden-xs" href="#afftdn" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-afftdn" aria-hidden="true">TOC</a></span></h3>
  13344. <p>Denoise audio samples with FFT.
  13345. </p>
  13346. <p>A description of the accepted parameters follows.
  13347. </p>
  13348. <dl compact="compact">
  13349. <dt><samp>nr</samp></dt>
  13350. <dd><p>Set the noise reduction in dB, allowed range is 0.01 to 97.
  13351. Default value is 12 dB.
  13352. </p>
  13353. </dd>
  13354. <dt><samp>nf</samp></dt>
  13355. <dd><p>Set the noise floor in dB, allowed range is -80 to -20.
  13356. Default value is -50 dB.
  13357. </p>
  13358. </dd>
  13359. <dt><samp>nt</samp></dt>
  13360. <dd><p>Set the noise type.
  13361. </p>
  13362. <p>It accepts the following values:
  13363. </p><dl compact="compact">
  13364. <dt><samp>w</samp></dt>
  13365. <dd><p>Select white noise.
  13366. </p>
  13367. </dd>
  13368. <dt><samp>v</samp></dt>
  13369. <dd><p>Select vinyl noise.
  13370. </p>
  13371. </dd>
  13372. <dt><samp>s</samp></dt>
  13373. <dd><p>Select shellac noise.
  13374. </p>
  13375. </dd>
  13376. <dt><samp>c</samp></dt>
  13377. <dd><p>Select custom noise, defined in <code>bn</code> option.
  13378. </p>
  13379. <p>Default value is white noise.
  13380. </p></dd>
  13381. </dl>
  13382. </dd>
  13383. <dt><samp>bn</samp></dt>
  13384. <dd><p>Set custom band noise for every one of 15 bands.
  13385. Bands are separated by &rsquo; &rsquo; or &rsquo;|&rsquo;.
  13386. </p>
  13387. </dd>
  13388. <dt><samp>rf</samp></dt>
  13389. <dd><p>Set the residual floor in dB, allowed range is -80 to -20.
  13390. Default value is -38 dB.
  13391. </p>
  13392. </dd>
  13393. <dt><samp>tn</samp></dt>
  13394. <dd><p>Enable noise tracking. By default is disabled.
  13395. With this enabled, noise floor is automatically adjusted.
  13396. </p>
  13397. </dd>
  13398. <dt><samp>tr</samp></dt>
  13399. <dd><p>Enable residual tracking. By default is disabled.
  13400. </p>
  13401. </dd>
  13402. <dt><samp>om</samp></dt>
  13403. <dd><p>Set the output mode.
  13404. </p>
  13405. <p>It accepts the following values:
  13406. </p><dl compact="compact">
  13407. <dt><samp>i</samp></dt>
  13408. <dd><p>Pass input unchanged.
  13409. </p>
  13410. </dd>
  13411. <dt><samp>o</samp></dt>
  13412. <dd><p>Pass noise filtered out.
  13413. </p>
  13414. </dd>
  13415. <dt><samp>n</samp></dt>
  13416. <dd><p>Pass only noise.
  13417. </p>
  13418. <p>Default value is <var>o</var>.
  13419. </p></dd>
  13420. </dl>
  13421. </dd>
  13422. </dl>
  13423. <a name="Commands-6"></a>
  13424. <h4 class="subsection">29.18.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-6" aria-hidden="true">TOC</a></span></h4>
  13425. <p>This filter supports the following commands:
  13426. </p><dl compact="compact">
  13427. <dt><samp>sample_noise, sn</samp></dt>
  13428. <dd><p>Start or stop measuring noise profile.
  13429. Syntax for the command is : &quot;start&quot; or &quot;stop&quot; string.
  13430. After measuring noise profile is stopped it will be
  13431. automatically applied in filtering.
  13432. </p>
  13433. </dd>
  13434. <dt><samp>noise_reduction, nr</samp></dt>
  13435. <dd><p>Change noise reduction. Argument is single float number.
  13436. Syntax for the command is : &quot;<var>noise_reduction</var>&quot;
  13437. </p>
  13438. </dd>
  13439. <dt><samp>noise_floor, nf</samp></dt>
  13440. <dd><p>Change noise floor. Argument is single float number.
  13441. Syntax for the command is : &quot;<var>noise_floor</var>&quot;
  13442. </p>
  13443. </dd>
  13444. <dt><samp>output_mode, om</samp></dt>
  13445. <dd><p>Change output mode operation.
  13446. Syntax for the command is : &quot;i&quot;, &quot;o&quot; or &quot;n&quot; string.
  13447. </p></dd>
  13448. </dl>
  13449. <a name="afftfilt"></a>
  13450. <h3 class="section">29.19 afftfilt<span class="pull-right"><a class="anchor hidden-xs" href="#afftfilt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-afftfilt" aria-hidden="true">TOC</a></span></h3>
  13451. <p>Apply arbitrary expressions to samples in frequency domain.
  13452. </p>
  13453. <dl compact="compact">
  13454. <dt><samp>real</samp></dt>
  13455. <dd><p>Set frequency domain real expression for each separate channel separated
  13456. by &rsquo;|&rsquo;. Default is &quot;re&quot;.
  13457. If the number of input channels is greater than the number of
  13458. expressions, the last specified expression is used for the remaining
  13459. output channels.
  13460. </p>
  13461. </dd>
  13462. <dt><samp>imag</samp></dt>
  13463. <dd><p>Set frequency domain imaginary expression for each separate channel
  13464. separated by &rsquo;|&rsquo;. Default is &quot;im&quot;.
  13465. </p>
  13466. <p>Each expression in <var>real</var> and <var>imag</var> can contain the following
  13467. constants and functions:
  13468. </p>
  13469. <dl compact="compact">
  13470. <dt><samp>sr</samp></dt>
  13471. <dd><p>sample rate
  13472. </p>
  13473. </dd>
  13474. <dt><samp>b</samp></dt>
  13475. <dd><p>current frequency bin number
  13476. </p>
  13477. </dd>
  13478. <dt><samp>nb</samp></dt>
  13479. <dd><p>number of available bins
  13480. </p>
  13481. </dd>
  13482. <dt><samp>ch</samp></dt>
  13483. <dd><p>channel number of the current expression
  13484. </p>
  13485. </dd>
  13486. <dt><samp>chs</samp></dt>
  13487. <dd><p>number of channels
  13488. </p>
  13489. </dd>
  13490. <dt><samp>pts</samp></dt>
  13491. <dd><p>current frame pts
  13492. </p>
  13493. </dd>
  13494. <dt><samp>re</samp></dt>
  13495. <dd><p>current real part of frequency bin of current channel
  13496. </p>
  13497. </dd>
  13498. <dt><samp>im</samp></dt>
  13499. <dd><p>current imaginary part of frequency bin of current channel
  13500. </p>
  13501. </dd>
  13502. <dt><samp>real(b, ch)</samp></dt>
  13503. <dd><p>Return the value of real part of frequency bin at location (<var>bin</var>,<var>channel</var>)
  13504. </p>
  13505. </dd>
  13506. <dt><samp>imag(b, ch)</samp></dt>
  13507. <dd><p>Return the value of imaginary part of frequency bin at location (<var>bin</var>,<var>channel</var>)
  13508. </p></dd>
  13509. </dl>
  13510. </dd>
  13511. <dt><samp>win_size</samp></dt>
  13512. <dd><p>Set window size. Allowed range is from 16 to 131072.
  13513. Default is <code>4096</code>
  13514. </p>
  13515. </dd>
  13516. <dt><samp>win_func</samp></dt>
  13517. <dd><p>Set window function. Default is <code>hann</code>.
  13518. </p>
  13519. </dd>
  13520. <dt><samp>overlap</samp></dt>
  13521. <dd><p>Set window overlap. If set to 1, the recommended overlap for selected
  13522. window function will be picked. Default is <code>0.75</code>.
  13523. </p></dd>
  13524. </dl>
  13525. <a name="Examples-20"></a>
  13526. <h4 class="subsection">29.19.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-20" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-20" aria-hidden="true">TOC</a></span></h4>
  13527. <ul>
  13528. <li> Leave almost only low frequencies in audio:
  13529. <div class="example">
  13530. <pre class="example">afftfilt=&quot;'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'&quot;
  13531. </pre></div>
  13532. </li><li> Apply robotize effect:
  13533. <div class="example">
  13534. <pre class="example">afftfilt=&quot;real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75&quot;
  13535. </pre></div>
  13536. </li><li> Apply whisper effect:
  13537. <div class="example">
  13538. <pre class="example">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;
  13539. </pre></div>
  13540. </li></ul>
  13541. <span id="afir"></span><a name="afir-1"></a>
  13542. <h3 class="section">29.20 afir<span class="pull-right"><a class="anchor hidden-xs" href="#afir-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-afir-1" aria-hidden="true">TOC</a></span></h3>
  13543. <p>Apply an arbitrary Finite Impulse Response filter.
  13544. </p>
  13545. <p>This filter is designed for applying long FIR filters,
  13546. up to 60 seconds long.
  13547. </p>
  13548. <p>It can be used as component for digital crossover filters,
  13549. room equalization, cross talk cancellation, wavefield synthesis,
  13550. auralization, ambiophonics, ambisonics and spatialization.
  13551. </p>
  13552. <p>This filter uses the streams higher than first one as FIR coefficients.
  13553. If the non-first stream holds a single channel, it will be used
  13554. for all input channels in the first stream, otherwise
  13555. the number of channels in the non-first stream must be same as
  13556. the number of channels in the first stream.
  13557. </p>
  13558. <p>It accepts the following parameters:
  13559. </p>
  13560. <dl compact="compact">
  13561. <dt><samp>dry</samp></dt>
  13562. <dd><p>Set dry gain. This sets input gain.
  13563. </p>
  13564. </dd>
  13565. <dt><samp>wet</samp></dt>
  13566. <dd><p>Set wet gain. This sets final output gain.
  13567. </p>
  13568. </dd>
  13569. <dt><samp>length</samp></dt>
  13570. <dd><p>Set Impulse Response filter length. Default is 1, which means whole IR is processed.
  13571. </p>
  13572. </dd>
  13573. <dt><samp>gtype</samp></dt>
  13574. <dd><p>Enable applying gain measured from power of IR.
  13575. </p>
  13576. <p>Set which approach to use for auto gain measurement.
  13577. </p>
  13578. <dl compact="compact">
  13579. <dt><samp>none</samp></dt>
  13580. <dd><p>Do not apply any gain.
  13581. </p>
  13582. </dd>
  13583. <dt><samp>peak</samp></dt>
  13584. <dd><p>select peak gain, very conservative approach. This is default value.
  13585. </p>
  13586. </dd>
  13587. <dt><samp>dc</samp></dt>
  13588. <dd><p>select DC gain, limited application.
  13589. </p>
  13590. </dd>
  13591. <dt><samp>gn</samp></dt>
  13592. <dd><p>select gain to noise approach, this is most popular one.
  13593. </p></dd>
  13594. </dl>
  13595. </dd>
  13596. <dt><samp>irgain</samp></dt>
  13597. <dd><p>Set gain to be applied to IR coefficients before filtering.
  13598. Allowed range is 0 to 1. This gain is applied after any gain applied with <var>gtype</var> option.
  13599. </p>
  13600. </dd>
  13601. <dt><samp>irfmt</samp></dt>
  13602. <dd><p>Set format of IR stream. Can be <code>mono</code> or <code>input</code>.
  13603. Default is <code>input</code>.
  13604. </p>
  13605. </dd>
  13606. <dt><samp>maxir</samp></dt>
  13607. <dd><p>Set max allowed Impulse Response filter duration in seconds. Default is 30 seconds.
  13608. Allowed range is 0.1 to 60 seconds.
  13609. </p>
  13610. </dd>
  13611. <dt><samp>response</samp></dt>
  13612. <dd><p>Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
  13613. By default it is disabled.
  13614. </p>
  13615. </dd>
  13616. <dt><samp>channel</samp></dt>
  13617. <dd><p>Set for which IR channel to display frequency response. By default is first channel
  13618. displayed. This option is used only when <var>response</var> is enabled.
  13619. </p>
  13620. </dd>
  13621. <dt><samp>size</samp></dt>
  13622. <dd><p>Set video stream size. This option is used only when <var>response</var> is enabled.
  13623. </p>
  13624. </dd>
  13625. <dt><samp>rate</samp></dt>
  13626. <dd><p>Set video stream frame rate. This option is used only when <var>response</var> is enabled.
  13627. </p>
  13628. </dd>
  13629. <dt><samp>minp</samp></dt>
  13630. <dd><p>Set minimal partition size used for convolution. Default is <var>8192</var>.
  13631. Allowed range is from <var>1</var> to <var>32768</var>.
  13632. Lower values decreases latency at cost of higher CPU usage.
  13633. </p>
  13634. </dd>
  13635. <dt><samp>maxp</samp></dt>
  13636. <dd><p>Set maximal partition size used for convolution. Default is <var>8192</var>.
  13637. Allowed range is from <var>8</var> to <var>32768</var>.
  13638. Lower values may increase CPU usage.
  13639. </p>
  13640. </dd>
  13641. <dt><samp>nbirs</samp></dt>
  13642. <dd><p>Set number of input impulse responses streams which will be switchable at runtime.
  13643. Allowed range is from <var>1</var> to <var>32</var>. Default is <var>1</var>.
  13644. </p>
  13645. </dd>
  13646. <dt><samp>ir</samp></dt>
  13647. <dd><p>Set IR stream which will be used for convolution, starting from <var>0</var>, should always be
  13648. lower than supplied value by <code>nbirs</code> option. Default is <var>0</var>.
  13649. This option can be changed at runtime via <a href="#commands">commands</a>.
  13650. </p></dd>
  13651. </dl>
  13652. <a name="Examples-21"></a>
  13653. <h4 class="subsection">29.20.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-21" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-21" aria-hidden="true">TOC</a></span></h4>
  13654. <ul>
  13655. <li> Apply reverb to stream using mono IR file as second input, complete command using ffmpeg:
  13656. <div class="example">
  13657. <pre class="example">ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
  13658. </pre></div>
  13659. </li></ul>
  13660. <span id="aformat"></span><a name="aformat-1"></a>
  13661. <h3 class="section">29.21 aformat<span class="pull-right"><a class="anchor hidden-xs" href="#aformat-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aformat-1" aria-hidden="true">TOC</a></span></h3>
  13662. <p>Set output format constraints for the input audio. The framework will
  13663. negotiate the most appropriate format to minimize conversions.
  13664. </p>
  13665. <p>It accepts the following parameters:
  13666. </p><dl compact="compact">
  13667. <dt><samp>sample_fmts, f</samp></dt>
  13668. <dd><p>A &rsquo;|&rsquo;-separated list of requested sample formats.
  13669. </p>
  13670. </dd>
  13671. <dt><samp>sample_rates, r</samp></dt>
  13672. <dd><p>A &rsquo;|&rsquo;-separated list of requested sample rates.
  13673. </p>
  13674. </dd>
  13675. <dt><samp>channel_layouts, cl</samp></dt>
  13676. <dd><p>A &rsquo;|&rsquo;-separated list of requested channel layouts.
  13677. </p>
  13678. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  13679. for the required syntax.
  13680. </p></dd>
  13681. </dl>
  13682. <p>If a parameter is omitted, all values are allowed.
  13683. </p>
  13684. <p>Force the output to either unsigned 8-bit or signed 16-bit stereo
  13685. </p><div class="example">
  13686. <pre class="example">aformat=sample_fmts=u8|s16:channel_layouts=stereo
  13687. </pre></div>
  13688. <a name="afreqshift"></a>
  13689. <h3 class="section">29.22 afreqshift<span class="pull-right"><a class="anchor hidden-xs" href="#afreqshift" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-afreqshift" aria-hidden="true">TOC</a></span></h3>
  13690. <p>Apply frequency shift to input audio samples.
  13691. </p>
  13692. <p>The filter accepts the following options:
  13693. </p>
  13694. <dl compact="compact">
  13695. <dt><samp>shift</samp></dt>
  13696. <dd><p>Specify frequency shift. Allowed range is -INT_MAX to INT_MAX.
  13697. Default value is 0.0.
  13698. </p>
  13699. </dd>
  13700. <dt><samp>level</samp></dt>
  13701. <dd><p>Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
  13702. Default value is 1.0.
  13703. </p></dd>
  13704. </dl>
  13705. <a name="Commands-7"></a>
  13706. <h4 class="subsection">29.22.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-7" aria-hidden="true">TOC</a></span></h4>
  13707. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  13708. </p>
  13709. <a name="agate"></a>
  13710. <h3 class="section">29.23 agate<span class="pull-right"><a class="anchor hidden-xs" href="#agate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-agate" aria-hidden="true">TOC</a></span></h3>
  13711. <p>A gate is mainly used to reduce lower parts of a signal. This kind of signal
  13712. processing reduces disturbing noise between useful signals.
  13713. </p>
  13714. <p>Gating is done by detecting the volume below a chosen level <var>threshold</var>
  13715. and dividing it by the factor set with <var>ratio</var>. The bottom of the noise
  13716. floor is set via <var>range</var>. Because an exact manipulation of the signal
  13717. would cause distortion of the waveform the reduction can be levelled over
  13718. time. This is done by setting <var>attack</var> and <var>release</var>.
  13719. </p>
  13720. <p><var>attack</var> determines how long the signal has to fall below the threshold
  13721. before any reduction will occur and <var>release</var> sets the time the signal
  13722. has to rise above the threshold to reduce the reduction again.
  13723. Shorter signals than the chosen attack time will be left untouched.
  13724. </p>
  13725. <dl compact="compact">
  13726. <dt><samp>level_in</samp></dt>
  13727. <dd><p>Set input level before filtering.
  13728. Default is 1. Allowed range is from 0.015625 to 64.
  13729. </p>
  13730. </dd>
  13731. <dt><samp>mode</samp></dt>
  13732. <dd><p>Set the mode of operation. Can be <code>upward</code> or <code>downward</code>.
  13733. Default is <code>downward</code>. If set to <code>upward</code> mode, higher parts of signal
  13734. will be amplified, expanding dynamic range in upward direction.
  13735. Otherwise, in case of <code>downward</code> lower parts of signal will be reduced.
  13736. </p>
  13737. </dd>
  13738. <dt><samp>range</samp></dt>
  13739. <dd><p>Set the level of gain reduction when the signal is below the threshold.
  13740. Default is 0.06125. Allowed range is from 0 to 1.
  13741. Setting this to 0 disables reduction and then filter behaves like expander.
  13742. </p>
  13743. </dd>
  13744. <dt><samp>threshold</samp></dt>
  13745. <dd><p>If a signal rises above this level the gain reduction is released.
  13746. Default is 0.125. Allowed range is from 0 to 1.
  13747. </p>
  13748. </dd>
  13749. <dt><samp>ratio</samp></dt>
  13750. <dd><p>Set a ratio by which the signal is reduced.
  13751. Default is 2. Allowed range is from 1 to 9000.
  13752. </p>
  13753. </dd>
  13754. <dt><samp>attack</samp></dt>
  13755. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  13756. reduction stops.
  13757. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
  13758. </p>
  13759. </dd>
  13760. <dt><samp>release</samp></dt>
  13761. <dd><p>Amount of milliseconds the signal has to fall below the threshold before the
  13762. reduction is increased again. Default is 250 milliseconds.
  13763. Allowed range is from 0.01 to 9000.
  13764. </p>
  13765. </dd>
  13766. <dt><samp>makeup</samp></dt>
  13767. <dd><p>Set amount of amplification of signal after processing.
  13768. Default is 1. Allowed range is from 1 to 64.
  13769. </p>
  13770. </dd>
  13771. <dt><samp>knee</samp></dt>
  13772. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  13773. Default is 2.828427125. Allowed range is from 1 to 8.
  13774. </p>
  13775. </dd>
  13776. <dt><samp>detection</samp></dt>
  13777. <dd><p>Choose if exact signal should be taken for detection or an RMS like one.
  13778. Default is <code>rms</code>. Can be <code>peak</code> or <code>rms</code>.
  13779. </p>
  13780. </dd>
  13781. <dt><samp>link</samp></dt>
  13782. <dd><p>Choose if the average level between all channels or the louder channel affects
  13783. the reduction.
  13784. Default is <code>average</code>. Can be <code>average</code> or <code>maximum</code>.
  13785. </p></dd>
  13786. </dl>
  13787. <a name="Commands-8"></a>
  13788. <h4 class="subsection">29.23.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-8" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-8" aria-hidden="true">TOC</a></span></h4>
  13789. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  13790. </p>
  13791. <a name="aiir"></a>
  13792. <h3 class="section">29.24 aiir<span class="pull-right"><a class="anchor hidden-xs" href="#aiir" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aiir" aria-hidden="true">TOC</a></span></h3>
  13793. <p>Apply an arbitrary Infinite Impulse Response filter.
  13794. </p>
  13795. <p>It accepts the following parameters:
  13796. </p>
  13797. <dl compact="compact">
  13798. <dt><samp>zeros, z</samp></dt>
  13799. <dd><p>Set B/numerator/zeros/reflection coefficients.
  13800. </p>
  13801. </dd>
  13802. <dt><samp>poles, p</samp></dt>
  13803. <dd><p>Set A/denominator/poles/ladder coefficients.
  13804. </p>
  13805. </dd>
  13806. <dt><samp>gains, k</samp></dt>
  13807. <dd><p>Set channels gains.
  13808. </p>
  13809. </dd>
  13810. <dt><samp>dry_gain</samp></dt>
  13811. <dd><p>Set input gain.
  13812. </p>
  13813. </dd>
  13814. <dt><samp>wet_gain</samp></dt>
  13815. <dd><p>Set output gain.
  13816. </p>
  13817. </dd>
  13818. <dt><samp>format, f</samp></dt>
  13819. <dd><p>Set coefficients format.
  13820. </p>
  13821. <dl compact="compact">
  13822. <dt>&lsquo;<samp>ll</samp>&rsquo;</dt>
  13823. <dd><p>lattice-ladder function
  13824. </p></dd>
  13825. <dt>&lsquo;<samp>sf</samp>&rsquo;</dt>
  13826. <dd><p>analog transfer function
  13827. </p></dd>
  13828. <dt>&lsquo;<samp>tf</samp>&rsquo;</dt>
  13829. <dd><p>digital transfer function
  13830. </p></dd>
  13831. <dt>&lsquo;<samp>zp</samp>&rsquo;</dt>
  13832. <dd><p>Z-plane zeros/poles, cartesian (default)
  13833. </p></dd>
  13834. <dt>&lsquo;<samp>pr</samp>&rsquo;</dt>
  13835. <dd><p>Z-plane zeros/poles, polar radians
  13836. </p></dd>
  13837. <dt>&lsquo;<samp>pd</samp>&rsquo;</dt>
  13838. <dd><p>Z-plane zeros/poles, polar degrees
  13839. </p></dd>
  13840. <dt>&lsquo;<samp>sp</samp>&rsquo;</dt>
  13841. <dd><p>S-plane zeros/poles
  13842. </p></dd>
  13843. </dl>
  13844. </dd>
  13845. <dt><samp>process, r</samp></dt>
  13846. <dd><p>Set type of processing.
  13847. </p>
  13848. <dl compact="compact">
  13849. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  13850. <dd><p>direct processing
  13851. </p></dd>
  13852. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  13853. <dd><p>serial processing
  13854. </p></dd>
  13855. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  13856. <dd><p>parallel processing
  13857. </p></dd>
  13858. </dl>
  13859. </dd>
  13860. <dt><samp>precision, e</samp></dt>
  13861. <dd><p>Set filtering precision.
  13862. </p>
  13863. <dl compact="compact">
  13864. <dt>&lsquo;<samp>dbl</samp>&rsquo;</dt>
  13865. <dd><p>double-precision floating-point (default)
  13866. </p></dd>
  13867. <dt>&lsquo;<samp>flt</samp>&rsquo;</dt>
  13868. <dd><p>single-precision floating-point
  13869. </p></dd>
  13870. <dt>&lsquo;<samp>i32</samp>&rsquo;</dt>
  13871. <dd><p>32-bit integers
  13872. </p></dd>
  13873. <dt>&lsquo;<samp>i16</samp>&rsquo;</dt>
  13874. <dd><p>16-bit integers
  13875. </p></dd>
  13876. </dl>
  13877. </dd>
  13878. <dt><samp>normalize, n</samp></dt>
  13879. <dd><p>Normalize filter coefficients, by default is enabled.
  13880. Enabling it will normalize magnitude response at DC to 0dB.
  13881. </p>
  13882. </dd>
  13883. <dt><samp>mix</samp></dt>
  13884. <dd><p>How much to use filtered signal in output. Default is 1.
  13885. Range is between 0 and 1.
  13886. </p>
  13887. </dd>
  13888. <dt><samp>response</samp></dt>
  13889. <dd><p>Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
  13890. By default it is disabled.
  13891. </p>
  13892. </dd>
  13893. <dt><samp>channel</samp></dt>
  13894. <dd><p>Set for which IR channel to display frequency response. By default is first channel
  13895. displayed. This option is used only when <var>response</var> is enabled.
  13896. </p>
  13897. </dd>
  13898. <dt><samp>size</samp></dt>
  13899. <dd><p>Set video stream size. This option is used only when <var>response</var> is enabled.
  13900. </p></dd>
  13901. </dl>
  13902. <p>Coefficients in <code>tf</code> and <code>sf</code> format are separated by spaces and are in ascending
  13903. order.
  13904. </p>
  13905. <p>Coefficients in <code>zp</code> format are separated by spaces and order of coefficients
  13906. doesn&rsquo;t matter. Coefficients in <code>zp</code> format are complex numbers with <var>i</var>
  13907. imaginary unit.
  13908. </p>
  13909. <p>Different coefficients and gains can be provided for every channel, in such case
  13910. use &rsquo;|&rsquo; to separate coefficients or gains. Last provided coefficients will be
  13911. used for all remaining channels.
  13912. </p>
  13913. <a name="Examples-22"></a>
  13914. <h4 class="subsection">29.24.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-22" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-22" aria-hidden="true">TOC</a></span></h4>
  13915. <ul>
  13916. <li> Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample rate:
  13917. <div class="example">
  13918. <pre class="example">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
  13919. </pre></div>
  13920. </li><li> Same as above but in <code>zp</code> format:
  13921. <div class="example">
  13922. <pre class="example">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
  13923. </pre></div>
  13924. </li><li> Apply 3-rd order analog normalized Butterworth low-pass filter, using analog transfer function format:
  13925. <div class="example">
  13926. <pre class="example">aiir=z=1.3057 0 0 0:p=1.3057 2.3892 2.1860 1:f=sf:r=d
  13927. </pre></div>
  13928. </li></ul>
  13929. <a name="alimiter"></a>
  13930. <h3 class="section">29.25 alimiter<span class="pull-right"><a class="anchor hidden-xs" href="#alimiter" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alimiter" aria-hidden="true">TOC</a></span></h3>
  13931. <p>The limiter prevents an input signal from rising over a desired threshold.
  13932. This limiter uses lookahead technology to prevent your signal from distorting.
  13933. It means that there is a small delay after the signal is processed. Keep in mind
  13934. that the delay it produces is the attack time you set.
  13935. </p>
  13936. <p>The filter accepts the following options:
  13937. </p>
  13938. <dl compact="compact">
  13939. <dt><samp>level_in</samp></dt>
  13940. <dd><p>Set input gain. Default is 1.
  13941. </p>
  13942. </dd>
  13943. <dt><samp>level_out</samp></dt>
  13944. <dd><p>Set output gain. Default is 1.
  13945. </p>
  13946. </dd>
  13947. <dt><samp>limit</samp></dt>
  13948. <dd><p>Don&rsquo;t let signals above this level pass the limiter. Default is 1.
  13949. </p>
  13950. </dd>
  13951. <dt><samp>attack</samp></dt>
  13952. <dd><p>The limiter will reach its attenuation level in this amount of time in
  13953. milliseconds. Default is 5 milliseconds.
  13954. </p>
  13955. </dd>
  13956. <dt><samp>release</samp></dt>
  13957. <dd><p>Come back from limiting to attenuation 1.0 in this amount of milliseconds.
  13958. Default is 50 milliseconds.
  13959. </p>
  13960. </dd>
  13961. <dt><samp>asc</samp></dt>
  13962. <dd><p>When gain reduction is always needed ASC takes care of releasing to an
  13963. average reduction level rather than reaching a reduction of 0 in the release
  13964. time.
  13965. </p>
  13966. </dd>
  13967. <dt><samp>asc_level</samp></dt>
  13968. <dd><p>Select how much the release time is affected by ASC, 0 means nearly no changes
  13969. in release time while 1 produces higher release times.
  13970. </p>
  13971. </dd>
  13972. <dt><samp>level</samp></dt>
  13973. <dd><p>Auto level output signal. Default is enabled.
  13974. This normalizes audio back to 0dB if enabled.
  13975. </p></dd>
  13976. </dl>
  13977. <p>Depending on picked setting it is recommended to upsample input 2x or 4x times
  13978. with <a href="#aresample">aresample</a> before applying this filter.
  13979. </p>
  13980. <a name="allpass"></a>
  13981. <h3 class="section">29.26 allpass<span class="pull-right"><a class="anchor hidden-xs" href="#allpass" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-allpass" aria-hidden="true">TOC</a></span></h3>
  13982. <p>Apply a two-pole all-pass filter with central frequency (in Hz)
  13983. <var>frequency</var>, and filter-width <var>width</var>.
  13984. An all-pass filter changes the audio&rsquo;s frequency to phase relationship
  13985. without changing its frequency to amplitude relationship.
  13986. </p>
  13987. <p>The filter accepts the following options:
  13988. </p>
  13989. <dl compact="compact">
  13990. <dt><samp>frequency, f</samp></dt>
  13991. <dd><p>Set frequency in Hz.
  13992. </p>
  13993. </dd>
  13994. <dt><samp>width_type, t</samp></dt>
  13995. <dd><p>Set method to specify band-width of filter.
  13996. </p><dl compact="compact">
  13997. <dt><samp>h</samp></dt>
  13998. <dd><p>Hz
  13999. </p></dd>
  14000. <dt><samp>q</samp></dt>
  14001. <dd><p>Q-Factor
  14002. </p></dd>
  14003. <dt><samp>o</samp></dt>
  14004. <dd><p>octave
  14005. </p></dd>
  14006. <dt><samp>s</samp></dt>
  14007. <dd><p>slope
  14008. </p></dd>
  14009. <dt><samp>k</samp></dt>
  14010. <dd><p>kHz
  14011. </p></dd>
  14012. </dl>
  14013. </dd>
  14014. <dt><samp>width, w</samp></dt>
  14015. <dd><p>Specify the band-width of a filter in width_type units.
  14016. </p>
  14017. </dd>
  14018. <dt><samp>mix, m</samp></dt>
  14019. <dd><p>How much to use filtered signal in output. Default is 1.
  14020. Range is between 0 and 1.
  14021. </p>
  14022. </dd>
  14023. <dt><samp>channels, c</samp></dt>
  14024. <dd><p>Specify which channels to filter, by default all available are filtered.
  14025. </p>
  14026. </dd>
  14027. <dt><samp>normalize, n</samp></dt>
  14028. <dd><p>Normalize biquad coefficients, by default is disabled.
  14029. Enabling it will normalize magnitude response at DC to 0dB.
  14030. </p>
  14031. </dd>
  14032. <dt><samp>order, o</samp></dt>
  14033. <dd><p>Set the filter order, can be 1 or 2. Default is 2.
  14034. </p>
  14035. </dd>
  14036. <dt><samp>transform, a</samp></dt>
  14037. <dd><p>Set transform type of IIR filter.
  14038. </p><dl compact="compact">
  14039. <dt><samp>di</samp></dt>
  14040. <dt><samp>dii</samp></dt>
  14041. <dt><samp>tdii</samp></dt>
  14042. <dt><samp>latt</samp></dt>
  14043. </dl>
  14044. </dd>
  14045. <dt><samp>precision, r</samp></dt>
  14046. <dd><p>Set precison of filtering.
  14047. </p><dl compact="compact">
  14048. <dt><samp>auto</samp></dt>
  14049. <dd><p>Pick automatic sample format depending on surround filters.
  14050. </p></dd>
  14051. <dt><samp>s16</samp></dt>
  14052. <dd><p>Always use signed 16-bit.
  14053. </p></dd>
  14054. <dt><samp>s32</samp></dt>
  14055. <dd><p>Always use signed 32-bit.
  14056. </p></dd>
  14057. <dt><samp>f32</samp></dt>
  14058. <dd><p>Always use float 32-bit.
  14059. </p></dd>
  14060. <dt><samp>f64</samp></dt>
  14061. <dd><p>Always use float 64-bit.
  14062. </p></dd>
  14063. </dl>
  14064. </dd>
  14065. </dl>
  14066. <a name="Commands-9"></a>
  14067. <h4 class="subsection">29.26.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-9" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-9" aria-hidden="true">TOC</a></span></h4>
  14068. <p>This filter supports the following commands:
  14069. </p><dl compact="compact">
  14070. <dt><samp>frequency, f</samp></dt>
  14071. <dd><p>Change allpass frequency.
  14072. Syntax for the command is : &quot;<var>frequency</var>&quot;
  14073. </p>
  14074. </dd>
  14075. <dt><samp>width_type, t</samp></dt>
  14076. <dd><p>Change allpass width_type.
  14077. Syntax for the command is : &quot;<var>width_type</var>&quot;
  14078. </p>
  14079. </dd>
  14080. <dt><samp>width, w</samp></dt>
  14081. <dd><p>Change allpass width.
  14082. Syntax for the command is : &quot;<var>width</var>&quot;
  14083. </p>
  14084. </dd>
  14085. <dt><samp>mix, m</samp></dt>
  14086. <dd><p>Change allpass mix.
  14087. Syntax for the command is : &quot;<var>mix</var>&quot;
  14088. </p></dd>
  14089. </dl>
  14090. <a name="aloop"></a>
  14091. <h3 class="section">29.27 aloop<span class="pull-right"><a class="anchor hidden-xs" href="#aloop" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aloop" aria-hidden="true">TOC</a></span></h3>
  14092. <p>Loop audio samples.
  14093. </p>
  14094. <p>The filter accepts the following options:
  14095. </p>
  14096. <dl compact="compact">
  14097. <dt><samp>loop</samp></dt>
  14098. <dd><p>Set the number of loops. Setting this value to -1 will result in infinite loops.
  14099. Default is 0.
  14100. </p>
  14101. </dd>
  14102. <dt><samp>size</samp></dt>
  14103. <dd><p>Set maximal number of samples. Default is 0.
  14104. </p>
  14105. </dd>
  14106. <dt><samp>start</samp></dt>
  14107. <dd><p>Set first sample of loop. Default is 0.
  14108. </p></dd>
  14109. </dl>
  14110. <span id="amerge"></span><a name="amerge-1"></a>
  14111. <h3 class="section">29.28 amerge<span class="pull-right"><a class="anchor hidden-xs" href="#amerge-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-amerge-1" aria-hidden="true">TOC</a></span></h3>
  14112. <p>Merge two or more audio streams into a single multi-channel stream.
  14113. </p>
  14114. <p>The filter accepts the following options:
  14115. </p>
  14116. <dl compact="compact">
  14117. <dt><samp>inputs</samp></dt>
  14118. <dd><p>Set the number of inputs. Default is 2.
  14119. </p>
  14120. </dd>
  14121. </dl>
  14122. <p>If the channel layouts of the inputs are disjoint, and therefore compatible,
  14123. the channel layout of the output will be set accordingly and the channels
  14124. will be reordered as necessary. If the channel layouts of the inputs are not
  14125. disjoint, the output will have all the channels of the first input then all
  14126. the channels of the second input, in that order, and the channel layout of
  14127. the output will be the default value corresponding to the total number of
  14128. channels.
  14129. </p>
  14130. <p>For example, if the first input is in 2.1 (FL+FR+LF) and the second input
  14131. is FC+BL+BR, then the output will be in 5.1, with the channels in the
  14132. following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the
  14133. first input, b1 is the first channel of the second input).
  14134. </p>
  14135. <p>On the other hand, if both input are in stereo, the output channels will be
  14136. in the default order: a1, a2, b1, b2, and the channel layout will be
  14137. arbitrarily set to 4.0, which may or may not be the expected value.
  14138. </p>
  14139. <p>All inputs must have the same sample rate, and format.
  14140. </p>
  14141. <p>If inputs do not have the same duration, the output will stop with the
  14142. shortest.
  14143. </p>
  14144. <a name="Examples-23"></a>
  14145. <h4 class="subsection">29.28.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-23" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-23" aria-hidden="true">TOC</a></span></h4>
  14146. <ul>
  14147. <li> Merge two mono files into a stereo stream:
  14148. <div class="example">
  14149. <pre class="example">amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
  14150. </pre></div>
  14151. </li><li> Multiple merges assuming 1 video stream and 6 audio streams in <samp>input.mkv</samp>:
  14152. <div class="example">
  14153. <pre class="example">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
  14154. </pre></div>
  14155. </li></ul>
  14156. <a name="amix"></a>
  14157. <h3 class="section">29.29 amix<span class="pull-right"><a class="anchor hidden-xs" href="#amix" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-amix" aria-hidden="true">TOC</a></span></h3>
  14158. <p>Mixes multiple audio inputs into a single output.
  14159. </p>
  14160. <p>Note that this filter only supports float samples (the <var>amerge</var>
  14161. and <var>pan</var> audio filters support many formats). If the <var>amix</var>
  14162. input has integer samples then <a href="#aresample">aresample</a> will be automatically
  14163. inserted to perform the conversion to float samples.
  14164. </p>
  14165. <p>For example
  14166. </p><div class="example">
  14167. <pre class="example">ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
  14168. </pre></div>
  14169. <p>will mix 3 input audio streams to a single output with the same duration as the
  14170. first input and a dropout transition time of 3 seconds.
  14171. </p>
  14172. <p>It accepts the following parameters:
  14173. </p><dl compact="compact">
  14174. <dt><samp>inputs</samp></dt>
  14175. <dd><p>The number of inputs. If unspecified, it defaults to 2.
  14176. </p>
  14177. </dd>
  14178. <dt><samp>duration</samp></dt>
  14179. <dd><p>How to determine the end-of-stream.
  14180. </p><dl compact="compact">
  14181. <dt><samp>longest</samp></dt>
  14182. <dd><p>The duration of the longest input. (default)
  14183. </p>
  14184. </dd>
  14185. <dt><samp>shortest</samp></dt>
  14186. <dd><p>The duration of the shortest input.
  14187. </p>
  14188. </dd>
  14189. <dt><samp>first</samp></dt>
  14190. <dd><p>The duration of the first input.
  14191. </p>
  14192. </dd>
  14193. </dl>
  14194. </dd>
  14195. <dt><samp>dropout_transition</samp></dt>
  14196. <dd><p>The transition time, in seconds, for volume renormalization when an input
  14197. stream ends. The default value is 2 seconds.
  14198. </p>
  14199. </dd>
  14200. <dt><samp>weights</samp></dt>
  14201. <dd><p>Specify weight of each input audio stream as sequence.
  14202. Each weight is separated by space. By default all inputs have same weight.
  14203. </p>
  14204. </dd>
  14205. <dt><samp>normalize</samp></dt>
  14206. <dd><p>Always scale inputs instead of only doing summation of samples.
  14207. Beware of heavy clipping if inputs are not normalized prior or after filtering
  14208. by this filter if this option is disabled. By default is enabled.
  14209. </p></dd>
  14210. </dl>
  14211. <a name="Commands-10"></a>
  14212. <h4 class="subsection">29.29.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-10" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-10" aria-hidden="true">TOC</a></span></h4>
  14213. <p>This filter supports the following commands:
  14214. </p><dl compact="compact">
  14215. <dt><samp>weights</samp></dt>
  14216. <dt><samp>sum</samp></dt>
  14217. <dd><p>Syntax is same as option with same name.
  14218. </p></dd>
  14219. </dl>
  14220. <a name="amultiply"></a>
  14221. <h3 class="section">29.30 amultiply<span class="pull-right"><a class="anchor hidden-xs" href="#amultiply" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-amultiply" aria-hidden="true">TOC</a></span></h3>
  14222. <p>Multiply first audio stream with second audio stream and store result
  14223. in output audio stream. Multiplication is done by multiplying each
  14224. sample from first stream with sample at same position from second stream.
  14225. </p>
  14226. <p>With this element-wise multiplication one can create amplitude fades and
  14227. amplitude modulations.
  14228. </p>
  14229. <a name="anequalizer"></a>
  14230. <h3 class="section">29.31 anequalizer<span class="pull-right"><a class="anchor hidden-xs" href="#anequalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-anequalizer" aria-hidden="true">TOC</a></span></h3>
  14231. <p>High-order parametric multiband equalizer for each channel.
  14232. </p>
  14233. <p>It accepts the following parameters:
  14234. </p><dl compact="compact">
  14235. <dt><samp>params</samp></dt>
  14236. <dd>
  14237. <p>This option string is in format:
  14238. &quot;c<var>chn</var> f=<var>cf</var> w=<var>w</var> g=<var>g</var> t=<var>f</var> | ...&quot;
  14239. Each equalizer band is separated by &rsquo;|&rsquo;.
  14240. </p>
  14241. <dl compact="compact">
  14242. <dt><samp>chn</samp></dt>
  14243. <dd><p>Set channel number to which equalization will be applied.
  14244. If input doesn&rsquo;t have that channel the entry is ignored.
  14245. </p>
  14246. </dd>
  14247. <dt><samp>f</samp></dt>
  14248. <dd><p>Set central frequency for band.
  14249. If input doesn&rsquo;t have that frequency the entry is ignored.
  14250. </p>
  14251. </dd>
  14252. <dt><samp>w</samp></dt>
  14253. <dd><p>Set band width in Hertz.
  14254. </p>
  14255. </dd>
  14256. <dt><samp>g</samp></dt>
  14257. <dd><p>Set band gain in dB.
  14258. </p>
  14259. </dd>
  14260. <dt><samp>t</samp></dt>
  14261. <dd><p>Set filter type for band, optional, can be:
  14262. </p>
  14263. <dl compact="compact">
  14264. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  14265. <dd><p>Butterworth, this is default.
  14266. </p>
  14267. </dd>
  14268. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  14269. <dd><p>Chebyshev type 1.
  14270. </p>
  14271. </dd>
  14272. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  14273. <dd><p>Chebyshev type 2.
  14274. </p></dd>
  14275. </dl>
  14276. </dd>
  14277. </dl>
  14278. </dd>
  14279. <dt><samp>curves</samp></dt>
  14280. <dd><p>With this option activated frequency response of anequalizer is displayed
  14281. in video stream.
  14282. </p>
  14283. </dd>
  14284. <dt><samp>size</samp></dt>
  14285. <dd><p>Set video stream size. Only useful if curves option is activated.
  14286. </p>
  14287. </dd>
  14288. <dt><samp>mgain</samp></dt>
  14289. <dd><p>Set max gain that will be displayed. Only useful if curves option is activated.
  14290. Setting this to a reasonable value makes it possible to display gain which is derived from
  14291. neighbour bands which are too close to each other and thus produce higher gain
  14292. when both are activated.
  14293. </p>
  14294. </dd>
  14295. <dt><samp>fscale</samp></dt>
  14296. <dd><p>Set frequency scale used to draw frequency response in video output.
  14297. Can be linear or logarithmic. Default is logarithmic.
  14298. </p>
  14299. </dd>
  14300. <dt><samp>colors</samp></dt>
  14301. <dd><p>Set color for each channel curve which is going to be displayed in video stream.
  14302. This is list of color names separated by space or by &rsquo;|&rsquo;.
  14303. Unrecognised or missing colors will be replaced by white color.
  14304. </p></dd>
  14305. </dl>
  14306. <a name="Examples-24"></a>
  14307. <h4 class="subsection">29.31.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-24" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-24" aria-hidden="true">TOC</a></span></h4>
  14308. <ul>
  14309. <li> Lower gain by 10 of central frequency 200Hz and width 100 Hz
  14310. for first 2 channels using Chebyshev type 1 filter:
  14311. <div class="example">
  14312. <pre class="example">anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
  14313. </pre></div>
  14314. </li></ul>
  14315. <a name="Commands-11"></a>
  14316. <h4 class="subsection">29.31.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-11" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-11" aria-hidden="true">TOC</a></span></h4>
  14317. <p>This filter supports the following commands:
  14318. </p><dl compact="compact">
  14319. <dt><samp>change</samp></dt>
  14320. <dd><p>Alter existing filter parameters.
  14321. Syntax for the commands is : &quot;<var>fN</var>|f=<var>freq</var>|w=<var>width</var>|g=<var>gain</var>&quot;
  14322. </p>
  14323. <p><var>fN</var> is existing filter number, starting from 0, if no such filter is available
  14324. error is returned.
  14325. <var>freq</var> set new frequency parameter.
  14326. <var>width</var> set new width parameter in Hertz.
  14327. <var>gain</var> set new gain parameter in dB.
  14328. </p>
  14329. <p>Full filter invocation with asendcmd may look like this:
  14330. asendcmd=c=&rsquo;4.0 anequalizer change 0|f=200|w=50|g=1&rsquo;,anequalizer=...
  14331. </p></dd>
  14332. </dl>
  14333. <a name="anlmdn"></a>
  14334. <h3 class="section">29.32 anlmdn<span class="pull-right"><a class="anchor hidden-xs" href="#anlmdn" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-anlmdn" aria-hidden="true">TOC</a></span></h3>
  14335. <p>Reduce broadband noise in audio samples using Non-Local Means algorithm.
  14336. </p>
  14337. <p>Each sample is adjusted by looking for other samples with similar contexts. This
  14338. context similarity is defined by comparing their surrounding patches of size
  14339. <samp>p</samp>. Patches are searched in an area of <samp>r</samp> around the sample.
  14340. </p>
  14341. <p>The filter accepts the following options:
  14342. </p>
  14343. <dl compact="compact">
  14344. <dt><samp>s</samp></dt>
  14345. <dd><p>Set denoising strength. Allowed range is from 0.00001 to 10. Default value is 0.00001.
  14346. </p>
  14347. </dd>
  14348. <dt><samp>p</samp></dt>
  14349. <dd><p>Set patch radius duration. Allowed range is from 1 to 100 milliseconds.
  14350. Default value is 2 milliseconds.
  14351. </p>
  14352. </dd>
  14353. <dt><samp>r</samp></dt>
  14354. <dd><p>Set research radius duration. Allowed range is from 2 to 300 milliseconds.
  14355. Default value is 6 milliseconds.
  14356. </p>
  14357. </dd>
  14358. <dt><samp>o</samp></dt>
  14359. <dd><p>Set the output mode.
  14360. </p>
  14361. <p>It accepts the following values:
  14362. </p><dl compact="compact">
  14363. <dt><samp>i</samp></dt>
  14364. <dd><p>Pass input unchanged.
  14365. </p>
  14366. </dd>
  14367. <dt><samp>o</samp></dt>
  14368. <dd><p>Pass noise filtered out.
  14369. </p>
  14370. </dd>
  14371. <dt><samp>n</samp></dt>
  14372. <dd><p>Pass only noise.
  14373. </p>
  14374. <p>Default value is <var>o</var>.
  14375. </p></dd>
  14376. </dl>
  14377. </dd>
  14378. <dt><samp>m</samp></dt>
  14379. <dd><p>Set smooth factor. Default value is <var>11</var>. Allowed range is from <var>1</var> to <var>15</var>.
  14380. </p></dd>
  14381. </dl>
  14382. <a name="Commands-12"></a>
  14383. <h4 class="subsection">29.32.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-12" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-12" aria-hidden="true">TOC</a></span></h4>
  14384. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  14385. </p>
  14386. <a name="anlms"></a>
  14387. <h3 class="section">29.33 anlms<span class="pull-right"><a class="anchor hidden-xs" href="#anlms" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-anlms" aria-hidden="true">TOC</a></span></h3>
  14388. <p>Apply Normalized Least-Mean-Squares algorithm to the first audio stream using the second audio stream.
  14389. </p>
  14390. <p>This adaptive filter is used to mimic a desired filter by finding the filter coefficients that
  14391. relate to producing the least mean square of the error signal (difference between the desired,
  14392. 2nd input audio stream and the actual signal, the 1st input audio stream).
  14393. </p>
  14394. <p>A description of the accepted options follows.
  14395. </p>
  14396. <dl compact="compact">
  14397. <dt><samp>order</samp></dt>
  14398. <dd><p>Set filter order.
  14399. </p>
  14400. </dd>
  14401. <dt><samp>mu</samp></dt>
  14402. <dd><p>Set filter mu.
  14403. </p>
  14404. </dd>
  14405. <dt><samp>eps</samp></dt>
  14406. <dd><p>Set the filter eps.
  14407. </p>
  14408. </dd>
  14409. <dt><samp>leakage</samp></dt>
  14410. <dd><p>Set the filter leakage.
  14411. </p>
  14412. </dd>
  14413. <dt><samp>out_mode</samp></dt>
  14414. <dd><p>It accepts the following values:
  14415. </p><dl compact="compact">
  14416. <dt><samp>i</samp></dt>
  14417. <dd><p>Pass the 1st input.
  14418. </p>
  14419. </dd>
  14420. <dt><samp>d</samp></dt>
  14421. <dd><p>Pass the 2nd input.
  14422. </p>
  14423. </dd>
  14424. <dt><samp>o</samp></dt>
  14425. <dd><p>Pass filtered samples.
  14426. </p>
  14427. </dd>
  14428. <dt><samp>n</samp></dt>
  14429. <dd><p>Pass difference between desired and filtered samples.
  14430. </p>
  14431. <p>Default value is <var>o</var>.
  14432. </p></dd>
  14433. </dl>
  14434. </dd>
  14435. </dl>
  14436. <a name="Examples-25"></a>
  14437. <h4 class="subsection">29.33.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-25" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-25" aria-hidden="true">TOC</a></span></h4>
  14438. <ul>
  14439. <li> One of many usages of this filter is noise reduction, input audio is filtered
  14440. with same samples that are delayed by fixed amount, one such example for stereo audio is:
  14441. <div class="example">
  14442. <pre class="example">asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
  14443. </pre></div>
  14444. </li></ul>
  14445. <a name="Commands-13"></a>
  14446. <h4 class="subsection">29.33.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-13" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-13" aria-hidden="true">TOC</a></span></h4>
  14447. <p>This filter supports the same commands as options, excluding option <code>order</code>.
  14448. </p>
  14449. <a name="anull"></a>
  14450. <h3 class="section">29.34 anull<span class="pull-right"><a class="anchor hidden-xs" href="#anull" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-anull" aria-hidden="true">TOC</a></span></h3>
  14451. <p>Pass the audio source unchanged to the output.
  14452. </p>
  14453. <a name="apad"></a>
  14454. <h3 class="section">29.35 apad<span class="pull-right"><a class="anchor hidden-xs" href="#apad" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-apad" aria-hidden="true">TOC</a></span></h3>
  14455. <p>Pad the end of an audio stream with silence.
  14456. </p>
  14457. <p>This can be used together with <code>ffmpeg</code> <samp>-shortest</samp> to
  14458. extend audio streams to the same length as the video stream.
  14459. </p>
  14460. <p>A description of the accepted options follows.
  14461. </p>
  14462. <dl compact="compact">
  14463. <dt><samp>packet_size</samp></dt>
  14464. <dd><p>Set silence packet size. Default value is 4096.
  14465. </p>
  14466. </dd>
  14467. <dt><samp>pad_len</samp></dt>
  14468. <dd><p>Set the number of samples of silence to add to the end. After the
  14469. value is reached, the stream is terminated. This option is mutually
  14470. exclusive with <samp>whole_len</samp>.
  14471. </p>
  14472. </dd>
  14473. <dt><samp>whole_len</samp></dt>
  14474. <dd><p>Set the minimum total number of samples in the output audio stream. If
  14475. the value is longer than the input audio length, silence is added to
  14476. the end, until the value is reached. This option is mutually exclusive
  14477. with <samp>pad_len</samp>.
  14478. </p>
  14479. </dd>
  14480. <dt><samp>pad_dur</samp></dt>
  14481. <dd><p>Specify the duration of samples of silence to add. See
  14482. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  14483. for the accepted syntax. Used only if set to non-zero value.
  14484. </p>
  14485. </dd>
  14486. <dt><samp>whole_dur</samp></dt>
  14487. <dd><p>Specify the minimum total duration in the output audio stream. See
  14488. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  14489. for the accepted syntax. Used only if set to non-zero value. If the value is longer than
  14490. the input audio length, silence is added to the end, until the value is reached.
  14491. This option is mutually exclusive with <samp>pad_dur</samp>
  14492. </p></dd>
  14493. </dl>
  14494. <p>If neither the <samp>pad_len</samp> nor the <samp>whole_len</samp> nor <samp>pad_dur</samp>
  14495. nor <samp>whole_dur</samp> option is set, the filter will add silence to the end of
  14496. the input stream indefinitely.
  14497. </p>
  14498. <a name="Examples-26"></a>
  14499. <h4 class="subsection">29.35.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-26" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-26" aria-hidden="true">TOC</a></span></h4>
  14500. <ul>
  14501. <li> Add 1024 samples of silence to the end of the input:
  14502. <div class="example">
  14503. <pre class="example">apad=pad_len=1024
  14504. </pre></div>
  14505. </li><li> Make sure the audio output will contain at least 10000 samples, pad
  14506. the input with silence if required:
  14507. <div class="example">
  14508. <pre class="example">apad=whole_len=10000
  14509. </pre></div>
  14510. </li><li> Use <code>ffmpeg</code> to pad the audio input with silence, so that the
  14511. video stream will always result the shortest and will be converted
  14512. until the end in the output file when using the <samp>shortest</samp>
  14513. option:
  14514. <div class="example">
  14515. <pre class="example">ffmpeg -i VIDEO -i AUDIO -filter_complex &quot;[1:0]apad&quot; -shortest OUTPUT
  14516. </pre></div>
  14517. </li></ul>
  14518. <a name="aphaser"></a>
  14519. <h3 class="section">29.36 aphaser<span class="pull-right"><a class="anchor hidden-xs" href="#aphaser" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aphaser" aria-hidden="true">TOC</a></span></h3>
  14520. <p>Add a phasing effect to the input audio.
  14521. </p>
  14522. <p>A phaser filter creates series of peaks and troughs in the frequency spectrum.
  14523. The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect.
  14524. </p>
  14525. <p>A description of the accepted parameters follows.
  14526. </p>
  14527. <dl compact="compact">
  14528. <dt><samp>in_gain</samp></dt>
  14529. <dd><p>Set input gain. Default is 0.4.
  14530. </p>
  14531. </dd>
  14532. <dt><samp>out_gain</samp></dt>
  14533. <dd><p>Set output gain. Default is 0.74
  14534. </p>
  14535. </dd>
  14536. <dt><samp>delay</samp></dt>
  14537. <dd><p>Set delay in milliseconds. Default is 3.0.
  14538. </p>
  14539. </dd>
  14540. <dt><samp>decay</samp></dt>
  14541. <dd><p>Set decay. Default is 0.4.
  14542. </p>
  14543. </dd>
  14544. <dt><samp>speed</samp></dt>
  14545. <dd><p>Set modulation speed in Hz. Default is 0.5.
  14546. </p>
  14547. </dd>
  14548. <dt><samp>type</samp></dt>
  14549. <dd><p>Set modulation type. Default is triangular.
  14550. </p>
  14551. <p>It accepts the following values:
  14552. </p><dl compact="compact">
  14553. <dt>&lsquo;<samp>triangular, t</samp>&rsquo;</dt>
  14554. <dt>&lsquo;<samp>sinusoidal, s</samp>&rsquo;</dt>
  14555. </dl>
  14556. </dd>
  14557. </dl>
  14558. <a name="aphaseshift"></a>
  14559. <h3 class="section">29.37 aphaseshift<span class="pull-right"><a class="anchor hidden-xs" href="#aphaseshift" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aphaseshift" aria-hidden="true">TOC</a></span></h3>
  14560. <p>Apply phase shift to input audio samples.
  14561. </p>
  14562. <p>The filter accepts the following options:
  14563. </p>
  14564. <dl compact="compact">
  14565. <dt><samp>shift</samp></dt>
  14566. <dd><p>Specify phase shift. Allowed range is from -1.0 to 1.0.
  14567. Default value is 0.0.
  14568. </p>
  14569. </dd>
  14570. <dt><samp>level</samp></dt>
  14571. <dd><p>Set output gain applied to final output. Allowed range is from 0.0 to 1.0.
  14572. Default value is 1.0.
  14573. </p></dd>
  14574. </dl>
  14575. <a name="Commands-14"></a>
  14576. <h4 class="subsection">29.37.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-14" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-14" aria-hidden="true">TOC</a></span></h4>
  14577. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  14578. </p>
  14579. <a name="apulsator"></a>
  14580. <h3 class="section">29.38 apulsator<span class="pull-right"><a class="anchor hidden-xs" href="#apulsator" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-apulsator" aria-hidden="true">TOC</a></span></h3>
  14581. <p>Audio pulsator is something between an autopanner and a tremolo.
  14582. But it can produce funny stereo effects as well. Pulsator changes the volume
  14583. of the left and right channel based on a LFO (low frequency oscillator) with
  14584. different waveforms and shifted phases.
  14585. This filter have the ability to define an offset between left and right
  14586. channel. An offset of 0 means that both LFO shapes match each other.
  14587. The left and right channel are altered equally - a conventional tremolo.
  14588. An offset of 50% means that the shape of the right channel is exactly shifted
  14589. in phase (or moved backwards about half of the frequency) - pulsator acts as
  14590. an autopanner. At 1 both curves match again. Every setting in between moves the
  14591. phase shift gapless between all stages and produces some &quot;bypassing&quot; sounds with
  14592. sine and triangle waveforms. The more you set the offset near 1 (starting from
  14593. the 0.5) the faster the signal passes from the left to the right speaker.
  14594. </p>
  14595. <p>The filter accepts the following options:
  14596. </p>
  14597. <dl compact="compact">
  14598. <dt><samp>level_in</samp></dt>
  14599. <dd><p>Set input gain. By default it is 1. Range is [0.015625 - 64].
  14600. </p>
  14601. </dd>
  14602. <dt><samp>level_out</samp></dt>
  14603. <dd><p>Set output gain. By default it is 1. Range is [0.015625 - 64].
  14604. </p>
  14605. </dd>
  14606. <dt><samp>mode</samp></dt>
  14607. <dd><p>Set waveform shape the LFO will use. Can be one of: sine, triangle, square,
  14608. sawup or sawdown. Default is sine.
  14609. </p>
  14610. </dd>
  14611. <dt><samp>amount</samp></dt>
  14612. <dd><p>Set modulation. Define how much of original signal is affected by the LFO.
  14613. </p>
  14614. </dd>
  14615. <dt><samp>offset_l</samp></dt>
  14616. <dd><p>Set left channel offset. Default is 0. Allowed range is [0 - 1].
  14617. </p>
  14618. </dd>
  14619. <dt><samp>offset_r</samp></dt>
  14620. <dd><p>Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
  14621. </p>
  14622. </dd>
  14623. <dt><samp>width</samp></dt>
  14624. <dd><p>Set pulse width. Default is 1. Allowed range is [0 - 2].
  14625. </p>
  14626. </dd>
  14627. <dt><samp>timing</samp></dt>
  14628. <dd><p>Set possible timing mode. Can be one of: bpm, ms or hz. Default is hz.
  14629. </p>
  14630. </dd>
  14631. <dt><samp>bpm</samp></dt>
  14632. <dd><p>Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if timing
  14633. is set to bpm.
  14634. </p>
  14635. </dd>
  14636. <dt><samp>ms</samp></dt>
  14637. <dd><p>Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if timing
  14638. is set to ms.
  14639. </p>
  14640. </dd>
  14641. <dt><samp>hz</samp></dt>
  14642. <dd><p>Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100]. Only used
  14643. if timing is set to hz.
  14644. </p></dd>
  14645. </dl>
  14646. <span id="aresample"></span><a name="aresample-1"></a>
  14647. <h3 class="section">29.39 aresample<span class="pull-right"><a class="anchor hidden-xs" href="#aresample-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aresample-1" aria-hidden="true">TOC</a></span></h3>
  14648. <p>Resample the input audio to the specified parameters, using the
  14649. libswresample library. If none are specified then the filter will
  14650. automatically convert between its input and output.
  14651. </p>
  14652. <p>This filter is also able to stretch/squeeze the audio data to make it match
  14653. the timestamps or to inject silence / cut out audio to make it match the
  14654. timestamps, do a combination of both or do neither.
  14655. </p>
  14656. <p>The filter accepts the syntax
  14657. [<var>sample_rate</var>:]<var>resampler_options</var>, where <var>sample_rate</var>
  14658. expresses a sample rate and <var>resampler_options</var> is a list of
  14659. <var>key</var>=<var>value</var> pairs, separated by &quot;:&quot;. See the
  14660. <a href="ffmpeg-resampler.html#Resampler-Options">(ffmpeg-resampler)&quot;Resampler Options&quot; section in the
  14661. ffmpeg-resampler(1) manual</a>
  14662. for the complete list of supported options.
  14663. </p>
  14664. <a name="Examples-27"></a>
  14665. <h4 class="subsection">29.39.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-27" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-27" aria-hidden="true">TOC</a></span></h4>
  14666. <ul>
  14667. <li> Resample the input audio to 44100Hz:
  14668. <div class="example">
  14669. <pre class="example">aresample=44100
  14670. </pre></div>
  14671. </li><li> Stretch/squeeze samples to the given timestamps, with a maximum of 1000
  14672. samples per second compensation:
  14673. <div class="example">
  14674. <pre class="example">aresample=async=1000
  14675. </pre></div>
  14676. </li></ul>
  14677. <a name="areverse"></a>
  14678. <h3 class="section">29.40 areverse<span class="pull-right"><a class="anchor hidden-xs" href="#areverse" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-areverse" aria-hidden="true">TOC</a></span></h3>
  14679. <p>Reverse an audio clip.
  14680. </p>
  14681. <p>Warning: This filter requires memory to buffer the entire clip, so trimming
  14682. is suggested.
  14683. </p>
  14684. <a name="Examples-28"></a>
  14685. <h4 class="subsection">29.40.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-28" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-28" aria-hidden="true">TOC</a></span></h4>
  14686. <ul>
  14687. <li> Take the first 5 seconds of a clip, and reverse it.
  14688. <div class="example">
  14689. <pre class="example">atrim=end=5,areverse
  14690. </pre></div>
  14691. </li></ul>
  14692. <a name="arnndn"></a>
  14693. <h3 class="section">29.41 arnndn<span class="pull-right"><a class="anchor hidden-xs" href="#arnndn" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-arnndn" aria-hidden="true">TOC</a></span></h3>
  14694. <p>Reduce noise from speech using Recurrent Neural Networks.
  14695. </p>
  14696. <p>This filter accepts the following options:
  14697. </p>
  14698. <dl compact="compact">
  14699. <dt><samp>model, m</samp></dt>
  14700. <dd><p>Set train model file to load. This option is always required.
  14701. </p>
  14702. </dd>
  14703. <dt><samp>mix</samp></dt>
  14704. <dd><p>Set how much to mix filtered samples into final output.
  14705. Allowed range is from -1 to 1. Default value is 1.
  14706. Negative values are special, they set how much to keep filtered noise
  14707. in the final filter output. Set this option to -1 to hear actual
  14708. noise removed from input signal.
  14709. </p></dd>
  14710. </dl>
  14711. <a name="Commands-15"></a>
  14712. <h4 class="subsection">29.41.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-15" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-15" aria-hidden="true">TOC</a></span></h4>
  14713. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  14714. </p>
  14715. <a name="asetnsamples"></a>
  14716. <h3 class="section">29.42 asetnsamples<span class="pull-right"><a class="anchor hidden-xs" href="#asetnsamples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asetnsamples" aria-hidden="true">TOC</a></span></h3>
  14717. <p>Set the number of samples per each output audio frame.
  14718. </p>
  14719. <p>The last output packet may contain a different number of samples, as
  14720. the filter will flush all the remaining samples when the input audio
  14721. signals its end.
  14722. </p>
  14723. <p>The filter accepts the following options:
  14724. </p>
  14725. <dl compact="compact">
  14726. <dt><samp>nb_out_samples, n</samp></dt>
  14727. <dd><p>Set the number of frames per each output audio frame. The number is
  14728. intended as the number of samples <em>per each channel</em>.
  14729. Default value is 1024.
  14730. </p>
  14731. </dd>
  14732. <dt><samp>pad, p</samp></dt>
  14733. <dd><p>If set to 1, the filter will pad the last audio frame with zeroes, so
  14734. that the last frame will contain the same number of samples as the
  14735. previous ones. Default value is 1.
  14736. </p></dd>
  14737. </dl>
  14738. <p>For example, to set the number of per-frame samples to 1234 and
  14739. disable padding for the last frame, use:
  14740. </p><div class="example">
  14741. <pre class="example">asetnsamples=n=1234:p=0
  14742. </pre></div>
  14743. <a name="asetrate"></a>
  14744. <h3 class="section">29.43 asetrate<span class="pull-right"><a class="anchor hidden-xs" href="#asetrate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asetrate" aria-hidden="true">TOC</a></span></h3>
  14745. <p>Set the sample rate without altering the PCM data.
  14746. This will result in a change of speed and pitch.
  14747. </p>
  14748. <p>The filter accepts the following options:
  14749. </p>
  14750. <dl compact="compact">
  14751. <dt><samp>sample_rate, r</samp></dt>
  14752. <dd><p>Set the output sample rate. Default is 44100 Hz.
  14753. </p></dd>
  14754. </dl>
  14755. <a name="ashowinfo"></a>
  14756. <h3 class="section">29.44 ashowinfo<span class="pull-right"><a class="anchor hidden-xs" href="#ashowinfo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ashowinfo" aria-hidden="true">TOC</a></span></h3>
  14757. <p>Show a line containing various information for each input audio frame.
  14758. The input audio is not modified.
  14759. </p>
  14760. <p>The shown line contains a sequence of key/value pairs of the form
  14761. <var>key</var>:<var>value</var>.
  14762. </p>
  14763. <p>The following values are shown in the output:
  14764. </p>
  14765. <dl compact="compact">
  14766. <dt><samp>n</samp></dt>
  14767. <dd><p>The (sequential) number of the input frame, starting from 0.
  14768. </p>
  14769. </dd>
  14770. <dt><samp>pts</samp></dt>
  14771. <dd><p>The presentation timestamp of the input frame, in time base units; the time base
  14772. depends on the filter input pad, and is usually 1/<var>sample_rate</var>.
  14773. </p>
  14774. </dd>
  14775. <dt><samp>pts_time</samp></dt>
  14776. <dd><p>The presentation timestamp of the input frame in seconds.
  14777. </p>
  14778. </dd>
  14779. <dt><samp>pos</samp></dt>
  14780. <dd><p>position of the frame in the input stream, -1 if this information in
  14781. unavailable and/or meaningless (for example in case of synthetic audio)
  14782. </p>
  14783. </dd>
  14784. <dt><samp>fmt</samp></dt>
  14785. <dd><p>The sample format.
  14786. </p>
  14787. </dd>
  14788. <dt><samp>chlayout</samp></dt>
  14789. <dd><p>The channel layout.
  14790. </p>
  14791. </dd>
  14792. <dt><samp>rate</samp></dt>
  14793. <dd><p>The sample rate for the audio frame.
  14794. </p>
  14795. </dd>
  14796. <dt><samp>nb_samples</samp></dt>
  14797. <dd><p>The number of samples (per channel) in the frame.
  14798. </p>
  14799. </dd>
  14800. <dt><samp>checksum</samp></dt>
  14801. <dd><p>The Adler-32 checksum (printed in hexadecimal) of the audio data. For planar
  14802. audio, the data is treated as if all the planes were concatenated.
  14803. </p>
  14804. </dd>
  14805. <dt><samp>plane_checksums</samp></dt>
  14806. <dd><p>A list of Adler-32 checksums for each data plane.
  14807. </p></dd>
  14808. </dl>
  14809. <a name="asoftclip"></a>
  14810. <h3 class="section">29.45 asoftclip<span class="pull-right"><a class="anchor hidden-xs" href="#asoftclip" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asoftclip" aria-hidden="true">TOC</a></span></h3>
  14811. <p>Apply audio soft clipping.
  14812. </p>
  14813. <p>Soft clipping is a type of distortion effect where the amplitude of a signal is saturated
  14814. along a smooth curve, rather than the abrupt shape of hard-clipping.
  14815. </p>
  14816. <p>This filter accepts the following options:
  14817. </p>
  14818. <dl compact="compact">
  14819. <dt><samp>type</samp></dt>
  14820. <dd><p>Set type of soft-clipping.
  14821. </p>
  14822. <p>It accepts the following values:
  14823. </p><dl compact="compact">
  14824. <dt><samp>hard</samp></dt>
  14825. <dt><samp>tanh</samp></dt>
  14826. <dt><samp>atan</samp></dt>
  14827. <dt><samp>cubic</samp></dt>
  14828. <dt><samp>exp</samp></dt>
  14829. <dt><samp>alg</samp></dt>
  14830. <dt><samp>quintic</samp></dt>
  14831. <dt><samp>sin</samp></dt>
  14832. <dt><samp>erf</samp></dt>
  14833. </dl>
  14834. </dd>
  14835. <dt><samp>threshold</samp></dt>
  14836. <dd><p>Set threshold from where to start clipping. Default value is 0dB or 1.
  14837. </p>
  14838. </dd>
  14839. <dt><samp>output</samp></dt>
  14840. <dd><p>Set gain applied to output. Default value is 0dB or 1.
  14841. </p>
  14842. </dd>
  14843. <dt><samp>param</samp></dt>
  14844. <dd><p>Set additional parameter which controls sigmoid function.
  14845. </p>
  14846. </dd>
  14847. <dt><samp>oversample</samp></dt>
  14848. <dd><p>Set oversampling factor.
  14849. </p></dd>
  14850. </dl>
  14851. <a name="Commands-16"></a>
  14852. <h4 class="subsection">29.45.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-16" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-16" aria-hidden="true">TOC</a></span></h4>
  14853. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  14854. </p>
  14855. <a name="asr"></a>
  14856. <h3 class="section">29.46 asr<span class="pull-right"><a class="anchor hidden-xs" href="#asr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asr" aria-hidden="true">TOC</a></span></h3>
  14857. <p>Automatic Speech Recognition
  14858. </p>
  14859. <p>This filter uses PocketSphinx for speech recognition. To enable
  14860. compilation of this filter, you need to configure FFmpeg with
  14861. <code>--enable-pocketsphinx</code>.
  14862. </p>
  14863. <p>It accepts the following options:
  14864. </p>
  14865. <dl compact="compact">
  14866. <dt><samp>rate</samp></dt>
  14867. <dd><p>Set sampling rate of input audio. Defaults is <code>16000</code>.
  14868. This need to match speech models, otherwise one will get poor results.
  14869. </p>
  14870. </dd>
  14871. <dt><samp>hmm</samp></dt>
  14872. <dd><p>Set dictionary containing acoustic model files.
  14873. </p>
  14874. </dd>
  14875. <dt><samp>dict</samp></dt>
  14876. <dd><p>Set pronunciation dictionary.
  14877. </p>
  14878. </dd>
  14879. <dt><samp>lm</samp></dt>
  14880. <dd><p>Set language model file.
  14881. </p>
  14882. </dd>
  14883. <dt><samp>lmctl</samp></dt>
  14884. <dd><p>Set language model set.
  14885. </p>
  14886. </dd>
  14887. <dt><samp>lmname</samp></dt>
  14888. <dd><p>Set which language model to use.
  14889. </p>
  14890. </dd>
  14891. <dt><samp>logfn</samp></dt>
  14892. <dd><p>Set output for log messages.
  14893. </p></dd>
  14894. </dl>
  14895. <p>The filter exports recognized speech as the frame metadata <code>lavfi.asr.text</code>.
  14896. </p>
  14897. <span id="astats"></span><a name="astats-1"></a>
  14898. <h3 class="section">29.47 astats<span class="pull-right"><a class="anchor hidden-xs" href="#astats-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-astats-1" aria-hidden="true">TOC</a></span></h3>
  14899. <p>Display time domain statistical information about the audio channels.
  14900. Statistics are calculated and displayed for each audio channel and,
  14901. where applicable, an overall figure is also given.
  14902. </p>
  14903. <p>It accepts the following option:
  14904. </p><dl compact="compact">
  14905. <dt><samp>length</samp></dt>
  14906. <dd><p>Short window length in seconds, used for peak and trough RMS measurement.
  14907. Default is <code>0.05</code> (50 milliseconds). Allowed range is <code>[0.01 - 10]</code>.
  14908. </p>
  14909. </dd>
  14910. <dt><samp>metadata</samp></dt>
  14911. <dd>
  14912. <p>Set metadata injection. All the metadata keys are prefixed with <code>lavfi.astats.X</code>,
  14913. where <code>X</code> is channel number starting from 1 or string <code>Overall</code>. Default is
  14914. disabled.
  14915. </p>
  14916. <p>Available keys for each channel are:
  14917. DC_offset
  14918. Min_level
  14919. Max_level
  14920. Min_difference
  14921. Max_difference
  14922. Mean_difference
  14923. RMS_difference
  14924. Peak_level
  14925. RMS_peak
  14926. RMS_trough
  14927. Crest_factor
  14928. Flat_factor
  14929. Peak_count
  14930. Noise_floor
  14931. Noise_floor_count
  14932. Bit_depth
  14933. Dynamic_range
  14934. Zero_crossings
  14935. Zero_crossings_rate
  14936. Number_of_NaNs
  14937. Number_of_Infs
  14938. Number_of_denormals
  14939. </p>
  14940. <p>and for Overall:
  14941. DC_offset
  14942. Min_level
  14943. Max_level
  14944. Min_difference
  14945. Max_difference
  14946. Mean_difference
  14947. RMS_difference
  14948. Peak_level
  14949. RMS_level
  14950. RMS_peak
  14951. RMS_trough
  14952. Flat_factor
  14953. Peak_count
  14954. Noise_floor
  14955. Noise_floor_count
  14956. Bit_depth
  14957. Number_of_samples
  14958. Number_of_NaNs
  14959. Number_of_Infs
  14960. Number_of_denormals
  14961. </p>
  14962. <p>For example full key look like this <code>lavfi.astats.1.DC_offset</code> or
  14963. this <code>lavfi.astats.Overall.Peak_count</code>.
  14964. </p>
  14965. <p>For description what each key means read below.
  14966. </p>
  14967. </dd>
  14968. <dt><samp>reset</samp></dt>
  14969. <dd><p>Set number of frame after which stats are going to be recalculated.
  14970. Default is disabled.
  14971. </p>
  14972. </dd>
  14973. <dt><samp>measure_perchannel</samp></dt>
  14974. <dd><p>Select the entries which need to be measured per channel. The metadata keys can
  14975. be used as flags, default is <samp>all</samp> which measures everything.
  14976. <samp>none</samp> disables all per channel measurement.
  14977. </p>
  14978. </dd>
  14979. <dt><samp>measure_overall</samp></dt>
  14980. <dd><p>Select the entries which need to be measured overall. The metadata keys can
  14981. be used as flags, default is <samp>all</samp> which measures everything.
  14982. <samp>none</samp> disables all overall measurement.
  14983. </p>
  14984. </dd>
  14985. </dl>
  14986. <p>A description of each shown parameter follows:
  14987. </p>
  14988. <dl compact="compact">
  14989. <dt><samp>DC offset</samp></dt>
  14990. <dd><p>Mean amplitude displacement from zero.
  14991. </p>
  14992. </dd>
  14993. <dt><samp>Min level</samp></dt>
  14994. <dd><p>Minimal sample level.
  14995. </p>
  14996. </dd>
  14997. <dt><samp>Max level</samp></dt>
  14998. <dd><p>Maximal sample level.
  14999. </p>
  15000. </dd>
  15001. <dt><samp>Min difference</samp></dt>
  15002. <dd><p>Minimal difference between two consecutive samples.
  15003. </p>
  15004. </dd>
  15005. <dt><samp>Max difference</samp></dt>
  15006. <dd><p>Maximal difference between two consecutive samples.
  15007. </p>
  15008. </dd>
  15009. <dt><samp>Mean difference</samp></dt>
  15010. <dd><p>Mean difference between two consecutive samples.
  15011. The average of each difference between two consecutive samples.
  15012. </p>
  15013. </dd>
  15014. <dt><samp>RMS difference</samp></dt>
  15015. <dd><p>Root Mean Square difference between two consecutive samples.
  15016. </p>
  15017. </dd>
  15018. <dt><samp>Peak level dB</samp></dt>
  15019. <dt><samp>RMS level dB</samp></dt>
  15020. <dd><p>Standard peak and RMS level measured in dBFS.
  15021. </p>
  15022. </dd>
  15023. <dt><samp>RMS peak dB</samp></dt>
  15024. <dt><samp>RMS trough dB</samp></dt>
  15025. <dd><p>Peak and trough values for RMS level measured over a short window.
  15026. </p>
  15027. </dd>
  15028. <dt><samp>Crest factor</samp></dt>
  15029. <dd><p>Standard ratio of peak to RMS level (note: not in dB).
  15030. </p>
  15031. </dd>
  15032. <dt><samp>Flat factor</samp></dt>
  15033. <dd><p>Flatness (i.e. consecutive samples with the same value) of the signal at its peak levels
  15034. (i.e. either <var>Min level</var> or <var>Max level</var>).
  15035. </p>
  15036. </dd>
  15037. <dt><samp>Peak count</samp></dt>
  15038. <dd><p>Number of occasions (not the number of samples) that the signal attained either
  15039. <var>Min level</var> or <var>Max level</var>.
  15040. </p>
  15041. </dd>
  15042. <dt><samp>Noise floor dB</samp></dt>
  15043. <dd><p>Minimum local peak measured in dBFS over a short window.
  15044. </p>
  15045. </dd>
  15046. <dt><samp>Noise floor count</samp></dt>
  15047. <dd><p>Number of occasions (not the number of samples) that the signal attained
  15048. <var>Noise floor</var>.
  15049. </p>
  15050. </dd>
  15051. <dt><samp>Bit depth</samp></dt>
  15052. <dd><p>Overall bit depth of audio. Number of bits used for each sample.
  15053. </p>
  15054. </dd>
  15055. <dt><samp>Dynamic range</samp></dt>
  15056. <dd><p>Measured dynamic range of audio in dB.
  15057. </p>
  15058. </dd>
  15059. <dt><samp>Zero crossings</samp></dt>
  15060. <dd><p>Number of points where the waveform crosses the zero level axis.
  15061. </p>
  15062. </dd>
  15063. <dt><samp>Zero crossings rate</samp></dt>
  15064. <dd><p>Rate of Zero crossings and number of audio samples.
  15065. </p></dd>
  15066. </dl>
  15067. <a name="asubboost"></a>
  15068. <h3 class="section">29.48 asubboost<span class="pull-right"><a class="anchor hidden-xs" href="#asubboost" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asubboost" aria-hidden="true">TOC</a></span></h3>
  15069. <p>Boost subwoofer frequencies.
  15070. </p>
  15071. <p>The filter accepts the following options:
  15072. </p>
  15073. <dl compact="compact">
  15074. <dt><samp>dry</samp></dt>
  15075. <dd><p>Set dry gain, how much of original signal is kept. Allowed range is from 0 to 1.
  15076. Default value is 0.7.
  15077. </p>
  15078. </dd>
  15079. <dt><samp>wet</samp></dt>
  15080. <dd><p>Set wet gain, how much of filtered signal is kept. Allowed range is from 0 to 1.
  15081. Default value is 0.7.
  15082. </p>
  15083. </dd>
  15084. <dt><samp>decay</samp></dt>
  15085. <dd><p>Set delay line decay gain value. Allowed range is from 0 to 1.
  15086. Default value is 0.7.
  15087. </p>
  15088. </dd>
  15089. <dt><samp>feedback</samp></dt>
  15090. <dd><p>Set delay line feedback gain value. Allowed range is from 0 to 1.
  15091. Default value is 0.9.
  15092. </p>
  15093. </dd>
  15094. <dt><samp>cutoff</samp></dt>
  15095. <dd><p>Set cutoff frequency in Hertz. Allowed range is 50 to 900.
  15096. Default value is 100.
  15097. </p>
  15098. </dd>
  15099. <dt><samp>slope</samp></dt>
  15100. <dd><p>Set slope amount for cutoff frequency. Allowed range is 0.0001 to 1.
  15101. Default value is 0.5.
  15102. </p>
  15103. </dd>
  15104. <dt><samp>delay</samp></dt>
  15105. <dd><p>Set delay. Allowed range is from 1 to 100.
  15106. Default value is 20.
  15107. </p></dd>
  15108. </dl>
  15109. <a name="Commands-17"></a>
  15110. <h4 class="subsection">29.48.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-17" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-17" aria-hidden="true">TOC</a></span></h4>
  15111. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  15112. </p>
  15113. <a name="asubcut"></a>
  15114. <h3 class="section">29.49 asubcut<span class="pull-right"><a class="anchor hidden-xs" href="#asubcut" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asubcut" aria-hidden="true">TOC</a></span></h3>
  15115. <p>Cut subwoofer frequencies.
  15116. </p>
  15117. <p>This filter allows to set custom, steeper
  15118. roll off than highpass filter, and thus is able to more attenuate
  15119. frequency content in stop-band.
  15120. </p>
  15121. <p>The filter accepts the following options:
  15122. </p>
  15123. <dl compact="compact">
  15124. <dt><samp>cutoff</samp></dt>
  15125. <dd><p>Set cutoff frequency in Hertz. Allowed range is 2 to 200.
  15126. Default value is 20.
  15127. </p>
  15128. </dd>
  15129. <dt><samp>order</samp></dt>
  15130. <dd><p>Set filter order. Available values are from 3 to 20.
  15131. Default value is 10.
  15132. </p>
  15133. </dd>
  15134. <dt><samp>level</samp></dt>
  15135. <dd><p>Set input gain level. Allowed range is from 0 to 1. Default value is 1.
  15136. </p></dd>
  15137. </dl>
  15138. <a name="Commands-18"></a>
  15139. <h4 class="subsection">29.49.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-18" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-18" aria-hidden="true">TOC</a></span></h4>
  15140. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  15141. </p>
  15142. <a name="asupercut"></a>
  15143. <h3 class="section">29.50 asupercut<span class="pull-right"><a class="anchor hidden-xs" href="#asupercut" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asupercut" aria-hidden="true">TOC</a></span></h3>
  15144. <p>Cut super frequencies.
  15145. </p>
  15146. <p>The filter accepts the following options:
  15147. </p>
  15148. <dl compact="compact">
  15149. <dt><samp>cutoff</samp></dt>
  15150. <dd><p>Set cutoff frequency in Hertz. Allowed range is 20000 to 192000.
  15151. Default value is 20000.
  15152. </p>
  15153. </dd>
  15154. <dt><samp>order</samp></dt>
  15155. <dd><p>Set filter order. Available values are from 3 to 20.
  15156. Default value is 10.
  15157. </p>
  15158. </dd>
  15159. <dt><samp>level</samp></dt>
  15160. <dd><p>Set input gain level. Allowed range is from 0 to 1. Default value is 1.
  15161. </p></dd>
  15162. </dl>
  15163. <a name="Commands-19"></a>
  15164. <h4 class="subsection">29.50.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-19" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-19" aria-hidden="true">TOC</a></span></h4>
  15165. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  15166. </p>
  15167. <a name="asuperpass"></a>
  15168. <h3 class="section">29.51 asuperpass<span class="pull-right"><a class="anchor hidden-xs" href="#asuperpass" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asuperpass" aria-hidden="true">TOC</a></span></h3>
  15169. <p>Apply high order Butterworth band-pass filter.
  15170. </p>
  15171. <p>The filter accepts the following options:
  15172. </p>
  15173. <dl compact="compact">
  15174. <dt><samp>centerf</samp></dt>
  15175. <dd><p>Set center frequency in Hertz. Allowed range is 2 to 999999.
  15176. Default value is 1000.
  15177. </p>
  15178. </dd>
  15179. <dt><samp>order</samp></dt>
  15180. <dd><p>Set filter order. Available values are from 4 to 20.
  15181. Default value is 4.
  15182. </p>
  15183. </dd>
  15184. <dt><samp>qfactor</samp></dt>
  15185. <dd><p>Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1.
  15186. </p>
  15187. </dd>
  15188. <dt><samp>level</samp></dt>
  15189. <dd><p>Set input gain level. Allowed range is from 0 to 2. Default value is 1.
  15190. </p></dd>
  15191. </dl>
  15192. <a name="Commands-20"></a>
  15193. <h4 class="subsection">29.51.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-20" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-20" aria-hidden="true">TOC</a></span></h4>
  15194. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  15195. </p>
  15196. <a name="asuperstop"></a>
  15197. <h3 class="section">29.52 asuperstop<span class="pull-right"><a class="anchor hidden-xs" href="#asuperstop" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-asuperstop" aria-hidden="true">TOC</a></span></h3>
  15198. <p>Apply high order Butterworth band-stop filter.
  15199. </p>
  15200. <p>The filter accepts the following options:
  15201. </p>
  15202. <dl compact="compact">
  15203. <dt><samp>centerf</samp></dt>
  15204. <dd><p>Set center frequency in Hertz. Allowed range is 2 to 999999.
  15205. Default value is 1000.
  15206. </p>
  15207. </dd>
  15208. <dt><samp>order</samp></dt>
  15209. <dd><p>Set filter order. Available values are from 4 to 20.
  15210. Default value is 4.
  15211. </p>
  15212. </dd>
  15213. <dt><samp>qfactor</samp></dt>
  15214. <dd><p>Set Q-factor. Allowed range is from 0.01 to 100. Default value is 1.
  15215. </p>
  15216. </dd>
  15217. <dt><samp>level</samp></dt>
  15218. <dd><p>Set input gain level. Allowed range is from 0 to 2. Default value is 1.
  15219. </p></dd>
  15220. </dl>
  15221. <a name="Commands-21"></a>
  15222. <h4 class="subsection">29.52.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-21" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-21" aria-hidden="true">TOC</a></span></h4>
  15223. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  15224. </p>
  15225. <a name="atempo"></a>
  15226. <h3 class="section">29.53 atempo<span class="pull-right"><a class="anchor hidden-xs" href="#atempo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-atempo" aria-hidden="true">TOC</a></span></h3>
  15227. <p>Adjust audio tempo.
  15228. </p>
  15229. <p>The filter accepts exactly one parameter, the audio tempo. If not
  15230. specified then the filter will assume nominal 1.0 tempo. Tempo must
  15231. be in the [0.5, 100.0] range.
  15232. </p>
  15233. <p>Note that tempo greater than 2 will skip some samples rather than
  15234. blend them in. If for any reason this is a concern it is always
  15235. possible to daisy-chain several instances of atempo to achieve the
  15236. desired product tempo.
  15237. </p>
  15238. <a name="Examples-29"></a>
  15239. <h4 class="subsection">29.53.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-29" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-29" aria-hidden="true">TOC</a></span></h4>
  15240. <ul>
  15241. <li> Slow down audio to 80% tempo:
  15242. <div class="example">
  15243. <pre class="example">atempo=0.8
  15244. </pre></div>
  15245. </li><li> To speed up audio to 300% tempo:
  15246. <div class="example">
  15247. <pre class="example">atempo=3
  15248. </pre></div>
  15249. </li><li> To speed up audio to 300% tempo by daisy-chaining two atempo instances:
  15250. <div class="example">
  15251. <pre class="example">atempo=sqrt(3),atempo=sqrt(3)
  15252. </pre></div>
  15253. </li></ul>
  15254. <a name="Commands-22"></a>
  15255. <h4 class="subsection">29.53.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-22" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-22" aria-hidden="true">TOC</a></span></h4>
  15256. <p>This filter supports the following commands:
  15257. </p><dl compact="compact">
  15258. <dt><samp>tempo</samp></dt>
  15259. <dd><p>Change filter tempo scale factor.
  15260. Syntax for the command is : &quot;<var>tempo</var>&quot;
  15261. </p></dd>
  15262. </dl>
  15263. <a name="atrim"></a>
  15264. <h3 class="section">29.54 atrim<span class="pull-right"><a class="anchor hidden-xs" href="#atrim" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-atrim" aria-hidden="true">TOC</a></span></h3>
  15265. <p>Trim the input so that the output contains one continuous subpart of the input.
  15266. </p>
  15267. <p>It accepts the following parameters:
  15268. </p><dl compact="compact">
  15269. <dt><samp>start</samp></dt>
  15270. <dd><p>Timestamp (in seconds) of the start of the section to keep. I.e. the audio
  15271. sample with the timestamp <var>start</var> will be the first sample in the output.
  15272. </p>
  15273. </dd>
  15274. <dt><samp>end</samp></dt>
  15275. <dd><p>Specify time of the first audio sample that will be dropped, i.e. the
  15276. audio sample immediately preceding the one with the timestamp <var>end</var> will be
  15277. the last sample in the output.
  15278. </p>
  15279. </dd>
  15280. <dt><samp>start_pts</samp></dt>
  15281. <dd><p>Same as <var>start</var>, except this option sets the start timestamp in samples
  15282. instead of seconds.
  15283. </p>
  15284. </dd>
  15285. <dt><samp>end_pts</samp></dt>
  15286. <dd><p>Same as <var>end</var>, except this option sets the end timestamp in samples instead
  15287. of seconds.
  15288. </p>
  15289. </dd>
  15290. <dt><samp>duration</samp></dt>
  15291. <dd><p>The maximum duration of the output in seconds.
  15292. </p>
  15293. </dd>
  15294. <dt><samp>start_sample</samp></dt>
  15295. <dd><p>The number of the first sample that should be output.
  15296. </p>
  15297. </dd>
  15298. <dt><samp>end_sample</samp></dt>
  15299. <dd><p>The number of the first sample that should be dropped.
  15300. </p></dd>
  15301. </dl>
  15302. <p><samp>start</samp>, <samp>end</samp>, and <samp>duration</samp> are expressed as time
  15303. duration specifications; see
  15304. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  15305. </p>
  15306. <p>Note that the first two sets of the start/end options and the <samp>duration</samp>
  15307. option look at the frame timestamp, while the _sample options simply count the
  15308. samples that pass through the filter. So start/end_pts and start/end_sample will
  15309. give different results when the timestamps are wrong, inexact or do not start at
  15310. zero. Also note that this filter does not modify the timestamps. If you wish
  15311. to have the output timestamps start at zero, insert the asetpts filter after the
  15312. atrim filter.
  15313. </p>
  15314. <p>If multiple start or end options are set, this filter tries to be greedy and
  15315. keep all samples that match at least one of the specified constraints. To keep
  15316. only the part that matches all the constraints at once, chain multiple atrim
  15317. filters.
  15318. </p>
  15319. <p>The defaults are such that all the input is kept. So it is possible to set e.g.
  15320. just the end values to keep everything before the specified time.
  15321. </p>
  15322. <p>Examples:
  15323. </p><ul>
  15324. <li> Drop everything except the second minute of input:
  15325. <div class="example">
  15326. <pre class="example">ffmpeg -i INPUT -af atrim=60:120
  15327. </pre></div>
  15328. </li><li> Keep only the first 1000 samples:
  15329. <div class="example">
  15330. <pre class="example">ffmpeg -i INPUT -af atrim=end_sample=1000
  15331. </pre></div>
  15332. </li></ul>
  15333. <a name="axcorrelate"></a>
  15334. <h3 class="section">29.55 axcorrelate<span class="pull-right"><a class="anchor hidden-xs" href="#axcorrelate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-axcorrelate" aria-hidden="true">TOC</a></span></h3>
  15335. <p>Calculate normalized cross-correlation between two input audio streams.
  15336. </p>
  15337. <p>Resulted samples are always between -1 and 1 inclusive.
  15338. If result is 1 it means two input samples are highly correlated in that selected segment.
  15339. Result 0 means they are not correlated at all.
  15340. If result is -1 it means two input samples are out of phase, which means they cancel each
  15341. other.
  15342. </p>
  15343. <p>The filter accepts the following options:
  15344. </p>
  15345. <dl compact="compact">
  15346. <dt><samp>size</samp></dt>
  15347. <dd><p>Set size of segment over which cross-correlation is calculated.
  15348. Default is 256. Allowed range is from 2 to 131072.
  15349. </p>
  15350. </dd>
  15351. <dt><samp>algo</samp></dt>
  15352. <dd><p>Set algorithm for cross-correlation. Can be <code>slow</code> or <code>fast</code>.
  15353. Default is <code>slow</code>. Fast algorithm assumes mean values over any given segment
  15354. are always zero and thus need much less calculations to make.
  15355. This is generally not true, but is valid for typical audio streams.
  15356. </p></dd>
  15357. </dl>
  15358. <a name="Examples-30"></a>
  15359. <h4 class="subsection">29.55.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-30" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-30" aria-hidden="true">TOC</a></span></h4>
  15360. <ul>
  15361. <li> Calculate correlation between channels in stereo audio stream:
  15362. <div class="example">
  15363. <pre class="example">ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
  15364. </pre></div>
  15365. </li></ul>
  15366. <a name="bandpass"></a>
  15367. <h3 class="section">29.56 bandpass<span class="pull-right"><a class="anchor hidden-xs" href="#bandpass" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bandpass" aria-hidden="true">TOC</a></span></h3>
  15368. <p>Apply a two-pole Butterworth band-pass filter with central
  15369. frequency <var>frequency</var>, and (3dB-point) band-width width.
  15370. The <var>csg</var> option selects a constant skirt gain (peak gain = Q)
  15371. instead of the default: constant 0dB peak gain.
  15372. The filter roll off at 6dB per octave (20dB per decade).
  15373. </p>
  15374. <p>The filter accepts the following options:
  15375. </p>
  15376. <dl compact="compact">
  15377. <dt><samp>frequency, f</samp></dt>
  15378. <dd><p>Set the filter&rsquo;s central frequency. Default is <code>3000</code>.
  15379. </p>
  15380. </dd>
  15381. <dt><samp>csg</samp></dt>
  15382. <dd><p>Constant skirt gain if set to 1. Defaults to 0.
  15383. </p>
  15384. </dd>
  15385. <dt><samp>width_type, t</samp></dt>
  15386. <dd><p>Set method to specify band-width of filter.
  15387. </p><dl compact="compact">
  15388. <dt><samp>h</samp></dt>
  15389. <dd><p>Hz
  15390. </p></dd>
  15391. <dt><samp>q</samp></dt>
  15392. <dd><p>Q-Factor
  15393. </p></dd>
  15394. <dt><samp>o</samp></dt>
  15395. <dd><p>octave
  15396. </p></dd>
  15397. <dt><samp>s</samp></dt>
  15398. <dd><p>slope
  15399. </p></dd>
  15400. <dt><samp>k</samp></dt>
  15401. <dd><p>kHz
  15402. </p></dd>
  15403. </dl>
  15404. </dd>
  15405. <dt><samp>width, w</samp></dt>
  15406. <dd><p>Specify the band-width of a filter in width_type units.
  15407. </p>
  15408. </dd>
  15409. <dt><samp>mix, m</samp></dt>
  15410. <dd><p>How much to use filtered signal in output. Default is 1.
  15411. Range is between 0 and 1.
  15412. </p>
  15413. </dd>
  15414. <dt><samp>channels, c</samp></dt>
  15415. <dd><p>Specify which channels to filter, by default all available are filtered.
  15416. </p>
  15417. </dd>
  15418. <dt><samp>normalize, n</samp></dt>
  15419. <dd><p>Normalize biquad coefficients, by default is disabled.
  15420. Enabling it will normalize magnitude response at DC to 0dB.
  15421. </p>
  15422. </dd>
  15423. <dt><samp>transform, a</samp></dt>
  15424. <dd><p>Set transform type of IIR filter.
  15425. </p><dl compact="compact">
  15426. <dt><samp>di</samp></dt>
  15427. <dt><samp>dii</samp></dt>
  15428. <dt><samp>tdii</samp></dt>
  15429. <dt><samp>latt</samp></dt>
  15430. </dl>
  15431. </dd>
  15432. <dt><samp>precision, r</samp></dt>
  15433. <dd><p>Set precison of filtering.
  15434. </p><dl compact="compact">
  15435. <dt><samp>auto</samp></dt>
  15436. <dd><p>Pick automatic sample format depending on surround filters.
  15437. </p></dd>
  15438. <dt><samp>s16</samp></dt>
  15439. <dd><p>Always use signed 16-bit.
  15440. </p></dd>
  15441. <dt><samp>s32</samp></dt>
  15442. <dd><p>Always use signed 32-bit.
  15443. </p></dd>
  15444. <dt><samp>f32</samp></dt>
  15445. <dd><p>Always use float 32-bit.
  15446. </p></dd>
  15447. <dt><samp>f64</samp></dt>
  15448. <dd><p>Always use float 64-bit.
  15449. </p></dd>
  15450. </dl>
  15451. </dd>
  15452. </dl>
  15453. <a name="Commands-23"></a>
  15454. <h4 class="subsection">29.56.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-23" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-23" aria-hidden="true">TOC</a></span></h4>
  15455. <p>This filter supports the following commands:
  15456. </p><dl compact="compact">
  15457. <dt><samp>frequency, f</samp></dt>
  15458. <dd><p>Change bandpass frequency.
  15459. Syntax for the command is : &quot;<var>frequency</var>&quot;
  15460. </p>
  15461. </dd>
  15462. <dt><samp>width_type, t</samp></dt>
  15463. <dd><p>Change bandpass width_type.
  15464. Syntax for the command is : &quot;<var>width_type</var>&quot;
  15465. </p>
  15466. </dd>
  15467. <dt><samp>width, w</samp></dt>
  15468. <dd><p>Change bandpass width.
  15469. Syntax for the command is : &quot;<var>width</var>&quot;
  15470. </p>
  15471. </dd>
  15472. <dt><samp>mix, m</samp></dt>
  15473. <dd><p>Change bandpass mix.
  15474. Syntax for the command is : &quot;<var>mix</var>&quot;
  15475. </p></dd>
  15476. </dl>
  15477. <a name="bandreject"></a>
  15478. <h3 class="section">29.57 bandreject<span class="pull-right"><a class="anchor hidden-xs" href="#bandreject" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bandreject" aria-hidden="true">TOC</a></span></h3>
  15479. <p>Apply a two-pole Butterworth band-reject filter with central
  15480. frequency <var>frequency</var>, and (3dB-point) band-width <var>width</var>.
  15481. The filter roll off at 6dB per octave (20dB per decade).
  15482. </p>
  15483. <p>The filter accepts the following options:
  15484. </p>
  15485. <dl compact="compact">
  15486. <dt><samp>frequency, f</samp></dt>
  15487. <dd><p>Set the filter&rsquo;s central frequency. Default is <code>3000</code>.
  15488. </p>
  15489. </dd>
  15490. <dt><samp>width_type, t</samp></dt>
  15491. <dd><p>Set method to specify band-width of filter.
  15492. </p><dl compact="compact">
  15493. <dt><samp>h</samp></dt>
  15494. <dd><p>Hz
  15495. </p></dd>
  15496. <dt><samp>q</samp></dt>
  15497. <dd><p>Q-Factor
  15498. </p></dd>
  15499. <dt><samp>o</samp></dt>
  15500. <dd><p>octave
  15501. </p></dd>
  15502. <dt><samp>s</samp></dt>
  15503. <dd><p>slope
  15504. </p></dd>
  15505. <dt><samp>k</samp></dt>
  15506. <dd><p>kHz
  15507. </p></dd>
  15508. </dl>
  15509. </dd>
  15510. <dt><samp>width, w</samp></dt>
  15511. <dd><p>Specify the band-width of a filter in width_type units.
  15512. </p>
  15513. </dd>
  15514. <dt><samp>mix, m</samp></dt>
  15515. <dd><p>How much to use filtered signal in output. Default is 1.
  15516. Range is between 0 and 1.
  15517. </p>
  15518. </dd>
  15519. <dt><samp>channels, c</samp></dt>
  15520. <dd><p>Specify which channels to filter, by default all available are filtered.
  15521. </p>
  15522. </dd>
  15523. <dt><samp>normalize, n</samp></dt>
  15524. <dd><p>Normalize biquad coefficients, by default is disabled.
  15525. Enabling it will normalize magnitude response at DC to 0dB.
  15526. </p>
  15527. </dd>
  15528. <dt><samp>transform, a</samp></dt>
  15529. <dd><p>Set transform type of IIR filter.
  15530. </p><dl compact="compact">
  15531. <dt><samp>di</samp></dt>
  15532. <dt><samp>dii</samp></dt>
  15533. <dt><samp>tdii</samp></dt>
  15534. <dt><samp>latt</samp></dt>
  15535. </dl>
  15536. </dd>
  15537. <dt><samp>precision, r</samp></dt>
  15538. <dd><p>Set precison of filtering.
  15539. </p><dl compact="compact">
  15540. <dt><samp>auto</samp></dt>
  15541. <dd><p>Pick automatic sample format depending on surround filters.
  15542. </p></dd>
  15543. <dt><samp>s16</samp></dt>
  15544. <dd><p>Always use signed 16-bit.
  15545. </p></dd>
  15546. <dt><samp>s32</samp></dt>
  15547. <dd><p>Always use signed 32-bit.
  15548. </p></dd>
  15549. <dt><samp>f32</samp></dt>
  15550. <dd><p>Always use float 32-bit.
  15551. </p></dd>
  15552. <dt><samp>f64</samp></dt>
  15553. <dd><p>Always use float 64-bit.
  15554. </p></dd>
  15555. </dl>
  15556. </dd>
  15557. </dl>
  15558. <a name="Commands-24"></a>
  15559. <h4 class="subsection">29.57.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-24" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-24" aria-hidden="true">TOC</a></span></h4>
  15560. <p>This filter supports the following commands:
  15561. </p><dl compact="compact">
  15562. <dt><samp>frequency, f</samp></dt>
  15563. <dd><p>Change bandreject frequency.
  15564. Syntax for the command is : &quot;<var>frequency</var>&quot;
  15565. </p>
  15566. </dd>
  15567. <dt><samp>width_type, t</samp></dt>
  15568. <dd><p>Change bandreject width_type.
  15569. Syntax for the command is : &quot;<var>width_type</var>&quot;
  15570. </p>
  15571. </dd>
  15572. <dt><samp>width, w</samp></dt>
  15573. <dd><p>Change bandreject width.
  15574. Syntax for the command is : &quot;<var>width</var>&quot;
  15575. </p>
  15576. </dd>
  15577. <dt><samp>mix, m</samp></dt>
  15578. <dd><p>Change bandreject mix.
  15579. Syntax for the command is : &quot;<var>mix</var>&quot;
  15580. </p></dd>
  15581. </dl>
  15582. <a name="bass_002c-lowshelf"></a>
  15583. <h3 class="section">29.58 bass, lowshelf<span class="pull-right"><a class="anchor hidden-xs" href="#bass_002c-lowshelf" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bass_002c-lowshelf" aria-hidden="true">TOC</a></span></h3>
  15584. <p>Boost or cut the bass (lower) frequencies of the audio using a two-pole
  15585. shelving filter with a response similar to that of a standard
  15586. hi-fi&rsquo;s tone-controls. This is also known as shelving equalisation (EQ).
  15587. </p>
  15588. <p>The filter accepts the following options:
  15589. </p>
  15590. <dl compact="compact">
  15591. <dt><samp>gain, g</samp></dt>
  15592. <dd><p>Give the gain at 0 Hz. Its useful range is about -20
  15593. (for a large cut) to +20 (for a large boost).
  15594. Beware of clipping when using a positive gain.
  15595. </p>
  15596. </dd>
  15597. <dt><samp>frequency, f</samp></dt>
  15598. <dd><p>Set the filter&rsquo;s central frequency and so can be used
  15599. to extend or reduce the frequency range to be boosted or cut.
  15600. The default value is <code>100</code> Hz.
  15601. </p>
  15602. </dd>
  15603. <dt><samp>width_type, t</samp></dt>
  15604. <dd><p>Set method to specify band-width of filter.
  15605. </p><dl compact="compact">
  15606. <dt><samp>h</samp></dt>
  15607. <dd><p>Hz
  15608. </p></dd>
  15609. <dt><samp>q</samp></dt>
  15610. <dd><p>Q-Factor
  15611. </p></dd>
  15612. <dt><samp>o</samp></dt>
  15613. <dd><p>octave
  15614. </p></dd>
  15615. <dt><samp>s</samp></dt>
  15616. <dd><p>slope
  15617. </p></dd>
  15618. <dt><samp>k</samp></dt>
  15619. <dd><p>kHz
  15620. </p></dd>
  15621. </dl>
  15622. </dd>
  15623. <dt><samp>width, w</samp></dt>
  15624. <dd><p>Determine how steep is the filter&rsquo;s shelf transition.
  15625. </p>
  15626. </dd>
  15627. <dt><samp>poles, p</samp></dt>
  15628. <dd><p>Set number of poles. Default is 2.
  15629. </p>
  15630. </dd>
  15631. <dt><samp>mix, m</samp></dt>
  15632. <dd><p>How much to use filtered signal in output. Default is 1.
  15633. Range is between 0 and 1.
  15634. </p>
  15635. </dd>
  15636. <dt><samp>channels, c</samp></dt>
  15637. <dd><p>Specify which channels to filter, by default all available are filtered.
  15638. </p>
  15639. </dd>
  15640. <dt><samp>normalize, n</samp></dt>
  15641. <dd><p>Normalize biquad coefficients, by default is disabled.
  15642. Enabling it will normalize magnitude response at DC to 0dB.
  15643. </p>
  15644. </dd>
  15645. <dt><samp>transform, a</samp></dt>
  15646. <dd><p>Set transform type of IIR filter.
  15647. </p><dl compact="compact">
  15648. <dt><samp>di</samp></dt>
  15649. <dt><samp>dii</samp></dt>
  15650. <dt><samp>tdii</samp></dt>
  15651. <dt><samp>latt</samp></dt>
  15652. </dl>
  15653. </dd>
  15654. <dt><samp>precision, r</samp></dt>
  15655. <dd><p>Set precison of filtering.
  15656. </p><dl compact="compact">
  15657. <dt><samp>auto</samp></dt>
  15658. <dd><p>Pick automatic sample format depending on surround filters.
  15659. </p></dd>
  15660. <dt><samp>s16</samp></dt>
  15661. <dd><p>Always use signed 16-bit.
  15662. </p></dd>
  15663. <dt><samp>s32</samp></dt>
  15664. <dd><p>Always use signed 32-bit.
  15665. </p></dd>
  15666. <dt><samp>f32</samp></dt>
  15667. <dd><p>Always use float 32-bit.
  15668. </p></dd>
  15669. <dt><samp>f64</samp></dt>
  15670. <dd><p>Always use float 64-bit.
  15671. </p></dd>
  15672. </dl>
  15673. </dd>
  15674. </dl>
  15675. <a name="Commands-25"></a>
  15676. <h4 class="subsection">29.58.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-25" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-25" aria-hidden="true">TOC</a></span></h4>
  15677. <p>This filter supports the following commands:
  15678. </p><dl compact="compact">
  15679. <dt><samp>frequency, f</samp></dt>
  15680. <dd><p>Change bass frequency.
  15681. Syntax for the command is : &quot;<var>frequency</var>&quot;
  15682. </p>
  15683. </dd>
  15684. <dt><samp>width_type, t</samp></dt>
  15685. <dd><p>Change bass width_type.
  15686. Syntax for the command is : &quot;<var>width_type</var>&quot;
  15687. </p>
  15688. </dd>
  15689. <dt><samp>width, w</samp></dt>
  15690. <dd><p>Change bass width.
  15691. Syntax for the command is : &quot;<var>width</var>&quot;
  15692. </p>
  15693. </dd>
  15694. <dt><samp>gain, g</samp></dt>
  15695. <dd><p>Change bass gain.
  15696. Syntax for the command is : &quot;<var>gain</var>&quot;
  15697. </p>
  15698. </dd>
  15699. <dt><samp>mix, m</samp></dt>
  15700. <dd><p>Change bass mix.
  15701. Syntax for the command is : &quot;<var>mix</var>&quot;
  15702. </p></dd>
  15703. </dl>
  15704. <a name="biquad"></a>
  15705. <h3 class="section">29.59 biquad<span class="pull-right"><a class="anchor hidden-xs" href="#biquad" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-biquad" aria-hidden="true">TOC</a></span></h3>
  15706. <p>Apply a biquad IIR filter with the given coefficients.
  15707. Where <var>b0</var>, <var>b1</var>, <var>b2</var> and <var>a0</var>, <var>a1</var>, <var>a2</var>
  15708. are the numerator and denominator coefficients respectively.
  15709. and <var>channels</var>, <var>c</var> specify which channels to filter, by default all
  15710. available are filtered.
  15711. </p>
  15712. <a name="Commands-26"></a>
  15713. <h4 class="subsection">29.59.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-26" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-26" aria-hidden="true">TOC</a></span></h4>
  15714. <p>This filter supports the following commands:
  15715. </p><dl compact="compact">
  15716. <dt><samp>a0</samp></dt>
  15717. <dt><samp>a1</samp></dt>
  15718. <dt><samp>a2</samp></dt>
  15719. <dt><samp>b0</samp></dt>
  15720. <dt><samp>b1</samp></dt>
  15721. <dt><samp>b2</samp></dt>
  15722. <dd><p>Change biquad parameter.
  15723. Syntax for the command is : &quot;<var>value</var>&quot;
  15724. </p>
  15725. </dd>
  15726. <dt><samp>mix, m</samp></dt>
  15727. <dd><p>How much to use filtered signal in output. Default is 1.
  15728. Range is between 0 and 1.
  15729. </p>
  15730. </dd>
  15731. <dt><samp>channels, c</samp></dt>
  15732. <dd><p>Specify which channels to filter, by default all available are filtered.
  15733. </p>
  15734. </dd>
  15735. <dt><samp>normalize, n</samp></dt>
  15736. <dd><p>Normalize biquad coefficients, by default is disabled.
  15737. Enabling it will normalize magnitude response at DC to 0dB.
  15738. </p>
  15739. </dd>
  15740. <dt><samp>transform, a</samp></dt>
  15741. <dd><p>Set transform type of IIR filter.
  15742. </p><dl compact="compact">
  15743. <dt><samp>di</samp></dt>
  15744. <dt><samp>dii</samp></dt>
  15745. <dt><samp>tdii</samp></dt>
  15746. <dt><samp>latt</samp></dt>
  15747. </dl>
  15748. </dd>
  15749. <dt><samp>precision, r</samp></dt>
  15750. <dd><p>Set precison of filtering.
  15751. </p><dl compact="compact">
  15752. <dt><samp>auto</samp></dt>
  15753. <dd><p>Pick automatic sample format depending on surround filters.
  15754. </p></dd>
  15755. <dt><samp>s16</samp></dt>
  15756. <dd><p>Always use signed 16-bit.
  15757. </p></dd>
  15758. <dt><samp>s32</samp></dt>
  15759. <dd><p>Always use signed 32-bit.
  15760. </p></dd>
  15761. <dt><samp>f32</samp></dt>
  15762. <dd><p>Always use float 32-bit.
  15763. </p></dd>
  15764. <dt><samp>f64</samp></dt>
  15765. <dd><p>Always use float 64-bit.
  15766. </p></dd>
  15767. </dl>
  15768. </dd>
  15769. </dl>
  15770. <a name="bs2b"></a>
  15771. <h3 class="section">29.60 bs2b<span class="pull-right"><a class="anchor hidden-xs" href="#bs2b" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bs2b" aria-hidden="true">TOC</a></span></h3>
  15772. <p>Bauer stereo to binaural transformation, which improves headphone listening of
  15773. stereo audio records.
  15774. </p>
  15775. <p>To enable compilation of this filter you need to configure FFmpeg with
  15776. <code>--enable-libbs2b</code>.
  15777. </p>
  15778. <p>It accepts the following parameters:
  15779. </p><dl compact="compact">
  15780. <dt><samp>profile</samp></dt>
  15781. <dd><p>Pre-defined crossfeed level.
  15782. </p><dl compact="compact">
  15783. <dt><samp>default</samp></dt>
  15784. <dd><p>Default level (fcut=700, feed=50).
  15785. </p>
  15786. </dd>
  15787. <dt><samp>cmoy</samp></dt>
  15788. <dd><p>Chu Moy circuit (fcut=700, feed=60).
  15789. </p>
  15790. </dd>
  15791. <dt><samp>jmeier</samp></dt>
  15792. <dd><p>Jan Meier circuit (fcut=650, feed=95).
  15793. </p>
  15794. </dd>
  15795. </dl>
  15796. </dd>
  15797. <dt><samp>fcut</samp></dt>
  15798. <dd><p>Cut frequency (in Hz).
  15799. </p>
  15800. </dd>
  15801. <dt><samp>feed</samp></dt>
  15802. <dd><p>Feed level (in Hz).
  15803. </p>
  15804. </dd>
  15805. </dl>
  15806. <a name="channelmap"></a>
  15807. <h3 class="section">29.61 channelmap<span class="pull-right"><a class="anchor hidden-xs" href="#channelmap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-channelmap" aria-hidden="true">TOC</a></span></h3>
  15808. <p>Remap input channels to new locations.
  15809. </p>
  15810. <p>It accepts the following parameters:
  15811. </p><dl compact="compact">
  15812. <dt><samp>map</samp></dt>
  15813. <dd><p>Map channels from input to output. The argument is a &rsquo;|&rsquo;-separated list of
  15814. mappings, each in the <code><var>in_channel</var>-<var>out_channel</var></code> or
  15815. <var>in_channel</var> form. <var>in_channel</var> can be either the name of the input
  15816. channel (e.g. FL for front left) or its index in the input channel layout.
  15817. <var>out_channel</var> is the name of the output channel or its index in the output
  15818. channel layout. If <var>out_channel</var> is not given then it is implicitly an
  15819. index, starting with zero and increasing by one for each mapping.
  15820. </p>
  15821. </dd>
  15822. <dt><samp>channel_layout</samp></dt>
  15823. <dd><p>The channel layout of the output stream.
  15824. </p></dd>
  15825. </dl>
  15826. <p>If no mapping is present, the filter will implicitly map input channels to
  15827. output channels, preserving indices.
  15828. </p>
  15829. <a name="Examples-31"></a>
  15830. <h4 class="subsection">29.61.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-31" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-31" aria-hidden="true">TOC</a></span></h4>
  15831. <ul>
  15832. <li> For example, assuming a 5.1+downmix input MOV file,
  15833. <div class="example">
  15834. <pre class="example">ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
  15835. </pre></div>
  15836. <p>will create an output WAV file tagged as stereo from the downmix channels of
  15837. the input.
  15838. </p>
  15839. </li><li> To fix a 5.1 WAV improperly encoded in AAC&rsquo;s native channel order
  15840. <div class="example">
  15841. <pre class="example">ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
  15842. </pre></div>
  15843. </li></ul>
  15844. <a name="channelsplit"></a>
  15845. <h3 class="section">29.62 channelsplit<span class="pull-right"><a class="anchor hidden-xs" href="#channelsplit" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-channelsplit" aria-hidden="true">TOC</a></span></h3>
  15846. <p>Split each channel from an input audio stream into a separate output stream.
  15847. </p>
  15848. <p>It accepts the following parameters:
  15849. </p><dl compact="compact">
  15850. <dt><samp>channel_layout</samp></dt>
  15851. <dd><p>The channel layout of the input stream. The default is &quot;stereo&quot;.
  15852. </p></dd>
  15853. <dt><samp>channels</samp></dt>
  15854. <dd><p>A channel layout describing the channels to be extracted as separate output streams
  15855. or &quot;all&quot; to extract each input channel as a separate stream. The default is &quot;all&quot;.
  15856. </p>
  15857. <p>Choosing channels not present in channel layout in the input will result in an error.
  15858. </p></dd>
  15859. </dl>
  15860. <a name="Examples-32"></a>
  15861. <h4 class="subsection">29.62.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-32" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-32" aria-hidden="true">TOC</a></span></h4>
  15862. <ul>
  15863. <li> For example, assuming a stereo input MP3 file,
  15864. <div class="example">
  15865. <pre class="example">ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
  15866. </pre></div>
  15867. <p>will create an output Matroska file with two audio streams, one containing only
  15868. the left channel and the other the right channel.
  15869. </p>
  15870. </li><li> Split a 5.1 WAV file into per-channel files:
  15871. <div class="example">
  15872. <pre class="example">ffmpeg -i in.wav -filter_complex
  15873. 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
  15874. -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
  15875. front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
  15876. side_right.wav
  15877. </pre></div>
  15878. </li><li> Extract only LFE from a 5.1 WAV file:
  15879. <div class="example">
  15880. <pre class="example">ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
  15881. -map '[LFE]' lfe.wav
  15882. </pre></div>
  15883. </li></ul>
  15884. <a name="chorus"></a>
  15885. <h3 class="section">29.63 chorus<span class="pull-right"><a class="anchor hidden-xs" href="#chorus" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-chorus" aria-hidden="true">TOC</a></span></h3>
  15886. <p>Add a chorus effect to the audio.
  15887. </p>
  15888. <p>Can make a single vocal sound like a chorus, but can also be applied to instrumentation.
  15889. </p>
  15890. <p>Chorus resembles an echo effect with a short delay, but whereas with echo the delay is
  15891. constant, with chorus, it is varied using using sinusoidal or triangular modulation.
  15892. The modulation depth defines the range the modulated delay is played before or after
  15893. the delay. Hence the delayed sound will sound slower or faster, that is the delayed
  15894. sound tuned around the original one, like in a chorus where some vocals are slightly
  15895. off key.
  15896. </p>
  15897. <p>It accepts the following parameters:
  15898. </p><dl compact="compact">
  15899. <dt><samp>in_gain</samp></dt>
  15900. <dd><p>Set input gain. Default is 0.4.
  15901. </p>
  15902. </dd>
  15903. <dt><samp>out_gain</samp></dt>
  15904. <dd><p>Set output gain. Default is 0.4.
  15905. </p>
  15906. </dd>
  15907. <dt><samp>delays</samp></dt>
  15908. <dd><p>Set delays. A typical delay is around 40ms to 60ms.
  15909. </p>
  15910. </dd>
  15911. <dt><samp>decays</samp></dt>
  15912. <dd><p>Set decays.
  15913. </p>
  15914. </dd>
  15915. <dt><samp>speeds</samp></dt>
  15916. <dd><p>Set speeds.
  15917. </p>
  15918. </dd>
  15919. <dt><samp>depths</samp></dt>
  15920. <dd><p>Set depths.
  15921. </p></dd>
  15922. </dl>
  15923. <a name="Examples-33"></a>
  15924. <h4 class="subsection">29.63.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-33" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-33" aria-hidden="true">TOC</a></span></h4>
  15925. <ul>
  15926. <li> A single delay:
  15927. <div class="example">
  15928. <pre class="example">chorus=0.7:0.9:55:0.4:0.25:2
  15929. </pre></div>
  15930. </li><li> Two delays:
  15931. <div class="example">
  15932. <pre class="example">chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
  15933. </pre></div>
  15934. </li><li> Fuller sounding chorus with three delays:
  15935. <div class="example">
  15936. <pre class="example">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
  15937. </pre></div>
  15938. </li></ul>
  15939. <a name="compand"></a>
  15940. <h3 class="section">29.64 compand<span class="pull-right"><a class="anchor hidden-xs" href="#compand" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-compand" aria-hidden="true">TOC</a></span></h3>
  15941. <p>Compress or expand the audio&rsquo;s dynamic range.
  15942. </p>
  15943. <p>It accepts the following parameters:
  15944. </p>
  15945. <dl compact="compact">
  15946. <dt><samp>attacks</samp></dt>
  15947. <dt><samp>decays</samp></dt>
  15948. <dd><p>A list of times in seconds for each channel over which the instantaneous level
  15949. of the input signal is averaged to determine its volume. <var>attacks</var> refers to
  15950. increase of volume and <var>decays</var> refers to decrease of volume. For most
  15951. situations, the attack time (response to the audio getting louder) should be
  15952. shorter than the decay time, because the human ear is more sensitive to sudden
  15953. loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and
  15954. a typical value for decay is 0.8 seconds.
  15955. If specified number of attacks &amp; decays is lower than number of channels, the last
  15956. set attack/decay will be used for all remaining channels.
  15957. </p>
  15958. </dd>
  15959. <dt><samp>points</samp></dt>
  15960. <dd><p>A list of points for the transfer function, specified in dB relative to the
  15961. maximum possible signal amplitude. Each key points list must be defined using
  15962. the following syntax: <code>x0/y0|x1/y1|x2/y2|....</code> or
  15963. <code>x0/y0 x1/y1 x2/y2 ....</code>
  15964. </p>
  15965. <p>The input values must be in strictly increasing order but the transfer function
  15966. does not have to be monotonically rising. The point <code>0/0</code> is assumed but
  15967. may be overridden (by <code>0/out-dBn</code>). Typical values for the transfer
  15968. function are <code>-70/-70|-60/-20|1/0</code>.
  15969. </p>
  15970. </dd>
  15971. <dt><samp>soft-knee</samp></dt>
  15972. <dd><p>Set the curve radius in dB for all joints. It defaults to 0.01.
  15973. </p>
  15974. </dd>
  15975. <dt><samp>gain</samp></dt>
  15976. <dd><p>Set the additional gain in dB to be applied at all points on the transfer
  15977. function. This allows for easy adjustment of the overall gain.
  15978. It defaults to 0.
  15979. </p>
  15980. </dd>
  15981. <dt><samp>volume</samp></dt>
  15982. <dd><p>Set an initial volume, in dB, to be assumed for each channel when filtering
  15983. starts. This permits the user to supply a nominal level initially, so that, for
  15984. example, a very large gain is not applied to initial signal levels before the
  15985. companding has begun to operate. A typical value for audio which is initially
  15986. quiet is -90 dB. It defaults to 0.
  15987. </p>
  15988. </dd>
  15989. <dt><samp>delay</samp></dt>
  15990. <dd><p>Set a delay, in seconds. The input audio is analyzed immediately, but audio is
  15991. delayed before being fed to the volume adjuster. Specifying a delay
  15992. approximately equal to the attack/decay times allows the filter to effectively
  15993. operate in predictive rather than reactive mode. It defaults to 0.
  15994. </p>
  15995. </dd>
  15996. </dl>
  15997. <a name="Examples-34"></a>
  15998. <h4 class="subsection">29.64.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-34" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-34" aria-hidden="true">TOC</a></span></h4>
  15999. <ul>
  16000. <li> Make music with both quiet and loud passages suitable for listening to in a
  16001. noisy environment:
  16002. <div class="example">
  16003. <pre class="example">compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
  16004. </pre></div>
  16005. <p>Another example for audio with whisper and explosion parts:
  16006. </p><div class="example">
  16007. <pre class="example">compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
  16008. </pre></div>
  16009. </li><li> A noise gate for when the noise is at a lower level than the signal:
  16010. <div class="example">
  16011. <pre class="example">compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
  16012. </pre></div>
  16013. </li><li> Here is another noise gate, this time for when the noise is at a higher level
  16014. than the signal (making it, in some ways, similar to squelch):
  16015. <div class="example">
  16016. <pre class="example">compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
  16017. </pre></div>
  16018. </li><li> 2:1 compression starting at -6dB:
  16019. <div class="example">
  16020. <pre class="example">compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
  16021. </pre></div>
  16022. </li><li> 2:1 compression starting at -9dB:
  16023. <div class="example">
  16024. <pre class="example">compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
  16025. </pre></div>
  16026. </li><li> 2:1 compression starting at -12dB:
  16027. <div class="example">
  16028. <pre class="example">compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
  16029. </pre></div>
  16030. </li><li> 2:1 compression starting at -18dB:
  16031. <div class="example">
  16032. <pre class="example">compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
  16033. </pre></div>
  16034. </li><li> 3:1 compression starting at -15dB:
  16035. <div class="example">
  16036. <pre class="example">compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
  16037. </pre></div>
  16038. </li><li> Compressor/Gate:
  16039. <div class="example">
  16040. <pre class="example">compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
  16041. </pre></div>
  16042. </li><li> Expander:
  16043. <div class="example">
  16044. <pre class="example">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
  16045. </pre></div>
  16046. </li><li> Hard limiter at -6dB:
  16047. <div class="example">
  16048. <pre class="example">compand=attacks=0:points=-80/-80|-6/-6|20/-6
  16049. </pre></div>
  16050. </li><li> Hard limiter at -12dB:
  16051. <div class="example">
  16052. <pre class="example">compand=attacks=0:points=-80/-80|-12/-12|20/-12
  16053. </pre></div>
  16054. </li><li> Hard noise gate at -35 dB:
  16055. <div class="example">
  16056. <pre class="example">compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
  16057. </pre></div>
  16058. </li><li> Soft limiter:
  16059. <div class="example">
  16060. <pre class="example">compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
  16061. </pre></div>
  16062. </li></ul>
  16063. <a name="compensationdelay"></a>
  16064. <h3 class="section">29.65 compensationdelay<span class="pull-right"><a class="anchor hidden-xs" href="#compensationdelay" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-compensationdelay" aria-hidden="true">TOC</a></span></h3>
  16065. <p>Compensation Delay Line is a metric based delay to compensate differing
  16066. positions of microphones or speakers.
  16067. </p>
  16068. <p>For example, you have recorded guitar with two microphones placed in
  16069. different locations. Because the front of sound wave has fixed speed in
  16070. normal conditions, the phasing of microphones can vary and depends on
  16071. their location and interposition. The best sound mix can be achieved when
  16072. these microphones are in phase (synchronized). Note that a distance of
  16073. ~30 cm between microphones makes one microphone capture the signal in
  16074. antiphase to the other microphone. That makes the final mix sound moody.
  16075. This filter helps to solve phasing problems by adding different delays
  16076. to each microphone track and make them synchronized.
  16077. </p>
  16078. <p>The best result can be reached when you take one track as base and
  16079. synchronize other tracks one by one with it.
  16080. Remember that synchronization/delay tolerance depends on sample rate, too.
  16081. Higher sample rates will give more tolerance.
  16082. </p>
  16083. <p>The filter accepts the following parameters:
  16084. </p>
  16085. <dl compact="compact">
  16086. <dt><samp>mm</samp></dt>
  16087. <dd><p>Set millimeters distance. This is compensation distance for fine tuning.
  16088. Default is 0.
  16089. </p>
  16090. </dd>
  16091. <dt><samp>cm</samp></dt>
  16092. <dd><p>Set cm distance. This is compensation distance for tightening distance setup.
  16093. Default is 0.
  16094. </p>
  16095. </dd>
  16096. <dt><samp>m</samp></dt>
  16097. <dd><p>Set meters distance. This is compensation distance for hard distance setup.
  16098. Default is 0.
  16099. </p>
  16100. </dd>
  16101. <dt><samp>dry</samp></dt>
  16102. <dd><p>Set dry amount. Amount of unprocessed (dry) signal.
  16103. Default is 0.
  16104. </p>
  16105. </dd>
  16106. <dt><samp>wet</samp></dt>
  16107. <dd><p>Set wet amount. Amount of processed (wet) signal.
  16108. Default is 1.
  16109. </p>
  16110. </dd>
  16111. <dt><samp>temp</samp></dt>
  16112. <dd><p>Set temperature in degrees Celsius. This is the temperature of the environment.
  16113. Default is 20.
  16114. </p></dd>
  16115. </dl>
  16116. <a name="crossfeed"></a>
  16117. <h3 class="section">29.66 crossfeed<span class="pull-right"><a class="anchor hidden-xs" href="#crossfeed" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-crossfeed" aria-hidden="true">TOC</a></span></h3>
  16118. <p>Apply headphone crossfeed filter.
  16119. </p>
  16120. <p>Crossfeed is the process of blending the left and right channels of stereo
  16121. audio recording.
  16122. It is mainly used to reduce extreme stereo separation of low frequencies.
  16123. </p>
  16124. <p>The intent is to produce more speaker like sound to the listener.
  16125. </p>
  16126. <p>The filter accepts the following options:
  16127. </p>
  16128. <dl compact="compact">
  16129. <dt><samp>strength</samp></dt>
  16130. <dd><p>Set strength of crossfeed. Default is 0.2. Allowed range is from 0 to 1.
  16131. This sets gain of low shelf filter for side part of stereo image.
  16132. Default is -6dB. Max allowed is -30db when strength is set to 1.
  16133. </p>
  16134. </dd>
  16135. <dt><samp>range</samp></dt>
  16136. <dd><p>Set soundstage wideness. Default is 0.5. Allowed range is from 0 to 1.
  16137. This sets cut off frequency of low shelf filter. Default is cut off near
  16138. 1550 Hz. With range set to 1 cut off frequency is set to 2100 Hz.
  16139. </p>
  16140. </dd>
  16141. <dt><samp>slope</samp></dt>
  16142. <dd><p>Set curve slope of low shelf filter. Default is 0.5.
  16143. Allowed range is from 0.01 to 1.
  16144. </p>
  16145. </dd>
  16146. <dt><samp>level_in</samp></dt>
  16147. <dd><p>Set input gain. Default is 0.9.
  16148. </p>
  16149. </dd>
  16150. <dt><samp>level_out</samp></dt>
  16151. <dd><p>Set output gain. Default is 1.
  16152. </p></dd>
  16153. </dl>
  16154. <a name="Commands-27"></a>
  16155. <h4 class="subsection">29.66.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-27" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-27" aria-hidden="true">TOC</a></span></h4>
  16156. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  16157. </p>
  16158. <a name="crystalizer"></a>
  16159. <h3 class="section">29.67 crystalizer<span class="pull-right"><a class="anchor hidden-xs" href="#crystalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-crystalizer" aria-hidden="true">TOC</a></span></h3>
  16160. <p>Simple algorithm for audio noise sharpening.
  16161. </p>
  16162. <p>This filter linearly increases differences betweeen each audio sample.
  16163. </p>
  16164. <p>The filter accepts the following options:
  16165. </p>
  16166. <dl compact="compact">
  16167. <dt><samp>i</samp></dt>
  16168. <dd><p>Sets the intensity of effect (default: 2.0). Must be in range between -10.0 to 0
  16169. (unchanged sound) to 10.0 (maximum effect).
  16170. To inverse filtering use negative value.
  16171. </p>
  16172. </dd>
  16173. <dt><samp>c</samp></dt>
  16174. <dd><p>Enable clipping. By default is enabled.
  16175. </p></dd>
  16176. </dl>
  16177. <a name="Commands-28"></a>
  16178. <h4 class="subsection">29.67.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-28" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-28" aria-hidden="true">TOC</a></span></h4>
  16179. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  16180. </p>
  16181. <a name="dcshift"></a>
  16182. <h3 class="section">29.68 dcshift<span class="pull-right"><a class="anchor hidden-xs" href="#dcshift" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dcshift" aria-hidden="true">TOC</a></span></h3>
  16183. <p>Apply a DC shift to the audio.
  16184. </p>
  16185. <p>This can be useful to remove a DC offset (caused perhaps by a hardware problem
  16186. in the recording chain) from the audio. The effect of a DC offset is reduced
  16187. headroom and hence volume. The <a href="#astats">astats</a> filter can be used to determine if
  16188. a signal has a DC offset.
  16189. </p>
  16190. <dl compact="compact">
  16191. <dt><samp>shift</samp></dt>
  16192. <dd><p>Set the DC shift, allowed range is [-1, 1]. It indicates the amount to shift
  16193. the audio.
  16194. </p>
  16195. </dd>
  16196. <dt><samp>limitergain</samp></dt>
  16197. <dd><p>Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is
  16198. used to prevent clipping.
  16199. </p></dd>
  16200. </dl>
  16201. <a name="deesser"></a>
  16202. <h3 class="section">29.69 deesser<span class="pull-right"><a class="anchor hidden-xs" href="#deesser" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deesser" aria-hidden="true">TOC</a></span></h3>
  16203. <p>Apply de-essing to the audio samples.
  16204. </p>
  16205. <dl compact="compact">
  16206. <dt><samp>i</samp></dt>
  16207. <dd><p>Set intensity for triggering de-essing. Allowed range is from 0 to 1.
  16208. Default is 0.
  16209. </p>
  16210. </dd>
  16211. <dt><samp>m</samp></dt>
  16212. <dd><p>Set amount of ducking on treble part of sound. Allowed range is from 0 to 1.
  16213. Default is 0.5.
  16214. </p>
  16215. </dd>
  16216. <dt><samp>f</samp></dt>
  16217. <dd><p>How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1.
  16218. Default is 0.5.
  16219. </p>
  16220. </dd>
  16221. <dt><samp>s</samp></dt>
  16222. <dd><p>Set the output mode.
  16223. </p>
  16224. <p>It accepts the following values:
  16225. </p><dl compact="compact">
  16226. <dt><samp>i</samp></dt>
  16227. <dd><p>Pass input unchanged.
  16228. </p>
  16229. </dd>
  16230. <dt><samp>o</samp></dt>
  16231. <dd><p>Pass ess filtered out.
  16232. </p>
  16233. </dd>
  16234. <dt><samp>e</samp></dt>
  16235. <dd><p>Pass only ess.
  16236. </p>
  16237. <p>Default value is <var>o</var>.
  16238. </p></dd>
  16239. </dl>
  16240. </dd>
  16241. </dl>
  16242. <a name="drmeter"></a>
  16243. <h3 class="section">29.70 drmeter<span class="pull-right"><a class="anchor hidden-xs" href="#drmeter" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-drmeter" aria-hidden="true">TOC</a></span></h3>
  16244. <p>Measure audio dynamic range.
  16245. </p>
  16246. <p>DR values of 14 and higher is found in very dynamic material. DR of 8 to 13
  16247. is found in transition material. And anything less that 8 have very poor dynamics
  16248. and is very compressed.
  16249. </p>
  16250. <p>The filter accepts the following options:
  16251. </p>
  16252. <dl compact="compact">
  16253. <dt><samp>length</samp></dt>
  16254. <dd><p>Set window length in seconds used to split audio into segments of equal length.
  16255. Default is 3 seconds.
  16256. </p></dd>
  16257. </dl>
  16258. <a name="dynaudnorm"></a>
  16259. <h3 class="section">29.71 dynaudnorm<span class="pull-right"><a class="anchor hidden-xs" href="#dynaudnorm" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dynaudnorm" aria-hidden="true">TOC</a></span></h3>
  16260. <p>Dynamic Audio Normalizer.
  16261. </p>
  16262. <p>This filter applies a certain amount of gain to the input audio in order
  16263. to bring its peak magnitude to a target level (e.g. 0 dBFS). However, in
  16264. contrast to more &quot;simple&quot; normalization algorithms, the Dynamic Audio
  16265. Normalizer *dynamically* re-adjusts the gain factor to the input audio.
  16266. This allows for applying extra gain to the &quot;quiet&quot; sections of the audio
  16267. while avoiding distortions or clipping the &quot;loud&quot; sections. In other words:
  16268. The Dynamic Audio Normalizer will &quot;even out&quot; the volume of quiet and loud
  16269. sections, in the sense that the volume of each section is brought to the
  16270. same target level. Note, however, that the Dynamic Audio Normalizer achieves
  16271. this goal *without* applying &quot;dynamic range compressing&quot;. It will retain 100%
  16272. of the dynamic range *within* each section of the audio file.
  16273. </p>
  16274. <dl compact="compact">
  16275. <dt><samp>framelen, f</samp></dt>
  16276. <dd><p>Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.
  16277. Default is 500 milliseconds.
  16278. The Dynamic Audio Normalizer processes the input audio in small chunks,
  16279. referred to as frames. This is required, because a peak magnitude has no
  16280. meaning for just a single sample value. Instead, we need to determine the
  16281. peak magnitude for a contiguous sequence of sample values. While a &quot;standard&quot;
  16282. normalizer would simply use the peak magnitude of the complete file, the
  16283. Dynamic Audio Normalizer determines the peak magnitude individually for each
  16284. frame. The length of a frame is specified in milliseconds. By default, the
  16285. Dynamic Audio Normalizer uses a frame length of 500 milliseconds, which has
  16286. been found to give good results with most files.
  16287. Note that the exact frame length, in number of samples, will be determined
  16288. automatically, based on the sampling rate of the individual input audio file.
  16289. </p>
  16290. </dd>
  16291. <dt><samp>gausssize, g</samp></dt>
  16292. <dd><p>Set the Gaussian filter window size. In range from 3 to 301, must be odd
  16293. number. Default is 31.
  16294. Probably the most important parameter of the Dynamic Audio Normalizer is the
  16295. <code>window size</code> of the Gaussian smoothing filter. The filter&rsquo;s window size
  16296. is specified in frames, centered around the current frame. For the sake of
  16297. simplicity, this must be an odd number. Consequently, the default value of 31
  16298. takes into account the current frame, as well as the 15 preceding frames and
  16299. the 15 subsequent frames. Using a larger window results in a stronger
  16300. smoothing effect and thus in less gain variation, i.e. slower gain
  16301. adaptation. Conversely, using a smaller window results in a weaker smoothing
  16302. effect and thus in more gain variation, i.e. faster gain adaptation.
  16303. In other words, the more you increase this value, the more the Dynamic Audio
  16304. Normalizer will behave like a &quot;traditional&quot; normalization filter. On the
  16305. contrary, the more you decrease this value, the more the Dynamic Audio
  16306. Normalizer will behave like a dynamic range compressor.
  16307. </p>
  16308. </dd>
  16309. <dt><samp>peak, p</samp></dt>
  16310. <dd><p>Set the target peak value. This specifies the highest permissible magnitude
  16311. level for the normalized audio input. This filter will try to approach the
  16312. target peak magnitude as closely as possible, but at the same time it also
  16313. makes sure that the normalized signal will never exceed the peak magnitude.
  16314. A frame&rsquo;s maximum local gain factor is imposed directly by the target peak
  16315. magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.
  16316. It is not recommended to go above this value.
  16317. </p>
  16318. </dd>
  16319. <dt><samp>maxgain, m</samp></dt>
  16320. <dd><p>Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.
  16321. The Dynamic Audio Normalizer determines the maximum possible (local) gain
  16322. factor for each input frame, i.e. the maximum gain factor that does not
  16323. result in clipping or distortion. The maximum gain factor is determined by
  16324. the frame&rsquo;s highest magnitude sample. However, the Dynamic Audio Normalizer
  16325. additionally bounds the frame&rsquo;s maximum gain factor by a predetermined
  16326. (global) maximum gain factor. This is done in order to avoid excessive gain
  16327. factors in &quot;silent&quot; or almost silent frames. By default, the maximum gain
  16328. factor is 10.0, For most inputs the default value should be sufficient and
  16329. it usually is not recommended to increase this value. Though, for input
  16330. with an extremely low overall volume level, it may be necessary to allow even
  16331. higher gain factors. Note, however, that the Dynamic Audio Normalizer does
  16332. not simply apply a &quot;hard&quot; threshold (i.e. cut off values above the threshold).
  16333. Instead, a &quot;sigmoid&quot; threshold function will be applied. This way, the
  16334. gain factors will smoothly approach the threshold value, but never exceed that
  16335. value.
  16336. </p>
  16337. </dd>
  16338. <dt><samp>targetrms, r</samp></dt>
  16339. <dd><p>Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.
  16340. By default, the Dynamic Audio Normalizer performs &quot;peak&quot; normalization.
  16341. This means that the maximum local gain factor for each frame is defined
  16342. (only) by the frame&rsquo;s highest magnitude sample. This way, the samples can
  16343. be amplified as much as possible without exceeding the maximum signal
  16344. level, i.e. without clipping. Optionally, however, the Dynamic Audio
  16345. Normalizer can also take into account the frame&rsquo;s root mean square,
  16346. abbreviated RMS. In electrical engineering, the RMS is commonly used to
  16347. determine the power of a time-varying signal. It is therefore considered
  16348. that the RMS is a better approximation of the &quot;perceived loudness&quot; than
  16349. just looking at the signal&rsquo;s peak magnitude. Consequently, by adjusting all
  16350. frames to a constant RMS value, a uniform &quot;perceived loudness&quot; can be
  16351. established. If a target RMS value has been specified, a frame&rsquo;s local gain
  16352. factor is defined as the factor that would result in exactly that RMS value.
  16353. Note, however, that the maximum local gain factor is still restricted by the
  16354. frame&rsquo;s highest magnitude sample, in order to prevent clipping.
  16355. </p>
  16356. </dd>
  16357. <dt><samp>coupling, n</samp></dt>
  16358. <dd><p>Enable channels coupling. By default is enabled.
  16359. By default, the Dynamic Audio Normalizer will amplify all channels by the same
  16360. amount. This means the same gain factor will be applied to all channels, i.e.
  16361. the maximum possible gain factor is determined by the &quot;loudest&quot; channel.
  16362. However, in some recordings, it may happen that the volume of the different
  16363. channels is uneven, e.g. one channel may be &quot;quieter&quot; than the other one(s).
  16364. In this case, this option can be used to disable the channel coupling. This way,
  16365. the gain factor will be determined independently for each channel, depending
  16366. only on the individual channel&rsquo;s highest magnitude sample. This allows for
  16367. harmonizing the volume of the different channels.
  16368. </p>
  16369. </dd>
  16370. <dt><samp>correctdc, c</samp></dt>
  16371. <dd><p>Enable DC bias correction. By default is disabled.
  16372. An audio signal (in the time domain) is a sequence of sample values.
  16373. In the Dynamic Audio Normalizer these sample values are represented in the
  16374. -1.0 to 1.0 range, regardless of the original input format. Normally, the
  16375. audio signal, or &quot;waveform&quot;, should be centered around the zero point.
  16376. That means if we calculate the mean value of all samples in a file, or in a
  16377. single frame, then the result should be 0.0 or at least very close to that
  16378. value. If, however, there is a significant deviation of the mean value from
  16379. 0.0, in either positive or negative direction, this is referred to as a
  16380. DC bias or DC offset. Since a DC bias is clearly undesirable, the Dynamic
  16381. Audio Normalizer provides optional DC bias correction.
  16382. With DC bias correction enabled, the Dynamic Audio Normalizer will determine
  16383. the mean value, or &quot;DC correction&quot; offset, of each input frame and subtract
  16384. that value from all of the frame&rsquo;s sample values which ensures those samples
  16385. are centered around 0.0 again. Also, in order to avoid &quot;gaps&quot; at the frame
  16386. boundaries, the DC correction offset values will be interpolated smoothly
  16387. between neighbouring frames.
  16388. </p>
  16389. </dd>
  16390. <dt><samp>altboundary, b</samp></dt>
  16391. <dd><p>Enable alternative boundary mode. By default is disabled.
  16392. The Dynamic Audio Normalizer takes into account a certain neighbourhood
  16393. around each frame. This includes the preceding frames as well as the
  16394. subsequent frames. However, for the &quot;boundary&quot; frames, located at the very
  16395. beginning and at the very end of the audio file, not all neighbouring
  16396. frames are available. In particular, for the first few frames in the audio
  16397. file, the preceding frames are not known. And, similarly, for the last few
  16398. frames in the audio file, the subsequent frames are not known. Thus, the
  16399. question arises which gain factors should be assumed for the missing frames
  16400. in the &quot;boundary&quot; region. The Dynamic Audio Normalizer implements two modes
  16401. to deal with this situation. The default boundary mode assumes a gain factor
  16402. of exactly 1.0 for the missing frames, resulting in a smooth &quot;fade in&quot; and
  16403. &quot;fade out&quot; at the beginning and at the end of the input, respectively.
  16404. </p>
  16405. </dd>
  16406. <dt><samp>compress, s</samp></dt>
  16407. <dd><p>Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
  16408. By default, the Dynamic Audio Normalizer does not apply &quot;traditional&quot;
  16409. compression. This means that signal peaks will not be pruned and thus the
  16410. full dynamic range will be retained within each local neighbourhood. However,
  16411. in some cases it may be desirable to combine the Dynamic Audio Normalizer&rsquo;s
  16412. normalization algorithm with a more &quot;traditional&quot; compression.
  16413. For this purpose, the Dynamic Audio Normalizer provides an optional compression
  16414. (thresholding) function. If (and only if) the compression feature is enabled,
  16415. all input frames will be processed by a soft knee thresholding function prior
  16416. to the actual normalization process. Put simply, the thresholding function is
  16417. going to prune all samples whose magnitude exceeds a certain threshold value.
  16418. However, the Dynamic Audio Normalizer does not simply apply a fixed threshold
  16419. value. Instead, the threshold value will be adjusted for each individual
  16420. frame.
  16421. In general, smaller parameters result in stronger compression, and vice versa.
  16422. Values below 3.0 are not recommended, because audible distortion may appear.
  16423. </p>
  16424. </dd>
  16425. <dt><samp>threshold, t</samp></dt>
  16426. <dd><p>Set the target threshold value. This specifies the lowest permissible
  16427. magnitude level for the audio input which will be normalized.
  16428. If input frame volume is above this value frame will be normalized.
  16429. Otherwise frame may not be normalized at all. The default value is set
  16430. to 0, which means all input frames will be normalized.
  16431. This option is mostly useful if digital noise is not wanted to be amplified.
  16432. </p></dd>
  16433. </dl>
  16434. <a name="Commands-29"></a>
  16435. <h4 class="subsection">29.71.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-29" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-29" aria-hidden="true">TOC</a></span></h4>
  16436. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  16437. </p>
  16438. <a name="earwax"></a>
  16439. <h3 class="section">29.72 earwax<span class="pull-right"><a class="anchor hidden-xs" href="#earwax" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-earwax" aria-hidden="true">TOC</a></span></h3>
  16440. <p>Make audio easier to listen to on headphones.
  16441. </p>
  16442. <p>This filter adds &lsquo;cues&rsquo; to 44.1kHz stereo (i.e. audio CD format) audio
  16443. so that when listened to on headphones the stereo image is moved from
  16444. inside your head (standard for headphones) to outside and in front of
  16445. the listener (standard for speakers).
  16446. </p>
  16447. <p>Ported from SoX.
  16448. </p>
  16449. <a name="equalizer"></a>
  16450. <h3 class="section">29.73 equalizer<span class="pull-right"><a class="anchor hidden-xs" href="#equalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-equalizer" aria-hidden="true">TOC</a></span></h3>
  16451. <p>Apply a two-pole peaking equalisation (EQ) filter. With this
  16452. filter, the signal-level at and around a selected frequency can
  16453. be increased or decreased, whilst (unlike bandpass and bandreject
  16454. filters) that at all other frequencies is unchanged.
  16455. </p>
  16456. <p>In order to produce complex equalisation curves, this filter can
  16457. be given several times, each with a different central frequency.
  16458. </p>
  16459. <p>The filter accepts the following options:
  16460. </p>
  16461. <dl compact="compact">
  16462. <dt><samp>frequency, f</samp></dt>
  16463. <dd><p>Set the filter&rsquo;s central frequency in Hz.
  16464. </p>
  16465. </dd>
  16466. <dt><samp>width_type, t</samp></dt>
  16467. <dd><p>Set method to specify band-width of filter.
  16468. </p><dl compact="compact">
  16469. <dt><samp>h</samp></dt>
  16470. <dd><p>Hz
  16471. </p></dd>
  16472. <dt><samp>q</samp></dt>
  16473. <dd><p>Q-Factor
  16474. </p></dd>
  16475. <dt><samp>o</samp></dt>
  16476. <dd><p>octave
  16477. </p></dd>
  16478. <dt><samp>s</samp></dt>
  16479. <dd><p>slope
  16480. </p></dd>
  16481. <dt><samp>k</samp></dt>
  16482. <dd><p>kHz
  16483. </p></dd>
  16484. </dl>
  16485. </dd>
  16486. <dt><samp>width, w</samp></dt>
  16487. <dd><p>Specify the band-width of a filter in width_type units.
  16488. </p>
  16489. </dd>
  16490. <dt><samp>gain, g</samp></dt>
  16491. <dd><p>Set the required gain or attenuation in dB.
  16492. Beware of clipping when using a positive gain.
  16493. </p>
  16494. </dd>
  16495. <dt><samp>mix, m</samp></dt>
  16496. <dd><p>How much to use filtered signal in output. Default is 1.
  16497. Range is between 0 and 1.
  16498. </p>
  16499. </dd>
  16500. <dt><samp>channels, c</samp></dt>
  16501. <dd><p>Specify which channels to filter, by default all available are filtered.
  16502. </p>
  16503. </dd>
  16504. <dt><samp>normalize, n</samp></dt>
  16505. <dd><p>Normalize biquad coefficients, by default is disabled.
  16506. Enabling it will normalize magnitude response at DC to 0dB.
  16507. </p>
  16508. </dd>
  16509. <dt><samp>transform, a</samp></dt>
  16510. <dd><p>Set transform type of IIR filter.
  16511. </p><dl compact="compact">
  16512. <dt><samp>di</samp></dt>
  16513. <dt><samp>dii</samp></dt>
  16514. <dt><samp>tdii</samp></dt>
  16515. <dt><samp>latt</samp></dt>
  16516. </dl>
  16517. </dd>
  16518. <dt><samp>precision, r</samp></dt>
  16519. <dd><p>Set precison of filtering.
  16520. </p><dl compact="compact">
  16521. <dt><samp>auto</samp></dt>
  16522. <dd><p>Pick automatic sample format depending on surround filters.
  16523. </p></dd>
  16524. <dt><samp>s16</samp></dt>
  16525. <dd><p>Always use signed 16-bit.
  16526. </p></dd>
  16527. <dt><samp>s32</samp></dt>
  16528. <dd><p>Always use signed 32-bit.
  16529. </p></dd>
  16530. <dt><samp>f32</samp></dt>
  16531. <dd><p>Always use float 32-bit.
  16532. </p></dd>
  16533. <dt><samp>f64</samp></dt>
  16534. <dd><p>Always use float 64-bit.
  16535. </p></dd>
  16536. </dl>
  16537. </dd>
  16538. </dl>
  16539. <a name="Examples-35"></a>
  16540. <h4 class="subsection">29.73.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-35" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-35" aria-hidden="true">TOC</a></span></h4>
  16541. <ul>
  16542. <li> Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
  16543. <div class="example">
  16544. <pre class="example">equalizer=f=1000:t=h:width=200:g=-10
  16545. </pre></div>
  16546. </li><li> Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz with Q 2:
  16547. <div class="example">
  16548. <pre class="example">equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
  16549. </pre></div>
  16550. </li></ul>
  16551. <a name="Commands-30"></a>
  16552. <h4 class="subsection">29.73.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-30" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-30" aria-hidden="true">TOC</a></span></h4>
  16553. <p>This filter supports the following commands:
  16554. </p><dl compact="compact">
  16555. <dt><samp>frequency, f</samp></dt>
  16556. <dd><p>Change equalizer frequency.
  16557. Syntax for the command is : &quot;<var>frequency</var>&quot;
  16558. </p>
  16559. </dd>
  16560. <dt><samp>width_type, t</samp></dt>
  16561. <dd><p>Change equalizer width_type.
  16562. Syntax for the command is : &quot;<var>width_type</var>&quot;
  16563. </p>
  16564. </dd>
  16565. <dt><samp>width, w</samp></dt>
  16566. <dd><p>Change equalizer width.
  16567. Syntax for the command is : &quot;<var>width</var>&quot;
  16568. </p>
  16569. </dd>
  16570. <dt><samp>gain, g</samp></dt>
  16571. <dd><p>Change equalizer gain.
  16572. Syntax for the command is : &quot;<var>gain</var>&quot;
  16573. </p>
  16574. </dd>
  16575. <dt><samp>mix, m</samp></dt>
  16576. <dd><p>Change equalizer mix.
  16577. Syntax for the command is : &quot;<var>mix</var>&quot;
  16578. </p></dd>
  16579. </dl>
  16580. <a name="extrastereo"></a>
  16581. <h3 class="section">29.74 extrastereo<span class="pull-right"><a class="anchor hidden-xs" href="#extrastereo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-extrastereo" aria-hidden="true">TOC</a></span></h3>
  16582. <p>Linearly increases the difference between left and right channels which
  16583. adds some sort of &quot;live&quot; effect to playback.
  16584. </p>
  16585. <p>The filter accepts the following options:
  16586. </p>
  16587. <dl compact="compact">
  16588. <dt><samp>m</samp></dt>
  16589. <dd><p>Sets the difference coefficient (default: 2.5). 0.0 means mono sound
  16590. (average of both channels), with 1.0 sound will be unchanged, with
  16591. -1.0 left and right channels will be swapped.
  16592. </p>
  16593. </dd>
  16594. <dt><samp>c</samp></dt>
  16595. <dd><p>Enable clipping. By default is enabled.
  16596. </p></dd>
  16597. </dl>
  16598. <a name="Commands-31"></a>
  16599. <h4 class="subsection">29.74.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-31" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-31" aria-hidden="true">TOC</a></span></h4>
  16600. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  16601. </p>
  16602. <a name="firequalizer"></a>
  16603. <h3 class="section">29.75 firequalizer<span class="pull-right"><a class="anchor hidden-xs" href="#firequalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-firequalizer" aria-hidden="true">TOC</a></span></h3>
  16604. <p>Apply FIR Equalization using arbitrary frequency response.
  16605. </p>
  16606. <p>The filter accepts the following option:
  16607. </p>
  16608. <dl compact="compact">
  16609. <dt><samp>gain</samp></dt>
  16610. <dd><p>Set gain curve equation (in dB). The expression can contain variables:
  16611. </p><dl compact="compact">
  16612. <dt><samp>f</samp></dt>
  16613. <dd><p>the evaluated frequency
  16614. </p></dd>
  16615. <dt><samp>sr</samp></dt>
  16616. <dd><p>sample rate
  16617. </p></dd>
  16618. <dt><samp>ch</samp></dt>
  16619. <dd><p>channel number, set to 0 when multichannels evaluation is disabled
  16620. </p></dd>
  16621. <dt><samp>chid</samp></dt>
  16622. <dd><p>channel id, see libavutil/channel_layout.h, set to the first channel id when
  16623. multichannels evaluation is disabled
  16624. </p></dd>
  16625. <dt><samp>chs</samp></dt>
  16626. <dd><p>number of channels
  16627. </p></dd>
  16628. <dt><samp>chlayout</samp></dt>
  16629. <dd><p>channel_layout, see libavutil/channel_layout.h
  16630. </p>
  16631. </dd>
  16632. </dl>
  16633. <p>and functions:
  16634. </p><dl compact="compact">
  16635. <dt><samp>gain_interpolate(f)</samp></dt>
  16636. <dd><p>interpolate gain on frequency f based on gain_entry
  16637. </p></dd>
  16638. <dt><samp>cubic_interpolate(f)</samp></dt>
  16639. <dd><p>same as gain_interpolate, but smoother
  16640. </p></dd>
  16641. </dl>
  16642. <p>This option is also available as command. Default is <code>gain_interpolate(f)</code>.
  16643. </p>
  16644. </dd>
  16645. <dt><samp>gain_entry</samp></dt>
  16646. <dd><p>Set gain entry for gain_interpolate function. The expression can
  16647. contain functions:
  16648. </p><dl compact="compact">
  16649. <dt><samp>entry(f, g)</samp></dt>
  16650. <dd><p>store gain entry at frequency f with value g
  16651. </p></dd>
  16652. </dl>
  16653. <p>This option is also available as command.
  16654. </p>
  16655. </dd>
  16656. <dt><samp>delay</samp></dt>
  16657. <dd><p>Set filter delay in seconds. Higher value means more accurate.
  16658. Default is <code>0.01</code>.
  16659. </p>
  16660. </dd>
  16661. <dt><samp>accuracy</samp></dt>
  16662. <dd><p>Set filter accuracy in Hz. Lower value means more accurate.
  16663. Default is <code>5</code>.
  16664. </p>
  16665. </dd>
  16666. <dt><samp>wfunc</samp></dt>
  16667. <dd><p>Set window function. Acceptable values are:
  16668. </p><dl compact="compact">
  16669. <dt><samp>rectangular</samp></dt>
  16670. <dd><p>rectangular window, useful when gain curve is already smooth
  16671. </p></dd>
  16672. <dt><samp>hann</samp></dt>
  16673. <dd><p>hann window (default)
  16674. </p></dd>
  16675. <dt><samp>hamming</samp></dt>
  16676. <dd><p>hamming window
  16677. </p></dd>
  16678. <dt><samp>blackman</samp></dt>
  16679. <dd><p>blackman window
  16680. </p></dd>
  16681. <dt><samp>nuttall3</samp></dt>
  16682. <dd><p>3-terms continuous 1st derivative nuttall window
  16683. </p></dd>
  16684. <dt><samp>mnuttall3</samp></dt>
  16685. <dd><p>minimum 3-terms discontinuous nuttall window
  16686. </p></dd>
  16687. <dt><samp>nuttall</samp></dt>
  16688. <dd><p>4-terms continuous 1st derivative nuttall window
  16689. </p></dd>
  16690. <dt><samp>bnuttall</samp></dt>
  16691. <dd><p>minimum 4-terms discontinuous nuttall (blackman-nuttall) window
  16692. </p></dd>
  16693. <dt><samp>bharris</samp></dt>
  16694. <dd><p>blackman-harris window
  16695. </p></dd>
  16696. <dt><samp>tukey</samp></dt>
  16697. <dd><p>tukey window
  16698. </p></dd>
  16699. </dl>
  16700. </dd>
  16701. <dt><samp>fixed</samp></dt>
  16702. <dd><p>If enabled, use fixed number of audio samples. This improves speed when
  16703. filtering with large delay. Default is disabled.
  16704. </p>
  16705. </dd>
  16706. <dt><samp>multi</samp></dt>
  16707. <dd><p>Enable multichannels evaluation on gain. Default is disabled.
  16708. </p>
  16709. </dd>
  16710. <dt><samp>zero_phase</samp></dt>
  16711. <dd><p>Enable zero phase mode by subtracting timestamp to compensate delay.
  16712. Default is disabled.
  16713. </p>
  16714. </dd>
  16715. <dt><samp>scale</samp></dt>
  16716. <dd><p>Set scale used by gain. Acceptable values are:
  16717. </p><dl compact="compact">
  16718. <dt><samp>linlin</samp></dt>
  16719. <dd><p>linear frequency, linear gain
  16720. </p></dd>
  16721. <dt><samp>linlog</samp></dt>
  16722. <dd><p>linear frequency, logarithmic (in dB) gain (default)
  16723. </p></dd>
  16724. <dt><samp>loglin</samp></dt>
  16725. <dd><p>logarithmic (in octave scale where 20 Hz is 0) frequency, linear gain
  16726. </p></dd>
  16727. <dt><samp>loglog</samp></dt>
  16728. <dd><p>logarithmic frequency, logarithmic gain
  16729. </p></dd>
  16730. </dl>
  16731. </dd>
  16732. <dt><samp>dumpfile</samp></dt>
  16733. <dd><p>Set file for dumping, suitable for gnuplot.
  16734. </p>
  16735. </dd>
  16736. <dt><samp>dumpscale</samp></dt>
  16737. <dd><p>Set scale for dumpfile. Acceptable values are same with scale option.
  16738. Default is linlog.
  16739. </p>
  16740. </dd>
  16741. <dt><samp>fft2</samp></dt>
  16742. <dd><p>Enable 2-channel convolution using complex FFT. This improves speed significantly.
  16743. Default is disabled.
  16744. </p>
  16745. </dd>
  16746. <dt><samp>min_phase</samp></dt>
  16747. <dd><p>Enable minimum phase impulse response. Default is disabled.
  16748. </p></dd>
  16749. </dl>
  16750. <a name="Examples-36"></a>
  16751. <h4 class="subsection">29.75.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-36" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-36" aria-hidden="true">TOC</a></span></h4>
  16752. <ul>
  16753. <li> lowpass at 1000 Hz:
  16754. <div class="example">
  16755. <pre class="example">firequalizer=gain='if(lt(f,1000), 0, -INF)'
  16756. </pre></div>
  16757. </li><li> lowpass at 1000 Hz with gain_entry:
  16758. <div class="example">
  16759. <pre class="example">firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
  16760. </pre></div>
  16761. </li><li> custom equalization:
  16762. <div class="example">
  16763. <pre class="example">firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
  16764. </pre></div>
  16765. </li><li> higher delay with zero phase to compensate delay:
  16766. <div class="example">
  16767. <pre class="example">firequalizer=delay=0.1:fixed=on:zero_phase=on
  16768. </pre></div>
  16769. </li><li> lowpass on left channel, highpass on right channel:
  16770. <div class="example">
  16771. <pre class="example">firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
  16772. :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
  16773. </pre></div>
  16774. </li></ul>
  16775. <a name="flanger"></a>
  16776. <h3 class="section">29.76 flanger<span class="pull-right"><a class="anchor hidden-xs" href="#flanger" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-flanger" aria-hidden="true">TOC</a></span></h3>
  16777. <p>Apply a flanging effect to the audio.
  16778. </p>
  16779. <p>The filter accepts the following options:
  16780. </p>
  16781. <dl compact="compact">
  16782. <dt><samp>delay</samp></dt>
  16783. <dd><p>Set base delay in milliseconds. Range from 0 to 30. Default value is 0.
  16784. </p>
  16785. </dd>
  16786. <dt><samp>depth</samp></dt>
  16787. <dd><p>Set added sweep delay in milliseconds. Range from 0 to 10. Default value is 2.
  16788. </p>
  16789. </dd>
  16790. <dt><samp>regen</samp></dt>
  16791. <dd><p>Set percentage regeneration (delayed signal feedback). Range from -95 to 95.
  16792. Default value is 0.
  16793. </p>
  16794. </dd>
  16795. <dt><samp>width</samp></dt>
  16796. <dd><p>Set percentage of delayed signal mixed with original. Range from 0 to 100.
  16797. Default value is 71.
  16798. </p>
  16799. </dd>
  16800. <dt><samp>speed</samp></dt>
  16801. <dd><p>Set sweeps per second (Hz). Range from 0.1 to 10. Default value is 0.5.
  16802. </p>
  16803. </dd>
  16804. <dt><samp>shape</samp></dt>
  16805. <dd><p>Set swept wave shape, can be <var>triangular</var> or <var>sinusoidal</var>.
  16806. Default value is <var>sinusoidal</var>.
  16807. </p>
  16808. </dd>
  16809. <dt><samp>phase</samp></dt>
  16810. <dd><p>Set swept wave percentage-shift for multi channel. Range from 0 to 100.
  16811. Default value is 25.
  16812. </p>
  16813. </dd>
  16814. <dt><samp>interp</samp></dt>
  16815. <dd><p>Set delay-line interpolation, <var>linear</var> or <var>quadratic</var>.
  16816. Default is <var>linear</var>.
  16817. </p></dd>
  16818. </dl>
  16819. <a name="haas"></a>
  16820. <h3 class="section">29.77 haas<span class="pull-right"><a class="anchor hidden-xs" href="#haas" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-haas" aria-hidden="true">TOC</a></span></h3>
  16821. <p>Apply Haas effect to audio.
  16822. </p>
  16823. <p>Note that this makes most sense to apply on mono signals.
  16824. With this filter applied to mono signals it give some directionality and
  16825. stretches its stereo image.
  16826. </p>
  16827. <p>The filter accepts the following options:
  16828. </p>
  16829. <dl compact="compact">
  16830. <dt><samp>level_in</samp></dt>
  16831. <dd><p>Set input level. By default is <var>1</var>, or 0dB
  16832. </p>
  16833. </dd>
  16834. <dt><samp>level_out</samp></dt>
  16835. <dd><p>Set output level. By default is <var>1</var>, or 0dB.
  16836. </p>
  16837. </dd>
  16838. <dt><samp>side_gain</samp></dt>
  16839. <dd><p>Set gain applied to side part of signal. By default is <var>1</var>.
  16840. </p>
  16841. </dd>
  16842. <dt><samp>middle_source</samp></dt>
  16843. <dd><p>Set kind of middle source. Can be one of the following:
  16844. </p>
  16845. <dl compact="compact">
  16846. <dt>&lsquo;<samp>left</samp>&rsquo;</dt>
  16847. <dd><p>Pick left channel.
  16848. </p>
  16849. </dd>
  16850. <dt>&lsquo;<samp>right</samp>&rsquo;</dt>
  16851. <dd><p>Pick right channel.
  16852. </p>
  16853. </dd>
  16854. <dt>&lsquo;<samp>mid</samp>&rsquo;</dt>
  16855. <dd><p>Pick middle part signal of stereo image.
  16856. </p>
  16857. </dd>
  16858. <dt>&lsquo;<samp>side</samp>&rsquo;</dt>
  16859. <dd><p>Pick side part signal of stereo image.
  16860. </p></dd>
  16861. </dl>
  16862. </dd>
  16863. <dt><samp>middle_phase</samp></dt>
  16864. <dd><p>Change middle phase. By default is disabled.
  16865. </p>
  16866. </dd>
  16867. <dt><samp>left_delay</samp></dt>
  16868. <dd><p>Set left channel delay. By default is <var>2.05</var> milliseconds.
  16869. </p>
  16870. </dd>
  16871. <dt><samp>left_balance</samp></dt>
  16872. <dd><p>Set left channel balance. By default is <var>-1</var>.
  16873. </p>
  16874. </dd>
  16875. <dt><samp>left_gain</samp></dt>
  16876. <dd><p>Set left channel gain. By default is <var>1</var>.
  16877. </p>
  16878. </dd>
  16879. <dt><samp>left_phase</samp></dt>
  16880. <dd><p>Change left phase. By default is disabled.
  16881. </p>
  16882. </dd>
  16883. <dt><samp>right_delay</samp></dt>
  16884. <dd><p>Set right channel delay. By defaults is <var>2.12</var> milliseconds.
  16885. </p>
  16886. </dd>
  16887. <dt><samp>right_balance</samp></dt>
  16888. <dd><p>Set right channel balance. By default is <var>1</var>.
  16889. </p>
  16890. </dd>
  16891. <dt><samp>right_gain</samp></dt>
  16892. <dd><p>Set right channel gain. By default is <var>1</var>.
  16893. </p>
  16894. </dd>
  16895. <dt><samp>right_phase</samp></dt>
  16896. <dd><p>Change right phase. By default is enabled.
  16897. </p></dd>
  16898. </dl>
  16899. <a name="hdcd"></a>
  16900. <h3 class="section">29.78 hdcd<span class="pull-right"><a class="anchor hidden-xs" href="#hdcd" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hdcd" aria-hidden="true">TOC</a></span></h3>
  16901. <p>Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with
  16902. embedded HDCD codes is expanded into a 20-bit PCM stream.
  16903. </p>
  16904. <p>The filter supports the Peak Extend and Low-level Gain Adjustment features
  16905. of HDCD, and detects the Transient Filter flag.
  16906. </p>
  16907. <div class="example">
  16908. <pre class="example">ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
  16909. </pre></div>
  16910. <p>When using the filter with wav, note the default encoding for wav is 16-bit,
  16911. so the resulting 20-bit stream will be truncated back to 16-bit. Use something
  16912. like <code>-acodec pcm_s24le</code> after the filter to get 24-bit PCM output.
  16913. </p><div class="example">
  16914. <pre class="example">ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
  16915. ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
  16916. </pre></div>
  16917. <p>The filter accepts the following options:
  16918. </p>
  16919. <dl compact="compact">
  16920. <dt><samp>disable_autoconvert</samp></dt>
  16921. <dd><p>Disable any automatic format conversion or resampling in the filter graph.
  16922. </p>
  16923. </dd>
  16924. <dt><samp>process_stereo</samp></dt>
  16925. <dd><p>Process the stereo channels together. If target_gain does not match between
  16926. channels, consider it invalid and use the last valid target_gain.
  16927. </p>
  16928. </dd>
  16929. <dt><samp>cdt_ms</samp></dt>
  16930. <dd><p>Set the code detect timer period in ms.
  16931. </p>
  16932. </dd>
  16933. <dt><samp>force_pe</samp></dt>
  16934. <dd><p>Always extend peaks above -3dBFS even if PE isn&rsquo;t signaled.
  16935. </p>
  16936. </dd>
  16937. <dt><samp>analyze_mode</samp></dt>
  16938. <dd><p>Replace audio with a solid tone and adjust the amplitude to signal some
  16939. specific aspect of the decoding process. The output file can be loaded in
  16940. an audio editor alongside the original to aid analysis.
  16941. </p>
  16942. <p><code>analyze_mode=pe:force_pe=true</code> can be used to see all samples above the PE level.
  16943. </p>
  16944. <p>Modes are:
  16945. </p><dl compact="compact">
  16946. <dt>&lsquo;<samp>0, off</samp>&rsquo;</dt>
  16947. <dd><p>Disabled
  16948. </p></dd>
  16949. <dt>&lsquo;<samp>1, lle</samp>&rsquo;</dt>
  16950. <dd><p>Gain adjustment level at each sample
  16951. </p></dd>
  16952. <dt>&lsquo;<samp>2, pe</samp>&rsquo;</dt>
  16953. <dd><p>Samples where peak extend occurs
  16954. </p></dd>
  16955. <dt>&lsquo;<samp>3, cdt</samp>&rsquo;</dt>
  16956. <dd><p>Samples where the code detect timer is active
  16957. </p></dd>
  16958. <dt>&lsquo;<samp>4, tgm</samp>&rsquo;</dt>
  16959. <dd><p>Samples where the target gain does not match between channels
  16960. </p></dd>
  16961. </dl>
  16962. </dd>
  16963. </dl>
  16964. <a name="headphone"></a>
  16965. <h3 class="section">29.79 headphone<span class="pull-right"><a class="anchor hidden-xs" href="#headphone" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-headphone" aria-hidden="true">TOC</a></span></h3>
  16966. <p>Apply head-related transfer functions (HRTFs) to create virtual
  16967. loudspeakers around the user for binaural listening via headphones.
  16968. The HRIRs are provided via additional streams, for each channel
  16969. one stereo input stream is needed.
  16970. </p>
  16971. <p>The filter accepts the following options:
  16972. </p>
  16973. <dl compact="compact">
  16974. <dt><samp>map</samp></dt>
  16975. <dd><p>Set mapping of input streams for convolution.
  16976. The argument is a &rsquo;|&rsquo;-separated list of channel names in order as they
  16977. are given as additional stream inputs for filter.
  16978. This also specify number of input streams. Number of input streams
  16979. must be not less than number of channels in first stream plus one.
  16980. </p>
  16981. </dd>
  16982. <dt><samp>gain</samp></dt>
  16983. <dd><p>Set gain applied to audio. Value is in dB. Default is 0.
  16984. </p>
  16985. </dd>
  16986. <dt><samp>type</samp></dt>
  16987. <dd><p>Set processing type. Can be <var>time</var> or <var>freq</var>. <var>time</var> is
  16988. processing audio in time domain which is slow.
  16989. <var>freq</var> is processing audio in frequency domain which is fast.
  16990. Default is <var>freq</var>.
  16991. </p>
  16992. </dd>
  16993. <dt><samp>lfe</samp></dt>
  16994. <dd><p>Set custom gain for LFE channels. Value is in dB. Default is 0.
  16995. </p>
  16996. </dd>
  16997. <dt><samp>size</samp></dt>
  16998. <dd><p>Set size of frame in number of samples which will be processed at once.
  16999. Default value is <var>1024</var>. Allowed range is from 1024 to 96000.
  17000. </p>
  17001. </dd>
  17002. <dt><samp>hrir</samp></dt>
  17003. <dd><p>Set format of hrir stream.
  17004. Default value is <var>stereo</var>. Alternative value is <var>multich</var>.
  17005. If value is set to <var>stereo</var>, number of additional streams should
  17006. be greater or equal to number of input channels in first input stream.
  17007. Also each additional stream should have stereo number of channels.
  17008. If value is set to <var>multich</var>, number of additional streams should
  17009. be exactly one. Also number of input channels of additional stream
  17010. should be equal or greater than twice number of channels of first input
  17011. stream.
  17012. </p></dd>
  17013. </dl>
  17014. <a name="Examples-37"></a>
  17015. <h4 class="subsection">29.79.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-37" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-37" aria-hidden="true">TOC</a></span></h4>
  17016. <ul>
  17017. <li> Full example using wav files as coefficients with amovie filters for 7.1 downmix,
  17018. each amovie filter use stereo file with IR coefficients as input.
  17019. The files give coefficients for each position of virtual loudspeaker:
  17020. <div class="example">
  17021. <pre class="example">ffmpeg -i input.wav
  17022. -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;
  17023. output.wav
  17024. </pre></div>
  17025. </li><li> Full example using wav files as coefficients with amovie filters for 7.1 downmix,
  17026. but now in <var>multich</var> <var>hrir</var> format.
  17027. <div class="example">
  17028. <pre class="example">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;
  17029. output.wav
  17030. </pre></div>
  17031. </li></ul>
  17032. <a name="highpass"></a>
  17033. <h3 class="section">29.80 highpass<span class="pull-right"><a class="anchor hidden-xs" href="#highpass" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-highpass" aria-hidden="true">TOC</a></span></h3>
  17034. <p>Apply a high-pass filter with 3dB point frequency.
  17035. The filter can be either single-pole, or double-pole (the default).
  17036. The filter roll off at 6dB per pole per octave (20dB per pole per decade).
  17037. </p>
  17038. <p>The filter accepts the following options:
  17039. </p>
  17040. <dl compact="compact">
  17041. <dt><samp>frequency, f</samp></dt>
  17042. <dd><p>Set frequency in Hz. Default is 3000.
  17043. </p>
  17044. </dd>
  17045. <dt><samp>poles, p</samp></dt>
  17046. <dd><p>Set number of poles. Default is 2.
  17047. </p>
  17048. </dd>
  17049. <dt><samp>width_type, t</samp></dt>
  17050. <dd><p>Set method to specify band-width of filter.
  17051. </p><dl compact="compact">
  17052. <dt><samp>h</samp></dt>
  17053. <dd><p>Hz
  17054. </p></dd>
  17055. <dt><samp>q</samp></dt>
  17056. <dd><p>Q-Factor
  17057. </p></dd>
  17058. <dt><samp>o</samp></dt>
  17059. <dd><p>octave
  17060. </p></dd>
  17061. <dt><samp>s</samp></dt>
  17062. <dd><p>slope
  17063. </p></dd>
  17064. <dt><samp>k</samp></dt>
  17065. <dd><p>kHz
  17066. </p></dd>
  17067. </dl>
  17068. </dd>
  17069. <dt><samp>width, w</samp></dt>
  17070. <dd><p>Specify the band-width of a filter in width_type units.
  17071. Applies only to double-pole filter.
  17072. The default is 0.707q and gives a Butterworth response.
  17073. </p>
  17074. </dd>
  17075. <dt><samp>mix, m</samp></dt>
  17076. <dd><p>How much to use filtered signal in output. Default is 1.
  17077. Range is between 0 and 1.
  17078. </p>
  17079. </dd>
  17080. <dt><samp>channels, c</samp></dt>
  17081. <dd><p>Specify which channels to filter, by default all available are filtered.
  17082. </p>
  17083. </dd>
  17084. <dt><samp>normalize, n</samp></dt>
  17085. <dd><p>Normalize biquad coefficients, by default is disabled.
  17086. Enabling it will normalize magnitude response at DC to 0dB.
  17087. </p>
  17088. </dd>
  17089. <dt><samp>transform, a</samp></dt>
  17090. <dd><p>Set transform type of IIR filter.
  17091. </p><dl compact="compact">
  17092. <dt><samp>di</samp></dt>
  17093. <dt><samp>dii</samp></dt>
  17094. <dt><samp>tdii</samp></dt>
  17095. <dt><samp>latt</samp></dt>
  17096. </dl>
  17097. </dd>
  17098. <dt><samp>precision, r</samp></dt>
  17099. <dd><p>Set precison of filtering.
  17100. </p><dl compact="compact">
  17101. <dt><samp>auto</samp></dt>
  17102. <dd><p>Pick automatic sample format depending on surround filters.
  17103. </p></dd>
  17104. <dt><samp>s16</samp></dt>
  17105. <dd><p>Always use signed 16-bit.
  17106. </p></dd>
  17107. <dt><samp>s32</samp></dt>
  17108. <dd><p>Always use signed 32-bit.
  17109. </p></dd>
  17110. <dt><samp>f32</samp></dt>
  17111. <dd><p>Always use float 32-bit.
  17112. </p></dd>
  17113. <dt><samp>f64</samp></dt>
  17114. <dd><p>Always use float 64-bit.
  17115. </p></dd>
  17116. </dl>
  17117. </dd>
  17118. </dl>
  17119. <a name="Commands-32"></a>
  17120. <h4 class="subsection">29.80.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-32" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-32" aria-hidden="true">TOC</a></span></h4>
  17121. <p>This filter supports the following commands:
  17122. </p><dl compact="compact">
  17123. <dt><samp>frequency, f</samp></dt>
  17124. <dd><p>Change highpass frequency.
  17125. Syntax for the command is : &quot;<var>frequency</var>&quot;
  17126. </p>
  17127. </dd>
  17128. <dt><samp>width_type, t</samp></dt>
  17129. <dd><p>Change highpass width_type.
  17130. Syntax for the command is : &quot;<var>width_type</var>&quot;
  17131. </p>
  17132. </dd>
  17133. <dt><samp>width, w</samp></dt>
  17134. <dd><p>Change highpass width.
  17135. Syntax for the command is : &quot;<var>width</var>&quot;
  17136. </p>
  17137. </dd>
  17138. <dt><samp>mix, m</samp></dt>
  17139. <dd><p>Change highpass mix.
  17140. Syntax for the command is : &quot;<var>mix</var>&quot;
  17141. </p></dd>
  17142. </dl>
  17143. <a name="join"></a>
  17144. <h3 class="section">29.81 join<span class="pull-right"><a class="anchor hidden-xs" href="#join" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-join" aria-hidden="true">TOC</a></span></h3>
  17145. <p>Join multiple input streams into one multi-channel stream.
  17146. </p>
  17147. <p>It accepts the following parameters:
  17148. </p><dl compact="compact">
  17149. <dt><samp>inputs</samp></dt>
  17150. <dd><p>The number of input streams. It defaults to 2.
  17151. </p>
  17152. </dd>
  17153. <dt><samp>channel_layout</samp></dt>
  17154. <dd><p>The desired output channel layout. It defaults to stereo.
  17155. </p>
  17156. </dd>
  17157. <dt><samp>map</samp></dt>
  17158. <dd><p>Map channels from inputs to output. The argument is a &rsquo;|&rsquo;-separated list of
  17159. mappings, each in the <code><var>input_idx</var>.<var>in_channel</var>-<var>out_channel</var></code>
  17160. form. <var>input_idx</var> is the 0-based index of the input stream. <var>in_channel</var>
  17161. can be either the name of the input channel (e.g. FL for front left) or its
  17162. index in the specified input stream. <var>out_channel</var> is the name of the output
  17163. channel.
  17164. </p></dd>
  17165. </dl>
  17166. <p>The filter will attempt to guess the mappings when they are not specified
  17167. explicitly. It does so by first trying to find an unused matching input channel
  17168. and if that fails it picks the first unused input channel.
  17169. </p>
  17170. <p>Join 3 inputs (with properly set channel layouts):
  17171. </p><div class="example">
  17172. <pre class="example">ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
  17173. </pre></div>
  17174. <p>Build a 5.1 output from 6 single-channel streams:
  17175. </p><div class="example">
  17176. <pre class="example">ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
  17177. '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'
  17178. out
  17179. </pre></div>
  17180. <a name="ladspa"></a>
  17181. <h3 class="section">29.82 ladspa<span class="pull-right"><a class="anchor hidden-xs" href="#ladspa" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ladspa" aria-hidden="true">TOC</a></span></h3>
  17182. <p>Load a LADSPA (Linux Audio Developer&rsquo;s Simple Plugin API) plugin.
  17183. </p>
  17184. <p>To enable compilation of this filter you need to configure FFmpeg with
  17185. <code>--enable-ladspa</code>.
  17186. </p>
  17187. <dl compact="compact">
  17188. <dt><samp>file, f</samp></dt>
  17189. <dd><p>Specifies the name of LADSPA plugin library to load. If the environment
  17190. variable <code>LADSPA_PATH</code> is defined, the LADSPA plugin is searched in
  17191. each one of the directories specified by the colon separated list in
  17192. <code>LADSPA_PATH</code>, otherwise in the standard LADSPA paths, which are in
  17193. this order: <samp>HOME/.ladspa/lib/</samp>, <samp>/usr/local/lib/ladspa/</samp>,
  17194. <samp>/usr/lib/ladspa/</samp>.
  17195. </p>
  17196. </dd>
  17197. <dt><samp>plugin, p</samp></dt>
  17198. <dd><p>Specifies the plugin within the library. Some libraries contain only
  17199. one plugin, but others contain many of them. If this is not set filter
  17200. will list all available plugins within the specified library.
  17201. </p>
  17202. </dd>
  17203. <dt><samp>controls, c</samp></dt>
  17204. <dd><p>Set the &rsquo;|&rsquo; separated list of controls which are zero or more floating point
  17205. values that determine the behavior of the loaded plugin (for example delay,
  17206. threshold or gain).
  17207. Controls need to be defined using the following syntax:
  17208. c0=<var>value0</var>|c1=<var>value1</var>|c2=<var>value2</var>|..., where
  17209. <var>valuei</var> is the value set on the <var>i</var>-th control.
  17210. Alternatively they can be also defined using the following syntax:
  17211. <var>value0</var>|<var>value1</var>|<var>value2</var>|..., where
  17212. <var>valuei</var> is the value set on the <var>i</var>-th control.
  17213. If <samp>controls</samp> is set to <code>help</code>, all available controls and
  17214. their valid ranges are printed.
  17215. </p>
  17216. </dd>
  17217. <dt><samp>sample_rate, s</samp></dt>
  17218. <dd><p>Specify the sample rate, default to 44100. Only used if plugin have
  17219. zero inputs.
  17220. </p>
  17221. </dd>
  17222. <dt><samp>nb_samples, n</samp></dt>
  17223. <dd><p>Set the number of samples per channel per each output frame, default
  17224. is 1024. Only used if plugin have zero inputs.
  17225. </p>
  17226. </dd>
  17227. <dt><samp>duration, d</samp></dt>
  17228. <dd><p>Set the minimum duration of the sourced audio. See
  17229. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  17230. for the accepted syntax.
  17231. Note that the resulting duration may be greater than the specified duration,
  17232. as the generated audio is always cut at the end of a complete frame.
  17233. If not specified, or the expressed duration is negative, the audio is
  17234. supposed to be generated forever.
  17235. Only used if plugin have zero inputs.
  17236. </p>
  17237. </dd>
  17238. <dt><samp>latency, l</samp></dt>
  17239. <dd><p>Enable latency compensation, by default is disabled.
  17240. Only used if plugin have inputs.
  17241. </p></dd>
  17242. </dl>
  17243. <a name="Examples-38"></a>
  17244. <h4 class="subsection">29.82.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-38" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-38" aria-hidden="true">TOC</a></span></h4>
  17245. <ul>
  17246. <li> List all available plugins within amp (LADSPA example plugin) library:
  17247. <div class="example">
  17248. <pre class="example">ladspa=file=amp
  17249. </pre></div>
  17250. </li><li> List all available controls and their valid ranges for <code>vcf_notch</code>
  17251. plugin from <code>VCF</code> library:
  17252. <div class="example">
  17253. <pre class="example">ladspa=f=vcf:p=vcf_notch:c=help
  17254. </pre></div>
  17255. </li><li> Simulate low quality audio equipment using <code>Computer Music Toolkit</code> (CMT)
  17256. plugin library:
  17257. <div class="example">
  17258. <pre class="example">ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
  17259. </pre></div>
  17260. </li><li> Add reverberation to the audio using TAP-plugins
  17261. (Tom&rsquo;s Audio Processing plugins):
  17262. <div class="example">
  17263. <pre class="example">ladspa=file=tap_reverb:tap_reverb
  17264. </pre></div>
  17265. </li><li> Generate white noise, with 0.2 amplitude:
  17266. <div class="example">
  17267. <pre class="example">ladspa=file=cmt:noise_source_white:c=c0=.2
  17268. </pre></div>
  17269. </li><li> Generate 20 bpm clicks using plugin <code>C* Click - Metronome</code> from the
  17270. <code>C* Audio Plugin Suite</code> (CAPS) library:
  17271. <div class="example">
  17272. <pre class="example">ladspa=file=caps:Click:c=c1=20'
  17273. </pre></div>
  17274. </li><li> Apply <code>C* Eq10X2 - Stereo 10-band equaliser</code> effect:
  17275. <div class="example">
  17276. <pre class="example">ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
  17277. </pre></div>
  17278. </li><li> Increase volume by 20dB using fast lookahead limiter from Steve Harris
  17279. <code>SWH Plugins</code> collection:
  17280. <div class="example">
  17281. <pre class="example">ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
  17282. </pre></div>
  17283. </li><li> Attenuate low frequencies using Multiband EQ from Steve Harris
  17284. <code>SWH Plugins</code> collection:
  17285. <div class="example">
  17286. <pre class="example">ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
  17287. </pre></div>
  17288. </li><li> Reduce stereo image using <code>Narrower</code> from the <code>C* Audio Plugin Suite</code>
  17289. (CAPS) library:
  17290. <div class="example">
  17291. <pre class="example">ladspa=caps:Narrower
  17292. </pre></div>
  17293. </li><li> Another white noise, now using <code>C* Audio Plugin Suite</code> (CAPS) library:
  17294. <div class="example">
  17295. <pre class="example">ladspa=caps:White:.2
  17296. </pre></div>
  17297. </li><li> Some fractal noise, using <code>C* Audio Plugin Suite</code> (CAPS) library:
  17298. <div class="example">
  17299. <pre class="example">ladspa=caps:Fractal:c=c1=1
  17300. </pre></div>
  17301. </li><li> Dynamic volume normalization using <code>VLevel</code> plugin:
  17302. <div class="example">
  17303. <pre class="example">ladspa=vlevel-ladspa:vlevel_mono
  17304. </pre></div>
  17305. </li></ul>
  17306. <a name="Commands-33"></a>
  17307. <h4 class="subsection">29.82.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-33" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-33" aria-hidden="true">TOC</a></span></h4>
  17308. <p>This filter supports the following commands:
  17309. </p><dl compact="compact">
  17310. <dt><samp>cN</samp></dt>
  17311. <dd><p>Modify the <var>N</var>-th control value.
  17312. </p>
  17313. <p>If the specified value is not valid, it is ignored and prior one is kept.
  17314. </p></dd>
  17315. </dl>
  17316. <a name="loudnorm"></a>
  17317. <h3 class="section">29.83 loudnorm<span class="pull-right"><a class="anchor hidden-xs" href="#loudnorm" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-loudnorm" aria-hidden="true">TOC</a></span></h3>
  17318. <p>EBU R128 loudness normalization. Includes both dynamic and linear normalization modes.
  17319. Support for both single pass (livestreams, files) and double pass (files) modes.
  17320. This algorithm can target IL, LRA, and maximum true peak. In dynamic mode, to accurately
  17321. detect true peaks, the audio stream will be upsampled to 192 kHz.
  17322. Use the <code>-ar</code> option or <code>aresample</code> filter to explicitly set an output sample rate.
  17323. </p>
  17324. <p>The filter accepts the following options:
  17325. </p>
  17326. <dl compact="compact">
  17327. <dt><samp>I, i</samp></dt>
  17328. <dd><p>Set integrated loudness target.
  17329. Range is -70.0 - -5.0. Default value is -24.0.
  17330. </p>
  17331. </dd>
  17332. <dt><samp>LRA, lra</samp></dt>
  17333. <dd><p>Set loudness range target.
  17334. Range is 1.0 - 20.0. Default value is 7.0.
  17335. </p>
  17336. </dd>
  17337. <dt><samp>TP, tp</samp></dt>
  17338. <dd><p>Set maximum true peak.
  17339. Range is -9.0 - +0.0. Default value is -2.0.
  17340. </p>
  17341. </dd>
  17342. <dt><samp>measured_I, measured_i</samp></dt>
  17343. <dd><p>Measured IL of input file.
  17344. Range is -99.0 - +0.0.
  17345. </p>
  17346. </dd>
  17347. <dt><samp>measured_LRA, measured_lra</samp></dt>
  17348. <dd><p>Measured LRA of input file.
  17349. Range is 0.0 - 99.0.
  17350. </p>
  17351. </dd>
  17352. <dt><samp>measured_TP, measured_tp</samp></dt>
  17353. <dd><p>Measured true peak of input file.
  17354. Range is -99.0 - +99.0.
  17355. </p>
  17356. </dd>
  17357. <dt><samp>measured_thresh</samp></dt>
  17358. <dd><p>Measured threshold of input file.
  17359. Range is -99.0 - +0.0.
  17360. </p>
  17361. </dd>
  17362. <dt><samp>offset</samp></dt>
  17363. <dd><p>Set offset gain. Gain is applied before the true-peak limiter.
  17364. Range is -99.0 - +99.0. Default is +0.0.
  17365. </p>
  17366. </dd>
  17367. <dt><samp>linear</samp></dt>
  17368. <dd><p>Normalize by linearly scaling the source audio.
  17369. <code>measured_I</code>, <code>measured_LRA</code>, <code>measured_TP</code>,
  17370. and <code>measured_thresh</code> must all be specified. Target LRA shouldn&rsquo;t
  17371. be lower than source LRA and the change in integrated loudness shouldn&rsquo;t
  17372. result in a true peak which exceeds the target TP. If any of these
  17373. conditions aren&rsquo;t met, normalization mode will revert to <var>dynamic</var>.
  17374. Options are <code>true</code> or <code>false</code>. Default is <code>true</code>.
  17375. </p>
  17376. </dd>
  17377. <dt><samp>dual_mono</samp></dt>
  17378. <dd><p>Treat mono input files as &quot;dual-mono&quot;. If a mono file is intended for playback
  17379. on a stereo system, its EBU R128 measurement will be perceptually incorrect.
  17380. If set to <code>true</code>, this option will compensate for this effect.
  17381. Multi-channel input files are not affected by this option.
  17382. Options are true or false. Default is false.
  17383. </p>
  17384. </dd>
  17385. <dt><samp>print_format</samp></dt>
  17386. <dd><p>Set print format for stats. Options are summary, json, or none.
  17387. Default value is none.
  17388. </p></dd>
  17389. </dl>
  17390. <a name="lowpass"></a>
  17391. <h3 class="section">29.84 lowpass<span class="pull-right"><a class="anchor hidden-xs" href="#lowpass" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lowpass" aria-hidden="true">TOC</a></span></h3>
  17392. <p>Apply a low-pass filter with 3dB point frequency.
  17393. The filter can be either single-pole or double-pole (the default).
  17394. The filter roll off at 6dB per pole per octave (20dB per pole per decade).
  17395. </p>
  17396. <p>The filter accepts the following options:
  17397. </p>
  17398. <dl compact="compact">
  17399. <dt><samp>frequency, f</samp></dt>
  17400. <dd><p>Set frequency in Hz. Default is 500.
  17401. </p>
  17402. </dd>
  17403. <dt><samp>poles, p</samp></dt>
  17404. <dd><p>Set number of poles. Default is 2.
  17405. </p>
  17406. </dd>
  17407. <dt><samp>width_type, t</samp></dt>
  17408. <dd><p>Set method to specify band-width of filter.
  17409. </p><dl compact="compact">
  17410. <dt><samp>h</samp></dt>
  17411. <dd><p>Hz
  17412. </p></dd>
  17413. <dt><samp>q</samp></dt>
  17414. <dd><p>Q-Factor
  17415. </p></dd>
  17416. <dt><samp>o</samp></dt>
  17417. <dd><p>octave
  17418. </p></dd>
  17419. <dt><samp>s</samp></dt>
  17420. <dd><p>slope
  17421. </p></dd>
  17422. <dt><samp>k</samp></dt>
  17423. <dd><p>kHz
  17424. </p></dd>
  17425. </dl>
  17426. </dd>
  17427. <dt><samp>width, w</samp></dt>
  17428. <dd><p>Specify the band-width of a filter in width_type units.
  17429. Applies only to double-pole filter.
  17430. The default is 0.707q and gives a Butterworth response.
  17431. </p>
  17432. </dd>
  17433. <dt><samp>mix, m</samp></dt>
  17434. <dd><p>How much to use filtered signal in output. Default is 1.
  17435. Range is between 0 and 1.
  17436. </p>
  17437. </dd>
  17438. <dt><samp>channels, c</samp></dt>
  17439. <dd><p>Specify which channels to filter, by default all available are filtered.
  17440. </p>
  17441. </dd>
  17442. <dt><samp>normalize, n</samp></dt>
  17443. <dd><p>Normalize biquad coefficients, by default is disabled.
  17444. Enabling it will normalize magnitude response at DC to 0dB.
  17445. </p>
  17446. </dd>
  17447. <dt><samp>transform, a</samp></dt>
  17448. <dd><p>Set transform type of IIR filter.
  17449. </p><dl compact="compact">
  17450. <dt><samp>di</samp></dt>
  17451. <dt><samp>dii</samp></dt>
  17452. <dt><samp>tdii</samp></dt>
  17453. <dt><samp>latt</samp></dt>
  17454. </dl>
  17455. </dd>
  17456. <dt><samp>precision, r</samp></dt>
  17457. <dd><p>Set precison of filtering.
  17458. </p><dl compact="compact">
  17459. <dt><samp>auto</samp></dt>
  17460. <dd><p>Pick automatic sample format depending on surround filters.
  17461. </p></dd>
  17462. <dt><samp>s16</samp></dt>
  17463. <dd><p>Always use signed 16-bit.
  17464. </p></dd>
  17465. <dt><samp>s32</samp></dt>
  17466. <dd><p>Always use signed 32-bit.
  17467. </p></dd>
  17468. <dt><samp>f32</samp></dt>
  17469. <dd><p>Always use float 32-bit.
  17470. </p></dd>
  17471. <dt><samp>f64</samp></dt>
  17472. <dd><p>Always use float 64-bit.
  17473. </p></dd>
  17474. </dl>
  17475. </dd>
  17476. </dl>
  17477. <a name="Examples-39"></a>
  17478. <h4 class="subsection">29.84.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-39" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-39" aria-hidden="true">TOC</a></span></h4>
  17479. <ul>
  17480. <li> Lowpass only LFE channel, it LFE is not present it does nothing:
  17481. <div class="example">
  17482. <pre class="example">lowpass=c=LFE
  17483. </pre></div>
  17484. </li></ul>
  17485. <a name="Commands-34"></a>
  17486. <h4 class="subsection">29.84.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-34" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-34" aria-hidden="true">TOC</a></span></h4>
  17487. <p>This filter supports the following commands:
  17488. </p><dl compact="compact">
  17489. <dt><samp>frequency, f</samp></dt>
  17490. <dd><p>Change lowpass frequency.
  17491. Syntax for the command is : &quot;<var>frequency</var>&quot;
  17492. </p>
  17493. </dd>
  17494. <dt><samp>width_type, t</samp></dt>
  17495. <dd><p>Change lowpass width_type.
  17496. Syntax for the command is : &quot;<var>width_type</var>&quot;
  17497. </p>
  17498. </dd>
  17499. <dt><samp>width, w</samp></dt>
  17500. <dd><p>Change lowpass width.
  17501. Syntax for the command is : &quot;<var>width</var>&quot;
  17502. </p>
  17503. </dd>
  17504. <dt><samp>mix, m</samp></dt>
  17505. <dd><p>Change lowpass mix.
  17506. Syntax for the command is : &quot;<var>mix</var>&quot;
  17507. </p></dd>
  17508. </dl>
  17509. <a name="lv2"></a>
  17510. <h3 class="section">29.85 lv2<span class="pull-right"><a class="anchor hidden-xs" href="#lv2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lv2" aria-hidden="true">TOC</a></span></h3>
  17511. <p>Load a LV2 (LADSPA Version 2) plugin.
  17512. </p>
  17513. <p>To enable compilation of this filter you need to configure FFmpeg with
  17514. <code>--enable-lv2</code>.
  17515. </p>
  17516. <dl compact="compact">
  17517. <dt><samp>plugin, p</samp></dt>
  17518. <dd><p>Specifies the plugin URI. You may need to escape &rsquo;:&rsquo;.
  17519. </p>
  17520. </dd>
  17521. <dt><samp>controls, c</samp></dt>
  17522. <dd><p>Set the &rsquo;|&rsquo; separated list of controls which are zero or more floating point
  17523. values that determine the behavior of the loaded plugin (for example delay,
  17524. threshold or gain).
  17525. If <samp>controls</samp> is set to <code>help</code>, all available controls and
  17526. their valid ranges are printed.
  17527. </p>
  17528. </dd>
  17529. <dt><samp>sample_rate, s</samp></dt>
  17530. <dd><p>Specify the sample rate, default to 44100. Only used if plugin have
  17531. zero inputs.
  17532. </p>
  17533. </dd>
  17534. <dt><samp>nb_samples, n</samp></dt>
  17535. <dd><p>Set the number of samples per channel per each output frame, default
  17536. is 1024. Only used if plugin have zero inputs.
  17537. </p>
  17538. </dd>
  17539. <dt><samp>duration, d</samp></dt>
  17540. <dd><p>Set the minimum duration of the sourced audio. See
  17541. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  17542. for the accepted syntax.
  17543. Note that the resulting duration may be greater than the specified duration,
  17544. as the generated audio is always cut at the end of a complete frame.
  17545. If not specified, or the expressed duration is negative, the audio is
  17546. supposed to be generated forever.
  17547. Only used if plugin have zero inputs.
  17548. </p></dd>
  17549. </dl>
  17550. <a name="Examples-40"></a>
  17551. <h4 class="subsection">29.85.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-40" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-40" aria-hidden="true">TOC</a></span></h4>
  17552. <ul>
  17553. <li> Apply bass enhancer plugin from Calf:
  17554. <div class="example">
  17555. <pre class="example">lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
  17556. </pre></div>
  17557. </li><li> Apply vinyl plugin from Calf:
  17558. <div class="example">
  17559. <pre class="example">lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
  17560. </pre></div>
  17561. </li><li> Apply bit crusher plugin from ArtyFX:
  17562. <div class="example">
  17563. <pre class="example">lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
  17564. </pre></div>
  17565. </li></ul>
  17566. <a name="mcompand"></a>
  17567. <h3 class="section">29.86 mcompand<span class="pull-right"><a class="anchor hidden-xs" href="#mcompand" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mcompand" aria-hidden="true">TOC</a></span></h3>
  17568. <p>Multiband Compress or expand the audio&rsquo;s dynamic range.
  17569. </p>
  17570. <p>The input audio is divided into bands using 4th order Linkwitz-Riley IIRs.
  17571. This is akin to the crossover of a loudspeaker, and results in flat frequency
  17572. response when absent compander action.
  17573. </p>
  17574. <p>It accepts the following parameters:
  17575. </p>
  17576. <dl compact="compact">
  17577. <dt><samp>args</samp></dt>
  17578. <dd><p>This option syntax is:
  17579. attack,decay,[attack,decay..] soft-knee points crossover_frequency [delay [initial_volume [gain]]] | attack,decay ...
  17580. For explanation of each item refer to compand filter documentation.
  17581. </p></dd>
  17582. </dl>
  17583. <span id="pan"></span><a name="pan-1"></a>
  17584. <h3 class="section">29.87 pan<span class="pull-right"><a class="anchor hidden-xs" href="#pan-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pan-1" aria-hidden="true">TOC</a></span></h3>
  17585. <p>Mix channels with specific gain levels. The filter accepts the output
  17586. channel layout followed by a set of channels definitions.
  17587. </p>
  17588. <p>This filter is also designed to efficiently remap the channels of an audio
  17589. stream.
  17590. </p>
  17591. <p>The filter accepts parameters of the form:
  17592. &quot;<var>l</var>|<var>outdef</var>|<var>outdef</var>|...&quot;
  17593. </p>
  17594. <dl compact="compact">
  17595. <dt><samp>l</samp></dt>
  17596. <dd><p>output channel layout or number of channels
  17597. </p>
  17598. </dd>
  17599. <dt><samp>outdef</samp></dt>
  17600. <dd><p>output channel specification, of the form:
  17601. &quot;<var>out_name</var>=[<var>gain</var>*]<var>in_name</var>[(+-)[<var>gain</var>*]<var>in_name</var>...]&quot;
  17602. </p>
  17603. </dd>
  17604. <dt><samp>out_name</samp></dt>
  17605. <dd><p>output channel to define, either a channel name (FL, FR, etc.) or a channel
  17606. number (c0, c1, etc.)
  17607. </p>
  17608. </dd>
  17609. <dt><samp>gain</samp></dt>
  17610. <dd><p>multiplicative coefficient for the channel, 1 leaving the volume unchanged
  17611. </p>
  17612. </dd>
  17613. <dt><samp>in_name</samp></dt>
  17614. <dd><p>input channel to use, see out_name for details; it is not possible to mix
  17615. named and numbered input channels
  17616. </p></dd>
  17617. </dl>
  17618. <p>If the &lsquo;=&rsquo; in a channel specification is replaced by &lsquo;&lt;&rsquo;, then the gains for
  17619. that specification will be renormalized so that the total is 1, thus
  17620. avoiding clipping noise.
  17621. </p>
  17622. <a name="Mixing-examples"></a>
  17623. <h4 class="subsection">29.87.1 Mixing examples<span class="pull-right"><a class="anchor hidden-xs" href="#Mixing-examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Mixing-examples" aria-hidden="true">TOC</a></span></h4>
  17624. <p>For example, if you want to down-mix from stereo to mono, but with a bigger
  17625. factor for the left channel:
  17626. </p><div class="example">
  17627. <pre class="example">pan=1c|c0=0.9*c0+0.1*c1
  17628. </pre></div>
  17629. <p>A customized down-mix to stereo that works automatically for 3-, 4-, 5- and
  17630. 7-channels surround:
  17631. </p><div class="example">
  17632. <pre class="example">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
  17633. </pre></div>
  17634. <p>Note that <code>ffmpeg</code> integrates a default down-mix (and up-mix) system
  17635. that should be preferred (see &quot;-ac&quot; option) unless you have very specific
  17636. needs.
  17637. </p>
  17638. <a name="Remapping-examples"></a>
  17639. <h4 class="subsection">29.87.2 Remapping examples<span class="pull-right"><a class="anchor hidden-xs" href="#Remapping-examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Remapping-examples" aria-hidden="true">TOC</a></span></h4>
  17640. <p>The channel remapping will be effective if, and only if:
  17641. </p>
  17642. <ul>
  17643. <li> gain coefficients are zeroes or ones,
  17644. </li><li> only one input per channel output,
  17645. </li></ul>
  17646. <p>If all these conditions are satisfied, the filter will notify the user (&quot;Pure
  17647. channel mapping detected&quot;), and use an optimized and lossless method to do the
  17648. remapping.
  17649. </p>
  17650. <p>For example, if you have a 5.1 source and want a stereo audio stream by
  17651. dropping the extra channels:
  17652. </p><div class="example">
  17653. <pre class="example">pan=&quot;stereo| c0=FL | c1=FR&quot;
  17654. </pre></div>
  17655. <p>Given the same source, you can also switch front left and front right channels
  17656. and keep the input channel layout:
  17657. </p><div class="example">
  17658. <pre class="example">pan=&quot;5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5&quot;
  17659. </pre></div>
  17660. <p>If the input is a stereo audio stream, you can mute the front left channel (and
  17661. still keep the stereo channel layout) with:
  17662. </p><div class="example">
  17663. <pre class="example">pan=&quot;stereo|c1=c1&quot;
  17664. </pre></div>
  17665. <p>Still with a stereo audio stream input, you can copy the right channel in both
  17666. front left and right:
  17667. </p><div class="example">
  17668. <pre class="example">pan=&quot;stereo| c0=FR | c1=FR&quot;
  17669. </pre></div>
  17670. <a name="replaygain"></a>
  17671. <h3 class="section">29.88 replaygain<span class="pull-right"><a class="anchor hidden-xs" href="#replaygain" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-replaygain" aria-hidden="true">TOC</a></span></h3>
  17672. <p>ReplayGain scanner filter. This filter takes an audio stream as an input and
  17673. outputs it unchanged.
  17674. At end of filtering it displays <code>track_gain</code> and <code>track_peak</code>.
  17675. </p>
  17676. <a name="resample"></a>
  17677. <h3 class="section">29.89 resample<span class="pull-right"><a class="anchor hidden-xs" href="#resample" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-resample" aria-hidden="true">TOC</a></span></h3>
  17678. <p>Convert the audio sample format, sample rate and channel layout. It is
  17679. not meant to be used directly.
  17680. </p>
  17681. <a name="rubberband"></a>
  17682. <h3 class="section">29.90 rubberband<span class="pull-right"><a class="anchor hidden-xs" href="#rubberband" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rubberband" aria-hidden="true">TOC</a></span></h3>
  17683. <p>Apply time-stretching and pitch-shifting with librubberband.
  17684. </p>
  17685. <p>To enable compilation of this filter, you need to configure FFmpeg with
  17686. <code>--enable-librubberband</code>.
  17687. </p>
  17688. <p>The filter accepts the following options:
  17689. </p>
  17690. <dl compact="compact">
  17691. <dt><samp>tempo</samp></dt>
  17692. <dd><p>Set tempo scale factor.
  17693. </p>
  17694. </dd>
  17695. <dt><samp>pitch</samp></dt>
  17696. <dd><p>Set pitch scale factor.
  17697. </p>
  17698. </dd>
  17699. <dt><samp>transients</samp></dt>
  17700. <dd><p>Set transients detector.
  17701. Possible values are:
  17702. </p><dl compact="compact">
  17703. <dt><var>crisp</var></dt>
  17704. <dt><var>mixed</var></dt>
  17705. <dt><var>smooth</var></dt>
  17706. </dl>
  17707. </dd>
  17708. <dt><samp>detector</samp></dt>
  17709. <dd><p>Set detector.
  17710. Possible values are:
  17711. </p><dl compact="compact">
  17712. <dt><var>compound</var></dt>
  17713. <dt><var>percussive</var></dt>
  17714. <dt><var>soft</var></dt>
  17715. </dl>
  17716. </dd>
  17717. <dt><samp>phase</samp></dt>
  17718. <dd><p>Set phase.
  17719. Possible values are:
  17720. </p><dl compact="compact">
  17721. <dt><var>laminar</var></dt>
  17722. <dt><var>independent</var></dt>
  17723. </dl>
  17724. </dd>
  17725. <dt><samp>window</samp></dt>
  17726. <dd><p>Set processing window size.
  17727. Possible values are:
  17728. </p><dl compact="compact">
  17729. <dt><var>standard</var></dt>
  17730. <dt><var>short</var></dt>
  17731. <dt><var>long</var></dt>
  17732. </dl>
  17733. </dd>
  17734. <dt><samp>smoothing</samp></dt>
  17735. <dd><p>Set smoothing.
  17736. Possible values are:
  17737. </p><dl compact="compact">
  17738. <dt><var>off</var></dt>
  17739. <dt><var>on</var></dt>
  17740. </dl>
  17741. </dd>
  17742. <dt><samp>formant</samp></dt>
  17743. <dd><p>Enable formant preservation when shift pitching.
  17744. Possible values are:
  17745. </p><dl compact="compact">
  17746. <dt><var>shifted</var></dt>
  17747. <dt><var>preserved</var></dt>
  17748. </dl>
  17749. </dd>
  17750. <dt><samp>pitchq</samp></dt>
  17751. <dd><p>Set pitch quality.
  17752. Possible values are:
  17753. </p><dl compact="compact">
  17754. <dt><var>quality</var></dt>
  17755. <dt><var>speed</var></dt>
  17756. <dt><var>consistency</var></dt>
  17757. </dl>
  17758. </dd>
  17759. <dt><samp>channels</samp></dt>
  17760. <dd><p>Set channels.
  17761. Possible values are:
  17762. </p><dl compact="compact">
  17763. <dt><var>apart</var></dt>
  17764. <dt><var>together</var></dt>
  17765. </dl>
  17766. </dd>
  17767. </dl>
  17768. <a name="Commands-35"></a>
  17769. <h4 class="subsection">29.90.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-35" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-35" aria-hidden="true">TOC</a></span></h4>
  17770. <p>This filter supports the following commands:
  17771. </p><dl compact="compact">
  17772. <dt><samp>tempo</samp></dt>
  17773. <dd><p>Change filter tempo scale factor.
  17774. Syntax for the command is : &quot;<var>tempo</var>&quot;
  17775. </p>
  17776. </dd>
  17777. <dt><samp>pitch</samp></dt>
  17778. <dd><p>Change filter pitch scale factor.
  17779. Syntax for the command is : &quot;<var>pitch</var>&quot;
  17780. </p></dd>
  17781. </dl>
  17782. <a name="sidechaincompress"></a>
  17783. <h3 class="section">29.91 sidechaincompress<span class="pull-right"><a class="anchor hidden-xs" href="#sidechaincompress" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sidechaincompress" aria-hidden="true">TOC</a></span></h3>
  17784. <p>This filter acts like normal compressor but has the ability to compress
  17785. detected signal using second input signal.
  17786. It needs two input streams and returns one output stream.
  17787. First input stream will be processed depending on second stream signal.
  17788. The filtered signal then can be filtered with other filters in later stages of
  17789. processing. See <a href="#pan">pan</a> and <a href="#amerge">amerge</a> filter.
  17790. </p>
  17791. <p>The filter accepts the following options:
  17792. </p>
  17793. <dl compact="compact">
  17794. <dt><samp>level_in</samp></dt>
  17795. <dd><p>Set input gain. Default is 1. Range is between 0.015625 and 64.
  17796. </p>
  17797. </dd>
  17798. <dt><samp>mode</samp></dt>
  17799. <dd><p>Set mode of compressor operation. Can be <code>upward</code> or <code>downward</code>.
  17800. Default is <code>downward</code>.
  17801. </p>
  17802. </dd>
  17803. <dt><samp>threshold</samp></dt>
  17804. <dd><p>If a signal of second stream raises above this level it will affect the gain
  17805. reduction of first stream.
  17806. By default is 0.125. Range is between 0.00097563 and 1.
  17807. </p>
  17808. </dd>
  17809. <dt><samp>ratio</samp></dt>
  17810. <dd><p>Set a ratio about which the signal is reduced. 1:2 means that if the level
  17811. raised 4dB above the threshold, it will be only 2dB above after the reduction.
  17812. Default is 2. Range is between 1 and 20.
  17813. </p>
  17814. </dd>
  17815. <dt><samp>attack</samp></dt>
  17816. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  17817. reduction starts. Default is 20. Range is between 0.01 and 2000.
  17818. </p>
  17819. </dd>
  17820. <dt><samp>release</samp></dt>
  17821. <dd><p>Amount of milliseconds the signal has to fall below the threshold before
  17822. reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
  17823. </p>
  17824. </dd>
  17825. <dt><samp>makeup</samp></dt>
  17826. <dd><p>Set the amount by how much signal will be amplified after processing.
  17827. Default is 1. Range is from 1 to 64.
  17828. </p>
  17829. </dd>
  17830. <dt><samp>knee</samp></dt>
  17831. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  17832. Default is 2.82843. Range is between 1 and 8.
  17833. </p>
  17834. </dd>
  17835. <dt><samp>link</samp></dt>
  17836. <dd><p>Choose if the <code>average</code> level between all channels of side-chain stream
  17837. or the louder(<code>maximum</code>) channel of side-chain stream affects the
  17838. reduction. Default is <code>average</code>.
  17839. </p>
  17840. </dd>
  17841. <dt><samp>detection</samp></dt>
  17842. <dd><p>Should the exact signal be taken in case of <code>peak</code> or an RMS one in case
  17843. of <code>rms</code>. Default is <code>rms</code> which is mainly smoother.
  17844. </p>
  17845. </dd>
  17846. <dt><samp>level_sc</samp></dt>
  17847. <dd><p>Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
  17848. </p>
  17849. </dd>
  17850. <dt><samp>mix</samp></dt>
  17851. <dd><p>How much to use compressed signal in output. Default is 1.
  17852. Range is between 0 and 1.
  17853. </p></dd>
  17854. </dl>
  17855. <a name="Commands-36"></a>
  17856. <h4 class="subsection">29.91.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-36" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-36" aria-hidden="true">TOC</a></span></h4>
  17857. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  17858. </p>
  17859. <a name="Examples-41"></a>
  17860. <h4 class="subsection">29.91.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-41" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-41" aria-hidden="true">TOC</a></span></h4>
  17861. <ul>
  17862. <li> Full ffmpeg example taking 2 audio inputs, 1st input to be compressed
  17863. depending on the signal of 2nd input and later compressed signal to be
  17864. merged with 2nd input:
  17865. <div class="example">
  17866. <pre class="example">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;
  17867. </pre></div>
  17868. </li></ul>
  17869. <a name="sidechaingate"></a>
  17870. <h3 class="section">29.92 sidechaingate<span class="pull-right"><a class="anchor hidden-xs" href="#sidechaingate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sidechaingate" aria-hidden="true">TOC</a></span></h3>
  17871. <p>A sidechain gate acts like a normal (wideband) gate but has the ability to
  17872. filter the detected signal before sending it to the gain reduction stage.
  17873. Normally a gate uses the full range signal to detect a level above the
  17874. threshold.
  17875. For example: If you cut all lower frequencies from your sidechain signal
  17876. the gate will decrease the volume of your track only if not enough highs
  17877. appear. With this technique you are able to reduce the resonation of a
  17878. natural drum or remove &quot;rumbling&quot; of muted strokes from a heavily distorted
  17879. guitar.
  17880. It needs two input streams and returns one output stream.
  17881. First input stream will be processed depending on second stream signal.
  17882. </p>
  17883. <p>The filter accepts the following options:
  17884. </p>
  17885. <dl compact="compact">
  17886. <dt><samp>level_in</samp></dt>
  17887. <dd><p>Set input level before filtering.
  17888. Default is 1. Allowed range is from 0.015625 to 64.
  17889. </p>
  17890. </dd>
  17891. <dt><samp>mode</samp></dt>
  17892. <dd><p>Set the mode of operation. Can be <code>upward</code> or <code>downward</code>.
  17893. Default is <code>downward</code>. If set to <code>upward</code> mode, higher parts of signal
  17894. will be amplified, expanding dynamic range in upward direction.
  17895. Otherwise, in case of <code>downward</code> lower parts of signal will be reduced.
  17896. </p>
  17897. </dd>
  17898. <dt><samp>range</samp></dt>
  17899. <dd><p>Set the level of gain reduction when the signal is below the threshold.
  17900. Default is 0.06125. Allowed range is from 0 to 1.
  17901. Setting this to 0 disables reduction and then filter behaves like expander.
  17902. </p>
  17903. </dd>
  17904. <dt><samp>threshold</samp></dt>
  17905. <dd><p>If a signal rises above this level the gain reduction is released.
  17906. Default is 0.125. Allowed range is from 0 to 1.
  17907. </p>
  17908. </dd>
  17909. <dt><samp>ratio</samp></dt>
  17910. <dd><p>Set a ratio about which the signal is reduced.
  17911. Default is 2. Allowed range is from 1 to 9000.
  17912. </p>
  17913. </dd>
  17914. <dt><samp>attack</samp></dt>
  17915. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  17916. reduction stops.
  17917. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
  17918. </p>
  17919. </dd>
  17920. <dt><samp>release</samp></dt>
  17921. <dd><p>Amount of milliseconds the signal has to fall below the threshold before the
  17922. reduction is increased again. Default is 250 milliseconds.
  17923. Allowed range is from 0.01 to 9000.
  17924. </p>
  17925. </dd>
  17926. <dt><samp>makeup</samp></dt>
  17927. <dd><p>Set amount of amplification of signal after processing.
  17928. Default is 1. Allowed range is from 1 to 64.
  17929. </p>
  17930. </dd>
  17931. <dt><samp>knee</samp></dt>
  17932. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  17933. Default is 2.828427125. Allowed range is from 1 to 8.
  17934. </p>
  17935. </dd>
  17936. <dt><samp>detection</samp></dt>
  17937. <dd><p>Choose if exact signal should be taken for detection or an RMS like one.
  17938. Default is rms. Can be peak or rms.
  17939. </p>
  17940. </dd>
  17941. <dt><samp>link</samp></dt>
  17942. <dd><p>Choose if the average level between all channels or the louder channel affects
  17943. the reduction.
  17944. Default is average. Can be average or maximum.
  17945. </p>
  17946. </dd>
  17947. <dt><samp>level_sc</samp></dt>
  17948. <dd><p>Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
  17949. </p></dd>
  17950. </dl>
  17951. <a name="Commands-37"></a>
  17952. <h4 class="subsection">29.92.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-37" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-37" aria-hidden="true">TOC</a></span></h4>
  17953. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  17954. </p>
  17955. <a name="silencedetect"></a>
  17956. <h3 class="section">29.93 silencedetect<span class="pull-right"><a class="anchor hidden-xs" href="#silencedetect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-silencedetect" aria-hidden="true">TOC</a></span></h3>
  17957. <p>Detect silence in an audio stream.
  17958. </p>
  17959. <p>This filter logs a message when it detects that the input audio volume is less
  17960. or equal to a noise tolerance value for a duration greater or equal to the
  17961. minimum detected noise duration.
  17962. </p>
  17963. <p>The printed times and duration are expressed in seconds. The
  17964. <code>lavfi.silence_start</code> or <code>lavfi.silence_start.X</code> metadata key
  17965. is set on the first frame whose timestamp equals or exceeds the detection
  17966. duration and it contains the timestamp of the first frame of the silence.
  17967. </p>
  17968. <p>The <code>lavfi.silence_duration</code> or <code>lavfi.silence_duration.X</code>
  17969. and <code>lavfi.silence_end</code> or <code>lavfi.silence_end.X</code> metadata
  17970. keys are set on the first frame after the silence. If <samp>mono</samp> is
  17971. enabled, and each channel is evaluated separately, the <code>.X</code>
  17972. suffixed keys are used, and <code>X</code> corresponds to the channel number.
  17973. </p>
  17974. <p>The filter accepts the following options:
  17975. </p>
  17976. <dl compact="compact">
  17977. <dt><samp>noise, n</samp></dt>
  17978. <dd><p>Set noise tolerance. Can be specified in dB (in case &quot;dB&quot; is appended to the
  17979. specified value) or amplitude ratio. Default is -60dB, or 0.001.
  17980. </p>
  17981. </dd>
  17982. <dt><samp>duration, d</samp></dt>
  17983. <dd><p>Set silence duration until notification (default is 2 seconds). See
  17984. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  17985. for the accepted syntax.
  17986. </p>
  17987. </dd>
  17988. <dt><samp>mono, m</samp></dt>
  17989. <dd><p>Process each channel separately, instead of combined. By default is disabled.
  17990. </p></dd>
  17991. </dl>
  17992. <a name="Examples-42"></a>
  17993. <h4 class="subsection">29.93.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-42" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-42" aria-hidden="true">TOC</a></span></h4>
  17994. <ul>
  17995. <li> Detect 5 seconds of silence with -50dB noise tolerance:
  17996. <div class="example">
  17997. <pre class="example">silencedetect=n=-50dB:d=5
  17998. </pre></div>
  17999. </li><li> Complete example with <code>ffmpeg</code> to detect silence with 0.0001 noise
  18000. tolerance in <samp>silence.mp3</samp>:
  18001. <div class="example">
  18002. <pre class="example">ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
  18003. </pre></div>
  18004. </li></ul>
  18005. <a name="silenceremove"></a>
  18006. <h3 class="section">29.94 silenceremove<span class="pull-right"><a class="anchor hidden-xs" href="#silenceremove" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-silenceremove" aria-hidden="true">TOC</a></span></h3>
  18007. <p>Remove silence from the beginning, middle or end of the audio.
  18008. </p>
  18009. <p>The filter accepts the following options:
  18010. </p>
  18011. <dl compact="compact">
  18012. <dt><samp>start_periods</samp></dt>
  18013. <dd><p>This value is used to indicate if audio should be trimmed at beginning of
  18014. the audio. A value of zero indicates no silence should be trimmed from the
  18015. beginning. When specifying a non-zero value, it trims audio up until it
  18016. finds non-silence. Normally, when trimming silence from beginning of audio
  18017. the <var>start_periods</var> will be <code>1</code> but it can be increased to higher
  18018. values to trim all audio up to specific count of non-silence periods.
  18019. Default value is <code>0</code>.
  18020. </p>
  18021. </dd>
  18022. <dt><samp>start_duration</samp></dt>
  18023. <dd><p>Specify the amount of time that non-silence must be detected before it stops
  18024. trimming audio. By increasing the duration, bursts of noises can be treated
  18025. as silence and trimmed off. Default value is <code>0</code>.
  18026. </p>
  18027. </dd>
  18028. <dt><samp>start_threshold</samp></dt>
  18029. <dd><p>This indicates what sample value should be treated as silence. For digital
  18030. audio, a value of <code>0</code> may be fine but for audio recorded from analog,
  18031. you may wish to increase the value to account for background noise.
  18032. Can be specified in dB (in case &quot;dB&quot; is appended to the specified value)
  18033. or amplitude ratio. Default value is <code>0</code>.
  18034. </p>
  18035. </dd>
  18036. <dt><samp>start_silence</samp></dt>
  18037. <dd><p>Specify max duration of silence at beginning that will be kept after
  18038. trimming. Default is 0, which is equal to trimming all samples detected
  18039. as silence.
  18040. </p>
  18041. </dd>
  18042. <dt><samp>start_mode</samp></dt>
  18043. <dd><p>Specify mode of detection of silence end in start of multi-channel audio.
  18044. Can be <var>any</var> or <var>all</var>. Default is <var>any</var>.
  18045. With <var>any</var>, any sample that is detected as non-silence will cause
  18046. stopped trimming of silence.
  18047. With <var>all</var>, only if all channels are detected as non-silence will cause
  18048. stopped trimming of silence.
  18049. </p>
  18050. </dd>
  18051. <dt><samp>stop_periods</samp></dt>
  18052. <dd><p>Set the count for trimming silence from the end of audio.
  18053. To remove silence from the middle of a file, specify a <var>stop_periods</var>
  18054. that is negative. This value is then treated as a positive value and is
  18055. used to indicate the effect should restart processing as specified by
  18056. <var>start_periods</var>, making it suitable for removing periods of silence
  18057. in the middle of the audio.
  18058. Default value is <code>0</code>.
  18059. </p>
  18060. </dd>
  18061. <dt><samp>stop_duration</samp></dt>
  18062. <dd><p>Specify a duration of silence that must exist before audio is not copied any
  18063. more. By specifying a higher duration, silence that is wanted can be left in
  18064. the audio.
  18065. Default value is <code>0</code>.
  18066. </p>
  18067. </dd>
  18068. <dt><samp>stop_threshold</samp></dt>
  18069. <dd><p>This is the same as <samp>start_threshold</samp> but for trimming silence from
  18070. the end of audio.
  18071. Can be specified in dB (in case &quot;dB&quot; is appended to the specified value)
  18072. or amplitude ratio. Default value is <code>0</code>.
  18073. </p>
  18074. </dd>
  18075. <dt><samp>stop_silence</samp></dt>
  18076. <dd><p>Specify max duration of silence at end that will be kept after
  18077. trimming. Default is 0, which is equal to trimming all samples detected
  18078. as silence.
  18079. </p>
  18080. </dd>
  18081. <dt><samp>stop_mode</samp></dt>
  18082. <dd><p>Specify mode of detection of silence start in end of multi-channel audio.
  18083. Can be <var>any</var> or <var>all</var>. Default is <var>any</var>.
  18084. With <var>any</var>, any sample that is detected as non-silence will cause
  18085. stopped trimming of silence.
  18086. With <var>all</var>, only if all channels are detected as non-silence will cause
  18087. stopped trimming of silence.
  18088. </p>
  18089. </dd>
  18090. <dt><samp>detection</samp></dt>
  18091. <dd><p>Set how is silence detected. Can be <code>rms</code> or <code>peak</code>. Second is faster
  18092. and works better with digital silence which is exactly 0.
  18093. Default value is <code>rms</code>.
  18094. </p>
  18095. </dd>
  18096. <dt><samp>window</samp></dt>
  18097. <dd><p>Set duration in number of seconds used to calculate size of window in number
  18098. of samples for detecting silence.
  18099. Default value is <code>0.02</code>. Allowed range is from <code>0</code> to <code>10</code>.
  18100. </p></dd>
  18101. </dl>
  18102. <a name="Examples-43"></a>
  18103. <h4 class="subsection">29.94.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-43" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-43" aria-hidden="true">TOC</a></span></h4>
  18104. <ul>
  18105. <li> The following example shows how this filter can be used to start a recording
  18106. that does not contain the delay at the start which usually occurs between
  18107. pressing the record button and the start of the performance:
  18108. <div class="example">
  18109. <pre class="example">silenceremove=start_periods=1:start_duration=5:start_threshold=0.02
  18110. </pre></div>
  18111. </li><li> Trim all silence encountered from beginning to end where there is more than 1
  18112. second of silence in audio:
  18113. <div class="example">
  18114. <pre class="example">silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
  18115. </pre></div>
  18116. </li><li> Trim all digital silence samples, using peak detection, from beginning to end
  18117. where there is more than 0 samples of digital silence in audio and digital
  18118. silence is detected in all channels at same positions in stream:
  18119. <div class="example">
  18120. <pre class="example">silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
  18121. </pre></div>
  18122. </li></ul>
  18123. <a name="sofalizer"></a>
  18124. <h3 class="section">29.95 sofalizer<span class="pull-right"><a class="anchor hidden-xs" href="#sofalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sofalizer" aria-hidden="true">TOC</a></span></h3>
  18125. <p>SOFAlizer uses head-related transfer functions (HRTFs) to create virtual
  18126. loudspeakers around the user for binaural listening via headphones (audio
  18127. formats up to 9 channels supported).
  18128. The HRTFs are stored in SOFA files (see <a href="http://www.sofacoustics.org/">http://www.sofacoustics.org/</a> for a database).
  18129. SOFAlizer is developed at the Acoustics Research Institute (ARI) of the
  18130. Austrian Academy of Sciences.
  18131. </p>
  18132. <p>To enable compilation of this filter you need to configure FFmpeg with
  18133. <code>--enable-libmysofa</code>.
  18134. </p>
  18135. <p>The filter accepts the following options:
  18136. </p>
  18137. <dl compact="compact">
  18138. <dt><samp>sofa</samp></dt>
  18139. <dd><p>Set the SOFA file used for rendering.
  18140. </p>
  18141. </dd>
  18142. <dt><samp>gain</samp></dt>
  18143. <dd><p>Set gain applied to audio. Value is in dB. Default is 0.
  18144. </p>
  18145. </dd>
  18146. <dt><samp>rotation</samp></dt>
  18147. <dd><p>Set rotation of virtual loudspeakers in deg. Default is 0.
  18148. </p>
  18149. </dd>
  18150. <dt><samp>elevation</samp></dt>
  18151. <dd><p>Set elevation of virtual speakers in deg. Default is 0.
  18152. </p>
  18153. </dd>
  18154. <dt><samp>radius</samp></dt>
  18155. <dd><p>Set distance in meters between loudspeakers and the listener with near-field
  18156. HRTFs. Default is 1.
  18157. </p>
  18158. </dd>
  18159. <dt><samp>type</samp></dt>
  18160. <dd><p>Set processing type. Can be <var>time</var> or <var>freq</var>. <var>time</var> is
  18161. processing audio in time domain which is slow.
  18162. <var>freq</var> is processing audio in frequency domain which is fast.
  18163. Default is <var>freq</var>.
  18164. </p>
  18165. </dd>
  18166. <dt><samp>speakers</samp></dt>
  18167. <dd><p>Set custom positions of virtual loudspeakers. Syntax for this option is:
  18168. &lt;CH&gt; &lt;AZIM&gt; &lt;ELEV&gt;[|&lt;CH&gt; &lt;AZIM&gt; &lt;ELEV&gt;|...].
  18169. Each virtual loudspeaker is described with short channel name following with
  18170. azimuth and elevation in degrees.
  18171. Each virtual loudspeaker description is separated by &rsquo;|&rsquo;.
  18172. For example to override front left and front right channel positions use:
  18173. &rsquo;speakers=FL 45 15|FR 345 15&rsquo;.
  18174. Descriptions with unrecognised channel names are ignored.
  18175. </p>
  18176. </dd>
  18177. <dt><samp>lfegain</samp></dt>
  18178. <dd><p>Set custom gain for LFE channels. Value is in dB. Default is 0.
  18179. </p>
  18180. </dd>
  18181. <dt><samp>framesize</samp></dt>
  18182. <dd><p>Set custom frame size in number of samples. Default is 1024.
  18183. Allowed range is from 1024 to 96000. Only used if option &lsquo;<samp>type</samp>&rsquo;
  18184. is set to <var>freq</var>.
  18185. </p>
  18186. </dd>
  18187. <dt><samp>normalize</samp></dt>
  18188. <dd><p>Should all IRs be normalized upon importing SOFA file.
  18189. By default is enabled.
  18190. </p>
  18191. </dd>
  18192. <dt><samp>interpolate</samp></dt>
  18193. <dd><p>Should nearest IRs be interpolated with neighbor IRs if exact position
  18194. does not match. By default is disabled.
  18195. </p>
  18196. </dd>
  18197. <dt><samp>minphase</samp></dt>
  18198. <dd><p>Minphase all IRs upon loading of SOFA file. By default is disabled.
  18199. </p>
  18200. </dd>
  18201. <dt><samp>anglestep</samp></dt>
  18202. <dd><p>Set neighbor search angle step. Only used if option <var>interpolate</var> is enabled.
  18203. </p>
  18204. </dd>
  18205. <dt><samp>radstep</samp></dt>
  18206. <dd><p>Set neighbor search radius step. Only used if option <var>interpolate</var> is enabled.
  18207. </p></dd>
  18208. </dl>
  18209. <a name="Examples-44"></a>
  18210. <h4 class="subsection">29.95.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-44" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-44" aria-hidden="true">TOC</a></span></h4>
  18211. <ul>
  18212. <li> Using ClubFritz6 sofa file:
  18213. <div class="example">
  18214. <pre class="example">sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1
  18215. </pre></div>
  18216. </li><li> Using ClubFritz12 sofa file and bigger radius with small rotation:
  18217. <div class="example">
  18218. <pre class="example">sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5
  18219. </pre></div>
  18220. </li><li> Similar as above but with custom speaker positions for front left, front right, back left and back right
  18221. and also with custom gain:
  18222. <div class="example">
  18223. <pre class="example">&quot;sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=2:speakers=FL 45|FR 315|BL 135|BR 225:gain=28&quot;
  18224. </pre></div>
  18225. </li></ul>
  18226. <a name="speechnorm"></a>
  18227. <h3 class="section">29.96 speechnorm<span class="pull-right"><a class="anchor hidden-xs" href="#speechnorm" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-speechnorm" aria-hidden="true">TOC</a></span></h3>
  18228. <p>Speech Normalizer.
  18229. </p>
  18230. <p>This filter expands or compresses each half-cycle of audio samples
  18231. (local set of samples all above or all below zero and between two nearest zero crossings) depending
  18232. on threshold value, so audio reaches target peak value under conditions controlled by below options.
  18233. </p>
  18234. <p>The filter accepts the following options:
  18235. </p>
  18236. <dl compact="compact">
  18237. <dt><samp>peak, p</samp></dt>
  18238. <dd><p>Set the expansion target peak value. This specifies the highest allowed absolute amplitude
  18239. level for the normalized audio input. Default value is 0.95. Allowed range is from 0.0 to 1.0.
  18240. </p>
  18241. </dd>
  18242. <dt><samp>expansion, e</samp></dt>
  18243. <dd><p>Set the maximum expansion factor. Allowed range is from 1.0 to 50.0. Default value is 2.0.
  18244. This option controls maximum local half-cycle of samples expansion. The maximum expansion
  18245. would be such that local peak value reaches target peak value but never to surpass it and that
  18246. ratio between new and previous peak value does not surpass this option value.
  18247. </p>
  18248. </dd>
  18249. <dt><samp>compression, c</samp></dt>
  18250. <dd><p>Set the maximum compression factor. Allowed range is from 1.0 to 50.0. Default value is 2.0.
  18251. This option controls maximum local half-cycle of samples compression. This option is used
  18252. only if <samp>threshold</samp> option is set to value greater than 0.0, then in such cases
  18253. when local peak is lower or same as value set by <samp>threshold</samp> all samples belonging to
  18254. that peak&rsquo;s half-cycle will be compressed by current compression factor.
  18255. </p>
  18256. </dd>
  18257. <dt><samp>threshold, t</samp></dt>
  18258. <dd><p>Set the threshold value. Default value is 0.0. Allowed range is from 0.0 to 1.0.
  18259. This option specifies which half-cycles of samples will be compressed and which will be expanded.
  18260. Any half-cycle samples with their local peak value below or same as this option value will be
  18261. compressed by current compression factor, otherwise, if greater than threshold value they will be
  18262. expanded with expansion factor so that it could reach peak target value but never surpass it.
  18263. </p>
  18264. </dd>
  18265. <dt><samp>raise, r</samp></dt>
  18266. <dd><p>Set the expansion raising amount per each half-cycle of samples. Default value is 0.001.
  18267. Allowed range is from 0.0 to 1.0. This controls how fast expansion factor is raised per
  18268. each new half-cycle until it reaches <samp>expansion</samp> value.
  18269. Setting this options too high may lead to distortions.
  18270. </p>
  18271. </dd>
  18272. <dt><samp>fall, f</samp></dt>
  18273. <dd><p>Set the compression raising amount per each half-cycle of samples. Default value is 0.001.
  18274. Allowed range is from 0.0 to 1.0. This controls how fast compression factor is raised per
  18275. each new half-cycle until it reaches <samp>compression</samp> value.
  18276. </p>
  18277. </dd>
  18278. <dt><samp>channels, h</samp></dt>
  18279. <dd><p>Specify which channels to filter, by default all available channels are filtered.
  18280. </p>
  18281. </dd>
  18282. <dt><samp>invert, i</samp></dt>
  18283. <dd><p>Enable inverted filtering, by default is disabled. This inverts interpretation of <samp>threshold</samp>
  18284. option. When enabled any half-cycle of samples with their local peak value below or same as
  18285. <samp>threshold</samp> option will be expanded otherwise it will be compressed.
  18286. </p>
  18287. </dd>
  18288. <dt><samp>link, l</samp></dt>
  18289. <dd><p>Link channels when calculating gain applied to each filtered channel sample, by default is disabled.
  18290. When disabled each filtered channel gain calculation is independent, otherwise when this option
  18291. is enabled the minimum of all possible gains for each filtered channel is used.
  18292. </p></dd>
  18293. </dl>
  18294. <a name="Commands-38"></a>
  18295. <h4 class="subsection">29.96.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-38" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-38" aria-hidden="true">TOC</a></span></h4>
  18296. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  18297. </p>
  18298. <a name="stereotools"></a>
  18299. <h3 class="section">29.97 stereotools<span class="pull-right"><a class="anchor hidden-xs" href="#stereotools" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-stereotools" aria-hidden="true">TOC</a></span></h3>
  18300. <p>This filter has some handy utilities to manage stereo signals, for converting
  18301. M/S stereo recordings to L/R signal while having control over the parameters
  18302. or spreading the stereo image of master track.
  18303. </p>
  18304. <p>The filter accepts the following options:
  18305. </p>
  18306. <dl compact="compact">
  18307. <dt><samp>level_in</samp></dt>
  18308. <dd><p>Set input level before filtering for both channels. Defaults is 1.
  18309. Allowed range is from 0.015625 to 64.
  18310. </p>
  18311. </dd>
  18312. <dt><samp>level_out</samp></dt>
  18313. <dd><p>Set output level after filtering for both channels. Defaults is 1.
  18314. Allowed range is from 0.015625 to 64.
  18315. </p>
  18316. </dd>
  18317. <dt><samp>balance_in</samp></dt>
  18318. <dd><p>Set input balance between both channels. Default is 0.
  18319. Allowed range is from -1 to 1.
  18320. </p>
  18321. </dd>
  18322. <dt><samp>balance_out</samp></dt>
  18323. <dd><p>Set output balance between both channels. Default is 0.
  18324. Allowed range is from -1 to 1.
  18325. </p>
  18326. </dd>
  18327. <dt><samp>softclip</samp></dt>
  18328. <dd><p>Enable softclipping. Results in analog distortion instead of harsh digital 0dB
  18329. clipping. Disabled by default.
  18330. </p>
  18331. </dd>
  18332. <dt><samp>mutel</samp></dt>
  18333. <dd><p>Mute the left channel. Disabled by default.
  18334. </p>
  18335. </dd>
  18336. <dt><samp>muter</samp></dt>
  18337. <dd><p>Mute the right channel. Disabled by default.
  18338. </p>
  18339. </dd>
  18340. <dt><samp>phasel</samp></dt>
  18341. <dd><p>Change the phase of the left channel. Disabled by default.
  18342. </p>
  18343. </dd>
  18344. <dt><samp>phaser</samp></dt>
  18345. <dd><p>Change the phase of the right channel. Disabled by default.
  18346. </p>
  18347. </dd>
  18348. <dt><samp>mode</samp></dt>
  18349. <dd><p>Set stereo mode. Available values are:
  18350. </p>
  18351. <dl compact="compact">
  18352. <dt>&lsquo;<samp>lr&gt;lr</samp>&rsquo;</dt>
  18353. <dd><p>Left/Right to Left/Right, this is default.
  18354. </p>
  18355. </dd>
  18356. <dt>&lsquo;<samp>lr&gt;ms</samp>&rsquo;</dt>
  18357. <dd><p>Left/Right to Mid/Side.
  18358. </p>
  18359. </dd>
  18360. <dt>&lsquo;<samp>ms&gt;lr</samp>&rsquo;</dt>
  18361. <dd><p>Mid/Side to Left/Right.
  18362. </p>
  18363. </dd>
  18364. <dt>&lsquo;<samp>lr&gt;ll</samp>&rsquo;</dt>
  18365. <dd><p>Left/Right to Left/Left.
  18366. </p>
  18367. </dd>
  18368. <dt>&lsquo;<samp>lr&gt;rr</samp>&rsquo;</dt>
  18369. <dd><p>Left/Right to Right/Right.
  18370. </p>
  18371. </dd>
  18372. <dt>&lsquo;<samp>lr&gt;l+r</samp>&rsquo;</dt>
  18373. <dd><p>Left/Right to Left + Right.
  18374. </p>
  18375. </dd>
  18376. <dt>&lsquo;<samp>lr&gt;rl</samp>&rsquo;</dt>
  18377. <dd><p>Left/Right to Right/Left.
  18378. </p>
  18379. </dd>
  18380. <dt>&lsquo;<samp>ms&gt;ll</samp>&rsquo;</dt>
  18381. <dd><p>Mid/Side to Left/Left.
  18382. </p>
  18383. </dd>
  18384. <dt>&lsquo;<samp>ms&gt;rr</samp>&rsquo;</dt>
  18385. <dd><p>Mid/Side to Right/Right.
  18386. </p>
  18387. </dd>
  18388. <dt>&lsquo;<samp>ms&gt;rl</samp>&rsquo;</dt>
  18389. <dd><p>Mid/Side to Right/Left.
  18390. </p>
  18391. </dd>
  18392. <dt>&lsquo;<samp>lr&gt;l-r</samp>&rsquo;</dt>
  18393. <dd><p>Left/Right to Left - Right.
  18394. </p></dd>
  18395. </dl>
  18396. </dd>
  18397. <dt><samp>slev</samp></dt>
  18398. <dd><p>Set level of side signal. Default is 1.
  18399. Allowed range is from 0.015625 to 64.
  18400. </p>
  18401. </dd>
  18402. <dt><samp>sbal</samp></dt>
  18403. <dd><p>Set balance of side signal. Default is 0.
  18404. Allowed range is from -1 to 1.
  18405. </p>
  18406. </dd>
  18407. <dt><samp>mlev</samp></dt>
  18408. <dd><p>Set level of the middle signal. Default is 1.
  18409. Allowed range is from 0.015625 to 64.
  18410. </p>
  18411. </dd>
  18412. <dt><samp>mpan</samp></dt>
  18413. <dd><p>Set middle signal pan. Default is 0. Allowed range is from -1 to 1.
  18414. </p>
  18415. </dd>
  18416. <dt><samp>base</samp></dt>
  18417. <dd><p>Set stereo base between mono and inversed channels. Default is 0.
  18418. Allowed range is from -1 to 1.
  18419. </p>
  18420. </dd>
  18421. <dt><samp>delay</samp></dt>
  18422. <dd><p>Set delay in milliseconds how much to delay left from right channel and
  18423. vice versa. Default is 0. Allowed range is from -20 to 20.
  18424. </p>
  18425. </dd>
  18426. <dt><samp>sclevel</samp></dt>
  18427. <dd><p>Set S/C level. Default is 1. Allowed range is from 1 to 100.
  18428. </p>
  18429. </dd>
  18430. <dt><samp>phase</samp></dt>
  18431. <dd><p>Set the stereo phase in degrees. Default is 0. Allowed range is from 0 to 360.
  18432. </p>
  18433. </dd>
  18434. <dt><samp>bmode_in, bmode_out</samp></dt>
  18435. <dd><p>Set balance mode for balance_in/balance_out option.
  18436. </p>
  18437. <p>Can be one of the following:
  18438. </p>
  18439. <dl compact="compact">
  18440. <dt>&lsquo;<samp>balance</samp>&rsquo;</dt>
  18441. <dd><p>Classic balance mode. Attenuate one channel at time.
  18442. Gain is raised up to 1.
  18443. </p>
  18444. </dd>
  18445. <dt>&lsquo;<samp>amplitude</samp>&rsquo;</dt>
  18446. <dd><p>Similar as classic mode above but gain is raised up to 2.
  18447. </p>
  18448. </dd>
  18449. <dt>&lsquo;<samp>power</samp>&rsquo;</dt>
  18450. <dd><p>Equal power distribution, from -6dB to +6dB range.
  18451. </p></dd>
  18452. </dl>
  18453. </dd>
  18454. </dl>
  18455. <a name="Commands-39"></a>
  18456. <h4 class="subsection">29.97.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-39" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-39" aria-hidden="true">TOC</a></span></h4>
  18457. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  18458. </p>
  18459. <a name="Examples-45"></a>
  18460. <h4 class="subsection">29.97.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-45" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-45" aria-hidden="true">TOC</a></span></h4>
  18461. <ul>
  18462. <li> Apply karaoke like effect:
  18463. <div class="example">
  18464. <pre class="example">stereotools=mlev=0.015625
  18465. </pre></div>
  18466. </li><li> Convert M/S signal to L/R:
  18467. <div class="example">
  18468. <pre class="example">&quot;stereotools=mode=ms&gt;lr&quot;
  18469. </pre></div>
  18470. </li></ul>
  18471. <a name="stereowiden"></a>
  18472. <h3 class="section">29.98 stereowiden<span class="pull-right"><a class="anchor hidden-xs" href="#stereowiden" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-stereowiden" aria-hidden="true">TOC</a></span></h3>
  18473. <p>This filter enhance the stereo effect by suppressing signal common to both
  18474. channels and by delaying the signal of left into right and vice versa,
  18475. thereby widening the stereo effect.
  18476. </p>
  18477. <p>The filter accepts the following options:
  18478. </p>
  18479. <dl compact="compact">
  18480. <dt><samp>delay</samp></dt>
  18481. <dd><p>Time in milliseconds of the delay of left signal into right and vice versa.
  18482. Default is 20 milliseconds.
  18483. </p>
  18484. </dd>
  18485. <dt><samp>feedback</samp></dt>
  18486. <dd><p>Amount of gain in delayed signal into right and vice versa. Gives a delay
  18487. effect of left signal in right output and vice versa which gives widening
  18488. effect. Default is 0.3.
  18489. </p>
  18490. </dd>
  18491. <dt><samp>crossfeed</samp></dt>
  18492. <dd><p>Cross feed of left into right with inverted phase. This helps in suppressing
  18493. the mono. If the value is 1 it will cancel all the signal common to both
  18494. channels. Default is 0.3.
  18495. </p>
  18496. </dd>
  18497. <dt><samp>drymix</samp></dt>
  18498. <dd><p>Set level of input signal of original channel. Default is 0.8.
  18499. </p></dd>
  18500. </dl>
  18501. <a name="Commands-40"></a>
  18502. <h4 class="subsection">29.98.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-40" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-40" aria-hidden="true">TOC</a></span></h4>
  18503. <p>This filter supports the all above options except <code>delay</code> as <a href="#commands">commands</a>.
  18504. </p>
  18505. <a name="superequalizer"></a>
  18506. <h3 class="section">29.99 superequalizer<span class="pull-right"><a class="anchor hidden-xs" href="#superequalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-superequalizer" aria-hidden="true">TOC</a></span></h3>
  18507. <p>Apply 18 band equalizer.
  18508. </p>
  18509. <p>The filter accepts the following options:
  18510. </p><dl compact="compact">
  18511. <dt><samp>1b</samp></dt>
  18512. <dd><p>Set 65Hz band gain.
  18513. </p></dd>
  18514. <dt><samp>2b</samp></dt>
  18515. <dd><p>Set 92Hz band gain.
  18516. </p></dd>
  18517. <dt><samp>3b</samp></dt>
  18518. <dd><p>Set 131Hz band gain.
  18519. </p></dd>
  18520. <dt><samp>4b</samp></dt>
  18521. <dd><p>Set 185Hz band gain.
  18522. </p></dd>
  18523. <dt><samp>5b</samp></dt>
  18524. <dd><p>Set 262Hz band gain.
  18525. </p></dd>
  18526. <dt><samp>6b</samp></dt>
  18527. <dd><p>Set 370Hz band gain.
  18528. </p></dd>
  18529. <dt><samp>7b</samp></dt>
  18530. <dd><p>Set 523Hz band gain.
  18531. </p></dd>
  18532. <dt><samp>8b</samp></dt>
  18533. <dd><p>Set 740Hz band gain.
  18534. </p></dd>
  18535. <dt><samp>9b</samp></dt>
  18536. <dd><p>Set 1047Hz band gain.
  18537. </p></dd>
  18538. <dt><samp>10b</samp></dt>
  18539. <dd><p>Set 1480Hz band gain.
  18540. </p></dd>
  18541. <dt><samp>11b</samp></dt>
  18542. <dd><p>Set 2093Hz band gain.
  18543. </p></dd>
  18544. <dt><samp>12b</samp></dt>
  18545. <dd><p>Set 2960Hz band gain.
  18546. </p></dd>
  18547. <dt><samp>13b</samp></dt>
  18548. <dd><p>Set 4186Hz band gain.
  18549. </p></dd>
  18550. <dt><samp>14b</samp></dt>
  18551. <dd><p>Set 5920Hz band gain.
  18552. </p></dd>
  18553. <dt><samp>15b</samp></dt>
  18554. <dd><p>Set 8372Hz band gain.
  18555. </p></dd>
  18556. <dt><samp>16b</samp></dt>
  18557. <dd><p>Set 11840Hz band gain.
  18558. </p></dd>
  18559. <dt><samp>17b</samp></dt>
  18560. <dd><p>Set 16744Hz band gain.
  18561. </p></dd>
  18562. <dt><samp>18b</samp></dt>
  18563. <dd><p>Set 20000Hz band gain.
  18564. </p></dd>
  18565. </dl>
  18566. <a name="surround"></a>
  18567. <h3 class="section">29.100 surround<span class="pull-right"><a class="anchor hidden-xs" href="#surround" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-surround" aria-hidden="true">TOC</a></span></h3>
  18568. <p>Apply audio surround upmix filter.
  18569. </p>
  18570. <p>This filter allows to produce multichannel output from audio stream.
  18571. </p>
  18572. <p>The filter accepts the following options:
  18573. </p>
  18574. <dl compact="compact">
  18575. <dt><samp>chl_out</samp></dt>
  18576. <dd><p>Set output channel layout. By default, this is <var>5.1</var>.
  18577. </p>
  18578. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  18579. for the required syntax.
  18580. </p>
  18581. </dd>
  18582. <dt><samp>chl_in</samp></dt>
  18583. <dd><p>Set input channel layout. By default, this is <var>stereo</var>.
  18584. </p>
  18585. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  18586. for the required syntax.
  18587. </p>
  18588. </dd>
  18589. <dt><samp>level_in</samp></dt>
  18590. <dd><p>Set input volume level. By default, this is <var>1</var>.
  18591. </p>
  18592. </dd>
  18593. <dt><samp>level_out</samp></dt>
  18594. <dd><p>Set output volume level. By default, this is <var>1</var>.
  18595. </p>
  18596. </dd>
  18597. <dt><samp>lfe</samp></dt>
  18598. <dd><p>Enable LFE channel output if output channel layout has it. By default, this is enabled.
  18599. </p>
  18600. </dd>
  18601. <dt><samp>lfe_low</samp></dt>
  18602. <dd><p>Set LFE low cut off frequency. By default, this is <var>128</var> Hz.
  18603. </p>
  18604. </dd>
  18605. <dt><samp>lfe_high</samp></dt>
  18606. <dd><p>Set LFE high cut off frequency. By default, this is <var>256</var> Hz.
  18607. </p>
  18608. </dd>
  18609. <dt><samp>lfe_mode</samp></dt>
  18610. <dd><p>Set LFE mode, can be <var>add</var> or <var>sub</var>. Default is <var>add</var>.
  18611. In <var>add</var> mode, LFE channel is created from input audio and added to output.
  18612. In <var>sub</var> mode, LFE channel is created from input audio and added to output but
  18613. also all non-LFE output channels are subtracted with output LFE channel.
  18614. </p>
  18615. </dd>
  18616. <dt><samp>angle</samp></dt>
  18617. <dd><p>Set angle of stereo surround transform, Allowed range is from <var>0</var> to <var>360</var>.
  18618. Default is <var>90</var>.
  18619. </p>
  18620. </dd>
  18621. <dt><samp>fc_in</samp></dt>
  18622. <dd><p>Set front center input volume. By default, this is <var>1</var>.
  18623. </p>
  18624. </dd>
  18625. <dt><samp>fc_out</samp></dt>
  18626. <dd><p>Set front center output volume. By default, this is <var>1</var>.
  18627. </p>
  18628. </dd>
  18629. <dt><samp>fl_in</samp></dt>
  18630. <dd><p>Set front left input volume. By default, this is <var>1</var>.
  18631. </p>
  18632. </dd>
  18633. <dt><samp>fl_out</samp></dt>
  18634. <dd><p>Set front left output volume. By default, this is <var>1</var>.
  18635. </p>
  18636. </dd>
  18637. <dt><samp>fr_in</samp></dt>
  18638. <dd><p>Set front right input volume. By default, this is <var>1</var>.
  18639. </p>
  18640. </dd>
  18641. <dt><samp>fr_out</samp></dt>
  18642. <dd><p>Set front right output volume. By default, this is <var>1</var>.
  18643. </p>
  18644. </dd>
  18645. <dt><samp>sl_in</samp></dt>
  18646. <dd><p>Set side left input volume. By default, this is <var>1</var>.
  18647. </p>
  18648. </dd>
  18649. <dt><samp>sl_out</samp></dt>
  18650. <dd><p>Set side left output volume. By default, this is <var>1</var>.
  18651. </p>
  18652. </dd>
  18653. <dt><samp>sr_in</samp></dt>
  18654. <dd><p>Set side right input volume. By default, this is <var>1</var>.
  18655. </p>
  18656. </dd>
  18657. <dt><samp>sr_out</samp></dt>
  18658. <dd><p>Set side right output volume. By default, this is <var>1</var>.
  18659. </p>
  18660. </dd>
  18661. <dt><samp>bl_in</samp></dt>
  18662. <dd><p>Set back left input volume. By default, this is <var>1</var>.
  18663. </p>
  18664. </dd>
  18665. <dt><samp>bl_out</samp></dt>
  18666. <dd><p>Set back left output volume. By default, this is <var>1</var>.
  18667. </p>
  18668. </dd>
  18669. <dt><samp>br_in</samp></dt>
  18670. <dd><p>Set back right input volume. By default, this is <var>1</var>.
  18671. </p>
  18672. </dd>
  18673. <dt><samp>br_out</samp></dt>
  18674. <dd><p>Set back right output volume. By default, this is <var>1</var>.
  18675. </p>
  18676. </dd>
  18677. <dt><samp>bc_in</samp></dt>
  18678. <dd><p>Set back center input volume. By default, this is <var>1</var>.
  18679. </p>
  18680. </dd>
  18681. <dt><samp>bc_out</samp></dt>
  18682. <dd><p>Set back center output volume. By default, this is <var>1</var>.
  18683. </p>
  18684. </dd>
  18685. <dt><samp>lfe_in</samp></dt>
  18686. <dd><p>Set LFE input volume. By default, this is <var>1</var>.
  18687. </p>
  18688. </dd>
  18689. <dt><samp>lfe_out</samp></dt>
  18690. <dd><p>Set LFE output volume. By default, this is <var>1</var>.
  18691. </p>
  18692. </dd>
  18693. <dt><samp>allx</samp></dt>
  18694. <dd><p>Set spread usage of stereo image across X axis for all channels.
  18695. </p>
  18696. </dd>
  18697. <dt><samp>ally</samp></dt>
  18698. <dd><p>Set spread usage of stereo image across Y axis for all channels.
  18699. </p>
  18700. </dd>
  18701. <dt><samp>fcx, flx, frx, blx, brx, slx, srx, bcx</samp></dt>
  18702. <dd><p>Set spread usage of stereo image across X axis for each channel.
  18703. </p>
  18704. </dd>
  18705. <dt><samp>fcy, fly, fry, bly, bry, sly, sry, bcy</samp></dt>
  18706. <dd><p>Set spread usage of stereo image across Y axis for each channel.
  18707. </p>
  18708. </dd>
  18709. <dt><samp>win_size</samp></dt>
  18710. <dd><p>Set window size. Allowed range is from <var>1024</var> to <var>65536</var>. Default size is <var>4096</var>.
  18711. </p>
  18712. </dd>
  18713. <dt><samp>win_func</samp></dt>
  18714. <dd><p>Set window function.
  18715. </p>
  18716. <p>It accepts the following values:
  18717. </p><dl compact="compact">
  18718. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  18719. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  18720. <dt>&lsquo;<samp>hann, hanning</samp>&rsquo;</dt>
  18721. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  18722. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  18723. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  18724. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  18725. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  18726. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  18727. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  18728. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  18729. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  18730. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  18731. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  18732. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  18733. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  18734. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  18735. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  18736. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  18737. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  18738. </dl>
  18739. <p>Default is <code>hann</code>.
  18740. </p>
  18741. </dd>
  18742. <dt><samp>overlap</samp></dt>
  18743. <dd><p>Set window overlap. If set to 1, the recommended overlap for selected
  18744. window function will be picked. Default is <code>0.5</code>.
  18745. </p></dd>
  18746. </dl>
  18747. <a name="treble_002c-highshelf"></a>
  18748. <h3 class="section">29.101 treble, highshelf<span class="pull-right"><a class="anchor hidden-xs" href="#treble_002c-highshelf" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-treble_002c-highshelf" aria-hidden="true">TOC</a></span></h3>
  18749. <p>Boost or cut treble (upper) frequencies of the audio using a two-pole
  18750. shelving filter with a response similar to that of a standard
  18751. hi-fi&rsquo;s tone-controls. This is also known as shelving equalisation (EQ).
  18752. </p>
  18753. <p>The filter accepts the following options:
  18754. </p>
  18755. <dl compact="compact">
  18756. <dt><samp>gain, g</samp></dt>
  18757. <dd><p>Give the gain at whichever is the lower of ~22 kHz and the
  18758. Nyquist frequency. Its useful range is about -20 (for a large cut)
  18759. to +20 (for a large boost). Beware of clipping when using a positive gain.
  18760. </p>
  18761. </dd>
  18762. <dt><samp>frequency, f</samp></dt>
  18763. <dd><p>Set the filter&rsquo;s central frequency and so can be used
  18764. to extend or reduce the frequency range to be boosted or cut.
  18765. The default value is <code>3000</code> Hz.
  18766. </p>
  18767. </dd>
  18768. <dt><samp>width_type, t</samp></dt>
  18769. <dd><p>Set method to specify band-width of filter.
  18770. </p><dl compact="compact">
  18771. <dt><samp>h</samp></dt>
  18772. <dd><p>Hz
  18773. </p></dd>
  18774. <dt><samp>q</samp></dt>
  18775. <dd><p>Q-Factor
  18776. </p></dd>
  18777. <dt><samp>o</samp></dt>
  18778. <dd><p>octave
  18779. </p></dd>
  18780. <dt><samp>s</samp></dt>
  18781. <dd><p>slope
  18782. </p></dd>
  18783. <dt><samp>k</samp></dt>
  18784. <dd><p>kHz
  18785. </p></dd>
  18786. </dl>
  18787. </dd>
  18788. <dt><samp>width, w</samp></dt>
  18789. <dd><p>Determine how steep is the filter&rsquo;s shelf transition.
  18790. </p>
  18791. </dd>
  18792. <dt><samp>poles, p</samp></dt>
  18793. <dd><p>Set number of poles. Default is 2.
  18794. </p>
  18795. </dd>
  18796. <dt><samp>mix, m</samp></dt>
  18797. <dd><p>How much to use filtered signal in output. Default is 1.
  18798. Range is between 0 and 1.
  18799. </p>
  18800. </dd>
  18801. <dt><samp>channels, c</samp></dt>
  18802. <dd><p>Specify which channels to filter, by default all available are filtered.
  18803. </p>
  18804. </dd>
  18805. <dt><samp>normalize, n</samp></dt>
  18806. <dd><p>Normalize biquad coefficients, by default is disabled.
  18807. Enabling it will normalize magnitude response at DC to 0dB.
  18808. </p>
  18809. </dd>
  18810. <dt><samp>transform, a</samp></dt>
  18811. <dd><p>Set transform type of IIR filter.
  18812. </p><dl compact="compact">
  18813. <dt><samp>di</samp></dt>
  18814. <dt><samp>dii</samp></dt>
  18815. <dt><samp>tdii</samp></dt>
  18816. <dt><samp>latt</samp></dt>
  18817. </dl>
  18818. </dd>
  18819. <dt><samp>precision, r</samp></dt>
  18820. <dd><p>Set precison of filtering.
  18821. </p><dl compact="compact">
  18822. <dt><samp>auto</samp></dt>
  18823. <dd><p>Pick automatic sample format depending on surround filters.
  18824. </p></dd>
  18825. <dt><samp>s16</samp></dt>
  18826. <dd><p>Always use signed 16-bit.
  18827. </p></dd>
  18828. <dt><samp>s32</samp></dt>
  18829. <dd><p>Always use signed 32-bit.
  18830. </p></dd>
  18831. <dt><samp>f32</samp></dt>
  18832. <dd><p>Always use float 32-bit.
  18833. </p></dd>
  18834. <dt><samp>f64</samp></dt>
  18835. <dd><p>Always use float 64-bit.
  18836. </p></dd>
  18837. </dl>
  18838. </dd>
  18839. </dl>
  18840. <a name="Commands-41"></a>
  18841. <h4 class="subsection">29.101.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-41" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-41" aria-hidden="true">TOC</a></span></h4>
  18842. <p>This filter supports the following commands:
  18843. </p><dl compact="compact">
  18844. <dt><samp>frequency, f</samp></dt>
  18845. <dd><p>Change treble frequency.
  18846. Syntax for the command is : &quot;<var>frequency</var>&quot;
  18847. </p>
  18848. </dd>
  18849. <dt><samp>width_type, t</samp></dt>
  18850. <dd><p>Change treble width_type.
  18851. Syntax for the command is : &quot;<var>width_type</var>&quot;
  18852. </p>
  18853. </dd>
  18854. <dt><samp>width, w</samp></dt>
  18855. <dd><p>Change treble width.
  18856. Syntax for the command is : &quot;<var>width</var>&quot;
  18857. </p>
  18858. </dd>
  18859. <dt><samp>gain, g</samp></dt>
  18860. <dd><p>Change treble gain.
  18861. Syntax for the command is : &quot;<var>gain</var>&quot;
  18862. </p>
  18863. </dd>
  18864. <dt><samp>mix, m</samp></dt>
  18865. <dd><p>Change treble mix.
  18866. Syntax for the command is : &quot;<var>mix</var>&quot;
  18867. </p></dd>
  18868. </dl>
  18869. <a name="tremolo"></a>
  18870. <h3 class="section">29.102 tremolo<span class="pull-right"><a class="anchor hidden-xs" href="#tremolo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tremolo" aria-hidden="true">TOC</a></span></h3>
  18871. <p>Sinusoidal amplitude modulation.
  18872. </p>
  18873. <p>The filter accepts the following options:
  18874. </p>
  18875. <dl compact="compact">
  18876. <dt><samp>f</samp></dt>
  18877. <dd><p>Modulation frequency in Hertz. Modulation frequencies in the subharmonic range
  18878. (20 Hz or lower) will result in a tremolo effect.
  18879. This filter may also be used as a ring modulator by specifying
  18880. a modulation frequency higher than 20 Hz.
  18881. Range is 0.1 - 20000.0. Default value is 5.0 Hz.
  18882. </p>
  18883. </dd>
  18884. <dt><samp>d</samp></dt>
  18885. <dd><p>Depth of modulation as a percentage. Range is 0.0 - 1.0.
  18886. Default value is 0.5.
  18887. </p></dd>
  18888. </dl>
  18889. <a name="vibrato"></a>
  18890. <h3 class="section">29.103 vibrato<span class="pull-right"><a class="anchor hidden-xs" href="#vibrato" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vibrato" aria-hidden="true">TOC</a></span></h3>
  18891. <p>Sinusoidal phase modulation.
  18892. </p>
  18893. <p>The filter accepts the following options:
  18894. </p>
  18895. <dl compact="compact">
  18896. <dt><samp>f</samp></dt>
  18897. <dd><p>Modulation frequency in Hertz.
  18898. Range is 0.1 - 20000.0. Default value is 5.0 Hz.
  18899. </p>
  18900. </dd>
  18901. <dt><samp>d</samp></dt>
  18902. <dd><p>Depth of modulation as a percentage. Range is 0.0 - 1.0.
  18903. Default value is 0.5.
  18904. </p></dd>
  18905. </dl>
  18906. <a name="volume"></a>
  18907. <h3 class="section">29.104 volume<span class="pull-right"><a class="anchor hidden-xs" href="#volume" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-volume" aria-hidden="true">TOC</a></span></h3>
  18908. <p>Adjust the input audio volume.
  18909. </p>
  18910. <p>It accepts the following parameters:
  18911. </p><dl compact="compact">
  18912. <dt><samp>volume</samp></dt>
  18913. <dd><p>Set audio volume expression.
  18914. </p>
  18915. <p>Output values are clipped to the maximum value.
  18916. </p>
  18917. <p>The output audio volume is given by the relation:
  18918. </p><div class="example">
  18919. <pre class="example"><var>output_volume</var> = <var>volume</var> * <var>input_volume</var>
  18920. </pre></div>
  18921. <p>The default value for <var>volume</var> is &quot;1.0&quot;.
  18922. </p>
  18923. </dd>
  18924. <dt><samp>precision</samp></dt>
  18925. <dd><p>This parameter represents the mathematical precision.
  18926. </p>
  18927. <p>It determines which input sample formats will be allowed, which affects the
  18928. precision of the volume scaling.
  18929. </p>
  18930. <dl compact="compact">
  18931. <dt><samp>fixed</samp></dt>
  18932. <dd><p>8-bit fixed-point; this limits input sample format to U8, S16, and S32.
  18933. </p></dd>
  18934. <dt><samp>float</samp></dt>
  18935. <dd><p>32-bit floating-point; this limits input sample format to FLT. (default)
  18936. </p></dd>
  18937. <dt><samp>double</samp></dt>
  18938. <dd><p>64-bit floating-point; this limits input sample format to DBL.
  18939. </p></dd>
  18940. </dl>
  18941. </dd>
  18942. <dt><samp>replaygain</samp></dt>
  18943. <dd><p>Choose the behaviour on encountering ReplayGain side data in input frames.
  18944. </p>
  18945. <dl compact="compact">
  18946. <dt><samp>drop</samp></dt>
  18947. <dd><p>Remove ReplayGain side data, ignoring its contents (the default).
  18948. </p>
  18949. </dd>
  18950. <dt><samp>ignore</samp></dt>
  18951. <dd><p>Ignore ReplayGain side data, but leave it in the frame.
  18952. </p>
  18953. </dd>
  18954. <dt><samp>track</samp></dt>
  18955. <dd><p>Prefer the track gain, if present.
  18956. </p>
  18957. </dd>
  18958. <dt><samp>album</samp></dt>
  18959. <dd><p>Prefer the album gain, if present.
  18960. </p></dd>
  18961. </dl>
  18962. </dd>
  18963. <dt><samp>replaygain_preamp</samp></dt>
  18964. <dd><p>Pre-amplification gain in dB to apply to the selected replaygain gain.
  18965. </p>
  18966. <p>Default value for <var>replaygain_preamp</var> is 0.0.
  18967. </p>
  18968. </dd>
  18969. <dt><samp>replaygain_noclip</samp></dt>
  18970. <dd><p>Prevent clipping by limiting the gain applied.
  18971. </p>
  18972. <p>Default value for <var>replaygain_noclip</var> is 1.
  18973. </p>
  18974. </dd>
  18975. <dt><samp>eval</samp></dt>
  18976. <dd><p>Set when the volume expression is evaluated.
  18977. </p>
  18978. <p>It accepts the following values:
  18979. </p><dl compact="compact">
  18980. <dt>&lsquo;<samp>once</samp>&rsquo;</dt>
  18981. <dd><p>only evaluate expression once during the filter initialization, or
  18982. when the &lsquo;<samp>volume</samp>&rsquo; command is sent
  18983. </p>
  18984. </dd>
  18985. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  18986. <dd><p>evaluate expression for each incoming frame
  18987. </p></dd>
  18988. </dl>
  18989. <p>Default value is &lsquo;<samp>once</samp>&rsquo;.
  18990. </p></dd>
  18991. </dl>
  18992. <p>The volume expression can contain the following parameters.
  18993. </p>
  18994. <dl compact="compact">
  18995. <dt><samp>n</samp></dt>
  18996. <dd><p>frame number (starting at zero)
  18997. </p></dd>
  18998. <dt><samp>nb_channels</samp></dt>
  18999. <dd><p>number of channels
  19000. </p></dd>
  19001. <dt><samp>nb_consumed_samples</samp></dt>
  19002. <dd><p>number of samples consumed by the filter
  19003. </p></dd>
  19004. <dt><samp>nb_samples</samp></dt>
  19005. <dd><p>number of samples in the current frame
  19006. </p></dd>
  19007. <dt><samp>pos</samp></dt>
  19008. <dd><p>original frame position in the file
  19009. </p></dd>
  19010. <dt><samp>pts</samp></dt>
  19011. <dd><p>frame PTS
  19012. </p></dd>
  19013. <dt><samp>sample_rate</samp></dt>
  19014. <dd><p>sample rate
  19015. </p></dd>
  19016. <dt><samp>startpts</samp></dt>
  19017. <dd><p>PTS at start of stream
  19018. </p></dd>
  19019. <dt><samp>startt</samp></dt>
  19020. <dd><p>time at start of stream
  19021. </p></dd>
  19022. <dt><samp>t</samp></dt>
  19023. <dd><p>frame time
  19024. </p></dd>
  19025. <dt><samp>tb</samp></dt>
  19026. <dd><p>timestamp timebase
  19027. </p></dd>
  19028. <dt><samp>volume</samp></dt>
  19029. <dd><p>last set volume value
  19030. </p></dd>
  19031. </dl>
  19032. <p>Note that when <samp>eval</samp> is set to &lsquo;<samp>once</samp>&rsquo; only the
  19033. <var>sample_rate</var> and <var>tb</var> variables are available, all other
  19034. variables will evaluate to NAN.
  19035. </p>
  19036. <a name="Commands-42"></a>
  19037. <h4 class="subsection">29.104.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-42" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-42" aria-hidden="true">TOC</a></span></h4>
  19038. <p>This filter supports the following commands:
  19039. </p><dl compact="compact">
  19040. <dt><samp>volume</samp></dt>
  19041. <dd><p>Modify the volume expression.
  19042. The command accepts the same syntax of the corresponding option.
  19043. </p>
  19044. <p>If the specified expression is not valid, it is kept at its current
  19045. value.
  19046. </p></dd>
  19047. </dl>
  19048. <a name="Examples-46"></a>
  19049. <h4 class="subsection">29.104.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-46" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-46" aria-hidden="true">TOC</a></span></h4>
  19050. <ul>
  19051. <li> Halve the input audio volume:
  19052. <div class="example">
  19053. <pre class="example">volume=volume=0.5
  19054. volume=volume=1/2
  19055. volume=volume=-6.0206dB
  19056. </pre></div>
  19057. <p>In all the above example the named key for <samp>volume</samp> can be
  19058. omitted, for example like in:
  19059. </p><div class="example">
  19060. <pre class="example">volume=0.5
  19061. </pre></div>
  19062. </li><li> Increase input audio power by 6 decibels using fixed-point precision:
  19063. <div class="example">
  19064. <pre class="example">volume=volume=6dB:precision=fixed
  19065. </pre></div>
  19066. </li><li> Fade volume after time 10 with an annihilation period of 5 seconds:
  19067. <div class="example">
  19068. <pre class="example">volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame
  19069. </pre></div>
  19070. </li></ul>
  19071. <a name="volumedetect"></a>
  19072. <h3 class="section">29.105 volumedetect<span class="pull-right"><a class="anchor hidden-xs" href="#volumedetect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-volumedetect" aria-hidden="true">TOC</a></span></h3>
  19073. <p>Detect the volume of the input video.
  19074. </p>
  19075. <p>The filter has no parameters. The input is not modified. Statistics about
  19076. the volume will be printed in the log when the input stream end is reached.
  19077. </p>
  19078. <p>In particular it will show the mean volume (root mean square), maximum
  19079. volume (on a per-sample basis), and the beginning of a histogram of the
  19080. registered volume values (from the maximum value to a cumulated 1/1000 of
  19081. the samples).
  19082. </p>
  19083. <p>All volumes are in decibels relative to the maximum PCM value.
  19084. </p>
  19085. <a name="Examples-47"></a>
  19086. <h4 class="subsection">29.105.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-47" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-47" aria-hidden="true">TOC</a></span></h4>
  19087. <p>Here is an excerpt of the output:
  19088. </p><div class="example">
  19089. <pre class="example">[Parsed_volumedetect_0 &nbsp;0xa23120] mean_volume: -27 dB
  19090. [Parsed_volumedetect_0 &nbsp;0xa23120] max_volume: -4 dB
  19091. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_4db: 6
  19092. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_5db: 62
  19093. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_6db: 286
  19094. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_7db: 1042
  19095. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_8db: 2551
  19096. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_9db: 4609
  19097. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_10db: 8409
  19098. </pre></div>
  19099. <p>It means that:
  19100. </p><ul>
  19101. <li> The mean square energy is approximately -27 dB, or 10^-2.7.
  19102. </li><li> The largest sample is at -4 dB, or more precisely between -4 dB and -5 dB.
  19103. </li><li> There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc.
  19104. </li></ul>
  19105. <p>In other words, raising the volume by +4 dB does not cause any clipping,
  19106. raising it by +5 dB causes clipping for 6 samples, etc.
  19107. </p>
  19108. <a name="Audio-Sources"></a>
  19109. <h2 class="chapter">30 Audio Sources<span class="pull-right"><a class="anchor hidden-xs" href="#Audio-Sources" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Audio-Sources" aria-hidden="true">TOC</a></span></h2>
  19110. <p>Below is a description of the currently available audio sources.
  19111. </p>
  19112. <a name="abuffer"></a>
  19113. <h3 class="section">30.1 abuffer<span class="pull-right"><a class="anchor hidden-xs" href="#abuffer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-abuffer" aria-hidden="true">TOC</a></span></h3>
  19114. <p>Buffer audio frames, and make them available to the filter chain.
  19115. </p>
  19116. <p>This source is mainly intended for a programmatic use, in particular
  19117. through the interface defined in <samp>libavfilter/buffersrc.h</samp>.
  19118. </p>
  19119. <p>It accepts the following parameters:
  19120. </p><dl compact="compact">
  19121. <dt><samp>time_base</samp></dt>
  19122. <dd><p>The timebase which will be used for timestamps of submitted frames. It must be
  19123. either a floating-point number or in <var>numerator</var>/<var>denominator</var> form.
  19124. </p>
  19125. </dd>
  19126. <dt><samp>sample_rate</samp></dt>
  19127. <dd><p>The sample rate of the incoming audio buffers.
  19128. </p>
  19129. </dd>
  19130. <dt><samp>sample_fmt</samp></dt>
  19131. <dd><p>The sample format of the incoming audio buffers.
  19132. Either a sample format name or its corresponding integer representation from
  19133. the enum AVSampleFormat in <samp>libavutil/samplefmt.h</samp>
  19134. </p>
  19135. </dd>
  19136. <dt><samp>channel_layout</samp></dt>
  19137. <dd><p>The channel layout of the incoming audio buffers.
  19138. Either a channel layout name from channel_layout_map in
  19139. <samp>libavutil/channel_layout.c</samp> or its corresponding integer representation
  19140. from the AV_CH_LAYOUT_* macros in <samp>libavutil/channel_layout.h</samp>
  19141. </p>
  19142. </dd>
  19143. <dt><samp>channels</samp></dt>
  19144. <dd><p>The number of channels of the incoming audio buffers.
  19145. If both <var>channels</var> and <var>channel_layout</var> are specified, then they
  19146. must be consistent.
  19147. </p>
  19148. </dd>
  19149. </dl>
  19150. <a name="Examples-48"></a>
  19151. <h4 class="subsection">30.1.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-48" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-48" aria-hidden="true">TOC</a></span></h4>
  19152. <div class="example">
  19153. <pre class="example">abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
  19154. </pre></div>
  19155. <p>will instruct the source to accept planar 16bit signed stereo at 44100Hz.
  19156. Since the sample format with name &quot;s16p&quot; corresponds to the number
  19157. 6 and the &quot;stereo&quot; channel layout corresponds to the value 0x3, this is
  19158. equivalent to:
  19159. </p><div class="example">
  19160. <pre class="example">abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
  19161. </pre></div>
  19162. <a name="aevalsrc"></a>
  19163. <h3 class="section">30.2 aevalsrc<span class="pull-right"><a class="anchor hidden-xs" href="#aevalsrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aevalsrc" aria-hidden="true">TOC</a></span></h3>
  19164. <p>Generate an audio signal specified by an expression.
  19165. </p>
  19166. <p>This source accepts in input one or more expressions (one for each
  19167. channel), which are evaluated and used to generate a corresponding
  19168. audio signal.
  19169. </p>
  19170. <p>This source accepts the following options:
  19171. </p>
  19172. <dl compact="compact">
  19173. <dt><samp>exprs</samp></dt>
  19174. <dd><p>Set the &rsquo;|&rsquo;-separated expressions list for each separate channel. In case the
  19175. <samp>channel_layout</samp> option is not specified, the selected channel layout
  19176. depends on the number of provided expressions. Otherwise the last
  19177. specified expression is applied to the remaining output channels.
  19178. </p>
  19179. </dd>
  19180. <dt><samp>channel_layout, c</samp></dt>
  19181. <dd><p>Set the channel layout. The number of channels in the specified layout
  19182. must be equal to the number of specified expressions.
  19183. </p>
  19184. </dd>
  19185. <dt><samp>duration, d</samp></dt>
  19186. <dd><p>Set the minimum duration of the sourced audio. See
  19187. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  19188. for the accepted syntax.
  19189. Note that the resulting duration may be greater than the specified
  19190. duration, as the generated audio is always cut at the end of a
  19191. complete frame.
  19192. </p>
  19193. <p>If not specified, or the expressed duration is negative, the audio is
  19194. supposed to be generated forever.
  19195. </p>
  19196. </dd>
  19197. <dt><samp>nb_samples, n</samp></dt>
  19198. <dd><p>Set the number of samples per channel per each output frame,
  19199. default to 1024.
  19200. </p>
  19201. </dd>
  19202. <dt><samp>sample_rate, s</samp></dt>
  19203. <dd><p>Specify the sample rate, default to 44100.
  19204. </p></dd>
  19205. </dl>
  19206. <p>Each expression in <var>exprs</var> can contain the following constants:
  19207. </p>
  19208. <dl compact="compact">
  19209. <dt><samp>n</samp></dt>
  19210. <dd><p>number of the evaluated sample, starting from 0
  19211. </p>
  19212. </dd>
  19213. <dt><samp>t</samp></dt>
  19214. <dd><p>time of the evaluated sample expressed in seconds, starting from 0
  19215. </p>
  19216. </dd>
  19217. <dt><samp>s</samp></dt>
  19218. <dd><p>sample rate
  19219. </p>
  19220. </dd>
  19221. </dl>
  19222. <a name="Examples-49"></a>
  19223. <h4 class="subsection">30.2.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-49" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-49" aria-hidden="true">TOC</a></span></h4>
  19224. <ul>
  19225. <li> Generate silence:
  19226. <div class="example">
  19227. <pre class="example">aevalsrc=0
  19228. </pre></div>
  19229. </li><li> Generate a sin signal with frequency of 440 Hz, set sample rate to
  19230. 8000 Hz:
  19231. <div class="example">
  19232. <pre class="example">aevalsrc=&quot;sin(440*2*PI*t):s=8000&quot;
  19233. </pre></div>
  19234. </li><li> Generate a two channels signal, specify the channel layout (Front
  19235. Center + Back Center) explicitly:
  19236. <div class="example">
  19237. <pre class="example">aevalsrc=&quot;sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC&quot;
  19238. </pre></div>
  19239. </li><li> Generate white noise:
  19240. <div class="example">
  19241. <pre class="example">aevalsrc=&quot;-2+random(0)&quot;
  19242. </pre></div>
  19243. </li><li> Generate an amplitude modulated signal:
  19244. <div class="example">
  19245. <pre class="example">aevalsrc=&quot;sin(10*2*PI*t)*sin(880*2*PI*t)&quot;
  19246. </pre></div>
  19247. </li><li> Generate 2.5 Hz binaural beats on a 360 Hz carrier:
  19248. <div class="example">
  19249. <pre class="example">aevalsrc=&quot;0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)&quot;
  19250. </pre></div>
  19251. </li></ul>
  19252. <a name="afirsrc"></a>
  19253. <h3 class="section">30.3 afirsrc<span class="pull-right"><a class="anchor hidden-xs" href="#afirsrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-afirsrc" aria-hidden="true">TOC</a></span></h3>
  19254. <p>Generate a FIR coefficients using frequency sampling method.
  19255. </p>
  19256. <p>The resulting stream can be used with <a href="#afir">afir</a> filter for filtering the audio signal.
  19257. </p>
  19258. <p>The filter accepts the following options:
  19259. </p>
  19260. <dl compact="compact">
  19261. <dt><samp>taps, t</samp></dt>
  19262. <dd><p>Set number of filter coefficents in output audio stream.
  19263. Default value is 1025.
  19264. </p>
  19265. </dd>
  19266. <dt><samp>frequency, f</samp></dt>
  19267. <dd><p>Set frequency points from where magnitude and phase are set.
  19268. This must be in non decreasing order, and first element must be 0, while last element
  19269. must be 1. Elements are separated by white spaces.
  19270. </p>
  19271. </dd>
  19272. <dt><samp>magnitude, m</samp></dt>
  19273. <dd><p>Set magnitude value for every frequency point set by <samp>frequency</samp>.
  19274. Number of values must be same as number of frequency points.
  19275. Values are separated by white spaces.
  19276. </p>
  19277. </dd>
  19278. <dt><samp>phase, p</samp></dt>
  19279. <dd><p>Set phase value for every frequency point set by <samp>frequency</samp>.
  19280. Number of values must be same as number of frequency points.
  19281. Values are separated by white spaces.
  19282. </p>
  19283. </dd>
  19284. <dt><samp>sample_rate, r</samp></dt>
  19285. <dd><p>Set sample rate, default is 44100.
  19286. </p>
  19287. </dd>
  19288. <dt><samp>nb_samples, n</samp></dt>
  19289. <dd><p>Set number of samples per each frame. Default is 1024.
  19290. </p>
  19291. </dd>
  19292. <dt><samp>win_func, w</samp></dt>
  19293. <dd><p>Set window function. Default is blackman.
  19294. </p></dd>
  19295. </dl>
  19296. <a name="anullsrc"></a>
  19297. <h3 class="section">30.4 anullsrc<span class="pull-right"><a class="anchor hidden-xs" href="#anullsrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-anullsrc" aria-hidden="true">TOC</a></span></h3>
  19298. <p>The null audio source, return unprocessed audio frames. It is mainly useful
  19299. as a template and to be employed in analysis / debugging tools, or as
  19300. the source for filters which ignore the input data (for example the sox
  19301. synth filter).
  19302. </p>
  19303. <p>This source accepts the following options:
  19304. </p>
  19305. <dl compact="compact">
  19306. <dt><samp>channel_layout, cl</samp></dt>
  19307. <dd>
  19308. <p>Specifies the channel layout, and can be either an integer or a string
  19309. representing a channel layout. The default value of <var>channel_layout</var>
  19310. is &quot;stereo&quot;.
  19311. </p>
  19312. <p>Check the channel_layout_map definition in
  19313. <samp>libavutil/channel_layout.c</samp> for the mapping between strings and
  19314. channel layout values.
  19315. </p>
  19316. </dd>
  19317. <dt><samp>sample_rate, r</samp></dt>
  19318. <dd><p>Specifies the sample rate, and defaults to 44100.
  19319. </p>
  19320. </dd>
  19321. <dt><samp>nb_samples, n</samp></dt>
  19322. <dd><p>Set the number of samples per requested frames.
  19323. </p>
  19324. </dd>
  19325. <dt><samp>duration, d</samp></dt>
  19326. <dd><p>Set the duration of the sourced audio. See
  19327. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  19328. for the accepted syntax.
  19329. </p>
  19330. <p>If not specified, or the expressed duration is negative, the audio is
  19331. supposed to be generated forever.
  19332. </p></dd>
  19333. </dl>
  19334. <a name="Examples-50"></a>
  19335. <h4 class="subsection">30.4.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-50" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-50" aria-hidden="true">TOC</a></span></h4>
  19336. <ul>
  19337. <li> Set the sample rate to 48000 Hz and the channel layout to AV_CH_LAYOUT_MONO.
  19338. <div class="example">
  19339. <pre class="example">anullsrc=r=48000:cl=4
  19340. </pre></div>
  19341. </li><li> Do the same operation with a more obvious syntax:
  19342. <div class="example">
  19343. <pre class="example">anullsrc=r=48000:cl=mono
  19344. </pre></div>
  19345. </li></ul>
  19346. <p>All the parameters need to be explicitly defined.
  19347. </p>
  19348. <a name="flite"></a>
  19349. <h3 class="section">30.5 flite<span class="pull-right"><a class="anchor hidden-xs" href="#flite" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-flite" aria-hidden="true">TOC</a></span></h3>
  19350. <p>Synthesize a voice utterance using the libflite library.
  19351. </p>
  19352. <p>To enable compilation of this filter you need to configure FFmpeg with
  19353. <code>--enable-libflite</code>.
  19354. </p>
  19355. <p>Note that versions of the flite library prior to 2.0 are not thread-safe.
  19356. </p>
  19357. <p>The filter accepts the following options:
  19358. </p>
  19359. <dl compact="compact">
  19360. <dt><samp>list_voices</samp></dt>
  19361. <dd><p>If set to 1, list the names of the available voices and exit
  19362. immediately. Default value is 0.
  19363. </p>
  19364. </dd>
  19365. <dt><samp>nb_samples, n</samp></dt>
  19366. <dd><p>Set the maximum number of samples per frame. Default value is 512.
  19367. </p>
  19368. </dd>
  19369. <dt><samp>textfile</samp></dt>
  19370. <dd><p>Set the filename containing the text to speak.
  19371. </p>
  19372. </dd>
  19373. <dt><samp>text</samp></dt>
  19374. <dd><p>Set the text to speak.
  19375. </p>
  19376. </dd>
  19377. <dt><samp>voice, v</samp></dt>
  19378. <dd><p>Set the voice to use for the speech synthesis. Default value is
  19379. <code>kal</code>. See also the <var>list_voices</var> option.
  19380. </p></dd>
  19381. </dl>
  19382. <a name="Examples-51"></a>
  19383. <h4 class="subsection">30.5.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-51" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-51" aria-hidden="true">TOC</a></span></h4>
  19384. <ul>
  19385. <li> Read from file <samp>speech.txt</samp>, and synthesize the text using the
  19386. standard flite voice:
  19387. <div class="example">
  19388. <pre class="example">flite=textfile=speech.txt
  19389. </pre></div>
  19390. </li><li> Read the specified text selecting the <code>slt</code> voice:
  19391. <div class="example">
  19392. <pre class="example">flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
  19393. </pre></div>
  19394. </li><li> Input text to ffmpeg:
  19395. <div class="example">
  19396. <pre class="example">ffmpeg -f lavfi -i flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
  19397. </pre></div>
  19398. </li><li> Make <samp>ffplay</samp> speak the specified text, using <code>flite</code> and
  19399. the <code>lavfi</code> device:
  19400. <div class="example">
  19401. <pre class="example">ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
  19402. </pre></div>
  19403. </li></ul>
  19404. <p>For more information about libflite, check:
  19405. <a href="http://www.festvox.org/flite/">http://www.festvox.org/flite/</a>
  19406. </p>
  19407. <a name="anoisesrc"></a>
  19408. <h3 class="section">30.6 anoisesrc<span class="pull-right"><a class="anchor hidden-xs" href="#anoisesrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-anoisesrc" aria-hidden="true">TOC</a></span></h3>
  19409. <p>Generate a noise audio signal.
  19410. </p>
  19411. <p>The filter accepts the following options:
  19412. </p>
  19413. <dl compact="compact">
  19414. <dt><samp>sample_rate, r</samp></dt>
  19415. <dd><p>Specify the sample rate. Default value is 48000 Hz.
  19416. </p>
  19417. </dd>
  19418. <dt><samp>amplitude, a</samp></dt>
  19419. <dd><p>Specify the amplitude (0.0 - 1.0) of the generated audio stream. Default value
  19420. is 1.0.
  19421. </p>
  19422. </dd>
  19423. <dt><samp>duration, d</samp></dt>
  19424. <dd><p>Specify the duration of the generated audio stream. Not specifying this option
  19425. results in noise with an infinite length.
  19426. </p>
  19427. </dd>
  19428. <dt><samp>color, colour, c</samp></dt>
  19429. <dd><p>Specify the color of noise. Available noise colors are white, pink, brown,
  19430. blue, violet and velvet. Default color is white.
  19431. </p>
  19432. </dd>
  19433. <dt><samp>seed, s</samp></dt>
  19434. <dd><p>Specify a value used to seed the PRNG.
  19435. </p>
  19436. </dd>
  19437. <dt><samp>nb_samples, n</samp></dt>
  19438. <dd><p>Set the number of samples per each output frame, default is 1024.
  19439. </p></dd>
  19440. </dl>
  19441. <a name="Examples-52"></a>
  19442. <h4 class="subsection">30.6.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-52" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-52" aria-hidden="true">TOC</a></span></h4>
  19443. <ul>
  19444. <li> Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate and an amplitude of 0.5:
  19445. <div class="example">
  19446. <pre class="example">anoisesrc=d=60:c=pink:r=44100:a=0.5
  19447. </pre></div>
  19448. </li></ul>
  19449. <a name="hilbert"></a>
  19450. <h3 class="section">30.7 hilbert<span class="pull-right"><a class="anchor hidden-xs" href="#hilbert" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hilbert" aria-hidden="true">TOC</a></span></h3>
  19451. <p>Generate odd-tap Hilbert transform FIR coefficients.
  19452. </p>
  19453. <p>The resulting stream can be used with <a href="#afir">afir</a> filter for phase-shifting
  19454. the signal by 90 degrees.
  19455. </p>
  19456. <p>This is used in many matrix coding schemes and for analytic signal generation.
  19457. The process is often written as a multiplication by i (or j), the imaginary unit.
  19458. </p>
  19459. <p>The filter accepts the following options:
  19460. </p>
  19461. <dl compact="compact">
  19462. <dt><samp>sample_rate, s</samp></dt>
  19463. <dd><p>Set sample rate, default is 44100.
  19464. </p>
  19465. </dd>
  19466. <dt><samp>taps, t</samp></dt>
  19467. <dd><p>Set length of FIR filter, default is 22051.
  19468. </p>
  19469. </dd>
  19470. <dt><samp>nb_samples, n</samp></dt>
  19471. <dd><p>Set number of samples per each frame.
  19472. </p>
  19473. </dd>
  19474. <dt><samp>win_func, w</samp></dt>
  19475. <dd><p>Set window function to be used when generating FIR coefficients.
  19476. </p></dd>
  19477. </dl>
  19478. <a name="sinc"></a>
  19479. <h3 class="section">30.8 sinc<span class="pull-right"><a class="anchor hidden-xs" href="#sinc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sinc" aria-hidden="true">TOC</a></span></h3>
  19480. <p>Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.
  19481. </p>
  19482. <p>The resulting stream can be used with <a href="#afir">afir</a> filter for filtering the audio signal.
  19483. </p>
  19484. <p>The filter accepts the following options:
  19485. </p>
  19486. <dl compact="compact">
  19487. <dt><samp>sample_rate, r</samp></dt>
  19488. <dd><p>Set sample rate, default is 44100.
  19489. </p>
  19490. </dd>
  19491. <dt><samp>nb_samples, n</samp></dt>
  19492. <dd><p>Set number of samples per each frame. Default is 1024.
  19493. </p>
  19494. </dd>
  19495. <dt><samp>hp</samp></dt>
  19496. <dd><p>Set high-pass frequency. Default is 0.
  19497. </p>
  19498. </dd>
  19499. <dt><samp>lp</samp></dt>
  19500. <dd><p>Set low-pass frequency. Default is 0.
  19501. If high-pass frequency is lower than low-pass frequency and low-pass frequency
  19502. is higher than 0 then filter will create band-pass filter coefficients,
  19503. otherwise band-reject filter coefficients.
  19504. </p>
  19505. </dd>
  19506. <dt><samp>phase</samp></dt>
  19507. <dd><p>Set filter phase response. Default is 50. Allowed range is from 0 to 100.
  19508. </p>
  19509. </dd>
  19510. <dt><samp>beta</samp></dt>
  19511. <dd><p>Set Kaiser window beta.
  19512. </p>
  19513. </dd>
  19514. <dt><samp>att</samp></dt>
  19515. <dd><p>Set stop-band attenuation. Default is 120dB, allowed range is from 40 to 180 dB.
  19516. </p>
  19517. </dd>
  19518. <dt><samp>round</samp></dt>
  19519. <dd><p>Enable rounding, by default is disabled.
  19520. </p>
  19521. </dd>
  19522. <dt><samp>hptaps</samp></dt>
  19523. <dd><p>Set number of taps for high-pass filter.
  19524. </p>
  19525. </dd>
  19526. <dt><samp>lptaps</samp></dt>
  19527. <dd><p>Set number of taps for low-pass filter.
  19528. </p></dd>
  19529. </dl>
  19530. <a name="sine"></a>
  19531. <h3 class="section">30.9 sine<span class="pull-right"><a class="anchor hidden-xs" href="#sine" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sine" aria-hidden="true">TOC</a></span></h3>
  19532. <p>Generate an audio signal made of a sine wave with amplitude 1/8.
  19533. </p>
  19534. <p>The audio signal is bit-exact.
  19535. </p>
  19536. <p>The filter accepts the following options:
  19537. </p>
  19538. <dl compact="compact">
  19539. <dt><samp>frequency, f</samp></dt>
  19540. <dd><p>Set the carrier frequency. Default is 440 Hz.
  19541. </p>
  19542. </dd>
  19543. <dt><samp>beep_factor, b</samp></dt>
  19544. <dd><p>Enable a periodic beep every second with frequency <var>beep_factor</var> times
  19545. the carrier frequency. Default is 0, meaning the beep is disabled.
  19546. </p>
  19547. </dd>
  19548. <dt><samp>sample_rate, r</samp></dt>
  19549. <dd><p>Specify the sample rate, default is 44100.
  19550. </p>
  19551. </dd>
  19552. <dt><samp>duration, d</samp></dt>
  19553. <dd><p>Specify the duration of the generated audio stream.
  19554. </p>
  19555. </dd>
  19556. <dt><samp>samples_per_frame</samp></dt>
  19557. <dd><p>Set the number of samples per output frame.
  19558. </p>
  19559. <p>The expression can contain the following constants:
  19560. </p>
  19561. <dl compact="compact">
  19562. <dt><samp>n</samp></dt>
  19563. <dd><p>The (sequential) number of the output audio frame, starting from 0.
  19564. </p>
  19565. </dd>
  19566. <dt><samp>pts</samp></dt>
  19567. <dd><p>The PTS (Presentation TimeStamp) of the output audio frame,
  19568. expressed in <var>TB</var> units.
  19569. </p>
  19570. </dd>
  19571. <dt><samp>t</samp></dt>
  19572. <dd><p>The PTS of the output audio frame, expressed in seconds.
  19573. </p>
  19574. </dd>
  19575. <dt><samp>TB</samp></dt>
  19576. <dd><p>The timebase of the output audio frames.
  19577. </p></dd>
  19578. </dl>
  19579. <p>Default is <code>1024</code>.
  19580. </p></dd>
  19581. </dl>
  19582. <a name="Examples-53"></a>
  19583. <h4 class="subsection">30.9.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-53" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-53" aria-hidden="true">TOC</a></span></h4>
  19584. <ul>
  19585. <li> Generate a simple 440 Hz sine wave:
  19586. <div class="example">
  19587. <pre class="example">sine
  19588. </pre></div>
  19589. </li><li> Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5 seconds:
  19590. <div class="example">
  19591. <pre class="example">sine=220:4:d=5
  19592. sine=f=220:b=4:d=5
  19593. sine=frequency=220:beep_factor=4:duration=5
  19594. </pre></div>
  19595. </li><li> Generate a 1 kHz sine wave following <code>1602,1601,1602,1601,1602</code> NTSC
  19596. pattern:
  19597. <div class="example">
  19598. <pre class="example">sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
  19599. </pre></div>
  19600. </li></ul>
  19601. <a name="Audio-Sinks"></a>
  19602. <h2 class="chapter">31 Audio Sinks<span class="pull-right"><a class="anchor hidden-xs" href="#Audio-Sinks" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Audio-Sinks" aria-hidden="true">TOC</a></span></h2>
  19603. <p>Below is a description of the currently available audio sinks.
  19604. </p>
  19605. <a name="abuffersink"></a>
  19606. <h3 class="section">31.1 abuffersink<span class="pull-right"><a class="anchor hidden-xs" href="#abuffersink" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-abuffersink" aria-hidden="true">TOC</a></span></h3>
  19607. <p>Buffer audio frames, and make them available to the end of filter chain.
  19608. </p>
  19609. <p>This sink is mainly intended for programmatic use, in particular
  19610. through the interface defined in <samp>libavfilter/buffersink.h</samp>
  19611. or the options system.
  19612. </p>
  19613. <p>It accepts a pointer to an AVABufferSinkContext structure, which
  19614. defines the incoming buffers&rsquo; formats, to be passed as the opaque
  19615. parameter to <code>avfilter_init_filter</code> for initialization.
  19616. </p><a name="anullsink"></a>
  19617. <h3 class="section">31.2 anullsink<span class="pull-right"><a class="anchor hidden-xs" href="#anullsink" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-anullsink" aria-hidden="true">TOC</a></span></h3>
  19618. <p>Null audio sink; do absolutely nothing with the input audio. It is
  19619. mainly useful as a template and for use in analysis / debugging
  19620. tools.
  19621. </p>
  19622. <a name="Video-Filters"></a>
  19623. <h2 class="chapter">32 Video Filters<span class="pull-right"><a class="anchor hidden-xs" href="#Video-Filters" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Video-Filters" aria-hidden="true">TOC</a></span></h2>
  19624. <p>When you configure your FFmpeg build, you can disable any of the
  19625. existing filters using <code>--disable-filters</code>.
  19626. The configure output will show the video filters included in your
  19627. build.
  19628. </p>
  19629. <p>Below is a description of the currently available video filters.
  19630. </p>
  19631. <a name="addroi"></a>
  19632. <h3 class="section">32.1 addroi<span class="pull-right"><a class="anchor hidden-xs" href="#addroi" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-addroi" aria-hidden="true">TOC</a></span></h3>
  19633. <p>Mark a region of interest in a video frame.
  19634. </p>
  19635. <p>The frame data is passed through unchanged, but metadata is attached
  19636. to the frame indicating regions of interest which can affect the
  19637. behaviour of later encoding. Multiple regions can be marked by
  19638. applying the filter multiple times.
  19639. </p>
  19640. <dl compact="compact">
  19641. <dt><samp>x</samp></dt>
  19642. <dd><p>Region distance in pixels from the left edge of the frame.
  19643. </p></dd>
  19644. <dt><samp>y</samp></dt>
  19645. <dd><p>Region distance in pixels from the top edge of the frame.
  19646. </p></dd>
  19647. <dt><samp>w</samp></dt>
  19648. <dd><p>Region width in pixels.
  19649. </p></dd>
  19650. <dt><samp>h</samp></dt>
  19651. <dd><p>Region height in pixels.
  19652. </p>
  19653. <p>The parameters <var>x</var>, <var>y</var>, <var>w</var> and <var>h</var> are expressions,
  19654. and may contain the following variables:
  19655. </p><dl compact="compact">
  19656. <dt><samp>iw</samp></dt>
  19657. <dd><p>Width of the input frame.
  19658. </p></dd>
  19659. <dt><samp>ih</samp></dt>
  19660. <dd><p>Height of the input frame.
  19661. </p></dd>
  19662. </dl>
  19663. </dd>
  19664. <dt><samp>qoffset</samp></dt>
  19665. <dd><p>Quantisation offset to apply within the region.
  19666. </p>
  19667. <p>This must be a real value in the range -1 to +1. A value of zero
  19668. indicates no quality change. A negative value asks for better quality
  19669. (less quantisation), while a positive value asks for worse quality
  19670. (greater quantisation).
  19671. </p>
  19672. <p>The range is calibrated so that the extreme values indicate the
  19673. largest possible offset - if the rest of the frame is encoded with the
  19674. worst possible quality, an offset of -1 indicates that this region
  19675. should be encoded with the best possible quality anyway. Intermediate
  19676. values are then interpolated in some codec-dependent way.
  19677. </p>
  19678. <p>For example, in 10-bit H.264 the quantisation parameter varies between
  19679. -12 and 51. A typical qoffset value of -1/10 therefore indicates that
  19680. this region should be encoded with a QP around one-tenth of the full
  19681. range better than the rest of the frame. So, if most of the frame
  19682. were to be encoded with a QP of around 30, this region would get a QP
  19683. of around 24 (an offset of approximately -1/10 * (51 - -12) = -6.3).
  19684. An extreme value of -1 would indicate that this region should be
  19685. encoded with the best possible quality regardless of the treatment of
  19686. the rest of the frame - that is, should be encoded at a QP of -12.
  19687. </p></dd>
  19688. <dt><samp>clear</samp></dt>
  19689. <dd><p>If set to true, remove any existing regions of interest marked on the
  19690. frame before adding the new one.
  19691. </p></dd>
  19692. </dl>
  19693. <a name="Examples-54"></a>
  19694. <h4 class="subsection">32.1.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-54" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-54" aria-hidden="true">TOC</a></span></h4>
  19695. <ul>
  19696. <li> Mark the centre quarter of the frame as interesting.
  19697. <div class="example">
  19698. <pre class="example">addroi=iw/4:ih/4:iw/2:ih/2:-1/10
  19699. </pre></div>
  19700. </li><li> Mark the 100-pixel-wide region on the left edge of the frame as very
  19701. uninteresting (to be encoded at much lower quality than the rest of
  19702. the frame).
  19703. <div class="example">
  19704. <pre class="example">addroi=0:0:100:ih:+1/5
  19705. </pre></div>
  19706. </li></ul>
  19707. <a name="alphaextract"></a>
  19708. <h3 class="section">32.2 alphaextract<span class="pull-right"><a class="anchor hidden-xs" href="#alphaextract" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alphaextract" aria-hidden="true">TOC</a></span></h3>
  19709. <p>Extract the alpha component from the input as a grayscale video. This
  19710. is especially useful with the <var>alphamerge</var> filter.
  19711. </p>
  19712. <a name="alphamerge"></a>
  19713. <h3 class="section">32.3 alphamerge<span class="pull-right"><a class="anchor hidden-xs" href="#alphamerge" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-alphamerge" aria-hidden="true">TOC</a></span></h3>
  19714. <p>Add or replace the alpha component of the primary input with the
  19715. grayscale value of a second input. This is intended for use with
  19716. <var>alphaextract</var> to allow the transmission or storage of frame
  19717. sequences that have alpha in a format that doesn&rsquo;t support an alpha
  19718. channel.
  19719. </p>
  19720. <p>For example, to reconstruct full frames from a normal YUV-encoded video
  19721. and a separate video created with <var>alphaextract</var>, you might use:
  19722. </p><div class="example">
  19723. <pre class="example">movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
  19724. </pre></div>
  19725. <a name="amplify"></a>
  19726. <h3 class="section">32.4 amplify<span class="pull-right"><a class="anchor hidden-xs" href="#amplify" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-amplify" aria-hidden="true">TOC</a></span></h3>
  19727. <p>Amplify differences between current pixel and pixels of adjacent frames in
  19728. same pixel location.
  19729. </p>
  19730. <p>This filter accepts the following options:
  19731. </p>
  19732. <dl compact="compact">
  19733. <dt><samp>radius</samp></dt>
  19734. <dd><p>Set frame radius. Default is 2. Allowed range is from 1 to 63.
  19735. For example radius of 3 will instruct filter to calculate average of 7 frames.
  19736. </p>
  19737. </dd>
  19738. <dt><samp>factor</samp></dt>
  19739. <dd><p>Set factor to amplify difference. Default is 2. Allowed range is from 0 to 65535.
  19740. </p>
  19741. </dd>
  19742. <dt><samp>threshold</samp></dt>
  19743. <dd><p>Set threshold for difference amplification. Any difference greater or equal to
  19744. this value will not alter source pixel. Default is 10.
  19745. Allowed range is from 0 to 65535.
  19746. </p>
  19747. </dd>
  19748. <dt><samp>tolerance</samp></dt>
  19749. <dd><p>Set tolerance for difference amplification. Any difference lower to
  19750. this value will not alter source pixel. Default is 0.
  19751. Allowed range is from 0 to 65535.
  19752. </p>
  19753. </dd>
  19754. <dt><samp>low</samp></dt>
  19755. <dd><p>Set lower limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535.
  19756. This option controls maximum possible value that will decrease source pixel value.
  19757. </p>
  19758. </dd>
  19759. <dt><samp>high</samp></dt>
  19760. <dd><p>Set high limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535.
  19761. This option controls maximum possible value that will increase source pixel value.
  19762. </p>
  19763. </dd>
  19764. <dt><samp>planes</samp></dt>
  19765. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  19766. </p></dd>
  19767. </dl>
  19768. <a name="Commands-43"></a>
  19769. <h4 class="subsection">32.4.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-43" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-43" aria-hidden="true">TOC</a></span></h4>
  19770. <p>This filter supports the following <a href="#commands">commands</a> that corresponds to option of same name:
  19771. </p><dl compact="compact">
  19772. <dt><samp>factor</samp></dt>
  19773. <dt><samp>threshold</samp></dt>
  19774. <dt><samp>tolerance</samp></dt>
  19775. <dt><samp>low</samp></dt>
  19776. <dt><samp>high</samp></dt>
  19777. <dt><samp>planes</samp></dt>
  19778. </dl>
  19779. <a name="ass"></a>
  19780. <h3 class="section">32.5 ass<span class="pull-right"><a class="anchor hidden-xs" href="#ass" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ass" aria-hidden="true">TOC</a></span></h3>
  19781. <p>Same as the <a href="#subtitles">subtitles</a> filter, except that it doesn&rsquo;t require libavcodec
  19782. and libavformat to work. On the other hand, it is limited to ASS (Advanced
  19783. Substation Alpha) subtitles files.
  19784. </p>
  19785. <p>This filter accepts the following option in addition to the common options from
  19786. the <a href="#subtitles">subtitles</a> filter:
  19787. </p>
  19788. <dl compact="compact">
  19789. <dt><samp>shaping</samp></dt>
  19790. <dd><p>Set the shaping engine
  19791. </p>
  19792. <p>Available values are:
  19793. </p><dl compact="compact">
  19794. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  19795. <dd><p>The default libass shaping engine, which is the best available.
  19796. </p></dd>
  19797. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  19798. <dd><p>Fast, font-agnostic shaper that can do only substitutions
  19799. </p></dd>
  19800. <dt>&lsquo;<samp>complex</samp>&rsquo;</dt>
  19801. <dd><p>Slower shaper using OpenType for substitutions and positioning
  19802. </p></dd>
  19803. </dl>
  19804. <p>The default is <code>auto</code>.
  19805. </p></dd>
  19806. </dl>
  19807. <a name="atadenoise"></a>
  19808. <h3 class="section">32.6 atadenoise<span class="pull-right"><a class="anchor hidden-xs" href="#atadenoise" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-atadenoise" aria-hidden="true">TOC</a></span></h3>
  19809. <p>Apply an Adaptive Temporal Averaging Denoiser to the video input.
  19810. </p>
  19811. <p>The filter accepts the following options:
  19812. </p>
  19813. <dl compact="compact">
  19814. <dt><samp>0a</samp></dt>
  19815. <dd><p>Set threshold A for 1st plane. Default is 0.02.
  19816. Valid range is 0 to 0.3.
  19817. </p>
  19818. </dd>
  19819. <dt><samp>0b</samp></dt>
  19820. <dd><p>Set threshold B for 1st plane. Default is 0.04.
  19821. Valid range is 0 to 5.
  19822. </p>
  19823. </dd>
  19824. <dt><samp>1a</samp></dt>
  19825. <dd><p>Set threshold A for 2nd plane. Default is 0.02.
  19826. Valid range is 0 to 0.3.
  19827. </p>
  19828. </dd>
  19829. <dt><samp>1b</samp></dt>
  19830. <dd><p>Set threshold B for 2nd plane. Default is 0.04.
  19831. Valid range is 0 to 5.
  19832. </p>
  19833. </dd>
  19834. <dt><samp>2a</samp></dt>
  19835. <dd><p>Set threshold A for 3rd plane. Default is 0.02.
  19836. Valid range is 0 to 0.3.
  19837. </p>
  19838. </dd>
  19839. <dt><samp>2b</samp></dt>
  19840. <dd><p>Set threshold B for 3rd plane. Default is 0.04.
  19841. Valid range is 0 to 5.
  19842. </p>
  19843. <p>Threshold A is designed to react on abrupt changes in the input signal and
  19844. threshold B is designed to react on continuous changes in the input signal.
  19845. </p>
  19846. </dd>
  19847. <dt><samp>s</samp></dt>
  19848. <dd><p>Set number of frames filter will use for averaging. Default is 9. Must be odd
  19849. number in range [5, 129].
  19850. </p>
  19851. </dd>
  19852. <dt><samp>p</samp></dt>
  19853. <dd><p>Set what planes of frame filter will use for averaging. Default is all.
  19854. </p>
  19855. </dd>
  19856. <dt><samp>a</samp></dt>
  19857. <dd><p>Set what variant of algorithm filter will use for averaging. Default is <code>p</code> parallel.
  19858. Alternatively can be set to <code>s</code> serial.
  19859. </p>
  19860. <p>Parallel can be faster then serial, while other way around is never true.
  19861. Parallel will abort early on first change being greater then thresholds, while serial
  19862. will continue processing other side of frames if they are equal or below thresholds.
  19863. </p>
  19864. </dd>
  19865. <dt><samp>0s</samp></dt>
  19866. <dt><samp>1s</samp></dt>
  19867. <dt><samp>2s</samp></dt>
  19868. <dd><p>Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
  19869. Valid range is from 0 to 32767.
  19870. This options controls weight for each pixel in radius defined by size.
  19871. Default value means every pixel have same weight.
  19872. Setting this option to 0 effectively disables filtering.
  19873. </p></dd>
  19874. </dl>
  19875. <a name="Commands-44"></a>
  19876. <h4 class="subsection">32.6.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-44" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-44" aria-hidden="true">TOC</a></span></h4>
  19877. <p>This filter supports same <a href="#commands">commands</a> as options except option <code>s</code>.
  19878. The command accepts the same syntax of the corresponding option.
  19879. </p>
  19880. <a name="avgblur"></a>
  19881. <h3 class="section">32.7 avgblur<span class="pull-right"><a class="anchor hidden-xs" href="#avgblur" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-avgblur" aria-hidden="true">TOC</a></span></h3>
  19882. <p>Apply average blur filter.
  19883. </p>
  19884. <p>The filter accepts the following options:
  19885. </p>
  19886. <dl compact="compact">
  19887. <dt><samp>sizeX</samp></dt>
  19888. <dd><p>Set horizontal radius size.
  19889. </p>
  19890. </dd>
  19891. <dt><samp>planes</samp></dt>
  19892. <dd><p>Set which planes to filter. By default all planes are filtered.
  19893. </p>
  19894. </dd>
  19895. <dt><samp>sizeY</samp></dt>
  19896. <dd><p>Set vertical radius size, if zero it will be same as <code>sizeX</code>.
  19897. Default is <code>0</code>.
  19898. </p></dd>
  19899. </dl>
  19900. <a name="Commands-45"></a>
  19901. <h4 class="subsection">32.7.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-45" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-45" aria-hidden="true">TOC</a></span></h4>
  19902. <p>This filter supports same commands as options.
  19903. The command accepts the same syntax of the corresponding option.
  19904. </p>
  19905. <p>If the specified expression is not valid, it is kept at its current
  19906. value.
  19907. </p>
  19908. <a name="bbox"></a>
  19909. <h3 class="section">32.8 bbox<span class="pull-right"><a class="anchor hidden-xs" href="#bbox" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bbox" aria-hidden="true">TOC</a></span></h3>
  19910. <p>Compute the bounding box for the non-black pixels in the input frame
  19911. luminance plane.
  19912. </p>
  19913. <p>This filter computes the bounding box containing all the pixels with a
  19914. luminance value greater than the minimum allowed value.
  19915. The parameters describing the bounding box are printed on the filter
  19916. log.
  19917. </p>
  19918. <p>The filter accepts the following option:
  19919. </p>
  19920. <dl compact="compact">
  19921. <dt><samp>min_val</samp></dt>
  19922. <dd><p>Set the minimal luminance value. Default is <code>16</code>.
  19923. </p></dd>
  19924. </dl>
  19925. <a name="Commands-46"></a>
  19926. <h4 class="subsection">32.8.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-46" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-46" aria-hidden="true">TOC</a></span></h4>
  19927. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  19928. </p>
  19929. <a name="bilateral"></a>
  19930. <h3 class="section">32.9 bilateral<span class="pull-right"><a class="anchor hidden-xs" href="#bilateral" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bilateral" aria-hidden="true">TOC</a></span></h3>
  19931. <p>Apply bilateral filter, spatial smoothing while preserving edges.
  19932. </p>
  19933. <p>The filter accepts the following options:
  19934. </p><dl compact="compact">
  19935. <dt><samp>sigmaS</samp></dt>
  19936. <dd><p>Set sigma of gaussian function to calculate spatial weight.
  19937. Allowed range is 0 to 512. Default is 0.1.
  19938. </p>
  19939. </dd>
  19940. <dt><samp>sigmaR</samp></dt>
  19941. <dd><p>Set sigma of gaussian function to calculate range weight.
  19942. Allowed range is 0 to 1. Default is 0.1.
  19943. </p>
  19944. </dd>
  19945. <dt><samp>planes</samp></dt>
  19946. <dd><p>Set planes to filter. Default is first only.
  19947. </p></dd>
  19948. </dl>
  19949. <a name="Commands-47"></a>
  19950. <h4 class="subsection">32.9.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-47" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-47" aria-hidden="true">TOC</a></span></h4>
  19951. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  19952. </p>
  19953. <a name="bitplanenoise"></a>
  19954. <h3 class="section">32.10 bitplanenoise<span class="pull-right"><a class="anchor hidden-xs" href="#bitplanenoise" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bitplanenoise" aria-hidden="true">TOC</a></span></h3>
  19955. <p>Show and measure bit plane noise.
  19956. </p>
  19957. <p>The filter accepts the following options:
  19958. </p>
  19959. <dl compact="compact">
  19960. <dt><samp>bitplane</samp></dt>
  19961. <dd><p>Set which plane to analyze. Default is <code>1</code>.
  19962. </p>
  19963. </dd>
  19964. <dt><samp>filter</samp></dt>
  19965. <dd><p>Filter out noisy pixels from <code>bitplane</code> set above.
  19966. Default is disabled.
  19967. </p></dd>
  19968. </dl>
  19969. <a name="blackdetect"></a>
  19970. <h3 class="section">32.11 blackdetect<span class="pull-right"><a class="anchor hidden-xs" href="#blackdetect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-blackdetect" aria-hidden="true">TOC</a></span></h3>
  19971. <p>Detect video intervals that are (almost) completely black. Can be
  19972. useful to detect chapter transitions, commercials, or invalid
  19973. recordings.
  19974. </p>
  19975. <p>The filter outputs its detection analysis to both the log as well as
  19976. frame metadata. If a black segment of at least the specified minimum
  19977. duration is found, a line with the start and end timestamps as well
  19978. as duration is printed to the log with level <code>info</code>. In addition,
  19979. a log line with level <code>debug</code> is printed per frame showing the
  19980. black amount detected for that frame.
  19981. </p>
  19982. <p>The filter also attaches metadata to the first frame of a black
  19983. segment with key <code>lavfi.black_start</code> and to the first frame
  19984. after the black segment ends with key <code>lavfi.black_end</code>. The
  19985. value is the frame&rsquo;s timestamp. This metadata is added regardless
  19986. of the minimum duration specified.
  19987. </p>
  19988. <p>The filter accepts the following options:
  19989. </p>
  19990. <dl compact="compact">
  19991. <dt><samp>black_min_duration, d</samp></dt>
  19992. <dd><p>Set the minimum detected black duration expressed in seconds. It must
  19993. be a non-negative floating point number.
  19994. </p>
  19995. <p>Default value is 2.0.
  19996. </p>
  19997. </dd>
  19998. <dt><samp>picture_black_ratio_th, pic_th</samp></dt>
  19999. <dd><p>Set the threshold for considering a picture &quot;black&quot;.
  20000. Express the minimum value for the ratio:
  20001. </p><div class="example">
  20002. <pre class="example"><var>nb_black_pixels</var> / <var>nb_pixels</var>
  20003. </pre></div>
  20004. <p>for which a picture is considered black.
  20005. Default value is 0.98.
  20006. </p>
  20007. </dd>
  20008. <dt><samp>pixel_black_th, pix_th</samp></dt>
  20009. <dd><p>Set the threshold for considering a pixel &quot;black&quot;.
  20010. </p>
  20011. <p>The threshold expresses the maximum pixel luminance value for which a
  20012. pixel is considered &quot;black&quot;. The provided value is scaled according to
  20013. the following equation:
  20014. </p><div class="example">
  20015. <pre class="example"><var>absolute_threshold</var> = <var>luminance_minimum_value</var> + <var>pixel_black_th</var> * <var>luminance_range_size</var>
  20016. </pre></div>
  20017. <p><var>luminance_range_size</var> and <var>luminance_minimum_value</var> depend on
  20018. the input video format, the range is [0-255] for YUV full-range
  20019. formats and [16-235] for YUV non full-range formats.
  20020. </p>
  20021. <p>Default value is 0.10.
  20022. </p></dd>
  20023. </dl>
  20024. <p>The following example sets the maximum pixel threshold to the minimum
  20025. value, and detects only black intervals of 2 or more seconds:
  20026. </p><div class="example">
  20027. <pre class="example">blackdetect=d=2:pix_th=0.00
  20028. </pre></div>
  20029. <a name="blackframe"></a>
  20030. <h3 class="section">32.12 blackframe<span class="pull-right"><a class="anchor hidden-xs" href="#blackframe" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-blackframe" aria-hidden="true">TOC</a></span></h3>
  20031. <p>Detect frames that are (almost) completely black. Can be useful to
  20032. detect chapter transitions or commercials. Output lines consist of
  20033. the frame number of the detected frame, the percentage of blackness,
  20034. the position in the file if known or -1 and the timestamp in seconds.
  20035. </p>
  20036. <p>In order to display the output lines, you need to set the loglevel at
  20037. least to the AV_LOG_INFO value.
  20038. </p>
  20039. <p>This filter exports frame metadata <code>lavfi.blackframe.pblack</code>.
  20040. The value represents the percentage of pixels in the picture that
  20041. are below the threshold value.
  20042. </p>
  20043. <p>It accepts the following parameters:
  20044. </p>
  20045. <dl compact="compact">
  20046. <dt><samp>amount</samp></dt>
  20047. <dd><p>The percentage of the pixels that have to be below the threshold; it defaults to
  20048. <code>98</code>.
  20049. </p>
  20050. </dd>
  20051. <dt><samp>threshold, thresh</samp></dt>
  20052. <dd><p>The threshold below which a pixel value is considered black; it defaults to
  20053. <code>32</code>.
  20054. </p>
  20055. </dd>
  20056. </dl>
  20057. <span id="blend"></span><a name="blend-1"></a>
  20058. <h3 class="section">32.13 blend<span class="pull-right"><a class="anchor hidden-xs" href="#blend-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-blend-1" aria-hidden="true">TOC</a></span></h3>
  20059. <p>Blend two video frames into each other.
  20060. </p>
  20061. <p>The <code>blend</code> filter takes two input streams and outputs one
  20062. stream, the first input is the &quot;top&quot; layer and second input is
  20063. &quot;bottom&quot; layer. By default, the output terminates when the longest input terminates.
  20064. </p>
  20065. <p>The <code>tblend</code> (time blend) filter takes two consecutive frames
  20066. from one single stream, and outputs the result obtained by blending
  20067. the new frame on top of the old frame.
  20068. </p>
  20069. <p>A description of the accepted options follows.
  20070. </p>
  20071. <dl compact="compact">
  20072. <dt><samp>c0_mode</samp></dt>
  20073. <dt><samp>c1_mode</samp></dt>
  20074. <dt><samp>c2_mode</samp></dt>
  20075. <dt><samp>c3_mode</samp></dt>
  20076. <dt><samp>all_mode</samp></dt>
  20077. <dd><p>Set blend mode for specific pixel component or all pixel components in case
  20078. of <var>all_mode</var>. Default value is <code>normal</code>.
  20079. </p>
  20080. <p>Available values for component modes are:
  20081. </p><dl compact="compact">
  20082. <dt>&lsquo;<samp>addition</samp>&rsquo;</dt>
  20083. <dt>&lsquo;<samp>grainmerge</samp>&rsquo;</dt>
  20084. <dt>&lsquo;<samp>and</samp>&rsquo;</dt>
  20085. <dt>&lsquo;<samp>average</samp>&rsquo;</dt>
  20086. <dt>&lsquo;<samp>burn</samp>&rsquo;</dt>
  20087. <dt>&lsquo;<samp>darken</samp>&rsquo;</dt>
  20088. <dt>&lsquo;<samp>difference</samp>&rsquo;</dt>
  20089. <dt>&lsquo;<samp>grainextract</samp>&rsquo;</dt>
  20090. <dt>&lsquo;<samp>divide</samp>&rsquo;</dt>
  20091. <dt>&lsquo;<samp>dodge</samp>&rsquo;</dt>
  20092. <dt>&lsquo;<samp>freeze</samp>&rsquo;</dt>
  20093. <dt>&lsquo;<samp>exclusion</samp>&rsquo;</dt>
  20094. <dt>&lsquo;<samp>extremity</samp>&rsquo;</dt>
  20095. <dt>&lsquo;<samp>glow</samp>&rsquo;</dt>
  20096. <dt>&lsquo;<samp>hardlight</samp>&rsquo;</dt>
  20097. <dt>&lsquo;<samp>hardmix</samp>&rsquo;</dt>
  20098. <dt>&lsquo;<samp>heat</samp>&rsquo;</dt>
  20099. <dt>&lsquo;<samp>lighten</samp>&rsquo;</dt>
  20100. <dt>&lsquo;<samp>linearlight</samp>&rsquo;</dt>
  20101. <dt>&lsquo;<samp>multiply</samp>&rsquo;</dt>
  20102. <dt>&lsquo;<samp>multiply128</samp>&rsquo;</dt>
  20103. <dt>&lsquo;<samp>negation</samp>&rsquo;</dt>
  20104. <dt>&lsquo;<samp>normal</samp>&rsquo;</dt>
  20105. <dt>&lsquo;<samp>or</samp>&rsquo;</dt>
  20106. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  20107. <dt>&lsquo;<samp>phoenix</samp>&rsquo;</dt>
  20108. <dt>&lsquo;<samp>pinlight</samp>&rsquo;</dt>
  20109. <dt>&lsquo;<samp>reflect</samp>&rsquo;</dt>
  20110. <dt>&lsquo;<samp>screen</samp>&rsquo;</dt>
  20111. <dt>&lsquo;<samp>softlight</samp>&rsquo;</dt>
  20112. <dt>&lsquo;<samp>subtract</samp>&rsquo;</dt>
  20113. <dt>&lsquo;<samp>vividlight</samp>&rsquo;</dt>
  20114. <dt>&lsquo;<samp>xor</samp>&rsquo;</dt>
  20115. </dl>
  20116. </dd>
  20117. <dt><samp>c0_opacity</samp></dt>
  20118. <dt><samp>c1_opacity</samp></dt>
  20119. <dt><samp>c2_opacity</samp></dt>
  20120. <dt><samp>c3_opacity</samp></dt>
  20121. <dt><samp>all_opacity</samp></dt>
  20122. <dd><p>Set blend opacity for specific pixel component or all pixel components in case
  20123. of <var>all_opacity</var>. Only used in combination with pixel component blend modes.
  20124. </p>
  20125. </dd>
  20126. <dt><samp>c0_expr</samp></dt>
  20127. <dt><samp>c1_expr</samp></dt>
  20128. <dt><samp>c2_expr</samp></dt>
  20129. <dt><samp>c3_expr</samp></dt>
  20130. <dt><samp>all_expr</samp></dt>
  20131. <dd><p>Set blend expression for specific pixel component or all pixel components in case
  20132. of <var>all_expr</var>. Note that related mode options will be ignored if those are set.
  20133. </p>
  20134. <p>The expressions can use the following variables:
  20135. </p>
  20136. <dl compact="compact">
  20137. <dt><samp>N</samp></dt>
  20138. <dd><p>The sequential number of the filtered frame, starting from <code>0</code>.
  20139. </p>
  20140. </dd>
  20141. <dt><samp>X</samp></dt>
  20142. <dt><samp>Y</samp></dt>
  20143. <dd><p>the coordinates of the current sample
  20144. </p>
  20145. </dd>
  20146. <dt><samp>W</samp></dt>
  20147. <dt><samp>H</samp></dt>
  20148. <dd><p>the width and height of currently filtered plane
  20149. </p>
  20150. </dd>
  20151. <dt><samp>SW</samp></dt>
  20152. <dt><samp>SH</samp></dt>
  20153. <dd><p>Width and height scale for the plane being filtered. It is the
  20154. ratio between the dimensions of the current plane to the luma plane,
  20155. e.g. for a <code>yuv420p</code> frame, the values are <code>1,1</code> for
  20156. the luma plane and <code>0.5,0.5</code> for the chroma planes.
  20157. </p>
  20158. </dd>
  20159. <dt><samp>T</samp></dt>
  20160. <dd><p>Time of the current frame, expressed in seconds.
  20161. </p>
  20162. </dd>
  20163. <dt><samp>TOP, A</samp></dt>
  20164. <dd><p>Value of pixel component at current location for first video frame (top layer).
  20165. </p>
  20166. </dd>
  20167. <dt><samp>BOTTOM, B</samp></dt>
  20168. <dd><p>Value of pixel component at current location for second video frame (bottom layer).
  20169. </p></dd>
  20170. </dl>
  20171. </dd>
  20172. </dl>
  20173. <p>The <code>blend</code> filter also supports the <a href="#framesync">framesync</a> options.
  20174. </p>
  20175. <a name="Examples-55"></a>
  20176. <h4 class="subsection">32.13.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-55" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-55" aria-hidden="true">TOC</a></span></h4>
  20177. <ul>
  20178. <li> Apply transition from bottom layer to top layer in first 10 seconds:
  20179. <div class="example">
  20180. <pre class="example">blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))'
  20181. </pre></div>
  20182. </li><li> Apply linear horizontal transition from top layer to bottom layer:
  20183. <div class="example">
  20184. <pre class="example">blend=all_expr='A*(X/W)+B*(1-X/W)'
  20185. </pre></div>
  20186. </li><li> Apply 1x1 checkerboard effect:
  20187. <div class="example">
  20188. <pre class="example">blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)'
  20189. </pre></div>
  20190. </li><li> Apply uncover left effect:
  20191. <div class="example">
  20192. <pre class="example">blend=all_expr='if(gte(N*SW+X,W),A,B)'
  20193. </pre></div>
  20194. </li><li> Apply uncover down effect:
  20195. <div class="example">
  20196. <pre class="example">blend=all_expr='if(gte(Y-N*SH,0),A,B)'
  20197. </pre></div>
  20198. </li><li> Apply uncover up-left effect:
  20199. <div class="example">
  20200. <pre class="example">blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
  20201. </pre></div>
  20202. </li><li> Split diagonally video and shows top and bottom layer on each side:
  20203. <div class="example">
  20204. <pre class="example">blend=all_expr='if(gt(X,Y*(W/H)),A,B)'
  20205. </pre></div>
  20206. </li><li> Display differences between the current and the previous frame:
  20207. <div class="example">
  20208. <pre class="example">tblend=all_mode=grainextract
  20209. </pre></div>
  20210. </li></ul>
  20211. <a name="Commands-48"></a>
  20212. <h4 class="subsection">32.13.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-48" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-48" aria-hidden="true">TOC</a></span></h4>
  20213. <p>This filter supports same <a href="#commands">commands</a> as options.
  20214. </p>
  20215. <a name="bm3d"></a>
  20216. <h3 class="section">32.14 bm3d<span class="pull-right"><a class="anchor hidden-xs" href="#bm3d" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bm3d" aria-hidden="true">TOC</a></span></h3>
  20217. <p>Denoise frames using Block-Matching 3D algorithm.
  20218. </p>
  20219. <p>The filter accepts the following options.
  20220. </p>
  20221. <dl compact="compact">
  20222. <dt><samp>sigma</samp></dt>
  20223. <dd><p>Set denoising strength. Default value is 1.
  20224. Allowed range is from 0 to 999.9.
  20225. The denoising algorithm is very sensitive to sigma, so adjust it
  20226. according to the source.
  20227. </p>
  20228. </dd>
  20229. <dt><samp>block</samp></dt>
  20230. <dd><p>Set local patch size. This sets dimensions in 2D.
  20231. </p>
  20232. </dd>
  20233. <dt><samp>bstep</samp></dt>
  20234. <dd><p>Set sliding step for processing blocks. Default value is 4.
  20235. Allowed range is from 1 to 64.
  20236. Smaller values allows processing more reference blocks and is slower.
  20237. </p>
  20238. </dd>
  20239. <dt><samp>group</samp></dt>
  20240. <dd><p>Set maximal number of similar blocks for 3rd dimension. Default value is 1.
  20241. When set to 1, no block matching is done. Larger values allows more blocks
  20242. in single group.
  20243. Allowed range is from 1 to 256.
  20244. </p>
  20245. </dd>
  20246. <dt><samp>range</samp></dt>
  20247. <dd><p>Set radius for search block matching. Default is 9.
  20248. Allowed range is from 1 to INT32_MAX.
  20249. </p>
  20250. </dd>
  20251. <dt><samp>mstep</samp></dt>
  20252. <dd><p>Set step between two search locations for block matching. Default is 1.
  20253. Allowed range is from 1 to 64. Smaller is slower.
  20254. </p>
  20255. </dd>
  20256. <dt><samp>thmse</samp></dt>
  20257. <dd><p>Set threshold of mean square error for block matching. Valid range is 0 to
  20258. INT32_MAX.
  20259. </p>
  20260. </dd>
  20261. <dt><samp>hdthr</samp></dt>
  20262. <dd><p>Set thresholding parameter for hard thresholding in 3D transformed domain.
  20263. Larger values results in stronger hard-thresholding filtering in frequency
  20264. domain.
  20265. </p>
  20266. </dd>
  20267. <dt><samp>estim</samp></dt>
  20268. <dd><p>Set filtering estimation mode. Can be <code>basic</code> or <code>final</code>.
  20269. Default is <code>basic</code>.
  20270. </p>
  20271. </dd>
  20272. <dt><samp>ref</samp></dt>
  20273. <dd><p>If enabled, filter will use 2nd stream for block matching.
  20274. Default is disabled for <code>basic</code> value of <var>estim</var> option,
  20275. and always enabled if value of <var>estim</var> is <code>final</code>.
  20276. </p>
  20277. </dd>
  20278. <dt><samp>planes</samp></dt>
  20279. <dd><p>Set planes to filter. Default is all available except alpha.
  20280. </p></dd>
  20281. </dl>
  20282. <a name="Examples-56"></a>
  20283. <h4 class="subsection">32.14.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-56" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-56" aria-hidden="true">TOC</a></span></h4>
  20284. <ul>
  20285. <li> Basic filtering with bm3d:
  20286. <div class="example">
  20287. <pre class="example">bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic
  20288. </pre></div>
  20289. </li><li> Same as above, but filtering only luma:
  20290. <div class="example">
  20291. <pre class="example">bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1
  20292. </pre></div>
  20293. </li><li> Same as above, but with both estimation modes:
  20294. <div class="example">
  20295. <pre class="example">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
  20296. </pre></div>
  20297. </li><li> Same as above, but prefilter with <a href="#nlmeans">nlmeans</a> filter instead:
  20298. <div class="example">
  20299. <pre class="example">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
  20300. </pre></div>
  20301. </li></ul>
  20302. <a name="boxblur"></a>
  20303. <h3 class="section">32.15 boxblur<span class="pull-right"><a class="anchor hidden-xs" href="#boxblur" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-boxblur" aria-hidden="true">TOC</a></span></h3>
  20304. <p>Apply a boxblur algorithm to the input video.
  20305. </p>
  20306. <p>It accepts the following parameters:
  20307. </p>
  20308. <dl compact="compact">
  20309. <dt><samp>luma_radius, lr</samp></dt>
  20310. <dt><samp>luma_power, lp</samp></dt>
  20311. <dt><samp>chroma_radius, cr</samp></dt>
  20312. <dt><samp>chroma_power, cp</samp></dt>
  20313. <dt><samp>alpha_radius, ar</samp></dt>
  20314. <dt><samp>alpha_power, ap</samp></dt>
  20315. </dl>
  20316. <p>A description of the accepted options follows.
  20317. </p>
  20318. <dl compact="compact">
  20319. <dt><samp>luma_radius, lr</samp></dt>
  20320. <dt><samp>chroma_radius, cr</samp></dt>
  20321. <dt><samp>alpha_radius, ar</samp></dt>
  20322. <dd><p>Set an expression for the box radius in pixels used for blurring the
  20323. corresponding input plane.
  20324. </p>
  20325. <p>The radius value must be a non-negative number, and must not be
  20326. greater than the value of the expression <code>min(w,h)/2</code> for the
  20327. luma and alpha planes, and of <code>min(cw,ch)/2</code> for the chroma
  20328. planes.
  20329. </p>
  20330. <p>Default value for <samp>luma_radius</samp> is &quot;2&quot;. If not specified,
  20331. <samp>chroma_radius</samp> and <samp>alpha_radius</samp> default to the
  20332. corresponding value set for <samp>luma_radius</samp>.
  20333. </p>
  20334. <p>The expressions can contain the following constants:
  20335. </p><dl compact="compact">
  20336. <dt><samp>w</samp></dt>
  20337. <dt><samp>h</samp></dt>
  20338. <dd><p>The input width and height in pixels.
  20339. </p>
  20340. </dd>
  20341. <dt><samp>cw</samp></dt>
  20342. <dt><samp>ch</samp></dt>
  20343. <dd><p>The input chroma image width and height in pixels.
  20344. </p>
  20345. </dd>
  20346. <dt><samp>hsub</samp></dt>
  20347. <dt><samp>vsub</samp></dt>
  20348. <dd><p>The horizontal and vertical chroma subsample values. For example, for the
  20349. pixel format &quot;yuv422p&quot;, <var>hsub</var> is 2 and <var>vsub</var> is 1.
  20350. </p></dd>
  20351. </dl>
  20352. </dd>
  20353. <dt><samp>luma_power, lp</samp></dt>
  20354. <dt><samp>chroma_power, cp</samp></dt>
  20355. <dt><samp>alpha_power, ap</samp></dt>
  20356. <dd><p>Specify how many times the boxblur filter is applied to the
  20357. corresponding plane.
  20358. </p>
  20359. <p>Default value for <samp>luma_power</samp> is 2. If not specified,
  20360. <samp>chroma_power</samp> and <samp>alpha_power</samp> default to the
  20361. corresponding value set for <samp>luma_power</samp>.
  20362. </p>
  20363. <p>A value of 0 will disable the effect.
  20364. </p></dd>
  20365. </dl>
  20366. <a name="Examples-57"></a>
  20367. <h4 class="subsection">32.15.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-57" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-57" aria-hidden="true">TOC</a></span></h4>
  20368. <ul>
  20369. <li> Apply a boxblur filter with the luma, chroma, and alpha radii
  20370. set to 2:
  20371. <div class="example">
  20372. <pre class="example">boxblur=luma_radius=2:luma_power=1
  20373. boxblur=2:1
  20374. </pre></div>
  20375. </li><li> Set the luma radius to 2, and alpha and chroma radius to 0:
  20376. <div class="example">
  20377. <pre class="example">boxblur=2:1:cr=0:ar=0
  20378. </pre></div>
  20379. </li><li> Set the luma and chroma radii to a fraction of the video dimension:
  20380. <div class="example">
  20381. <pre class="example">boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1
  20382. </pre></div>
  20383. </li></ul>
  20384. <a name="bwdif"></a>
  20385. <h3 class="section">32.16 bwdif<span class="pull-right"><a class="anchor hidden-xs" href="#bwdif" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bwdif" aria-hidden="true">TOC</a></span></h3>
  20386. <p>Deinterlace the input video (&quot;bwdif&quot; stands for &quot;Bob Weaver
  20387. Deinterlacing Filter&quot;).
  20388. </p>
  20389. <p>Motion adaptive deinterlacing based on yadif with the use of w3fdif and cubic
  20390. interpolation algorithms.
  20391. It accepts the following parameters:
  20392. </p>
  20393. <dl compact="compact">
  20394. <dt><samp>mode</samp></dt>
  20395. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  20396. </p>
  20397. <dl compact="compact">
  20398. <dt><samp>0, send_frame</samp></dt>
  20399. <dd><p>Output one frame for each frame.
  20400. </p></dd>
  20401. <dt><samp>1, send_field</samp></dt>
  20402. <dd><p>Output one frame for each field.
  20403. </p></dd>
  20404. </dl>
  20405. <p>The default value is <code>send_field</code>.
  20406. </p>
  20407. </dd>
  20408. <dt><samp>parity</samp></dt>
  20409. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  20410. of the following values:
  20411. </p>
  20412. <dl compact="compact">
  20413. <dt><samp>0, tff</samp></dt>
  20414. <dd><p>Assume the top field is first.
  20415. </p></dd>
  20416. <dt><samp>1, bff</samp></dt>
  20417. <dd><p>Assume the bottom field is first.
  20418. </p></dd>
  20419. <dt><samp>-1, auto</samp></dt>
  20420. <dd><p>Enable automatic detection of field parity.
  20421. </p></dd>
  20422. </dl>
  20423. <p>The default value is <code>auto</code>.
  20424. If the interlacing is unknown or the decoder does not export this information,
  20425. top field first will be assumed.
  20426. </p>
  20427. </dd>
  20428. <dt><samp>deint</samp></dt>
  20429. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  20430. values:
  20431. </p>
  20432. <dl compact="compact">
  20433. <dt><samp>0, all</samp></dt>
  20434. <dd><p>Deinterlace all frames.
  20435. </p></dd>
  20436. <dt><samp>1, interlaced</samp></dt>
  20437. <dd><p>Only deinterlace frames marked as interlaced.
  20438. </p></dd>
  20439. </dl>
  20440. <p>The default value is <code>all</code>.
  20441. </p></dd>
  20442. </dl>
  20443. <a name="cas"></a>
  20444. <h3 class="section">32.17 cas<span class="pull-right"><a class="anchor hidden-xs" href="#cas" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-cas" aria-hidden="true">TOC</a></span></h3>
  20445. <p>Apply Contrast Adaptive Sharpen filter to video stream.
  20446. </p>
  20447. <p>The filter accepts the following options:
  20448. </p>
  20449. <dl compact="compact">
  20450. <dt><samp>strength</samp></dt>
  20451. <dd><p>Set the sharpening strength. Default value is 0.
  20452. </p>
  20453. </dd>
  20454. <dt><samp>planes</samp></dt>
  20455. <dd><p>Set planes to filter. Default value is to filter all
  20456. planes except alpha plane.
  20457. </p></dd>
  20458. </dl>
  20459. <a name="Commands-49"></a>
  20460. <h4 class="subsection">32.17.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-49" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-49" aria-hidden="true">TOC</a></span></h4>
  20461. <p>This filter supports same <a href="#commands">commands</a> as options.
  20462. </p>
  20463. <a name="chromahold"></a>
  20464. <h3 class="section">32.18 chromahold<span class="pull-right"><a class="anchor hidden-xs" href="#chromahold" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-chromahold" aria-hidden="true">TOC</a></span></h3>
  20465. <p>Remove all color information for all colors except for certain one.
  20466. </p>
  20467. <p>The filter accepts the following options:
  20468. </p>
  20469. <dl compact="compact">
  20470. <dt><samp>color</samp></dt>
  20471. <dd><p>The color which will not be replaced with neutral chroma.
  20472. </p>
  20473. </dd>
  20474. <dt><samp>similarity</samp></dt>
  20475. <dd><p>Similarity percentage with the above color.
  20476. 0.01 matches only the exact key color, while 1.0 matches everything.
  20477. </p>
  20478. </dd>
  20479. <dt><samp>blend</samp></dt>
  20480. <dd><p>Blend percentage.
  20481. 0.0 makes pixels either fully gray, or not gray at all.
  20482. Higher values result in more preserved color.
  20483. </p>
  20484. </dd>
  20485. <dt><samp>yuv</samp></dt>
  20486. <dd><p>Signals that the color passed is already in YUV instead of RGB.
  20487. </p>
  20488. <p>Literal colors like &quot;green&quot; or &quot;red&quot; don&rsquo;t make sense with this enabled anymore.
  20489. This can be used to pass exact YUV values as hexadecimal numbers.
  20490. </p></dd>
  20491. </dl>
  20492. <a name="Commands-50"></a>
  20493. <h4 class="subsection">32.18.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-50" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-50" aria-hidden="true">TOC</a></span></h4>
  20494. <p>This filter supports same <a href="#commands">commands</a> as options.
  20495. The command accepts the same syntax of the corresponding option.
  20496. </p>
  20497. <p>If the specified expression is not valid, it is kept at its current
  20498. value.
  20499. </p>
  20500. <a name="chromakey"></a>
  20501. <h3 class="section">32.19 chromakey<span class="pull-right"><a class="anchor hidden-xs" href="#chromakey" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-chromakey" aria-hidden="true">TOC</a></span></h3>
  20502. <p>YUV colorspace color/chroma keying.
  20503. </p>
  20504. <p>The filter accepts the following options:
  20505. </p>
  20506. <dl compact="compact">
  20507. <dt><samp>color</samp></dt>
  20508. <dd><p>The color which will be replaced with transparency.
  20509. </p>
  20510. </dd>
  20511. <dt><samp>similarity</samp></dt>
  20512. <dd><p>Similarity percentage with the key color.
  20513. </p>
  20514. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  20515. </p>
  20516. </dd>
  20517. <dt><samp>blend</samp></dt>
  20518. <dd><p>Blend percentage.
  20519. </p>
  20520. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  20521. </p>
  20522. <p>Higher values result in semi-transparent pixels, with a higher transparency
  20523. the more similar the pixels color is to the key color.
  20524. </p>
  20525. </dd>
  20526. <dt><samp>yuv</samp></dt>
  20527. <dd><p>Signals that the color passed is already in YUV instead of RGB.
  20528. </p>
  20529. <p>Literal colors like &quot;green&quot; or &quot;red&quot; don&rsquo;t make sense with this enabled anymore.
  20530. This can be used to pass exact YUV values as hexadecimal numbers.
  20531. </p></dd>
  20532. </dl>
  20533. <a name="Commands-51"></a>
  20534. <h4 class="subsection">32.19.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-51" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-51" aria-hidden="true">TOC</a></span></h4>
  20535. <p>This filter supports same <a href="#commands">commands</a> as options.
  20536. The command accepts the same syntax of the corresponding option.
  20537. </p>
  20538. <p>If the specified expression is not valid, it is kept at its current
  20539. value.
  20540. </p>
  20541. <a name="Examples-58"></a>
  20542. <h4 class="subsection">32.19.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-58" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-58" aria-hidden="true">TOC</a></span></h4>
  20543. <ul>
  20544. <li> Make every green pixel in the input image transparent:
  20545. <div class="example">
  20546. <pre class="example">ffmpeg -i input.png -vf chromakey=green out.png
  20547. </pre></div>
  20548. </li><li> Overlay a greenscreen-video on top of a static black background.
  20549. <div class="example">
  20550. <pre class="example">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
  20551. </pre></div>
  20552. </li></ul>
  20553. <a name="chromanr"></a>
  20554. <h3 class="section">32.20 chromanr<span class="pull-right"><a class="anchor hidden-xs" href="#chromanr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-chromanr" aria-hidden="true">TOC</a></span></h3>
  20555. <p>Reduce chrominance noise.
  20556. </p>
  20557. <p>The filter accepts the following options:
  20558. </p>
  20559. <dl compact="compact">
  20560. <dt><samp>thres</samp></dt>
  20561. <dd><p>Set threshold for averaging chrominance values.
  20562. Sum of absolute difference of Y, U and V pixel components of current
  20563. pixel and neighbour pixels lower than this threshold will be used in
  20564. averaging. Luma component is left unchanged and is copied to output.
  20565. Default value is 30. Allowed range is from 1 to 200.
  20566. </p>
  20567. </dd>
  20568. <dt><samp>sizew</samp></dt>
  20569. <dd><p>Set horizontal radius of rectangle used for averaging.
  20570. Allowed range is from 1 to 100. Default value is 5.
  20571. </p>
  20572. </dd>
  20573. <dt><samp>sizeh</samp></dt>
  20574. <dd><p>Set vertical radius of rectangle used for averaging.
  20575. Allowed range is from 1 to 100. Default value is 5.
  20576. </p>
  20577. </dd>
  20578. <dt><samp>stepw</samp></dt>
  20579. <dd><p>Set horizontal step when averaging. Default value is 1.
  20580. Allowed range is from 1 to 50.
  20581. Mostly useful to speed-up filtering.
  20582. </p>
  20583. </dd>
  20584. <dt><samp>steph</samp></dt>
  20585. <dd><p>Set vertical step when averaging. Default value is 1.
  20586. Allowed range is from 1 to 50.
  20587. Mostly useful to speed-up filtering.
  20588. </p>
  20589. </dd>
  20590. <dt><samp>threy</samp></dt>
  20591. <dd><p>Set Y threshold for averaging chrominance values.
  20592. Set finer control for max allowed difference between Y components
  20593. of current pixel and neigbour pixels.
  20594. Default value is 200. Allowed range is from 1 to 200.
  20595. </p>
  20596. </dd>
  20597. <dt><samp>threu</samp></dt>
  20598. <dd><p>Set U threshold for averaging chrominance values.
  20599. Set finer control for max allowed difference between U components
  20600. of current pixel and neigbour pixels.
  20601. Default value is 200. Allowed range is from 1 to 200.
  20602. </p>
  20603. </dd>
  20604. <dt><samp>threv</samp></dt>
  20605. <dd><p>Set V threshold for averaging chrominance values.
  20606. Set finer control for max allowed difference between V components
  20607. of current pixel and neigbour pixels.
  20608. Default value is 200. Allowed range is from 1 to 200.
  20609. </p></dd>
  20610. </dl>
  20611. <a name="Commands-52"></a>
  20612. <h4 class="subsection">32.20.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-52" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-52" aria-hidden="true">TOC</a></span></h4>
  20613. <p>This filter supports same <a href="#commands">commands</a> as options.
  20614. The command accepts the same syntax of the corresponding option.
  20615. </p>
  20616. <a name="chromashift"></a>
  20617. <h3 class="section">32.21 chromashift<span class="pull-right"><a class="anchor hidden-xs" href="#chromashift" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-chromashift" aria-hidden="true">TOC</a></span></h3>
  20618. <p>Shift chroma pixels horizontally and/or vertically.
  20619. </p>
  20620. <p>The filter accepts the following options:
  20621. </p><dl compact="compact">
  20622. <dt><samp>cbh</samp></dt>
  20623. <dd><p>Set amount to shift chroma-blue horizontally.
  20624. </p></dd>
  20625. <dt><samp>cbv</samp></dt>
  20626. <dd><p>Set amount to shift chroma-blue vertically.
  20627. </p></dd>
  20628. <dt><samp>crh</samp></dt>
  20629. <dd><p>Set amount to shift chroma-red horizontally.
  20630. </p></dd>
  20631. <dt><samp>crv</samp></dt>
  20632. <dd><p>Set amount to shift chroma-red vertically.
  20633. </p></dd>
  20634. <dt><samp>edge</samp></dt>
  20635. <dd><p>Set edge mode, can be <var>smear</var>, default, or <var>warp</var>.
  20636. </p></dd>
  20637. </dl>
  20638. <a name="Commands-53"></a>
  20639. <h4 class="subsection">32.21.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-53" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-53" aria-hidden="true">TOC</a></span></h4>
  20640. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  20641. </p>
  20642. <a name="ciescope"></a>
  20643. <h3 class="section">32.22 ciescope<span class="pull-right"><a class="anchor hidden-xs" href="#ciescope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ciescope" aria-hidden="true">TOC</a></span></h3>
  20644. <p>Display CIE color diagram with pixels overlaid onto it.
  20645. </p>
  20646. <p>The filter accepts the following options:
  20647. </p>
  20648. <dl compact="compact">
  20649. <dt><samp>system</samp></dt>
  20650. <dd><p>Set color system.
  20651. </p>
  20652. <dl compact="compact">
  20653. <dt>&lsquo;<samp>ntsc, 470m</samp>&rsquo;</dt>
  20654. <dt>&lsquo;<samp>ebu, 470bg</samp>&rsquo;</dt>
  20655. <dt>&lsquo;<samp>smpte</samp>&rsquo;</dt>
  20656. <dt>&lsquo;<samp>240m</samp>&rsquo;</dt>
  20657. <dt>&lsquo;<samp>apple</samp>&rsquo;</dt>
  20658. <dt>&lsquo;<samp>widergb</samp>&rsquo;</dt>
  20659. <dt>&lsquo;<samp>cie1931</samp>&rsquo;</dt>
  20660. <dt>&lsquo;<samp>rec709, hdtv</samp>&rsquo;</dt>
  20661. <dt>&lsquo;<samp>uhdtv, rec2020</samp>&rsquo;</dt>
  20662. <dt>&lsquo;<samp>dcip3</samp>&rsquo;</dt>
  20663. </dl>
  20664. </dd>
  20665. <dt><samp>cie</samp></dt>
  20666. <dd><p>Set CIE system.
  20667. </p>
  20668. <dl compact="compact">
  20669. <dt>&lsquo;<samp>xyy</samp>&rsquo;</dt>
  20670. <dt>&lsquo;<samp>ucs</samp>&rsquo;</dt>
  20671. <dt>&lsquo;<samp>luv</samp>&rsquo;</dt>
  20672. </dl>
  20673. </dd>
  20674. <dt><samp>gamuts</samp></dt>
  20675. <dd><p>Set what gamuts to draw.
  20676. </p>
  20677. <p>See <code>system</code> option for available values.
  20678. </p>
  20679. </dd>
  20680. <dt><samp>size, s</samp></dt>
  20681. <dd><p>Set ciescope size, by default set to 512.
  20682. </p>
  20683. </dd>
  20684. <dt><samp>intensity, i</samp></dt>
  20685. <dd><p>Set intensity used to map input pixel values to CIE diagram.
  20686. </p>
  20687. </dd>
  20688. <dt><samp>contrast</samp></dt>
  20689. <dd><p>Set contrast used to draw tongue colors that are out of active color system gamut.
  20690. </p>
  20691. </dd>
  20692. <dt><samp>corrgamma</samp></dt>
  20693. <dd><p>Correct gamma displayed on scope, by default enabled.
  20694. </p>
  20695. </dd>
  20696. <dt><samp>showwhite</samp></dt>
  20697. <dd><p>Show white point on CIE diagram, by default disabled.
  20698. </p>
  20699. </dd>
  20700. <dt><samp>gamma</samp></dt>
  20701. <dd><p>Set input gamma. Used only with XYZ input color space.
  20702. </p></dd>
  20703. </dl>
  20704. <a name="codecview"></a>
  20705. <h3 class="section">32.23 codecview<span class="pull-right"><a class="anchor hidden-xs" href="#codecview" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-codecview" aria-hidden="true">TOC</a></span></h3>
  20706. <p>Visualize information exported by some codecs.
  20707. </p>
  20708. <p>Some codecs can export information through frames using side-data or other
  20709. means. For example, some MPEG based codecs export motion vectors through the
  20710. <var>export_mvs</var> flag in the codec <samp>flags2</samp> option.
  20711. </p>
  20712. <p>The filter accepts the following option:
  20713. </p>
  20714. <dl compact="compact">
  20715. <dt><samp>mv</samp></dt>
  20716. <dd><p>Set motion vectors to visualize.
  20717. </p>
  20718. <p>Available flags for <var>mv</var> are:
  20719. </p>
  20720. <dl compact="compact">
  20721. <dt>&lsquo;<samp>pf</samp>&rsquo;</dt>
  20722. <dd><p>forward predicted MVs of P-frames
  20723. </p></dd>
  20724. <dt>&lsquo;<samp>bf</samp>&rsquo;</dt>
  20725. <dd><p>forward predicted MVs of B-frames
  20726. </p></dd>
  20727. <dt>&lsquo;<samp>bb</samp>&rsquo;</dt>
  20728. <dd><p>backward predicted MVs of B-frames
  20729. </p></dd>
  20730. </dl>
  20731. </dd>
  20732. <dt><samp>qp</samp></dt>
  20733. <dd><p>Display quantization parameters using the chroma planes.
  20734. </p>
  20735. </dd>
  20736. <dt><samp>mv_type, mvt</samp></dt>
  20737. <dd><p>Set motion vectors type to visualize. Includes MVs from all frames unless specified by <var>frame_type</var> option.
  20738. </p>
  20739. <p>Available flags for <var>mv_type</var> are:
  20740. </p>
  20741. <dl compact="compact">
  20742. <dt>&lsquo;<samp>fp</samp>&rsquo;</dt>
  20743. <dd><p>forward predicted MVs
  20744. </p></dd>
  20745. <dt>&lsquo;<samp>bp</samp>&rsquo;</dt>
  20746. <dd><p>backward predicted MVs
  20747. </p></dd>
  20748. </dl>
  20749. </dd>
  20750. <dt><samp>frame_type, ft</samp></dt>
  20751. <dd><p>Set frame type to visualize motion vectors of.
  20752. </p>
  20753. <p>Available flags for <var>frame_type</var> are:
  20754. </p>
  20755. <dl compact="compact">
  20756. <dt>&lsquo;<samp>if</samp>&rsquo;</dt>
  20757. <dd><p>intra-coded frames (I-frames)
  20758. </p></dd>
  20759. <dt>&lsquo;<samp>pf</samp>&rsquo;</dt>
  20760. <dd><p>predicted frames (P-frames)
  20761. </p></dd>
  20762. <dt>&lsquo;<samp>bf</samp>&rsquo;</dt>
  20763. <dd><p>bi-directionally predicted frames (B-frames)
  20764. </p></dd>
  20765. </dl>
  20766. </dd>
  20767. </dl>
  20768. <a name="Examples-59"></a>
  20769. <h4 class="subsection">32.23.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-59" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-59" aria-hidden="true">TOC</a></span></h4>
  20770. <ul>
  20771. <li> Visualize forward predicted MVs of all frames using <code>ffplay</code>:
  20772. <div class="example">
  20773. <pre class="example">ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
  20774. </pre></div>
  20775. </li><li> Visualize multi-directionals MVs of P and B-Frames using <code>ffplay</code>:
  20776. <div class="example">
  20777. <pre class="example">ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
  20778. </pre></div>
  20779. </li></ul>
  20780. <a name="colorbalance"></a>
  20781. <h3 class="section">32.24 colorbalance<span class="pull-right"><a class="anchor hidden-xs" href="#colorbalance" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorbalance" aria-hidden="true">TOC</a></span></h3>
  20782. <p>Modify intensity of primary colors (red, green and blue) of input frames.
  20783. </p>
  20784. <p>The filter allows an input frame to be adjusted in the shadows, midtones or highlights
  20785. regions for the red-cyan, green-magenta or blue-yellow balance.
  20786. </p>
  20787. <p>A positive adjustment value shifts the balance towards the primary color, a negative
  20788. value towards the complementary color.
  20789. </p>
  20790. <p>The filter accepts the following options:
  20791. </p>
  20792. <dl compact="compact">
  20793. <dt><samp>rs</samp></dt>
  20794. <dt><samp>gs</samp></dt>
  20795. <dt><samp>bs</samp></dt>
  20796. <dd><p>Adjust red, green and blue shadows (darkest pixels).
  20797. </p>
  20798. </dd>
  20799. <dt><samp>rm</samp></dt>
  20800. <dt><samp>gm</samp></dt>
  20801. <dt><samp>bm</samp></dt>
  20802. <dd><p>Adjust red, green and blue midtones (medium pixels).
  20803. </p>
  20804. </dd>
  20805. <dt><samp>rh</samp></dt>
  20806. <dt><samp>gh</samp></dt>
  20807. <dt><samp>bh</samp></dt>
  20808. <dd><p>Adjust red, green and blue highlights (brightest pixels).
  20809. </p>
  20810. <p>Allowed ranges for options are <code>[-1.0, 1.0]</code>. Defaults are <code>0</code>.
  20811. </p>
  20812. </dd>
  20813. <dt><samp>pl</samp></dt>
  20814. <dd><p>Preserve lightness when changing color balance. Default is disabled.
  20815. </p></dd>
  20816. </dl>
  20817. <a name="Examples-60"></a>
  20818. <h4 class="subsection">32.24.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-60" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-60" aria-hidden="true">TOC</a></span></h4>
  20819. <ul>
  20820. <li> Add red color cast to shadows:
  20821. <div class="example">
  20822. <pre class="example">colorbalance=rs=.3
  20823. </pre></div>
  20824. </li></ul>
  20825. <a name="Commands-54"></a>
  20826. <h4 class="subsection">32.24.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-54" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-54" aria-hidden="true">TOC</a></span></h4>
  20827. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  20828. </p>
  20829. <a name="colorcontrast"></a>
  20830. <h3 class="section">32.25 colorcontrast<span class="pull-right"><a class="anchor hidden-xs" href="#colorcontrast" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorcontrast" aria-hidden="true">TOC</a></span></h3>
  20831. <p>Adjust color contrast between RGB components.
  20832. </p>
  20833. <p>The filter accepts the following options:
  20834. </p>
  20835. <dl compact="compact">
  20836. <dt><samp>rc</samp></dt>
  20837. <dd><p>Set the red-cyan contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
  20838. </p>
  20839. </dd>
  20840. <dt><samp>gm</samp></dt>
  20841. <dd><p>Set the green-magenta contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
  20842. </p>
  20843. </dd>
  20844. <dt><samp>by</samp></dt>
  20845. <dd><p>Set the blue-yellow contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
  20846. </p>
  20847. </dd>
  20848. <dt><samp>rcw</samp></dt>
  20849. <dt><samp>gmw</samp></dt>
  20850. <dt><samp>byw</samp></dt>
  20851. <dd><p>Set the weight of each <code>rc</code>, <code>gm</code>, <code>by</code> option value. Default value is 0.0.
  20852. Allowed range is from 0.0 to 1.0. If all weights are 0.0 filtering is disabled.
  20853. </p>
  20854. </dd>
  20855. <dt><samp>pl</samp></dt>
  20856. <dd><p>Set the amount of preserving lightness. Default value is 0.0. Allowed range is from 0.0 to 1.0.
  20857. </p></dd>
  20858. </dl>
  20859. <a name="Commands-55"></a>
  20860. <h4 class="subsection">32.25.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-55" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-55" aria-hidden="true">TOC</a></span></h4>
  20861. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  20862. </p>
  20863. <a name="colorcorrect"></a>
  20864. <h3 class="section">32.26 colorcorrect<span class="pull-right"><a class="anchor hidden-xs" href="#colorcorrect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorcorrect" aria-hidden="true">TOC</a></span></h3>
  20865. <p>Adjust color white balance selectively for blacks and whites.
  20866. This filter operates in YUV colorspace.
  20867. </p>
  20868. <p>The filter accepts the following options:
  20869. </p>
  20870. <dl compact="compact">
  20871. <dt><samp>rl</samp></dt>
  20872. <dd><p>Set the red shadow spot. Allowed range is from -1.0 to 1.0.
  20873. Default value is 0.
  20874. </p>
  20875. </dd>
  20876. <dt><samp>bl</samp></dt>
  20877. <dd><p>Set the blue shadow spot. Allowed range is from -1.0 to 1.0.
  20878. Default value is 0.
  20879. </p>
  20880. </dd>
  20881. <dt><samp>rh</samp></dt>
  20882. <dd><p>Set the red highlight spot. Allowed range is from -1.0 to 1.0.
  20883. Default value is 0.
  20884. </p>
  20885. </dd>
  20886. <dt><samp>bh</samp></dt>
  20887. <dd><p>Set the red highlight spot. Allowed range is from -1.0 to 1.0.
  20888. Default value is 0.
  20889. </p>
  20890. </dd>
  20891. <dt><samp>saturation</samp></dt>
  20892. <dd><p>Set the amount of saturation. Allowed range is from -3.0 to 3.0.
  20893. Default value is 1.
  20894. </p></dd>
  20895. </dl>
  20896. <a name="Commands-56"></a>
  20897. <h4 class="subsection">32.26.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-56" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-56" aria-hidden="true">TOC</a></span></h4>
  20898. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  20899. </p>
  20900. <a name="colorchannelmixer"></a>
  20901. <h3 class="section">32.27 colorchannelmixer<span class="pull-right"><a class="anchor hidden-xs" href="#colorchannelmixer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorchannelmixer" aria-hidden="true">TOC</a></span></h3>
  20902. <p>Adjust video input frames by re-mixing color channels.
  20903. </p>
  20904. <p>This filter modifies a color channel by adding the values associated to
  20905. the other channels of the same pixels. For example if the value to
  20906. modify is red, the output value will be:
  20907. </p><div class="example">
  20908. <pre class="example"><var>red</var>=<var>red</var>*<var>rr</var> + <var>blue</var>*<var>rb</var> + <var>green</var>*<var>rg</var> + <var>alpha</var>*<var>ra</var>
  20909. </pre></div>
  20910. <p>The filter accepts the following options:
  20911. </p>
  20912. <dl compact="compact">
  20913. <dt><samp>rr</samp></dt>
  20914. <dt><samp>rg</samp></dt>
  20915. <dt><samp>rb</samp></dt>
  20916. <dt><samp>ra</samp></dt>
  20917. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output red channel.
  20918. Default is <code>1</code> for <var>rr</var>, and <code>0</code> for <var>rg</var>, <var>rb</var> and <var>ra</var>.
  20919. </p>
  20920. </dd>
  20921. <dt><samp>gr</samp></dt>
  20922. <dt><samp>gg</samp></dt>
  20923. <dt><samp>gb</samp></dt>
  20924. <dt><samp>ga</samp></dt>
  20925. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output green channel.
  20926. Default is <code>1</code> for <var>gg</var>, and <code>0</code> for <var>gr</var>, <var>gb</var> and <var>ga</var>.
  20927. </p>
  20928. </dd>
  20929. <dt><samp>br</samp></dt>
  20930. <dt><samp>bg</samp></dt>
  20931. <dt><samp>bb</samp></dt>
  20932. <dt><samp>ba</samp></dt>
  20933. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output blue channel.
  20934. Default is <code>1</code> for <var>bb</var>, and <code>0</code> for <var>br</var>, <var>bg</var> and <var>ba</var>.
  20935. </p>
  20936. </dd>
  20937. <dt><samp>ar</samp></dt>
  20938. <dt><samp>ag</samp></dt>
  20939. <dt><samp>ab</samp></dt>
  20940. <dt><samp>aa</samp></dt>
  20941. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output alpha channel.
  20942. Default is <code>1</code> for <var>aa</var>, and <code>0</code> for <var>ar</var>, <var>ag</var> and <var>ab</var>.
  20943. </p>
  20944. <p>Allowed ranges for options are <code>[-2.0, 2.0]</code>.
  20945. </p>
  20946. </dd>
  20947. <dt><samp>pl</samp></dt>
  20948. <dd><p>Preserve lightness when changing colors. Allowed range is from <code>[0.0, 1.0]</code>.
  20949. Default is <code>0.0</code>, thus disabled.
  20950. </p></dd>
  20951. </dl>
  20952. <a name="Examples-61"></a>
  20953. <h4 class="subsection">32.27.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-61" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-61" aria-hidden="true">TOC</a></span></h4>
  20954. <ul>
  20955. <li> Convert source to grayscale:
  20956. <div class="example">
  20957. <pre class="example">colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
  20958. </pre></div>
  20959. </li><li> Simulate sepia tones:
  20960. <div class="example">
  20961. <pre class="example">colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
  20962. </pre></div>
  20963. </li></ul>
  20964. <a name="Commands-57"></a>
  20965. <h4 class="subsection">32.27.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-57" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-57" aria-hidden="true">TOC</a></span></h4>
  20966. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  20967. </p>
  20968. <a name="colorize"></a>
  20969. <h3 class="section">32.28 colorize<span class="pull-right"><a class="anchor hidden-xs" href="#colorize" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorize" aria-hidden="true">TOC</a></span></h3>
  20970. <p>Overlay a solid color on the video stream.
  20971. </p>
  20972. <p>The filter accepts the following options:
  20973. </p>
  20974. <dl compact="compact">
  20975. <dt><samp>hue</samp></dt>
  20976. <dd><p>Set the color hue. Allowed range is from 0 to 360.
  20977. Default value is 0.
  20978. </p>
  20979. </dd>
  20980. <dt><samp>saturation</samp></dt>
  20981. <dd><p>Set the color saturation. Allowed range is from 0 to 1.
  20982. Default value is 0.5.
  20983. </p>
  20984. </dd>
  20985. <dt><samp>lightness</samp></dt>
  20986. <dd><p>Set the color lightness. Allowed range is from 0 to 1.
  20987. Default value is 0.5.
  20988. </p>
  20989. </dd>
  20990. <dt><samp>mix</samp></dt>
  20991. <dd><p>Set the mix of source lightness. By default is set to 1.0.
  20992. Allowed range is from 0.0 to 1.0.
  20993. </p></dd>
  20994. </dl>
  20995. <a name="Commands-58"></a>
  20996. <h4 class="subsection">32.28.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-58" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-58" aria-hidden="true">TOC</a></span></h4>
  20997. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  20998. </p>
  20999. <a name="colorkey"></a>
  21000. <h3 class="section">32.29 colorkey<span class="pull-right"><a class="anchor hidden-xs" href="#colorkey" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorkey" aria-hidden="true">TOC</a></span></h3>
  21001. <p>RGB colorspace color keying.
  21002. </p>
  21003. <p>The filter accepts the following options:
  21004. </p>
  21005. <dl compact="compact">
  21006. <dt><samp>color</samp></dt>
  21007. <dd><p>The color which will be replaced with transparency.
  21008. </p>
  21009. </dd>
  21010. <dt><samp>similarity</samp></dt>
  21011. <dd><p>Similarity percentage with the key color.
  21012. </p>
  21013. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  21014. </p>
  21015. </dd>
  21016. <dt><samp>blend</samp></dt>
  21017. <dd><p>Blend percentage.
  21018. </p>
  21019. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  21020. </p>
  21021. <p>Higher values result in semi-transparent pixels, with a higher transparency
  21022. the more similar the pixels color is to the key color.
  21023. </p></dd>
  21024. </dl>
  21025. <a name="Examples-62"></a>
  21026. <h4 class="subsection">32.29.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-62" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-62" aria-hidden="true">TOC</a></span></h4>
  21027. <ul>
  21028. <li> Make every green pixel in the input image transparent:
  21029. <div class="example">
  21030. <pre class="example">ffmpeg -i input.png -vf colorkey=green out.png
  21031. </pre></div>
  21032. </li><li> Overlay a greenscreen-video on top of a static background image.
  21033. <div class="example">
  21034. <pre class="example">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
  21035. </pre></div>
  21036. </li></ul>
  21037. <a name="Commands-59"></a>
  21038. <h4 class="subsection">32.29.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-59" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-59" aria-hidden="true">TOC</a></span></h4>
  21039. <p>This filter supports same <a href="#commands">commands</a> as options.
  21040. The command accepts the same syntax of the corresponding option.
  21041. </p>
  21042. <p>If the specified expression is not valid, it is kept at its current
  21043. value.
  21044. </p>
  21045. <a name="colorhold"></a>
  21046. <h3 class="section">32.30 colorhold<span class="pull-right"><a class="anchor hidden-xs" href="#colorhold" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorhold" aria-hidden="true">TOC</a></span></h3>
  21047. <p>Remove all color information for all RGB colors except for certain one.
  21048. </p>
  21049. <p>The filter accepts the following options:
  21050. </p>
  21051. <dl compact="compact">
  21052. <dt><samp>color</samp></dt>
  21053. <dd><p>The color which will not be replaced with neutral gray.
  21054. </p>
  21055. </dd>
  21056. <dt><samp>similarity</samp></dt>
  21057. <dd><p>Similarity percentage with the above color.
  21058. 0.01 matches only the exact key color, while 1.0 matches everything.
  21059. </p>
  21060. </dd>
  21061. <dt><samp>blend</samp></dt>
  21062. <dd><p>Blend percentage. 0.0 makes pixels fully gray.
  21063. Higher values result in more preserved color.
  21064. </p></dd>
  21065. </dl>
  21066. <a name="Commands-60"></a>
  21067. <h4 class="subsection">32.30.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-60" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-60" aria-hidden="true">TOC</a></span></h4>
  21068. <p>This filter supports same <a href="#commands">commands</a> as options.
  21069. The command accepts the same syntax of the corresponding option.
  21070. </p>
  21071. <p>If the specified expression is not valid, it is kept at its current
  21072. value.
  21073. </p>
  21074. <a name="colorlevels"></a>
  21075. <h3 class="section">32.31 colorlevels<span class="pull-right"><a class="anchor hidden-xs" href="#colorlevels" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorlevels" aria-hidden="true">TOC</a></span></h3>
  21076. <p>Adjust video input frames using levels.
  21077. </p>
  21078. <p>The filter accepts the following options:
  21079. </p>
  21080. <dl compact="compact">
  21081. <dt><samp>rimin</samp></dt>
  21082. <dt><samp>gimin</samp></dt>
  21083. <dt><samp>bimin</samp></dt>
  21084. <dt><samp>aimin</samp></dt>
  21085. <dd><p>Adjust red, green, blue and alpha input black point.
  21086. Allowed ranges for options are <code>[-1.0, 1.0]</code>. Defaults are <code>0</code>.
  21087. </p>
  21088. </dd>
  21089. <dt><samp>rimax</samp></dt>
  21090. <dt><samp>gimax</samp></dt>
  21091. <dt><samp>bimax</samp></dt>
  21092. <dt><samp>aimax</samp></dt>
  21093. <dd><p>Adjust red, green, blue and alpha input white point.
  21094. Allowed ranges for options are <code>[-1.0, 1.0]</code>. Defaults are <code>1</code>.
  21095. </p>
  21096. <p>Input levels are used to lighten highlights (bright tones), darken shadows
  21097. (dark tones), change the balance of bright and dark tones.
  21098. </p>
  21099. </dd>
  21100. <dt><samp>romin</samp></dt>
  21101. <dt><samp>gomin</samp></dt>
  21102. <dt><samp>bomin</samp></dt>
  21103. <dt><samp>aomin</samp></dt>
  21104. <dd><p>Adjust red, green, blue and alpha output black point.
  21105. Allowed ranges for options are <code>[0, 1.0]</code>. Defaults are <code>0</code>.
  21106. </p>
  21107. </dd>
  21108. <dt><samp>romax</samp></dt>
  21109. <dt><samp>gomax</samp></dt>
  21110. <dt><samp>bomax</samp></dt>
  21111. <dt><samp>aomax</samp></dt>
  21112. <dd><p>Adjust red, green, blue and alpha output white point.
  21113. Allowed ranges for options are <code>[0, 1.0]</code>. Defaults are <code>1</code>.
  21114. </p>
  21115. <p>Output levels allows manual selection of a constrained output level range.
  21116. </p></dd>
  21117. </dl>
  21118. <a name="Examples-63"></a>
  21119. <h4 class="subsection">32.31.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-63" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-63" aria-hidden="true">TOC</a></span></h4>
  21120. <ul>
  21121. <li> Make video output darker:
  21122. <div class="example">
  21123. <pre class="example">colorlevels=rimin=0.058:gimin=0.058:bimin=0.058
  21124. </pre></div>
  21125. </li><li> Increase contrast:
  21126. <div class="example">
  21127. <pre class="example">colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96
  21128. </pre></div>
  21129. </li><li> Make video output lighter:
  21130. <div class="example">
  21131. <pre class="example">colorlevels=rimax=0.902:gimax=0.902:bimax=0.902
  21132. </pre></div>
  21133. </li><li> Increase brightness:
  21134. <div class="example">
  21135. <pre class="example">colorlevels=romin=0.5:gomin=0.5:bomin=0.5
  21136. </pre></div>
  21137. </li></ul>
  21138. <a name="Commands-61"></a>
  21139. <h4 class="subsection">32.31.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-61" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-61" aria-hidden="true">TOC</a></span></h4>
  21140. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  21141. </p>
  21142. <a name="colormatrix"></a>
  21143. <h3 class="section">32.32 colormatrix<span class="pull-right"><a class="anchor hidden-xs" href="#colormatrix" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colormatrix" aria-hidden="true">TOC</a></span></h3>
  21144. <p>Convert color matrix.
  21145. </p>
  21146. <p>The filter accepts the following options:
  21147. </p>
  21148. <dl compact="compact">
  21149. <dt><samp>src</samp></dt>
  21150. <dt><samp>dst</samp></dt>
  21151. <dd><p>Specify the source and destination color matrix. Both values must be
  21152. specified.
  21153. </p>
  21154. <p>The accepted values are:
  21155. </p><dl compact="compact">
  21156. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  21157. <dd><p>BT.709
  21158. </p>
  21159. </dd>
  21160. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  21161. <dd><p>FCC
  21162. </p>
  21163. </dd>
  21164. <dt>&lsquo;<samp>bt601</samp>&rsquo;</dt>
  21165. <dd><p>BT.601
  21166. </p>
  21167. </dd>
  21168. <dt>&lsquo;<samp>bt470</samp>&rsquo;</dt>
  21169. <dd><p>BT.470
  21170. </p>
  21171. </dd>
  21172. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  21173. <dd><p>BT.470BG
  21174. </p>
  21175. </dd>
  21176. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  21177. <dd><p>SMPTE-170M
  21178. </p>
  21179. </dd>
  21180. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  21181. <dd><p>SMPTE-240M
  21182. </p>
  21183. </dd>
  21184. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  21185. <dd><p>BT.2020
  21186. </p></dd>
  21187. </dl>
  21188. </dd>
  21189. </dl>
  21190. <p>For example to convert from BT.601 to SMPTE-240M, use the command:
  21191. </p><div class="example">
  21192. <pre class="example">colormatrix=bt601:smpte240m
  21193. </pre></div>
  21194. <a name="colorspace"></a>
  21195. <h3 class="section">32.33 colorspace<span class="pull-right"><a class="anchor hidden-xs" href="#colorspace" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorspace" aria-hidden="true">TOC</a></span></h3>
  21196. <p>Convert colorspace, transfer characteristics or color primaries.
  21197. Input video needs to have an even size.
  21198. </p>
  21199. <p>The filter accepts the following options:
  21200. </p>
  21201. <dl compact="compact">
  21202. <dd><span id="all"></span></dd>
  21203. <dt><samp>all</samp></dt>
  21204. <dd><p>Specify all color properties at once.
  21205. </p>
  21206. <p>The accepted values are:
  21207. </p><dl compact="compact">
  21208. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  21209. <dd><p>BT.470M
  21210. </p>
  21211. </dd>
  21212. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  21213. <dd><p>BT.470BG
  21214. </p>
  21215. </dd>
  21216. <dt>&lsquo;<samp>bt601-6-525</samp>&rsquo;</dt>
  21217. <dd><p>BT.601-6 525
  21218. </p>
  21219. </dd>
  21220. <dt>&lsquo;<samp>bt601-6-625</samp>&rsquo;</dt>
  21221. <dd><p>BT.601-6 625
  21222. </p>
  21223. </dd>
  21224. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  21225. <dd><p>BT.709
  21226. </p>
  21227. </dd>
  21228. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  21229. <dd><p>SMPTE-170M
  21230. </p>
  21231. </dd>
  21232. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  21233. <dd><p>SMPTE-240M
  21234. </p>
  21235. </dd>
  21236. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  21237. <dd><p>BT.2020
  21238. </p>
  21239. </dd>
  21240. </dl>
  21241. <span id="space"></span></dd>
  21242. <dt><samp>space</samp></dt>
  21243. <dd><p>Specify output colorspace.
  21244. </p>
  21245. <p>The accepted values are:
  21246. </p><dl compact="compact">
  21247. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  21248. <dd><p>BT.709
  21249. </p>
  21250. </dd>
  21251. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  21252. <dd><p>FCC
  21253. </p>
  21254. </dd>
  21255. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  21256. <dd><p>BT.470BG or BT.601-6 625
  21257. </p>
  21258. </dd>
  21259. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  21260. <dd><p>SMPTE-170M or BT.601-6 525
  21261. </p>
  21262. </dd>
  21263. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  21264. <dd><p>SMPTE-240M
  21265. </p>
  21266. </dd>
  21267. <dt>&lsquo;<samp>ycgco</samp>&rsquo;</dt>
  21268. <dd><p>YCgCo
  21269. </p>
  21270. </dd>
  21271. <dt>&lsquo;<samp>bt2020ncl</samp>&rsquo;</dt>
  21272. <dd><p>BT.2020 with non-constant luminance
  21273. </p>
  21274. </dd>
  21275. </dl>
  21276. <span id="trc"></span></dd>
  21277. <dt><samp>trc</samp></dt>
  21278. <dd><p>Specify output transfer characteristics.
  21279. </p>
  21280. <p>The accepted values are:
  21281. </p><dl compact="compact">
  21282. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  21283. <dd><p>BT.709
  21284. </p>
  21285. </dd>
  21286. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  21287. <dd><p>BT.470M
  21288. </p>
  21289. </dd>
  21290. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  21291. <dd><p>BT.470BG
  21292. </p>
  21293. </dd>
  21294. <dt>&lsquo;<samp>gamma22</samp>&rsquo;</dt>
  21295. <dd><p>Constant gamma of 2.2
  21296. </p>
  21297. </dd>
  21298. <dt>&lsquo;<samp>gamma28</samp>&rsquo;</dt>
  21299. <dd><p>Constant gamma of 2.8
  21300. </p>
  21301. </dd>
  21302. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  21303. <dd><p>SMPTE-170M, BT.601-6 625 or BT.601-6 525
  21304. </p>
  21305. </dd>
  21306. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  21307. <dd><p>SMPTE-240M
  21308. </p>
  21309. </dd>
  21310. <dt>&lsquo;<samp>srgb</samp>&rsquo;</dt>
  21311. <dd><p>SRGB
  21312. </p>
  21313. </dd>
  21314. <dt>&lsquo;<samp>iec61966-2-1</samp>&rsquo;</dt>
  21315. <dd><p>iec61966-2-1
  21316. </p>
  21317. </dd>
  21318. <dt>&lsquo;<samp>iec61966-2-4</samp>&rsquo;</dt>
  21319. <dd><p>iec61966-2-4
  21320. </p>
  21321. </dd>
  21322. <dt>&lsquo;<samp>xvycc</samp>&rsquo;</dt>
  21323. <dd><p>xvycc
  21324. </p>
  21325. </dd>
  21326. <dt>&lsquo;<samp>bt2020-10</samp>&rsquo;</dt>
  21327. <dd><p>BT.2020 for 10-bits content
  21328. </p>
  21329. </dd>
  21330. <dt>&lsquo;<samp>bt2020-12</samp>&rsquo;</dt>
  21331. <dd><p>BT.2020 for 12-bits content
  21332. </p>
  21333. </dd>
  21334. </dl>
  21335. <span id="primaries"></span></dd>
  21336. <dt><samp>primaries</samp></dt>
  21337. <dd><p>Specify output color primaries.
  21338. </p>
  21339. <p>The accepted values are:
  21340. </p><dl compact="compact">
  21341. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  21342. <dd><p>BT.709
  21343. </p>
  21344. </dd>
  21345. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  21346. <dd><p>BT.470M
  21347. </p>
  21348. </dd>
  21349. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  21350. <dd><p>BT.470BG or BT.601-6 625
  21351. </p>
  21352. </dd>
  21353. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  21354. <dd><p>SMPTE-170M or BT.601-6 525
  21355. </p>
  21356. </dd>
  21357. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  21358. <dd><p>SMPTE-240M
  21359. </p>
  21360. </dd>
  21361. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  21362. <dd><p>film
  21363. </p>
  21364. </dd>
  21365. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  21366. <dd><p>SMPTE-431
  21367. </p>
  21368. </dd>
  21369. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  21370. <dd><p>SMPTE-432
  21371. </p>
  21372. </dd>
  21373. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  21374. <dd><p>BT.2020
  21375. </p>
  21376. </dd>
  21377. <dt>&lsquo;<samp>jedec-p22</samp>&rsquo;</dt>
  21378. <dd><p>JEDEC P22 phosphors
  21379. </p>
  21380. </dd>
  21381. </dl>
  21382. <span id="range"></span></dd>
  21383. <dt><samp>range</samp></dt>
  21384. <dd><p>Specify output color range.
  21385. </p>
  21386. <p>The accepted values are:
  21387. </p><dl compact="compact">
  21388. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  21389. <dd><p>TV (restricted) range
  21390. </p>
  21391. </dd>
  21392. <dt>&lsquo;<samp>mpeg</samp>&rsquo;</dt>
  21393. <dd><p>MPEG (restricted) range
  21394. </p>
  21395. </dd>
  21396. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  21397. <dd><p>PC (full) range
  21398. </p>
  21399. </dd>
  21400. <dt>&lsquo;<samp>jpeg</samp>&rsquo;</dt>
  21401. <dd><p>JPEG (full) range
  21402. </p>
  21403. </dd>
  21404. </dl>
  21405. </dd>
  21406. <dt><samp>format</samp></dt>
  21407. <dd><p>Specify output color format.
  21408. </p>
  21409. <p>The accepted values are:
  21410. </p><dl compact="compact">
  21411. <dt>&lsquo;<samp>yuv420p</samp>&rsquo;</dt>
  21412. <dd><p>YUV 4:2:0 planar 8-bits
  21413. </p>
  21414. </dd>
  21415. <dt>&lsquo;<samp>yuv420p10</samp>&rsquo;</dt>
  21416. <dd><p>YUV 4:2:0 planar 10-bits
  21417. </p>
  21418. </dd>
  21419. <dt>&lsquo;<samp>yuv420p12</samp>&rsquo;</dt>
  21420. <dd><p>YUV 4:2:0 planar 12-bits
  21421. </p>
  21422. </dd>
  21423. <dt>&lsquo;<samp>yuv422p</samp>&rsquo;</dt>
  21424. <dd><p>YUV 4:2:2 planar 8-bits
  21425. </p>
  21426. </dd>
  21427. <dt>&lsquo;<samp>yuv422p10</samp>&rsquo;</dt>
  21428. <dd><p>YUV 4:2:2 planar 10-bits
  21429. </p>
  21430. </dd>
  21431. <dt>&lsquo;<samp>yuv422p12</samp>&rsquo;</dt>
  21432. <dd><p>YUV 4:2:2 planar 12-bits
  21433. </p>
  21434. </dd>
  21435. <dt>&lsquo;<samp>yuv444p</samp>&rsquo;</dt>
  21436. <dd><p>YUV 4:4:4 planar 8-bits
  21437. </p>
  21438. </dd>
  21439. <dt>&lsquo;<samp>yuv444p10</samp>&rsquo;</dt>
  21440. <dd><p>YUV 4:4:4 planar 10-bits
  21441. </p>
  21442. </dd>
  21443. <dt>&lsquo;<samp>yuv444p12</samp>&rsquo;</dt>
  21444. <dd><p>YUV 4:4:4 planar 12-bits
  21445. </p>
  21446. </dd>
  21447. </dl>
  21448. </dd>
  21449. <dt><samp>fast</samp></dt>
  21450. <dd><p>Do a fast conversion, which skips gamma/primary correction. This will take
  21451. significantly less CPU, but will be mathematically incorrect. To get output
  21452. compatible with that produced by the colormatrix filter, use fast=1.
  21453. </p>
  21454. </dd>
  21455. <dt><samp>dither</samp></dt>
  21456. <dd><p>Specify dithering mode.
  21457. </p>
  21458. <p>The accepted values are:
  21459. </p><dl compact="compact">
  21460. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  21461. <dd><p>No dithering
  21462. </p>
  21463. </dd>
  21464. <dt>&lsquo;<samp>fsb</samp>&rsquo;</dt>
  21465. <dd><p>Floyd-Steinberg dithering
  21466. </p></dd>
  21467. </dl>
  21468. </dd>
  21469. <dt><samp>wpadapt</samp></dt>
  21470. <dd><p>Whitepoint adaptation mode.
  21471. </p>
  21472. <p>The accepted values are:
  21473. </p><dl compact="compact">
  21474. <dt>&lsquo;<samp>bradford</samp>&rsquo;</dt>
  21475. <dd><p>Bradford whitepoint adaptation
  21476. </p>
  21477. </dd>
  21478. <dt>&lsquo;<samp>vonkries</samp>&rsquo;</dt>
  21479. <dd><p>von Kries whitepoint adaptation
  21480. </p>
  21481. </dd>
  21482. <dt>&lsquo;<samp>identity</samp>&rsquo;</dt>
  21483. <dd><p>identity whitepoint adaptation (i.e. no whitepoint adaptation)
  21484. </p></dd>
  21485. </dl>
  21486. </dd>
  21487. <dt><samp>iall</samp></dt>
  21488. <dd><p>Override all input properties at once. Same accepted values as <a href="#all">all</a>.
  21489. </p>
  21490. </dd>
  21491. <dt><samp>ispace</samp></dt>
  21492. <dd><p>Override input colorspace. Same accepted values as <a href="#space">space</a>.
  21493. </p>
  21494. </dd>
  21495. <dt><samp>iprimaries</samp></dt>
  21496. <dd><p>Override input color primaries. Same accepted values as <a href="#primaries">primaries</a>.
  21497. </p>
  21498. </dd>
  21499. <dt><samp>itrc</samp></dt>
  21500. <dd><p>Override input transfer characteristics. Same accepted values as <a href="#trc">trc</a>.
  21501. </p>
  21502. </dd>
  21503. <dt><samp>irange</samp></dt>
  21504. <dd><p>Override input color range. Same accepted values as <a href="#range">range</a>.
  21505. </p>
  21506. </dd>
  21507. </dl>
  21508. <p>The filter converts the transfer characteristics, color space and color
  21509. primaries to the specified user values. The output value, if not specified,
  21510. is set to a default value based on the &quot;all&quot; property. If that property is
  21511. also not specified, the filter will log an error. The output color range and
  21512. format default to the same value as the input color range and format. The
  21513. input transfer characteristics, color space, color primaries and color range
  21514. should be set on the input data. If any of these are missing, the filter will
  21515. log an error and no conversion will take place.
  21516. </p>
  21517. <p>For example to convert the input to SMPTE-240M, use the command:
  21518. </p><div class="example">
  21519. <pre class="example">colorspace=smpte240m
  21520. </pre></div>
  21521. <a name="colortemperature"></a>
  21522. <h3 class="section">32.34 colortemperature<span class="pull-right"><a class="anchor hidden-xs" href="#colortemperature" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colortemperature" aria-hidden="true">TOC</a></span></h3>
  21523. <p>Adjust color temperature in video to simulate variations in ambient color temperature.
  21524. </p>
  21525. <p>The filter accepts the following options:
  21526. </p>
  21527. <dl compact="compact">
  21528. <dt><samp>temperature</samp></dt>
  21529. <dd><p>Set the temperature in Kelvin. Allowed range is from 1000 to 40000.
  21530. Default value is 6500 K.
  21531. </p>
  21532. </dd>
  21533. <dt><samp>mix</samp></dt>
  21534. <dd><p>Set mixing with filtered output. Allowed range is from 0 to 1.
  21535. Default value is 1.
  21536. </p>
  21537. </dd>
  21538. <dt><samp>pl</samp></dt>
  21539. <dd><p>Set the amount of preserving lightness. Allowed range is from 0 to 1.
  21540. Default value is 0.
  21541. </p></dd>
  21542. </dl>
  21543. <a name="Commands-62"></a>
  21544. <h4 class="subsection">32.34.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-62" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-62" aria-hidden="true">TOC</a></span></h4>
  21545. <p>This filter supports same <a href="#commands">commands</a> as options.
  21546. </p>
  21547. <a name="convolution"></a>
  21548. <h3 class="section">32.35 convolution<span class="pull-right"><a class="anchor hidden-xs" href="#convolution" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-convolution" aria-hidden="true">TOC</a></span></h3>
  21549. <p>Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49 elements.
  21550. </p>
  21551. <p>The filter accepts the following options:
  21552. </p>
  21553. <dl compact="compact">
  21554. <dt><samp>0m</samp></dt>
  21555. <dt><samp>1m</samp></dt>
  21556. <dt><samp>2m</samp></dt>
  21557. <dt><samp>3m</samp></dt>
  21558. <dd><p>Set matrix for each plane.
  21559. Matrix is sequence of 9, 25 or 49 signed integers in <var>square</var> mode,
  21560. and from 1 to 49 odd number of signed integers in <var>row</var> mode.
  21561. </p>
  21562. </dd>
  21563. <dt><samp>0rdiv</samp></dt>
  21564. <dt><samp>1rdiv</samp></dt>
  21565. <dt><samp>2rdiv</samp></dt>
  21566. <dt><samp>3rdiv</samp></dt>
  21567. <dd><p>Set multiplier for calculated value for each plane.
  21568. If unset or 0, it will be sum of all matrix elements.
  21569. </p>
  21570. </dd>
  21571. <dt><samp>0bias</samp></dt>
  21572. <dt><samp>1bias</samp></dt>
  21573. <dt><samp>2bias</samp></dt>
  21574. <dt><samp>3bias</samp></dt>
  21575. <dd><p>Set bias for each plane. This value is added to the result of the multiplication.
  21576. Useful for making the overall image brighter or darker. Default is 0.0.
  21577. </p>
  21578. </dd>
  21579. <dt><samp>0mode</samp></dt>
  21580. <dt><samp>1mode</samp></dt>
  21581. <dt><samp>2mode</samp></dt>
  21582. <dt><samp>3mode</samp></dt>
  21583. <dd><p>Set matrix mode for each plane. Can be <var>square</var>, <var>row</var> or <var>column</var>.
  21584. Default is <var>square</var>.
  21585. </p></dd>
  21586. </dl>
  21587. <a name="Commands-63"></a>
  21588. <h4 class="subsection">32.35.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-63" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-63" aria-hidden="true">TOC</a></span></h4>
  21589. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  21590. </p>
  21591. <a name="Examples-64"></a>
  21592. <h4 class="subsection">32.35.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-64" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-64" aria-hidden="true">TOC</a></span></h4>
  21593. <ul>
  21594. <li> Apply sharpen:
  21595. <div class="example">
  21596. <pre class="example">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;
  21597. </pre></div>
  21598. </li><li> Apply blur:
  21599. <div class="example">
  21600. <pre class="example">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;
  21601. </pre></div>
  21602. </li><li> Apply edge enhance:
  21603. <div class="example">
  21604. <pre class="example">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;
  21605. </pre></div>
  21606. </li><li> Apply edge detect:
  21607. <div class="example">
  21608. <pre class="example">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;
  21609. </pre></div>
  21610. </li><li> Apply laplacian edge detector which includes diagonals:
  21611. <div class="example">
  21612. <pre class="example">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;
  21613. </pre></div>
  21614. </li><li> Apply emboss:
  21615. <div class="example">
  21616. <pre class="example">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;
  21617. </pre></div>
  21618. </li></ul>
  21619. <a name="convolve"></a>
  21620. <h3 class="section">32.36 convolve<span class="pull-right"><a class="anchor hidden-xs" href="#convolve" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-convolve" aria-hidden="true">TOC</a></span></h3>
  21621. <p>Apply 2D convolution of video stream in frequency domain using second stream
  21622. as impulse.
  21623. </p>
  21624. <p>The filter accepts the following options:
  21625. </p>
  21626. <dl compact="compact">
  21627. <dt><samp>planes</samp></dt>
  21628. <dd><p>Set which planes to process.
  21629. </p>
  21630. </dd>
  21631. <dt><samp>impulse</samp></dt>
  21632. <dd><p>Set which impulse video frames will be processed, can be <var>first</var>
  21633. or <var>all</var>. Default is <var>all</var>.
  21634. </p></dd>
  21635. </dl>
  21636. <p>The <code>convolve</code> filter also supports the <a href="#framesync">framesync</a> options.
  21637. </p>
  21638. <a name="copy"></a>
  21639. <h3 class="section">32.37 copy<span class="pull-right"><a class="anchor hidden-xs" href="#copy" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-copy" aria-hidden="true">TOC</a></span></h3>
  21640. <p>Copy the input video source unchanged to the output. This is mainly useful for
  21641. testing purposes.
  21642. </p>
  21643. <span id="coreimage"></span><a name="coreimage-1"></a>
  21644. <h3 class="section">32.38 coreimage<span class="pull-right"><a class="anchor hidden-xs" href="#coreimage-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-coreimage-1" aria-hidden="true">TOC</a></span></h3>
  21645. <p>Video filtering on GPU using Apple&rsquo;s CoreImage API on OSX.
  21646. </p>
  21647. <p>Hardware acceleration is based on an OpenGL context. Usually, this means it is
  21648. processed by video hardware. However, software-based OpenGL implementations
  21649. exist which means there is no guarantee for hardware processing. It depends on
  21650. the respective OSX.
  21651. </p>
  21652. <p>There are many filters and image generators provided by Apple that come with a
  21653. large variety of options. The filter has to be referenced by its name along
  21654. with its options.
  21655. </p>
  21656. <p>The coreimage filter accepts the following options:
  21657. </p><dl compact="compact">
  21658. <dt><samp>list_filters</samp></dt>
  21659. <dd><p>List all available filters and generators along with all their respective
  21660. options as well as possible minimum and maximum values along with the default
  21661. values.
  21662. </p><div class="example">
  21663. <pre class="example">list_filters=true
  21664. </pre></div>
  21665. </dd>
  21666. <dt><samp>filter</samp></dt>
  21667. <dd><p>Specify all filters by their respective name and options.
  21668. Use <var>list_filters</var> to determine all valid filter names and options.
  21669. Numerical options are specified by a float value and are automatically clamped
  21670. to their respective value range. Vector and color options have to be specified
  21671. by a list of space separated float values. Character escaping has to be done.
  21672. A special option name <code>default</code> is available to use default options for a
  21673. filter.
  21674. </p>
  21675. <p>It is required to specify either <code>default</code> or at least one of the filter options.
  21676. All omitted options are used with their default values.
  21677. The syntax of the filter string is as follows:
  21678. </p><div class="example">
  21679. <pre class="example">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;][@...]][#...]
  21680. </pre></div>
  21681. </dd>
  21682. <dt><samp>output_rect</samp></dt>
  21683. <dd><p>Specify a rectangle where the output of the filter chain is copied into the
  21684. input image. It is given by a list of space separated float values:
  21685. </p><div class="example">
  21686. <pre class="example">output_rect=x\ y\ width\ height
  21687. </pre></div>
  21688. <p>If not given, the output rectangle equals the dimensions of the input image.
  21689. The output rectangle is automatically cropped at the borders of the input
  21690. image. Negative values are valid for each component.
  21691. </p><div class="example">
  21692. <pre class="example">output_rect=25\ 25\ 100\ 100
  21693. </pre></div>
  21694. </dd>
  21695. </dl>
  21696. <p>Several filters can be chained for successive processing without GPU-HOST
  21697. transfers allowing for fast processing of complex filter chains.
  21698. Currently, only filters with zero (generators) or exactly one (filters) input
  21699. image and one output image are supported. Also, transition filters are not yet
  21700. usable as intended.
  21701. </p>
  21702. <p>Some filters generate output images with additional padding depending on the
  21703. respective filter kernel. The padding is automatically removed to ensure the
  21704. filter output has the same size as the input image.
  21705. </p>
  21706. <p>For image generators, the size of the output image is determined by the
  21707. previous output image of the filter chain or the input image of the whole
  21708. filterchain, respectively. The generators do not use the pixel information of
  21709. this image to generate their output. However, the generated output is
  21710. blended onto this image, resulting in partial or complete coverage of the
  21711. output image.
  21712. </p>
  21713. <p>The <a href="#coreimagesrc">coreimagesrc</a> video source can be used for generating input images
  21714. which are directly fed into the filter chain. By using it, providing input
  21715. images by another video source or an input video is not required.
  21716. </p>
  21717. <a name="Examples-65"></a>
  21718. <h4 class="subsection">32.38.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-65" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-65" aria-hidden="true">TOC</a></span></h4>
  21719. <ul>
  21720. <li> List all filters available:
  21721. <div class="example">
  21722. <pre class="example">coreimage=list_filters=true
  21723. </pre></div>
  21724. </li><li> Use the CIBoxBlur filter with default options to blur an image:
  21725. <div class="example">
  21726. <pre class="example">coreimage=filter=CIBoxBlur@default
  21727. </pre></div>
  21728. </li><li> Use a filter chain with CISepiaTone at default values and CIVignetteEffect with
  21729. its center at 100x100 and a radius of 50 pixels:
  21730. <div class="example">
  21731. <pre class="example">coreimage=filter=CIBoxBlur@default#CIVignetteEffect@inputCenter=100\ 100@inputRadius=50
  21732. </pre></div>
  21733. </li><li> Use nullsrc and CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
  21734. given as complete and escaped command-line for Apple&rsquo;s standard bash shell:
  21735. <div class="example">
  21736. <pre class="example">ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
  21737. </pre></div>
  21738. </li></ul>
  21739. <a name="cover_005frect"></a>
  21740. <h3 class="section">32.39 cover_rect<span class="pull-right"><a class="anchor hidden-xs" href="#cover_005frect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-cover_005frect" aria-hidden="true">TOC</a></span></h3>
  21741. <p>Cover a rectangular object
  21742. </p>
  21743. <p>It accepts the following options:
  21744. </p>
  21745. <dl compact="compact">
  21746. <dt><samp>cover</samp></dt>
  21747. <dd><p>Filepath of the optional cover image, needs to be in yuv420.
  21748. </p>
  21749. </dd>
  21750. <dt><samp>mode</samp></dt>
  21751. <dd><p>Set covering mode.
  21752. </p>
  21753. <p>It accepts the following values:
  21754. </p><dl compact="compact">
  21755. <dt>&lsquo;<samp>cover</samp>&rsquo;</dt>
  21756. <dd><p>cover it by the supplied image
  21757. </p></dd>
  21758. <dt>&lsquo;<samp>blur</samp>&rsquo;</dt>
  21759. <dd><p>cover it by interpolating the surrounding pixels
  21760. </p></dd>
  21761. </dl>
  21762. <p>Default value is <var>blur</var>.
  21763. </p></dd>
  21764. </dl>
  21765. <a name="Examples-66"></a>
  21766. <h4 class="subsection">32.39.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-66" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-66" aria-hidden="true">TOC</a></span></h4>
  21767. <ul>
  21768. <li> Cover a rectangular object by the supplied image of a given video using <code>ffmpeg</code>:
  21769. <div class="example">
  21770. <pre class="example">ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
  21771. </pre></div>
  21772. </li></ul>
  21773. <a name="crop"></a>
  21774. <h3 class="section">32.40 crop<span class="pull-right"><a class="anchor hidden-xs" href="#crop" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-crop" aria-hidden="true">TOC</a></span></h3>
  21775. <p>Crop the input video to given dimensions.
  21776. </p>
  21777. <p>It accepts the following parameters:
  21778. </p>
  21779. <dl compact="compact">
  21780. <dt><samp>w, out_w</samp></dt>
  21781. <dd><p>The width of the output video. It defaults to <code>iw</code>.
  21782. This expression is evaluated only once during the filter
  21783. configuration, or when the &lsquo;<samp>w</samp>&rsquo; or &lsquo;<samp>out_w</samp>&rsquo; command is sent.
  21784. </p>
  21785. </dd>
  21786. <dt><samp>h, out_h</samp></dt>
  21787. <dd><p>The height of the output video. It defaults to <code>ih</code>.
  21788. This expression is evaluated only once during the filter
  21789. configuration, or when the &lsquo;<samp>h</samp>&rsquo; or &lsquo;<samp>out_h</samp>&rsquo; command is sent.
  21790. </p>
  21791. </dd>
  21792. <dt><samp>x</samp></dt>
  21793. <dd><p>The horizontal position, in the input video, of the left edge of the output
  21794. video. It defaults to <code>(in_w-out_w)/2</code>.
  21795. This expression is evaluated per-frame.
  21796. </p>
  21797. </dd>
  21798. <dt><samp>y</samp></dt>
  21799. <dd><p>The vertical position, in the input video, of the top edge of the output video.
  21800. It defaults to <code>(in_h-out_h)/2</code>.
  21801. This expression is evaluated per-frame.
  21802. </p>
  21803. </dd>
  21804. <dt><samp>keep_aspect</samp></dt>
  21805. <dd><p>If set to 1 will force the output display aspect ratio
  21806. to be the same of the input, by changing the output sample aspect
  21807. ratio. It defaults to 0.
  21808. </p>
  21809. </dd>
  21810. <dt><samp>exact</samp></dt>
  21811. <dd><p>Enable exact cropping. If enabled, subsampled videos will be cropped at exact
  21812. width/height/x/y as specified and will not be rounded to nearest smaller value.
  21813. It defaults to 0.
  21814. </p></dd>
  21815. </dl>
  21816. <p>The <var>out_w</var>, <var>out_h</var>, <var>x</var>, <var>y</var> parameters are
  21817. expressions containing the following constants:
  21818. </p>
  21819. <dl compact="compact">
  21820. <dt><samp>x</samp></dt>
  21821. <dt><samp>y</samp></dt>
  21822. <dd><p>The computed values for <var>x</var> and <var>y</var>. They are evaluated for
  21823. each new frame.
  21824. </p>
  21825. </dd>
  21826. <dt><samp>in_w</samp></dt>
  21827. <dt><samp>in_h</samp></dt>
  21828. <dd><p>The input width and height.
  21829. </p>
  21830. </dd>
  21831. <dt><samp>iw</samp></dt>
  21832. <dt><samp>ih</samp></dt>
  21833. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  21834. </p>
  21835. </dd>
  21836. <dt><samp>out_w</samp></dt>
  21837. <dt><samp>out_h</samp></dt>
  21838. <dd><p>The output (cropped) width and height.
  21839. </p>
  21840. </dd>
  21841. <dt><samp>ow</samp></dt>
  21842. <dt><samp>oh</samp></dt>
  21843. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>.
  21844. </p>
  21845. </dd>
  21846. <dt><samp>a</samp></dt>
  21847. <dd><p>same as <var>iw</var> / <var>ih</var>
  21848. </p>
  21849. </dd>
  21850. <dt><samp>sar</samp></dt>
  21851. <dd><p>input sample aspect ratio
  21852. </p>
  21853. </dd>
  21854. <dt><samp>dar</samp></dt>
  21855. <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
  21856. </p>
  21857. </dd>
  21858. <dt><samp>hsub</samp></dt>
  21859. <dt><samp>vsub</samp></dt>
  21860. <dd><p>horizontal and vertical chroma subsample values. For example for the
  21861. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  21862. </p>
  21863. </dd>
  21864. <dt><samp>n</samp></dt>
  21865. <dd><p>The number of the input frame, starting from 0.
  21866. </p>
  21867. </dd>
  21868. <dt><samp>pos</samp></dt>
  21869. <dd><p>the position in the file of the input frame, NAN if unknown
  21870. </p>
  21871. </dd>
  21872. <dt><samp>t</samp></dt>
  21873. <dd><p>The timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  21874. </p>
  21875. </dd>
  21876. </dl>
  21877. <p>The expression for <var>out_w</var> may depend on the value of <var>out_h</var>,
  21878. and the expression for <var>out_h</var> may depend on <var>out_w</var>, but they
  21879. cannot depend on <var>x</var> and <var>y</var>, as <var>x</var> and <var>y</var> are
  21880. evaluated after <var>out_w</var> and <var>out_h</var>.
  21881. </p>
  21882. <p>The <var>x</var> and <var>y</var> parameters specify the expressions for the
  21883. position of the top-left corner of the output (non-cropped) area. They
  21884. are evaluated for each frame. If the evaluated value is not valid, it
  21885. is approximated to the nearest valid value.
  21886. </p>
  21887. <p>The expression for <var>x</var> may depend on <var>y</var>, and the expression
  21888. for <var>y</var> may depend on <var>x</var>.
  21889. </p>
  21890. <a name="Examples-67"></a>
  21891. <h4 class="subsection">32.40.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-67" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-67" aria-hidden="true">TOC</a></span></h4>
  21892. <ul>
  21893. <li> Crop area with size 100x100 at position (12,34).
  21894. <div class="example">
  21895. <pre class="example">crop=100:100:12:34
  21896. </pre></div>
  21897. <p>Using named options, the example above becomes:
  21898. </p><div class="example">
  21899. <pre class="example">crop=w=100:h=100:x=12:y=34
  21900. </pre></div>
  21901. </li><li> Crop the central input area with size 100x100:
  21902. <div class="example">
  21903. <pre class="example">crop=100:100
  21904. </pre></div>
  21905. </li><li> Crop the central input area with size 2/3 of the input video:
  21906. <div class="example">
  21907. <pre class="example">crop=2/3*in_w:2/3*in_h
  21908. </pre></div>
  21909. </li><li> Crop the input video central square:
  21910. <div class="example">
  21911. <pre class="example">crop=out_w=in_h
  21912. crop=in_h
  21913. </pre></div>
  21914. </li><li> Delimit the rectangle with the top-left corner placed at position
  21915. 100:100 and the right-bottom corner corresponding to the right-bottom
  21916. corner of the input image.
  21917. <div class="example">
  21918. <pre class="example">crop=in_w-100:in_h-100:100:100
  21919. </pre></div>
  21920. </li><li> Crop 10 pixels from the left and right borders, and 20 pixels from
  21921. the top and bottom borders
  21922. <div class="example">
  21923. <pre class="example">crop=in_w-2*10:in_h-2*20
  21924. </pre></div>
  21925. </li><li> Keep only the bottom right quarter of the input image:
  21926. <div class="example">
  21927. <pre class="example">crop=in_w/2:in_h/2:in_w/2:in_h/2
  21928. </pre></div>
  21929. </li><li> Crop height for getting Greek harmony:
  21930. <div class="example">
  21931. <pre class="example">crop=in_w:1/PHI*in_w
  21932. </pre></div>
  21933. </li><li> Apply trembling effect:
  21934. <div class="example">
  21935. <pre class="example">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)
  21936. </pre></div>
  21937. </li><li> Apply erratic camera effect depending on timestamp:
  21938. <div class="example">
  21939. <pre class="example">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)&quot;
  21940. </pre></div>
  21941. </li><li> Set x depending on the value of y:
  21942. <div class="example">
  21943. <pre class="example">crop=in_w/2:in_h/2:y:10+10*sin(n/10)
  21944. </pre></div>
  21945. </li></ul>
  21946. <a name="Commands-64"></a>
  21947. <h4 class="subsection">32.40.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-64" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-64" aria-hidden="true">TOC</a></span></h4>
  21948. <p>This filter supports the following commands:
  21949. </p><dl compact="compact">
  21950. <dt><samp>w, out_w</samp></dt>
  21951. <dt><samp>h, out_h</samp></dt>
  21952. <dt><samp>x</samp></dt>
  21953. <dt><samp>y</samp></dt>
  21954. <dd><p>Set width/height of the output video and the horizontal/vertical position
  21955. in the input video.
  21956. The command accepts the same syntax of the corresponding option.
  21957. </p>
  21958. <p>If the specified expression is not valid, it is kept at its current
  21959. value.
  21960. </p></dd>
  21961. </dl>
  21962. <a name="cropdetect"></a>
  21963. <h3 class="section">32.41 cropdetect<span class="pull-right"><a class="anchor hidden-xs" href="#cropdetect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-cropdetect" aria-hidden="true">TOC</a></span></h3>
  21964. <p>Auto-detect the crop size.
  21965. </p>
  21966. <p>It calculates the necessary cropping parameters and prints the
  21967. recommended parameters via the logging system. The detected dimensions
  21968. correspond to the non-black area of the input video.
  21969. </p>
  21970. <p>It accepts the following parameters:
  21971. </p>
  21972. <dl compact="compact">
  21973. <dt><samp>limit</samp></dt>
  21974. <dd><p>Set higher black value threshold, which can be optionally specified
  21975. from nothing (0) to everything (255 for 8-bit based formats). An intensity
  21976. value greater to the set value is considered non-black. It defaults to 24.
  21977. You can also specify a value between 0.0 and 1.0 which will be scaled depending
  21978. on the bitdepth of the pixel format.
  21979. </p>
  21980. </dd>
  21981. <dt><samp>round</samp></dt>
  21982. <dd><p>The value which the width/height should be divisible by. It defaults to
  21983. 16. The offset is automatically adjusted to center the video. Use 2 to
  21984. get only even dimensions (needed for 4:2:2 video). 16 is best when
  21985. encoding to most video codecs.
  21986. </p>
  21987. </dd>
  21988. <dt><samp>skip</samp></dt>
  21989. <dd><p>Set the number of initial frames for which evaluation is skipped.
  21990. Default is 2. Range is 0 to INT_MAX.
  21991. </p>
  21992. </dd>
  21993. <dt><samp>reset_count, reset</samp></dt>
  21994. <dd><p>Set the counter that determines after how many frames cropdetect will
  21995. reset the previously detected largest video area and start over to
  21996. detect the current optimal crop area. Default value is 0.
  21997. </p>
  21998. <p>This can be useful when channel logos distort the video area. 0
  21999. indicates &rsquo;never reset&rsquo;, and returns the largest area encountered during
  22000. playback.
  22001. </p></dd>
  22002. </dl>
  22003. <span id="cue"></span><a name="cue-1"></a>
  22004. <h3 class="section">32.42 cue<span class="pull-right"><a class="anchor hidden-xs" href="#cue-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-cue-1" aria-hidden="true">TOC</a></span></h3>
  22005. <p>Delay video filtering until a given wallclock timestamp. The filter first
  22006. passes on <samp>preroll</samp> amount of frames, then it buffers at most
  22007. <samp>buffer</samp> amount of frames and waits for the cue. After reaching the cue
  22008. it forwards the buffered frames and also any subsequent frames coming in its
  22009. input.
  22010. </p>
  22011. <p>The filter can be used synchronize the output of multiple ffmpeg processes for
  22012. realtime output devices like decklink. By putting the delay in the filtering
  22013. chain and pre-buffering frames the process can pass on data to output almost
  22014. immediately after the target wallclock timestamp is reached.
  22015. </p>
  22016. <p>Perfect frame accuracy cannot be guaranteed, but the result is good enough for
  22017. some use cases.
  22018. </p>
  22019. <dl compact="compact">
  22020. <dt><samp>cue</samp></dt>
  22021. <dd><p>The cue timestamp expressed in a UNIX timestamp in microseconds. Default is 0.
  22022. </p>
  22023. </dd>
  22024. <dt><samp>preroll</samp></dt>
  22025. <dd><p>The duration of content to pass on as preroll expressed in seconds. Default is 0.
  22026. </p>
  22027. </dd>
  22028. <dt><samp>buffer</samp></dt>
  22029. <dd><p>The maximum duration of content to buffer before waiting for the cue expressed
  22030. in seconds. Default is 0.
  22031. </p>
  22032. </dd>
  22033. </dl>
  22034. <span id="curves"></span><a name="curves-1"></a>
  22035. <h3 class="section">32.43 curves<span class="pull-right"><a class="anchor hidden-xs" href="#curves-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-curves-1" aria-hidden="true">TOC</a></span></h3>
  22036. <p>Apply color adjustments using curves.
  22037. </p>
  22038. <p>This filter is similar to the Adobe Photoshop and GIMP curves tools. Each
  22039. component (red, green and blue) has its values defined by <var>N</var> key points
  22040. tied from each other using a smooth curve. The x-axis represents the pixel
  22041. values from the input frame, and the y-axis the new pixel values to be set for
  22042. the output frame.
  22043. </p>
  22044. <p>By default, a component curve is defined by the two points <var>(0;0)</var> and
  22045. <var>(1;1)</var>. This creates a straight line where each original pixel value is
  22046. &quot;adjusted&quot; to its own value, which means no change to the image.
  22047. </p>
  22048. <p>The filter allows you to redefine these two points and add some more. A new
  22049. curve (using a natural cubic spline interpolation) will be define to pass
  22050. smoothly through all these new coordinates. The new defined points needs to be
  22051. strictly increasing over the x-axis, and their <var>x</var> and <var>y</var> values must
  22052. be in the <var>[0;1]</var> interval. If the computed curves happened to go outside
  22053. the vector spaces, the values will be clipped accordingly.
  22054. </p>
  22055. <p>The filter accepts the following options:
  22056. </p>
  22057. <dl compact="compact">
  22058. <dt><samp>preset</samp></dt>
  22059. <dd><p>Select one of the available color presets. This option can be used in addition
  22060. to the <samp>r</samp>, <samp>g</samp>, <samp>b</samp> parameters; in this case, the later
  22061. options takes priority on the preset values.
  22062. Available presets are:
  22063. </p><dl compact="compact">
  22064. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  22065. <dt>&lsquo;<samp>color_negative</samp>&rsquo;</dt>
  22066. <dt>&lsquo;<samp>cross_process</samp>&rsquo;</dt>
  22067. <dt>&lsquo;<samp>darker</samp>&rsquo;</dt>
  22068. <dt>&lsquo;<samp>increase_contrast</samp>&rsquo;</dt>
  22069. <dt>&lsquo;<samp>lighter</samp>&rsquo;</dt>
  22070. <dt>&lsquo;<samp>linear_contrast</samp>&rsquo;</dt>
  22071. <dt>&lsquo;<samp>medium_contrast</samp>&rsquo;</dt>
  22072. <dt>&lsquo;<samp>negative</samp>&rsquo;</dt>
  22073. <dt>&lsquo;<samp>strong_contrast</samp>&rsquo;</dt>
  22074. <dt>&lsquo;<samp>vintage</samp>&rsquo;</dt>
  22075. </dl>
  22076. <p>Default is <code>none</code>.
  22077. </p></dd>
  22078. <dt><samp>master, m</samp></dt>
  22079. <dd><p>Set the master key points. These points will define a second pass mapping. It
  22080. is sometimes called a &quot;luminance&quot; or &quot;value&quot; mapping. It can be used with
  22081. <samp>r</samp>, <samp>g</samp>, <samp>b</samp> or <samp>all</samp> since it acts like a
  22082. post-processing LUT.
  22083. </p></dd>
  22084. <dt><samp>red, r</samp></dt>
  22085. <dd><p>Set the key points for the red component.
  22086. </p></dd>
  22087. <dt><samp>green, g</samp></dt>
  22088. <dd><p>Set the key points for the green component.
  22089. </p></dd>
  22090. <dt><samp>blue, b</samp></dt>
  22091. <dd><p>Set the key points for the blue component.
  22092. </p></dd>
  22093. <dt><samp>all</samp></dt>
  22094. <dd><p>Set the key points for all components (not including master).
  22095. Can be used in addition to the other key points component
  22096. options. In this case, the unset component(s) will fallback on this
  22097. <samp>all</samp> setting.
  22098. </p></dd>
  22099. <dt><samp>psfile</samp></dt>
  22100. <dd><p>Specify a Photoshop curves file (<code>.acv</code>) to import the settings from.
  22101. </p></dd>
  22102. <dt><samp>plot</samp></dt>
  22103. <dd><p>Save Gnuplot script of the curves in specified file.
  22104. </p></dd>
  22105. </dl>
  22106. <p>To avoid some filtergraph syntax conflicts, each key points list need to be
  22107. defined using the following syntax: <code>x0/y0 x1/y1 x2/y2 ...</code>.
  22108. </p>
  22109. <a name="Commands-65"></a>
  22110. <h4 class="subsection">32.43.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-65" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-65" aria-hidden="true">TOC</a></span></h4>
  22111. <p>This filter supports same <a href="#commands">commands</a> as options.
  22112. </p>
  22113. <a name="Examples-68"></a>
  22114. <h4 class="subsection">32.43.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-68" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-68" aria-hidden="true">TOC</a></span></h4>
  22115. <ul>
  22116. <li> Increase slightly the middle level of blue:
  22117. <div class="example">
  22118. <pre class="example">curves=blue='0/0 0.5/0.58 1/1'
  22119. </pre></div>
  22120. </li><li> Vintage effect:
  22121. <div class="example">
  22122. <pre class="example">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'
  22123. </pre></div>
  22124. <p>Here we obtain the following coordinates for each components:
  22125. </p><dl compact="compact">
  22126. <dt><var>red</var></dt>
  22127. <dd><p><code>(0;0.11) (0.42;0.51) (1;0.95)</code>
  22128. </p></dd>
  22129. <dt><var>green</var></dt>
  22130. <dd><p><code>(0;0) (0.50;0.48) (1;1)</code>
  22131. </p></dd>
  22132. <dt><var>blue</var></dt>
  22133. <dd><p><code>(0;0.22) (0.49;0.44) (1;0.80)</code>
  22134. </p></dd>
  22135. </dl>
  22136. </li><li> The previous example can also be achieved with the associated built-in preset:
  22137. <div class="example">
  22138. <pre class="example">curves=preset=vintage
  22139. </pre></div>
  22140. </li><li> Or simply:
  22141. <div class="example">
  22142. <pre class="example">curves=vintage
  22143. </pre></div>
  22144. </li><li> Use a Photoshop preset and redefine the points of the green component:
  22145. <div class="example">
  22146. <pre class="example">curves=psfile='MyCurvesPresets/purple.acv':green='0/0 0.45/0.53 1/1'
  22147. </pre></div>
  22148. </li><li> Check out the curves of the <code>cross_process</code> profile using <code>ffmpeg</code>
  22149. and <code>gnuplot</code>:
  22150. <div class="example">
  22151. <pre class="example">ffmpeg -f lavfi -i color -vf curves=cross_process:plot=/tmp/curves.plt -frames:v 1 -f null -
  22152. gnuplot -p /tmp/curves.plt
  22153. </pre></div>
  22154. </li></ul>
  22155. <a name="datascope"></a>
  22156. <h3 class="section">32.44 datascope<span class="pull-right"><a class="anchor hidden-xs" href="#datascope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-datascope" aria-hidden="true">TOC</a></span></h3>
  22157. <p>Video data analysis filter.
  22158. </p>
  22159. <p>This filter shows hexadecimal pixel values of part of video.
  22160. </p>
  22161. <p>The filter accepts the following options:
  22162. </p>
  22163. <dl compact="compact">
  22164. <dt><samp>size, s</samp></dt>
  22165. <dd><p>Set output video size.
  22166. </p>
  22167. </dd>
  22168. <dt><samp>x</samp></dt>
  22169. <dd><p>Set x offset from where to pick pixels.
  22170. </p>
  22171. </dd>
  22172. <dt><samp>y</samp></dt>
  22173. <dd><p>Set y offset from where to pick pixels.
  22174. </p>
  22175. </dd>
  22176. <dt><samp>mode</samp></dt>
  22177. <dd><p>Set scope mode, can be one of the following:
  22178. </p><dl compact="compact">
  22179. <dt>&lsquo;<samp>mono</samp>&rsquo;</dt>
  22180. <dd><p>Draw hexadecimal pixel values with white color on black background.
  22181. </p>
  22182. </dd>
  22183. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  22184. <dd><p>Draw hexadecimal pixel values with input video pixel color on black
  22185. background.
  22186. </p>
  22187. </dd>
  22188. <dt>&lsquo;<samp>color2</samp>&rsquo;</dt>
  22189. <dd><p>Draw hexadecimal pixel values on color background picked from input video,
  22190. the text color is picked in such way so its always visible.
  22191. </p></dd>
  22192. </dl>
  22193. </dd>
  22194. <dt><samp>axis</samp></dt>
  22195. <dd><p>Draw rows and columns numbers on left and top of video.
  22196. </p>
  22197. </dd>
  22198. <dt><samp>opacity</samp></dt>
  22199. <dd><p>Set background opacity.
  22200. </p>
  22201. </dd>
  22202. <dt><samp>format</samp></dt>
  22203. <dd><p>Set display number format. Can be <code>hex</code>, or <code>dec</code>. Default is <code>hex</code>.
  22204. </p>
  22205. </dd>
  22206. <dt><samp>components</samp></dt>
  22207. <dd><p>Set pixel components to display. By default all pixel components are displayed.
  22208. </p></dd>
  22209. </dl>
  22210. <a name="Commands-66"></a>
  22211. <h4 class="subsection">32.44.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-66" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-66" aria-hidden="true">TOC</a></span></h4>
  22212. <p>This filter supports same <a href="#commands">commands</a> as options excluding <code>size</code> option.
  22213. </p>
  22214. <a name="dblur"></a>
  22215. <h3 class="section">32.45 dblur<span class="pull-right"><a class="anchor hidden-xs" href="#dblur" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dblur" aria-hidden="true">TOC</a></span></h3>
  22216. <p>Apply Directional blur filter.
  22217. </p>
  22218. <p>The filter accepts the following options:
  22219. </p>
  22220. <dl compact="compact">
  22221. <dt><samp>angle</samp></dt>
  22222. <dd><p>Set angle of directional blur. Default is <code>45</code>.
  22223. </p>
  22224. </dd>
  22225. <dt><samp>radius</samp></dt>
  22226. <dd><p>Set radius of directional blur. Default is <code>5</code>.
  22227. </p>
  22228. </dd>
  22229. <dt><samp>planes</samp></dt>
  22230. <dd><p>Set which planes to filter. By default all planes are filtered.
  22231. </p></dd>
  22232. </dl>
  22233. <a name="Commands-67"></a>
  22234. <h4 class="subsection">32.45.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-67" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-67" aria-hidden="true">TOC</a></span></h4>
  22235. <p>This filter supports same <a href="#commands">commands</a> as options.
  22236. The command accepts the same syntax of the corresponding option.
  22237. </p>
  22238. <p>If the specified expression is not valid, it is kept at its current
  22239. value.
  22240. </p>
  22241. <a name="dctdnoiz"></a>
  22242. <h3 class="section">32.46 dctdnoiz<span class="pull-right"><a class="anchor hidden-xs" href="#dctdnoiz" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dctdnoiz" aria-hidden="true">TOC</a></span></h3>
  22243. <p>Denoise frames using 2D DCT (frequency domain filtering).
  22244. </p>
  22245. <p>This filter is not designed for real time.
  22246. </p>
  22247. <p>The filter accepts the following options:
  22248. </p>
  22249. <dl compact="compact">
  22250. <dt><samp>sigma, s</samp></dt>
  22251. <dd><p>Set the noise sigma constant.
  22252. </p>
  22253. <p>This <var>sigma</var> defines a hard threshold of <code>3 * sigma</code>; every DCT
  22254. coefficient (absolute value) below this threshold with be dropped.
  22255. </p>
  22256. <p>If you need a more advanced filtering, see <samp>expr</samp>.
  22257. </p>
  22258. <p>Default is <code>0</code>.
  22259. </p>
  22260. </dd>
  22261. <dt><samp>overlap</samp></dt>
  22262. <dd><p>Set number overlapping pixels for each block. Since the filter can be slow, you
  22263. may want to reduce this value, at the cost of a less effective filter and the
  22264. risk of various artefacts.
  22265. </p>
  22266. <p>If the overlapping value doesn&rsquo;t permit processing the whole input width or
  22267. height, a warning will be displayed and according borders won&rsquo;t be denoised.
  22268. </p>
  22269. <p>Default value is <var>blocksize</var>-1, which is the best possible setting.
  22270. </p>
  22271. </dd>
  22272. <dt><samp>expr, e</samp></dt>
  22273. <dd><p>Set the coefficient factor expression.
  22274. </p>
  22275. <p>For each coefficient of a DCT block, this expression will be evaluated as a
  22276. multiplier value for the coefficient.
  22277. </p>
  22278. <p>If this is option is set, the <samp>sigma</samp> option will be ignored.
  22279. </p>
  22280. <p>The absolute value of the coefficient can be accessed through the <var>c</var>
  22281. variable.
  22282. </p>
  22283. </dd>
  22284. <dt><samp>n</samp></dt>
  22285. <dd><p>Set the <var>blocksize</var> using the number of bits. <code>1&lt;&lt;<var>n</var></code> defines the
  22286. <var>blocksize</var>, which is the width and height of the processed blocks.
  22287. </p>
  22288. <p>The default value is <var>3</var> (8x8) and can be raised to <var>4</var> for a
  22289. <var>blocksize</var> of 16x16. Note that changing this setting has huge consequences
  22290. on the speed processing. Also, a larger block size does not necessarily means a
  22291. better de-noising.
  22292. </p></dd>
  22293. </dl>
  22294. <a name="Examples-69"></a>
  22295. <h4 class="subsection">32.46.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-69" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-69" aria-hidden="true">TOC</a></span></h4>
  22296. <p>Apply a denoise with a <samp>sigma</samp> of <code>4.5</code>:
  22297. </p><div class="example">
  22298. <pre class="example">dctdnoiz=4.5
  22299. </pre></div>
  22300. <p>The same operation can be achieved using the expression system:
  22301. </p><div class="example">
  22302. <pre class="example">dctdnoiz=e='gte(c, 4.5*3)'
  22303. </pre></div>
  22304. <p>Violent denoise using a block size of <code>16x16</code>:
  22305. </p><div class="example">
  22306. <pre class="example">dctdnoiz=15:n=4
  22307. </pre></div>
  22308. <a name="deband"></a>
  22309. <h3 class="section">32.47 deband<span class="pull-right"><a class="anchor hidden-xs" href="#deband" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deband" aria-hidden="true">TOC</a></span></h3>
  22310. <p>Remove banding artifacts from input video.
  22311. It works by replacing banded pixels with average value of referenced pixels.
  22312. </p>
  22313. <p>The filter accepts the following options:
  22314. </p>
  22315. <dl compact="compact">
  22316. <dt><samp>1thr</samp></dt>
  22317. <dt><samp>2thr</samp></dt>
  22318. <dt><samp>3thr</samp></dt>
  22319. <dt><samp>4thr</samp></dt>
  22320. <dd><p>Set banding detection threshold for each plane. Default is 0.02.
  22321. Valid range is 0.00003 to 0.5.
  22322. If difference between current pixel and reference pixel is less than threshold,
  22323. it will be considered as banded.
  22324. </p>
  22325. </dd>
  22326. <dt><samp>range, r</samp></dt>
  22327. <dd><p>Banding detection range in pixels. Default is 16. If positive, random number
  22328. in range 0 to set value will be used. If negative, exact absolute value
  22329. will be used.
  22330. The range defines square of four pixels around current pixel.
  22331. </p>
  22332. </dd>
  22333. <dt><samp>direction, d</samp></dt>
  22334. <dd><p>Set direction in radians from which four pixel will be compared. If positive,
  22335. random direction from 0 to set direction will be picked. If negative, exact of
  22336. absolute value will be picked. For example direction 0, -PI or -2*PI radians
  22337. will pick only pixels on same row and -PI/2 will pick only pixels on same
  22338. column.
  22339. </p>
  22340. </dd>
  22341. <dt><samp>blur, b</samp></dt>
  22342. <dd><p>If enabled, current pixel is compared with average value of all four
  22343. surrounding pixels. The default is enabled. If disabled current pixel is
  22344. compared with all four surrounding pixels. The pixel is considered banded
  22345. if only all four differences with surrounding pixels are less than threshold.
  22346. </p>
  22347. </dd>
  22348. <dt><samp>coupling, c</samp></dt>
  22349. <dd><p>If enabled, current pixel is changed if and only if all pixel components are banded,
  22350. e.g. banding detection threshold is triggered for all color components.
  22351. The default is disabled.
  22352. </p></dd>
  22353. </dl>
  22354. <a name="Commands-68"></a>
  22355. <h4 class="subsection">32.47.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-68" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-68" aria-hidden="true">TOC</a></span></h4>
  22356. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  22357. </p>
  22358. <a name="deblock"></a>
  22359. <h3 class="section">32.48 deblock<span class="pull-right"><a class="anchor hidden-xs" href="#deblock" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deblock" aria-hidden="true">TOC</a></span></h3>
  22360. <p>Remove blocking artifacts from input video.
  22361. </p>
  22362. <p>The filter accepts the following options:
  22363. </p>
  22364. <dl compact="compact">
  22365. <dt><samp>filter</samp></dt>
  22366. <dd><p>Set filter type, can be <var>weak</var> or <var>strong</var>. Default is <var>strong</var>.
  22367. This controls what kind of deblocking is applied.
  22368. </p>
  22369. </dd>
  22370. <dt><samp>block</samp></dt>
  22371. <dd><p>Set size of block, allowed range is from 4 to 512. Default is <var>8</var>.
  22372. </p>
  22373. </dd>
  22374. <dt><samp>alpha</samp></dt>
  22375. <dt><samp>beta</samp></dt>
  22376. <dt><samp>gamma</samp></dt>
  22377. <dt><samp>delta</samp></dt>
  22378. <dd><p>Set blocking detection thresholds. Allowed range is 0 to 1.
  22379. Defaults are: <var>0.098</var> for <var>alpha</var> and <var>0.05</var> for the rest.
  22380. Using higher threshold gives more deblocking strength.
  22381. Setting <var>alpha</var> controls threshold detection at exact edge of block.
  22382. Remaining options controls threshold detection near the edge. Each one for
  22383. below/above or left/right. Setting any of those to <var>0</var> disables
  22384. deblocking.
  22385. </p>
  22386. </dd>
  22387. <dt><samp>planes</samp></dt>
  22388. <dd><p>Set planes to filter. Default is to filter all available planes.
  22389. </p></dd>
  22390. </dl>
  22391. <a name="Examples-70"></a>
  22392. <h4 class="subsection">32.48.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-70" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-70" aria-hidden="true">TOC</a></span></h4>
  22393. <ul>
  22394. <li> Deblock using weak filter and block size of 4 pixels.
  22395. <div class="example">
  22396. <pre class="example">deblock=filter=weak:block=4
  22397. </pre></div>
  22398. </li><li> Deblock using strong filter, block size of 4 pixels and custom thresholds for
  22399. deblocking more edges.
  22400. <div class="example">
  22401. <pre class="example">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05
  22402. </pre></div>
  22403. </li><li> Similar as above, but filter only first plane.
  22404. <div class="example">
  22405. <pre class="example">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=1
  22406. </pre></div>
  22407. </li><li> Similar as above, but filter only second and third plane.
  22408. <div class="example">
  22409. <pre class="example">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=6
  22410. </pre></div>
  22411. </li></ul>
  22412. <a name="Commands-69"></a>
  22413. <h4 class="subsection">32.48.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-69" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-69" aria-hidden="true">TOC</a></span></h4>
  22414. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  22415. </p>
  22416. <span id="decimate"></span><a name="decimate-1"></a>
  22417. <h3 class="section">32.49 decimate<span class="pull-right"><a class="anchor hidden-xs" href="#decimate-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-decimate-1" aria-hidden="true">TOC</a></span></h3>
  22418. <p>Drop duplicated frames at regular intervals.
  22419. </p>
  22420. <p>The filter accepts the following options:
  22421. </p>
  22422. <dl compact="compact">
  22423. <dt><samp>cycle</samp></dt>
  22424. <dd><p>Set the number of frames from which one will be dropped. Setting this to
  22425. <var>N</var> means one frame in every batch of <var>N</var> frames will be dropped.
  22426. Default is <code>5</code>.
  22427. </p>
  22428. </dd>
  22429. <dt><samp>dupthresh</samp></dt>
  22430. <dd><p>Set the threshold for duplicate detection. If the difference metric for a frame
  22431. is less than or equal to this value, then it is declared as duplicate. Default
  22432. is <code>1.1</code>
  22433. </p>
  22434. </dd>
  22435. <dt><samp>scthresh</samp></dt>
  22436. <dd><p>Set scene change threshold. Default is <code>15</code>.
  22437. </p>
  22438. </dd>
  22439. <dt><samp>blockx</samp></dt>
  22440. <dt><samp>blocky</samp></dt>
  22441. <dd><p>Set the size of the x and y-axis blocks used during metric calculations.
  22442. Larger blocks give better noise suppression, but also give worse detection of
  22443. small movements. Must be a power of two. Default is <code>32</code>.
  22444. </p>
  22445. </dd>
  22446. <dt><samp>ppsrc</samp></dt>
  22447. <dd><p>Mark main input as a pre-processed input and activate clean source input
  22448. stream. This allows the input to be pre-processed with various filters to help
  22449. the metrics calculation while keeping the frame selection lossless. When set to
  22450. <code>1</code>, the first stream is for the pre-processed input, and the second
  22451. stream is the clean source from where the kept frames are chosen. Default is
  22452. <code>0</code>.
  22453. </p>
  22454. </dd>
  22455. <dt><samp>chroma</samp></dt>
  22456. <dd><p>Set whether or not chroma is considered in the metric calculations. Default is
  22457. <code>1</code>.
  22458. </p></dd>
  22459. </dl>
  22460. <a name="deconvolve"></a>
  22461. <h3 class="section">32.50 deconvolve<span class="pull-right"><a class="anchor hidden-xs" href="#deconvolve" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deconvolve" aria-hidden="true">TOC</a></span></h3>
  22462. <p>Apply 2D deconvolution of video stream in frequency domain using second stream
  22463. as impulse.
  22464. </p>
  22465. <p>The filter accepts the following options:
  22466. </p>
  22467. <dl compact="compact">
  22468. <dt><samp>planes</samp></dt>
  22469. <dd><p>Set which planes to process.
  22470. </p>
  22471. </dd>
  22472. <dt><samp>impulse</samp></dt>
  22473. <dd><p>Set which impulse video frames will be processed, can be <var>first</var>
  22474. or <var>all</var>. Default is <var>all</var>.
  22475. </p>
  22476. </dd>
  22477. <dt><samp>noise</samp></dt>
  22478. <dd><p>Set noise when doing divisions. Default is <var>0.0000001</var>. Useful when width
  22479. and height are not same and not power of 2 or if stream prior to convolving
  22480. had noise.
  22481. </p></dd>
  22482. </dl>
  22483. <p>The <code>deconvolve</code> filter also supports the <a href="#framesync">framesync</a> options.
  22484. </p>
  22485. <a name="dedot"></a>
  22486. <h3 class="section">32.51 dedot<span class="pull-right"><a class="anchor hidden-xs" href="#dedot" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dedot" aria-hidden="true">TOC</a></span></h3>
  22487. <p>Reduce cross-luminance (dot-crawl) and cross-color (rainbows) from video.
  22488. </p>
  22489. <p>It accepts the following options:
  22490. </p>
  22491. <dl compact="compact">
  22492. <dt><samp>m</samp></dt>
  22493. <dd><p>Set mode of operation. Can be combination of <var>dotcrawl</var> for cross-luminance reduction and/or
  22494. <var>rainbows</var> for cross-color reduction.
  22495. </p>
  22496. </dd>
  22497. <dt><samp>lt</samp></dt>
  22498. <dd><p>Set spatial luma threshold. Lower values increases reduction of cross-luminance.
  22499. </p>
  22500. </dd>
  22501. <dt><samp>tl</samp></dt>
  22502. <dd><p>Set tolerance for temporal luma. Higher values increases reduction of cross-luminance.
  22503. </p>
  22504. </dd>
  22505. <dt><samp>tc</samp></dt>
  22506. <dd><p>Set tolerance for chroma temporal variation. Higher values increases reduction of cross-color.
  22507. </p>
  22508. </dd>
  22509. <dt><samp>ct</samp></dt>
  22510. <dd><p>Set temporal chroma threshold. Lower values increases reduction of cross-color.
  22511. </p></dd>
  22512. </dl>
  22513. <a name="deflate"></a>
  22514. <h3 class="section">32.52 deflate<span class="pull-right"><a class="anchor hidden-xs" href="#deflate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deflate" aria-hidden="true">TOC</a></span></h3>
  22515. <p>Apply deflate effect to the video.
  22516. </p>
  22517. <p>This filter replaces the pixel by the local(3x3) average by taking into account
  22518. only values lower than the pixel.
  22519. </p>
  22520. <p>It accepts the following options:
  22521. </p>
  22522. <dl compact="compact">
  22523. <dt><samp>threshold0</samp></dt>
  22524. <dt><samp>threshold1</samp></dt>
  22525. <dt><samp>threshold2</samp></dt>
  22526. <dt><samp>threshold3</samp></dt>
  22527. <dd><p>Limit the maximum change for each plane, default is 65535.
  22528. If 0, plane will remain unchanged.
  22529. </p></dd>
  22530. </dl>
  22531. <a name="Commands-70"></a>
  22532. <h4 class="subsection">32.52.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-70" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-70" aria-hidden="true">TOC</a></span></h4>
  22533. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  22534. </p>
  22535. <a name="deflicker"></a>
  22536. <h3 class="section">32.53 deflicker<span class="pull-right"><a class="anchor hidden-xs" href="#deflicker" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deflicker" aria-hidden="true">TOC</a></span></h3>
  22537. <p>Remove temporal frame luminance variations.
  22538. </p>
  22539. <p>It accepts the following options:
  22540. </p>
  22541. <dl compact="compact">
  22542. <dt><samp>size, s</samp></dt>
  22543. <dd><p>Set moving-average filter size in frames. Default is 5. Allowed range is 2 - 129.
  22544. </p>
  22545. </dd>
  22546. <dt><samp>mode, m</samp></dt>
  22547. <dd><p>Set averaging mode to smooth temporal luminance variations.
  22548. </p>
  22549. <p>Available values are:
  22550. </p><dl compact="compact">
  22551. <dt>&lsquo;<samp>am</samp>&rsquo;</dt>
  22552. <dd><p>Arithmetic mean
  22553. </p>
  22554. </dd>
  22555. <dt>&lsquo;<samp>gm</samp>&rsquo;</dt>
  22556. <dd><p>Geometric mean
  22557. </p>
  22558. </dd>
  22559. <dt>&lsquo;<samp>hm</samp>&rsquo;</dt>
  22560. <dd><p>Harmonic mean
  22561. </p>
  22562. </dd>
  22563. <dt>&lsquo;<samp>qm</samp>&rsquo;</dt>
  22564. <dd><p>Quadratic mean
  22565. </p>
  22566. </dd>
  22567. <dt>&lsquo;<samp>cm</samp>&rsquo;</dt>
  22568. <dd><p>Cubic mean
  22569. </p>
  22570. </dd>
  22571. <dt>&lsquo;<samp>pm</samp>&rsquo;</dt>
  22572. <dd><p>Power mean
  22573. </p>
  22574. </dd>
  22575. <dt>&lsquo;<samp>median</samp>&rsquo;</dt>
  22576. <dd><p>Median
  22577. </p></dd>
  22578. </dl>
  22579. </dd>
  22580. <dt><samp>bypass</samp></dt>
  22581. <dd><p>Do not actually modify frame. Useful when one only wants metadata.
  22582. </p></dd>
  22583. </dl>
  22584. <a name="dejudder"></a>
  22585. <h3 class="section">32.54 dejudder<span class="pull-right"><a class="anchor hidden-xs" href="#dejudder" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dejudder" aria-hidden="true">TOC</a></span></h3>
  22586. <p>Remove judder produced by partially interlaced telecined content.
  22587. </p>
  22588. <p>Judder can be introduced, for instance, by <a href="#pullup">pullup</a> filter. If the original
  22589. source was partially telecined content then the output of <code>pullup,dejudder</code>
  22590. will have a variable frame rate. May change the recorded frame rate of the
  22591. container. Aside from that change, this filter will not affect constant frame
  22592. rate video.
  22593. </p>
  22594. <p>The option available in this filter is:
  22595. </p><dl compact="compact">
  22596. <dt><samp>cycle</samp></dt>
  22597. <dd><p>Specify the length of the window over which the judder repeats.
  22598. </p>
  22599. <p>Accepts any integer greater than 1. Useful values are:
  22600. </p><dl compact="compact">
  22601. <dt>&lsquo;<samp>4</samp>&rsquo;</dt>
  22602. <dd><p>If the original was telecined from 24 to 30 fps (Film to NTSC).
  22603. </p>
  22604. </dd>
  22605. <dt>&lsquo;<samp>5</samp>&rsquo;</dt>
  22606. <dd><p>If the original was telecined from 25 to 30 fps (PAL to NTSC).
  22607. </p>
  22608. </dd>
  22609. <dt>&lsquo;<samp>20</samp>&rsquo;</dt>
  22610. <dd><p>If a mixture of the two.
  22611. </p></dd>
  22612. </dl>
  22613. <p>The default is &lsquo;<samp>4</samp>&rsquo;.
  22614. </p></dd>
  22615. </dl>
  22616. <a name="delogo"></a>
  22617. <h3 class="section">32.55 delogo<span class="pull-right"><a class="anchor hidden-xs" href="#delogo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-delogo" aria-hidden="true">TOC</a></span></h3>
  22618. <p>Suppress a TV station logo by a simple interpolation of the surrounding
  22619. pixels. Just set a rectangle covering the logo and watch it disappear
  22620. (and sometimes something even uglier appear - your mileage may vary).
  22621. </p>
  22622. <p>It accepts the following parameters:
  22623. </p><dl compact="compact">
  22624. <dt><samp>x</samp></dt>
  22625. <dt><samp>y</samp></dt>
  22626. <dd><p>Specify the top left corner coordinates of the logo. They must be
  22627. specified.
  22628. </p>
  22629. </dd>
  22630. <dt><samp>w</samp></dt>
  22631. <dt><samp>h</samp></dt>
  22632. <dd><p>Specify the width and height of the logo to clear. They must be
  22633. specified.
  22634. </p>
  22635. </dd>
  22636. <dt><samp>show</samp></dt>
  22637. <dd><p>When set to 1, a green rectangle is drawn on the screen to simplify
  22638. finding the right <var>x</var>, <var>y</var>, <var>w</var>, and <var>h</var> parameters.
  22639. The default value is 0.
  22640. </p>
  22641. <p>The rectangle is drawn on the outermost pixels which will be (partly)
  22642. replaced with interpolated values. The values of the next pixels
  22643. immediately outside this rectangle in each direction will be used to
  22644. compute the interpolated pixel values inside the rectangle.
  22645. </p>
  22646. </dd>
  22647. </dl>
  22648. <a name="Examples-71"></a>
  22649. <h4 class="subsection">32.55.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-71" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-71" aria-hidden="true">TOC</a></span></h4>
  22650. <ul>
  22651. <li> Set a rectangle covering the area with top left corner coordinates 0,0
  22652. and size 100x77:
  22653. <div class="example">
  22654. <pre class="example">delogo=x=0:y=0:w=100:h=77
  22655. </pre></div>
  22656. </li></ul>
  22657. <span id="derain"></span><a name="derain-1"></a>
  22658. <h3 class="section">32.56 derain<span class="pull-right"><a class="anchor hidden-xs" href="#derain-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-derain-1" aria-hidden="true">TOC</a></span></h3>
  22659. <p>Remove the rain in the input image/video by applying the derain methods based on
  22660. convolutional neural networks. Supported models:
  22661. </p>
  22662. <ul>
  22663. <li> Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
  22664. See <a 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>.
  22665. </li></ul>
  22666. <p>Training as well as model generation scripts are provided in
  22667. the repository at <a href="https://github.com/XueweiMeng/derain_filter.git">https://github.com/XueweiMeng/derain_filter.git</a>.
  22668. </p>
  22669. <p>Native model files (.model) can be generated from TensorFlow model
  22670. files (.pb) by using tools/python/convert.py
  22671. </p>
  22672. <p>The filter accepts the following options:
  22673. </p>
  22674. <dl compact="compact">
  22675. <dt><samp>filter_type</samp></dt>
  22676. <dd><p>Specify which filter to use. This option accepts the following values:
  22677. </p>
  22678. <dl compact="compact">
  22679. <dt>&lsquo;<samp>derain</samp>&rsquo;</dt>
  22680. <dd><p>Derain filter. To conduct derain filter, you need to use a derain model.
  22681. </p>
  22682. </dd>
  22683. <dt>&lsquo;<samp>dehaze</samp>&rsquo;</dt>
  22684. <dd><p>Dehaze filter. To conduct dehaze filter, you need to use a dehaze model.
  22685. </p></dd>
  22686. </dl>
  22687. <p>Default value is &lsquo;<samp>derain</samp>&rsquo;.
  22688. </p>
  22689. </dd>
  22690. <dt><samp>dnn_backend</samp></dt>
  22691. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  22692. the following values:
  22693. </p>
  22694. <dl compact="compact">
  22695. <dt>&lsquo;<samp>native</samp>&rsquo;</dt>
  22696. <dd><p>Native implementation of DNN loading and execution.
  22697. </p>
  22698. </dd>
  22699. <dt>&lsquo;<samp>tensorflow</samp>&rsquo;</dt>
  22700. <dd><p>TensorFlow backend. To enable this backend you
  22701. need to install the TensorFlow for C library (see
  22702. <a href="https://www.tensorflow.org/install/install_c">https://www.tensorflow.org/install/install_c</a>) and configure FFmpeg with
  22703. <code>--enable-libtensorflow</code>
  22704. </p></dd>
  22705. </dl>
  22706. <p>Default value is &lsquo;<samp>native</samp>&rsquo;.
  22707. </p>
  22708. </dd>
  22709. <dt><samp>model</samp></dt>
  22710. <dd><p>Set path to model file specifying network architecture and its parameters.
  22711. Note that different backends use different file formats. TensorFlow and native
  22712. backend can load files for only its format.
  22713. </p></dd>
  22714. </dl>
  22715. <p>It can also be finished with <a href="#dnn_005fprocessing">dnn_processing</a> filter.
  22716. </p>
  22717. <a name="deshake"></a>
  22718. <h3 class="section">32.57 deshake<span class="pull-right"><a class="anchor hidden-xs" href="#deshake" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deshake" aria-hidden="true">TOC</a></span></h3>
  22719. <p>Attempt to fix small changes in horizontal and/or vertical shift. This
  22720. filter helps remove camera shake from hand-holding a camera, bumping a
  22721. tripod, moving on a vehicle, etc.
  22722. </p>
  22723. <p>The filter accepts the following options:
  22724. </p>
  22725. <dl compact="compact">
  22726. <dt><samp>x</samp></dt>
  22727. <dt><samp>y</samp></dt>
  22728. <dt><samp>w</samp></dt>
  22729. <dt><samp>h</samp></dt>
  22730. <dd><p>Specify a rectangular area where to limit the search for motion
  22731. vectors.
  22732. If desired the search for motion vectors can be limited to a
  22733. rectangular area of the frame defined by its top left corner, width
  22734. and height. These parameters have the same meaning as the drawbox
  22735. filter which can be used to visualise the position of the bounding
  22736. box.
  22737. </p>
  22738. <p>This is useful when simultaneous movement of subjects within the frame
  22739. might be confused for camera motion by the motion vector search.
  22740. </p>
  22741. <p>If any or all of <var>x</var>, <var>y</var>, <var>w</var> and <var>h</var> are set to -1
  22742. then the full frame is used. This allows later options to be set
  22743. without specifying the bounding box for the motion vector search.
  22744. </p>
  22745. <p>Default - search the whole frame.
  22746. </p>
  22747. </dd>
  22748. <dt><samp>rx</samp></dt>
  22749. <dt><samp>ry</samp></dt>
  22750. <dd><p>Specify the maximum extent of movement in x and y directions in the
  22751. range 0-64 pixels. Default 16.
  22752. </p>
  22753. </dd>
  22754. <dt><samp>edge</samp></dt>
  22755. <dd><p>Specify how to generate pixels to fill blanks at the edge of the
  22756. frame. Available values are:
  22757. </p><dl compact="compact">
  22758. <dt>&lsquo;<samp>blank, 0</samp>&rsquo;</dt>
  22759. <dd><p>Fill zeroes at blank locations
  22760. </p></dd>
  22761. <dt>&lsquo;<samp>original, 1</samp>&rsquo;</dt>
  22762. <dd><p>Original image at blank locations
  22763. </p></dd>
  22764. <dt>&lsquo;<samp>clamp, 2</samp>&rsquo;</dt>
  22765. <dd><p>Extruded edge value at blank locations
  22766. </p></dd>
  22767. <dt>&lsquo;<samp>mirror, 3</samp>&rsquo;</dt>
  22768. <dd><p>Mirrored edge at blank locations
  22769. </p></dd>
  22770. </dl>
  22771. <p>Default value is &lsquo;<samp>mirror</samp>&rsquo;.
  22772. </p>
  22773. </dd>
  22774. <dt><samp>blocksize</samp></dt>
  22775. <dd><p>Specify the blocksize to use for motion search. Range 4-128 pixels,
  22776. default 8.
  22777. </p>
  22778. </dd>
  22779. <dt><samp>contrast</samp></dt>
  22780. <dd><p>Specify the contrast threshold for blocks. Only blocks with more than
  22781. the specified contrast (difference between darkest and lightest
  22782. pixels) will be considered. Range 1-255, default 125.
  22783. </p>
  22784. </dd>
  22785. <dt><samp>search</samp></dt>
  22786. <dd><p>Specify the search strategy. Available values are:
  22787. </p><dl compact="compact">
  22788. <dt>&lsquo;<samp>exhaustive, 0</samp>&rsquo;</dt>
  22789. <dd><p>Set exhaustive search
  22790. </p></dd>
  22791. <dt>&lsquo;<samp>less, 1</samp>&rsquo;</dt>
  22792. <dd><p>Set less exhaustive search.
  22793. </p></dd>
  22794. </dl>
  22795. <p>Default value is &lsquo;<samp>exhaustive</samp>&rsquo;.
  22796. </p>
  22797. </dd>
  22798. <dt><samp>filename</samp></dt>
  22799. <dd><p>If set then a detailed log of the motion search is written to the
  22800. specified file.
  22801. </p>
  22802. </dd>
  22803. </dl>
  22804. <a name="despill"></a>
  22805. <h3 class="section">32.58 despill<span class="pull-right"><a class="anchor hidden-xs" href="#despill" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-despill" aria-hidden="true">TOC</a></span></h3>
  22806. <p>Remove unwanted contamination of foreground colors, caused by reflected color of
  22807. greenscreen or bluescreen.
  22808. </p>
  22809. <p>This filter accepts the following options:
  22810. </p>
  22811. <dl compact="compact">
  22812. <dt><samp>type</samp></dt>
  22813. <dd><p>Set what type of despill to use.
  22814. </p>
  22815. </dd>
  22816. <dt><samp>mix</samp></dt>
  22817. <dd><p>Set how spillmap will be generated.
  22818. </p>
  22819. </dd>
  22820. <dt><samp>expand</samp></dt>
  22821. <dd><p>Set how much to get rid of still remaining spill.
  22822. </p>
  22823. </dd>
  22824. <dt><samp>red</samp></dt>
  22825. <dd><p>Controls amount of red in spill area.
  22826. </p>
  22827. </dd>
  22828. <dt><samp>green</samp></dt>
  22829. <dd><p>Controls amount of green in spill area.
  22830. Should be -1 for greenscreen.
  22831. </p>
  22832. </dd>
  22833. <dt><samp>blue</samp></dt>
  22834. <dd><p>Controls amount of blue in spill area.
  22835. Should be -1 for bluescreen.
  22836. </p>
  22837. </dd>
  22838. <dt><samp>brightness</samp></dt>
  22839. <dd><p>Controls brightness of spill area, preserving colors.
  22840. </p>
  22841. </dd>
  22842. <dt><samp>alpha</samp></dt>
  22843. <dd><p>Modify alpha from generated spillmap.
  22844. </p></dd>
  22845. </dl>
  22846. <a name="Commands-71"></a>
  22847. <h4 class="subsection">32.58.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-71" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-71" aria-hidden="true">TOC</a></span></h4>
  22848. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  22849. </p>
  22850. <a name="detelecine"></a>
  22851. <h3 class="section">32.59 detelecine<span class="pull-right"><a class="anchor hidden-xs" href="#detelecine" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-detelecine" aria-hidden="true">TOC</a></span></h3>
  22852. <p>Apply an exact inverse of the telecine operation. It requires a predefined
  22853. pattern specified using the pattern option which must be the same as that passed
  22854. to the telecine filter.
  22855. </p>
  22856. <p>This filter accepts the following options:
  22857. </p>
  22858. <dl compact="compact">
  22859. <dt><samp>first_field</samp></dt>
  22860. <dd><dl compact="compact">
  22861. <dt>&lsquo;<samp>top, t</samp>&rsquo;</dt>
  22862. <dd><p>top field first
  22863. </p></dd>
  22864. <dt>&lsquo;<samp>bottom, b</samp>&rsquo;</dt>
  22865. <dd><p>bottom field first
  22866. The default value is <code>top</code>.
  22867. </p></dd>
  22868. </dl>
  22869. </dd>
  22870. <dt><samp>pattern</samp></dt>
  22871. <dd><p>A string of numbers representing the pulldown pattern you wish to apply.
  22872. The default value is <code>23</code>.
  22873. </p>
  22874. </dd>
  22875. <dt><samp>start_frame</samp></dt>
  22876. <dd><p>A number representing position of the first frame with respect to the telecine
  22877. pattern. This is to be used if the stream is cut. The default value is <code>0</code>.
  22878. </p></dd>
  22879. </dl>
  22880. <a name="dilation"></a>
  22881. <h3 class="section">32.60 dilation<span class="pull-right"><a class="anchor hidden-xs" href="#dilation" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dilation" aria-hidden="true">TOC</a></span></h3>
  22882. <p>Apply dilation effect to the video.
  22883. </p>
  22884. <p>This filter replaces the pixel by the local(3x3) maximum.
  22885. </p>
  22886. <p>It accepts the following options:
  22887. </p>
  22888. <dl compact="compact">
  22889. <dt><samp>threshold0</samp></dt>
  22890. <dt><samp>threshold1</samp></dt>
  22891. <dt><samp>threshold2</samp></dt>
  22892. <dt><samp>threshold3</samp></dt>
  22893. <dd><p>Limit the maximum change for each plane, default is 65535.
  22894. If 0, plane will remain unchanged.
  22895. </p>
  22896. </dd>
  22897. <dt><samp>coordinates</samp></dt>
  22898. <dd><p>Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
  22899. pixels are used.
  22900. </p>
  22901. <p>Flags to local 3x3 coordinates maps like this:
  22902. </p>
  22903. <p>1 2 3
  22904. 4 5
  22905. 6 7 8
  22906. </p></dd>
  22907. </dl>
  22908. <a name="Commands-72"></a>
  22909. <h4 class="subsection">32.60.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-72" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-72" aria-hidden="true">TOC</a></span></h4>
  22910. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  22911. </p>
  22912. <a name="displace"></a>
  22913. <h3 class="section">32.61 displace<span class="pull-right"><a class="anchor hidden-xs" href="#displace" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-displace" aria-hidden="true">TOC</a></span></h3>
  22914. <p>Displace pixels as indicated by second and third input stream.
  22915. </p>
  22916. <p>It takes three input streams and outputs one stream, the first input is the
  22917. source, and second and third input are displacement maps.
  22918. </p>
  22919. <p>The second input specifies how much to displace pixels along the
  22920. x-axis, while the third input specifies how much to displace pixels
  22921. along the y-axis.
  22922. If one of displacement map streams terminates, last frame from that
  22923. displacement map will be used.
  22924. </p>
  22925. <p>Note that once generated, displacements maps can be reused over and over again.
  22926. </p>
  22927. <p>A description of the accepted options follows.
  22928. </p>
  22929. <dl compact="compact">
  22930. <dt><samp>edge</samp></dt>
  22931. <dd><p>Set displace behavior for pixels that are out of range.
  22932. </p>
  22933. <p>Available values are:
  22934. </p><dl compact="compact">
  22935. <dt>&lsquo;<samp>blank</samp>&rsquo;</dt>
  22936. <dd><p>Missing pixels are replaced by black pixels.
  22937. </p>
  22938. </dd>
  22939. <dt>&lsquo;<samp>smear</samp>&rsquo;</dt>
  22940. <dd><p>Adjacent pixels will spread out to replace missing pixels.
  22941. </p>
  22942. </dd>
  22943. <dt>&lsquo;<samp>wrap</samp>&rsquo;</dt>
  22944. <dd><p>Out of range pixels are wrapped so they point to pixels of other side.
  22945. </p>
  22946. </dd>
  22947. <dt>&lsquo;<samp>mirror</samp>&rsquo;</dt>
  22948. <dd><p>Out of range pixels will be replaced with mirrored pixels.
  22949. </p></dd>
  22950. </dl>
  22951. <p>Default is &lsquo;<samp>smear</samp>&rsquo;.
  22952. </p>
  22953. </dd>
  22954. </dl>
  22955. <a name="Examples-72"></a>
  22956. <h4 class="subsection">32.61.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-72" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-72" aria-hidden="true">TOC</a></span></h4>
  22957. <ul>
  22958. <li> Add ripple effect to rgb input of video size hd720:
  22959. <div class="example">
  22960. <pre class="example">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
  22961. </pre></div>
  22962. </li><li> Add wave effect to rgb input of video size hd720:
  22963. <div class="example">
  22964. <pre class="example">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
  22965. </pre></div>
  22966. </li></ul>
  22967. <span id="dnn_005fprocessing"></span><a name="dnn_005fprocessing-1"></a>
  22968. <h3 class="section">32.62 dnn_processing<span class="pull-right"><a class="anchor hidden-xs" href="#dnn_005fprocessing-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dnn_005fprocessing-1" aria-hidden="true">TOC</a></span></h3>
  22969. <p>Do image processing with deep neural networks. It works together with another filter
  22970. which converts the pixel format of the Frame to what the dnn network requires.
  22971. </p>
  22972. <p>The filter accepts the following options:
  22973. </p>
  22974. <dl compact="compact">
  22975. <dt><samp>dnn_backend</samp></dt>
  22976. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  22977. the following values:
  22978. </p>
  22979. <dl compact="compact">
  22980. <dt>&lsquo;<samp>native</samp>&rsquo;</dt>
  22981. <dd><p>Native implementation of DNN loading and execution.
  22982. </p>
  22983. </dd>
  22984. <dt>&lsquo;<samp>tensorflow</samp>&rsquo;</dt>
  22985. <dd><p>TensorFlow backend. To enable this backend you
  22986. need to install the TensorFlow for C library (see
  22987. <a href="https://www.tensorflow.org/install/install_c">https://www.tensorflow.org/install/install_c</a>) and configure FFmpeg with
  22988. <code>--enable-libtensorflow</code>
  22989. </p>
  22990. </dd>
  22991. <dt>&lsquo;<samp>openvino</samp>&rsquo;</dt>
  22992. <dd><p>OpenVINO backend. To enable this backend you
  22993. need to build and install the OpenVINO for C library (see
  22994. <a 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
  22995. <code>--enable-libopenvino</code> (&ndash;extra-cflags=-I... &ndash;extra-ldflags=-L... might
  22996. be needed if the header files and libraries are not installed into system path)
  22997. </p>
  22998. </dd>
  22999. </dl>
  23000. <p>Default value is &lsquo;<samp>native</samp>&rsquo;.
  23001. </p>
  23002. </dd>
  23003. <dt><samp>model</samp></dt>
  23004. <dd><p>Set path to model file specifying network architecture and its parameters.
  23005. Note that different backends use different file formats. TensorFlow, OpenVINO and native
  23006. backend can load files for only its format.
  23007. </p>
  23008. <p>Native model file (.model) can be generated from TensorFlow model file (.pb) by using tools/python/convert.py
  23009. </p>
  23010. </dd>
  23011. <dt><samp>input</samp></dt>
  23012. <dd><p>Set the input name of the dnn network.
  23013. </p>
  23014. </dd>
  23015. <dt><samp>output</samp></dt>
  23016. <dd><p>Set the output name of the dnn network.
  23017. </p>
  23018. </dd>
  23019. <dt><samp>async</samp></dt>
  23020. <dd><p>use DNN async execution if set (default: set),
  23021. roll back to sync execution if the backend does not support async.
  23022. </p>
  23023. </dd>
  23024. </dl>
  23025. <a name="Examples-73"></a>
  23026. <h4 class="subsection">32.62.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-73" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-73" aria-hidden="true">TOC</a></span></h4>
  23027. <ul>
  23028. <li> Remove rain in rgb24 frame with can.pb (see <a href="#derain">derain</a> filter):
  23029. <div class="example">
  23030. <pre class="example">./ffmpeg -i rain.jpg -vf format=rgb24,dnn_processing=dnn_backend=tensorflow:model=can.pb:input=x:output=y derain.jpg
  23031. </pre></div>
  23032. </li><li> Halve the pixel value of the frame with format gray32f:
  23033. <div class="example">
  23034. <pre class="example">ffmpeg -i input.jpg -vf format=grayf32,dnn_processing=model=halve_gray_float.model:input=dnn_in:output=dnn_out:dnn_backend=native -y out.native.png
  23035. </pre></div>
  23036. </li><li> Handle the Y channel with srcnn.pb (see <a href="#sr">sr</a> filter) for frame with yuv420p (planar YUV formats supported):
  23037. <div class="example">
  23038. <pre class="example">./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
  23039. </pre></div>
  23040. </li><li> Handle the Y channel with espcn.pb (see <a href="#sr">sr</a> filter), which changes frame size, for format yuv420p (planar YUV formats supported):
  23041. <div class="example">
  23042. <pre class="example">./ffmpeg -i 480p.jpg -vf format=yuv420p,dnn_processing=dnn_backend=tensorflow:model=espcn.pb:input=x:output=y -y tmp.espcn.jpg
  23043. </pre></div>
  23044. </li></ul>
  23045. <a name="drawbox"></a>
  23046. <h3 class="section">32.63 drawbox<span class="pull-right"><a class="anchor hidden-xs" href="#drawbox" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-drawbox" aria-hidden="true">TOC</a></span></h3>
  23047. <p>Draw a colored box on the input image.
  23048. </p>
  23049. <p>It accepts the following parameters:
  23050. </p>
  23051. <dl compact="compact">
  23052. <dt><samp>x</samp></dt>
  23053. <dt><samp>y</samp></dt>
  23054. <dd><p>The expressions which specify the top left corner coordinates of the box. It defaults to 0.
  23055. </p>
  23056. </dd>
  23057. <dt><samp>width, w</samp></dt>
  23058. <dt><samp>height, h</samp></dt>
  23059. <dd><p>The expressions which specify the width and height of the box; if 0 they are interpreted as
  23060. the input width and height. It defaults to 0.
  23061. </p>
  23062. </dd>
  23063. <dt><samp>color, c</samp></dt>
  23064. <dd><p>Specify the color of the box to write. For the general syntax of this option,
  23065. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>. If the special
  23066. value <code>invert</code> is used, the box edge color is the same as the
  23067. video with inverted luma.
  23068. </p>
  23069. </dd>
  23070. <dt><samp>thickness, t</samp></dt>
  23071. <dd><p>The expression which sets the thickness of the box edge.
  23072. A value of <code>fill</code> will create a filled box. Default value is <code>3</code>.
  23073. </p>
  23074. <p>See below for the list of accepted constants.
  23075. </p>
  23076. </dd>
  23077. <dt><samp>replace</samp></dt>
  23078. <dd><p>Applicable if the input has alpha. With value <code>1</code>, the pixels of the painted box
  23079. will overwrite the video&rsquo;s color and alpha pixels.
  23080. Default is <code>0</code>, which composites the box onto the input, leaving the video&rsquo;s alpha intact.
  23081. </p></dd>
  23082. </dl>
  23083. <p>The parameters for <var>x</var>, <var>y</var>, <var>w</var> and <var>h</var> and <var>t</var> are expressions containing the
  23084. following constants:
  23085. </p>
  23086. <dl compact="compact">
  23087. <dt><samp>dar</samp></dt>
  23088. <dd><p>The input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>.
  23089. </p>
  23090. </dd>
  23091. <dt><samp>hsub</samp></dt>
  23092. <dt><samp>vsub</samp></dt>
  23093. <dd><p>horizontal and vertical chroma subsample values. For example for the
  23094. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  23095. </p>
  23096. </dd>
  23097. <dt><samp>in_h, ih</samp></dt>
  23098. <dt><samp>in_w, iw</samp></dt>
  23099. <dd><p>The input width and height.
  23100. </p>
  23101. </dd>
  23102. <dt><samp>sar</samp></dt>
  23103. <dd><p>The input sample aspect ratio.
  23104. </p>
  23105. </dd>
  23106. <dt><samp>x</samp></dt>
  23107. <dt><samp>y</samp></dt>
  23108. <dd><p>The x and y offset coordinates where the box is drawn.
  23109. </p>
  23110. </dd>
  23111. <dt><samp>w</samp></dt>
  23112. <dt><samp>h</samp></dt>
  23113. <dd><p>The width and height of the drawn box.
  23114. </p>
  23115. </dd>
  23116. <dt><samp>t</samp></dt>
  23117. <dd><p>The thickness of the drawn box.
  23118. </p>
  23119. <p>These constants allow the <var>x</var>, <var>y</var>, <var>w</var>, <var>h</var> and <var>t</var> expressions to refer to
  23120. each other, so you may for example specify <code>y=x/dar</code> or <code>h=w/dar</code>.
  23121. </p>
  23122. </dd>
  23123. </dl>
  23124. <a name="Examples-74"></a>
  23125. <h4 class="subsection">32.63.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-74" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-74" aria-hidden="true">TOC</a></span></h4>
  23126. <ul>
  23127. <li> Draw a black box around the edge of the input image:
  23128. <div class="example">
  23129. <pre class="example">drawbox
  23130. </pre></div>
  23131. </li><li> Draw a box with color red and an opacity of 50%:
  23132. <div class="example">
  23133. <pre class="example">drawbox=10:20:200:60:red@0.5
  23134. </pre></div>
  23135. <p>The previous example can be specified as:
  23136. </p><div class="example">
  23137. <pre class="example">drawbox=x=10:y=20:w=200:h=60:color=red@0.5
  23138. </pre></div>
  23139. </li><li> Fill the box with pink color:
  23140. <div class="example">
  23141. <pre class="example">drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=fill
  23142. </pre></div>
  23143. </li><li> Draw a 2-pixel red 2.40:1 mask:
  23144. <div class="example">
  23145. <pre class="example">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
  23146. </pre></div>
  23147. </li></ul>
  23148. <a name="Commands-73"></a>
  23149. <h4 class="subsection">32.63.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-73" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-73" aria-hidden="true">TOC</a></span></h4>
  23150. <p>This filter supports same commands as options.
  23151. The command accepts the same syntax of the corresponding option.
  23152. </p>
  23153. <p>If the specified expression is not valid, it is kept at its current
  23154. value.
  23155. </p>
  23156. <span id="drawgraph"></span><a name="drawgraph-1"></a>
  23157. <h3 class="section">32.64 drawgraph<span class="pull-right"><a class="anchor hidden-xs" href="#drawgraph-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-drawgraph-1" aria-hidden="true">TOC</a></span></h3>
  23158. <p>Draw a graph using input video metadata.
  23159. </p>
  23160. <p>It accepts the following parameters:
  23161. </p>
  23162. <dl compact="compact">
  23163. <dt><samp>m1</samp></dt>
  23164. <dd><p>Set 1st frame metadata key from which metadata values will be used to draw a graph.
  23165. </p>
  23166. </dd>
  23167. <dt><samp>fg1</samp></dt>
  23168. <dd><p>Set 1st foreground color expression.
  23169. </p>
  23170. </dd>
  23171. <dt><samp>m2</samp></dt>
  23172. <dd><p>Set 2nd frame metadata key from which metadata values will be used to draw a graph.
  23173. </p>
  23174. </dd>
  23175. <dt><samp>fg2</samp></dt>
  23176. <dd><p>Set 2nd foreground color expression.
  23177. </p>
  23178. </dd>
  23179. <dt><samp>m3</samp></dt>
  23180. <dd><p>Set 3rd frame metadata key from which metadata values will be used to draw a graph.
  23181. </p>
  23182. </dd>
  23183. <dt><samp>fg3</samp></dt>
  23184. <dd><p>Set 3rd foreground color expression.
  23185. </p>
  23186. </dd>
  23187. <dt><samp>m4</samp></dt>
  23188. <dd><p>Set 4th frame metadata key from which metadata values will be used to draw a graph.
  23189. </p>
  23190. </dd>
  23191. <dt><samp>fg4</samp></dt>
  23192. <dd><p>Set 4th foreground color expression.
  23193. </p>
  23194. </dd>
  23195. <dt><samp>min</samp></dt>
  23196. <dd><p>Set minimal value of metadata value.
  23197. </p>
  23198. </dd>
  23199. <dt><samp>max</samp></dt>
  23200. <dd><p>Set maximal value of metadata value.
  23201. </p>
  23202. </dd>
  23203. <dt><samp>bg</samp></dt>
  23204. <dd><p>Set graph background color. Default is white.
  23205. </p>
  23206. </dd>
  23207. <dt><samp>mode</samp></dt>
  23208. <dd><p>Set graph mode.
  23209. </p>
  23210. <p>Available values for mode is:
  23211. </p><dl compact="compact">
  23212. <dt>&lsquo;<samp>bar</samp>&rsquo;</dt>
  23213. <dt>&lsquo;<samp>dot</samp>&rsquo;</dt>
  23214. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  23215. </dl>
  23216. <p>Default is <code>line</code>.
  23217. </p>
  23218. </dd>
  23219. <dt><samp>slide</samp></dt>
  23220. <dd><p>Set slide mode.
  23221. </p>
  23222. <p>Available values for slide is:
  23223. </p><dl compact="compact">
  23224. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  23225. <dd><p>Draw new frame when right border is reached.
  23226. </p>
  23227. </dd>
  23228. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  23229. <dd><p>Replace old columns with new ones.
  23230. </p>
  23231. </dd>
  23232. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  23233. <dd><p>Scroll from right to left.
  23234. </p>
  23235. </dd>
  23236. <dt>&lsquo;<samp>rscroll</samp>&rsquo;</dt>
  23237. <dd><p>Scroll from left to right.
  23238. </p>
  23239. </dd>
  23240. <dt>&lsquo;<samp>picture</samp>&rsquo;</dt>
  23241. <dd><p>Draw single picture.
  23242. </p></dd>
  23243. </dl>
  23244. <p>Default is <code>frame</code>.
  23245. </p>
  23246. </dd>
  23247. <dt><samp>size</samp></dt>
  23248. <dd><p>Set size of graph video. For the syntax of this option, check the
  23249. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  23250. The default value is <code>900x256</code>.
  23251. </p>
  23252. </dd>
  23253. <dt><samp>rate, r</samp></dt>
  23254. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  23255. </p>
  23256. <p>The foreground color expressions can use the following variables:
  23257. </p><dl compact="compact">
  23258. <dt><samp>MIN</samp></dt>
  23259. <dd><p>Minimal value of metadata value.
  23260. </p>
  23261. </dd>
  23262. <dt><samp>MAX</samp></dt>
  23263. <dd><p>Maximal value of metadata value.
  23264. </p>
  23265. </dd>
  23266. <dt><samp>VAL</samp></dt>
  23267. <dd><p>Current metadata key value.
  23268. </p></dd>
  23269. </dl>
  23270. <p>The color is defined as 0xAABBGGRR.
  23271. </p></dd>
  23272. </dl>
  23273. <p>Example using metadata from <a href="#signalstats">signalstats</a> filter:
  23274. </p><div class="example">
  23275. <pre class="example">signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
  23276. </pre></div>
  23277. <p>Example using metadata from <a href="#ebur128">ebur128</a> filter:
  23278. </p><div class="example">
  23279. <pre class="example">ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
  23280. </pre></div>
  23281. <a name="drawgrid"></a>
  23282. <h3 class="section">32.65 drawgrid<span class="pull-right"><a class="anchor hidden-xs" href="#drawgrid" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-drawgrid" aria-hidden="true">TOC</a></span></h3>
  23283. <p>Draw a grid on the input image.
  23284. </p>
  23285. <p>It accepts the following parameters:
  23286. </p>
  23287. <dl compact="compact">
  23288. <dt><samp>x</samp></dt>
  23289. <dt><samp>y</samp></dt>
  23290. <dd><p>The expressions which specify the coordinates of some point of grid intersection (meant to configure offset). Both default to 0.
  23291. </p>
  23292. </dd>
  23293. <dt><samp>width, w</samp></dt>
  23294. <dt><samp>height, h</samp></dt>
  23295. <dd><p>The expressions which specify the width and height of the grid cell, if 0 they are interpreted as the
  23296. input width and height, respectively, minus <code>thickness</code>, so image gets
  23297. framed. Default to 0.
  23298. </p>
  23299. </dd>
  23300. <dt><samp>color, c</samp></dt>
  23301. <dd><p>Specify the color of the grid. For the general syntax of this option,
  23302. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>. If the special
  23303. value <code>invert</code> is used, the grid color is the same as the
  23304. video with inverted luma.
  23305. </p>
  23306. </dd>
  23307. <dt><samp>thickness, t</samp></dt>
  23308. <dd><p>The expression which sets the thickness of the grid line. Default value is <code>1</code>.
  23309. </p>
  23310. <p>See below for the list of accepted constants.
  23311. </p>
  23312. </dd>
  23313. <dt><samp>replace</samp></dt>
  23314. <dd><p>Applicable if the input has alpha. With <code>1</code> the pixels of the painted grid
  23315. will overwrite the video&rsquo;s color and alpha pixels.
  23316. Default is <code>0</code>, which composites the grid onto the input, leaving the video&rsquo;s alpha intact.
  23317. </p></dd>
  23318. </dl>
  23319. <p>The parameters for <var>x</var>, <var>y</var>, <var>w</var> and <var>h</var> and <var>t</var> are expressions containing the
  23320. following constants:
  23321. </p>
  23322. <dl compact="compact">
  23323. <dt><samp>dar</samp></dt>
  23324. <dd><p>The input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>.
  23325. </p>
  23326. </dd>
  23327. <dt><samp>hsub</samp></dt>
  23328. <dt><samp>vsub</samp></dt>
  23329. <dd><p>horizontal and vertical chroma subsample values. For example for the
  23330. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  23331. </p>
  23332. </dd>
  23333. <dt><samp>in_h, ih</samp></dt>
  23334. <dt><samp>in_w, iw</samp></dt>
  23335. <dd><p>The input grid cell width and height.
  23336. </p>
  23337. </dd>
  23338. <dt><samp>sar</samp></dt>
  23339. <dd><p>The input sample aspect ratio.
  23340. </p>
  23341. </dd>
  23342. <dt><samp>x</samp></dt>
  23343. <dt><samp>y</samp></dt>
  23344. <dd><p>The x and y coordinates of some point of grid intersection (meant to configure offset).
  23345. </p>
  23346. </dd>
  23347. <dt><samp>w</samp></dt>
  23348. <dt><samp>h</samp></dt>
  23349. <dd><p>The width and height of the drawn cell.
  23350. </p>
  23351. </dd>
  23352. <dt><samp>t</samp></dt>
  23353. <dd><p>The thickness of the drawn cell.
  23354. </p>
  23355. <p>These constants allow the <var>x</var>, <var>y</var>, <var>w</var>, <var>h</var> and <var>t</var> expressions to refer to
  23356. each other, so you may for example specify <code>y=x/dar</code> or <code>h=w/dar</code>.
  23357. </p>
  23358. </dd>
  23359. </dl>
  23360. <a name="Examples-75"></a>
  23361. <h4 class="subsection">32.65.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-75" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-75" aria-hidden="true">TOC</a></span></h4>
  23362. <ul>
  23363. <li> Draw a grid with cell 100x100 pixels, thickness 2 pixels, with color red and an opacity of 50%:
  23364. <div class="example">
  23365. <pre class="example">drawgrid=width=100:height=100:thickness=2:color=red@0.5
  23366. </pre></div>
  23367. </li><li> Draw a white 3x3 grid with an opacity of 50%:
  23368. <div class="example">
  23369. <pre class="example">drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5
  23370. </pre></div>
  23371. </li></ul>
  23372. <a name="Commands-74"></a>
  23373. <h4 class="subsection">32.65.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-74" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-74" aria-hidden="true">TOC</a></span></h4>
  23374. <p>This filter supports same commands as options.
  23375. The command accepts the same syntax of the corresponding option.
  23376. </p>
  23377. <p>If the specified expression is not valid, it is kept at its current
  23378. value.
  23379. </p>
  23380. <span id="drawtext"></span><a name="drawtext-1"></a>
  23381. <h3 class="section">32.66 drawtext<span class="pull-right"><a class="anchor hidden-xs" href="#drawtext-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-drawtext-1" aria-hidden="true">TOC</a></span></h3>
  23382. <p>Draw a text string or text from a specified file on top of a video, using the
  23383. libfreetype library.
  23384. </p>
  23385. <p>To enable compilation of this filter, you need to configure FFmpeg with
  23386. <code>--enable-libfreetype</code>.
  23387. To enable default font fallback and the <var>font</var> option you need to
  23388. configure FFmpeg with <code>--enable-libfontconfig</code>.
  23389. To enable the <var>text_shaping</var> option, you need to configure FFmpeg with
  23390. <code>--enable-libfribidi</code>.
  23391. </p>
  23392. <a name="Syntax-2"></a>
  23393. <h4 class="subsection">32.66.1 Syntax<span class="pull-right"><a class="anchor hidden-xs" href="#Syntax-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Syntax-2" aria-hidden="true">TOC</a></span></h4>
  23394. <p>It accepts the following parameters:
  23395. </p>
  23396. <dl compact="compact">
  23397. <dt><samp>box</samp></dt>
  23398. <dd><p>Used to draw a box around text using the background color.
  23399. The value must be either 1 (enable) or 0 (disable).
  23400. The default value of <var>box</var> is 0.
  23401. </p>
  23402. </dd>
  23403. <dt><samp>boxborderw</samp></dt>
  23404. <dd><p>Set the width of the border to be drawn around the box using <var>boxcolor</var>.
  23405. The default value of <var>boxborderw</var> is 0.
  23406. </p>
  23407. </dd>
  23408. <dt><samp>boxcolor</samp></dt>
  23409. <dd><p>The color to be used for drawing box around text. For the syntax of this
  23410. option, check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  23411. </p>
  23412. <p>The default value of <var>boxcolor</var> is &quot;white&quot;.
  23413. </p>
  23414. </dd>
  23415. <dt><samp>line_spacing</samp></dt>
  23416. <dd><p>Set the line spacing in pixels of the border to be drawn around the box using <var>box</var>.
  23417. The default value of <var>line_spacing</var> is 0.
  23418. </p>
  23419. </dd>
  23420. <dt><samp>borderw</samp></dt>
  23421. <dd><p>Set the width of the border to be drawn around the text using <var>bordercolor</var>.
  23422. The default value of <var>borderw</var> is 0.
  23423. </p>
  23424. </dd>
  23425. <dt><samp>bordercolor</samp></dt>
  23426. <dd><p>Set the color to be used for drawing border around text. For the syntax of this
  23427. option, check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  23428. </p>
  23429. <p>The default value of <var>bordercolor</var> is &quot;black&quot;.
  23430. </p>
  23431. </dd>
  23432. <dt><samp>expansion</samp></dt>
  23433. <dd><p>Select how the <var>text</var> is expanded. Can be either <code>none</code>,
  23434. <code>strftime</code> (deprecated) or
  23435. <code>normal</code> (default). See the <a href="#drawtext_005fexpansion">Text expansion</a> section
  23436. below for details.
  23437. </p>
  23438. </dd>
  23439. <dt><samp>basetime</samp></dt>
  23440. <dd><p>Set a start time for the count. Value is in microseconds. Only applied
  23441. in the deprecated strftime expansion mode. To emulate in normal expansion
  23442. mode use the <code>pts</code> function, supplying the start time (in seconds)
  23443. as the second argument.
  23444. </p>
  23445. </dd>
  23446. <dt><samp>fix_bounds</samp></dt>
  23447. <dd><p>If true, check and fix text coords to avoid clipping.
  23448. </p>
  23449. </dd>
  23450. <dt><samp>fontcolor</samp></dt>
  23451. <dd><p>The color to be used for drawing fonts. For the syntax of this option, check
  23452. the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  23453. </p>
  23454. <p>The default value of <var>fontcolor</var> is &quot;black&quot;.
  23455. </p>
  23456. </dd>
  23457. <dt><samp>fontcolor_expr</samp></dt>
  23458. <dd><p>String which is expanded the same way as <var>text</var> to obtain dynamic
  23459. <var>fontcolor</var> value. By default this option has empty value and is not
  23460. processed. When this option is set, it overrides <var>fontcolor</var> option.
  23461. </p>
  23462. </dd>
  23463. <dt><samp>font</samp></dt>
  23464. <dd><p>The font family to be used for drawing text. By default Sans.
  23465. </p>
  23466. </dd>
  23467. <dt><samp>fontfile</samp></dt>
  23468. <dd><p>The font file to be used for drawing text. The path must be included.
  23469. This parameter is mandatory if the fontconfig support is disabled.
  23470. </p>
  23471. </dd>
  23472. <dt><samp>alpha</samp></dt>
  23473. <dd><p>Draw the text applying alpha blending. The value can
  23474. be a number between 0.0 and 1.0.
  23475. The expression accepts the same variables <var>x, y</var> as well.
  23476. The default value is 1.
  23477. Please see <var>fontcolor_expr</var>.
  23478. </p>
  23479. </dd>
  23480. <dt><samp>fontsize</samp></dt>
  23481. <dd><p>The font size to be used for drawing text.
  23482. The default value of <var>fontsize</var> is 16.
  23483. </p>
  23484. </dd>
  23485. <dt><samp>text_shaping</samp></dt>
  23486. <dd><p>If set to 1, attempt to shape the text (for example, reverse the order of
  23487. right-to-left text and join Arabic characters) before drawing it.
  23488. Otherwise, just draw the text exactly as given.
  23489. By default 1 (if supported).
  23490. </p>
  23491. </dd>
  23492. <dt><samp>ft_load_flags</samp></dt>
  23493. <dd><p>The flags to be used for loading the fonts.
  23494. </p>
  23495. <p>The flags map the corresponding flags supported by libfreetype, and are
  23496. a combination of the following values:
  23497. </p><dl compact="compact">
  23498. <dt><var>default</var></dt>
  23499. <dt><var>no_scale</var></dt>
  23500. <dt><var>no_hinting</var></dt>
  23501. <dt><var>render</var></dt>
  23502. <dt><var>no_bitmap</var></dt>
  23503. <dt><var>vertical_layout</var></dt>
  23504. <dt><var>force_autohint</var></dt>
  23505. <dt><var>crop_bitmap</var></dt>
  23506. <dt><var>pedantic</var></dt>
  23507. <dt><var>ignore_global_advance_width</var></dt>
  23508. <dt><var>no_recurse</var></dt>
  23509. <dt><var>ignore_transform</var></dt>
  23510. <dt><var>monochrome</var></dt>
  23511. <dt><var>linear_design</var></dt>
  23512. <dt><var>no_autohint</var></dt>
  23513. </dl>
  23514. <p>Default value is &quot;default&quot;.
  23515. </p>
  23516. <p>For more information consult the documentation for the FT_LOAD_*
  23517. libfreetype flags.
  23518. </p>
  23519. </dd>
  23520. <dt><samp>shadowcolor</samp></dt>
  23521. <dd><p>The color to be used for drawing a shadow behind the drawn text. For the
  23522. syntax of this option, check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the
  23523. ffmpeg-utils manual</a>.
  23524. </p>
  23525. <p>The default value of <var>shadowcolor</var> is &quot;black&quot;.
  23526. </p>
  23527. </dd>
  23528. <dt><samp>shadowx</samp></dt>
  23529. <dt><samp>shadowy</samp></dt>
  23530. <dd><p>The x and y offsets for the text shadow position with respect to the
  23531. position of the text. They can be either positive or negative
  23532. values. The default value for both is &quot;0&quot;.
  23533. </p>
  23534. </dd>
  23535. <dt><samp>start_number</samp></dt>
  23536. <dd><p>The starting frame number for the n/frame_num variable. The default value
  23537. is &quot;0&quot;.
  23538. </p>
  23539. </dd>
  23540. <dt><samp>tabsize</samp></dt>
  23541. <dd><p>The size in number of spaces to use for rendering the tab.
  23542. Default value is 4.
  23543. </p>
  23544. </dd>
  23545. <dt><samp>timecode</samp></dt>
  23546. <dd><p>Set the initial timecode representation in &quot;hh:mm:ss[:;.]ff&quot;
  23547. format. It can be used with or without text parameter. <var>timecode_rate</var>
  23548. option must be specified.
  23549. </p>
  23550. </dd>
  23551. <dt><samp>timecode_rate, rate, r</samp></dt>
  23552. <dd><p>Set the timecode frame rate (timecode only). Value will be rounded to nearest
  23553. integer. Minimum value is &quot;1&quot;.
  23554. Drop-frame timecode is supported for frame rates 30 &amp; 60.
  23555. </p>
  23556. </dd>
  23557. <dt><samp>tc24hmax</samp></dt>
  23558. <dd><p>If set to 1, the output of the timecode option will wrap around at 24 hours.
  23559. Default is 0 (disabled).
  23560. </p>
  23561. </dd>
  23562. <dt><samp>text</samp></dt>
  23563. <dd><p>The text string to be drawn. The text must be a sequence of UTF-8
  23564. encoded characters.
  23565. This parameter is mandatory if no file is specified with the parameter
  23566. <var>textfile</var>.
  23567. </p>
  23568. </dd>
  23569. <dt><samp>textfile</samp></dt>
  23570. <dd><p>A text file containing text to be drawn. The text must be a sequence
  23571. of UTF-8 encoded characters.
  23572. </p>
  23573. <p>This parameter is mandatory if no text string is specified with the
  23574. parameter <var>text</var>.
  23575. </p>
  23576. <p>If both <var>text</var> and <var>textfile</var> are specified, an error is thrown.
  23577. </p>
  23578. </dd>
  23579. <dt><samp>reload</samp></dt>
  23580. <dd><p>If set to 1, the <var>textfile</var> will be reloaded before each frame.
  23581. Be sure to update it atomically, or it may be read partially, or even fail.
  23582. </p>
  23583. </dd>
  23584. <dt><samp>x</samp></dt>
  23585. <dt><samp>y</samp></dt>
  23586. <dd><p>The expressions which specify the offsets where text will be drawn
  23587. within the video frame. They are relative to the top/left border of the
  23588. output image.
  23589. </p>
  23590. <p>The default value of <var>x</var> and <var>y</var> is &quot;0&quot;.
  23591. </p>
  23592. <p>See below for the list of accepted constants and functions.
  23593. </p></dd>
  23594. </dl>
  23595. <p>The parameters for <var>x</var> and <var>y</var> are expressions containing the
  23596. following constants and functions:
  23597. </p>
  23598. <dl compact="compact">
  23599. <dt><samp>dar</samp></dt>
  23600. <dd><p>input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>
  23601. </p>
  23602. </dd>
  23603. <dt><samp>hsub</samp></dt>
  23604. <dt><samp>vsub</samp></dt>
  23605. <dd><p>horizontal and vertical chroma subsample values. For example for the
  23606. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  23607. </p>
  23608. </dd>
  23609. <dt><samp>line_h, lh</samp></dt>
  23610. <dd><p>the height of each text line
  23611. </p>
  23612. </dd>
  23613. <dt><samp>main_h, h, H</samp></dt>
  23614. <dd><p>the input height
  23615. </p>
  23616. </dd>
  23617. <dt><samp>main_w, w, W</samp></dt>
  23618. <dd><p>the input width
  23619. </p>
  23620. </dd>
  23621. <dt><samp>max_glyph_a, ascent</samp></dt>
  23622. <dd><p>the maximum distance from the baseline to the highest/upper grid
  23623. coordinate used to place a glyph outline point, for all the rendered
  23624. glyphs.
  23625. It is a positive value, due to the grid&rsquo;s orientation with the Y axis
  23626. upwards.
  23627. </p>
  23628. </dd>
  23629. <dt><samp>max_glyph_d, descent</samp></dt>
  23630. <dd><p>the maximum distance from the baseline to the lowest grid coordinate
  23631. used to place a glyph outline point, for all the rendered glyphs.
  23632. This is a negative value, due to the grid&rsquo;s orientation, with the Y axis
  23633. upwards.
  23634. </p>
  23635. </dd>
  23636. <dt><samp>max_glyph_h</samp></dt>
  23637. <dd><p>maximum glyph height, that is the maximum height for all the glyphs
  23638. contained in the rendered text, it is equivalent to <var>ascent</var> -
  23639. <var>descent</var>.
  23640. </p>
  23641. </dd>
  23642. <dt><samp>max_glyph_w</samp></dt>
  23643. <dd><p>maximum glyph width, that is the maximum width for all the glyphs
  23644. contained in the rendered text
  23645. </p>
  23646. </dd>
  23647. <dt><samp>n</samp></dt>
  23648. <dd><p>the number of input frame, starting from 0
  23649. </p>
  23650. </dd>
  23651. <dt><samp>rand(min, max)</samp></dt>
  23652. <dd><p>return a random number included between <var>min</var> and <var>max</var>
  23653. </p>
  23654. </dd>
  23655. <dt><samp>sar</samp></dt>
  23656. <dd><p>The input sample aspect ratio.
  23657. </p>
  23658. </dd>
  23659. <dt><samp>t</samp></dt>
  23660. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  23661. </p>
  23662. </dd>
  23663. <dt><samp>text_h, th</samp></dt>
  23664. <dd><p>the height of the rendered text
  23665. </p>
  23666. </dd>
  23667. <dt><samp>text_w, tw</samp></dt>
  23668. <dd><p>the width of the rendered text
  23669. </p>
  23670. </dd>
  23671. <dt><samp>x</samp></dt>
  23672. <dt><samp>y</samp></dt>
  23673. <dd><p>the x and y offset coordinates where the text is drawn.
  23674. </p>
  23675. <p>These parameters allow the <var>x</var> and <var>y</var> expressions to refer
  23676. to each other, so you can for example specify <code>y=x/dar</code>.
  23677. </p>
  23678. </dd>
  23679. <dt><samp>pict_type</samp></dt>
  23680. <dd><p>A one character description of the current frame&rsquo;s picture type.
  23681. </p>
  23682. </dd>
  23683. <dt><samp>pkt_pos</samp></dt>
  23684. <dd><p>The current packet&rsquo;s position in the input file or stream
  23685. (in bytes, from the start of the input). A value of -1 indicates
  23686. this info is not available.
  23687. </p>
  23688. </dd>
  23689. <dt><samp>pkt_duration</samp></dt>
  23690. <dd><p>The current packet&rsquo;s duration, in seconds.
  23691. </p>
  23692. </dd>
  23693. <dt><samp>pkt_size</samp></dt>
  23694. <dd><p>The current packet&rsquo;s size (in bytes).
  23695. </p></dd>
  23696. </dl>
  23697. <span id="drawtext_005fexpansion"></span><a name="Text-expansion"></a>
  23698. <h4 class="subsection">32.66.2 Text expansion<span class="pull-right"><a class="anchor hidden-xs" href="#Text-expansion" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Text-expansion" aria-hidden="true">TOC</a></span></h4>
  23699. <p>If <samp>expansion</samp> is set to <code>strftime</code>,
  23700. the filter recognizes strftime() sequences in the provided text and
  23701. expands them accordingly. Check the documentation of strftime(). This
  23702. feature is deprecated.
  23703. </p>
  23704. <p>If <samp>expansion</samp> is set to <code>none</code>, the text is printed verbatim.
  23705. </p>
  23706. <p>If <samp>expansion</samp> is set to <code>normal</code> (which is the default),
  23707. the following expansion mechanism is used.
  23708. </p>
  23709. <p>The backslash character &lsquo;<samp>\</samp>&rsquo;, followed by any character, always expands to
  23710. the second character.
  23711. </p>
  23712. <p>Sequences of the form <code>%{...}</code> are expanded. The text between the
  23713. braces is a function name, possibly followed by arguments separated by &rsquo;:&rsquo;.
  23714. If the arguments contain special characters or delimiters (&rsquo;:&rsquo; or &rsquo;}&rsquo;),
  23715. they should be escaped.
  23716. </p>
  23717. <p>Note that they probably must also be escaped as the value for the
  23718. <samp>text</samp> option in the filter argument string and as the filter
  23719. argument in the filtergraph description, and possibly also for the shell,
  23720. that makes up to four levels of escaping; using a text file avoids these
  23721. problems.
  23722. </p>
  23723. <p>The following functions are available:
  23724. </p>
  23725. <dl compact="compact">
  23726. <dt><code>expr, e</code></dt>
  23727. <dd><p>The expression evaluation result.
  23728. </p>
  23729. <p>It must take one argument specifying the expression to be evaluated,
  23730. which accepts the same constants and functions as the <var>x</var> and
  23731. <var>y</var> values. Note that not all constants should be used, for
  23732. example the text size is not known when evaluating the expression, so
  23733. the constants <var>text_w</var> and <var>text_h</var> will have an undefined
  23734. value.
  23735. </p>
  23736. </dd>
  23737. <dt><code>expr_int_format, eif</code></dt>
  23738. <dd><p>Evaluate the expression&rsquo;s value and output as formatted integer.
  23739. </p>
  23740. <p>The first argument is the expression to be evaluated, just as for the <var>expr</var> function.
  23741. The second argument specifies the output format. Allowed values are &lsquo;<samp>x</samp>&rsquo;,
  23742. &lsquo;<samp>X</samp>&rsquo;, &lsquo;<samp>d</samp>&rsquo; and &lsquo;<samp>u</samp>&rsquo;. They are treated exactly as in the
  23743. <code>printf</code> function.
  23744. The third parameter is optional and sets the number of positions taken by the output.
  23745. It can be used to add padding with zeros from the left.
  23746. </p>
  23747. </dd>
  23748. <dt><code>gmtime</code></dt>
  23749. <dd><p>The time at which the filter is running, expressed in UTC.
  23750. It can accept an argument: a strftime() format string.
  23751. </p>
  23752. </dd>
  23753. <dt><code>localtime</code></dt>
  23754. <dd><p>The time at which the filter is running, expressed in the local time zone.
  23755. It can accept an argument: a strftime() format string.
  23756. </p>
  23757. </dd>
  23758. <dt><code>metadata</code></dt>
  23759. <dd><p>Frame metadata. Takes one or two arguments.
  23760. </p>
  23761. <p>The first argument is mandatory and specifies the metadata key.
  23762. </p>
  23763. <p>The second argument is optional and specifies a default value, used when the
  23764. metadata key is not found or empty.
  23765. </p>
  23766. <p>Available metadata can be identified by inspecting entries
  23767. starting with TAG included within each frame section
  23768. printed by running <code>ffprobe -show_frames</code>.
  23769. </p>
  23770. <p>String metadata generated in filters leading to
  23771. the drawtext filter are also available.
  23772. </p>
  23773. </dd>
  23774. <dt><code>n, frame_num</code></dt>
  23775. <dd><p>The frame number, starting from 0.
  23776. </p>
  23777. </dd>
  23778. <dt><code>pict_type</code></dt>
  23779. <dd><p>A one character description of the current picture type.
  23780. </p>
  23781. </dd>
  23782. <dt><code>pts</code></dt>
  23783. <dd><p>The timestamp of the current frame.
  23784. It can take up to three arguments.
  23785. </p>
  23786. <p>The first argument is the format of the timestamp; it defaults to <code>flt</code>
  23787. for seconds as a decimal number with microsecond accuracy; <code>hms</code> stands
  23788. for a formatted <var>[-]HH:MM:SS.mmm</var> timestamp with millisecond accuracy.
  23789. <code>gmtime</code> stands for the timestamp of the frame formatted as UTC time;
  23790. <code>localtime</code> stands for the timestamp of the frame formatted as
  23791. local time zone time.
  23792. </p>
  23793. <p>The second argument is an offset added to the timestamp.
  23794. </p>
  23795. <p>If the format is set to <code>hms</code>, a third argument <code>24HH</code> may be
  23796. supplied to present the hour part of the formatted timestamp in 24h format
  23797. (00-23).
  23798. </p>
  23799. <p>If the format is set to <code>localtime</code> or <code>gmtime</code>,
  23800. a third argument may be supplied: a strftime() format string.
  23801. By default, <var>YYYY-MM-DD HH:MM:SS</var> format will be used.
  23802. </p></dd>
  23803. </dl>
  23804. <a name="Commands-75"></a>
  23805. <h4 class="subsection">32.66.3 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-75" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-75" aria-hidden="true">TOC</a></span></h4>
  23806. <p>This filter supports altering parameters via commands:
  23807. </p><dl compact="compact">
  23808. <dt><samp>reinit</samp></dt>
  23809. <dd><p>Alter existing filter parameters.
  23810. </p>
  23811. <p>Syntax for the argument is the same as for filter invocation, e.g.
  23812. </p>
  23813. <div class="example">
  23814. <pre class="example">fontsize=56:fontcolor=green:text='Hello World'
  23815. </pre></div>
  23816. <p>Full filter invocation with sendcmd would look like this:
  23817. </p>
  23818. <div class="example">
  23819. <pre class="example">sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
  23820. </pre></div>
  23821. </dd>
  23822. </dl>
  23823. <p>If the entire argument can&rsquo;t be parsed or applied as valid values then the filter will
  23824. continue with its existing parameters.
  23825. </p>
  23826. <a name="Examples-76"></a>
  23827. <h4 class="subsection">32.66.4 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-76" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-76" aria-hidden="true">TOC</a></span></h4>
  23828. <ul>
  23829. <li> Draw &quot;Test Text&quot; with font FreeSerif, using the default values for the
  23830. optional parameters.
  23831. <div class="example">
  23832. <pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'&quot;
  23833. </pre></div>
  23834. </li><li> Draw &rsquo;Test Text&rsquo; with font FreeSerif of size 24 at position x=100
  23835. and y=50 (counting from the top-left corner of the screen), text is
  23836. yellow with a red box around it. Both the text and the box have an
  23837. opacity of 20%.
  23838. <div class="example">
  23839. <pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
  23840. x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2&quot;
  23841. </pre></div>
  23842. <p>Note that the double quotes are not necessary if spaces are not used
  23843. within the parameter list.
  23844. </p>
  23845. </li><li> Show the text at the center of the video frame:
  23846. <div class="example">
  23847. <pre class="example">drawtext=&quot;fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2&quot;
  23848. </pre></div>
  23849. </li><li> Show the text at a random position, switching to a new position every 30 seconds:
  23850. <div class="example">
  23851. <pre class="example">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;
  23852. </pre></div>
  23853. </li><li> Show a text line sliding from right to left in the last row of the video
  23854. frame. The file <samp>LONG_LINE</samp> is assumed to contain a single line
  23855. with no newlines.
  23856. <div class="example">
  23857. <pre class="example">drawtext=&quot;fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t&quot;
  23858. </pre></div>
  23859. </li><li> Show the content of file <samp>CREDITS</samp> off the bottom of the frame and scroll up.
  23860. <div class="example">
  23861. <pre class="example">drawtext=&quot;fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h-20*t&quot;
  23862. </pre></div>
  23863. </li><li> Draw a single green letter &quot;g&quot;, at the center of the input video.
  23864. The glyph baseline is placed at half screen height.
  23865. <div class="example">
  23866. <pre class="example">drawtext=&quot;fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent&quot;
  23867. </pre></div>
  23868. </li><li> Show text for 1 second every 3 seconds:
  23869. <div class="example">
  23870. <pre class="example">drawtext=&quot;fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\,3)\,1):text='blink'&quot;
  23871. </pre></div>
  23872. </li><li> Use fontconfig to set the font. Note that the colons need to be escaped.
  23873. <div class="example">
  23874. <pre class="example">drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
  23875. </pre></div>
  23876. </li><li> Draw &quot;Test Text&quot; with font size dependent on height of the video.
  23877. <div class="example">
  23878. <pre class="example">drawtext=&quot;text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)&quot;
  23879. </pre></div>
  23880. </li><li> Print the date of a real-time encoding (see strftime(3)):
  23881. <div class="example">
  23882. <pre class="example">drawtext='fontfile=FreeSans.ttf:text=%{localtime\:%a %b %d %Y}'
  23883. </pre></div>
  23884. </li><li> Show text fading in and out (appearing/disappearing):
  23885. <div class="example">
  23886. <pre class="example">#!/bin/sh
  23887. DS=1.0 # display start
  23888. DE=10.0 # display end
  23889. FID=1.5 # fade in duration
  23890. FOD=5 # fade out duration
  23891. 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;
  23892. </pre></div>
  23893. </li><li> Horizontally align multiple separate texts. Note that <samp>max_glyph_a</samp>
  23894. and the <samp>fontsize</samp> value are included in the <samp>y</samp> offset.
  23895. <div class="example">
  23896. <pre class="example">drawtext=fontfile=FreeSans.ttf:text=DOG:fontsize=24:x=10:y=20+24-max_glyph_a,
  23897. drawtext=fontfile=FreeSans.ttf:text=cow:fontsize=24:x=80:y=20+24-max_glyph_a
  23898. </pre></div>
  23899. </li><li> Plot special <var>lavf.image2dec.source_basename</var> metadata onto each frame if
  23900. such metadata exists. Otherwise, plot the string &quot;NA&quot;. Note that image2 demuxer
  23901. must have option <samp>-export_path_metadata 1</samp> for the special metadata fields
  23902. to be available for filters.
  23903. <div class="example">
  23904. <pre class="example">drawtext=&quot;fontsize=20:fontcolor=white:fontfile=FreeSans.ttf:text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=10:y=10&quot;
  23905. </pre></div>
  23906. </li></ul>
  23907. <p>For more information about libfreetype, check:
  23908. <a href="http://www.freetype.org/">http://www.freetype.org/</a>.
  23909. </p>
  23910. <p>For more information about fontconfig, check:
  23911. <a href="http://freedesktop.org/software/fontconfig/fontconfig-user.html">http://freedesktop.org/software/fontconfig/fontconfig-user.html</a>.
  23912. </p>
  23913. <p>For more information about libfribidi, check:
  23914. <a href="http://fribidi.org/">http://fribidi.org/</a>.
  23915. </p>
  23916. <a name="edgedetect"></a>
  23917. <h3 class="section">32.67 edgedetect<span class="pull-right"><a class="anchor hidden-xs" href="#edgedetect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-edgedetect" aria-hidden="true">TOC</a></span></h3>
  23918. <p>Detect and draw edges. The filter uses the Canny Edge Detection algorithm.
  23919. </p>
  23920. <p>The filter accepts the following options:
  23921. </p>
  23922. <dl compact="compact">
  23923. <dt><samp>low</samp></dt>
  23924. <dt><samp>high</samp></dt>
  23925. <dd><p>Set low and high threshold values used by the Canny thresholding
  23926. algorithm.
  23927. </p>
  23928. <p>The high threshold selects the &quot;strong&quot; edge pixels, which are then
  23929. connected through 8-connectivity with the &quot;weak&quot; edge pixels selected
  23930. by the low threshold.
  23931. </p>
  23932. <p><var>low</var> and <var>high</var> threshold values must be chosen in the range
  23933. [0,1], and <var>low</var> should be lesser or equal to <var>high</var>.
  23934. </p>
  23935. <p>Default value for <var>low</var> is <code>20/255</code>, and default value for <var>high</var>
  23936. is <code>50/255</code>.
  23937. </p>
  23938. </dd>
  23939. <dt><samp>mode</samp></dt>
  23940. <dd><p>Define the drawing mode.
  23941. </p>
  23942. <dl compact="compact">
  23943. <dt>&lsquo;<samp>wires</samp>&rsquo;</dt>
  23944. <dd><p>Draw white/gray wires on black background.
  23945. </p>
  23946. </dd>
  23947. <dt>&lsquo;<samp>colormix</samp>&rsquo;</dt>
  23948. <dd><p>Mix the colors to create a paint/cartoon effect.
  23949. </p>
  23950. </dd>
  23951. <dt>&lsquo;<samp>canny</samp>&rsquo;</dt>
  23952. <dd><p>Apply Canny edge detector on all selected planes.
  23953. </p></dd>
  23954. </dl>
  23955. <p>Default value is <var>wires</var>.
  23956. </p>
  23957. </dd>
  23958. <dt><samp>planes</samp></dt>
  23959. <dd><p>Select planes for filtering. By default all available planes are filtered.
  23960. </p></dd>
  23961. </dl>
  23962. <a name="Examples-77"></a>
  23963. <h4 class="subsection">32.67.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-77" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-77" aria-hidden="true">TOC</a></span></h4>
  23964. <ul>
  23965. <li> Standard edge detection with custom values for the hysteresis thresholding:
  23966. <div class="example">
  23967. <pre class="example">edgedetect=low=0.1:high=0.4
  23968. </pre></div>
  23969. </li><li> Painting effect without thresholding:
  23970. <div class="example">
  23971. <pre class="example">edgedetect=mode=colormix:high=0
  23972. </pre></div>
  23973. </li></ul>
  23974. <a name="elbg"></a>
  23975. <h3 class="section">32.68 elbg<span class="pull-right"><a class="anchor hidden-xs" href="#elbg" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-elbg" aria-hidden="true">TOC</a></span></h3>
  23976. <p>Apply a posterize effect using the ELBG (Enhanced LBG) algorithm.
  23977. </p>
  23978. <p>For each input image, the filter will compute the optimal mapping from
  23979. the input to the output given the codebook length, that is the number
  23980. of distinct output colors.
  23981. </p>
  23982. <p>This filter accepts the following options.
  23983. </p>
  23984. <dl compact="compact">
  23985. <dt><samp>codebook_length, l</samp></dt>
  23986. <dd><p>Set codebook length. The value must be a positive integer, and
  23987. represents the number of distinct output colors. Default value is 256.
  23988. </p>
  23989. </dd>
  23990. <dt><samp>nb_steps, n</samp></dt>
  23991. <dd><p>Set the maximum number of iterations to apply for computing the optimal
  23992. mapping. The higher the value the better the result and the higher the
  23993. computation time. Default value is 1.
  23994. </p>
  23995. </dd>
  23996. <dt><samp>seed, s</samp></dt>
  23997. <dd><p>Set a random seed, must be an integer included between 0 and
  23998. UINT32_MAX. If not specified, or if explicitly set to -1, the filter
  23999. will try to use a good random seed on a best effort basis.
  24000. </p>
  24001. </dd>
  24002. <dt><samp>pal8</samp></dt>
  24003. <dd><p>Set pal8 output pixel format. This option does not work with codebook
  24004. length greater than 256.
  24005. </p></dd>
  24006. </dl>
  24007. <a name="entropy"></a>
  24008. <h3 class="section">32.69 entropy<span class="pull-right"><a class="anchor hidden-xs" href="#entropy" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-entropy" aria-hidden="true">TOC</a></span></h3>
  24009. <p>Measure graylevel entropy in histogram of color channels of video frames.
  24010. </p>
  24011. <p>It accepts the following parameters:
  24012. </p>
  24013. <dl compact="compact">
  24014. <dt><samp>mode</samp></dt>
  24015. <dd><p>Can be either <var>normal</var> or <var>diff</var>. Default is <var>normal</var>.
  24016. </p>
  24017. <p><var>diff</var> mode measures entropy of histogram delta values, absolute differences
  24018. between neighbour histogram values.
  24019. </p></dd>
  24020. </dl>
  24021. <a name="epx"></a>
  24022. <h3 class="section">32.70 epx<span class="pull-right"><a class="anchor hidden-xs" href="#epx" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-epx" aria-hidden="true">TOC</a></span></h3>
  24023. <p>Apply the EPX magnification filter which is designed for pixel art.
  24024. </p>
  24025. <p>It accepts the following option:
  24026. </p>
  24027. <dl compact="compact">
  24028. <dt><samp>n</samp></dt>
  24029. <dd><p>Set the scaling dimension: <code>2</code> for <code>2xEPX</code>, <code>3</code> for
  24030. <code>3xEPX</code>.
  24031. Default is <code>3</code>.
  24032. </p></dd>
  24033. </dl>
  24034. <a name="eq"></a>
  24035. <h3 class="section">32.71 eq<span class="pull-right"><a class="anchor hidden-xs" href="#eq" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-eq" aria-hidden="true">TOC</a></span></h3>
  24036. <p>Set brightness, contrast, saturation and approximate gamma adjustment.
  24037. </p>
  24038. <p>The filter accepts the following options:
  24039. </p>
  24040. <dl compact="compact">
  24041. <dt><samp>contrast</samp></dt>
  24042. <dd><p>Set the contrast expression. The value must be a float value in range
  24043. <code>-1000.0</code> to <code>1000.0</code>. The default value is &quot;1&quot;.
  24044. </p>
  24045. </dd>
  24046. <dt><samp>brightness</samp></dt>
  24047. <dd><p>Set the brightness expression. The value must be a float value in
  24048. range <code>-1.0</code> to <code>1.0</code>. The default value is &quot;0&quot;.
  24049. </p>
  24050. </dd>
  24051. <dt><samp>saturation</samp></dt>
  24052. <dd><p>Set the saturation expression. The value must be a float in
  24053. range <code>0.0</code> to <code>3.0</code>. The default value is &quot;1&quot;.
  24054. </p>
  24055. </dd>
  24056. <dt><samp>gamma</samp></dt>
  24057. <dd><p>Set the gamma expression. The value must be a float in range
  24058. <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  24059. </p>
  24060. </dd>
  24061. <dt><samp>gamma_r</samp></dt>
  24062. <dd><p>Set the gamma expression for red. The value must be a float in
  24063. range <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  24064. </p>
  24065. </dd>
  24066. <dt><samp>gamma_g</samp></dt>
  24067. <dd><p>Set the gamma expression for green. The value must be a float in range
  24068. <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  24069. </p>
  24070. </dd>
  24071. <dt><samp>gamma_b</samp></dt>
  24072. <dd><p>Set the gamma expression for blue. The value must be a float in range
  24073. <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  24074. </p>
  24075. </dd>
  24076. <dt><samp>gamma_weight</samp></dt>
  24077. <dd><p>Set the gamma weight expression. It can be used to reduce the effect
  24078. of a high gamma value on bright image areas, e.g. keep them from
  24079. getting overamplified and just plain white. The value must be a float
  24080. in range <code>0.0</code> to <code>1.0</code>. A value of <code>0.0</code> turns the
  24081. gamma correction all the way down while <code>1.0</code> leaves it at its
  24082. full strength. Default is &quot;1&quot;.
  24083. </p>
  24084. </dd>
  24085. <dt><samp>eval</samp></dt>
  24086. <dd><p>Set when the expressions for brightness, contrast, saturation and
  24087. gamma expressions are evaluated.
  24088. </p>
  24089. <p>It accepts the following values:
  24090. </p><dl compact="compact">
  24091. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  24092. <dd><p>only evaluate expressions once during the filter initialization or
  24093. when a command is processed
  24094. </p>
  24095. </dd>
  24096. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  24097. <dd><p>evaluate expressions for each incoming frame
  24098. </p></dd>
  24099. </dl>
  24100. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  24101. </p></dd>
  24102. </dl>
  24103. <p>The expressions accept the following parameters:
  24104. </p><dl compact="compact">
  24105. <dt><samp>n</samp></dt>
  24106. <dd><p>frame count of the input frame starting from 0
  24107. </p>
  24108. </dd>
  24109. <dt><samp>pos</samp></dt>
  24110. <dd><p>byte position of the corresponding packet in the input file, NAN if
  24111. unspecified
  24112. </p>
  24113. </dd>
  24114. <dt><samp>r</samp></dt>
  24115. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  24116. </p>
  24117. </dd>
  24118. <dt><samp>t</samp></dt>
  24119. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  24120. </p></dd>
  24121. </dl>
  24122. <a name="Commands-76"></a>
  24123. <h4 class="subsection">32.71.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-76" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-76" aria-hidden="true">TOC</a></span></h4>
  24124. <p>The filter supports the following commands:
  24125. </p>
  24126. <dl compact="compact">
  24127. <dt><samp>contrast</samp></dt>
  24128. <dd><p>Set the contrast expression.
  24129. </p>
  24130. </dd>
  24131. <dt><samp>brightness</samp></dt>
  24132. <dd><p>Set the brightness expression.
  24133. </p>
  24134. </dd>
  24135. <dt><samp>saturation</samp></dt>
  24136. <dd><p>Set the saturation expression.
  24137. </p>
  24138. </dd>
  24139. <dt><samp>gamma</samp></dt>
  24140. <dd><p>Set the gamma expression.
  24141. </p>
  24142. </dd>
  24143. <dt><samp>gamma_r</samp></dt>
  24144. <dd><p>Set the gamma_r expression.
  24145. </p>
  24146. </dd>
  24147. <dt><samp>gamma_g</samp></dt>
  24148. <dd><p>Set gamma_g expression.
  24149. </p>
  24150. </dd>
  24151. <dt><samp>gamma_b</samp></dt>
  24152. <dd><p>Set gamma_b expression.
  24153. </p>
  24154. </dd>
  24155. <dt><samp>gamma_weight</samp></dt>
  24156. <dd><p>Set gamma_weight expression.
  24157. </p>
  24158. <p>The command accepts the same syntax of the corresponding option.
  24159. </p>
  24160. <p>If the specified expression is not valid, it is kept at its current
  24161. value.
  24162. </p>
  24163. </dd>
  24164. </dl>
  24165. <a name="erosion"></a>
  24166. <h3 class="section">32.72 erosion<span class="pull-right"><a class="anchor hidden-xs" href="#erosion" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-erosion" aria-hidden="true">TOC</a></span></h3>
  24167. <p>Apply erosion effect to the video.
  24168. </p>
  24169. <p>This filter replaces the pixel by the local(3x3) minimum.
  24170. </p>
  24171. <p>It accepts the following options:
  24172. </p>
  24173. <dl compact="compact">
  24174. <dt><samp>threshold0</samp></dt>
  24175. <dt><samp>threshold1</samp></dt>
  24176. <dt><samp>threshold2</samp></dt>
  24177. <dt><samp>threshold3</samp></dt>
  24178. <dd><p>Limit the maximum change for each plane, default is 65535.
  24179. If 0, plane will remain unchanged.
  24180. </p>
  24181. </dd>
  24182. <dt><samp>coordinates</samp></dt>
  24183. <dd><p>Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
  24184. pixels are used.
  24185. </p>
  24186. <p>Flags to local 3x3 coordinates maps like this:
  24187. </p>
  24188. <p>1 2 3
  24189. 4 5
  24190. 6 7 8
  24191. </p></dd>
  24192. </dl>
  24193. <a name="Commands-77"></a>
  24194. <h4 class="subsection">32.72.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-77" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-77" aria-hidden="true">TOC</a></span></h4>
  24195. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  24196. </p>
  24197. <a name="estdif"></a>
  24198. <h3 class="section">32.73 estdif<span class="pull-right"><a class="anchor hidden-xs" href="#estdif" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-estdif" aria-hidden="true">TOC</a></span></h3>
  24199. <p>Deinterlace the input video (&quot;estdif&quot; stands for &quot;Edge Slope
  24200. Tracing Deinterlacing Filter&quot;).
  24201. </p>
  24202. <p>Spatial only filter that uses edge slope tracing algorithm
  24203. to interpolate missing lines.
  24204. It accepts the following parameters:
  24205. </p>
  24206. <dl compact="compact">
  24207. <dt><samp>mode</samp></dt>
  24208. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  24209. </p>
  24210. <dl compact="compact">
  24211. <dt><samp>frame</samp></dt>
  24212. <dd><p>Output one frame for each frame.
  24213. </p></dd>
  24214. <dt><samp>field</samp></dt>
  24215. <dd><p>Output one frame for each field.
  24216. </p></dd>
  24217. </dl>
  24218. <p>The default value is <code>field</code>.
  24219. </p>
  24220. </dd>
  24221. <dt><samp>parity</samp></dt>
  24222. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  24223. of the following values:
  24224. </p>
  24225. <dl compact="compact">
  24226. <dt><samp>tff</samp></dt>
  24227. <dd><p>Assume the top field is first.
  24228. </p></dd>
  24229. <dt><samp>bff</samp></dt>
  24230. <dd><p>Assume the bottom field is first.
  24231. </p></dd>
  24232. <dt><samp>auto</samp></dt>
  24233. <dd><p>Enable automatic detection of field parity.
  24234. </p></dd>
  24235. </dl>
  24236. <p>The default value is <code>auto</code>.
  24237. If the interlacing is unknown or the decoder does not export this information,
  24238. top field first will be assumed.
  24239. </p>
  24240. </dd>
  24241. <dt><samp>deint</samp></dt>
  24242. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  24243. values:
  24244. </p>
  24245. <dl compact="compact">
  24246. <dt><samp>all</samp></dt>
  24247. <dd><p>Deinterlace all frames.
  24248. </p></dd>
  24249. <dt><samp>interlaced</samp></dt>
  24250. <dd><p>Only deinterlace frames marked as interlaced.
  24251. </p></dd>
  24252. </dl>
  24253. <p>The default value is <code>all</code>.
  24254. </p>
  24255. </dd>
  24256. <dt><samp>rslope</samp></dt>
  24257. <dd><p>Specify the search radius for edge slope tracing. Default value is 1.
  24258. Allowed range is from 1 to 15.
  24259. </p>
  24260. </dd>
  24261. <dt><samp>redge</samp></dt>
  24262. <dd><p>Specify the search radius for best edge matching. Default value is 2.
  24263. Allowed range is from 0 to 15.
  24264. </p>
  24265. </dd>
  24266. <dt><samp>interp</samp></dt>
  24267. <dd><p>Specify the interpolation used. Default is 4-point interpolation. It accepts one
  24268. of the following values:
  24269. </p>
  24270. <dl compact="compact">
  24271. <dt><samp>2p</samp></dt>
  24272. <dd><p>Two-point interpolation.
  24273. </p></dd>
  24274. <dt><samp>4p</samp></dt>
  24275. <dd><p>Four-point interpolation.
  24276. </p></dd>
  24277. <dt><samp>6p</samp></dt>
  24278. <dd><p>Six-point interpolation.
  24279. </p></dd>
  24280. </dl>
  24281. </dd>
  24282. </dl>
  24283. <a name="Commands-78"></a>
  24284. <h4 class="subsection">32.73.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-78" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-78" aria-hidden="true">TOC</a></span></h4>
  24285. <p>This filter supports same <a href="#commands">commands</a> as options.
  24286. </p>
  24287. <a name="exposure"></a>
  24288. <h3 class="section">32.74 exposure<span class="pull-right"><a class="anchor hidden-xs" href="#exposure" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-exposure" aria-hidden="true">TOC</a></span></h3>
  24289. <p>Adjust exposure of the video stream.
  24290. </p>
  24291. <p>The filter accepts the following options:
  24292. </p>
  24293. <dl compact="compact">
  24294. <dt><samp>exposure</samp></dt>
  24295. <dd><p>Set the exposure correction in EV. Allowed range is from -3.0 to 3.0 EV
  24296. Default value is 0 EV.
  24297. </p>
  24298. </dd>
  24299. <dt><samp>black</samp></dt>
  24300. <dd><p>Set the black level correction. Allowed range is from -1.0 to 1.0.
  24301. Default value is 0.
  24302. </p></dd>
  24303. </dl>
  24304. <a name="Commands-79"></a>
  24305. <h4 class="subsection">32.74.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-79" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-79" aria-hidden="true">TOC</a></span></h4>
  24306. <p>This filter supports same <a href="#commands">commands</a> as options.
  24307. </p>
  24308. <a name="extractplanes"></a>
  24309. <h3 class="section">32.75 extractplanes<span class="pull-right"><a class="anchor hidden-xs" href="#extractplanes" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-extractplanes" aria-hidden="true">TOC</a></span></h3>
  24310. <p>Extract color channel components from input video stream into
  24311. separate grayscale video streams.
  24312. </p>
  24313. <p>The filter accepts the following option:
  24314. </p>
  24315. <dl compact="compact">
  24316. <dt><samp>planes</samp></dt>
  24317. <dd><p>Set plane(s) to extract.
  24318. </p>
  24319. <p>Available values for planes are:
  24320. </p><dl compact="compact">
  24321. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  24322. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  24323. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  24324. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  24325. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  24326. <dt>&lsquo;<samp>g</samp>&rsquo;</dt>
  24327. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  24328. </dl>
  24329. <p>Choosing planes not available in the input will result in an error.
  24330. That means you cannot select <code>r</code>, <code>g</code>, <code>b</code> planes
  24331. with <code>y</code>, <code>u</code>, <code>v</code> planes at same time.
  24332. </p></dd>
  24333. </dl>
  24334. <a name="Examples-78"></a>
  24335. <h4 class="subsection">32.75.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-78" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-78" aria-hidden="true">TOC</a></span></h4>
  24336. <ul>
  24337. <li> Extract luma, u and v color channel component from input video frame
  24338. into 3 grayscale outputs:
  24339. <div class="example">
  24340. <pre class="example">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
  24341. </pre></div>
  24342. </li></ul>
  24343. <a name="fade"></a>
  24344. <h3 class="section">32.76 fade<span class="pull-right"><a class="anchor hidden-xs" href="#fade" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fade" aria-hidden="true">TOC</a></span></h3>
  24345. <p>Apply a fade-in/out effect to the input video.
  24346. </p>
  24347. <p>It accepts the following parameters:
  24348. </p>
  24349. <dl compact="compact">
  24350. <dt><samp>type, t</samp></dt>
  24351. <dd><p>The effect type can be either &quot;in&quot; for a fade-in, or &quot;out&quot; for a fade-out
  24352. effect.
  24353. Default is <code>in</code>.
  24354. </p>
  24355. </dd>
  24356. <dt><samp>start_frame, s</samp></dt>
  24357. <dd><p>Specify the number of the frame to start applying the fade
  24358. effect at. Default is 0.
  24359. </p>
  24360. </dd>
  24361. <dt><samp>nb_frames, n</samp></dt>
  24362. <dd><p>The number of frames that the fade effect lasts. At the end of the
  24363. fade-in effect, the output video will have the same intensity as the input video.
  24364. At the end of the fade-out transition, the output video will be filled with the
  24365. selected <samp>color</samp>.
  24366. Default is 25.
  24367. </p>
  24368. </dd>
  24369. <dt><samp>alpha</samp></dt>
  24370. <dd><p>If set to 1, fade only alpha channel, if one exists on the input.
  24371. Default value is 0.
  24372. </p>
  24373. </dd>
  24374. <dt><samp>start_time, st</samp></dt>
  24375. <dd><p>Specify the timestamp (in seconds) of the frame to start to apply the fade
  24376. effect. If both start_frame and start_time are specified, the fade will start at
  24377. whichever comes last. Default is 0.
  24378. </p>
  24379. </dd>
  24380. <dt><samp>duration, d</samp></dt>
  24381. <dd><p>The number of seconds for which the fade effect has to last. At the end of the
  24382. fade-in effect the output video will have the same intensity as the input video,
  24383. at the end of the fade-out transition the output video will be filled with the
  24384. selected <samp>color</samp>.
  24385. If both duration and nb_frames are specified, duration is used. Default is 0
  24386. (nb_frames is used by default).
  24387. </p>
  24388. </dd>
  24389. <dt><samp>color, c</samp></dt>
  24390. <dd><p>Specify the color of the fade. Default is &quot;black&quot;.
  24391. </p></dd>
  24392. </dl>
  24393. <a name="Examples-79"></a>
  24394. <h4 class="subsection">32.76.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-79" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-79" aria-hidden="true">TOC</a></span></h4>
  24395. <ul>
  24396. <li> Fade in the first 30 frames of video:
  24397. <div class="example">
  24398. <pre class="example">fade=in:0:30
  24399. </pre></div>
  24400. <p>The command above is equivalent to:
  24401. </p><div class="example">
  24402. <pre class="example">fade=t=in:s=0:n=30
  24403. </pre></div>
  24404. </li><li> Fade out the last 45 frames of a 200-frame video:
  24405. <div class="example">
  24406. <pre class="example">fade=out:155:45
  24407. fade=type=out:start_frame=155:nb_frames=45
  24408. </pre></div>
  24409. </li><li> Fade in the first 25 frames and fade out the last 25 frames of a 1000-frame video:
  24410. <div class="example">
  24411. <pre class="example">fade=in:0:25, fade=out:975:25
  24412. </pre></div>
  24413. </li><li> Make the first 5 frames yellow, then fade in from frame 5-24:
  24414. <div class="example">
  24415. <pre class="example">fade=in:5:20:color=yellow
  24416. </pre></div>
  24417. </li><li> Fade in alpha over first 25 frames of video:
  24418. <div class="example">
  24419. <pre class="example">fade=in:0:25:alpha=1
  24420. </pre></div>
  24421. </li><li> Make the first 5.5 seconds black, then fade in for 0.5 seconds:
  24422. <div class="example">
  24423. <pre class="example">fade=t=in:st=5.5:d=0.5
  24424. </pre></div>
  24425. </li></ul>
  24426. <a name="fftdnoiz"></a>
  24427. <h3 class="section">32.77 fftdnoiz<span class="pull-right"><a class="anchor hidden-xs" href="#fftdnoiz" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fftdnoiz" aria-hidden="true">TOC</a></span></h3>
  24428. <p>Denoise frames using 3D FFT (frequency domain filtering).
  24429. </p>
  24430. <p>The filter accepts the following options:
  24431. </p>
  24432. <dl compact="compact">
  24433. <dt><samp>sigma</samp></dt>
  24434. <dd><p>Set the noise sigma constant. This sets denoising strength.
  24435. Default value is 1. Allowed range is from 0 to 30.
  24436. Using very high sigma with low overlap may give blocking artifacts.
  24437. </p>
  24438. </dd>
  24439. <dt><samp>amount</samp></dt>
  24440. <dd><p>Set amount of denoising. By default all detected noise is reduced.
  24441. Default value is 1. Allowed range is from 0 to 1.
  24442. </p>
  24443. </dd>
  24444. <dt><samp>block</samp></dt>
  24445. <dd><p>Set size of block, Default is 4, can be 3, 4, 5 or 6.
  24446. Actual size of block in pixels is 2 to power of <var>block</var>, so by default
  24447. block size in pixels is 2^4 which is 16.
  24448. </p>
  24449. </dd>
  24450. <dt><samp>overlap</samp></dt>
  24451. <dd><p>Set block overlap. Default is 0.5. Allowed range is from 0.2 to 0.8.
  24452. </p>
  24453. </dd>
  24454. <dt><samp>prev</samp></dt>
  24455. <dd><p>Set number of previous frames to use for denoising. By default is set to 0.
  24456. </p>
  24457. </dd>
  24458. <dt><samp>next</samp></dt>
  24459. <dd><p>Set number of next frames to to use for denoising. By default is set to 0.
  24460. </p>
  24461. </dd>
  24462. <dt><samp>planes</samp></dt>
  24463. <dd><p>Set planes which will be filtered, by default are all available filtered
  24464. except alpha.
  24465. </p></dd>
  24466. </dl>
  24467. <a name="fftfilt"></a>
  24468. <h3 class="section">32.78 fftfilt<span class="pull-right"><a class="anchor hidden-xs" href="#fftfilt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fftfilt" aria-hidden="true">TOC</a></span></h3>
  24469. <p>Apply arbitrary expressions to samples in frequency domain
  24470. </p>
  24471. <dl compact="compact">
  24472. <dt><samp>dc_Y</samp></dt>
  24473. <dd><p>Adjust the dc value (gain) of the luma plane of the image. The filter
  24474. accepts an integer value in range <code>0</code> to <code>1000</code>. The default
  24475. value is set to <code>0</code>.
  24476. </p>
  24477. </dd>
  24478. <dt><samp>dc_U</samp></dt>
  24479. <dd><p>Adjust the dc value (gain) of the 1st chroma plane of the image. The
  24480. filter accepts an integer value in range <code>0</code> to <code>1000</code>. The
  24481. default value is set to <code>0</code>.
  24482. </p>
  24483. </dd>
  24484. <dt><samp>dc_V</samp></dt>
  24485. <dd><p>Adjust the dc value (gain) of the 2nd chroma plane of the image. The
  24486. filter accepts an integer value in range <code>0</code> to <code>1000</code>. The
  24487. default value is set to <code>0</code>.
  24488. </p>
  24489. </dd>
  24490. <dt><samp>weight_Y</samp></dt>
  24491. <dd><p>Set the frequency domain weight expression for the luma plane.
  24492. </p>
  24493. </dd>
  24494. <dt><samp>weight_U</samp></dt>
  24495. <dd><p>Set the frequency domain weight expression for the 1st chroma plane.
  24496. </p>
  24497. </dd>
  24498. <dt><samp>weight_V</samp></dt>
  24499. <dd><p>Set the frequency domain weight expression for the 2nd chroma plane.
  24500. </p>
  24501. </dd>
  24502. <dt><samp>eval</samp></dt>
  24503. <dd><p>Set when the expressions are evaluated.
  24504. </p>
  24505. <p>It accepts the following values:
  24506. </p><dl compact="compact">
  24507. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  24508. <dd><p>Only evaluate expressions once during the filter initialization.
  24509. </p>
  24510. </dd>
  24511. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  24512. <dd><p>Evaluate expressions for each incoming frame.
  24513. </p></dd>
  24514. </dl>
  24515. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  24516. </p>
  24517. <p>The filter accepts the following variables:
  24518. </p></dd>
  24519. <dt><samp>X</samp></dt>
  24520. <dt><samp>Y</samp></dt>
  24521. <dd><p>The coordinates of the current sample.
  24522. </p>
  24523. </dd>
  24524. <dt><samp>W</samp></dt>
  24525. <dt><samp>H</samp></dt>
  24526. <dd><p>The width and height of the image.
  24527. </p>
  24528. </dd>
  24529. <dt><samp>N</samp></dt>
  24530. <dd><p>The number of input frame, starting from 0.
  24531. </p></dd>
  24532. </dl>
  24533. <a name="Examples-80"></a>
  24534. <h4 class="subsection">32.78.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-80" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-80" aria-hidden="true">TOC</a></span></h4>
  24535. <ul>
  24536. <li> High-pass:
  24537. <div class="example">
  24538. <pre class="example">fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
  24539. </pre></div>
  24540. </li><li> Low-pass:
  24541. <div class="example">
  24542. <pre class="example">fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
  24543. </pre></div>
  24544. </li><li> Sharpen:
  24545. <div class="example">
  24546. <pre class="example">fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
  24547. </pre></div>
  24548. </li><li> Blur:
  24549. <div class="example">
  24550. <pre class="example">fftfilt=dc_Y=0:weight_Y='exp(-4 * ((Y+X)/(W+H)))'
  24551. </pre></div>
  24552. </li></ul>
  24553. <a name="field"></a>
  24554. <h3 class="section">32.79 field<span class="pull-right"><a class="anchor hidden-xs" href="#field" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-field" aria-hidden="true">TOC</a></span></h3>
  24555. <p>Extract a single field from an interlaced image using stride
  24556. arithmetic to avoid wasting CPU time. The output frames are marked as
  24557. non-interlaced.
  24558. </p>
  24559. <p>The filter accepts the following options:
  24560. </p>
  24561. <dl compact="compact">
  24562. <dt><samp>type</samp></dt>
  24563. <dd><p>Specify whether to extract the top (if the value is <code>0</code> or
  24564. <code>top</code>) or the bottom field (if the value is <code>1</code> or
  24565. <code>bottom</code>).
  24566. </p></dd>
  24567. </dl>
  24568. <a name="fieldhint"></a>
  24569. <h3 class="section">32.80 fieldhint<span class="pull-right"><a class="anchor hidden-xs" href="#fieldhint" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fieldhint" aria-hidden="true">TOC</a></span></h3>
  24570. <p>Create new frames by copying the top and bottom fields from surrounding frames
  24571. supplied as numbers by the hint file.
  24572. </p>
  24573. <dl compact="compact">
  24574. <dt><samp>hint</samp></dt>
  24575. <dd><p>Set file containing hints: absolute/relative frame numbers.
  24576. </p>
  24577. <p>There must be one line for each frame in a clip. Each line must contain two
  24578. numbers separated by the comma, optionally followed by <code>-</code> or <code>+</code>.
  24579. Numbers supplied on each line of file can not be out of [N-1,N+1] where N
  24580. is current frame number for <code>absolute</code> mode or out of [-1, 1] range
  24581. for <code>relative</code> mode. First number tells from which frame to pick up top
  24582. field and second number tells from which frame to pick up bottom field.
  24583. </p>
  24584. <p>If optionally followed by <code>+</code> output frame will be marked as interlaced,
  24585. else if followed by <code>-</code> output frame will be marked as progressive, else
  24586. it will be marked same as input frame.
  24587. If optionally followed by <code>t</code> output frame will use only top field, or in
  24588. case of <code>b</code> it will use only bottom field.
  24589. If line starts with <code>#</code> or <code>;</code> that line is skipped.
  24590. </p>
  24591. </dd>
  24592. <dt><samp>mode</samp></dt>
  24593. <dd><p>Can be item <code>absolute</code> or <code>relative</code>. Default is <code>absolute</code>.
  24594. </p></dd>
  24595. </dl>
  24596. <p>Example of first several lines of <code>hint</code> file for <code>relative</code> mode:
  24597. </p><div class="example">
  24598. <pre class="example">0,0 - # first frame
  24599. 1,0 - # second frame, use third's frame top field and second's frame bottom field
  24600. 1,0 - # third frame, use fourth's frame top field and third's frame bottom field
  24601. 1,0 -
  24602. 0,0 -
  24603. 0,0 -
  24604. 1,0 -
  24605. 1,0 -
  24606. 1,0 -
  24607. 0,0 -
  24608. 0,0 -
  24609. 1,0 -
  24610. 1,0 -
  24611. 1,0 -
  24612. 0,0 -
  24613. </pre></div>
  24614. <a name="fieldmatch"></a>
  24615. <h3 class="section">32.81 fieldmatch<span class="pull-right"><a class="anchor hidden-xs" href="#fieldmatch" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fieldmatch" aria-hidden="true">TOC</a></span></h3>
  24616. <p>Field matching filter for inverse telecine. It is meant to reconstruct the
  24617. progressive frames from a telecined stream. The filter does not drop duplicated
  24618. frames, so to achieve a complete inverse telecine <code>fieldmatch</code> needs to be
  24619. followed by a decimation filter such as <a href="#decimate">decimate</a> in the filtergraph.
  24620. </p>
  24621. <p>The separation of the field matching and the decimation is notably motivated by
  24622. the possibility of inserting a de-interlacing filter fallback between the two.
  24623. If the source has mixed telecined and real interlaced content,
  24624. <code>fieldmatch</code> will not be able to match fields for the interlaced parts.
  24625. But these remaining combed frames will be marked as interlaced, and thus can be
  24626. de-interlaced by a later filter such as <a href="#yadif">yadif</a> before decimation.
  24627. </p>
  24628. <p>In addition to the various configuration options, <code>fieldmatch</code> can take an
  24629. optional second stream, activated through the <samp>ppsrc</samp> option. If
  24630. enabled, the frames reconstruction will be based on the fields and frames from
  24631. this second stream. This allows the first input to be pre-processed in order to
  24632. help the various algorithms of the filter, while keeping the output lossless
  24633. (assuming the fields are matched properly). Typically, a field-aware denoiser,
  24634. or brightness/contrast adjustments can help.
  24635. </p>
  24636. <p>Note that this filter uses the same algorithms as TIVTC/TFM (AviSynth project)
  24637. and VIVTC/VFM (VapourSynth project). The later is a light clone of TFM from
  24638. which <code>fieldmatch</code> is based on. While the semantic and usage are very
  24639. close, some behaviour and options names can differ.
  24640. </p>
  24641. <p>The <a href="#decimate">decimate</a> filter currently only works for constant frame rate input.
  24642. If your input has mixed telecined (30fps) and progressive content with a lower
  24643. framerate like 24fps use the following filterchain to produce the necessary cfr
  24644. stream: <code>dejudder,fps=30000/1001,fieldmatch,decimate</code>.
  24645. </p>
  24646. <p>The filter accepts the following options:
  24647. </p>
  24648. <dl compact="compact">
  24649. <dt><samp>order</samp></dt>
  24650. <dd><p>Specify the assumed field order of the input stream. Available values are:
  24651. </p>
  24652. <dl compact="compact">
  24653. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  24654. <dd><p>Auto detect parity (use FFmpeg&rsquo;s internal parity value).
  24655. </p></dd>
  24656. <dt>&lsquo;<samp>bff</samp>&rsquo;</dt>
  24657. <dd><p>Assume bottom field first.
  24658. </p></dd>
  24659. <dt>&lsquo;<samp>tff</samp>&rsquo;</dt>
  24660. <dd><p>Assume top field first.
  24661. </p></dd>
  24662. </dl>
  24663. <p>Note that it is sometimes recommended not to trust the parity announced by the
  24664. stream.
  24665. </p>
  24666. <p>Default value is <var>auto</var>.
  24667. </p>
  24668. </dd>
  24669. <dt><samp>mode</samp></dt>
  24670. <dd><p>Set the matching mode or strategy to use. <samp>pc</samp> mode is the safest in the
  24671. sense that it won&rsquo;t risk creating jerkiness due to duplicate frames when
  24672. possible, but if there are bad edits or blended fields it will end up
  24673. outputting combed frames when a good match might actually exist. On the other
  24674. hand, <samp>pcn_ub</samp> mode is the most risky in terms of creating jerkiness,
  24675. but will almost always find a good frame if there is one. The other values are
  24676. all somewhere in between <samp>pc</samp> and <samp>pcn_ub</samp> in terms of risking
  24677. jerkiness and creating duplicate frames versus finding good matches in sections
  24678. with bad edits, orphaned fields, blended fields, etc.
  24679. </p>
  24680. <p>More details about p/c/n/u/b are available in <a href="#p_002fc_002fn_002fu_002fb-meaning">p/c/n/u/b meaning</a> section.
  24681. </p>
  24682. <p>Available values are:
  24683. </p>
  24684. <dl compact="compact">
  24685. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  24686. <dd><p>2-way matching (p/c)
  24687. </p></dd>
  24688. <dt>&lsquo;<samp>pc_n</samp>&rsquo;</dt>
  24689. <dd><p>2-way matching, and trying 3rd match if still combed (p/c + n)
  24690. </p></dd>
  24691. <dt>&lsquo;<samp>pc_u</samp>&rsquo;</dt>
  24692. <dd><p>2-way matching, and trying 3rd match (same order) if still combed (p/c + u)
  24693. </p></dd>
  24694. <dt>&lsquo;<samp>pc_n_ub</samp>&rsquo;</dt>
  24695. <dd><p>2-way matching, trying 3rd match if still combed, and trying 4th/5th matches if
  24696. still combed (p/c + n + u/b)
  24697. </p></dd>
  24698. <dt>&lsquo;<samp>pcn</samp>&rsquo;</dt>
  24699. <dd><p>3-way matching (p/c/n)
  24700. </p></dd>
  24701. <dt>&lsquo;<samp>pcn_ub</samp>&rsquo;</dt>
  24702. <dd><p>3-way matching, and trying 4th/5th matches if all 3 of the original matches are
  24703. detected as combed (p/c/n + u/b)
  24704. </p></dd>
  24705. </dl>
  24706. <p>The parenthesis at the end indicate the matches that would be used for that
  24707. mode assuming <samp>order</samp>=<var>tff</var> (and <samp>field</samp> on <var>auto</var> or
  24708. <var>top</var>).
  24709. </p>
  24710. <p>In terms of speed <samp>pc</samp> mode is by far the fastest and <samp>pcn_ub</samp> is
  24711. the slowest.
  24712. </p>
  24713. <p>Default value is <var>pc_n</var>.
  24714. </p>
  24715. </dd>
  24716. <dt><samp>ppsrc</samp></dt>
  24717. <dd><p>Mark the main input stream as a pre-processed input, and enable the secondary
  24718. input stream as the clean source to pick the fields from. See the filter
  24719. introduction for more details. It is similar to the <samp>clip2</samp> feature from
  24720. VFM/TFM.
  24721. </p>
  24722. <p>Default value is <code>0</code> (disabled).
  24723. </p>
  24724. </dd>
  24725. <dt><samp>field</samp></dt>
  24726. <dd><p>Set the field to match from. It is recommended to set this to the same value as
  24727. <samp>order</samp> unless you experience matching failures with that setting. In
  24728. certain circumstances changing the field that is used to match from can have a
  24729. large impact on matching performance. Available values are:
  24730. </p>
  24731. <dl compact="compact">
  24732. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  24733. <dd><p>Automatic (same value as <samp>order</samp>).
  24734. </p></dd>
  24735. <dt>&lsquo;<samp>bottom</samp>&rsquo;</dt>
  24736. <dd><p>Match from the bottom field.
  24737. </p></dd>
  24738. <dt>&lsquo;<samp>top</samp>&rsquo;</dt>
  24739. <dd><p>Match from the top field.
  24740. </p></dd>
  24741. </dl>
  24742. <p>Default value is <var>auto</var>.
  24743. </p>
  24744. </dd>
  24745. <dt><samp>mchroma</samp></dt>
  24746. <dd><p>Set whether or not chroma is included during the match comparisons. In most
  24747. cases it is recommended to leave this enabled. You should set this to <code>0</code>
  24748. only if your clip has bad chroma problems such as heavy rainbowing or other
  24749. artifacts. Setting this to <code>0</code> could also be used to speed things up at
  24750. the cost of some accuracy.
  24751. </p>
  24752. <p>Default value is <code>1</code>.
  24753. </p>
  24754. </dd>
  24755. <dt><samp>y0</samp></dt>
  24756. <dt><samp>y1</samp></dt>
  24757. <dd><p>These define an exclusion band which excludes the lines between <samp>y0</samp> and
  24758. <samp>y1</samp> from being included in the field matching decision. An exclusion
  24759. band can be used to ignore subtitles, a logo, or other things that may
  24760. interfere with the matching. <samp>y0</samp> sets the starting scan line and
  24761. <samp>y1</samp> sets the ending line; all lines in between <samp>y0</samp> and
  24762. <samp>y1</samp> (including <samp>y0</samp> and <samp>y1</samp>) will be ignored. Setting
  24763. <samp>y0</samp> and <samp>y1</samp> to the same value will disable the feature.
  24764. <samp>y0</samp> and <samp>y1</samp> defaults to <code>0</code>.
  24765. </p>
  24766. </dd>
  24767. <dt><samp>scthresh</samp></dt>
  24768. <dd><p>Set the scene change detection threshold as a percentage of maximum change on
  24769. the luma plane. Good values are in the <code>[8.0, 14.0]</code> range. Scene change
  24770. detection is only relevant in case <samp>combmatch</samp>=<var>sc</var>. The range for
  24771. <samp>scthresh</samp> is <code>[0.0, 100.0]</code>.
  24772. </p>
  24773. <p>Default value is <code>12.0</code>.
  24774. </p>
  24775. </dd>
  24776. <dt><samp>combmatch</samp></dt>
  24777. <dd><p>When <samp>combatch</samp> is not <var>none</var>, <code>fieldmatch</code> will take into
  24778. account the combed scores of matches when deciding what match to use as the
  24779. final match. Available values are:
  24780. </p>
  24781. <dl compact="compact">
  24782. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  24783. <dd><p>No final matching based on combed scores.
  24784. </p></dd>
  24785. <dt>&lsquo;<samp>sc</samp>&rsquo;</dt>
  24786. <dd><p>Combed scores are only used when a scene change is detected.
  24787. </p></dd>
  24788. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  24789. <dd><p>Use combed scores all the time.
  24790. </p></dd>
  24791. </dl>
  24792. <p>Default is <var>sc</var>.
  24793. </p>
  24794. </dd>
  24795. <dt><samp>combdbg</samp></dt>
  24796. <dd><p>Force <code>fieldmatch</code> to calculate the combed metrics for certain matches and
  24797. print them. This setting is known as <samp>micout</samp> in TFM/VFM vocabulary.
  24798. Available values are:
  24799. </p>
  24800. <dl compact="compact">
  24801. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  24802. <dd><p>No forced calculation.
  24803. </p></dd>
  24804. <dt>&lsquo;<samp>pcn</samp>&rsquo;</dt>
  24805. <dd><p>Force p/c/n calculations.
  24806. </p></dd>
  24807. <dt>&lsquo;<samp>pcnub</samp>&rsquo;</dt>
  24808. <dd><p>Force p/c/n/u/b calculations.
  24809. </p></dd>
  24810. </dl>
  24811. <p>Default value is <var>none</var>.
  24812. </p>
  24813. </dd>
  24814. <dt><samp>cthresh</samp></dt>
  24815. <dd><p>This is the area combing threshold used for combed frame detection. This
  24816. essentially controls how &quot;strong&quot; or &quot;visible&quot; combing must be to be detected.
  24817. Larger values mean combing must be more visible and smaller values mean combing
  24818. can be less visible or strong and still be detected. Valid settings are from
  24819. <code>-1</code> (every pixel will be detected as combed) to <code>255</code> (no pixel will
  24820. be detected as combed). This is basically a pixel difference value. A good
  24821. range is <code>[8, 12]</code>.
  24822. </p>
  24823. <p>Default value is <code>9</code>.
  24824. </p>
  24825. </dd>
  24826. <dt><samp>chroma</samp></dt>
  24827. <dd><p>Sets whether or not chroma is considered in the combed frame decision. Only
  24828. disable this if your source has chroma problems (rainbowing, etc.) that are
  24829. causing problems for the combed frame detection with chroma enabled. Actually,
  24830. using <samp>chroma</samp>=<var>0</var> is usually more reliable, except for the case
  24831. where there is chroma only combing in the source.
  24832. </p>
  24833. <p>Default value is <code>0</code>.
  24834. </p>
  24835. </dd>
  24836. <dt><samp>blockx</samp></dt>
  24837. <dt><samp>blocky</samp></dt>
  24838. <dd><p>Respectively set the x-axis and y-axis size of the window used during combed
  24839. frame detection. This has to do with the size of the area in which
  24840. <samp>combpel</samp> pixels are required to be detected as combed for a frame to be
  24841. declared combed. See the <samp>combpel</samp> parameter description for more info.
  24842. Possible values are any number that is a power of 2 starting at 4 and going up
  24843. to 512.
  24844. </p>
  24845. <p>Default value is <code>16</code>.
  24846. </p>
  24847. </dd>
  24848. <dt><samp>combpel</samp></dt>
  24849. <dd><p>The number of combed pixels inside any of the <samp>blocky</samp> by
  24850. <samp>blockx</samp> size blocks on the frame for the frame to be detected as
  24851. combed. While <samp>cthresh</samp> controls how &quot;visible&quot; the combing must be, this
  24852. setting controls &quot;how much&quot; combing there must be in any localized area (a
  24853. window defined by the <samp>blockx</samp> and <samp>blocky</samp> settings) on the
  24854. frame. Minimum value is <code>0</code> and maximum is <code>blocky x blockx</code> (at
  24855. which point no frames will ever be detected as combed). This setting is known
  24856. as <samp>MI</samp> in TFM/VFM vocabulary.
  24857. </p>
  24858. <p>Default value is <code>80</code>.
  24859. </p></dd>
  24860. </dl>
  24861. <span id="p_002fc_002fn_002fu_002fb-meaning"></span><a name="p_002fc_002fn_002fu_002fb-meaning-1"></a>
  24862. <h4 class="subsection">32.81.1 p/c/n/u/b meaning<span class="pull-right"><a class="anchor hidden-xs" href="#p_002fc_002fn_002fu_002fb-meaning-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-p_002fc_002fn_002fu_002fb-meaning-1" aria-hidden="true">TOC</a></span></h4>
  24863. <a name="p_002fc_002fn"></a>
  24864. <h4 class="subsubsection">32.81.1.1 p/c/n<span class="pull-right"><a class="anchor hidden-xs" href="#p_002fc_002fn" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-p_002fc_002fn" aria-hidden="true">TOC</a></span></h4>
  24865. <p>We assume the following telecined stream:
  24866. </p>
  24867. <div class="example">
  24868. <pre class="example">Top fields: 1 2 2 3 4
  24869. Bottom fields: 1 2 3 4 4
  24870. </pre></div>
  24871. <p>The numbers correspond to the progressive frame the fields relate to. Here, the
  24872. first two frames are progressive, the 3rd and 4th are combed, and so on.
  24873. </p>
  24874. <p>When <code>fieldmatch</code> is configured to run a matching from bottom
  24875. (<samp>field</samp>=<var>bottom</var>) this is how this input stream get transformed:
  24876. </p>
  24877. <div class="example">
  24878. <pre class="example">Input stream:
  24879. T 1 2 2 3 4
  24880. B 1 2 3 4 4 &lt;-- matching reference
  24881. Matches: c c n n c
  24882. Output stream:
  24883. T 1 2 3 4 4
  24884. B 1 2 3 4 4
  24885. </pre></div>
  24886. <p>As a result of the field matching, we can see that some frames get duplicated.
  24887. To perform a complete inverse telecine, you need to rely on a decimation filter
  24888. after this operation. See for instance the <a href="#decimate">decimate</a> filter.
  24889. </p>
  24890. <p>The same operation now matching from top fields (<samp>field</samp>=<var>top</var>)
  24891. looks like this:
  24892. </p>
  24893. <div class="example">
  24894. <pre class="example">Input stream:
  24895. T 1 2 2 3 4 &lt;-- matching reference
  24896. B 1 2 3 4 4
  24897. Matches: c c p p c
  24898. Output stream:
  24899. T 1 2 2 3 4
  24900. B 1 2 2 3 4
  24901. </pre></div>
  24902. <p>In these examples, we can see what <var>p</var>, <var>c</var> and <var>n</var> mean;
  24903. basically, they refer to the frame and field of the opposite parity:
  24904. </p>
  24905. <ul>
  24906. <li> <var>p</var> matches the field of the opposite parity in the previous frame
  24907. </li><li> <var>c</var> matches the field of the opposite parity in the current frame
  24908. </li><li> <var>n</var> matches the field of the opposite parity in the next frame
  24909. </li></ul>
  24910. <a name="u_002fb"></a>
  24911. <h4 class="subsubsection">32.81.1.2 u/b<span class="pull-right"><a class="anchor hidden-xs" href="#u_002fb" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-u_002fb" aria-hidden="true">TOC</a></span></h4>
  24912. <p>The <var>u</var> and <var>b</var> matching are a bit special in the sense that they match
  24913. from the opposite parity flag. In the following examples, we assume that we are
  24914. currently matching the 2nd frame (Top:2, bottom:2). According to the match, a
  24915. &rsquo;x&rsquo; is placed above and below each matched fields.
  24916. </p>
  24917. <p>With bottom matching (<samp>field</samp>=<var>bottom</var>):
  24918. </p><div class="example">
  24919. <pre class="example">Match: c p n b u
  24920. x x x x x
  24921. Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
  24922. Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
  24923. x x x x x
  24924. Output frames:
  24925. 2 1 2 2 2
  24926. 2 2 2 1 3
  24927. </pre></div>
  24928. <p>With top matching (<samp>field</samp>=<var>top</var>):
  24929. </p><div class="example">
  24930. <pre class="example">Match: c p n b u
  24931. x x x x x
  24932. Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
  24933. Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
  24934. x x x x x
  24935. Output frames:
  24936. 2 2 2 1 2
  24937. 2 1 3 2 2
  24938. </pre></div>
  24939. <a name="Examples-81"></a>
  24940. <h4 class="subsection">32.81.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-81" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-81" aria-hidden="true">TOC</a></span></h4>
  24941. <p>Simple IVTC of a top field first telecined stream:
  24942. </p><div class="example">
  24943. <pre class="example">fieldmatch=order=tff:combmatch=none, decimate
  24944. </pre></div>
  24945. <p>Advanced IVTC, with fallback on <a href="#yadif">yadif</a> for still combed frames:
  24946. </p><div class="example">
  24947. <pre class="example">fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
  24948. </pre></div>
  24949. <a name="fieldorder"></a>
  24950. <h3 class="section">32.82 fieldorder<span class="pull-right"><a class="anchor hidden-xs" href="#fieldorder" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fieldorder" aria-hidden="true">TOC</a></span></h3>
  24951. <p>Transform the field order of the input video.
  24952. </p>
  24953. <p>It accepts the following parameters:
  24954. </p>
  24955. <dl compact="compact">
  24956. <dt><samp>order</samp></dt>
  24957. <dd><p>The output field order. Valid values are <var>tff</var> for top field first or <var>bff</var>
  24958. for bottom field first.
  24959. </p></dd>
  24960. </dl>
  24961. <p>The default value is &lsquo;<samp>tff</samp>&rsquo;.
  24962. </p>
  24963. <p>The transformation is done by shifting the picture content up or down
  24964. by one line, and filling the remaining line with appropriate picture content.
  24965. This method is consistent with most broadcast field order converters.
  24966. </p>
  24967. <p>If the input video is not flagged as being interlaced, or it is already
  24968. flagged as being of the required output field order, then this filter does
  24969. not alter the incoming video.
  24970. </p>
  24971. <p>It is very useful when converting to or from PAL DV material,
  24972. which is bottom field first.
  24973. </p>
  24974. <p>For example:
  24975. </p><div class="example">
  24976. <pre class="example">ffmpeg -i in.vob -vf &quot;fieldorder=bff&quot; out.dv
  24977. </pre></div>
  24978. <a name="fifo_002c-afifo"></a>
  24979. <h3 class="section">32.83 fifo, afifo<span class="pull-right"><a class="anchor hidden-xs" href="#fifo_002c-afifo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fifo_002c-afifo" aria-hidden="true">TOC</a></span></h3>
  24980. <p>Buffer input images and send them when they are requested.
  24981. </p>
  24982. <p>It is mainly useful when auto-inserted by the libavfilter
  24983. framework.
  24984. </p>
  24985. <p>It does not take parameters.
  24986. </p>
  24987. <a name="fillborders"></a>
  24988. <h3 class="section">32.84 fillborders<span class="pull-right"><a class="anchor hidden-xs" href="#fillborders" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fillborders" aria-hidden="true">TOC</a></span></h3>
  24989. <p>Fill borders of the input video, without changing video stream dimensions.
  24990. Sometimes video can have garbage at the four edges and you may not want to
  24991. crop video input to keep size multiple of some number.
  24992. </p>
  24993. <p>This filter accepts the following options:
  24994. </p>
  24995. <dl compact="compact">
  24996. <dt><samp>left</samp></dt>
  24997. <dd><p>Number of pixels to fill from left border.
  24998. </p>
  24999. </dd>
  25000. <dt><samp>right</samp></dt>
  25001. <dd><p>Number of pixels to fill from right border.
  25002. </p>
  25003. </dd>
  25004. <dt><samp>top</samp></dt>
  25005. <dd><p>Number of pixels to fill from top border.
  25006. </p>
  25007. </dd>
  25008. <dt><samp>bottom</samp></dt>
  25009. <dd><p>Number of pixels to fill from bottom border.
  25010. </p>
  25011. </dd>
  25012. <dt><samp>mode</samp></dt>
  25013. <dd><p>Set fill mode.
  25014. </p>
  25015. <p>It accepts the following values:
  25016. </p><dl compact="compact">
  25017. <dt>&lsquo;<samp>smear</samp>&rsquo;</dt>
  25018. <dd><p>fill pixels using outermost pixels
  25019. </p>
  25020. </dd>
  25021. <dt>&lsquo;<samp>mirror</samp>&rsquo;</dt>
  25022. <dd><p>fill pixels using mirroring (half sample symmetric)
  25023. </p>
  25024. </dd>
  25025. <dt>&lsquo;<samp>fixed</samp>&rsquo;</dt>
  25026. <dd><p>fill pixels with constant value
  25027. </p>
  25028. </dd>
  25029. <dt>&lsquo;<samp>reflect</samp>&rsquo;</dt>
  25030. <dd><p>fill pixels using reflecting (whole sample symmetric)
  25031. </p>
  25032. </dd>
  25033. <dt>&lsquo;<samp>wrap</samp>&rsquo;</dt>
  25034. <dd><p>fill pixels using wrapping
  25035. </p>
  25036. </dd>
  25037. <dt>&lsquo;<samp>fade</samp>&rsquo;</dt>
  25038. <dd><p>fade pixels to constant value
  25039. </p></dd>
  25040. </dl>
  25041. <p>Default is <var>smear</var>.
  25042. </p>
  25043. </dd>
  25044. <dt><samp>color</samp></dt>
  25045. <dd><p>Set color for pixels in fixed or fade mode. Default is <var>black</var>.
  25046. </p></dd>
  25047. </dl>
  25048. <a name="Commands-80"></a>
  25049. <h4 class="subsection">32.84.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-80" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-80" aria-hidden="true">TOC</a></span></h4>
  25050. <p>This filter supports same <a href="#commands">commands</a> as options.
  25051. The command accepts the same syntax of the corresponding option.
  25052. </p>
  25053. <p>If the specified expression is not valid, it is kept at its current
  25054. value.
  25055. </p>
  25056. <a name="find_005frect"></a>
  25057. <h3 class="section">32.85 find_rect<span class="pull-right"><a class="anchor hidden-xs" href="#find_005frect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-find_005frect" aria-hidden="true">TOC</a></span></h3>
  25058. <p>Find a rectangular object
  25059. </p>
  25060. <p>It accepts the following options:
  25061. </p>
  25062. <dl compact="compact">
  25063. <dt><samp>object</samp></dt>
  25064. <dd><p>Filepath of the object image, needs to be in gray8.
  25065. </p>
  25066. </dd>
  25067. <dt><samp>threshold</samp></dt>
  25068. <dd><p>Detection threshold, default is 0.5.
  25069. </p>
  25070. </dd>
  25071. <dt><samp>mipmaps</samp></dt>
  25072. <dd><p>Number of mipmaps, default is 3.
  25073. </p>
  25074. </dd>
  25075. <dt><samp>xmin, ymin, xmax, ymax</samp></dt>
  25076. <dd><p>Specifies the rectangle in which to search.
  25077. </p></dd>
  25078. </dl>
  25079. <a name="Examples-82"></a>
  25080. <h4 class="subsection">32.85.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-82" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-82" aria-hidden="true">TOC</a></span></h4>
  25081. <ul>
  25082. <li> Cover a rectangular object by the supplied image of a given video using <code>ffmpeg</code>:
  25083. <div class="example">
  25084. <pre class="example">ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
  25085. </pre></div>
  25086. </li></ul>
  25087. <a name="floodfill"></a>
  25088. <h3 class="section">32.86 floodfill<span class="pull-right"><a class="anchor hidden-xs" href="#floodfill" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-floodfill" aria-hidden="true">TOC</a></span></h3>
  25089. <p>Flood area with values of same pixel components with another values.
  25090. </p>
  25091. <p>It accepts the following options:
  25092. </p><dl compact="compact">
  25093. <dt><samp>x</samp></dt>
  25094. <dd><p>Set pixel x coordinate.
  25095. </p>
  25096. </dd>
  25097. <dt><samp>y</samp></dt>
  25098. <dd><p>Set pixel y coordinate.
  25099. </p>
  25100. </dd>
  25101. <dt><samp>s0</samp></dt>
  25102. <dd><p>Set source #0 component value.
  25103. </p>
  25104. </dd>
  25105. <dt><samp>s1</samp></dt>
  25106. <dd><p>Set source #1 component value.
  25107. </p>
  25108. </dd>
  25109. <dt><samp>s2</samp></dt>
  25110. <dd><p>Set source #2 component value.
  25111. </p>
  25112. </dd>
  25113. <dt><samp>s3</samp></dt>
  25114. <dd><p>Set source #3 component value.
  25115. </p>
  25116. </dd>
  25117. <dt><samp>d0</samp></dt>
  25118. <dd><p>Set destination #0 component value.
  25119. </p>
  25120. </dd>
  25121. <dt><samp>d1</samp></dt>
  25122. <dd><p>Set destination #1 component value.
  25123. </p>
  25124. </dd>
  25125. <dt><samp>d2</samp></dt>
  25126. <dd><p>Set destination #2 component value.
  25127. </p>
  25128. </dd>
  25129. <dt><samp>d3</samp></dt>
  25130. <dd><p>Set destination #3 component value.
  25131. </p></dd>
  25132. </dl>
  25133. <span id="format"></span><a name="format-1"></a>
  25134. <h3 class="section">32.87 format<span class="pull-right"><a class="anchor hidden-xs" href="#format-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-format-1" aria-hidden="true">TOC</a></span></h3>
  25135. <p>Convert the input video to one of the specified pixel formats.
  25136. Libavfilter will try to pick one that is suitable as input to
  25137. the next filter.
  25138. </p>
  25139. <p>It accepts the following parameters:
  25140. </p><dl compact="compact">
  25141. <dt><samp>pix_fmts</samp></dt>
  25142. <dd><p>A &rsquo;|&rsquo;-separated list of pixel format names, such as
  25143. &quot;pix_fmts=yuv420p|monow|rgb24&quot;.
  25144. </p>
  25145. </dd>
  25146. </dl>
  25147. <a name="Examples-83"></a>
  25148. <h4 class="subsection">32.87.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-83" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-83" aria-hidden="true">TOC</a></span></h4>
  25149. <ul>
  25150. <li> Convert the input video to the <var>yuv420p</var> format
  25151. <div class="example">
  25152. <pre class="example">format=pix_fmts=yuv420p
  25153. </pre></div>
  25154. <p>Convert the input video to any of the formats in the list
  25155. </p><div class="example">
  25156. <pre class="example">format=pix_fmts=yuv420p|yuv444p|yuv410p
  25157. </pre></div>
  25158. </li></ul>
  25159. <span id="fps"></span><a name="fps-1"></a>
  25160. <h3 class="section">32.88 fps<span class="pull-right"><a class="anchor hidden-xs" href="#fps-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fps-1" aria-hidden="true">TOC</a></span></h3>
  25161. <p>Convert the video to specified constant frame rate by duplicating or dropping
  25162. frames as necessary.
  25163. </p>
  25164. <p>It accepts the following parameters:
  25165. </p><dl compact="compact">
  25166. <dt><samp>fps</samp></dt>
  25167. <dd><p>The desired output frame rate. The default is <code>25</code>.
  25168. </p>
  25169. </dd>
  25170. <dt><samp>start_time</samp></dt>
  25171. <dd><p>Assume the first PTS should be the given value, in seconds. This allows for
  25172. padding/trimming at the start of stream. By default, no assumption is made
  25173. about the first frame&rsquo;s expected PTS, so no padding or trimming is done.
  25174. For example, this could be set to 0 to pad the beginning with duplicates of
  25175. the first frame if a video stream starts after the audio stream or to trim any
  25176. frames with a negative PTS.
  25177. </p>
  25178. </dd>
  25179. <dt><samp>round</samp></dt>
  25180. <dd><p>Timestamp (PTS) rounding method.
  25181. </p>
  25182. <p>Possible values are:
  25183. </p><dl compact="compact">
  25184. <dt><samp>zero</samp></dt>
  25185. <dd><p>round towards 0
  25186. </p></dd>
  25187. <dt><samp>inf</samp></dt>
  25188. <dd><p>round away from 0
  25189. </p></dd>
  25190. <dt><samp>down</samp></dt>
  25191. <dd><p>round towards -infinity
  25192. </p></dd>
  25193. <dt><samp>up</samp></dt>
  25194. <dd><p>round towards +infinity
  25195. </p></dd>
  25196. <dt><samp>near</samp></dt>
  25197. <dd><p>round to nearest
  25198. </p></dd>
  25199. </dl>
  25200. <p>The default is <code>near</code>.
  25201. </p>
  25202. </dd>
  25203. <dt><samp>eof_action</samp></dt>
  25204. <dd><p>Action performed when reading the last frame.
  25205. </p>
  25206. <p>Possible values are:
  25207. </p><dl compact="compact">
  25208. <dt><samp>round</samp></dt>
  25209. <dd><p>Use same timestamp rounding method as used for other frames.
  25210. </p></dd>
  25211. <dt><samp>pass</samp></dt>
  25212. <dd><p>Pass through last frame if input duration has not been reached yet.
  25213. </p></dd>
  25214. </dl>
  25215. <p>The default is <code>round</code>.
  25216. </p>
  25217. </dd>
  25218. </dl>
  25219. <p>Alternatively, the options can be specified as a flat string:
  25220. <var>fps</var>[:<var>start_time</var>[:<var>round</var>]].
  25221. </p>
  25222. <p>See also the <a href="#setpts">setpts</a> filter.
  25223. </p>
  25224. <a name="Examples-84"></a>
  25225. <h4 class="subsection">32.88.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-84" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-84" aria-hidden="true">TOC</a></span></h4>
  25226. <ul>
  25227. <li> A typical usage in order to set the fps to 25:
  25228. <div class="example">
  25229. <pre class="example">fps=fps=25
  25230. </pre></div>
  25231. </li><li> Sets the fps to 24, using abbreviation and rounding method to round to nearest:
  25232. <div class="example">
  25233. <pre class="example">fps=fps=film:round=near
  25234. </pre></div>
  25235. </li></ul>
  25236. <a name="framepack"></a>
  25237. <h3 class="section">32.89 framepack<span class="pull-right"><a class="anchor hidden-xs" href="#framepack" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-framepack" aria-hidden="true">TOC</a></span></h3>
  25238. <p>Pack two different video streams into a stereoscopic video, setting proper
  25239. metadata on supported codecs. The two views should have the same size and
  25240. framerate and processing will stop when the shorter video ends. Please note
  25241. that you may conveniently adjust view properties with the <a href="#scale">scale</a> and
  25242. <a href="#fps">fps</a> filters.
  25243. </p>
  25244. <p>It accepts the following parameters:
  25245. </p><dl compact="compact">
  25246. <dt><samp>format</samp></dt>
  25247. <dd><p>The desired packing format. Supported values are:
  25248. </p>
  25249. <dl compact="compact">
  25250. <dt><samp>sbs</samp></dt>
  25251. <dd><p>The views are next to each other (default).
  25252. </p>
  25253. </dd>
  25254. <dt><samp>tab</samp></dt>
  25255. <dd><p>The views are on top of each other.
  25256. </p>
  25257. </dd>
  25258. <dt><samp>lines</samp></dt>
  25259. <dd><p>The views are packed by line.
  25260. </p>
  25261. </dd>
  25262. <dt><samp>columns</samp></dt>
  25263. <dd><p>The views are packed by column.
  25264. </p>
  25265. </dd>
  25266. <dt><samp>frameseq</samp></dt>
  25267. <dd><p>The views are temporally interleaved.
  25268. </p>
  25269. </dd>
  25270. </dl>
  25271. </dd>
  25272. </dl>
  25273. <p>Some examples:
  25274. </p>
  25275. <div class="example">
  25276. <pre class="example"># Convert left and right views into a frame-sequential video
  25277. ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
  25278. # Convert views into a side-by-side video with the same output resolution as the input
  25279. 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
  25280. </pre></div>
  25281. <a name="framerate"></a>
  25282. <h3 class="section">32.90 framerate<span class="pull-right"><a class="anchor hidden-xs" href="#framerate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-framerate" aria-hidden="true">TOC</a></span></h3>
  25283. <p>Change the frame rate by interpolating new video output frames from the source
  25284. frames.
  25285. </p>
  25286. <p>This filter is not designed to function correctly with interlaced media. If
  25287. you wish to change the frame rate of interlaced media then you are required
  25288. to deinterlace before this filter and re-interlace after this filter.
  25289. </p>
  25290. <p>A description of the accepted options follows.
  25291. </p>
  25292. <dl compact="compact">
  25293. <dt><samp>fps</samp></dt>
  25294. <dd><p>Specify the output frames per second. This option can also be specified
  25295. as a value alone. The default is <code>50</code>.
  25296. </p>
  25297. </dd>
  25298. <dt><samp>interp_start</samp></dt>
  25299. <dd><p>Specify the start of a range where the output frame will be created as a
  25300. linear interpolation of two frames. The range is [<code>0</code>-<code>255</code>],
  25301. the default is <code>15</code>.
  25302. </p>
  25303. </dd>
  25304. <dt><samp>interp_end</samp></dt>
  25305. <dd><p>Specify the end of a range where the output frame will be created as a
  25306. linear interpolation of two frames. The range is [<code>0</code>-<code>255</code>],
  25307. the default is <code>240</code>.
  25308. </p>
  25309. </dd>
  25310. <dt><samp>scene</samp></dt>
  25311. <dd><p>Specify the level at which a scene change is detected as a value between
  25312. 0 and 100 to indicate a new scene; a low value reflects a low
  25313. probability for the current frame to introduce a new scene, while a higher
  25314. value means the current frame is more likely to be one.
  25315. The default is <code>8.2</code>.
  25316. </p>
  25317. </dd>
  25318. <dt><samp>flags</samp></dt>
  25319. <dd><p>Specify flags influencing the filter process.
  25320. </p>
  25321. <p>Available value for <var>flags</var> is:
  25322. </p>
  25323. <dl compact="compact">
  25324. <dt><samp>scene_change_detect, scd</samp></dt>
  25325. <dd><p>Enable scene change detection using the value of the option <var>scene</var>.
  25326. This flag is enabled by default.
  25327. </p></dd>
  25328. </dl>
  25329. </dd>
  25330. </dl>
  25331. <a name="framestep"></a>
  25332. <h3 class="section">32.91 framestep<span class="pull-right"><a class="anchor hidden-xs" href="#framestep" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-framestep" aria-hidden="true">TOC</a></span></h3>
  25333. <p>Select one frame every N-th frame.
  25334. </p>
  25335. <p>This filter accepts the following option:
  25336. </p><dl compact="compact">
  25337. <dt><samp>step</samp></dt>
  25338. <dd><p>Select frame after every <code>step</code> frames.
  25339. Allowed values are positive integers higher than 0. Default value is <code>1</code>.
  25340. </p></dd>
  25341. </dl>
  25342. <a name="freezedetect"></a>
  25343. <h3 class="section">32.92 freezedetect<span class="pull-right"><a class="anchor hidden-xs" href="#freezedetect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-freezedetect" aria-hidden="true">TOC</a></span></h3>
  25344. <p>Detect frozen video.
  25345. </p>
  25346. <p>This filter logs a message and sets frame metadata when it detects that the
  25347. input video has no significant change in content during a specified duration.
  25348. Video freeze detection calculates the mean average absolute difference of all
  25349. the components of video frames and compares it to a noise floor.
  25350. </p>
  25351. <p>The printed times and duration are expressed in seconds. The
  25352. <code>lavfi.freezedetect.freeze_start</code> metadata key is set on the first frame
  25353. whose timestamp equals or exceeds the detection duration and it contains the
  25354. timestamp of the first frame of the freeze. The
  25355. <code>lavfi.freezedetect.freeze_duration</code> and
  25356. <code>lavfi.freezedetect.freeze_end</code> metadata keys are set on the first frame
  25357. after the freeze.
  25358. </p>
  25359. <p>The filter accepts the following options:
  25360. </p>
  25361. <dl compact="compact">
  25362. <dt><samp>noise, n</samp></dt>
  25363. <dd><p>Set noise tolerance. Can be specified in dB (in case &quot;dB&quot; is appended to the
  25364. specified value) or as a difference ratio between 0 and 1. Default is -60dB, or
  25365. 0.001.
  25366. </p>
  25367. </dd>
  25368. <dt><samp>duration, d</samp></dt>
  25369. <dd><p>Set freeze duration until notification (default is 2 seconds).
  25370. </p></dd>
  25371. </dl>
  25372. <a name="freezeframes"></a>
  25373. <h3 class="section">32.93 freezeframes<span class="pull-right"><a class="anchor hidden-xs" href="#freezeframes" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-freezeframes" aria-hidden="true">TOC</a></span></h3>
  25374. <p>Freeze video frames.
  25375. </p>
  25376. <p>This filter freezes video frames using frame from 2nd input.
  25377. </p>
  25378. <p>The filter accepts the following options:
  25379. </p>
  25380. <dl compact="compact">
  25381. <dt><samp>first</samp></dt>
  25382. <dd><p>Set number of first frame from which to start freeze.
  25383. </p>
  25384. </dd>
  25385. <dt><samp>last</samp></dt>
  25386. <dd><p>Set number of last frame from which to end freeze.
  25387. </p>
  25388. </dd>
  25389. <dt><samp>replace</samp></dt>
  25390. <dd><p>Set number of frame from 2nd input which will be used instead of replaced frames.
  25391. </p></dd>
  25392. </dl>
  25393. <span id="frei0r"></span><a name="frei0r-1"></a>
  25394. <h3 class="section">32.94 frei0r<span class="pull-right"><a class="anchor hidden-xs" href="#frei0r-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-frei0r-1" aria-hidden="true">TOC</a></span></h3>
  25395. <p>Apply a frei0r effect to the input video.
  25396. </p>
  25397. <p>To enable the compilation of this filter, you need to install the frei0r
  25398. header and configure FFmpeg with <code>--enable-frei0r</code>.
  25399. </p>
  25400. <p>It accepts the following parameters:
  25401. </p>
  25402. <dl compact="compact">
  25403. <dt><samp>filter_name</samp></dt>
  25404. <dd><p>The name of the frei0r effect to load. If the environment variable
  25405. <code>FREI0R_PATH</code> is defined, the frei0r effect is searched for in each of the
  25406. directories specified by the colon-separated list in <code>FREI0R_PATH</code>.
  25407. Otherwise, the standard frei0r paths are searched, in this order:
  25408. <samp>HOME/.frei0r-1/lib/</samp>, <samp>/usr/local/lib/frei0r-1/</samp>,
  25409. <samp>/usr/lib/frei0r-1/</samp>.
  25410. </p>
  25411. </dd>
  25412. <dt><samp>filter_params</samp></dt>
  25413. <dd><p>A &rsquo;|&rsquo;-separated list of parameters to pass to the frei0r effect.
  25414. </p>
  25415. </dd>
  25416. </dl>
  25417. <p>A frei0r effect parameter can be a boolean (its value is either
  25418. &quot;y&quot; or &quot;n&quot;), a double, a color (specified as
  25419. <var>R</var>/<var>G</var>/<var>B</var>, where <var>R</var>, <var>G</var>, and <var>B</var> are floating point
  25420. numbers between 0.0 and 1.0, inclusive) or a color description as specified in the
  25421. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>,
  25422. a position (specified as <var>X</var>/<var>Y</var>, where
  25423. <var>X</var> and <var>Y</var> are floating point numbers) and/or a string.
  25424. </p>
  25425. <p>The number and types of parameters depend on the loaded effect. If an
  25426. effect parameter is not specified, the default value is set.
  25427. </p>
  25428. <a name="Examples-85"></a>
  25429. <h4 class="subsection">32.94.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-85" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-85" aria-hidden="true">TOC</a></span></h4>
  25430. <ul>
  25431. <li> Apply the distort0r effect, setting the first two double parameters:
  25432. <div class="example">
  25433. <pre class="example">frei0r=filter_name=distort0r:filter_params=0.5|0.01
  25434. </pre></div>
  25435. </li><li> Apply the colordistance effect, taking a color as the first parameter:
  25436. <div class="example">
  25437. <pre class="example">frei0r=colordistance:0.2/0.3/0.4
  25438. frei0r=colordistance:violet
  25439. frei0r=colordistance:0x112233
  25440. </pre></div>
  25441. </li><li> Apply the perspective effect, specifying the top left and top right image
  25442. positions:
  25443. <div class="example">
  25444. <pre class="example">frei0r=perspective:0.2/0.2|0.8/0.2
  25445. </pre></div>
  25446. </li></ul>
  25447. <p>For more information, see
  25448. <a href="http://frei0r.dyne.org">http://frei0r.dyne.org</a>
  25449. </p>
  25450. <a name="Commands-81"></a>
  25451. <h4 class="subsection">32.94.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-81" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-81" aria-hidden="true">TOC</a></span></h4>
  25452. <p>This filter supports the <samp>filter_params</samp> option as <a href="#commands">commands</a>.
  25453. </p>
  25454. <a name="fspp"></a>
  25455. <h3 class="section">32.95 fspp<span class="pull-right"><a class="anchor hidden-xs" href="#fspp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-fspp" aria-hidden="true">TOC</a></span></h3>
  25456. <p>Apply fast and simple postprocessing. It is a faster version of <a href="#spp">spp</a>.
  25457. </p>
  25458. <p>It splits (I)DCT into horizontal/vertical passes. Unlike the simple post-
  25459. processing filter, one of them is performed once per block, not per pixel.
  25460. This allows for much higher speed.
  25461. </p>
  25462. <p>The filter accepts the following options:
  25463. </p>
  25464. <dl compact="compact">
  25465. <dt><samp>quality</samp></dt>
  25466. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  25467. an integer in the range 4-5. Default value is <code>4</code>.
  25468. </p>
  25469. </dd>
  25470. <dt><samp>qp</samp></dt>
  25471. <dd><p>Force a constant quantization parameter. It accepts an integer in range 0-63.
  25472. If not set, the filter will use the QP from the video stream (if available).
  25473. </p>
  25474. </dd>
  25475. <dt><samp>strength</samp></dt>
  25476. <dd><p>Set filter strength. It accepts an integer in range -15 to 32. Lower values mean
  25477. more details but also more artifacts, while higher values make the image smoother
  25478. but also blurrier. Default value is <code>0</code> − PSNR optimal.
  25479. </p>
  25480. </dd>
  25481. <dt><samp>use_bframe_qp</samp></dt>
  25482. <dd><p>Enable the use of the QP from the B-Frames if set to <code>1</code>. Using this
  25483. option may cause flicker since the B-Frames have often larger QP. Default is
  25484. <code>0</code> (not enabled).
  25485. </p>
  25486. </dd>
  25487. </dl>
  25488. <a name="gblur"></a>
  25489. <h3 class="section">32.96 gblur<span class="pull-right"><a class="anchor hidden-xs" href="#gblur" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gblur" aria-hidden="true">TOC</a></span></h3>
  25490. <p>Apply Gaussian blur filter.
  25491. </p>
  25492. <p>The filter accepts the following options:
  25493. </p>
  25494. <dl compact="compact">
  25495. <dt><samp>sigma</samp></dt>
  25496. <dd><p>Set horizontal sigma, standard deviation of Gaussian blur. Default is <code>0.5</code>.
  25497. </p>
  25498. </dd>
  25499. <dt><samp>steps</samp></dt>
  25500. <dd><p>Set number of steps for Gaussian approximation. Default is <code>1</code>.
  25501. </p>
  25502. </dd>
  25503. <dt><samp>planes</samp></dt>
  25504. <dd><p>Set which planes to filter. By default all planes are filtered.
  25505. </p>
  25506. </dd>
  25507. <dt><samp>sigmaV</samp></dt>
  25508. <dd><p>Set vertical sigma, if negative it will be same as <code>sigma</code>.
  25509. Default is <code>-1</code>.
  25510. </p></dd>
  25511. </dl>
  25512. <a name="Commands-82"></a>
  25513. <h4 class="subsection">32.96.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-82" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-82" aria-hidden="true">TOC</a></span></h4>
  25514. <p>This filter supports same commands as options.
  25515. The command accepts the same syntax of the corresponding option.
  25516. </p>
  25517. <p>If the specified expression is not valid, it is kept at its current
  25518. value.
  25519. </p>
  25520. <a name="geq"></a>
  25521. <h3 class="section">32.97 geq<span class="pull-right"><a class="anchor hidden-xs" href="#geq" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-geq" aria-hidden="true">TOC</a></span></h3>
  25522. <p>Apply generic equation to each pixel.
  25523. </p>
  25524. <p>The filter accepts the following options:
  25525. </p>
  25526. <dl compact="compact">
  25527. <dt><samp>lum_expr, lum</samp></dt>
  25528. <dd><p>Set the luminance expression.
  25529. </p></dd>
  25530. <dt><samp>cb_expr, cb</samp></dt>
  25531. <dd><p>Set the chrominance blue expression.
  25532. </p></dd>
  25533. <dt><samp>cr_expr, cr</samp></dt>
  25534. <dd><p>Set the chrominance red expression.
  25535. </p></dd>
  25536. <dt><samp>alpha_expr, a</samp></dt>
  25537. <dd><p>Set the alpha expression.
  25538. </p></dd>
  25539. <dt><samp>red_expr, r</samp></dt>
  25540. <dd><p>Set the red expression.
  25541. </p></dd>
  25542. <dt><samp>green_expr, g</samp></dt>
  25543. <dd><p>Set the green expression.
  25544. </p></dd>
  25545. <dt><samp>blue_expr, b</samp></dt>
  25546. <dd><p>Set the blue expression.
  25547. </p></dd>
  25548. </dl>
  25549. <p>The colorspace is selected according to the specified options. If one
  25550. of the <samp>lum_expr</samp>, <samp>cb_expr</samp>, or <samp>cr_expr</samp>
  25551. options is specified, the filter will automatically select a YCbCr
  25552. colorspace. If one of the <samp>red_expr</samp>, <samp>green_expr</samp>, or
  25553. <samp>blue_expr</samp> options is specified, it will select an RGB
  25554. colorspace.
  25555. </p>
  25556. <p>If one of the chrominance expression is not defined, it falls back on the other
  25557. one. If no alpha expression is specified it will evaluate to opaque value.
  25558. If none of chrominance expressions are specified, they will evaluate
  25559. to the luminance expression.
  25560. </p>
  25561. <p>The expressions can use the following variables and functions:
  25562. </p>
  25563. <dl compact="compact">
  25564. <dt><samp>N</samp></dt>
  25565. <dd><p>The sequential number of the filtered frame, starting from <code>0</code>.
  25566. </p>
  25567. </dd>
  25568. <dt><samp>X</samp></dt>
  25569. <dt><samp>Y</samp></dt>
  25570. <dd><p>The coordinates of the current sample.
  25571. </p>
  25572. </dd>
  25573. <dt><samp>W</samp></dt>
  25574. <dt><samp>H</samp></dt>
  25575. <dd><p>The width and height of the image.
  25576. </p>
  25577. </dd>
  25578. <dt><samp>SW</samp></dt>
  25579. <dt><samp>SH</samp></dt>
  25580. <dd><p>Width and height scale depending on the currently filtered plane. It is the
  25581. ratio between the corresponding luma plane number of pixels and the current
  25582. plane ones. E.g. for YUV4:2:0 the values are <code>1,1</code> for the luma plane, and
  25583. <code>0.5,0.5</code> for chroma planes.
  25584. </p>
  25585. </dd>
  25586. <dt><samp>T</samp></dt>
  25587. <dd><p>Time of the current frame, expressed in seconds.
  25588. </p>
  25589. </dd>
  25590. <dt><samp>p(x, y)</samp></dt>
  25591. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the current
  25592. plane.
  25593. </p>
  25594. </dd>
  25595. <dt><samp>lum(x, y)</samp></dt>
  25596. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the luminance
  25597. plane.
  25598. </p>
  25599. </dd>
  25600. <dt><samp>cb(x, y)</samp></dt>
  25601. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  25602. blue-difference chroma plane. Return 0 if there is no such plane.
  25603. </p>
  25604. </dd>
  25605. <dt><samp>cr(x, y)</samp></dt>
  25606. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  25607. red-difference chroma plane. Return 0 if there is no such plane.
  25608. </p>
  25609. </dd>
  25610. <dt><samp>r(x, y)</samp></dt>
  25611. <dt><samp>g(x, y)</samp></dt>
  25612. <dt><samp>b(x, y)</samp></dt>
  25613. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  25614. red/green/blue component. Return 0 if there is no such component.
  25615. </p>
  25616. </dd>
  25617. <dt><samp>alpha(x, y)</samp></dt>
  25618. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the alpha
  25619. plane. Return 0 if there is no such plane.
  25620. </p>
  25621. </dd>
  25622. <dt><samp>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>
  25623. <dd><p>Sum of sample values in the rectangle from (0,0) to (x,y), this allows obtaining
  25624. sums of samples within a rectangle. See the functions without the sum postfix.
  25625. </p>
  25626. </dd>
  25627. <dt><samp>interpolation</samp></dt>
  25628. <dd><p>Set one of interpolation methods:
  25629. </p><dl compact="compact">
  25630. <dt><samp>nearest, n</samp></dt>
  25631. <dt><samp>bilinear, b</samp></dt>
  25632. </dl>
  25633. <p>Default is bilinear.
  25634. </p></dd>
  25635. </dl>
  25636. <p>For functions, if <var>x</var> and <var>y</var> are outside the area, the value will be
  25637. automatically clipped to the closer edge.
  25638. </p>
  25639. <p>Please note that this filter can use multiple threads in which case each slice
  25640. will have its own expression state. If you want to use only a single expression
  25641. state because your expressions depend on previous state then you should limit
  25642. the number of filter threads to 1.
  25643. </p>
  25644. <a name="Examples-86"></a>
  25645. <h4 class="subsection">32.97.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-86" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-86" aria-hidden="true">TOC</a></span></h4>
  25646. <ul>
  25647. <li> Flip the image horizontally:
  25648. <div class="example">
  25649. <pre class="example">geq=p(W-X\,Y)
  25650. </pre></div>
  25651. </li><li> Generate a bidimensional sine wave, with angle <code>PI/3</code> and a
  25652. wavelength of 100 pixels:
  25653. <div class="example">
  25654. <pre class="example">geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
  25655. </pre></div>
  25656. </li><li> Generate a fancy enigmatic moving light:
  25657. <div class="example">
  25658. <pre class="example">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
  25659. </pre></div>
  25660. </li><li> Generate a quick emboss effect:
  25661. <div class="example">
  25662. <pre class="example">format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'
  25663. </pre></div>
  25664. </li><li> Modify RGB components depending on pixel position:
  25665. <div class="example">
  25666. <pre class="example">geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
  25667. </pre></div>
  25668. </li><li> Create a radial gradient that is the same size as the input (also see
  25669. the <a href="#vignette">vignette</a> filter):
  25670. <div class="example">
  25671. <pre class="example">geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
  25672. </pre></div>
  25673. </li></ul>
  25674. <a name="gradfun"></a>
  25675. <h3 class="section">32.98 gradfun<span class="pull-right"><a class="anchor hidden-xs" href="#gradfun" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gradfun" aria-hidden="true">TOC</a></span></h3>
  25676. <p>Fix the banding artifacts that are sometimes introduced into nearly flat
  25677. regions by truncation to 8-bit color depth.
  25678. Interpolate the gradients that should go where the bands are, and
  25679. dither them.
  25680. </p>
  25681. <p>It is designed for playback only. Do not use it prior to
  25682. lossy compression, because compression tends to lose the dither and
  25683. bring back the bands.
  25684. </p>
  25685. <p>It accepts the following parameters:
  25686. </p>
  25687. <dl compact="compact">
  25688. <dt><samp>strength</samp></dt>
  25689. <dd><p>The maximum amount by which the filter will change any one pixel. This is also
  25690. the threshold for detecting nearly flat regions. Acceptable values range from
  25691. .51 to 64; the default value is 1.2. Out-of-range values will be clipped to the
  25692. valid range.
  25693. </p>
  25694. </dd>
  25695. <dt><samp>radius</samp></dt>
  25696. <dd><p>The neighborhood to fit the gradient to. A larger radius makes for smoother
  25697. gradients, but also prevents the filter from modifying the pixels near detailed
  25698. regions. Acceptable values are 8-32; the default value is 16. Out-of-range
  25699. values will be clipped to the valid range.
  25700. </p>
  25701. </dd>
  25702. </dl>
  25703. <p>Alternatively, the options can be specified as a flat string:
  25704. <var>strength</var>[:<var>radius</var>]
  25705. </p>
  25706. <a name="Examples-87"></a>
  25707. <h4 class="subsection">32.98.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-87" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-87" aria-hidden="true">TOC</a></span></h4>
  25708. <ul>
  25709. <li> Apply the filter with a <code>3.5</code> strength and radius of <code>8</code>:
  25710. <div class="example">
  25711. <pre class="example">gradfun=3.5:8
  25712. </pre></div>
  25713. </li><li> Specify radius, omitting the strength (which will fall-back to the default
  25714. value):
  25715. <div class="example">
  25716. <pre class="example">gradfun=radius=8
  25717. </pre></div>
  25718. </li></ul>
  25719. <span id="graphmonitor"></span><a name="graphmonitor-1"></a>
  25720. <h3 class="section">32.99 graphmonitor<span class="pull-right"><a class="anchor hidden-xs" href="#graphmonitor-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-graphmonitor-1" aria-hidden="true">TOC</a></span></h3>
  25721. <p>Show various filtergraph stats.
  25722. </p>
  25723. <p>With this filter one can debug complete filtergraph.
  25724. Especially issues with links filling with queued frames.
  25725. </p>
  25726. <p>The filter accepts the following options:
  25727. </p>
  25728. <dl compact="compact">
  25729. <dt><samp>size, s</samp></dt>
  25730. <dd><p>Set video output size. Default is <var>hd720</var>.
  25731. </p>
  25732. </dd>
  25733. <dt><samp>opacity, o</samp></dt>
  25734. <dd><p>Set video opacity. Default is <var>0.9</var>. Allowed range is from <var>0</var> to <var>1</var>.
  25735. </p>
  25736. </dd>
  25737. <dt><samp>mode, m</samp></dt>
  25738. <dd><p>Set output mode, can be <var>fulll</var> or <var>compact</var>.
  25739. In <var>compact</var> mode only filters with some queued frames have displayed stats.
  25740. </p>
  25741. </dd>
  25742. <dt><samp>flags, f</samp></dt>
  25743. <dd><p>Set flags which enable which stats are shown in video.
  25744. </p>
  25745. <p>Available values for flags are:
  25746. </p><dl compact="compact">
  25747. <dt>&lsquo;<samp>queue</samp>&rsquo;</dt>
  25748. <dd><p>Display number of queued frames in each link.
  25749. </p>
  25750. </dd>
  25751. <dt>&lsquo;<samp>frame_count_in</samp>&rsquo;</dt>
  25752. <dd><p>Display number of frames taken from filter.
  25753. </p>
  25754. </dd>
  25755. <dt>&lsquo;<samp>frame_count_out</samp>&rsquo;</dt>
  25756. <dd><p>Display number of frames given out from filter.
  25757. </p>
  25758. </dd>
  25759. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  25760. <dd><p>Display current filtered frame pts.
  25761. </p>
  25762. </dd>
  25763. <dt>&lsquo;<samp>time</samp>&rsquo;</dt>
  25764. <dd><p>Display current filtered frame time.
  25765. </p>
  25766. </dd>
  25767. <dt>&lsquo;<samp>timebase</samp>&rsquo;</dt>
  25768. <dd><p>Display time base for filter link.
  25769. </p>
  25770. </dd>
  25771. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  25772. <dd><p>Display used format for filter link.
  25773. </p>
  25774. </dd>
  25775. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  25776. <dd><p>Display video size or number of audio channels in case of audio used by filter link.
  25777. </p>
  25778. </dd>
  25779. <dt>&lsquo;<samp>rate</samp>&rsquo;</dt>
  25780. <dd><p>Display video frame rate or sample rate in case of audio used by filter link.
  25781. </p>
  25782. </dd>
  25783. <dt>&lsquo;<samp>eof</samp>&rsquo;</dt>
  25784. <dd><p>Display link output status.
  25785. </p></dd>
  25786. </dl>
  25787. </dd>
  25788. <dt><samp>rate, r</samp></dt>
  25789. <dd><p>Set upper limit for video rate of output stream, Default value is <var>25</var>.
  25790. This guarantee that output video frame rate will not be higher than this value.
  25791. </p></dd>
  25792. </dl>
  25793. <a name="greyedge"></a>
  25794. <h3 class="section">32.100 greyedge<span class="pull-right"><a class="anchor hidden-xs" href="#greyedge" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-greyedge" aria-hidden="true">TOC</a></span></h3>
  25795. <p>A color constancy variation filter which estimates scene illumination via grey edge algorithm
  25796. and corrects the scene colors accordingly.
  25797. </p>
  25798. <p>See: <a href="https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf">https://staff.science.uva.nl/th.gevers/pub/GeversTIP07.pdf</a>
  25799. </p>
  25800. <p>The filter accepts the following options:
  25801. </p>
  25802. <dl compact="compact">
  25803. <dt><samp>difford</samp></dt>
  25804. <dd><p>The order of differentiation to be applied on the scene. Must be chosen in the range
  25805. [0,2] and default value is 1.
  25806. </p>
  25807. </dd>
  25808. <dt><samp>minknorm</samp></dt>
  25809. <dd><p>The Minkowski parameter to be used for calculating the Minkowski distance. Must
  25810. be chosen in the range [0,20] and default value is 1. Set to 0 for getting
  25811. max value instead of calculating Minkowski distance.
  25812. </p>
  25813. </dd>
  25814. <dt><samp>sigma</samp></dt>
  25815. <dd><p>The standard deviation of Gaussian blur to be applied on the scene. Must be
  25816. chosen in the range [0,1024.0] and default value = 1. floor( <var>sigma</var> * break_off_sigma(3) )
  25817. can&rsquo;t be equal to 0 if <var>difford</var> is greater than 0.
  25818. </p></dd>
  25819. </dl>
  25820. <a name="Examples-88"></a>
  25821. <h4 class="subsection">32.100.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-88" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-88" aria-hidden="true">TOC</a></span></h4>
  25822. <ul>
  25823. <li> Grey Edge:
  25824. <div class="example">
  25825. <pre class="example">greyedge=difford=1:minknorm=5:sigma=2
  25826. </pre></div>
  25827. </li><li> Max Edge:
  25828. <div class="example">
  25829. <pre class="example">greyedge=difford=1:minknorm=0:sigma=2
  25830. </pre></div>
  25831. </li></ul>
  25832. <span id="haldclut"></span><a name="haldclut-1"></a>
  25833. <h3 class="section">32.101 haldclut<span class="pull-right"><a class="anchor hidden-xs" href="#haldclut-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-haldclut-1" aria-hidden="true">TOC</a></span></h3>
  25834. <p>Apply a Hald CLUT to a video stream.
  25835. </p>
  25836. <p>First input is the video stream to process, and second one is the Hald CLUT.
  25837. The Hald CLUT input can be a simple picture or a complete video stream.
  25838. </p>
  25839. <p>The filter accepts the following options:
  25840. </p>
  25841. <dl compact="compact">
  25842. <dt><samp>shortest</samp></dt>
  25843. <dd><p>Force termination when the shortest input terminates. Default is <code>0</code>.
  25844. </p></dd>
  25845. <dt><samp>repeatlast</samp></dt>
  25846. <dd><p>Continue applying the last CLUT after the end of the stream. A value of
  25847. <code>0</code> disable the filter after the last frame of the CLUT is reached.
  25848. Default is <code>1</code>.
  25849. </p></dd>
  25850. </dl>
  25851. <p><code>haldclut</code> also has the same interpolation options as <a href="#lut3d">lut3d</a> (both
  25852. filters share the same internals).
  25853. </p>
  25854. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  25855. </p>
  25856. <p>More information about the Hald CLUT can be found on Eskil Steenberg&rsquo;s website
  25857. (Hald CLUT author) at <a href="http://www.quelsolaar.com/technology/clut.html">http://www.quelsolaar.com/technology/clut.html</a>.
  25858. </p>
  25859. <a name="Commands-83"></a>
  25860. <h4 class="subsection">32.101.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-83" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-83" aria-hidden="true">TOC</a></span></h4>
  25861. <p>This filter supports the <code>interp</code> option as <a href="#commands">commands</a>.
  25862. </p>
  25863. <a name="Workflow-examples"></a>
  25864. <h4 class="subsection">32.101.2 Workflow examples<span class="pull-right"><a class="anchor hidden-xs" href="#Workflow-examples" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Workflow-examples" aria-hidden="true">TOC</a></span></h4>
  25865. <a name="Hald-CLUT-video-stream"></a>
  25866. <h4 class="subsubsection">32.101.2.1 Hald CLUT video stream<span class="pull-right"><a class="anchor hidden-xs" href="#Hald-CLUT-video-stream" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Hald-CLUT-video-stream" aria-hidden="true">TOC</a></span></h4>
  25867. <p>Generate an identity Hald CLUT stream altered with various effects:
  25868. </p><div class="example">
  25869. <pre class="example">ffmpeg -f lavfi -i <a 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
  25870. </pre></div>
  25871. <p>Note: make sure you use a lossless codec.
  25872. </p>
  25873. <p>Then use it with <code>haldclut</code> to apply it on some random stream:
  25874. </p><div class="example">
  25875. <pre class="example">ffmpeg -f lavfi -i mandelbrot -i clut.nut -filter_complex '[0][1] haldclut' -t 20 mandelclut.mkv
  25876. </pre></div>
  25877. <p>The Hald CLUT will be applied to the 10 first seconds (duration of
  25878. <samp>clut.nut</samp>), then the latest picture of that CLUT stream will be applied
  25879. to the remaining frames of the <code>mandelbrot</code> stream.
  25880. </p>
  25881. <a name="Hald-CLUT-with-preview"></a>
  25882. <h4 class="subsubsection">32.101.2.2 Hald CLUT with preview<span class="pull-right"><a class="anchor hidden-xs" href="#Hald-CLUT-with-preview" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Hald-CLUT-with-preview" aria-hidden="true">TOC</a></span></h4>
  25883. <p>A Hald CLUT is supposed to be a squared image of <code>Level*Level*Level</code> by
  25884. <code>Level*Level*Level</code> pixels. For a given Hald CLUT, FFmpeg will select the
  25885. biggest possible square starting at the top left of the picture. The remaining
  25886. padding pixels (bottom or right) will be ignored. This area can be used to add
  25887. a preview of the Hald CLUT.
  25888. </p>
  25889. <p>Typically, the following generated Hald CLUT will be supported by the
  25890. <code>haldclut</code> filter:
  25891. </p>
  25892. <div class="example">
  25893. <pre class="example">ffmpeg -f lavfi -i <a href="#haldclutsrc">haldclutsrc</a>=8 -vf &quot;
  25894. pad=iw+320 [padded_clut];
  25895. smptebars=s=320x256, split [a][b];
  25896. [padded_clut][a] overlay=W-320:h, curves=color_negative [main];
  25897. [main][b] overlay=W-320&quot; -frames:v 1 clut.png
  25898. </pre></div>
  25899. <p>It contains the original and a preview of the effect of the CLUT: SMPTE color
  25900. bars are displayed on the right-top, and below the same color bars processed by
  25901. the color changes.
  25902. </p>
  25903. <p>Then, the effect of this Hald CLUT can be visualized with:
  25904. </p><div class="example">
  25905. <pre class="example">ffplay input.mkv -vf &quot;movie=clut.png, [in] haldclut&quot;
  25906. </pre></div>
  25907. <a name="hflip"></a>
  25908. <h3 class="section">32.102 hflip<span class="pull-right"><a class="anchor hidden-xs" href="#hflip" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hflip" aria-hidden="true">TOC</a></span></h3>
  25909. <p>Flip the input video horizontally.
  25910. </p>
  25911. <p>For example, to horizontally flip the input video with <code>ffmpeg</code>:
  25912. </p><div class="example">
  25913. <pre class="example">ffmpeg -i in.avi -vf &quot;hflip&quot; out.avi
  25914. </pre></div>
  25915. <a name="histeq"></a>
  25916. <h3 class="section">32.103 histeq<span class="pull-right"><a class="anchor hidden-xs" href="#histeq" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-histeq" aria-hidden="true">TOC</a></span></h3>
  25917. <p>This filter applies a global color histogram equalization on a
  25918. per-frame basis.
  25919. </p>
  25920. <p>It can be used to correct video that has a compressed range of pixel
  25921. intensities. The filter redistributes the pixel intensities to
  25922. equalize their distribution across the intensity range. It may be
  25923. viewed as an &quot;automatically adjusting contrast filter&quot;. This filter is
  25924. useful only for correcting degraded or poorly captured source
  25925. video.
  25926. </p>
  25927. <p>The filter accepts the following options:
  25928. </p>
  25929. <dl compact="compact">
  25930. <dt><samp>strength</samp></dt>
  25931. <dd><p>Determine the amount of equalization to be applied. As the strength
  25932. is reduced, the distribution of pixel intensities more-and-more
  25933. approaches that of the input frame. The value must be a float number
  25934. in the range [0,1] and defaults to 0.200.
  25935. </p>
  25936. </dd>
  25937. <dt><samp>intensity</samp></dt>
  25938. <dd><p>Set the maximum intensity that can generated and scale the output
  25939. values appropriately. The strength should be set as desired and then
  25940. the intensity can be limited if needed to avoid washing-out. The value
  25941. must be a float number in the range [0,1] and defaults to 0.210.
  25942. </p>
  25943. </dd>
  25944. <dt><samp>antibanding</samp></dt>
  25945. <dd><p>Set the antibanding level. If enabled the filter will randomly vary
  25946. the luminance of output pixels by a small amount to avoid banding of
  25947. the histogram. Possible values are <code>none</code>, <code>weak</code> or
  25948. <code>strong</code>. It defaults to <code>none</code>.
  25949. </p></dd>
  25950. </dl>
  25951. <span id="histogram"></span><a name="histogram-1"></a>
  25952. <h3 class="section">32.104 histogram<span class="pull-right"><a class="anchor hidden-xs" href="#histogram-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-histogram-1" aria-hidden="true">TOC</a></span></h3>
  25953. <p>Compute and draw a color distribution histogram for the input video.
  25954. </p>
  25955. <p>The computed histogram is a representation of the color component
  25956. distribution in an image.
  25957. </p>
  25958. <p>Standard histogram displays the color components distribution in an image.
  25959. Displays color graph for each color component. Shows distribution of
  25960. the Y, U, V, A or R, G, B components, depending on input format, in the
  25961. current frame. Below each graph a color component scale meter is shown.
  25962. </p>
  25963. <p>The filter accepts the following options:
  25964. </p>
  25965. <dl compact="compact">
  25966. <dt><samp>level_height</samp></dt>
  25967. <dd><p>Set height of level. Default value is <code>200</code>.
  25968. Allowed range is [50, 2048].
  25969. </p>
  25970. </dd>
  25971. <dt><samp>scale_height</samp></dt>
  25972. <dd><p>Set height of color scale. Default value is <code>12</code>.
  25973. Allowed range is [0, 40].
  25974. </p>
  25975. </dd>
  25976. <dt><samp>display_mode</samp></dt>
  25977. <dd><p>Set display mode.
  25978. It accepts the following values:
  25979. </p><dl compact="compact">
  25980. <dt>&lsquo;<samp>stack</samp>&rsquo;</dt>
  25981. <dd><p>Per color component graphs are placed below each other.
  25982. </p>
  25983. </dd>
  25984. <dt>&lsquo;<samp>parade</samp>&rsquo;</dt>
  25985. <dd><p>Per color component graphs are placed side by side.
  25986. </p>
  25987. </dd>
  25988. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  25989. <dd><p>Presents information identical to that in the <code>parade</code>, except
  25990. that the graphs representing color components are superimposed directly
  25991. over one another.
  25992. </p></dd>
  25993. </dl>
  25994. <p>Default is <code>stack</code>.
  25995. </p>
  25996. </dd>
  25997. <dt><samp>levels_mode</samp></dt>
  25998. <dd><p>Set mode. Can be either <code>linear</code>, or <code>logarithmic</code>.
  25999. Default is <code>linear</code>.
  26000. </p>
  26001. </dd>
  26002. <dt><samp>components</samp></dt>
  26003. <dd><p>Set what color components to display.
  26004. Default is <code>7</code>.
  26005. </p>
  26006. </dd>
  26007. <dt><samp>fgopacity</samp></dt>
  26008. <dd><p>Set foreground opacity. Default is <code>0.7</code>.
  26009. </p>
  26010. </dd>
  26011. <dt><samp>bgopacity</samp></dt>
  26012. <dd><p>Set background opacity. Default is <code>0.5</code>.
  26013. </p></dd>
  26014. </dl>
  26015. <a name="Examples-89"></a>
  26016. <h4 class="subsection">32.104.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-89" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-89" aria-hidden="true">TOC</a></span></h4>
  26017. <ul>
  26018. <li> Calculate and draw histogram:
  26019. <div class="example">
  26020. <pre class="example">ffplay -i input -vf histogram
  26021. </pre></div>
  26022. </li></ul>
  26023. <span id="hqdn3d"></span><a name="hqdn3d-1"></a>
  26024. <h3 class="section">32.105 hqdn3d<span class="pull-right"><a class="anchor hidden-xs" href="#hqdn3d-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hqdn3d-1" aria-hidden="true">TOC</a></span></h3>
  26025. <p>This is a high precision/quality 3d denoise filter. It aims to reduce
  26026. image noise, producing smooth images and making still images really
  26027. still. It should enhance compressibility.
  26028. </p>
  26029. <p>It accepts the following optional parameters:
  26030. </p>
  26031. <dl compact="compact">
  26032. <dt><samp>luma_spatial</samp></dt>
  26033. <dd><p>A non-negative floating point number which specifies spatial luma strength.
  26034. It defaults to 4.0.
  26035. </p>
  26036. </dd>
  26037. <dt><samp>chroma_spatial</samp></dt>
  26038. <dd><p>A non-negative floating point number which specifies spatial chroma strength.
  26039. It defaults to 3.0*<var>luma_spatial</var>/4.0.
  26040. </p>
  26041. </dd>
  26042. <dt><samp>luma_tmp</samp></dt>
  26043. <dd><p>A floating point number which specifies luma temporal strength. It defaults to
  26044. 6.0*<var>luma_spatial</var>/4.0.
  26045. </p>
  26046. </dd>
  26047. <dt><samp>chroma_tmp</samp></dt>
  26048. <dd><p>A floating point number which specifies chroma temporal strength. It defaults to
  26049. <var>luma_tmp</var>*<var>chroma_spatial</var>/<var>luma_spatial</var>.
  26050. </p></dd>
  26051. </dl>
  26052. <a name="Commands-84"></a>
  26053. <h4 class="subsection">32.105.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-84" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-84" aria-hidden="true">TOC</a></span></h4>
  26054. <p>This filter supports same <a href="#commands">commands</a> as options.
  26055. The command accepts the same syntax of the corresponding option.
  26056. </p>
  26057. <p>If the specified expression is not valid, it is kept at its current
  26058. value.
  26059. </p>
  26060. <span id="hwdownload"></span><a name="hwdownload-1"></a>
  26061. <h3 class="section">32.106 hwdownload<span class="pull-right"><a class="anchor hidden-xs" href="#hwdownload-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hwdownload-1" aria-hidden="true">TOC</a></span></h3>
  26062. <p>Download hardware frames to system memory.
  26063. </p>
  26064. <p>The input must be in hardware frames, and the output a non-hardware format.
  26065. Not all formats will be supported on the output - it may be necessary to insert
  26066. an additional <samp>format</samp> filter immediately following in the graph to get
  26067. the output in a supported format.
  26068. </p>
  26069. <a name="hwmap"></a>
  26070. <h3 class="section">32.107 hwmap<span class="pull-right"><a class="anchor hidden-xs" href="#hwmap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hwmap" aria-hidden="true">TOC</a></span></h3>
  26071. <p>Map hardware frames to system memory or to another device.
  26072. </p>
  26073. <p>This filter has several different modes of operation; which one is used depends
  26074. on the input and output formats:
  26075. </p><ul>
  26076. <li> Hardware frame input, normal frame output
  26077. <p>Map the input frames to system memory and pass them to the output. If the
  26078. original hardware frame is later required (for example, after overlaying
  26079. something else on part of it), the <samp>hwmap</samp> filter can be used again
  26080. in the next mode to retrieve it.
  26081. </p></li><li> Normal frame input, hardware frame output
  26082. <p>If the input is actually a software-mapped hardware frame, then unmap it -
  26083. that is, return the original hardware frame.
  26084. </p>
  26085. <p>Otherwise, a device must be provided. Create new hardware surfaces on that
  26086. device for the output, then map them back to the software format at the input
  26087. and give those frames to the preceding filter. This will then act like the
  26088. <samp>hwupload</samp> filter, but may be able to avoid an additional copy when
  26089. the input is already in a compatible format.
  26090. </p></li><li> Hardware frame input and output
  26091. <p>A device must be supplied for the output, either directly or with the
  26092. <samp>derive_device</samp> option. The input and output devices must be of
  26093. different types and compatible - the exact meaning of this is
  26094. system-dependent, but typically it means that they must refer to the same
  26095. underlying hardware context (for example, refer to the same graphics card).
  26096. </p>
  26097. <p>If the input frames were originally created on the output device, then unmap
  26098. to retrieve the original frames.
  26099. </p>
  26100. <p>Otherwise, map the frames to the output device - create new hardware frames
  26101. on the output corresponding to the frames on the input.
  26102. </p></li></ul>
  26103. <p>The following additional parameters are accepted:
  26104. </p>
  26105. <dl compact="compact">
  26106. <dt><samp>mode</samp></dt>
  26107. <dd><p>Set the frame mapping mode. Some combination of:
  26108. </p><dl compact="compact">
  26109. <dt><var>read</var></dt>
  26110. <dd><p>The mapped frame should be readable.
  26111. </p></dd>
  26112. <dt><var>write</var></dt>
  26113. <dd><p>The mapped frame should be writeable.
  26114. </p></dd>
  26115. <dt><var>overwrite</var></dt>
  26116. <dd><p>The mapping will always overwrite the entire frame.
  26117. </p>
  26118. <p>This may improve performance in some cases, as the original contents of the
  26119. frame need not be loaded.
  26120. </p></dd>
  26121. <dt><var>direct</var></dt>
  26122. <dd><p>The mapping must not involve any copying.
  26123. </p>
  26124. <p>Indirect mappings to copies of frames are created in some cases where either
  26125. direct mapping is not possible or it would have unexpected properties.
  26126. Setting this flag ensures that the mapping is direct and will fail if that is
  26127. not possible.
  26128. </p></dd>
  26129. </dl>
  26130. <p>Defaults to <var>read+write</var> if not specified.
  26131. </p>
  26132. </dd>
  26133. <dt><samp>derive_device <var>type</var></samp></dt>
  26134. <dd><p>Rather than using the device supplied at initialisation, instead derive a new
  26135. device of type <var>type</var> from the device the input frames exist on.
  26136. </p>
  26137. </dd>
  26138. <dt><samp>reverse</samp></dt>
  26139. <dd><p>In a hardware to hardware mapping, map in reverse - create frames in the sink
  26140. and map them back to the source. This may be necessary in some cases where
  26141. a mapping in one direction is required but only the opposite direction is
  26142. supported by the devices being used.
  26143. </p>
  26144. <p>This option is dangerous - it may break the preceding filter in undefined
  26145. ways if there are any additional constraints on that filter&rsquo;s output.
  26146. Do not use it without fully understanding the implications of its use.
  26147. </p></dd>
  26148. </dl>
  26149. <span id="hwupload"></span><a name="hwupload-1"></a>
  26150. <h3 class="section">32.108 hwupload<span class="pull-right"><a class="anchor hidden-xs" href="#hwupload-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hwupload-1" aria-hidden="true">TOC</a></span></h3>
  26151. <p>Upload system memory frames to hardware surfaces.
  26152. </p>
  26153. <p>The device to upload to must be supplied when the filter is initialised. If
  26154. using ffmpeg, select the appropriate device with the <samp>-filter_hw_device</samp>
  26155. option or with the <samp>derive_device</samp> option. The input and output devices
  26156. must be of different types and compatible - the exact meaning of this is
  26157. system-dependent, but typically it means that they must refer to the same
  26158. underlying hardware context (for example, refer to the same graphics card).
  26159. </p>
  26160. <p>The following additional parameters are accepted:
  26161. </p>
  26162. <dl compact="compact">
  26163. <dt><samp>derive_device <var>type</var></samp></dt>
  26164. <dd><p>Rather than using the device supplied at initialisation, instead derive a new
  26165. device of type <var>type</var> from the device the input frames exist on.
  26166. </p></dd>
  26167. </dl>
  26168. <span id="hwupload_005fcuda"></span><a name="hwupload_005fcuda-1"></a>
  26169. <h3 class="section">32.109 hwupload_cuda<span class="pull-right"><a class="anchor hidden-xs" href="#hwupload_005fcuda-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hwupload_005fcuda-1" aria-hidden="true">TOC</a></span></h3>
  26170. <p>Upload system memory frames to a CUDA device.
  26171. </p>
  26172. <p>It accepts the following optional parameters:
  26173. </p>
  26174. <dl compact="compact">
  26175. <dt><samp>device</samp></dt>
  26176. <dd><p>The number of the CUDA device to use
  26177. </p></dd>
  26178. </dl>
  26179. <a name="hqx"></a>
  26180. <h3 class="section">32.110 hqx<span class="pull-right"><a class="anchor hidden-xs" href="#hqx" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hqx" aria-hidden="true">TOC</a></span></h3>
  26181. <p>Apply a high-quality magnification filter designed for pixel art. This filter
  26182. was originally created by Maxim Stepin.
  26183. </p>
  26184. <p>It accepts the following option:
  26185. </p>
  26186. <dl compact="compact">
  26187. <dt><samp>n</samp></dt>
  26188. <dd><p>Set the scaling dimension: <code>2</code> for <code>hq2x</code>, <code>3</code> for
  26189. <code>hq3x</code> and <code>4</code> for <code>hq4x</code>.
  26190. Default is <code>3</code>.
  26191. </p></dd>
  26192. </dl>
  26193. <a name="hstack"></a>
  26194. <h3 class="section">32.111 hstack<span class="pull-right"><a class="anchor hidden-xs" href="#hstack" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hstack" aria-hidden="true">TOC</a></span></h3>
  26195. <p>Stack input videos horizontally.
  26196. </p>
  26197. <p>All streams must be of same pixel format and of same height.
  26198. </p>
  26199. <p>Note that this filter is faster than using <a href="#overlay">overlay</a> and <a href="#pad">pad</a> filter
  26200. to create same output.
  26201. </p>
  26202. <p>The filter accepts the following option:
  26203. </p>
  26204. <dl compact="compact">
  26205. <dt><samp>inputs</samp></dt>
  26206. <dd><p>Set number of input streams. Default is 2.
  26207. </p>
  26208. </dd>
  26209. <dt><samp>shortest</samp></dt>
  26210. <dd><p>If set to 1, force the output to terminate when the shortest input
  26211. terminates. Default value is 0.
  26212. </p></dd>
  26213. </dl>
  26214. <a name="hue"></a>
  26215. <h3 class="section">32.112 hue<span class="pull-right"><a class="anchor hidden-xs" href="#hue" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hue" aria-hidden="true">TOC</a></span></h3>
  26216. <p>Modify the hue and/or the saturation of the input.
  26217. </p>
  26218. <p>It accepts the following parameters:
  26219. </p>
  26220. <dl compact="compact">
  26221. <dt><samp>h</samp></dt>
  26222. <dd><p>Specify the hue angle as a number of degrees. It accepts an expression,
  26223. and defaults to &quot;0&quot;.
  26224. </p>
  26225. </dd>
  26226. <dt><samp>s</samp></dt>
  26227. <dd><p>Specify the saturation in the [-10,10] range. It accepts an expression and
  26228. defaults to &quot;1&quot;.
  26229. </p>
  26230. </dd>
  26231. <dt><samp>H</samp></dt>
  26232. <dd><p>Specify the hue angle as a number of radians. It accepts an
  26233. expression, and defaults to &quot;0&quot;.
  26234. </p>
  26235. </dd>
  26236. <dt><samp>b</samp></dt>
  26237. <dd><p>Specify the brightness in the [-10,10] range. It accepts an expression and
  26238. defaults to &quot;0&quot;.
  26239. </p></dd>
  26240. </dl>
  26241. <p><samp>h</samp> and <samp>H</samp> are mutually exclusive, and can&rsquo;t be
  26242. specified at the same time.
  26243. </p>
  26244. <p>The <samp>b</samp>, <samp>h</samp>, <samp>H</samp> and <samp>s</samp> option values are
  26245. expressions containing the following constants:
  26246. </p>
  26247. <dl compact="compact">
  26248. <dt><samp>n</samp></dt>
  26249. <dd><p>frame count of the input frame starting from 0
  26250. </p>
  26251. </dd>
  26252. <dt><samp>pts</samp></dt>
  26253. <dd><p>presentation timestamp of the input frame expressed in time base units
  26254. </p>
  26255. </dd>
  26256. <dt><samp>r</samp></dt>
  26257. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  26258. </p>
  26259. </dd>
  26260. <dt><samp>t</samp></dt>
  26261. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  26262. </p>
  26263. </dd>
  26264. <dt><samp>tb</samp></dt>
  26265. <dd><p>time base of the input video
  26266. </p></dd>
  26267. </dl>
  26268. <a name="Examples-90"></a>
  26269. <h4 class="subsection">32.112.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-90" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-90" aria-hidden="true">TOC</a></span></h4>
  26270. <ul>
  26271. <li> Set the hue to 90 degrees and the saturation to 1.0:
  26272. <div class="example">
  26273. <pre class="example">hue=h=90:s=1
  26274. </pre></div>
  26275. </li><li> Same command but expressing the hue in radians:
  26276. <div class="example">
  26277. <pre class="example">hue=H=PI/2:s=1
  26278. </pre></div>
  26279. </li><li> Rotate hue and make the saturation swing between 0
  26280. and 2 over a period of 1 second:
  26281. <div class="example">
  26282. <pre class="example">hue=&quot;H=2*PI*t: s=sin(2*PI*t)+1&quot;
  26283. </pre></div>
  26284. </li><li> Apply a 3 seconds saturation fade-in effect starting at 0:
  26285. <div class="example">
  26286. <pre class="example">hue=&quot;s=min(t/3\,1)&quot;
  26287. </pre></div>
  26288. <p>The general fade-in expression can be written as:
  26289. </p><div class="example">
  26290. <pre class="example">hue=&quot;s=min(0\, max((t-START)/DURATION\, 1))&quot;
  26291. </pre></div>
  26292. </li><li> Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
  26293. <div class="example">
  26294. <pre class="example">hue=&quot;s=max(0\, min(1\, (8-t)/3))&quot;
  26295. </pre></div>
  26296. <p>The general fade-out expression can be written as:
  26297. </p><div class="example">
  26298. <pre class="example">hue=&quot;s=max(0\, min(1\, (START+DURATION-t)/DURATION))&quot;
  26299. </pre></div>
  26300. </li></ul>
  26301. <a name="Commands-85"></a>
  26302. <h4 class="subsection">32.112.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-85" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-85" aria-hidden="true">TOC</a></span></h4>
  26303. <p>This filter supports the following commands:
  26304. </p><dl compact="compact">
  26305. <dt><samp>b</samp></dt>
  26306. <dt><samp>s</samp></dt>
  26307. <dt><samp>h</samp></dt>
  26308. <dt><samp>H</samp></dt>
  26309. <dd><p>Modify the hue and/or the saturation and/or brightness of the input video.
  26310. The command accepts the same syntax of the corresponding option.
  26311. </p>
  26312. <p>If the specified expression is not valid, it is kept at its current
  26313. value.
  26314. </p></dd>
  26315. </dl>
  26316. <a name="hysteresis"></a>
  26317. <h3 class="section">32.113 hysteresis<span class="pull-right"><a class="anchor hidden-xs" href="#hysteresis" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-hysteresis" aria-hidden="true">TOC</a></span></h3>
  26318. <p>Grow first stream into second stream by connecting components.
  26319. This makes it possible to build more robust edge masks.
  26320. </p>
  26321. <p>This filter accepts the following options:
  26322. </p>
  26323. <dl compact="compact">
  26324. <dt><samp>planes</samp></dt>
  26325. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  26326. copied from first stream.
  26327. By default value 0xf, all planes will be processed.
  26328. </p>
  26329. </dd>
  26330. <dt><samp>threshold</samp></dt>
  26331. <dd><p>Set threshold which is used in filtering. If pixel component value is higher than
  26332. this value filter algorithm for connecting components is activated.
  26333. By default value is 0.
  26334. </p></dd>
  26335. </dl>
  26336. <p>The <code>hysteresis</code> filter also supports the <a href="#framesync">framesync</a> options.
  26337. </p>
  26338. <a name="identity"></a>
  26339. <h3 class="section">32.114 identity<span class="pull-right"><a class="anchor hidden-xs" href="#identity" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-identity" aria-hidden="true">TOC</a></span></h3>
  26340. <p>Obtain the identity score between two input videos.
  26341. </p>
  26342. <p>This filter takes two input videos.
  26343. </p>
  26344. <p>Both input videos must have the same resolution and pixel format for
  26345. this filter to work correctly. Also it assumes that both inputs
  26346. have the same number of frames, which are compared one by one.
  26347. </p>
  26348. <p>The obtained per component, average, min and max identity score is printed through
  26349. the logging system.
  26350. </p>
  26351. <p>The filter stores the calculated identity scores of each frame in frame metadata.
  26352. </p>
  26353. <p>In the below example the input file <samp>main.mpg</samp> being processed is compared
  26354. with the reference file <samp>ref.mpg</samp>.
  26355. </p>
  26356. <div class="example">
  26357. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi identity -f null -
  26358. </pre></div>
  26359. <a name="idet"></a>
  26360. <h3 class="section">32.115 idet<span class="pull-right"><a class="anchor hidden-xs" href="#idet" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-idet" aria-hidden="true">TOC</a></span></h3>
  26361. <p>Detect video interlacing type.
  26362. </p>
  26363. <p>This filter tries to detect if the input frames are interlaced, progressive,
  26364. top or bottom field first. It will also try to detect fields that are
  26365. repeated between adjacent frames (a sign of telecine).
  26366. </p>
  26367. <p>Single frame detection considers only immediately adjacent frames when classifying each frame.
  26368. Multiple frame detection incorporates the classification history of previous frames.
  26369. </p>
  26370. <p>The filter will log these metadata values:
  26371. </p>
  26372. <dl compact="compact">
  26373. <dt><samp>single.current_frame</samp></dt>
  26374. <dd><p>Detected type of current frame using single-frame detection. One of:
  26375. &ldquo;tff&rdquo; (top field first), &ldquo;bff&rdquo; (bottom field first),
  26376. &ldquo;progressive&rdquo;, or &ldquo;undetermined&rdquo;
  26377. </p>
  26378. </dd>
  26379. <dt><samp>single.tff</samp></dt>
  26380. <dd><p>Cumulative number of frames detected as top field first using single-frame detection.
  26381. </p>
  26382. </dd>
  26383. <dt><samp>multiple.tff</samp></dt>
  26384. <dd><p>Cumulative number of frames detected as top field first using multiple-frame detection.
  26385. </p>
  26386. </dd>
  26387. <dt><samp>single.bff</samp></dt>
  26388. <dd><p>Cumulative number of frames detected as bottom field first using single-frame detection.
  26389. </p>
  26390. </dd>
  26391. <dt><samp>multiple.current_frame</samp></dt>
  26392. <dd><p>Detected type of current frame using multiple-frame detection. One of:
  26393. &ldquo;tff&rdquo; (top field first), &ldquo;bff&rdquo; (bottom field first),
  26394. &ldquo;progressive&rdquo;, or &ldquo;undetermined&rdquo;
  26395. </p>
  26396. </dd>
  26397. <dt><samp>multiple.bff</samp></dt>
  26398. <dd><p>Cumulative number of frames detected as bottom field first using multiple-frame detection.
  26399. </p>
  26400. </dd>
  26401. <dt><samp>single.progressive</samp></dt>
  26402. <dd><p>Cumulative number of frames detected as progressive using single-frame detection.
  26403. </p>
  26404. </dd>
  26405. <dt><samp>multiple.progressive</samp></dt>
  26406. <dd><p>Cumulative number of frames detected as progressive using multiple-frame detection.
  26407. </p>
  26408. </dd>
  26409. <dt><samp>single.undetermined</samp></dt>
  26410. <dd><p>Cumulative number of frames that could not be classified using single-frame detection.
  26411. </p>
  26412. </dd>
  26413. <dt><samp>multiple.undetermined</samp></dt>
  26414. <dd><p>Cumulative number of frames that could not be classified using multiple-frame detection.
  26415. </p>
  26416. </dd>
  26417. <dt><samp>repeated.current_frame</samp></dt>
  26418. <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;.
  26419. </p>
  26420. </dd>
  26421. <dt><samp>repeated.neither</samp></dt>
  26422. <dd><p>Cumulative number of frames with no repeated field.
  26423. </p>
  26424. </dd>
  26425. <dt><samp>repeated.top</samp></dt>
  26426. <dd><p>Cumulative number of frames with the top field repeated from the previous frame&rsquo;s top field.
  26427. </p>
  26428. </dd>
  26429. <dt><samp>repeated.bottom</samp></dt>
  26430. <dd><p>Cumulative number of frames with the bottom field repeated from the previous frame&rsquo;s bottom field.
  26431. </p></dd>
  26432. </dl>
  26433. <p>The filter accepts the following options:
  26434. </p>
  26435. <dl compact="compact">
  26436. <dt><samp>intl_thres</samp></dt>
  26437. <dd><p>Set interlacing threshold.
  26438. </p></dd>
  26439. <dt><samp>prog_thres</samp></dt>
  26440. <dd><p>Set progressive threshold.
  26441. </p></dd>
  26442. <dt><samp>rep_thres</samp></dt>
  26443. <dd><p>Threshold for repeated field detection.
  26444. </p></dd>
  26445. <dt><samp>half_life</samp></dt>
  26446. <dd><p>Number of frames after which a given frame&rsquo;s contribution to the
  26447. statistics is halved (i.e., it contributes only 0.5 to its
  26448. classification). The default of 0 means that all frames seen are given
  26449. full weight of 1.0 forever.
  26450. </p></dd>
  26451. <dt><samp>analyze_interlaced_flag</samp></dt>
  26452. <dd><p>When this is not 0 then idet will use the specified number of frames to determine
  26453. if the interlaced flag is accurate, it will not count undetermined frames.
  26454. If the flag is found to be accurate it will be used without any further
  26455. computations, if it is found to be inaccurate it will be cleared without any
  26456. further computations. This allows inserting the idet filter as a low computational
  26457. method to clean up the interlaced flag
  26458. </p></dd>
  26459. </dl>
  26460. <a name="il"></a>
  26461. <h3 class="section">32.116 il<span class="pull-right"><a class="anchor hidden-xs" href="#il" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-il" aria-hidden="true">TOC</a></span></h3>
  26462. <p>Deinterleave or interleave fields.
  26463. </p>
  26464. <p>This filter allows one to process interlaced images fields without
  26465. deinterlacing them. Deinterleaving splits the input frame into 2
  26466. fields (so called half pictures). Odd lines are moved to the top
  26467. half of the output image, even lines to the bottom half.
  26468. You can process (filter) them independently and then re-interleave them.
  26469. </p>
  26470. <p>The filter accepts the following options:
  26471. </p>
  26472. <dl compact="compact">
  26473. <dt><samp>luma_mode, l</samp></dt>
  26474. <dt><samp>chroma_mode, c</samp></dt>
  26475. <dt><samp>alpha_mode, a</samp></dt>
  26476. <dd><p>Available values for <var>luma_mode</var>, <var>chroma_mode</var> and
  26477. <var>alpha_mode</var> are:
  26478. </p>
  26479. <dl compact="compact">
  26480. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  26481. <dd><p>Do nothing.
  26482. </p>
  26483. </dd>
  26484. <dt>&lsquo;<samp>deinterleave, d</samp>&rsquo;</dt>
  26485. <dd><p>Deinterleave fields, placing one above the other.
  26486. </p>
  26487. </dd>
  26488. <dt>&lsquo;<samp>interleave, i</samp>&rsquo;</dt>
  26489. <dd><p>Interleave fields. Reverse the effect of deinterleaving.
  26490. </p></dd>
  26491. </dl>
  26492. <p>Default value is <code>none</code>.
  26493. </p>
  26494. </dd>
  26495. <dt><samp>luma_swap, ls</samp></dt>
  26496. <dt><samp>chroma_swap, cs</samp></dt>
  26497. <dt><samp>alpha_swap, as</samp></dt>
  26498. <dd><p>Swap luma/chroma/alpha fields. Exchange even &amp; odd lines. Default value is <code>0</code>.
  26499. </p></dd>
  26500. </dl>
  26501. <a name="Commands-86"></a>
  26502. <h4 class="subsection">32.116.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-86" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-86" aria-hidden="true">TOC</a></span></h4>
  26503. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  26504. </p>
  26505. <a name="inflate"></a>
  26506. <h3 class="section">32.117 inflate<span class="pull-right"><a class="anchor hidden-xs" href="#inflate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-inflate" aria-hidden="true">TOC</a></span></h3>
  26507. <p>Apply inflate effect to the video.
  26508. </p>
  26509. <p>This filter replaces the pixel by the local(3x3) average by taking into account
  26510. only values higher than the pixel.
  26511. </p>
  26512. <p>It accepts the following options:
  26513. </p>
  26514. <dl compact="compact">
  26515. <dt><samp>threshold0</samp></dt>
  26516. <dt><samp>threshold1</samp></dt>
  26517. <dt><samp>threshold2</samp></dt>
  26518. <dt><samp>threshold3</samp></dt>
  26519. <dd><p>Limit the maximum change for each plane, default is 65535.
  26520. If 0, plane will remain unchanged.
  26521. </p></dd>
  26522. </dl>
  26523. <a name="Commands-87"></a>
  26524. <h4 class="subsection">32.117.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-87" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-87" aria-hidden="true">TOC</a></span></h4>
  26525. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  26526. </p>
  26527. <a name="interlace"></a>
  26528. <h3 class="section">32.118 interlace<span class="pull-right"><a class="anchor hidden-xs" href="#interlace" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-interlace" aria-hidden="true">TOC</a></span></h3>
  26529. <p>Simple interlacing filter from progressive contents. This interleaves upper (or
  26530. lower) lines from odd frames with lower (or upper) lines from even frames,
  26531. halving the frame rate and preserving image height.
  26532. </p>
  26533. <div class="example">
  26534. <pre class="example"> Original Original New Frame
  26535. Frame 'j' Frame 'j+1' (tff)
  26536. ========== =========== ==================
  26537. Line 0 --------------------&gt; Frame 'j' Line 0
  26538. Line 1 Line 1 ----&gt; Frame 'j+1' Line 1
  26539. Line 2 ---------------------&gt; Frame 'j' Line 2
  26540. Line 3 Line 3 ----&gt; Frame 'j+1' Line 3
  26541. ... ... ...
  26542. New Frame + 1 will be generated by Frame 'j+2' and Frame 'j+3' and so on
  26543. </pre></div>
  26544. <p>It accepts the following optional parameters:
  26545. </p>
  26546. <dl compact="compact">
  26547. <dt><samp>scan</samp></dt>
  26548. <dd><p>This determines whether the interlaced frame is taken from the even
  26549. (tff - default) or odd (bff) lines of the progressive frame.
  26550. </p>
  26551. </dd>
  26552. <dt><samp>lowpass</samp></dt>
  26553. <dd><p>Vertical lowpass filter to avoid twitter interlacing and
  26554. reduce moire patterns.
  26555. </p>
  26556. <dl compact="compact">
  26557. <dt>&lsquo;<samp>0, off</samp>&rsquo;</dt>
  26558. <dd><p>Disable vertical lowpass filter
  26559. </p>
  26560. </dd>
  26561. <dt>&lsquo;<samp>1, linear</samp>&rsquo;</dt>
  26562. <dd><p>Enable linear filter (default)
  26563. </p>
  26564. </dd>
  26565. <dt>&lsquo;<samp>2, complex</samp>&rsquo;</dt>
  26566. <dd><p>Enable complex filter. This will slightly less reduce twitter and moire
  26567. but better retain detail and subjective sharpness impression.
  26568. </p>
  26569. </dd>
  26570. </dl>
  26571. </dd>
  26572. </dl>
  26573. <a name="kerndeint"></a>
  26574. <h3 class="section">32.119 kerndeint<span class="pull-right"><a class="anchor hidden-xs" href="#kerndeint" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-kerndeint" aria-hidden="true">TOC</a></span></h3>
  26575. <p>Deinterlace input video by applying Donald Graft&rsquo;s adaptive kernel
  26576. deinterling. Work on interlaced parts of a video to produce
  26577. progressive frames.
  26578. </p>
  26579. <p>The description of the accepted parameters follows.
  26580. </p>
  26581. <dl compact="compact">
  26582. <dt><samp>thresh</samp></dt>
  26583. <dd><p>Set the threshold which affects the filter&rsquo;s tolerance when
  26584. determining if a pixel line must be processed. It must be an integer
  26585. in the range [0,255] and defaults to 10. A value of 0 will result in
  26586. applying the process on every pixels.
  26587. </p>
  26588. </dd>
  26589. <dt><samp>map</samp></dt>
  26590. <dd><p>Paint pixels exceeding the threshold value to white if set to 1.
  26591. Default is 0.
  26592. </p>
  26593. </dd>
  26594. <dt><samp>order</samp></dt>
  26595. <dd><p>Set the fields order. Swap fields if set to 1, leave fields alone if
  26596. 0. Default is 0.
  26597. </p>
  26598. </dd>
  26599. <dt><samp>sharp</samp></dt>
  26600. <dd><p>Enable additional sharpening if set to 1. Default is 0.
  26601. </p>
  26602. </dd>
  26603. <dt><samp>twoway</samp></dt>
  26604. <dd><p>Enable twoway sharpening if set to 1. Default is 0.
  26605. </p></dd>
  26606. </dl>
  26607. <a name="Examples-91"></a>
  26608. <h4 class="subsection">32.119.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-91" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-91" aria-hidden="true">TOC</a></span></h4>
  26609. <ul>
  26610. <li> Apply default values:
  26611. <div class="example">
  26612. <pre class="example">kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
  26613. </pre></div>
  26614. </li><li> Enable additional sharpening:
  26615. <div class="example">
  26616. <pre class="example">kerndeint=sharp=1
  26617. </pre></div>
  26618. </li><li> Paint processed pixels in white:
  26619. <div class="example">
  26620. <pre class="example">kerndeint=map=1
  26621. </pre></div>
  26622. </li></ul>
  26623. <a name="kirsch"></a>
  26624. <h3 class="section">32.120 kirsch<span class="pull-right"><a class="anchor hidden-xs" href="#kirsch" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-kirsch" aria-hidden="true">TOC</a></span></h3>
  26625. <p>Apply kirsch operator to input video stream.
  26626. </p>
  26627. <p>The filter accepts the following option:
  26628. </p>
  26629. <dl compact="compact">
  26630. <dt><samp>planes</samp></dt>
  26631. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  26632. By default value 0xf, all planes will be processed.
  26633. </p>
  26634. </dd>
  26635. <dt><samp>scale</samp></dt>
  26636. <dd><p>Set value which will be multiplied with filtered result.
  26637. </p>
  26638. </dd>
  26639. <dt><samp>delta</samp></dt>
  26640. <dd><p>Set value which will be added to filtered result.
  26641. </p></dd>
  26642. </dl>
  26643. <a name="Commands-88"></a>
  26644. <h4 class="subsection">32.120.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-88" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-88" aria-hidden="true">TOC</a></span></h4>
  26645. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  26646. </p>
  26647. <a name="lagfun"></a>
  26648. <h3 class="section">32.121 lagfun<span class="pull-right"><a class="anchor hidden-xs" href="#lagfun" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lagfun" aria-hidden="true">TOC</a></span></h3>
  26649. <p>Slowly update darker pixels.
  26650. </p>
  26651. <p>This filter makes short flashes of light appear longer.
  26652. This filter accepts the following options:
  26653. </p>
  26654. <dl compact="compact">
  26655. <dt><samp>decay</samp></dt>
  26656. <dd><p>Set factor for decaying. Default is .95. Allowed range is from 0 to 1.
  26657. </p>
  26658. </dd>
  26659. <dt><samp>planes</samp></dt>
  26660. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  26661. </p></dd>
  26662. </dl>
  26663. <a name="Commands-89"></a>
  26664. <h4 class="subsection">32.121.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-89" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-89" aria-hidden="true">TOC</a></span></h4>
  26665. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  26666. </p>
  26667. <a name="lenscorrection"></a>
  26668. <h3 class="section">32.122 lenscorrection<span class="pull-right"><a class="anchor hidden-xs" href="#lenscorrection" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lenscorrection" aria-hidden="true">TOC</a></span></h3>
  26669. <p>Correct radial lens distortion
  26670. </p>
  26671. <p>This filter can be used to correct for radial distortion as can result from the use
  26672. of wide angle lenses, and thereby re-rectify the image. To find the right parameters
  26673. one can use tools available for example as part of opencv or simply trial-and-error.
  26674. To use opencv use the calibration sample (under samples/cpp) from the opencv sources
  26675. and extract the k1 and k2 coefficients from the resulting matrix.
  26676. </p>
  26677. <p>Note that effectively the same filter is available in the open-source tools Krita and
  26678. Digikam from the KDE project.
  26679. </p>
  26680. <p>In contrast to the <a href="#vignette">vignette</a> filter, which can also be used to compensate lens errors,
  26681. this filter corrects the distortion of the image, whereas <a href="#vignette">vignette</a> corrects the
  26682. brightness distribution, so you may want to use both filters together in certain
  26683. cases, though you will have to take care of ordering, i.e. whether vignetting should
  26684. be applied before or after lens correction.
  26685. </p>
  26686. <a name="Options-32"></a>
  26687. <h4 class="subsection">32.122.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-32" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-32" aria-hidden="true">TOC</a></span></h4>
  26688. <p>The filter accepts the following options:
  26689. </p>
  26690. <dl compact="compact">
  26691. <dt><samp>cx</samp></dt>
  26692. <dd><p>Relative x-coordinate of the focal point of the image, and thereby the center of the
  26693. distortion. This value has a range [0,1] and is expressed as fractions of the image
  26694. width. Default is 0.5.
  26695. </p></dd>
  26696. <dt><samp>cy</samp></dt>
  26697. <dd><p>Relative y-coordinate of the focal point of the image, and thereby the center of the
  26698. distortion. This value has a range [0,1] and is expressed as fractions of the image
  26699. height. Default is 0.5.
  26700. </p></dd>
  26701. <dt><samp>k1</samp></dt>
  26702. <dd><p>Coefficient of the quadratic correction term. This value has a range [-1,1]. 0 means
  26703. no correction. Default is 0.
  26704. </p></dd>
  26705. <dt><samp>k2</samp></dt>
  26706. <dd><p>Coefficient of the double quadratic correction term. This value has a range [-1,1].
  26707. 0 means no correction. Default is 0.
  26708. </p></dd>
  26709. <dt><samp>i</samp></dt>
  26710. <dd><p>Set interpolation type. Can be <code>nearest</code> or <code>bilinear</code>.
  26711. Default is <code>nearest</code>.
  26712. </p></dd>
  26713. <dt><samp>fc</samp></dt>
  26714. <dd><p>Specify the color of the unmapped pixels. For the syntax of this option,
  26715. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils
  26716. manual</a>. Default color is <code>black@0</code>.
  26717. </p></dd>
  26718. </dl>
  26719. <p>The formula that generates the correction is:
  26720. </p>
  26721. <p><var>r_src</var> = <var>r_tgt</var> * (1 + <var>k1</var> * (<var>r_tgt</var> / <var>r_0</var>)^2 + <var>k2</var> * (<var>r_tgt</var> / <var>r_0</var>)^4)
  26722. </p>
  26723. <p>where <var>r_0</var> is halve of the image diagonal and <var>r_src</var> and <var>r_tgt</var> are the
  26724. distances from the focal point in the source and target images, respectively.
  26725. </p>
  26726. <a name="Commands-90"></a>
  26727. <h4 class="subsection">32.122.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-90" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-90" aria-hidden="true">TOC</a></span></h4>
  26728. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  26729. </p>
  26730. <a name="lensfun"></a>
  26731. <h3 class="section">32.123 lensfun<span class="pull-right"><a class="anchor hidden-xs" href="#lensfun" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lensfun" aria-hidden="true">TOC</a></span></h3>
  26732. <p>Apply lens correction via the lensfun library (<a href="http://lensfun.sourceforge.net/">http://lensfun.sourceforge.net/</a>).
  26733. </p>
  26734. <p>The <code>lensfun</code> filter requires the camera make, camera model, and lens model
  26735. to apply the lens correction. The filter will load the lensfun database and
  26736. query it to find the corresponding camera and lens entries in the database. As
  26737. long as these entries can be found with the given options, the filter can
  26738. perform corrections on frames. Note that incomplete strings will result in the
  26739. filter choosing the best match with the given options, and the filter will
  26740. output the chosen camera and lens models (logged with level &quot;info&quot;). You must
  26741. provide the make, camera model, and lens model as they are required.
  26742. </p>
  26743. <p>The filter accepts the following options:
  26744. </p>
  26745. <dl compact="compact">
  26746. <dt><samp>make</samp></dt>
  26747. <dd><p>The make of the camera (for example, &quot;Canon&quot;). This option is required.
  26748. </p>
  26749. </dd>
  26750. <dt><samp>model</samp></dt>
  26751. <dd><p>The model of the camera (for example, &quot;Canon EOS 100D&quot;). This option is
  26752. required.
  26753. </p>
  26754. </dd>
  26755. <dt><samp>lens_model</samp></dt>
  26756. <dd><p>The model of the lens (for example, &quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot;). This
  26757. option is required.
  26758. </p>
  26759. </dd>
  26760. <dt><samp>mode</samp></dt>
  26761. <dd><p>The type of correction to apply. The following values are valid options:
  26762. </p>
  26763. <dl compact="compact">
  26764. <dt>&lsquo;<samp>vignetting</samp>&rsquo;</dt>
  26765. <dd><p>Enables fixing lens vignetting.
  26766. </p>
  26767. </dd>
  26768. <dt>&lsquo;<samp>geometry</samp>&rsquo;</dt>
  26769. <dd><p>Enables fixing lens geometry. This is the default.
  26770. </p>
  26771. </dd>
  26772. <dt>&lsquo;<samp>subpixel</samp>&rsquo;</dt>
  26773. <dd><p>Enables fixing chromatic aberrations.
  26774. </p>
  26775. </dd>
  26776. <dt>&lsquo;<samp>vig_geo</samp>&rsquo;</dt>
  26777. <dd><p>Enables fixing lens vignetting and lens geometry.
  26778. </p>
  26779. </dd>
  26780. <dt>&lsquo;<samp>vig_subpixel</samp>&rsquo;</dt>
  26781. <dd><p>Enables fixing lens vignetting and chromatic aberrations.
  26782. </p>
  26783. </dd>
  26784. <dt>&lsquo;<samp>distortion</samp>&rsquo;</dt>
  26785. <dd><p>Enables fixing both lens geometry and chromatic aberrations.
  26786. </p>
  26787. </dd>
  26788. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  26789. <dd><p>Enables all possible corrections.
  26790. </p>
  26791. </dd>
  26792. </dl>
  26793. </dd>
  26794. <dt><samp>focal_length</samp></dt>
  26795. <dd><p>The focal length of the image/video (zoom; expected constant for video). For
  26796. example, a 18&ndash;55mm lens has focal length range of [18&ndash;55], so a value in that
  26797. range should be chosen when using that lens. Default 18.
  26798. </p>
  26799. </dd>
  26800. <dt><samp>aperture</samp></dt>
  26801. <dd><p>The aperture of the image/video (expected constant for video). Note that
  26802. aperture is only used for vignetting correction. Default 3.5.
  26803. </p>
  26804. </dd>
  26805. <dt><samp>focus_distance</samp></dt>
  26806. <dd><p>The focus distance of the image/video (expected constant for video). Note that
  26807. focus distance is only used for vignetting and only slightly affects the
  26808. vignetting correction process. If unknown, leave it at the default value (which
  26809. is 1000).
  26810. </p>
  26811. </dd>
  26812. <dt><samp>scale</samp></dt>
  26813. <dd><p>The scale factor which is applied after transformation. After correction the
  26814. video is no longer necessarily rectangular. This parameter controls how much of
  26815. the resulting image is visible. The value 0 means that a value will be chosen
  26816. automatically such that there is little or no unmapped area in the output
  26817. image. 1.0 means that no additional scaling is done. Lower values may result
  26818. in more of the corrected image being visible, while higher values may avoid
  26819. unmapped areas in the output.
  26820. </p>
  26821. </dd>
  26822. <dt><samp>target_geometry</samp></dt>
  26823. <dd><p>The target geometry of the output image/video. The following values are valid
  26824. options:
  26825. </p>
  26826. <dl compact="compact">
  26827. <dt>&lsquo;<samp>rectilinear (default)</samp>&rsquo;</dt>
  26828. <dt>&lsquo;<samp>fisheye</samp>&rsquo;</dt>
  26829. <dt>&lsquo;<samp>panoramic</samp>&rsquo;</dt>
  26830. <dt>&lsquo;<samp>equirectangular</samp>&rsquo;</dt>
  26831. <dt>&lsquo;<samp>fisheye_orthographic</samp>&rsquo;</dt>
  26832. <dt>&lsquo;<samp>fisheye_stereographic</samp>&rsquo;</dt>
  26833. <dt>&lsquo;<samp>fisheye_equisolid</samp>&rsquo;</dt>
  26834. <dt>&lsquo;<samp>fisheye_thoby</samp>&rsquo;</dt>
  26835. </dl>
  26836. </dd>
  26837. <dt><samp>reverse</samp></dt>
  26838. <dd><p>Apply the reverse of image correction (instead of correcting distortion, apply
  26839. it).
  26840. </p>
  26841. </dd>
  26842. <dt><samp>interpolation</samp></dt>
  26843. <dd><p>The type of interpolation used when correcting distortion. The following values
  26844. are valid options:
  26845. </p>
  26846. <dl compact="compact">
  26847. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  26848. <dt>&lsquo;<samp>linear (default)</samp>&rsquo;</dt>
  26849. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  26850. </dl>
  26851. </dd>
  26852. </dl>
  26853. <a name="Examples-92"></a>
  26854. <h4 class="subsection">32.123.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-92" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-92" aria-hidden="true">TOC</a></span></h4>
  26855. <ul>
  26856. <li> Apply lens correction with make &quot;Canon&quot;, camera model &quot;Canon EOS 100D&quot;, and lens
  26857. model &quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot; with focal length of &quot;18&quot; and
  26858. aperture of &quot;8.0&quot;.
  26859. <div class="example">
  26860. <pre class="example">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
  26861. </pre></div>
  26862. </li><li> Apply the same as before, but only for the first 5 seconds of video.
  26863. <div class="example">
  26864. <pre class="example">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
  26865. </pre></div>
  26866. </li></ul>
  26867. <a name="libvmaf"></a>
  26868. <h3 class="section">32.124 libvmaf<span class="pull-right"><a class="anchor hidden-xs" href="#libvmaf" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libvmaf" aria-hidden="true">TOC</a></span></h3>
  26869. <p>Obtain the VMAF (Video Multi-Method Assessment Fusion)
  26870. score between two input videos.
  26871. </p>
  26872. <p>The obtained VMAF score is printed through the logging system.
  26873. </p>
  26874. <p>It requires Netflix&rsquo;s vmaf library (libvmaf) as a pre-requisite.
  26875. After installing the library it can be enabled using:
  26876. <code>./configure --enable-libvmaf</code>.
  26877. If no model path is specified it uses the default model: <code>vmaf_v0.6.1.pkl</code>.
  26878. </p>
  26879. <p>The filter has following options:
  26880. </p>
  26881. <dl compact="compact">
  26882. <dt><samp>model_path</samp></dt>
  26883. <dd><p>Set the model path which is to be used for SVM.
  26884. Default value: <code>&quot;/usr/local/share/model/vmaf_v0.6.1.pkl&quot;</code>
  26885. </p>
  26886. </dd>
  26887. <dt><samp>log_path</samp></dt>
  26888. <dd><p>Set the file path to be used to store logs.
  26889. </p>
  26890. </dd>
  26891. <dt><samp>log_fmt</samp></dt>
  26892. <dd><p>Set the format of the log file (csv, json or xml).
  26893. </p>
  26894. </dd>
  26895. <dt><samp>enable_transform</samp></dt>
  26896. <dd><p>This option can enable/disable the <code>score_transform</code> applied to the final predicted VMAF score,
  26897. if you have specified score_transform option in the input parameter file passed to <code>run_vmaf_training.py</code>
  26898. Default value: <code>false</code>
  26899. </p>
  26900. </dd>
  26901. <dt><samp>phone_model</samp></dt>
  26902. <dd><p>Invokes the phone model which will generate VMAF scores higher than in the
  26903. regular model, which is more suitable for laptop, TV, etc. viewing conditions.
  26904. Default value: <code>false</code>
  26905. </p>
  26906. </dd>
  26907. <dt><samp>psnr</samp></dt>
  26908. <dd><p>Enables computing psnr along with vmaf.
  26909. Default value: <code>false</code>
  26910. </p>
  26911. </dd>
  26912. <dt><samp>ssim</samp></dt>
  26913. <dd><p>Enables computing ssim along with vmaf.
  26914. Default value: <code>false</code>
  26915. </p>
  26916. </dd>
  26917. <dt><samp>ms_ssim</samp></dt>
  26918. <dd><p>Enables computing ms_ssim along with vmaf.
  26919. Default value: <code>false</code>
  26920. </p>
  26921. </dd>
  26922. <dt><samp>pool</samp></dt>
  26923. <dd><p>Set the pool method to be used for computing vmaf.
  26924. Options are <code>min</code>, <code>harmonic_mean</code> or <code>mean</code> (default).
  26925. </p>
  26926. </dd>
  26927. <dt><samp>n_threads</samp></dt>
  26928. <dd><p>Set number of threads to be used when computing vmaf.
  26929. Default value: <code>0</code>, which makes use of all available logical processors.
  26930. </p>
  26931. </dd>
  26932. <dt><samp>n_subsample</samp></dt>
  26933. <dd><p>Set interval for frame subsampling used when computing vmaf.
  26934. Default value: <code>1</code>
  26935. </p>
  26936. </dd>
  26937. <dt><samp>enable_conf_interval</samp></dt>
  26938. <dd><p>Enables confidence interval.
  26939. Default value: <code>false</code>
  26940. </p></dd>
  26941. </dl>
  26942. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  26943. </p>
  26944. <a name="Examples-93"></a>
  26945. <h4 class="subsection">32.124.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-93" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-93" aria-hidden="true">TOC</a></span></h4>
  26946. <ul>
  26947. <li> On the below examples the input file <samp>main.mpg</samp> being processed is
  26948. compared with the reference file <samp>ref.mpg</samp>.
  26949. <div class="example">
  26950. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf -f null -
  26951. </pre></div>
  26952. </li><li> Example with options:
  26953. <div class="example">
  26954. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf=&quot;psnr=1:log_fmt=json&quot; -f null -
  26955. </pre></div>
  26956. </li><li> Example with options and different containers:
  26957. <div class="example">
  26958. <pre class="example">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]libvmaf=psnr=1:log_fmt=json&quot; -f null -
  26959. </pre></div>
  26960. </li></ul>
  26961. <a name="limiter"></a>
  26962. <h3 class="section">32.125 limiter<span class="pull-right"><a class="anchor hidden-xs" href="#limiter" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-limiter" aria-hidden="true">TOC</a></span></h3>
  26963. <p>Limits the pixel components values to the specified range [min, max].
  26964. </p>
  26965. <p>The filter accepts the following options:
  26966. </p>
  26967. <dl compact="compact">
  26968. <dt><samp>min</samp></dt>
  26969. <dd><p>Lower bound. Defaults to the lowest allowed value for the input.
  26970. </p>
  26971. </dd>
  26972. <dt><samp>max</samp></dt>
  26973. <dd><p>Upper bound. Defaults to the highest allowed value for the input.
  26974. </p>
  26975. </dd>
  26976. <dt><samp>planes</samp></dt>
  26977. <dd><p>Specify which planes will be processed. Defaults to all available.
  26978. </p></dd>
  26979. </dl>
  26980. <a name="Commands-91"></a>
  26981. <h4 class="subsection">32.125.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-91" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-91" aria-hidden="true">TOC</a></span></h4>
  26982. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  26983. </p>
  26984. <a name="loop"></a>
  26985. <h3 class="section">32.126 loop<span class="pull-right"><a class="anchor hidden-xs" href="#loop" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-loop" aria-hidden="true">TOC</a></span></h3>
  26986. <p>Loop video frames.
  26987. </p>
  26988. <p>The filter accepts the following options:
  26989. </p>
  26990. <dl compact="compact">
  26991. <dt><samp>loop</samp></dt>
  26992. <dd><p>Set the number of loops. Setting this value to -1 will result in infinite loops.
  26993. Default is 0.
  26994. </p>
  26995. </dd>
  26996. <dt><samp>size</samp></dt>
  26997. <dd><p>Set maximal size in number of frames. Default is 0.
  26998. </p>
  26999. </dd>
  27000. <dt><samp>start</samp></dt>
  27001. <dd><p>Set first frame of loop. Default is 0.
  27002. </p></dd>
  27003. </dl>
  27004. <a name="Examples-94"></a>
  27005. <h4 class="subsection">32.126.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-94" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-94" aria-hidden="true">TOC</a></span></h4>
  27006. <ul>
  27007. <li> Loop single first frame infinitely:
  27008. <div class="example">
  27009. <pre class="example">loop=loop=-1:size=1:start=0
  27010. </pre></div>
  27011. </li><li> Loop single first frame 10 times:
  27012. <div class="example">
  27013. <pre class="example">loop=loop=10:size=1:start=0
  27014. </pre></div>
  27015. </li><li> Loop 10 first frames 5 times:
  27016. <div class="example">
  27017. <pre class="example">loop=loop=5:size=10:start=0
  27018. </pre></div>
  27019. </li></ul>
  27020. <a name="lut1d"></a>
  27021. <h3 class="section">32.127 lut1d<span class="pull-right"><a class="anchor hidden-xs" href="#lut1d" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lut1d" aria-hidden="true">TOC</a></span></h3>
  27022. <p>Apply a 1D LUT to an input video.
  27023. </p>
  27024. <p>The filter accepts the following options:
  27025. </p>
  27026. <dl compact="compact">
  27027. <dt><samp>file</samp></dt>
  27028. <dd><p>Set the 1D LUT file name.
  27029. </p>
  27030. <p>Currently supported formats:
  27031. </p><dl compact="compact">
  27032. <dt>&lsquo;<samp>cube</samp>&rsquo;</dt>
  27033. <dd><p>Iridas
  27034. </p></dd>
  27035. <dt>&lsquo;<samp>csp</samp>&rsquo;</dt>
  27036. <dd><p>cineSpace
  27037. </p></dd>
  27038. </dl>
  27039. </dd>
  27040. <dt><samp>interp</samp></dt>
  27041. <dd><p>Select interpolation mode.
  27042. </p>
  27043. <p>Available values are:
  27044. </p>
  27045. <dl compact="compact">
  27046. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  27047. <dd><p>Use values from the nearest defined point.
  27048. </p></dd>
  27049. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  27050. <dd><p>Interpolate values using the linear interpolation.
  27051. </p></dd>
  27052. <dt>&lsquo;<samp>cosine</samp>&rsquo;</dt>
  27053. <dd><p>Interpolate values using the cosine interpolation.
  27054. </p></dd>
  27055. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  27056. <dd><p>Interpolate values using the cubic interpolation.
  27057. </p></dd>
  27058. <dt>&lsquo;<samp>spline</samp>&rsquo;</dt>
  27059. <dd><p>Interpolate values using the spline interpolation.
  27060. </p></dd>
  27061. </dl>
  27062. </dd>
  27063. </dl>
  27064. <a name="Commands-92"></a>
  27065. <h4 class="subsection">32.127.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-92" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-92" aria-hidden="true">TOC</a></span></h4>
  27066. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27067. </p>
  27068. <span id="lut3d"></span><a name="lut3d-1"></a>
  27069. <h3 class="section">32.128 lut3d<span class="pull-right"><a class="anchor hidden-xs" href="#lut3d-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lut3d-1" aria-hidden="true">TOC</a></span></h3>
  27070. <p>Apply a 3D LUT to an input video.
  27071. </p>
  27072. <p>The filter accepts the following options:
  27073. </p>
  27074. <dl compact="compact">
  27075. <dt><samp>file</samp></dt>
  27076. <dd><p>Set the 3D LUT file name.
  27077. </p>
  27078. <p>Currently supported formats:
  27079. </p><dl compact="compact">
  27080. <dt>&lsquo;<samp>3dl</samp>&rsquo;</dt>
  27081. <dd><p>AfterEffects
  27082. </p></dd>
  27083. <dt>&lsquo;<samp>cube</samp>&rsquo;</dt>
  27084. <dd><p>Iridas
  27085. </p></dd>
  27086. <dt>&lsquo;<samp>dat</samp>&rsquo;</dt>
  27087. <dd><p>DaVinci
  27088. </p></dd>
  27089. <dt>&lsquo;<samp>m3d</samp>&rsquo;</dt>
  27090. <dd><p>Pandora
  27091. </p></dd>
  27092. <dt>&lsquo;<samp>csp</samp>&rsquo;</dt>
  27093. <dd><p>cineSpace
  27094. </p></dd>
  27095. </dl>
  27096. </dd>
  27097. <dt><samp>interp</samp></dt>
  27098. <dd><p>Select interpolation mode.
  27099. </p>
  27100. <p>Available values are:
  27101. </p>
  27102. <dl compact="compact">
  27103. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  27104. <dd><p>Use values from the nearest defined point.
  27105. </p></dd>
  27106. <dt>&lsquo;<samp>trilinear</samp>&rsquo;</dt>
  27107. <dd><p>Interpolate values using the 8 points defining a cube.
  27108. </p></dd>
  27109. <dt>&lsquo;<samp>tetrahedral</samp>&rsquo;</dt>
  27110. <dd><p>Interpolate values using a tetrahedron.
  27111. </p></dd>
  27112. <dt>&lsquo;<samp>pyramid</samp>&rsquo;</dt>
  27113. <dd><p>Interpolate values using a pyramid.
  27114. </p></dd>
  27115. <dt>&lsquo;<samp>prism</samp>&rsquo;</dt>
  27116. <dd><p>Interpolate values using a prism.
  27117. </p></dd>
  27118. </dl>
  27119. </dd>
  27120. </dl>
  27121. <a name="Commands-93"></a>
  27122. <h4 class="subsection">32.128.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-93" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-93" aria-hidden="true">TOC</a></span></h4>
  27123. <p>This filter supports the <code>interp</code> option as <a href="#commands">commands</a>.
  27124. </p>
  27125. <a name="lumakey"></a>
  27126. <h3 class="section">32.129 lumakey<span class="pull-right"><a class="anchor hidden-xs" href="#lumakey" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lumakey" aria-hidden="true">TOC</a></span></h3>
  27127. <p>Turn certain luma values into transparency.
  27128. </p>
  27129. <p>The filter accepts the following options:
  27130. </p>
  27131. <dl compact="compact">
  27132. <dt><samp>threshold</samp></dt>
  27133. <dd><p>Set the luma which will be used as base for transparency.
  27134. Default value is <code>0</code>.
  27135. </p>
  27136. </dd>
  27137. <dt><samp>tolerance</samp></dt>
  27138. <dd><p>Set the range of luma values to be keyed out.
  27139. Default value is <code>0.01</code>.
  27140. </p>
  27141. </dd>
  27142. <dt><samp>softness</samp></dt>
  27143. <dd><p>Set the range of softness. Default value is <code>0</code>.
  27144. Use this to control gradual transition from zero to full transparency.
  27145. </p></dd>
  27146. </dl>
  27147. <a name="Commands-94"></a>
  27148. <h4 class="subsection">32.129.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-94" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-94" aria-hidden="true">TOC</a></span></h4>
  27149. <p>This filter supports same <a href="#commands">commands</a> as options.
  27150. The command accepts the same syntax of the corresponding option.
  27151. </p>
  27152. <p>If the specified expression is not valid, it is kept at its current
  27153. value.
  27154. </p>
  27155. <a name="lut_002c-lutrgb_002c-lutyuv"></a>
  27156. <h3 class="section">32.130 lut, lutrgb, lutyuv<span class="pull-right"><a class="anchor hidden-xs" href="#lut_002c-lutrgb_002c-lutyuv" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lut_002c-lutrgb_002c-lutyuv" aria-hidden="true">TOC</a></span></h3>
  27157. <p>Compute a look-up table for binding each pixel component input value
  27158. to an output value, and apply it to the input video.
  27159. </p>
  27160. <p><var>lutyuv</var> applies a lookup table to a YUV input video, <var>lutrgb</var>
  27161. to an RGB input video.
  27162. </p>
  27163. <p>These filters accept the following parameters:
  27164. </p><dl compact="compact">
  27165. <dt><samp>c0</samp></dt>
  27166. <dd><p>set first pixel component expression
  27167. </p></dd>
  27168. <dt><samp>c1</samp></dt>
  27169. <dd><p>set second pixel component expression
  27170. </p></dd>
  27171. <dt><samp>c2</samp></dt>
  27172. <dd><p>set third pixel component expression
  27173. </p></dd>
  27174. <dt><samp>c3</samp></dt>
  27175. <dd><p>set fourth pixel component expression, corresponds to the alpha component
  27176. </p>
  27177. </dd>
  27178. <dt><samp>r</samp></dt>
  27179. <dd><p>set red component expression
  27180. </p></dd>
  27181. <dt><samp>g</samp></dt>
  27182. <dd><p>set green component expression
  27183. </p></dd>
  27184. <dt><samp>b</samp></dt>
  27185. <dd><p>set blue component expression
  27186. </p></dd>
  27187. <dt><samp>a</samp></dt>
  27188. <dd><p>alpha component expression
  27189. </p>
  27190. </dd>
  27191. <dt><samp>y</samp></dt>
  27192. <dd><p>set Y/luminance component expression
  27193. </p></dd>
  27194. <dt><samp>u</samp></dt>
  27195. <dd><p>set U/Cb component expression
  27196. </p></dd>
  27197. <dt><samp>v</samp></dt>
  27198. <dd><p>set V/Cr component expression
  27199. </p></dd>
  27200. </dl>
  27201. <p>Each of them specifies the expression to use for computing the lookup table for
  27202. the corresponding pixel component values.
  27203. </p>
  27204. <p>The exact component associated to each of the <var>c*</var> options depends on the
  27205. format in input.
  27206. </p>
  27207. <p>The <var>lut</var> filter requires either YUV or RGB pixel formats in input,
  27208. <var>lutrgb</var> requires RGB pixel formats in input, and <var>lutyuv</var> requires YUV.
  27209. </p>
  27210. <p>The expressions can contain the following constants and functions:
  27211. </p>
  27212. <dl compact="compact">
  27213. <dt><samp>w</samp></dt>
  27214. <dt><samp>h</samp></dt>
  27215. <dd><p>The input width and height.
  27216. </p>
  27217. </dd>
  27218. <dt><samp>val</samp></dt>
  27219. <dd><p>The input value for the pixel component.
  27220. </p>
  27221. </dd>
  27222. <dt><samp>clipval</samp></dt>
  27223. <dd><p>The input value, clipped to the <var>minval</var>-<var>maxval</var> range.
  27224. </p>
  27225. </dd>
  27226. <dt><samp>maxval</samp></dt>
  27227. <dd><p>The maximum value for the pixel component.
  27228. </p>
  27229. </dd>
  27230. <dt><samp>minval</samp></dt>
  27231. <dd><p>The minimum value for the pixel component.
  27232. </p>
  27233. </dd>
  27234. <dt><samp>negval</samp></dt>
  27235. <dd><p>The negated value for the pixel component value, clipped to the
  27236. <var>minval</var>-<var>maxval</var> range; it corresponds to the expression
  27237. &quot;maxval-clipval+minval&quot;.
  27238. </p>
  27239. </dd>
  27240. <dt><samp>clip(val)</samp></dt>
  27241. <dd><p>The computed value in <var>val</var>, clipped to the
  27242. <var>minval</var>-<var>maxval</var> range.
  27243. </p>
  27244. </dd>
  27245. <dt><samp>gammaval(gamma)</samp></dt>
  27246. <dd><p>The computed gamma correction value of the pixel component value,
  27247. clipped to the <var>minval</var>-<var>maxval</var> range. It corresponds to the
  27248. expression
  27249. &quot;pow((clipval-minval)/(maxval-minval)\,<var>gamma</var>)*(maxval-minval)+minval&quot;
  27250. </p>
  27251. </dd>
  27252. </dl>
  27253. <p>All expressions default to &quot;val&quot;.
  27254. </p>
  27255. <a name="Commands-95"></a>
  27256. <h4 class="subsection">32.130.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-95" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-95" aria-hidden="true">TOC</a></span></h4>
  27257. <p>This filter supports same <a href="#commands">commands</a> as options.
  27258. </p>
  27259. <a name="Examples-95"></a>
  27260. <h4 class="subsection">32.130.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-95" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-95" aria-hidden="true">TOC</a></span></h4>
  27261. <ul>
  27262. <li> Negate input video:
  27263. <div class="example">
  27264. <pre class="example">lutrgb=&quot;r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val&quot;
  27265. lutyuv=&quot;y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val&quot;
  27266. </pre></div>
  27267. <p>The above is the same as:
  27268. </p><div class="example">
  27269. <pre class="example">lutrgb=&quot;r=negval:g=negval:b=negval&quot;
  27270. lutyuv=&quot;y=negval:u=negval:v=negval&quot;
  27271. </pre></div>
  27272. </li><li> Negate luminance:
  27273. <div class="example">
  27274. <pre class="example">lutyuv=y=negval
  27275. </pre></div>
  27276. </li><li> Remove chroma components, turning the video into a graytone image:
  27277. <div class="example">
  27278. <pre class="example">lutyuv=&quot;u=128:v=128&quot;
  27279. </pre></div>
  27280. </li><li> Apply a luma burning effect:
  27281. <div class="example">
  27282. <pre class="example">lutyuv=&quot;y=2*val&quot;
  27283. </pre></div>
  27284. </li><li> Remove green and blue components:
  27285. <div class="example">
  27286. <pre class="example">lutrgb=&quot;g=0:b=0&quot;
  27287. </pre></div>
  27288. </li><li> Set a constant alpha channel value on input:
  27289. <div class="example">
  27290. <pre class="example">format=rgba,lutrgb=a=&quot;maxval-minval/2&quot;
  27291. </pre></div>
  27292. </li><li> Correct luminance gamma by a factor of 0.5:
  27293. <div class="example">
  27294. <pre class="example">lutyuv=y=gammaval(0.5)
  27295. </pre></div>
  27296. </li><li> Discard least significant bits of luma:
  27297. <div class="example">
  27298. <pre class="example">lutyuv=y='bitand(val, 128+64+32)'
  27299. </pre></div>
  27300. </li><li> Technicolor like effect:
  27301. <div class="example">
  27302. <pre class="example">lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
  27303. </pre></div>
  27304. </li></ul>
  27305. <a name="lut2_002c-tlut2"></a>
  27306. <h3 class="section">32.131 lut2, tlut2<span class="pull-right"><a class="anchor hidden-xs" href="#lut2_002c-tlut2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-lut2_002c-tlut2" aria-hidden="true">TOC</a></span></h3>
  27307. <p>The <code>lut2</code> filter takes two input streams and outputs one
  27308. stream.
  27309. </p>
  27310. <p>The <code>tlut2</code> (time lut2) filter takes two consecutive frames
  27311. from one single stream.
  27312. </p>
  27313. <p>This filter accepts the following parameters:
  27314. </p><dl compact="compact">
  27315. <dt><samp>c0</samp></dt>
  27316. <dd><p>set first pixel component expression
  27317. </p></dd>
  27318. <dt><samp>c1</samp></dt>
  27319. <dd><p>set second pixel component expression
  27320. </p></dd>
  27321. <dt><samp>c2</samp></dt>
  27322. <dd><p>set third pixel component expression
  27323. </p></dd>
  27324. <dt><samp>c3</samp></dt>
  27325. <dd><p>set fourth pixel component expression, corresponds to the alpha component
  27326. </p>
  27327. </dd>
  27328. <dt><samp>d</samp></dt>
  27329. <dd><p>set output bit depth, only available for <code>lut2</code> filter. By default is 0,
  27330. which means bit depth is automatically picked from first input format.
  27331. </p></dd>
  27332. </dl>
  27333. <p>The <code>lut2</code> filter also supports the <a href="#framesync">framesync</a> options.
  27334. </p>
  27335. <p>Each of them specifies the expression to use for computing the lookup table for
  27336. the corresponding pixel component values.
  27337. </p>
  27338. <p>The exact component associated to each of the <var>c*</var> options depends on the
  27339. format in inputs.
  27340. </p>
  27341. <p>The expressions can contain the following constants:
  27342. </p>
  27343. <dl compact="compact">
  27344. <dt><samp>w</samp></dt>
  27345. <dt><samp>h</samp></dt>
  27346. <dd><p>The input width and height.
  27347. </p>
  27348. </dd>
  27349. <dt><samp>x</samp></dt>
  27350. <dd><p>The first input value for the pixel component.
  27351. </p>
  27352. </dd>
  27353. <dt><samp>y</samp></dt>
  27354. <dd><p>The second input value for the pixel component.
  27355. </p>
  27356. </dd>
  27357. <dt><samp>bdx</samp></dt>
  27358. <dd><p>The first input video bit depth.
  27359. </p>
  27360. </dd>
  27361. <dt><samp>bdy</samp></dt>
  27362. <dd><p>The second input video bit depth.
  27363. </p></dd>
  27364. </dl>
  27365. <p>All expressions default to &quot;x&quot;.
  27366. </p>
  27367. <a name="Commands-96"></a>
  27368. <h4 class="subsection">32.131.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-96" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-96" aria-hidden="true">TOC</a></span></h4>
  27369. <p>This filter supports the all above options as <a href="#commands">commands</a> except option <code>d</code>.
  27370. </p>
  27371. <a name="Examples-96"></a>
  27372. <h4 class="subsection">32.131.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-96" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-96" aria-hidden="true">TOC</a></span></h4>
  27373. <ul>
  27374. <li> Highlight differences between two RGB video streams:
  27375. <div class="example">
  27376. <pre class="example">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)'
  27377. </pre></div>
  27378. </li><li> Highlight differences between two YUV video streams:
  27379. <div class="example">
  27380. <pre class="example">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)'
  27381. </pre></div>
  27382. </li><li> Show max difference between two video streams:
  27383. <div class="example">
  27384. <pre class="example">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)))'
  27385. </pre></div>
  27386. </li></ul>
  27387. <a name="maskedclamp"></a>
  27388. <h3 class="section">32.132 maskedclamp<span class="pull-right"><a class="anchor hidden-xs" href="#maskedclamp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-maskedclamp" aria-hidden="true">TOC</a></span></h3>
  27389. <p>Clamp the first input stream with the second input and third input stream.
  27390. </p>
  27391. <p>Returns the value of first stream to be between second input
  27392. stream - <code>undershoot</code> and third input stream + <code>overshoot</code>.
  27393. </p>
  27394. <p>This filter accepts the following options:
  27395. </p><dl compact="compact">
  27396. <dt><samp>undershoot</samp></dt>
  27397. <dd><p>Default value is <code>0</code>.
  27398. </p>
  27399. </dd>
  27400. <dt><samp>overshoot</samp></dt>
  27401. <dd><p>Default value is <code>0</code>.
  27402. </p>
  27403. </dd>
  27404. <dt><samp>planes</samp></dt>
  27405. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  27406. copied from first stream.
  27407. By default value 0xf, all planes will be processed.
  27408. </p></dd>
  27409. </dl>
  27410. <a name="Commands-97"></a>
  27411. <h4 class="subsection">32.132.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-97" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-97" aria-hidden="true">TOC</a></span></h4>
  27412. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27413. </p>
  27414. <a name="maskedmax"></a>
  27415. <h3 class="section">32.133 maskedmax<span class="pull-right"><a class="anchor hidden-xs" href="#maskedmax" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-maskedmax" aria-hidden="true">TOC</a></span></h3>
  27416. <p>Merge the second and third input stream into output stream using absolute differences
  27417. between second input stream and first input stream and absolute difference between
  27418. third input stream and first input stream. The picked value will be from second input
  27419. stream if second absolute difference is greater than first one or from third input stream
  27420. otherwise.
  27421. </p>
  27422. <p>This filter accepts the following options:
  27423. </p><dl compact="compact">
  27424. <dt><samp>planes</samp></dt>
  27425. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  27426. copied from first stream.
  27427. By default value 0xf, all planes will be processed.
  27428. </p></dd>
  27429. </dl>
  27430. <a name="Commands-98"></a>
  27431. <h4 class="subsection">32.133.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-98" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-98" aria-hidden="true">TOC</a></span></h4>
  27432. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27433. </p>
  27434. <a name="maskedmerge"></a>
  27435. <h3 class="section">32.134 maskedmerge<span class="pull-right"><a class="anchor hidden-xs" href="#maskedmerge" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-maskedmerge" aria-hidden="true">TOC</a></span></h3>
  27436. <p>Merge the first input stream with the second input stream using per pixel
  27437. weights in the third input stream.
  27438. </p>
  27439. <p>A value of 0 in the third stream pixel component means that pixel component
  27440. from first stream is returned unchanged, while maximum value (eg. 255 for
  27441. 8-bit videos) means that pixel component from second stream is returned
  27442. unchanged. Intermediate values define the amount of merging between both
  27443. input stream&rsquo;s pixel components.
  27444. </p>
  27445. <p>This filter accepts the following options:
  27446. </p><dl compact="compact">
  27447. <dt><samp>planes</samp></dt>
  27448. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  27449. copied from first stream.
  27450. By default value 0xf, all planes will be processed.
  27451. </p></dd>
  27452. </dl>
  27453. <a name="Commands-99"></a>
  27454. <h4 class="subsection">32.134.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-99" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-99" aria-hidden="true">TOC</a></span></h4>
  27455. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27456. </p>
  27457. <a name="maskedmin"></a>
  27458. <h3 class="section">32.135 maskedmin<span class="pull-right"><a class="anchor hidden-xs" href="#maskedmin" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-maskedmin" aria-hidden="true">TOC</a></span></h3>
  27459. <p>Merge the second and third input stream into output stream using absolute differences
  27460. between second input stream and first input stream and absolute difference between
  27461. third input stream and first input stream. The picked value will be from second input
  27462. stream if second absolute difference is less than first one or from third input stream
  27463. otherwise.
  27464. </p>
  27465. <p>This filter accepts the following options:
  27466. </p><dl compact="compact">
  27467. <dt><samp>planes</samp></dt>
  27468. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  27469. copied from first stream.
  27470. By default value 0xf, all planes will be processed.
  27471. </p></dd>
  27472. </dl>
  27473. <a name="Commands-100"></a>
  27474. <h4 class="subsection">32.135.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-100" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-100" aria-hidden="true">TOC</a></span></h4>
  27475. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27476. </p>
  27477. <a name="maskedthreshold"></a>
  27478. <h3 class="section">32.136 maskedthreshold<span class="pull-right"><a class="anchor hidden-xs" href="#maskedthreshold" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-maskedthreshold" aria-hidden="true">TOC</a></span></h3>
  27479. <p>Pick pixels comparing absolute difference of two video streams with fixed
  27480. threshold.
  27481. </p>
  27482. <p>If absolute difference between pixel component of first and second video
  27483. stream is equal or lower than user supplied threshold than pixel component
  27484. from first video stream is picked, otherwise pixel component from second
  27485. video stream is picked.
  27486. </p>
  27487. <p>This filter accepts the following options:
  27488. </p><dl compact="compact">
  27489. <dt><samp>threshold</samp></dt>
  27490. <dd><p>Set threshold used when picking pixels from absolute difference from two input
  27491. video streams.
  27492. </p>
  27493. </dd>
  27494. <dt><samp>planes</samp></dt>
  27495. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  27496. copied from second stream.
  27497. By default value 0xf, all planes will be processed.
  27498. </p></dd>
  27499. </dl>
  27500. <a name="Commands-101"></a>
  27501. <h4 class="subsection">32.136.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-101" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-101" aria-hidden="true">TOC</a></span></h4>
  27502. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27503. </p>
  27504. <a name="maskfun"></a>
  27505. <h3 class="section">32.137 maskfun<span class="pull-right"><a class="anchor hidden-xs" href="#maskfun" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-maskfun" aria-hidden="true">TOC</a></span></h3>
  27506. <p>Create mask from input video.
  27507. </p>
  27508. <p>For example it is useful to create motion masks after <code>tblend</code> filter.
  27509. </p>
  27510. <p>This filter accepts the following options:
  27511. </p>
  27512. <dl compact="compact">
  27513. <dt><samp>low</samp></dt>
  27514. <dd><p>Set low threshold. Any pixel component lower or exact than this value will be set to 0.
  27515. </p>
  27516. </dd>
  27517. <dt><samp>high</samp></dt>
  27518. <dd><p>Set high threshold. Any pixel component higher than this value will be set to max value
  27519. allowed for current pixel format.
  27520. </p>
  27521. </dd>
  27522. <dt><samp>planes</samp></dt>
  27523. <dd><p>Set planes to filter, by default all available planes are filtered.
  27524. </p>
  27525. </dd>
  27526. <dt><samp>fill</samp></dt>
  27527. <dd><p>Fill all frame pixels with this value.
  27528. </p>
  27529. </dd>
  27530. <dt><samp>sum</samp></dt>
  27531. <dd><p>Set max average pixel value for frame. If sum of all pixel components is higher that this
  27532. average, output frame will be completely filled with value set by <var>fill</var> option.
  27533. Typically useful for scene changes when used in combination with <code>tblend</code> filter.
  27534. </p></dd>
  27535. </dl>
  27536. <a name="Commands-102"></a>
  27537. <h4 class="subsection">32.137.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-102" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-102" aria-hidden="true">TOC</a></span></h4>
  27538. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27539. </p>
  27540. <a name="mcdeint"></a>
  27541. <h3 class="section">32.138 mcdeint<span class="pull-right"><a class="anchor hidden-xs" href="#mcdeint" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mcdeint" aria-hidden="true">TOC</a></span></h3>
  27542. <p>Apply motion-compensation deinterlacing.
  27543. </p>
  27544. <p>It needs one field per frame as input and must thus be used together
  27545. with yadif=1/3 or equivalent.
  27546. </p>
  27547. <p>This filter accepts the following options:
  27548. </p><dl compact="compact">
  27549. <dt><samp>mode</samp></dt>
  27550. <dd><p>Set the deinterlacing mode.
  27551. </p>
  27552. <p>It accepts one of the following values:
  27553. </p><dl compact="compact">
  27554. <dt>&lsquo;<samp>fast</samp>&rsquo;</dt>
  27555. <dt>&lsquo;<samp>medium</samp>&rsquo;</dt>
  27556. <dt>&lsquo;<samp>slow</samp>&rsquo;</dt>
  27557. <dd><p>use iterative motion estimation
  27558. </p></dd>
  27559. <dt>&lsquo;<samp>extra_slow</samp>&rsquo;</dt>
  27560. <dd><p>like &lsquo;<samp>slow</samp>&rsquo;, but use multiple reference frames.
  27561. </p></dd>
  27562. </dl>
  27563. <p>Default value is &lsquo;<samp>fast</samp>&rsquo;.
  27564. </p>
  27565. </dd>
  27566. <dt><samp>parity</samp></dt>
  27567. <dd><p>Set the picture field parity assumed for the input video. It must be
  27568. one of the following values:
  27569. </p>
  27570. <dl compact="compact">
  27571. <dt>&lsquo;<samp>0, tff</samp>&rsquo;</dt>
  27572. <dd><p>assume top field first
  27573. </p></dd>
  27574. <dt>&lsquo;<samp>1, bff</samp>&rsquo;</dt>
  27575. <dd><p>assume bottom field first
  27576. </p></dd>
  27577. </dl>
  27578. <p>Default value is &lsquo;<samp>bff</samp>&rsquo;.
  27579. </p>
  27580. </dd>
  27581. <dt><samp>qp</samp></dt>
  27582. <dd><p>Set per-block quantization parameter (QP) used by the internal
  27583. encoder.
  27584. </p>
  27585. <p>Higher values should result in a smoother motion vector field but less
  27586. optimal individual vectors. Default value is 1.
  27587. </p></dd>
  27588. </dl>
  27589. <a name="median"></a>
  27590. <h3 class="section">32.139 median<span class="pull-right"><a class="anchor hidden-xs" href="#median" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-median" aria-hidden="true">TOC</a></span></h3>
  27591. <p>Pick median pixel from certain rectangle defined by radius.
  27592. </p>
  27593. <p>This filter accepts the following options:
  27594. </p>
  27595. <dl compact="compact">
  27596. <dt><samp>radius</samp></dt>
  27597. <dd><p>Set horizontal radius size. Default value is <code>1</code>.
  27598. Allowed range is integer from 1 to 127.
  27599. </p>
  27600. </dd>
  27601. <dt><samp>planes</samp></dt>
  27602. <dd><p>Set which planes to process. Default is <code>15</code>, which is all available planes.
  27603. </p>
  27604. </dd>
  27605. <dt><samp>radiusV</samp></dt>
  27606. <dd><p>Set vertical radius size. Default value is <code>0</code>.
  27607. Allowed range is integer from 0 to 127.
  27608. If it is 0, value will be picked from horizontal <code>radius</code> option.
  27609. </p>
  27610. </dd>
  27611. <dt><samp>percentile</samp></dt>
  27612. <dd><p>Set median percentile. Default value is <code>0.5</code>.
  27613. Default value of <code>0.5</code> will pick always median values, while <code>0</code> will pick
  27614. minimum values, and <code>1</code> maximum values.
  27615. </p></dd>
  27616. </dl>
  27617. <a name="Commands-103"></a>
  27618. <h4 class="subsection">32.139.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-103" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-103" aria-hidden="true">TOC</a></span></h4>
  27619. <p>This filter supports same <a href="#commands">commands</a> as options.
  27620. The command accepts the same syntax of the corresponding option.
  27621. </p>
  27622. <p>If the specified expression is not valid, it is kept at its current
  27623. value.
  27624. </p>
  27625. <a name="mergeplanes"></a>
  27626. <h3 class="section">32.140 mergeplanes<span class="pull-right"><a class="anchor hidden-xs" href="#mergeplanes" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mergeplanes" aria-hidden="true">TOC</a></span></h3>
  27627. <p>Merge color channel components from several video streams.
  27628. </p>
  27629. <p>The filter accepts up to 4 input streams, and merge selected input
  27630. planes to the output video.
  27631. </p>
  27632. <p>This filter accepts the following options:
  27633. </p><dl compact="compact">
  27634. <dt><samp>mapping</samp></dt>
  27635. <dd><p>Set input to output plane mapping. Default is <code>0</code>.
  27636. </p>
  27637. <p>The mappings is specified as a bitmap. It should be specified as a
  27638. hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. &rsquo;Aa&rsquo; describes the
  27639. mapping for the first plane of the output stream. &rsquo;A&rsquo; sets the number of
  27640. the input stream to use (from 0 to 3), and &rsquo;a&rsquo; the plane number of the
  27641. corresponding input to use (from 0 to 3). The rest of the mappings is
  27642. similar, &rsquo;Bb&rsquo; describes the mapping for the output stream second
  27643. plane, &rsquo;Cc&rsquo; describes the mapping for the output stream third plane and
  27644. &rsquo;Dd&rsquo; describes the mapping for the output stream fourth plane.
  27645. </p>
  27646. </dd>
  27647. <dt><samp>format</samp></dt>
  27648. <dd><p>Set output pixel format. Default is <code>yuva444p</code>.
  27649. </p></dd>
  27650. </dl>
  27651. <a name="Examples-97"></a>
  27652. <h4 class="subsection">32.140.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-97" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-97" aria-hidden="true">TOC</a></span></h4>
  27653. <ul>
  27654. <li> Merge three gray video streams of same width and height into single video stream:
  27655. <div class="example">
  27656. <pre class="example">[a0][a1][a2]mergeplanes=0x001020:yuv444p
  27657. </pre></div>
  27658. </li><li> Merge 1st yuv444p stream and 2nd gray video stream into yuva444p video stream:
  27659. <div class="example">
  27660. <pre class="example">[a0][a1]mergeplanes=0x00010210:yuva444p
  27661. </pre></div>
  27662. </li><li> Swap Y and A plane in yuva444p stream:
  27663. <div class="example">
  27664. <pre class="example">format=yuva444p,mergeplanes=0x03010200:yuva444p
  27665. </pre></div>
  27666. </li><li> Swap U and V plane in yuv420p stream:
  27667. <div class="example">
  27668. <pre class="example">format=yuv420p,mergeplanes=0x000201:yuv420p
  27669. </pre></div>
  27670. </li><li> Cast a rgb24 clip to yuv444p:
  27671. <div class="example">
  27672. <pre class="example">format=rgb24,mergeplanes=0x000102:yuv444p
  27673. </pre></div>
  27674. </li></ul>
  27675. <a name="mestimate"></a>
  27676. <h3 class="section">32.141 mestimate<span class="pull-right"><a class="anchor hidden-xs" href="#mestimate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mestimate" aria-hidden="true">TOC</a></span></h3>
  27677. <p>Estimate and export motion vectors using block matching algorithms.
  27678. Motion vectors are stored in frame side data to be used by other filters.
  27679. </p>
  27680. <p>This filter accepts the following options:
  27681. </p><dl compact="compact">
  27682. <dt><samp>method</samp></dt>
  27683. <dd><p>Specify the motion estimation method. Accepts one of the following values:
  27684. </p>
  27685. <dl compact="compact">
  27686. <dt>&lsquo;<samp>esa</samp>&rsquo;</dt>
  27687. <dd><p>Exhaustive search algorithm.
  27688. </p></dd>
  27689. <dt>&lsquo;<samp>tss</samp>&rsquo;</dt>
  27690. <dd><p>Three step search algorithm.
  27691. </p></dd>
  27692. <dt>&lsquo;<samp>tdls</samp>&rsquo;</dt>
  27693. <dd><p>Two dimensional logarithmic search algorithm.
  27694. </p></dd>
  27695. <dt>&lsquo;<samp>ntss</samp>&rsquo;</dt>
  27696. <dd><p>New three step search algorithm.
  27697. </p></dd>
  27698. <dt>&lsquo;<samp>fss</samp>&rsquo;</dt>
  27699. <dd><p>Four step search algorithm.
  27700. </p></dd>
  27701. <dt>&lsquo;<samp>ds</samp>&rsquo;</dt>
  27702. <dd><p>Diamond search algorithm.
  27703. </p></dd>
  27704. <dt>&lsquo;<samp>hexbs</samp>&rsquo;</dt>
  27705. <dd><p>Hexagon-based search algorithm.
  27706. </p></dd>
  27707. <dt>&lsquo;<samp>epzs</samp>&rsquo;</dt>
  27708. <dd><p>Enhanced predictive zonal search algorithm.
  27709. </p></dd>
  27710. <dt>&lsquo;<samp>umh</samp>&rsquo;</dt>
  27711. <dd><p>Uneven multi-hexagon search algorithm.
  27712. </p></dd>
  27713. </dl>
  27714. <p>Default value is &lsquo;<samp>esa</samp>&rsquo;.
  27715. </p>
  27716. </dd>
  27717. <dt><samp>mb_size</samp></dt>
  27718. <dd><p>Macroblock size. Default <code>16</code>.
  27719. </p>
  27720. </dd>
  27721. <dt><samp>search_param</samp></dt>
  27722. <dd><p>Search parameter. Default <code>7</code>.
  27723. </p></dd>
  27724. </dl>
  27725. <a name="midequalizer"></a>
  27726. <h3 class="section">32.142 midequalizer<span class="pull-right"><a class="anchor hidden-xs" href="#midequalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-midequalizer" aria-hidden="true">TOC</a></span></h3>
  27727. <p>Apply Midway Image Equalization effect using two video streams.
  27728. </p>
  27729. <p>Midway Image Equalization adjusts a pair of images to have the same
  27730. histogram, while maintaining their dynamics as much as possible. It&rsquo;s
  27731. useful for e.g. matching exposures from a pair of stereo cameras.
  27732. </p>
  27733. <p>This filter has two inputs and one output, which must be of same pixel format, but
  27734. may be of different sizes. The output of filter is first input adjusted with
  27735. midway histogram of both inputs.
  27736. </p>
  27737. <p>This filter accepts the following option:
  27738. </p>
  27739. <dl compact="compact">
  27740. <dt><samp>planes</samp></dt>
  27741. <dd><p>Set which planes to process. Default is <code>15</code>, which is all available planes.
  27742. </p></dd>
  27743. </dl>
  27744. <a name="minterpolate"></a>
  27745. <h3 class="section">32.143 minterpolate<span class="pull-right"><a class="anchor hidden-xs" href="#minterpolate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-minterpolate" aria-hidden="true">TOC</a></span></h3>
  27746. <p>Convert the video to specified frame rate using motion interpolation.
  27747. </p>
  27748. <p>This filter accepts the following options:
  27749. </p><dl compact="compact">
  27750. <dt><samp>fps</samp></dt>
  27751. <dd><p>Specify the output frame rate. This can be rational e.g. <code>60000/1001</code>. Frames are dropped if <var>fps</var> is lower than source fps. Default <code>60</code>.
  27752. </p>
  27753. </dd>
  27754. <dt><samp>mi_mode</samp></dt>
  27755. <dd><p>Motion interpolation mode. Following values are accepted:
  27756. </p><dl compact="compact">
  27757. <dt>&lsquo;<samp>dup</samp>&rsquo;</dt>
  27758. <dd><p>Duplicate previous or next frame for interpolating new ones.
  27759. </p></dd>
  27760. <dt>&lsquo;<samp>blend</samp>&rsquo;</dt>
  27761. <dd><p>Blend source frames. Interpolated frame is mean of previous and next frames.
  27762. </p></dd>
  27763. <dt>&lsquo;<samp>mci</samp>&rsquo;</dt>
  27764. <dd><p>Motion compensated interpolation. Following options are effective when this mode is selected:
  27765. </p>
  27766. <dl compact="compact">
  27767. <dt>&lsquo;<samp>mc_mode</samp>&rsquo;</dt>
  27768. <dd><p>Motion compensation mode. Following values are accepted:
  27769. </p><dl compact="compact">
  27770. <dt>&lsquo;<samp>obmc</samp>&rsquo;</dt>
  27771. <dd><p>Overlapped block motion compensation.
  27772. </p></dd>
  27773. <dt>&lsquo;<samp>aobmc</samp>&rsquo;</dt>
  27774. <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.
  27775. </p></dd>
  27776. </dl>
  27777. <p>Default mode is &lsquo;<samp>obmc</samp>&rsquo;.
  27778. </p>
  27779. </dd>
  27780. <dt>&lsquo;<samp>me_mode</samp>&rsquo;</dt>
  27781. <dd><p>Motion estimation mode. Following values are accepted:
  27782. </p><dl compact="compact">
  27783. <dt>&lsquo;<samp>bidir</samp>&rsquo;</dt>
  27784. <dd><p>Bidirectional motion estimation. Motion vectors are estimated for each source frame in both forward and backward directions.
  27785. </p></dd>
  27786. <dt>&lsquo;<samp>bilat</samp>&rsquo;</dt>
  27787. <dd><p>Bilateral motion estimation. Motion vectors are estimated directly for interpolated frame.
  27788. </p></dd>
  27789. </dl>
  27790. <p>Default mode is &lsquo;<samp>bilat</samp>&rsquo;.
  27791. </p>
  27792. </dd>
  27793. <dt>&lsquo;<samp>me</samp>&rsquo;</dt>
  27794. <dd><p>The algorithm to be used for motion estimation. Following values are accepted:
  27795. </p><dl compact="compact">
  27796. <dt>&lsquo;<samp>esa</samp>&rsquo;</dt>
  27797. <dd><p>Exhaustive search algorithm.
  27798. </p></dd>
  27799. <dt>&lsquo;<samp>tss</samp>&rsquo;</dt>
  27800. <dd><p>Three step search algorithm.
  27801. </p></dd>
  27802. <dt>&lsquo;<samp>tdls</samp>&rsquo;</dt>
  27803. <dd><p>Two dimensional logarithmic search algorithm.
  27804. </p></dd>
  27805. <dt>&lsquo;<samp>ntss</samp>&rsquo;</dt>
  27806. <dd><p>New three step search algorithm.
  27807. </p></dd>
  27808. <dt>&lsquo;<samp>fss</samp>&rsquo;</dt>
  27809. <dd><p>Four step search algorithm.
  27810. </p></dd>
  27811. <dt>&lsquo;<samp>ds</samp>&rsquo;</dt>
  27812. <dd><p>Diamond search algorithm.
  27813. </p></dd>
  27814. <dt>&lsquo;<samp>hexbs</samp>&rsquo;</dt>
  27815. <dd><p>Hexagon-based search algorithm.
  27816. </p></dd>
  27817. <dt>&lsquo;<samp>epzs</samp>&rsquo;</dt>
  27818. <dd><p>Enhanced predictive zonal search algorithm.
  27819. </p></dd>
  27820. <dt>&lsquo;<samp>umh</samp>&rsquo;</dt>
  27821. <dd><p>Uneven multi-hexagon search algorithm.
  27822. </p></dd>
  27823. </dl>
  27824. <p>Default algorithm is &lsquo;<samp>epzs</samp>&rsquo;.
  27825. </p>
  27826. </dd>
  27827. <dt>&lsquo;<samp>mb_size</samp>&rsquo;</dt>
  27828. <dd><p>Macroblock size. Default <code>16</code>.
  27829. </p>
  27830. </dd>
  27831. <dt>&lsquo;<samp>search_param</samp>&rsquo;</dt>
  27832. <dd><p>Motion estimation search parameter. Default <code>32</code>.
  27833. </p>
  27834. </dd>
  27835. <dt>&lsquo;<samp>vsbmc</samp>&rsquo;</dt>
  27836. <dd><p>Enable variable-size block motion compensation. Motion estimation is applied with smaller block sizes at object boundaries in order to make the them less blur. Default is <code>0</code> (disabled).
  27837. </p></dd>
  27838. </dl>
  27839. </dd>
  27840. </dl>
  27841. </dd>
  27842. <dt><samp>scd</samp></dt>
  27843. <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:
  27844. </p><dl compact="compact">
  27845. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  27846. <dd><p>Disable scene change detection.
  27847. </p></dd>
  27848. <dt>&lsquo;<samp>fdiff</samp>&rsquo;</dt>
  27849. <dd><p>Frame difference. Corresponding pixel values are compared and if it satisfies <var>scd_threshold</var> scene change is detected.
  27850. </p></dd>
  27851. </dl>
  27852. <p>Default method is &lsquo;<samp>fdiff</samp>&rsquo;.
  27853. </p>
  27854. </dd>
  27855. <dt><samp>scd_threshold</samp></dt>
  27856. <dd><p>Scene change detection threshold. Default is <code>10.</code>.
  27857. </p></dd>
  27858. </dl>
  27859. <a name="mix"></a>
  27860. <h3 class="section">32.144 mix<span class="pull-right"><a class="anchor hidden-xs" href="#mix" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mix" aria-hidden="true">TOC</a></span></h3>
  27861. <p>Mix several video input streams into one video stream.
  27862. </p>
  27863. <p>A description of the accepted options follows.
  27864. </p>
  27865. <dl compact="compact">
  27866. <dt><samp>nb_inputs</samp></dt>
  27867. <dd><p>The number of inputs. If unspecified, it defaults to 2.
  27868. </p>
  27869. </dd>
  27870. <dt><samp>weights</samp></dt>
  27871. <dd><p>Specify weight of each input video stream as sequence.
  27872. Each weight is separated by space. If number of weights
  27873. is smaller than number of <var>frames</var> last specified
  27874. weight will be used for all remaining unset weights.
  27875. </p>
  27876. </dd>
  27877. <dt><samp>scale</samp></dt>
  27878. <dd><p>Specify scale, if it is set it will be multiplied with sum
  27879. of each weight multiplied with pixel values to give final destination
  27880. pixel value. By default <var>scale</var> is auto scaled to sum of weights.
  27881. </p>
  27882. </dd>
  27883. <dt><samp>duration</samp></dt>
  27884. <dd><p>Specify how end of stream is determined.
  27885. </p><dl compact="compact">
  27886. <dt>&lsquo;<samp>longest</samp>&rsquo;</dt>
  27887. <dd><p>The duration of the longest input. (default)
  27888. </p>
  27889. </dd>
  27890. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  27891. <dd><p>The duration of the shortest input.
  27892. </p>
  27893. </dd>
  27894. <dt>&lsquo;<samp>first</samp>&rsquo;</dt>
  27895. <dd><p>The duration of the first input.
  27896. </p></dd>
  27897. </dl>
  27898. </dd>
  27899. </dl>
  27900. <a name="Commands-104"></a>
  27901. <h4 class="subsection">32.144.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-104" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-104" aria-hidden="true">TOC</a></span></h4>
  27902. <p>This filter supports the following commands:
  27903. </p><dl compact="compact">
  27904. <dt><samp>weights</samp></dt>
  27905. <dt><samp>scale</samp></dt>
  27906. <dd><p>Syntax is same as option with same name.
  27907. </p></dd>
  27908. </dl>
  27909. <a name="monochrome"></a>
  27910. <h3 class="section">32.145 monochrome<span class="pull-right"><a class="anchor hidden-xs" href="#monochrome" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-monochrome" aria-hidden="true">TOC</a></span></h3>
  27911. <p>Convert video to gray using custom color filter.
  27912. </p>
  27913. <p>A description of the accepted options follows.
  27914. </p>
  27915. <dl compact="compact">
  27916. <dt><samp>cb</samp></dt>
  27917. <dd><p>Set the chroma blue spot. Allowed range is from -1 to 1.
  27918. Default value is 0.
  27919. </p>
  27920. </dd>
  27921. <dt><samp>cr</samp></dt>
  27922. <dd><p>Set the chroma red spot. Allowed range is from -1 to 1.
  27923. Default value is 0.
  27924. </p>
  27925. </dd>
  27926. <dt><samp>size</samp></dt>
  27927. <dd><p>Set the color filter size. Allowed range is from .1 to 10.
  27928. Default value is 1.
  27929. </p>
  27930. </dd>
  27931. <dt><samp>high</samp></dt>
  27932. <dd><p>Set the highlights strength. Allowed range is from 0 to 1.
  27933. Default value is 0.
  27934. </p></dd>
  27935. </dl>
  27936. <a name="Commands-105"></a>
  27937. <h4 class="subsection">32.145.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-105" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-105" aria-hidden="true">TOC</a></span></h4>
  27938. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  27939. </p>
  27940. <a name="mpdecimate"></a>
  27941. <h3 class="section">32.146 mpdecimate<span class="pull-right"><a class="anchor hidden-xs" href="#mpdecimate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mpdecimate" aria-hidden="true">TOC</a></span></h3>
  27942. <p>Drop frames that do not differ greatly from the previous frame in
  27943. order to reduce frame rate.
  27944. </p>
  27945. <p>The main use of this filter is for very-low-bitrate encoding
  27946. (e.g. streaming over dialup modem), but it could in theory be used for
  27947. fixing movies that were inverse-telecined incorrectly.
  27948. </p>
  27949. <p>A description of the accepted options follows.
  27950. </p>
  27951. <dl compact="compact">
  27952. <dt><samp>max</samp></dt>
  27953. <dd><p>Set the maximum number of consecutive frames which can be dropped (if
  27954. positive), or the minimum interval between dropped frames (if
  27955. negative). If the value is 0, the frame is dropped disregarding the
  27956. number of previous sequentially dropped frames.
  27957. </p>
  27958. <p>Default value is 0.
  27959. </p>
  27960. </dd>
  27961. <dt><samp>hi</samp></dt>
  27962. <dt><samp>lo</samp></dt>
  27963. <dt><samp>frac</samp></dt>
  27964. <dd><p>Set the dropping threshold values.
  27965. </p>
  27966. <p>Values for <samp>hi</samp> and <samp>lo</samp> are for 8x8 pixel blocks and
  27967. represent actual pixel value differences, so a threshold of 64
  27968. corresponds to 1 unit of difference for each pixel, or the same spread
  27969. out differently over the block.
  27970. </p>
  27971. <p>A frame is a candidate for dropping if no 8x8 blocks differ by more
  27972. than a threshold of <samp>hi</samp>, and if no more than <samp>frac</samp> blocks (1
  27973. meaning the whole image) differ by more than a threshold of <samp>lo</samp>.
  27974. </p>
  27975. <p>Default value for <samp>hi</samp> is 64*12, default value for <samp>lo</samp> is
  27976. 64*5, and default value for <samp>frac</samp> is 0.33.
  27977. </p></dd>
  27978. </dl>
  27979. <a name="msad"></a>
  27980. <h3 class="section">32.147 msad<span class="pull-right"><a class="anchor hidden-xs" href="#msad" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-msad" aria-hidden="true">TOC</a></span></h3>
  27981. <p>Obtain the MSAD (Mean Sum of Absolute Differences) between two input videos.
  27982. </p>
  27983. <p>This filter takes two input videos.
  27984. </p>
  27985. <p>Both input videos must have the same resolution and pixel format for
  27986. this filter to work correctly. Also it assumes that both inputs
  27987. have the same number of frames, which are compared one by one.
  27988. </p>
  27989. <p>The obtained per component, average, min and max MSAD is printed through
  27990. the logging system.
  27991. </p>
  27992. <p>The filter stores the calculated MSAD of each frame in frame metadata.
  27993. </p>
  27994. <p>In the below example the input file <samp>main.mpg</samp> being processed is compared
  27995. with the reference file <samp>ref.mpg</samp>.
  27996. </p>
  27997. <div class="example">
  27998. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi msad -f null -
  27999. </pre></div>
  28000. <a name="negate"></a>
  28001. <h3 class="section">32.148 negate<span class="pull-right"><a class="anchor hidden-xs" href="#negate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-negate" aria-hidden="true">TOC</a></span></h3>
  28002. <p>Negate (invert) the input video.
  28003. </p>
  28004. <p>It accepts the following option:
  28005. </p>
  28006. <dl compact="compact">
  28007. <dt><samp>negate_alpha</samp></dt>
  28008. <dd><p>With value 1, it negates the alpha component, if present. Default value is 0.
  28009. </p></dd>
  28010. </dl>
  28011. <a name="Commands-106"></a>
  28012. <h4 class="subsection">32.148.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-106" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-106" aria-hidden="true">TOC</a></span></h4>
  28013. <p>This filter supports same <a href="#commands">commands</a> as options.
  28014. </p>
  28015. <span id="nlmeans"></span><a name="nlmeans-1"></a>
  28016. <h3 class="section">32.149 nlmeans<span class="pull-right"><a class="anchor hidden-xs" href="#nlmeans-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-nlmeans-1" aria-hidden="true">TOC</a></span></h3>
  28017. <p>Denoise frames using Non-Local Means algorithm.
  28018. </p>
  28019. <p>Each pixel is adjusted by looking for other pixels with similar contexts. This
  28020. context similarity is defined by comparing their surrounding patches of size
  28021. <samp>p</samp>x<samp>p</samp>. Patches are searched in an area of <samp>r</samp>x<samp>r</samp>
  28022. around the pixel.
  28023. </p>
  28024. <p>Note that the research area defines centers for patches, which means some
  28025. patches will be made of pixels outside that research area.
  28026. </p>
  28027. <p>The filter accepts the following options.
  28028. </p>
  28029. <dl compact="compact">
  28030. <dt><samp>s</samp></dt>
  28031. <dd><p>Set denoising strength. Default is 1.0. Must be in range [1.0, 30.0].
  28032. </p>
  28033. </dd>
  28034. <dt><samp>p</samp></dt>
  28035. <dd><p>Set patch size. Default is 7. Must be odd number in range [0, 99].
  28036. </p>
  28037. </dd>
  28038. <dt><samp>pc</samp></dt>
  28039. <dd><p>Same as <samp>p</samp> but for chroma planes.
  28040. </p>
  28041. <p>The default value is <var>0</var> and means automatic.
  28042. </p>
  28043. </dd>
  28044. <dt><samp>r</samp></dt>
  28045. <dd><p>Set research size. Default is 15. Must be odd number in range [0, 99].
  28046. </p>
  28047. </dd>
  28048. <dt><samp>rc</samp></dt>
  28049. <dd><p>Same as <samp>r</samp> but for chroma planes.
  28050. </p>
  28051. <p>The default value is <var>0</var> and means automatic.
  28052. </p></dd>
  28053. </dl>
  28054. <a name="nnedi"></a>
  28055. <h3 class="section">32.150 nnedi<span class="pull-right"><a class="anchor hidden-xs" href="#nnedi" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-nnedi" aria-hidden="true">TOC</a></span></h3>
  28056. <p>Deinterlace video using neural network edge directed interpolation.
  28057. </p>
  28058. <p>This filter accepts the following options:
  28059. </p>
  28060. <dl compact="compact">
  28061. <dt><samp>weights</samp></dt>
  28062. <dd><p>Mandatory option, without binary file filter can not work.
  28063. Currently file can be found here:
  28064. https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
  28065. </p>
  28066. </dd>
  28067. <dt><samp>deint</samp></dt>
  28068. <dd><p>Set which frames to deinterlace, by default it is <code>all</code>.
  28069. Can be <code>all</code> or <code>interlaced</code>.
  28070. </p>
  28071. </dd>
  28072. <dt><samp>field</samp></dt>
  28073. <dd><p>Set mode of operation.
  28074. </p>
  28075. <p>Can be one of the following:
  28076. </p>
  28077. <dl compact="compact">
  28078. <dt>&lsquo;<samp>af</samp>&rsquo;</dt>
  28079. <dd><p>Use frame flags, both fields.
  28080. </p></dd>
  28081. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  28082. <dd><p>Use frame flags, single field.
  28083. </p></dd>
  28084. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  28085. <dd><p>Use top field only.
  28086. </p></dd>
  28087. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  28088. <dd><p>Use bottom field only.
  28089. </p></dd>
  28090. <dt>&lsquo;<samp>tf</samp>&rsquo;</dt>
  28091. <dd><p>Use both fields, top first.
  28092. </p></dd>
  28093. <dt>&lsquo;<samp>bf</samp>&rsquo;</dt>
  28094. <dd><p>Use both fields, bottom first.
  28095. </p></dd>
  28096. </dl>
  28097. </dd>
  28098. <dt><samp>planes</samp></dt>
  28099. <dd><p>Set which planes to process, by default filter process all frames.
  28100. </p>
  28101. </dd>
  28102. <dt><samp>nsize</samp></dt>
  28103. <dd><p>Set size of local neighborhood around each pixel, used by the predictor neural
  28104. network.
  28105. </p>
  28106. <p>Can be one of the following:
  28107. </p>
  28108. <dl compact="compact">
  28109. <dt>&lsquo;<samp>s8x6</samp>&rsquo;</dt>
  28110. <dt>&lsquo;<samp>s16x6</samp>&rsquo;</dt>
  28111. <dt>&lsquo;<samp>s32x6</samp>&rsquo;</dt>
  28112. <dt>&lsquo;<samp>s48x6</samp>&rsquo;</dt>
  28113. <dt>&lsquo;<samp>s8x4</samp>&rsquo;</dt>
  28114. <dt>&lsquo;<samp>s16x4</samp>&rsquo;</dt>
  28115. <dt>&lsquo;<samp>s32x4</samp>&rsquo;</dt>
  28116. </dl>
  28117. </dd>
  28118. <dt><samp>nns</samp></dt>
  28119. <dd><p>Set the number of neurons in predictor neural network.
  28120. Can be one of the following:
  28121. </p>
  28122. <dl compact="compact">
  28123. <dt>&lsquo;<samp>n16</samp>&rsquo;</dt>
  28124. <dt>&lsquo;<samp>n32</samp>&rsquo;</dt>
  28125. <dt>&lsquo;<samp>n64</samp>&rsquo;</dt>
  28126. <dt>&lsquo;<samp>n128</samp>&rsquo;</dt>
  28127. <dt>&lsquo;<samp>n256</samp>&rsquo;</dt>
  28128. </dl>
  28129. </dd>
  28130. <dt><samp>qual</samp></dt>
  28131. <dd><p>Controls the number of different neural network predictions that are blended
  28132. together to compute the final output value. Can be <code>fast</code>, default or
  28133. <code>slow</code>.
  28134. </p>
  28135. </dd>
  28136. <dt><samp>etype</samp></dt>
  28137. <dd><p>Set which set of weights to use in the predictor.
  28138. Can be one of the following:
  28139. </p>
  28140. <dl compact="compact">
  28141. <dt>&lsquo;<samp>a, abs</samp>&rsquo;</dt>
  28142. <dd><p>weights trained to minimize absolute error
  28143. </p></dd>
  28144. <dt>&lsquo;<samp>s, mse</samp>&rsquo;</dt>
  28145. <dd><p>weights trained to minimize squared error
  28146. </p></dd>
  28147. </dl>
  28148. </dd>
  28149. <dt><samp>pscrn</samp></dt>
  28150. <dd><p>Controls whether or not the prescreener neural network is used to decide
  28151. which pixels should be processed by the predictor neural network and which
  28152. can be handled by simple cubic interpolation.
  28153. The prescreener is trained to know whether cubic interpolation will be
  28154. sufficient for a pixel or whether it should be predicted by the predictor nn.
  28155. The computational complexity of the prescreener nn is much less than that of
  28156. the predictor nn. Since most pixels can be handled by cubic interpolation,
  28157. using the prescreener generally results in much faster processing.
  28158. The prescreener is pretty accurate, so the difference between using it and not
  28159. using it is almost always unnoticeable.
  28160. </p>
  28161. <p>Can be one of the following:
  28162. </p>
  28163. <dl compact="compact">
  28164. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  28165. <dt>&lsquo;<samp>original</samp>&rsquo;</dt>
  28166. <dt>&lsquo;<samp>new</samp>&rsquo;</dt>
  28167. <dt>&lsquo;<samp>new2</samp>&rsquo;</dt>
  28168. <dt>&lsquo;<samp>new3</samp>&rsquo;</dt>
  28169. </dl>
  28170. <p>Default is <code>new</code>.
  28171. </p></dd>
  28172. </dl>
  28173. <a name="Commands-107"></a>
  28174. <h4 class="subsection">32.150.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-107" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-107" aria-hidden="true">TOC</a></span></h4>
  28175. <p>This filter supports same <a href="#commands">commands</a> as options, excluding <var>weights</var> option.
  28176. </p>
  28177. <a name="noformat"></a>
  28178. <h3 class="section">32.151 noformat<span class="pull-right"><a class="anchor hidden-xs" href="#noformat" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-noformat" aria-hidden="true">TOC</a></span></h3>
  28179. <p>Force libavfilter not to use any of the specified pixel formats for the
  28180. input to the next filter.
  28181. </p>
  28182. <p>It accepts the following parameters:
  28183. </p><dl compact="compact">
  28184. <dt><samp>pix_fmts</samp></dt>
  28185. <dd><p>A &rsquo;|&rsquo;-separated list of pixel format names, such as
  28186. pix_fmts=yuv420p|monow|rgb24&quot;.
  28187. </p>
  28188. </dd>
  28189. </dl>
  28190. <a name="Examples-98"></a>
  28191. <h4 class="subsection">32.151.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-98" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-98" aria-hidden="true">TOC</a></span></h4>
  28192. <ul>
  28193. <li> Force libavfilter to use a format different from <var>yuv420p</var> for the
  28194. input to the vflip filter:
  28195. <div class="example">
  28196. <pre class="example">noformat=pix_fmts=yuv420p,vflip
  28197. </pre></div>
  28198. </li><li> Convert the input video to any of the formats not contained in the list:
  28199. <div class="example">
  28200. <pre class="example">noformat=yuv420p|yuv444p|yuv410p
  28201. </pre></div>
  28202. </li></ul>
  28203. <a name="noise-1"></a>
  28204. <h3 class="section">32.152 noise<span class="pull-right"><a class="anchor hidden-xs" href="#noise-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-noise-1" aria-hidden="true">TOC</a></span></h3>
  28205. <p>Add noise on video input frame.
  28206. </p>
  28207. <p>The filter accepts the following options:
  28208. </p>
  28209. <dl compact="compact">
  28210. <dt><samp>all_seed</samp></dt>
  28211. <dt><samp>c0_seed</samp></dt>
  28212. <dt><samp>c1_seed</samp></dt>
  28213. <dt><samp>c2_seed</samp></dt>
  28214. <dt><samp>c3_seed</samp></dt>
  28215. <dd><p>Set noise seed for specific pixel component or all pixel components in case
  28216. of <var>all_seed</var>. Default value is <code>123457</code>.
  28217. </p>
  28218. </dd>
  28219. <dt><samp>all_strength, alls</samp></dt>
  28220. <dt><samp>c0_strength, c0s</samp></dt>
  28221. <dt><samp>c1_strength, c1s</samp></dt>
  28222. <dt><samp>c2_strength, c2s</samp></dt>
  28223. <dt><samp>c3_strength, c3s</samp></dt>
  28224. <dd><p>Set noise strength for specific pixel component or all pixel components in case
  28225. <var>all_strength</var>. Default value is <code>0</code>. Allowed range is [0, 100].
  28226. </p>
  28227. </dd>
  28228. <dt><samp>all_flags, allf</samp></dt>
  28229. <dt><samp>c0_flags, c0f</samp></dt>
  28230. <dt><samp>c1_flags, c1f</samp></dt>
  28231. <dt><samp>c2_flags, c2f</samp></dt>
  28232. <dt><samp>c3_flags, c3f</samp></dt>
  28233. <dd><p>Set pixel component flags or set flags for all components if <var>all_flags</var>.
  28234. Available values for component flags are:
  28235. </p><dl compact="compact">
  28236. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  28237. <dd><p>averaged temporal noise (smoother)
  28238. </p></dd>
  28239. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  28240. <dd><p>mix random noise with a (semi)regular pattern
  28241. </p></dd>
  28242. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  28243. <dd><p>temporal noise (noise pattern changes between frames)
  28244. </p></dd>
  28245. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  28246. <dd><p>uniform noise (gaussian otherwise)
  28247. </p></dd>
  28248. </dl>
  28249. </dd>
  28250. </dl>
  28251. <a name="Examples-99"></a>
  28252. <h4 class="subsection">32.152.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-99" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-99" aria-hidden="true">TOC</a></span></h4>
  28253. <p>Add temporal and uniform noise to input video:
  28254. </p><div class="example">
  28255. <pre class="example">noise=alls=20:allf=t+u
  28256. </pre></div>
  28257. <a name="normalize"></a>
  28258. <h3 class="section">32.153 normalize<span class="pull-right"><a class="anchor hidden-xs" href="#normalize" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-normalize" aria-hidden="true">TOC</a></span></h3>
  28259. <p>Normalize RGB video (aka histogram stretching, contrast stretching).
  28260. See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
  28261. </p>
  28262. <p>For each channel of each frame, the filter computes the input range and maps
  28263. it linearly to the user-specified output range. The output range defaults
  28264. to the full dynamic range from pure black to pure white.
  28265. </p>
  28266. <p>Temporal smoothing can be used on the input range to reduce flickering (rapid
  28267. changes in brightness) caused when small dark or bright objects enter or leave
  28268. the scene. This is similar to the auto-exposure (automatic gain control) on a
  28269. video camera, and, like a video camera, it may cause a period of over- or
  28270. under-exposure of the video.
  28271. </p>
  28272. <p>The R,G,B channels can be normalized independently, which may cause some
  28273. color shifting, or linked together as a single channel, which prevents
  28274. color shifting. Linked normalization preserves hue. Independent normalization
  28275. does not, so it can be used to remove some color casts. Independent and linked
  28276. normalization can be combined in any ratio.
  28277. </p>
  28278. <p>The normalize filter accepts the following options:
  28279. </p>
  28280. <dl compact="compact">
  28281. <dt><samp>blackpt</samp></dt>
  28282. <dt><samp>whitept</samp></dt>
  28283. <dd><p>Colors which define the output range. The minimum input value is mapped to
  28284. the <var>blackpt</var>. The maximum input value is mapped to the <var>whitept</var>.
  28285. The defaults are black and white respectively. Specifying white for
  28286. <var>blackpt</var> and black for <var>whitept</var> will give color-inverted,
  28287. normalized video. Shades of grey can be used to reduce the dynamic range
  28288. (contrast). Specifying saturated colors here can create some interesting
  28289. effects.
  28290. </p>
  28291. </dd>
  28292. <dt><samp>smoothing</samp></dt>
  28293. <dd><p>The number of previous frames to use for temporal smoothing. The input range
  28294. of each channel is smoothed using a rolling average over the current frame
  28295. and the <var>smoothing</var> previous frames. The default is 0 (no temporal
  28296. smoothing).
  28297. </p>
  28298. </dd>
  28299. <dt><samp>independence</samp></dt>
  28300. <dd><p>Controls the ratio of independent (color shifting) channel normalization to
  28301. linked (color preserving) normalization. 0.0 is fully linked, 1.0 is fully
  28302. independent. Defaults to 1.0 (fully independent).
  28303. </p>
  28304. </dd>
  28305. <dt><samp>strength</samp></dt>
  28306. <dd><p>Overall strength of the filter. 1.0 is full strength. 0.0 is a rather
  28307. expensive no-op. Defaults to 1.0 (full strength).
  28308. </p>
  28309. </dd>
  28310. </dl>
  28311. <a name="Commands-108"></a>
  28312. <h4 class="subsection">32.153.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-108" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-108" aria-hidden="true">TOC</a></span></h4>
  28313. <p>This filter supports same <a href="#commands">commands</a> as options, excluding <var>smoothing</var> option.
  28314. The command accepts the same syntax of the corresponding option.
  28315. </p>
  28316. <p>If the specified expression is not valid, it is kept at its current
  28317. value.
  28318. </p>
  28319. <a name="Examples-100"></a>
  28320. <h4 class="subsection">32.153.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-100" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-100" aria-hidden="true">TOC</a></span></h4>
  28321. <p>Stretch video contrast to use the full dynamic range, with no temporal
  28322. smoothing; may flicker depending on the source content:
  28323. </p><div class="example">
  28324. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=0
  28325. </pre></div>
  28326. <p>As above, but with 50 frames of temporal smoothing; flicker should be
  28327. reduced, depending on the source content:
  28328. </p><div class="example">
  28329. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=50
  28330. </pre></div>
  28331. <p>As above, but with hue-preserving linked channel normalization:
  28332. </p><div class="example">
  28333. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=50:independence=0
  28334. </pre></div>
  28335. <p>As above, but with half strength:
  28336. </p><div class="example">
  28337. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
  28338. </pre></div>
  28339. <p>Map the darkest input color to red, the brightest input color to cyan:
  28340. </p><div class="example">
  28341. <pre class="example">normalize=blackpt=red:whitept=cyan
  28342. </pre></div>
  28343. <a name="null-1"></a>
  28344. <h3 class="section">32.154 null<span class="pull-right"><a class="anchor hidden-xs" href="#null-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-null-1" aria-hidden="true">TOC</a></span></h3>
  28345. <p>Pass the video source unchanged to the output.
  28346. </p>
  28347. <a name="ocr"></a>
  28348. <h3 class="section">32.155 ocr<span class="pull-right"><a class="anchor hidden-xs" href="#ocr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ocr" aria-hidden="true">TOC</a></span></h3>
  28349. <p>Optical Character Recognition
  28350. </p>
  28351. <p>This filter uses Tesseract for optical character recognition. To enable
  28352. compilation of this filter, you need to configure FFmpeg with
  28353. <code>--enable-libtesseract</code>.
  28354. </p>
  28355. <p>It accepts the following options:
  28356. </p>
  28357. <dl compact="compact">
  28358. <dt><samp>datapath</samp></dt>
  28359. <dd><p>Set datapath to tesseract data. Default is to use whatever was
  28360. set at installation.
  28361. </p>
  28362. </dd>
  28363. <dt><samp>language</samp></dt>
  28364. <dd><p>Set language, default is &quot;eng&quot;.
  28365. </p>
  28366. </dd>
  28367. <dt><samp>whitelist</samp></dt>
  28368. <dd><p>Set character whitelist.
  28369. </p>
  28370. </dd>
  28371. <dt><samp>blacklist</samp></dt>
  28372. <dd><p>Set character blacklist.
  28373. </p></dd>
  28374. </dl>
  28375. <p>The filter exports recognized text as the frame metadata <code>lavfi.ocr.text</code>.
  28376. The filter exports confidence of recognized words as the frame metadata <code>lavfi.ocr.confidence</code>.
  28377. </p>
  28378. <a name="ocv"></a>
  28379. <h3 class="section">32.156 ocv<span class="pull-right"><a class="anchor hidden-xs" href="#ocv" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ocv" aria-hidden="true">TOC</a></span></h3>
  28380. <p>Apply a video transform using libopencv.
  28381. </p>
  28382. <p>To enable this filter, install the libopencv library and headers and
  28383. configure FFmpeg with <code>--enable-libopencv</code>.
  28384. </p>
  28385. <p>It accepts the following parameters:
  28386. </p>
  28387. <dl compact="compact">
  28388. <dt><samp>filter_name</samp></dt>
  28389. <dd><p>The name of the libopencv filter to apply.
  28390. </p>
  28391. </dd>
  28392. <dt><samp>filter_params</samp></dt>
  28393. <dd><p>The parameters to pass to the libopencv filter. If not specified, the default
  28394. values are assumed.
  28395. </p>
  28396. </dd>
  28397. </dl>
  28398. <p>Refer to the official libopencv documentation for more precise
  28399. information:
  28400. <a href="http://docs.opencv.org/master/modules/imgproc/doc/filtering.html">http://docs.opencv.org/master/modules/imgproc/doc/filtering.html</a>
  28401. </p>
  28402. <p>Several libopencv filters are supported; see the following subsections.
  28403. </p>
  28404. <span id="dilate"></span><a name="dilate-1"></a>
  28405. <h4 class="subsection">32.156.1 dilate<span class="pull-right"><a class="anchor hidden-xs" href="#dilate-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dilate-1" aria-hidden="true">TOC</a></span></h4>
  28406. <p>Dilate an image by using a specific structuring element.
  28407. It corresponds to the libopencv function <code>cvDilate</code>.
  28408. </p>
  28409. <p>It accepts the parameters: <var>struct_el</var>|<var>nb_iterations</var>.
  28410. </p>
  28411. <p><var>struct_el</var> represents a structuring element, and has the syntax:
  28412. <var>cols</var>x<var>rows</var>+<var>anchor_x</var>x<var>anchor_y</var>/<var>shape</var>
  28413. </p>
  28414. <p><var>cols</var> and <var>rows</var> represent the number of columns and rows of
  28415. the structuring element, <var>anchor_x</var> and <var>anchor_y</var> the anchor
  28416. point, and <var>shape</var> the shape for the structuring element. <var>shape</var>
  28417. must be &quot;rect&quot;, &quot;cross&quot;, &quot;ellipse&quot;, or &quot;custom&quot;.
  28418. </p>
  28419. <p>If the value for <var>shape</var> is &quot;custom&quot;, it must be followed by a
  28420. string of the form &quot;=<var>filename</var>&quot;. The file with name
  28421. <var>filename</var> is assumed to represent a binary image, with each
  28422. printable character corresponding to a bright pixel. When a custom
  28423. <var>shape</var> is used, <var>cols</var> and <var>rows</var> are ignored, the number
  28424. or columns and rows of the read file are assumed instead.
  28425. </p>
  28426. <p>The default value for <var>struct_el</var> is &quot;3x3+0x0/rect&quot;.
  28427. </p>
  28428. <p><var>nb_iterations</var> specifies the number of times the transform is
  28429. applied to the image, and defaults to 1.
  28430. </p>
  28431. <p>Some examples:
  28432. </p><div class="example">
  28433. <pre class="example"># Use the default values
  28434. ocv=dilate
  28435. # Dilate using a structuring element with a 5x5 cross, iterating two times
  28436. ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
  28437. # Read the shape from the file diamond.shape, iterating two times.
  28438. # The file diamond.shape may contain a pattern of characters like this
  28439. # *
  28440. # ***
  28441. # *****
  28442. # ***
  28443. # *
  28444. # The specified columns and rows are ignored
  28445. # but the anchor point coordinates are not
  28446. ocv=dilate:0x0+2x2/custom=diamond.shape|2
  28447. </pre></div>
  28448. <a name="erode"></a>
  28449. <h4 class="subsection">32.156.2 erode<span class="pull-right"><a class="anchor hidden-xs" href="#erode" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-erode" aria-hidden="true">TOC</a></span></h4>
  28450. <p>Erode an image by using a specific structuring element.
  28451. It corresponds to the libopencv function <code>cvErode</code>.
  28452. </p>
  28453. <p>It accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>,
  28454. with the same syntax and semantics as the <a href="#dilate">dilate</a> filter.
  28455. </p>
  28456. <a name="smooth"></a>
  28457. <h4 class="subsection">32.156.3 smooth<span class="pull-right"><a class="anchor hidden-xs" href="#smooth" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-smooth" aria-hidden="true">TOC</a></span></h4>
  28458. <p>Smooth the input video.
  28459. </p>
  28460. <p>The filter takes the following parameters:
  28461. <var>type</var>|<var>param1</var>|<var>param2</var>|<var>param3</var>|<var>param4</var>.
  28462. </p>
  28463. <p><var>type</var> is the type of smooth filter to apply, and must be one of
  28464. the following values: &quot;blur&quot;, &quot;blur_no_scale&quot;, &quot;median&quot;, &quot;gaussian&quot;,
  28465. or &quot;bilateral&quot;. The default value is &quot;gaussian&quot;.
  28466. </p>
  28467. <p>The meaning of <var>param1</var>, <var>param2</var>, <var>param3</var>, and <var>param4</var>
  28468. depends on the smooth type. <var>param1</var> and
  28469. <var>param2</var> accept integer positive values or 0. <var>param3</var> and
  28470. <var>param4</var> accept floating point values.
  28471. </p>
  28472. <p>The default value for <var>param1</var> is 3. The default value for the
  28473. other parameters is 0.
  28474. </p>
  28475. <p>These parameters correspond to the parameters assigned to the
  28476. libopencv function <code>cvSmooth</code>.
  28477. </p>
  28478. <a name="oscilloscope"></a>
  28479. <h3 class="section">32.157 oscilloscope<span class="pull-right"><a class="anchor hidden-xs" href="#oscilloscope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-oscilloscope" aria-hidden="true">TOC</a></span></h3>
  28480. <p>2D Video Oscilloscope.
  28481. </p>
  28482. <p>Useful to measure spatial impulse, step responses, chroma delays, etc.
  28483. </p>
  28484. <p>It accepts the following parameters:
  28485. </p>
  28486. <dl compact="compact">
  28487. <dt><samp>x</samp></dt>
  28488. <dd><p>Set scope center x position.
  28489. </p>
  28490. </dd>
  28491. <dt><samp>y</samp></dt>
  28492. <dd><p>Set scope center y position.
  28493. </p>
  28494. </dd>
  28495. <dt><samp>s</samp></dt>
  28496. <dd><p>Set scope size, relative to frame diagonal.
  28497. </p>
  28498. </dd>
  28499. <dt><samp>t</samp></dt>
  28500. <dd><p>Set scope tilt/rotation.
  28501. </p>
  28502. </dd>
  28503. <dt><samp>o</samp></dt>
  28504. <dd><p>Set trace opacity.
  28505. </p>
  28506. </dd>
  28507. <dt><samp>tx</samp></dt>
  28508. <dd><p>Set trace center x position.
  28509. </p>
  28510. </dd>
  28511. <dt><samp>ty</samp></dt>
  28512. <dd><p>Set trace center y position.
  28513. </p>
  28514. </dd>
  28515. <dt><samp>tw</samp></dt>
  28516. <dd><p>Set trace width, relative to width of frame.
  28517. </p>
  28518. </dd>
  28519. <dt><samp>th</samp></dt>
  28520. <dd><p>Set trace height, relative to height of frame.
  28521. </p>
  28522. </dd>
  28523. <dt><samp>c</samp></dt>
  28524. <dd><p>Set which components to trace. By default it traces first three components.
  28525. </p>
  28526. </dd>
  28527. <dt><samp>g</samp></dt>
  28528. <dd><p>Draw trace grid. By default is enabled.
  28529. </p>
  28530. </dd>
  28531. <dt><samp>st</samp></dt>
  28532. <dd><p>Draw some statistics. By default is enabled.
  28533. </p>
  28534. </dd>
  28535. <dt><samp>sc</samp></dt>
  28536. <dd><p>Draw scope. By default is enabled.
  28537. </p></dd>
  28538. </dl>
  28539. <a name="Commands-109"></a>
  28540. <h4 class="subsection">32.157.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-109" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-109" aria-hidden="true">TOC</a></span></h4>
  28541. <p>This filter supports same <a href="#commands">commands</a> as options.
  28542. The command accepts the same syntax of the corresponding option.
  28543. </p>
  28544. <p>If the specified expression is not valid, it is kept at its current
  28545. value.
  28546. </p>
  28547. <a name="Examples-101"></a>
  28548. <h4 class="subsection">32.157.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-101" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-101" aria-hidden="true">TOC</a></span></h4>
  28549. <ul>
  28550. <li> Inspect full first row of video frame.
  28551. <div class="example">
  28552. <pre class="example">oscilloscope=x=0.5:y=0:s=1
  28553. </pre></div>
  28554. </li><li> Inspect full last row of video frame.
  28555. <div class="example">
  28556. <pre class="example">oscilloscope=x=0.5:y=1:s=1
  28557. </pre></div>
  28558. </li><li> Inspect full 5th line of video frame of height 1080.
  28559. <div class="example">
  28560. <pre class="example">oscilloscope=x=0.5:y=5/1080:s=1
  28561. </pre></div>
  28562. </li><li> Inspect full last column of video frame.
  28563. <div class="example">
  28564. <pre class="example">oscilloscope=x=1:y=0.5:s=1:t=1
  28565. </pre></div>
  28566. </li></ul>
  28567. <span id="overlay"></span><a name="overlay-1"></a>
  28568. <h3 class="section">32.158 overlay<span class="pull-right"><a class="anchor hidden-xs" href="#overlay-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-overlay-1" aria-hidden="true">TOC</a></span></h3>
  28569. <p>Overlay one video on top of another.
  28570. </p>
  28571. <p>It takes two inputs and has one output. The first input is the &quot;main&quot;
  28572. video on which the second input is overlaid.
  28573. </p>
  28574. <p>It accepts the following parameters:
  28575. </p>
  28576. <p>A description of the accepted options follows.
  28577. </p>
  28578. <dl compact="compact">
  28579. <dt><samp>x</samp></dt>
  28580. <dt><samp>y</samp></dt>
  28581. <dd><p>Set the expression for the x and y coordinates of the overlaid video
  28582. on the main video. Default value is &quot;0&quot; for both expressions. In case
  28583. the expression is invalid, it is set to a huge value (meaning that the
  28584. overlay will not be displayed within the output visible area).
  28585. </p>
  28586. </dd>
  28587. <dt><samp>eof_action</samp></dt>
  28588. <dd><p>See <a href="#framesync">framesync</a>.
  28589. </p>
  28590. </dd>
  28591. <dt><samp>eval</samp></dt>
  28592. <dd><p>Set when the expressions for <samp>x</samp>, and <samp>y</samp> are evaluated.
  28593. </p>
  28594. <p>It accepts the following values:
  28595. </p><dl compact="compact">
  28596. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  28597. <dd><p>only evaluate expressions once during the filter initialization or
  28598. when a command is processed
  28599. </p>
  28600. </dd>
  28601. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  28602. <dd><p>evaluate expressions for each incoming frame
  28603. </p></dd>
  28604. </dl>
  28605. <p>Default value is &lsquo;<samp>frame</samp>&rsquo;.
  28606. </p>
  28607. </dd>
  28608. <dt><samp>shortest</samp></dt>
  28609. <dd><p>See <a href="#framesync">framesync</a>.
  28610. </p>
  28611. </dd>
  28612. <dt><samp>format</samp></dt>
  28613. <dd><p>Set the format for the output video.
  28614. </p>
  28615. <p>It accepts the following values:
  28616. </p><dl compact="compact">
  28617. <dt>&lsquo;<samp>yuv420</samp>&rsquo;</dt>
  28618. <dd><p>force YUV420 output
  28619. </p>
  28620. </dd>
  28621. <dt>&lsquo;<samp>yuv420p10</samp>&rsquo;</dt>
  28622. <dd><p>force YUV420p10 output
  28623. </p>
  28624. </dd>
  28625. <dt>&lsquo;<samp>yuv422</samp>&rsquo;</dt>
  28626. <dd><p>force YUV422 output
  28627. </p>
  28628. </dd>
  28629. <dt>&lsquo;<samp>yuv422p10</samp>&rsquo;</dt>
  28630. <dd><p>force YUV422p10 output
  28631. </p>
  28632. </dd>
  28633. <dt>&lsquo;<samp>yuv444</samp>&rsquo;</dt>
  28634. <dd><p>force YUV444 output
  28635. </p>
  28636. </dd>
  28637. <dt>&lsquo;<samp>rgb</samp>&rsquo;</dt>
  28638. <dd><p>force packed RGB output
  28639. </p>
  28640. </dd>
  28641. <dt>&lsquo;<samp>gbrp</samp>&rsquo;</dt>
  28642. <dd><p>force planar RGB output
  28643. </p>
  28644. </dd>
  28645. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  28646. <dd><p>automatically pick format
  28647. </p></dd>
  28648. </dl>
  28649. <p>Default value is &lsquo;<samp>yuv420</samp>&rsquo;.
  28650. </p>
  28651. </dd>
  28652. <dt><samp>repeatlast</samp></dt>
  28653. <dd><p>See <a href="#framesync">framesync</a>.
  28654. </p>
  28655. </dd>
  28656. <dt><samp>alpha</samp></dt>
  28657. <dd><p>Set format of alpha of the overlaid video, it can be <var>straight</var> or
  28658. <var>premultiplied</var>. Default is <var>straight</var>.
  28659. </p></dd>
  28660. </dl>
  28661. <p>The <samp>x</samp>, and <samp>y</samp> expressions can contain the following
  28662. parameters.
  28663. </p>
  28664. <dl compact="compact">
  28665. <dt><samp>main_w, W</samp></dt>
  28666. <dt><samp>main_h, H</samp></dt>
  28667. <dd><p>The main input width and height.
  28668. </p>
  28669. </dd>
  28670. <dt><samp>overlay_w, w</samp></dt>
  28671. <dt><samp>overlay_h, h</samp></dt>
  28672. <dd><p>The overlay input width and height.
  28673. </p>
  28674. </dd>
  28675. <dt><samp>x</samp></dt>
  28676. <dt><samp>y</samp></dt>
  28677. <dd><p>The computed values for <var>x</var> and <var>y</var>. They are evaluated for
  28678. each new frame.
  28679. </p>
  28680. </dd>
  28681. <dt><samp>hsub</samp></dt>
  28682. <dt><samp>vsub</samp></dt>
  28683. <dd><p>horizontal and vertical chroma subsample values of the output
  28684. format. For example for the pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and
  28685. <var>vsub</var> is 1.
  28686. </p>
  28687. </dd>
  28688. <dt><samp>n</samp></dt>
  28689. <dd><p>the number of input frame, starting from 0
  28690. </p>
  28691. </dd>
  28692. <dt><samp>pos</samp></dt>
  28693. <dd><p>the position in the file of the input frame, NAN if unknown
  28694. </p>
  28695. </dd>
  28696. <dt><samp>t</samp></dt>
  28697. <dd><p>The timestamp, expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  28698. </p>
  28699. </dd>
  28700. </dl>
  28701. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  28702. </p>
  28703. <p>Note that the <var>n</var>, <var>pos</var>, <var>t</var> variables are available only
  28704. when evaluation is done <em>per frame</em>, and will evaluate to NAN
  28705. when <samp>eval</samp> is set to &lsquo;<samp>init</samp>&rsquo;.
  28706. </p>
  28707. <p>Be aware that frames are taken from each input video in timestamp
  28708. order, hence, if their initial timestamps differ, it is a good idea
  28709. to pass the two inputs through a <var>setpts=PTS-STARTPTS</var> filter to
  28710. have them begin in the same zero timestamp, as the example for
  28711. the <var>movie</var> filter does.
  28712. </p>
  28713. <p>You can chain together more overlays but you should test the
  28714. efficiency of such approach.
  28715. </p>
  28716. <a name="Commands-110"></a>
  28717. <h4 class="subsection">32.158.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-110" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-110" aria-hidden="true">TOC</a></span></h4>
  28718. <p>This filter supports the following commands:
  28719. </p><dl compact="compact">
  28720. <dt><samp>x</samp></dt>
  28721. <dt><samp>y</samp></dt>
  28722. <dd><p>Modify the x and y of the overlay input.
  28723. The command accepts the same syntax of the corresponding option.
  28724. </p>
  28725. <p>If the specified expression is not valid, it is kept at its current
  28726. value.
  28727. </p></dd>
  28728. </dl>
  28729. <a name="Examples-102"></a>
  28730. <h4 class="subsection">32.158.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-102" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-102" aria-hidden="true">TOC</a></span></h4>
  28731. <ul>
  28732. <li> Draw the overlay at 10 pixels from the bottom right corner of the main
  28733. video:
  28734. <div class="example">
  28735. <pre class="example">overlay=main_w-overlay_w-10:main_h-overlay_h-10
  28736. </pre></div>
  28737. <p>Using named options the example above becomes:
  28738. </p><div class="example">
  28739. <pre class="example">overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10
  28740. </pre></div>
  28741. </li><li> Insert a transparent PNG logo in the bottom left corner of the input,
  28742. using the <code>ffmpeg</code> tool with the <code>-filter_complex</code> option:
  28743. <div class="example">
  28744. <pre class="example">ffmpeg -i input -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output
  28745. </pre></div>
  28746. </li><li> Insert 2 different transparent PNG logos (second logo on bottom
  28747. right corner) using the <code>ffmpeg</code> tool:
  28748. <div class="example">
  28749. <pre class="example">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
  28750. </pre></div>
  28751. </li><li> Add a transparent color layer on top of the main video; <code>WxH</code>
  28752. must specify the size of the main input to the overlay filter:
  28753. <div class="example">
  28754. <pre class="example">color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
  28755. </pre></div>
  28756. </li><li> Play an original video and a filtered version (here with the deshake
  28757. filter) side by side using the <code>ffplay</code> tool:
  28758. <div class="example">
  28759. <pre class="example">ffplay input.avi -vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'
  28760. </pre></div>
  28761. <p>The above command is the same as:
  28762. </p><div class="example">
  28763. <pre class="example">ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
  28764. </pre></div>
  28765. </li><li> Make a sliding overlay appearing from the left to the right top part of the
  28766. screen starting since time 2:
  28767. <div class="example">
  28768. <pre class="example">overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0
  28769. </pre></div>
  28770. </li><li> Compose output by putting two input videos side to side:
  28771. <div class="example">
  28772. <pre class="example">ffmpeg -i left.avi -i right.avi -filter_complex &quot;
  28773. nullsrc=size=200x100 [background];
  28774. [0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
  28775. [1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
  28776. [background][left] overlay=shortest=1 [background+left];
  28777. [background+left][right] overlay=shortest=1:x=100 [left+right]
  28778. &quot;
  28779. </pre></div>
  28780. </li><li> Mask 10-20 seconds of a video by applying the delogo filter to a section
  28781. <div class="example">
  28782. <pre class="example">ffmpeg -i test.avi -codec:v:0 wmv2 -ar 11025 -b:v 9000k
  28783. -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]'
  28784. masked.avi
  28785. </pre></div>
  28786. </li><li> Chain several overlays in cascade:
  28787. <div class="example">
  28788. <pre class="example">nullsrc=s=200x200 [bg];
  28789. testsrc=s=100x100, split=4 [in0][in1][in2][in3];
  28790. [in0] lutrgb=r=0, [bg] overlay=0:0 [mid0];
  28791. [in1] lutrgb=g=0, [mid0] overlay=100:0 [mid1];
  28792. [in2] lutrgb=b=0, [mid1] overlay=0:100 [mid2];
  28793. [in3] null, [mid2] overlay=100:100 [out0]
  28794. </pre></div>
  28795. </li></ul>
  28796. <span id="overlay_005fcuda"></span><a name="overlay_005fcuda-1"></a>
  28797. <h3 class="section">32.159 overlay_cuda<span class="pull-right"><a class="anchor hidden-xs" href="#overlay_005fcuda-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-overlay_005fcuda-1" aria-hidden="true">TOC</a></span></h3>
  28798. <p>Overlay one video on top of another.
  28799. </p>
  28800. <p>This is the CUDA variant of the <a href="#overlay">overlay</a> filter.
  28801. It only accepts CUDA frames. The underlying input pixel formats have to match.
  28802. </p>
  28803. <p>It takes two inputs and has one output. The first input is the &quot;main&quot;
  28804. video on which the second input is overlaid.
  28805. </p>
  28806. <p>It accepts the following parameters:
  28807. </p>
  28808. <dl compact="compact">
  28809. <dt><samp>x</samp></dt>
  28810. <dt><samp>y</samp></dt>
  28811. <dd><p>Set the x and y coordinates of the overlaid video on the main video.
  28812. Default value is &quot;0&quot; for both expressions.
  28813. </p>
  28814. </dd>
  28815. <dt><samp>eof_action</samp></dt>
  28816. <dd><p>See <a href="#framesync">framesync</a>.
  28817. </p>
  28818. </dd>
  28819. <dt><samp>shortest</samp></dt>
  28820. <dd><p>See <a href="#framesync">framesync</a>.
  28821. </p>
  28822. </dd>
  28823. <dt><samp>repeatlast</samp></dt>
  28824. <dd><p>See <a href="#framesync">framesync</a>.
  28825. </p>
  28826. </dd>
  28827. </dl>
  28828. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  28829. </p>
  28830. <a name="owdenoise"></a>
  28831. <h3 class="section">32.160 owdenoise<span class="pull-right"><a class="anchor hidden-xs" href="#owdenoise" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-owdenoise" aria-hidden="true">TOC</a></span></h3>
  28832. <p>Apply Overcomplete Wavelet denoiser.
  28833. </p>
  28834. <p>The filter accepts the following options:
  28835. </p>
  28836. <dl compact="compact">
  28837. <dt><samp>depth</samp></dt>
  28838. <dd><p>Set depth.
  28839. </p>
  28840. <p>Larger depth values will denoise lower frequency components more, but
  28841. slow down filtering.
  28842. </p>
  28843. <p>Must be an int in the range 8-16, default is <code>8</code>.
  28844. </p>
  28845. </dd>
  28846. <dt><samp>luma_strength, ls</samp></dt>
  28847. <dd><p>Set luma strength.
  28848. </p>
  28849. <p>Must be a double value in the range 0-1000, default is <code>1.0</code>.
  28850. </p>
  28851. </dd>
  28852. <dt><samp>chroma_strength, cs</samp></dt>
  28853. <dd><p>Set chroma strength.
  28854. </p>
  28855. <p>Must be a double value in the range 0-1000, default is <code>1.0</code>.
  28856. </p></dd>
  28857. </dl>
  28858. <span id="pad"></span><a name="pad-1"></a>
  28859. <h3 class="section">32.161 pad<span class="pull-right"><a class="anchor hidden-xs" href="#pad-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pad-1" aria-hidden="true">TOC</a></span></h3>
  28860. <p>Add paddings to the input image, and place the original input at the
  28861. provided <var>x</var>, <var>y</var> coordinates.
  28862. </p>
  28863. <p>It accepts the following parameters:
  28864. </p>
  28865. <dl compact="compact">
  28866. <dt><samp>width, w</samp></dt>
  28867. <dt><samp>height, h</samp></dt>
  28868. <dd><p>Specify an expression for the size of the output image with the
  28869. paddings added. If the value for <var>width</var> or <var>height</var> is 0, the
  28870. corresponding input size is used for the output.
  28871. </p>
  28872. <p>The <var>width</var> expression can reference the value set by the
  28873. <var>height</var> expression, and vice versa.
  28874. </p>
  28875. <p>The default value of <var>width</var> and <var>height</var> is 0.
  28876. </p>
  28877. </dd>
  28878. <dt><samp>x</samp></dt>
  28879. <dt><samp>y</samp></dt>
  28880. <dd><p>Specify the offsets to place the input image at within the padded area,
  28881. with respect to the top/left border of the output image.
  28882. </p>
  28883. <p>The <var>x</var> expression can reference the value set by the <var>y</var>
  28884. expression, and vice versa.
  28885. </p>
  28886. <p>The default value of <var>x</var> and <var>y</var> is 0.
  28887. </p>
  28888. <p>If <var>x</var> or <var>y</var> evaluate to a negative number, they&rsquo;ll be changed
  28889. so the input image is centered on the padded area.
  28890. </p>
  28891. </dd>
  28892. <dt><samp>color</samp></dt>
  28893. <dd><p>Specify the color of the padded area. For the syntax of this option,
  28894. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils
  28895. manual</a>.
  28896. </p>
  28897. <p>The default value of <var>color</var> is &quot;black&quot;.
  28898. </p>
  28899. </dd>
  28900. <dt><samp>eval</samp></dt>
  28901. <dd><p>Specify when to evaluate <var>width</var>, <var>height</var>, <var>x</var> and <var>y</var> expression.
  28902. </p>
  28903. <p>It accepts the following values:
  28904. </p>
  28905. <dl compact="compact">
  28906. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  28907. <dd><p>Only evaluate expressions once during the filter initialization or when
  28908. a command is processed.
  28909. </p>
  28910. </dd>
  28911. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  28912. <dd><p>Evaluate expressions for each incoming frame.
  28913. </p>
  28914. </dd>
  28915. </dl>
  28916. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  28917. </p>
  28918. </dd>
  28919. <dt><samp>aspect</samp></dt>
  28920. <dd><p>Pad to aspect instead to a resolution.
  28921. </p>
  28922. </dd>
  28923. </dl>
  28924. <p>The value for the <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var>
  28925. options are expressions containing the following constants:
  28926. </p>
  28927. <dl compact="compact">
  28928. <dt><samp>in_w</samp></dt>
  28929. <dt><samp>in_h</samp></dt>
  28930. <dd><p>The input video width and height.
  28931. </p>
  28932. </dd>
  28933. <dt><samp>iw</samp></dt>
  28934. <dt><samp>ih</samp></dt>
  28935. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  28936. </p>
  28937. </dd>
  28938. <dt><samp>out_w</samp></dt>
  28939. <dt><samp>out_h</samp></dt>
  28940. <dd><p>The output width and height (the size of the padded area), as
  28941. specified by the <var>width</var> and <var>height</var> expressions.
  28942. </p>
  28943. </dd>
  28944. <dt><samp>ow</samp></dt>
  28945. <dt><samp>oh</samp></dt>
  28946. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>.
  28947. </p>
  28948. </dd>
  28949. <dt><samp>x</samp></dt>
  28950. <dt><samp>y</samp></dt>
  28951. <dd><p>The x and y offsets as specified by the <var>x</var> and <var>y</var>
  28952. expressions, or NAN if not yet specified.
  28953. </p>
  28954. </dd>
  28955. <dt><samp>a</samp></dt>
  28956. <dd><p>same as <var>iw</var> / <var>ih</var>
  28957. </p>
  28958. </dd>
  28959. <dt><samp>sar</samp></dt>
  28960. <dd><p>input sample aspect ratio
  28961. </p>
  28962. </dd>
  28963. <dt><samp>dar</samp></dt>
  28964. <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
  28965. </p>
  28966. </dd>
  28967. <dt><samp>hsub</samp></dt>
  28968. <dt><samp>vsub</samp></dt>
  28969. <dd><p>The horizontal and vertical chroma subsample values. For example for the
  28970. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  28971. </p></dd>
  28972. </dl>
  28973. <a name="Examples-103"></a>
  28974. <h4 class="subsection">32.161.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-103" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-103" aria-hidden="true">TOC</a></span></h4>
  28975. <ul>
  28976. <li> Add paddings with the color &quot;violet&quot; to the input video. The output video
  28977. size is 640x480, and the top-left corner of the input video is placed at
  28978. column 0, row 40
  28979. <div class="example">
  28980. <pre class="example">pad=640:480:0:40:violet
  28981. </pre></div>
  28982. <p>The example above is equivalent to the following command:
  28983. </p><div class="example">
  28984. <pre class="example">pad=width=640:height=480:x=0:y=40:color=violet
  28985. </pre></div>
  28986. </li><li> Pad the input to get an output with dimensions increased by 3/2,
  28987. and put the input video at the center of the padded area:
  28988. <div class="example">
  28989. <pre class="example">pad=&quot;3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2&quot;
  28990. </pre></div>
  28991. </li><li> Pad the input to get a squared output with size equal to the maximum
  28992. value between the input width and height, and put the input video at
  28993. the center of the padded area:
  28994. <div class="example">
  28995. <pre class="example">pad=&quot;max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2&quot;
  28996. </pre></div>
  28997. </li><li> Pad the input to get a final w/h ratio of 16:9:
  28998. <div class="example">
  28999. <pre class="example">pad=&quot;ih*16/9:ih:(ow-iw)/2:(oh-ih)/2&quot;
  29000. </pre></div>
  29001. </li><li> In case of anamorphic video, in order to set the output display aspect
  29002. correctly, it is necessary to use <var>sar</var> in the expression,
  29003. according to the relation:
  29004. <div class="example">
  29005. <pre class="example">(ih * X / ih) * sar = output_dar
  29006. X = output_dar / sar
  29007. </pre></div>
  29008. <p>Thus the previous example needs to be modified to:
  29009. </p><div class="example">
  29010. <pre class="example">pad=&quot;ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2&quot;
  29011. </pre></div>
  29012. </li><li> Double the output size and put the input video in the bottom-right
  29013. corner of the output padded area:
  29014. <div class="example">
  29015. <pre class="example">pad=&quot;2*iw:2*ih:ow-iw:oh-ih&quot;
  29016. </pre></div>
  29017. </li></ul>
  29018. <span id="palettegen"></span><a name="palettegen-1"></a>
  29019. <h3 class="section">32.162 palettegen<span class="pull-right"><a class="anchor hidden-xs" href="#palettegen-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-palettegen-1" aria-hidden="true">TOC</a></span></h3>
  29020. <p>Generate one palette for a whole video stream.
  29021. </p>
  29022. <p>It accepts the following options:
  29023. </p>
  29024. <dl compact="compact">
  29025. <dt><samp>max_colors</samp></dt>
  29026. <dd><p>Set the maximum number of colors to quantize in the palette.
  29027. Note: the palette will still contain 256 colors; the unused palette entries
  29028. will be black.
  29029. </p>
  29030. </dd>
  29031. <dt><samp>reserve_transparent</samp></dt>
  29032. <dd><p>Create a palette of 255 colors maximum and reserve the last one for
  29033. transparency. Reserving the transparency color is useful for GIF optimization.
  29034. If not set, the maximum of colors in the palette will be 256. You probably want
  29035. to disable this option for a standalone image.
  29036. Set by default.
  29037. </p>
  29038. </dd>
  29039. <dt><samp>transparency_color</samp></dt>
  29040. <dd><p>Set the color that will be used as background for transparency.
  29041. </p>
  29042. </dd>
  29043. <dt><samp>stats_mode</samp></dt>
  29044. <dd><p>Set statistics mode.
  29045. </p>
  29046. <p>It accepts the following values:
  29047. </p><dl compact="compact">
  29048. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  29049. <dd><p>Compute full frame histograms.
  29050. </p></dd>
  29051. <dt>&lsquo;<samp>diff</samp>&rsquo;</dt>
  29052. <dd><p>Compute histograms only for the part that differs from previous frame. This
  29053. might be relevant to give more importance to the moving part of your input if
  29054. the background is static.
  29055. </p></dd>
  29056. <dt>&lsquo;<samp>single</samp>&rsquo;</dt>
  29057. <dd><p>Compute new histogram for each frame.
  29058. </p></dd>
  29059. </dl>
  29060. <p>Default value is <var>full</var>.
  29061. </p></dd>
  29062. </dl>
  29063. <p>The filter also exports the frame metadata <code>lavfi.color_quant_ratio</code>
  29064. (<code>nb_color_in / nb_color_out</code>) which you can use to evaluate the degree of
  29065. color quantization of the palette. This information is also visible at
  29066. <var>info</var> logging level.
  29067. </p>
  29068. <a name="Examples-104"></a>
  29069. <h4 class="subsection">32.162.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-104" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-104" aria-hidden="true">TOC</a></span></h4>
  29070. <ul>
  29071. <li> Generate a representative palette of a given video using <code>ffmpeg</code>:
  29072. <div class="example">
  29073. <pre class="example">ffmpeg -i input.mkv -vf palettegen palette.png
  29074. </pre></div>
  29075. </li></ul>
  29076. <a name="paletteuse"></a>
  29077. <h3 class="section">32.163 paletteuse<span class="pull-right"><a class="anchor hidden-xs" href="#paletteuse" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-paletteuse" aria-hidden="true">TOC</a></span></h3>
  29078. <p>Use a palette to downsample an input video stream.
  29079. </p>
  29080. <p>The filter takes two inputs: one video stream and a palette. The palette must
  29081. be a 256 pixels image.
  29082. </p>
  29083. <p>It accepts the following options:
  29084. </p>
  29085. <dl compact="compact">
  29086. <dt><samp>dither</samp></dt>
  29087. <dd><p>Select dithering mode. Available algorithms are:
  29088. </p><dl compact="compact">
  29089. <dt>&lsquo;<samp>bayer</samp>&rsquo;</dt>
  29090. <dd><p>Ordered 8x8 bayer dithering (deterministic)
  29091. </p></dd>
  29092. <dt>&lsquo;<samp>heckbert</samp>&rsquo;</dt>
  29093. <dd><p>Dithering as defined by Paul Heckbert in 1982 (simple error diffusion).
  29094. Note: this dithering is sometimes considered &quot;wrong&quot; and is included as a
  29095. reference.
  29096. </p></dd>
  29097. <dt>&lsquo;<samp>floyd_steinberg</samp>&rsquo;</dt>
  29098. <dd><p>Floyd and Steingberg dithering (error diffusion)
  29099. </p></dd>
  29100. <dt>&lsquo;<samp>sierra2</samp>&rsquo;</dt>
  29101. <dd><p>Frankie Sierra dithering v2 (error diffusion)
  29102. </p></dd>
  29103. <dt>&lsquo;<samp>sierra2_4a</samp>&rsquo;</dt>
  29104. <dd><p>Frankie Sierra dithering v2 &quot;Lite&quot; (error diffusion)
  29105. </p></dd>
  29106. </dl>
  29107. <p>Default is <var>sierra2_4a</var>.
  29108. </p>
  29109. </dd>
  29110. <dt><samp>bayer_scale</samp></dt>
  29111. <dd><p>When <var>bayer</var> dithering is selected, this option defines the scale of the
  29112. pattern (how much the crosshatch pattern is visible). A low value means more
  29113. visible pattern for less banding, and higher value means less visible pattern
  29114. at the cost of more banding.
  29115. </p>
  29116. <p>The option must be an integer value in the range [0,5]. Default is <var>2</var>.
  29117. </p>
  29118. </dd>
  29119. <dt><samp>diff_mode</samp></dt>
  29120. <dd><p>If set, define the zone to process
  29121. </p>
  29122. <dl compact="compact">
  29123. <dt>&lsquo;<samp>rectangle</samp>&rsquo;</dt>
  29124. <dd><p>Only the changing rectangle will be reprocessed. This is similar to GIF
  29125. cropping/offsetting compression mechanism. This option can be useful for speed
  29126. if only a part of the image is changing, and has use cases such as limiting the
  29127. scope of the error diffusal <samp>dither</samp> to the rectangle that bounds the
  29128. moving scene (it leads to more deterministic output if the scene doesn&rsquo;t change
  29129. much, and as a result less moving noise and better GIF compression).
  29130. </p></dd>
  29131. </dl>
  29132. <p>Default is <var>none</var>.
  29133. </p>
  29134. </dd>
  29135. <dt><samp>new</samp></dt>
  29136. <dd><p>Take new palette for each output frame.
  29137. </p>
  29138. </dd>
  29139. <dt><samp>alpha_threshold</samp></dt>
  29140. <dd><p>Sets the alpha threshold for transparency. Alpha values above this threshold
  29141. will be treated as completely opaque, and values below this threshold will be
  29142. treated as completely transparent.
  29143. </p>
  29144. <p>The option must be an integer value in the range [0,255]. Default is <var>128</var>.
  29145. </p></dd>
  29146. </dl>
  29147. <a name="Examples-105"></a>
  29148. <h4 class="subsection">32.163.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-105" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-105" aria-hidden="true">TOC</a></span></h4>
  29149. <ul>
  29150. <li> Use a palette (generated for example with <a href="#palettegen">palettegen</a>) to encode a GIF
  29151. using <code>ffmpeg</code>:
  29152. <div class="example">
  29153. <pre class="example">ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
  29154. </pre></div>
  29155. </li></ul>
  29156. <a name="perspective"></a>
  29157. <h3 class="section">32.164 perspective<span class="pull-right"><a class="anchor hidden-xs" href="#perspective" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-perspective" aria-hidden="true">TOC</a></span></h3>
  29158. <p>Correct perspective of video not recorded perpendicular to the screen.
  29159. </p>
  29160. <p>A description of the accepted parameters follows.
  29161. </p>
  29162. <dl compact="compact">
  29163. <dt><samp>x0</samp></dt>
  29164. <dt><samp>y0</samp></dt>
  29165. <dt><samp>x1</samp></dt>
  29166. <dt><samp>y1</samp></dt>
  29167. <dt><samp>x2</samp></dt>
  29168. <dt><samp>y2</samp></dt>
  29169. <dt><samp>x3</samp></dt>
  29170. <dt><samp>y3</samp></dt>
  29171. <dd><p>Set coordinates expression for top left, top right, bottom left and bottom right corners.
  29172. Default values are <code>0:0:W:0:0:H:W:H</code> with which perspective will remain unchanged.
  29173. If the <code>sense</code> option is set to <code>source</code>, then the specified points will be sent
  29174. to the corners of the destination. If the <code>sense</code> option is set to <code>destination</code>,
  29175. then the corners of the source will be sent to the specified coordinates.
  29176. </p>
  29177. <p>The expressions can use the following variables:
  29178. </p>
  29179. <dl compact="compact">
  29180. <dt><samp>W</samp></dt>
  29181. <dt><samp>H</samp></dt>
  29182. <dd><p>the width and height of video frame.
  29183. </p></dd>
  29184. <dt><samp>in</samp></dt>
  29185. <dd><p>Input frame count.
  29186. </p></dd>
  29187. <dt><samp>on</samp></dt>
  29188. <dd><p>Output frame count.
  29189. </p></dd>
  29190. </dl>
  29191. </dd>
  29192. <dt><samp>interpolation</samp></dt>
  29193. <dd><p>Set interpolation for perspective correction.
  29194. </p>
  29195. <p>It accepts the following values:
  29196. </p><dl compact="compact">
  29197. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  29198. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  29199. </dl>
  29200. <p>Default value is &lsquo;<samp>linear</samp>&rsquo;.
  29201. </p>
  29202. </dd>
  29203. <dt><samp>sense</samp></dt>
  29204. <dd><p>Set interpretation of coordinate options.
  29205. </p>
  29206. <p>It accepts the following values:
  29207. </p><dl compact="compact">
  29208. <dt>&lsquo;<samp>0, source</samp>&rsquo;</dt>
  29209. <dd>
  29210. <p>Send point in the source specified by the given coordinates to
  29211. the corners of the destination.
  29212. </p>
  29213. </dd>
  29214. <dt>&lsquo;<samp>1, destination</samp>&rsquo;</dt>
  29215. <dd>
  29216. <p>Send the corners of the source to the point in the destination specified
  29217. by the given coordinates.
  29218. </p>
  29219. <p>Default value is &lsquo;<samp>source</samp>&rsquo;.
  29220. </p></dd>
  29221. </dl>
  29222. </dd>
  29223. <dt><samp>eval</samp></dt>
  29224. <dd><p>Set when the expressions for coordinates <samp>x0,y0,...x3,y3</samp> are evaluated.
  29225. </p>
  29226. <p>It accepts the following values:
  29227. </p><dl compact="compact">
  29228. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  29229. <dd><p>only evaluate expressions once during the filter initialization or
  29230. when a command is processed
  29231. </p>
  29232. </dd>
  29233. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  29234. <dd><p>evaluate expressions for each incoming frame
  29235. </p></dd>
  29236. </dl>
  29237. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  29238. </p></dd>
  29239. </dl>
  29240. <a name="phase"></a>
  29241. <h3 class="section">32.165 phase<span class="pull-right"><a class="anchor hidden-xs" href="#phase" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-phase" aria-hidden="true">TOC</a></span></h3>
  29242. <p>Delay interlaced video by one field time so that the field order changes.
  29243. </p>
  29244. <p>The intended use is to fix PAL movies that have been captured with the
  29245. opposite field order to the film-to-video transfer.
  29246. </p>
  29247. <p>A description of the accepted parameters follows.
  29248. </p>
  29249. <dl compact="compact">
  29250. <dt><samp>mode</samp></dt>
  29251. <dd><p>Set phase mode.
  29252. </p>
  29253. <p>It accepts the following values:
  29254. </p><dl compact="compact">
  29255. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  29256. <dd><p>Capture field order top-first, transfer bottom-first.
  29257. Filter will delay the bottom field.
  29258. </p>
  29259. </dd>
  29260. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  29261. <dd><p>Capture field order bottom-first, transfer top-first.
  29262. Filter will delay the top field.
  29263. </p>
  29264. </dd>
  29265. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  29266. <dd><p>Capture and transfer with the same field order. This mode only exists
  29267. for the documentation of the other options to refer to, but if you
  29268. actually select it, the filter will faithfully do nothing.
  29269. </p>
  29270. </dd>
  29271. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  29272. <dd><p>Capture field order determined automatically by field flags, transfer
  29273. opposite.
  29274. Filter selects among &lsquo;<samp>t</samp>&rsquo; and &lsquo;<samp>b</samp>&rsquo; modes on a frame by frame
  29275. basis using field flags. If no field information is available,
  29276. then this works just like &lsquo;<samp>u</samp>&rsquo;.
  29277. </p>
  29278. </dd>
  29279. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  29280. <dd><p>Capture unknown or varying, transfer opposite.
  29281. Filter selects among &lsquo;<samp>t</samp>&rsquo; and &lsquo;<samp>b</samp>&rsquo; on a frame by frame basis by
  29282. analyzing the images and selecting the alternative that produces best
  29283. match between the fields.
  29284. </p>
  29285. </dd>
  29286. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  29287. <dd><p>Capture top-first, transfer unknown or varying.
  29288. Filter selects among &lsquo;<samp>t</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using image analysis.
  29289. </p>
  29290. </dd>
  29291. <dt>&lsquo;<samp>B</samp>&rsquo;</dt>
  29292. <dd><p>Capture bottom-first, transfer unknown or varying.
  29293. Filter selects among &lsquo;<samp>b</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using image analysis.
  29294. </p>
  29295. </dd>
  29296. <dt>&lsquo;<samp>A</samp>&rsquo;</dt>
  29297. <dd><p>Capture determined by field flags, transfer unknown or varying.
  29298. Filter selects among &lsquo;<samp>t</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using field flags and
  29299. image analysis. If no field information is available, then this works just
  29300. like &lsquo;<samp>U</samp>&rsquo;. This is the default mode.
  29301. </p>
  29302. </dd>
  29303. <dt>&lsquo;<samp>U</samp>&rsquo;</dt>
  29304. <dd><p>Both capture and transfer unknown or varying.
  29305. Filter selects among &lsquo;<samp>t</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using image analysis only.
  29306. </p></dd>
  29307. </dl>
  29308. </dd>
  29309. </dl>
  29310. <a name="Commands-111"></a>
  29311. <h4 class="subsection">32.165.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-111" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-111" aria-hidden="true">TOC</a></span></h4>
  29312. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  29313. </p>
  29314. <a name="photosensitivity"></a>
  29315. <h3 class="section">32.166 photosensitivity<span class="pull-right"><a class="anchor hidden-xs" href="#photosensitivity" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-photosensitivity" aria-hidden="true">TOC</a></span></h3>
  29316. <p>Reduce various flashes in video, so to help users with epilepsy.
  29317. </p>
  29318. <p>It accepts the following options:
  29319. </p><dl compact="compact">
  29320. <dt><samp>frames, f</samp></dt>
  29321. <dd><p>Set how many frames to use when filtering. Default is 30.
  29322. </p>
  29323. </dd>
  29324. <dt><samp>threshold, t</samp></dt>
  29325. <dd><p>Set detection threshold factor. Default is 1.
  29326. Lower is stricter.
  29327. </p>
  29328. </dd>
  29329. <dt><samp>skip</samp></dt>
  29330. <dd><p>Set how many pixels to skip when sampling frames. Default is 1.
  29331. Allowed range is from 1 to 1024.
  29332. </p>
  29333. </dd>
  29334. <dt><samp>bypass</samp></dt>
  29335. <dd><p>Leave frames unchanged. Default is disabled.
  29336. </p></dd>
  29337. </dl>
  29338. <a name="pixdesctest"></a>
  29339. <h3 class="section">32.167 pixdesctest<span class="pull-right"><a class="anchor hidden-xs" href="#pixdesctest" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pixdesctest" aria-hidden="true">TOC</a></span></h3>
  29340. <p>Pixel format descriptor test filter, mainly useful for internal
  29341. testing. The output video should be equal to the input video.
  29342. </p>
  29343. <p>For example:
  29344. </p><div class="example">
  29345. <pre class="example">format=monow, pixdesctest
  29346. </pre></div>
  29347. <p>can be used to test the monowhite pixel format descriptor definition.
  29348. </p>
  29349. <a name="pixscope"></a>
  29350. <h3 class="section">32.168 pixscope<span class="pull-right"><a class="anchor hidden-xs" href="#pixscope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pixscope" aria-hidden="true">TOC</a></span></h3>
  29351. <p>Display sample values of color channels. Mainly useful for checking color
  29352. and levels. Minimum supported resolution is 640x480.
  29353. </p>
  29354. <p>The filters accept the following options:
  29355. </p>
  29356. <dl compact="compact">
  29357. <dt><samp>x</samp></dt>
  29358. <dd><p>Set scope X position, relative offset on X axis.
  29359. </p>
  29360. </dd>
  29361. <dt><samp>y</samp></dt>
  29362. <dd><p>Set scope Y position, relative offset on Y axis.
  29363. </p>
  29364. </dd>
  29365. <dt><samp>w</samp></dt>
  29366. <dd><p>Set scope width.
  29367. </p>
  29368. </dd>
  29369. <dt><samp>h</samp></dt>
  29370. <dd><p>Set scope height.
  29371. </p>
  29372. </dd>
  29373. <dt><samp>o</samp></dt>
  29374. <dd><p>Set window opacity. This window also holds statistics about pixel area.
  29375. </p>
  29376. </dd>
  29377. <dt><samp>wx</samp></dt>
  29378. <dd><p>Set window X position, relative offset on X axis.
  29379. </p>
  29380. </dd>
  29381. <dt><samp>wy</samp></dt>
  29382. <dd><p>Set window Y position, relative offset on Y axis.
  29383. </p></dd>
  29384. </dl>
  29385. <a name="Commands-112"></a>
  29386. <h4 class="subsection">32.168.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-112" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-112" aria-hidden="true">TOC</a></span></h4>
  29387. <p>This filter supports same <a href="#commands">commands</a> as options.
  29388. </p>
  29389. <a name="pp"></a>
  29390. <h3 class="section">32.169 pp<span class="pull-right"><a class="anchor hidden-xs" href="#pp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pp" aria-hidden="true">TOC</a></span></h3>
  29391. <p>Enable the specified chain of postprocessing subfilters using libpostproc. This
  29392. library should be automatically selected with a GPL build (<code>--enable-gpl</code>).
  29393. Subfilters must be separated by &rsquo;/&rsquo; and can be disabled by prepending a &rsquo;-&rsquo;.
  29394. Each subfilter and some options have a short and a long name that can be used
  29395. interchangeably, i.e. dr/dering are the same.
  29396. </p>
  29397. <p>The filters accept the following options:
  29398. </p>
  29399. <dl compact="compact">
  29400. <dt><samp>subfilters</samp></dt>
  29401. <dd><p>Set postprocessing subfilters string.
  29402. </p></dd>
  29403. </dl>
  29404. <p>All subfilters share common options to determine their scope:
  29405. </p>
  29406. <dl compact="compact">
  29407. <dt><samp>a/autoq</samp></dt>
  29408. <dd><p>Honor the quality commands for this subfilter.
  29409. </p>
  29410. </dd>
  29411. <dt><samp>c/chrom</samp></dt>
  29412. <dd><p>Do chrominance filtering, too (default).
  29413. </p>
  29414. </dd>
  29415. <dt><samp>y/nochrom</samp></dt>
  29416. <dd><p>Do luminance filtering only (no chrominance).
  29417. </p>
  29418. </dd>
  29419. <dt><samp>n/noluma</samp></dt>
  29420. <dd><p>Do chrominance filtering only (no luminance).
  29421. </p></dd>
  29422. </dl>
  29423. <p>These options can be appended after the subfilter name, separated by a &rsquo;|&rsquo;.
  29424. </p>
  29425. <p>Available subfilters are:
  29426. </p>
  29427. <dl compact="compact">
  29428. <dt><samp>hb/hdeblock[|difference[|flatness]]</samp></dt>
  29429. <dd><p>Horizontal deblocking filter
  29430. </p><dl compact="compact">
  29431. <dt><samp>difference</samp></dt>
  29432. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  29433. </p></dd>
  29434. <dt><samp>flatness</samp></dt>
  29435. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  29436. </p></dd>
  29437. </dl>
  29438. </dd>
  29439. <dt><samp>vb/vdeblock[|difference[|flatness]]</samp></dt>
  29440. <dd><p>Vertical deblocking filter
  29441. </p><dl compact="compact">
  29442. <dt><samp>difference</samp></dt>
  29443. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  29444. </p></dd>
  29445. <dt><samp>flatness</samp></dt>
  29446. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  29447. </p></dd>
  29448. </dl>
  29449. </dd>
  29450. <dt><samp>ha/hadeblock[|difference[|flatness]]</samp></dt>
  29451. <dd><p>Accurate horizontal deblocking filter
  29452. </p><dl compact="compact">
  29453. <dt><samp>difference</samp></dt>
  29454. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  29455. </p></dd>
  29456. <dt><samp>flatness</samp></dt>
  29457. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  29458. </p></dd>
  29459. </dl>
  29460. </dd>
  29461. <dt><samp>va/vadeblock[|difference[|flatness]]</samp></dt>
  29462. <dd><p>Accurate vertical deblocking filter
  29463. </p><dl compact="compact">
  29464. <dt><samp>difference</samp></dt>
  29465. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  29466. </p></dd>
  29467. <dt><samp>flatness</samp></dt>
  29468. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  29469. </p></dd>
  29470. </dl>
  29471. </dd>
  29472. </dl>
  29473. <p>The horizontal and vertical deblocking filters share the difference and
  29474. flatness values so you cannot set different horizontal and vertical
  29475. thresholds.
  29476. </p>
  29477. <dl compact="compact">
  29478. <dt><samp>h1/x1hdeblock</samp></dt>
  29479. <dd><p>Experimental horizontal deblocking filter
  29480. </p>
  29481. </dd>
  29482. <dt><samp>v1/x1vdeblock</samp></dt>
  29483. <dd><p>Experimental vertical deblocking filter
  29484. </p>
  29485. </dd>
  29486. <dt><samp>dr/dering</samp></dt>
  29487. <dd><p>Deringing filter
  29488. </p>
  29489. </dd>
  29490. <dt><samp>tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise reducer</samp></dt>
  29491. <dd><dl compact="compact">
  29492. <dt><samp>threshold1</samp></dt>
  29493. <dd><p>larger -&gt; stronger filtering
  29494. </p></dd>
  29495. <dt><samp>threshold2</samp></dt>
  29496. <dd><p>larger -&gt; stronger filtering
  29497. </p></dd>
  29498. <dt><samp>threshold3</samp></dt>
  29499. <dd><p>larger -&gt; stronger filtering
  29500. </p></dd>
  29501. </dl>
  29502. </dd>
  29503. <dt><samp>al/autolevels[:f/fullyrange], automatic brightness / contrast correction</samp></dt>
  29504. <dd><dl compact="compact">
  29505. <dt><samp>f/fullyrange</samp></dt>
  29506. <dd><p>Stretch luminance to <code>0-255</code>.
  29507. </p></dd>
  29508. </dl>
  29509. </dd>
  29510. <dt><samp>lb/linblenddeint</samp></dt>
  29511. <dd><p>Linear blend deinterlacing filter that deinterlaces the given block by
  29512. filtering all lines with a <code>(1 2 1)</code> filter.
  29513. </p>
  29514. </dd>
  29515. <dt><samp>li/linipoldeint</samp></dt>
  29516. <dd><p>Linear interpolating deinterlacing filter that deinterlaces the given block by
  29517. linearly interpolating every second line.
  29518. </p>
  29519. </dd>
  29520. <dt><samp>ci/cubicipoldeint</samp></dt>
  29521. <dd><p>Cubic interpolating deinterlacing filter deinterlaces the given block by
  29522. cubically interpolating every second line.
  29523. </p>
  29524. </dd>
  29525. <dt><samp>md/mediandeint</samp></dt>
  29526. <dd><p>Median deinterlacing filter that deinterlaces the given block by applying a
  29527. median filter to every second line.
  29528. </p>
  29529. </dd>
  29530. <dt><samp>fd/ffmpegdeint</samp></dt>
  29531. <dd><p>FFmpeg deinterlacing filter that deinterlaces the given block by filtering every
  29532. second line with a <code>(-1 4 2 4 -1)</code> filter.
  29533. </p>
  29534. </dd>
  29535. <dt><samp>l5/lowpass5</samp></dt>
  29536. <dd><p>Vertically applied FIR lowpass deinterlacing filter that deinterlaces the given
  29537. block by filtering all lines with a <code>(-1 2 6 2 -1)</code> filter.
  29538. </p>
  29539. </dd>
  29540. <dt><samp>fq/forceQuant[|quantizer]</samp></dt>
  29541. <dd><p>Overrides the quantizer table from the input with the constant quantizer you
  29542. specify.
  29543. </p><dl compact="compact">
  29544. <dt><samp>quantizer</samp></dt>
  29545. <dd><p>Quantizer to use
  29546. </p></dd>
  29547. </dl>
  29548. </dd>
  29549. <dt><samp>de/default</samp></dt>
  29550. <dd><p>Default pp filter combination (<code>hb|a,vb|a,dr|a</code>)
  29551. </p>
  29552. </dd>
  29553. <dt><samp>fa/fast</samp></dt>
  29554. <dd><p>Fast pp filter combination (<code>h1|a,v1|a,dr|a</code>)
  29555. </p>
  29556. </dd>
  29557. <dt><samp>ac</samp></dt>
  29558. <dd><p>High quality pp filter combination (<code>ha|a|128|7,va|a,dr|a</code>)
  29559. </p></dd>
  29560. </dl>
  29561. <a name="Examples-106"></a>
  29562. <h4 class="subsection">32.169.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-106" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-106" aria-hidden="true">TOC</a></span></h4>
  29563. <ul>
  29564. <li> Apply horizontal and vertical deblocking, deringing and automatic
  29565. brightness/contrast:
  29566. <div class="example">
  29567. <pre class="example">pp=hb/vb/dr/al
  29568. </pre></div>
  29569. </li><li> Apply default filters without brightness/contrast correction:
  29570. <div class="example">
  29571. <pre class="example">pp=de/-al
  29572. </pre></div>
  29573. </li><li> Apply default filters and temporal denoiser:
  29574. <div class="example">
  29575. <pre class="example">pp=default/tmpnoise|1|2|3
  29576. </pre></div>
  29577. </li><li> Apply deblocking on luminance only, and switch vertical deblocking on or off
  29578. automatically depending on available CPU time:
  29579. <div class="example">
  29580. <pre class="example">pp=hb|y/vb|a
  29581. </pre></div>
  29582. </li></ul>
  29583. <a name="pp7"></a>
  29584. <h3 class="section">32.170 pp7<span class="pull-right"><a class="anchor hidden-xs" href="#pp7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pp7" aria-hidden="true">TOC</a></span></h3>
  29585. <p>Apply Postprocessing filter 7. It is variant of the <a href="#spp">spp</a> filter,
  29586. similar to spp = 6 with 7 point DCT, where only the center sample is
  29587. used after IDCT.
  29588. </p>
  29589. <p>The filter accepts the following options:
  29590. </p>
  29591. <dl compact="compact">
  29592. <dt><samp>qp</samp></dt>
  29593. <dd><p>Force a constant quantization parameter. It accepts an integer in range
  29594. 0 to 63. If not set, the filter will use the QP from the video stream
  29595. (if available).
  29596. </p>
  29597. </dd>
  29598. <dt><samp>mode</samp></dt>
  29599. <dd><p>Set thresholding mode. Available modes are:
  29600. </p>
  29601. <dl compact="compact">
  29602. <dt>&lsquo;<samp>hard</samp>&rsquo;</dt>
  29603. <dd><p>Set hard thresholding.
  29604. </p></dd>
  29605. <dt>&lsquo;<samp>soft</samp>&rsquo;</dt>
  29606. <dd><p>Set soft thresholding (better de-ringing effect, but likely blurrier).
  29607. </p></dd>
  29608. <dt>&lsquo;<samp>medium</samp>&rsquo;</dt>
  29609. <dd><p>Set medium thresholding (good results, default).
  29610. </p></dd>
  29611. </dl>
  29612. </dd>
  29613. </dl>
  29614. <a name="premultiply"></a>
  29615. <h3 class="section">32.171 premultiply<span class="pull-right"><a class="anchor hidden-xs" href="#premultiply" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-premultiply" aria-hidden="true">TOC</a></span></h3>
  29616. <p>Apply alpha premultiply effect to input video stream using first plane
  29617. of second stream as alpha.
  29618. </p>
  29619. <p>Both streams must have same dimensions and same pixel format.
  29620. </p>
  29621. <p>The filter accepts the following option:
  29622. </p>
  29623. <dl compact="compact">
  29624. <dt><samp>planes</samp></dt>
  29625. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  29626. By default value 0xf, all planes will be processed.
  29627. </p>
  29628. </dd>
  29629. <dt><samp>inplace</samp></dt>
  29630. <dd><p>Do not require 2nd input for processing, instead use alpha plane from input stream.
  29631. </p></dd>
  29632. </dl>
  29633. <a name="prewitt"></a>
  29634. <h3 class="section">32.172 prewitt<span class="pull-right"><a class="anchor hidden-xs" href="#prewitt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-prewitt" aria-hidden="true">TOC</a></span></h3>
  29635. <p>Apply prewitt operator to input video stream.
  29636. </p>
  29637. <p>The filter accepts the following option:
  29638. </p>
  29639. <dl compact="compact">
  29640. <dt><samp>planes</samp></dt>
  29641. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  29642. By default value 0xf, all planes will be processed.
  29643. </p>
  29644. </dd>
  29645. <dt><samp>scale</samp></dt>
  29646. <dd><p>Set value which will be multiplied with filtered result.
  29647. </p>
  29648. </dd>
  29649. <dt><samp>delta</samp></dt>
  29650. <dd><p>Set value which will be added to filtered result.
  29651. </p></dd>
  29652. </dl>
  29653. <a name="Commands-113"></a>
  29654. <h4 class="subsection">32.172.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-113" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-113" aria-hidden="true">TOC</a></span></h4>
  29655. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  29656. </p>
  29657. <a name="pseudocolor"></a>
  29658. <h3 class="section">32.173 pseudocolor<span class="pull-right"><a class="anchor hidden-xs" href="#pseudocolor" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pseudocolor" aria-hidden="true">TOC</a></span></h3>
  29659. <p>Alter frame colors in video with pseudocolors.
  29660. </p>
  29661. <p>This filter accepts the following options:
  29662. </p>
  29663. <dl compact="compact">
  29664. <dt><samp>c0</samp></dt>
  29665. <dd><p>set pixel first component expression
  29666. </p>
  29667. </dd>
  29668. <dt><samp>c1</samp></dt>
  29669. <dd><p>set pixel second component expression
  29670. </p>
  29671. </dd>
  29672. <dt><samp>c2</samp></dt>
  29673. <dd><p>set pixel third component expression
  29674. </p>
  29675. </dd>
  29676. <dt><samp>c3</samp></dt>
  29677. <dd><p>set pixel fourth component expression, corresponds to the alpha component
  29678. </p>
  29679. </dd>
  29680. <dt><samp>index, i</samp></dt>
  29681. <dd><p>set component to use as base for altering colors
  29682. </p>
  29683. </dd>
  29684. <dt><samp>preset, p</samp></dt>
  29685. <dd><p>Pick one of built-in LUTs. By default is set to none.
  29686. </p>
  29687. <p>Available LUTs:
  29688. </p><dl compact="compact">
  29689. <dt>&lsquo;<samp>magma</samp>&rsquo;</dt>
  29690. <dt>&lsquo;<samp>inferno</samp>&rsquo;</dt>
  29691. <dt>&lsquo;<samp>plasma</samp>&rsquo;</dt>
  29692. <dt>&lsquo;<samp>viridis</samp>&rsquo;</dt>
  29693. <dt>&lsquo;<samp>turbo</samp>&rsquo;</dt>
  29694. <dt>&lsquo;<samp>cividis</samp>&rsquo;</dt>
  29695. <dt>&lsquo;<samp>range1</samp>&rsquo;</dt>
  29696. <dt>&lsquo;<samp>range2</samp>&rsquo;</dt>
  29697. <dt>&lsquo;<samp>shadows</samp>&rsquo;</dt>
  29698. <dt>&lsquo;<samp>highlights</samp>&rsquo;</dt>
  29699. </dl>
  29700. </dd>
  29701. <dt><samp>opacity</samp></dt>
  29702. <dd><p>Set opacity of output colors. Allowed range is from 0 to 1.
  29703. Default value is set to 1.
  29704. </p></dd>
  29705. </dl>
  29706. <p>Each of the expression options specifies the expression to use for computing
  29707. the lookup table for the corresponding pixel component values.
  29708. </p>
  29709. <p>The expressions can contain the following constants and functions:
  29710. </p>
  29711. <dl compact="compact">
  29712. <dt><samp>w</samp></dt>
  29713. <dt><samp>h</samp></dt>
  29714. <dd><p>The input width and height.
  29715. </p>
  29716. </dd>
  29717. <dt><samp>val</samp></dt>
  29718. <dd><p>The input value for the pixel component.
  29719. </p>
  29720. </dd>
  29721. <dt><samp>ymin, umin, vmin, amin</samp></dt>
  29722. <dd><p>The minimum allowed component value.
  29723. </p>
  29724. </dd>
  29725. <dt><samp>ymax, umax, vmax, amax</samp></dt>
  29726. <dd><p>The maximum allowed component value.
  29727. </p></dd>
  29728. </dl>
  29729. <p>All expressions default to &quot;val&quot;.
  29730. </p>
  29731. <a name="Commands-114"></a>
  29732. <h4 class="subsection">32.173.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-114" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-114" aria-hidden="true">TOC</a></span></h4>
  29733. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  29734. </p>
  29735. <a name="Examples-107"></a>
  29736. <h4 class="subsection">32.173.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-107" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-107" aria-hidden="true">TOC</a></span></h4>
  29737. <ul>
  29738. <li> Change too high luma values to gradient:
  29739. <div class="example">
  29740. <pre class="example">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;
  29741. </pre></div>
  29742. </li></ul>
  29743. <a name="psnr"></a>
  29744. <h3 class="section">32.174 psnr<span class="pull-right"><a class="anchor hidden-xs" href="#psnr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-psnr" aria-hidden="true">TOC</a></span></h3>
  29745. <p>Obtain the average, maximum and minimum PSNR (Peak Signal to Noise
  29746. Ratio) between two input videos.
  29747. </p>
  29748. <p>This filter takes in input two input videos, the first input is
  29749. considered the &quot;main&quot; source and is passed unchanged to the
  29750. output. The second input is used as a &quot;reference&quot; video for computing
  29751. the PSNR.
  29752. </p>
  29753. <p>Both video inputs must have the same resolution and pixel format for
  29754. this filter to work correctly. Also it assumes that both inputs
  29755. have the same number of frames, which are compared one by one.
  29756. </p>
  29757. <p>The obtained average PSNR is printed through the logging system.
  29758. </p>
  29759. <p>The filter stores the accumulated MSE (mean squared error) of each
  29760. frame, and at the end of the processing it is averaged across all frames
  29761. equally, and the following formula is applied to obtain the PSNR:
  29762. </p>
  29763. <div class="example">
  29764. <pre class="example">PSNR = 10*log10(MAX^2/MSE)
  29765. </pre></div>
  29766. <p>Where MAX is the average of the maximum values of each component of the
  29767. image.
  29768. </p>
  29769. <p>The description of the accepted parameters follows.
  29770. </p>
  29771. <dl compact="compact">
  29772. <dt><samp>stats_file, f</samp></dt>
  29773. <dd><p>If specified the filter will use the named file to save the PSNR of
  29774. each individual frame. When filename equals &quot;-&quot; the data is sent to
  29775. standard output.
  29776. </p>
  29777. </dd>
  29778. <dt><samp>stats_version</samp></dt>
  29779. <dd><p>Specifies which version of the stats file format to use. Details of
  29780. each format are written below.
  29781. Default value is 1.
  29782. </p>
  29783. </dd>
  29784. <dt><samp>stats_add_max</samp></dt>
  29785. <dd><p>Determines whether the max value is output to the stats log.
  29786. Default value is 0.
  29787. Requires stats_version &gt;= 2. If this is set and stats_version &lt; 2,
  29788. the filter will return an error.
  29789. </p></dd>
  29790. </dl>
  29791. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  29792. </p>
  29793. <p>The file printed if <var>stats_file</var> is selected, contains a sequence of
  29794. key/value pairs of the form <var>key</var>:<var>value</var> for each compared
  29795. couple of frames.
  29796. </p>
  29797. <p>If a <var>stats_version</var> greater than 1 is specified, a header line precedes
  29798. the list of per-frame-pair stats, with key value pairs following the frame
  29799. format with the following parameters:
  29800. </p>
  29801. <dl compact="compact">
  29802. <dt><samp>psnr_log_version</samp></dt>
  29803. <dd><p>The version of the log file format. Will match <var>stats_version</var>.
  29804. </p>
  29805. </dd>
  29806. <dt><samp>fields</samp></dt>
  29807. <dd><p>A comma separated list of the per-frame-pair parameters included in
  29808. the log.
  29809. </p></dd>
  29810. </dl>
  29811. <p>A description of each shown per-frame-pair parameter follows:
  29812. </p>
  29813. <dl compact="compact">
  29814. <dt><samp>n</samp></dt>
  29815. <dd><p>sequential number of the input frame, starting from 1
  29816. </p>
  29817. </dd>
  29818. <dt><samp>mse_avg</samp></dt>
  29819. <dd><p>Mean Square Error pixel-by-pixel average difference of the compared
  29820. frames, averaged over all the image components.
  29821. </p>
  29822. </dd>
  29823. <dt><samp>mse_y, mse_u, mse_v, mse_r, mse_g, mse_b, mse_a</samp></dt>
  29824. <dd><p>Mean Square Error pixel-by-pixel average difference of the compared
  29825. frames for the component specified by the suffix.
  29826. </p>
  29827. </dd>
  29828. <dt><samp>psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a</samp></dt>
  29829. <dd><p>Peak Signal to Noise ratio of the compared frames for the component
  29830. specified by the suffix.
  29831. </p>
  29832. </dd>
  29833. <dt><samp>max_avg, max_y, max_u, max_v</samp></dt>
  29834. <dd><p>Maximum allowed value for each channel, and average over all
  29835. channels.
  29836. </p></dd>
  29837. </dl>
  29838. <a name="Examples-108"></a>
  29839. <h4 class="subsection">32.174.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-108" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-108" aria-hidden="true">TOC</a></span></h4>
  29840. <ul>
  29841. <li> For example:
  29842. <div class="example">
  29843. <pre class="example">movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
  29844. [main][ref] psnr=&quot;stats_file=stats.log&quot; [out]
  29845. </pre></div>
  29846. <p>On this example the input file being processed is compared with the
  29847. reference file <samp>ref_movie.mpg</samp>. The PSNR of each individual frame
  29848. is stored in <samp>stats.log</samp>.
  29849. </p>
  29850. </li><li> Another example with different containers:
  29851. <div class="example">
  29852. <pre class="example">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 -
  29853. </pre></div>
  29854. </li></ul>
  29855. <span id="pullup"></span><a name="pullup-1"></a>
  29856. <h3 class="section">32.175 pullup<span class="pull-right"><a class="anchor hidden-xs" href="#pullup-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pullup-1" aria-hidden="true">TOC</a></span></h3>
  29857. <p>Pulldown reversal (inverse telecine) filter, capable of handling mixed
  29858. hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps progressive
  29859. content.
  29860. </p>
  29861. <p>The pullup filter is designed to take advantage of future context in making
  29862. its decisions. This filter is stateless in the sense that it does not lock
  29863. onto a pattern to follow, but it instead looks forward to the following
  29864. fields in order to identify matches and rebuild progressive frames.
  29865. </p>
  29866. <p>To produce content with an even framerate, insert the fps filter after
  29867. pullup, use <code>fps=24000/1001</code> if the input frame rate is 29.97fps,
  29868. <code>fps=24</code> for 30fps and the (rare) telecined 25fps input.
  29869. </p>
  29870. <p>The filter accepts the following options:
  29871. </p>
  29872. <dl compact="compact">
  29873. <dt><samp>jl</samp></dt>
  29874. <dt><samp>jr</samp></dt>
  29875. <dt><samp>jt</samp></dt>
  29876. <dt><samp>jb</samp></dt>
  29877. <dd><p>These options set the amount of &quot;junk&quot; to ignore at the left, right, top, and
  29878. bottom of the image, respectively. Left and right are in units of 8 pixels,
  29879. while top and bottom are in units of 2 lines.
  29880. The default is 8 pixels on each side.
  29881. </p>
  29882. </dd>
  29883. <dt><samp>sb</samp></dt>
  29884. <dd><p>Set the strict breaks. Setting this option to 1 will reduce the chances of
  29885. filter generating an occasional mismatched frame, but it may also cause an
  29886. excessive number of frames to be dropped during high motion sequences.
  29887. Conversely, setting it to -1 will make filter match fields more easily.
  29888. This may help processing of video where there is slight blurring between
  29889. the fields, but may also cause there to be interlaced frames in the output.
  29890. Default value is <code>0</code>.
  29891. </p>
  29892. </dd>
  29893. <dt><samp>mp</samp></dt>
  29894. <dd><p>Set the metric plane to use. It accepts the following values:
  29895. </p><dl compact="compact">
  29896. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  29897. <dd><p>Use luma plane.
  29898. </p>
  29899. </dd>
  29900. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  29901. <dd><p>Use chroma blue plane.
  29902. </p>
  29903. </dd>
  29904. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  29905. <dd><p>Use chroma red plane.
  29906. </p></dd>
  29907. </dl>
  29908. <p>This option may be set to use chroma plane instead of the default luma plane
  29909. for doing filter&rsquo;s computations. This may improve accuracy on very clean
  29910. source material, but more likely will decrease accuracy, especially if there
  29911. is chroma noise (rainbow effect) or any grayscale video.
  29912. The main purpose of setting <samp>mp</samp> to a chroma plane is to reduce CPU
  29913. load and make pullup usable in realtime on slow machines.
  29914. </p></dd>
  29915. </dl>
  29916. <p>For best results (without duplicated frames in the output file) it is
  29917. necessary to change the output frame rate. For example, to inverse
  29918. telecine NTSC input:
  29919. </p><div class="example">
  29920. <pre class="example">ffmpeg -i input -vf pullup -r 24000/1001 ...
  29921. </pre></div>
  29922. <a name="qp"></a>
  29923. <h3 class="section">32.176 qp<span class="pull-right"><a class="anchor hidden-xs" href="#qp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-qp" aria-hidden="true">TOC</a></span></h3>
  29924. <p>Change video quantization parameters (QP).
  29925. </p>
  29926. <p>The filter accepts the following option:
  29927. </p>
  29928. <dl compact="compact">
  29929. <dt><samp>qp</samp></dt>
  29930. <dd><p>Set expression for quantization parameter.
  29931. </p></dd>
  29932. </dl>
  29933. <p>The expression is evaluated through the eval API and can contain, among others,
  29934. the following constants:
  29935. </p>
  29936. <dl compact="compact">
  29937. <dt><var>known</var></dt>
  29938. <dd><p>1 if index is not 129, 0 otherwise.
  29939. </p>
  29940. </dd>
  29941. <dt><var>qp</var></dt>
  29942. <dd><p>Sequential index starting from -129 to 128.
  29943. </p></dd>
  29944. </dl>
  29945. <a name="Examples-109"></a>
  29946. <h4 class="subsection">32.176.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-109" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-109" aria-hidden="true">TOC</a></span></h4>
  29947. <ul>
  29948. <li> Some equation like:
  29949. <div class="example">
  29950. <pre class="example">qp=2+2*sin(PI*qp)
  29951. </pre></div>
  29952. </li></ul>
  29953. <a name="random"></a>
  29954. <h3 class="section">32.177 random<span class="pull-right"><a class="anchor hidden-xs" href="#random" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-random" aria-hidden="true">TOC</a></span></h3>
  29955. <p>Flush video frames from internal cache of frames into a random order.
  29956. No frame is discarded.
  29957. Inspired by <a href="#frei0r">frei0r</a> nervous filter.
  29958. </p>
  29959. <dl compact="compact">
  29960. <dt><samp>frames</samp></dt>
  29961. <dd><p>Set size in number of frames of internal cache, in range from <code>2</code> to
  29962. <code>512</code>. Default is <code>30</code>.
  29963. </p>
  29964. </dd>
  29965. <dt><samp>seed</samp></dt>
  29966. <dd><p>Set seed for random number generator, must be an integer included between
  29967. <code>0</code> and <code>UINT32_MAX</code>. If not specified, or if explicitly set to
  29968. less than <code>0</code>, the filter will try to use a good random seed on a
  29969. best effort basis.
  29970. </p></dd>
  29971. </dl>
  29972. <a name="readeia608"></a>
  29973. <h3 class="section">32.178 readeia608<span class="pull-right"><a class="anchor hidden-xs" href="#readeia608" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-readeia608" aria-hidden="true">TOC</a></span></h3>
  29974. <p>Read closed captioning (EIA-608) information from the top lines of a video frame.
  29975. </p>
  29976. <p>This filter adds frame metadata for <code>lavfi.readeia608.X.cc</code> and
  29977. <code>lavfi.readeia608.X.line</code>, where <code>X</code> is the number of the identified line
  29978. with EIA-608 data (starting from 0). A description of each metadata value follows:
  29979. </p>
  29980. <dl compact="compact">
  29981. <dt><samp>lavfi.readeia608.X.cc</samp></dt>
  29982. <dd><p>The two bytes stored as EIA-608 data (printed in hexadecimal).
  29983. </p>
  29984. </dd>
  29985. <dt><samp>lavfi.readeia608.X.line</samp></dt>
  29986. <dd><p>The number of the line on which the EIA-608 data was identified and read.
  29987. </p></dd>
  29988. </dl>
  29989. <p>This filter accepts the following options:
  29990. </p>
  29991. <dl compact="compact">
  29992. <dt><samp>scan_min</samp></dt>
  29993. <dd><p>Set the line to start scanning for EIA-608 data. Default is <code>0</code>.
  29994. </p>
  29995. </dd>
  29996. <dt><samp>scan_max</samp></dt>
  29997. <dd><p>Set the line to end scanning for EIA-608 data. Default is <code>29</code>.
  29998. </p>
  29999. </dd>
  30000. <dt><samp>spw</samp></dt>
  30001. <dd><p>Set the ratio of width reserved for sync code detection.
  30002. Default is <code>0.27</code>. Allowed range is <code>[0.1 - 0.7]</code>.
  30003. </p>
  30004. </dd>
  30005. <dt><samp>chp</samp></dt>
  30006. <dd><p>Enable checking the parity bit. In the event of a parity error, the filter will output
  30007. <code>0x00</code> for that character. Default is false.
  30008. </p>
  30009. </dd>
  30010. <dt><samp>lp</samp></dt>
  30011. <dd><p>Lowpass lines prior to further processing. Default is enabled.
  30012. </p></dd>
  30013. </dl>
  30014. <a name="Commands-115"></a>
  30015. <h4 class="subsection">32.178.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-115" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-115" aria-hidden="true">TOC</a></span></h4>
  30016. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  30017. </p>
  30018. <a name="Examples-110"></a>
  30019. <h4 class="subsection">32.178.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-110" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-110" aria-hidden="true">TOC</a></span></h4>
  30020. <ul>
  30021. <li> Output a csv with presentation time and the first two lines of identified EIA-608 captioning data.
  30022. <div class="example">
  30023. <pre class="example">ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pkt_pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv
  30024. </pre></div>
  30025. </li></ul>
  30026. <a name="readvitc"></a>
  30027. <h3 class="section">32.179 readvitc<span class="pull-right"><a class="anchor hidden-xs" href="#readvitc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-readvitc" aria-hidden="true">TOC</a></span></h3>
  30028. <p>Read vertical interval timecode (VITC) information from the top lines of a
  30029. video frame.
  30030. </p>
  30031. <p>The filter adds frame metadata key <code>lavfi.readvitc.tc_str</code> with the
  30032. timecode value, if a valid timecode has been detected. Further metadata key
  30033. <code>lavfi.readvitc.found</code> is set to 0/1 depending on whether
  30034. timecode data has been found or not.
  30035. </p>
  30036. <p>This filter accepts the following options:
  30037. </p>
  30038. <dl compact="compact">
  30039. <dt><samp>scan_max</samp></dt>
  30040. <dd><p>Set the maximum number of lines to scan for VITC data. If the value is set to
  30041. <code>-1</code> the full video frame is scanned. Default is <code>45</code>.
  30042. </p>
  30043. </dd>
  30044. <dt><samp>thr_b</samp></dt>
  30045. <dd><p>Set the luma threshold for black. Accepts float numbers in the range [0.0,1.0],
  30046. default value is <code>0.2</code>. The value must be equal or less than <code>thr_w</code>.
  30047. </p>
  30048. </dd>
  30049. <dt><samp>thr_w</samp></dt>
  30050. <dd><p>Set the luma threshold for white. Accepts float numbers in the range [0.0,1.0],
  30051. default value is <code>0.6</code>. The value must be equal or greater than <code>thr_b</code>.
  30052. </p></dd>
  30053. </dl>
  30054. <a name="Examples-111"></a>
  30055. <h4 class="subsection">32.179.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-111" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-111" aria-hidden="true">TOC</a></span></h4>
  30056. <ul>
  30057. <li> Detect and draw VITC data onto the video frame; if no valid VITC is detected,
  30058. draw <code>--:--:--:--</code> as a placeholder:
  30059. <div class="example">
  30060. <pre class="example">ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--}:x=(w-tw)/2:y=400-ascent'
  30061. </pre></div>
  30062. </li></ul>
  30063. <a name="remap"></a>
  30064. <h3 class="section">32.180 remap<span class="pull-right"><a class="anchor hidden-xs" href="#remap" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-remap" aria-hidden="true">TOC</a></span></h3>
  30065. <p>Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
  30066. </p>
  30067. <p>Destination pixel at position (X, Y) will be picked from source (x, y) position
  30068. where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are out of range, zero
  30069. value for pixel will be used for destination pixel.
  30070. </p>
  30071. <p>Xmap and Ymap input video streams must be of same dimensions. Output video stream
  30072. will have Xmap/Ymap video stream dimensions.
  30073. Xmap and Ymap input video streams are 16bit depth, single channel.
  30074. </p>
  30075. <dl compact="compact">
  30076. <dt><samp>format</samp></dt>
  30077. <dd><p>Specify pixel format of output from this filter. Can be <code>color</code> or <code>gray</code>.
  30078. Default is <code>color</code>.
  30079. </p>
  30080. </dd>
  30081. <dt><samp>fill</samp></dt>
  30082. <dd><p>Specify the color of the unmapped pixels. For the syntax of this option,
  30083. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils
  30084. manual</a>. Default color is <code>black</code>.
  30085. </p></dd>
  30086. </dl>
  30087. <a name="removegrain"></a>
  30088. <h3 class="section">32.181 removegrain<span class="pull-right"><a class="anchor hidden-xs" href="#removegrain" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-removegrain" aria-hidden="true">TOC</a></span></h3>
  30089. <p>The removegrain filter is a spatial denoiser for progressive video.
  30090. </p>
  30091. <dl compact="compact">
  30092. <dt><samp>m0</samp></dt>
  30093. <dd><p>Set mode for the first plane.
  30094. </p>
  30095. </dd>
  30096. <dt><samp>m1</samp></dt>
  30097. <dd><p>Set mode for the second plane.
  30098. </p>
  30099. </dd>
  30100. <dt><samp>m2</samp></dt>
  30101. <dd><p>Set mode for the third plane.
  30102. </p>
  30103. </dd>
  30104. <dt><samp>m3</samp></dt>
  30105. <dd><p>Set mode for the fourth plane.
  30106. </p></dd>
  30107. </dl>
  30108. <p>Range of mode is from 0 to 24. Description of each mode follows:
  30109. </p>
  30110. <dl compact="compact">
  30111. <dt><var>0</var></dt>
  30112. <dd><p>Leave input plane unchanged. Default.
  30113. </p>
  30114. </dd>
  30115. <dt><var>1</var></dt>
  30116. <dd><p>Clips the pixel with the minimum and maximum of the 8 neighbour pixels.
  30117. </p>
  30118. </dd>
  30119. <dt><var>2</var></dt>
  30120. <dd><p>Clips the pixel with the second minimum and maximum of the 8 neighbour pixels.
  30121. </p>
  30122. </dd>
  30123. <dt><var>3</var></dt>
  30124. <dd><p>Clips the pixel with the third minimum and maximum of the 8 neighbour pixels.
  30125. </p>
  30126. </dd>
  30127. <dt><var>4</var></dt>
  30128. <dd><p>Clips the pixel with the fourth minimum and maximum of the 8 neighbour pixels.
  30129. This is equivalent to a median filter.
  30130. </p>
  30131. </dd>
  30132. <dt><var>5</var></dt>
  30133. <dd><p>Line-sensitive clipping giving the minimal change.
  30134. </p>
  30135. </dd>
  30136. <dt><var>6</var></dt>
  30137. <dd><p>Line-sensitive clipping, intermediate.
  30138. </p>
  30139. </dd>
  30140. <dt><var>7</var></dt>
  30141. <dd><p>Line-sensitive clipping, intermediate.
  30142. </p>
  30143. </dd>
  30144. <dt><var>8</var></dt>
  30145. <dd><p>Line-sensitive clipping, intermediate.
  30146. </p>
  30147. </dd>
  30148. <dt><var>9</var></dt>
  30149. <dd><p>Line-sensitive clipping on a line where the neighbours pixels are the closest.
  30150. </p>
  30151. </dd>
  30152. <dt><var>10</var></dt>
  30153. <dd><p>Replaces the target pixel with the closest neighbour.
  30154. </p>
  30155. </dd>
  30156. <dt><var>11</var></dt>
  30157. <dd><p>[1 2 1] horizontal and vertical kernel blur.
  30158. </p>
  30159. </dd>
  30160. <dt><var>12</var></dt>
  30161. <dd><p>Same as mode 11.
  30162. </p>
  30163. </dd>
  30164. <dt><var>13</var></dt>
  30165. <dd><p>Bob mode, interpolates top field from the line where the neighbours
  30166. pixels are the closest.
  30167. </p>
  30168. </dd>
  30169. <dt><var>14</var></dt>
  30170. <dd><p>Bob mode, interpolates bottom field from the line where the neighbours
  30171. pixels are the closest.
  30172. </p>
  30173. </dd>
  30174. <dt><var>15</var></dt>
  30175. <dd><p>Bob mode, interpolates top field. Same as 13 but with a more complicated
  30176. interpolation formula.
  30177. </p>
  30178. </dd>
  30179. <dt><var>16</var></dt>
  30180. <dd><p>Bob mode, interpolates bottom field. Same as 14 but with a more complicated
  30181. interpolation formula.
  30182. </p>
  30183. </dd>
  30184. <dt><var>17</var></dt>
  30185. <dd><p>Clips the pixel with the minimum and maximum of respectively the maximum and
  30186. minimum of each pair of opposite neighbour pixels.
  30187. </p>
  30188. </dd>
  30189. <dt><var>18</var></dt>
  30190. <dd><p>Line-sensitive clipping using opposite neighbours whose greatest distance from
  30191. the current pixel is minimal.
  30192. </p>
  30193. </dd>
  30194. <dt><var>19</var></dt>
  30195. <dd><p>Replaces the pixel with the average of its 8 neighbours.
  30196. </p>
  30197. </dd>
  30198. <dt><var>20</var></dt>
  30199. <dd><p>Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
  30200. </p>
  30201. </dd>
  30202. <dt><var>21</var></dt>
  30203. <dd><p>Clips pixels using the averages of opposite neighbour.
  30204. </p>
  30205. </dd>
  30206. <dt><var>22</var></dt>
  30207. <dd><p>Same as mode 21 but simpler and faster.
  30208. </p>
  30209. </dd>
  30210. <dt><var>23</var></dt>
  30211. <dd><p>Small edge and halo removal, but reputed useless.
  30212. </p>
  30213. </dd>
  30214. <dt><var>24</var></dt>
  30215. <dd><p>Similar as 23.
  30216. </p></dd>
  30217. </dl>
  30218. <a name="removelogo"></a>
  30219. <h3 class="section">32.182 removelogo<span class="pull-right"><a class="anchor hidden-xs" href="#removelogo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-removelogo" aria-hidden="true">TOC</a></span></h3>
  30220. <p>Suppress a TV station logo, using an image file to determine which
  30221. pixels comprise the logo. It works by filling in the pixels that
  30222. comprise the logo with neighboring pixels.
  30223. </p>
  30224. <p>The filter accepts the following options:
  30225. </p>
  30226. <dl compact="compact">
  30227. <dt><samp>filename, f</samp></dt>
  30228. <dd><p>Set the filter bitmap file, which can be any image format supported by
  30229. libavformat. The width and height of the image file must match those of the
  30230. video stream being processed.
  30231. </p></dd>
  30232. </dl>
  30233. <p>Pixels in the provided bitmap image with a value of zero are not
  30234. considered part of the logo, non-zero pixels are considered part of
  30235. the logo. If you use white (255) for the logo and black (0) for the
  30236. rest, you will be safe. For making the filter bitmap, it is
  30237. recommended to take a screen capture of a black frame with the logo
  30238. visible, and then using a threshold filter followed by the erode
  30239. filter once or twice.
  30240. </p>
  30241. <p>If needed, little splotches can be fixed manually. Remember that if
  30242. logo pixels are not covered, the filter quality will be much
  30243. reduced. Marking too many pixels as part of the logo does not hurt as
  30244. much, but it will increase the amount of blurring needed to cover over
  30245. the image and will destroy more information than necessary, and extra
  30246. pixels will slow things down on a large logo.
  30247. </p>
  30248. <a name="repeatfields"></a>
  30249. <h3 class="section">32.183 repeatfields<span class="pull-right"><a class="anchor hidden-xs" href="#repeatfields" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-repeatfields" aria-hidden="true">TOC</a></span></h3>
  30250. <p>This filter uses the repeat_field flag from the Video ES headers and hard repeats
  30251. fields based on its value.
  30252. </p>
  30253. <a name="reverse"></a>
  30254. <h3 class="section">32.184 reverse<span class="pull-right"><a class="anchor hidden-xs" href="#reverse" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-reverse" aria-hidden="true">TOC</a></span></h3>
  30255. <p>Reverse a video clip.
  30256. </p>
  30257. <p>Warning: This filter requires memory to buffer the entire clip, so trimming
  30258. is suggested.
  30259. </p>
  30260. <a name="Examples-112"></a>
  30261. <h4 class="subsection">32.184.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-112" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-112" aria-hidden="true">TOC</a></span></h4>
  30262. <ul>
  30263. <li> Take the first 5 seconds of a clip, and reverse it.
  30264. <div class="example">
  30265. <pre class="example">trim=end=5,reverse
  30266. </pre></div>
  30267. </li></ul>
  30268. <a name="rgbashift"></a>
  30269. <h3 class="section">32.185 rgbashift<span class="pull-right"><a class="anchor hidden-xs" href="#rgbashift" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rgbashift" aria-hidden="true">TOC</a></span></h3>
  30270. <p>Shift R/G/B/A pixels horizontally and/or vertically.
  30271. </p>
  30272. <p>The filter accepts the following options:
  30273. </p><dl compact="compact">
  30274. <dt><samp>rh</samp></dt>
  30275. <dd><p>Set amount to shift red horizontally.
  30276. </p></dd>
  30277. <dt><samp>rv</samp></dt>
  30278. <dd><p>Set amount to shift red vertically.
  30279. </p></dd>
  30280. <dt><samp>gh</samp></dt>
  30281. <dd><p>Set amount to shift green horizontally.
  30282. </p></dd>
  30283. <dt><samp>gv</samp></dt>
  30284. <dd><p>Set amount to shift green vertically.
  30285. </p></dd>
  30286. <dt><samp>bh</samp></dt>
  30287. <dd><p>Set amount to shift blue horizontally.
  30288. </p></dd>
  30289. <dt><samp>bv</samp></dt>
  30290. <dd><p>Set amount to shift blue vertically.
  30291. </p></dd>
  30292. <dt><samp>ah</samp></dt>
  30293. <dd><p>Set amount to shift alpha horizontally.
  30294. </p></dd>
  30295. <dt><samp>av</samp></dt>
  30296. <dd><p>Set amount to shift alpha vertically.
  30297. </p></dd>
  30298. <dt><samp>edge</samp></dt>
  30299. <dd><p>Set edge mode, can be <var>smear</var>, default, or <var>warp</var>.
  30300. </p></dd>
  30301. </dl>
  30302. <a name="Commands-116"></a>
  30303. <h4 class="subsection">32.185.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-116" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-116" aria-hidden="true">TOC</a></span></h4>
  30304. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  30305. </p>
  30306. <a name="roberts"></a>
  30307. <h3 class="section">32.186 roberts<span class="pull-right"><a class="anchor hidden-xs" href="#roberts" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-roberts" aria-hidden="true">TOC</a></span></h3>
  30308. <p>Apply roberts cross operator to input video stream.
  30309. </p>
  30310. <p>The filter accepts the following option:
  30311. </p>
  30312. <dl compact="compact">
  30313. <dt><samp>planes</samp></dt>
  30314. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  30315. By default value 0xf, all planes will be processed.
  30316. </p>
  30317. </dd>
  30318. <dt><samp>scale</samp></dt>
  30319. <dd><p>Set value which will be multiplied with filtered result.
  30320. </p>
  30321. </dd>
  30322. <dt><samp>delta</samp></dt>
  30323. <dd><p>Set value which will be added to filtered result.
  30324. </p></dd>
  30325. </dl>
  30326. <a name="Commands-117"></a>
  30327. <h4 class="subsection">32.186.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-117" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-117" aria-hidden="true">TOC</a></span></h4>
  30328. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  30329. </p>
  30330. <a name="rotate"></a>
  30331. <h3 class="section">32.187 rotate<span class="pull-right"><a class="anchor hidden-xs" href="#rotate" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rotate" aria-hidden="true">TOC</a></span></h3>
  30332. <p>Rotate video by an arbitrary angle expressed in radians.
  30333. </p>
  30334. <p>The filter accepts the following options:
  30335. </p>
  30336. <p>A description of the optional parameters follows.
  30337. </p><dl compact="compact">
  30338. <dt><samp>angle, a</samp></dt>
  30339. <dd><p>Set an expression for the angle by which to rotate the input video
  30340. clockwise, expressed as a number of radians. A negative value will
  30341. result in a counter-clockwise rotation. By default it is set to &quot;0&quot;.
  30342. </p>
  30343. <p>This expression is evaluated for each frame.
  30344. </p>
  30345. </dd>
  30346. <dt><samp>out_w, ow</samp></dt>
  30347. <dd><p>Set the output width expression, default value is &quot;iw&quot;.
  30348. This expression is evaluated just once during configuration.
  30349. </p>
  30350. </dd>
  30351. <dt><samp>out_h, oh</samp></dt>
  30352. <dd><p>Set the output height expression, default value is &quot;ih&quot;.
  30353. This expression is evaluated just once during configuration.
  30354. </p>
  30355. </dd>
  30356. <dt><samp>bilinear</samp></dt>
  30357. <dd><p>Enable bilinear interpolation if set to 1, a value of 0 disables
  30358. it. Default value is 1.
  30359. </p>
  30360. </dd>
  30361. <dt><samp>fillcolor, c</samp></dt>
  30362. <dd><p>Set the color used to fill the output area not covered by the rotated
  30363. image. For the general syntax of this option, check the
  30364. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  30365. If the special value &quot;none&quot; is selected then no
  30366. background is printed (useful for example if the background is never shown).
  30367. </p>
  30368. <p>Default value is &quot;black&quot;.
  30369. </p></dd>
  30370. </dl>
  30371. <p>The expressions for the angle and the output size can contain the
  30372. following constants and functions:
  30373. </p>
  30374. <dl compact="compact">
  30375. <dt><samp>n</samp></dt>
  30376. <dd><p>sequential number of the input frame, starting from 0. It is always NAN
  30377. before the first frame is filtered.
  30378. </p>
  30379. </dd>
  30380. <dt><samp>t</samp></dt>
  30381. <dd><p>time in seconds of the input frame, it is set to 0 when the filter is
  30382. configured. It is always NAN before the first frame is filtered.
  30383. </p>
  30384. </dd>
  30385. <dt><samp>hsub</samp></dt>
  30386. <dt><samp>vsub</samp></dt>
  30387. <dd><p>horizontal and vertical chroma subsample values. For example for the
  30388. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  30389. </p>
  30390. </dd>
  30391. <dt><samp>in_w, iw</samp></dt>
  30392. <dt><samp>in_h, ih</samp></dt>
  30393. <dd><p>the input video width and height
  30394. </p>
  30395. </dd>
  30396. <dt><samp>out_w, ow</samp></dt>
  30397. <dt><samp>out_h, oh</samp></dt>
  30398. <dd><p>the output width and height, that is the size of the padded area as
  30399. specified by the <var>width</var> and <var>height</var> expressions
  30400. </p>
  30401. </dd>
  30402. <dt><samp>rotw(a)</samp></dt>
  30403. <dt><samp>roth(a)</samp></dt>
  30404. <dd><p>the minimal width/height required for completely containing the input
  30405. video rotated by <var>a</var> radians.
  30406. </p>
  30407. <p>These are only available when computing the <samp>out_w</samp> and
  30408. <samp>out_h</samp> expressions.
  30409. </p></dd>
  30410. </dl>
  30411. <a name="Examples-113"></a>
  30412. <h4 class="subsection">32.187.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-113" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-113" aria-hidden="true">TOC</a></span></h4>
  30413. <ul>
  30414. <li> Rotate the input by PI/6 radians clockwise:
  30415. <div class="example">
  30416. <pre class="example">rotate=PI/6
  30417. </pre></div>
  30418. </li><li> Rotate the input by PI/6 radians counter-clockwise:
  30419. <div class="example">
  30420. <pre class="example">rotate=-PI/6
  30421. </pre></div>
  30422. </li><li> Rotate the input by 45 degrees clockwise:
  30423. <div class="example">
  30424. <pre class="example">rotate=45*PI/180
  30425. </pre></div>
  30426. </li><li> Apply a constant rotation with period T, starting from an angle of PI/3:
  30427. <div class="example">
  30428. <pre class="example">rotate=PI/3+2*PI*t/T
  30429. </pre></div>
  30430. </li><li> Make the input video rotation oscillating with a period of T
  30431. seconds and an amplitude of A radians:
  30432. <div class="example">
  30433. <pre class="example">rotate=A*sin(2*PI/T*t)
  30434. </pre></div>
  30435. </li><li> Rotate the video, output size is chosen so that the whole rotating
  30436. input video is always completely contained in the output:
  30437. <div class="example">
  30438. <pre class="example">rotate='2*PI*t:ow=hypot(iw,ih):oh=ow'
  30439. </pre></div>
  30440. </li><li> Rotate the video, reduce the output size so that no background is ever
  30441. shown:
  30442. <div class="example">
  30443. <pre class="example">rotate=2*PI*t:ow='min(iw,ih)/sqrt(2)':oh=ow:c=none
  30444. </pre></div>
  30445. </li></ul>
  30446. <a name="Commands-118"></a>
  30447. <h4 class="subsection">32.187.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-118" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-118" aria-hidden="true">TOC</a></span></h4>
  30448. <p>The filter supports the following commands:
  30449. </p>
  30450. <dl compact="compact">
  30451. <dt><samp>a, angle</samp></dt>
  30452. <dd><p>Set the angle expression.
  30453. The command accepts the same syntax of the corresponding option.
  30454. </p>
  30455. <p>If the specified expression is not valid, it is kept at its current
  30456. value.
  30457. </p></dd>
  30458. </dl>
  30459. <a name="sab"></a>
  30460. <h3 class="section">32.188 sab<span class="pull-right"><a class="anchor hidden-xs" href="#sab" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sab" aria-hidden="true">TOC</a></span></h3>
  30461. <p>Apply Shape Adaptive Blur.
  30462. </p>
  30463. <p>The filter accepts the following options:
  30464. </p>
  30465. <dl compact="compact">
  30466. <dt><samp>luma_radius, lr</samp></dt>
  30467. <dd><p>Set luma blur filter strength, must be a value in range 0.1-4.0, default
  30468. value is 1.0. A greater value will result in a more blurred image, and
  30469. in slower processing.
  30470. </p>
  30471. </dd>
  30472. <dt><samp>luma_pre_filter_radius, lpfr</samp></dt>
  30473. <dd><p>Set luma pre-filter radius, must be a value in the 0.1-2.0 range, default
  30474. value is 1.0.
  30475. </p>
  30476. </dd>
  30477. <dt><samp>luma_strength, ls</samp></dt>
  30478. <dd><p>Set luma maximum difference between pixels to still be considered, must
  30479. be a value in the 0.1-100.0 range, default value is 1.0.
  30480. </p>
  30481. </dd>
  30482. <dt><samp>chroma_radius, cr</samp></dt>
  30483. <dd><p>Set chroma blur filter strength, must be a value in range -0.9-4.0. A
  30484. greater value will result in a more blurred image, and in slower
  30485. processing.
  30486. </p>
  30487. </dd>
  30488. <dt><samp>chroma_pre_filter_radius, cpfr</samp></dt>
  30489. <dd><p>Set chroma pre-filter radius, must be a value in the -0.9-2.0 range.
  30490. </p>
  30491. </dd>
  30492. <dt><samp>chroma_strength, cs</samp></dt>
  30493. <dd><p>Set chroma maximum difference between pixels to still be considered,
  30494. must be a value in the -0.9-100.0 range.
  30495. </p></dd>
  30496. </dl>
  30497. <p>Each chroma option value, if not explicitly specified, is set to the
  30498. corresponding luma option value.
  30499. </p>
  30500. <span id="scale"></span><a name="scale-1"></a>
  30501. <h3 class="section">32.189 scale<span class="pull-right"><a class="anchor hidden-xs" href="#scale-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-scale-1" aria-hidden="true">TOC</a></span></h3>
  30502. <p>Scale (resize) the input video, using the libswscale library.
  30503. </p>
  30504. <p>The scale filter forces the output display aspect ratio to be the same
  30505. of the input, by changing the output sample aspect ratio.
  30506. </p>
  30507. <p>If the input image format is different from the format requested by
  30508. the next filter, the scale filter will convert the input to the
  30509. requested format.
  30510. </p>
  30511. <a name="Options-33"></a>
  30512. <h4 class="subsection">32.189.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-33" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-33" aria-hidden="true">TOC</a></span></h4>
  30513. <p>The filter accepts the following options, or any of the options
  30514. supported by the libswscale scaler.
  30515. </p>
  30516. <p>See <a href="ffmpeg-scaler.html#scaler_005foptions">(ffmpeg-scaler)the ffmpeg-scaler manual</a> for
  30517. the complete list of scaler options.
  30518. </p>
  30519. <dl compact="compact">
  30520. <dt><samp>width, w</samp></dt>
  30521. <dt><samp>height, h</samp></dt>
  30522. <dd><p>Set the output video dimension expression. Default value is the input
  30523. dimension.
  30524. </p>
  30525. <p>If the <var>width</var> or <var>w</var> value is 0, the input width is used for
  30526. the output. If the <var>height</var> or <var>h</var> value is 0, the input height
  30527. is used for the output.
  30528. </p>
  30529. <p>If one and only one of the values is -n with n &gt;= 1, the scale filter
  30530. will use a value that maintains the aspect ratio of the input image,
  30531. calculated from the other specified dimension. After that it will,
  30532. however, make sure that the calculated dimension is divisible by n and
  30533. adjust the value if necessary.
  30534. </p>
  30535. <p>If both values are -n with n &gt;= 1, the behavior will be identical to
  30536. both values being set to 0 as previously detailed.
  30537. </p>
  30538. <p>See below for the list of accepted constants for use in the dimension
  30539. expression.
  30540. </p>
  30541. </dd>
  30542. <dt><samp>eval</samp></dt>
  30543. <dd><p>Specify when to evaluate <var>width</var> and <var>height</var> expression. It accepts the following values:
  30544. </p>
  30545. <dl compact="compact">
  30546. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  30547. <dd><p>Only evaluate expressions once during the filter initialization or when a command is processed.
  30548. </p>
  30549. </dd>
  30550. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  30551. <dd><p>Evaluate expressions for each incoming frame.
  30552. </p>
  30553. </dd>
  30554. </dl>
  30555. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  30556. </p>
  30557. </dd>
  30558. <dt><samp>interl</samp></dt>
  30559. <dd><p>Set the interlacing mode. It accepts the following values:
  30560. </p>
  30561. <dl compact="compact">
  30562. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  30563. <dd><p>Force interlaced aware scaling.
  30564. </p>
  30565. </dd>
  30566. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  30567. <dd><p>Do not apply interlaced scaling.
  30568. </p>
  30569. </dd>
  30570. <dt>&lsquo;<samp>-1</samp>&rsquo;</dt>
  30571. <dd><p>Select interlaced aware scaling depending on whether the source frames
  30572. are flagged as interlaced or not.
  30573. </p></dd>
  30574. </dl>
  30575. <p>Default value is &lsquo;<samp>0</samp>&rsquo;.
  30576. </p>
  30577. </dd>
  30578. <dt><samp>flags</samp></dt>
  30579. <dd><p>Set libswscale scaling flags. See
  30580. <a href="ffmpeg-scaler.html#sws_005fflags">(ffmpeg-scaler)the ffmpeg-scaler manual</a> for the
  30581. complete list of values. If not explicitly specified the filter applies
  30582. the default flags.
  30583. </p>
  30584. </dd>
  30585. <dt><samp>param0, param1</samp></dt>
  30586. <dd><p>Set libswscale input parameters for scaling algorithms that need them. See
  30587. <a href="ffmpeg-scaler.html#sws_005fparams">(ffmpeg-scaler)the ffmpeg-scaler manual</a> for the
  30588. complete documentation. If not explicitly specified the filter applies
  30589. empty parameters.
  30590. </p>
  30591. </dd>
  30592. <dt><samp>size, s</samp></dt>
  30593. <dd><p>Set the video size. For the syntax of this option, check the
  30594. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  30595. </p>
  30596. </dd>
  30597. <dt><samp>in_color_matrix</samp></dt>
  30598. <dt><samp>out_color_matrix</samp></dt>
  30599. <dd><p>Set in/output YCbCr color space type.
  30600. </p>
  30601. <p>This allows the autodetected value to be overridden as well as allows forcing
  30602. a specific value used for the output and encoder.
  30603. </p>
  30604. <p>If not specified, the color space type depends on the pixel format.
  30605. </p>
  30606. <p>Possible values:
  30607. </p>
  30608. <dl compact="compact">
  30609. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  30610. <dd><p>Choose automatically.
  30611. </p>
  30612. </dd>
  30613. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  30614. <dd><p>Format conforming to International Telecommunication Union (ITU)
  30615. Recommendation BT.709.
  30616. </p>
  30617. </dd>
  30618. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  30619. <dd><p>Set color space conforming to the United States Federal Communications
  30620. Commission (FCC) Code of Federal Regulations (CFR) Title 47 (2003) 73.682 (a).
  30621. </p>
  30622. </dd>
  30623. <dt>&lsquo;<samp>bt601</samp>&rsquo;</dt>
  30624. <dt>&lsquo;<samp>bt470</samp>&rsquo;</dt>
  30625. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  30626. <dd><p>Set color space conforming to:
  30627. </p>
  30628. <ul>
  30629. <li> ITU Radiocommunication Sector (ITU-R) Recommendation BT.601
  30630. </li><li> ITU-R Rec. BT.470-6 (1998) Systems B, B1, and G
  30631. </li><li> Society of Motion Picture and Television Engineers (SMPTE) ST 170:2004
  30632. </li></ul>
  30633. </dd>
  30634. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  30635. <dd><p>Set color space conforming to SMPTE ST 240:1999.
  30636. </p>
  30637. </dd>
  30638. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  30639. <dd><p>Set color space conforming to ITU-R BT.2020 non-constant luminance system.
  30640. </p></dd>
  30641. </dl>
  30642. </dd>
  30643. <dt><samp>in_range</samp></dt>
  30644. <dt><samp>out_range</samp></dt>
  30645. <dd><p>Set in/output YCbCr sample range.
  30646. </p>
  30647. <p>This allows the autodetected value to be overridden as well as allows forcing
  30648. a specific value used for the output and encoder. If not specified, the
  30649. range depends on the pixel format. Possible values:
  30650. </p>
  30651. <dl compact="compact">
  30652. <dt>&lsquo;<samp>auto/unknown</samp>&rsquo;</dt>
  30653. <dd><p>Choose automatically.
  30654. </p>
  30655. </dd>
  30656. <dt>&lsquo;<samp>jpeg/full/pc</samp>&rsquo;</dt>
  30657. <dd><p>Set full range (0-255 in case of 8-bit luma).
  30658. </p>
  30659. </dd>
  30660. <dt>&lsquo;<samp>mpeg/limited/tv</samp>&rsquo;</dt>
  30661. <dd><p>Set &quot;MPEG&quot; range (16-235 in case of 8-bit luma).
  30662. </p></dd>
  30663. </dl>
  30664. </dd>
  30665. <dt><samp>force_original_aspect_ratio</samp></dt>
  30666. <dd><p>Enable decreasing or increasing output video width or height if necessary to
  30667. keep the original aspect ratio. Possible values:
  30668. </p>
  30669. <dl compact="compact">
  30670. <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
  30671. <dd><p>Scale the video as specified and disable this feature.
  30672. </p>
  30673. </dd>
  30674. <dt>&lsquo;<samp>decrease</samp>&rsquo;</dt>
  30675. <dd><p>The output video dimensions will automatically be decreased if needed.
  30676. </p>
  30677. </dd>
  30678. <dt>&lsquo;<samp>increase</samp>&rsquo;</dt>
  30679. <dd><p>The output video dimensions will automatically be increased if needed.
  30680. </p>
  30681. </dd>
  30682. </dl>
  30683. <p>One useful instance of this option is that when you know a specific device&rsquo;s
  30684. maximum allowed resolution, you can use this to limit the output video to
  30685. that, while retaining the aspect ratio. For example, device A allows
  30686. 1280x720 playback, and your video is 1920x800. Using this option (set it to
  30687. decrease) and specifying 1280x720 to the command line makes the output
  30688. 1280x533.
  30689. </p>
  30690. <p>Please note that this is a different thing than specifying -1 for <samp>w</samp>
  30691. or <samp>h</samp>, you still need to specify the output resolution for this option
  30692. to work.
  30693. </p>
  30694. </dd>
  30695. <dt><samp>force_divisible_by</samp></dt>
  30696. <dd><p>Ensures that both the output dimensions, width and height, are divisible by the
  30697. given integer when used together with <samp>force_original_aspect_ratio</samp>. This
  30698. works similar to using <code>-n</code> in the <samp>w</samp> and <samp>h</samp> options.
  30699. </p>
  30700. <p>This option respects the value set for <samp>force_original_aspect_ratio</samp>,
  30701. increasing or decreasing the resolution accordingly. The video&rsquo;s aspect ratio
  30702. may be slightly modified.
  30703. </p>
  30704. <p>This option can be handy if you need to have a video fit within or exceed
  30705. a defined resolution using <samp>force_original_aspect_ratio</samp> but also have
  30706. encoder restrictions on width or height divisibility.
  30707. </p>
  30708. </dd>
  30709. </dl>
  30710. <p>The values of the <samp>w</samp> and <samp>h</samp> options are expressions
  30711. containing the following constants:
  30712. </p>
  30713. <dl compact="compact">
  30714. <dt><var>in_w</var></dt>
  30715. <dt><var>in_h</var></dt>
  30716. <dd><p>The input width and height
  30717. </p>
  30718. </dd>
  30719. <dt><var>iw</var></dt>
  30720. <dt><var>ih</var></dt>
  30721. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  30722. </p>
  30723. </dd>
  30724. <dt><var>out_w</var></dt>
  30725. <dt><var>out_h</var></dt>
  30726. <dd><p>The output (scaled) width and height
  30727. </p>
  30728. </dd>
  30729. <dt><var>ow</var></dt>
  30730. <dt><var>oh</var></dt>
  30731. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>
  30732. </p>
  30733. </dd>
  30734. <dt><var>a</var></dt>
  30735. <dd><p>The same as <var>iw</var> / <var>ih</var>
  30736. </p>
  30737. </dd>
  30738. <dt><var>sar</var></dt>
  30739. <dd><p>input sample aspect ratio
  30740. </p>
  30741. </dd>
  30742. <dt><var>dar</var></dt>
  30743. <dd><p>The input display aspect ratio. Calculated from <code>(iw / ih) * sar</code>.
  30744. </p>
  30745. </dd>
  30746. <dt><var>hsub</var></dt>
  30747. <dt><var>vsub</var></dt>
  30748. <dd><p>horizontal and vertical input chroma subsample values. For example for the
  30749. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  30750. </p>
  30751. </dd>
  30752. <dt><var>ohsub</var></dt>
  30753. <dt><var>ovsub</var></dt>
  30754. <dd><p>horizontal and vertical output chroma subsample values. For example for the
  30755. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  30756. </p>
  30757. </dd>
  30758. <dt><var>n</var></dt>
  30759. <dd><p>The (sequential) number of the input frame, starting from 0.
  30760. Only available with <code>eval=frame</code>.
  30761. </p>
  30762. </dd>
  30763. <dt><var>t</var></dt>
  30764. <dd><p>The presentation timestamp of the input frame, expressed as a number of
  30765. seconds. Only available with <code>eval=frame</code>.
  30766. </p>
  30767. </dd>
  30768. <dt><var>pos</var></dt>
  30769. <dd><p>The position (byte offset) of the frame in the input stream, or NaN if
  30770. this information is unavailable and/or meaningless (for example in case of synthetic video).
  30771. Only available with <code>eval=frame</code>.
  30772. </p></dd>
  30773. </dl>
  30774. <a name="Examples-114"></a>
  30775. <h4 class="subsection">32.189.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-114" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-114" aria-hidden="true">TOC</a></span></h4>
  30776. <ul>
  30777. <li> Scale the input video to a size of 200x100
  30778. <div class="example">
  30779. <pre class="example">scale=w=200:h=100
  30780. </pre></div>
  30781. <p>This is equivalent to:
  30782. </p><div class="example">
  30783. <pre class="example">scale=200:100
  30784. </pre></div>
  30785. <p>or:
  30786. </p><div class="example">
  30787. <pre class="example">scale=200x100
  30788. </pre></div>
  30789. </li><li> Specify a size abbreviation for the output size:
  30790. <div class="example">
  30791. <pre class="example">scale=qcif
  30792. </pre></div>
  30793. <p>which can also be written as:
  30794. </p><div class="example">
  30795. <pre class="example">scale=size=qcif
  30796. </pre></div>
  30797. </li><li> Scale the input to 2x:
  30798. <div class="example">
  30799. <pre class="example">scale=w=2*iw:h=2*ih
  30800. </pre></div>
  30801. </li><li> The above is the same as:
  30802. <div class="example">
  30803. <pre class="example">scale=2*in_w:2*in_h
  30804. </pre></div>
  30805. </li><li> Scale the input to 2x with forced interlaced scaling:
  30806. <div class="example">
  30807. <pre class="example">scale=2*iw:2*ih:interl=1
  30808. </pre></div>
  30809. </li><li> Scale the input to half size:
  30810. <div class="example">
  30811. <pre class="example">scale=w=iw/2:h=ih/2
  30812. </pre></div>
  30813. </li><li> Increase the width, and set the height to the same size:
  30814. <div class="example">
  30815. <pre class="example">scale=3/2*iw:ow
  30816. </pre></div>
  30817. </li><li> Seek Greek harmony:
  30818. <div class="example">
  30819. <pre class="example">scale=iw:1/PHI*iw
  30820. scale=ih*PHI:ih
  30821. </pre></div>
  30822. </li><li> Increase the height, and set the width to 3/2 of the height:
  30823. <div class="example">
  30824. <pre class="example">scale=w=3/2*oh:h=3/5*ih
  30825. </pre></div>
  30826. </li><li> Increase the size, making the size a multiple of the chroma
  30827. subsample values:
  30828. <div class="example">
  30829. <pre class="example">scale=&quot;trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub&quot;
  30830. </pre></div>
  30831. </li><li> Increase the width to a maximum of 500 pixels,
  30832. keeping the same aspect ratio as the input:
  30833. <div class="example">
  30834. <pre class="example">scale=w='min(500\, iw*3/2):h=-1'
  30835. </pre></div>
  30836. </li><li> Make pixels square by combining scale and setsar:
  30837. <div class="example">
  30838. <pre class="example">scale='trunc(ih*dar):ih',setsar=1/1
  30839. </pre></div>
  30840. </li><li> Make pixels square by combining scale and setsar,
  30841. making sure the resulting resolution is even (required by some codecs):
  30842. <div class="example">
  30843. <pre class="example">scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
  30844. </pre></div>
  30845. </li></ul>
  30846. <a name="Commands-119"></a>
  30847. <h4 class="subsection">32.189.3 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-119" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-119" aria-hidden="true">TOC</a></span></h4>
  30848. <p>This filter supports the following commands:
  30849. </p><dl compact="compact">
  30850. <dt><samp>width, w</samp></dt>
  30851. <dt><samp>height, h</samp></dt>
  30852. <dd><p>Set the output video dimension expression.
  30853. The command accepts the same syntax of the corresponding option.
  30854. </p>
  30855. <p>If the specified expression is not valid, it is kept at its current
  30856. value.
  30857. </p></dd>
  30858. </dl>
  30859. <a name="scale_005fnpp"></a>
  30860. <h3 class="section">32.190 scale_npp<span class="pull-right"><a class="anchor hidden-xs" href="#scale_005fnpp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-scale_005fnpp" aria-hidden="true">TOC</a></span></h3>
  30861. <p>Use the NVIDIA Performance Primitives (libnpp) to perform scaling and/or pixel
  30862. format conversion on CUDA video frames. Setting the output width and height
  30863. works in the same way as for the <var>scale</var> filter.
  30864. </p>
  30865. <p>The following additional options are accepted:
  30866. </p><dl compact="compact">
  30867. <dt><samp>format</samp></dt>
  30868. <dd><p>The pixel format of the output CUDA frames. If set to the string &quot;same&quot; (the
  30869. default), the input format will be kept. Note that automatic format negotiation
  30870. and conversion is not yet supported for hardware frames
  30871. </p>
  30872. </dd>
  30873. <dt><samp>interp_algo</samp></dt>
  30874. <dd><p>The interpolation algorithm used for resizing. One of the following:
  30875. </p><dl compact="compact">
  30876. <dt><samp>nn</samp></dt>
  30877. <dd><p>Nearest neighbour.
  30878. </p>
  30879. </dd>
  30880. <dt><samp>linear</samp></dt>
  30881. <dt><samp>cubic</samp></dt>
  30882. <dt><samp>cubic2p_bspline</samp></dt>
  30883. <dd><p>2-parameter cubic (B=1, C=0)
  30884. </p>
  30885. </dd>
  30886. <dt><samp>cubic2p_catmullrom</samp></dt>
  30887. <dd><p>2-parameter cubic (B=0, C=1/2)
  30888. </p>
  30889. </dd>
  30890. <dt><samp>cubic2p_b05c03</samp></dt>
  30891. <dd><p>2-parameter cubic (B=1/2, C=3/10)
  30892. </p>
  30893. </dd>
  30894. <dt><samp>super</samp></dt>
  30895. <dd><p>Supersampling
  30896. </p>
  30897. </dd>
  30898. <dt><samp>lanczos</samp></dt>
  30899. </dl>
  30900. </dd>
  30901. <dt><samp>force_original_aspect_ratio</samp></dt>
  30902. <dd><p>Enable decreasing or increasing output video width or height if necessary to
  30903. keep the original aspect ratio. Possible values:
  30904. </p>
  30905. <dl compact="compact">
  30906. <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
  30907. <dd><p>Scale the video as specified and disable this feature.
  30908. </p>
  30909. </dd>
  30910. <dt>&lsquo;<samp>decrease</samp>&rsquo;</dt>
  30911. <dd><p>The output video dimensions will automatically be decreased if needed.
  30912. </p>
  30913. </dd>
  30914. <dt>&lsquo;<samp>increase</samp>&rsquo;</dt>
  30915. <dd><p>The output video dimensions will automatically be increased if needed.
  30916. </p>
  30917. </dd>
  30918. </dl>
  30919. <p>One useful instance of this option is that when you know a specific device&rsquo;s
  30920. maximum allowed resolution, you can use this to limit the output video to
  30921. that, while retaining the aspect ratio. For example, device A allows
  30922. 1280x720 playback, and your video is 1920x800. Using this option (set it to
  30923. decrease) and specifying 1280x720 to the command line makes the output
  30924. 1280x533.
  30925. </p>
  30926. <p>Please note that this is a different thing than specifying -1 for <samp>w</samp>
  30927. or <samp>h</samp>, you still need to specify the output resolution for this option
  30928. to work.
  30929. </p>
  30930. </dd>
  30931. <dt><samp>force_divisible_by</samp></dt>
  30932. <dd><p>Ensures that both the output dimensions, width and height, are divisible by the
  30933. given integer when used together with <samp>force_original_aspect_ratio</samp>. This
  30934. works similar to using <code>-n</code> in the <samp>w</samp> and <samp>h</samp> options.
  30935. </p>
  30936. <p>This option respects the value set for <samp>force_original_aspect_ratio</samp>,
  30937. increasing or decreasing the resolution accordingly. The video&rsquo;s aspect ratio
  30938. may be slightly modified.
  30939. </p>
  30940. <p>This option can be handy if you need to have a video fit within or exceed
  30941. a defined resolution using <samp>force_original_aspect_ratio</samp> but also have
  30942. encoder restrictions on width or height divisibility.
  30943. </p>
  30944. </dd>
  30945. </dl>
  30946. <a name="scale2ref"></a>
  30947. <h3 class="section">32.191 scale2ref<span class="pull-right"><a class="anchor hidden-xs" href="#scale2ref" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-scale2ref" aria-hidden="true">TOC</a></span></h3>
  30948. <p>Scale (resize) the input video, based on a reference video.
  30949. </p>
  30950. <p>See the scale filter for available options, scale2ref supports the same but
  30951. uses the reference video instead of the main input as basis. scale2ref also
  30952. supports the following additional constants for the <samp>w</samp> and
  30953. <samp>h</samp> options:
  30954. </p>
  30955. <dl compact="compact">
  30956. <dt><var>main_w</var></dt>
  30957. <dt><var>main_h</var></dt>
  30958. <dd><p>The main input video&rsquo;s width and height
  30959. </p>
  30960. </dd>
  30961. <dt><var>main_a</var></dt>
  30962. <dd><p>The same as <var>main_w</var> / <var>main_h</var>
  30963. </p>
  30964. </dd>
  30965. <dt><var>main_sar</var></dt>
  30966. <dd><p>The main input video&rsquo;s sample aspect ratio
  30967. </p>
  30968. </dd>
  30969. <dt><var>main_dar, mdar</var></dt>
  30970. <dd><p>The main input video&rsquo;s display aspect ratio. Calculated from
  30971. <code>(main_w / main_h) * main_sar</code>.
  30972. </p>
  30973. </dd>
  30974. <dt><var>main_hsub</var></dt>
  30975. <dt><var>main_vsub</var></dt>
  30976. <dd><p>The main input video&rsquo;s horizontal and vertical chroma subsample values.
  30977. For example for the pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var>
  30978. is 1.
  30979. </p>
  30980. </dd>
  30981. <dt><var>main_n</var></dt>
  30982. <dd><p>The (sequential) number of the main input frame, starting from 0.
  30983. Only available with <code>eval=frame</code>.
  30984. </p>
  30985. </dd>
  30986. <dt><var>main_t</var></dt>
  30987. <dd><p>The presentation timestamp of the main input frame, expressed as a number of
  30988. seconds. Only available with <code>eval=frame</code>.
  30989. </p>
  30990. </dd>
  30991. <dt><var>main_pos</var></dt>
  30992. <dd><p>The position (byte offset) of the frame in the main input stream, or NaN if
  30993. this information is unavailable and/or meaningless (for example in case of synthetic video).
  30994. Only available with <code>eval=frame</code>.
  30995. </p></dd>
  30996. </dl>
  30997. <a name="Examples-115"></a>
  30998. <h4 class="subsection">32.191.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-115" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-115" aria-hidden="true">TOC</a></span></h4>
  30999. <ul>
  31000. <li> Scale a subtitle stream (b) to match the main video (a) in size before overlaying
  31001. <div class="example">
  31002. <pre class="example">'scale2ref[b][a];[a][b]overlay'
  31003. </pre></div>
  31004. </li><li> Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio.
  31005. <div class="example">
  31006. <pre class="example">[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
  31007. </pre></div>
  31008. </li></ul>
  31009. <a name="Commands-120"></a>
  31010. <h4 class="subsection">32.191.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-120" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-120" aria-hidden="true">TOC</a></span></h4>
  31011. <p>This filter supports the following commands:
  31012. </p><dl compact="compact">
  31013. <dt><samp>width, w</samp></dt>
  31014. <dt><samp>height, h</samp></dt>
  31015. <dd><p>Set the output video dimension expression.
  31016. The command accepts the same syntax of the corresponding option.
  31017. </p>
  31018. <p>If the specified expression is not valid, it is kept at its current
  31019. value.
  31020. </p></dd>
  31021. </dl>
  31022. <a name="scroll"></a>
  31023. <h3 class="section">32.192 scroll<span class="pull-right"><a class="anchor hidden-xs" href="#scroll" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-scroll" aria-hidden="true">TOC</a></span></h3>
  31024. <p>Scroll input video horizontally and/or vertically by constant speed.
  31025. </p>
  31026. <p>The filter accepts the following options:
  31027. </p><dl compact="compact">
  31028. <dt><samp>horizontal, h</samp></dt>
  31029. <dd><p>Set the horizontal scrolling speed. Default is 0. Allowed range is from -1 to 1.
  31030. Negative values changes scrolling direction.
  31031. </p>
  31032. </dd>
  31033. <dt><samp>vertical, v</samp></dt>
  31034. <dd><p>Set the vertical scrolling speed. Default is 0. Allowed range is from -1 to 1.
  31035. Negative values changes scrolling direction.
  31036. </p>
  31037. </dd>
  31038. <dt><samp>hpos</samp></dt>
  31039. <dd><p>Set the initial horizontal scrolling position. Default is 0. Allowed range is from 0 to 1.
  31040. </p>
  31041. </dd>
  31042. <dt><samp>vpos</samp></dt>
  31043. <dd><p>Set the initial vertical scrolling position. Default is 0. Allowed range is from 0 to 1.
  31044. </p></dd>
  31045. </dl>
  31046. <a name="Commands-121"></a>
  31047. <h4 class="subsection">32.192.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-121" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-121" aria-hidden="true">TOC</a></span></h4>
  31048. <p>This filter supports the following <a href="#commands">commands</a>:
  31049. </p><dl compact="compact">
  31050. <dt><samp>horizontal, h</samp></dt>
  31051. <dd><p>Set the horizontal scrolling speed.
  31052. </p></dd>
  31053. <dt><samp>vertical, v</samp></dt>
  31054. <dd><p>Set the vertical scrolling speed.
  31055. </p></dd>
  31056. </dl>
  31057. <span id="scdet"></span><a name="scdet-1"></a>
  31058. <h3 class="section">32.193 scdet<span class="pull-right"><a class="anchor hidden-xs" href="#scdet-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-scdet-1" aria-hidden="true">TOC</a></span></h3>
  31059. <p>Detect video scene change.
  31060. </p>
  31061. <p>This filter sets frame metadata with mafd between frame, the scene score, and
  31062. forward the frame to the next filter, so they can use these metadata to detect
  31063. scene change or others.
  31064. </p>
  31065. <p>In addition, this filter logs a message and sets frame metadata when it detects
  31066. a scene change by <samp>threshold</samp>.
  31067. </p>
  31068. <p><code>lavfi.scd.mafd</code> metadata keys are set with mafd for every frame.
  31069. </p>
  31070. <p><code>lavfi.scd.score</code> metadata keys are set with scene change score for every frame
  31071. to detect scene change.
  31072. </p>
  31073. <p><code>lavfi.scd.time</code> metadata keys are set with current filtered frame time which
  31074. detect scene change with <samp>threshold</samp>.
  31075. </p>
  31076. <p>The filter accepts the following options:
  31077. </p>
  31078. <dl compact="compact">
  31079. <dt><samp>threshold, t</samp></dt>
  31080. <dd><p>Set the scene change detection threshold as a percentage of maximum change. Good
  31081. values are in the <code>[8.0, 14.0]</code> range. The range for <samp>threshold</samp> is
  31082. <code>[0., 100.]</code>.
  31083. </p>
  31084. <p>Default value is <code>10.</code>.
  31085. </p>
  31086. </dd>
  31087. <dt><samp>sc_pass, s</samp></dt>
  31088. <dd><p>Set the flag to pass scene change frames to the next filter. Default value is <code>0</code>
  31089. You can enable it if you want to get snapshot of scene change frames only.
  31090. </p></dd>
  31091. </dl>
  31092. <span id="selectivecolor"></span><a name="selectivecolor-1"></a>
  31093. <h3 class="section">32.194 selectivecolor<span class="pull-right"><a class="anchor hidden-xs" href="#selectivecolor-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-selectivecolor-1" aria-hidden="true">TOC</a></span></h3>
  31094. <p>Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of colors (such
  31095. as &quot;reds&quot;, &quot;yellows&quot;, &quot;greens&quot;, &quot;cyans&quot;, ...). The adjustment range is defined
  31096. by the &quot;purity&quot; of the color (that is, how saturated it already is).
  31097. </p>
  31098. <p>This filter is similar to the Adobe Photoshop Selective Color tool.
  31099. </p>
  31100. <p>The filter accepts the following options:
  31101. </p>
  31102. <dl compact="compact">
  31103. <dt><samp>correction_method</samp></dt>
  31104. <dd><p>Select color correction method.
  31105. </p>
  31106. <p>Available values are:
  31107. </p><dl compact="compact">
  31108. <dt>&lsquo;<samp>absolute</samp>&rsquo;</dt>
  31109. <dd><p>Specified adjustments are applied &quot;as-is&quot; (added/subtracted to original pixel
  31110. component value).
  31111. </p></dd>
  31112. <dt>&lsquo;<samp>relative</samp>&rsquo;</dt>
  31113. <dd><p>Specified adjustments are relative to the original component value.
  31114. </p></dd>
  31115. </dl>
  31116. <p>Default is <code>absolute</code>.
  31117. </p></dd>
  31118. <dt><samp>reds</samp></dt>
  31119. <dd><p>Adjustments for red pixels (pixels where the red component is the maximum)
  31120. </p></dd>
  31121. <dt><samp>yellows</samp></dt>
  31122. <dd><p>Adjustments for yellow pixels (pixels where the blue component is the minimum)
  31123. </p></dd>
  31124. <dt><samp>greens</samp></dt>
  31125. <dd><p>Adjustments for green pixels (pixels where the green component is the maximum)
  31126. </p></dd>
  31127. <dt><samp>cyans</samp></dt>
  31128. <dd><p>Adjustments for cyan pixels (pixels where the red component is the minimum)
  31129. </p></dd>
  31130. <dt><samp>blues</samp></dt>
  31131. <dd><p>Adjustments for blue pixels (pixels where the blue component is the maximum)
  31132. </p></dd>
  31133. <dt><samp>magentas</samp></dt>
  31134. <dd><p>Adjustments for magenta pixels (pixels where the green component is the minimum)
  31135. </p></dd>
  31136. <dt><samp>whites</samp></dt>
  31137. <dd><p>Adjustments for white pixels (pixels where all components are greater than 128)
  31138. </p></dd>
  31139. <dt><samp>neutrals</samp></dt>
  31140. <dd><p>Adjustments for all pixels except pure black and pure white
  31141. </p></dd>
  31142. <dt><samp>blacks</samp></dt>
  31143. <dd><p>Adjustments for black pixels (pixels where all components are lesser than 128)
  31144. </p></dd>
  31145. <dt><samp>psfile</samp></dt>
  31146. <dd><p>Specify a Photoshop selective color file (<code>.asv</code>) to import the settings from.
  31147. </p></dd>
  31148. </dl>
  31149. <p>All the adjustment settings (<samp>reds</samp>, <samp>yellows</samp>, ...) accept up to
  31150. 4 space separated floating point adjustment values in the [-1,1] range,
  31151. respectively to adjust the amount of cyan, magenta, yellow and black for the
  31152. pixels of its range.
  31153. </p>
  31154. <a name="Examples-116"></a>
  31155. <h4 class="subsection">32.194.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-116" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-116" aria-hidden="true">TOC</a></span></h4>
  31156. <ul>
  31157. <li> Increase cyan by 50% and reduce yellow by 33% in every green areas, and
  31158. increase magenta by 27% in blue areas:
  31159. <div class="example">
  31160. <pre class="example">selectivecolor=greens=.5 0 -.33 0:blues=0 .27
  31161. </pre></div>
  31162. </li><li> Use a Photoshop selective color preset:
  31163. <div class="example">
  31164. <pre class="example">selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
  31165. </pre></div>
  31166. </li></ul>
  31167. <span id="separatefields"></span><a name="separatefields-1"></a>
  31168. <h3 class="section">32.195 separatefields<span class="pull-right"><a class="anchor hidden-xs" href="#separatefields-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-separatefields-1" aria-hidden="true">TOC</a></span></h3>
  31169. <p>The <code>separatefields</code> takes a frame-based video input and splits
  31170. each frame into its components fields, producing a new half height clip
  31171. with twice the frame rate and twice the frame count.
  31172. </p>
  31173. <p>This filter use field-dominance information in frame to decide which
  31174. of each pair of fields to place first in the output.
  31175. If it gets it wrong use <a href="#setfield">setfield</a> filter before <code>separatefields</code> filter.
  31176. </p>
  31177. <a name="setdar_002c-setsar"></a>
  31178. <h3 class="section">32.196 setdar, setsar<span class="pull-right"><a class="anchor hidden-xs" href="#setdar_002c-setsar" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-setdar_002c-setsar" aria-hidden="true">TOC</a></span></h3>
  31179. <p>The <code>setdar</code> filter sets the Display Aspect Ratio for the filter
  31180. output video.
  31181. </p>
  31182. <p>This is done by changing the specified Sample (aka Pixel) Aspect
  31183. Ratio, according to the following equation:
  31184. </p><div class="example">
  31185. <pre class="example"><var>DAR</var> = <var>HORIZONTAL_RESOLUTION</var> / <var>VERTICAL_RESOLUTION</var> * <var>SAR</var>
  31186. </pre></div>
  31187. <p>Keep in mind that the <code>setdar</code> filter does not modify the pixel
  31188. dimensions of the video frame. Also, the display aspect ratio set by
  31189. this filter may be changed by later filters in the filterchain,
  31190. e.g. in case of scaling or if another &quot;setdar&quot; or a &quot;setsar&quot; filter is
  31191. applied.
  31192. </p>
  31193. <p>The <code>setsar</code> filter sets the Sample (aka Pixel) Aspect Ratio for
  31194. the filter output video.
  31195. </p>
  31196. <p>Note that as a consequence of the application of this filter, the
  31197. output display aspect ratio will change according to the equation
  31198. above.
  31199. </p>
  31200. <p>Keep in mind that the sample aspect ratio set by the <code>setsar</code>
  31201. filter may be changed by later filters in the filterchain, e.g. if
  31202. another &quot;setsar&quot; or a &quot;setdar&quot; filter is applied.
  31203. </p>
  31204. <p>It accepts the following parameters:
  31205. </p>
  31206. <dl compact="compact">
  31207. <dt><samp>r, ratio, dar (<code>setdar</code> only), sar (<code>setsar</code> only)</samp></dt>
  31208. <dd><p>Set the aspect ratio used by the filter.
  31209. </p>
  31210. <p>The parameter can be a floating point number string, an expression, or
  31211. a string of the form <var>num</var>:<var>den</var>, where <var>num</var> and
  31212. <var>den</var> are the numerator and denominator of the aspect ratio. If
  31213. the parameter is not specified, it is assumed the value &quot;0&quot;.
  31214. In case the form &quot;<var>num</var>:<var>den</var>&quot; is used, the <code>:</code> character
  31215. should be escaped.
  31216. </p>
  31217. </dd>
  31218. <dt><samp>max</samp></dt>
  31219. <dd><p>Set the maximum integer value to use for expressing numerator and
  31220. denominator when reducing the expressed aspect ratio to a rational.
  31221. Default value is <code>100</code>.
  31222. </p>
  31223. </dd>
  31224. </dl>
  31225. <p>The parameter <var>sar</var> is an expression containing
  31226. the following constants:
  31227. </p>
  31228. <dl compact="compact">
  31229. <dt><samp>E, PI, PHI</samp></dt>
  31230. <dd><p>These are approximated values for the mathematical constants e
  31231. (Euler&rsquo;s number), pi (Greek pi), and phi (the golden ratio).
  31232. </p>
  31233. </dd>
  31234. <dt><samp>w, h</samp></dt>
  31235. <dd><p>The input width and height.
  31236. </p>
  31237. </dd>
  31238. <dt><samp>a</samp></dt>
  31239. <dd><p>These are the same as <var>w</var> / <var>h</var>.
  31240. </p>
  31241. </dd>
  31242. <dt><samp>sar</samp></dt>
  31243. <dd><p>The input sample aspect ratio.
  31244. </p>
  31245. </dd>
  31246. <dt><samp>dar</samp></dt>
  31247. <dd><p>The input display aspect ratio. It is the same as
  31248. (<var>w</var> / <var>h</var>) * <var>sar</var>.
  31249. </p>
  31250. </dd>
  31251. <dt><samp>hsub, vsub</samp></dt>
  31252. <dd><p>Horizontal and vertical chroma subsample values. For example, for the
  31253. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  31254. </p></dd>
  31255. </dl>
  31256. <a name="Examples-117"></a>
  31257. <h4 class="subsection">32.196.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-117" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-117" aria-hidden="true">TOC</a></span></h4>
  31258. <ul>
  31259. <li> To change the display aspect ratio to 16:9, specify one of the following:
  31260. <div class="example">
  31261. <pre class="example">setdar=dar=1.77777
  31262. setdar=dar=16/9
  31263. </pre></div>
  31264. </li><li> To change the sample aspect ratio to 10:11, specify:
  31265. <div class="example">
  31266. <pre class="example">setsar=sar=10/11
  31267. </pre></div>
  31268. </li><li> To set a display aspect ratio of 16:9, and specify a maximum integer value of
  31269. 1000 in the aspect ratio reduction, use the command:
  31270. <div class="example">
  31271. <pre class="example">setdar=ratio=16/9:max=1000
  31272. </pre></div>
  31273. </li></ul>
  31274. <span id="setfield"></span><a name="setfield-1"></a>
  31275. <h3 class="section">32.197 setfield<span class="pull-right"><a class="anchor hidden-xs" href="#setfield-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-setfield-1" aria-hidden="true">TOC</a></span></h3>
  31276. <p>Force field for the output video frame.
  31277. </p>
  31278. <p>The <code>setfield</code> filter marks the interlace type field for the
  31279. output frames. It does not change the input frame, but only sets the
  31280. corresponding property, which affects how the frame is treated by
  31281. following filters (e.g. <code>fieldorder</code> or <code>yadif</code>).
  31282. </p>
  31283. <p>The filter accepts the following options:
  31284. </p>
  31285. <dl compact="compact">
  31286. <dt><samp>mode</samp></dt>
  31287. <dd><p>Available values are:
  31288. </p>
  31289. <dl compact="compact">
  31290. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  31291. <dd><p>Keep the same field property.
  31292. </p>
  31293. </dd>
  31294. <dt>&lsquo;<samp>bff</samp>&rsquo;</dt>
  31295. <dd><p>Mark the frame as bottom-field-first.
  31296. </p>
  31297. </dd>
  31298. <dt>&lsquo;<samp>tff</samp>&rsquo;</dt>
  31299. <dd><p>Mark the frame as top-field-first.
  31300. </p>
  31301. </dd>
  31302. <dt>&lsquo;<samp>prog</samp>&rsquo;</dt>
  31303. <dd><p>Mark the frame as progressive.
  31304. </p></dd>
  31305. </dl>
  31306. </dd>
  31307. </dl>
  31308. <span id="setparams"></span><a name="setparams-1"></a>
  31309. <h3 class="section">32.198 setparams<span class="pull-right"><a class="anchor hidden-xs" href="#setparams-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-setparams-1" aria-hidden="true">TOC</a></span></h3>
  31310. <p>Force frame parameter for the output video frame.
  31311. </p>
  31312. <p>The <code>setparams</code> filter marks interlace and color range for the
  31313. output frames. It does not change the input frame, but only sets the
  31314. corresponding property, which affects how the frame is treated by
  31315. filters/encoders.
  31316. </p>
  31317. <dl compact="compact">
  31318. <dt><samp>field_mode</samp></dt>
  31319. <dd><p>Available values are:
  31320. </p>
  31321. <dl compact="compact">
  31322. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  31323. <dd><p>Keep the same field property (default).
  31324. </p>
  31325. </dd>
  31326. <dt>&lsquo;<samp>bff</samp>&rsquo;</dt>
  31327. <dd><p>Mark the frame as bottom-field-first.
  31328. </p>
  31329. </dd>
  31330. <dt>&lsquo;<samp>tff</samp>&rsquo;</dt>
  31331. <dd><p>Mark the frame as top-field-first.
  31332. </p>
  31333. </dd>
  31334. <dt>&lsquo;<samp>prog</samp>&rsquo;</dt>
  31335. <dd><p>Mark the frame as progressive.
  31336. </p></dd>
  31337. </dl>
  31338. </dd>
  31339. <dt><samp>range</samp></dt>
  31340. <dd><p>Available values are:
  31341. </p>
  31342. <dl compact="compact">
  31343. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  31344. <dd><p>Keep the same color range property (default).
  31345. </p>
  31346. </dd>
  31347. <dt>&lsquo;<samp>unspecified, unknown</samp>&rsquo;</dt>
  31348. <dd><p>Mark the frame as unspecified color range.
  31349. </p>
  31350. </dd>
  31351. <dt>&lsquo;<samp>limited, tv, mpeg</samp>&rsquo;</dt>
  31352. <dd><p>Mark the frame as limited range.
  31353. </p>
  31354. </dd>
  31355. <dt>&lsquo;<samp>full, pc, jpeg</samp>&rsquo;</dt>
  31356. <dd><p>Mark the frame as full range.
  31357. </p></dd>
  31358. </dl>
  31359. </dd>
  31360. <dt><samp>color_primaries</samp></dt>
  31361. <dd><p>Set the color primaries.
  31362. Available values are:
  31363. </p>
  31364. <dl compact="compact">
  31365. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  31366. <dd><p>Keep the same color primaries property (default).
  31367. </p>
  31368. </dd>
  31369. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  31370. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  31371. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  31372. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  31373. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  31374. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  31375. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  31376. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  31377. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  31378. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  31379. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  31380. <dt>&lsquo;<samp>jedec-p22</samp>&rsquo;</dt>
  31381. </dl>
  31382. </dd>
  31383. <dt><samp>color_trc</samp></dt>
  31384. <dd><p>Set the color transfer.
  31385. Available values are:
  31386. </p>
  31387. <dl compact="compact">
  31388. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  31389. <dd><p>Keep the same color trc property (default).
  31390. </p>
  31391. </dd>
  31392. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  31393. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  31394. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  31395. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  31396. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  31397. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  31398. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  31399. <dt>&lsquo;<samp>log100</samp>&rsquo;</dt>
  31400. <dt>&lsquo;<samp>log316</samp>&rsquo;</dt>
  31401. <dt>&lsquo;<samp>iec61966-2-4</samp>&rsquo;</dt>
  31402. <dt>&lsquo;<samp>bt1361e</samp>&rsquo;</dt>
  31403. <dt>&lsquo;<samp>iec61966-2-1</samp>&rsquo;</dt>
  31404. <dt>&lsquo;<samp>bt2020-10</samp>&rsquo;</dt>
  31405. <dt>&lsquo;<samp>bt2020-12</samp>&rsquo;</dt>
  31406. <dt>&lsquo;<samp>smpte2084</samp>&rsquo;</dt>
  31407. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  31408. <dt>&lsquo;<samp>arib-std-b67</samp>&rsquo;</dt>
  31409. </dl>
  31410. </dd>
  31411. <dt><samp>colorspace</samp></dt>
  31412. <dd><p>Set the colorspace.
  31413. Available values are:
  31414. </p>
  31415. <dl compact="compact">
  31416. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  31417. <dd><p>Keep the same colorspace property (default).
  31418. </p>
  31419. </dd>
  31420. <dt>&lsquo;<samp>gbr</samp>&rsquo;</dt>
  31421. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  31422. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  31423. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  31424. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  31425. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  31426. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  31427. <dt>&lsquo;<samp>ycgco</samp>&rsquo;</dt>
  31428. <dt>&lsquo;<samp>bt2020nc</samp>&rsquo;</dt>
  31429. <dt>&lsquo;<samp>bt2020c</samp>&rsquo;</dt>
  31430. <dt>&lsquo;<samp>smpte2085</samp>&rsquo;</dt>
  31431. <dt>&lsquo;<samp>chroma-derived-nc</samp>&rsquo;</dt>
  31432. <dt>&lsquo;<samp>chroma-derived-c</samp>&rsquo;</dt>
  31433. <dt>&lsquo;<samp>ictcp</samp>&rsquo;</dt>
  31434. </dl>
  31435. </dd>
  31436. </dl>
  31437. <a name="shear"></a>
  31438. <h3 class="section">32.199 shear<span class="pull-right"><a class="anchor hidden-xs" href="#shear" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-shear" aria-hidden="true">TOC</a></span></h3>
  31439. <p>Apply shear transform to input video.
  31440. </p>
  31441. <p>This filter supports the following options:
  31442. </p>
  31443. <dl compact="compact">
  31444. <dt><samp>shx</samp></dt>
  31445. <dd><p>Shear factor in X-direction. Default value is 0.
  31446. Allowed range is from -2 to 2.
  31447. </p>
  31448. </dd>
  31449. <dt><samp>shy</samp></dt>
  31450. <dd><p>Shear factor in Y-direction. Default value is 0.
  31451. Allowed range is from -2 to 2.
  31452. </p>
  31453. </dd>
  31454. <dt><samp>fillcolor, c</samp></dt>
  31455. <dd><p>Set the color used to fill the output area not covered by the transformed
  31456. video. For the general syntax of this option, check the
  31457. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  31458. If the special value &quot;none&quot; is selected then no
  31459. background is printed (useful for example if the background is never shown).
  31460. </p>
  31461. <p>Default value is &quot;black&quot;.
  31462. </p>
  31463. </dd>
  31464. <dt><samp>interp</samp></dt>
  31465. <dd><p>Set interpolation type. Can be <code>bilinear</code> or <code>nearest</code>. Default is <code>bilinear</code>.
  31466. </p></dd>
  31467. </dl>
  31468. <a name="Commands-122"></a>
  31469. <h4 class="subsection">32.199.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-122" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-122" aria-hidden="true">TOC</a></span></h4>
  31470. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  31471. </p>
  31472. <a name="showinfo"></a>
  31473. <h3 class="section">32.200 showinfo<span class="pull-right"><a class="anchor hidden-xs" href="#showinfo" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showinfo" aria-hidden="true">TOC</a></span></h3>
  31474. <p>Show a line containing various information for each input video frame.
  31475. The input video is not modified.
  31476. </p>
  31477. <p>This filter supports the following options:
  31478. </p>
  31479. <dl compact="compact">
  31480. <dt><samp>checksum</samp></dt>
  31481. <dd><p>Calculate checksums of each plane. By default enabled.
  31482. </p></dd>
  31483. </dl>
  31484. <p>The shown line contains a sequence of key/value pairs of the form
  31485. <var>key</var>:<var>value</var>.
  31486. </p>
  31487. <p>The following values are shown in the output:
  31488. </p>
  31489. <dl compact="compact">
  31490. <dt><samp>n</samp></dt>
  31491. <dd><p>The (sequential) number of the input frame, starting from 0.
  31492. </p>
  31493. </dd>
  31494. <dt><samp>pts</samp></dt>
  31495. <dd><p>The Presentation TimeStamp of the input frame, expressed as a number of
  31496. time base units. The time base unit depends on the filter input pad.
  31497. </p>
  31498. </dd>
  31499. <dt><samp>pts_time</samp></dt>
  31500. <dd><p>The Presentation TimeStamp of the input frame, expressed as a number of
  31501. seconds.
  31502. </p>
  31503. </dd>
  31504. <dt><samp>pos</samp></dt>
  31505. <dd><p>The position of the frame in the input stream, or -1 if this information is
  31506. unavailable and/or meaningless (for example in case of synthetic video).
  31507. </p>
  31508. </dd>
  31509. <dt><samp>fmt</samp></dt>
  31510. <dd><p>The pixel format name.
  31511. </p>
  31512. </dd>
  31513. <dt><samp>sar</samp></dt>
  31514. <dd><p>The sample aspect ratio of the input frame, expressed in the form
  31515. <var>num</var>/<var>den</var>.
  31516. </p>
  31517. </dd>
  31518. <dt><samp>s</samp></dt>
  31519. <dd><p>The size of the input frame. For the syntax of this option, check the
  31520. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  31521. </p>
  31522. </dd>
  31523. <dt><samp>i</samp></dt>
  31524. <dd><p>The type of interlaced mode (&quot;P&quot; for &quot;progressive&quot;, &quot;T&quot; for top field first, &quot;B&quot;
  31525. for bottom field first).
  31526. </p>
  31527. </dd>
  31528. <dt><samp>iskey</samp></dt>
  31529. <dd><p>This is 1 if the frame is a key frame, 0 otherwise.
  31530. </p>
  31531. </dd>
  31532. <dt><samp>type</samp></dt>
  31533. <dd><p>The picture type of the input frame (&quot;I&quot; for an I-frame, &quot;P&quot; for a
  31534. P-frame, &quot;B&quot; for a B-frame, or &quot;?&quot; for an unknown type).
  31535. Also refer to the documentation of the <code>AVPictureType</code> enum and of
  31536. the <code>av_get_picture_type_char</code> function defined in
  31537. <samp>libavutil/avutil.h</samp>.
  31538. </p>
  31539. </dd>
  31540. <dt><samp>checksum</samp></dt>
  31541. <dd><p>The Adler-32 checksum (printed in hexadecimal) of all the planes of the input frame.
  31542. </p>
  31543. </dd>
  31544. <dt><samp>plane_checksum</samp></dt>
  31545. <dd><p>The Adler-32 checksum (printed in hexadecimal) of each plane of the input frame,
  31546. expressed in the form &quot;[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var>]&quot;.
  31547. </p>
  31548. </dd>
  31549. <dt><samp>mean</samp></dt>
  31550. <dd><p>The mean value of pixels in each plane of the input frame, expressed in the form
  31551. &quot;[<var>mean0</var> <var>mean1</var> <var>mean2</var> <var>mean3</var>]&quot;.
  31552. </p>
  31553. </dd>
  31554. <dt><samp>stdev</samp></dt>
  31555. <dd><p>The standard deviation of pixel values in each plane of the input frame, expressed
  31556. in the form &quot;[<var>stdev0</var> <var>stdev1</var> <var>stdev2</var> <var>stdev3</var>]&quot;.
  31557. </p>
  31558. </dd>
  31559. </dl>
  31560. <a name="showpalette"></a>
  31561. <h3 class="section">32.201 showpalette<span class="pull-right"><a class="anchor hidden-xs" href="#showpalette" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showpalette" aria-hidden="true">TOC</a></span></h3>
  31562. <p>Displays the 256 colors palette of each frame. This filter is only relevant for
  31563. <var>pal8</var> pixel format frames.
  31564. </p>
  31565. <p>It accepts the following option:
  31566. </p>
  31567. <dl compact="compact">
  31568. <dt><samp>s</samp></dt>
  31569. <dd><p>Set the size of the box used to represent one palette color entry. Default is
  31570. <code>30</code> (for a <code>30x30</code> pixel box).
  31571. </p></dd>
  31572. </dl>
  31573. <a name="shuffleframes"></a>
  31574. <h3 class="section">32.202 shuffleframes<span class="pull-right"><a class="anchor hidden-xs" href="#shuffleframes" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-shuffleframes" aria-hidden="true">TOC</a></span></h3>
  31575. <p>Reorder and/or duplicate and/or drop video frames.
  31576. </p>
  31577. <p>It accepts the following parameters:
  31578. </p>
  31579. <dl compact="compact">
  31580. <dt><samp>mapping</samp></dt>
  31581. <dd><p>Set the destination indexes of input frames.
  31582. This is space or &rsquo;|&rsquo; separated list of indexes that maps input frames to output
  31583. frames. Number of indexes also sets maximal value that each index may have.
  31584. &rsquo;-1&rsquo; index have special meaning and that is to drop frame.
  31585. </p></dd>
  31586. </dl>
  31587. <p>The first frame has the index 0. The default is to keep the input unchanged.
  31588. </p>
  31589. <a name="Examples-118"></a>
  31590. <h4 class="subsection">32.202.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-118" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-118" aria-hidden="true">TOC</a></span></h4>
  31591. <ul>
  31592. <li> Swap second and third frame of every three frames of the input:
  31593. <div class="example">
  31594. <pre class="example">ffmpeg -i INPUT -vf &quot;shuffleframes=0 2 1&quot; OUTPUT
  31595. </pre></div>
  31596. </li><li> Swap 10th and 1st frame of every ten frames of the input:
  31597. <div class="example">
  31598. <pre class="example">ffmpeg -i INPUT -vf &quot;shuffleframes=9 1 2 3 4 5 6 7 8 0&quot; OUTPUT
  31599. </pre></div>
  31600. </li></ul>
  31601. <a name="shufflepixels"></a>
  31602. <h3 class="section">32.203 shufflepixels<span class="pull-right"><a class="anchor hidden-xs" href="#shufflepixels" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-shufflepixels" aria-hidden="true">TOC</a></span></h3>
  31603. <p>Reorder pixels in video frames.
  31604. </p>
  31605. <p>This filter accepts the following options:
  31606. </p>
  31607. <dl compact="compact">
  31608. <dt><samp>direction, d</samp></dt>
  31609. <dd><p>Set shuffle direction. Can be forward or inverse direction.
  31610. Default direction is forward.
  31611. </p>
  31612. </dd>
  31613. <dt><samp>mode, m</samp></dt>
  31614. <dd><p>Set shuffle mode. Can be horizontal, vertical or block mode.
  31615. </p>
  31616. </dd>
  31617. <dt><samp>width, w</samp></dt>
  31618. <dt><samp>height, h</samp></dt>
  31619. <dd><p>Set shuffle block_size. In case of horizontal shuffle mode only width
  31620. part of size is used, and in case of vertical shuffle mode only height
  31621. part of size is used.
  31622. </p>
  31623. </dd>
  31624. <dt><samp>seed, s</samp></dt>
  31625. <dd><p>Set random seed used with shuffling pixels. Mainly useful to set to be able
  31626. to reverse filtering process to get original input.
  31627. For example, to reverse forward shuffle you need to use same parameters
  31628. and exact same seed and to set direction to inverse.
  31629. </p></dd>
  31630. </dl>
  31631. <a name="shuffleplanes"></a>
  31632. <h3 class="section">32.204 shuffleplanes<span class="pull-right"><a class="anchor hidden-xs" href="#shuffleplanes" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-shuffleplanes" aria-hidden="true">TOC</a></span></h3>
  31633. <p>Reorder and/or duplicate video planes.
  31634. </p>
  31635. <p>It accepts the following parameters:
  31636. </p>
  31637. <dl compact="compact">
  31638. <dt><samp>map0</samp></dt>
  31639. <dd><p>The index of the input plane to be used as the first output plane.
  31640. </p>
  31641. </dd>
  31642. <dt><samp>map1</samp></dt>
  31643. <dd><p>The index of the input plane to be used as the second output plane.
  31644. </p>
  31645. </dd>
  31646. <dt><samp>map2</samp></dt>
  31647. <dd><p>The index of the input plane to be used as the third output plane.
  31648. </p>
  31649. </dd>
  31650. <dt><samp>map3</samp></dt>
  31651. <dd><p>The index of the input plane to be used as the fourth output plane.
  31652. </p>
  31653. </dd>
  31654. </dl>
  31655. <p>The first plane has the index 0. The default is to keep the input unchanged.
  31656. </p>
  31657. <a name="Examples-119"></a>
  31658. <h4 class="subsection">32.204.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-119" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-119" aria-hidden="true">TOC</a></span></h4>
  31659. <ul>
  31660. <li> Swap the second and third planes of the input:
  31661. <div class="example">
  31662. <pre class="example">ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
  31663. </pre></div>
  31664. </li></ul>
  31665. <span id="signalstats"></span><a name="signalstats-1"></a>
  31666. <h3 class="section">32.205 signalstats<span class="pull-right"><a class="anchor hidden-xs" href="#signalstats-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-signalstats-1" aria-hidden="true">TOC</a></span></h3>
  31667. <p>Evaluate various visual metrics that assist in determining issues associated
  31668. with the digitization of analog video media.
  31669. </p>
  31670. <p>By default the filter will log these metadata values:
  31671. </p>
  31672. <dl compact="compact">
  31673. <dt><samp>YMIN</samp></dt>
  31674. <dd><p>Display the minimal Y value contained within the input frame. Expressed in
  31675. range of [0-255].
  31676. </p>
  31677. </dd>
  31678. <dt><samp>YLOW</samp></dt>
  31679. <dd><p>Display the Y value at the 10% percentile within the input frame. Expressed in
  31680. range of [0-255].
  31681. </p>
  31682. </dd>
  31683. <dt><samp>YAVG</samp></dt>
  31684. <dd><p>Display the average Y value within the input frame. Expressed in range of
  31685. [0-255].
  31686. </p>
  31687. </dd>
  31688. <dt><samp>YHIGH</samp></dt>
  31689. <dd><p>Display the Y value at the 90% percentile within the input frame. Expressed in
  31690. range of [0-255].
  31691. </p>
  31692. </dd>
  31693. <dt><samp>YMAX</samp></dt>
  31694. <dd><p>Display the maximum Y value contained within the input frame. Expressed in
  31695. range of [0-255].
  31696. </p>
  31697. </dd>
  31698. <dt><samp>UMIN</samp></dt>
  31699. <dd><p>Display the minimal U value contained within the input frame. Expressed in
  31700. range of [0-255].
  31701. </p>
  31702. </dd>
  31703. <dt><samp>ULOW</samp></dt>
  31704. <dd><p>Display the U value at the 10% percentile within the input frame. Expressed in
  31705. range of [0-255].
  31706. </p>
  31707. </dd>
  31708. <dt><samp>UAVG</samp></dt>
  31709. <dd><p>Display the average U value within the input frame. Expressed in range of
  31710. [0-255].
  31711. </p>
  31712. </dd>
  31713. <dt><samp>UHIGH</samp></dt>
  31714. <dd><p>Display the U value at the 90% percentile within the input frame. Expressed in
  31715. range of [0-255].
  31716. </p>
  31717. </dd>
  31718. <dt><samp>UMAX</samp></dt>
  31719. <dd><p>Display the maximum U value contained within the input frame. Expressed in
  31720. range of [0-255].
  31721. </p>
  31722. </dd>
  31723. <dt><samp>VMIN</samp></dt>
  31724. <dd><p>Display the minimal V value contained within the input frame. Expressed in
  31725. range of [0-255].
  31726. </p>
  31727. </dd>
  31728. <dt><samp>VLOW</samp></dt>
  31729. <dd><p>Display the V value at the 10% percentile within the input frame. Expressed in
  31730. range of [0-255].
  31731. </p>
  31732. </dd>
  31733. <dt><samp>VAVG</samp></dt>
  31734. <dd><p>Display the average V value within the input frame. Expressed in range of
  31735. [0-255].
  31736. </p>
  31737. </dd>
  31738. <dt><samp>VHIGH</samp></dt>
  31739. <dd><p>Display the V value at the 90% percentile within the input frame. Expressed in
  31740. range of [0-255].
  31741. </p>
  31742. </dd>
  31743. <dt><samp>VMAX</samp></dt>
  31744. <dd><p>Display the maximum V value contained within the input frame. Expressed in
  31745. range of [0-255].
  31746. </p>
  31747. </dd>
  31748. <dt><samp>SATMIN</samp></dt>
  31749. <dd><p>Display the minimal saturation value contained within the input frame.
  31750. Expressed in range of [0-~181.02].
  31751. </p>
  31752. </dd>
  31753. <dt><samp>SATLOW</samp></dt>
  31754. <dd><p>Display the saturation value at the 10% percentile within the input frame.
  31755. Expressed in range of [0-~181.02].
  31756. </p>
  31757. </dd>
  31758. <dt><samp>SATAVG</samp></dt>
  31759. <dd><p>Display the average saturation value within the input frame. Expressed in range
  31760. of [0-~181.02].
  31761. </p>
  31762. </dd>
  31763. <dt><samp>SATHIGH</samp></dt>
  31764. <dd><p>Display the saturation value at the 90% percentile within the input frame.
  31765. Expressed in range of [0-~181.02].
  31766. </p>
  31767. </dd>
  31768. <dt><samp>SATMAX</samp></dt>
  31769. <dd><p>Display the maximum saturation value contained within the input frame.
  31770. Expressed in range of [0-~181.02].
  31771. </p>
  31772. </dd>
  31773. <dt><samp>HUEMED</samp></dt>
  31774. <dd><p>Display the median value for hue within the input frame. Expressed in range of
  31775. [0-360].
  31776. </p>
  31777. </dd>
  31778. <dt><samp>HUEAVG</samp></dt>
  31779. <dd><p>Display the average value for hue within the input frame. Expressed in range of
  31780. [0-360].
  31781. </p>
  31782. </dd>
  31783. <dt><samp>YDIF</samp></dt>
  31784. <dd><p>Display the average of sample value difference between all values of the Y
  31785. plane in the current frame and corresponding values of the previous input frame.
  31786. Expressed in range of [0-255].
  31787. </p>
  31788. </dd>
  31789. <dt><samp>UDIF</samp></dt>
  31790. <dd><p>Display the average of sample value difference between all values of the U
  31791. plane in the current frame and corresponding values of the previous input frame.
  31792. Expressed in range of [0-255].
  31793. </p>
  31794. </dd>
  31795. <dt><samp>VDIF</samp></dt>
  31796. <dd><p>Display the average of sample value difference between all values of the V
  31797. plane in the current frame and corresponding values of the previous input frame.
  31798. Expressed in range of [0-255].
  31799. </p>
  31800. </dd>
  31801. <dt><samp>YBITDEPTH</samp></dt>
  31802. <dd><p>Display bit depth of Y plane in current frame.
  31803. Expressed in range of [0-16].
  31804. </p>
  31805. </dd>
  31806. <dt><samp>UBITDEPTH</samp></dt>
  31807. <dd><p>Display bit depth of U plane in current frame.
  31808. Expressed in range of [0-16].
  31809. </p>
  31810. </dd>
  31811. <dt><samp>VBITDEPTH</samp></dt>
  31812. <dd><p>Display bit depth of V plane in current frame.
  31813. Expressed in range of [0-16].
  31814. </p></dd>
  31815. </dl>
  31816. <p>The filter accepts the following options:
  31817. </p>
  31818. <dl compact="compact">
  31819. <dt><samp>stat</samp></dt>
  31820. <dt><samp>out</samp></dt>
  31821. <dd>
  31822. <p><samp>stat</samp> specify an additional form of image analysis.
  31823. <samp>out</samp> output video with the specified type of pixel highlighted.
  31824. </p>
  31825. <p>Both options accept the following values:
  31826. </p>
  31827. <dl compact="compact">
  31828. <dt>&lsquo;<samp>tout</samp>&rsquo;</dt>
  31829. <dd><p>Identify <var>temporal outliers</var> pixels. A <var>temporal outlier</var> is a pixel
  31830. unlike the neighboring pixels of the same field. Examples of temporal outliers
  31831. include the results of video dropouts, head clogs, or tape tracking issues.
  31832. </p>
  31833. </dd>
  31834. <dt>&lsquo;<samp>vrep</samp>&rsquo;</dt>
  31835. <dd><p>Identify <var>vertical line repetition</var>. Vertical line repetition includes
  31836. similar rows of pixels within a frame. In born-digital video vertical line
  31837. repetition is common, but this pattern is uncommon in video digitized from an
  31838. analog source. When it occurs in video that results from the digitization of an
  31839. analog source it can indicate concealment from a dropout compensator.
  31840. </p>
  31841. </dd>
  31842. <dt>&lsquo;<samp>brng</samp>&rsquo;</dt>
  31843. <dd><p>Identify pixels that fall outside of legal broadcast range.
  31844. </p></dd>
  31845. </dl>
  31846. </dd>
  31847. <dt><samp>color, c</samp></dt>
  31848. <dd><p>Set the highlight color for the <samp>out</samp> option. The default color is
  31849. yellow.
  31850. </p></dd>
  31851. </dl>
  31852. <a name="Examples-120"></a>
  31853. <h4 class="subsection">32.205.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-120" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-120" aria-hidden="true">TOC</a></span></h4>
  31854. <ul>
  31855. <li> Output data of various video metrics:
  31856. <div class="example">
  31857. <pre class="example">ffprobe -f lavfi movie=example.mov,signalstats=&quot;stat=tout+vrep+brng&quot; -show_frames
  31858. </pre></div>
  31859. </li><li> Output specific data about the minimum and maximum values of the Y plane per frame:
  31860. <div class="example">
  31861. <pre class="example">ffprobe -f lavfi movie=example.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN
  31862. </pre></div>
  31863. </li><li> Playback video while highlighting pixels that are outside of broadcast range in red.
  31864. <div class="example">
  31865. <pre class="example">ffplay example.mov -vf signalstats=&quot;out=brng:color=red&quot;
  31866. </pre></div>
  31867. </li><li> Playback video with signalstats metadata drawn over the frame.
  31868. <div class="example">
  31869. <pre class="example">ffplay example.mov -vf signalstats=stat=brng+vrep+tout,drawtext=fontfile=FreeSerif.ttf:textfile=signalstat_drawtext.txt
  31870. </pre></div>
  31871. <p>The contents of signalstat_drawtext.txt used in the command are:
  31872. </p><div class="example">
  31873. <pre class="example">time %{pts:hms}
  31874. Y (%{metadata:lavfi.signalstats.YMIN}-%{metadata:lavfi.signalstats.YMAX})
  31875. U (%{metadata:lavfi.signalstats.UMIN}-%{metadata:lavfi.signalstats.UMAX})
  31876. V (%{metadata:lavfi.signalstats.VMIN}-%{metadata:lavfi.signalstats.VMAX})
  31877. saturation maximum: %{metadata:lavfi.signalstats.SATMAX}
  31878. </pre></div>
  31879. </li></ul>
  31880. <span id="signature"></span><a name="signature-1"></a>
  31881. <h3 class="section">32.206 signature<span class="pull-right"><a class="anchor hidden-xs" href="#signature-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-signature-1" aria-hidden="true">TOC</a></span></h3>
  31882. <p>Calculates the MPEG-7 Video Signature. The filter can handle more than one
  31883. input. In this case the matching between the inputs can be calculated additionally.
  31884. The filter always passes through the first input. The signature of each stream can
  31885. be written into a file.
  31886. </p>
  31887. <p>It accepts the following options:
  31888. </p>
  31889. <dl compact="compact">
  31890. <dt><samp>detectmode</samp></dt>
  31891. <dd><p>Enable or disable the matching process.
  31892. </p>
  31893. <p>Available values are:
  31894. </p>
  31895. <dl compact="compact">
  31896. <dt>&lsquo;<samp>off</samp>&rsquo;</dt>
  31897. <dd><p>Disable the calculation of a matching (default).
  31898. </p></dd>
  31899. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  31900. <dd><p>Calculate the matching for the whole video and output whether the whole video
  31901. matches or only parts.
  31902. </p></dd>
  31903. <dt>&lsquo;<samp>fast</samp>&rsquo;</dt>
  31904. <dd><p>Calculate only until a matching is found or the video ends. Should be faster in
  31905. some cases.
  31906. </p></dd>
  31907. </dl>
  31908. </dd>
  31909. <dt><samp>nb_inputs</samp></dt>
  31910. <dd><p>Set the number of inputs. The option value must be a non negative integer.
  31911. Default value is 1.
  31912. </p>
  31913. </dd>
  31914. <dt><samp>filename</samp></dt>
  31915. <dd><p>Set the path to which the output is written. If there is more than one input,
  31916. the path must be a prototype, i.e. must contain %d or %0nd (where n is a positive
  31917. integer), that will be replaced with the input number. If no filename is
  31918. specified, no output will be written. This is the default.
  31919. </p>
  31920. </dd>
  31921. <dt><samp>format</samp></dt>
  31922. <dd><p>Choose the output format.
  31923. </p>
  31924. <p>Available values are:
  31925. </p>
  31926. <dl compact="compact">
  31927. <dt>&lsquo;<samp>binary</samp>&rsquo;</dt>
  31928. <dd><p>Use the specified binary representation (default).
  31929. </p></dd>
  31930. <dt>&lsquo;<samp>xml</samp>&rsquo;</dt>
  31931. <dd><p>Use the specified xml representation.
  31932. </p></dd>
  31933. </dl>
  31934. </dd>
  31935. <dt><samp>th_d</samp></dt>
  31936. <dd><p>Set threshold to detect one word as similar. The option value must be an integer
  31937. greater than zero. The default value is 9000.
  31938. </p>
  31939. </dd>
  31940. <dt><samp>th_dc</samp></dt>
  31941. <dd><p>Set threshold to detect all words as similar. The option value must be an integer
  31942. greater than zero. The default value is 60000.
  31943. </p>
  31944. </dd>
  31945. <dt><samp>th_xh</samp></dt>
  31946. <dd><p>Set threshold to detect frames as similar. The option value must be an integer
  31947. greater than zero. The default value is 116.
  31948. </p>
  31949. </dd>
  31950. <dt><samp>th_di</samp></dt>
  31951. <dd><p>Set the minimum length of a sequence in frames to recognize it as matching
  31952. sequence. The option value must be a non negative integer value.
  31953. The default value is 0.
  31954. </p>
  31955. </dd>
  31956. <dt><samp>th_it</samp></dt>
  31957. <dd><p>Set the minimum relation, that matching frames to all frames must have.
  31958. The option value must be a double value between 0 and 1. The default value is 0.5.
  31959. </p></dd>
  31960. </dl>
  31961. <a name="Examples-121"></a>
  31962. <h4 class="subsection">32.206.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-121" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-121" aria-hidden="true">TOC</a></span></h4>
  31963. <ul>
  31964. <li> To calculate the signature of an input video and store it in signature.bin:
  31965. <div class="example">
  31966. <pre class="example">ffmpeg -i input.mkv -vf signature=filename=signature.bin -map 0:v -f null -
  31967. </pre></div>
  31968. </li><li> To detect whether two videos match and store the signatures in XML format in
  31969. signature0.xml and signature1.xml:
  31970. <div class="example">
  31971. <pre class="example">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 -
  31972. </pre></div>
  31973. </li></ul>
  31974. <span id="smartblur"></span><a name="smartblur-1"></a>
  31975. <h3 class="section">32.207 smartblur<span class="pull-right"><a class="anchor hidden-xs" href="#smartblur-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-smartblur-1" aria-hidden="true">TOC</a></span></h3>
  31976. <p>Blur the input video without impacting the outlines.
  31977. </p>
  31978. <p>It accepts the following options:
  31979. </p>
  31980. <dl compact="compact">
  31981. <dt><samp>luma_radius, lr</samp></dt>
  31982. <dd><p>Set the luma radius. The option value must be a float number in
  31983. the range [0.1,5.0] that specifies the variance of the gaussian filter
  31984. used to blur the image (slower if larger). Default value is 1.0.
  31985. </p>
  31986. </dd>
  31987. <dt><samp>luma_strength, ls</samp></dt>
  31988. <dd><p>Set the luma strength. The option value must be a float number
  31989. in the range [-1.0,1.0] that configures the blurring. A value included
  31990. in [0.0,1.0] will blur the image whereas a value included in
  31991. [-1.0,0.0] will sharpen the image. Default value is 1.0.
  31992. </p>
  31993. </dd>
  31994. <dt><samp>luma_threshold, lt</samp></dt>
  31995. <dd><p>Set the luma threshold used as a coefficient to determine
  31996. whether a pixel should be blurred or not. The option value must be an
  31997. integer in the range [-30,30]. A value of 0 will filter all the image,
  31998. a value included in [0,30] will filter flat areas and a value included
  31999. in [-30,0] will filter edges. Default value is 0.
  32000. </p>
  32001. </dd>
  32002. <dt><samp>chroma_radius, cr</samp></dt>
  32003. <dd><p>Set the chroma radius. The option value must be a float number in
  32004. the range [0.1,5.0] that specifies the variance of the gaussian filter
  32005. used to blur the image (slower if larger). Default value is <samp>luma_radius</samp>.
  32006. </p>
  32007. </dd>
  32008. <dt><samp>chroma_strength, cs</samp></dt>
  32009. <dd><p>Set the chroma strength. The option value must be a float number
  32010. in the range [-1.0,1.0] that configures the blurring. A value included
  32011. in [0.0,1.0] will blur the image whereas a value included in
  32012. [-1.0,0.0] will sharpen the image. Default value is <samp>luma_strength</samp>.
  32013. </p>
  32014. </dd>
  32015. <dt><samp>chroma_threshold, ct</samp></dt>
  32016. <dd><p>Set the chroma threshold used as a coefficient to determine
  32017. whether a pixel should be blurred or not. The option value must be an
  32018. integer in the range [-30,30]. A value of 0 will filter all the image,
  32019. a value included in [0,30] will filter flat areas and a value included
  32020. in [-30,0] will filter edges. Default value is <samp>luma_threshold</samp>.
  32021. </p></dd>
  32022. </dl>
  32023. <p>If a chroma option is not explicitly set, the corresponding luma value
  32024. is set.
  32025. </p>
  32026. <a name="sobel"></a>
  32027. <h3 class="section">32.208 sobel<span class="pull-right"><a class="anchor hidden-xs" href="#sobel" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sobel" aria-hidden="true">TOC</a></span></h3>
  32028. <p>Apply sobel operator to input video stream.
  32029. </p>
  32030. <p>The filter accepts the following option:
  32031. </p>
  32032. <dl compact="compact">
  32033. <dt><samp>planes</samp></dt>
  32034. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  32035. By default value 0xf, all planes will be processed.
  32036. </p>
  32037. </dd>
  32038. <dt><samp>scale</samp></dt>
  32039. <dd><p>Set value which will be multiplied with filtered result.
  32040. </p>
  32041. </dd>
  32042. <dt><samp>delta</samp></dt>
  32043. <dd><p>Set value which will be added to filtered result.
  32044. </p></dd>
  32045. </dl>
  32046. <a name="Commands-123"></a>
  32047. <h4 class="subsection">32.208.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-123" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-123" aria-hidden="true">TOC</a></span></h4>
  32048. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  32049. </p>
  32050. <span id="spp"></span><a name="spp-1"></a>
  32051. <h3 class="section">32.209 spp<span class="pull-right"><a class="anchor hidden-xs" href="#spp-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-spp-1" aria-hidden="true">TOC</a></span></h3>
  32052. <p>Apply a simple postprocessing filter that compresses and decompresses the image
  32053. at several (or - in the case of <samp>quality</samp> level <code>6</code> - all) shifts
  32054. and average the results.
  32055. </p>
  32056. <p>The filter accepts the following options:
  32057. </p>
  32058. <dl compact="compact">
  32059. <dt><samp>quality</samp></dt>
  32060. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  32061. an integer in the range 0-6. If set to <code>0</code>, the filter will have no
  32062. effect. A value of <code>6</code> means the higher quality. For each increment of
  32063. that value the speed drops by a factor of approximately 2. Default value is
  32064. <code>3</code>.
  32065. </p>
  32066. </dd>
  32067. <dt><samp>qp</samp></dt>
  32068. <dd><p>Force a constant quantization parameter. If not set, the filter will use the QP
  32069. from the video stream (if available).
  32070. </p>
  32071. </dd>
  32072. <dt><samp>mode</samp></dt>
  32073. <dd><p>Set thresholding mode. Available modes are:
  32074. </p>
  32075. <dl compact="compact">
  32076. <dt>&lsquo;<samp>hard</samp>&rsquo;</dt>
  32077. <dd><p>Set hard thresholding (default).
  32078. </p></dd>
  32079. <dt>&lsquo;<samp>soft</samp>&rsquo;</dt>
  32080. <dd><p>Set soft thresholding (better de-ringing effect, but likely blurrier).
  32081. </p></dd>
  32082. </dl>
  32083. </dd>
  32084. <dt><samp>use_bframe_qp</samp></dt>
  32085. <dd><p>Enable the use of the QP from the B-Frames if set to <code>1</code>. Using this
  32086. option may cause flicker since the B-Frames have often larger QP. Default is
  32087. <code>0</code> (not enabled).
  32088. </p></dd>
  32089. </dl>
  32090. <a name="Commands-124"></a>
  32091. <h4 class="subsection">32.209.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-124" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-124" aria-hidden="true">TOC</a></span></h4>
  32092. <p>This filter supports the following commands:
  32093. </p><dl compact="compact">
  32094. <dt><samp>quality, level</samp></dt>
  32095. <dd><p>Set quality level. The value <code>max</code> can be used to set the maximum level,
  32096. currently <code>6</code>.
  32097. </p></dd>
  32098. </dl>
  32099. <span id="sr"></span><a name="sr-1"></a>
  32100. <h3 class="section">32.210 sr<span class="pull-right"><a class="anchor hidden-xs" href="#sr-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sr-1" aria-hidden="true">TOC</a></span></h3>
  32101. <p>Scale the input by applying one of the super-resolution methods based on
  32102. convolutional neural networks. Supported models:
  32103. </p>
  32104. <ul>
  32105. <li> Super-Resolution Convolutional Neural Network model (SRCNN).
  32106. See <a href="https://arxiv.org/abs/1501.00092">https://arxiv.org/abs/1501.00092</a>.
  32107. </li><li> Efficient Sub-Pixel Convolutional Neural Network model (ESPCN).
  32108. See <a href="https://arxiv.org/abs/1609.05158">https://arxiv.org/abs/1609.05158</a>.
  32109. </li></ul>
  32110. <p>Training scripts as well as scripts for model file (.pb) saving can be found at
  32111. <a href="https://github.com/XueweiMeng/sr/tree/sr_dnn_native">https://github.com/XueweiMeng/sr/tree/sr_dnn_native</a>. Original repository
  32112. is at <a href="https://github.com/HighVoltageRocknRoll/sr.git">https://github.com/HighVoltageRocknRoll/sr.git</a>.
  32113. </p>
  32114. <p>Native model files (.model) can be generated from TensorFlow model
  32115. files (.pb) by using tools/python/convert.py
  32116. </p>
  32117. <p>The filter accepts the following options:
  32118. </p>
  32119. <dl compact="compact">
  32120. <dt><samp>dnn_backend</samp></dt>
  32121. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  32122. the following values:
  32123. </p>
  32124. <dl compact="compact">
  32125. <dt>&lsquo;<samp>native</samp>&rsquo;</dt>
  32126. <dd><p>Native implementation of DNN loading and execution.
  32127. </p>
  32128. </dd>
  32129. <dt>&lsquo;<samp>tensorflow</samp>&rsquo;</dt>
  32130. <dd><p>TensorFlow backend. To enable this backend you
  32131. need to install the TensorFlow for C library (see
  32132. <a href="https://www.tensorflow.org/install/install_c">https://www.tensorflow.org/install/install_c</a>) and configure FFmpeg with
  32133. <code>--enable-libtensorflow</code>
  32134. </p></dd>
  32135. </dl>
  32136. <p>Default value is &lsquo;<samp>native</samp>&rsquo;.
  32137. </p>
  32138. </dd>
  32139. <dt><samp>model</samp></dt>
  32140. <dd><p>Set path to model file specifying network architecture and its parameters.
  32141. Note that different backends use different file formats. TensorFlow backend
  32142. can load files for both formats, while native backend can load files for only
  32143. its format.
  32144. </p>
  32145. </dd>
  32146. <dt><samp>scale_factor</samp></dt>
  32147. <dd><p>Set scale factor for SRCNN model. Allowed values are <code>2</code>, <code>3</code> and <code>4</code>.
  32148. Default value is <code>2</code>. Scale factor is necessary for SRCNN model, because it accepts
  32149. input upscaled using bicubic upscaling with proper scale factor.
  32150. </p></dd>
  32151. </dl>
  32152. <p>This feature can also be finished with <a href="#dnn_005fprocessing">dnn_processing</a> filter.
  32153. </p>
  32154. <a name="ssim"></a>
  32155. <h3 class="section">32.211 ssim<span class="pull-right"><a class="anchor hidden-xs" href="#ssim" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ssim" aria-hidden="true">TOC</a></span></h3>
  32156. <p>Obtain the SSIM (Structural SImilarity Metric) between two input videos.
  32157. </p>
  32158. <p>This filter takes in input two input videos, the first input is
  32159. considered the &quot;main&quot; source and is passed unchanged to the
  32160. output. The second input is used as a &quot;reference&quot; video for computing
  32161. the SSIM.
  32162. </p>
  32163. <p>Both video inputs must have the same resolution and pixel format for
  32164. this filter to work correctly. Also it assumes that both inputs
  32165. have the same number of frames, which are compared one by one.
  32166. </p>
  32167. <p>The filter stores the calculated SSIM of each frame.
  32168. </p>
  32169. <p>The description of the accepted parameters follows.
  32170. </p>
  32171. <dl compact="compact">
  32172. <dt><samp>stats_file, f</samp></dt>
  32173. <dd><p>If specified the filter will use the named file to save the SSIM of
  32174. each individual frame. When filename equals &quot;-&quot; the data is sent to
  32175. standard output.
  32176. </p></dd>
  32177. </dl>
  32178. <p>The file printed if <var>stats_file</var> is selected, contains a sequence of
  32179. key/value pairs of the form <var>key</var>:<var>value</var> for each compared
  32180. couple of frames.
  32181. </p>
  32182. <p>A description of each shown parameter follows:
  32183. </p>
  32184. <dl compact="compact">
  32185. <dt><samp>n</samp></dt>
  32186. <dd><p>sequential number of the input frame, starting from 1
  32187. </p>
  32188. </dd>
  32189. <dt><samp>Y, U, V, R, G, B</samp></dt>
  32190. <dd><p>SSIM of the compared frames for the component specified by the suffix.
  32191. </p>
  32192. </dd>
  32193. <dt><samp>All</samp></dt>
  32194. <dd><p>SSIM of the compared frames for the whole frame.
  32195. </p>
  32196. </dd>
  32197. <dt><samp>dB</samp></dt>
  32198. <dd><p>Same as above but in dB representation.
  32199. </p></dd>
  32200. </dl>
  32201. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  32202. </p>
  32203. <a name="Examples-122"></a>
  32204. <h4 class="subsection">32.211.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-122" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-122" aria-hidden="true">TOC</a></span></h4>
  32205. <ul>
  32206. <li> For example:
  32207. <div class="example">
  32208. <pre class="example">movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
  32209. [main][ref] ssim=&quot;stats_file=stats.log&quot; [out]
  32210. </pre></div>
  32211. <p>On this example the input file being processed is compared with the
  32212. reference file <samp>ref_movie.mpg</samp>. The SSIM of each individual frame
  32213. is stored in <samp>stats.log</samp>.
  32214. </p>
  32215. </li><li> Another example with both psnr and ssim at same time:
  32216. <div class="example">
  32217. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi &quot;ssim;[0:v][1:v]psnr&quot; -f null -
  32218. </pre></div>
  32219. </li><li> Another example with different containers:
  32220. <div class="example">
  32221. <pre class="example">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 -
  32222. </pre></div>
  32223. </li></ul>
  32224. <a name="stereo3d"></a>
  32225. <h3 class="section">32.212 stereo3d<span class="pull-right"><a class="anchor hidden-xs" href="#stereo3d" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-stereo3d" aria-hidden="true">TOC</a></span></h3>
  32226. <p>Convert between different stereoscopic image formats.
  32227. </p>
  32228. <p>The filters accept the following options:
  32229. </p>
  32230. <dl compact="compact">
  32231. <dt><samp>in</samp></dt>
  32232. <dd><p>Set stereoscopic image format of input.
  32233. </p>
  32234. <p>Available values for input image formats are:
  32235. </p><dl compact="compact">
  32236. <dt>&lsquo;<samp>sbsl</samp>&rsquo;</dt>
  32237. <dd><p>side by side parallel (left eye left, right eye right)
  32238. </p>
  32239. </dd>
  32240. <dt>&lsquo;<samp>sbsr</samp>&rsquo;</dt>
  32241. <dd><p>side by side crosseye (right eye left, left eye right)
  32242. </p>
  32243. </dd>
  32244. <dt>&lsquo;<samp>sbs2l</samp>&rsquo;</dt>
  32245. <dd><p>side by side parallel with half width resolution
  32246. (left eye left, right eye right)
  32247. </p>
  32248. </dd>
  32249. <dt>&lsquo;<samp>sbs2r</samp>&rsquo;</dt>
  32250. <dd><p>side by side crosseye with half width resolution
  32251. (right eye left, left eye right)
  32252. </p>
  32253. </dd>
  32254. <dt>&lsquo;<samp>abl</samp>&rsquo;</dt>
  32255. <dt>&lsquo;<samp>tbl</samp>&rsquo;</dt>
  32256. <dd><p>above-below (left eye above, right eye below)
  32257. </p>
  32258. </dd>
  32259. <dt>&lsquo;<samp>abr</samp>&rsquo;</dt>
  32260. <dt>&lsquo;<samp>tbr</samp>&rsquo;</dt>
  32261. <dd><p>above-below (right eye above, left eye below)
  32262. </p>
  32263. </dd>
  32264. <dt>&lsquo;<samp>ab2l</samp>&rsquo;</dt>
  32265. <dt>&lsquo;<samp>tb2l</samp>&rsquo;</dt>
  32266. <dd><p>above-below with half height resolution
  32267. (left eye above, right eye below)
  32268. </p>
  32269. </dd>
  32270. <dt>&lsquo;<samp>ab2r</samp>&rsquo;</dt>
  32271. <dt>&lsquo;<samp>tb2r</samp>&rsquo;</dt>
  32272. <dd><p>above-below with half height resolution
  32273. (right eye above, left eye below)
  32274. </p>
  32275. </dd>
  32276. <dt>&lsquo;<samp>al</samp>&rsquo;</dt>
  32277. <dd><p>alternating frames (left eye first, right eye second)
  32278. </p>
  32279. </dd>
  32280. <dt>&lsquo;<samp>ar</samp>&rsquo;</dt>
  32281. <dd><p>alternating frames (right eye first, left eye second)
  32282. </p>
  32283. </dd>
  32284. <dt>&lsquo;<samp>irl</samp>&rsquo;</dt>
  32285. <dd><p>interleaved rows (left eye has top row, right eye starts on next row)
  32286. </p>
  32287. </dd>
  32288. <dt>&lsquo;<samp>irr</samp>&rsquo;</dt>
  32289. <dd><p>interleaved rows (right eye has top row, left eye starts on next row)
  32290. </p>
  32291. </dd>
  32292. <dt>&lsquo;<samp>icl</samp>&rsquo;</dt>
  32293. <dd><p>interleaved columns, left eye first
  32294. </p>
  32295. </dd>
  32296. <dt>&lsquo;<samp>icr</samp>&rsquo;</dt>
  32297. <dd><p>interleaved columns, right eye first
  32298. </p>
  32299. <p>Default value is &lsquo;<samp>sbsl</samp>&rsquo;.
  32300. </p></dd>
  32301. </dl>
  32302. </dd>
  32303. <dt><samp>out</samp></dt>
  32304. <dd><p>Set stereoscopic image format of output.
  32305. </p>
  32306. <dl compact="compact">
  32307. <dt>&lsquo;<samp>sbsl</samp>&rsquo;</dt>
  32308. <dd><p>side by side parallel (left eye left, right eye right)
  32309. </p>
  32310. </dd>
  32311. <dt>&lsquo;<samp>sbsr</samp>&rsquo;</dt>
  32312. <dd><p>side by side crosseye (right eye left, left eye right)
  32313. </p>
  32314. </dd>
  32315. <dt>&lsquo;<samp>sbs2l</samp>&rsquo;</dt>
  32316. <dd><p>side by side parallel with half width resolution
  32317. (left eye left, right eye right)
  32318. </p>
  32319. </dd>
  32320. <dt>&lsquo;<samp>sbs2r</samp>&rsquo;</dt>
  32321. <dd><p>side by side crosseye with half width resolution
  32322. (right eye left, left eye right)
  32323. </p>
  32324. </dd>
  32325. <dt>&lsquo;<samp>abl</samp>&rsquo;</dt>
  32326. <dt>&lsquo;<samp>tbl</samp>&rsquo;</dt>
  32327. <dd><p>above-below (left eye above, right eye below)
  32328. </p>
  32329. </dd>
  32330. <dt>&lsquo;<samp>abr</samp>&rsquo;</dt>
  32331. <dt>&lsquo;<samp>tbr</samp>&rsquo;</dt>
  32332. <dd><p>above-below (right eye above, left eye below)
  32333. </p>
  32334. </dd>
  32335. <dt>&lsquo;<samp>ab2l</samp>&rsquo;</dt>
  32336. <dt>&lsquo;<samp>tb2l</samp>&rsquo;</dt>
  32337. <dd><p>above-below with half height resolution
  32338. (left eye above, right eye below)
  32339. </p>
  32340. </dd>
  32341. <dt>&lsquo;<samp>ab2r</samp>&rsquo;</dt>
  32342. <dt>&lsquo;<samp>tb2r</samp>&rsquo;</dt>
  32343. <dd><p>above-below with half height resolution
  32344. (right eye above, left eye below)
  32345. </p>
  32346. </dd>
  32347. <dt>&lsquo;<samp>al</samp>&rsquo;</dt>
  32348. <dd><p>alternating frames (left eye first, right eye second)
  32349. </p>
  32350. </dd>
  32351. <dt>&lsquo;<samp>ar</samp>&rsquo;</dt>
  32352. <dd><p>alternating frames (right eye first, left eye second)
  32353. </p>
  32354. </dd>
  32355. <dt>&lsquo;<samp>irl</samp>&rsquo;</dt>
  32356. <dd><p>interleaved rows (left eye has top row, right eye starts on next row)
  32357. </p>
  32358. </dd>
  32359. <dt>&lsquo;<samp>irr</samp>&rsquo;</dt>
  32360. <dd><p>interleaved rows (right eye has top row, left eye starts on next row)
  32361. </p>
  32362. </dd>
  32363. <dt>&lsquo;<samp>arbg</samp>&rsquo;</dt>
  32364. <dd><p>anaglyph red/blue gray
  32365. (red filter on left eye, blue filter on right eye)
  32366. </p>
  32367. </dd>
  32368. <dt>&lsquo;<samp>argg</samp>&rsquo;</dt>
  32369. <dd><p>anaglyph red/green gray
  32370. (red filter on left eye, green filter on right eye)
  32371. </p>
  32372. </dd>
  32373. <dt>&lsquo;<samp>arcg</samp>&rsquo;</dt>
  32374. <dd><p>anaglyph red/cyan gray
  32375. (red filter on left eye, cyan filter on right eye)
  32376. </p>
  32377. </dd>
  32378. <dt>&lsquo;<samp>arch</samp>&rsquo;</dt>
  32379. <dd><p>anaglyph red/cyan half colored
  32380. (red filter on left eye, cyan filter on right eye)
  32381. </p>
  32382. </dd>
  32383. <dt>&lsquo;<samp>arcc</samp>&rsquo;</dt>
  32384. <dd><p>anaglyph red/cyan color
  32385. (red filter on left eye, cyan filter on right eye)
  32386. </p>
  32387. </dd>
  32388. <dt>&lsquo;<samp>arcd</samp>&rsquo;</dt>
  32389. <dd><p>anaglyph red/cyan color optimized with the least squares projection of dubois
  32390. (red filter on left eye, cyan filter on right eye)
  32391. </p>
  32392. </dd>
  32393. <dt>&lsquo;<samp>agmg</samp>&rsquo;</dt>
  32394. <dd><p>anaglyph green/magenta gray
  32395. (green filter on left eye, magenta filter on right eye)
  32396. </p>
  32397. </dd>
  32398. <dt>&lsquo;<samp>agmh</samp>&rsquo;</dt>
  32399. <dd><p>anaglyph green/magenta half colored
  32400. (green filter on left eye, magenta filter on right eye)
  32401. </p>
  32402. </dd>
  32403. <dt>&lsquo;<samp>agmc</samp>&rsquo;</dt>
  32404. <dd><p>anaglyph green/magenta colored
  32405. (green filter on left eye, magenta filter on right eye)
  32406. </p>
  32407. </dd>
  32408. <dt>&lsquo;<samp>agmd</samp>&rsquo;</dt>
  32409. <dd><p>anaglyph green/magenta color optimized with the least squares projection of dubois
  32410. (green filter on left eye, magenta filter on right eye)
  32411. </p>
  32412. </dd>
  32413. <dt>&lsquo;<samp>aybg</samp>&rsquo;</dt>
  32414. <dd><p>anaglyph yellow/blue gray
  32415. (yellow filter on left eye, blue filter on right eye)
  32416. </p>
  32417. </dd>
  32418. <dt>&lsquo;<samp>aybh</samp>&rsquo;</dt>
  32419. <dd><p>anaglyph yellow/blue half colored
  32420. (yellow filter on left eye, blue filter on right eye)
  32421. </p>
  32422. </dd>
  32423. <dt>&lsquo;<samp>aybc</samp>&rsquo;</dt>
  32424. <dd><p>anaglyph yellow/blue colored
  32425. (yellow filter on left eye, blue filter on right eye)
  32426. </p>
  32427. </dd>
  32428. <dt>&lsquo;<samp>aybd</samp>&rsquo;</dt>
  32429. <dd><p>anaglyph yellow/blue color optimized with the least squares projection of dubois
  32430. (yellow filter on left eye, blue filter on right eye)
  32431. </p>
  32432. </dd>
  32433. <dt>&lsquo;<samp>ml</samp>&rsquo;</dt>
  32434. <dd><p>mono output (left eye only)
  32435. </p>
  32436. </dd>
  32437. <dt>&lsquo;<samp>mr</samp>&rsquo;</dt>
  32438. <dd><p>mono output (right eye only)
  32439. </p>
  32440. </dd>
  32441. <dt>&lsquo;<samp>chl</samp>&rsquo;</dt>
  32442. <dd><p>checkerboard, left eye first
  32443. </p>
  32444. </dd>
  32445. <dt>&lsquo;<samp>chr</samp>&rsquo;</dt>
  32446. <dd><p>checkerboard, right eye first
  32447. </p>
  32448. </dd>
  32449. <dt>&lsquo;<samp>icl</samp>&rsquo;</dt>
  32450. <dd><p>interleaved columns, left eye first
  32451. </p>
  32452. </dd>
  32453. <dt>&lsquo;<samp>icr</samp>&rsquo;</dt>
  32454. <dd><p>interleaved columns, right eye first
  32455. </p>
  32456. </dd>
  32457. <dt>&lsquo;<samp>hdmi</samp>&rsquo;</dt>
  32458. <dd><p>HDMI frame pack
  32459. </p></dd>
  32460. </dl>
  32461. <p>Default value is &lsquo;<samp>arcd</samp>&rsquo;.
  32462. </p></dd>
  32463. </dl>
  32464. <a name="Examples-123"></a>
  32465. <h4 class="subsection">32.212.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-123" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-123" aria-hidden="true">TOC</a></span></h4>
  32466. <ul>
  32467. <li> Convert input video from side by side parallel to anaglyph yellow/blue dubois:
  32468. <div class="example">
  32469. <pre class="example">stereo3d=sbsl:aybd
  32470. </pre></div>
  32471. </li><li> Convert input video from above below (left eye above, right eye below) to side by side crosseye.
  32472. <div class="example">
  32473. <pre class="example">stereo3d=abl:sbsr
  32474. </pre></div>
  32475. </li></ul>
  32476. <a name="streamselect_002c-astreamselect"></a>
  32477. <h3 class="section">32.213 streamselect, astreamselect<span class="pull-right"><a class="anchor hidden-xs" href="#streamselect_002c-astreamselect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-streamselect_002c-astreamselect" aria-hidden="true">TOC</a></span></h3>
  32478. <p>Select video or audio streams.
  32479. </p>
  32480. <p>The filter accepts the following options:
  32481. </p>
  32482. <dl compact="compact">
  32483. <dt><samp>inputs</samp></dt>
  32484. <dd><p>Set number of inputs. Default is 2.
  32485. </p>
  32486. </dd>
  32487. <dt><samp>map</samp></dt>
  32488. <dd><p>Set input indexes to remap to outputs.
  32489. </p></dd>
  32490. </dl>
  32491. <a name="Commands-125"></a>
  32492. <h4 class="subsection">32.213.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-125" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-125" aria-hidden="true">TOC</a></span></h4>
  32493. <p>The <code>streamselect</code> and <code>astreamselect</code> filter supports the following
  32494. commands:
  32495. </p>
  32496. <dl compact="compact">
  32497. <dt><samp>map</samp></dt>
  32498. <dd><p>Set input indexes to remap to outputs.
  32499. </p></dd>
  32500. </dl>
  32501. <a name="Examples-124"></a>
  32502. <h4 class="subsection">32.213.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-124" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-124" aria-hidden="true">TOC</a></span></h4>
  32503. <ul>
  32504. <li> Select first 5 seconds 1st stream and rest of time 2nd stream:
  32505. <div class="example">
  32506. <pre class="example">sendcmd='5.0 streamselect map 1',streamselect=inputs=2:map=0
  32507. </pre></div>
  32508. </li><li> Same as above, but for audio:
  32509. <div class="example">
  32510. <pre class="example">asendcmd='5.0 astreamselect map 1',astreamselect=inputs=2:map=0
  32511. </pre></div>
  32512. </li></ul>
  32513. <span id="subtitles"></span><a name="subtitles-1"></a>
  32514. <h3 class="section">32.214 subtitles<span class="pull-right"><a class="anchor hidden-xs" href="#subtitles-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-subtitles-1" aria-hidden="true">TOC</a></span></h3>
  32515. <p>Draw subtitles on top of input video using the libass library.
  32516. </p>
  32517. <p>To enable compilation of this filter you need to configure FFmpeg with
  32518. <code>--enable-libass</code>. This filter also requires a build with libavcodec and
  32519. libavformat to convert the passed subtitles file to ASS (Advanced Substation
  32520. Alpha) subtitles format.
  32521. </p>
  32522. <p>The filter accepts the following options:
  32523. </p>
  32524. <dl compact="compact">
  32525. <dt><samp>filename, f</samp></dt>
  32526. <dd><p>Set the filename of the subtitle file to read. It must be specified.
  32527. </p>
  32528. </dd>
  32529. <dt><samp>original_size</samp></dt>
  32530. <dd><p>Specify the size of the original video, the video for which the ASS file
  32531. was composed. For the syntax of this option, check the
  32532. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  32533. Due to a misdesign in ASS aspect ratio arithmetic, this is necessary to
  32534. correctly scale the fonts if the aspect ratio has been changed.
  32535. </p>
  32536. </dd>
  32537. <dt><samp>fontsdir</samp></dt>
  32538. <dd><p>Set a directory path containing fonts that can be used by the filter.
  32539. These fonts will be used in addition to whatever the font provider uses.
  32540. </p>
  32541. </dd>
  32542. <dt><samp>alpha</samp></dt>
  32543. <dd><p>Process alpha channel, by default alpha channel is untouched.
  32544. </p>
  32545. </dd>
  32546. <dt><samp>charenc</samp></dt>
  32547. <dd><p>Set subtitles input character encoding. <code>subtitles</code> filter only. Only
  32548. useful if not UTF-8.
  32549. </p>
  32550. </dd>
  32551. <dt><samp>stream_index, si</samp></dt>
  32552. <dd><p>Set subtitles stream index. <code>subtitles</code> filter only.
  32553. </p>
  32554. </dd>
  32555. <dt><samp>force_style</samp></dt>
  32556. <dd><p>Override default style or script info parameters of the subtitles. It accepts a
  32557. string containing ASS style format <code>KEY=VALUE</code> couples separated by &quot;,&quot;.
  32558. </p></dd>
  32559. </dl>
  32560. <p>If the first key is not specified, it is assumed that the first value
  32561. specifies the <samp>filename</samp>.
  32562. </p>
  32563. <p>For example, to render the file <samp>sub.srt</samp> on top of the input
  32564. video, use the command:
  32565. </p><div class="example">
  32566. <pre class="example">subtitles=sub.srt
  32567. </pre></div>
  32568. <p>which is equivalent to:
  32569. </p><div class="example">
  32570. <pre class="example">subtitles=filename=sub.srt
  32571. </pre></div>
  32572. <p>To render the default subtitles stream from file <samp>video.mkv</samp>, use:
  32573. </p><div class="example">
  32574. <pre class="example">subtitles=video.mkv
  32575. </pre></div>
  32576. <p>To render the second subtitles stream from that file, use:
  32577. </p><div class="example">
  32578. <pre class="example">subtitles=video.mkv:si=1
  32579. </pre></div>
  32580. <p>To make the subtitles stream from <samp>sub.srt</samp> appear in 80% transparent blue
  32581. <code>DejaVu Serif</code>, use:
  32582. </p><div class="example">
  32583. <pre class="example">subtitles=sub.srt:force_style='Fontname=DejaVu Serif,PrimaryColour=&amp;HCCFF0000'
  32584. </pre></div>
  32585. <a name="super2xsai"></a>
  32586. <h3 class="section">32.215 super2xsai<span class="pull-right"><a class="anchor hidden-xs" href="#super2xsai" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-super2xsai" aria-hidden="true">TOC</a></span></h3>
  32587. <p>Scale the input by 2x and smooth using the Super2xSaI (Scale and
  32588. Interpolate) pixel art scaling algorithm.
  32589. </p>
  32590. <p>Useful for enlarging pixel art images without reducing sharpness.
  32591. </p>
  32592. <a name="swaprect"></a>
  32593. <h3 class="section">32.216 swaprect<span class="pull-right"><a class="anchor hidden-xs" href="#swaprect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-swaprect" aria-hidden="true">TOC</a></span></h3>
  32594. <p>Swap two rectangular objects in video.
  32595. </p>
  32596. <p>This filter accepts the following options:
  32597. </p>
  32598. <dl compact="compact">
  32599. <dt><samp>w</samp></dt>
  32600. <dd><p>Set object width.
  32601. </p>
  32602. </dd>
  32603. <dt><samp>h</samp></dt>
  32604. <dd><p>Set object height.
  32605. </p>
  32606. </dd>
  32607. <dt><samp>x1</samp></dt>
  32608. <dd><p>Set 1st rect x coordinate.
  32609. </p>
  32610. </dd>
  32611. <dt><samp>y1</samp></dt>
  32612. <dd><p>Set 1st rect y coordinate.
  32613. </p>
  32614. </dd>
  32615. <dt><samp>x2</samp></dt>
  32616. <dd><p>Set 2nd rect x coordinate.
  32617. </p>
  32618. </dd>
  32619. <dt><samp>y2</samp></dt>
  32620. <dd><p>Set 2nd rect y coordinate.
  32621. </p>
  32622. <p>All expressions are evaluated once for each frame.
  32623. </p></dd>
  32624. </dl>
  32625. <p>The all options are expressions containing the following constants:
  32626. </p>
  32627. <dl compact="compact">
  32628. <dt><samp>w</samp></dt>
  32629. <dt><samp>h</samp></dt>
  32630. <dd><p>The input width and height.
  32631. </p>
  32632. </dd>
  32633. <dt><samp>a</samp></dt>
  32634. <dd><p>same as <var>w</var> / <var>h</var>
  32635. </p>
  32636. </dd>
  32637. <dt><samp>sar</samp></dt>
  32638. <dd><p>input sample aspect ratio
  32639. </p>
  32640. </dd>
  32641. <dt><samp>dar</samp></dt>
  32642. <dd><p>input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>
  32643. </p>
  32644. </dd>
  32645. <dt><samp>n</samp></dt>
  32646. <dd><p>The number of the input frame, starting from 0.
  32647. </p>
  32648. </dd>
  32649. <dt><samp>t</samp></dt>
  32650. <dd><p>The timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  32651. </p>
  32652. </dd>
  32653. <dt><samp>pos</samp></dt>
  32654. <dd><p>the position in the file of the input frame, NAN if unknown
  32655. </p></dd>
  32656. </dl>
  32657. <a name="Commands-126"></a>
  32658. <h4 class="subsection">32.216.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-126" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-126" aria-hidden="true">TOC</a></span></h4>
  32659. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  32660. </p>
  32661. <a name="swapuv"></a>
  32662. <h3 class="section">32.217 swapuv<span class="pull-right"><a class="anchor hidden-xs" href="#swapuv" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-swapuv" aria-hidden="true">TOC</a></span></h3>
  32663. <p>Swap U &amp; V plane.
  32664. </p>
  32665. <a name="tblend"></a>
  32666. <h3 class="section">32.218 tblend<span class="pull-right"><a class="anchor hidden-xs" href="#tblend" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tblend" aria-hidden="true">TOC</a></span></h3>
  32667. <p>Blend successive video frames.
  32668. </p>
  32669. <p>See <a href="#blend">blend</a>
  32670. </p>
  32671. <a name="telecine"></a>
  32672. <h3 class="section">32.219 telecine<span class="pull-right"><a class="anchor hidden-xs" href="#telecine" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-telecine" aria-hidden="true">TOC</a></span></h3>
  32673. <p>Apply telecine process to the video.
  32674. </p>
  32675. <p>This filter accepts the following options:
  32676. </p>
  32677. <dl compact="compact">
  32678. <dt><samp>first_field</samp></dt>
  32679. <dd><dl compact="compact">
  32680. <dt>&lsquo;<samp>top, t</samp>&rsquo;</dt>
  32681. <dd><p>top field first
  32682. </p></dd>
  32683. <dt>&lsquo;<samp>bottom, b</samp>&rsquo;</dt>
  32684. <dd><p>bottom field first
  32685. The default value is <code>top</code>.
  32686. </p></dd>
  32687. </dl>
  32688. </dd>
  32689. <dt><samp>pattern</samp></dt>
  32690. <dd><p>A string of numbers representing the pulldown pattern you wish to apply.
  32691. The default value is <code>23</code>.
  32692. </p></dd>
  32693. </dl>
  32694. <div class="example">
  32695. <pre class="example">Some typical patterns:
  32696. NTSC output (30i):
  32697. 27.5p: 32222
  32698. 24p: 23 (classic)
  32699. 24p: 2332 (preferred)
  32700. 20p: 33
  32701. 18p: 334
  32702. 16p: 3444
  32703. PAL output (25i):
  32704. 27.5p: 12222
  32705. 24p: 222222222223 (&quot;Euro pulldown&quot;)
  32706. 16.67p: 33
  32707. 16p: 33333334
  32708. </pre></div>
  32709. <a name="thistogram"></a>
  32710. <h3 class="section">32.220 thistogram<span class="pull-right"><a class="anchor hidden-xs" href="#thistogram" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-thistogram" aria-hidden="true">TOC</a></span></h3>
  32711. <p>Compute and draw a color distribution histogram for the input video across time.
  32712. </p>
  32713. <p>Unlike <a href="#histogram">histogram</a> video filter which only shows histogram of single input frame
  32714. at certain time, this filter shows also past histograms of number of frames defined
  32715. by <code>width</code> option.
  32716. </p>
  32717. <p>The computed histogram is a representation of the color component
  32718. distribution in an image.
  32719. </p>
  32720. <p>The filter accepts the following options:
  32721. </p>
  32722. <dl compact="compact">
  32723. <dt><samp>width, w</samp></dt>
  32724. <dd><p>Set width of single color component output. Default value is <code>0</code>.
  32725. Value of <code>0</code> means width will be picked from input video.
  32726. This also set number of passed histograms to keep.
  32727. Allowed range is [0, 8192].
  32728. </p>
  32729. </dd>
  32730. <dt><samp>display_mode, d</samp></dt>
  32731. <dd><p>Set display mode.
  32732. It accepts the following values:
  32733. </p><dl compact="compact">
  32734. <dt>&lsquo;<samp>stack</samp>&rsquo;</dt>
  32735. <dd><p>Per color component graphs are placed below each other.
  32736. </p>
  32737. </dd>
  32738. <dt>&lsquo;<samp>parade</samp>&rsquo;</dt>
  32739. <dd><p>Per color component graphs are placed side by side.
  32740. </p>
  32741. </dd>
  32742. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  32743. <dd><p>Presents information identical to that in the <code>parade</code>, except
  32744. that the graphs representing color components are superimposed directly
  32745. over one another.
  32746. </p></dd>
  32747. </dl>
  32748. <p>Default is <code>stack</code>.
  32749. </p>
  32750. </dd>
  32751. <dt><samp>levels_mode, m</samp></dt>
  32752. <dd><p>Set mode. Can be either <code>linear</code>, or <code>logarithmic</code>.
  32753. Default is <code>linear</code>.
  32754. </p>
  32755. </dd>
  32756. <dt><samp>components, c</samp></dt>
  32757. <dd><p>Set what color components to display.
  32758. Default is <code>7</code>.
  32759. </p>
  32760. </dd>
  32761. <dt><samp>bgopacity, b</samp></dt>
  32762. <dd><p>Set background opacity. Default is <code>0.9</code>.
  32763. </p>
  32764. </dd>
  32765. <dt><samp>envelope, e</samp></dt>
  32766. <dd><p>Show envelope. Default is disabled.
  32767. </p>
  32768. </dd>
  32769. <dt><samp>ecolor, ec</samp></dt>
  32770. <dd><p>Set envelope color. Default is <code>gold</code>.
  32771. </p>
  32772. </dd>
  32773. <dt><samp>slide</samp></dt>
  32774. <dd><p>Set slide mode.
  32775. </p>
  32776. <p>Available values for slide is:
  32777. </p><dl compact="compact">
  32778. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  32779. <dd><p>Draw new frame when right border is reached.
  32780. </p>
  32781. </dd>
  32782. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  32783. <dd><p>Replace old columns with new ones.
  32784. </p>
  32785. </dd>
  32786. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  32787. <dd><p>Scroll from right to left.
  32788. </p>
  32789. </dd>
  32790. <dt>&lsquo;<samp>rscroll</samp>&rsquo;</dt>
  32791. <dd><p>Scroll from left to right.
  32792. </p>
  32793. </dd>
  32794. <dt>&lsquo;<samp>picture</samp>&rsquo;</dt>
  32795. <dd><p>Draw single picture.
  32796. </p></dd>
  32797. </dl>
  32798. <p>Default is <code>replace</code>.
  32799. </p></dd>
  32800. </dl>
  32801. <a name="threshold"></a>
  32802. <h3 class="section">32.221 threshold<span class="pull-right"><a class="anchor hidden-xs" href="#threshold" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-threshold" aria-hidden="true">TOC</a></span></h3>
  32803. <p>Apply threshold effect to video stream.
  32804. </p>
  32805. <p>This filter needs four video streams to perform thresholding.
  32806. First stream is stream we are filtering.
  32807. Second stream is holding threshold values, third stream is holding min values,
  32808. and last, fourth stream is holding max values.
  32809. </p>
  32810. <p>The filter accepts the following option:
  32811. </p>
  32812. <dl compact="compact">
  32813. <dt><samp>planes</samp></dt>
  32814. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  32815. By default value 0xf, all planes will be processed.
  32816. </p></dd>
  32817. </dl>
  32818. <p>For example if first stream pixel&rsquo;s component value is less then threshold value
  32819. of pixel component from 2nd threshold stream, third stream value will picked,
  32820. otherwise fourth stream pixel component value will be picked.
  32821. </p>
  32822. <p>Using color source filter one can perform various types of thresholding:
  32823. </p>
  32824. <a name="Examples-125"></a>
  32825. <h4 class="subsection">32.221.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-125" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-125" aria-hidden="true">TOC</a></span></h4>
  32826. <ul>
  32827. <li> Binary threshold, using gray color as threshold:
  32828. <div class="example">
  32829. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=black -f lavfi -i color=white -lavfi threshold output.avi
  32830. </pre></div>
  32831. </li><li> Inverted binary threshold, using gray color as threshold:
  32832. <div class="example">
  32833. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -f lavfi -i color=black -lavfi threshold output.avi
  32834. </pre></div>
  32835. </li><li> Truncate binary threshold, using gray color as threshold:
  32836. <div class="example">
  32837. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi
  32838. </pre></div>
  32839. </li><li> Threshold to zero, using gray color as threshold:
  32840. <div class="example">
  32841. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi
  32842. </pre></div>
  32843. </li><li> Inverted threshold to zero, using gray color as threshold:
  32844. <div class="example">
  32845. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi
  32846. </pre></div>
  32847. </li></ul>
  32848. <a name="thumbnail"></a>
  32849. <h3 class="section">32.222 thumbnail<span class="pull-right"><a class="anchor hidden-xs" href="#thumbnail" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-thumbnail" aria-hidden="true">TOC</a></span></h3>
  32850. <p>Select the most representative frame in a given sequence of consecutive frames.
  32851. </p>
  32852. <p>The filter accepts the following options:
  32853. </p>
  32854. <dl compact="compact">
  32855. <dt><samp>n</samp></dt>
  32856. <dd><p>Set the frames batch size to analyze; in a set of <var>n</var> frames, the filter
  32857. will pick one of them, and then handle the next batch of <var>n</var> frames until
  32858. the end. Default is <code>100</code>.
  32859. </p></dd>
  32860. </dl>
  32861. <p>Since the filter keeps track of the whole frames sequence, a bigger <var>n</var>
  32862. value will result in a higher memory usage, so a high value is not recommended.
  32863. </p>
  32864. <a name="Examples-126"></a>
  32865. <h4 class="subsection">32.222.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-126" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-126" aria-hidden="true">TOC</a></span></h4>
  32866. <ul>
  32867. <li> Extract one picture each 50 frames:
  32868. <div class="example">
  32869. <pre class="example">thumbnail=50
  32870. </pre></div>
  32871. </li><li> Complete example of a thumbnail creation with <code>ffmpeg</code>:
  32872. <div class="example">
  32873. <pre class="example">ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
  32874. </pre></div>
  32875. </li></ul>
  32876. <span id="tile"></span><a name="tile-1"></a>
  32877. <h3 class="section">32.223 tile<span class="pull-right"><a class="anchor hidden-xs" href="#tile-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tile-1" aria-hidden="true">TOC</a></span></h3>
  32878. <p>Tile several successive frames together.
  32879. </p>
  32880. <p>The <a href="#untile">untile</a> filter can do the reverse.
  32881. </p>
  32882. <p>The filter accepts the following options:
  32883. </p>
  32884. <dl compact="compact">
  32885. <dt><samp>layout</samp></dt>
  32886. <dd><p>Set the grid size (i.e. the number of lines and columns). For the syntax of
  32887. this option, check the
  32888. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  32889. </p>
  32890. </dd>
  32891. <dt><samp>nb_frames</samp></dt>
  32892. <dd><p>Set the maximum number of frames to render in the given area. It must be less
  32893. than or equal to <var>w</var>x<var>h</var>. The default value is <code>0</code>, meaning all
  32894. the area will be used.
  32895. </p>
  32896. </dd>
  32897. <dt><samp>margin</samp></dt>
  32898. <dd><p>Set the outer border margin in pixels.
  32899. </p>
  32900. </dd>
  32901. <dt><samp>padding</samp></dt>
  32902. <dd><p>Set the inner border thickness (i.e. the number of pixels between frames). For
  32903. more advanced padding options (such as having different values for the edges),
  32904. refer to the pad video filter.
  32905. </p>
  32906. </dd>
  32907. <dt><samp>color</samp></dt>
  32908. <dd><p>Specify the color of the unused area. For the syntax of this option, check the
  32909. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  32910. The default value of <var>color</var> is &quot;black&quot;.
  32911. </p>
  32912. </dd>
  32913. <dt><samp>overlap</samp></dt>
  32914. <dd><p>Set the number of frames to overlap when tiling several successive frames together.
  32915. The value must be between <code>0</code> and <var>nb_frames - 1</var>.
  32916. </p>
  32917. </dd>
  32918. <dt><samp>init_padding</samp></dt>
  32919. <dd><p>Set the number of frames to initially be empty before displaying first output frame.
  32920. This controls how soon will one get first output frame.
  32921. The value must be between <code>0</code> and <var>nb_frames - 1</var>.
  32922. </p></dd>
  32923. </dl>
  32924. <a name="Examples-127"></a>
  32925. <h4 class="subsection">32.223.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-127" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-127" aria-hidden="true">TOC</a></span></h4>
  32926. <ul>
  32927. <li> Produce 8x8 PNG tiles of all keyframes (<samp>-skip_frame nokey</samp>) in a movie:
  32928. <div class="example">
  32929. <pre class="example">ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
  32930. </pre></div>
  32931. <p>The <samp>-vsync 0</samp> is necessary to prevent <code>ffmpeg</code> from
  32932. duplicating each output frame to accommodate the originally detected frame
  32933. rate.
  32934. </p>
  32935. </li><li> Display <code>5</code> pictures in an area of <code>3x2</code> frames,
  32936. with <code>7</code> pixels between them, and <code>2</code> pixels of initial margin, using
  32937. mixed flat and named options:
  32938. <div class="example">
  32939. <pre class="example">tile=3x2:nb_frames=5:padding=7:margin=2
  32940. </pre></div>
  32941. </li></ul>
  32942. <a name="tinterlace"></a>
  32943. <h3 class="section">32.224 tinterlace<span class="pull-right"><a class="anchor hidden-xs" href="#tinterlace" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tinterlace" aria-hidden="true">TOC</a></span></h3>
  32944. <p>Perform various types of temporal field interlacing.
  32945. </p>
  32946. <p>Frames are counted starting from 1, so the first input frame is
  32947. considered odd.
  32948. </p>
  32949. <p>The filter accepts the following options:
  32950. </p>
  32951. <dl compact="compact">
  32952. <dt><samp>mode</samp></dt>
  32953. <dd><p>Specify the mode of the interlacing. This option can also be specified
  32954. as a value alone. See below for a list of values for this option.
  32955. </p>
  32956. <p>Available values are:
  32957. </p>
  32958. <dl compact="compact">
  32959. <dt>&lsquo;<samp>merge, 0</samp>&rsquo;</dt>
  32960. <dd><p>Move odd frames into the upper field, even into the lower field,
  32961. generating a double height frame at half frame rate.
  32962. </p><div class="example">
  32963. <pre class="example"> ------&gt; time
  32964. Input:
  32965. Frame 1 Frame 2 Frame 3 Frame 4
  32966. 11111 22222 33333 44444
  32967. 11111 22222 33333 44444
  32968. 11111 22222 33333 44444
  32969. 11111 22222 33333 44444
  32970. Output:
  32971. 11111 33333
  32972. 22222 44444
  32973. 11111 33333
  32974. 22222 44444
  32975. 11111 33333
  32976. 22222 44444
  32977. 11111 33333
  32978. 22222 44444
  32979. </pre></div>
  32980. </dd>
  32981. <dt>&lsquo;<samp>drop_even, 1</samp>&rsquo;</dt>
  32982. <dd><p>Only output odd frames, even frames are dropped, generating a frame with
  32983. unchanged height at half frame rate.
  32984. </p>
  32985. <div class="example">
  32986. <pre class="example"> ------&gt; time
  32987. Input:
  32988. Frame 1 Frame 2 Frame 3 Frame 4
  32989. 11111 22222 33333 44444
  32990. 11111 22222 33333 44444
  32991. 11111 22222 33333 44444
  32992. 11111 22222 33333 44444
  32993. Output:
  32994. 11111 33333
  32995. 11111 33333
  32996. 11111 33333
  32997. 11111 33333
  32998. </pre></div>
  32999. </dd>
  33000. <dt>&lsquo;<samp>drop_odd, 2</samp>&rsquo;</dt>
  33001. <dd><p>Only output even frames, odd frames are dropped, generating a frame with
  33002. unchanged height at half frame rate.
  33003. </p>
  33004. <div class="example">
  33005. <pre class="example"> ------&gt; time
  33006. Input:
  33007. Frame 1 Frame 2 Frame 3 Frame 4
  33008. 11111 22222 33333 44444
  33009. 11111 22222 33333 44444
  33010. 11111 22222 33333 44444
  33011. 11111 22222 33333 44444
  33012. Output:
  33013. 22222 44444
  33014. 22222 44444
  33015. 22222 44444
  33016. 22222 44444
  33017. </pre></div>
  33018. </dd>
  33019. <dt>&lsquo;<samp>pad, 3</samp>&rsquo;</dt>
  33020. <dd><p>Expand each frame to full height, but pad alternate lines with black,
  33021. generating a frame with double height at the same input frame rate.
  33022. </p>
  33023. <div class="example">
  33024. <pre class="example"> ------&gt; time
  33025. Input:
  33026. Frame 1 Frame 2 Frame 3 Frame 4
  33027. 11111 22222 33333 44444
  33028. 11111 22222 33333 44444
  33029. 11111 22222 33333 44444
  33030. 11111 22222 33333 44444
  33031. Output:
  33032. 11111 ..... 33333 .....
  33033. ..... 22222 ..... 44444
  33034. 11111 ..... 33333 .....
  33035. ..... 22222 ..... 44444
  33036. 11111 ..... 33333 .....
  33037. ..... 22222 ..... 44444
  33038. 11111 ..... 33333 .....
  33039. ..... 22222 ..... 44444
  33040. </pre></div>
  33041. </dd>
  33042. <dt>&lsquo;<samp>interleave_top, 4</samp>&rsquo;</dt>
  33043. <dd><p>Interleave the upper field from odd frames with the lower field from
  33044. even frames, generating a frame with unchanged height at half frame rate.
  33045. </p>
  33046. <div class="example">
  33047. <pre class="example"> ------&gt; time
  33048. Input:
  33049. Frame 1 Frame 2 Frame 3 Frame 4
  33050. 11111&lt;- 22222 33333&lt;- 44444
  33051. 11111 22222&lt;- 33333 44444&lt;-
  33052. 11111&lt;- 22222 33333&lt;- 44444
  33053. 11111 22222&lt;- 33333 44444&lt;-
  33054. Output:
  33055. 11111 33333
  33056. 22222 44444
  33057. 11111 33333
  33058. 22222 44444
  33059. </pre></div>
  33060. </dd>
  33061. <dt>&lsquo;<samp>interleave_bottom, 5</samp>&rsquo;</dt>
  33062. <dd><p>Interleave the lower field from odd frames with the upper field from
  33063. even frames, generating a frame with unchanged height at half frame rate.
  33064. </p>
  33065. <div class="example">
  33066. <pre class="example"> ------&gt; time
  33067. Input:
  33068. Frame 1 Frame 2 Frame 3 Frame 4
  33069. 11111 22222&lt;- 33333 44444&lt;-
  33070. 11111&lt;- 22222 33333&lt;- 44444
  33071. 11111 22222&lt;- 33333 44444&lt;-
  33072. 11111&lt;- 22222 33333&lt;- 44444
  33073. Output:
  33074. 22222 44444
  33075. 11111 33333
  33076. 22222 44444
  33077. 11111 33333
  33078. </pre></div>
  33079. </dd>
  33080. <dt>&lsquo;<samp>interlacex2, 6</samp>&rsquo;</dt>
  33081. <dd><p>Double frame rate with unchanged height. Frames are inserted each
  33082. containing the second temporal field from the previous input frame and
  33083. the first temporal field from the next input frame. This mode relies on
  33084. the top_field_first flag. Useful for interlaced video displays with no
  33085. field synchronisation.
  33086. </p>
  33087. <div class="example">
  33088. <pre class="example"> ------&gt; time
  33089. Input:
  33090. Frame 1 Frame 2 Frame 3 Frame 4
  33091. 11111 22222 33333 44444
  33092. 11111 22222 33333 44444
  33093. 11111 22222 33333 44444
  33094. 11111 22222 33333 44444
  33095. Output:
  33096. 11111 22222 22222 33333 33333 44444 44444
  33097. 11111 11111 22222 22222 33333 33333 44444
  33098. 11111 22222 22222 33333 33333 44444 44444
  33099. 11111 11111 22222 22222 33333 33333 44444
  33100. </pre></div>
  33101. </dd>
  33102. <dt>&lsquo;<samp>mergex2, 7</samp>&rsquo;</dt>
  33103. <dd><p>Move odd frames into the upper field, even into the lower field,
  33104. generating a double height frame at same frame rate.
  33105. </p>
  33106. <div class="example">
  33107. <pre class="example"> ------&gt; time
  33108. Input:
  33109. Frame 1 Frame 2 Frame 3 Frame 4
  33110. 11111 22222 33333 44444
  33111. 11111 22222 33333 44444
  33112. 11111 22222 33333 44444
  33113. 11111 22222 33333 44444
  33114. Output:
  33115. 11111 33333 33333 55555
  33116. 22222 22222 44444 44444
  33117. 11111 33333 33333 55555
  33118. 22222 22222 44444 44444
  33119. 11111 33333 33333 55555
  33120. 22222 22222 44444 44444
  33121. 11111 33333 33333 55555
  33122. 22222 22222 44444 44444
  33123. </pre></div>
  33124. </dd>
  33125. </dl>
  33126. <p>Numeric values are deprecated but are accepted for backward
  33127. compatibility reasons.
  33128. </p>
  33129. <p>Default mode is <code>merge</code>.
  33130. </p>
  33131. </dd>
  33132. <dt><samp>flags</samp></dt>
  33133. <dd><p>Specify flags influencing the filter process.
  33134. </p>
  33135. <p>Available value for <var>flags</var> is:
  33136. </p>
  33137. <dl compact="compact">
  33138. <dt><samp>low_pass_filter, vlpf</samp></dt>
  33139. <dd><p>Enable linear vertical low-pass filtering in the filter.
  33140. Vertical low-pass filtering is required when creating an interlaced
  33141. destination from a progressive source which contains high-frequency
  33142. vertical detail. Filtering will reduce interlace &rsquo;twitter&rsquo; and Moire
  33143. patterning.
  33144. </p>
  33145. </dd>
  33146. <dt><samp>complex_filter, cvlpf</samp></dt>
  33147. <dd><p>Enable complex vertical low-pass filtering.
  33148. This will slightly less reduce interlace &rsquo;twitter&rsquo; and Moire
  33149. patterning but better retain detail and subjective sharpness impression.
  33150. </p>
  33151. </dd>
  33152. <dt><samp>bypass_il</samp></dt>
  33153. <dd><p>Bypass already interlaced frames, only adjust the frame rate.
  33154. </p></dd>
  33155. </dl>
  33156. <p>Vertical low-pass filtering and bypassing already interlaced frames can only be
  33157. enabled for <samp>mode</samp> <var>interleave_top</var> and <var>interleave_bottom</var>.
  33158. </p>
  33159. </dd>
  33160. </dl>
  33161. <a name="tmedian"></a>
  33162. <h3 class="section">32.225 tmedian<span class="pull-right"><a class="anchor hidden-xs" href="#tmedian" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tmedian" aria-hidden="true">TOC</a></span></h3>
  33163. <p>Pick median pixels from several successive input video frames.
  33164. </p>
  33165. <p>The filter accepts the following options:
  33166. </p>
  33167. <dl compact="compact">
  33168. <dt><samp>radius</samp></dt>
  33169. <dd><p>Set radius of median filter.
  33170. Default is 1. Allowed range is from 1 to 127.
  33171. </p>
  33172. </dd>
  33173. <dt><samp>planes</samp></dt>
  33174. <dd><p>Set which planes to filter. Default value is <code>15</code>, by which all planes are processed.
  33175. </p>
  33176. </dd>
  33177. <dt><samp>percentile</samp></dt>
  33178. <dd><p>Set median percentile. Default value is <code>0.5</code>.
  33179. Default value of <code>0.5</code> will pick always median values, while <code>0</code> will pick
  33180. minimum values, and <code>1</code> maximum values.
  33181. </p></dd>
  33182. </dl>
  33183. <a name="Commands-127"></a>
  33184. <h4 class="subsection">32.225.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-127" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-127" aria-hidden="true">TOC</a></span></h4>
  33185. <p>This filter supports all above options as <a href="#commands">commands</a>, excluding option <code>radius</code>.
  33186. </p>
  33187. <a name="tmidequalizer"></a>
  33188. <h3 class="section">32.226 tmidequalizer<span class="pull-right"><a class="anchor hidden-xs" href="#tmidequalizer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tmidequalizer" aria-hidden="true">TOC</a></span></h3>
  33189. <p>Apply Temporal Midway Video Equalization effect.
  33190. </p>
  33191. <p>Midway Video Equalization adjusts a sequence of video frames to have the same
  33192. histograms, while maintaining their dynamics as much as possible. It&rsquo;s
  33193. useful for e.g. matching exposures from a video frames sequence.
  33194. </p>
  33195. <p>This filter accepts the following option:
  33196. </p>
  33197. <dl compact="compact">
  33198. <dt><samp>radius</samp></dt>
  33199. <dd><p>Set filtering radius. Default is <code>5</code>. Allowed range is from 1 to 127.
  33200. </p>
  33201. </dd>
  33202. <dt><samp>sigma</samp></dt>
  33203. <dd><p>Set filtering sigma. Default is <code>0.5</code>. This controls strength of filtering.
  33204. Setting this option to 0 effectively does nothing.
  33205. </p>
  33206. </dd>
  33207. <dt><samp>planes</samp></dt>
  33208. <dd><p>Set which planes to process. Default is <code>15</code>, which is all available planes.
  33209. </p></dd>
  33210. </dl>
  33211. <a name="tmix"></a>
  33212. <h3 class="section">32.227 tmix<span class="pull-right"><a class="anchor hidden-xs" href="#tmix" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tmix" aria-hidden="true">TOC</a></span></h3>
  33213. <p>Mix successive video frames.
  33214. </p>
  33215. <p>A description of the accepted options follows.
  33216. </p>
  33217. <dl compact="compact">
  33218. <dt><samp>frames</samp></dt>
  33219. <dd><p>The number of successive frames to mix. If unspecified, it defaults to 3.
  33220. </p>
  33221. </dd>
  33222. <dt><samp>weights</samp></dt>
  33223. <dd><p>Specify weight of each input video frame.
  33224. Each weight is separated by space. If number of weights is smaller than
  33225. number of <var>frames</var> last specified weight will be used for all remaining
  33226. unset weights.
  33227. </p>
  33228. </dd>
  33229. <dt><samp>scale</samp></dt>
  33230. <dd><p>Specify scale, if it is set it will be multiplied with sum
  33231. of each weight multiplied with pixel values to give final destination
  33232. pixel value. By default <var>scale</var> is auto scaled to sum of weights.
  33233. </p></dd>
  33234. </dl>
  33235. <a name="Examples-128"></a>
  33236. <h4 class="subsection">32.227.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-128" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-128" aria-hidden="true">TOC</a></span></h4>
  33237. <ul>
  33238. <li> Average 7 successive frames:
  33239. <div class="example">
  33240. <pre class="example">tmix=frames=7:weights=&quot;1 1 1 1 1 1 1&quot;
  33241. </pre></div>
  33242. </li><li> Apply simple temporal convolution:
  33243. <div class="example">
  33244. <pre class="example">tmix=frames=3:weights=&quot;-1 3 -1&quot;
  33245. </pre></div>
  33246. </li><li> Similar as above but only showing temporal differences:
  33247. <div class="example">
  33248. <pre class="example">tmix=frames=3:weights=&quot;-1 2 -1&quot;:scale=1
  33249. </pre></div>
  33250. </li></ul>
  33251. <a name="Commands-128"></a>
  33252. <h4 class="subsection">32.227.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-128" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-128" aria-hidden="true">TOC</a></span></h4>
  33253. <p>This filter supports the following commands:
  33254. </p><dl compact="compact">
  33255. <dt><samp>weights</samp></dt>
  33256. <dt><samp>scale</samp></dt>
  33257. <dd><p>Syntax is same as option with same name.
  33258. </p></dd>
  33259. </dl>
  33260. <span id="tonemap"></span><a name="tonemap-1"></a>
  33261. <h3 class="section">32.228 tonemap<span class="pull-right"><a class="anchor hidden-xs" href="#tonemap-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tonemap-1" aria-hidden="true">TOC</a></span></h3>
  33262. <p>Tone map colors from different dynamic ranges.
  33263. </p>
  33264. <p>This filter expects data in single precision floating point, as it needs to
  33265. operate on (and can output) out-of-range values. Another filter, such as
  33266. <a href="#zscale">zscale</a>, is needed to convert the resulting frame to a usable format.
  33267. </p>
  33268. <p>The tonemapping algorithms implemented only work on linear light, so input
  33269. data should be linearized beforehand (and possibly correctly tagged).
  33270. </p>
  33271. <div class="example">
  33272. <pre class="example">ffmpeg -i INPUT -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p OUTPUT
  33273. </pre></div>
  33274. <a name="Options-34"></a>
  33275. <h4 class="subsection">32.228.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-34" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-34" aria-hidden="true">TOC</a></span></h4>
  33276. <p>The filter accepts the following options.
  33277. </p>
  33278. <dl compact="compact">
  33279. <dt><samp>tonemap</samp></dt>
  33280. <dd><p>Set the tone map algorithm to use.
  33281. </p>
  33282. <p>Possible values are:
  33283. </p><dl compact="compact">
  33284. <dt><var>none</var></dt>
  33285. <dd><p>Do not apply any tone map, only desaturate overbright pixels.
  33286. </p>
  33287. </dd>
  33288. <dt><var>clip</var></dt>
  33289. <dd><p>Hard-clip any out-of-range values. Use it for perfect color accuracy for
  33290. in-range values, while distorting out-of-range values.
  33291. </p>
  33292. </dd>
  33293. <dt><var>linear</var></dt>
  33294. <dd><p>Stretch the entire reference gamut to a linear multiple of the display.
  33295. </p>
  33296. </dd>
  33297. <dt><var>gamma</var></dt>
  33298. <dd><p>Fit a logarithmic transfer between the tone curves.
  33299. </p>
  33300. </dd>
  33301. <dt><var>reinhard</var></dt>
  33302. <dd><p>Preserve overall image brightness with a simple curve, using nonlinear
  33303. contrast, which results in flattening details and degrading color accuracy.
  33304. </p>
  33305. </dd>
  33306. <dt><var>hable</var></dt>
  33307. <dd><p>Preserve both dark and bright details better than <var>reinhard</var>, at the cost
  33308. of slightly darkening everything. Use it when detail preservation is more
  33309. important than color and brightness accuracy.
  33310. </p>
  33311. </dd>
  33312. <dt><var>mobius</var></dt>
  33313. <dd><p>Smoothly map out-of-range values, while retaining contrast and colors for
  33314. in-range material as much as possible. Use it when color accuracy is more
  33315. important than detail preservation.
  33316. </p></dd>
  33317. </dl>
  33318. <p>Default is none.
  33319. </p>
  33320. </dd>
  33321. <dt><samp>param</samp></dt>
  33322. <dd><p>Tune the tone mapping algorithm.
  33323. </p>
  33324. <p>This affects the following algorithms:
  33325. </p><dl compact="compact">
  33326. <dt><var>none</var></dt>
  33327. <dd><p>Ignored.
  33328. </p>
  33329. </dd>
  33330. <dt><var>linear</var></dt>
  33331. <dd><p>Specifies the scale factor to use while stretching.
  33332. Default to 1.0.
  33333. </p>
  33334. </dd>
  33335. <dt><var>gamma</var></dt>
  33336. <dd><p>Specifies the exponent of the function.
  33337. Default to 1.8.
  33338. </p>
  33339. </dd>
  33340. <dt><var>clip</var></dt>
  33341. <dd><p>Specify an extra linear coefficient to multiply into the signal before clipping.
  33342. Default to 1.0.
  33343. </p>
  33344. </dd>
  33345. <dt><var>reinhard</var></dt>
  33346. <dd><p>Specify the local contrast coefficient at the display peak.
  33347. Default to 0.5, which means that in-gamut values will be about half as bright
  33348. as when clipping.
  33349. </p>
  33350. </dd>
  33351. <dt><var>hable</var></dt>
  33352. <dd><p>Ignored.
  33353. </p>
  33354. </dd>
  33355. <dt><var>mobius</var></dt>
  33356. <dd><p>Specify the transition point from linear to mobius transform. Every value
  33357. below this point is guaranteed to be mapped 1:1. The higher the value, the
  33358. more accurate the result will be, at the cost of losing bright details.
  33359. Default to 0.3, which due to the steep initial slope still preserves in-range
  33360. colors fairly accurately.
  33361. </p></dd>
  33362. </dl>
  33363. </dd>
  33364. <dt><samp>desat</samp></dt>
  33365. <dd><p>Apply desaturation for highlights that exceed this level of brightness. The
  33366. higher the parameter, the more color information will be preserved. This
  33367. setting helps prevent unnaturally blown-out colors for super-highlights, by
  33368. (smoothly) turning into white instead. This makes images feel more natural,
  33369. at the cost of reducing information about out-of-range colors.
  33370. </p>
  33371. <p>The default of 2.0 is somewhat conservative and will mostly just apply to
  33372. skies or directly sunlit surfaces. A setting of 0.0 disables this option.
  33373. </p>
  33374. <p>This option works only if the input frame has a supported color tag.
  33375. </p>
  33376. </dd>
  33377. <dt><samp>peak</samp></dt>
  33378. <dd><p>Override signal/nominal/reference peak with this value. Useful when the
  33379. embedded peak information in display metadata is not reliable or when tone
  33380. mapping from a lower range to a higher range.
  33381. </p></dd>
  33382. </dl>
  33383. <a name="tpad"></a>
  33384. <h3 class="section">32.229 tpad<span class="pull-right"><a class="anchor hidden-xs" href="#tpad" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tpad" aria-hidden="true">TOC</a></span></h3>
  33385. <p>Temporarily pad video frames.
  33386. </p>
  33387. <p>The filter accepts the following options:
  33388. </p>
  33389. <dl compact="compact">
  33390. <dt><samp>start</samp></dt>
  33391. <dd><p>Specify number of delay frames before input video stream. Default is 0.
  33392. </p>
  33393. </dd>
  33394. <dt><samp>stop</samp></dt>
  33395. <dd><p>Specify number of padding frames after input video stream.
  33396. Set to -1 to pad indefinitely. Default is 0.
  33397. </p>
  33398. </dd>
  33399. <dt><samp>start_mode</samp></dt>
  33400. <dd><p>Set kind of frames added to beginning of stream.
  33401. Can be either <var>add</var> or <var>clone</var>.
  33402. With <var>add</var> frames of solid-color are added.
  33403. With <var>clone</var> frames are clones of first frame.
  33404. Default is <var>add</var>.
  33405. </p>
  33406. </dd>
  33407. <dt><samp>stop_mode</samp></dt>
  33408. <dd><p>Set kind of frames added to end of stream.
  33409. Can be either <var>add</var> or <var>clone</var>.
  33410. With <var>add</var> frames of solid-color are added.
  33411. With <var>clone</var> frames are clones of last frame.
  33412. Default is <var>add</var>.
  33413. </p>
  33414. </dd>
  33415. <dt><samp>start_duration, stop_duration</samp></dt>
  33416. <dd><p>Specify the duration of the start/stop delay. See
  33417. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  33418. for the accepted syntax.
  33419. These options override <var>start</var> and <var>stop</var>. Default is 0.
  33420. </p>
  33421. </dd>
  33422. <dt><samp>color</samp></dt>
  33423. <dd><p>Specify the color of the padded area. For the syntax of this option,
  33424. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils
  33425. manual</a>.
  33426. </p>
  33427. <p>The default value of <var>color</var> is &quot;black&quot;.
  33428. </p></dd>
  33429. </dl>
  33430. <span id="transpose"></span><a name="transpose-1"></a>
  33431. <h3 class="section">32.230 transpose<span class="pull-right"><a class="anchor hidden-xs" href="#transpose-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-transpose-1" aria-hidden="true">TOC</a></span></h3>
  33432. <p>Transpose rows with columns in the input video and optionally flip it.
  33433. </p>
  33434. <p>It accepts the following parameters:
  33435. </p>
  33436. <dl compact="compact">
  33437. <dt><samp>dir</samp></dt>
  33438. <dd><p>Specify the transposition direction.
  33439. </p>
  33440. <p>Can assume the following values:
  33441. </p><dl compact="compact">
  33442. <dt>&lsquo;<samp>0, 4, cclock_flip</samp>&rsquo;</dt>
  33443. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
  33444. </p><div class="example">
  33445. <pre class="example">L.R L.l
  33446. . . -&gt; . .
  33447. l.r R.r
  33448. </pre></div>
  33449. </dd>
  33450. <dt>&lsquo;<samp>1, 5, clock</samp>&rsquo;</dt>
  33451. <dd><p>Rotate by 90 degrees clockwise, that is:
  33452. </p><div class="example">
  33453. <pre class="example">L.R l.L
  33454. . . -&gt; . .
  33455. l.r r.R
  33456. </pre></div>
  33457. </dd>
  33458. <dt>&lsquo;<samp>2, 6, cclock</samp>&rsquo;</dt>
  33459. <dd><p>Rotate by 90 degrees counterclockwise, that is:
  33460. </p><div class="example">
  33461. <pre class="example">L.R R.r
  33462. . . -&gt; . .
  33463. l.r L.l
  33464. </pre></div>
  33465. </dd>
  33466. <dt>&lsquo;<samp>3, 7, clock_flip</samp>&rsquo;</dt>
  33467. <dd><p>Rotate by 90 degrees clockwise and vertically flip, that is:
  33468. </p><div class="example">
  33469. <pre class="example">L.R r.R
  33470. . . -&gt; . .
  33471. l.r l.L
  33472. </pre></div>
  33473. </dd>
  33474. </dl>
  33475. <p>For values between 4-7, the transposition is only done if the input
  33476. video geometry is portrait and not landscape. These values are
  33477. deprecated, the <code>passthrough</code> option should be used instead.
  33478. </p>
  33479. <p>Numerical values are deprecated, and should be dropped in favor of
  33480. symbolic constants.
  33481. </p>
  33482. </dd>
  33483. <dt><samp>passthrough</samp></dt>
  33484. <dd><p>Do not apply the transposition if the input geometry matches the one
  33485. specified by the specified value. It accepts the following values:
  33486. </p><dl compact="compact">
  33487. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  33488. <dd><p>Always apply transposition.
  33489. </p></dd>
  33490. <dt>&lsquo;<samp>portrait</samp>&rsquo;</dt>
  33491. <dd><p>Preserve portrait geometry (when <var>height</var> &gt;= <var>width</var>).
  33492. </p></dd>
  33493. <dt>&lsquo;<samp>landscape</samp>&rsquo;</dt>
  33494. <dd><p>Preserve landscape geometry (when <var>width</var> &gt;= <var>height</var>).
  33495. </p></dd>
  33496. </dl>
  33497. <p>Default value is <code>none</code>.
  33498. </p></dd>
  33499. </dl>
  33500. <p>For example to rotate by 90 degrees clockwise and preserve portrait
  33501. layout:
  33502. </p><div class="example">
  33503. <pre class="example">transpose=dir=1:passthrough=portrait
  33504. </pre></div>
  33505. <p>The command above can also be specified as:
  33506. </p><div class="example">
  33507. <pre class="example">transpose=1:portrait
  33508. </pre></div>
  33509. <a name="transpose_005fnpp"></a>
  33510. <h3 class="section">32.231 transpose_npp<span class="pull-right"><a class="anchor hidden-xs" href="#transpose_005fnpp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-transpose_005fnpp" aria-hidden="true">TOC</a></span></h3>
  33511. <p>Transpose rows with columns in the input video and optionally flip it.
  33512. For more in depth examples see the <a href="#transpose">transpose</a> video filter, which shares mostly the same options.
  33513. </p>
  33514. <p>It accepts the following parameters:
  33515. </p>
  33516. <dl compact="compact">
  33517. <dt><samp>dir</samp></dt>
  33518. <dd><p>Specify the transposition direction.
  33519. </p>
  33520. <p>Can assume the following values:
  33521. </p><dl compact="compact">
  33522. <dt>&lsquo;<samp>cclock_flip</samp>&rsquo;</dt>
  33523. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip. (default)
  33524. </p>
  33525. </dd>
  33526. <dt>&lsquo;<samp>clock</samp>&rsquo;</dt>
  33527. <dd><p>Rotate by 90 degrees clockwise.
  33528. </p>
  33529. </dd>
  33530. <dt>&lsquo;<samp>cclock</samp>&rsquo;</dt>
  33531. <dd><p>Rotate by 90 degrees counterclockwise.
  33532. </p>
  33533. </dd>
  33534. <dt>&lsquo;<samp>clock_flip</samp>&rsquo;</dt>
  33535. <dd><p>Rotate by 90 degrees clockwise and vertically flip.
  33536. </p></dd>
  33537. </dl>
  33538. </dd>
  33539. <dt><samp>passthrough</samp></dt>
  33540. <dd><p>Do not apply the transposition if the input geometry matches the one
  33541. specified by the specified value. It accepts the following values:
  33542. </p><dl compact="compact">
  33543. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  33544. <dd><p>Always apply transposition. (default)
  33545. </p></dd>
  33546. <dt>&lsquo;<samp>portrait</samp>&rsquo;</dt>
  33547. <dd><p>Preserve portrait geometry (when <var>height</var> &gt;= <var>width</var>).
  33548. </p></dd>
  33549. <dt>&lsquo;<samp>landscape</samp>&rsquo;</dt>
  33550. <dd><p>Preserve landscape geometry (when <var>width</var> &gt;= <var>height</var>).
  33551. </p></dd>
  33552. </dl>
  33553. </dd>
  33554. </dl>
  33555. <a name="trim"></a>
  33556. <h3 class="section">32.232 trim<span class="pull-right"><a class="anchor hidden-xs" href="#trim" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-trim" aria-hidden="true">TOC</a></span></h3>
  33557. <p>Trim the input so that the output contains one continuous subpart of the input.
  33558. </p>
  33559. <p>It accepts the following parameters:
  33560. </p><dl compact="compact">
  33561. <dt><samp>start</samp></dt>
  33562. <dd><p>Specify the time of the start of the kept section, i.e. the frame with the
  33563. timestamp <var>start</var> will be the first frame in the output.
  33564. </p>
  33565. </dd>
  33566. <dt><samp>end</samp></dt>
  33567. <dd><p>Specify the time of the first frame that will be dropped, i.e. the frame
  33568. immediately preceding the one with the timestamp <var>end</var> will be the last
  33569. frame in the output.
  33570. </p>
  33571. </dd>
  33572. <dt><samp>start_pts</samp></dt>
  33573. <dd><p>This is the same as <var>start</var>, except this option sets the start timestamp
  33574. in timebase units instead of seconds.
  33575. </p>
  33576. </dd>
  33577. <dt><samp>end_pts</samp></dt>
  33578. <dd><p>This is the same as <var>end</var>, except this option sets the end timestamp
  33579. in timebase units instead of seconds.
  33580. </p>
  33581. </dd>
  33582. <dt><samp>duration</samp></dt>
  33583. <dd><p>The maximum duration of the output in seconds.
  33584. </p>
  33585. </dd>
  33586. <dt><samp>start_frame</samp></dt>
  33587. <dd><p>The number of the first frame that should be passed to the output.
  33588. </p>
  33589. </dd>
  33590. <dt><samp>end_frame</samp></dt>
  33591. <dd><p>The number of the first frame that should be dropped.
  33592. </p></dd>
  33593. </dl>
  33594. <p><samp>start</samp>, <samp>end</samp>, and <samp>duration</samp> are expressed as time
  33595. duration specifications; see
  33596. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  33597. for the accepted syntax.
  33598. </p>
  33599. <p>Note that the first two sets of the start/end options and the <samp>duration</samp>
  33600. option look at the frame timestamp, while the _frame variants simply count the
  33601. frames that pass through the filter. Also note that this filter does not modify
  33602. the timestamps. If you wish for the output timestamps to start at zero, insert a
  33603. setpts filter after the trim filter.
  33604. </p>
  33605. <p>If multiple start or end options are set, this filter tries to be greedy and
  33606. keep all the frames that match at least one of the specified constraints. To keep
  33607. only the part that matches all the constraints at once, chain multiple trim
  33608. filters.
  33609. </p>
  33610. <p>The defaults are such that all the input is kept. So it is possible to set e.g.
  33611. just the end values to keep everything before the specified time.
  33612. </p>
  33613. <p>Examples:
  33614. </p><ul>
  33615. <li> Drop everything except the second minute of input:
  33616. <div class="example">
  33617. <pre class="example">ffmpeg -i INPUT -vf trim=60:120
  33618. </pre></div>
  33619. </li><li> Keep only the first second:
  33620. <div class="example">
  33621. <pre class="example">ffmpeg -i INPUT -vf trim=duration=1
  33622. </pre></div>
  33623. </li></ul>
  33624. <a name="unpremultiply"></a>
  33625. <h3 class="section">32.233 unpremultiply<span class="pull-right"><a class="anchor hidden-xs" href="#unpremultiply" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-unpremultiply" aria-hidden="true">TOC</a></span></h3>
  33626. <p>Apply alpha unpremultiply effect to input video stream using first plane
  33627. of second stream as alpha.
  33628. </p>
  33629. <p>Both streams must have same dimensions and same pixel format.
  33630. </p>
  33631. <p>The filter accepts the following option:
  33632. </p>
  33633. <dl compact="compact">
  33634. <dt><samp>planes</samp></dt>
  33635. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  33636. By default value 0xf, all planes will be processed.
  33637. </p>
  33638. <p>If the format has 1 or 2 components, then luma is bit 0.
  33639. If the format has 3 or 4 components:
  33640. for RGB formats bit 0 is green, bit 1 is blue and bit 2 is red;
  33641. for YUV formats bit 0 is luma, bit 1 is chroma-U and bit 2 is chroma-V.
  33642. If present, the alpha channel is always the last bit.
  33643. </p>
  33644. </dd>
  33645. <dt><samp>inplace</samp></dt>
  33646. <dd><p>Do not require 2nd input for processing, instead use alpha plane from input stream.
  33647. </p></dd>
  33648. </dl>
  33649. <span id="unsharp"></span><a name="unsharp-1"></a>
  33650. <h3 class="section">32.234 unsharp<span class="pull-right"><a class="anchor hidden-xs" href="#unsharp-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-unsharp-1" aria-hidden="true">TOC</a></span></h3>
  33651. <p>Sharpen or blur the input video.
  33652. </p>
  33653. <p>It accepts the following parameters:
  33654. </p>
  33655. <dl compact="compact">
  33656. <dt><samp>luma_msize_x, lx</samp></dt>
  33657. <dd><p>Set the luma matrix horizontal size. It must be an odd integer between
  33658. 3 and 23. The default value is 5.
  33659. </p>
  33660. </dd>
  33661. <dt><samp>luma_msize_y, ly</samp></dt>
  33662. <dd><p>Set the luma matrix vertical size. It must be an odd integer between 3
  33663. and 23. The default value is 5.
  33664. </p>
  33665. </dd>
  33666. <dt><samp>luma_amount, la</samp></dt>
  33667. <dd><p>Set the luma effect strength. It must be a floating point number, reasonable
  33668. values lay between -1.5 and 1.5.
  33669. </p>
  33670. <p>Negative values will blur the input video, while positive values will
  33671. sharpen it, a value of zero will disable the effect.
  33672. </p>
  33673. <p>Default value is 1.0.
  33674. </p>
  33675. </dd>
  33676. <dt><samp>chroma_msize_x, cx</samp></dt>
  33677. <dd><p>Set the chroma matrix horizontal size. It must be an odd integer
  33678. between 3 and 23. The default value is 5.
  33679. </p>
  33680. </dd>
  33681. <dt><samp>chroma_msize_y, cy</samp></dt>
  33682. <dd><p>Set the chroma matrix vertical size. It must be an odd integer
  33683. between 3 and 23. The default value is 5.
  33684. </p>
  33685. </dd>
  33686. <dt><samp>chroma_amount, ca</samp></dt>
  33687. <dd><p>Set the chroma effect strength. It must be a floating point number, reasonable
  33688. values lay between -1.5 and 1.5.
  33689. </p>
  33690. <p>Negative values will blur the input video, while positive values will
  33691. sharpen it, a value of zero will disable the effect.
  33692. </p>
  33693. <p>Default value is 0.0.
  33694. </p>
  33695. </dd>
  33696. </dl>
  33697. <p>All parameters are optional and default to the equivalent of the
  33698. string &rsquo;5:5:1.0:5:5:0.0&rsquo;.
  33699. </p>
  33700. <a name="Examples-129"></a>
  33701. <h4 class="subsection">32.234.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-129" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-129" aria-hidden="true">TOC</a></span></h4>
  33702. <ul>
  33703. <li> Apply strong luma sharpen effect:
  33704. <div class="example">
  33705. <pre class="example">unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
  33706. </pre></div>
  33707. </li><li> Apply a strong blur of both luma and chroma parameters:
  33708. <div class="example">
  33709. <pre class="example">unsharp=7:7:-2:7:7:-2
  33710. </pre></div>
  33711. </li></ul>
  33712. <span id="untile"></span><a name="untile-1"></a>
  33713. <h3 class="section">32.235 untile<span class="pull-right"><a class="anchor hidden-xs" href="#untile-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-untile-1" aria-hidden="true">TOC</a></span></h3>
  33714. <p>Decompose a video made of tiled images into the individual images.
  33715. </p>
  33716. <p>The frame rate of the output video is the frame rate of the input video
  33717. multiplied by the number of tiles.
  33718. </p>
  33719. <p>This filter does the reverse of <a href="#tile">tile</a>.
  33720. </p>
  33721. <p>The filter accepts the following options:
  33722. </p>
  33723. <dl compact="compact">
  33724. <dt><samp>layout</samp></dt>
  33725. <dd><p>Set the grid size (i.e. the number of lines and columns). For the syntax of
  33726. this option, check the
  33727. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  33728. </p></dd>
  33729. </dl>
  33730. <a name="Examples-130"></a>
  33731. <h4 class="subsection">32.235.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-130" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-130" aria-hidden="true">TOC</a></span></h4>
  33732. <ul>
  33733. <li> Produce a 1-second video from a still image file made of 25 frames stacked
  33734. vertically, like an analogic film reel:
  33735. <div class="example">
  33736. <pre class="example">ffmpeg -r 1 -i image.jpg -vf untile=1x25 movie.mkv
  33737. </pre></div>
  33738. </li></ul>
  33739. <a name="uspp"></a>
  33740. <h3 class="section">32.236 uspp<span class="pull-right"><a class="anchor hidden-xs" href="#uspp" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-uspp" aria-hidden="true">TOC</a></span></h3>
  33741. <p>Apply ultra slow/simple postprocessing filter that compresses and decompresses
  33742. the image at several (or - in the case of <samp>quality</samp> level <code>8</code> - all)
  33743. shifts and average the results.
  33744. </p>
  33745. <p>The way this differs from the behavior of spp is that uspp actually encodes &amp;
  33746. decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8
  33747. DCT similar to MJPEG.
  33748. </p>
  33749. <p>The filter accepts the following options:
  33750. </p>
  33751. <dl compact="compact">
  33752. <dt><samp>quality</samp></dt>
  33753. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  33754. an integer in the range 0-8. If set to <code>0</code>, the filter will have no
  33755. effect. A value of <code>8</code> means the higher quality. For each increment of
  33756. that value the speed drops by a factor of approximately 2. Default value is
  33757. <code>3</code>.
  33758. </p>
  33759. </dd>
  33760. <dt><samp>qp</samp></dt>
  33761. <dd><p>Force a constant quantization parameter. If not set, the filter will use the QP
  33762. from the video stream (if available).
  33763. </p></dd>
  33764. </dl>
  33765. <a name="v360"></a>
  33766. <h3 class="section">32.237 v360<span class="pull-right"><a class="anchor hidden-xs" href="#v360" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-v360" aria-hidden="true">TOC</a></span></h3>
  33767. <p>Convert 360 videos between various formats.
  33768. </p>
  33769. <p>The filter accepts the following options:
  33770. </p>
  33771. <dl compact="compact">
  33772. <dt><samp>input</samp></dt>
  33773. <dt><samp>output</samp></dt>
  33774. <dd><p>Set format of the input/output video.
  33775. </p>
  33776. <p>Available formats:
  33777. </p>
  33778. <dl compact="compact">
  33779. <dt>&lsquo;<samp>e</samp>&rsquo;</dt>
  33780. <dt>&lsquo;<samp>equirect</samp>&rsquo;</dt>
  33781. <dd><p>Equirectangular projection.
  33782. </p>
  33783. </dd>
  33784. <dt>&lsquo;<samp>c3x2</samp>&rsquo;</dt>
  33785. <dt>&lsquo;<samp>c6x1</samp>&rsquo;</dt>
  33786. <dt>&lsquo;<samp>c1x6</samp>&rsquo;</dt>
  33787. <dd><p>Cubemap with 3x2/6x1/1x6 layout.
  33788. </p>
  33789. <p>Format specific options:
  33790. </p>
  33791. <dl compact="compact">
  33792. <dt><samp>in_pad</samp></dt>
  33793. <dt><samp>out_pad</samp></dt>
  33794. <dd><p>Set padding proportion for the input/output cubemap. Values in decimals.
  33795. </p>
  33796. <p>Example values:
  33797. </p><dl compact="compact">
  33798. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  33799. <dd><p>No padding.
  33800. </p></dd>
  33801. <dt>&lsquo;<samp>0.01</samp>&rsquo;</dt>
  33802. <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)
  33803. </p></dd>
  33804. </dl>
  33805. <p>Default value is <b>&lsquo;<samp>0</samp>&rsquo;</b>.
  33806. Maximum value is <b>&lsquo;<samp>0.1</samp>&rsquo;</b>.
  33807. </p>
  33808. </dd>
  33809. <dt><samp>fin_pad</samp></dt>
  33810. <dt><samp>fout_pad</samp></dt>
  33811. <dd><p>Set fixed padding for the input/output cubemap. Values in pixels.
  33812. </p>
  33813. <p>Default value is <b>&lsquo;<samp>0</samp>&rsquo;</b>. If greater than zero it overrides other padding options.
  33814. </p>
  33815. </dd>
  33816. <dt><samp>in_forder</samp></dt>
  33817. <dt><samp>out_forder</samp></dt>
  33818. <dd><p>Set order of faces for the input/output cubemap. Choose one direction for each position.
  33819. </p>
  33820. <p>Designation of directions:
  33821. </p><dl compact="compact">
  33822. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  33823. <dd><p>right
  33824. </p></dd>
  33825. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  33826. <dd><p>left
  33827. </p></dd>
  33828. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  33829. <dd><p>up
  33830. </p></dd>
  33831. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  33832. <dd><p>down
  33833. </p></dd>
  33834. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  33835. <dd><p>forward
  33836. </p></dd>
  33837. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  33838. <dd><p>back
  33839. </p></dd>
  33840. </dl>
  33841. <p>Default value is <b>&lsquo;<samp>rludfb</samp>&rsquo;</b>.
  33842. </p>
  33843. </dd>
  33844. <dt><samp>in_frot</samp></dt>
  33845. <dt><samp>out_frot</samp></dt>
  33846. <dd><p>Set rotation of faces for the input/output cubemap. Choose one angle for each position.
  33847. </p>
  33848. <p>Designation of angles:
  33849. </p><dl compact="compact">
  33850. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  33851. <dd><p>0 degrees clockwise
  33852. </p></dd>
  33853. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  33854. <dd><p>90 degrees clockwise
  33855. </p></dd>
  33856. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  33857. <dd><p>180 degrees clockwise
  33858. </p></dd>
  33859. <dt>&lsquo;<samp>3</samp>&rsquo;</dt>
  33860. <dd><p>270 degrees clockwise
  33861. </p></dd>
  33862. </dl>
  33863. <p>Default value is <b>&lsquo;<samp>000000</samp>&rsquo;</b>.
  33864. </p></dd>
  33865. </dl>
  33866. </dd>
  33867. <dt>&lsquo;<samp>eac</samp>&rsquo;</dt>
  33868. <dd><p>Equi-Angular Cubemap.
  33869. </p>
  33870. </dd>
  33871. <dt>&lsquo;<samp>flat</samp>&rsquo;</dt>
  33872. <dt>&lsquo;<samp>gnomonic</samp>&rsquo;</dt>
  33873. <dt>&lsquo;<samp>rectilinear</samp>&rsquo;</dt>
  33874. <dd><p>Regular video.
  33875. </p>
  33876. <p>Format specific options:
  33877. </p><dl compact="compact">
  33878. <dt><samp>h_fov</samp></dt>
  33879. <dt><samp>v_fov</samp></dt>
  33880. <dt><samp>d_fov</samp></dt>
  33881. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  33882. </p>
  33883. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33884. </p>
  33885. </dd>
  33886. <dt><samp>ih_fov</samp></dt>
  33887. <dt><samp>iv_fov</samp></dt>
  33888. <dt><samp>id_fov</samp></dt>
  33889. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  33890. </p>
  33891. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33892. </p></dd>
  33893. </dl>
  33894. </dd>
  33895. <dt>&lsquo;<samp>dfisheye</samp>&rsquo;</dt>
  33896. <dd><p>Dual fisheye.
  33897. </p>
  33898. <p>Format specific options:
  33899. </p><dl compact="compact">
  33900. <dt><samp>h_fov</samp></dt>
  33901. <dt><samp>v_fov</samp></dt>
  33902. <dt><samp>d_fov</samp></dt>
  33903. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  33904. </p>
  33905. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33906. </p>
  33907. </dd>
  33908. <dt><samp>ih_fov</samp></dt>
  33909. <dt><samp>iv_fov</samp></dt>
  33910. <dt><samp>id_fov</samp></dt>
  33911. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  33912. </p>
  33913. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33914. </p></dd>
  33915. </dl>
  33916. </dd>
  33917. <dt>&lsquo;<samp>barrel</samp>&rsquo;</dt>
  33918. <dt>&lsquo;<samp>fb</samp>&rsquo;</dt>
  33919. <dt>&lsquo;<samp>barrelsplit</samp>&rsquo;</dt>
  33920. <dd><p>Facebook&rsquo;s 360 formats.
  33921. </p>
  33922. </dd>
  33923. <dt>&lsquo;<samp>sg</samp>&rsquo;</dt>
  33924. <dd><p>Stereographic format.
  33925. </p>
  33926. <p>Format specific options:
  33927. </p><dl compact="compact">
  33928. <dt><samp>h_fov</samp></dt>
  33929. <dt><samp>v_fov</samp></dt>
  33930. <dt><samp>d_fov</samp></dt>
  33931. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  33932. </p>
  33933. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33934. </p>
  33935. </dd>
  33936. <dt><samp>ih_fov</samp></dt>
  33937. <dt><samp>iv_fov</samp></dt>
  33938. <dt><samp>id_fov</samp></dt>
  33939. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  33940. </p>
  33941. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33942. </p></dd>
  33943. </dl>
  33944. </dd>
  33945. <dt>&lsquo;<samp>mercator</samp>&rsquo;</dt>
  33946. <dd><p>Mercator format.
  33947. </p>
  33948. </dd>
  33949. <dt>&lsquo;<samp>ball</samp>&rsquo;</dt>
  33950. <dd><p>Ball format, gives significant distortion toward the back.
  33951. </p>
  33952. </dd>
  33953. <dt>&lsquo;<samp>hammer</samp>&rsquo;</dt>
  33954. <dd><p>Hammer-Aitoff map projection format.
  33955. </p>
  33956. </dd>
  33957. <dt>&lsquo;<samp>sinusoidal</samp>&rsquo;</dt>
  33958. <dd><p>Sinusoidal map projection format.
  33959. </p>
  33960. </dd>
  33961. <dt>&lsquo;<samp>fisheye</samp>&rsquo;</dt>
  33962. <dd><p>Fisheye projection.
  33963. </p>
  33964. <p>Format specific options:
  33965. </p><dl compact="compact">
  33966. <dt><samp>h_fov</samp></dt>
  33967. <dt><samp>v_fov</samp></dt>
  33968. <dt><samp>d_fov</samp></dt>
  33969. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  33970. </p>
  33971. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33972. </p>
  33973. </dd>
  33974. <dt><samp>ih_fov</samp></dt>
  33975. <dt><samp>iv_fov</samp></dt>
  33976. <dt><samp>id_fov</samp></dt>
  33977. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  33978. </p>
  33979. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  33980. </p></dd>
  33981. </dl>
  33982. </dd>
  33983. <dt>&lsquo;<samp>pannini</samp>&rsquo;</dt>
  33984. <dd><p>Pannini projection.
  33985. </p>
  33986. <p>Format specific options:
  33987. </p><dl compact="compact">
  33988. <dt><samp>h_fov</samp></dt>
  33989. <dd><p>Set output pannini parameter.
  33990. </p>
  33991. </dd>
  33992. <dt><samp>ih_fov</samp></dt>
  33993. <dd><p>Set input pannini parameter.
  33994. </p></dd>
  33995. </dl>
  33996. </dd>
  33997. <dt>&lsquo;<samp>cylindrical</samp>&rsquo;</dt>
  33998. <dd><p>Cylindrical projection.
  33999. </p>
  34000. <p>Format specific options:
  34001. </p><dl compact="compact">
  34002. <dt><samp>h_fov</samp></dt>
  34003. <dt><samp>v_fov</samp></dt>
  34004. <dt><samp>d_fov</samp></dt>
  34005. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  34006. </p>
  34007. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  34008. </p>
  34009. </dd>
  34010. <dt><samp>ih_fov</samp></dt>
  34011. <dt><samp>iv_fov</samp></dt>
  34012. <dt><samp>id_fov</samp></dt>
  34013. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  34014. </p>
  34015. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  34016. </p></dd>
  34017. </dl>
  34018. </dd>
  34019. <dt>&lsquo;<samp>perspective</samp>&rsquo;</dt>
  34020. <dd><p>Perspective projection. <i>(output only)</i>
  34021. </p>
  34022. <p>Format specific options:
  34023. </p><dl compact="compact">
  34024. <dt><samp>v_fov</samp></dt>
  34025. <dd><p>Set perspective parameter.
  34026. </p></dd>
  34027. </dl>
  34028. </dd>
  34029. <dt>&lsquo;<samp>tetrahedron</samp>&rsquo;</dt>
  34030. <dd><p>Tetrahedron projection.
  34031. </p>
  34032. </dd>
  34033. <dt>&lsquo;<samp>tsp</samp>&rsquo;</dt>
  34034. <dd><p>Truncated square pyramid projection.
  34035. </p>
  34036. </dd>
  34037. <dt>&lsquo;<samp>he</samp>&rsquo;</dt>
  34038. <dt>&lsquo;<samp>hequirect</samp>&rsquo;</dt>
  34039. <dd><p>Half equirectangular projection.
  34040. </p>
  34041. </dd>
  34042. <dt>&lsquo;<samp>equisolid</samp>&rsquo;</dt>
  34043. <dd><p>Equisolid format.
  34044. </p>
  34045. <p>Format specific options:
  34046. </p><dl compact="compact">
  34047. <dt><samp>h_fov</samp></dt>
  34048. <dt><samp>v_fov</samp></dt>
  34049. <dt><samp>d_fov</samp></dt>
  34050. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  34051. </p>
  34052. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  34053. </p>
  34054. </dd>
  34055. <dt><samp>ih_fov</samp></dt>
  34056. <dt><samp>iv_fov</samp></dt>
  34057. <dt><samp>id_fov</samp></dt>
  34058. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  34059. </p>
  34060. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  34061. </p></dd>
  34062. </dl>
  34063. </dd>
  34064. <dt>&lsquo;<samp>og</samp>&rsquo;</dt>
  34065. <dd><p>Orthographic format.
  34066. </p>
  34067. <p>Format specific options:
  34068. </p><dl compact="compact">
  34069. <dt><samp>h_fov</samp></dt>
  34070. <dt><samp>v_fov</samp></dt>
  34071. <dt><samp>d_fov</samp></dt>
  34072. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  34073. </p>
  34074. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  34075. </p>
  34076. </dd>
  34077. <dt><samp>ih_fov</samp></dt>
  34078. <dt><samp>iv_fov</samp></dt>
  34079. <dt><samp>id_fov</samp></dt>
  34080. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  34081. </p>
  34082. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  34083. </p></dd>
  34084. </dl>
  34085. </dd>
  34086. <dt>&lsquo;<samp>octahedron</samp>&rsquo;</dt>
  34087. <dd><p>Octahedron projection.
  34088. </p></dd>
  34089. </dl>
  34090. </dd>
  34091. <dt><samp>interp</samp></dt>
  34092. <dd><p>Set interpolation method.<br>
  34093. <i>Note: more complex interpolation methods require much more memory to run.</i>
  34094. </p>
  34095. <p>Available methods:
  34096. </p>
  34097. <dl compact="compact">
  34098. <dt>&lsquo;<samp>near</samp>&rsquo;</dt>
  34099. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  34100. <dd><p>Nearest neighbour.
  34101. </p></dd>
  34102. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  34103. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  34104. <dd><p>Bilinear interpolation.
  34105. </p></dd>
  34106. <dt>&lsquo;<samp>lagrange9</samp>&rsquo;</dt>
  34107. <dd><p>Lagrange9 interpolation.
  34108. </p></dd>
  34109. <dt>&lsquo;<samp>cube</samp>&rsquo;</dt>
  34110. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  34111. <dd><p>Bicubic interpolation.
  34112. </p></dd>
  34113. <dt>&lsquo;<samp>lanc</samp>&rsquo;</dt>
  34114. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  34115. <dd><p>Lanczos interpolation.
  34116. </p></dd>
  34117. <dt>&lsquo;<samp>sp16</samp>&rsquo;</dt>
  34118. <dt>&lsquo;<samp>spline16</samp>&rsquo;</dt>
  34119. <dd><p>Spline16 interpolation.
  34120. </p></dd>
  34121. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  34122. <dt>&lsquo;<samp>gaussian</samp>&rsquo;</dt>
  34123. <dd><p>Gaussian interpolation.
  34124. </p></dd>
  34125. <dt>&lsquo;<samp>mitchell</samp>&rsquo;</dt>
  34126. <dd><p>Mitchell interpolation.
  34127. </p></dd>
  34128. </dl>
  34129. <p>Default value is <b>&lsquo;<samp>line</samp>&rsquo;</b>.
  34130. </p>
  34131. </dd>
  34132. <dt><samp>w</samp></dt>
  34133. <dt><samp>h</samp></dt>
  34134. <dd><p>Set the output video resolution.
  34135. </p>
  34136. <p>Default resolution depends on formats.
  34137. </p>
  34138. </dd>
  34139. <dt><samp>in_stereo</samp></dt>
  34140. <dt><samp>out_stereo</samp></dt>
  34141. <dd><p>Set the input/output stereo format.
  34142. </p>
  34143. <dl compact="compact">
  34144. <dt>&lsquo;<samp>2d</samp>&rsquo;</dt>
  34145. <dd><p>2D mono
  34146. </p></dd>
  34147. <dt>&lsquo;<samp>sbs</samp>&rsquo;</dt>
  34148. <dd><p>Side by side
  34149. </p></dd>
  34150. <dt>&lsquo;<samp>tb</samp>&rsquo;</dt>
  34151. <dd><p>Top bottom
  34152. </p></dd>
  34153. </dl>
  34154. <p>Default value is <b>&lsquo;<samp>2d</samp>&rsquo;</b> for input and output format.
  34155. </p>
  34156. </dd>
  34157. <dt><samp>yaw</samp></dt>
  34158. <dt><samp>pitch</samp></dt>
  34159. <dt><samp>roll</samp></dt>
  34160. <dd><p>Set rotation for the output video. Values in degrees.
  34161. </p>
  34162. </dd>
  34163. <dt><samp>rorder</samp></dt>
  34164. <dd><p>Set rotation order for the output video. Choose one item for each position.
  34165. </p>
  34166. <dl compact="compact">
  34167. <dt>&lsquo;<samp>y, Y</samp>&rsquo;</dt>
  34168. <dd><p>yaw
  34169. </p></dd>
  34170. <dt>&lsquo;<samp>p, P</samp>&rsquo;</dt>
  34171. <dd><p>pitch
  34172. </p></dd>
  34173. <dt>&lsquo;<samp>r, R</samp>&rsquo;</dt>
  34174. <dd><p>roll
  34175. </p></dd>
  34176. </dl>
  34177. <p>Default value is <b>&lsquo;<samp>ypr</samp>&rsquo;</b>.
  34178. </p>
  34179. </dd>
  34180. <dt><samp>h_flip</samp></dt>
  34181. <dt><samp>v_flip</samp></dt>
  34182. <dt><samp>d_flip</samp></dt>
  34183. <dd><p>Flip the output video horizontally(swaps left-right)/vertically(swaps up-down)/in-depth(swaps back-forward). Boolean values.
  34184. </p>
  34185. </dd>
  34186. <dt><samp>ih_flip</samp></dt>
  34187. <dt><samp>iv_flip</samp></dt>
  34188. <dd><p>Set if input video is flipped horizontally/vertically. Boolean values.
  34189. </p>
  34190. </dd>
  34191. <dt><samp>in_trans</samp></dt>
  34192. <dd><p>Set if input video is transposed. Boolean value, by default disabled.
  34193. </p>
  34194. </dd>
  34195. <dt><samp>out_trans</samp></dt>
  34196. <dd><p>Set if output video needs to be transposed. Boolean value, by default disabled.
  34197. </p>
  34198. </dd>
  34199. <dt><samp>alpha_mask</samp></dt>
  34200. <dd><p>Build mask in alpha plane for all unmapped pixels by marking them fully transparent. Boolean value, by default disabled.
  34201. </p></dd>
  34202. </dl>
  34203. <a name="Examples-131"></a>
  34204. <h4 class="subsection">32.237.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-131" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-131" aria-hidden="true">TOC</a></span></h4>
  34205. <ul>
  34206. <li> Convert equirectangular video to cubemap with 3x2 layout and 1% padding using bicubic interpolation:
  34207. <div class="example">
  34208. <pre class="example">ffmpeg -i input.mkv -vf v360=e:c3x2:cubic:out_pad=0.01 output.mkv
  34209. </pre></div>
  34210. </li><li> Extract back view of Equi-Angular Cubemap:
  34211. <div class="example">
  34212. <pre class="example">ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
  34213. </pre></div>
  34214. </li><li> Convert transposed and horizontally flipped Equi-Angular Cubemap in side-by-side stereo format to equirectangular top-bottom stereo format:
  34215. <div class="example">
  34216. <pre class="example">v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
  34217. </pre></div>
  34218. </li></ul>
  34219. <a name="Commands-129"></a>
  34220. <h4 class="subsection">32.237.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-129" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-129" aria-hidden="true">TOC</a></span></h4>
  34221. <p>This filter supports subset of above options as <a href="#commands">commands</a>.
  34222. </p>
  34223. <a name="vaguedenoiser"></a>
  34224. <h3 class="section">32.238 vaguedenoiser<span class="pull-right"><a class="anchor hidden-xs" href="#vaguedenoiser" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vaguedenoiser" aria-hidden="true">TOC</a></span></h3>
  34225. <p>Apply a wavelet based denoiser.
  34226. </p>
  34227. <p>It transforms each frame from the video input into the wavelet domain,
  34228. using Cohen-Daubechies-Feauveau 9/7. Then it applies some filtering to
  34229. the obtained coefficients. It does an inverse wavelet transform after.
  34230. Due to wavelet properties, it should give a nice smoothed result, and
  34231. reduced noise, without blurring picture features.
  34232. </p>
  34233. <p>This filter accepts the following options:
  34234. </p>
  34235. <dl compact="compact">
  34236. <dt><samp>threshold</samp></dt>
  34237. <dd><p>The filtering strength. The higher, the more filtered the video will be.
  34238. Hard thresholding can use a higher threshold than soft thresholding
  34239. before the video looks overfiltered. Default value is 2.
  34240. </p>
  34241. </dd>
  34242. <dt><samp>method</samp></dt>
  34243. <dd><p>The filtering method the filter will use.
  34244. </p>
  34245. <p>It accepts the following values:
  34246. </p><dl compact="compact">
  34247. <dt>&lsquo;<samp>hard</samp>&rsquo;</dt>
  34248. <dd><p>All values under the threshold will be zeroed.
  34249. </p>
  34250. </dd>
  34251. <dt>&lsquo;<samp>soft</samp>&rsquo;</dt>
  34252. <dd><p>All values under the threshold will be zeroed. All values above will be
  34253. reduced by the threshold.
  34254. </p>
  34255. </dd>
  34256. <dt>&lsquo;<samp>garrote</samp>&rsquo;</dt>
  34257. <dd><p>Scales or nullifies coefficients - intermediary between (more) soft and
  34258. (less) hard thresholding.
  34259. </p></dd>
  34260. </dl>
  34261. <p>Default is garrote.
  34262. </p>
  34263. </dd>
  34264. <dt><samp>nsteps</samp></dt>
  34265. <dd><p>Number of times, the wavelet will decompose the picture. Picture can&rsquo;t
  34266. be decomposed beyond a particular point (typically, 8 for a 640x480
  34267. frame - as 2^9 = 512 &gt; 480). Valid values are integers between 1 and 32. Default value is 6.
  34268. </p>
  34269. </dd>
  34270. <dt><samp>percent</samp></dt>
  34271. <dd><p>Partial of full denoising (limited coefficients shrinking), from 0 to 100. Default value is 85.
  34272. </p>
  34273. </dd>
  34274. <dt><samp>planes</samp></dt>
  34275. <dd><p>A list of the planes to process. By default all planes are processed.
  34276. </p>
  34277. </dd>
  34278. <dt><samp>type</samp></dt>
  34279. <dd><p>The threshold type the filter will use.
  34280. </p>
  34281. <p>It accepts the following values:
  34282. </p><dl compact="compact">
  34283. <dt>&lsquo;<samp>universal</samp>&rsquo;</dt>
  34284. <dd><p>Threshold used is same for all decompositions.
  34285. </p>
  34286. </dd>
  34287. <dt>&lsquo;<samp>bayes</samp>&rsquo;</dt>
  34288. <dd><p>Threshold used depends also on each decomposition coefficients.
  34289. </p></dd>
  34290. </dl>
  34291. <p>Default is universal.
  34292. </p></dd>
  34293. </dl>
  34294. <a name="vectorscope"></a>
  34295. <h3 class="section">32.239 vectorscope<span class="pull-right"><a class="anchor hidden-xs" href="#vectorscope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vectorscope" aria-hidden="true">TOC</a></span></h3>
  34296. <p>Display 2 color component values in the two dimensional graph (which is called
  34297. a vectorscope).
  34298. </p>
  34299. <p>This filter accepts the following options:
  34300. </p>
  34301. <dl compact="compact">
  34302. <dt><samp>mode, m</samp></dt>
  34303. <dd><p>Set vectorscope mode.
  34304. </p>
  34305. <p>It accepts the following values:
  34306. </p><dl compact="compact">
  34307. <dt>&lsquo;<samp>gray</samp>&rsquo;</dt>
  34308. <dt>&lsquo;<samp>tint</samp>&rsquo;</dt>
  34309. <dd><p>Gray values are displayed on graph, higher brightness means more pixels have
  34310. same component color value on location in graph. This is the default mode.
  34311. </p>
  34312. </dd>
  34313. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  34314. <dd><p>Gray values are displayed on graph. Surrounding pixels values which are not
  34315. present in video frame are drawn in gradient of 2 color components which are
  34316. set by option <code>x</code> and <code>y</code>. The 3rd color component is static.
  34317. </p>
  34318. </dd>
  34319. <dt>&lsquo;<samp>color2</samp>&rsquo;</dt>
  34320. <dd><p>Actual color components values present in video frame are displayed on graph.
  34321. </p>
  34322. </dd>
  34323. <dt>&lsquo;<samp>color3</samp>&rsquo;</dt>
  34324. <dd><p>Similar as color2 but higher frequency of same values <code>x</code> and <code>y</code>
  34325. on graph increases value of another color component, which is luminance by
  34326. default values of <code>x</code> and <code>y</code>.
  34327. </p>
  34328. </dd>
  34329. <dt>&lsquo;<samp>color4</samp>&rsquo;</dt>
  34330. <dd><p>Actual colors present in video frame are displayed on graph. If two different
  34331. colors map to same position on graph then color with higher value of component
  34332. not present in graph is picked.
  34333. </p>
  34334. </dd>
  34335. <dt>&lsquo;<samp>color5</samp>&rsquo;</dt>
  34336. <dd><p>Gray values are displayed on graph. Similar to <code>color</code> but with 3rd color
  34337. component picked from radial gradient.
  34338. </p></dd>
  34339. </dl>
  34340. </dd>
  34341. <dt><samp>x</samp></dt>
  34342. <dd><p>Set which color component will be represented on X-axis. Default is <code>1</code>.
  34343. </p>
  34344. </dd>
  34345. <dt><samp>y</samp></dt>
  34346. <dd><p>Set which color component will be represented on Y-axis. Default is <code>2</code>.
  34347. </p>
  34348. </dd>
  34349. <dt><samp>intensity, i</samp></dt>
  34350. <dd><p>Set intensity, used by modes: gray, color, color3 and color5 for increasing brightness
  34351. of color component which represents frequency of (X, Y) location in graph.
  34352. </p>
  34353. </dd>
  34354. <dt><samp>envelope, e</samp></dt>
  34355. <dd><dl compact="compact">
  34356. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  34357. <dd><p>No envelope, this is default.
  34358. </p>
  34359. </dd>
  34360. <dt>&lsquo;<samp>instant</samp>&rsquo;</dt>
  34361. <dd><p>Instant envelope, even darkest single pixel will be clearly highlighted.
  34362. </p>
  34363. </dd>
  34364. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  34365. <dd><p>Hold maximum and minimum values presented in graph over time. This way you
  34366. can still spot out of range values without constantly looking at vectorscope.
  34367. </p>
  34368. </dd>
  34369. <dt>&lsquo;<samp>peak+instant</samp>&rsquo;</dt>
  34370. <dd><p>Peak and instant envelope combined together.
  34371. </p></dd>
  34372. </dl>
  34373. </dd>
  34374. <dt><samp>graticule, g</samp></dt>
  34375. <dd><p>Set what kind of graticule to draw.
  34376. </p><dl compact="compact">
  34377. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  34378. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  34379. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  34380. <dt>&lsquo;<samp>invert</samp>&rsquo;</dt>
  34381. </dl>
  34382. </dd>
  34383. <dt><samp>opacity, o</samp></dt>
  34384. <dd><p>Set graticule opacity.
  34385. </p>
  34386. </dd>
  34387. <dt><samp>flags, f</samp></dt>
  34388. <dd><p>Set graticule flags.
  34389. </p>
  34390. <dl compact="compact">
  34391. <dt>&lsquo;<samp>white</samp>&rsquo;</dt>
  34392. <dd><p>Draw graticule for white point.
  34393. </p>
  34394. </dd>
  34395. <dt>&lsquo;<samp>black</samp>&rsquo;</dt>
  34396. <dd><p>Draw graticule for black point.
  34397. </p>
  34398. </dd>
  34399. <dt>&lsquo;<samp>name</samp>&rsquo;</dt>
  34400. <dd><p>Draw color points short names.
  34401. </p></dd>
  34402. </dl>
  34403. </dd>
  34404. <dt><samp>bgopacity, b</samp></dt>
  34405. <dd><p>Set background opacity.
  34406. </p>
  34407. </dd>
  34408. <dt><samp>lthreshold, l</samp></dt>
  34409. <dd><p>Set low threshold for color component not represented on X or Y axis.
  34410. Values lower than this value will be ignored. Default is 0.
  34411. Note this value is multiplied with actual max possible value one pixel component
  34412. can have. So for 8-bit input and low threshold value of 0.1 actual threshold
  34413. is 0.1 * 255 = 25.
  34414. </p>
  34415. </dd>
  34416. <dt><samp>hthreshold, h</samp></dt>
  34417. <dd><p>Set high threshold for color component not represented on X or Y axis.
  34418. Values higher than this value will be ignored. Default is 1.
  34419. Note this value is multiplied with actual max possible value one pixel component
  34420. can have. So for 8-bit input and high threshold value of 0.9 actual threshold
  34421. is 0.9 * 255 = 230.
  34422. </p>
  34423. </dd>
  34424. <dt><samp>colorspace, c</samp></dt>
  34425. <dd><p>Set what kind of colorspace to use when drawing graticule.
  34426. </p><dl compact="compact">
  34427. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  34428. <dt>&lsquo;<samp>601</samp>&rsquo;</dt>
  34429. <dt>&lsquo;<samp>709</samp>&rsquo;</dt>
  34430. </dl>
  34431. <p>Default is auto.
  34432. </p>
  34433. </dd>
  34434. <dt><samp>tint0, t0</samp></dt>
  34435. <dt><samp>tint1, t1</samp></dt>
  34436. <dd><p>Set color tint for gray/tint vectorscope mode. By default both options are zero.
  34437. This means no tint, and output will remain gray.
  34438. </p></dd>
  34439. </dl>
  34440. <span id="vidstabdetect"></span><a name="vidstabdetect-1"></a>
  34441. <h3 class="section">32.240 vidstabdetect<span class="pull-right"><a class="anchor hidden-xs" href="#vidstabdetect-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vidstabdetect-1" aria-hidden="true">TOC</a></span></h3>
  34442. <p>Analyze video stabilization/deshaking. Perform pass 1 of 2, see
  34443. <a href="#vidstabtransform">vidstabtransform</a> for pass 2.
  34444. </p>
  34445. <p>This filter generates a file with relative translation and rotation
  34446. transform information about subsequent frames, which is then used by
  34447. the <a href="#vidstabtransform">vidstabtransform</a> filter.
  34448. </p>
  34449. <p>To enable compilation of this filter you need to configure FFmpeg with
  34450. <code>--enable-libvidstab</code>.
  34451. </p>
  34452. <p>This filter accepts the following options:
  34453. </p>
  34454. <dl compact="compact">
  34455. <dt><samp>result</samp></dt>
  34456. <dd><p>Set the path to the file used to write the transforms information.
  34457. Default value is <samp>transforms.trf</samp>.
  34458. </p>
  34459. </dd>
  34460. <dt><samp>shakiness</samp></dt>
  34461. <dd><p>Set how shaky the video is and how quick the camera is. It accepts an
  34462. integer in the range 1-10, a value of 1 means little shakiness, a
  34463. value of 10 means strong shakiness. Default value is 5.
  34464. </p>
  34465. </dd>
  34466. <dt><samp>accuracy</samp></dt>
  34467. <dd><p>Set the accuracy of the detection process. It must be a value in the
  34468. range 1-15. A value of 1 means low accuracy, a value of 15 means high
  34469. accuracy. Default value is 15.
  34470. </p>
  34471. </dd>
  34472. <dt><samp>stepsize</samp></dt>
  34473. <dd><p>Set stepsize of the search process. The region around minimum is
  34474. scanned with 1 pixel resolution. Default value is 6.
  34475. </p>
  34476. </dd>
  34477. <dt><samp>mincontrast</samp></dt>
  34478. <dd><p>Set minimum contrast. Below this value a local measurement field is
  34479. discarded. Must be a floating point value in the range 0-1. Default
  34480. value is 0.3.
  34481. </p>
  34482. </dd>
  34483. <dt><samp>tripod</samp></dt>
  34484. <dd><p>Set reference frame number for tripod mode.
  34485. </p>
  34486. <p>If enabled, the motion of the frames is compared to a reference frame
  34487. in the filtered stream, identified by the specified number. The idea
  34488. is to compensate all movements in a more-or-less static scene and keep
  34489. the camera view absolutely still.
  34490. </p>
  34491. <p>If set to 0, it is disabled. The frames are counted starting from 1.
  34492. </p>
  34493. </dd>
  34494. <dt><samp>show</samp></dt>
  34495. <dd><p>Show fields and transforms in the resulting frames. It accepts an
  34496. integer in the range 0-2. Default value is 0, which disables any
  34497. visualization.
  34498. </p></dd>
  34499. </dl>
  34500. <a name="Examples-132"></a>
  34501. <h4 class="subsection">32.240.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-132" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-132" aria-hidden="true">TOC</a></span></h4>
  34502. <ul>
  34503. <li> Use default values:
  34504. <div class="example">
  34505. <pre class="example">vidstabdetect
  34506. </pre></div>
  34507. </li><li> Analyze strongly shaky movie and put the results in file
  34508. <samp>mytransforms.trf</samp>:
  34509. <div class="example">
  34510. <pre class="example">vidstabdetect=shakiness=10:accuracy=15:result=&quot;mytransforms.trf&quot;
  34511. </pre></div>
  34512. </li><li> Visualize the result of internal transformations in the resulting
  34513. video:
  34514. <div class="example">
  34515. <pre class="example">vidstabdetect=show=1
  34516. </pre></div>
  34517. </li><li> Analyze a video with medium shakiness using <code>ffmpeg</code>:
  34518. <div class="example">
  34519. <pre class="example">ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
  34520. </pre></div>
  34521. </li></ul>
  34522. <span id="vidstabtransform"></span><a name="vidstabtransform-1"></a>
  34523. <h3 class="section">32.241 vidstabtransform<span class="pull-right"><a class="anchor hidden-xs" href="#vidstabtransform-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vidstabtransform-1" aria-hidden="true">TOC</a></span></h3>
  34524. <p>Video stabilization/deshaking: pass 2 of 2,
  34525. see <a href="#vidstabdetect">vidstabdetect</a> for pass 1.
  34526. </p>
  34527. <p>Read a file with transform information for each frame and
  34528. apply/compensate them. Together with the <a href="#vidstabdetect">vidstabdetect</a>
  34529. filter this can be used to deshake videos. See also
  34530. <a href="http://public.hronopik.de/vid.stab">http://public.hronopik.de/vid.stab</a>. It is important to also use
  34531. the <a href="#unsharp">unsharp</a> filter, see below.
  34532. </p>
  34533. <p>To enable compilation of this filter you need to configure FFmpeg with
  34534. <code>--enable-libvidstab</code>.
  34535. </p>
  34536. <a name="Options-35"></a>
  34537. <h4 class="subsection">32.241.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-35" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-35" aria-hidden="true">TOC</a></span></h4>
  34538. <dl compact="compact">
  34539. <dt><samp>input</samp></dt>
  34540. <dd><p>Set path to the file used to read the transforms. Default value is
  34541. <samp>transforms.trf</samp>.
  34542. </p>
  34543. </dd>
  34544. <dt><samp>smoothing</samp></dt>
  34545. <dd><p>Set the number of frames (value*2 + 1) used for lowpass filtering the
  34546. camera movements. Default value is 10.
  34547. </p>
  34548. <p>For example a number of 10 means that 21 frames are used (10 in the
  34549. past and 10 in the future) to smoothen the motion in the video. A
  34550. larger value leads to a smoother video, but limits the acceleration of
  34551. the camera (pan/tilt movements). 0 is a special case where a static
  34552. camera is simulated.
  34553. </p>
  34554. </dd>
  34555. <dt><samp>optalgo</samp></dt>
  34556. <dd><p>Set the camera path optimization algorithm.
  34557. </p>
  34558. <p>Accepted values are:
  34559. </p><dl compact="compact">
  34560. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  34561. <dd><p>gaussian kernel low-pass filter on camera motion (default)
  34562. </p></dd>
  34563. <dt>&lsquo;<samp>avg</samp>&rsquo;</dt>
  34564. <dd><p>averaging on transformations
  34565. </p></dd>
  34566. </dl>
  34567. </dd>
  34568. <dt><samp>maxshift</samp></dt>
  34569. <dd><p>Set maximal number of pixels to translate frames. Default value is -1,
  34570. meaning no limit.
  34571. </p>
  34572. </dd>
  34573. <dt><samp>maxangle</samp></dt>
  34574. <dd><p>Set maximal angle in radians (degree*PI/180) to rotate frames. Default
  34575. value is -1, meaning no limit.
  34576. </p>
  34577. </dd>
  34578. <dt><samp>crop</samp></dt>
  34579. <dd><p>Specify how to deal with borders that may be visible due to movement
  34580. compensation.
  34581. </p>
  34582. <p>Available values are:
  34583. </p><dl compact="compact">
  34584. <dt>&lsquo;<samp>keep</samp>&rsquo;</dt>
  34585. <dd><p>keep image information from previous frame (default)
  34586. </p></dd>
  34587. <dt>&lsquo;<samp>black</samp>&rsquo;</dt>
  34588. <dd><p>fill the border black
  34589. </p></dd>
  34590. </dl>
  34591. </dd>
  34592. <dt><samp>invert</samp></dt>
  34593. <dd><p>Invert transforms if set to 1. Default value is 0.
  34594. </p>
  34595. </dd>
  34596. <dt><samp>relative</samp></dt>
  34597. <dd><p>Consider transforms as relative to previous frame if set to 1,
  34598. absolute if set to 0. Default value is 0.
  34599. </p>
  34600. </dd>
  34601. <dt><samp>zoom</samp></dt>
  34602. <dd><p>Set percentage to zoom. A positive value will result in a zoom-in
  34603. effect, a negative value in a zoom-out effect. Default value is 0 (no
  34604. zoom).
  34605. </p>
  34606. </dd>
  34607. <dt><samp>optzoom</samp></dt>
  34608. <dd><p>Set optimal zooming to avoid borders.
  34609. </p>
  34610. <p>Accepted values are:
  34611. </p><dl compact="compact">
  34612. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  34613. <dd><p>disabled
  34614. </p></dd>
  34615. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  34616. <dd><p>optimal static zoom value is determined (only very strong movements
  34617. will lead to visible borders) (default)
  34618. </p></dd>
  34619. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  34620. <dd><p>optimal adaptive zoom value is determined (no borders will be
  34621. visible), see <samp>zoomspeed</samp>
  34622. </p></dd>
  34623. </dl>
  34624. <p>Note that the value given at zoom is added to the one calculated here.
  34625. </p>
  34626. </dd>
  34627. <dt><samp>zoomspeed</samp></dt>
  34628. <dd><p>Set percent to zoom maximally each frame (enabled when
  34629. <samp>optzoom</samp> is set to 2). Range is from 0 to 5, default value is
  34630. 0.25.
  34631. </p>
  34632. </dd>
  34633. <dt><samp>interpol</samp></dt>
  34634. <dd><p>Specify type of interpolation.
  34635. </p>
  34636. <p>Available values are:
  34637. </p><dl compact="compact">
  34638. <dt>&lsquo;<samp>no</samp>&rsquo;</dt>
  34639. <dd><p>no interpolation
  34640. </p></dd>
  34641. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  34642. <dd><p>linear only horizontal
  34643. </p></dd>
  34644. <dt>&lsquo;<samp>bilinear</samp>&rsquo;</dt>
  34645. <dd><p>linear in both directions (default)
  34646. </p></dd>
  34647. <dt>&lsquo;<samp>bicubic</samp>&rsquo;</dt>
  34648. <dd><p>cubic in both directions (slow)
  34649. </p></dd>
  34650. </dl>
  34651. </dd>
  34652. <dt><samp>tripod</samp></dt>
  34653. <dd><p>Enable virtual tripod mode if set to 1, which is equivalent to
  34654. <code>relative=0:smoothing=0</code>. Default value is 0.
  34655. </p>
  34656. <p>Use also <code>tripod</code> option of <a href="#vidstabdetect">vidstabdetect</a>.
  34657. </p>
  34658. </dd>
  34659. <dt><samp>debug</samp></dt>
  34660. <dd><p>Increase log verbosity if set to 1. Also the detected global motions
  34661. are written to the temporary file <samp>global_motions.trf</samp>. Default
  34662. value is 0.
  34663. </p></dd>
  34664. </dl>
  34665. <a name="Examples-133"></a>
  34666. <h4 class="subsection">32.241.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-133" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-133" aria-hidden="true">TOC</a></span></h4>
  34667. <ul>
  34668. <li> Use <code>ffmpeg</code> for a typical stabilization with default values:
  34669. <div class="example">
  34670. <pre class="example">ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg
  34671. </pre></div>
  34672. <p>Note the use of the <a href="#unsharp">unsharp</a> filter which is always recommended.
  34673. </p>
  34674. </li><li> Zoom in a bit more and load transform data from a given file:
  34675. <div class="example">
  34676. <pre class="example">vidstabtransform=zoom=5:input=&quot;mytransforms.trf&quot;
  34677. </pre></div>
  34678. </li><li> Smoothen the video even more:
  34679. <div class="example">
  34680. <pre class="example">vidstabtransform=smoothing=30
  34681. </pre></div>
  34682. </li></ul>
  34683. <a name="vflip"></a>
  34684. <h3 class="section">32.242 vflip<span class="pull-right"><a class="anchor hidden-xs" href="#vflip" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vflip" aria-hidden="true">TOC</a></span></h3>
  34685. <p>Flip the input video vertically.
  34686. </p>
  34687. <p>For example, to vertically flip a video with <code>ffmpeg</code>:
  34688. </p><div class="example">
  34689. <pre class="example">ffmpeg -i in.avi -vf &quot;vflip&quot; out.avi
  34690. </pre></div>
  34691. <a name="vfrdet"></a>
  34692. <h3 class="section">32.243 vfrdet<span class="pull-right"><a class="anchor hidden-xs" href="#vfrdet" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vfrdet" aria-hidden="true">TOC</a></span></h3>
  34693. <p>Detect variable frame rate video.
  34694. </p>
  34695. <p>This filter tries to detect if the input is variable or constant frame rate.
  34696. </p>
  34697. <p>At end it will output number of frames detected as having variable delta pts,
  34698. and ones with constant delta pts.
  34699. If there was frames with variable delta, than it will also show min, max and
  34700. average delta encountered.
  34701. </p>
  34702. <a name="vibrance"></a>
  34703. <h3 class="section">32.244 vibrance<span class="pull-right"><a class="anchor hidden-xs" href="#vibrance" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vibrance" aria-hidden="true">TOC</a></span></h3>
  34704. <p>Boost or alter saturation.
  34705. </p>
  34706. <p>The filter accepts the following options:
  34707. </p><dl compact="compact">
  34708. <dt><samp>intensity</samp></dt>
  34709. <dd><p>Set strength of boost if positive value or strength of alter if negative value.
  34710. Default is 0. Allowed range is from -2 to 2.
  34711. </p>
  34712. </dd>
  34713. <dt><samp>rbal</samp></dt>
  34714. <dd><p>Set the red balance. Default is 1. Allowed range is from -10 to 10.
  34715. </p>
  34716. </dd>
  34717. <dt><samp>gbal</samp></dt>
  34718. <dd><p>Set the green balance. Default is 1. Allowed range is from -10 to 10.
  34719. </p>
  34720. </dd>
  34721. <dt><samp>bbal</samp></dt>
  34722. <dd><p>Set the blue balance. Default is 1. Allowed range is from -10 to 10.
  34723. </p>
  34724. </dd>
  34725. <dt><samp>rlum</samp></dt>
  34726. <dd><p>Set the red luma coefficient.
  34727. </p>
  34728. </dd>
  34729. <dt><samp>glum</samp></dt>
  34730. <dd><p>Set the green luma coefficient.
  34731. </p>
  34732. </dd>
  34733. <dt><samp>blum</samp></dt>
  34734. <dd><p>Set the blue luma coefficient.
  34735. </p>
  34736. </dd>
  34737. <dt><samp>alternate</samp></dt>
  34738. <dd><p>If <code>intensity</code> is negative and this is set to 1, colors will change,
  34739. otherwise colors will be less saturated, more towards gray.
  34740. </p></dd>
  34741. </dl>
  34742. <a name="Commands-130"></a>
  34743. <h4 class="subsection">32.244.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-130" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-130" aria-hidden="true">TOC</a></span></h4>
  34744. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  34745. </p>
  34746. <a name="vif"></a>
  34747. <h3 class="section">32.245 vif<span class="pull-right"><a class="anchor hidden-xs" href="#vif" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vif" aria-hidden="true">TOC</a></span></h3>
  34748. <p>Obtain the average VIF (Visual Information Fidelity) between two input videos.
  34749. </p>
  34750. <p>This filter takes two input videos.
  34751. </p>
  34752. <p>Both input videos must have the same resolution and pixel format for
  34753. this filter to work correctly. Also it assumes that both inputs
  34754. have the same number of frames, which are compared one by one.
  34755. </p>
  34756. <p>The obtained average VIF score is printed through the logging system.
  34757. </p>
  34758. <p>The filter stores the calculated VIF score of each frame.
  34759. </p>
  34760. <p>In the below example the input file <samp>main.mpg</samp> being processed is compared
  34761. with the reference file <samp>ref.mpg</samp>.
  34762. </p>
  34763. <div class="example">
  34764. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi vif -f null -
  34765. </pre></div>
  34766. <span id="vignette"></span><a name="vignette-1"></a>
  34767. <h3 class="section">32.246 vignette<span class="pull-right"><a class="anchor hidden-xs" href="#vignette-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vignette-1" aria-hidden="true">TOC</a></span></h3>
  34768. <p>Make or reverse a natural vignetting effect.
  34769. </p>
  34770. <p>The filter accepts the following options:
  34771. </p>
  34772. <dl compact="compact">
  34773. <dt><samp>angle, a</samp></dt>
  34774. <dd><p>Set lens angle expression as a number of radians.
  34775. </p>
  34776. <p>The value is clipped in the <code>[0,PI/2]</code> range.
  34777. </p>
  34778. <p>Default value: <code>&quot;PI/5&quot;</code>
  34779. </p>
  34780. </dd>
  34781. <dt><samp>x0</samp></dt>
  34782. <dt><samp>y0</samp></dt>
  34783. <dd><p>Set center coordinates expressions. Respectively <code>&quot;w/2&quot;</code> and <code>&quot;h/2&quot;</code>
  34784. by default.
  34785. </p>
  34786. </dd>
  34787. <dt><samp>mode</samp></dt>
  34788. <dd><p>Set forward/backward mode.
  34789. </p>
  34790. <p>Available modes are:
  34791. </p><dl compact="compact">
  34792. <dt>&lsquo;<samp>forward</samp>&rsquo;</dt>
  34793. <dd><p>The larger the distance from the central point, the darker the image becomes.
  34794. </p>
  34795. </dd>
  34796. <dt>&lsquo;<samp>backward</samp>&rsquo;</dt>
  34797. <dd><p>The larger the distance from the central point, the brighter the image becomes.
  34798. This can be used to reverse a vignette effect, though there is no automatic
  34799. detection to extract the lens <samp>angle</samp> and other settings (yet). It can
  34800. also be used to create a burning effect.
  34801. </p></dd>
  34802. </dl>
  34803. <p>Default value is &lsquo;<samp>forward</samp>&rsquo;.
  34804. </p>
  34805. </dd>
  34806. <dt><samp>eval</samp></dt>
  34807. <dd><p>Set evaluation mode for the expressions (<samp>angle</samp>, <samp>x0</samp>, <samp>y0</samp>).
  34808. </p>
  34809. <p>It accepts the following values:
  34810. </p><dl compact="compact">
  34811. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  34812. <dd><p>Evaluate expressions only once during the filter initialization.
  34813. </p>
  34814. </dd>
  34815. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  34816. <dd><p>Evaluate expressions for each incoming frame. This is way slower than the
  34817. &lsquo;<samp>init</samp>&rsquo; mode since it requires all the scalers to be re-computed, but it
  34818. allows advanced dynamic expressions.
  34819. </p></dd>
  34820. </dl>
  34821. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  34822. </p>
  34823. </dd>
  34824. <dt><samp>dither</samp></dt>
  34825. <dd><p>Set dithering to reduce the circular banding effects. Default is <code>1</code>
  34826. (enabled).
  34827. </p>
  34828. </dd>
  34829. <dt><samp>aspect</samp></dt>
  34830. <dd><p>Set vignette aspect. This setting allows one to adjust the shape of the vignette.
  34831. Setting this value to the SAR of the input will make a rectangular vignetting
  34832. following the dimensions of the video.
  34833. </p>
  34834. <p>Default is <code>1/1</code>.
  34835. </p></dd>
  34836. </dl>
  34837. <a name="Expressions"></a>
  34838. <h4 class="subsection">32.246.1 Expressions<span class="pull-right"><a class="anchor hidden-xs" href="#Expressions" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Expressions" aria-hidden="true">TOC</a></span></h4>
  34839. <p>The <samp>alpha</samp>, <samp>x0</samp> and <samp>y0</samp> expressions can contain the
  34840. following parameters.
  34841. </p>
  34842. <dl compact="compact">
  34843. <dt><samp>w</samp></dt>
  34844. <dt><samp>h</samp></dt>
  34845. <dd><p>input width and height
  34846. </p>
  34847. </dd>
  34848. <dt><samp>n</samp></dt>
  34849. <dd><p>the number of input frame, starting from 0
  34850. </p>
  34851. </dd>
  34852. <dt><samp>pts</samp></dt>
  34853. <dd><p>the PTS (Presentation TimeStamp) time of the filtered video frame, expressed in
  34854. <var>TB</var> units, NAN if undefined
  34855. </p>
  34856. </dd>
  34857. <dt><samp>r</samp></dt>
  34858. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  34859. </p>
  34860. </dd>
  34861. <dt><samp>t</samp></dt>
  34862. <dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
  34863. expressed in seconds, NAN if undefined
  34864. </p>
  34865. </dd>
  34866. <dt><samp>tb</samp></dt>
  34867. <dd><p>time base of the input video
  34868. </p></dd>
  34869. </dl>
  34870. <a name="Examples-134"></a>
  34871. <h4 class="subsection">32.246.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-134" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-134" aria-hidden="true">TOC</a></span></h4>
  34872. <ul>
  34873. <li> Apply simple strong vignetting effect:
  34874. <div class="example">
  34875. <pre class="example">vignette=PI/4
  34876. </pre></div>
  34877. </li><li> Make a flickering vignetting:
  34878. <div class="example">
  34879. <pre class="example">vignette='PI/4+random(1)*PI/50':eval=frame
  34880. </pre></div>
  34881. </li></ul>
  34882. <a name="vmafmotion"></a>
  34883. <h3 class="section">32.247 vmafmotion<span class="pull-right"><a class="anchor hidden-xs" href="#vmafmotion" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vmafmotion" aria-hidden="true">TOC</a></span></h3>
  34884. <p>Obtain the average VMAF motion score of a video.
  34885. It is one of the component metrics of VMAF.
  34886. </p>
  34887. <p>The obtained average motion score is printed through the logging system.
  34888. </p>
  34889. <p>The filter accepts the following options:
  34890. </p>
  34891. <dl compact="compact">
  34892. <dt><samp>stats_file</samp></dt>
  34893. <dd><p>If specified, the filter will use the named file to save the motion score of
  34894. each frame with respect to the previous frame.
  34895. When filename equals &quot;-&quot; the data is sent to standard output.
  34896. </p></dd>
  34897. </dl>
  34898. <p>Example:
  34899. </p><div class="example">
  34900. <pre class="example">ffmpeg -i ref.mpg -vf vmafmotion -f null -
  34901. </pre></div>
  34902. <a name="vstack"></a>
  34903. <h3 class="section">32.248 vstack<span class="pull-right"><a class="anchor hidden-xs" href="#vstack" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-vstack" aria-hidden="true">TOC</a></span></h3>
  34904. <p>Stack input videos vertically.
  34905. </p>
  34906. <p>All streams must be of same pixel format and of same width.
  34907. </p>
  34908. <p>Note that this filter is faster than using <a href="#overlay">overlay</a> and <a href="#pad">pad</a> filter
  34909. to create same output.
  34910. </p>
  34911. <p>The filter accepts the following options:
  34912. </p>
  34913. <dl compact="compact">
  34914. <dt><samp>inputs</samp></dt>
  34915. <dd><p>Set number of input streams. Default is 2.
  34916. </p>
  34917. </dd>
  34918. <dt><samp>shortest</samp></dt>
  34919. <dd><p>If set to 1, force the output to terminate when the shortest input
  34920. terminates. Default value is 0.
  34921. </p></dd>
  34922. </dl>
  34923. <a name="w3fdif"></a>
  34924. <h3 class="section">32.249 w3fdif<span class="pull-right"><a class="anchor hidden-xs" href="#w3fdif" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-w3fdif" aria-hidden="true">TOC</a></span></h3>
  34925. <p>Deinterlace the input video (&quot;w3fdif&quot; stands for &quot;Weston 3 Field
  34926. Deinterlacing Filter&quot;).
  34927. </p>
  34928. <p>Based on the process described by Martin Weston for BBC R&amp;D, and
  34929. implemented based on the de-interlace algorithm written by Jim
  34930. Easterbrook for BBC R&amp;D, the Weston 3 field deinterlacing filter
  34931. uses filter coefficients calculated by BBC R&amp;D.
  34932. </p>
  34933. <p>This filter uses field-dominance information in frame to decide which
  34934. of each pair of fields to place first in the output.
  34935. If it gets it wrong use <a href="#setfield">setfield</a> filter before <code>w3fdif</code> filter.
  34936. </p>
  34937. <p>There are two sets of filter coefficients, so called &quot;simple&quot;
  34938. and &quot;complex&quot;. Which set of filter coefficients is used can
  34939. be set by passing an optional parameter:
  34940. </p>
  34941. <dl compact="compact">
  34942. <dt><samp>filter</samp></dt>
  34943. <dd><p>Set the interlacing filter coefficients. Accepts one of the following values:
  34944. </p>
  34945. <dl compact="compact">
  34946. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  34947. <dd><p>Simple filter coefficient set.
  34948. </p></dd>
  34949. <dt>&lsquo;<samp>complex</samp>&rsquo;</dt>
  34950. <dd><p>More-complex filter coefficient set.
  34951. </p></dd>
  34952. </dl>
  34953. <p>Default value is &lsquo;<samp>complex</samp>&rsquo;.
  34954. </p>
  34955. </dd>
  34956. <dt><samp>mode</samp></dt>
  34957. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  34958. </p>
  34959. <dl compact="compact">
  34960. <dt><samp>frame</samp></dt>
  34961. <dd><p>Output one frame for each frame.
  34962. </p></dd>
  34963. <dt><samp>field</samp></dt>
  34964. <dd><p>Output one frame for each field.
  34965. </p></dd>
  34966. </dl>
  34967. <p>The default value is <code>field</code>.
  34968. </p>
  34969. </dd>
  34970. <dt><samp>parity</samp></dt>
  34971. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  34972. of the following values:
  34973. </p>
  34974. <dl compact="compact">
  34975. <dt><samp>tff</samp></dt>
  34976. <dd><p>Assume the top field is first.
  34977. </p></dd>
  34978. <dt><samp>bff</samp></dt>
  34979. <dd><p>Assume the bottom field is first.
  34980. </p></dd>
  34981. <dt><samp>auto</samp></dt>
  34982. <dd><p>Enable automatic detection of field parity.
  34983. </p></dd>
  34984. </dl>
  34985. <p>The default value is <code>auto</code>.
  34986. If the interlacing is unknown or the decoder does not export this information,
  34987. top field first will be assumed.
  34988. </p>
  34989. </dd>
  34990. <dt><samp>deint</samp></dt>
  34991. <dd><p>Specify which frames to deinterlace. Accepts one of the following values:
  34992. </p>
  34993. <dl compact="compact">
  34994. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  34995. <dd><p>Deinterlace all frames,
  34996. </p></dd>
  34997. <dt>&lsquo;<samp>interlaced</samp>&rsquo;</dt>
  34998. <dd><p>Only deinterlace frames marked as interlaced.
  34999. </p></dd>
  35000. </dl>
  35001. <p>Default value is &lsquo;<samp>all</samp>&rsquo;.
  35002. </p></dd>
  35003. </dl>
  35004. <a name="Commands-131"></a>
  35005. <h4 class="subsection">32.249.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-131" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-131" aria-hidden="true">TOC</a></span></h4>
  35006. <p>This filter supports same <a href="#commands">commands</a> as options.
  35007. </p>
  35008. <a name="waveform"></a>
  35009. <h3 class="section">32.250 waveform<span class="pull-right"><a class="anchor hidden-xs" href="#waveform" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-waveform" aria-hidden="true">TOC</a></span></h3>
  35010. <p>Video waveform monitor.
  35011. </p>
  35012. <p>The waveform monitor plots color component intensity. By default luminance
  35013. only. Each column of the waveform corresponds to a column of pixels in the
  35014. source video.
  35015. </p>
  35016. <p>It accepts the following options:
  35017. </p>
  35018. <dl compact="compact">
  35019. <dt><samp>mode, m</samp></dt>
  35020. <dd><p>Can be either <code>row</code>, or <code>column</code>. Default is <code>column</code>.
  35021. In row mode, the graph on the left side represents color component value 0 and
  35022. the right side represents value = 255. In column mode, the top side represents
  35023. color component value = 0 and bottom side represents value = 255.
  35024. </p>
  35025. </dd>
  35026. <dt><samp>intensity, i</samp></dt>
  35027. <dd><p>Set intensity. Smaller values are useful to find out how many values of the same
  35028. luminance are distributed across input rows/columns.
  35029. Default value is <code>0.04</code>. Allowed range is [0, 1].
  35030. </p>
  35031. </dd>
  35032. <dt><samp>mirror, r</samp></dt>
  35033. <dd><p>Set mirroring mode. <code>0</code> means unmirrored, <code>1</code> means mirrored.
  35034. In mirrored mode, higher values will be represented on the left
  35035. side for <code>row</code> mode and at the top for <code>column</code> mode. Default is
  35036. <code>1</code> (mirrored).
  35037. </p>
  35038. </dd>
  35039. <dt><samp>display, d</samp></dt>
  35040. <dd><p>Set display mode.
  35041. It accepts the following values:
  35042. </p><dl compact="compact">
  35043. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  35044. <dd><p>Presents information identical to that in the <code>parade</code>, except
  35045. that the graphs representing color components are superimposed directly
  35046. over one another.
  35047. </p>
  35048. <p>This display mode makes it easier to spot relative differences or similarities
  35049. in overlapping areas of the color components that are supposed to be identical,
  35050. such as neutral whites, grays, or blacks.
  35051. </p>
  35052. </dd>
  35053. <dt>&lsquo;<samp>stack</samp>&rsquo;</dt>
  35054. <dd><p>Display separate graph for the color components side by side in
  35055. <code>row</code> mode or one below the other in <code>column</code> mode.
  35056. </p>
  35057. </dd>
  35058. <dt>&lsquo;<samp>parade</samp>&rsquo;</dt>
  35059. <dd><p>Display separate graph for the color components side by side in
  35060. <code>column</code> mode or one below the other in <code>row</code> mode.
  35061. </p>
  35062. <p>Using this display mode makes it easy to spot color casts in the highlights
  35063. and shadows of an image, by comparing the contours of the top and the bottom
  35064. graphs of each waveform. Since whites, grays, and blacks are characterized
  35065. by exactly equal amounts of red, green, and blue, neutral areas of the picture
  35066. should display three waveforms of roughly equal width/height. If not, the
  35067. correction is easy to perform by making level adjustments the three waveforms.
  35068. </p></dd>
  35069. </dl>
  35070. <p>Default is <code>stack</code>.
  35071. </p>
  35072. </dd>
  35073. <dt><samp>components, c</samp></dt>
  35074. <dd><p>Set which color components to display. Default is 1, which means only luminance
  35075. or red color component if input is in RGB colorspace. If is set for example to
  35076. 7 it will display all 3 (if) available color components.
  35077. </p>
  35078. </dd>
  35079. <dt><samp>envelope, e</samp></dt>
  35080. <dd><dl compact="compact">
  35081. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  35082. <dd><p>No envelope, this is default.
  35083. </p>
  35084. </dd>
  35085. <dt>&lsquo;<samp>instant</samp>&rsquo;</dt>
  35086. <dd><p>Instant envelope, minimum and maximum values presented in graph will be easily
  35087. visible even with small <code>step</code> value.
  35088. </p>
  35089. </dd>
  35090. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  35091. <dd><p>Hold minimum and maximum values presented in graph across time. This way you
  35092. can still spot out of range values without constantly looking at waveforms.
  35093. </p>
  35094. </dd>
  35095. <dt>&lsquo;<samp>peak+instant</samp>&rsquo;</dt>
  35096. <dd><p>Peak and instant envelope combined together.
  35097. </p></dd>
  35098. </dl>
  35099. </dd>
  35100. <dt><samp>filter, f</samp></dt>
  35101. <dd><dl compact="compact">
  35102. <dt>&lsquo;<samp>lowpass</samp>&rsquo;</dt>
  35103. <dd><p>No filtering, this is default.
  35104. </p>
  35105. </dd>
  35106. <dt>&lsquo;<samp>flat</samp>&rsquo;</dt>
  35107. <dd><p>Luma and chroma combined together.
  35108. </p>
  35109. </dd>
  35110. <dt>&lsquo;<samp>aflat</samp>&rsquo;</dt>
  35111. <dd><p>Similar as above, but shows difference between blue and red chroma.
  35112. </p>
  35113. </dd>
  35114. <dt>&lsquo;<samp>xflat</samp>&rsquo;</dt>
  35115. <dd><p>Similar as above, but use different colors.
  35116. </p>
  35117. </dd>
  35118. <dt>&lsquo;<samp>yflat</samp>&rsquo;</dt>
  35119. <dd><p>Similar as above, but again with different colors.
  35120. </p>
  35121. </dd>
  35122. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  35123. <dd><p>Displays only chroma.
  35124. </p>
  35125. </dd>
  35126. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  35127. <dd><p>Displays actual color value on waveform.
  35128. </p>
  35129. </dd>
  35130. <dt>&lsquo;<samp>acolor</samp>&rsquo;</dt>
  35131. <dd><p>Similar as above, but with luma showing frequency of chroma values.
  35132. </p></dd>
  35133. </dl>
  35134. </dd>
  35135. <dt><samp>graticule, g</samp></dt>
  35136. <dd><p>Set which graticule to display.
  35137. </p>
  35138. <dl compact="compact">
  35139. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  35140. <dd><p>Do not display graticule.
  35141. </p>
  35142. </dd>
  35143. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  35144. <dd><p>Display green graticule showing legal broadcast ranges.
  35145. </p>
  35146. </dd>
  35147. <dt>&lsquo;<samp>orange</samp>&rsquo;</dt>
  35148. <dd><p>Display orange graticule showing legal broadcast ranges.
  35149. </p>
  35150. </dd>
  35151. <dt>&lsquo;<samp>invert</samp>&rsquo;</dt>
  35152. <dd><p>Display invert graticule showing legal broadcast ranges.
  35153. </p></dd>
  35154. </dl>
  35155. </dd>
  35156. <dt><samp>opacity, o</samp></dt>
  35157. <dd><p>Set graticule opacity.
  35158. </p>
  35159. </dd>
  35160. <dt><samp>flags, fl</samp></dt>
  35161. <dd><p>Set graticule flags.
  35162. </p>
  35163. <dl compact="compact">
  35164. <dt>&lsquo;<samp>numbers</samp>&rsquo;</dt>
  35165. <dd><p>Draw numbers above lines. By default enabled.
  35166. </p>
  35167. </dd>
  35168. <dt>&lsquo;<samp>dots</samp>&rsquo;</dt>
  35169. <dd><p>Draw dots instead of lines.
  35170. </p></dd>
  35171. </dl>
  35172. </dd>
  35173. <dt><samp>scale, s</samp></dt>
  35174. <dd><p>Set scale used for displaying graticule.
  35175. </p>
  35176. <dl compact="compact">
  35177. <dt>&lsquo;<samp>digital</samp>&rsquo;</dt>
  35178. <dt>&lsquo;<samp>millivolts</samp>&rsquo;</dt>
  35179. <dt>&lsquo;<samp>ire</samp>&rsquo;</dt>
  35180. </dl>
  35181. <p>Default is digital.
  35182. </p>
  35183. </dd>
  35184. <dt><samp>bgopacity, b</samp></dt>
  35185. <dd><p>Set background opacity.
  35186. </p>
  35187. </dd>
  35188. <dt><samp>tint0, t0</samp></dt>
  35189. <dt><samp>tint1, t1</samp></dt>
  35190. <dd><p>Set tint for output.
  35191. Only used with lowpass filter and when display is not overlay and input
  35192. pixel formats are not RGB.
  35193. </p></dd>
  35194. </dl>
  35195. <a name="weave_002c-doubleweave"></a>
  35196. <h3 class="section">32.251 weave, doubleweave<span class="pull-right"><a class="anchor hidden-xs" href="#weave_002c-doubleweave" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-weave_002c-doubleweave" aria-hidden="true">TOC</a></span></h3>
  35197. <p>The <code>weave</code> takes a field-based video input and join
  35198. each two sequential fields into single frame, producing a new double
  35199. height clip with half the frame rate and half the frame count.
  35200. </p>
  35201. <p>The <code>doubleweave</code> works same as <code>weave</code> but without
  35202. halving frame rate and frame count.
  35203. </p>
  35204. <p>It accepts the following option:
  35205. </p>
  35206. <dl compact="compact">
  35207. <dt><samp>first_field</samp></dt>
  35208. <dd><p>Set first field. Available values are:
  35209. </p>
  35210. <dl compact="compact">
  35211. <dt>&lsquo;<samp>top, t</samp>&rsquo;</dt>
  35212. <dd><p>Set the frame as top-field-first.
  35213. </p>
  35214. </dd>
  35215. <dt>&lsquo;<samp>bottom, b</samp>&rsquo;</dt>
  35216. <dd><p>Set the frame as bottom-field-first.
  35217. </p></dd>
  35218. </dl>
  35219. </dd>
  35220. </dl>
  35221. <a name="Examples-135"></a>
  35222. <h4 class="subsection">32.251.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-135" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-135" aria-hidden="true">TOC</a></span></h4>
  35223. <ul>
  35224. <li> Interlace video using <a href="#select">select</a> and <a href="#separatefields">separatefields</a> filter:
  35225. <div class="example">
  35226. <pre class="example">separatefields,select=eq(mod(n,4),0)+eq(mod(n,4),3),weave
  35227. </pre></div>
  35228. </li></ul>
  35229. <a name="xbr"></a>
  35230. <h3 class="section">32.252 xbr<span class="pull-right"><a class="anchor hidden-xs" href="#xbr" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xbr" aria-hidden="true">TOC</a></span></h3>
  35231. <p>Apply the xBR high-quality magnification filter which is designed for pixel
  35232. art. It follows a set of edge-detection rules, see
  35233. <a href="https://forums.libretro.com/t/xbr-algorithm-tutorial/123">https://forums.libretro.com/t/xbr-algorithm-tutorial/123</a>.
  35234. </p>
  35235. <p>It accepts the following option:
  35236. </p>
  35237. <dl compact="compact">
  35238. <dt><samp>n</samp></dt>
  35239. <dd><p>Set the scaling dimension: <code>2</code> for <code>2xBR</code>, <code>3</code> for
  35240. <code>3xBR</code> and <code>4</code> for <code>4xBR</code>.
  35241. Default is <code>3</code>.
  35242. </p></dd>
  35243. </dl>
  35244. <a name="xfade"></a>
  35245. <h3 class="section">32.253 xfade<span class="pull-right"><a class="anchor hidden-xs" href="#xfade" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xfade" aria-hidden="true">TOC</a></span></h3>
  35246. <p>Apply cross fade from one input video stream to another input video stream.
  35247. The cross fade is applied for specified duration.
  35248. </p>
  35249. <p>The filter accepts the following options:
  35250. </p>
  35251. <dl compact="compact">
  35252. <dt><samp>transition</samp></dt>
  35253. <dd><p>Set one of available transition effects:
  35254. </p>
  35255. <dl compact="compact">
  35256. <dt>&lsquo;<samp>custom</samp>&rsquo;</dt>
  35257. <dt>&lsquo;<samp>fade</samp>&rsquo;</dt>
  35258. <dt>&lsquo;<samp>wipeleft</samp>&rsquo;</dt>
  35259. <dt>&lsquo;<samp>wiperight</samp>&rsquo;</dt>
  35260. <dt>&lsquo;<samp>wipeup</samp>&rsquo;</dt>
  35261. <dt>&lsquo;<samp>wipedown</samp>&rsquo;</dt>
  35262. <dt>&lsquo;<samp>slideleft</samp>&rsquo;</dt>
  35263. <dt>&lsquo;<samp>slideright</samp>&rsquo;</dt>
  35264. <dt>&lsquo;<samp>slideup</samp>&rsquo;</dt>
  35265. <dt>&lsquo;<samp>slidedown</samp>&rsquo;</dt>
  35266. <dt>&lsquo;<samp>circlecrop</samp>&rsquo;</dt>
  35267. <dt>&lsquo;<samp>rectcrop</samp>&rsquo;</dt>
  35268. <dt>&lsquo;<samp>distance</samp>&rsquo;</dt>
  35269. <dt>&lsquo;<samp>fadeblack</samp>&rsquo;</dt>
  35270. <dt>&lsquo;<samp>fadewhite</samp>&rsquo;</dt>
  35271. <dt>&lsquo;<samp>radial</samp>&rsquo;</dt>
  35272. <dt>&lsquo;<samp>smoothleft</samp>&rsquo;</dt>
  35273. <dt>&lsquo;<samp>smoothright</samp>&rsquo;</dt>
  35274. <dt>&lsquo;<samp>smoothup</samp>&rsquo;</dt>
  35275. <dt>&lsquo;<samp>smoothdown</samp>&rsquo;</dt>
  35276. <dt>&lsquo;<samp>circleopen</samp>&rsquo;</dt>
  35277. <dt>&lsquo;<samp>circleclose</samp>&rsquo;</dt>
  35278. <dt>&lsquo;<samp>vertopen</samp>&rsquo;</dt>
  35279. <dt>&lsquo;<samp>vertclose</samp>&rsquo;</dt>
  35280. <dt>&lsquo;<samp>horzopen</samp>&rsquo;</dt>
  35281. <dt>&lsquo;<samp>horzclose</samp>&rsquo;</dt>
  35282. <dt>&lsquo;<samp>dissolve</samp>&rsquo;</dt>
  35283. <dt>&lsquo;<samp>pixelize</samp>&rsquo;</dt>
  35284. <dt>&lsquo;<samp>diagtl</samp>&rsquo;</dt>
  35285. <dt>&lsquo;<samp>diagtr</samp>&rsquo;</dt>
  35286. <dt>&lsquo;<samp>diagbl</samp>&rsquo;</dt>
  35287. <dt>&lsquo;<samp>diagbr</samp>&rsquo;</dt>
  35288. <dt>&lsquo;<samp>hlslice</samp>&rsquo;</dt>
  35289. <dt>&lsquo;<samp>hrslice</samp>&rsquo;</dt>
  35290. <dt>&lsquo;<samp>vuslice</samp>&rsquo;</dt>
  35291. <dt>&lsquo;<samp>vdslice</samp>&rsquo;</dt>
  35292. <dt>&lsquo;<samp>hblur</samp>&rsquo;</dt>
  35293. <dt>&lsquo;<samp>fadegrays</samp>&rsquo;</dt>
  35294. <dt>&lsquo;<samp>wipetl</samp>&rsquo;</dt>
  35295. <dt>&lsquo;<samp>wipetr</samp>&rsquo;</dt>
  35296. <dt>&lsquo;<samp>wipebl</samp>&rsquo;</dt>
  35297. <dt>&lsquo;<samp>wipebr</samp>&rsquo;</dt>
  35298. <dt>&lsquo;<samp>squeezeh</samp>&rsquo;</dt>
  35299. <dt>&lsquo;<samp>squeezev</samp>&rsquo;</dt>
  35300. </dl>
  35301. <p>Default transition effect is fade.
  35302. </p>
  35303. </dd>
  35304. <dt><samp>duration</samp></dt>
  35305. <dd><p>Set cross fade duration in seconds.
  35306. Default duration is 1 second.
  35307. </p>
  35308. </dd>
  35309. <dt><samp>offset</samp></dt>
  35310. <dd><p>Set cross fade start relative to first input stream in seconds.
  35311. Default offset is 0.
  35312. </p>
  35313. </dd>
  35314. <dt><samp>expr</samp></dt>
  35315. <dd><p>Set expression for custom transition effect.
  35316. </p>
  35317. <p>The expressions can use the following variables and functions:
  35318. </p>
  35319. <dl compact="compact">
  35320. <dt><samp>X</samp></dt>
  35321. <dt><samp>Y</samp></dt>
  35322. <dd><p>The coordinates of the current sample.
  35323. </p>
  35324. </dd>
  35325. <dt><samp>W</samp></dt>
  35326. <dt><samp>H</samp></dt>
  35327. <dd><p>The width and height of the image.
  35328. </p>
  35329. </dd>
  35330. <dt><samp>P</samp></dt>
  35331. <dd><p>Progress of transition effect.
  35332. </p>
  35333. </dd>
  35334. <dt><samp>PLANE</samp></dt>
  35335. <dd><p>Currently processed plane.
  35336. </p>
  35337. </dd>
  35338. <dt><samp>A</samp></dt>
  35339. <dd><p>Return value of first input at current location and plane.
  35340. </p>
  35341. </dd>
  35342. <dt><samp>B</samp></dt>
  35343. <dd><p>Return value of second input at current location and plane.
  35344. </p>
  35345. </dd>
  35346. <dt><samp>a0(x, y)</samp></dt>
  35347. <dt><samp>a1(x, y)</samp></dt>
  35348. <dt><samp>a2(x, y)</samp></dt>
  35349. <dt><samp>a3(x, y)</samp></dt>
  35350. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  35351. first/second/third/fourth component of first input.
  35352. </p>
  35353. </dd>
  35354. <dt><samp>b0(x, y)</samp></dt>
  35355. <dt><samp>b1(x, y)</samp></dt>
  35356. <dt><samp>b2(x, y)</samp></dt>
  35357. <dt><samp>b3(x, y)</samp></dt>
  35358. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  35359. first/second/third/fourth component of second input.
  35360. </p></dd>
  35361. </dl>
  35362. </dd>
  35363. </dl>
  35364. <a name="Examples-136"></a>
  35365. <h4 class="subsection">32.253.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-136" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-136" aria-hidden="true">TOC</a></span></h4>
  35366. <ul>
  35367. <li> Cross fade from one input video to another input video, with fade transition and duration of transition
  35368. of 2 seconds starting at offset of 5 seconds:
  35369. <div class="example">
  35370. <pre class="example">ffmpeg -i first.mp4 -i second.mp4 -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
  35371. </pre></div>
  35372. </li></ul>
  35373. <a name="xmedian"></a>
  35374. <h3 class="section">32.254 xmedian<span class="pull-right"><a class="anchor hidden-xs" href="#xmedian" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xmedian" aria-hidden="true">TOC</a></span></h3>
  35375. <p>Pick median pixels from several input videos.
  35376. </p>
  35377. <p>The filter accepts the following options:
  35378. </p>
  35379. <dl compact="compact">
  35380. <dt><samp>inputs</samp></dt>
  35381. <dd><p>Set number of inputs.
  35382. Default is 3. Allowed range is from 3 to 255.
  35383. If number of inputs is even number, than result will be mean value between two median values.
  35384. </p>
  35385. </dd>
  35386. <dt><samp>planes</samp></dt>
  35387. <dd><p>Set which planes to filter. Default value is <code>15</code>, by which all planes are processed.
  35388. </p>
  35389. </dd>
  35390. <dt><samp>percentile</samp></dt>
  35391. <dd><p>Set median percentile. Default value is <code>0.5</code>.
  35392. Default value of <code>0.5</code> will pick always median values, while <code>0</code> will pick
  35393. minimum values, and <code>1</code> maximum values.
  35394. </p></dd>
  35395. </dl>
  35396. <a name="Commands-132"></a>
  35397. <h4 class="subsection">32.254.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-132" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-132" aria-hidden="true">TOC</a></span></h4>
  35398. <p>This filter supports all above options as <a href="#commands">commands</a>, excluding option <code>inputs</code>.
  35399. </p>
  35400. <a name="xstack"></a>
  35401. <h3 class="section">32.255 xstack<span class="pull-right"><a class="anchor hidden-xs" href="#xstack" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xstack" aria-hidden="true">TOC</a></span></h3>
  35402. <p>Stack video inputs into custom layout.
  35403. </p>
  35404. <p>All streams must be of same pixel format.
  35405. </p>
  35406. <p>The filter accepts the following options:
  35407. </p>
  35408. <dl compact="compact">
  35409. <dt><samp>inputs</samp></dt>
  35410. <dd><p>Set number of input streams. Default is 2.
  35411. </p>
  35412. </dd>
  35413. <dt><samp>layout</samp></dt>
  35414. <dd><p>Specify layout of inputs.
  35415. This option requires the desired layout configuration to be explicitly set by the user.
  35416. This sets position of each video input in output. Each input
  35417. is separated by &rsquo;|&rsquo;.
  35418. The first number represents the column, and the second number represents the row.
  35419. Numbers start at 0 and are separated by &rsquo;_&rsquo;. Optionally one can use wX and hX,
  35420. where X is video input from which to take width or height.
  35421. Multiple values can be used when separated by &rsquo;+&rsquo;. In such
  35422. case values are summed together.
  35423. </p>
  35424. <p>Note that if inputs are of different sizes gaps may appear, as not all of
  35425. the output video frame will be filled. Similarly, videos can overlap each
  35426. other if their position doesn&rsquo;t leave enough space for the full frame of
  35427. adjoining videos.
  35428. </p>
  35429. <p>For 2 inputs, a default layout of <code>0_0|w0_0</code> is set. In all other cases,
  35430. a layout must be set by the user.
  35431. </p>
  35432. </dd>
  35433. <dt><samp>shortest</samp></dt>
  35434. <dd><p>If set to 1, force the output to terminate when the shortest input
  35435. terminates. Default value is 0.
  35436. </p>
  35437. </dd>
  35438. <dt><samp>fill</samp></dt>
  35439. <dd><p>If set to valid color, all unused pixels will be filled with that color.
  35440. By default fill is set to none, so it is disabled.
  35441. </p></dd>
  35442. </dl>
  35443. <a name="Examples-137"></a>
  35444. <h4 class="subsection">32.255.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-137" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-137" aria-hidden="true">TOC</a></span></h4>
  35445. <ul>
  35446. <li> Display 4 inputs into 2x2 grid.
  35447. <p>Layout:
  35448. </p><div class="example">
  35449. <pre class="example">input1(0, 0) | input3(w0, 0)
  35450. input2(0, h0) | input4(w0, h0)
  35451. </pre></div>
  35452. <div class="example">
  35453. <pre class="example">xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
  35454. </pre></div>
  35455. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  35456. </p>
  35457. </li><li> Display 4 inputs into 1x4 grid.
  35458. <p>Layout:
  35459. </p><div class="example">
  35460. <pre class="example">input1(0, 0)
  35461. input2(0, h0)
  35462. input3(0, h0+h1)
  35463. input4(0, h0+h1+h2)
  35464. </pre></div>
  35465. <div class="example">
  35466. <pre class="example">xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
  35467. </pre></div>
  35468. <p>Note that if inputs are of different widths, unused space will appear.
  35469. </p>
  35470. </li><li> Display 9 inputs into 3x3 grid.
  35471. <p>Layout:
  35472. </p><div class="example">
  35473. <pre class="example">input1(0, 0) | input4(w0, 0) | input7(w0+w3, 0)
  35474. input2(0, h0) | input5(w0, h0) | input8(w0+w3, h0)
  35475. input3(0, h0+h1) | input6(w0, h0+h1) | input9(w0+w3, h0+h1)
  35476. </pre></div>
  35477. <div class="example">
  35478. <pre class="example">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
  35479. </pre></div>
  35480. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  35481. </p>
  35482. </li><li> Display 16 inputs into 4x4 grid.
  35483. <p>Layout:
  35484. </p><div class="example">
  35485. <pre class="example">input1(0, 0) | input5(w0, 0) | input9 (w0+w4, 0) | input13(w0+w4+w8, 0)
  35486. input2(0, h0) | input6(w0, h0) | input10(w0+w4, h0) | input14(w0+w4+w8, h0)
  35487. input3(0, h0+h1) | input7(w0, h0+h1) | input11(w0+w4, h0+h1) | input15(w0+w4+w8, h0+h1)
  35488. input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
  35489. </pre></div>
  35490. <div class="example">
  35491. <pre class="example">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|
  35492. 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
  35493. </pre></div>
  35494. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  35495. </p>
  35496. </li></ul>
  35497. <span id="yadif"></span><a name="yadif-1"></a>
  35498. <h3 class="section">32.256 yadif<span class="pull-right"><a class="anchor hidden-xs" href="#yadif-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-yadif-1" aria-hidden="true">TOC</a></span></h3>
  35499. <p>Deinterlace the input video (&quot;yadif&quot; means &quot;yet another deinterlacing
  35500. filter&quot;).
  35501. </p>
  35502. <p>It accepts the following parameters:
  35503. </p>
  35504. <dl compact="compact">
  35505. <dt><samp>mode</samp></dt>
  35506. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  35507. </p>
  35508. <dl compact="compact">
  35509. <dt><samp>0, send_frame</samp></dt>
  35510. <dd><p>Output one frame for each frame.
  35511. </p></dd>
  35512. <dt><samp>1, send_field</samp></dt>
  35513. <dd><p>Output one frame for each field.
  35514. </p></dd>
  35515. <dt><samp>2, send_frame_nospatial</samp></dt>
  35516. <dd><p>Like <code>send_frame</code>, but it skips the spatial interlacing check.
  35517. </p></dd>
  35518. <dt><samp>3, send_field_nospatial</samp></dt>
  35519. <dd><p>Like <code>send_field</code>, but it skips the spatial interlacing check.
  35520. </p></dd>
  35521. </dl>
  35522. <p>The default value is <code>send_frame</code>.
  35523. </p>
  35524. </dd>
  35525. <dt><samp>parity</samp></dt>
  35526. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  35527. of the following values:
  35528. </p>
  35529. <dl compact="compact">
  35530. <dt><samp>0, tff</samp></dt>
  35531. <dd><p>Assume the top field is first.
  35532. </p></dd>
  35533. <dt><samp>1, bff</samp></dt>
  35534. <dd><p>Assume the bottom field is first.
  35535. </p></dd>
  35536. <dt><samp>-1, auto</samp></dt>
  35537. <dd><p>Enable automatic detection of field parity.
  35538. </p></dd>
  35539. </dl>
  35540. <p>The default value is <code>auto</code>.
  35541. If the interlacing is unknown or the decoder does not export this information,
  35542. top field first will be assumed.
  35543. </p>
  35544. </dd>
  35545. <dt><samp>deint</samp></dt>
  35546. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  35547. values:
  35548. </p>
  35549. <dl compact="compact">
  35550. <dt><samp>0, all</samp></dt>
  35551. <dd><p>Deinterlace all frames.
  35552. </p></dd>
  35553. <dt><samp>1, interlaced</samp></dt>
  35554. <dd><p>Only deinterlace frames marked as interlaced.
  35555. </p></dd>
  35556. </dl>
  35557. <p>The default value is <code>all</code>.
  35558. </p></dd>
  35559. </dl>
  35560. <a name="yadif_005fcuda"></a>
  35561. <h3 class="section">32.257 yadif_cuda<span class="pull-right"><a class="anchor hidden-xs" href="#yadif_005fcuda" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-yadif_005fcuda" aria-hidden="true">TOC</a></span></h3>
  35562. <p>Deinterlace the input video using the <a href="#yadif">yadif</a> algorithm, but implemented
  35563. in CUDA so that it can work as part of a GPU accelerated pipeline with nvdec
  35564. and/or nvenc.
  35565. </p>
  35566. <p>It accepts the following parameters:
  35567. </p>
  35568. <dl compact="compact">
  35569. <dt><samp>mode</samp></dt>
  35570. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  35571. </p>
  35572. <dl compact="compact">
  35573. <dt><samp>0, send_frame</samp></dt>
  35574. <dd><p>Output one frame for each frame.
  35575. </p></dd>
  35576. <dt><samp>1, send_field</samp></dt>
  35577. <dd><p>Output one frame for each field.
  35578. </p></dd>
  35579. <dt><samp>2, send_frame_nospatial</samp></dt>
  35580. <dd><p>Like <code>send_frame</code>, but it skips the spatial interlacing check.
  35581. </p></dd>
  35582. <dt><samp>3, send_field_nospatial</samp></dt>
  35583. <dd><p>Like <code>send_field</code>, but it skips the spatial interlacing check.
  35584. </p></dd>
  35585. </dl>
  35586. <p>The default value is <code>send_frame</code>.
  35587. </p>
  35588. </dd>
  35589. <dt><samp>parity</samp></dt>
  35590. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  35591. of the following values:
  35592. </p>
  35593. <dl compact="compact">
  35594. <dt><samp>0, tff</samp></dt>
  35595. <dd><p>Assume the top field is first.
  35596. </p></dd>
  35597. <dt><samp>1, bff</samp></dt>
  35598. <dd><p>Assume the bottom field is first.
  35599. </p></dd>
  35600. <dt><samp>-1, auto</samp></dt>
  35601. <dd><p>Enable automatic detection of field parity.
  35602. </p></dd>
  35603. </dl>
  35604. <p>The default value is <code>auto</code>.
  35605. If the interlacing is unknown or the decoder does not export this information,
  35606. top field first will be assumed.
  35607. </p>
  35608. </dd>
  35609. <dt><samp>deint</samp></dt>
  35610. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  35611. values:
  35612. </p>
  35613. <dl compact="compact">
  35614. <dt><samp>0, all</samp></dt>
  35615. <dd><p>Deinterlace all frames.
  35616. </p></dd>
  35617. <dt><samp>1, interlaced</samp></dt>
  35618. <dd><p>Only deinterlace frames marked as interlaced.
  35619. </p></dd>
  35620. </dl>
  35621. <p>The default value is <code>all</code>.
  35622. </p></dd>
  35623. </dl>
  35624. <a name="yaepblur"></a>
  35625. <h3 class="section">32.258 yaepblur<span class="pull-right"><a class="anchor hidden-xs" href="#yaepblur" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-yaepblur" aria-hidden="true">TOC</a></span></h3>
  35626. <p>Apply blur filter while preserving edges (&quot;yaepblur&quot; means &quot;yet another edge preserving blur filter&quot;).
  35627. The algorithm is described in
  35628. &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;
  35629. </p>
  35630. <p>It accepts the following parameters:
  35631. </p>
  35632. <dl compact="compact">
  35633. <dt><samp>radius, r</samp></dt>
  35634. <dd><p>Set the window radius. Default value is 3.
  35635. </p>
  35636. </dd>
  35637. <dt><samp>planes, p</samp></dt>
  35638. <dd><p>Set which planes to filter. Default is only the first plane.
  35639. </p>
  35640. </dd>
  35641. <dt><samp>sigma, s</samp></dt>
  35642. <dd><p>Set blur strength. Default value is 128.
  35643. </p></dd>
  35644. </dl>
  35645. <a name="Commands-133"></a>
  35646. <h4 class="subsection">32.258.1 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-133" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-133" aria-hidden="true">TOC</a></span></h4>
  35647. <p>This filter supports same <a href="#commands">commands</a> as options.
  35648. </p>
  35649. <a name="zoompan"></a>
  35650. <h3 class="section">32.259 zoompan<span class="pull-right"><a class="anchor hidden-xs" href="#zoompan" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-zoompan" aria-hidden="true">TOC</a></span></h3>
  35651. <p>Apply Zoom &amp; Pan effect.
  35652. </p>
  35653. <p>This filter accepts the following options:
  35654. </p>
  35655. <dl compact="compact">
  35656. <dt><samp>zoom, z</samp></dt>
  35657. <dd><p>Set the zoom expression. Range is 1-10. Default is 1.
  35658. </p>
  35659. </dd>
  35660. <dt><samp>x</samp></dt>
  35661. <dt><samp>y</samp></dt>
  35662. <dd><p>Set the x and y expression. Default is 0.
  35663. </p>
  35664. </dd>
  35665. <dt><samp>d</samp></dt>
  35666. <dd><p>Set the duration expression in number of frames.
  35667. This sets for how many number of frames effect will last for
  35668. single input image. Default is 90.
  35669. </p>
  35670. </dd>
  35671. <dt><samp>s</samp></dt>
  35672. <dd><p>Set the output image size, default is &rsquo;hd720&rsquo;.
  35673. </p>
  35674. </dd>
  35675. <dt><samp>fps</samp></dt>
  35676. <dd><p>Set the output frame rate, default is &rsquo;25&rsquo;.
  35677. </p></dd>
  35678. </dl>
  35679. <p>Each expression can contain the following constants:
  35680. </p>
  35681. <dl compact="compact">
  35682. <dt><samp>in_w, iw</samp></dt>
  35683. <dd><p>Input width.
  35684. </p>
  35685. </dd>
  35686. <dt><samp>in_h, ih</samp></dt>
  35687. <dd><p>Input height.
  35688. </p>
  35689. </dd>
  35690. <dt><samp>out_w, ow</samp></dt>
  35691. <dd><p>Output width.
  35692. </p>
  35693. </dd>
  35694. <dt><samp>out_h, oh</samp></dt>
  35695. <dd><p>Output height.
  35696. </p>
  35697. </dd>
  35698. <dt><samp>in</samp></dt>
  35699. <dd><p>Input frame count.
  35700. </p>
  35701. </dd>
  35702. <dt><samp>on</samp></dt>
  35703. <dd><p>Output frame count.
  35704. </p>
  35705. </dd>
  35706. <dt><samp>in_time, it</samp></dt>
  35707. <dd><p>The input timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  35708. </p>
  35709. </dd>
  35710. <dt><samp>out_time, time, ot</samp></dt>
  35711. <dd><p>The output timestamp expressed in seconds.
  35712. </p>
  35713. </dd>
  35714. <dt><samp>x</samp></dt>
  35715. <dt><samp>y</samp></dt>
  35716. <dd><p>Last calculated &rsquo;x&rsquo; and &rsquo;y&rsquo; position from &rsquo;x&rsquo; and &rsquo;y&rsquo; expression
  35717. for current input frame.
  35718. </p>
  35719. </dd>
  35720. <dt><samp>px</samp></dt>
  35721. <dt><samp>py</samp></dt>
  35722. <dd><p>&rsquo;x&rsquo; and &rsquo;y&rsquo; of last output frame of previous input frame or 0 when there was
  35723. not yet such frame (first input frame).
  35724. </p>
  35725. </dd>
  35726. <dt><samp>zoom</samp></dt>
  35727. <dd><p>Last calculated zoom from &rsquo;z&rsquo; expression for current input frame.
  35728. </p>
  35729. </dd>
  35730. <dt><samp>pzoom</samp></dt>
  35731. <dd><p>Last calculated zoom of last output frame of previous input frame.
  35732. </p>
  35733. </dd>
  35734. <dt><samp>duration</samp></dt>
  35735. <dd><p>Number of output frames for current input frame. Calculated from &rsquo;d&rsquo; expression
  35736. for each input frame.
  35737. </p>
  35738. </dd>
  35739. <dt><samp>pduration</samp></dt>
  35740. <dd><p>number of output frames created for previous input frame
  35741. </p>
  35742. </dd>
  35743. <dt><samp>a</samp></dt>
  35744. <dd><p>Rational number: input width / input height
  35745. </p>
  35746. </dd>
  35747. <dt><samp>sar</samp></dt>
  35748. <dd><p>sample aspect ratio
  35749. </p>
  35750. </dd>
  35751. <dt><samp>dar</samp></dt>
  35752. <dd><p>display aspect ratio
  35753. </p>
  35754. </dd>
  35755. </dl>
  35756. <a name="Examples-138"></a>
  35757. <h4 class="subsection">32.259.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-138" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-138" aria-hidden="true">TOC</a></span></h4>
  35758. <ul>
  35759. <li> Zoom in up to 1.5x and pan at same time to some spot near center of picture:
  35760. <div class="example">
  35761. <pre class="example">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
  35762. </pre></div>
  35763. </li><li> Zoom in up to 1.5x and pan always at center of picture:
  35764. <div class="example">
  35765. <pre class="example">zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
  35766. </pre></div>
  35767. </li><li> Same as above but without pausing:
  35768. <div class="example">
  35769. <pre class="example">zoompan=z='min(max(zoom,pzoom)+0.0015,1.5)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
  35770. </pre></div>
  35771. </li><li> Zoom in 2x into center of picture only for the first second of the input video:
  35772. <div class="example">
  35773. <pre class="example">zoompan=z='if(between(in_time,0,1),2,1)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'
  35774. </pre></div>
  35775. </li></ul>
  35776. <span id="zscale"></span><a name="zscale-1"></a>
  35777. <h3 class="section">32.260 zscale<span class="pull-right"><a class="anchor hidden-xs" href="#zscale-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-zscale-1" aria-hidden="true">TOC</a></span></h3>
  35778. <p>Scale (resize) the input video, using the z.lib library:
  35779. <a href="https://github.com/sekrit-twc/zimg">https://github.com/sekrit-twc/zimg</a>. To enable compilation of this
  35780. filter, you need to configure FFmpeg with <code>--enable-libzimg</code>.
  35781. </p>
  35782. <p>The zscale filter forces the output display aspect ratio to be the same
  35783. as the input, by changing the output sample aspect ratio.
  35784. </p>
  35785. <p>If the input image format is different from the format requested by
  35786. the next filter, the zscale filter will convert the input to the
  35787. requested format.
  35788. </p>
  35789. <a name="Options-36"></a>
  35790. <h4 class="subsection">32.260.1 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options-36" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options-36" aria-hidden="true">TOC</a></span></h4>
  35791. <p>The filter accepts the following options.
  35792. </p>
  35793. <dl compact="compact">
  35794. <dt><samp>width, w</samp></dt>
  35795. <dt><samp>height, h</samp></dt>
  35796. <dd><p>Set the output video dimension expression. Default value is the input
  35797. dimension.
  35798. </p>
  35799. <p>If the <var>width</var> or <var>w</var> value is 0, the input width is used for
  35800. the output. If the <var>height</var> or <var>h</var> value is 0, the input height
  35801. is used for the output.
  35802. </p>
  35803. <p>If one and only one of the values is -n with n &gt;= 1, the zscale filter
  35804. will use a value that maintains the aspect ratio of the input image,
  35805. calculated from the other specified dimension. After that it will,
  35806. however, make sure that the calculated dimension is divisible by n and
  35807. adjust the value if necessary.
  35808. </p>
  35809. <p>If both values are -n with n &gt;= 1, the behavior will be identical to
  35810. both values being set to 0 as previously detailed.
  35811. </p>
  35812. <p>See below for the list of accepted constants for use in the dimension
  35813. expression.
  35814. </p>
  35815. </dd>
  35816. <dt><samp>size, s</samp></dt>
  35817. <dd><p>Set the video size. For the syntax of this option, check the
  35818. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35819. </p>
  35820. </dd>
  35821. <dt><samp>dither, d</samp></dt>
  35822. <dd><p>Set the dither type.
  35823. </p>
  35824. <p>Possible values are:
  35825. </p><dl compact="compact">
  35826. <dt><var>none</var></dt>
  35827. <dt><var>ordered</var></dt>
  35828. <dt><var>random</var></dt>
  35829. <dt><var>error_diffusion</var></dt>
  35830. </dl>
  35831. <p>Default is none.
  35832. </p>
  35833. </dd>
  35834. <dt><samp>filter, f</samp></dt>
  35835. <dd><p>Set the resize filter type.
  35836. </p>
  35837. <p>Possible values are:
  35838. </p><dl compact="compact">
  35839. <dt><var>point</var></dt>
  35840. <dt><var>bilinear</var></dt>
  35841. <dt><var>bicubic</var></dt>
  35842. <dt><var>spline16</var></dt>
  35843. <dt><var>spline36</var></dt>
  35844. <dt><var>lanczos</var></dt>
  35845. </dl>
  35846. <p>Default is bilinear.
  35847. </p>
  35848. </dd>
  35849. <dt><samp>range, r</samp></dt>
  35850. <dd><p>Set the color range.
  35851. </p>
  35852. <p>Possible values are:
  35853. </p><dl compact="compact">
  35854. <dt><var>input</var></dt>
  35855. <dt><var>limited</var></dt>
  35856. <dt><var>full</var></dt>
  35857. </dl>
  35858. <p>Default is same as input.
  35859. </p>
  35860. </dd>
  35861. <dt><samp>primaries, p</samp></dt>
  35862. <dd><p>Set the color primaries.
  35863. </p>
  35864. <p>Possible values are:
  35865. </p><dl compact="compact">
  35866. <dt><var>input</var></dt>
  35867. <dt><var>709</var></dt>
  35868. <dt><var>unspecified</var></dt>
  35869. <dt><var>170m</var></dt>
  35870. <dt><var>240m</var></dt>
  35871. <dt><var>2020</var></dt>
  35872. </dl>
  35873. <p>Default is same as input.
  35874. </p>
  35875. </dd>
  35876. <dt><samp>transfer, t</samp></dt>
  35877. <dd><p>Set the transfer characteristics.
  35878. </p>
  35879. <p>Possible values are:
  35880. </p><dl compact="compact">
  35881. <dt><var>input</var></dt>
  35882. <dt><var>709</var></dt>
  35883. <dt><var>unspecified</var></dt>
  35884. <dt><var>601</var></dt>
  35885. <dt><var>linear</var></dt>
  35886. <dt><var>2020_10</var></dt>
  35887. <dt><var>2020_12</var></dt>
  35888. <dt><var>smpte2084</var></dt>
  35889. <dt><var>iec61966-2-1</var></dt>
  35890. <dt><var>arib-std-b67</var></dt>
  35891. </dl>
  35892. <p>Default is same as input.
  35893. </p>
  35894. </dd>
  35895. <dt><samp>matrix, m</samp></dt>
  35896. <dd><p>Set the colorspace matrix.
  35897. </p>
  35898. <p>Possible value are:
  35899. </p><dl compact="compact">
  35900. <dt><var>input</var></dt>
  35901. <dt><var>709</var></dt>
  35902. <dt><var>unspecified</var></dt>
  35903. <dt><var>470bg</var></dt>
  35904. <dt><var>170m</var></dt>
  35905. <dt><var>2020_ncl</var></dt>
  35906. <dt><var>2020_cl</var></dt>
  35907. </dl>
  35908. <p>Default is same as input.
  35909. </p>
  35910. </dd>
  35911. <dt><samp>rangein, rin</samp></dt>
  35912. <dd><p>Set the input color range.
  35913. </p>
  35914. <p>Possible values are:
  35915. </p><dl compact="compact">
  35916. <dt><var>input</var></dt>
  35917. <dt><var>limited</var></dt>
  35918. <dt><var>full</var></dt>
  35919. </dl>
  35920. <p>Default is same as input.
  35921. </p>
  35922. </dd>
  35923. <dt><samp>primariesin, pin</samp></dt>
  35924. <dd><p>Set the input color primaries.
  35925. </p>
  35926. <p>Possible values are:
  35927. </p><dl compact="compact">
  35928. <dt><var>input</var></dt>
  35929. <dt><var>709</var></dt>
  35930. <dt><var>unspecified</var></dt>
  35931. <dt><var>170m</var></dt>
  35932. <dt><var>240m</var></dt>
  35933. <dt><var>2020</var></dt>
  35934. </dl>
  35935. <p>Default is same as input.
  35936. </p>
  35937. </dd>
  35938. <dt><samp>transferin, tin</samp></dt>
  35939. <dd><p>Set the input transfer characteristics.
  35940. </p>
  35941. <p>Possible values are:
  35942. </p><dl compact="compact">
  35943. <dt><var>input</var></dt>
  35944. <dt><var>709</var></dt>
  35945. <dt><var>unspecified</var></dt>
  35946. <dt><var>601</var></dt>
  35947. <dt><var>linear</var></dt>
  35948. <dt><var>2020_10</var></dt>
  35949. <dt><var>2020_12</var></dt>
  35950. </dl>
  35951. <p>Default is same as input.
  35952. </p>
  35953. </dd>
  35954. <dt><samp>matrixin, min</samp></dt>
  35955. <dd><p>Set the input colorspace matrix.
  35956. </p>
  35957. <p>Possible value are:
  35958. </p><dl compact="compact">
  35959. <dt><var>input</var></dt>
  35960. <dt><var>709</var></dt>
  35961. <dt><var>unspecified</var></dt>
  35962. <dt><var>470bg</var></dt>
  35963. <dt><var>170m</var></dt>
  35964. <dt><var>2020_ncl</var></dt>
  35965. <dt><var>2020_cl</var></dt>
  35966. </dl>
  35967. </dd>
  35968. <dt><samp>chromal, c</samp></dt>
  35969. <dd><p>Set the output chroma location.
  35970. </p>
  35971. <p>Possible values are:
  35972. </p><dl compact="compact">
  35973. <dt><var>input</var></dt>
  35974. <dt><var>left</var></dt>
  35975. <dt><var>center</var></dt>
  35976. <dt><var>topleft</var></dt>
  35977. <dt><var>top</var></dt>
  35978. <dt><var>bottomleft</var></dt>
  35979. <dt><var>bottom</var></dt>
  35980. </dl>
  35981. </dd>
  35982. <dt><samp>chromalin, cin</samp></dt>
  35983. <dd><p>Set the input chroma location.
  35984. </p>
  35985. <p>Possible values are:
  35986. </p><dl compact="compact">
  35987. <dt><var>input</var></dt>
  35988. <dt><var>left</var></dt>
  35989. <dt><var>center</var></dt>
  35990. <dt><var>topleft</var></dt>
  35991. <dt><var>top</var></dt>
  35992. <dt><var>bottomleft</var></dt>
  35993. <dt><var>bottom</var></dt>
  35994. </dl>
  35995. </dd>
  35996. <dt><samp>npl</samp></dt>
  35997. <dd><p>Set the nominal peak luminance.
  35998. </p>
  35999. </dd>
  36000. <dt><samp>param_a</samp></dt>
  36001. <dd><p>Parameter A for scaling filters. Parameter &quot;b&quot; for bicubic, and the number of
  36002. filter taps for lanczos.
  36003. </p>
  36004. </dd>
  36005. <dt><samp>param_b</samp></dt>
  36006. <dd><p>Parameter B for scaling filters. Parameter &quot;c&quot; for bicubic.
  36007. </p></dd>
  36008. </dl>
  36009. <p>The values of the <samp>w</samp> and <samp>h</samp> options are expressions
  36010. containing the following constants:
  36011. </p>
  36012. <dl compact="compact">
  36013. <dt><var>in_w</var></dt>
  36014. <dt><var>in_h</var></dt>
  36015. <dd><p>The input width and height
  36016. </p>
  36017. </dd>
  36018. <dt><var>iw</var></dt>
  36019. <dt><var>ih</var></dt>
  36020. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  36021. </p>
  36022. </dd>
  36023. <dt><var>out_w</var></dt>
  36024. <dt><var>out_h</var></dt>
  36025. <dd><p>The output (scaled) width and height
  36026. </p>
  36027. </dd>
  36028. <dt><var>ow</var></dt>
  36029. <dt><var>oh</var></dt>
  36030. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>
  36031. </p>
  36032. </dd>
  36033. <dt><var>a</var></dt>
  36034. <dd><p>The same as <var>iw</var> / <var>ih</var>
  36035. </p>
  36036. </dd>
  36037. <dt><var>sar</var></dt>
  36038. <dd><p>input sample aspect ratio
  36039. </p>
  36040. </dd>
  36041. <dt><var>dar</var></dt>
  36042. <dd><p>The input display aspect ratio. Calculated from <code>(iw / ih) * sar</code>.
  36043. </p>
  36044. </dd>
  36045. <dt><var>hsub</var></dt>
  36046. <dt><var>vsub</var></dt>
  36047. <dd><p>horizontal and vertical input chroma subsample values. For example for the
  36048. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  36049. </p>
  36050. </dd>
  36051. <dt><var>ohsub</var></dt>
  36052. <dt><var>ovsub</var></dt>
  36053. <dd><p>horizontal and vertical output chroma subsample values. For example for the
  36054. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  36055. </p></dd>
  36056. </dl>
  36057. <a name="Commands-134"></a>
  36058. <h4 class="subsection">32.260.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-134" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-134" aria-hidden="true">TOC</a></span></h4>
  36059. <p>This filter supports the following commands:
  36060. </p><dl compact="compact">
  36061. <dt><samp>width, w</samp></dt>
  36062. <dt><samp>height, h</samp></dt>
  36063. <dd><p>Set the output video dimension expression.
  36064. The command accepts the same syntax of the corresponding option.
  36065. </p>
  36066. <p>If the specified expression is not valid, it is kept at its current
  36067. value.
  36068. </p></dd>
  36069. </dl>
  36070. <a name="OpenCL-Video-Filters"></a>
  36071. <h2 class="chapter">33 OpenCL Video Filters<span class="pull-right"><a class="anchor hidden-xs" href="#OpenCL-Video-Filters" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-OpenCL-Video-Filters" aria-hidden="true">TOC</a></span></h2>
  36072. <p>Below is a description of the currently available OpenCL video filters.
  36073. </p>
  36074. <p>To enable compilation of these filters you need to configure FFmpeg with
  36075. <code>--enable-opencl</code>.
  36076. </p>
  36077. <p>Running OpenCL filters requires you to initialize a hardware device and to pass that device to all filters in any filter graph.
  36078. </p><dl compact="compact">
  36079. <dt><samp>-init_hw_device opencl[=<var>name</var>][:<var>device</var>[,<var>key=value</var>...]]</samp></dt>
  36080. <dd><p>Initialise a new hardware device of type <var>opencl</var> called <var>name</var>, using the
  36081. given device parameters.
  36082. </p>
  36083. </dd>
  36084. <dt><samp>-filter_hw_device <var>name</var></samp></dt>
  36085. <dd><p>Pass the hardware device called <var>name</var> to all filters in any filter graph.
  36086. </p>
  36087. </dd>
  36088. </dl>
  36089. <p>For more detailed information see <a href="https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options">https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options</a>
  36090. </p>
  36091. <ul>
  36092. <li> Example of choosing the first device on the second platform and running avgblur_opencl filter with default parameters on it.
  36093. <div class="example">
  36094. <pre class="example">-init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf &quot;hwupload, avgblur_opencl, hwdownload&quot; OUTPUT
  36095. </pre></div>
  36096. </li></ul>
  36097. <p>Since OpenCL filters are not able to access frame data in normal memory, all frame data needs to be uploaded(<a href="#hwupload">hwupload</a>) to hardware surfaces connected to the appropriate device before being used and then downloaded(<a href="#hwdownload">hwdownload</a>) back to normal memory. Note that <a 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 href="#format">format</a> filter immediately before to get the input into the right format and <a href="#hwdownload">hwdownload</a> does not support all formats on the output - it may be necessary to insert an additional <a href="#format">format</a> filter immediately following in the graph to get the output in a supported format.
  36098. </p>
  36099. <a name="avgblur_005fopencl"></a>
  36100. <h3 class="section">33.1 avgblur_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#avgblur_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-avgblur_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36101. <p>Apply average blur filter.
  36102. </p>
  36103. <p>The filter accepts the following options:
  36104. </p>
  36105. <dl compact="compact">
  36106. <dt><samp>sizeX</samp></dt>
  36107. <dd><p>Set horizontal radius size.
  36108. Range is <code>[1, 1024]</code> and default value is <code>1</code>.
  36109. </p>
  36110. </dd>
  36111. <dt><samp>planes</samp></dt>
  36112. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  36113. </p>
  36114. </dd>
  36115. <dt><samp>sizeY</samp></dt>
  36116. <dd><p>Set vertical radius size. Range is <code>[1, 1024]</code> and default value is <code>0</code>. If zero, <code>sizeX</code> value will be used.
  36117. </p></dd>
  36118. </dl>
  36119. <a name="Example"></a>
  36120. <h4 class="subsection">33.1.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example" aria-hidden="true">TOC</a></span></h4>
  36121. <ul>
  36122. <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.
  36123. <div class="example">
  36124. <pre class="example">-i INPUT -vf &quot;hwupload, avgblur_opencl=3, hwdownload&quot; OUTPUT
  36125. </pre></div>
  36126. </li></ul>
  36127. <a name="boxblur_005fopencl"></a>
  36128. <h3 class="section">33.2 boxblur_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#boxblur_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-boxblur_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36129. <p>Apply a boxblur algorithm to the input video.
  36130. </p>
  36131. <p>It accepts the following parameters:
  36132. </p>
  36133. <dl compact="compact">
  36134. <dt><samp>luma_radius, lr</samp></dt>
  36135. <dt><samp>luma_power, lp</samp></dt>
  36136. <dt><samp>chroma_radius, cr</samp></dt>
  36137. <dt><samp>chroma_power, cp</samp></dt>
  36138. <dt><samp>alpha_radius, ar</samp></dt>
  36139. <dt><samp>alpha_power, ap</samp></dt>
  36140. </dl>
  36141. <p>A description of the accepted options follows.
  36142. </p>
  36143. <dl compact="compact">
  36144. <dt><samp>luma_radius, lr</samp></dt>
  36145. <dt><samp>chroma_radius, cr</samp></dt>
  36146. <dt><samp>alpha_radius, ar</samp></dt>
  36147. <dd><p>Set an expression for the box radius in pixels used for blurring the
  36148. corresponding input plane.
  36149. </p>
  36150. <p>The radius value must be a non-negative number, and must not be
  36151. greater than the value of the expression <code>min(w,h)/2</code> for the
  36152. luma and alpha planes, and of <code>min(cw,ch)/2</code> for the chroma
  36153. planes.
  36154. </p>
  36155. <p>Default value for <samp>luma_radius</samp> is &quot;2&quot;. If not specified,
  36156. <samp>chroma_radius</samp> and <samp>alpha_radius</samp> default to the
  36157. corresponding value set for <samp>luma_radius</samp>.
  36158. </p>
  36159. <p>The expressions can contain the following constants:
  36160. </p><dl compact="compact">
  36161. <dt><samp>w</samp></dt>
  36162. <dt><samp>h</samp></dt>
  36163. <dd><p>The input width and height in pixels.
  36164. </p>
  36165. </dd>
  36166. <dt><samp>cw</samp></dt>
  36167. <dt><samp>ch</samp></dt>
  36168. <dd><p>The input chroma image width and height in pixels.
  36169. </p>
  36170. </dd>
  36171. <dt><samp>hsub</samp></dt>
  36172. <dt><samp>vsub</samp></dt>
  36173. <dd><p>The horizontal and vertical chroma subsample values. For example, for the
  36174. pixel format &quot;yuv422p&quot;, <var>hsub</var> is 2 and <var>vsub</var> is 1.
  36175. </p></dd>
  36176. </dl>
  36177. </dd>
  36178. <dt><samp>luma_power, lp</samp></dt>
  36179. <dt><samp>chroma_power, cp</samp></dt>
  36180. <dt><samp>alpha_power, ap</samp></dt>
  36181. <dd><p>Specify how many times the boxblur filter is applied to the
  36182. corresponding plane.
  36183. </p>
  36184. <p>Default value for <samp>luma_power</samp> is 2. If not specified,
  36185. <samp>chroma_power</samp> and <samp>alpha_power</samp> default to the
  36186. corresponding value set for <samp>luma_power</samp>.
  36187. </p>
  36188. <p>A value of 0 will disable the effect.
  36189. </p></dd>
  36190. </dl>
  36191. <a name="Examples-139"></a>
  36192. <h4 class="subsection">33.2.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-139" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-139" aria-hidden="true">TOC</a></span></h4>
  36193. <p>Apply boxblur filter, setting each pixel of the output to the average value of box-radiuses <var>luma_radius</var>, <var>chroma_radius</var>, <var>alpha_radius</var> for each plane respectively. The filter will apply <var>luma_power</var>, <var>chroma_power</var>, <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.
  36194. </p>
  36195. <ul>
  36196. <li> Apply a boxblur filter with the luma, chroma, and alpha radius
  36197. 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.
  36198. <div class="example">
  36199. <pre class="example">-i INPUT -vf &quot;hwupload, boxblur_opencl=luma_radius=2:luma_power=3, hwdownload&quot; OUTPUT
  36200. -i INPUT -vf &quot;hwupload, boxblur_opencl=2:3, hwdownload&quot; OUTPUT
  36201. </pre></div>
  36202. </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.
  36203. <p>For the luma plane, a 2x2 box radius will be run once.
  36204. </p>
  36205. <p>For the chroma plane, a 4x4 box radius will be run 5 times.
  36206. </p>
  36207. <p>For the alpha plane, a 3x3 box radius will be run 7 times.
  36208. </p><div class="example">
  36209. <pre class="example">-i INPUT -vf &quot;hwupload, boxblur_opencl=2:1:4:5:3:7, hwdownload&quot; OUTPUT
  36210. </pre></div>
  36211. </li></ul>
  36212. <a name="colorkey_005fopencl"></a>
  36213. <h3 class="section">33.3 colorkey_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#colorkey_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-colorkey_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36214. <p>RGB colorspace color keying.
  36215. </p>
  36216. <p>The filter accepts the following options:
  36217. </p>
  36218. <dl compact="compact">
  36219. <dt><samp>color</samp></dt>
  36220. <dd><p>The color which will be replaced with transparency.
  36221. </p>
  36222. </dd>
  36223. <dt><samp>similarity</samp></dt>
  36224. <dd><p>Similarity percentage with the key color.
  36225. </p>
  36226. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  36227. </p>
  36228. </dd>
  36229. <dt><samp>blend</samp></dt>
  36230. <dd><p>Blend percentage.
  36231. </p>
  36232. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  36233. </p>
  36234. <p>Higher values result in semi-transparent pixels, with a higher transparency
  36235. the more similar the pixels color is to the key color.
  36236. </p></dd>
  36237. </dl>
  36238. <a name="Examples-140"></a>
  36239. <h4 class="subsection">33.3.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-140" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-140" aria-hidden="true">TOC</a></span></h4>
  36240. <ul>
  36241. <li> Make every semi-green pixel in the input transparent with some slight blending:
  36242. <div class="example">
  36243. <pre class="example">-i INPUT -vf &quot;hwupload, colorkey_opencl=green:0.3:0.1, hwdownload&quot; OUTPUT
  36244. </pre></div>
  36245. </li></ul>
  36246. <a name="convolution_005fopencl"></a>
  36247. <h3 class="section">33.4 convolution_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#convolution_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-convolution_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36248. <p>Apply convolution of 3x3, 5x5, 7x7 matrix.
  36249. </p>
  36250. <p>The filter accepts the following options:
  36251. </p>
  36252. <dl compact="compact">
  36253. <dt><samp>0m</samp></dt>
  36254. <dt><samp>1m</samp></dt>
  36255. <dt><samp>2m</samp></dt>
  36256. <dt><samp>3m</samp></dt>
  36257. <dd><p>Set matrix for each plane.
  36258. Matrix is sequence of 9, 25 or 49 signed numbers.
  36259. Default value for each plane is <code>0 0 0 0 1 0 0 0 0</code>.
  36260. </p>
  36261. </dd>
  36262. <dt><samp>0rdiv</samp></dt>
  36263. <dt><samp>1rdiv</samp></dt>
  36264. <dt><samp>2rdiv</samp></dt>
  36265. <dt><samp>3rdiv</samp></dt>
  36266. <dd><p>Set multiplier for calculated value for each plane.
  36267. If unset or 0, it will be sum of all matrix elements.
  36268. The option value must be a float number greater or equal to <code>0.0</code>. Default value is <code>1.0</code>.
  36269. </p>
  36270. </dd>
  36271. <dt><samp>0bias</samp></dt>
  36272. <dt><samp>1bias</samp></dt>
  36273. <dt><samp>2bias</samp></dt>
  36274. <dt><samp>3bias</samp></dt>
  36275. <dd><p>Set bias for each plane. This value is added to the result of the multiplication.
  36276. Useful for making the overall image brighter or darker.
  36277. The option value must be a float number greater or equal to <code>0.0</code>. Default value is <code>0.0</code>.
  36278. </p>
  36279. </dd>
  36280. </dl>
  36281. <a name="Examples-141"></a>
  36282. <h4 class="subsection">33.4.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-141" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-141" aria-hidden="true">TOC</a></span></h4>
  36283. <ul>
  36284. <li> Apply sharpen:
  36285. <div class="example">
  36286. <pre class="example">-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
  36287. </pre></div>
  36288. </li><li> Apply blur:
  36289. <div class="example">
  36290. <pre class="example">-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
  36291. </pre></div>
  36292. </li><li> Apply edge enhance:
  36293. <div class="example">
  36294. <pre class="example">-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
  36295. </pre></div>
  36296. </li><li> Apply edge detect:
  36297. <div class="example">
  36298. <pre class="example">-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
  36299. </pre></div>
  36300. </li><li> Apply laplacian edge detector which includes diagonals:
  36301. <div class="example">
  36302. <pre class="example">-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
  36303. </pre></div>
  36304. </li><li> Apply emboss:
  36305. <div class="example">
  36306. <pre class="example">-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
  36307. </pre></div>
  36308. </li></ul>
  36309. <a name="erosion_005fopencl"></a>
  36310. <h3 class="section">33.5 erosion_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#erosion_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-erosion_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36311. <p>Apply erosion effect to the video.
  36312. </p>
  36313. <p>This filter replaces the pixel by the local(3x3) minimum.
  36314. </p>
  36315. <p>It accepts the following options:
  36316. </p>
  36317. <dl compact="compact">
  36318. <dt><samp>threshold0</samp></dt>
  36319. <dt><samp>threshold1</samp></dt>
  36320. <dt><samp>threshold2</samp></dt>
  36321. <dt><samp>threshold3</samp></dt>
  36322. <dd><p>Limit the maximum change for each plane. Range is <code>[0, 65535]</code> and default value is <code>65535</code>.
  36323. If <code>0</code>, plane will remain unchanged.
  36324. </p>
  36325. </dd>
  36326. <dt><samp>coordinates</samp></dt>
  36327. <dd><p>Flag which specifies the pixel to refer to.
  36328. Range is <code>[0, 255]</code> and default value is <code>255</code>, i.e. all eight pixels are used.
  36329. </p>
  36330. <p>Flags to local 3x3 coordinates region centered on <code>x</code>:
  36331. </p>
  36332. <p>1 2 3
  36333. </p>
  36334. <p>4 x 5
  36335. </p>
  36336. <p>6 7 8
  36337. </p></dd>
  36338. </dl>
  36339. <a name="Example-1"></a>
  36340. <h4 class="subsection">33.5.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example-1" aria-hidden="true">TOC</a></span></h4>
  36341. <ul>
  36342. <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.
  36343. <div class="example">
  36344. <pre class="example">-i INPUT -vf &quot;hwupload, erosion_opencl=30:40:50:coordinates=231, hwdownload&quot; OUTPUT
  36345. </pre></div>
  36346. </li></ul>
  36347. <a name="deshake_005fopencl"></a>
  36348. <h3 class="section">33.6 deshake_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#deshake_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-deshake_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36349. <p>Feature-point based video stabilization filter.
  36350. </p>
  36351. <p>The filter accepts the following options:
  36352. </p>
  36353. <dl compact="compact">
  36354. <dt><samp>tripod</samp></dt>
  36355. <dd><p>Simulates a tripod by preventing any camera movement whatsoever from the original frame. Defaults to <code>0</code>.
  36356. </p>
  36357. </dd>
  36358. <dt><samp>debug</samp></dt>
  36359. <dd><p>Whether or not additional debug info should be displayed, both in the processed output and in the console.
  36360. </p>
  36361. <p>Note that in order to see console debug output you will also need to pass <code>-v verbose</code> to ffmpeg.
  36362. </p>
  36363. <p>Viewing point matches in the output video is only supported for RGB input.
  36364. </p>
  36365. <p>Defaults to <code>0</code>.
  36366. </p>
  36367. </dd>
  36368. <dt><samp>adaptive_crop</samp></dt>
  36369. <dd><p>Whether or not to do a tiny bit of cropping at the borders to cut down on the amount of mirrored pixels.
  36370. </p>
  36371. <p>Defaults to <code>1</code>.
  36372. </p>
  36373. </dd>
  36374. <dt><samp>refine_features</samp></dt>
  36375. <dd><p>Whether or not feature points should be refined at a sub-pixel level.
  36376. </p>
  36377. <p>This can be turned off for a slight performance gain at the cost of precision.
  36378. </p>
  36379. <p>Defaults to <code>1</code>.
  36380. </p>
  36381. </dd>
  36382. <dt><samp>smooth_strength</samp></dt>
  36383. <dd><p>The strength of the smoothing applied to the camera path from <code>0.0</code> to <code>1.0</code>.
  36384. </p>
  36385. <p><code>1.0</code> is the maximum smoothing strength while values less than that result in less smoothing.
  36386. </p>
  36387. <p><code>0.0</code> causes the filter to adaptively choose a smoothing strength on a per-frame basis.
  36388. </p>
  36389. <p>Defaults to <code>0.0</code>.
  36390. </p>
  36391. </dd>
  36392. <dt><samp>smooth_window_multiplier</samp></dt>
  36393. <dd><p>Controls the size of the smoothing window (the number of frames buffered to determine motion information from).
  36394. </p>
  36395. <p>The size of the smoothing window is determined by multiplying the framerate of the video by this number.
  36396. </p>
  36397. <p>Acceptable values range from <code>0.1</code> to <code>10.0</code>.
  36398. </p>
  36399. <p>Larger values increase the amount of motion data available for determining how to smooth the camera path,
  36400. potentially improving smoothness, but also increase latency and memory usage.
  36401. </p>
  36402. <p>Defaults to <code>2.0</code>.
  36403. </p>
  36404. </dd>
  36405. </dl>
  36406. <a name="Examples-142"></a>
  36407. <h4 class="subsection">33.6.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-142" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-142" aria-hidden="true">TOC</a></span></h4>
  36408. <ul>
  36409. <li> Stabilize a video with a fixed, medium smoothing strength:
  36410. <div class="example">
  36411. <pre class="example">-i INPUT -vf &quot;hwupload, deshake_opencl=smooth_strength=0.5, hwdownload&quot; OUTPUT
  36412. </pre></div>
  36413. </li><li> Stabilize a video with debugging (both in console and in rendered video):
  36414. <div class="example">
  36415. <pre class="example">-i INPUT -filter_complex &quot;[0:v]format=rgba, hwupload, deshake_opencl=debug=1, hwdownload, format=rgba, format=yuv420p&quot; -v verbose OUTPUT
  36416. </pre></div>
  36417. </li></ul>
  36418. <a name="dilation_005fopencl"></a>
  36419. <h3 class="section">33.7 dilation_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#dilation_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dilation_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36420. <p>Apply dilation effect to the video.
  36421. </p>
  36422. <p>This filter replaces the pixel by the local(3x3) maximum.
  36423. </p>
  36424. <p>It accepts the following options:
  36425. </p>
  36426. <dl compact="compact">
  36427. <dt><samp>threshold0</samp></dt>
  36428. <dt><samp>threshold1</samp></dt>
  36429. <dt><samp>threshold2</samp></dt>
  36430. <dt><samp>threshold3</samp></dt>
  36431. <dd><p>Limit the maximum change for each plane. Range is <code>[0, 65535]</code> and default value is <code>65535</code>.
  36432. If <code>0</code>, plane will remain unchanged.
  36433. </p>
  36434. </dd>
  36435. <dt><samp>coordinates</samp></dt>
  36436. <dd><p>Flag which specifies the pixel to refer to.
  36437. Range is <code>[0, 255]</code> and default value is <code>255</code>, i.e. all eight pixels are used.
  36438. </p>
  36439. <p>Flags to local 3x3 coordinates region centered on <code>x</code>:
  36440. </p>
  36441. <p>1 2 3
  36442. </p>
  36443. <p>4 x 5
  36444. </p>
  36445. <p>6 7 8
  36446. </p></dd>
  36447. </dl>
  36448. <a name="Example-2"></a>
  36449. <h4 class="subsection">33.7.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example-2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example-2" aria-hidden="true">TOC</a></span></h4>
  36450. <ul>
  36451. <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.
  36452. <div class="example">
  36453. <pre class="example">-i INPUT -vf &quot;hwupload, dilation_opencl=30:40:50:coordinates=231, hwdownload&quot; OUTPUT
  36454. </pre></div>
  36455. </li></ul>
  36456. <a name="nlmeans_005fopencl"></a>
  36457. <h3 class="section">33.8 nlmeans_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#nlmeans_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-nlmeans_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36458. <p>Non-local Means denoise filter through OpenCL, this filter accepts same options as <a href="#nlmeans">nlmeans</a>.
  36459. </p>
  36460. <a name="overlay_005fopencl"></a>
  36461. <h3 class="section">33.9 overlay_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#overlay_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-overlay_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36462. <p>Overlay one video on top of another.
  36463. </p>
  36464. <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.
  36465. This filter requires same memory layout for all the inputs. So, format conversion may be needed.
  36466. </p>
  36467. <p>The filter accepts the following options:
  36468. </p>
  36469. <dl compact="compact">
  36470. <dt><samp>x</samp></dt>
  36471. <dd><p>Set the x coordinate of the overlaid video on the main video.
  36472. Default value is <code>0</code>.
  36473. </p>
  36474. </dd>
  36475. <dt><samp>y</samp></dt>
  36476. <dd><p>Set the y coordinate of the overlaid video on the main video.
  36477. Default value is <code>0</code>.
  36478. </p>
  36479. </dd>
  36480. </dl>
  36481. <a name="Examples-143"></a>
  36482. <h4 class="subsection">33.9.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-143" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-143" aria-hidden="true">TOC</a></span></h4>
  36483. <ul>
  36484. <li> Overlay an image LOGO at the top-left corner of the INPUT video. Both inputs are yuv420p format.
  36485. <div class="example">
  36486. <pre class="example">-i INPUT -i LOGO -filter_complex &quot;[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_opencl, hwdownload&quot; OUTPUT
  36487. </pre></div>
  36488. </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.
  36489. <div class="example">
  36490. <pre class="example">-i INPUT -i LOGO -filter_complex &quot;[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_opencl, hwdownload&quot; OUTPUT
  36491. </pre></div>
  36492. </li></ul>
  36493. <a name="pad_005fopencl"></a>
  36494. <h3 class="section">33.10 pad_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#pad_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-pad_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36495. <p>Add paddings to the input image, and place the original input at the
  36496. provided <var>x</var>, <var>y</var> coordinates.
  36497. </p>
  36498. <p>It accepts the following options:
  36499. </p>
  36500. <dl compact="compact">
  36501. <dt><samp>width, w</samp></dt>
  36502. <dt><samp>height, h</samp></dt>
  36503. <dd><p>Specify an expression for the size of the output image with the
  36504. paddings added. If the value for <var>width</var> or <var>height</var> is 0, the
  36505. corresponding input size is used for the output.
  36506. </p>
  36507. <p>The <var>width</var> expression can reference the value set by the
  36508. <var>height</var> expression, and vice versa.
  36509. </p>
  36510. <p>The default value of <var>width</var> and <var>height</var> is 0.
  36511. </p>
  36512. </dd>
  36513. <dt><samp>x</samp></dt>
  36514. <dt><samp>y</samp></dt>
  36515. <dd><p>Specify the offsets to place the input image at within the padded area,
  36516. with respect to the top/left border of the output image.
  36517. </p>
  36518. <p>The <var>x</var> expression can reference the value set by the <var>y</var>
  36519. expression, and vice versa.
  36520. </p>
  36521. <p>The default value of <var>x</var> and <var>y</var> is 0.
  36522. </p>
  36523. <p>If <var>x</var> or <var>y</var> evaluate to a negative number, they&rsquo;ll be changed
  36524. so the input image is centered on the padded area.
  36525. </p>
  36526. </dd>
  36527. <dt><samp>color</samp></dt>
  36528. <dd><p>Specify the color of the padded area. For the syntax of this option,
  36529. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils
  36530. manual</a>.
  36531. </p>
  36532. </dd>
  36533. <dt><samp>aspect</samp></dt>
  36534. <dd><p>Pad to an aspect instead to a resolution.
  36535. </p></dd>
  36536. </dl>
  36537. <p>The value for the <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var>
  36538. options are expressions containing the following constants:
  36539. </p>
  36540. <dl compact="compact">
  36541. <dt><samp>in_w</samp></dt>
  36542. <dt><samp>in_h</samp></dt>
  36543. <dd><p>The input video width and height.
  36544. </p>
  36545. </dd>
  36546. <dt><samp>iw</samp></dt>
  36547. <dt><samp>ih</samp></dt>
  36548. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  36549. </p>
  36550. </dd>
  36551. <dt><samp>out_w</samp></dt>
  36552. <dt><samp>out_h</samp></dt>
  36553. <dd><p>The output width and height (the size of the padded area), as
  36554. specified by the <var>width</var> and <var>height</var> expressions.
  36555. </p>
  36556. </dd>
  36557. <dt><samp>ow</samp></dt>
  36558. <dt><samp>oh</samp></dt>
  36559. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>.
  36560. </p>
  36561. </dd>
  36562. <dt><samp>x</samp></dt>
  36563. <dt><samp>y</samp></dt>
  36564. <dd><p>The x and y offsets as specified by the <var>x</var> and <var>y</var>
  36565. expressions, or NAN if not yet specified.
  36566. </p>
  36567. </dd>
  36568. <dt><samp>a</samp></dt>
  36569. <dd><p>same as <var>iw</var> / <var>ih</var>
  36570. </p>
  36571. </dd>
  36572. <dt><samp>sar</samp></dt>
  36573. <dd><p>input sample aspect ratio
  36574. </p>
  36575. </dd>
  36576. <dt><samp>dar</samp></dt>
  36577. <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
  36578. </p></dd>
  36579. </dl>
  36580. <a name="prewitt_005fopencl"></a>
  36581. <h3 class="section">33.11 prewitt_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#prewitt_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-prewitt_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36582. <p>Apply the Prewitt operator (<a href="https://en.wikipedia.org/wiki/Prewitt_operator">https://en.wikipedia.org/wiki/Prewitt_operator</a>) to input video stream.
  36583. </p>
  36584. <p>The filter accepts the following option:
  36585. </p>
  36586. <dl compact="compact">
  36587. <dt><samp>planes</samp></dt>
  36588. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  36589. </p>
  36590. </dd>
  36591. <dt><samp>scale</samp></dt>
  36592. <dd><p>Set value which will be multiplied with filtered result.
  36593. Range is <code>[0.0, 65535]</code> and default value is <code>1.0</code>.
  36594. </p>
  36595. </dd>
  36596. <dt><samp>delta</samp></dt>
  36597. <dd><p>Set value which will be added to filtered result.
  36598. Range is <code>[-65535, 65535]</code> and default value is <code>0.0</code>.
  36599. </p></dd>
  36600. </dl>
  36601. <a name="Example-3"></a>
  36602. <h4 class="subsection">33.11.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example-3" aria-hidden="true">TOC</a></span></h4>
  36603. <ul>
  36604. <li> Apply the Prewitt operator with scale set to 2 and delta set to 10.
  36605. <div class="example">
  36606. <pre class="example">-i INPUT -vf &quot;hwupload, prewitt_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  36607. </pre></div>
  36608. </li></ul>
  36609. <span id="program_005fopencl"></span><a name="program_005fopencl-1"></a>
  36610. <h3 class="section">33.12 program_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#program_005fopencl-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-program_005fopencl-1" aria-hidden="true">TOC</a></span></h3>
  36611. <p>Filter video using an OpenCL program.
  36612. </p>
  36613. <dl compact="compact">
  36614. <dt><samp>source</samp></dt>
  36615. <dd><p>OpenCL program source file.
  36616. </p>
  36617. </dd>
  36618. <dt><samp>kernel</samp></dt>
  36619. <dd><p>Kernel name in program.
  36620. </p>
  36621. </dd>
  36622. <dt><samp>inputs</samp></dt>
  36623. <dd><p>Number of inputs to the filter. Defaults to 1.
  36624. </p>
  36625. </dd>
  36626. <dt><samp>size, s</samp></dt>
  36627. <dd><p>Size of output frames. Defaults to the same as the first input.
  36628. </p>
  36629. </dd>
  36630. </dl>
  36631. <p>The <code>program_opencl</code> filter also supports the <a href="#framesync">framesync</a> options.
  36632. </p>
  36633. <p>The program source file must contain a kernel function with the given name,
  36634. which will be run once for each plane of the output. Each run on a plane
  36635. gets enqueued as a separate 2D global NDRange with one work-item for each
  36636. pixel to be generated. The global ID offset for each work-item is therefore
  36637. the coordinates of a pixel in the destination image.
  36638. </p>
  36639. <p>The kernel function needs to take the following arguments:
  36640. </p><ul>
  36641. <li> Destination image, <var>__write_only image2d_t</var>.
  36642. <p>This image will become the output; the kernel should write all of it.
  36643. </p></li><li> Frame index, <var>unsigned int</var>.
  36644. <p>This is a counter starting from zero and increasing by one for each frame.
  36645. </p></li><li> Source images, <var>__read_only image2d_t</var>.
  36646. <p>These are the most recent images on each input. The kernel may read from
  36647. them to generate the output, but they can&rsquo;t be written to.
  36648. </p></li></ul>
  36649. <p>Example programs:
  36650. </p>
  36651. <ul>
  36652. <li> Copy the input to the output (output must be the same size as the input).
  36653. <pre class="verbatim">__kernel void copy(__write_only image2d_t destination,
  36654. unsigned int index,
  36655. __read_only image2d_t source)
  36656. {
  36657. const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE;
  36658. int2 location = (int2)(get_global_id(0), get_global_id(1));
  36659. float4 value = read_imagef(source, sampler, location);
  36660. write_imagef(destination, location, value);
  36661. }
  36662. </pre>
  36663. </li><li> Apply a simple transformation, rotating the input by an amount increasing
  36664. with the index counter. Pixel values are linearly interpolated by the
  36665. sampler, and the output need not have the same dimensions as the input.
  36666. <pre class="verbatim">__kernel void rotate_image(__write_only image2d_t dst,
  36667. unsigned int index,
  36668. __read_only image2d_t src)
  36669. {
  36670. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  36671. CLK_FILTER_LINEAR);
  36672. float angle = (float)index / 100.0f;
  36673. float2 dst_dim = convert_float2(get_image_dim(dst));
  36674. float2 src_dim = convert_float2(get_image_dim(src));
  36675. float2 dst_cen = dst_dim / 2.0f;
  36676. float2 src_cen = src_dim / 2.0f;
  36677. int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
  36678. float2 dst_pos = convert_float2(dst_loc) - dst_cen;
  36679. float2 src_pos = {
  36680. cos(angle) * dst_pos.x - sin(angle) * dst_pos.y,
  36681. sin(angle) * dst_pos.x + cos(angle) * dst_pos.y
  36682. };
  36683. src_pos = src_pos * src_dim / dst_dim;
  36684. float2 src_loc = src_pos + src_cen;
  36685. if (src_loc.x &lt; 0.0f || src_loc.y &lt; 0.0f ||
  36686. src_loc.x &gt; src_dim.x || src_loc.y &gt; src_dim.y)
  36687. write_imagef(dst, dst_loc, 0.5f);
  36688. else
  36689. write_imagef(dst, dst_loc, read_imagef(src, sampler, src_loc));
  36690. }
  36691. </pre>
  36692. </li><li> Blend two inputs together, with the amount of each input used varying
  36693. with the index counter.
  36694. <pre class="verbatim">__kernel void blend_images(__write_only image2d_t dst,
  36695. unsigned int index,
  36696. __read_only image2d_t src1,
  36697. __read_only image2d_t src2)
  36698. {
  36699. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  36700. CLK_FILTER_LINEAR);
  36701. float blend = (cos((float)index / 50.0f) + 1.0f) / 2.0f;
  36702. int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
  36703. int2 src1_loc = dst_loc * get_image_dim(src1) / get_image_dim(dst);
  36704. int2 src2_loc = dst_loc * get_image_dim(src2) / get_image_dim(dst);
  36705. float4 val1 = read_imagef(src1, sampler, src1_loc);
  36706. float4 val2 = read_imagef(src2, sampler, src2_loc);
  36707. write_imagef(dst, dst_loc, val1 * blend + val2 * (1.0f - blend));
  36708. }
  36709. </pre>
  36710. </li></ul>
  36711. <a name="roberts_005fopencl"></a>
  36712. <h3 class="section">33.13 roberts_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#roberts_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-roberts_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36713. <p>Apply the Roberts cross operator (<a href="https://en.wikipedia.org/wiki/Roberts_cross">https://en.wikipedia.org/wiki/Roberts_cross</a>) to input video stream.
  36714. </p>
  36715. <p>The filter accepts the following option:
  36716. </p>
  36717. <dl compact="compact">
  36718. <dt><samp>planes</samp></dt>
  36719. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  36720. </p>
  36721. </dd>
  36722. <dt><samp>scale</samp></dt>
  36723. <dd><p>Set value which will be multiplied with filtered result.
  36724. Range is <code>[0.0, 65535]</code> and default value is <code>1.0</code>.
  36725. </p>
  36726. </dd>
  36727. <dt><samp>delta</samp></dt>
  36728. <dd><p>Set value which will be added to filtered result.
  36729. Range is <code>[-65535, 65535]</code> and default value is <code>0.0</code>.
  36730. </p></dd>
  36731. </dl>
  36732. <a name="Example-4"></a>
  36733. <h4 class="subsection">33.13.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example-4" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example-4" aria-hidden="true">TOC</a></span></h4>
  36734. <ul>
  36735. <li> Apply the Roberts cross operator with scale set to 2 and delta set to 10
  36736. <div class="example">
  36737. <pre class="example">-i INPUT -vf &quot;hwupload, roberts_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  36738. </pre></div>
  36739. </li></ul>
  36740. <a name="sobel_005fopencl"></a>
  36741. <h3 class="section">33.14 sobel_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#sobel_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sobel_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36742. <p>Apply the Sobel operator (<a href="https://en.wikipedia.org/wiki/Sobel_operator">https://en.wikipedia.org/wiki/Sobel_operator</a>) to input video stream.
  36743. </p>
  36744. <p>The filter accepts the following option:
  36745. </p>
  36746. <dl compact="compact">
  36747. <dt><samp>planes</samp></dt>
  36748. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  36749. </p>
  36750. </dd>
  36751. <dt><samp>scale</samp></dt>
  36752. <dd><p>Set value which will be multiplied with filtered result.
  36753. Range is <code>[0.0, 65535]</code> and default value is <code>1.0</code>.
  36754. </p>
  36755. </dd>
  36756. <dt><samp>delta</samp></dt>
  36757. <dd><p>Set value which will be added to filtered result.
  36758. Range is <code>[-65535, 65535]</code> and default value is <code>0.0</code>.
  36759. </p></dd>
  36760. </dl>
  36761. <a name="Example-5"></a>
  36762. <h4 class="subsection">33.14.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example-5" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example-5" aria-hidden="true">TOC</a></span></h4>
  36763. <ul>
  36764. <li> Apply sobel operator with scale set to 2 and delta set to 10
  36765. <div class="example">
  36766. <pre class="example">-i INPUT -vf &quot;hwupload, sobel_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  36767. </pre></div>
  36768. </li></ul>
  36769. <a name="tonemap_005fopencl"></a>
  36770. <h3 class="section">33.15 tonemap_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#tonemap_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tonemap_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36771. <p>Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
  36772. </p>
  36773. <p>It accepts the following parameters:
  36774. </p>
  36775. <dl compact="compact">
  36776. <dt><samp>tonemap</samp></dt>
  36777. <dd><p>Specify the tone-mapping operator to be used. Same as tonemap option in <a href="#tonemap">tonemap</a>.
  36778. </p>
  36779. </dd>
  36780. <dt><samp>param</samp></dt>
  36781. <dd><p>Tune the tone mapping algorithm. same as param option in <a href="#tonemap">tonemap</a>.
  36782. </p>
  36783. </dd>
  36784. <dt><samp>desat</samp></dt>
  36785. <dd><p>Apply desaturation for highlights that exceed this level of brightness. The
  36786. higher the parameter, the more color information will be preserved. This
  36787. setting helps prevent unnaturally blown-out colors for super-highlights, by
  36788. (smoothly) turning into white instead. This makes images feel more natural,
  36789. at the cost of reducing information about out-of-range colors.
  36790. </p>
  36791. <p>The default value is 0.5, and the algorithm here is a little different from
  36792. the cpu version tonemap currently. A setting of 0.0 disables this option.
  36793. </p>
  36794. </dd>
  36795. <dt><samp>threshold</samp></dt>
  36796. <dd><p>The tonemapping algorithm parameters is fine-tuned per each scene. And a threshold
  36797. is used to detect whether the scene has changed or not. If the distance between
  36798. the current frame average brightness and the current running average exceeds
  36799. a threshold value, we would re-calculate scene average and peak brightness.
  36800. The default value is 0.2.
  36801. </p>
  36802. </dd>
  36803. <dt><samp>format</samp></dt>
  36804. <dd><p>Specify the output pixel format.
  36805. </p>
  36806. <p>Currently supported formats are:
  36807. </p><dl compact="compact">
  36808. <dt><var>p010</var></dt>
  36809. <dt><var>nv12</var></dt>
  36810. </dl>
  36811. </dd>
  36812. <dt><samp>range, r</samp></dt>
  36813. <dd><p>Set the output color range.
  36814. </p>
  36815. <p>Possible values are:
  36816. </p><dl compact="compact">
  36817. <dt><var>tv/mpeg</var></dt>
  36818. <dt><var>pc/jpeg</var></dt>
  36819. </dl>
  36820. <p>Default is same as input.
  36821. </p>
  36822. </dd>
  36823. <dt><samp>primaries, p</samp></dt>
  36824. <dd><p>Set the output color primaries.
  36825. </p>
  36826. <p>Possible values are:
  36827. </p><dl compact="compact">
  36828. <dt><var>bt709</var></dt>
  36829. <dt><var>bt2020</var></dt>
  36830. </dl>
  36831. <p>Default is same as input.
  36832. </p>
  36833. </dd>
  36834. <dt><samp>transfer, t</samp></dt>
  36835. <dd><p>Set the output transfer characteristics.
  36836. </p>
  36837. <p>Possible values are:
  36838. </p><dl compact="compact">
  36839. <dt><var>bt709</var></dt>
  36840. <dt><var>bt2020</var></dt>
  36841. </dl>
  36842. <p>Default is bt709.
  36843. </p>
  36844. </dd>
  36845. <dt><samp>matrix, m</samp></dt>
  36846. <dd><p>Set the output colorspace matrix.
  36847. </p>
  36848. <p>Possible value are:
  36849. </p><dl compact="compact">
  36850. <dt><var>bt709</var></dt>
  36851. <dt><var>bt2020</var></dt>
  36852. </dl>
  36853. <p>Default is same as input.
  36854. </p>
  36855. </dd>
  36856. </dl>
  36857. <a name="Example-6"></a>
  36858. <h4 class="subsection">33.15.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example-6" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example-6" aria-hidden="true">TOC</a></span></h4>
  36859. <ul>
  36860. <li> Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010 format using linear operator.
  36861. <div class="example">
  36862. <pre class="example">-i INPUT -vf &quot;format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010&quot; OUTPUT
  36863. </pre></div>
  36864. </li></ul>
  36865. <a name="unsharp_005fopencl"></a>
  36866. <h3 class="section">33.16 unsharp_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#unsharp_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-unsharp_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36867. <p>Sharpen or blur the input video.
  36868. </p>
  36869. <p>It accepts the following parameters:
  36870. </p>
  36871. <dl compact="compact">
  36872. <dt><samp>luma_msize_x, lx</samp></dt>
  36873. <dd><p>Set the luma matrix horizontal size.
  36874. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  36875. </p>
  36876. </dd>
  36877. <dt><samp>luma_msize_y, ly</samp></dt>
  36878. <dd><p>Set the luma matrix vertical size.
  36879. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  36880. </p>
  36881. </dd>
  36882. <dt><samp>luma_amount, la</samp></dt>
  36883. <dd><p>Set the luma effect strength.
  36884. Range is <code>[-10, 10]</code> and default value is <code>1.0</code>.
  36885. </p>
  36886. <p>Negative values will blur the input video, while positive values will
  36887. sharpen it, a value of zero will disable the effect.
  36888. </p>
  36889. </dd>
  36890. <dt><samp>chroma_msize_x, cx</samp></dt>
  36891. <dd><p>Set the chroma matrix horizontal size.
  36892. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  36893. </p>
  36894. </dd>
  36895. <dt><samp>chroma_msize_y, cy</samp></dt>
  36896. <dd><p>Set the chroma matrix vertical size.
  36897. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  36898. </p>
  36899. </dd>
  36900. <dt><samp>chroma_amount, ca</samp></dt>
  36901. <dd><p>Set the chroma effect strength.
  36902. Range is <code>[-10, 10]</code> and default value is <code>0.0</code>.
  36903. </p>
  36904. <p>Negative values will blur the input video, while positive values will
  36905. sharpen it, a value of zero will disable the effect.
  36906. </p>
  36907. </dd>
  36908. </dl>
  36909. <p>All parameters are optional and default to the equivalent of the
  36910. string &rsquo;5:5:1.0:5:5:0.0&rsquo;.
  36911. </p>
  36912. <a name="Examples-144"></a>
  36913. <h4 class="subsection">33.16.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-144" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-144" aria-hidden="true">TOC</a></span></h4>
  36914. <ul>
  36915. <li> Apply strong luma sharpen effect:
  36916. <div class="example">
  36917. <pre class="example">-i INPUT -vf &quot;hwupload, unsharp_opencl=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5, hwdownload&quot; OUTPUT
  36918. </pre></div>
  36919. </li><li> Apply a strong blur of both luma and chroma parameters:
  36920. <div class="example">
  36921. <pre class="example">-i INPUT -vf &quot;hwupload, unsharp_opencl=7:7:-2:7:7:-2, hwdownload&quot; OUTPUT
  36922. </pre></div>
  36923. </li></ul>
  36924. <a name="xfade_005fopencl"></a>
  36925. <h3 class="section">33.17 xfade_opencl<span class="pull-right"><a class="anchor hidden-xs" href="#xfade_005fopencl" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xfade_005fopencl" aria-hidden="true">TOC</a></span></h3>
  36926. <p>Cross fade two videos with custom transition effect by using OpenCL.
  36927. </p>
  36928. <p>It accepts the following options:
  36929. </p>
  36930. <dl compact="compact">
  36931. <dt><samp>transition</samp></dt>
  36932. <dd><p>Set one of possible transition effects.
  36933. </p>
  36934. <dl compact="compact">
  36935. <dt><samp>custom</samp></dt>
  36936. <dd><p>Select custom transition effect, the actual transition description
  36937. will be picked from source and kernel options.
  36938. </p>
  36939. </dd>
  36940. <dt><samp>fade</samp></dt>
  36941. <dt><samp>wipeleft</samp></dt>
  36942. <dt><samp>wiperight</samp></dt>
  36943. <dt><samp>wipeup</samp></dt>
  36944. <dt><samp>wipedown</samp></dt>
  36945. <dt><samp>slideleft</samp></dt>
  36946. <dt><samp>slideright</samp></dt>
  36947. <dt><samp>slideup</samp></dt>
  36948. <dt><samp>slidedown</samp></dt>
  36949. <dd>
  36950. <p>Default transition is fade.
  36951. </p></dd>
  36952. </dl>
  36953. </dd>
  36954. <dt><samp>source</samp></dt>
  36955. <dd><p>OpenCL program source file for custom transition.
  36956. </p>
  36957. </dd>
  36958. <dt><samp>kernel</samp></dt>
  36959. <dd><p>Set name of kernel to use for custom transition from program source file.
  36960. </p>
  36961. </dd>
  36962. <dt><samp>duration</samp></dt>
  36963. <dd><p>Set duration of video transition.
  36964. </p>
  36965. </dd>
  36966. <dt><samp>offset</samp></dt>
  36967. <dd><p>Set time of start of transition relative to first video.
  36968. </p></dd>
  36969. </dl>
  36970. <p>The program source file must contain a kernel function with the given name,
  36971. which will be run once for each plane of the output. Each run on a plane
  36972. gets enqueued as a separate 2D global NDRange with one work-item for each
  36973. pixel to be generated. The global ID offset for each work-item is therefore
  36974. the coordinates of a pixel in the destination image.
  36975. </p>
  36976. <p>The kernel function needs to take the following arguments:
  36977. </p><ul>
  36978. <li> Destination image, <var>__write_only image2d_t</var>.
  36979. <p>This image will become the output; the kernel should write all of it.
  36980. </p>
  36981. </li><li> First Source image, <var>__read_only image2d_t</var>.
  36982. Second Source image, <var>__read_only image2d_t</var>.
  36983. <p>These are the most recent images on each input. The kernel may read from
  36984. them to generate the output, but they can&rsquo;t be written to.
  36985. </p>
  36986. </li><li> Transition progress, <var>float</var>. This value is always between 0 and 1 inclusive.
  36987. </li></ul>
  36988. <p>Example programs:
  36989. </p>
  36990. <ul>
  36991. <li> Apply dots curtain transition effect:
  36992. <pre class="verbatim">__kernel void blend_images(__write_only image2d_t dst,
  36993. __read_only image2d_t src1,
  36994. __read_only image2d_t src2,
  36995. float progress)
  36996. {
  36997. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  36998. CLK_FILTER_LINEAR);
  36999. int2 p = (int2)(get_global_id(0), get_global_id(1));
  37000. float2 rp = (float2)(get_global_id(0), get_global_id(1));
  37001. float2 dim = (float2)(get_image_dim(src1).x, get_image_dim(src1).y);
  37002. rp = rp / dim;
  37003. float2 dots = (float2)(20.0, 20.0);
  37004. float2 center = (float2)(0,0);
  37005. float2 unused;
  37006. float4 val1 = read_imagef(src1, sampler, p);
  37007. float4 val2 = read_imagef(src2, sampler, p);
  37008. bool next = distance(fract(rp * dots, &amp;unused), (float2)(0.5, 0.5)) &lt; (progress / distance(rp, center));
  37009. write_imagef(dst, p, next ? val1 : val2);
  37010. }
  37011. </pre>
  37012. </li></ul>
  37013. <a name="VAAPI-Video-Filters"></a>
  37014. <h2 class="chapter">34 VAAPI Video Filters<span class="pull-right"><a class="anchor hidden-xs" href="#VAAPI-Video-Filters" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-VAAPI-Video-Filters" aria-hidden="true">TOC</a></span></h2>
  37015. <p>VAAPI Video filters are usually used with VAAPI decoder and VAAPI encoder. Below is a description of VAAPI video filters.
  37016. </p>
  37017. <p>To enable compilation of these filters you need to configure FFmpeg with
  37018. <code>--enable-vaapi</code>.
  37019. </p>
  37020. <p>To use vaapi filters, you need to setup the vaapi device correctly. For more information, please read <a href="https://trac.ffmpeg.org/wiki/Hardware/VAAPI">https://trac.ffmpeg.org/wiki/Hardware/VAAPI</a>
  37021. </p>
  37022. <a name="tonemap_005fvaapi"></a>
  37023. <h3 class="section">34.1 tonemap_vaapi<span class="pull-right"><a class="anchor hidden-xs" href="#tonemap_005fvaapi" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-tonemap_005fvaapi" aria-hidden="true">TOC</a></span></h3>
  37024. <p>Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion with tone-mapping.
  37025. It maps the dynamic range of HDR10 content to the SDR content.
  37026. It currently only accepts HDR10 as input.
  37027. </p>
  37028. <p>It accepts the following parameters:
  37029. </p>
  37030. <dl compact="compact">
  37031. <dt><samp>format</samp></dt>
  37032. <dd><p>Specify the output pixel format.
  37033. </p>
  37034. <p>Currently supported formats are:
  37035. </p><dl compact="compact">
  37036. <dt><var>p010</var></dt>
  37037. <dt><var>nv12</var></dt>
  37038. </dl>
  37039. <p>Default is nv12.
  37040. </p>
  37041. </dd>
  37042. <dt><samp>primaries, p</samp></dt>
  37043. <dd><p>Set the output color primaries.
  37044. </p>
  37045. <p>Default is same as input.
  37046. </p>
  37047. </dd>
  37048. <dt><samp>transfer, t</samp></dt>
  37049. <dd><p>Set the output transfer characteristics.
  37050. </p>
  37051. <p>Default is bt709.
  37052. </p>
  37053. </dd>
  37054. <dt><samp>matrix, m</samp></dt>
  37055. <dd><p>Set the output colorspace matrix.
  37056. </p>
  37057. <p>Default is same as input.
  37058. </p>
  37059. </dd>
  37060. </dl>
  37061. <a name="Example-7"></a>
  37062. <h4 class="subsection">34.1.1 Example<span class="pull-right"><a class="anchor hidden-xs" href="#Example-7" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Example-7" aria-hidden="true">TOC</a></span></h4>
  37063. <ul>
  37064. <li> Convert HDR(HDR10) video to bt2020-transfer-characteristic p010 format
  37065. <div class="example">
  37066. <pre class="example">tonemap_vaapi=format=p010:t=bt2020-10
  37067. </pre></div>
  37068. </li></ul>
  37069. <a name="Video-Sources"></a>
  37070. <h2 class="chapter">35 Video Sources<span class="pull-right"><a class="anchor hidden-xs" href="#Video-Sources" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Video-Sources" aria-hidden="true">TOC</a></span></h2>
  37071. <p>Below is a description of the currently available video sources.
  37072. </p>
  37073. <a name="buffer"></a>
  37074. <h3 class="section">35.1 buffer<span class="pull-right"><a class="anchor hidden-xs" href="#buffer" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-buffer" aria-hidden="true">TOC</a></span></h3>
  37075. <p>Buffer video frames, and make them available to the filter chain.
  37076. </p>
  37077. <p>This source is mainly intended for a programmatic use, in particular
  37078. through the interface defined in <samp>libavfilter/buffersrc.h</samp>.
  37079. </p>
  37080. <p>It accepts the following parameters:
  37081. </p>
  37082. <dl compact="compact">
  37083. <dt><samp>video_size</samp></dt>
  37084. <dd><p>Specify the size (width and height) of the buffered video frames. For the
  37085. syntax of this option, check the
  37086. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37087. </p>
  37088. </dd>
  37089. <dt><samp>width</samp></dt>
  37090. <dd><p>The input video width.
  37091. </p>
  37092. </dd>
  37093. <dt><samp>height</samp></dt>
  37094. <dd><p>The input video height.
  37095. </p>
  37096. </dd>
  37097. <dt><samp>pix_fmt</samp></dt>
  37098. <dd><p>A string representing the pixel format of the buffered video frames.
  37099. It may be a number corresponding to a pixel format, or a pixel format
  37100. name.
  37101. </p>
  37102. </dd>
  37103. <dt><samp>time_base</samp></dt>
  37104. <dd><p>Specify the timebase assumed by the timestamps of the buffered frames.
  37105. </p>
  37106. </dd>
  37107. <dt><samp>frame_rate</samp></dt>
  37108. <dd><p>Specify the frame rate expected for the video stream.
  37109. </p>
  37110. </dd>
  37111. <dt><samp>pixel_aspect, sar</samp></dt>
  37112. <dd><p>The sample (pixel) aspect ratio of the input video.
  37113. </p>
  37114. </dd>
  37115. <dt><samp>sws_param</samp></dt>
  37116. <dd><p>This option is deprecated and ignored. Prepend <code>sws_flags=<var>flags</var>;</code>
  37117. to the filtergraph description to specify swscale flags for automatically
  37118. inserted scalers. See <a href="#Filtergraph-syntax">Filtergraph syntax</a>.
  37119. </p>
  37120. </dd>
  37121. <dt><samp>hw_frames_ctx</samp></dt>
  37122. <dd><p>When using a hardware pixel format, this should be a reference to an
  37123. AVHWFramesContext describing input frames.
  37124. </p></dd>
  37125. </dl>
  37126. <p>For example:
  37127. </p><div class="example">
  37128. <pre class="example">buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
  37129. </pre></div>
  37130. <p>will instruct the source to accept video frames with size 320x240 and
  37131. with format &quot;yuv410p&quot;, assuming 1/24 as the timestamps timebase and
  37132. square pixels (1:1 sample aspect ratio).
  37133. Since the pixel format with name &quot;yuv410p&quot; corresponds to the number 6
  37134. (check the enum AVPixelFormat definition in <samp>libavutil/pixfmt.h</samp>),
  37135. this example corresponds to:
  37136. </p><div class="example">
  37137. <pre class="example">buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
  37138. </pre></div>
  37139. <p>Alternatively, the options can be specified as a flat string, but this
  37140. syntax is deprecated:
  37141. </p>
  37142. <p><var>width</var>:<var>height</var>:<var>pix_fmt</var>:<var>time_base.num</var>:<var>time_base.den</var>:<var>pixel_aspect.num</var>:<var>pixel_aspect.den</var>
  37143. </p>
  37144. <a name="cellauto"></a>
  37145. <h3 class="section">35.2 cellauto<span class="pull-right"><a class="anchor hidden-xs" href="#cellauto" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-cellauto" aria-hidden="true">TOC</a></span></h3>
  37146. <p>Create a pattern generated by an elementary cellular automaton.
  37147. </p>
  37148. <p>The initial state of the cellular automaton can be defined through the
  37149. <samp>filename</samp> and <samp>pattern</samp> options. If such options are
  37150. not specified an initial state is created randomly.
  37151. </p>
  37152. <p>At each new frame a new row in the video is filled with the result of
  37153. the cellular automaton next generation. The behavior when the whole
  37154. frame is filled is defined by the <samp>scroll</samp> option.
  37155. </p>
  37156. <p>This source accepts the following options:
  37157. </p>
  37158. <dl compact="compact">
  37159. <dt><samp>filename, f</samp></dt>
  37160. <dd><p>Read the initial cellular automaton state, i.e. the starting row, from
  37161. the specified file.
  37162. In the file, each non-whitespace character is considered an alive
  37163. cell, a newline will terminate the row, and further characters in the
  37164. file will be ignored.
  37165. </p>
  37166. </dd>
  37167. <dt><samp>pattern, p</samp></dt>
  37168. <dd><p>Read the initial cellular automaton state, i.e. the starting row, from
  37169. the specified string.
  37170. </p>
  37171. <p>Each non-whitespace character in the string is considered an alive
  37172. cell, a newline will terminate the row, and further characters in the
  37173. string will be ignored.
  37174. </p>
  37175. </dd>
  37176. <dt><samp>rate, r</samp></dt>
  37177. <dd><p>Set the video rate, that is the number of frames generated per second.
  37178. Default is 25.
  37179. </p>
  37180. </dd>
  37181. <dt><samp>random_fill_ratio, ratio</samp></dt>
  37182. <dd><p>Set the random fill ratio for the initial cellular automaton row. It
  37183. is a floating point number value ranging from 0 to 1, defaults to
  37184. 1/PHI.
  37185. </p>
  37186. <p>This option is ignored when a file or a pattern is specified.
  37187. </p>
  37188. </dd>
  37189. <dt><samp>random_seed, seed</samp></dt>
  37190. <dd><p>Set the seed for filling randomly the initial row, must be an integer
  37191. included between 0 and UINT32_MAX. If not specified, or if explicitly
  37192. set to -1, the filter will try to use a good random seed on a best
  37193. effort basis.
  37194. </p>
  37195. </dd>
  37196. <dt><samp>rule</samp></dt>
  37197. <dd><p>Set the cellular automaton rule, it is a number ranging from 0 to 255.
  37198. Default value is 110.
  37199. </p>
  37200. </dd>
  37201. <dt><samp>size, s</samp></dt>
  37202. <dd><p>Set the size of the output video. For the syntax of this option, check the
  37203. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37204. </p>
  37205. <p>If <samp>filename</samp> or <samp>pattern</samp> is specified, the size is set
  37206. by default to the width of the specified initial state row, and the
  37207. height is set to <var>width</var> * PHI.
  37208. </p>
  37209. <p>If <samp>size</samp> is set, it must contain the width of the specified
  37210. pattern string, and the specified pattern will be centered in the
  37211. larger row.
  37212. </p>
  37213. <p>If a filename or a pattern string is not specified, the size value
  37214. defaults to &quot;320x518&quot; (used for a randomly generated initial state).
  37215. </p>
  37216. </dd>
  37217. <dt><samp>scroll</samp></dt>
  37218. <dd><p>If set to 1, scroll the output upward when all the rows in the output
  37219. have been already filled. If set to 0, the new generated row will be
  37220. written over the top row just after the bottom row is filled.
  37221. Defaults to 1.
  37222. </p>
  37223. </dd>
  37224. <dt><samp>start_full, full</samp></dt>
  37225. <dd><p>If set to 1, completely fill the output with generated rows before
  37226. outputting the first frame.
  37227. This is the default behavior, for disabling set the value to 0.
  37228. </p>
  37229. </dd>
  37230. <dt><samp>stitch</samp></dt>
  37231. <dd><p>If set to 1, stitch the left and right row edges together.
  37232. This is the default behavior, for disabling set the value to 0.
  37233. </p></dd>
  37234. </dl>
  37235. <a name="Examples-145"></a>
  37236. <h4 class="subsection">35.2.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-145" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-145" aria-hidden="true">TOC</a></span></h4>
  37237. <ul>
  37238. <li> Read the initial state from <samp>pattern</samp>, and specify an output of
  37239. size 200x400.
  37240. <div class="example">
  37241. <pre class="example">cellauto=f=pattern:s=200x400
  37242. </pre></div>
  37243. </li><li> Generate a random initial row with a width of 200 cells, with a fill
  37244. ratio of 2/3:
  37245. <div class="example">
  37246. <pre class="example">cellauto=ratio=2/3:s=200x200
  37247. </pre></div>
  37248. </li><li> Create a pattern generated by rule 18 starting by a single alive cell
  37249. centered on an initial row with width 100:
  37250. <div class="example">
  37251. <pre class="example">cellauto=p=@:s=100x400:full=0:rule=18
  37252. </pre></div>
  37253. </li><li> Specify a more elaborated initial pattern:
  37254. <div class="example">
  37255. <pre class="example">cellauto=p='@@ @ @@':s=100x400:full=0:rule=18
  37256. </pre></div>
  37257. </li></ul>
  37258. <span id="coreimagesrc"></span><a name="coreimagesrc-1"></a>
  37259. <h3 class="section">35.3 coreimagesrc<span class="pull-right"><a class="anchor hidden-xs" href="#coreimagesrc-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-coreimagesrc-1" aria-hidden="true">TOC</a></span></h3>
  37260. <p>Video source generated on GPU using Apple&rsquo;s CoreImage API on OSX.
  37261. </p>
  37262. <p>This video source is a specialized version of the <a href="#coreimage">coreimage</a> video filter.
  37263. Use a core image generator at the beginning of the applied filterchain to
  37264. generate the content.
  37265. </p>
  37266. <p>The coreimagesrc video source accepts the following options:
  37267. </p><dl compact="compact">
  37268. <dt><samp>list_generators</samp></dt>
  37269. <dd><p>List all available generators along with all their respective options as well as
  37270. possible minimum and maximum values along with the default values.
  37271. </p><div class="example">
  37272. <pre class="example">list_generators=true
  37273. </pre></div>
  37274. </dd>
  37275. <dt><samp>size, s</samp></dt>
  37276. <dd><p>Specify the size of the sourced video. For the syntax of this option, check the
  37277. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37278. The default value is <code>320x240</code>.
  37279. </p>
  37280. </dd>
  37281. <dt><samp>rate, r</samp></dt>
  37282. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  37283. generated per second. It has to be a string in the format
  37284. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a floating point
  37285. number or a valid video frame rate abbreviation. The default value is
  37286. &quot;25&quot;.
  37287. </p>
  37288. </dd>
  37289. <dt><samp>sar</samp></dt>
  37290. <dd><p>Set the sample aspect ratio of the sourced video.
  37291. </p>
  37292. </dd>
  37293. <dt><samp>duration, d</samp></dt>
  37294. <dd><p>Set the duration of the sourced video. See
  37295. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  37296. for the accepted syntax.
  37297. </p>
  37298. <p>If not specified, or the expressed duration is negative, the video is
  37299. supposed to be generated forever.
  37300. </p></dd>
  37301. </dl>
  37302. <p>Additionally, all options of the <a href="#coreimage">coreimage</a> video filter are accepted.
  37303. A complete filterchain can be used for further processing of the
  37304. generated input without CPU-HOST transfer. See <a href="#coreimage">coreimage</a> documentation
  37305. and examples for details.
  37306. </p>
  37307. <a name="Examples-146"></a>
  37308. <h4 class="subsection">35.3.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-146" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-146" aria-hidden="true">TOC</a></span></h4>
  37309. <ul>
  37310. <li> Use CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
  37311. given as complete and escaped command-line for Apple&rsquo;s standard bash shell:
  37312. <div class="example">
  37313. <pre class="example">ffmpeg -f lavfi -i coreimagesrc=s=100x100:filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
  37314. </pre></div>
  37315. <p>This example is equivalent to the QRCode example of <a href="#coreimage">coreimage</a> without the
  37316. need for a nullsrc video source.
  37317. </p></li></ul>
  37318. <a name="gradients"></a>
  37319. <h3 class="section">35.4 gradients<span class="pull-right"><a class="anchor hidden-xs" href="#gradients" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-gradients" aria-hidden="true">TOC</a></span></h3>
  37320. <p>Generate several gradients.
  37321. </p>
  37322. <dl compact="compact">
  37323. <dt><samp>size, s</samp></dt>
  37324. <dd><p>Set frame size. For the syntax of this option, check the <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video
  37325. size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  37326. </p>
  37327. </dd>
  37328. <dt><samp>rate, r</samp></dt>
  37329. <dd><p>Set frame rate, expressed as number of frames per second. Default
  37330. value is &quot;25&quot;.
  37331. </p>
  37332. </dd>
  37333. <dt><samp>c0, c1, c2, c3, c4, c5, c6, c7</samp></dt>
  37334. <dd><p>Set 8 colors. Default values for colors is to pick random one.
  37335. </p>
  37336. </dd>
  37337. <dt><samp>x0, y0, y0, y1</samp></dt>
  37338. <dd><p>Set gradient line source and destination points. If negative or out of range, random ones
  37339. are picked.
  37340. </p>
  37341. </dd>
  37342. <dt><samp>nb_colors, n</samp></dt>
  37343. <dd><p>Set number of colors to use at once. Allowed range is from 2 to 8. Default value is 2.
  37344. </p>
  37345. </dd>
  37346. <dt><samp>seed</samp></dt>
  37347. <dd><p>Set seed for picking gradient line points.
  37348. </p>
  37349. </dd>
  37350. <dt><samp>duration, d</samp></dt>
  37351. <dd><p>Set the duration of the sourced video. See
  37352. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  37353. for the accepted syntax.
  37354. </p>
  37355. <p>If not specified, or the expressed duration is negative, the video is
  37356. supposed to be generated forever.
  37357. </p>
  37358. </dd>
  37359. <dt><samp>speed</samp></dt>
  37360. <dd><p>Set speed of gradients rotation.
  37361. </p></dd>
  37362. </dl>
  37363. <a name="mandelbrot"></a>
  37364. <h3 class="section">35.5 mandelbrot<span class="pull-right"><a class="anchor hidden-xs" href="#mandelbrot" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mandelbrot" aria-hidden="true">TOC</a></span></h3>
  37365. <p>Generate a Mandelbrot set fractal, and progressively zoom towards the
  37366. point specified with <var>start_x</var> and <var>start_y</var>.
  37367. </p>
  37368. <p>This source accepts the following options:
  37369. </p>
  37370. <dl compact="compact">
  37371. <dt><samp>end_pts</samp></dt>
  37372. <dd><p>Set the terminal pts value. Default value is 400.
  37373. </p>
  37374. </dd>
  37375. <dt><samp>end_scale</samp></dt>
  37376. <dd><p>Set the terminal scale value.
  37377. Must be a floating point value. Default value is 0.3.
  37378. </p>
  37379. </dd>
  37380. <dt><samp>inner</samp></dt>
  37381. <dd><p>Set the inner coloring mode, that is the algorithm used to draw the
  37382. Mandelbrot fractal internal region.
  37383. </p>
  37384. <p>It shall assume one of the following values:
  37385. </p><dl compact="compact">
  37386. <dt><samp>black</samp></dt>
  37387. <dd><p>Set black mode.
  37388. </p></dd>
  37389. <dt><samp>convergence</samp></dt>
  37390. <dd><p>Show time until convergence.
  37391. </p></dd>
  37392. <dt><samp>mincol</samp></dt>
  37393. <dd><p>Set color based on point closest to the origin of the iterations.
  37394. </p></dd>
  37395. <dt><samp>period</samp></dt>
  37396. <dd><p>Set period mode.
  37397. </p></dd>
  37398. </dl>
  37399. <p>Default value is <var>mincol</var>.
  37400. </p>
  37401. </dd>
  37402. <dt><samp>bailout</samp></dt>
  37403. <dd><p>Set the bailout value. Default value is 10.0.
  37404. </p>
  37405. </dd>
  37406. <dt><samp>maxiter</samp></dt>
  37407. <dd><p>Set the maximum of iterations performed by the rendering
  37408. algorithm. Default value is 7189.
  37409. </p>
  37410. </dd>
  37411. <dt><samp>outer</samp></dt>
  37412. <dd><p>Set outer coloring mode.
  37413. It shall assume one of following values:
  37414. </p><dl compact="compact">
  37415. <dt><samp>iteration_count</samp></dt>
  37416. <dd><p>Set iteration count mode.
  37417. </p></dd>
  37418. <dt><samp>normalized_iteration_count</samp></dt>
  37419. <dd><p>set normalized iteration count mode.
  37420. </p></dd>
  37421. </dl>
  37422. <p>Default value is <var>normalized_iteration_count</var>.
  37423. </p>
  37424. </dd>
  37425. <dt><samp>rate, r</samp></dt>
  37426. <dd><p>Set frame rate, expressed as number of frames per second. Default
  37427. value is &quot;25&quot;.
  37428. </p>
  37429. </dd>
  37430. <dt><samp>size, s</samp></dt>
  37431. <dd><p>Set frame size. For the syntax of this option, check the <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video
  37432. size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  37433. </p>
  37434. </dd>
  37435. <dt><samp>start_scale</samp></dt>
  37436. <dd><p>Set the initial scale value. Default value is 3.0.
  37437. </p>
  37438. </dd>
  37439. <dt><samp>start_x</samp></dt>
  37440. <dd><p>Set the initial x position. Must be a floating point value between
  37441. -100 and 100. Default value is -0.743643887037158704752191506114774.
  37442. </p>
  37443. </dd>
  37444. <dt><samp>start_y</samp></dt>
  37445. <dd><p>Set the initial y position. Must be a floating point value between
  37446. -100 and 100. Default value is -0.131825904205311970493132056385139.
  37447. </p></dd>
  37448. </dl>
  37449. <a name="mptestsrc"></a>
  37450. <h3 class="section">35.6 mptestsrc<span class="pull-right"><a class="anchor hidden-xs" href="#mptestsrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-mptestsrc" aria-hidden="true">TOC</a></span></h3>
  37451. <p>Generate various test patterns, as generated by the MPlayer test filter.
  37452. </p>
  37453. <p>The size of the generated video is fixed, and is 256x256.
  37454. This source is useful in particular for testing encoding features.
  37455. </p>
  37456. <p>This source accepts the following options:
  37457. </p>
  37458. <dl compact="compact">
  37459. <dt><samp>rate, r</samp></dt>
  37460. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  37461. generated per second. It has to be a string in the format
  37462. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a floating point
  37463. number or a valid video frame rate abbreviation. The default value is
  37464. &quot;25&quot;.
  37465. </p>
  37466. </dd>
  37467. <dt><samp>duration, d</samp></dt>
  37468. <dd><p>Set the duration of the sourced video. See
  37469. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  37470. for the accepted syntax.
  37471. </p>
  37472. <p>If not specified, or the expressed duration is negative, the video is
  37473. supposed to be generated forever.
  37474. </p>
  37475. </dd>
  37476. <dt><samp>test, t</samp></dt>
  37477. <dd>
  37478. <p>Set the number or the name of the test to perform. Supported tests are:
  37479. </p><dl compact="compact">
  37480. <dt><samp>dc_luma</samp></dt>
  37481. <dt><samp>dc_chroma</samp></dt>
  37482. <dt><samp>freq_luma</samp></dt>
  37483. <dt><samp>freq_chroma</samp></dt>
  37484. <dt><samp>amp_luma</samp></dt>
  37485. <dt><samp>amp_chroma</samp></dt>
  37486. <dt><samp>cbp</samp></dt>
  37487. <dt><samp>mv</samp></dt>
  37488. <dt><samp>ring1</samp></dt>
  37489. <dt><samp>ring2</samp></dt>
  37490. <dt><samp>all</samp></dt>
  37491. <dt><samp>max_frames, m</samp></dt>
  37492. <dd><p>Set the maximum number of frames generated for each test, default value is 30.
  37493. </p>
  37494. </dd>
  37495. </dl>
  37496. <p>Default value is &quot;all&quot;, which will cycle through the list of all tests.
  37497. </p></dd>
  37498. </dl>
  37499. <p>Some examples:
  37500. </p><div class="example">
  37501. <pre class="example">mptestsrc=t=dc_luma
  37502. </pre></div>
  37503. <p>will generate a &quot;dc_luma&quot; test pattern.
  37504. </p>
  37505. <a name="frei0r_005fsrc"></a>
  37506. <h3 class="section">35.7 frei0r_src<span class="pull-right"><a class="anchor hidden-xs" href="#frei0r_005fsrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-frei0r_005fsrc" aria-hidden="true">TOC</a></span></h3>
  37507. <p>Provide a frei0r source.
  37508. </p>
  37509. <p>To enable compilation of this filter you need to install the frei0r
  37510. header and configure FFmpeg with <code>--enable-frei0r</code>.
  37511. </p>
  37512. <p>This source accepts the following parameters:
  37513. </p>
  37514. <dl compact="compact">
  37515. <dt><samp>size</samp></dt>
  37516. <dd><p>The size of the video to generate. For the syntax of this option, check the
  37517. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37518. </p>
  37519. </dd>
  37520. <dt><samp>framerate</samp></dt>
  37521. <dd><p>The framerate of the generated video. It may be a string of the form
  37522. <var>num</var>/<var>den</var> or a frame rate abbreviation.
  37523. </p>
  37524. </dd>
  37525. <dt><samp>filter_name</samp></dt>
  37526. <dd><p>The name to the frei0r source to load. For more information regarding frei0r and
  37527. how to set the parameters, read the <a href="#frei0r">frei0r</a> section in the video filters
  37528. documentation.
  37529. </p>
  37530. </dd>
  37531. <dt><samp>filter_params</samp></dt>
  37532. <dd><p>A &rsquo;|&rsquo;-separated list of parameters to pass to the frei0r source.
  37533. </p>
  37534. </dd>
  37535. </dl>
  37536. <p>For example, to generate a frei0r partik0l source with size 200x200
  37537. and frame rate 10 which is overlaid on the overlay filter main input:
  37538. </p><div class="example">
  37539. <pre class="example">frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
  37540. </pre></div>
  37541. <a name="life"></a>
  37542. <h3 class="section">35.8 life<span class="pull-right"><a class="anchor hidden-xs" href="#life" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-life" aria-hidden="true">TOC</a></span></h3>
  37543. <p>Generate a life pattern.
  37544. </p>
  37545. <p>This source is based on a generalization of John Conway&rsquo;s life game.
  37546. </p>
  37547. <p>The sourced input represents a life grid, each pixel represents a cell
  37548. which can be in one of two possible states, alive or dead. Every cell
  37549. interacts with its eight neighbours, which are the cells that are
  37550. horizontally, vertically, or diagonally adjacent.
  37551. </p>
  37552. <p>At each interaction the grid evolves according to the adopted rule,
  37553. which specifies the number of neighbor alive cells which will make a
  37554. cell stay alive or born. The <samp>rule</samp> option allows one to specify
  37555. the rule to adopt.
  37556. </p>
  37557. <p>This source accepts the following options:
  37558. </p>
  37559. <dl compact="compact">
  37560. <dt><samp>filename, f</samp></dt>
  37561. <dd><p>Set the file from which to read the initial grid state. In the file,
  37562. each non-whitespace character is considered an alive cell, and newline
  37563. is used to delimit the end of each row.
  37564. </p>
  37565. <p>If this option is not specified, the initial grid is generated
  37566. randomly.
  37567. </p>
  37568. </dd>
  37569. <dt><samp>rate, r</samp></dt>
  37570. <dd><p>Set the video rate, that is the number of frames generated per second.
  37571. Default is 25.
  37572. </p>
  37573. </dd>
  37574. <dt><samp>random_fill_ratio, ratio</samp></dt>
  37575. <dd><p>Set the random fill ratio for the initial random grid. It is a
  37576. floating point number value ranging from 0 to 1, defaults to 1/PHI.
  37577. It is ignored when a file is specified.
  37578. </p>
  37579. </dd>
  37580. <dt><samp>random_seed, seed</samp></dt>
  37581. <dd><p>Set the seed for filling the initial random grid, must be an integer
  37582. included between 0 and UINT32_MAX. If not specified, or if explicitly
  37583. set to -1, the filter will try to use a good random seed on a best
  37584. effort basis.
  37585. </p>
  37586. </dd>
  37587. <dt><samp>rule</samp></dt>
  37588. <dd><p>Set the life rule.
  37589. </p>
  37590. <p>A rule can be specified with a code of the kind &quot;S<var>NS</var>/B<var>NB</var>&quot;,
  37591. where <var>NS</var> and <var>NB</var> are sequences of numbers in the range 0-8,
  37592. <var>NS</var> specifies the number of alive neighbor cells which make a
  37593. live cell stay alive, and <var>NB</var> the number of alive neighbor cells
  37594. which make a dead cell to become alive (i.e. to &quot;born&quot;).
  37595. &quot;s&quot; and &quot;b&quot; can be used in place of &quot;S&quot; and &quot;B&quot;, respectively.
  37596. </p>
  37597. <p>Alternatively a rule can be specified by an 18-bits integer. The 9
  37598. high order bits are used to encode the next cell state if it is alive
  37599. for each number of neighbor alive cells, the low order bits specify
  37600. the rule for &quot;borning&quot; new cells. Higher order bits encode for an
  37601. higher number of neighbor cells.
  37602. For example the number 6153 = <code>(12&lt;&lt;9)+9</code> specifies a stay alive
  37603. rule of 12 and a born rule of 9, which corresponds to &quot;S23/B03&quot;.
  37604. </p>
  37605. <p>Default value is &quot;S23/B3&quot;, which is the original Conway&rsquo;s game of life
  37606. rule, and will keep a cell alive if it has 2 or 3 neighbor alive
  37607. cells, and will born a new cell if there are three alive cells around
  37608. a dead cell.
  37609. </p>
  37610. </dd>
  37611. <dt><samp>size, s</samp></dt>
  37612. <dd><p>Set the size of the output video. For the syntax of this option, check the
  37613. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37614. </p>
  37615. <p>If <samp>filename</samp> is specified, the size is set by default to the
  37616. same size of the input file. If <samp>size</samp> is set, it must contain
  37617. the size specified in the input file, and the initial grid defined in
  37618. that file is centered in the larger resulting area.
  37619. </p>
  37620. <p>If a filename is not specified, the size value defaults to &quot;320x240&quot;
  37621. (used for a randomly generated initial grid).
  37622. </p>
  37623. </dd>
  37624. <dt><samp>stitch</samp></dt>
  37625. <dd><p>If set to 1, stitch the left and right grid edges together, and the
  37626. top and bottom edges also. Defaults to 1.
  37627. </p>
  37628. </dd>
  37629. <dt><samp>mold</samp></dt>
  37630. <dd><p>Set cell mold speed. If set, a dead cell will go from <samp>death_color</samp> to
  37631. <samp>mold_color</samp> with a step of <samp>mold</samp>. <samp>mold</samp> can have a
  37632. value from 0 to 255.
  37633. </p>
  37634. </dd>
  37635. <dt><samp>life_color</samp></dt>
  37636. <dd><p>Set the color of living (or new born) cells.
  37637. </p>
  37638. </dd>
  37639. <dt><samp>death_color</samp></dt>
  37640. <dd><p>Set the color of dead cells. If <samp>mold</samp> is set, this is the first color
  37641. used to represent a dead cell.
  37642. </p>
  37643. </dd>
  37644. <dt><samp>mold_color</samp></dt>
  37645. <dd><p>Set mold color, for definitely dead and moldy cells.
  37646. </p>
  37647. <p>For the syntax of these 3 color options, check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the
  37648. ffmpeg-utils manual</a>.
  37649. </p></dd>
  37650. </dl>
  37651. <a name="Examples-147"></a>
  37652. <h4 class="subsection">35.8.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-147" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-147" aria-hidden="true">TOC</a></span></h4>
  37653. <ul>
  37654. <li> Read a grid from <samp>pattern</samp>, and center it on a grid of size
  37655. 300x300 pixels:
  37656. <div class="example">
  37657. <pre class="example">life=f=pattern:s=300x300
  37658. </pre></div>
  37659. </li><li> Generate a random grid of size 200x200, with a fill ratio of 2/3:
  37660. <div class="example">
  37661. <pre class="example">life=ratio=2/3:s=200x200
  37662. </pre></div>
  37663. </li><li> Specify a custom rule for evolving a randomly generated grid:
  37664. <div class="example">
  37665. <pre class="example">life=rule=S14/B34
  37666. </pre></div>
  37667. </li><li> Full example with slow death effect (mold) using <code>ffplay</code>:
  37668. <div class="example">
  37669. <pre class="example">ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16
  37670. </pre></div>
  37671. </li></ul>
  37672. <span id="allrgb"></span><span id="allyuv"></span><span id="color"></span><span id="haldclutsrc"></span><span id="nullsrc"></span><span id="pal75bars"></span><span id="pal100bars"></span><span id="rgbtestsrc"></span><span id="smptebars"></span><span id="smptehdbars"></span><span id="testsrc"></span><span id="testsrc2"></span><span id="yuvtestsrc"></span><a name="allrgb_002c-allyuv_002c-color_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc"></a>
  37673. <h3 class="section">35.9 allrgb, allyuv, color, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc<span class="pull-right"><a class="anchor hidden-xs" href="#allrgb_002c-allyuv_002c-color_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-allrgb_002c-allyuv_002c-color_002c-haldclutsrc_002c-nullsrc_002c-pal75bars_002c-pal100bars_002c-rgbtestsrc_002c-smptebars_002c-smptehdbars_002c-testsrc_002c-testsrc2_002c-yuvtestsrc" aria-hidden="true">TOC</a></span></h3>
  37674. <p>The <code>allrgb</code> source returns frames of size 4096x4096 of all rgb colors.
  37675. </p>
  37676. <p>The <code>allyuv</code> source returns frames of size 4096x4096 of all yuv colors.
  37677. </p>
  37678. <p>The <code>color</code> source provides an uniformly colored input.
  37679. </p>
  37680. <p>The <code>haldclutsrc</code> source provides an identity Hald CLUT. See also
  37681. <a href="#haldclut">haldclut</a> filter.
  37682. </p>
  37683. <p>The <code>nullsrc</code> source returns unprocessed video frames. It is
  37684. mainly useful to be employed in analysis / debugging tools, or as the
  37685. source for filters which ignore the input data.
  37686. </p>
  37687. <p>The <code>pal75bars</code> source generates a color bars pattern, based on
  37688. EBU PAL recommendations with 75% color levels.
  37689. </p>
  37690. <p>The <code>pal100bars</code> source generates a color bars pattern, based on
  37691. EBU PAL recommendations with 100% color levels.
  37692. </p>
  37693. <p>The <code>rgbtestsrc</code> source generates an RGB test pattern useful for
  37694. detecting RGB vs BGR issues. You should see a red, green and blue
  37695. stripe from top to bottom.
  37696. </p>
  37697. <p>The <code>smptebars</code> source generates a color bars pattern, based on
  37698. the SMPTE Engineering Guideline EG 1-1990.
  37699. </p>
  37700. <p>The <code>smptehdbars</code> source generates a color bars pattern, based on
  37701. the SMPTE RP 219-2002.
  37702. </p>
  37703. <p>The <code>testsrc</code> source generates a test video pattern, showing a
  37704. color pattern, a scrolling gradient and a timestamp. This is mainly
  37705. intended for testing purposes.
  37706. </p>
  37707. <p>The <code>testsrc2</code> source is similar to testsrc, but supports more
  37708. pixel formats instead of just <code>rgb24</code>. This allows using it as an
  37709. input for other tests without requiring a format conversion.
  37710. </p>
  37711. <p>The <code>yuvtestsrc</code> source generates an YUV test pattern. You should
  37712. see a y, cb and cr stripe from top to bottom.
  37713. </p>
  37714. <p>The sources accept the following parameters:
  37715. </p>
  37716. <dl compact="compact">
  37717. <dt><samp>level</samp></dt>
  37718. <dd><p>Specify the level of the Hald CLUT, only available in the <code>haldclutsrc</code>
  37719. source. A level of <code>N</code> generates a picture of <code>N*N*N</code> by <code>N*N*N</code>
  37720. pixels to be used as identity matrix for 3D lookup tables. Each component is
  37721. coded on a <code>1/(N*N)</code> scale.
  37722. </p>
  37723. </dd>
  37724. <dt><samp>color, c</samp></dt>
  37725. <dd><p>Specify the color of the source, only available in the <code>color</code>
  37726. source. For the syntax of this option, check the
  37727. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  37728. </p>
  37729. </dd>
  37730. <dt><samp>size, s</samp></dt>
  37731. <dd><p>Specify the size of the sourced video. For the syntax of this option, check the
  37732. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37733. The default value is <code>320x240</code>.
  37734. </p>
  37735. <p>This option is not available with the <code>allrgb</code>, <code>allyuv</code>, and
  37736. <code>haldclutsrc</code> filters.
  37737. </p>
  37738. </dd>
  37739. <dt><samp>rate, r</samp></dt>
  37740. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  37741. generated per second. It has to be a string in the format
  37742. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a floating point
  37743. number or a valid video frame rate abbreviation. The default value is
  37744. &quot;25&quot;.
  37745. </p>
  37746. </dd>
  37747. <dt><samp>duration, d</samp></dt>
  37748. <dd><p>Set the duration of the sourced video. See
  37749. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  37750. for the accepted syntax.
  37751. </p>
  37752. <p>If not specified, or the expressed duration is negative, the video is
  37753. supposed to be generated forever.
  37754. </p>
  37755. <p>Since the frame rate is used as time base, all frames including the last one
  37756. will have their full duration. If the specified duration is not a multiple
  37757. of the frame duration, it will be rounded up.
  37758. </p>
  37759. </dd>
  37760. <dt><samp>sar</samp></dt>
  37761. <dd><p>Set the sample aspect ratio of the sourced video.
  37762. </p>
  37763. </dd>
  37764. <dt><samp>alpha</samp></dt>
  37765. <dd><p>Specify the alpha (opacity) of the background, only available in the
  37766. <code>testsrc2</code> source. The value must be between 0 (fully transparent) and
  37767. 255 (fully opaque, the default).
  37768. </p>
  37769. </dd>
  37770. <dt><samp>decimals, n</samp></dt>
  37771. <dd><p>Set the number of decimals to show in the timestamp, only available in the
  37772. <code>testsrc</code> source.
  37773. </p>
  37774. <p>The displayed timestamp value will correspond to the original
  37775. timestamp value multiplied by the power of 10 of the specified
  37776. value. Default value is 0.
  37777. </p></dd>
  37778. </dl>
  37779. <a name="Examples-148"></a>
  37780. <h4 class="subsection">35.9.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-148" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-148" aria-hidden="true">TOC</a></span></h4>
  37781. <ul>
  37782. <li> Generate a video with a duration of 5.3 seconds, with size
  37783. 176x144 and a frame rate of 10 frames per second:
  37784. <div class="example">
  37785. <pre class="example">testsrc=duration=5.3:size=qcif:rate=10
  37786. </pre></div>
  37787. </li><li> The following graph description will generate a red source
  37788. with an opacity of 0.2, with size &quot;qcif&quot; and a frame rate of 10
  37789. frames per second:
  37790. <div class="example">
  37791. <pre class="example">color=c=red@0.2:s=qcif:r=10
  37792. </pre></div>
  37793. </li><li> If the input content is to be ignored, <code>nullsrc</code> can be used. The
  37794. following command generates noise in the luminance plane by employing
  37795. the <code>geq</code> filter:
  37796. <div class="example">
  37797. <pre class="example">nullsrc=s=256x256, geq=random(1)*255:128:128
  37798. </pre></div>
  37799. </li></ul>
  37800. <a name="Commands-135"></a>
  37801. <h4 class="subsection">35.9.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-135" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-135" aria-hidden="true">TOC</a></span></h4>
  37802. <p>The <code>color</code> source supports the following commands:
  37803. </p>
  37804. <dl compact="compact">
  37805. <dt><samp>c, color</samp></dt>
  37806. <dd><p>Set the color of the created image. Accepts the same syntax of the
  37807. corresponding <samp>color</samp> option.
  37808. </p></dd>
  37809. </dl>
  37810. <a name="openclsrc"></a>
  37811. <h3 class="section">35.10 openclsrc<span class="pull-right"><a class="anchor hidden-xs" href="#openclsrc" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-openclsrc" aria-hidden="true">TOC</a></span></h3>
  37812. <p>Generate video using an OpenCL program.
  37813. </p>
  37814. <dl compact="compact">
  37815. <dt><samp>source</samp></dt>
  37816. <dd><p>OpenCL program source file.
  37817. </p>
  37818. </dd>
  37819. <dt><samp>kernel</samp></dt>
  37820. <dd><p>Kernel name in program.
  37821. </p>
  37822. </dd>
  37823. <dt><samp>size, s</samp></dt>
  37824. <dd><p>Size of frames to generate. This must be set.
  37825. </p>
  37826. </dd>
  37827. <dt><samp>format</samp></dt>
  37828. <dd><p>Pixel format to use for the generated frames. This must be set.
  37829. </p>
  37830. </dd>
  37831. <dt><samp>rate, r</samp></dt>
  37832. <dd><p>Number of frames generated every second. Default value is &rsquo;25&rsquo;.
  37833. </p>
  37834. </dd>
  37835. </dl>
  37836. <p>For details of how the program loading works, see the <a href="#program_005fopencl">program_opencl</a>
  37837. filter.
  37838. </p>
  37839. <p>Example programs:
  37840. </p>
  37841. <ul>
  37842. <li> Generate a colour ramp by setting pixel values from the position of the pixel
  37843. in the output image. (Note that this will work with all pixel formats, but
  37844. the generated output will not be the same.)
  37845. <pre class="verbatim">__kernel void ramp(__write_only image2d_t dst,
  37846. unsigned int index)
  37847. {
  37848. int2 loc = (int2)(get_global_id(0), get_global_id(1));
  37849. float4 val;
  37850. val.xy = val.zw = convert_float2(loc) / convert_float2(get_image_dim(dst));
  37851. write_imagef(dst, loc, val);
  37852. }
  37853. </pre>
  37854. </li><li> Generate a Sierpinski carpet pattern, panning by a single pixel each frame.
  37855. <pre class="verbatim">__kernel void sierpinski_carpet(__write_only image2d_t dst,
  37856. unsigned int index)
  37857. {
  37858. int2 loc = (int2)(get_global_id(0), get_global_id(1));
  37859. float4 value = 0.0f;
  37860. int x = loc.x + index;
  37861. int y = loc.y + index;
  37862. while (x &gt; 0 || y &gt; 0) {
  37863. if (x % 3 == 1 &amp;&amp; y % 3 == 1) {
  37864. value = 1.0f;
  37865. break;
  37866. }
  37867. x /= 3;
  37868. y /= 3;
  37869. }
  37870. write_imagef(dst, loc, value);
  37871. }
  37872. </pre>
  37873. </li></ul>
  37874. <a name="sierpinski"></a>
  37875. <h3 class="section">35.11 sierpinski<span class="pull-right"><a class="anchor hidden-xs" href="#sierpinski" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sierpinski" aria-hidden="true">TOC</a></span></h3>
  37876. <p>Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
  37877. </p>
  37878. <p>This source accepts the following options:
  37879. </p>
  37880. <dl compact="compact">
  37881. <dt><samp>size, s</samp></dt>
  37882. <dd><p>Set frame size. For the syntax of this option, check the <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video
  37883. size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  37884. </p>
  37885. </dd>
  37886. <dt><samp>rate, r</samp></dt>
  37887. <dd><p>Set frame rate, expressed as number of frames per second. Default
  37888. value is &quot;25&quot;.
  37889. </p>
  37890. </dd>
  37891. <dt><samp>seed</samp></dt>
  37892. <dd><p>Set seed which is used for random panning.
  37893. </p>
  37894. </dd>
  37895. <dt><samp>jump</samp></dt>
  37896. <dd><p>Set max jump for single pan destination. Allowed range is from 1 to 10000.
  37897. </p>
  37898. </dd>
  37899. <dt><samp>type</samp></dt>
  37900. <dd><p>Set fractal type, can be default <code>carpet</code> or <code>triangle</code>.
  37901. </p></dd>
  37902. </dl>
  37903. <a name="Video-Sinks"></a>
  37904. <h2 class="chapter">36 Video Sinks<span class="pull-right"><a class="anchor hidden-xs" href="#Video-Sinks" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Video-Sinks" aria-hidden="true">TOC</a></span></h2>
  37905. <p>Below is a description of the currently available video sinks.
  37906. </p>
  37907. <a name="buffersink"></a>
  37908. <h3 class="section">36.1 buffersink<span class="pull-right"><a class="anchor hidden-xs" href="#buffersink" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-buffersink" aria-hidden="true">TOC</a></span></h3>
  37909. <p>Buffer video frames, and make them available to the end of the filter
  37910. graph.
  37911. </p>
  37912. <p>This sink is mainly intended for programmatic use, in particular
  37913. through the interface defined in <samp>libavfilter/buffersink.h</samp>
  37914. or the options system.
  37915. </p>
  37916. <p>It accepts a pointer to an AVBufferSinkContext structure, which
  37917. defines the incoming buffers&rsquo; formats, to be passed as the opaque
  37918. parameter to <code>avfilter_init_filter</code> for initialization.
  37919. </p>
  37920. <a name="nullsink"></a>
  37921. <h3 class="section">36.2 nullsink<span class="pull-right"><a class="anchor hidden-xs" href="#nullsink" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-nullsink" aria-hidden="true">TOC</a></span></h3>
  37922. <p>Null video sink: do absolutely nothing with the input video. It is
  37923. mainly useful as a template and for use in analysis / debugging
  37924. tools.
  37925. </p>
  37926. <a name="Multimedia-Filters"></a>
  37927. <h2 class="chapter">37 Multimedia Filters<span class="pull-right"><a class="anchor hidden-xs" href="#Multimedia-Filters" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Multimedia-Filters" aria-hidden="true">TOC</a></span></h2>
  37928. <p>Below is a description of the currently available multimedia filters.
  37929. </p>
  37930. <a name="abitscope"></a>
  37931. <h3 class="section">37.1 abitscope<span class="pull-right"><a class="anchor hidden-xs" href="#abitscope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-abitscope" aria-hidden="true">TOC</a></span></h3>
  37932. <p>Convert input audio to a video output, displaying the audio bit scope.
  37933. </p>
  37934. <p>The filter accepts the following options:
  37935. </p>
  37936. <dl compact="compact">
  37937. <dt><samp>rate, r</samp></dt>
  37938. <dd><p>Set frame rate, expressed as number of frames per second. Default
  37939. value is &quot;25&quot;.
  37940. </p>
  37941. </dd>
  37942. <dt><samp>size, s</samp></dt>
  37943. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  37944. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37945. Default value is <code>1024x256</code>.
  37946. </p>
  37947. </dd>
  37948. <dt><samp>colors</samp></dt>
  37949. <dd><p>Specify list of colors separated by space or by &rsquo;|&rsquo; which will be used to
  37950. draw channels. Unrecognized or missing colors will be replaced
  37951. by white color.
  37952. </p></dd>
  37953. </dl>
  37954. <a name="adrawgraph"></a>
  37955. <h3 class="section">37.2 adrawgraph<span class="pull-right"><a class="anchor hidden-xs" href="#adrawgraph" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-adrawgraph" aria-hidden="true">TOC</a></span></h3>
  37956. <p>Draw a graph using input audio metadata.
  37957. </p>
  37958. <p>See <a href="#drawgraph">drawgraph</a>
  37959. </p>
  37960. <a name="agraphmonitor"></a>
  37961. <h3 class="section">37.3 agraphmonitor<span class="pull-right"><a class="anchor hidden-xs" href="#agraphmonitor" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-agraphmonitor" aria-hidden="true">TOC</a></span></h3>
  37962. <p>See <a href="#graphmonitor">graphmonitor</a>.
  37963. </p>
  37964. <a name="ahistogram"></a>
  37965. <h3 class="section">37.4 ahistogram<span class="pull-right"><a class="anchor hidden-xs" href="#ahistogram" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ahistogram" aria-hidden="true">TOC</a></span></h3>
  37966. <p>Convert input audio to a video output, displaying the volume histogram.
  37967. </p>
  37968. <p>The filter accepts the following options:
  37969. </p>
  37970. <dl compact="compact">
  37971. <dt><samp>dmode</samp></dt>
  37972. <dd><p>Specify how histogram is calculated.
  37973. </p>
  37974. <p>It accepts the following values:
  37975. </p><dl compact="compact">
  37976. <dt>&lsquo;<samp>single</samp>&rsquo;</dt>
  37977. <dd><p>Use single histogram for all channels.
  37978. </p></dd>
  37979. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  37980. <dd><p>Use separate histogram for each channel.
  37981. </p></dd>
  37982. </dl>
  37983. <p>Default is <code>single</code>.
  37984. </p>
  37985. </dd>
  37986. <dt><samp>rate, r</samp></dt>
  37987. <dd><p>Set frame rate, expressed as number of frames per second. Default
  37988. value is &quot;25&quot;.
  37989. </p>
  37990. </dd>
  37991. <dt><samp>size, s</samp></dt>
  37992. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  37993. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37994. Default value is <code>hd720</code>.
  37995. </p>
  37996. </dd>
  37997. <dt><samp>scale</samp></dt>
  37998. <dd><p>Set display scale.
  37999. </p>
  38000. <p>It accepts the following values:
  38001. </p><dl compact="compact">
  38002. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  38003. <dd><p>logarithmic
  38004. </p></dd>
  38005. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  38006. <dd><p>square root
  38007. </p></dd>
  38008. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  38009. <dd><p>cubic root
  38010. </p></dd>
  38011. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  38012. <dd><p>linear
  38013. </p></dd>
  38014. <dt>&lsquo;<samp>rlog</samp>&rsquo;</dt>
  38015. <dd><p>reverse logarithmic
  38016. </p></dd>
  38017. </dl>
  38018. <p>Default is <code>log</code>.
  38019. </p>
  38020. </dd>
  38021. <dt><samp>ascale</samp></dt>
  38022. <dd><p>Set amplitude scale.
  38023. </p>
  38024. <p>It accepts the following values:
  38025. </p><dl compact="compact">
  38026. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  38027. <dd><p>logarithmic
  38028. </p></dd>
  38029. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  38030. <dd><p>linear
  38031. </p></dd>
  38032. </dl>
  38033. <p>Default is <code>log</code>.
  38034. </p>
  38035. </dd>
  38036. <dt><samp>acount</samp></dt>
  38037. <dd><p>Set how much frames to accumulate in histogram.
  38038. Default is 1. Setting this to -1 accumulates all frames.
  38039. </p>
  38040. </dd>
  38041. <dt><samp>rheight</samp></dt>
  38042. <dd><p>Set histogram ratio of window height.
  38043. </p>
  38044. </dd>
  38045. <dt><samp>slide</samp></dt>
  38046. <dd><p>Set sonogram sliding.
  38047. </p>
  38048. <p>It accepts the following values:
  38049. </p><dl compact="compact">
  38050. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  38051. <dd><p>replace old rows with new ones.
  38052. </p></dd>
  38053. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  38054. <dd><p>scroll from top to bottom.
  38055. </p></dd>
  38056. </dl>
  38057. <p>Default is <code>replace</code>.
  38058. </p></dd>
  38059. </dl>
  38060. <a name="aphasemeter"></a>
  38061. <h3 class="section">37.5 aphasemeter<span class="pull-right"><a class="anchor hidden-xs" href="#aphasemeter" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-aphasemeter" aria-hidden="true">TOC</a></span></h3>
  38062. <p>Measures phase of input audio, which is exported as metadata <code>lavfi.aphasemeter.phase</code>,
  38063. representing mean phase of current audio frame. A video output can also be produced and is
  38064. enabled by default. The audio is passed through as first output.
  38065. </p>
  38066. <p>Audio will be rematrixed to stereo if it has a different channel layout. Phase value is in
  38067. range <code>[-1, 1]</code> where <code>-1</code> means left and right channels are completely out of phase
  38068. and <code>1</code> means channels are in phase.
  38069. </p>
  38070. <p>The filter accepts the following options, all related to its video output:
  38071. </p>
  38072. <dl compact="compact">
  38073. <dt><samp>rate, r</samp></dt>
  38074. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  38075. </p>
  38076. </dd>
  38077. <dt><samp>size, s</samp></dt>
  38078. <dd><p>Set the video size for the output. For the syntax of this option, check the
  38079. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  38080. Default value is <code>800x400</code>.
  38081. </p>
  38082. </dd>
  38083. <dt><samp>rc</samp></dt>
  38084. <dt><samp>gc</samp></dt>
  38085. <dt><samp>bc</samp></dt>
  38086. <dd><p>Specify the red, green, blue contrast. Default values are <code>2</code>,
  38087. <code>7</code> and <code>1</code>.
  38088. Allowed range is <code>[0, 255]</code>.
  38089. </p>
  38090. </dd>
  38091. <dt><samp>mpc</samp></dt>
  38092. <dd><p>Set color which will be used for drawing median phase. If color is
  38093. <code>none</code> which is default, no median phase value will be drawn.
  38094. </p>
  38095. </dd>
  38096. <dt><samp>video</samp></dt>
  38097. <dd><p>Enable video output. Default is enabled.
  38098. </p></dd>
  38099. </dl>
  38100. <a name="phasing-detection"></a>
  38101. <h4 class="subsection">37.5.1 phasing detection<span class="pull-right"><a class="anchor hidden-xs" href="#phasing-detection" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-phasing-detection" aria-hidden="true">TOC</a></span></h4>
  38102. <p>The filter also detects out of phase and mono sequences in stereo streams.
  38103. It logs the sequence start, end and duration when it lasts longer or as long as the minimum set.
  38104. </p>
  38105. <p>The filter accepts the following options for this detection:
  38106. </p>
  38107. <dl compact="compact">
  38108. <dt><samp>phasing</samp></dt>
  38109. <dd><p>Enable mono and out of phase detection. Default is disabled.
  38110. </p>
  38111. </dd>
  38112. <dt><samp>tolerance, t</samp></dt>
  38113. <dd><p>Set phase tolerance for mono detection, in amplitude ratio. Default is <code>0</code>.
  38114. Allowed range is <code>[0, 1]</code>.
  38115. </p>
  38116. </dd>
  38117. <dt><samp>angle, a</samp></dt>
  38118. <dd><p>Set angle threshold for out of phase detection, in degree. Default is <code>170</code>.
  38119. Allowed range is <code>[90, 180]</code>.
  38120. </p>
  38121. </dd>
  38122. <dt><samp>duration, d</samp></dt>
  38123. <dd><p>Set mono or out of phase duration until notification, expressed in seconds. Default is <code>2</code>.
  38124. </p></dd>
  38125. </dl>
  38126. <a name="Examples-149"></a>
  38127. <h4 class="subsection">37.5.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-149" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-149" aria-hidden="true">TOC</a></span></h4>
  38128. <ul>
  38129. <li> Complete example with <code>ffmpeg</code> to detect 1 second of mono with 0.001 phase tolerance:
  38130. <div class="example">
  38131. <pre class="example">ffmpeg -i stereo.wav -af aphasemeter=video=0:phasing=1:duration=1:tolerance=0.001 -f null -
  38132. </pre></div>
  38133. </li></ul>
  38134. <a name="avectorscope"></a>
  38135. <h3 class="section">37.6 avectorscope<span class="pull-right"><a class="anchor hidden-xs" href="#avectorscope" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-avectorscope" aria-hidden="true">TOC</a></span></h3>
  38136. <p>Convert input audio to a video output, representing the audio vector
  38137. scope.
  38138. </p>
  38139. <p>The filter is used to measure the difference between channels of stereo
  38140. audio stream. A monaural signal, consisting of identical left and right
  38141. signal, results in straight vertical line. Any stereo separation is visible
  38142. as a deviation from this line, creating a Lissajous figure.
  38143. If the straight (or deviation from it) but horizontal line appears this
  38144. indicates that the left and right channels are out of phase.
  38145. </p>
  38146. <p>The filter accepts the following options:
  38147. </p>
  38148. <dl compact="compact">
  38149. <dt><samp>mode, m</samp></dt>
  38150. <dd><p>Set the vectorscope mode.
  38151. </p>
  38152. <p>Available values are:
  38153. </p><dl compact="compact">
  38154. <dt>&lsquo;<samp>lissajous</samp>&rsquo;</dt>
  38155. <dd><p>Lissajous rotated by 45 degrees.
  38156. </p>
  38157. </dd>
  38158. <dt>&lsquo;<samp>lissajous_xy</samp>&rsquo;</dt>
  38159. <dd><p>Same as above but not rotated.
  38160. </p>
  38161. </dd>
  38162. <dt>&lsquo;<samp>polar</samp>&rsquo;</dt>
  38163. <dd><p>Shape resembling half of circle.
  38164. </p></dd>
  38165. </dl>
  38166. <p>Default value is &lsquo;<samp>lissajous</samp>&rsquo;.
  38167. </p>
  38168. </dd>
  38169. <dt><samp>size, s</samp></dt>
  38170. <dd><p>Set the video size for the output. For the syntax of this option, check the
  38171. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  38172. Default value is <code>400x400</code>.
  38173. </p>
  38174. </dd>
  38175. <dt><samp>rate, r</samp></dt>
  38176. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  38177. </p>
  38178. </dd>
  38179. <dt><samp>rc</samp></dt>
  38180. <dt><samp>gc</samp></dt>
  38181. <dt><samp>bc</samp></dt>
  38182. <dt><samp>ac</samp></dt>
  38183. <dd><p>Specify the red, green, blue and alpha contrast. Default values are <code>40</code>,
  38184. <code>160</code>, <code>80</code> and <code>255</code>.
  38185. Allowed range is <code>[0, 255]</code>.
  38186. </p>
  38187. </dd>
  38188. <dt><samp>rf</samp></dt>
  38189. <dt><samp>gf</samp></dt>
  38190. <dt><samp>bf</samp></dt>
  38191. <dt><samp>af</samp></dt>
  38192. <dd><p>Specify the red, green, blue and alpha fade. Default values are <code>15</code>,
  38193. <code>10</code>, <code>5</code> and <code>5</code>.
  38194. Allowed range is <code>[0, 255]</code>.
  38195. </p>
  38196. </dd>
  38197. <dt><samp>zoom</samp></dt>
  38198. <dd><p>Set the zoom factor. Default value is <code>1</code>. Allowed range is <code>[0, 10]</code>.
  38199. Values lower than <var>1</var> will auto adjust zoom factor to maximal possible value.
  38200. </p>
  38201. </dd>
  38202. <dt><samp>draw</samp></dt>
  38203. <dd><p>Set the vectorscope drawing mode.
  38204. </p>
  38205. <p>Available values are:
  38206. </p><dl compact="compact">
  38207. <dt>&lsquo;<samp>dot</samp>&rsquo;</dt>
  38208. <dd><p>Draw dot for each sample.
  38209. </p>
  38210. </dd>
  38211. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  38212. <dd><p>Draw line between previous and current sample.
  38213. </p></dd>
  38214. </dl>
  38215. <p>Default value is &lsquo;<samp>dot</samp>&rsquo;.
  38216. </p>
  38217. </dd>
  38218. <dt><samp>scale</samp></dt>
  38219. <dd><p>Specify amplitude scale of audio samples.
  38220. </p>
  38221. <p>Available values are:
  38222. </p><dl compact="compact">
  38223. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  38224. <dd><p>Linear.
  38225. </p>
  38226. </dd>
  38227. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  38228. <dd><p>Square root.
  38229. </p>
  38230. </dd>
  38231. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  38232. <dd><p>Cubic root.
  38233. </p>
  38234. </dd>
  38235. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  38236. <dd><p>Logarithmic.
  38237. </p></dd>
  38238. </dl>
  38239. </dd>
  38240. <dt><samp>swap</samp></dt>
  38241. <dd><p>Swap left channel axis with right channel axis.
  38242. </p>
  38243. </dd>
  38244. <dt><samp>mirror</samp></dt>
  38245. <dd><p>Mirror axis.
  38246. </p>
  38247. <dl compact="compact">
  38248. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  38249. <dd><p>No mirror.
  38250. </p>
  38251. </dd>
  38252. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  38253. <dd><p>Mirror only x axis.
  38254. </p>
  38255. </dd>
  38256. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  38257. <dd><p>Mirror only y axis.
  38258. </p>
  38259. </dd>
  38260. <dt>&lsquo;<samp>xy</samp>&rsquo;</dt>
  38261. <dd><p>Mirror both axis.
  38262. </p></dd>
  38263. </dl>
  38264. </dd>
  38265. </dl>
  38266. <a name="Examples-150"></a>
  38267. <h4 class="subsection">37.6.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-150" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-150" aria-hidden="true">TOC</a></span></h4>
  38268. <ul>
  38269. <li> Complete example using <code>ffplay</code>:
  38270. <div class="example">
  38271. <pre class="example">ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
  38272. [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]'
  38273. </pre></div>
  38274. </li></ul>
  38275. <a name="bench_002c-abench"></a>
  38276. <h3 class="section">37.7 bench, abench<span class="pull-right"><a class="anchor hidden-xs" href="#bench_002c-abench" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-bench_002c-abench" aria-hidden="true">TOC</a></span></h3>
  38277. <p>Benchmark part of a filtergraph.
  38278. </p>
  38279. <p>The filter accepts the following options:
  38280. </p>
  38281. <dl compact="compact">
  38282. <dt><samp>action</samp></dt>
  38283. <dd><p>Start or stop a timer.
  38284. </p>
  38285. <p>Available values are:
  38286. </p><dl compact="compact">
  38287. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  38288. <dd><p>Get the current time, set it as frame metadata (using the key
  38289. <code>lavfi.bench.start_time</code>), and forward the frame to the next filter.
  38290. </p>
  38291. </dd>
  38292. <dt>&lsquo;<samp>stop</samp>&rsquo;</dt>
  38293. <dd><p>Get the current time and fetch the <code>lavfi.bench.start_time</code> metadata from
  38294. the input frame metadata to get the time difference. Time difference, average,
  38295. maximum and minimum time (respectively <code>t</code>, <code>avg</code>, <code>max</code> and
  38296. <code>min</code>) are then printed. The timestamps are expressed in seconds.
  38297. </p></dd>
  38298. </dl>
  38299. </dd>
  38300. </dl>
  38301. <a name="Examples-151"></a>
  38302. <h4 class="subsection">37.7.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-151" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-151" aria-hidden="true">TOC</a></span></h4>
  38303. <ul>
  38304. <li> Benchmark <a href="#selectivecolor">selectivecolor</a> filter:
  38305. <div class="example">
  38306. <pre class="example">bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop
  38307. </pre></div>
  38308. </li></ul>
  38309. <a name="concat-3"></a>
  38310. <h3 class="section">37.8 concat<span class="pull-right"><a class="anchor hidden-xs" href="#concat-3" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-concat-3" aria-hidden="true">TOC</a></span></h3>
  38311. <p>Concatenate audio and video streams, joining them together one after the
  38312. other.
  38313. </p>
  38314. <p>The filter works on segments of synchronized video and audio streams. All
  38315. segments must have the same number of streams of each type, and that will
  38316. also be the number of streams at output.
  38317. </p>
  38318. <p>The filter accepts the following options:
  38319. </p>
  38320. <dl compact="compact">
  38321. <dt><samp>n</samp></dt>
  38322. <dd><p>Set the number of segments. Default is 2.
  38323. </p>
  38324. </dd>
  38325. <dt><samp>v</samp></dt>
  38326. <dd><p>Set the number of output video streams, that is also the number of video
  38327. streams in each segment. Default is 1.
  38328. </p>
  38329. </dd>
  38330. <dt><samp>a</samp></dt>
  38331. <dd><p>Set the number of output audio streams, that is also the number of audio
  38332. streams in each segment. Default is 0.
  38333. </p>
  38334. </dd>
  38335. <dt><samp>unsafe</samp></dt>
  38336. <dd><p>Activate unsafe mode: do not fail if segments have a different format.
  38337. </p>
  38338. </dd>
  38339. </dl>
  38340. <p>The filter has <var>v</var>+<var>a</var> outputs: first <var>v</var> video outputs, then
  38341. <var>a</var> audio outputs.
  38342. </p>
  38343. <p>There are <var>n</var>x(<var>v</var>+<var>a</var>) inputs: first the inputs for the first
  38344. segment, in the same order as the outputs, then the inputs for the second
  38345. segment, etc.
  38346. </p>
  38347. <p>Related streams do not always have exactly the same duration, for various
  38348. reasons including codec frame size or sloppy authoring. For that reason,
  38349. related synchronized streams (e.g. a video and its audio track) should be
  38350. concatenated at once. The concat filter will use the duration of the longest
  38351. stream in each segment (except the last one), and if necessary pad shorter
  38352. audio streams with silence.
  38353. </p>
  38354. <p>For this filter to work correctly, all segments must start at timestamp 0.
  38355. </p>
  38356. <p>All corresponding streams must have the same parameters in all segments; the
  38357. filtering system will automatically select a common pixel format for video
  38358. streams, and a common sample format, sample rate and channel layout for
  38359. audio streams, but other settings, such as resolution, must be converted
  38360. explicitly by the user.
  38361. </p>
  38362. <p>Different frame rates are acceptable but will result in variable frame rate
  38363. at output; be sure to configure the output file to handle it.
  38364. </p>
  38365. <a name="Examples-152"></a>
  38366. <h4 class="subsection">37.8.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-152" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-152" aria-hidden="true">TOC</a></span></h4>
  38367. <ul>
  38368. <li> Concatenate an opening, an episode and an ending, all in bilingual version
  38369. (video in stream 0, audio in streams 1 and 2):
  38370. <div class="example">
  38371. <pre class="example">ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex \
  38372. '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
  38373. concat=n=3:v=1:a=2 [v] [a1] [a2]' \
  38374. -map '[v]' -map '[a1]' -map '[a2]' output.mkv
  38375. </pre></div>
  38376. </li><li> Concatenate two parts, handling audio and video separately, using the
  38377. (a)movie sources, and adjusting the resolution:
  38378. <div class="example">
  38379. <pre class="example">movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
  38380. movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
  38381. [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
  38382. </pre></div>
  38383. <p>Note that a desync will happen at the stitch if the audio and video streams
  38384. do not have exactly the same duration in the first file.
  38385. </p>
  38386. </li></ul>
  38387. <a name="Commands-136"></a>
  38388. <h4 class="subsection">37.8.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-136" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-136" aria-hidden="true">TOC</a></span></h4>
  38389. <p>This filter supports the following commands:
  38390. </p><dl compact="compact">
  38391. <dt><samp>next</samp></dt>
  38392. <dd><p>Close the current segment and step to the next one
  38393. </p></dd>
  38394. </dl>
  38395. <span id="ebur128"></span><a name="ebur128-1"></a>
  38396. <h3 class="section">37.9 ebur128<span class="pull-right"><a class="anchor hidden-xs" href="#ebur128-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ebur128-1" aria-hidden="true">TOC</a></span></h3>
  38397. <p>EBU R128 scanner filter. This filter takes an audio stream and analyzes its loudness
  38398. level. By default, it logs a message at a frequency of 10Hz with the
  38399. Momentary loudness (identified by <code>M</code>), Short-term loudness (<code>S</code>),
  38400. Integrated loudness (<code>I</code>) and Loudness Range (<code>LRA</code>).
  38401. </p>
  38402. <p>The filter can only analyze streams which have a sampling rate of 48000 Hz and whose
  38403. sample format is double-precision floating point. The input stream will be converted to
  38404. this specification, if needed. Users may need to insert aformat and/or aresample filters
  38405. after this filter to obtain the original parameters.
  38406. </p>
  38407. <p>The filter also has a video output (see the <var>video</var> option) with a real
  38408. time graph to observe the loudness evolution. The graphic contains the logged
  38409. message mentioned above, so it is not printed anymore when this option is set,
  38410. unless the verbose logging is set. The main graphing area contains the
  38411. short-term loudness (3 seconds of analysis), and the gauge on the right is for
  38412. the momentary loudness (400 milliseconds), but can optionally be configured
  38413. to instead display short-term loudness (see <var>gauge</var>).
  38414. </p>
  38415. <p>The green area marks a +/- 1LU target range around the target loudness
  38416. (-23LUFS by default, unless modified through <var>target</var>).
  38417. </p>
  38418. <p>More information about the Loudness Recommendation EBU R128 on
  38419. <a href="http://tech.ebu.ch/loudness">http://tech.ebu.ch/loudness</a>.
  38420. </p>
  38421. <p>The filter accepts the following options:
  38422. </p>
  38423. <dl compact="compact">
  38424. <dt><samp>video</samp></dt>
  38425. <dd><p>Activate the video output. The audio stream is passed unchanged whether this
  38426. option is set or no. The video stream will be the first output stream if
  38427. activated. Default is <code>0</code>.
  38428. </p>
  38429. </dd>
  38430. <dt><samp>size</samp></dt>
  38431. <dd><p>Set the video size. This option is for video only. For the syntax of this
  38432. option, check the
  38433. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  38434. Default and minimum resolution is <code>640x480</code>.
  38435. </p>
  38436. </dd>
  38437. <dt><samp>meter</samp></dt>
  38438. <dd><p>Set the EBU scale meter. Default is <code>9</code>. Common values are <code>9</code> and
  38439. <code>18</code>, respectively for EBU scale meter +9 and EBU scale meter +18. Any
  38440. other integer value between this range is allowed.
  38441. </p>
  38442. </dd>
  38443. <dt><samp>metadata</samp></dt>
  38444. <dd><p>Set metadata injection. If set to <code>1</code>, the audio input will be segmented
  38445. into 100ms output frames, each of them containing various loudness information
  38446. in metadata. All the metadata keys are prefixed with <code>lavfi.r128.</code>.
  38447. </p>
  38448. <p>Default is <code>0</code>.
  38449. </p>
  38450. </dd>
  38451. <dt><samp>framelog</samp></dt>
  38452. <dd><p>Force the frame logging level.
  38453. </p>
  38454. <p>Available values are:
  38455. </p><dl compact="compact">
  38456. <dt>&lsquo;<samp>info</samp>&rsquo;</dt>
  38457. <dd><p>information logging level
  38458. </p></dd>
  38459. <dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
  38460. <dd><p>verbose logging level
  38461. </p></dd>
  38462. </dl>
  38463. <p>By default, the logging level is set to <var>info</var>. If the <samp>video</samp> or
  38464. the <samp>metadata</samp> options are set, it switches to <var>verbose</var>.
  38465. </p>
  38466. </dd>
  38467. <dt><samp>peak</samp></dt>
  38468. <dd><p>Set peak mode(s).
  38469. </p>
  38470. <p>Available modes can be cumulated (the option is a <code>flag</code> type). Possible
  38471. values are:
  38472. </p><dl compact="compact">
  38473. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  38474. <dd><p>Disable any peak mode (default).
  38475. </p></dd>
  38476. <dt>&lsquo;<samp>sample</samp>&rsquo;</dt>
  38477. <dd><p>Enable sample-peak mode.
  38478. </p>
  38479. <p>Simple peak mode looking for the higher sample value. It logs a message
  38480. for sample-peak (identified by <code>SPK</code>).
  38481. </p></dd>
  38482. <dt>&lsquo;<samp>true</samp>&rsquo;</dt>
  38483. <dd><p>Enable true-peak mode.
  38484. </p>
  38485. <p>If enabled, the peak lookup is done on an over-sampled version of the input
  38486. stream for better peak accuracy. It logs a message for true-peak.
  38487. (identified by <code>TPK</code>) and true-peak per frame (identified by <code>FTPK</code>).
  38488. This mode requires a build with <code>libswresample</code>.
  38489. </p></dd>
  38490. </dl>
  38491. </dd>
  38492. <dt><samp>dualmono</samp></dt>
  38493. <dd><p>Treat mono input files as &quot;dual mono&quot;. If a mono file is intended for playback
  38494. on a stereo system, its EBU R128 measurement will be perceptually incorrect.
  38495. If set to <code>true</code>, this option will compensate for this effect.
  38496. Multi-channel input files are not affected by this option.
  38497. </p>
  38498. </dd>
  38499. <dt><samp>panlaw</samp></dt>
  38500. <dd><p>Set a specific pan law to be used for the measurement of dual mono files.
  38501. This parameter is optional, and has a default value of -3.01dB.
  38502. </p>
  38503. </dd>
  38504. <dt><samp>target</samp></dt>
  38505. <dd><p>Set a specific target level (in LUFS) used as relative zero in the visualization.
  38506. This parameter is optional and has a default value of -23LUFS as specified
  38507. by EBU R128. However, material published online may prefer a level of -16LUFS
  38508. (e.g. for use with podcasts or video platforms).
  38509. </p>
  38510. </dd>
  38511. <dt><samp>gauge</samp></dt>
  38512. <dd><p>Set the value displayed by the gauge. Valid values are <code>momentary</code> and s
  38513. <code>shortterm</code>. By default the momentary value will be used, but in certain
  38514. scenarios it may be more useful to observe the short term value instead (e.g.
  38515. live mixing).
  38516. </p>
  38517. </dd>
  38518. <dt><samp>scale</samp></dt>
  38519. <dd><p>Sets the display scale for the loudness. Valid parameters are <code>absolute</code>
  38520. (in LUFS) or <code>relative</code> (LU) relative to the target. This only affects the
  38521. video output, not the summary or continuous log output.
  38522. </p></dd>
  38523. </dl>
  38524. <a name="Examples-153"></a>
  38525. <h4 class="subsection">37.9.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-153" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-153" aria-hidden="true">TOC</a></span></h4>
  38526. <ul>
  38527. <li> Real-time graph using <code>ffplay</code>, with a EBU scale meter +18:
  38528. <div class="example">
  38529. <pre class="example">ffplay -f lavfi -i &quot;amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]&quot;
  38530. </pre></div>
  38531. </li><li> Run an analysis with <code>ffmpeg</code>:
  38532. <div class="example">
  38533. <pre class="example">ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
  38534. </pre></div>
  38535. </li></ul>
  38536. <a name="interleave_002c-ainterleave"></a>
  38537. <h3 class="section">37.10 interleave, ainterleave<span class="pull-right"><a class="anchor hidden-xs" href="#interleave_002c-ainterleave" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-interleave_002c-ainterleave" aria-hidden="true">TOC</a></span></h3>
  38538. <p>Temporally interleave frames from several inputs.
  38539. </p>
  38540. <p><code>interleave</code> works with video inputs, <code>ainterleave</code> with audio.
  38541. </p>
  38542. <p>These filters read frames from several inputs and send the oldest
  38543. queued frame to the output.
  38544. </p>
  38545. <p>Input streams must have well defined, monotonically increasing frame
  38546. timestamp values.
  38547. </p>
  38548. <p>In order to submit one frame to output, these filters need to enqueue
  38549. at least one frame for each input, so they cannot work in case one
  38550. input is not yet terminated and will not receive incoming frames.
  38551. </p>
  38552. <p>For example consider the case when one input is a <code>select</code> filter
  38553. which always drops input frames. The <code>interleave</code> filter will keep
  38554. reading from that input, but it will never be able to send new frames
  38555. to output until the input sends an end-of-stream signal.
  38556. </p>
  38557. <p>Also, depending on inputs synchronization, the filters will drop
  38558. frames in case one input receives more frames than the other ones, and
  38559. the queue is already filled.
  38560. </p>
  38561. <p>These filters accept the following options:
  38562. </p>
  38563. <dl compact="compact">
  38564. <dt><samp>nb_inputs, n</samp></dt>
  38565. <dd><p>Set the number of different inputs, it is 2 by default.
  38566. </p>
  38567. </dd>
  38568. <dt><samp>duration</samp></dt>
  38569. <dd><p>How to determine the end-of-stream.
  38570. </p>
  38571. <dl compact="compact">
  38572. <dt><samp>longest</samp></dt>
  38573. <dd><p>The duration of the longest input. (default)
  38574. </p>
  38575. </dd>
  38576. <dt><samp>shortest</samp></dt>
  38577. <dd><p>The duration of the shortest input.
  38578. </p>
  38579. </dd>
  38580. <dt><samp>first</samp></dt>
  38581. <dd><p>The duration of the first input.
  38582. </p></dd>
  38583. </dl>
  38584. </dd>
  38585. </dl>
  38586. <a name="Examples-154"></a>
  38587. <h4 class="subsection">37.10.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-154" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-154" aria-hidden="true">TOC</a></span></h4>
  38588. <ul>
  38589. <li> Interleave frames belonging to different streams using <code>ffmpeg</code>:
  38590. <div class="example">
  38591. <pre class="example">ffmpeg -i bambi.avi -i pr0n.mkv -filter_complex &quot;[0:v][1:v] interleave&quot; out.avi
  38592. </pre></div>
  38593. </li><li> Add flickering blur effect:
  38594. <div class="example">
  38595. <pre class="example">select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave
  38596. </pre></div>
  38597. </li></ul>
  38598. <a name="metadata_002c-ametadata"></a>
  38599. <h3 class="section">37.11 metadata, ametadata<span class="pull-right"><a class="anchor hidden-xs" href="#metadata_002c-ametadata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-metadata_002c-ametadata" aria-hidden="true">TOC</a></span></h3>
  38600. <p>Manipulate frame metadata.
  38601. </p>
  38602. <p>This filter accepts the following options:
  38603. </p>
  38604. <dl compact="compact">
  38605. <dt><samp>mode</samp></dt>
  38606. <dd><p>Set mode of operation of the filter.
  38607. </p>
  38608. <p>Can be one of the following:
  38609. </p>
  38610. <dl compact="compact">
  38611. <dt>&lsquo;<samp>select</samp>&rsquo;</dt>
  38612. <dd><p>If both <code>value</code> and <code>key</code> is set, select frames
  38613. which have such metadata. If only <code>key</code> is set, select
  38614. every frame that has such key in metadata.
  38615. </p>
  38616. </dd>
  38617. <dt>&lsquo;<samp>add</samp>&rsquo;</dt>
  38618. <dd><p>Add new metadata <code>key</code> and <code>value</code>. If key is already available
  38619. do nothing.
  38620. </p>
  38621. </dd>
  38622. <dt>&lsquo;<samp>modify</samp>&rsquo;</dt>
  38623. <dd><p>Modify value of already present key.
  38624. </p>
  38625. </dd>
  38626. <dt>&lsquo;<samp>delete</samp>&rsquo;</dt>
  38627. <dd><p>If <code>value</code> is set, delete only keys that have such value.
  38628. Otherwise, delete key. If <code>key</code> is not set, delete all metadata values in
  38629. the frame.
  38630. </p>
  38631. </dd>
  38632. <dt>&lsquo;<samp>print</samp>&rsquo;</dt>
  38633. <dd><p>Print key and its value if metadata was found. If <code>key</code> is not set print all
  38634. metadata values available in frame.
  38635. </p></dd>
  38636. </dl>
  38637. </dd>
  38638. <dt><samp>key</samp></dt>
  38639. <dd><p>Set key used with all modes. Must be set for all modes except <code>print</code> and <code>delete</code>.
  38640. </p>
  38641. </dd>
  38642. <dt><samp>value</samp></dt>
  38643. <dd><p>Set metadata value which will be used. This option is mandatory for
  38644. <code>modify</code> and <code>add</code> mode.
  38645. </p>
  38646. </dd>
  38647. <dt><samp>function</samp></dt>
  38648. <dd><p>Which function to use when comparing metadata value and <code>value</code>.
  38649. </p>
  38650. <p>Can be one of following:
  38651. </p>
  38652. <dl compact="compact">
  38653. <dt>&lsquo;<samp>same_str</samp>&rsquo;</dt>
  38654. <dd><p>Values are interpreted as strings, returns true if metadata value is same as <code>value</code>.
  38655. </p>
  38656. </dd>
  38657. <dt>&lsquo;<samp>starts_with</samp>&rsquo;</dt>
  38658. <dd><p>Values are interpreted as strings, returns true if metadata value starts with
  38659. the <code>value</code> option string.
  38660. </p>
  38661. </dd>
  38662. <dt>&lsquo;<samp>less</samp>&rsquo;</dt>
  38663. <dd><p>Values are interpreted as floats, returns true if metadata value is less than <code>value</code>.
  38664. </p>
  38665. </dd>
  38666. <dt>&lsquo;<samp>equal</samp>&rsquo;</dt>
  38667. <dd><p>Values are interpreted as floats, returns true if <code>value</code> is equal with metadata value.
  38668. </p>
  38669. </dd>
  38670. <dt>&lsquo;<samp>greater</samp>&rsquo;</dt>
  38671. <dd><p>Values are interpreted as floats, returns true if metadata value is greater than <code>value</code>.
  38672. </p>
  38673. </dd>
  38674. <dt>&lsquo;<samp>expr</samp>&rsquo;</dt>
  38675. <dd><p>Values are interpreted as floats, returns true if expression from option <code>expr</code>
  38676. evaluates to true.
  38677. </p>
  38678. </dd>
  38679. <dt>&lsquo;<samp>ends_with</samp>&rsquo;</dt>
  38680. <dd><p>Values are interpreted as strings, returns true if metadata value ends with
  38681. the <code>value</code> option string.
  38682. </p></dd>
  38683. </dl>
  38684. </dd>
  38685. <dt><samp>expr</samp></dt>
  38686. <dd><p>Set expression which is used when <code>function</code> is set to <code>expr</code>.
  38687. The expression is evaluated through the eval API and can contain the following
  38688. constants:
  38689. </p>
  38690. <dl compact="compact">
  38691. <dt><samp>VALUE1</samp></dt>
  38692. <dd><p>Float representation of <code>value</code> from metadata key.
  38693. </p>
  38694. </dd>
  38695. <dt><samp>VALUE2</samp></dt>
  38696. <dd><p>Float representation of <code>value</code> as supplied by user in <code>value</code> option.
  38697. </p></dd>
  38698. </dl>
  38699. </dd>
  38700. <dt><samp>file</samp></dt>
  38701. <dd><p>If specified in <code>print</code> mode, output is written to the named file. Instead of
  38702. plain filename any writable url can be specified. Filename &ldquo;-&rdquo; is a shorthand
  38703. for standard output. If <code>file</code> option is not set, output is written to the log
  38704. with AV_LOG_INFO loglevel.
  38705. </p>
  38706. </dd>
  38707. <dt><samp>direct</samp></dt>
  38708. <dd><p>Reduces buffering in print mode when output is written to a URL set using <var>file</var>.
  38709. </p>
  38710. </dd>
  38711. </dl>
  38712. <a name="Examples-155"></a>
  38713. <h4 class="subsection">37.11.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-155" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-155" aria-hidden="true">TOC</a></span></h4>
  38714. <ul>
  38715. <li> Print all metadata values for frames with key <code>lavfi.signalstats.YDIF</code> with values
  38716. between 0 and 1.
  38717. <div class="example">
  38718. <pre class="example">signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
  38719. </pre></div>
  38720. </li><li> Print silencedetect output to file <samp>metadata.txt</samp>.
  38721. <div class="example">
  38722. <pre class="example">silencedetect,ametadata=mode=print:file=metadata.txt
  38723. </pre></div>
  38724. </li><li> Direct all metadata to a pipe with file descriptor 4.
  38725. <div class="example">
  38726. <pre class="example">metadata=mode=print:file='pipe\:4'
  38727. </pre></div>
  38728. </li></ul>
  38729. <a name="perms_002c-aperms"></a>
  38730. <h3 class="section">37.12 perms, aperms<span class="pull-right"><a class="anchor hidden-xs" href="#perms_002c-aperms" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-perms_002c-aperms" aria-hidden="true">TOC</a></span></h3>
  38731. <p>Set read/write permissions for the output frames.
  38732. </p>
  38733. <p>These filters are mainly aimed at developers to test direct path in the
  38734. following filter in the filtergraph.
  38735. </p>
  38736. <p>The filters accept the following options:
  38737. </p>
  38738. <dl compact="compact">
  38739. <dt><samp>mode</samp></dt>
  38740. <dd><p>Select the permissions mode.
  38741. </p>
  38742. <p>It accepts the following values:
  38743. </p><dl compact="compact">
  38744. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  38745. <dd><p>Do nothing. This is the default.
  38746. </p></dd>
  38747. <dt>&lsquo;<samp>ro</samp>&rsquo;</dt>
  38748. <dd><p>Set all the output frames read-only.
  38749. </p></dd>
  38750. <dt>&lsquo;<samp>rw</samp>&rsquo;</dt>
  38751. <dd><p>Set all the output frames directly writable.
  38752. </p></dd>
  38753. <dt>&lsquo;<samp>toggle</samp>&rsquo;</dt>
  38754. <dd><p>Make the frame read-only if writable, and writable if read-only.
  38755. </p></dd>
  38756. <dt>&lsquo;<samp>random</samp>&rsquo;</dt>
  38757. <dd><p>Set each output frame read-only or writable randomly.
  38758. </p></dd>
  38759. </dl>
  38760. </dd>
  38761. <dt><samp>seed</samp></dt>
  38762. <dd><p>Set the seed for the <var>random</var> mode, must be an integer included between
  38763. <code>0</code> and <code>UINT32_MAX</code>. If not specified, or if explicitly set to
  38764. <code>-1</code>, the filter will try to use a good random seed on a best effort
  38765. basis.
  38766. </p></dd>
  38767. </dl>
  38768. <p>Note: in case of auto-inserted filter between the permission filter and the
  38769. following one, the permission might not be received as expected in that
  38770. following filter. Inserting a <a href="#format">format</a> or <a href="#aformat">aformat</a> filter before the
  38771. perms/aperms filter can avoid this problem.
  38772. </p>
  38773. <a name="realtime_002c-arealtime"></a>
  38774. <h3 class="section">37.13 realtime, arealtime<span class="pull-right"><a class="anchor hidden-xs" href="#realtime_002c-arealtime" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-realtime_002c-arealtime" aria-hidden="true">TOC</a></span></h3>
  38775. <p>Slow down filtering to match real time approximately.
  38776. </p>
  38777. <p>These filters will pause the filtering for a variable amount of time to
  38778. match the output rate with the input timestamps.
  38779. They are similar to the <samp>re</samp> option to <code>ffmpeg</code>.
  38780. </p>
  38781. <p>They accept the following options:
  38782. </p>
  38783. <dl compact="compact">
  38784. <dt><samp>limit</samp></dt>
  38785. <dd><p>Time limit for the pauses. Any pause longer than that will be considered
  38786. a timestamp discontinuity and reset the timer. Default is 2 seconds.
  38787. </p></dd>
  38788. <dt><samp>speed</samp></dt>
  38789. <dd><p>Speed factor for processing. The value must be a float larger than zero.
  38790. Values larger than 1.0 will result in faster than realtime processing,
  38791. smaller will slow processing down. The <var>limit</var> is automatically adapted
  38792. accordingly. Default is 1.0.
  38793. </p>
  38794. <p>A processing speed faster than what is possible without these filters cannot
  38795. be achieved.
  38796. </p></dd>
  38797. </dl>
  38798. <span id="select"></span><a name="select_002c-aselect"></a>
  38799. <h3 class="section">37.14 select, aselect<span class="pull-right"><a class="anchor hidden-xs" href="#select_002c-aselect" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-select_002c-aselect" aria-hidden="true">TOC</a></span></h3>
  38800. <p>Select frames to pass in output.
  38801. </p>
  38802. <p>This filter accepts the following options:
  38803. </p>
  38804. <dl compact="compact">
  38805. <dt><samp>expr, e</samp></dt>
  38806. <dd><p>Set expression, which is evaluated for each input frame.
  38807. </p>
  38808. <p>If the expression is evaluated to zero, the frame is discarded.
  38809. </p>
  38810. <p>If the evaluation result is negative or NaN, the frame is sent to the
  38811. first output; otherwise it is sent to the output with index
  38812. <code>ceil(val)-1</code>, assuming that the input index starts from 0.
  38813. </p>
  38814. <p>For example a value of <code>1.2</code> corresponds to the output with index
  38815. <code>ceil(1.2)-1 = 2-1 = 1</code>, that is the second output.
  38816. </p>
  38817. </dd>
  38818. <dt><samp>outputs, n</samp></dt>
  38819. <dd><p>Set the number of outputs. The output to which to send the selected
  38820. frame is based on the result of the evaluation. Default value is 1.
  38821. </p></dd>
  38822. </dl>
  38823. <p>The expression can contain the following constants:
  38824. </p>
  38825. <dl compact="compact">
  38826. <dt><samp>n</samp></dt>
  38827. <dd><p>The (sequential) number of the filtered frame, starting from 0.
  38828. </p>
  38829. </dd>
  38830. <dt><samp>selected_n</samp></dt>
  38831. <dd><p>The (sequential) number of the selected frame, starting from 0.
  38832. </p>
  38833. </dd>
  38834. <dt><samp>prev_selected_n</samp></dt>
  38835. <dd><p>The sequential number of the last selected frame. It&rsquo;s NAN if undefined.
  38836. </p>
  38837. </dd>
  38838. <dt><samp>TB</samp></dt>
  38839. <dd><p>The timebase of the input timestamps.
  38840. </p>
  38841. </dd>
  38842. <dt><samp>pts</samp></dt>
  38843. <dd><p>The PTS (Presentation TimeStamp) of the filtered video frame,
  38844. expressed in <var>TB</var> units. It&rsquo;s NAN if undefined.
  38845. </p>
  38846. </dd>
  38847. <dt><samp>t</samp></dt>
  38848. <dd><p>The PTS of the filtered video frame,
  38849. expressed in seconds. It&rsquo;s NAN if undefined.
  38850. </p>
  38851. </dd>
  38852. <dt><samp>prev_pts</samp></dt>
  38853. <dd><p>The PTS of the previously filtered video frame. It&rsquo;s NAN if undefined.
  38854. </p>
  38855. </dd>
  38856. <dt><samp>prev_selected_pts</samp></dt>
  38857. <dd><p>The PTS of the last previously filtered video frame. It&rsquo;s NAN if undefined.
  38858. </p>
  38859. </dd>
  38860. <dt><samp>prev_selected_t</samp></dt>
  38861. <dd><p>The PTS of the last previously selected video frame, expressed in seconds. It&rsquo;s NAN if undefined.
  38862. </p>
  38863. </dd>
  38864. <dt><samp>start_pts</samp></dt>
  38865. <dd><p>The PTS of the first video frame in the video. It&rsquo;s NAN if undefined.
  38866. </p>
  38867. </dd>
  38868. <dt><samp>start_t</samp></dt>
  38869. <dd><p>The time of the first video frame in the video. It&rsquo;s NAN if undefined.
  38870. </p>
  38871. </dd>
  38872. <dt><samp>pict_type <em>(video only)</em></samp></dt>
  38873. <dd><p>The type of the filtered frame. It can assume one of the following
  38874. values:
  38875. </p><dl compact="compact">
  38876. <dt><samp>I</samp></dt>
  38877. <dt><samp>P</samp></dt>
  38878. <dt><samp>B</samp></dt>
  38879. <dt><samp>S</samp></dt>
  38880. <dt><samp>SI</samp></dt>
  38881. <dt><samp>SP</samp></dt>
  38882. <dt><samp>BI</samp></dt>
  38883. </dl>
  38884. </dd>
  38885. <dt><samp>interlace_type <em>(video only)</em></samp></dt>
  38886. <dd><p>The frame interlace type. It can assume one of the following values:
  38887. </p><dl compact="compact">
  38888. <dt><samp>PROGRESSIVE</samp></dt>
  38889. <dd><p>The frame is progressive (not interlaced).
  38890. </p></dd>
  38891. <dt><samp>TOPFIRST</samp></dt>
  38892. <dd><p>The frame is top-field-first.
  38893. </p></dd>
  38894. <dt><samp>BOTTOMFIRST</samp></dt>
  38895. <dd><p>The frame is bottom-field-first.
  38896. </p></dd>
  38897. </dl>
  38898. </dd>
  38899. <dt><samp>consumed_sample_n <em>(audio only)</em></samp></dt>
  38900. <dd><p>the number of selected samples before the current frame
  38901. </p>
  38902. </dd>
  38903. <dt><samp>samples_n <em>(audio only)</em></samp></dt>
  38904. <dd><p>the number of samples in the current frame
  38905. </p>
  38906. </dd>
  38907. <dt><samp>sample_rate <em>(audio only)</em></samp></dt>
  38908. <dd><p>the input sample rate
  38909. </p>
  38910. </dd>
  38911. <dt><samp>key</samp></dt>
  38912. <dd><p>This is 1 if the filtered frame is a key-frame, 0 otherwise.
  38913. </p>
  38914. </dd>
  38915. <dt><samp>pos</samp></dt>
  38916. <dd><p>the position in the file of the filtered frame, -1 if the information
  38917. is not available (e.g. for synthetic video)
  38918. </p>
  38919. </dd>
  38920. <dt><samp>scene <em>(video only)</em></samp></dt>
  38921. <dd><p>value between 0 and 1 to indicate a new scene; a low value reflects a low
  38922. probability for the current frame to introduce a new scene, while a higher
  38923. value means the current frame is more likely to be one (see the example below)
  38924. </p>
  38925. </dd>
  38926. <dt><samp>concatdec_select</samp></dt>
  38927. <dd><p>The concat demuxer can select only part of a concat input file by setting an
  38928. inpoint and an outpoint, but the output packets may not be entirely contained
  38929. in the selected interval. By using this variable, it is possible to skip frames
  38930. generated by the concat demuxer which are not exactly contained in the selected
  38931. interval.
  38932. </p>
  38933. <p>This works by comparing the frame pts against the <var>lavf.concat.start_time</var>
  38934. and the <var>lavf.concat.duration</var> packet metadata values which are also
  38935. present in the decoded frames.
  38936. </p>
  38937. <p>The <var>concatdec_select</var> variable is -1 if the frame pts is at least
  38938. start_time and either the duration metadata is missing or the frame pts is less
  38939. than start_time + duration, 0 otherwise, and NaN if the start_time metadata is
  38940. missing.
  38941. </p>
  38942. <p>That basically means that an input frame is selected if its pts is within the
  38943. interval set by the concat demuxer.
  38944. </p>
  38945. </dd>
  38946. </dl>
  38947. <p>The default value of the select expression is &quot;1&quot;.
  38948. </p>
  38949. <a name="Examples-156"></a>
  38950. <h4 class="subsection">37.14.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-156" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-156" aria-hidden="true">TOC</a></span></h4>
  38951. <ul>
  38952. <li> Select all frames in input:
  38953. <div class="example">
  38954. <pre class="example">select
  38955. </pre></div>
  38956. <p>The example above is the same as:
  38957. </p><div class="example">
  38958. <pre class="example">select=1
  38959. </pre></div>
  38960. </li><li> Skip all frames:
  38961. <div class="example">
  38962. <pre class="example">select=0
  38963. </pre></div>
  38964. </li><li> Select only I-frames:
  38965. <div class="example">
  38966. <pre class="example">select='eq(pict_type\,I)'
  38967. </pre></div>
  38968. </li><li> Select one frame every 100:
  38969. <div class="example">
  38970. <pre class="example">select='not(mod(n\,100))'
  38971. </pre></div>
  38972. </li><li> Select only frames contained in the 10-20 time interval:
  38973. <div class="example">
  38974. <pre class="example">select=between(t\,10\,20)
  38975. </pre></div>
  38976. </li><li> Select only I-frames contained in the 10-20 time interval:
  38977. <div class="example">
  38978. <pre class="example">select=between(t\,10\,20)*eq(pict_type\,I)
  38979. </pre></div>
  38980. </li><li> Select frames with a minimum distance of 10 seconds:
  38981. <div class="example">
  38982. <pre class="example">select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
  38983. </pre></div>
  38984. </li><li> Use aselect to select only audio frames with samples number &gt; 100:
  38985. <div class="example">
  38986. <pre class="example">aselect='gt(samples_n\,100)'
  38987. </pre></div>
  38988. </li><li> Create a mosaic of the first scenes:
  38989. <div class="example">
  38990. <pre class="example">ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
  38991. </pre></div>
  38992. <p>Comparing <var>scene</var> against a value between 0.3 and 0.5 is generally a sane
  38993. choice.
  38994. </p>
  38995. </li><li> Send even and odd frames to separate outputs, and compose them:
  38996. <div class="example">
  38997. <pre class="example">select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
  38998. </pre></div>
  38999. </li><li> Select useful frames from an ffconcat file which is using inpoints and
  39000. outpoints but where the source files are not intra frame only.
  39001. <div class="example">
  39002. <pre class="example">ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi
  39003. </pre></div>
  39004. </li></ul>
  39005. <a name="sendcmd_002c-asendcmd"></a>
  39006. <h3 class="section">37.15 sendcmd, asendcmd<span class="pull-right"><a class="anchor hidden-xs" href="#sendcmd_002c-asendcmd" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sendcmd_002c-asendcmd" aria-hidden="true">TOC</a></span></h3>
  39007. <p>Send commands to filters in the filtergraph.
  39008. </p>
  39009. <p>These filters read commands to be sent to other filters in the
  39010. filtergraph.
  39011. </p>
  39012. <p><code>sendcmd</code> must be inserted between two video filters,
  39013. <code>asendcmd</code> must be inserted between two audio filters, but apart
  39014. from that they act the same way.
  39015. </p>
  39016. <p>The specification of commands can be provided in the filter arguments
  39017. with the <var>commands</var> option, or in a file specified by the
  39018. <var>filename</var> option.
  39019. </p>
  39020. <p>These filters accept the following options:
  39021. </p><dl compact="compact">
  39022. <dt><samp>commands, c</samp></dt>
  39023. <dd><p>Set the commands to be read and sent to the other filters.
  39024. </p></dd>
  39025. <dt><samp>filename, f</samp></dt>
  39026. <dd><p>Set the filename of the commands to be read and sent to the other
  39027. filters.
  39028. </p></dd>
  39029. </dl>
  39030. <a name="Commands-syntax"></a>
  39031. <h4 class="subsection">37.15.1 Commands syntax<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-syntax" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-syntax" aria-hidden="true">TOC</a></span></h4>
  39032. <p>A commands description consists of a sequence of interval
  39033. specifications, comprising a list of commands to be executed when a
  39034. particular event related to that interval occurs. The occurring event
  39035. is typically the current frame time entering or leaving a given time
  39036. interval.
  39037. </p>
  39038. <p>An interval is specified by the following syntax:
  39039. </p><div class="example">
  39040. <pre class="example"><var>START</var>[-<var>END</var>] <var>COMMANDS</var>;
  39041. </pre></div>
  39042. <p>The time interval is specified by the <var>START</var> and <var>END</var> times.
  39043. <var>END</var> is optional and defaults to the maximum time.
  39044. </p>
  39045. <p>The current frame time is considered within the specified interval if
  39046. it is included in the interval [<var>START</var>, <var>END</var>), that is when
  39047. the time is greater or equal to <var>START</var> and is lesser than
  39048. <var>END</var>.
  39049. </p>
  39050. <p><var>COMMANDS</var> consists of a sequence of one or more command
  39051. specifications, separated by &quot;,&quot;, relating to that interval. The
  39052. syntax of a command specification is given by:
  39053. </p><div class="example">
  39054. <pre class="example">[<var>FLAGS</var>] <var>TARGET</var> <var>COMMAND</var> <var>ARG</var>
  39055. </pre></div>
  39056. <p><var>FLAGS</var> is optional and specifies the type of events relating to
  39057. the time interval which enable sending the specified command, and must
  39058. be a non-null sequence of identifier flags separated by &quot;+&quot; or &quot;|&quot; and
  39059. enclosed between &quot;[&quot; and &quot;]&quot;.
  39060. </p>
  39061. <p>The following flags are recognized:
  39062. </p><dl compact="compact">
  39063. <dt><samp>enter</samp></dt>
  39064. <dd><p>The command is sent when the current frame timestamp enters the
  39065. specified interval. In other words, the command is sent when the
  39066. previous frame timestamp was not in the given interval, and the
  39067. current is.
  39068. </p>
  39069. </dd>
  39070. <dt><samp>leave</samp></dt>
  39071. <dd><p>The command is sent when the current frame timestamp leaves the
  39072. specified interval. In other words, the command is sent when the
  39073. previous frame timestamp was in the given interval, and the
  39074. current is not.
  39075. </p>
  39076. </dd>
  39077. <dt><samp>expr</samp></dt>
  39078. <dd><p>The command <var>ARG</var> is interpreted as expression and result of
  39079. expression is passed as <var>ARG</var>.
  39080. </p>
  39081. <p>The expression is evaluated through the eval API and can contain the following
  39082. constants:
  39083. </p>
  39084. <dl compact="compact">
  39085. <dt><samp>POS</samp></dt>
  39086. <dd><p>Original position in the file of the frame, or undefined if undefined
  39087. for the current frame.
  39088. </p>
  39089. </dd>
  39090. <dt><samp>PTS</samp></dt>
  39091. <dd><p>The presentation timestamp in input.
  39092. </p>
  39093. </dd>
  39094. <dt><samp>N</samp></dt>
  39095. <dd><p>The count of the input frame for video or audio, starting from 0.
  39096. </p>
  39097. </dd>
  39098. <dt><samp>T</samp></dt>
  39099. <dd><p>The time in seconds of the current frame.
  39100. </p>
  39101. </dd>
  39102. <dt><samp>TS</samp></dt>
  39103. <dd><p>The start time in seconds of the current command interval.
  39104. </p>
  39105. </dd>
  39106. <dt><samp>TE</samp></dt>
  39107. <dd><p>The end time in seconds of the current command interval.
  39108. </p>
  39109. </dd>
  39110. <dt><samp>TI</samp></dt>
  39111. <dd><p>The interpolated time of the current command interval, TI = (T - TS) / (TE - TS).
  39112. </p></dd>
  39113. </dl>
  39114. </dd>
  39115. </dl>
  39116. <p>If <var>FLAGS</var> is not specified, a default value of <code>[enter]</code> is
  39117. assumed.
  39118. </p>
  39119. <p><var>TARGET</var> specifies the target of the command, usually the name of
  39120. the filter class or a specific filter instance name.
  39121. </p>
  39122. <p><var>COMMAND</var> specifies the name of the command for the target filter.
  39123. </p>
  39124. <p><var>ARG</var> is optional and specifies the optional list of argument for
  39125. the given <var>COMMAND</var>.
  39126. </p>
  39127. <p>Between one interval specification and another, whitespaces, or
  39128. sequences of characters starting with <code>#</code> until the end of line,
  39129. are ignored and can be used to annotate comments.
  39130. </p>
  39131. <p>A simplified BNF description of the commands specification syntax
  39132. follows:
  39133. </p><div class="example">
  39134. <pre class="example"><var>COMMAND_FLAG</var> ::= &quot;enter&quot; | &quot;leave&quot;
  39135. <var>COMMAND_FLAGS</var> ::= <var>COMMAND_FLAG</var> [(+|&quot;|&quot;)<var>COMMAND_FLAG</var>]
  39136. <var>COMMAND</var> ::= [&quot;[&quot; <var>COMMAND_FLAGS</var> &quot;]&quot;] <var>TARGET</var> <var>COMMAND</var> [<var>ARG</var>]
  39137. <var>COMMANDS</var> ::= <var>COMMAND</var> [,<var>COMMANDS</var>]
  39138. <var>INTERVAL</var> ::= <var>START</var>[-<var>END</var>] <var>COMMANDS</var>
  39139. <var>INTERVALS</var> ::= <var>INTERVAL</var>[;<var>INTERVALS</var>]
  39140. </pre></div>
  39141. <a name="Examples-157"></a>
  39142. <h4 class="subsection">37.15.2 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-157" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-157" aria-hidden="true">TOC</a></span></h4>
  39143. <ul>
  39144. <li> Specify audio tempo change at second 4:
  39145. <div class="example">
  39146. <pre class="example">asendcmd=c='4.0 atempo tempo 1.5',atempo
  39147. </pre></div>
  39148. </li><li> Target a specific filter instance:
  39149. <div class="example">
  39150. <pre class="example">asendcmd=c='4.0 atempo@my tempo 1.5',atempo@my
  39151. </pre></div>
  39152. </li><li> Specify a list of drawtext and hue commands in a file.
  39153. <div class="example">
  39154. <pre class="example"># show text in the interval 5-10
  39155. 5.0-10.0 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=hello world',
  39156. [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=';
  39157. # desaturate the image in the interval 15-20
  39158. 15.0-20.0 [enter] hue s 0,
  39159. [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=nocolor',
  39160. [leave] hue s 1,
  39161. [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=color';
  39162. # apply an exponential saturation fade-out effect, starting from time 25
  39163. 25 [enter] hue s exp(25-t)
  39164. </pre></div>
  39165. <p>A filtergraph allowing to read and process the above command list
  39166. stored in a file <samp>test.cmd</samp>, can be specified with:
  39167. </p><div class="example">
  39168. <pre class="example">sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text='',hue
  39169. </pre></div>
  39170. </li></ul>
  39171. <span id="setpts"></span><a name="setpts_002c-asetpts"></a>
  39172. <h3 class="section">37.16 setpts, asetpts<span class="pull-right"><a class="anchor hidden-xs" href="#setpts_002c-asetpts" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-setpts_002c-asetpts" aria-hidden="true">TOC</a></span></h3>
  39173. <p>Change the PTS (presentation timestamp) of the input frames.
  39174. </p>
  39175. <p><code>setpts</code> works on video frames, <code>asetpts</code> on audio frames.
  39176. </p>
  39177. <p>This filter accepts the following options:
  39178. </p>
  39179. <dl compact="compact">
  39180. <dt><samp>expr</samp></dt>
  39181. <dd><p>The expression which is evaluated for each frame to construct its timestamp.
  39182. </p>
  39183. </dd>
  39184. </dl>
  39185. <p>The expression is evaluated through the eval API and can contain the following
  39186. constants:
  39187. </p>
  39188. <dl compact="compact">
  39189. <dt><samp>FRAME_RATE, FR</samp></dt>
  39190. <dd><p>frame rate, only defined for constant frame-rate video
  39191. </p>
  39192. </dd>
  39193. <dt><samp>PTS</samp></dt>
  39194. <dd><p>The presentation timestamp in input
  39195. </p>
  39196. </dd>
  39197. <dt><samp>N</samp></dt>
  39198. <dd><p>The count of the input frame for video or the number of consumed samples,
  39199. not including the current frame for audio, starting from 0.
  39200. </p>
  39201. </dd>
  39202. <dt><samp>NB_CONSUMED_SAMPLES</samp></dt>
  39203. <dd><p>The number of consumed samples, not including the current frame (only
  39204. audio)
  39205. </p>
  39206. </dd>
  39207. <dt><samp>NB_SAMPLES, S</samp></dt>
  39208. <dd><p>The number of samples in the current frame (only audio)
  39209. </p>
  39210. </dd>
  39211. <dt><samp>SAMPLE_RATE, SR</samp></dt>
  39212. <dd><p>The audio sample rate.
  39213. </p>
  39214. </dd>
  39215. <dt><samp>STARTPTS</samp></dt>
  39216. <dd><p>The PTS of the first frame.
  39217. </p>
  39218. </dd>
  39219. <dt><samp>STARTT</samp></dt>
  39220. <dd><p>the time in seconds of the first frame
  39221. </p>
  39222. </dd>
  39223. <dt><samp>INTERLACED</samp></dt>
  39224. <dd><p>State whether the current frame is interlaced.
  39225. </p>
  39226. </dd>
  39227. <dt><samp>T</samp></dt>
  39228. <dd><p>the time in seconds of the current frame
  39229. </p>
  39230. </dd>
  39231. <dt><samp>POS</samp></dt>
  39232. <dd><p>original position in the file of the frame, or undefined if undefined
  39233. for the current frame
  39234. </p>
  39235. </dd>
  39236. <dt><samp>PREV_INPTS</samp></dt>
  39237. <dd><p>The previous input PTS.
  39238. </p>
  39239. </dd>
  39240. <dt><samp>PREV_INT</samp></dt>
  39241. <dd><p>previous input time in seconds
  39242. </p>
  39243. </dd>
  39244. <dt><samp>PREV_OUTPTS</samp></dt>
  39245. <dd><p>The previous output PTS.
  39246. </p>
  39247. </dd>
  39248. <dt><samp>PREV_OUTT</samp></dt>
  39249. <dd><p>previous output time in seconds
  39250. </p>
  39251. </dd>
  39252. <dt><samp>RTCTIME</samp></dt>
  39253. <dd><p>The wallclock (RTC) time in microseconds. This is deprecated, use time(0)
  39254. instead.
  39255. </p>
  39256. </dd>
  39257. <dt><samp>RTCSTART</samp></dt>
  39258. <dd><p>The wallclock (RTC) time at the start of the movie in microseconds.
  39259. </p>
  39260. </dd>
  39261. <dt><samp>TB</samp></dt>
  39262. <dd><p>The timebase of the input timestamps.
  39263. </p>
  39264. </dd>
  39265. </dl>
  39266. <a name="Examples-158"></a>
  39267. <h4 class="subsection">37.16.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-158" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-158" aria-hidden="true">TOC</a></span></h4>
  39268. <ul>
  39269. <li> Start counting PTS from zero
  39270. <div class="example">
  39271. <pre class="example">setpts=PTS-STARTPTS
  39272. </pre></div>
  39273. </li><li> Apply fast motion effect:
  39274. <div class="example">
  39275. <pre class="example">setpts=0.5*PTS
  39276. </pre></div>
  39277. </li><li> Apply slow motion effect:
  39278. <div class="example">
  39279. <pre class="example">setpts=2.0*PTS
  39280. </pre></div>
  39281. </li><li> Set fixed rate of 25 frames per second:
  39282. <div class="example">
  39283. <pre class="example">setpts=N/(25*TB)
  39284. </pre></div>
  39285. </li><li> Set fixed rate 25 fps with some jitter:
  39286. <div class="example">
  39287. <pre class="example">setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
  39288. </pre></div>
  39289. </li><li> Apply an offset of 10 seconds to the input PTS:
  39290. <div class="example">
  39291. <pre class="example">setpts=PTS+10/TB
  39292. </pre></div>
  39293. </li><li> Generate timestamps from a &quot;live source&quot; and rebase onto the current timebase:
  39294. <div class="example">
  39295. <pre class="example">setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
  39296. </pre></div>
  39297. </li><li> Generate timestamps by counting samples:
  39298. <div class="example">
  39299. <pre class="example">asetpts=N/SR/TB
  39300. </pre></div>
  39301. </li></ul>
  39302. <a name="setrange"></a>
  39303. <h3 class="section">37.17 setrange<span class="pull-right"><a class="anchor hidden-xs" href="#setrange" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-setrange" aria-hidden="true">TOC</a></span></h3>
  39304. <p>Force color range for the output video frame.
  39305. </p>
  39306. <p>The <code>setrange</code> filter marks the color range property for the
  39307. output frames. It does not change the input frame, but only sets the
  39308. corresponding property, which affects how the frame is treated by
  39309. following filters.
  39310. </p>
  39311. <p>The filter accepts the following options:
  39312. </p>
  39313. <dl compact="compact">
  39314. <dt><samp>range</samp></dt>
  39315. <dd><p>Available values are:
  39316. </p>
  39317. <dl compact="compact">
  39318. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  39319. <dd><p>Keep the same color range property.
  39320. </p>
  39321. </dd>
  39322. <dt>&lsquo;<samp>unspecified, unknown</samp>&rsquo;</dt>
  39323. <dd><p>Set the color range as unspecified.
  39324. </p>
  39325. </dd>
  39326. <dt>&lsquo;<samp>limited, tv, mpeg</samp>&rsquo;</dt>
  39327. <dd><p>Set the color range as limited.
  39328. </p>
  39329. </dd>
  39330. <dt>&lsquo;<samp>full, pc, jpeg</samp>&rsquo;</dt>
  39331. <dd><p>Set the color range as full.
  39332. </p></dd>
  39333. </dl>
  39334. </dd>
  39335. </dl>
  39336. <a name="settb_002c-asettb"></a>
  39337. <h3 class="section">37.18 settb, asettb<span class="pull-right"><a class="anchor hidden-xs" href="#settb_002c-asettb" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-settb_002c-asettb" aria-hidden="true">TOC</a></span></h3>
  39338. <p>Set the timebase to use for the output frames timestamps.
  39339. It is mainly useful for testing timebase configuration.
  39340. </p>
  39341. <p>It accepts the following parameters:
  39342. </p>
  39343. <dl compact="compact">
  39344. <dt><samp>expr, tb</samp></dt>
  39345. <dd><p>The expression which is evaluated into the output timebase.
  39346. </p>
  39347. </dd>
  39348. </dl>
  39349. <p>The value for <samp>tb</samp> is an arithmetic expression representing a
  39350. rational. The expression can contain the constants &quot;AVTB&quot; (the default
  39351. timebase), &quot;intb&quot; (the input timebase) and &quot;sr&quot; (the sample rate,
  39352. audio only). Default value is &quot;intb&quot;.
  39353. </p>
  39354. <a name="Examples-159"></a>
  39355. <h4 class="subsection">37.18.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-159" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-159" aria-hidden="true">TOC</a></span></h4>
  39356. <ul>
  39357. <li> Set the timebase to 1/25:
  39358. <div class="example">
  39359. <pre class="example">settb=expr=1/25
  39360. </pre></div>
  39361. </li><li> Set the timebase to 1/10:
  39362. <div class="example">
  39363. <pre class="example">settb=expr=0.1
  39364. </pre></div>
  39365. </li><li> Set the timebase to 1001/1000:
  39366. <div class="example">
  39367. <pre class="example">settb=1+0.001
  39368. </pre></div>
  39369. </li><li> Set the timebase to 2*intb:
  39370. <div class="example">
  39371. <pre class="example">settb=2*intb
  39372. </pre></div>
  39373. </li><li> Set the default timebase value:
  39374. <div class="example">
  39375. <pre class="example">settb=AVTB
  39376. </pre></div>
  39377. </li></ul>
  39378. <a name="showcqt"></a>
  39379. <h3 class="section">37.19 showcqt<span class="pull-right"><a class="anchor hidden-xs" href="#showcqt" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showcqt" aria-hidden="true">TOC</a></span></h3>
  39380. <p>Convert input audio to a video output representing frequency spectrum
  39381. logarithmically using Brown-Puckette constant Q transform algorithm with
  39382. direct frequency domain coefficient calculation (but the transform itself
  39383. is not really constant Q, instead the Q factor is actually variable/clamped),
  39384. with musical tone scale, from E0 to D#10.
  39385. </p>
  39386. <p>The filter accepts the following options:
  39387. </p>
  39388. <dl compact="compact">
  39389. <dt><samp>size, s</samp></dt>
  39390. <dd><p>Specify the video size for the output. It must be even. For the syntax of this option,
  39391. check the <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  39392. Default value is <code>1920x1080</code>.
  39393. </p>
  39394. </dd>
  39395. <dt><samp>fps, rate, r</samp></dt>
  39396. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  39397. </p>
  39398. </dd>
  39399. <dt><samp>bar_h</samp></dt>
  39400. <dd><p>Set the bargraph height. It must be even. Default value is <code>-1</code> which
  39401. computes the bargraph height automatically.
  39402. </p>
  39403. </dd>
  39404. <dt><samp>axis_h</samp></dt>
  39405. <dd><p>Set the axis height. It must be even. Default value is <code>-1</code> which computes
  39406. the axis height automatically.
  39407. </p>
  39408. </dd>
  39409. <dt><samp>sono_h</samp></dt>
  39410. <dd><p>Set the sonogram height. It must be even. Default value is <code>-1</code> which
  39411. computes the sonogram height automatically.
  39412. </p>
  39413. </dd>
  39414. <dt><samp>fullhd</samp></dt>
  39415. <dd><p>Set the fullhd resolution. This option is deprecated, use <var>size</var>, <var>s</var>
  39416. instead. Default value is <code>1</code>.
  39417. </p>
  39418. </dd>
  39419. <dt><samp>sono_v, volume</samp></dt>
  39420. <dd><p>Specify the sonogram volume expression. It can contain variables:
  39421. </p><dl compact="compact">
  39422. <dt><samp>bar_v</samp></dt>
  39423. <dd><p>the <var>bar_v</var> evaluated expression
  39424. </p></dd>
  39425. <dt><samp>frequency, freq, f</samp></dt>
  39426. <dd><p>the frequency where it is evaluated
  39427. </p></dd>
  39428. <dt><samp>timeclamp, tc</samp></dt>
  39429. <dd><p>the value of <var>timeclamp</var> option
  39430. </p></dd>
  39431. </dl>
  39432. <p>and functions:
  39433. </p><dl compact="compact">
  39434. <dt><samp>a_weighting(f)</samp></dt>
  39435. <dd><p>A-weighting of equal loudness
  39436. </p></dd>
  39437. <dt><samp>b_weighting(f)</samp></dt>
  39438. <dd><p>B-weighting of equal loudness
  39439. </p></dd>
  39440. <dt><samp>c_weighting(f)</samp></dt>
  39441. <dd><p>C-weighting of equal loudness.
  39442. </p></dd>
  39443. </dl>
  39444. <p>Default value is <code>16</code>.
  39445. </p>
  39446. </dd>
  39447. <dt><samp>bar_v, volume2</samp></dt>
  39448. <dd><p>Specify the bargraph volume expression. It can contain variables:
  39449. </p><dl compact="compact">
  39450. <dt><samp>sono_v</samp></dt>
  39451. <dd><p>the <var>sono_v</var> evaluated expression
  39452. </p></dd>
  39453. <dt><samp>frequency, freq, f</samp></dt>
  39454. <dd><p>the frequency where it is evaluated
  39455. </p></dd>
  39456. <dt><samp>timeclamp, tc</samp></dt>
  39457. <dd><p>the value of <var>timeclamp</var> option
  39458. </p></dd>
  39459. </dl>
  39460. <p>and functions:
  39461. </p><dl compact="compact">
  39462. <dt><samp>a_weighting(f)</samp></dt>
  39463. <dd><p>A-weighting of equal loudness
  39464. </p></dd>
  39465. <dt><samp>b_weighting(f)</samp></dt>
  39466. <dd><p>B-weighting of equal loudness
  39467. </p></dd>
  39468. <dt><samp>c_weighting(f)</samp></dt>
  39469. <dd><p>C-weighting of equal loudness.
  39470. </p></dd>
  39471. </dl>
  39472. <p>Default value is <code>sono_v</code>.
  39473. </p>
  39474. </dd>
  39475. <dt><samp>sono_g, gamma</samp></dt>
  39476. <dd><p>Specify the sonogram gamma. Lower gamma makes the spectrum more contrast,
  39477. higher gamma makes the spectrum having more range. Default value is <code>3</code>.
  39478. Acceptable range is <code>[1, 7]</code>.
  39479. </p>
  39480. </dd>
  39481. <dt><samp>bar_g, gamma2</samp></dt>
  39482. <dd><p>Specify the bargraph gamma. Default value is <code>1</code>. Acceptable range is
  39483. <code>[1, 7]</code>.
  39484. </p>
  39485. </dd>
  39486. <dt><samp>bar_t</samp></dt>
  39487. <dd><p>Specify the bargraph transparency level. Lower value makes the bargraph sharper.
  39488. Default value is <code>1</code>. Acceptable range is <code>[0, 1]</code>.
  39489. </p>
  39490. </dd>
  39491. <dt><samp>timeclamp, tc</samp></dt>
  39492. <dd><p>Specify the transform timeclamp. At low frequency, there is trade-off between
  39493. accuracy in time domain and frequency domain. If timeclamp is lower,
  39494. event in time domain is represented more accurately (such as fast bass drum),
  39495. otherwise event in frequency domain is represented more accurately
  39496. (such as bass guitar). Acceptable range is <code>[0.002, 1]</code>. Default value is <code>0.17</code>.
  39497. </p>
  39498. </dd>
  39499. <dt><samp>attack</samp></dt>
  39500. <dd><p>Set attack time in seconds. The default is <code>0</code> (disabled). Otherwise, it
  39501. limits future samples by applying asymmetric windowing in time domain, useful
  39502. when low latency is required. Accepted range is <code>[0, 1]</code>.
  39503. </p>
  39504. </dd>
  39505. <dt><samp>basefreq</samp></dt>
  39506. <dd><p>Specify the transform base frequency. Default value is <code>20.01523126408007475</code>,
  39507. which is frequency 50 cents below E0. Acceptable range is <code>[10, 100000]</code>.
  39508. </p>
  39509. </dd>
  39510. <dt><samp>endfreq</samp></dt>
  39511. <dd><p>Specify the transform end frequency. Default value is <code>20495.59681441799654</code>,
  39512. which is frequency 50 cents above D#10. Acceptable range is <code>[10, 100000]</code>.
  39513. </p>
  39514. </dd>
  39515. <dt><samp>coeffclamp</samp></dt>
  39516. <dd><p>This option is deprecated and ignored.
  39517. </p>
  39518. </dd>
  39519. <dt><samp>tlength</samp></dt>
  39520. <dd><p>Specify the transform length in time domain. Use this option to control accuracy
  39521. trade-off between time domain and frequency domain at every frequency sample.
  39522. It can contain variables:
  39523. </p><dl compact="compact">
  39524. <dt><samp>frequency, freq, f</samp></dt>
  39525. <dd><p>the frequency where it is evaluated
  39526. </p></dd>
  39527. <dt><samp>timeclamp, tc</samp></dt>
  39528. <dd><p>the value of <var>timeclamp</var> option.
  39529. </p></dd>
  39530. </dl>
  39531. <p>Default value is <code>384*tc/(384+tc*f)</code>.
  39532. </p>
  39533. </dd>
  39534. <dt><samp>count</samp></dt>
  39535. <dd><p>Specify the transform count for every video frame. Default value is <code>6</code>.
  39536. Acceptable range is <code>[1, 30]</code>.
  39537. </p>
  39538. </dd>
  39539. <dt><samp>fcount</samp></dt>
  39540. <dd><p>Specify the transform count for every single pixel. Default value is <code>0</code>,
  39541. which makes it computed automatically. Acceptable range is <code>[0, 10]</code>.
  39542. </p>
  39543. </dd>
  39544. <dt><samp>fontfile</samp></dt>
  39545. <dd><p>Specify font file for use with freetype to draw the axis. If not specified,
  39546. use embedded font. Note that drawing with font file or embedded font is not
  39547. implemented with custom <var>basefreq</var> and <var>endfreq</var>, use <var>axisfile</var>
  39548. option instead.
  39549. </p>
  39550. </dd>
  39551. <dt><samp>font</samp></dt>
  39552. <dd><p>Specify fontconfig pattern. This has lower priority than <var>fontfile</var>. The
  39553. <code>:</code> in the pattern may be replaced by <code>|</code> to avoid unnecessary
  39554. escaping.
  39555. </p>
  39556. </dd>
  39557. <dt><samp>fontcolor</samp></dt>
  39558. <dd><p>Specify font color expression. This is arithmetic expression that should return
  39559. integer value 0xRRGGBB. It can contain variables:
  39560. </p><dl compact="compact">
  39561. <dt><samp>frequency, freq, f</samp></dt>
  39562. <dd><p>the frequency where it is evaluated
  39563. </p></dd>
  39564. <dt><samp>timeclamp, tc</samp></dt>
  39565. <dd><p>the value of <var>timeclamp</var> option
  39566. </p></dd>
  39567. </dl>
  39568. <p>and functions:
  39569. </p><dl compact="compact">
  39570. <dt><samp>midi(f)</samp></dt>
  39571. <dd><p>midi number of frequency f, some midi numbers: E0(16), C1(24), C2(36), A4(69)
  39572. </p></dd>
  39573. <dt><samp>r(x), g(x), b(x)</samp></dt>
  39574. <dd><p>red, green, and blue value of intensity x.
  39575. </p></dd>
  39576. </dl>
  39577. <p>Default value is <code>st(0, (midi(f)-59.5)/12);
  39578. st(1, if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0));
  39579. r(1-ld(1)) + b(ld(1))</code>.
  39580. </p>
  39581. </dd>
  39582. <dt><samp>axisfile</samp></dt>
  39583. <dd><p>Specify image file to draw the axis. This option override <var>fontfile</var> and
  39584. <var>fontcolor</var> option.
  39585. </p>
  39586. </dd>
  39587. <dt><samp>axis, text</samp></dt>
  39588. <dd><p>Enable/disable drawing text to the axis. If it is set to <code>0</code>, drawing to
  39589. the axis is disabled, ignoring <var>fontfile</var> and <var>axisfile</var> option.
  39590. Default value is <code>1</code>.
  39591. </p>
  39592. </dd>
  39593. <dt><samp>csp</samp></dt>
  39594. <dd><p>Set colorspace. The accepted values are:
  39595. </p><dl compact="compact">
  39596. <dt>&lsquo;<samp>unspecified</samp>&rsquo;</dt>
  39597. <dd><p>Unspecified (default)
  39598. </p>
  39599. </dd>
  39600. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  39601. <dd><p>BT.709
  39602. </p>
  39603. </dd>
  39604. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  39605. <dd><p>FCC
  39606. </p>
  39607. </dd>
  39608. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  39609. <dd><p>BT.470BG or BT.601-6 625
  39610. </p>
  39611. </dd>
  39612. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  39613. <dd><p>SMPTE-170M or BT.601-6 525
  39614. </p>
  39615. </dd>
  39616. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  39617. <dd><p>SMPTE-240M
  39618. </p>
  39619. </dd>
  39620. <dt>&lsquo;<samp>bt2020ncl</samp>&rsquo;</dt>
  39621. <dd><p>BT.2020 with non-constant luminance
  39622. </p>
  39623. </dd>
  39624. </dl>
  39625. </dd>
  39626. <dt><samp>cscheme</samp></dt>
  39627. <dd><p>Set spectrogram color scheme. This is list of floating point values with format
  39628. <code>left_r|left_g|left_b|right_r|right_g|right_b</code>.
  39629. The default is <code>1|0.5|0|0|0.5|1</code>.
  39630. </p>
  39631. </dd>
  39632. </dl>
  39633. <a name="Examples-160"></a>
  39634. <h4 class="subsection">37.19.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-160" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-160" aria-hidden="true">TOC</a></span></h4>
  39635. <ul>
  39636. <li> Playing audio while showing the spectrum:
  39637. <div class="example">
  39638. <pre class="example">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
  39639. </pre></div>
  39640. </li><li> Same as above, but with frame rate 30 fps:
  39641. <div class="example">
  39642. <pre class="example">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
  39643. </pre></div>
  39644. </li><li> Playing at 1280x720:
  39645. <div class="example">
  39646. <pre class="example">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]'
  39647. </pre></div>
  39648. </li><li> Disable sonogram display:
  39649. <div class="example">
  39650. <pre class="example">sono_h=0
  39651. </pre></div>
  39652. </li><li> A1 and its harmonics: A1, A2, (near)E3, A3:
  39653. <div class="example">
  39654. <pre class="example">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),
  39655. asplit[a][out1]; [a] showcqt [out0]'
  39656. </pre></div>
  39657. </li><li> Same as above, but with more accuracy in frequency domain:
  39658. <div class="example">
  39659. <pre class="example">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),
  39660. asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
  39661. </pre></div>
  39662. </li><li> Custom volume:
  39663. <div class="example">
  39664. <pre class="example">bar_v=10:sono_v=bar_v*a_weighting(f)
  39665. </pre></div>
  39666. </li><li> Custom gamma, now spectrum is linear to the amplitude.
  39667. <div class="example">
  39668. <pre class="example">bar_g=2:sono_g=2
  39669. </pre></div>
  39670. </li><li> Custom tlength equation:
  39671. <div class="example">
  39672. <pre class="example">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)))'
  39673. </pre></div>
  39674. </li><li> Custom fontcolor and fontfile, C-note is colored green, others are colored blue:
  39675. <div class="example">
  39676. <pre class="example">fontcolor='if(mod(floor(midi(f)+0.5),12), 0x0000FF, g(1))':fontfile=myfont.ttf
  39677. </pre></div>
  39678. </li><li> Custom font using fontconfig:
  39679. <div class="example">
  39680. <pre class="example">font='Courier New,Monospace,mono|bold'
  39681. </pre></div>
  39682. </li><li> Custom frequency range with custom axis using image file:
  39683. <div class="example">
  39684. <pre class="example">axisfile=myaxis.png:basefreq=40:endfreq=10000
  39685. </pre></div>
  39686. </li></ul>
  39687. <a name="showfreqs"></a>
  39688. <h3 class="section">37.20 showfreqs<span class="pull-right"><a class="anchor hidden-xs" href="#showfreqs" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showfreqs" aria-hidden="true">TOC</a></span></h3>
  39689. <p>Convert input audio to video output representing the audio power spectrum.
  39690. Audio amplitude is on Y-axis while frequency is on X-axis.
  39691. </p>
  39692. <p>The filter accepts the following options:
  39693. </p>
  39694. <dl compact="compact">
  39695. <dt><samp>size, s</samp></dt>
  39696. <dd><p>Specify size of video. For the syntax of this option, check the
  39697. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  39698. Default is <code>1024x512</code>.
  39699. </p>
  39700. </dd>
  39701. <dt><samp>mode</samp></dt>
  39702. <dd><p>Set display mode.
  39703. This set how each frequency bin will be represented.
  39704. </p>
  39705. <p>It accepts the following values:
  39706. </p><dl compact="compact">
  39707. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  39708. <dt>&lsquo;<samp>bar</samp>&rsquo;</dt>
  39709. <dt>&lsquo;<samp>dot</samp>&rsquo;</dt>
  39710. </dl>
  39711. <p>Default is <code>bar</code>.
  39712. </p>
  39713. </dd>
  39714. <dt><samp>ascale</samp></dt>
  39715. <dd><p>Set amplitude scale.
  39716. </p>
  39717. <p>It accepts the following values:
  39718. </p><dl compact="compact">
  39719. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  39720. <dd><p>Linear scale.
  39721. </p>
  39722. </dd>
  39723. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  39724. <dd><p>Square root scale.
  39725. </p>
  39726. </dd>
  39727. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  39728. <dd><p>Cubic root scale.
  39729. </p>
  39730. </dd>
  39731. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  39732. <dd><p>Logarithmic scale.
  39733. </p></dd>
  39734. </dl>
  39735. <p>Default is <code>log</code>.
  39736. </p>
  39737. </dd>
  39738. <dt><samp>fscale</samp></dt>
  39739. <dd><p>Set frequency scale.
  39740. </p>
  39741. <p>It accepts the following values:
  39742. </p><dl compact="compact">
  39743. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  39744. <dd><p>Linear scale.
  39745. </p>
  39746. </dd>
  39747. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  39748. <dd><p>Logarithmic scale.
  39749. </p>
  39750. </dd>
  39751. <dt>&lsquo;<samp>rlog</samp>&rsquo;</dt>
  39752. <dd><p>Reverse logarithmic scale.
  39753. </p></dd>
  39754. </dl>
  39755. <p>Default is <code>lin</code>.
  39756. </p>
  39757. </dd>
  39758. <dt><samp>win_size</samp></dt>
  39759. <dd><p>Set window size. Allowed range is from 16 to 65536.
  39760. </p>
  39761. <p>Default is <code>2048</code>
  39762. </p>
  39763. </dd>
  39764. <dt><samp>win_func</samp></dt>
  39765. <dd><p>Set windowing function.
  39766. </p>
  39767. <p>It accepts the following values:
  39768. </p><dl compact="compact">
  39769. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  39770. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  39771. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  39772. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  39773. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  39774. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  39775. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  39776. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  39777. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  39778. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  39779. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  39780. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  39781. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  39782. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  39783. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  39784. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  39785. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  39786. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  39787. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  39788. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  39789. </dl>
  39790. <p>Default is <code>hanning</code>.
  39791. </p>
  39792. </dd>
  39793. <dt><samp>overlap</samp></dt>
  39794. <dd><p>Set window overlap. In range <code>[0, 1]</code>. Default is <code>1</code>,
  39795. which means optimal overlap for selected window function will be picked.
  39796. </p>
  39797. </dd>
  39798. <dt><samp>averaging</samp></dt>
  39799. <dd><p>Set time averaging. Setting this to 0 will display current maximal peaks.
  39800. Default is <code>1</code>, which means time averaging is disabled.
  39801. </p>
  39802. </dd>
  39803. <dt><samp>colors</samp></dt>
  39804. <dd><p>Specify list of colors separated by space or by &rsquo;|&rsquo; which will be used to
  39805. draw channel frequencies. Unrecognized or missing colors will be replaced
  39806. by white color.
  39807. </p>
  39808. </dd>
  39809. <dt><samp>cmode</samp></dt>
  39810. <dd><p>Set channel display mode.
  39811. </p>
  39812. <p>It accepts the following values:
  39813. </p><dl compact="compact">
  39814. <dt>&lsquo;<samp>combined</samp>&rsquo;</dt>
  39815. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  39816. </dl>
  39817. <p>Default is <code>combined</code>.
  39818. </p>
  39819. </dd>
  39820. <dt><samp>minamp</samp></dt>
  39821. <dd><p>Set minimum amplitude used in <code>log</code> amplitude scaler.
  39822. </p>
  39823. </dd>
  39824. <dt><samp>data</samp></dt>
  39825. <dd><p>Set data display mode.
  39826. </p>
  39827. <p>It accepts the following values:
  39828. </p><dl compact="compact">
  39829. <dt>&lsquo;<samp>magnitude</samp>&rsquo;</dt>
  39830. <dt>&lsquo;<samp>phase</samp>&rsquo;</dt>
  39831. <dt>&lsquo;<samp>delay</samp>&rsquo;</dt>
  39832. </dl>
  39833. <p>Default is <code>magnitude</code>.
  39834. </p></dd>
  39835. </dl>
  39836. <a name="showspatial"></a>
  39837. <h3 class="section">37.21 showspatial<span class="pull-right"><a class="anchor hidden-xs" href="#showspatial" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showspatial" aria-hidden="true">TOC</a></span></h3>
  39838. <p>Convert stereo input audio to a video output, representing the spatial relationship
  39839. between two channels.
  39840. </p>
  39841. <p>The filter accepts the following options:
  39842. </p>
  39843. <dl compact="compact">
  39844. <dt><samp>size, s</samp></dt>
  39845. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  39846. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  39847. Default value is <code>512x512</code>.
  39848. </p>
  39849. </dd>
  39850. <dt><samp>win_size</samp></dt>
  39851. <dd><p>Set window size. Allowed range is from <var>1024</var> to <var>65536</var>. Default size is <var>4096</var>.
  39852. </p>
  39853. </dd>
  39854. <dt><samp>win_func</samp></dt>
  39855. <dd><p>Set window function.
  39856. </p>
  39857. <p>It accepts the following values:
  39858. </p><dl compact="compact">
  39859. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  39860. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  39861. <dt>&lsquo;<samp>hann</samp>&rsquo;</dt>
  39862. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  39863. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  39864. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  39865. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  39866. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  39867. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  39868. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  39869. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  39870. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  39871. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  39872. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  39873. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  39874. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  39875. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  39876. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  39877. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  39878. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  39879. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  39880. </dl>
  39881. <p>Default value is <code>hann</code>.
  39882. </p>
  39883. </dd>
  39884. <dt><samp>overlap</samp></dt>
  39885. <dd><p>Set ratio of overlap window. Default value is <code>0.5</code>.
  39886. When value is <code>1</code> overlap is set to recommended size for specific
  39887. window function currently used.
  39888. </p></dd>
  39889. </dl>
  39890. <span id="showspectrum"></span><a name="showspectrum-1"></a>
  39891. <h3 class="section">37.22 showspectrum<span class="pull-right"><a class="anchor hidden-xs" href="#showspectrum-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showspectrum-1" aria-hidden="true">TOC</a></span></h3>
  39892. <p>Convert input audio to a video output, representing the audio frequency
  39893. spectrum.
  39894. </p>
  39895. <p>The filter accepts the following options:
  39896. </p>
  39897. <dl compact="compact">
  39898. <dt><samp>size, s</samp></dt>
  39899. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  39900. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  39901. Default value is <code>640x512</code>.
  39902. </p>
  39903. </dd>
  39904. <dt><samp>slide</samp></dt>
  39905. <dd><p>Specify how the spectrum should slide along the window.
  39906. </p>
  39907. <p>It accepts the following values:
  39908. </p><dl compact="compact">
  39909. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  39910. <dd><p>the samples start again on the left when they reach the right
  39911. </p></dd>
  39912. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  39913. <dd><p>the samples scroll from right to left
  39914. </p></dd>
  39915. <dt>&lsquo;<samp>fullframe</samp>&rsquo;</dt>
  39916. <dd><p>frames are only produced when the samples reach the right
  39917. </p></dd>
  39918. <dt>&lsquo;<samp>rscroll</samp>&rsquo;</dt>
  39919. <dd><p>the samples scroll from left to right
  39920. </p></dd>
  39921. </dl>
  39922. <p>Default value is <code>replace</code>.
  39923. </p>
  39924. </dd>
  39925. <dt><samp>mode</samp></dt>
  39926. <dd><p>Specify display mode.
  39927. </p>
  39928. <p>It accepts the following values:
  39929. </p><dl compact="compact">
  39930. <dt>&lsquo;<samp>combined</samp>&rsquo;</dt>
  39931. <dd><p>all channels are displayed in the same row
  39932. </p></dd>
  39933. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  39934. <dd><p>all channels are displayed in separate rows
  39935. </p></dd>
  39936. </dl>
  39937. <p>Default value is &lsquo;<samp>combined</samp>&rsquo;.
  39938. </p>
  39939. </dd>
  39940. <dt><samp>color</samp></dt>
  39941. <dd><p>Specify display color mode.
  39942. </p>
  39943. <p>It accepts the following values:
  39944. </p><dl compact="compact">
  39945. <dt>&lsquo;<samp>channel</samp>&rsquo;</dt>
  39946. <dd><p>each channel is displayed in a separate color
  39947. </p></dd>
  39948. <dt>&lsquo;<samp>intensity</samp>&rsquo;</dt>
  39949. <dd><p>each channel is displayed using the same color scheme
  39950. </p></dd>
  39951. <dt>&lsquo;<samp>rainbow</samp>&rsquo;</dt>
  39952. <dd><p>each channel is displayed using the rainbow color scheme
  39953. </p></dd>
  39954. <dt>&lsquo;<samp>moreland</samp>&rsquo;</dt>
  39955. <dd><p>each channel is displayed using the moreland color scheme
  39956. </p></dd>
  39957. <dt>&lsquo;<samp>nebulae</samp>&rsquo;</dt>
  39958. <dd><p>each channel is displayed using the nebulae color scheme
  39959. </p></dd>
  39960. <dt>&lsquo;<samp>fire</samp>&rsquo;</dt>
  39961. <dd><p>each channel is displayed using the fire color scheme
  39962. </p></dd>
  39963. <dt>&lsquo;<samp>fiery</samp>&rsquo;</dt>
  39964. <dd><p>each channel is displayed using the fiery color scheme
  39965. </p></dd>
  39966. <dt>&lsquo;<samp>fruit</samp>&rsquo;</dt>
  39967. <dd><p>each channel is displayed using the fruit color scheme
  39968. </p></dd>
  39969. <dt>&lsquo;<samp>cool</samp>&rsquo;</dt>
  39970. <dd><p>each channel is displayed using the cool color scheme
  39971. </p></dd>
  39972. <dt>&lsquo;<samp>magma</samp>&rsquo;</dt>
  39973. <dd><p>each channel is displayed using the magma color scheme
  39974. </p></dd>
  39975. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  39976. <dd><p>each channel is displayed using the green color scheme
  39977. </p></dd>
  39978. <dt>&lsquo;<samp>viridis</samp>&rsquo;</dt>
  39979. <dd><p>each channel is displayed using the viridis color scheme
  39980. </p></dd>
  39981. <dt>&lsquo;<samp>plasma</samp>&rsquo;</dt>
  39982. <dd><p>each channel is displayed using the plasma color scheme
  39983. </p></dd>
  39984. <dt>&lsquo;<samp>cividis</samp>&rsquo;</dt>
  39985. <dd><p>each channel is displayed using the cividis color scheme
  39986. </p></dd>
  39987. <dt>&lsquo;<samp>terrain</samp>&rsquo;</dt>
  39988. <dd><p>each channel is displayed using the terrain color scheme
  39989. </p></dd>
  39990. </dl>
  39991. <p>Default value is &lsquo;<samp>channel</samp>&rsquo;.
  39992. </p>
  39993. </dd>
  39994. <dt><samp>scale</samp></dt>
  39995. <dd><p>Specify scale used for calculating intensity color values.
  39996. </p>
  39997. <p>It accepts the following values:
  39998. </p><dl compact="compact">
  39999. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  40000. <dd><p>linear
  40001. </p></dd>
  40002. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  40003. <dd><p>square root, default
  40004. </p></dd>
  40005. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  40006. <dd><p>cubic root
  40007. </p></dd>
  40008. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  40009. <dd><p>logarithmic
  40010. </p></dd>
  40011. <dt>&lsquo;<samp>4thrt</samp>&rsquo;</dt>
  40012. <dd><p>4th root
  40013. </p></dd>
  40014. <dt>&lsquo;<samp>5thrt</samp>&rsquo;</dt>
  40015. <dd><p>5th root
  40016. </p></dd>
  40017. </dl>
  40018. <p>Default value is &lsquo;<samp>sqrt</samp>&rsquo;.
  40019. </p>
  40020. </dd>
  40021. <dt><samp>fscale</samp></dt>
  40022. <dd><p>Specify frequency scale.
  40023. </p>
  40024. <p>It accepts the following values:
  40025. </p><dl compact="compact">
  40026. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  40027. <dd><p>linear
  40028. </p></dd>
  40029. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  40030. <dd><p>logarithmic
  40031. </p></dd>
  40032. </dl>
  40033. <p>Default value is &lsquo;<samp>lin</samp>&rsquo;.
  40034. </p>
  40035. </dd>
  40036. <dt><samp>saturation</samp></dt>
  40037. <dd><p>Set saturation modifier for displayed colors. Negative values provide
  40038. alternative color scheme. <code>0</code> is no saturation at all.
  40039. Saturation must be in [-10.0, 10.0] range.
  40040. Default value is <code>1</code>.
  40041. </p>
  40042. </dd>
  40043. <dt><samp>win_func</samp></dt>
  40044. <dd><p>Set window function.
  40045. </p>
  40046. <p>It accepts the following values:
  40047. </p><dl compact="compact">
  40048. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  40049. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  40050. <dt>&lsquo;<samp>hann</samp>&rsquo;</dt>
  40051. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  40052. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  40053. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  40054. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  40055. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  40056. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  40057. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  40058. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  40059. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  40060. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  40061. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  40062. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  40063. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  40064. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  40065. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  40066. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  40067. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  40068. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  40069. </dl>
  40070. <p>Default value is <code>hann</code>.
  40071. </p>
  40072. </dd>
  40073. <dt><samp>orientation</samp></dt>
  40074. <dd><p>Set orientation of time vs frequency axis. Can be <code>vertical</code> or
  40075. <code>horizontal</code>. Default is <code>vertical</code>.
  40076. </p>
  40077. </dd>
  40078. <dt><samp>overlap</samp></dt>
  40079. <dd><p>Set ratio of overlap window. Default value is <code>0</code>.
  40080. When value is <code>1</code> overlap is set to recommended size for specific
  40081. window function currently used.
  40082. </p>
  40083. </dd>
  40084. <dt><samp>gain</samp></dt>
  40085. <dd><p>Set scale gain for calculating intensity color values.
  40086. Default value is <code>1</code>.
  40087. </p>
  40088. </dd>
  40089. <dt><samp>data</samp></dt>
  40090. <dd><p>Set which data to display. Can be <code>magnitude</code>, default or <code>phase</code>.
  40091. </p>
  40092. </dd>
  40093. <dt><samp>rotation</samp></dt>
  40094. <dd><p>Set color rotation, must be in [-1.0, 1.0] range.
  40095. Default value is <code>0</code>.
  40096. </p>
  40097. </dd>
  40098. <dt><samp>start</samp></dt>
  40099. <dd><p>Set start frequency from which to display spectrogram. Default is <code>0</code>.
  40100. </p>
  40101. </dd>
  40102. <dt><samp>stop</samp></dt>
  40103. <dd><p>Set stop frequency to which to display spectrogram. Default is <code>0</code>.
  40104. </p>
  40105. </dd>
  40106. <dt><samp>fps</samp></dt>
  40107. <dd><p>Set upper frame rate limit. Default is <code>auto</code>, unlimited.
  40108. </p>
  40109. </dd>
  40110. <dt><samp>legend</samp></dt>
  40111. <dd><p>Draw time and frequency axes and legends. Default is disabled.
  40112. </p></dd>
  40113. </dl>
  40114. <p>The usage is very similar to the showwaves filter; see the examples in that
  40115. section.
  40116. </p>
  40117. <a name="Examples-161"></a>
  40118. <h4 class="subsection">37.22.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-161" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-161" aria-hidden="true">TOC</a></span></h4>
  40119. <ul>
  40120. <li> Large window with logarithmic color scaling:
  40121. <div class="example">
  40122. <pre class="example">showspectrum=s=1280x480:scale=log
  40123. </pre></div>
  40124. </li><li> Complete example for a colored and sliding spectrum per channel using <code>ffplay</code>:
  40125. <div class="example">
  40126. <pre class="example">ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
  40127. [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
  40128. </pre></div>
  40129. </li></ul>
  40130. <a name="showspectrumpic"></a>
  40131. <h3 class="section">37.23 showspectrumpic<span class="pull-right"><a class="anchor hidden-xs" href="#showspectrumpic" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showspectrumpic" aria-hidden="true">TOC</a></span></h3>
  40132. <p>Convert input audio to a single video frame, representing the audio frequency
  40133. spectrum.
  40134. </p>
  40135. <p>The filter accepts the following options:
  40136. </p>
  40137. <dl compact="compact">
  40138. <dt><samp>size, s</samp></dt>
  40139. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  40140. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  40141. Default value is <code>4096x2048</code>.
  40142. </p>
  40143. </dd>
  40144. <dt><samp>mode</samp></dt>
  40145. <dd><p>Specify display mode.
  40146. </p>
  40147. <p>It accepts the following values:
  40148. </p><dl compact="compact">
  40149. <dt>&lsquo;<samp>combined</samp>&rsquo;</dt>
  40150. <dd><p>all channels are displayed in the same row
  40151. </p></dd>
  40152. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  40153. <dd><p>all channels are displayed in separate rows
  40154. </p></dd>
  40155. </dl>
  40156. <p>Default value is &lsquo;<samp>combined</samp>&rsquo;.
  40157. </p>
  40158. </dd>
  40159. <dt><samp>color</samp></dt>
  40160. <dd><p>Specify display color mode.
  40161. </p>
  40162. <p>It accepts the following values:
  40163. </p><dl compact="compact">
  40164. <dt>&lsquo;<samp>channel</samp>&rsquo;</dt>
  40165. <dd><p>each channel is displayed in a separate color
  40166. </p></dd>
  40167. <dt>&lsquo;<samp>intensity</samp>&rsquo;</dt>
  40168. <dd><p>each channel is displayed using the same color scheme
  40169. </p></dd>
  40170. <dt>&lsquo;<samp>rainbow</samp>&rsquo;</dt>
  40171. <dd><p>each channel is displayed using the rainbow color scheme
  40172. </p></dd>
  40173. <dt>&lsquo;<samp>moreland</samp>&rsquo;</dt>
  40174. <dd><p>each channel is displayed using the moreland color scheme
  40175. </p></dd>
  40176. <dt>&lsquo;<samp>nebulae</samp>&rsquo;</dt>
  40177. <dd><p>each channel is displayed using the nebulae color scheme
  40178. </p></dd>
  40179. <dt>&lsquo;<samp>fire</samp>&rsquo;</dt>
  40180. <dd><p>each channel is displayed using the fire color scheme
  40181. </p></dd>
  40182. <dt>&lsquo;<samp>fiery</samp>&rsquo;</dt>
  40183. <dd><p>each channel is displayed using the fiery color scheme
  40184. </p></dd>
  40185. <dt>&lsquo;<samp>fruit</samp>&rsquo;</dt>
  40186. <dd><p>each channel is displayed using the fruit color scheme
  40187. </p></dd>
  40188. <dt>&lsquo;<samp>cool</samp>&rsquo;</dt>
  40189. <dd><p>each channel is displayed using the cool color scheme
  40190. </p></dd>
  40191. <dt>&lsquo;<samp>magma</samp>&rsquo;</dt>
  40192. <dd><p>each channel is displayed using the magma color scheme
  40193. </p></dd>
  40194. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  40195. <dd><p>each channel is displayed using the green color scheme
  40196. </p></dd>
  40197. <dt>&lsquo;<samp>viridis</samp>&rsquo;</dt>
  40198. <dd><p>each channel is displayed using the viridis color scheme
  40199. </p></dd>
  40200. <dt>&lsquo;<samp>plasma</samp>&rsquo;</dt>
  40201. <dd><p>each channel is displayed using the plasma color scheme
  40202. </p></dd>
  40203. <dt>&lsquo;<samp>cividis</samp>&rsquo;</dt>
  40204. <dd><p>each channel is displayed using the cividis color scheme
  40205. </p></dd>
  40206. <dt>&lsquo;<samp>terrain</samp>&rsquo;</dt>
  40207. <dd><p>each channel is displayed using the terrain color scheme
  40208. </p></dd>
  40209. </dl>
  40210. <p>Default value is &lsquo;<samp>intensity</samp>&rsquo;.
  40211. </p>
  40212. </dd>
  40213. <dt><samp>scale</samp></dt>
  40214. <dd><p>Specify scale used for calculating intensity color values.
  40215. </p>
  40216. <p>It accepts the following values:
  40217. </p><dl compact="compact">
  40218. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  40219. <dd><p>linear
  40220. </p></dd>
  40221. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  40222. <dd><p>square root, default
  40223. </p></dd>
  40224. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  40225. <dd><p>cubic root
  40226. </p></dd>
  40227. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  40228. <dd><p>logarithmic
  40229. </p></dd>
  40230. <dt>&lsquo;<samp>4thrt</samp>&rsquo;</dt>
  40231. <dd><p>4th root
  40232. </p></dd>
  40233. <dt>&lsquo;<samp>5thrt</samp>&rsquo;</dt>
  40234. <dd><p>5th root
  40235. </p></dd>
  40236. </dl>
  40237. <p>Default value is &lsquo;<samp>log</samp>&rsquo;.
  40238. </p>
  40239. </dd>
  40240. <dt><samp>fscale</samp></dt>
  40241. <dd><p>Specify frequency scale.
  40242. </p>
  40243. <p>It accepts the following values:
  40244. </p><dl compact="compact">
  40245. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  40246. <dd><p>linear
  40247. </p></dd>
  40248. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  40249. <dd><p>logarithmic
  40250. </p></dd>
  40251. </dl>
  40252. <p>Default value is &lsquo;<samp>lin</samp>&rsquo;.
  40253. </p>
  40254. </dd>
  40255. <dt><samp>saturation</samp></dt>
  40256. <dd><p>Set saturation modifier for displayed colors. Negative values provide
  40257. alternative color scheme. <code>0</code> is no saturation at all.
  40258. Saturation must be in [-10.0, 10.0] range.
  40259. Default value is <code>1</code>.
  40260. </p>
  40261. </dd>
  40262. <dt><samp>win_func</samp></dt>
  40263. <dd><p>Set window function.
  40264. </p>
  40265. <p>It accepts the following values:
  40266. </p><dl compact="compact">
  40267. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  40268. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  40269. <dt>&lsquo;<samp>hann</samp>&rsquo;</dt>
  40270. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  40271. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  40272. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  40273. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  40274. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  40275. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  40276. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  40277. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  40278. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  40279. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  40280. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  40281. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  40282. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  40283. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  40284. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  40285. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  40286. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  40287. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  40288. </dl>
  40289. <p>Default value is <code>hann</code>.
  40290. </p>
  40291. </dd>
  40292. <dt><samp>orientation</samp></dt>
  40293. <dd><p>Set orientation of time vs frequency axis. Can be <code>vertical</code> or
  40294. <code>horizontal</code>. Default is <code>vertical</code>.
  40295. </p>
  40296. </dd>
  40297. <dt><samp>gain</samp></dt>
  40298. <dd><p>Set scale gain for calculating intensity color values.
  40299. Default value is <code>1</code>.
  40300. </p>
  40301. </dd>
  40302. <dt><samp>legend</samp></dt>
  40303. <dd><p>Draw time and frequency axes and legends. Default is enabled.
  40304. </p>
  40305. </dd>
  40306. <dt><samp>rotation</samp></dt>
  40307. <dd><p>Set color rotation, must be in [-1.0, 1.0] range.
  40308. Default value is <code>0</code>.
  40309. </p>
  40310. </dd>
  40311. <dt><samp>start</samp></dt>
  40312. <dd><p>Set start frequency from which to display spectrogram. Default is <code>0</code>.
  40313. </p>
  40314. </dd>
  40315. <dt><samp>stop</samp></dt>
  40316. <dd><p>Set stop frequency to which to display spectrogram. Default is <code>0</code>.
  40317. </p></dd>
  40318. </dl>
  40319. <a name="Examples-162"></a>
  40320. <h4 class="subsection">37.23.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-162" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-162" aria-hidden="true">TOC</a></span></h4>
  40321. <ul>
  40322. <li> Extract an audio spectrogram of a whole audio track
  40323. in a 1024x1024 picture using <code>ffmpeg</code>:
  40324. <div class="example">
  40325. <pre class="example">ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png
  40326. </pre></div>
  40327. </li></ul>
  40328. <a name="showvolume"></a>
  40329. <h3 class="section">37.24 showvolume<span class="pull-right"><a class="anchor hidden-xs" href="#showvolume" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showvolume" aria-hidden="true">TOC</a></span></h3>
  40330. <p>Convert input audio volume to a video output.
  40331. </p>
  40332. <p>The filter accepts the following options:
  40333. </p>
  40334. <dl compact="compact">
  40335. <dt><samp>rate, r</samp></dt>
  40336. <dd><p>Set video rate.
  40337. </p>
  40338. </dd>
  40339. <dt><samp>b</samp></dt>
  40340. <dd><p>Set border width, allowed range is [0, 5]. Default is 1.
  40341. </p>
  40342. </dd>
  40343. <dt><samp>w</samp></dt>
  40344. <dd><p>Set channel width, allowed range is [80, 8192]. Default is 400.
  40345. </p>
  40346. </dd>
  40347. <dt><samp>h</samp></dt>
  40348. <dd><p>Set channel height, allowed range is [1, 900]. Default is 20.
  40349. </p>
  40350. </dd>
  40351. <dt><samp>f</samp></dt>
  40352. <dd><p>Set fade, allowed range is [0, 1]. Default is 0.95.
  40353. </p>
  40354. </dd>
  40355. <dt><samp>c</samp></dt>
  40356. <dd><p>Set volume color expression.
  40357. </p>
  40358. <p>The expression can use the following variables:
  40359. </p>
  40360. <dl compact="compact">
  40361. <dt><samp>VOLUME</samp></dt>
  40362. <dd><p>Current max volume of channel in dB.
  40363. </p>
  40364. </dd>
  40365. <dt><samp>PEAK</samp></dt>
  40366. <dd><p>Current peak.
  40367. </p>
  40368. </dd>
  40369. <dt><samp>CHANNEL</samp></dt>
  40370. <dd><p>Current channel number, starting from 0.
  40371. </p></dd>
  40372. </dl>
  40373. </dd>
  40374. <dt><samp>t</samp></dt>
  40375. <dd><p>If set, displays channel names. Default is enabled.
  40376. </p>
  40377. </dd>
  40378. <dt><samp>v</samp></dt>
  40379. <dd><p>If set, displays volume values. Default is enabled.
  40380. </p>
  40381. </dd>
  40382. <dt><samp>o</samp></dt>
  40383. <dd><p>Set orientation, can be horizontal: <code>h</code> or vertical: <code>v</code>,
  40384. default is <code>h</code>.
  40385. </p>
  40386. </dd>
  40387. <dt><samp>s</samp></dt>
  40388. <dd><p>Set step size, allowed range is [0, 5]. Default is 0, which means
  40389. step is disabled.
  40390. </p>
  40391. </dd>
  40392. <dt><samp>p</samp></dt>
  40393. <dd><p>Set background opacity, allowed range is [0, 1]. Default is 0.
  40394. </p>
  40395. </dd>
  40396. <dt><samp>m</samp></dt>
  40397. <dd><p>Set metering mode, can be peak: <code>p</code> or rms: <code>r</code>,
  40398. default is <code>p</code>.
  40399. </p>
  40400. </dd>
  40401. <dt><samp>ds</samp></dt>
  40402. <dd><p>Set display scale, can be linear: <code>lin</code> or log: <code>log</code>,
  40403. default is <code>lin</code>.
  40404. </p>
  40405. </dd>
  40406. <dt><samp>dm</samp></dt>
  40407. <dd><p>In second.
  40408. If set to &gt; 0., display a line for the max level
  40409. in the previous seconds.
  40410. default is disabled: <code>0.</code>
  40411. </p>
  40412. </dd>
  40413. <dt><samp>dmc</samp></dt>
  40414. <dd><p>The color of the max line. Use when <code>dm</code> option is set to &gt; 0.
  40415. default is: <code>orange</code>
  40416. </p></dd>
  40417. </dl>
  40418. <a name="showwaves"></a>
  40419. <h3 class="section">37.25 showwaves<span class="pull-right"><a class="anchor hidden-xs" href="#showwaves" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showwaves" aria-hidden="true">TOC</a></span></h3>
  40420. <p>Convert input audio to a video output, representing the samples waves.
  40421. </p>
  40422. <p>The filter accepts the following options:
  40423. </p>
  40424. <dl compact="compact">
  40425. <dt><samp>size, s</samp></dt>
  40426. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  40427. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  40428. Default value is <code>600x240</code>.
  40429. </p>
  40430. </dd>
  40431. <dt><samp>mode</samp></dt>
  40432. <dd><p>Set display mode.
  40433. </p>
  40434. <p>Available values are:
  40435. </p><dl compact="compact">
  40436. <dt>&lsquo;<samp>point</samp>&rsquo;</dt>
  40437. <dd><p>Draw a point for each sample.
  40438. </p>
  40439. </dd>
  40440. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  40441. <dd><p>Draw a vertical line for each sample.
  40442. </p>
  40443. </dd>
  40444. <dt>&lsquo;<samp>p2p</samp>&rsquo;</dt>
  40445. <dd><p>Draw a point for each sample and a line between them.
  40446. </p>
  40447. </dd>
  40448. <dt>&lsquo;<samp>cline</samp>&rsquo;</dt>
  40449. <dd><p>Draw a centered vertical line for each sample.
  40450. </p></dd>
  40451. </dl>
  40452. <p>Default value is <code>point</code>.
  40453. </p>
  40454. </dd>
  40455. <dt><samp>n</samp></dt>
  40456. <dd><p>Set the number of samples which are printed on the same column. A
  40457. larger value will decrease the frame rate. Must be a positive
  40458. integer. This option can be set only if the value for <var>rate</var>
  40459. is not explicitly specified.
  40460. </p>
  40461. </dd>
  40462. <dt><samp>rate, r</samp></dt>
  40463. <dd><p>Set the (approximate) output frame rate. This is done by setting the
  40464. option <var>n</var>. Default value is &quot;25&quot;.
  40465. </p>
  40466. </dd>
  40467. <dt><samp>split_channels</samp></dt>
  40468. <dd><p>Set if channels should be drawn separately or overlap. Default value is 0.
  40469. </p>
  40470. </dd>
  40471. <dt><samp>colors</samp></dt>
  40472. <dd><p>Set colors separated by &rsquo;|&rsquo; which are going to be used for drawing of each channel.
  40473. </p>
  40474. </dd>
  40475. <dt><samp>scale</samp></dt>
  40476. <dd><p>Set amplitude scale.
  40477. </p>
  40478. <p>Available values are:
  40479. </p><dl compact="compact">
  40480. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  40481. <dd><p>Linear.
  40482. </p>
  40483. </dd>
  40484. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  40485. <dd><p>Logarithmic.
  40486. </p>
  40487. </dd>
  40488. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  40489. <dd><p>Square root.
  40490. </p>
  40491. </dd>
  40492. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  40493. <dd><p>Cubic root.
  40494. </p></dd>
  40495. </dl>
  40496. <p>Default is linear.
  40497. </p>
  40498. </dd>
  40499. <dt><samp>draw</samp></dt>
  40500. <dd><p>Set the draw mode. This is mostly useful to set for high <var>n</var>.
  40501. </p>
  40502. <p>Available values are:
  40503. </p><dl compact="compact">
  40504. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  40505. <dd><p>Scale pixel values for each drawn sample.
  40506. </p>
  40507. </dd>
  40508. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  40509. <dd><p>Draw every sample directly.
  40510. </p></dd>
  40511. </dl>
  40512. <p>Default value is <code>scale</code>.
  40513. </p></dd>
  40514. </dl>
  40515. <a name="Examples-163"></a>
  40516. <h4 class="subsection">37.25.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-163" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-163" aria-hidden="true">TOC</a></span></h4>
  40517. <ul>
  40518. <li> Output the input file audio and the corresponding video representation
  40519. at the same time:
  40520. <div class="example">
  40521. <pre class="example">amovie=a.mp3,asplit[out0],showwaves[out1]
  40522. </pre></div>
  40523. </li><li> Create a synthetic signal and show it with showwaves, forcing a
  40524. frame rate of 30 frames per second:
  40525. <div class="example">
  40526. <pre class="example">aevalsrc=sin(1*2*PI*t)*sin(880*2*PI*t):cos(2*PI*200*t),asplit[out0],showwaves=r=30[out1]
  40527. </pre></div>
  40528. </li></ul>
  40529. <a name="showwavespic"></a>
  40530. <h3 class="section">37.26 showwavespic<span class="pull-right"><a class="anchor hidden-xs" href="#showwavespic" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-showwavespic" aria-hidden="true">TOC</a></span></h3>
  40531. <p>Convert input audio to a single video frame, representing the samples waves.
  40532. </p>
  40533. <p>The filter accepts the following options:
  40534. </p>
  40535. <dl compact="compact">
  40536. <dt><samp>size, s</samp></dt>
  40537. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  40538. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  40539. Default value is <code>600x240</code>.
  40540. </p>
  40541. </dd>
  40542. <dt><samp>split_channels</samp></dt>
  40543. <dd><p>Set if channels should be drawn separately or overlap. Default value is 0.
  40544. </p>
  40545. </dd>
  40546. <dt><samp>colors</samp></dt>
  40547. <dd><p>Set colors separated by &rsquo;|&rsquo; which are going to be used for drawing of each channel.
  40548. </p>
  40549. </dd>
  40550. <dt><samp>scale</samp></dt>
  40551. <dd><p>Set amplitude scale.
  40552. </p>
  40553. <p>Available values are:
  40554. </p><dl compact="compact">
  40555. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  40556. <dd><p>Linear.
  40557. </p>
  40558. </dd>
  40559. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  40560. <dd><p>Logarithmic.
  40561. </p>
  40562. </dd>
  40563. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  40564. <dd><p>Square root.
  40565. </p>
  40566. </dd>
  40567. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  40568. <dd><p>Cubic root.
  40569. </p></dd>
  40570. </dl>
  40571. <p>Default is linear.
  40572. </p>
  40573. </dd>
  40574. <dt><samp>draw</samp></dt>
  40575. <dd><p>Set the draw mode.
  40576. </p>
  40577. <p>Available values are:
  40578. </p><dl compact="compact">
  40579. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  40580. <dd><p>Scale pixel values for each drawn sample.
  40581. </p>
  40582. </dd>
  40583. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  40584. <dd><p>Draw every sample directly.
  40585. </p></dd>
  40586. </dl>
  40587. <p>Default value is <code>scale</code>.
  40588. </p>
  40589. </dd>
  40590. <dt><samp>filter</samp></dt>
  40591. <dd><p>Set the filter mode.
  40592. </p>
  40593. <p>Available values are:
  40594. </p><dl compact="compact">
  40595. <dt>&lsquo;<samp>average</samp>&rsquo;</dt>
  40596. <dd><p>Use average samples values for each drawn sample.
  40597. </p>
  40598. </dd>
  40599. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  40600. <dd><p>Use peak samples values for each drawn sample.
  40601. </p></dd>
  40602. </dl>
  40603. <p>Default value is <code>average</code>.
  40604. </p></dd>
  40605. </dl>
  40606. <a name="Examples-164"></a>
  40607. <h4 class="subsection">37.26.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-164" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-164" aria-hidden="true">TOC</a></span></h4>
  40608. <ul>
  40609. <li> Extract a channel split representation of the wave form of a whole audio track
  40610. in a 1024x800 picture using <code>ffmpeg</code>:
  40611. <div class="example">
  40612. <pre class="example">ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
  40613. </pre></div>
  40614. </li></ul>
  40615. <a name="sidedata_002c-asidedata"></a>
  40616. <h3 class="section">37.27 sidedata, asidedata<span class="pull-right"><a class="anchor hidden-xs" href="#sidedata_002c-asidedata" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-sidedata_002c-asidedata" aria-hidden="true">TOC</a></span></h3>
  40617. <p>Delete frame side data, or select frames based on it.
  40618. </p>
  40619. <p>This filter accepts the following options:
  40620. </p>
  40621. <dl compact="compact">
  40622. <dt><samp>mode</samp></dt>
  40623. <dd><p>Set mode of operation of the filter.
  40624. </p>
  40625. <p>Can be one of the following:
  40626. </p>
  40627. <dl compact="compact">
  40628. <dt>&lsquo;<samp>select</samp>&rsquo;</dt>
  40629. <dd><p>Select every frame with side data of <code>type</code>.
  40630. </p>
  40631. </dd>
  40632. <dt>&lsquo;<samp>delete</samp>&rsquo;</dt>
  40633. <dd><p>Delete side data of <code>type</code>. If <code>type</code> is not set, delete all side
  40634. data in the frame.
  40635. </p>
  40636. </dd>
  40637. </dl>
  40638. </dd>
  40639. <dt><samp>type</samp></dt>
  40640. <dd><p>Set side data type used with all modes. Must be set for <code>select</code> mode. For
  40641. the list of frame side data types, refer to the <code>AVFrameSideDataType</code> enum
  40642. in <samp>libavutil/frame.h</samp>. For example, to choose
  40643. <code>AV_FRAME_DATA_PANSCAN</code> side data, you must specify <code>PANSCAN</code>.
  40644. </p>
  40645. </dd>
  40646. </dl>
  40647. <a name="spectrumsynth"></a>
  40648. <h3 class="section">37.28 spectrumsynth<span class="pull-right"><a class="anchor hidden-xs" href="#spectrumsynth" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-spectrumsynth" aria-hidden="true">TOC</a></span></h3>
  40649. <p>Synthesize audio from 2 input video spectrums, first input stream represents
  40650. magnitude across time and second represents phase across time.
  40651. The filter will transform from frequency domain as displayed in videos back
  40652. to time domain as presented in audio output.
  40653. </p>
  40654. <p>This filter is primarily created for reversing processed <a href="#showspectrum">showspectrum</a>
  40655. filter outputs, but can synthesize sound from other spectrograms too.
  40656. But in such case results are going to be poor if the phase data is not
  40657. available, because in such cases phase data need to be recreated, usually
  40658. it&rsquo;s just recreated from random noise.
  40659. For best results use gray only output (<code>channel</code> color mode in
  40660. <a href="#showspectrum">showspectrum</a> filter) and <code>log</code> scale for magnitude video and
  40661. <code>lin</code> scale for phase video. To produce phase, for 2nd video, use
  40662. <code>data</code> option. Inputs videos should generally use <code>fullframe</code>
  40663. slide mode as that saves resources needed for decoding video.
  40664. </p>
  40665. <p>The filter accepts the following options:
  40666. </p>
  40667. <dl compact="compact">
  40668. <dt><samp>sample_rate</samp></dt>
  40669. <dd><p>Specify sample rate of output audio, the sample rate of audio from which
  40670. spectrum was generated may differ.
  40671. </p>
  40672. </dd>
  40673. <dt><samp>channels</samp></dt>
  40674. <dd><p>Set number of channels represented in input video spectrums.
  40675. </p>
  40676. </dd>
  40677. <dt><samp>scale</samp></dt>
  40678. <dd><p>Set scale which was used when generating magnitude input spectrum.
  40679. Can be <code>lin</code> or <code>log</code>. Default is <code>log</code>.
  40680. </p>
  40681. </dd>
  40682. <dt><samp>slide</samp></dt>
  40683. <dd><p>Set slide which was used when generating inputs spectrums.
  40684. Can be <code>replace</code>, <code>scroll</code>, <code>fullframe</code> or <code>rscroll</code>.
  40685. Default is <code>fullframe</code>.
  40686. </p>
  40687. </dd>
  40688. <dt><samp>win_func</samp></dt>
  40689. <dd><p>Set window function used for resynthesis.
  40690. </p>
  40691. </dd>
  40692. <dt><samp>overlap</samp></dt>
  40693. <dd><p>Set window overlap. In range <code>[0, 1]</code>. Default is <code>1</code>,
  40694. which means optimal overlap for selected window function will be picked.
  40695. </p>
  40696. </dd>
  40697. <dt><samp>orientation</samp></dt>
  40698. <dd><p>Set orientation of input videos. Can be <code>vertical</code> or <code>horizontal</code>.
  40699. Default is <code>vertical</code>.
  40700. </p></dd>
  40701. </dl>
  40702. <a name="Examples-165"></a>
  40703. <h4 class="subsection">37.28.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-165" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-165" aria-hidden="true">TOC</a></span></h4>
  40704. <ul>
  40705. <li> First create magnitude and phase videos from audio, assuming audio is stereo with 44100 sample rate,
  40706. then resynthesize videos back to audio with spectrumsynth:
  40707. <div class="example">
  40708. <pre class="example">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
  40709. 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
  40710. ffmpeg -i magnitude.nut -i phase.nut -lavfi spectrumsynth=channels=2:sample_rate=44100:win_func=hann:overlap=0.875:slide=fullframe output.flac
  40711. </pre></div>
  40712. </li></ul>
  40713. <a name="split_002c-asplit"></a>
  40714. <h3 class="section">37.29 split, asplit<span class="pull-right"><a class="anchor hidden-xs" href="#split_002c-asplit" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-split_002c-asplit" aria-hidden="true">TOC</a></span></h3>
  40715. <p>Split input into several identical outputs.
  40716. </p>
  40717. <p><code>asplit</code> works with audio input, <code>split</code> with video.
  40718. </p>
  40719. <p>The filter accepts a single parameter which specifies the number of outputs. If
  40720. unspecified, it defaults to 2.
  40721. </p>
  40722. <a name="Examples-166"></a>
  40723. <h4 class="subsection">37.29.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-166" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-166" aria-hidden="true">TOC</a></span></h4>
  40724. <ul>
  40725. <li> Create two separate outputs from the same input:
  40726. <div class="example">
  40727. <pre class="example">[in] split [out0][out1]
  40728. </pre></div>
  40729. </li><li> To create 3 or more outputs, you need to specify the number of
  40730. outputs, like in:
  40731. <div class="example">
  40732. <pre class="example">[in] asplit=3 [out0][out1][out2]
  40733. </pre></div>
  40734. </li><li> Create two separate outputs from the same input, one cropped and
  40735. one padded:
  40736. <div class="example">
  40737. <pre class="example">[in] split [splitout1][splitout2];
  40738. [splitout1] crop=100:100:0:0 [cropout];
  40739. [splitout2] pad=200:200:100:100 [padout];
  40740. </pre></div>
  40741. </li><li> Create 5 copies of the input audio with <code>ffmpeg</code>:
  40742. <div class="example">
  40743. <pre class="example">ffmpeg -i INPUT -filter_complex asplit=5 OUTPUT
  40744. </pre></div>
  40745. </li></ul>
  40746. <a name="zmq_002c-azmq"></a>
  40747. <h3 class="section">37.30 zmq, azmq<span class="pull-right"><a class="anchor hidden-xs" href="#zmq_002c-azmq" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-zmq_002c-azmq" aria-hidden="true">TOC</a></span></h3>
  40748. <p>Receive commands sent through a libzmq client, and forward them to
  40749. filters in the filtergraph.
  40750. </p>
  40751. <p><code>zmq</code> and <code>azmq</code> work as a pass-through filters. <code>zmq</code>
  40752. must be inserted between two video filters, <code>azmq</code> between two
  40753. audio filters. Both are capable to send messages to any filter type.
  40754. </p>
  40755. <p>To enable these filters you need to install the libzmq library and
  40756. headers and configure FFmpeg with <code>--enable-libzmq</code>.
  40757. </p>
  40758. <p>For more information about libzmq see:
  40759. <a href="http://www.zeromq.org/">http://www.zeromq.org/</a>
  40760. </p>
  40761. <p>The <code>zmq</code> and <code>azmq</code> filters work as a libzmq server, which
  40762. receives messages sent through a network interface defined by the
  40763. <samp>bind_address</samp> (or the abbreviation &quot;<samp>b</samp>&quot;) option.
  40764. Default value of this option is <samp>tcp://localhost:5555</samp>. You may
  40765. want to alter this value to your needs, but do not forget to escape any
  40766. &rsquo;:&rsquo; signs (see <a href="#filtergraph-escaping">filtergraph escaping</a>).
  40767. </p>
  40768. <p>The received message must be in the form:
  40769. </p><div class="example">
  40770. <pre class="example"><var>TARGET</var> <var>COMMAND</var> [<var>ARG</var>]
  40771. </pre></div>
  40772. <p><var>TARGET</var> specifies the target of the command, usually the name of
  40773. the filter class or a specific filter instance name. The default
  40774. filter instance name uses the pattern &lsquo;<samp>Parsed_&lt;filter_name&gt;_&lt;index&gt;</samp>&rsquo;,
  40775. but you can override this by using the &lsquo;<samp>filter_name@id</samp>&rsquo; syntax
  40776. (see <a href="#Filtergraph-syntax">Filtergraph syntax</a>).
  40777. </p>
  40778. <p><var>COMMAND</var> specifies the name of the command for the target filter.
  40779. </p>
  40780. <p><var>ARG</var> is optional and specifies the optional argument list for the
  40781. given <var>COMMAND</var>.
  40782. </p>
  40783. <p>Upon reception, the message is processed and the corresponding command
  40784. is injected into the filtergraph. Depending on the result, the filter
  40785. will send a reply to the client, adopting the format:
  40786. </p><div class="example">
  40787. <pre class="example"><var>ERROR_CODE</var> <var>ERROR_REASON</var>
  40788. <var>MESSAGE</var>
  40789. </pre></div>
  40790. <p><var>MESSAGE</var> is optional.
  40791. </p>
  40792. <a name="Examples-167"></a>
  40793. <h4 class="subsection">37.30.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-167" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-167" aria-hidden="true">TOC</a></span></h4>
  40794. <p>Look at <samp>tools/zmqsend</samp> for an example of a zmq client which can
  40795. be used to send commands processed by these filters.
  40796. </p>
  40797. <p>Consider the following filtergraph generated by <code>ffplay</code>.
  40798. In this example the last overlay filter has an instance name. All other
  40799. filters will have default instance names.
  40800. </p>
  40801. <div class="example">
  40802. <pre class="example">ffplay -dumpgraph 1 -f lavfi &quot;
  40803. color=s=100x100:c=red [l];
  40804. color=s=100x100:c=blue [r];
  40805. nullsrc=s=200x100, zmq [bg];
  40806. [bg][l] overlay [bg+l];
  40807. [bg+l][r] overlay@my=x=100 &quot;
  40808. </pre></div>
  40809. <p>To change the color of the left side of the video, the following
  40810. command can be used:
  40811. </p><div class="example">
  40812. <pre class="example">echo Parsed_color_0 c yellow | tools/zmqsend
  40813. </pre></div>
  40814. <p>To change the right side:
  40815. </p><div class="example">
  40816. <pre class="example">echo Parsed_color_1 c pink | tools/zmqsend
  40817. </pre></div>
  40818. <p>To change the position of the right side:
  40819. </p><div class="example">
  40820. <pre class="example">echo overlay@my x 150 | tools/zmqsend
  40821. </pre></div>
  40822. <a name="Multimedia-Sources"></a>
  40823. <h2 class="chapter">38 Multimedia Sources<span class="pull-right"><a class="anchor hidden-xs" href="#Multimedia-Sources" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Multimedia-Sources" aria-hidden="true">TOC</a></span></h2>
  40824. <p>Below is a description of the currently available multimedia sources.
  40825. </p>
  40826. <a name="amovie"></a>
  40827. <h3 class="section">38.1 amovie<span class="pull-right"><a class="anchor hidden-xs" href="#amovie" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-amovie" aria-hidden="true">TOC</a></span></h3>
  40828. <p>This is the same as <a href="#movie">movie</a> source, except it selects an audio
  40829. stream by default.
  40830. </p>
  40831. <span id="movie"></span><a name="movie-1"></a>
  40832. <h3 class="section">38.2 movie<span class="pull-right"><a class="anchor hidden-xs" href="#movie-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-movie-1" aria-hidden="true">TOC</a></span></h3>
  40833. <p>Read audio and/or video stream(s) from a movie container.
  40834. </p>
  40835. <p>It accepts the following parameters:
  40836. </p>
  40837. <dl compact="compact">
  40838. <dt><samp>filename</samp></dt>
  40839. <dd><p>The name of the resource to read (not necessarily a file; it can also be a
  40840. device or a stream accessed through some protocol).
  40841. </p>
  40842. </dd>
  40843. <dt><samp>format_name, f</samp></dt>
  40844. <dd><p>Specifies the format assumed for the movie to read, and can be either
  40845. the name of a container or an input device. If not specified, the
  40846. format is guessed from <var>movie_name</var> or by probing.
  40847. </p>
  40848. </dd>
  40849. <dt><samp>seek_point, sp</samp></dt>
  40850. <dd><p>Specifies the seek point in seconds. The frames will be output
  40851. starting from this seek point. The parameter is evaluated with
  40852. <code>av_strtod</code>, so the numerical value may be suffixed by an IS
  40853. postfix. The default value is &quot;0&quot;.
  40854. </p>
  40855. </dd>
  40856. <dt><samp>streams, s</samp></dt>
  40857. <dd><p>Specifies the streams to read. Several streams can be specified,
  40858. separated by &quot;+&quot;. The source will then have as many outputs, in the
  40859. same order. The syntax is explained in the <a href="ffmpeg.html#Stream-specifiers">(ffmpeg)&quot;Stream specifiers&quot;
  40860. section in the ffmpeg manual</a>. Two special names, &quot;dv&quot; and &quot;da&quot; specify
  40861. respectively the default (best suited) video and audio stream. Default
  40862. is &quot;dv&quot;, or &quot;da&quot; if the filter is called as &quot;amovie&quot;.
  40863. </p>
  40864. </dd>
  40865. <dt><samp>stream_index, si</samp></dt>
  40866. <dd><p>Specifies the index of the video stream to read. If the value is -1,
  40867. the most suitable video stream will be automatically selected. The default
  40868. value is &quot;-1&quot;. Deprecated. If the filter is called &quot;amovie&quot;, it will select
  40869. audio instead of video.
  40870. </p>
  40871. </dd>
  40872. <dt><samp>loop</samp></dt>
  40873. <dd><p>Specifies how many times to read the stream in sequence.
  40874. If the value is 0, the stream will be looped infinitely.
  40875. Default value is &quot;1&quot;.
  40876. </p>
  40877. <p>Note that when the movie is looped the source timestamps are not
  40878. changed, so it will generate non monotonically increasing timestamps.
  40879. </p>
  40880. </dd>
  40881. <dt><samp>discontinuity</samp></dt>
  40882. <dd><p>Specifies the time difference between frames above which the point is
  40883. considered a timestamp discontinuity which is removed by adjusting the later
  40884. timestamps.
  40885. </p></dd>
  40886. </dl>
  40887. <p>It allows overlaying a second video on top of the main input of
  40888. a filtergraph, as shown in this graph:
  40889. </p><div class="example">
  40890. <pre class="example">input -----------&gt; deltapts0 --&gt; overlay --&gt; output
  40891. ^
  40892. |
  40893. movie --&gt; scale--&gt; deltapts1 -------+
  40894. </pre></div>
  40895. <a name="Examples-168"></a>
  40896. <h4 class="subsection">38.2.1 Examples<span class="pull-right"><a class="anchor hidden-xs" href="#Examples-168" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Examples-168" aria-hidden="true">TOC</a></span></h4>
  40897. <ul>
  40898. <li> Skip 3.2 seconds from the start of the AVI file in.avi, and overlay it
  40899. on top of the input labelled &quot;in&quot;:
  40900. <div class="example">
  40901. <pre class="example">movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [over];
  40902. [in] setpts=PTS-STARTPTS [main];
  40903. [main][over] overlay=16:16 [out]
  40904. </pre></div>
  40905. </li><li> Read from a video4linux2 device, and overlay it on top of the input
  40906. labelled &quot;in&quot;:
  40907. <div class="example">
  40908. <pre class="example">movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [over];
  40909. [in] setpts=PTS-STARTPTS [main];
  40910. [main][over] overlay=16:16 [out]
  40911. </pre></div>
  40912. </li><li> Read the first video stream and the audio stream with id 0x81 from
  40913. dvd.vob; the video is connected to the pad named &quot;video&quot; and the audio is
  40914. connected to the pad named &quot;audio&quot;:
  40915. <div class="example">
  40916. <pre class="example">movie=dvd.vob:s=v:0+#0x81 [video] [audio]
  40917. </pre></div>
  40918. </li></ul>
  40919. <a name="Commands-137"></a>
  40920. <h4 class="subsection">38.2.2 Commands<span class="pull-right"><a class="anchor hidden-xs" href="#Commands-137" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Commands-137" aria-hidden="true">TOC</a></span></h4>
  40921. <p>Both movie and amovie support the following commands:
  40922. </p><dl compact="compact">
  40923. <dt><samp>seek</samp></dt>
  40924. <dd><p>Perform seek using &quot;av_seek_frame&quot;.
  40925. The syntax is: seek <var>stream_index</var>|<var>timestamp</var>|<var>flags</var>
  40926. </p><ul>
  40927. <li> <var>stream_index</var>: If stream_index is -1, a default
  40928. stream is selected, and <var>timestamp</var> is automatically converted
  40929. from AV_TIME_BASE units to the stream specific time_base.
  40930. </li><li> <var>timestamp</var>: Timestamp in AVStream.time_base units
  40931. or, if no stream is specified, in AV_TIME_BASE units.
  40932. </li><li> <var>flags</var>: Flags which select direction and seeking mode.
  40933. </li></ul>
  40934. </dd>
  40935. <dt><samp>get_duration</samp></dt>
  40936. <dd><p>Get movie duration in AV_TIME_BASE units.
  40937. </p>
  40938. </dd>
  40939. </dl>
  40940. <a name="External-libraries"></a>
  40941. <h2 class="chapter">39 External libraries<span class="pull-right"><a class="anchor hidden-xs" href="#External-libraries" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-External-libraries" aria-hidden="true">TOC</a></span></h2>
  40942. <p>FFmpeg can be hooked up with a number of external libraries to add support
  40943. for more formats. None of them are used by default, their use has to be
  40944. explicitly requested by passing the appropriate flags to
  40945. <code>./configure</code>.
  40946. </p>
  40947. <a name="Alliance-for-Open-Media-_0028AOM_0029"></a>
  40948. <h3 class="section">39.1 Alliance for Open Media (AOM)<span class="pull-right"><a class="anchor hidden-xs" href="#Alliance-for-Open-Media-_0028AOM_0029" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Alliance-for-Open-Media-_0028AOM_0029" aria-hidden="true">TOC</a></span></h3>
  40949. <p>FFmpeg can make use of the AOM library for AV1 decoding and encoding.
  40950. </p>
  40951. <p>Go to <a href="http://aomedia.org/">http://aomedia.org/</a> and follow the instructions for
  40952. installing the library. Then pass <code>--enable-libaom</code> to configure to
  40953. enable it.
  40954. </p>
  40955. <a name="AMD-AMF_002fVCE"></a>
  40956. <h3 class="section">39.2 AMD AMF/VCE<span class="pull-right"><a class="anchor hidden-xs" href="#AMD-AMF_002fVCE" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-AMD-AMF_002fVCE" aria-hidden="true">TOC</a></span></h3>
  40957. <p>FFmpeg can use the AMD Advanced Media Framework library
  40958. for accelerated H.264 and HEVC(only windows) encoding on hardware with Video Coding Engine (VCE).
  40959. </p>
  40960. <p>To enable support you must obtain the AMF framework header files(version 1.4.9+) from
  40961. <a href="https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git">https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git</a>.
  40962. </p>
  40963. <p>Create an <code>AMF/</code> directory in the system include path.
  40964. Copy the contents of <code>AMF/amf/public/include/</code> into that directory.
  40965. Then configure FFmpeg with <code>--enable-amf</code>.
  40966. </p>
  40967. <p>Initialization of amf encoder occurs in this order:
  40968. 1) trying to initialize through dx11(only windows)
  40969. 2) trying to initialize through dx9(only windows)
  40970. 3) trying to initialize through vulkan
  40971. </p>
  40972. <p>To use h.264(AMD VCE) encoder on linux amdgru-pro version 19.20+ and amf-amdgpu-pro
  40973. package(amdgru-pro contains, but does not install automatically) are required.
  40974. </p>
  40975. <p>This driver can be installed using amdgpu-pro-install script in official amd driver archive.
  40976. </p>
  40977. <a name="AviSynth"></a>
  40978. <h3 class="section">39.3 AviSynth<span class="pull-right"><a class="anchor hidden-xs" href="#AviSynth" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-AviSynth" aria-hidden="true">TOC</a></span></h3>
  40979. <p>FFmpeg can read AviSynth scripts as input. To enable support, pass
  40980. <code>--enable-avisynth</code> to configure after installing the headers
  40981. provided by <a href="https://github.com/AviSynth/AviSynthPlus">AviSynth+</a>.
  40982. AviSynth+ can be configured to install only the headers by either
  40983. passing <code>-DHEADERS_ONLY:bool=on</code> to the normal CMake-based build
  40984. system, or by using the supplied <code>GNUmakefile</code>.
  40985. </p>
  40986. <p>For Windows, supported AviSynth variants are
  40987. <a href="http://avisynth.nl">AviSynth 2.6 RC1 or higher</a> for 32-bit builds and
  40988. <a href="http://avisynth.nl/index.php/AviSynth+">AviSynth+ r1718 or higher</a> for 32-bit and 64-bit builds.
  40989. </p>
  40990. <p>For Linux, macOS, and BSD, the only supported AviSynth variant is
  40991. <a href="https://github.com/AviSynth/AviSynthPlus">AviSynth+</a>, starting with version 3.5.
  40992. </p>
  40993. <div class="info">
  40994. <p>In 2016, AviSynth+ added support for building with GCC. However, due to
  40995. the eccentricities of Windows&rsquo; calling conventions, 32-bit GCC builds
  40996. of AviSynth+ are not compatible with typical 32-bit builds of FFmpeg.
  40997. </p>
  40998. <p>By default, FFmpeg assumes compatibility with 32-bit MSVC builds of
  40999. AviSynth+ since that is the most widely-used and entrenched build
  41000. configuration. Users can override this and enable support for 32-bit
  41001. GCC builds of AviSynth+ by passing <code>-DAVSC_WIN32_GCC32</code> to
  41002. <code>--extra-cflags</code> when configuring FFmpeg.
  41003. </p>
  41004. <p>64-bit builds of FFmpeg are not affected, and can use either MSVC or
  41005. GCC builds of AviSynth+ without any special flags.
  41006. </p></div>
  41007. <div class="info">
  41008. <p>AviSynth(+) is loaded dynamically. Distributors can build FFmpeg
  41009. with <code>--enable-avisynth</code>, and the binaries will work regardless
  41010. of the end user having AviSynth installed. If/when an end user
  41011. would like to use AviSynth scripts, then they can install AviSynth(+)
  41012. and FFmpeg will be able to find and use it to open scripts.
  41013. </p></div>
  41014. <a name="Chromaprint"></a>
  41015. <h3 class="section">39.4 Chromaprint<span class="pull-right"><a class="anchor hidden-xs" href="#Chromaprint" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Chromaprint" aria-hidden="true">TOC</a></span></h3>
  41016. <p>FFmpeg can make use of the Chromaprint library for generating audio fingerprints.
  41017. Pass <code>--enable-chromaprint</code> to configure to
  41018. enable it. See <a href="https://acoustid.org/chromaprint">https://acoustid.org/chromaprint</a>.
  41019. </p>
  41020. <a name="codec2"></a>
  41021. <h3 class="section">39.5 codec2<span class="pull-right"><a class="anchor hidden-xs" href="#codec2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-codec2" aria-hidden="true">TOC</a></span></h3>
  41022. <p>FFmpeg can make use of the codec2 library for codec2 decoding and encoding.
  41023. There is currently no native decoder, so libcodec2 must be used for decoding.
  41024. </p>
  41025. <p>Go to <a href="http://freedv.org/">http://freedv.org/</a>, download &quot;Codec 2 source archive&quot;.
  41026. Build and install using CMake. Debian users can install the libcodec2-dev package instead.
  41027. Once libcodec2 is installed you can pass <code>--enable-libcodec2</code> to configure to enable it.
  41028. </p>
  41029. <p>The easiest way to use codec2 is with .c2 files, since they contain the mode information required for decoding.
  41030. To encode such a file, use a .c2 file extension and give the libcodec2 encoder the -mode option:
  41031. <code>ffmpeg -i input.wav -mode 700C output.c2</code>.
  41032. Playback is as simple as <code>ffplay output.c2</code>.
  41033. For a list of supported modes, run <code>ffmpeg -h encoder=libcodec2</code>.
  41034. Raw codec2 files are also supported.
  41035. To make sense of them the mode in use needs to be specified as a format option:
  41036. <code>ffmpeg -f codec2raw -mode 1300 -i input.raw output.wav</code>.
  41037. </p>
  41038. <a name="dav1d"></a>
  41039. <h3 class="section">39.6 dav1d<span class="pull-right"><a class="anchor hidden-xs" href="#dav1d" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-dav1d" aria-hidden="true">TOC</a></span></h3>
  41040. <p>FFmpeg can make use of the dav1d library for AV1 video decoding.
  41041. </p>
  41042. <p>Go to <a href="https://code.videolan.org/videolan/dav1d">https://code.videolan.org/videolan/dav1d</a> and follow the instructions for
  41043. installing the library. Then pass <code>--enable-libdav1d</code> to configure to enable it.
  41044. </p>
  41045. <a name="davs2"></a>
  41046. <h3 class="section">39.7 davs2<span class="pull-right"><a class="anchor hidden-xs" href="#davs2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-davs2" aria-hidden="true">TOC</a></span></h3>
  41047. <p>FFmpeg can make use of the davs2 library for AVS2-P2/IEEE1857.4 video decoding.
  41048. </p>
  41049. <p>Go to <a href="https://github.com/pkuvcl/davs2">https://github.com/pkuvcl/davs2</a> and follow the instructions for
  41050. installing the library. Then pass <code>--enable-libdavs2</code> to configure to
  41051. enable it.
  41052. </p>
  41053. <div class="info">
  41054. <p>libdavs2 is under the GNU Public License Version 2 or later
  41055. (see <a 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
  41056. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  41057. </p></div>
  41058. <a name="uavs3d"></a>
  41059. <h3 class="section">39.8 uavs3d<span class="pull-right"><a class="anchor hidden-xs" href="#uavs3d" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-uavs3d" aria-hidden="true">TOC</a></span></h3>
  41060. <p>FFmpeg can make use of the uavs3d library for AVS3-P2/IEEE1857.10 video decoding.
  41061. </p>
  41062. <p>Go to <a href="https://github.com/uavs3/uavs3d">https://github.com/uavs3/uavs3d</a> and follow the instructions for
  41063. installing the library. Then pass <code>--enable-libuavs3d</code> to configure to
  41064. enable it.
  41065. </p>
  41066. <a name="Game-Music-Emu"></a>
  41067. <h3 class="section">39.9 Game Music Emu<span class="pull-right"><a class="anchor hidden-xs" href="#Game-Music-Emu" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Game-Music-Emu" aria-hidden="true">TOC</a></span></h3>
  41068. <p>FFmpeg can make use of the Game Music Emu library to read audio from supported video game
  41069. music file formats. Pass <code>--enable-libgme</code> to configure to
  41070. enable it. See <a href="https://bitbucket.org/mpyne/game-music-emu/overview">https://bitbucket.org/mpyne/game-music-emu/overview</a>.
  41071. </p>
  41072. <a name="Intel-QuickSync-Video"></a>
  41073. <h3 class="section">39.10 Intel QuickSync Video<span class="pull-right"><a class="anchor hidden-xs" href="#Intel-QuickSync-Video" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Intel-QuickSync-Video" aria-hidden="true">TOC</a></span></h3>
  41074. <p>FFmpeg can use Intel QuickSync Video (QSV) for accelerated decoding and encoding
  41075. of multiple codecs. To use QSV, FFmpeg must be linked against the <code>libmfx</code>
  41076. dispatcher, which loads the actual decoding libraries.
  41077. </p>
  41078. <p>The dispatcher is open source and can be downloaded from
  41079. <a href="https://github.com/lu-zero/mfx_dispatch.git">https://github.com/lu-zero/mfx_dispatch.git</a>. FFmpeg needs to be configured
  41080. with the <code>--enable-libmfx</code> option and <code>pkg-config</code> needs to be able to
  41081. locate the dispatcher&rsquo;s <code>.pc</code> files.
  41082. </p>
  41083. <a name="Kvazaar"></a>
  41084. <h3 class="section">39.11 Kvazaar<span class="pull-right"><a class="anchor hidden-xs" href="#Kvazaar" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Kvazaar" aria-hidden="true">TOC</a></span></h3>
  41085. <p>FFmpeg can make use of the Kvazaar library for HEVC encoding.
  41086. </p>
  41087. <p>Go to <a href="https://github.com/ultravideo/kvazaar">https://github.com/ultravideo/kvazaar</a> and follow the
  41088. instructions for installing the library. Then pass
  41089. <code>--enable-libkvazaar</code> to configure to enable it.
  41090. </p>
  41091. <a name="LAME"></a>
  41092. <h3 class="section">39.12 LAME<span class="pull-right"><a class="anchor hidden-xs" href="#LAME" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-LAME" aria-hidden="true">TOC</a></span></h3>
  41093. <p>FFmpeg can make use of the LAME library for MP3 encoding.
  41094. </p>
  41095. <p>Go to <a href="http://lame.sourceforge.net/">http://lame.sourceforge.net/</a> and follow the
  41096. instructions for installing the library.
  41097. Then pass <code>--enable-libmp3lame</code> to configure to enable it.
  41098. </p>
  41099. <a name="libilbc-1"></a>
  41100. <h3 class="section">39.13 libilbc<span class="pull-right"><a class="anchor hidden-xs" href="#libilbc-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libilbc-1" aria-hidden="true">TOC</a></span></h3>
  41101. <p>iLBC is a narrowband speech codec that has been made freely available
  41102. by Google as part of the WebRTC project. libilbc is a packaging friendly
  41103. copy of the iLBC codec. FFmpeg can make use of the libilbc library for
  41104. iLBC decoding and encoding.
  41105. </p>
  41106. <p>Go to <a href="https://github.com/TimothyGu/libilbc">https://github.com/TimothyGu/libilbc</a> and follow the instructions for
  41107. installing the library. Then pass <code>--enable-libilbc</code> to configure to
  41108. enable it.
  41109. </p>
  41110. <a name="libvpx"></a>
  41111. <h3 class="section">39.14 libvpx<span class="pull-right"><a class="anchor hidden-xs" href="#libvpx" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-libvpx" aria-hidden="true">TOC</a></span></h3>
  41112. <p>FFmpeg can make use of the libvpx library for VP8/VP9 decoding and encoding.
  41113. </p>
  41114. <p>Go to <a href="http://www.webmproject.org/">http://www.webmproject.org/</a> and follow the instructions for
  41115. installing the library. Then pass <code>--enable-libvpx</code> to configure to
  41116. enable it.
  41117. </p>
  41118. <a name="ModPlug"></a>
  41119. <h3 class="section">39.15 ModPlug<span class="pull-right"><a class="anchor hidden-xs" href="#ModPlug" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ModPlug" aria-hidden="true">TOC</a></span></h3>
  41120. <p>FFmpeg can make use of this library, originating in Modplug-XMMS, to read from MOD-like music files.
  41121. See <a href="https://github.com/Konstanty/libmodplug">https://github.com/Konstanty/libmodplug</a>. Pass <code>--enable-libmodplug</code> to configure to
  41122. enable it.
  41123. </p>
  41124. <a name="OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries"></a>
  41125. <h3 class="section">39.16 OpenCORE, VisualOn, and Fraunhofer libraries<span class="pull-right"><a class="anchor hidden-xs" href="#OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries" aria-hidden="true">TOC</a></span></h3>
  41126. <p>Spun off Google Android sources, OpenCore, VisualOn and Fraunhofer
  41127. libraries provide encoders for a number of audio codecs.
  41128. </p>
  41129. <div class="info">
  41130. <p>OpenCORE and VisualOn libraries are under the Apache License 2.0
  41131. (see <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a> for details), which is
  41132. incompatible to the LGPL version 2.1 and GPL version 2. You have to
  41133. upgrade FFmpeg&rsquo;s license to LGPL version 3 (or if you have enabled
  41134. GPL components, GPL version 3) by passing <code>--enable-version3</code> to configure in
  41135. order to use it.
  41136. </p>
  41137. <p>The license of the Fraunhofer AAC library is incompatible with the GPL.
  41138. Therefore, for GPL builds, you have to pass <code>--enable-nonfree</code> to
  41139. configure in order to use it. To the best of our knowledge, it is
  41140. compatible with the LGPL.
  41141. </p></div>
  41142. <a name="OpenCORE-AMR"></a>
  41143. <h4 class="subsection">39.16.1 OpenCORE AMR<span class="pull-right"><a class="anchor hidden-xs" href="#OpenCORE-AMR" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-OpenCORE-AMR" aria-hidden="true">TOC</a></span></h4>
  41144. <p>FFmpeg can make use of the OpenCORE libraries for AMR-NB
  41145. decoding/encoding and AMR-WB decoding.
  41146. </p>
  41147. <p>Go to <a href="http://sourceforge.net/projects/opencore-amr/">http://sourceforge.net/projects/opencore-amr/</a> and follow the
  41148. instructions for installing the libraries.
  41149. Then pass <code>--enable-libopencore-amrnb</code> and/or
  41150. <code>--enable-libopencore-amrwb</code> to configure to enable them.
  41151. </p>
  41152. <a name="VisualOn-AMR_002dWB-encoder-library"></a>
  41153. <h4 class="subsection">39.16.2 VisualOn AMR-WB encoder library<span class="pull-right"><a class="anchor hidden-xs" href="#VisualOn-AMR_002dWB-encoder-library" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-VisualOn-AMR_002dWB-encoder-library" aria-hidden="true">TOC</a></span></h4>
  41154. <p>FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB encoding.
  41155. </p>
  41156. <p>Go to <a href="http://sourceforge.net/projects/opencore-amr/">http://sourceforge.net/projects/opencore-amr/</a> and follow the
  41157. instructions for installing the library.
  41158. Then pass <code>--enable-libvo-amrwbenc</code> to configure to enable it.
  41159. </p>
  41160. <a name="Fraunhofer-AAC-library"></a>
  41161. <h4 class="subsection">39.16.3 Fraunhofer AAC library<span class="pull-right"><a class="anchor hidden-xs" href="#Fraunhofer-AAC-library" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Fraunhofer-AAC-library" aria-hidden="true">TOC</a></span></h4>
  41162. <p>FFmpeg can make use of the Fraunhofer AAC library for AAC decoding &amp; encoding.
  41163. </p>
  41164. <p>Go to <a href="http://sourceforge.net/projects/opencore-amr/">http://sourceforge.net/projects/opencore-amr/</a> and follow the
  41165. instructions for installing the library.
  41166. Then pass <code>--enable-libfdk-aac</code> to configure to enable it.
  41167. </p>
  41168. <a name="OpenH264"></a>
  41169. <h3 class="section">39.17 OpenH264<span class="pull-right"><a class="anchor hidden-xs" href="#OpenH264" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-OpenH264" aria-hidden="true">TOC</a></span></h3>
  41170. <p>FFmpeg can make use of the OpenH264 library for H.264 decoding and encoding.
  41171. </p>
  41172. <p>Go to <a href="http://www.openh264.org/">http://www.openh264.org/</a> and follow the instructions for
  41173. installing the library. Then pass <code>--enable-libopenh264</code> to configure to
  41174. enable it.
  41175. </p>
  41176. <p>For decoding, this library is much more limited than the built-in decoder
  41177. in libavcodec; currently, this library lacks support for decoding B-frames
  41178. and some other main/high profile features. (It currently only supports
  41179. constrained baseline profile and CABAC.) Using it is mostly useful for
  41180. testing and for taking advantage of Cisco&rsquo;s patent portfolio license
  41181. (<a href="http://www.openh264.org/BINARY_LICENSE.txt">http://www.openh264.org/BINARY_LICENSE.txt</a>).
  41182. </p>
  41183. <a name="OpenJPEG"></a>
  41184. <h3 class="section">39.18 OpenJPEG<span class="pull-right"><a class="anchor hidden-xs" href="#OpenJPEG" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-OpenJPEG" aria-hidden="true">TOC</a></span></h3>
  41185. <p>FFmpeg can use the OpenJPEG libraries for decoding/encoding J2K videos. Go to
  41186. <a href="http://www.openjpeg.org/">http://www.openjpeg.org/</a> to get the libraries and follow the installation
  41187. instructions. To enable using OpenJPEG in FFmpeg, pass <code>--enable-libopenjpeg</code> to
  41188. <samp>./configure</samp>.
  41189. </p>
  41190. <a name="rav1e"></a>
  41191. <h3 class="section">39.19 rav1e<span class="pull-right"><a class="anchor hidden-xs" href="#rav1e" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-rav1e" aria-hidden="true">TOC</a></span></h3>
  41192. <p>FFmpeg can make use of rav1e (Rust AV1 Encoder) via its C bindings to encode videos.
  41193. Go to <a href="https://github.com/xiph/rav1e/">https://github.com/xiph/rav1e/</a> and follow the instructions to build
  41194. the C library. To enable using rav1e in FFmpeg, pass <code>--enable-librav1e</code>
  41195. to <samp>./configure</samp>.
  41196. </p>
  41197. <a name="SVT_002dAV1"></a>
  41198. <h3 class="section">39.20 SVT-AV1<span class="pull-right"><a class="anchor hidden-xs" href="#SVT_002dAV1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-SVT_002dAV1" aria-hidden="true">TOC</a></span></h3>
  41199. <p>FFmpeg can make use of the Scalable Video Technology for AV1 library for AV1 encoding.
  41200. </p>
  41201. <p>Go to <a href="https://github.com/OpenVisualCloud/SVT-AV1/">https://github.com/OpenVisualCloud/SVT-AV1/</a> and follow the instructions
  41202. for installing the library. Then pass <code>--enable-libsvtav1</code> to configure to
  41203. enable it.
  41204. </p>
  41205. <a name="TwoLAME"></a>
  41206. <h3 class="section">39.21 TwoLAME<span class="pull-right"><a class="anchor hidden-xs" href="#TwoLAME" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-TwoLAME" aria-hidden="true">TOC</a></span></h3>
  41207. <p>FFmpeg can make use of the TwoLAME library for MP2 encoding.
  41208. </p>
  41209. <p>Go to <a href="http://www.twolame.org/">http://www.twolame.org/</a> and follow the
  41210. instructions for installing the library.
  41211. Then pass <code>--enable-libtwolame</code> to configure to enable it.
  41212. </p>
  41213. <a name="VapourSynth"></a>
  41214. <h3 class="section">39.22 VapourSynth<span class="pull-right"><a class="anchor hidden-xs" href="#VapourSynth" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-VapourSynth" aria-hidden="true">TOC</a></span></h3>
  41215. <p>FFmpeg can read VapourSynth scripts as input. To enable support, pass
  41216. <code>--enable-vapoursynth</code> to configure. Vapoursynth is detected via
  41217. <code>pkg-config</code>. Versions 42 or greater supported.
  41218. See <a href="http://www.vapoursynth.com/">http://www.vapoursynth.com/</a>.
  41219. </p>
  41220. <p>Due to security concerns, Vapoursynth scripts will not
  41221. be autodetected so the input format has to be forced. For ff* CLI tools,
  41222. add <code>-f vapoursynth</code> before the input <code>-i yourscript.vpy</code>.
  41223. </p>
  41224. <a name="x264"></a>
  41225. <h3 class="section">39.23 x264<span class="pull-right"><a class="anchor hidden-xs" href="#x264" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-x264" aria-hidden="true">TOC</a></span></h3>
  41226. <p>FFmpeg can make use of the x264 library for H.264 encoding.
  41227. </p>
  41228. <p>Go to <a href="http://www.videolan.org/developers/x264.html">http://www.videolan.org/developers/x264.html</a> and follow the
  41229. instructions for installing the library. Then pass <code>--enable-libx264</code> to
  41230. configure to enable it.
  41231. </p>
  41232. <div class="info">
  41233. <p>x264 is under the GNU Public License Version 2 or later
  41234. (see <a 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
  41235. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  41236. </p></div>
  41237. <a name="x265"></a>
  41238. <h3 class="section">39.24 x265<span class="pull-right"><a class="anchor hidden-xs" href="#x265" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-x265" aria-hidden="true">TOC</a></span></h3>
  41239. <p>FFmpeg can make use of the x265 library for HEVC encoding.
  41240. </p>
  41241. <p>Go to <a href="http://x265.org/developers.html">http://x265.org/developers.html</a> and follow the instructions
  41242. for installing the library. Then pass <code>--enable-libx265</code> to configure
  41243. to enable it.
  41244. </p>
  41245. <div class="info">
  41246. <p>x265 is under the GNU Public License Version 2 or later
  41247. (see <a 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
  41248. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  41249. </p></div>
  41250. <a name="xavs"></a>
  41251. <h3 class="section">39.25 xavs<span class="pull-right"><a class="anchor hidden-xs" href="#xavs" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xavs" aria-hidden="true">TOC</a></span></h3>
  41252. <p>FFmpeg can make use of the xavs library for AVS encoding.
  41253. </p>
  41254. <p>Go to <a href="http://xavs.sf.net/">http://xavs.sf.net/</a> and follow the instructions for
  41255. installing the library. Then pass <code>--enable-libxavs</code> to configure to
  41256. enable it.
  41257. </p>
  41258. <a name="xavs2"></a>
  41259. <h3 class="section">39.26 xavs2<span class="pull-right"><a class="anchor hidden-xs" href="#xavs2" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-xavs2" aria-hidden="true">TOC</a></span></h3>
  41260. <p>FFmpeg can make use of the xavs2 library for AVS2-P2/IEEE1857.4 video encoding.
  41261. </p>
  41262. <p>Go to <a href="https://github.com/pkuvcl/xavs2">https://github.com/pkuvcl/xavs2</a> and follow the instructions for
  41263. installing the library. Then pass <code>--enable-libxavs2</code> to configure to
  41264. enable it.
  41265. </p>
  41266. <div class="info">
  41267. <p>libxavs2 is under the GNU Public License Version 2 or later
  41268. (see <a 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
  41269. details), you must upgrade FFmpeg&rsquo;s license to GPL in order to use it.
  41270. </p></div>
  41271. <a name="ZVBI"></a>
  41272. <h3 class="section">39.27 ZVBI<span class="pull-right"><a class="anchor hidden-xs" href="#ZVBI" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-ZVBI" aria-hidden="true">TOC</a></span></h3>
  41273. <p>ZVBI is a VBI decoding library which can be used by FFmpeg to decode DVB
  41274. teletext pages and DVB teletext subtitles.
  41275. </p>
  41276. <p>Go to <a href="http://sourceforge.net/projects/zapping/">http://sourceforge.net/projects/zapping/</a> and follow the instructions for
  41277. installing the library. Then pass <code>--enable-libzvbi</code> to configure to
  41278. enable it.
  41279. </p>
  41280. <a name="Supported-File-Formats_002c-Codecs-or-Features"></a>
  41281. <h2 class="chapter">40 Supported File Formats, Codecs or Features<span class="pull-right"><a class="anchor hidden-xs" href="#Supported-File-Formats_002c-Codecs-or-Features" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Supported-File-Formats_002c-Codecs-or-Features" aria-hidden="true">TOC</a></span></h2>
  41282. <p>You can use the <code>-formats</code> and <code>-codecs</code> options to have an exhaustive list.
  41283. </p>
  41284. <a name="File-Formats"></a>
  41285. <h3 class="section">40.1 File Formats<span class="pull-right"><a class="anchor hidden-xs" href="#File-Formats" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-File-Formats" aria-hidden="true">TOC</a></span></h3>
  41286. <p>FFmpeg supports the following file formats through the <code>libavformat</code>
  41287. library:
  41288. </p>
  41289. <table>
  41290. <tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  41291. <tr><td width="40%">3dostr</td><td width="10%"></td><td width="10%">X</td></tr>
  41292. <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>
  41293. <tr><td width="40%">8088flex TMV</td><td width="10%"></td><td width="10%">X</td></tr>
  41294. <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>
  41295. <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>
  41296. <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>
  41297. <tr><td width="40%">Adobe Filmstrip</td><td width="10%">X</td><td width="10%">X</td></tr>
  41298. <tr><td width="40%">Audio IFF (AIFF)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41299. <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>
  41300. <tr><td width="40%">3GPP AMR</td><td width="10%">X</td><td width="10%">X</td></tr>
  41301. <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>
  41302. <tr><td width="40%">Apple HTTP Live Streaming</td><td width="10%"></td><td width="10%">X</td></tr>
  41303. <tr><td width="40%">Artworx Data Format</td><td width="10%"></td><td width="10%">X</td></tr>
  41304. <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>
  41305. <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>
  41306. <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>
  41307. <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>
  41308. <tr><td width="40%">APNG</td><td width="10%">X</td><td width="10%">X</td></tr>
  41309. <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>
  41310. <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>
  41311. <tr><td width="40%">AVI</td><td width="10%">X</td><td width="10%">X</td></tr>
  41312. <tr><td width="40%">AviSynth</td><td width="10%"></td><td width="10%">X</td></tr>
  41313. <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>
  41314. <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>
  41315. <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>
  41316. <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>
  41317. <tr><td width="40%">Binary text</td><td width="10%"></td><td width="10%">X</td></tr>
  41318. <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>
  41319. <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>
  41320. <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>
  41321. <tr><td width="40%">BRP</td><td width="10%"></td><td width="10%">X</td><td width="40%">Argonaut Games format.</td></tr>
  41322. <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>
  41323. <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>
  41324. <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>
  41325. <tr><td width="40%">BW64</td><td width="10%"></td><td width="10%">X</td><td width="40%">Broadcast Wave 64bit.</td></tr>
  41326. <tr><td width="40%">BWF</td><td width="10%">X</td><td width="10%">X</td></tr>
  41327. <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>
  41328. <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>
  41329. <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>
  41330. <tr><td width="40%">CRI AIX</td><td width="10%"></td><td width="10%">X</td></tr>
  41331. <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>
  41332. <tr><td width="40%">Discworld II BMV</td><td width="10%"></td><td width="10%">X</td></tr>
  41333. <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>
  41334. <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>
  41335. <tr><td width="40%">Digital Speech Standard (DSS)</td><td width="10%"></td><td width="10%">X</td></tr>
  41336. <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>
  41337. <tr><td width="40%">Phantom Cine</td><td width="10%"></td><td width="10%">X</td></tr>
  41338. <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>
  41339. <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>
  41340. <tr><td width="40%">CRC testing format</td><td width="10%">X</td><td width="10%"></td></tr>
  41341. <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>
  41342. <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>
  41343. <tr><td width="40%">D-Cinema audio</td><td width="10%">X</td><td width="10%">X</td></tr>
  41344. <tr><td width="40%">Deluxe Paint Animation</td><td width="10%"></td><td width="10%">X</td></tr>
  41345. <tr><td width="40%">DCSTR</td><td width="10%"></td><td width="10%">X</td></tr>
  41346. <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>
  41347. <tr><td width="40%">DirectDraw Surface</td><td width="10%"></td><td width="10%">X</td></tr>
  41348. <tr><td width="40%">DSD Stream File (DSF)</td><td width="10%"></td><td width="10%">X</td></tr>
  41349. <tr><td width="40%">DV video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41350. <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
  41351. game and different game cutscenes repacked for use with ScummVM.</td></tr>
  41352. <tr><td width="40%">Electronic Arts cdata</td><td width="10%"></td><td width="10%">X</td></tr>
  41353. <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>
  41354. <tr><td width="40%">Ensoniq Paris Audio File</td><td width="10%"></td><td width="10%">X</td></tr>
  41355. <tr><td width="40%">FFM (FFserver live feed)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41356. <tr><td width="40%">Flash (SWF)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41357. <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>
  41358. <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>
  41359. <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>
  41360. <tr><td width="40%">framecrc testing format</td><td width="10%">X</td><td width="10%"></td></tr>
  41361. <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>
  41362. <tr><td width="40%">G.723.1</td><td width="10%">X</td><td width="10%">X</td></tr>
  41363. <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>
  41364. <tr><td width="40%">G.729 BIT</td><td width="10%">X</td><td width="10%">X</td></tr>
  41365. <tr><td width="40%">G.729 raw</td><td width="10%"></td><td width="10%">X</td></tr>
  41366. <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>
  41367. <tr><td width="40%">GIF Animation</td><td width="10%">X</td><td width="10%">X</td></tr>
  41368. <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
  41369. playout servers.</td></tr>
  41370. <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>
  41371. <tr><td width="40%">iCEDraw File</td><td width="10%"></td><td width="10%">X</td></tr>
  41372. <tr><td width="40%">ICO</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Microsoft Windows ICO</td></tr>
  41373. <tr><td width="40%">id Quake II CIN video</td><td width="10%"></td><td width="10%">X</td></tr>
  41374. <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>
  41375. <tr><td width="40%">IEC61937 encapsulation</td><td width="10%">X</td><td width="10%">X</td></tr>
  41376. <tr><td width="40%">IFF</td><td width="10%"></td><td width="10%">X</td><td width="40%">Interchange File Format</td></tr>
  41377. <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>
  41378. <tr><td width="40%">iLBC</td><td width="10%">X</td><td width="10%">X</td></tr>
  41379. <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>
  41380. <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>
  41381. <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>
  41382. <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>
  41383. <tr><td width="40%">Internet Video Recording</td><td width="10%"></td><td width="10%">X</td></tr>
  41384. <tr><td width="40%">IRCAM</td><td width="10%">X</td><td width="10%">X</td></tr>
  41385. <tr><td width="40%">LATM</td><td width="10%">X</td><td width="10%">X</td></tr>
  41386. <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>
  41387. <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>
  41388. <tr><td width="40%">LRC</td><td width="10%">X</td><td width="10%">X</td></tr>
  41389. <tr><td width="40%">LVF</td><td width="10%"></td><td width="10%">X</td></tr>
  41390. <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>
  41391. <tr><td width="40%">Magic Lantern Video (MLV)</td><td width="10%"></td><td width="10%">X</td></tr>
  41392. <tr><td width="40%">Matroska</td><td width="10%">X</td><td width="10%">X</td></tr>
  41393. <tr><td width="40%">Matroska audio</td><td width="10%">X</td><td width="10%"></td></tr>
  41394. <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>
  41395. <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>
  41396. <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>
  41397. <tr><td width="40%">MD Studio</td><td width="10%"></td><td width="10%">X</td></tr>
  41398. <tr><td width="40%">Metal Gear Solid: The Twin Snakes</td><td width="10%"></td><td width="10%">X</td></tr>
  41399. <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>
  41400. <tr><td width="40%">Mobotix .mxg</td><td width="10%"></td><td width="10%">X</td></tr>
  41401. <tr><td width="40%">Monkey&rsquo;s Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  41402. <tr><td width="40%">Motion Pixels MVI</td><td width="10%"></td><td width="10%">X</td></tr>
  41403. <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>
  41404. <tr><td width="40%">MP2</td><td width="10%">X</td><td width="10%">X</td></tr>
  41405. <tr><td width="40%">MP3</td><td width="10%">X</td><td width="10%">X</td></tr>
  41406. <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>
  41407. <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>VOB</code> file, SVCD and DVD format supported</td></tr>
  41408. <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>
  41409. <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>
  41410. <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>
  41411. <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>
  41412. <tr><td width="40%">MIDI Sample Dump Standard</td><td width="10%"></td><td width="10%">X</td></tr>
  41413. <tr><td width="40%">MIME multipart JPEG</td><td width="10%">X</td><td width="10%"></td></tr>
  41414. <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>
  41415. <tr><td width="40%">MTV</td><td width="10%"></td><td width="10%">X</td></tr>
  41416. <tr><td width="40%">Musepack</td><td width="10%"></td><td width="10%">X</td></tr>
  41417. <tr><td width="40%">Musepack SV8</td><td width="10%"></td><td width="10%">X</td></tr>
  41418. <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>
  41419. <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>
  41420. <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>
  41421. <tr><td width="40%">NIST SPeech HEader REsources</td><td width="10%"></td><td width="10%">X</td></tr>
  41422. <tr><td width="40%">Computerized Speech Lab NSP</td><td width="10%"></td><td width="10%">X</td></tr>
  41423. <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>
  41424. <tr><td width="40%">Nullsoft Streaming Video</td><td width="10%"></td><td width="10%">X</td></tr>
  41425. <tr><td width="40%">NuppelVideo</td><td width="10%"></td><td width="10%">X</td></tr>
  41426. <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>
  41427. <tr><td width="40%">Ogg</td><td width="10%">X</td><td width="10%">X</td></tr>
  41428. <tr><td width="40%">Playstation Portable PMP</td><td width="10%"></td><td width="10%">X</td></tr>
  41429. <tr><td width="40%">Portable Voice Format</td><td width="10%"></td><td width="10%">X</td></tr>
  41430. <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>
  41431. <tr><td width="40%">QCP</td><td width="10%"></td><td width="10%">X</td></tr>
  41432. <tr><td width="40%">raw ADTS (AAC)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41433. <tr><td width="40%">raw AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
  41434. <tr><td width="40%">raw AMR-NB</td><td width="10%"></td><td width="10%">X</td></tr>
  41435. <tr><td width="40%">raw AMR-WB</td><td width="10%"></td><td width="10%">X</td></tr>
  41436. <tr><td width="40%">raw aptX</td><td width="10%">X</td><td width="10%">X</td></tr>
  41437. <tr><td width="40%">raw aptX HD</td><td width="10%">X</td><td width="10%">X</td></tr>
  41438. <tr><td width="40%">raw Chinese AVS video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41439. <tr><td width="40%">raw Dirac</td><td width="10%">X</td><td width="10%">X</td></tr>
  41440. <tr><td width="40%">raw DNxHD</td><td width="10%">X</td><td width="10%">X</td></tr>
  41441. <tr><td width="40%">raw DTS</td><td width="10%">X</td><td width="10%">X</td></tr>
  41442. <tr><td width="40%">raw DTS-HD</td><td width="10%"></td><td width="10%">X</td></tr>
  41443. <tr><td width="40%">raw E-AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
  41444. <tr><td width="40%">raw FLAC</td><td width="10%">X</td><td width="10%">X</td></tr>
  41445. <tr><td width="40%">raw GSM</td><td width="10%"></td><td width="10%">X</td></tr>
  41446. <tr><td width="40%">raw H.261</td><td width="10%">X</td><td width="10%">X</td></tr>
  41447. <tr><td width="40%">raw H.263</td><td width="10%">X</td><td width="10%">X</td></tr>
  41448. <tr><td width="40%">raw H.264</td><td width="10%">X</td><td width="10%">X</td></tr>
  41449. <tr><td width="40%">raw HEVC</td><td width="10%">X</td><td width="10%">X</td></tr>
  41450. <tr><td width="40%">raw Ingenient MJPEG</td><td width="10%"></td><td width="10%">X</td></tr>
  41451. <tr><td width="40%">raw MJPEG</td><td width="10%">X</td><td width="10%">X</td></tr>
  41452. <tr><td width="40%">raw MLP</td><td width="10%"></td><td width="10%">X</td></tr>
  41453. <tr><td width="40%">raw MPEG</td><td width="10%"></td><td width="10%">X</td></tr>
  41454. <tr><td width="40%">raw MPEG-1</td><td width="10%"></td><td width="10%">X</td></tr>
  41455. <tr><td width="40%">raw MPEG-2</td><td width="10%"></td><td width="10%">X</td></tr>
  41456. <tr><td width="40%">raw MPEG-4</td><td width="10%">X</td><td width="10%">X</td></tr>
  41457. <tr><td width="40%">raw NULL</td><td width="10%">X</td><td width="10%"></td></tr>
  41458. <tr><td width="40%">raw video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41459. <tr><td width="40%">raw id RoQ</td><td width="10%">X</td><td width="10%"></td></tr>
  41460. <tr><td width="40%">raw SBC</td><td width="10%">X</td><td width="10%">X</td></tr>
  41461. <tr><td width="40%">raw Shorten</td><td width="10%"></td><td width="10%">X</td></tr>
  41462. <tr><td width="40%">raw TAK</td><td width="10%"></td><td width="10%">X</td></tr>
  41463. <tr><td width="40%">raw TrueHD</td><td width="10%">X</td><td width="10%">X</td></tr>
  41464. <tr><td width="40%">raw VC-1</td><td width="10%">X</td><td width="10%">X</td></tr>
  41465. <tr><td width="40%">raw PCM A-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  41466. <tr><td width="40%">raw PCM mu-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  41467. <tr><td width="40%">raw PCM Archimedes VIDC</td><td width="10%">X</td><td width="10%">X</td></tr>
  41468. <tr><td width="40%">raw PCM signed 8 bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41469. <tr><td width="40%">raw PCM signed 16 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41470. <tr><td width="40%">raw PCM signed 16 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41471. <tr><td width="40%">raw PCM signed 24 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41472. <tr><td width="40%">raw PCM signed 24 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41473. <tr><td width="40%">raw PCM signed 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41474. <tr><td width="40%">raw PCM signed 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41475. <tr><td width="40%">raw PCM signed 64 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41476. <tr><td width="40%">raw PCM signed 64 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41477. <tr><td width="40%">raw PCM unsigned 8 bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41478. <tr><td width="40%">raw PCM unsigned 16 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41479. <tr><td width="40%">raw PCM unsigned 16 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41480. <tr><td width="40%">raw PCM unsigned 24 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41481. <tr><td width="40%">raw PCM unsigned 24 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41482. <tr><td width="40%">raw PCM unsigned 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41483. <tr><td width="40%">raw PCM unsigned 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41484. <tr><td width="40%">raw PCM 16.8 floating point little-endian</td><td width="10%"></td><td width="10%">X</td></tr>
  41485. <tr><td width="40%">raw PCM 24.0 floating point little-endian</td><td width="10%"></td><td width="10%">X</td></tr>
  41486. <tr><td width="40%">raw PCM floating-point 32 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41487. <tr><td width="40%">raw PCM floating-point 32 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41488. <tr><td width="40%">raw PCM floating-point 64 bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41489. <tr><td width="40%">raw PCM floating-point 64 bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41490. <tr><td width="40%">RDT</td><td width="10%"></td><td width="10%">X</td></tr>
  41491. <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>
  41492. <tr><td width="40%">RealMedia</td><td width="10%">X</td><td width="10%">X</td></tr>
  41493. <tr><td width="40%">Redirector</td><td width="10%"></td><td width="10%">X</td></tr>
  41494. <tr><td width="40%">RedSpark</td><td width="10%"></td><td width="10%">X</td></tr>
  41495. <tr><td width="40%">Renderware TeXture Dictionary</td><td width="10%"></td><td width="10%">X</td></tr>
  41496. <tr><td width="40%">Resolume DXV</td><td width="10%"></td><td width="10%">X</td></tr>
  41497. <tr><td width="40%">RF64</td><td width="10%"></td><td width="10%">X</td></tr>
  41498. <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>
  41499. <tr><td width="40%">RPL/ARMovie</td><td width="10%"></td><td width="10%">X</td></tr>
  41500. <tr><td width="40%">Lego Mindstorms RSO</td><td width="10%">X</td><td width="10%">X</td></tr>
  41501. <tr><td width="40%">RSD</td><td width="10%"></td><td width="10%">X</td></tr>
  41502. <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>
  41503. <tr><td width="40%">RTP</td><td width="10%">X</td><td width="10%">X</td></tr>
  41504. <tr><td width="40%">RTSP</td><td width="10%">X</td><td width="10%">X</td></tr>
  41505. <tr><td width="40%">Sample Dump eXchange</td><td width="10%"></td><td width="10%">X</td></tr>
  41506. <tr><td width="40%">SAP</td><td width="10%">X</td><td width="10%">X</td></tr>
  41507. <tr><td width="40%">SBG</td><td width="10%"></td><td width="10%">X</td></tr>
  41508. <tr><td width="40%">SDP</td><td width="10%"></td><td width="10%">X</td></tr>
  41509. <tr><td width="40%">SER</td><td width="10%"></td><td width="10%">X</td></tr>
  41510. <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>
  41511. <tr><td width="40%">Silicon Graphics Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  41512. <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>
  41513. <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>
  41514. <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>
  41515. <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>
  41516. <tr><td width="40%">SMPTE 337M encapsulation</td><td width="10%"></td><td width="10%">X</td></tr>
  41517. <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>
  41518. <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>
  41519. <tr><td width="40%">Sony PlayStation STR</td><td width="10%"></td><td width="10%">X</td></tr>
  41520. <tr><td width="40%">Sony Wave64 (W64)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41521. <tr><td width="40%">SoX native format</td><td width="10%">X</td><td width="10%">X</td></tr>
  41522. <tr><td width="40%">SUN AU format</td><td width="10%">X</td><td width="10%">X</td></tr>
  41523. <tr><td width="40%">SUP raw PGS subtitles</td><td width="10%">X</td><td width="10%">X</td></tr>
  41524. <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>
  41525. <tr><td width="40%">TDSC</td><td width="10%"></td><td width="10%">X</td></tr>
  41526. <tr><td width="40%">Text files</td><td width="10%"></td><td width="10%">X</td></tr>
  41527. <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>
  41528. <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>
  41529. <tr><td width="40%">True Audio</td><td width="10%">X</td><td width="10%">X</td></tr>
  41530. <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>
  41531. <tr><td width="40%">VC-1 test bitstream</td><td width="10%">X</td><td width="10%">X</td></tr>
  41532. <tr><td width="40%">Vidvox Hap</td><td width="10%">X</td><td width="10%">X</td></tr>
  41533. <tr><td width="40%">Vivo</td><td width="10%"></td><td width="10%">X</td></tr>
  41534. <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>
  41535. <tr><td width="40%">WAV</td><td width="10%">X</td><td width="10%">X</td></tr>
  41536. <tr><td width="40%">WavPack</td><td width="10%">X</td><td width="10%">X</td></tr>
  41537. <tr><td width="40%">WebM</td><td width="10%">X</td><td width="10%">X</td></tr>
  41538. <tr><td width="40%">Windows Televison (WTV)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41539. <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>
  41540. <tr><td width="40%">Westwood Studios audio</td><td width="10%"></td><td width="10%">X</td><td width="40%">Multimedia format used in Westwood Studios games.</td></tr>
  41541. <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>
  41542. <tr><td width="40%">Wideband Single-bit Data (WSD)</td><td width="10%"></td><td width="10%">X</td></tr>
  41543. <tr><td width="40%">WVE</td><td width="10%"></td><td width="10%">X</td></tr>
  41544. <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>
  41545. <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>
  41546. <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>
  41547. <tr><td width="40%">eXtended BINary text (XBIN)</td><td width="10%"></td><td width="10%">X</td></tr>
  41548. <tr><td width="40%">YUV4MPEG pipe</td><td width="10%">X</td><td width="10%">X</td></tr>
  41549. <tr><td width="40%">Psygnosis YOP</td><td width="10%"></td><td width="10%">X</td></tr>
  41550. </table>
  41551. <p><code>X</code> means that the feature in that column (encoding / decoding) is supported.
  41552. </p>
  41553. <a name="Image-Formats"></a>
  41554. <h3 class="section">40.2 Image Formats<span class="pull-right"><a class="anchor hidden-xs" href="#Image-Formats" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Image-Formats" aria-hidden="true">TOC</a></span></h3>
  41555. <p>FFmpeg can read and write images for each frame of a video sequence. The
  41556. following image formats are supported:
  41557. </p>
  41558. <table>
  41559. <tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  41560. <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>
  41561. <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>
  41562. <tr><td width="40%">animated GIF</td><td width="10%">X</td><td width="10%">X</td></tr>
  41563. <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>
  41564. <tr><td width="40%">BMP</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Microsoft BMP image</td></tr>
  41565. <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>
  41566. <tr><td width="40%">CRI</td><td width="10%"></td><td width="10%">X</td><td width="40%">Cintel RAW</td></tr>
  41567. <tr><td width="40%">DPX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Digital Picture Exchange</td></tr>
  41568. <tr><td width="40%">EXR</td><td width="10%"></td><td width="10%">X</td><td width="40%">OpenEXR</td></tr>
  41569. <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>
  41570. <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>
  41571. <tr><td width="40%">JPEG 2000</td><td width="10%">X</td><td width="10%">X</td></tr>
  41572. <tr><td width="40%">JPEG-LS</td><td width="10%">X</td><td width="10%">X</td></tr>
  41573. <tr><td width="40%">LJPEG</td><td width="10%">X</td><td width="10%"></td><td width="40%">Lossless JPEG</td></tr>
  41574. <tr><td width="40%">MSP</td><td width="10%"></td><td width="10%">X</td><td width="40%">Microsoft Paint image</td></tr>
  41575. <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>
  41576. <tr><td width="40%">PBM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable BitMap image</td></tr>
  41577. <tr><td width="40%">PCD</td><td width="10%"></td><td width="10%">X</td><td width="40%">PhotoCD</td></tr>
  41578. <tr><td width="40%">PCX</td><td width="10%">X</td><td width="10%">X</td><td width="40%">PC Paintbrush</td></tr>
  41579. <tr><td width="40%">PFM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable FloatMap image</td></tr>
  41580. <tr><td width="40%">PGM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable GrayMap image</td></tr>
  41581. <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>
  41582. <tr><td width="40%">PGX</td><td width="10%"></td><td width="10%">X</td><td width="40%">PGX file decoder</td></tr>
  41583. <tr><td width="40%">PIC</td><td width="10%"></td><td width="10%">X</td><td width="40%">Pictor/PC Paint</td></tr>
  41584. <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>
  41585. <tr><td width="40%">PPM</td><td width="10%">X</td><td width="10%">X</td><td width="40%">Portable PixelMap image</td></tr>
  41586. <tr><td width="40%">PSD</td><td width="10%"></td><td width="10%">X</td><td width="40%">Photoshop</td></tr>
  41587. <tr><td width="40%">PTX</td><td width="10%"></td><td width="10%">X</td><td width="40%">V.Flash PTX format</td></tr>
  41588. <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>
  41589. <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>
  41590. <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>
  41591. <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>
  41592. <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>
  41593. <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>
  41594. <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>
  41595. <tr><td width="40%">XPM</td><td width="10%"></td><td width="10%">X</td><td width="40%">X PixMap image format</td></tr>
  41596. <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>
  41597. </table>
  41598. <p><code>X</code> means that the feature in that column (encoding / decoding) is supported.
  41599. </p>
  41600. <p><code>E</code> means that support is provided through an external library.
  41601. </p>
  41602. <a name="Video-Codecs"></a>
  41603. <h3 class="section">40.3 Video Codecs<span class="pull-right"><a class="anchor hidden-xs" href="#Video-Codecs" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Video-Codecs" aria-hidden="true">TOC</a></span></h3>
  41604. <table>
  41605. <tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  41606. <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>
  41607. <tr><td width="40%">8088flex TMV</td><td width="10%"></td><td width="10%">X</td></tr>
  41608. <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>
  41609. <tr><td width="40%">Amazing Studio PAF Video</td><td width="10%"></td><td width="10%">X</td></tr>
  41610. <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>
  41611. <tr><td width="40%">Amuse Graphics Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  41612. <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>
  41613. <tr><td width="40%">ANSI/ASCII art</td><td width="10%"></td><td width="10%">X</td></tr>
  41614. <tr><td width="40%">Apple Intermediate Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  41615. <tr><td width="40%">Apple MJPEG-B</td><td width="10%"></td><td width="10%">X</td></tr>
  41616. <tr><td width="40%">Apple Pixlet</td><td width="10%"></td><td width="10%">X</td></tr>
  41617. <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>
  41618. <tr><td width="40%">Apple QuickDraw</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: qdrw</td></tr>
  41619. <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>
  41620. <tr><td width="40%">Asus v1</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: ASV1</td></tr>
  41621. <tr><td width="40%">Asus v2</td><td width="10%">X</td><td width="10%">X</td><td width="40%">fourcc: ASV2</td></tr>
  41622. <tr><td width="40%">ATI VCR1</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VCR1</td></tr>
  41623. <tr><td width="40%">ATI VCR2</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VCR2</td></tr>
  41624. <tr><td width="40%">Auravision Aura</td><td width="10%"></td><td width="10%">X</td></tr>
  41625. <tr><td width="40%">Auravision Aura 2</td><td width="10%"></td><td width="10%">X</td></tr>
  41626. <tr><td width="40%">Autodesk Animator Flic video</td><td width="10%"></td><td width="10%">X</td></tr>
  41627. <tr><td width="40%">Autodesk RLE</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: AASC</td></tr>
  41628. <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>
  41629. <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>
  41630. <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>
  41631. <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>
  41632. <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>
  41633. <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>
  41634. <tr><td width="40%">Beam Software VB</td><td width="10%"></td><td width="10%">X</td></tr>
  41635. <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>
  41636. <tr><td width="40%">Bink Video</td><td width="10%"></td><td width="10%">X</td></tr>
  41637. <tr><td width="40%">BitJazz SheerVideo</td><td width="10%"></td><td width="10%">X</td></tr>
  41638. <tr><td width="40%">Bitmap Brothers JV video</td><td width="10%"></td><td width="10%">X</td></tr>
  41639. <tr><td width="40%">y41p Brooktree uncompressed 4:1:1 12-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41640. <tr><td width="40%">Brooktree ProSumer Video</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: BT20</td></tr>
  41641. <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>
  41642. <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>
  41643. <tr><td width="40%">CamStudio</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: CSCD</td></tr>
  41644. <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>
  41645. <tr><td width="40%">CDXL</td><td width="10%"></td><td width="10%">X</td><td width="40%">Amiga CD video codec</td></tr>
  41646. <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>
  41647. <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>
  41648. <tr><td width="40%">Discworld II BMV Video</td><td width="10%"></td><td width="10%">X</td></tr>
  41649. <tr><td width="40%">CineForm HD</td><td width="10%">X</td><td width="10%">X</td></tr>
  41650. <tr><td width="40%">Canopus HQ</td><td width="10%"></td><td width="10%">X</td></tr>
  41651. <tr><td width="40%">Canopus HQA</td><td width="10%"></td><td width="10%">X</td></tr>
  41652. <tr><td width="40%">Canopus HQX</td><td width="10%"></td><td width="10%">X</td></tr>
  41653. <tr><td width="40%">Canopus Lossless Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  41654. <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>
  41655. <tr><td width="40%">Cinepak</td><td width="10%"></td><td width="10%">X</td></tr>
  41656. <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>
  41657. <tr><td width="40%">CPiA Video Format</td><td width="10%"></td><td width="10%">X</td></tr>
  41658. <tr><td width="40%">Creative YUV (CYUV)</td><td width="10%"></td><td width="10%">X</td></tr>
  41659. <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>
  41660. <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>
  41661. <tr><td width="40%">Deluxe Paint Animation</td><td width="10%"></td><td width="10%">X</td></tr>
  41662. <tr><td width="40%">DNxHD</td><td width="10%">X</td><td width="10%">X</td><td width="40%">aka SMPTE VC3</td></tr>
  41663. <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>
  41664. <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>
  41665. <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>
  41666. <tr><td width="40%">DV (Digital Video)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41667. <tr><td width="40%">Dxtory capture format</td><td width="10%"></td><td width="10%">X</td></tr>
  41668. <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>
  41669. <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>
  41670. <tr><td width="40%">Electronic Arts Madcow video</td><td width="10%"></td><td width="10%">X</td></tr>
  41671. <tr><td width="40%">Electronic Arts TGV video</td><td width="10%"></td><td width="10%">X</td></tr>
  41672. <tr><td width="40%">Electronic Arts TGQ video</td><td width="10%"></td><td width="10%">X</td></tr>
  41673. <tr><td width="40%">Electronic Arts TQI video</td><td width="10%"></td><td width="10%">X</td></tr>
  41674. <tr><td width="40%">Escape 124</td><td width="10%"></td><td width="10%">X</td></tr>
  41675. <tr><td width="40%">Escape 130</td><td width="10%"></td><td width="10%">X</td></tr>
  41676. <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>
  41677. <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>
  41678. <tr><td width="40%">Flash Screen Video v2</td><td width="10%">X</td><td width="10%">X</td></tr>
  41679. <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>
  41680. <tr><td width="40%">FM Screen Capture Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  41681. <tr><td width="40%">Forward Uncompressed</td><td width="10%"></td><td width="10%">X</td></tr>
  41682. <tr><td width="40%">Fraps</td><td width="10%"></td><td width="10%">X</td></tr>
  41683. <tr><td width="40%">Go2Meeting</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: G2M2, G2M3</td></tr>
  41684. <tr><td width="40%">Go2Webinar</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: G2M4</td></tr>
  41685. <tr><td width="40%">Gremlin Digital Video</td><td width="10%"></td><td width="10%">X</td></tr>
  41686. <tr><td width="40%">H.261</td><td width="10%">X</td><td width="10%">X</td></tr>
  41687. <tr><td width="40%">H.263 / H.263-1996</td><td width="10%">X</td><td width="10%">X</td></tr>
  41688. <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>
  41689. <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>
  41690. <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>
  41691. <tr><td width="40%">HNM version 4</td><td width="10%"></td><td width="10%">X</td></tr>
  41692. <tr><td width="40%">HuffYUV</td><td width="10%">X</td><td width="10%">X</td></tr>
  41693. <tr><td width="40%">HuffYUV FFmpeg variant</td><td width="10%">X</td><td width="10%">X</td></tr>
  41694. <tr><td width="40%">IBM Ultimotion</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: ULTI</td></tr>
  41695. <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>
  41696. <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>
  41697. <tr><td width="40%">IFF ILBM</td><td width="10%"></td><td width="10%">X</td><td width="40%">IFF interleaved bitmap</td></tr>
  41698. <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>
  41699. <tr><td width="40%">Infinity IMM4</td><td width="10%"></td><td width="10%">X</td></tr>
  41700. <tr><td width="40%">Intel H.263</td><td width="10%"></td><td width="10%">X</td></tr>
  41701. <tr><td width="40%">Intel Indeo 2</td><td width="10%"></td><td width="10%">X</td></tr>
  41702. <tr><td width="40%">Intel Indeo 3</td><td width="10%"></td><td width="10%">X</td></tr>
  41703. <tr><td width="40%">Intel Indeo 4</td><td width="10%"></td><td width="10%">X</td></tr>
  41704. <tr><td width="40%">Intel Indeo 5</td><td width="10%"></td><td width="10%">X</td></tr>
  41705. <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>
  41706. <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>
  41707. <tr><td width="40%">J2K</td><td width="10%">X</td><td width="10%">X</td></tr>
  41708. <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>
  41709. <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>
  41710. <tr><td width="40%">Lagarith</td><td width="10%"></td><td width="10%">X</td></tr>
  41711. <tr><td width="40%">LCL (LossLess Codec Library) MSZH</td><td width="10%"></td><td width="10%">X</td></tr>
  41712. <tr><td width="40%">LCL (LossLess Codec Library) ZLIB</td><td width="10%">E</td><td width="10%">E</td></tr>
  41713. <tr><td width="40%">LOCO</td><td width="10%"></td><td width="10%">X</td></tr>
  41714. <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>
  41715. <tr><td width="40%">lossless MJPEG</td><td width="10%">X</td><td width="10%">X</td></tr>
  41716. <tr><td width="40%">MagicYUV Video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41717. <tr><td width="40%">Mandsoft Screen Capture Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  41718. <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>
  41719. <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>
  41720. <tr><td width="40%">Microsoft RLE</td><td width="10%"></td><td width="10%">X</td></tr>
  41721. <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>
  41722. <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>
  41723. <tr><td width="40%">Microsoft Video 1</td><td width="10%"></td><td width="10%">X</td></tr>
  41724. <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>
  41725. <tr><td width="40%">Miro VideoXL</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VIXL</td></tr>
  41726. <tr><td width="40%">MJPEG (Motion JPEG)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41727. <tr><td width="40%">Mobotix MxPEG video</td><td width="10%"></td><td width="10%">X</td></tr>
  41728. <tr><td width="40%">Motion Pixels video</td><td width="10%"></td><td width="10%">X</td></tr>
  41729. <tr><td width="40%">MPEG-1 video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41730. <tr><td width="40%">MPEG-2 video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41731. <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>
  41732. <tr><td width="40%">MPEG-4 part 2 Microsoft variant version 1</td><td width="10%"></td><td width="10%">X</td></tr>
  41733. <tr><td width="40%">MPEG-4 part 2 Microsoft variant version 2</td><td width="10%">X</td><td width="10%">X</td></tr>
  41734. <tr><td width="40%">MPEG-4 part 2 Microsoft variant version 3</td><td width="10%">X</td><td width="10%">X</td></tr>
  41735. <tr><td width="40%">Newtek SpeedHQ</td><td width="10%">X</td><td width="10%">X</td></tr>
  41736. <tr><td width="40%">Nintendo Gamecube THP video</td><td width="10%"></td><td width="10%">X</td></tr>
  41737. <tr><td width="40%">NotchLC</td><td width="10%"></td><td width="10%">X</td></tr>
  41738. <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>
  41739. <tr><td width="40%">On2 VP3</td><td width="10%"></td><td width="10%">X</td><td width="40%">still experimental</td></tr>
  41740. <tr><td width="40%">On2 VP4</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP40</td></tr>
  41741. <tr><td width="40%">On2 VP5</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP50</td></tr>
  41742. <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>
  41743. <tr><td width="40%">On2 VP7</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: VP70,VP71</td></tr>
  41744. <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>
  41745. <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>
  41746. <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>
  41747. <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>
  41748. <tr><td width="40%">QuickTime 8BPS video</td><td width="10%"></td><td width="10%">X</td></tr>
  41749. <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>
  41750. <tr><td width="40%">QuickTime Graphics (SMC)</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: &rsquo;smc &rsquo;</td></tr>
  41751. <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>
  41752. <tr><td width="40%">R10K AJA Kona 10-bit RGB Codec</td><td width="10%">X</td><td width="10%">X</td></tr>
  41753. <tr><td width="40%">R210 Quicktime Uncompressed RGB 10-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41754. <tr><td width="40%">Raw Video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41755. <tr><td width="40%">RealVideo 1.0</td><td width="10%">X</td><td width="10%">X</td></tr>
  41756. <tr><td width="40%">RealVideo 2.0</td><td width="10%">X</td><td width="10%">X</td></tr>
  41757. <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>
  41758. <tr><td width="40%">RealVideo 4.0</td><td width="10%"></td><td width="10%">X</td></tr>
  41759. <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>
  41760. <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>
  41761. <tr><td width="40%">ScreenPressor</td><td width="10%"></td><td width="10%">X</td></tr>
  41762. <tr><td width="40%">Screenpresso</td><td width="10%"></td><td width="10%">X</td></tr>
  41763. <tr><td width="40%">Screen Recorder Gold Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  41764. <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>
  41765. <tr><td width="40%">Silicon Graphics Motion Video Compressor 1 (MVC1)</td><td width="10%"></td><td width="10%">X</td></tr>
  41766. <tr><td width="40%">Silicon Graphics Motion Video Compressor 2 (MVC2)</td><td width="10%"></td><td width="10%">X</td></tr>
  41767. <tr><td width="40%">Silicon Graphics RLE 8-bit video</td><td width="10%"></td><td width="10%">X</td></tr>
  41768. <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>
  41769. <tr><td width="40%">SMPTE VC-1</td><td width="10%"></td><td width="10%">X</td></tr>
  41770. <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>
  41771. <tr><td width="40%">Sony PlayStation MDEC (Motion DECoder)</td><td width="10%"></td><td width="10%">X</td></tr>
  41772. <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>
  41773. <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>
  41774. <tr><td width="40%">Sunplus JPEG (SP5X)</td><td width="10%"></td><td width="10%">X</td><td width="40%">fourcc: SP5X</td></tr>
  41775. <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>
  41776. <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>
  41777. <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>
  41778. <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>
  41779. <tr><td width="40%">Ut Video</td><td width="10%">X</td><td width="10%">X</td></tr>
  41780. <tr><td width="40%">v210 QuickTime uncompressed 4:2:2 10-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41781. <tr><td width="40%">v308 QuickTime uncompressed 4:4:4</td><td width="10%">X</td><td width="10%">X</td></tr>
  41782. <tr><td width="40%">v408 QuickTime uncompressed 4:4:4:4</td><td width="10%">X</td><td width="10%">X</td></tr>
  41783. <tr><td width="40%">v410 QuickTime uncompressed 4:4:4 10-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41784. <tr><td width="40%">VBLE Lossless Codec</td><td width="10%"></td><td width="10%">X</td></tr>
  41785. <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>
  41786. <tr><td width="40%">Westwood Studios VQA (Vector Quantized Animation) video</td><td width="10%"></td><td width="10%">X</td></tr>
  41787. <tr><td width="40%">Windows Media Image</td><td width="10%"></td><td width="10%">X</td></tr>
  41788. <tr><td width="40%">Windows Media Video 7</td><td width="10%">X</td><td width="10%">X</td></tr>
  41789. <tr><td width="40%">Windows Media Video 8</td><td width="10%">X</td><td width="10%">X</td></tr>
  41790. <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>
  41791. <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>
  41792. <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>
  41793. <tr><td width="40%">Winnov WNV1</td><td width="10%"></td><td width="10%">X</td></tr>
  41794. <tr><td width="40%">WMV7</td><td width="10%">X</td><td width="10%">X</td></tr>
  41795. <tr><td width="40%">YAMAHA SMAF</td><td width="10%">X</td><td width="10%">X</td></tr>
  41796. <tr><td width="40%">Psygnosis YOP Video</td><td width="10%"></td><td width="10%">X</td></tr>
  41797. <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>
  41798. <tr><td width="40%">ZeroCodec Lossless Video</td><td width="10%"></td><td width="10%">X</td></tr>
  41799. <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>
  41800. <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>
  41801. </table>
  41802. <p><code>X</code> means that the feature in that column (encoding / decoding) is supported.
  41803. </p>
  41804. <p><code>E</code> means that support is provided through an external library.
  41805. </p>
  41806. <a name="Audio-Codecs"></a>
  41807. <h3 class="section">40.4 Audio Codecs<span class="pull-right"><a class="anchor hidden-xs" href="#Audio-Codecs" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Audio-Codecs" aria-hidden="true">TOC</a></span></h3>
  41808. <table>
  41809. <tr><td width="40%">Name</td><td width="10%">Encoding</td><td width="10%">Decoding</td><td width="40%">Comments</td></tr>
  41810. <tr><td width="40%">8SVX exponential</td><td width="10%"></td><td width="10%">X</td></tr>
  41811. <tr><td width="40%">8SVX fibonacci</td><td width="10%"></td><td width="10%">X</td></tr>
  41812. <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>
  41813. <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>
  41814. <tr><td width="40%">AC-3</td><td width="10%">IX</td><td width="10%">IX</td></tr>
  41815. <tr><td width="40%">ACELP.KELVIN</td><td width="10%"></td><td width="10%">X</td></tr>
  41816. <tr><td width="40%">ADPCM 4X Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  41817. <tr><td width="40%">ADPCM Yamaha AICA</td><td width="10%"></td><td width="10%">X</td></tr>
  41818. <tr><td width="40%">ADPCM AmuseGraphics Movie</td><td width="10%"></td><td width="10%">X</td></tr>
  41819. <tr><td width="40%">ADPCM Argonaut Games</td><td width="10%">X</td><td width="10%">X</td></tr>
  41820. <tr><td width="40%">ADPCM CDROM XA</td><td width="10%"></td><td width="10%">X</td></tr>
  41821. <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>
  41822. <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>
  41823. <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>
  41824. <tr><td width="40%">ADPCM Electronic Arts R1</td><td width="10%"></td><td width="10%">X</td></tr>
  41825. <tr><td width="40%">ADPCM Electronic Arts R2</td><td width="10%"></td><td width="10%">X</td></tr>
  41826. <tr><td width="40%">ADPCM Electronic Arts R3</td><td width="10%"></td><td width="10%">X</td></tr>
  41827. <tr><td width="40%">ADPCM Electronic Arts XAS</td><td width="10%"></td><td width="10%">X</td></tr>
  41828. <tr><td width="40%">ADPCM G.722</td><td width="10%">X</td><td width="10%">X</td></tr>
  41829. <tr><td width="40%">ADPCM G.726</td><td width="10%">X</td><td width="10%">X</td></tr>
  41830. <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>
  41831. <tr><td width="40%">ADPCM IMA Cunning Developments</td><td width="10%"></td><td width="10%">X</td></tr>
  41832. <tr><td width="40%">ADPCM IMA Electronic Arts EACS</td><td width="10%"></td><td width="10%">X</td></tr>
  41833. <tr><td width="40%">ADPCM IMA Electronic Arts SEAD</td><td width="10%"></td><td width="10%">X</td></tr>
  41834. <tr><td width="40%">ADPCM IMA Funcom</td><td width="10%"></td><td width="10%">X</td></tr>
  41835. <tr><td width="40%">ADPCM IMA High Voltage Software ALP</td><td width="10%">X</td><td width="10%">X</td></tr>
  41836. <tr><td width="40%">ADPCM IMA QuickTime</td><td width="10%">X</td><td width="10%">X</td></tr>
  41837. <tr><td width="40%">ADPCM IMA Simon &amp; Schuster Interactive</td><td width="10%">X</td><td width="10%">X</td></tr>
  41838. <tr><td width="40%">ADPCM IMA Ubisoft APM</td><td width="10%">X</td><td width="10%">X</td></tr>
  41839. <tr><td width="40%">ADPCM IMA Loki SDL MJPEG</td><td width="10%"></td><td width="10%">X</td></tr>
  41840. <tr><td width="40%">ADPCM IMA WAV</td><td width="10%">X</td><td width="10%">X</td></tr>
  41841. <tr><td width="40%">ADPCM IMA Westwood</td><td width="10%"></td><td width="10%">X</td></tr>
  41842. <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>
  41843. <tr><td width="40%">ADPCM IMA Dialogic</td><td width="10%"></td><td width="10%">X</td></tr>
  41844. <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>
  41845. <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>
  41846. <tr><td width="40%">ADPCM IMA Radical</td><td width="10%"></td><td width="10%">X</td></tr>
  41847. <tr><td width="40%">ADPCM Microsoft</td><td width="10%">X</td><td width="10%">X</td></tr>
  41848. <tr><td width="40%">ADPCM MS IMA</td><td width="10%">X</td><td width="10%">X</td></tr>
  41849. <tr><td width="40%">ADPCM Nintendo Gamecube AFC</td><td width="10%"></td><td width="10%">X</td></tr>
  41850. <tr><td width="40%">ADPCM Nintendo Gamecube DTK</td><td width="10%"></td><td width="10%">X</td></tr>
  41851. <tr><td width="40%">ADPCM Nintendo THP</td><td width="10%"></td><td width="10%">X</td></tr>
  41852. <tr><td width="40%">ADPCM Playstation</td><td width="10%"></td><td width="10%">X</td></tr>
  41853. <tr><td width="40%">ADPCM QT IMA</td><td width="10%">X</td><td width="10%">X</td></tr>
  41854. <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>
  41855. <tr><td width="40%">ADPCM Shockwave Flash</td><td width="10%">X</td><td width="10%">X</td></tr>
  41856. <tr><td width="40%">ADPCM Sound Blaster Pro 2-bit</td><td width="10%"></td><td width="10%">X</td></tr>
  41857. <tr><td width="40%">ADPCM Sound Blaster Pro 2.6-bit</td><td width="10%"></td><td width="10%">X</td></tr>
  41858. <tr><td width="40%">ADPCM Sound Blaster Pro 4-bit</td><td width="10%"></td><td width="10%">X</td></tr>
  41859. <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>
  41860. <tr><td width="40%">ADPCM Westwood Studios IMA</td><td width="10%"></td><td width="10%">X</td><td width="40%">Used in Westwood Studios games like Command and Conquer.</td></tr>
  41861. <tr><td width="40%">ADPCM Yamaha</td><td width="10%">X</td><td width="10%">X</td></tr>
  41862. <tr><td width="40%">ADPCM Zork</td><td width="10%"></td><td width="10%">X</td></tr>
  41863. <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>
  41864. <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>
  41865. <tr><td width="40%">Amazing Studio PAF Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  41866. <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>
  41867. <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>
  41868. <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>
  41869. <tr><td width="40%">ATRAC1</td><td width="10%"></td><td width="10%">X</td></tr>
  41870. <tr><td width="40%">ATRAC3</td><td width="10%"></td><td width="10%">X</td></tr>
  41871. <tr><td width="40%">ATRAC3+</td><td width="10%"></td><td width="10%">X</td></tr>
  41872. <tr><td width="40%">ATRAC9</td><td width="10%"></td><td width="10%">X</td></tr>
  41873. <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>
  41874. <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>
  41875. <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>
  41876. <tr><td width="40%">CRI HCA</td><td width="10%"></td><td width="10%">X</td></tr>
  41877. <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>
  41878. <tr><td width="40%">Digital Speech Standard - Standard Play mode (DSS SP)</td><td width="10%"></td><td width="10%">X</td></tr>
  41879. <tr><td width="40%">Discworld II BMV Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  41880. <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>
  41881. <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>
  41882. <tr><td width="40%">Dolby E</td><td width="10%"></td><td width="10%">X</td></tr>
  41883. <tr><td width="40%">DPCM Gremlin</td><td width="10%"></td><td width="10%">X</td></tr>
  41884. <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>
  41885. <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>
  41886. <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>
  41887. <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>
  41888. <tr><td width="40%">DPCM Sol</td><td width="10%"></td><td width="10%">X</td></tr>
  41889. <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>
  41890. <tr><td width="40%">DPCM Xilam DERF</td><td width="10%"></td><td width="10%">X</td></tr>
  41891. <tr><td width="40%">DSD (Direct Stream Digital), least significant bit first</td><td width="10%"></td><td width="10%">X</td></tr>
  41892. <tr><td width="40%">DSD (Direct Stream Digital), most significant bit first</td><td width="10%"></td><td width="10%">X</td></tr>
  41893. <tr><td width="40%">DSD (Direct Stream Digital), least significant bit first, planar</td><td width="10%"></td><td width="10%">X</td></tr>
  41894. <tr><td width="40%">DSD (Direct Stream Digital), most significant bit first, planar</td><td width="10%"></td><td width="10%">X</td></tr>
  41895. <tr><td width="40%">DSP Group TrueSpeech</td><td width="10%"></td><td width="10%">X</td></tr>
  41896. <tr><td width="40%">DST (Direct Stream Transfer)</td><td width="10%"></td><td width="10%">X</td></tr>
  41897. <tr><td width="40%">DV audio</td><td width="10%"></td><td width="10%">X</td></tr>
  41898. <tr><td width="40%">Enhanced AC-3</td><td width="10%">X</td><td width="10%">X</td></tr>
  41899. <tr><td width="40%">EVRC (Enhanced Variable Rate Codec)</td><td width="10%"></td><td width="10%">X</td></tr>
  41900. <tr><td width="40%">FLAC (Free Lossless Audio Codec)</td><td width="10%">X</td><td width="10%">IX</td></tr>
  41901. <tr><td width="40%">G.723.1</td><td width="10%">X</td><td width="10%">X</td></tr>
  41902. <tr><td width="40%">G.729</td><td width="10%"></td><td width="10%">X</td></tr>
  41903. <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>
  41904. <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>
  41905. <tr><td width="40%">IAC (Indeo Audio Coder)</td><td width="10%"></td><td width="10%">X</td></tr>
  41906. <tr><td width="40%">iLBC (Internet Low Bitrate Codec)</td><td width="10%">E</td><td width="10%">E</td><td width="40%">encoding and decoding supported through external library libilbc</td></tr>
  41907. <tr><td width="40%">IMC (Intel Music Coder)</td><td width="10%"></td><td width="10%">X</td></tr>
  41908. <tr><td width="40%">Interplay ACM</td><td width="10%"></td><td width="10%">X</td></tr>
  41909. <tr><td width="40%">MACE (Macintosh Audio Compression/Expansion) 3:1</td><td width="10%"></td><td width="10%">X</td></tr>
  41910. <tr><td width="40%">MACE (Macintosh Audio Compression/Expansion) 6:1</td><td width="10%"></td><td width="10%">X</td></tr>
  41911. <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>
  41912. <tr><td width="40%">Monkey&rsquo;s Audio</td><td width="10%"></td><td width="10%">X</td></tr>
  41913. <tr><td width="40%">MP1 (MPEG audio layer 1)</td><td width="10%"></td><td width="10%">IX</td></tr>
  41914. <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>
  41915. <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>
  41916. <tr><td width="40%">MPEG-4 Audio Lossless Coding (ALS)</td><td width="10%"></td><td width="10%">X</td></tr>
  41917. <tr><td width="40%">Musepack SV7</td><td width="10%"></td><td width="10%">X</td></tr>
  41918. <tr><td width="40%">Musepack SV8</td><td width="10%"></td><td width="10%">X</td></tr>
  41919. <tr><td width="40%">Nellymoser Asao</td><td width="10%">X</td><td width="10%">X</td></tr>
  41920. <tr><td width="40%">On2 AVC (Audio for Video Codec)</td><td width="10%"></td><td width="10%">X</td></tr>
  41921. <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>
  41922. <tr><td width="40%">PCM A-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  41923. <tr><td width="40%">PCM mu-law</td><td width="10%">X</td><td width="10%">X</td></tr>
  41924. <tr><td width="40%">PCM Archimedes VIDC</td><td width="10%">X</td><td width="10%">X</td></tr>
  41925. <tr><td width="40%">PCM signed 8-bit planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  41926. <tr><td width="40%">PCM signed 16-bit big-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  41927. <tr><td width="40%">PCM signed 16-bit little-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  41928. <tr><td width="40%">PCM signed 24-bit little-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  41929. <tr><td width="40%">PCM signed 32-bit little-endian planar</td><td width="10%">X</td><td width="10%">X</td></tr>
  41930. <tr><td width="40%">PCM 32-bit floating point big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41931. <tr><td width="40%">PCM 32-bit floating point little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41932. <tr><td width="40%">PCM 64-bit floating point big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41933. <tr><td width="40%">PCM 64-bit floating point little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41934. <tr><td width="40%">PCM D-Cinema audio signed 24-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41935. <tr><td width="40%">PCM signed 8-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41936. <tr><td width="40%">PCM signed 16-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41937. <tr><td width="40%">PCM signed 16-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41938. <tr><td width="40%">PCM signed 24-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41939. <tr><td width="40%">PCM signed 24-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41940. <tr><td width="40%">PCM signed 32-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41941. <tr><td width="40%">PCM signed 32-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41942. <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>
  41943. <tr><td width="40%">PCM unsigned 8-bit</td><td width="10%">X</td><td width="10%">X</td></tr>
  41944. <tr><td width="40%">PCM unsigned 16-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41945. <tr><td width="40%">PCM unsigned 16-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41946. <tr><td width="40%">PCM unsigned 24-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41947. <tr><td width="40%">PCM unsigned 24-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41948. <tr><td width="40%">PCM unsigned 32-bit big-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41949. <tr><td width="40%">PCM unsigned 32-bit little-endian</td><td width="10%">X</td><td width="10%">X</td></tr>
  41950. <tr><td width="40%">QCELP / PureVoice</td><td width="10%"></td><td width="10%">X</td></tr>
  41951. <tr><td width="40%">QDesign Music Codec 1</td><td width="10%"></td><td width="10%">X</td></tr>
  41952. <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>
  41953. <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>
  41954. <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>
  41955. <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>
  41956. <tr><td width="40%">RealAudio Lossless</td><td width="10%"></td><td width="10%">X</td></tr>
  41957. <tr><td width="40%">RealAudio SIPR / ACELP.NET</td><td width="10%"></td><td width="10%">X</td></tr>
  41958. <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>
  41959. <tr><td width="40%">Shorten</td><td width="10%"></td><td width="10%">X</td></tr>
  41960. <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>
  41961. <tr><td width="40%">Smacker audio</td><td width="10%"></td><td width="10%">X</td></tr>
  41962. <tr><td width="40%">SMPTE 302M AES3 audio</td><td width="10%">X</td><td width="10%">X</td></tr>
  41963. <tr><td width="40%">Sonic</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental codec</td></tr>
  41964. <tr><td width="40%">Sonic lossless</td><td width="10%">X</td><td width="10%">X</td><td width="40%">experimental codec</td></tr>
  41965. <tr><td width="40%">Speex</td><td width="10%">E</td><td width="10%">E</td><td width="40%">supported through external library libspeex</td></tr>
  41966. <tr><td width="40%">TAK (Tom&rsquo;s lossless Audio Kompressor)</td><td width="10%"></td><td width="10%">X</td></tr>
  41967. <tr><td width="40%">True Audio (TTA)</td><td width="10%">X</td><td width="10%">X</td></tr>
  41968. <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>
  41969. <tr><td width="40%">TwinVQ (VQF flavor)</td><td width="10%"></td><td width="10%">X</td></tr>
  41970. <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>
  41971. <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>
  41972. <tr><td width="40%">Voxware MetaSound</td><td width="10%"></td><td width="10%">X</td></tr>
  41973. <tr><td width="40%">WavPack</td><td width="10%">X</td><td width="10%">X</td></tr>
  41974. <tr><td width="40%">Westwood Audio (SND1)</td><td width="10%"></td><td width="10%">X</td></tr>
  41975. <tr><td width="40%">Windows Media Audio 1</td><td width="10%">X</td><td width="10%">X</td></tr>
  41976. <tr><td width="40%">Windows Media Audio 2</td><td width="10%">X</td><td width="10%">X</td></tr>
  41977. <tr><td width="40%">Windows Media Audio Lossless</td><td width="10%"></td><td width="10%">X</td></tr>
  41978. <tr><td width="40%">Windows Media Audio Pro</td><td width="10%"></td><td width="10%">X</td></tr>
  41979. <tr><td width="40%">Windows Media Audio Voice</td><td width="10%"></td><td width="10%">X</td></tr>
  41980. <tr><td width="40%">Xbox Media Audio 1</td><td width="10%"></td><td width="10%">X</td></tr>
  41981. <tr><td width="40%">Xbox Media Audio 2</td><td width="10%"></td><td width="10%">X</td></tr>
  41982. </table>
  41983. <p><code>X</code> means that the feature in that column (encoding / decoding) is supported.
  41984. </p>
  41985. <p><code>E</code> means that support is provided through an external library.
  41986. </p>
  41987. <p><code>I</code> means that an integer-only version is available, too (ensures high
  41988. performance on systems without hardware floating point support).
  41989. </p>
  41990. <a name="Subtitle-Formats"></a>
  41991. <h3 class="section">40.5 Subtitle Formats<span class="pull-right"><a class="anchor hidden-xs" href="#Subtitle-Formats" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Subtitle-Formats" aria-hidden="true">TOC</a></span></h3>
  41992. <table>
  41993. <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>
  41994. <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>
  41995. <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>
  41996. <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>
  41997. <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>
  41998. <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>
  41999. <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>
  42000. <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>
  42001. <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>
  42002. <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>
  42003. <tr><td width="40%">PGS</td><td width="10%"></td><td width="10%"></td><td width="10%"></td><td width="10%">X</td></tr>
  42004. <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>
  42005. <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>
  42006. <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>
  42007. <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>
  42008. <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>
  42009. <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>
  42010. <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>
  42011. <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>
  42012. <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>
  42013. <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>
  42014. <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>
  42015. <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>
  42016. <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>
  42017. <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>
  42018. </table>
  42019. <p><code>X</code> means that the feature is supported.
  42020. </p>
  42021. <p><code>E</code> means that support is provided through an external library.
  42022. </p>
  42023. <a name="Network-Protocols"></a>
  42024. <h3 class="section">40.6 Network Protocols<span class="pull-right"><a class="anchor hidden-xs" href="#Network-Protocols" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Network-Protocols" aria-hidden="true">TOC</a></span></h3>
  42025. <table>
  42026. <tr><td width="40%">Name</td><td width="10%">Support</td></tr>
  42027. <tr><td width="40%">AMQP</td><td width="10%">E</td></tr>
  42028. <tr><td width="40%">file</td><td width="10%">X</td></tr>
  42029. <tr><td width="40%">FTP</td><td width="10%">X</td></tr>
  42030. <tr><td width="40%">Gopher</td><td width="10%">X</td></tr>
  42031. <tr><td width="40%">Gophers</td><td width="10%">X</td></tr>
  42032. <tr><td width="40%">HLS</td><td width="10%">X</td></tr>
  42033. <tr><td width="40%">HTTP</td><td width="10%">X</td></tr>
  42034. <tr><td width="40%">HTTPS</td><td width="10%">X</td></tr>
  42035. <tr><td width="40%">Icecast</td><td width="10%">X</td></tr>
  42036. <tr><td width="40%">MMSH</td><td width="10%">X</td></tr>
  42037. <tr><td width="40%">MMST</td><td width="10%">X</td></tr>
  42038. <tr><td width="40%">pipe</td><td width="10%">X</td></tr>
  42039. <tr><td width="40%">Pro-MPEG FEC</td><td width="10%">X</td></tr>
  42040. <tr><td width="40%">RTMP</td><td width="10%">X</td></tr>
  42041. <tr><td width="40%">RTMPE</td><td width="10%">X</td></tr>
  42042. <tr><td width="40%">RTMPS</td><td width="10%">X</td></tr>
  42043. <tr><td width="40%">RTMPT</td><td width="10%">X</td></tr>
  42044. <tr><td width="40%">RTMPTE</td><td width="10%">X</td></tr>
  42045. <tr><td width="40%">RTMPTS</td><td width="10%">X</td></tr>
  42046. <tr><td width="40%">RTP</td><td width="10%">X</td></tr>
  42047. <tr><td width="40%">SAMBA</td><td width="10%">E</td></tr>
  42048. <tr><td width="40%">SCTP</td><td width="10%">X</td></tr>
  42049. <tr><td width="40%">SFTP</td><td width="10%">E</td></tr>
  42050. <tr><td width="40%">TCP</td><td width="10%">X</td></tr>
  42051. <tr><td width="40%">TLS</td><td width="10%">X</td></tr>
  42052. <tr><td width="40%">UDP</td><td width="10%">X</td></tr>
  42053. <tr><td width="40%">ZMQ</td><td width="10%">E</td></tr>
  42054. </table>
  42055. <p><code>X</code> means that the protocol is supported.
  42056. </p>
  42057. <p><code>E</code> means that support is provided through an external library.
  42058. </p>
  42059. <a name="Input_002fOutput-Devices"></a>
  42060. <h3 class="section">40.7 Input/Output Devices<span class="pull-right"><a class="anchor hidden-xs" href="#Input_002fOutput-Devices" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Input_002fOutput-Devices" aria-hidden="true">TOC</a></span></h3>
  42061. <table>
  42062. <tr><td width="40%">Name</td><td width="10%">Input</td><td width="10%">Output</td></tr>
  42063. <tr><td width="40%">ALSA</td><td width="10%">X</td><td width="10%">X</td></tr>
  42064. <tr><td width="40%">BKTR</td><td width="10%">X</td><td width="10%"></td></tr>
  42065. <tr><td width="40%">caca</td><td width="10%"></td><td width="10%">X</td></tr>
  42066. <tr><td width="40%">DV1394</td><td width="10%">X</td><td width="10%"></td></tr>
  42067. <tr><td width="40%">Lavfi virtual device</td><td width="10%">X</td><td width="10%"></td></tr>
  42068. <tr><td width="40%">Linux framebuffer</td><td width="10%">X</td><td width="10%">X</td></tr>
  42069. <tr><td width="40%">JACK</td><td width="10%">X</td><td width="10%"></td></tr>
  42070. <tr><td width="40%">LIBCDIO</td><td width="10%">X</td></tr>
  42071. <tr><td width="40%">LIBDC1394</td><td width="10%">X</td><td width="10%"></td></tr>
  42072. <tr><td width="40%">OpenAL</td><td width="10%">X</td></tr>
  42073. <tr><td width="40%">OpenGL</td><td width="10%"></td><td width="10%">X</td></tr>
  42074. <tr><td width="40%">OSS</td><td width="10%">X</td><td width="10%">X</td></tr>
  42075. <tr><td width="40%">PulseAudio</td><td width="10%">X</td><td width="10%">X</td></tr>
  42076. <tr><td width="40%">SDL</td><td width="10%"></td><td width="10%">X</td></tr>
  42077. <tr><td width="40%">Video4Linux2</td><td width="10%">X</td><td width="10%">X</td></tr>
  42078. <tr><td width="40%">VfW capture</td><td width="10%">X</td><td width="10%"></td></tr>
  42079. <tr><td width="40%">X11 grabbing</td><td width="10%">X</td><td width="10%"></td></tr>
  42080. <tr><td width="40%">Win32 grabbing</td><td width="10%">X</td><td width="10%"></td></tr>
  42081. </table>
  42082. <p><code>X</code> means that input/output is supported.
  42083. </p>
  42084. <a name="Timecode-1"></a>
  42085. <h3 class="section">40.8 Timecode<span class="pull-right"><a class="anchor hidden-xs" href="#Timecode-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Timecode-1" aria-hidden="true">TOC</a></span></h3>
  42086. <table>
  42087. <tr><td width="40%">Codec/format</td><td width="10%">Read</td><td width="10%">Write</td></tr>
  42088. <tr><td width="40%">AVI</td><td width="10%">X</td><td width="10%">X</td></tr>
  42089. <tr><td width="40%">DV</td><td width="10%">X</td><td width="10%">X</td></tr>
  42090. <tr><td width="40%">GXF</td><td width="10%">X</td><td width="10%">X</td></tr>
  42091. <tr><td width="40%">MOV</td><td width="10%">X</td><td width="10%">X</td></tr>
  42092. <tr><td width="40%">MPEG1/2</td><td width="10%">X</td><td width="10%">X</td></tr>
  42093. <tr><td width="40%">MXF</td><td width="10%">X</td><td width="10%">X</td></tr>
  42094. </table>
  42095. <a name="See-Also"></a>
  42096. <h2 class="chapter">41 See Also<span class="pull-right"><a class="anchor hidden-xs" href="#See-Also" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-See-Also" aria-hidden="true">TOC</a></span></h2>
  42097. <p><a href="ffprobe.html">ffprobe</a>,
  42098. <a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>,
  42099. <a href="ffmpeg-utils.html">ffmpeg-utils</a>,
  42100. <a href="ffmpeg-scaler.html">ffmpeg-scaler</a>,
  42101. <a href="ffmpeg-resampler.html">ffmpeg-resampler</a>,
  42102. <a href="ffmpeg-codecs.html">ffmpeg-codecs</a>,
  42103. <a href="ffmpeg-bitstream-filters.html">ffmpeg-bitstream-filters</a>,
  42104. <a href="ffmpeg-formats.html">ffmpeg-formats</a>,
  42105. <a href="ffmpeg-devices.html">ffmpeg-devices</a>,
  42106. <a href="ffmpeg-protocols.html">ffmpeg-protocols</a>,
  42107. <a href="ffmpeg-filters.html">ffmpeg-filters</a>
  42108. </p>
  42109. <a name="Authors"></a>
  42110. <h2 class="chapter">42 Authors<span class="pull-right"><a class="anchor hidden-xs" href="#Authors" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Authors" aria-hidden="true">TOC</a></span></h2>
  42111. <p>The FFmpeg developers.
  42112. </p>
  42113. <p>For details about the authorship, see the Git history of the project
  42114. (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
  42115. <code>git log</code> in the FFmpeg source directory, or browsing the
  42116. online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
  42117. </p>
  42118. <p>Maintainers for the specific components are listed in the file
  42119. <samp>MAINTAINERS</samp> in the source code tree.
  42120. </p>
  42121. <p style="font-size: small;">
  42122. This document was generated using <a href="http://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
  42123. </p>
  42124. </div>
  42125. </body>
  42126. </html>