星火微课系统客户端
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

4 роки тому
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697306983069930700307013070230703307043070530706307073070830709307103071130712307133071430715307163071730718307193072030721307223072330724307253072630727307283072930730307313073230733307343073530736307373073830739307403074130742307433074430745307463074730748307493075030751307523075330754307553075630757307583075930760307613076230763307643076530766307673076830769307703077130772307733077430775307763077730778307793078030781307823078330784307853078630787307883078930790307913079230793307943079530796307973079830799308003080130802308033080430805308063080730808308093081030811308123081330814308153081630817308183081930820308213082230823308243082530826308273082830829308303083130832308333083430835308363083730838308393084030841308423084330844308453084630847308483084930850308513085230853308543085530856308573085830859308603086130862308633086430865308663086730868308693087030871308723087330874308753087630877308783087930880308813088230883308843088530886308873088830889308903089130892308933089430895308963089730898308993090030901309023090330904309053090630907309083090930910309113091230913309143091530916309173091830919309203092130922309233092430925309263092730928309293093030931309323093330934309353093630937309383093930940309413094230943309443094530946309473094830949309503095130952309533095430955309563095730958309593096030961309623096330964309653096630967309683096930970309713097230973309743097530976309773097830979309803098130982309833098430985309863098730988309893099030991309923099330994309953099630997309983099931000310013100231003310043100531006310073100831009310103101131012310133101431015310163101731018310193102031021310223102331024310253102631027310283102931030310313103231033310343103531036310373103831039310403104131042310433104431045310463104731048310493105031051310523105331054310553105631057310583105931060310613106231063310643106531066310673106831069310703107131072310733107431075310763107731078310793108031081310823108331084310853108631087310883108931090310913109231093310943109531096310973109831099311003110131102311033110431105311063110731108311093111031111311123111331114311153111631117311183111931120311213112231123311243112531126311273112831129311303113131132311333113431135311363113731138311393114031141311423114331144311453114631147311483114931150311513115231153311543115531156311573115831159311603116131162311633116431165311663116731168311693117031171311723117331174311753117631177311783117931180311813118231183311843118531186311873118831189311903119131192311933119431195311963119731198311993120031201312023120331204312053120631207312083120931210312113121231213312143121531216312173121831219312203122131222312233122431225312263122731228312293123031231312323123331234312353123631237312383123931240312413124231243312443124531246312473124831249312503125131252312533125431255312563125731258312593126031261312623126331264312653126631267312683126931270312713127231273312743127531276312773127831279312803128131282312833128431285312863128731288312893129031291312923129331294312953129631297312983129931300313013130231303313043130531306313073130831309313103131131312313133131431315313163131731318313193132031321313223132331324313253132631327313283132931330313313133231333313343133531336313373133831339313403134131342313433134431345313463134731348313493135031351313523135331354313553135631357313583135931360313613136231363313643136531366313673136831369313703137131372313733137431375313763137731378313793138031381313823138331384313853138631387313883138931390313913139231393313943139531396313973139831399314003140131402314033140431405314063140731408314093141031411314123141331414314153141631417314183141931420314213142231423314243142531426314273142831429314303143131432314333143431435314363143731438314393144031441314423144331444314453144631447314483144931450314513145231453314543145531456314573145831459314603146131462314633146431465314663146731468314693147031471314723147331474314753147631477314783147931480314813148231483314843148531486314873148831489314903149131492314933149431495314963149731498314993150031501315023150331504315053150631507315083150931510315113151231513315143151531516315173151831519315203152131522315233152431525315263152731528315293153031531315323153331534315353153631537315383153931540315413154231543315443154531546315473154831549315503155131552315533155431555315563155731558315593156031561315623156331564315653156631567315683156931570315713157231573315743157531576315773157831579315803158131582315833158431585315863158731588315893159031591315923159331594315953159631597315983159931600316013160231603316043160531606316073160831609316103161131612316133161431615316163161731618316193162031621316223162331624316253162631627316283162931630316313163231633316343163531636316373163831639316403164131642316433164431645316463164731648316493165031651316523165331654316553165631657316583165931660316613166231663316643166531666316673166831669316703167131672316733167431675316763167731678316793168031681316823168331684316853168631687316883168931690316913169231693316943169531696316973169831699317003170131702317033170431705317063170731708317093171031711317123171331714317153171631717317183171931720317213172231723317243172531726317273172831729317303173131732317333173431735317363173731738317393174031741317423174331744317453174631747317483174931750317513175231753317543175531756317573175831759317603176131762317633176431765317663176731768317693177031771317723177331774317753177631777317783177931780317813178231783317843178531786317873178831789317903179131792317933179431795317963179731798317993180031801318023180331804318053180631807318083180931810318113181231813318143181531816318173181831819318203182131822318233182431825318263182731828318293183031831318323183331834318353183631837318383183931840318413184231843318443184531846318473184831849318503185131852318533185431855318563185731858318593186031861318623186331864318653186631867318683186931870318713187231873318743187531876318773187831879318803188131882318833188431885318863188731888318893189031891318923189331894318953189631897318983189931900319013190231903319043190531906319073190831909319103191131912319133191431915319163191731918319193192031921319223192331924319253192631927319283192931930319313193231933319343193531936319373193831939319403194131942319433194431945319463194731948319493195031951319523195331954319553195631957319583195931960319613196231963319643196531966319673196831969319703197131972319733197431975319763197731978319793198031981319823198331984319853198631987319883198931990319913199231993319943199531996319973199831999320003200132002320033200432005320063200732008320093201032011320123201332014320153201632017320183201932020320213202232023320243202532026320273202832029320303203132032320333203432035320363203732038320393204032041320423204332044320453204632047320483204932050320513205232053320543205532056320573205832059320603206132062320633206432065320663206732068320693207032071320723207332074320753207632077320783207932080320813208232083320843208532086320873208832089320903209132092320933209432095320963209732098320993210032101321023210332104321053210632107321083210932110321113211232113321143211532116321173211832119321203212132122321233212432125321263212732128321293213032131321323213332134321353213632137321383213932140321413214232143321443214532146321473214832149321503215132152321533215432155321563215732158321593216032161321623216332164321653216632167321683216932170321713217232173321743217532176321773217832179321803218132182321833218432185321863218732188321893219032191321923219332194321953219632197321983219932200322013220232203322043220532206322073220832209322103221132212322133221432215322163221732218322193222032221322223222332224322253222632227322283222932230322313223232233322343223532236322373223832239322403224132242322433224432245322463224732248322493225032251322523225332254322553225632257322583225932260322613226232263322643226532266322673226832269322703227132272322733227432275322763227732278322793228032281322823228332284322853228632287322883228932290322913229232293322943229532296322973229832299323003230132302323033230432305323063230732308323093231032311323123231332314323153231632317323183231932320323213232232323323243232532326323273232832329323303233132332323333233432335323363233732338323393234032341323423234332344323453234632347323483234932350323513235232353323543235532356323573235832359323603236132362323633236432365323663236732368323693237032371323723237332374323753237632377323783237932380323813238232383323843238532386323873238832389323903239132392323933239432395323963239732398323993240032401324023240332404324053240632407324083240932410324113241232413324143241532416324173241832419324203242132422324233242432425324263242732428324293243032431324323243332434324353243632437324383243932440324413244232443324443244532446324473244832449324503245132452324533245432455324563245732458324593246032461324623246332464324653246632467324683246932470324713247232473324743247532476324773247832479324803248132482324833248432485324863248732488324893249032491324923249332494324953249632497324983249932500325013250232503325043250532506325073250832509325103251132512325133251432515325163251732518325193252032521325223252332524325253252632527325283252932530325313253232533325343253532536325373253832539325403254132542325433254432545325463254732548325493255032551325523255332554325553255632557325583255932560325613256232563325643256532566325673256832569325703257132572325733257432575325763257732578325793258032581325823258332584325853258632587325883258932590325913259232593325943259532596325973259832599326003260132602326033260432605326063260732608326093261032611326123261332614326153261632617326183261932620326213262232623326243262532626326273262832629326303263132632326333263432635326363263732638326393264032641326423264332644326453264632647326483264932650326513265232653326543265532656326573265832659326603266132662326633266432665326663266732668326693267032671326723267332674326753267632677326783267932680326813268232683326843268532686326873268832689326903269132692326933269432695326963269732698326993270032701327023270332704327053270632707327083270932710327113271232713327143271532716327173271832719327203272132722327233272432725327263272732728327293273032731327323273332734327353273632737327383273932740327413274232743327443274532746327473274832749327503275132752327533275432755327563275732758327593276032761327623276332764327653276632767327683276932770327713277232773327743277532776327773277832779327803278132782327833278432785327863278732788327893279032791327923279332794327953279632797327983279932800328013280232803328043280532806328073280832809328103281132812328133281432815328163281732818328193282032821328223282332824328253282632827328283282932830328313283232833328343283532836328373283832839328403284132842328433284432845328463284732848328493285032851328523285332854328553285632857328583285932860328613286232863328643286532866328673286832869328703287132872328733287432875328763287732878328793288032881328823288332884328853288632887328883288932890328913289232893328943289532896328973289832899329003290132902329033290432905329063290732908329093291032911329123291332914329153291632917329183291932920329213292232923329243292532926329273292832929329303293132932329333293432935329363293732938329393294032941329423294332944329453294632947329483294932950329513295232953329543295532956329573295832959329603296132962329633296432965329663296732968329693297032971329723297332974329753297632977329783297932980329813298232983329843298532986329873298832989329903299132992329933299432995329963299732998329993300033001330023300333004330053300633007330083300933010330113301233013330143301533016330173301833019330203302133022330233302433025330263302733028330293303033031330323303333034330353303633037330383303933040330413304233043330443304533046330473304833049330503305133052330533305433055330563305733058330593306033061330623306333064330653306633067330683306933070330713307233073330743307533076330773307833079330803308133082330833308433085330863308733088330893309033091330923309333094330953309633097330983309933100331013310233103331043310533106331073310833109331103311133112331133311433115331163311733118331193312033121331223312333124331253312633127331283312933130331313313233133331343313533136331373313833139331403314133142331433314433145331463314733148331493315033151331523315333154331553315633157331583315933160331613316233163331643316533166331673316833169331703317133172331733317433175331763317733178331793318033181331823318333184331853318633187331883318933190331913319233193331943319533196331973319833199332003320133202332033320433205332063320733208332093321033211332123321333214332153321633217332183321933220332213322233223332243322533226332273322833229332303323133232332333323433235332363323733238332393324033241332423324333244332453324633247332483324933250332513325233253332543325533256332573325833259332603326133262332633326433265332663326733268332693327033271332723327333274332753327633277332783327933280332813328233283332843328533286332873328833289332903329133292332933329433295332963329733298332993330033301333023330333304333053330633307333083330933310333113331233313333143331533316333173331833319333203332133322333233332433325333263332733328333293333033331333323333333334333353333633337333383333933340333413334233343333443334533346333473334833349333503335133352333533335433355333563335733358333593336033361333623336333364333653336633367333683336933370333713337233373333743337533376333773337833379333803338133382333833338433385333863338733388333893339033391333923339333394333953339633397333983339933400334013340233403334043340533406334073340833409334103341133412334133341433415334163341733418334193342033421334223342333424334253342633427334283342933430334313343233433334343343533436334373343833439334403344133442334433344433445334463344733448334493345033451334523345333454334553345633457334583345933460334613346233463334643346533466334673346833469334703347133472334733347433475334763347733478334793348033481334823348333484334853348633487334883348933490334913349233493334943349533496334973349833499335003350133502335033350433505335063350733508335093351033511335123351333514335153351633517335183351933520335213352233523335243352533526335273352833529335303353133532335333353433535335363353733538335393354033541335423354333544335453354633547335483354933550335513355233553335543355533556335573355833559335603356133562335633356433565335663356733568335693357033571335723357333574335753357633577335783357933580335813358233583335843358533586335873358833589335903359133592335933359433595335963359733598335993360033601336023360333604336053360633607336083360933610336113361233613336143361533616336173361833619336203362133622336233362433625336263362733628336293363033631336323363333634336353363633637336383363933640336413364233643336443364533646336473364833649336503365133652336533365433655336563365733658336593366033661336623366333664336653366633667336683366933670336713367233673336743367533676336773367833679336803368133682336833368433685336863368733688336893369033691336923369333694336953369633697336983369933700337013370233703337043370533706337073370833709337103371133712337133371433715337163371733718337193372033721337223372333724337253372633727337283372933730337313373233733337343373533736337373373833739337403374133742337433374433745337463374733748337493375033751337523375333754337553375633757337583375933760337613376233763337643376533766337673376833769337703377133772337733377433775337763377733778337793378033781337823378333784337853378633787337883378933790337913379233793337943379533796337973379833799338003380133802338033380433805338063380733808338093381033811338123381333814338153381633817338183381933820338213382233823338243382533826338273382833829338303383133832338333383433835338363383733838338393384033841338423384333844338453384633847338483384933850338513385233853338543385533856338573385833859338603386133862338633386433865338663386733868338693387033871338723387333874338753387633877338783387933880338813388233883338843388533886338873388833889338903389133892338933389433895338963389733898338993390033901339023390333904339053390633907339083390933910339113391233913339143391533916339173391833919339203392133922339233392433925339263392733928339293393033931339323393333934339353393633937339383393933940339413394233943339443394533946339473394833949339503395133952339533395433955339563395733958339593396033961339623396333964339653396633967339683396933970339713397233973339743397533976339773397833979339803398133982339833398433985339863398733988339893399033991339923399333994339953399633997339983399934000340013400234003340043400534006340073400834009340103401134012340133401434015340163401734018340193402034021340223402334024340253402634027340283402934030340313403234033340343403534036340373403834039340403404134042340433404434045340463404734048340493405034051340523405334054340553405634057340583405934060340613406234063340643406534066340673406834069340703407134072340733407434075340763407734078340793408034081340823408334084340853408634087340883408934090340913409234093340943409534096340973409834099341003410134102341033410434105341063410734108341093411034111341123411334114341153411634117341183411934120341213412234123341243412534126341273412834129341303413134132341333413434135341363413734138341393414034141341423414334144341453414634147341483414934150341513415234153341543415534156341573415834159341603416134162341633416434165341663416734168341693417034171341723417334174341753417634177341783417934180341813418234183341843418534186341873418834189341903419134192341933419434195341963419734198341993420034201342023420334204342053420634207342083420934210342113421234213342143421534216342173421834219342203422134222342233422434225342263422734228342293423034231342323423334234342353423634237342383423934240342413424234243342443424534246342473424834249342503425134252342533425434255342563425734258342593426034261342623426334264342653426634267342683426934270342713427234273342743427534276342773427834279342803428134282342833428434285342863428734288342893429034291342923429334294342953429634297342983429934300343013430234303343043430534306343073430834309343103431134312343133431434315343163431734318343193432034321343223432334324343253432634327343283432934330343313433234333343343433534336343373433834339343403434134342343433434434345343463434734348343493435034351343523435334354343553435634357343583435934360343613436234363343643436534366343673436834369343703437134372343733437434375343763437734378343793438034381343823438334384343853438634387343883438934390343913439234393343943439534396343973439834399344003440134402344033440434405344063440734408344093441034411344123441334414344153441634417344183441934420344213442234423344243442534426344273442834429344303443134432344333443434435344363443734438344393444034441344423444334444344453444634447344483444934450344513445234453344543445534456344573445834459344603446134462344633446434465344663446734468344693447034471344723447334474344753447634477344783447934480344813448234483344843448534486344873448834489344903449134492344933449434495344963449734498344993450034501345023450334504345053450634507345083450934510345113451234513345143451534516345173451834519345203452134522345233452434525345263452734528345293453034531345323453334534345353453634537345383453934540345413454234543345443454534546345473454834549345503455134552345533455434555345563455734558345593456034561345623456334564345653456634567345683456934570345713457234573345743457534576345773457834579345803458134582345833458434585345863458734588345893459034591345923459334594345953459634597345983459934600346013460234603346043460534606346073460834609346103461134612346133461434615346163461734618346193462034621346223462334624346253462634627346283462934630346313463234633346343463534636346373463834639346403464134642346433464434645346463464734648346493465034651346523465334654346553465634657346583465934660346613466234663346643466534666346673466834669346703467134672346733467434675346763467734678346793468034681346823468334684346853468634687346883468934690346913469234693346943469534696346973469834699347003470134702347033470434705347063470734708347093471034711347123471334714347153471634717347183471934720347213472234723347243472534726347273472834729347303473134732347333473434735347363473734738347393474034741347423474334744347453474634747347483474934750347513475234753347543475534756347573475834759347603476134762347633476434765347663476734768347693477034771347723477334774347753477634777347783477934780347813478234783347843478534786347873478834789347903479134792347933479434795347963479734798347993480034801348023480334804348053480634807348083480934810348113481234813348143481534816348173481834819348203482134822348233482434825348263482734828348293483034831348323483334834348353483634837348383483934840348413484234843348443484534846348473484834849348503485134852348533485434855348563485734858348593486034861348623486334864348653486634867348683486934870348713487234873348743487534876348773487834879348803488134882348833488434885348863488734888348893489034891348923489334894348953489634897348983489934900349013490234903349043490534906349073490834909349103491134912349133491434915349163491734918349193492034921349223492334924349253492634927349283492934930349313493234933349343493534936349373493834939349403494134942349433494434945349463494734948349493495034951349523495334954349553495634957349583495934960349613496234963349643496534966349673496834969349703497134972349733497434975349763497734978349793498034981349823498334984349853498634987349883498934990349913499234993349943499534996349973499834999350003500135002350033500435005350063500735008350093501035011350123501335014350153501635017350183501935020350213502235023350243502535026350273502835029350303503135032350333503435035350363503735038350393504035041350423504335044350453504635047350483504935050350513505235053350543505535056350573505835059350603506135062350633506435065350663506735068350693507035071350723507335074350753507635077350783507935080350813508235083350843508535086350873508835089350903509135092350933509435095350963509735098350993510035101351023510335104351053510635107351083510935110351113511235113351143511535116351173511835119351203512135122351233512435125351263512735128351293513035131351323513335134351353513635137351383513935140351413514235143351443514535146351473514835149351503515135152351533515435155351563515735158351593516035161351623516335164351653516635167351683516935170351713517235173351743517535176351773517835179351803518135182351833518435185351863518735188351893519035191351923519335194351953519635197351983519935200352013520235203352043520535206352073520835209352103521135212352133521435215352163521735218352193522035221352223522335224352253522635227352283522935230352313523235233352343523535236352373523835239352403524135242352433524435245352463524735248352493525035251352523525335254352553525635257352583525935260352613526235263352643526535266352673526835269352703527135272352733527435275352763527735278352793528035281352823528335284352853528635287352883528935290352913529235293352943529535296352973529835299353003530135302353033530435305353063530735308353093531035311353123531335314353153531635317353183531935320353213532235323353243532535326353273532835329353303533135332353333533435335353363533735338353393534035341353423534335344353453534635347353483534935350353513535235353353543535535356353573535835359353603536135362353633536435365353663536735368353693537035371353723537335374353753537635377353783537935380353813538235383353843538535386353873538835389353903539135392353933539435395353963539735398353993540035401354023540335404354053540635407354083540935410354113541235413354143541535416354173541835419354203542135422354233542435425354263542735428354293543035431354323543335434354353543635437354383543935440354413544235443354443544535446354473544835449354503545135452354533545435455354563545735458354593546035461354623546335464354653546635467354683546935470354713547235473354743547535476354773547835479354803548135482354833548435485354863548735488354893549035491354923549335494354953549635497354983549935500355013550235503355043550535506355073550835509355103551135512355133551435515355163551735518355193552035521355223552335524355253552635527355283552935530355313553235533355343553535536355373553835539355403554135542355433554435545355463554735548355493555035551355523555335554355553555635557355583555935560355613556235563355643556535566355673556835569355703557135572355733557435575355763557735578355793558035581355823558335584355853558635587355883558935590355913559235593355943559535596355973559835599356003560135602356033560435605356063560735608356093561035611356123561335614356153561635617356183561935620356213562235623356243562535626356273562835629356303563135632356333563435635356363563735638356393564035641356423564335644356453564635647356483564935650356513565235653356543565535656356573565835659356603566135662356633566435665356663566735668356693567035671356723567335674356753567635677356783567935680356813568235683356843568535686356873568835689356903569135692356933569435695356963569735698356993570035701357023570335704357053570635707357083570935710357113571235713357143571535716357173571835719357203572135722357233572435725357263572735728357293573035731357323573335734357353573635737357383573935740357413574235743357443574535746357473574835749357503575135752357533575435755357563575735758357593576035761357623576335764357653576635767357683576935770357713577235773357743577535776357773577835779357803578135782357833578435785357863578735788357893579035791357923579335794357953579635797357983579935800358013580235803358043580535806358073580835809358103581135812358133581435815358163581735818358193582035821358223582335824358253582635827358283582935830358313583235833358343583535836358373583835839358403584135842358433584435845358463584735848358493585035851358523585335854358553585635857358583585935860358613586235863358643586535866358673586835869358703587135872358733587435875358763587735878358793588035881358823588335884358853588635887358883588935890358913589235893358943589535896358973589835899359003590135902359033590435905359063590735908359093591035911359123591335914359153591635917359183591935920359213592235923359243592535926359273592835929359303593135932359333593435935359363593735938359393594035941359423594335944359453594635947359483594935950359513595235953359543595535956359573595835959359603596135962359633596435965359663596735968359693597035971359723597335974359753597635977359783597935980359813598235983359843598535986359873598835989359903599135992359933599435995359963599735998359993600036001360023600336004360053600636007360083600936010360113601236013360143601536016360173601836019360203602136022360233602436025360263602736028360293603036031360323603336034360353603636037360383603936040360413604236043360443604536046360473604836049360503605136052360533605436055360563605736058360593606036061360623606336064360653606636067360683606936070360713607236073360743607536076360773607836079360803608136082360833608436085360863608736088360893609036091360923609336094360953609636097360983609936100361013610236103361043610536106361073610836109361103611136112361133611436115361163611736118361193612036121361223612336124361253612636127361283612936130361313613236133361343613536136361373613836139361403614136142361433614436145361463614736148361493615036151361523615336154361553615636157361583615936160361613616236163361643616536166361673616836169361703617136172361733617436175361763617736178361793618036181361823618336184361853618636187361883618936190361913619236193361943619536196361973619836199362003620136202362033620436205362063620736208362093621036211362123621336214362153621636217362183621936220362213622236223362243622536226362273622836229362303623136232362333623436235362363623736238362393624036241362423624336244362453624636247362483624936250362513625236253362543625536256362573625836259362603626136262362633626436265362663626736268362693627036271362723627336274362753627636277362783627936280362813628236283362843628536286362873628836289362903629136292362933629436295362963629736298362993630036301363023630336304363053630636307363083630936310363113631236313363143631536316363173631836319363203632136322363233632436325363263632736328363293633036331363323633336334363353633636337363383633936340363413634236343363443634536346363473634836349363503635136352363533635436355363563635736358363593636036361363623636336364363653636636367363683636936370363713637236373363743637536376363773637836379363803638136382363833638436385363863638736388363893639036391363923639336394363953639636397363983639936400364013640236403364043640536406364073640836409364103641136412364133641436415364163641736418364193642036421364223642336424364253642636427364283642936430364313643236433364343643536436364373643836439364403644136442364433644436445364463644736448364493645036451364523645336454364553645636457364583645936460364613646236463364643646536466364673646836469364703647136472364733647436475364763647736478364793648036481364823648336484364853648636487364883648936490364913649236493364943649536496364973649836499365003650136502365033650436505365063650736508365093651036511365123651336514365153651636517365183651936520365213652236523365243652536526365273652836529365303653136532365333653436535365363653736538365393654036541365423654336544365453654636547365483654936550365513655236553365543655536556365573655836559365603656136562365633656436565365663656736568365693657036571365723657336574365753657636577365783657936580365813658236583365843658536586365873658836589365903659136592365933659436595365963659736598365993660036601366023660336604366053660636607366083660936610366113661236613366143661536616366173661836619366203662136622366233662436625366263662736628366293663036631366323663336634366353663636637366383663936640366413664236643366443664536646366473664836649366503665136652366533665436655366563665736658366593666036661366623666336664366653666636667366683666936670366713667236673366743667536676366773667836679366803668136682366833668436685366863668736688366893669036691366923669336694366953669636697366983669936700367013670236703367043670536706367073670836709367103671136712367133671436715367163671736718367193672036721367223672336724367253672636727367283672936730367313673236733367343673536736367373673836739367403674136742367433674436745367463674736748367493675036751367523675336754367553675636757367583675936760367613676236763367643676536766367673676836769367703677136772367733677436775367763677736778367793678036781367823678336784367853678636787367883678936790367913679236793367943679536796367973679836799368003680136802368033680436805368063680736808368093681036811368123681336814368153681636817368183681936820368213682236823368243682536826368273682836829368303683136832368333683436835368363683736838368393684036841368423684336844368453684636847368483684936850368513685236853368543685536856368573685836859368603686136862368633686436865368663686736868368693687036871368723687336874368753687636877368783687936880368813688236883368843688536886368873688836889368903689136892368933689436895368963689736898368993690036901369023690336904369053690636907369083690936910369113691236913369143691536916369173691836919369203692136922369233692436925369263692736928369293693036931369323693336934369353693636937369383693936940369413694236943369443694536946369473694836949369503695136952369533695436955369563695736958369593696036961369623696336964369653696636967369683696936970369713697236973369743697536976369773697836979369803698136982369833698436985369863698736988369893699036991369923699336994369953699636997369983699937000370013700237003370043700537006370073700837009370103701137012370133701437015370163701737018370193702037021370223702337024370253702637027370283702937030370313703237033370343703537036370373703837039370403704137042370433704437045370463704737048370493705037051370523705337054370553705637057370583705937060370613706237063370643706537066370673706837069370703707137072370733707437075370763707737078370793708037081370823708337084370853708637087370883708937090370913709237093370943709537096370973709837099371003710137102371033710437105371063710737108371093711037111371123711337114371153711637117371183711937120371213712237123371243712537126371273712837129371303713137132371333713437135371363713737138371393714037141371423714337144371453714637147371483714937150371513715237153371543715537156371573715837159371603716137162371633716437165371663716737168371693717037171371723717337174371753717637177371783717937180371813718237183371843718537186371873718837189371903719137192371933719437195371963719737198371993720037201372023720337204372053720637207372083720937210372113721237213372143721537216372173721837219372203722137222372233722437225372263722737228372293723037231372323723337234372353723637237372383723937240372413724237243372443724537246372473724837249372503725137252372533725437255372563725737258372593726037261372623726337264372653726637267372683726937270372713727237273372743727537276372773727837279372803728137282372833728437285372863728737288372893729037291372923729337294372953729637297372983729937300373013730237303373043730537306373073730837309373103731137312373133731437315373163731737318373193732037321373223732337324373253732637327373283732937330373313733237333373343733537336373373733837339373403734137342373433734437345373463734737348373493735037351373523735337354373553735637357373583735937360373613736237363373643736537366373673736837369373703737137372373733737437375373763737737378373793738037381373823738337384373853738637387373883738937390373913739237393373943739537396373973739837399374003740137402374033740437405374063740737408374093741037411374123741337414374153741637417374183741937420374213742237423374243742537426374273742837429374303743137432374333743437435374363743737438374393744037441374423744337444374453744637447374483744937450374513745237453374543745537456374573745837459374603746137462374633746437465374663746737468374693747037471374723747337474374753747637477374783747937480374813748237483374843748537486374873748837489374903749137492374933749437495374963749737498374993750037501375023750337504375053750637507375083750937510375113751237513375143751537516375173751837519375203752137522375233752437525375263752737528375293753037531375323753337534375353753637537375383753937540375413754237543375443754537546375473754837549375503755137552375533755437555375563755737558375593756037561375623756337564375653756637567375683756937570375713757237573375743757537576375773757837579375803758137582375833758437585375863758737588375893759037591375923759337594375953759637597375983759937600376013760237603376043760537606376073760837609376103761137612376133761437615376163761737618376193762037621376223762337624376253762637627376283762937630376313763237633376343763537636376373763837639376403764137642376433764437645376463764737648376493765037651376523765337654376553765637657376583765937660376613766237663376643766537666376673766837669376703767137672376733767437675376763767737678376793768037681376823768337684376853768637687376883768937690376913769237693376943769537696376973769837699377003770137702377033770437705377063770737708377093771037711377123771337714377153771637717377183771937720377213772237723377243772537726377273772837729377303773137732377333773437735377363773737738377393774037741377423774337744377453774637747377483774937750377513775237753377543775537756377573775837759377603776137762377633776437765377663776737768377693777037771377723777337774377753777637777377783777937780377813778237783377843778537786377873778837789377903779137792377933779437795377963779737798377993780037801378023780337804378053780637807378083780937810378113781237813378143781537816378173781837819378203782137822378233782437825378263782737828378293783037831378323783337834378353783637837378383783937840378413784237843378443784537846378473784837849378503785137852378533785437855378563785737858378593786037861378623786337864378653786637867378683786937870378713787237873378743787537876378773787837879378803788137882378833788437885378863788737888378893789037891378923789337894378953789637897378983789937900379013790237903379043790537906379073790837909379103791137912379133791437915379163791737918379193792037921379223792337924379253792637927379283792937930379313793237933379343793537936379373793837939379403794137942379433794437945379463794737948379493795037951379523795337954379553795637957379583795937960379613796237963379643796537966379673796837969379703797137972379733797437975379763797737978379793798037981379823798337984379853798637987379883798937990379913799237993379943799537996379973799837999380003800138002380033800438005380063800738008380093801038011380123801338014380153801638017380183801938020380213802238023380243802538026380273802838029380303803138032380333803438035380363803738038380393804038041380423804338044380453804638047380483804938050380513805238053380543805538056380573805838059380603806138062380633806438065380663806738068380693807038071380723807338074380753807638077380783807938080380813808238083380843808538086380873808838089380903809138092380933809438095380963809738098380993810038101381023810338104381053810638107381083810938110381113811238113381143811538116381173811838119381203812138122381233812438125381263812738128381293813038131381323813338134381353813638137381383813938140381413814238143381443814538146381473814838149381503815138152381533815438155381563815738158381593816038161381623816338164381653816638167381683816938170381713817238173381743817538176381773817838179381803818138182381833818438185381863818738188381893819038191381923819338194381953819638197381983819938200382013820238203382043820538206382073820838209382103821138212382133821438215382163821738218382193822038221382223822338224382253822638227382283822938230382313823238233382343823538236382373823838239382403824138242382433824438245382463824738248382493825038251382523825338254382553825638257382583825938260382613826238263382643826538266382673826838269382703827138272382733827438275382763827738278382793828038281382823828338284382853828638287382883828938290382913829238293382943829538296382973829838299383003830138302383033830438305383063830738308383093831038311383123831338314383153831638317383183831938320383213832238323383243832538326383273832838329383303833138332383333833438335383363833738338383393834038341383423834338344383453834638347383483834938350383513835238353383543835538356383573835838359383603836138362383633836438365383663836738368383693837038371383723837338374383753837638377383783837938380383813838238383383843838538386383873838838389383903839138392383933839438395383963839738398383993840038401384023840338404384053840638407384083840938410384113841238413384143841538416384173841838419384203842138422384233842438425384263842738428384293843038431384323843338434384353843638437384383843938440384413844238443384443844538446384473844838449384503845138452384533845438455384563845738458384593846038461384623846338464384653846638467384683846938470384713847238473384743847538476384773847838479384803848138482384833848438485384863848738488384893849038491384923849338494384953849638497384983849938500385013850238503385043850538506385073850838509385103851138512385133851438515385163851738518385193852038521385223852338524385253852638527385283852938530385313853238533385343853538536385373853838539385403854138542385433854438545385463854738548385493855038551385523855338554385553855638557385583855938560385613856238563385643856538566385673856838569385703857138572385733857438575385763857738578385793858038581385823858338584385853858638587385883858938590385913859238593385943859538596385973859838599386003860138602386033860438605386063860738608386093861038611386123861338614386153861638617386183861938620386213862238623386243862538626386273862838629386303863138632386333863438635386363863738638386393864038641386423864338644386453864638647386483864938650386513865238653386543865538656386573865838659386603866138662386633866438665386663866738668386693867038671386723867338674386753867638677386783867938680386813868238683386843868538686386873868838689386903869138692386933869438695386963869738698386993870038701387023870338704387053870638707387083870938710387113871238713387143871538716387173871838719387203872138722387233872438725387263872738728387293873038731387323873338734387353873638737387383873938740387413874238743387443874538746387473874838749387503875138752387533875438755387563875738758387593876038761387623876338764387653876638767387683876938770387713877238773387743877538776387773877838779387803878138782387833878438785387863878738788387893879038791387923879338794387953879638797387983879938800388013880238803388043880538806388073880838809388103881138812388133881438815388163881738818388193882038821388223882338824388253882638827388283882938830388313883238833388343883538836388373883838839388403884138842388433884438845388463884738848388493885038851388523885338854388553885638857388583885938860388613886238863388643886538866388673886838869388703887138872388733887438875388763887738878388793888038881388823888338884388853888638887388883888938890388913889238893388943889538896388973889838899389003890138902389033890438905389063890738908389093891038911389123891338914389153891638917389183891938920389213892238923389243892538926389273892838929389303893138932389333893438935389363893738938389393894038941389423894338944389453894638947389483894938950389513895238953389543895538956389573895838959389603896138962389633896438965389663896738968389693897038971389723897338974389753897638977389783897938980389813898238983389843898538986389873898838989389903899138992389933899438995389963899738998389993900039001390023900339004390053900639007390083900939010390113901239013390143901539016390173901839019390203902139022390233902439025390263902739028390293903039031390323903339034390353903639037390383903939040390413904239043390443904539046390473904839049390503905139052390533905439055390563905739058390593906039061390623906339064390653906639067390683906939070390713907239073390743907539076390773907839079390803908139082390833908439085390863908739088390893909039091390923909339094390953909639097390983909939100391013910239103391043910539106391073910839109391103911139112391133911439115391163911739118391193912039121391223912339124391253912639127391283912939130391313913239133391343913539136391373913839139391403914139142391433914439145391463914739148391493915039151391523915339154391553915639157391583915939160391613916239163391643916539166391673916839169391703917139172391733917439175391763917739178391793918039181391823918339184391853918639187391883918939190391913919239193391943919539196391973919839199392003920139202392033920439205392063920739208392093921039211392123921339214392153921639217392183921939220392213922239223392243922539226392273922839229392303923139232392333923439235392363923739238392393924039241392423924339244392453924639247392483924939250392513925239253392543925539256392573925839259392603926139262392633926439265392663926739268392693927039271392723927339274392753927639277392783927939280392813928239283392843928539286392873928839289392903929139292392933929439295392963929739298392993930039301393023930339304393053930639307393083930939310393113931239313393143931539316393173931839319393203932139322393233932439325393263932739328393293933039331393323933339334393353933639337393383933939340393413934239343393443934539346393473934839349393503935139352393533935439355393563935739358393593936039361393623936339364393653936639367393683936939370393713937239373393743937539376393773937839379393803938139382393833938439385393863938739388393893939039391393923939339394393953939639397393983939939400394013940239403394043940539406394073940839409394103941139412394133941439415394163941739418394193942039421394223942339424394253942639427394283942939430394313943239433394343943539436394373943839439394403944139442394433944439445394463944739448394493945039451394523945339454394553945639457394583945939460394613946239463394643946539466394673946839469394703947139472394733947439475394763947739478394793948039481394823948339484394853948639487394883948939490394913949239493394943949539496394973949839499395003950139502395033950439505395063950739508395093951039511395123951339514395153951639517395183951939520395213952239523395243952539526395273952839529395303953139532395333953439535395363953739538395393954039541395423954339544395453954639547395483954939550395513955239553395543955539556395573955839559395603956139562395633956439565395663956739568395693957039571395723957339574395753957639577395783957939580395813958239583395843958539586395873958839589395903959139592395933959439595395963959739598395993960039601396023960339604396053960639607396083960939610396113961239613396143961539616396173961839619396203962139622396233962439625396263962739628396293963039631396323963339634396353963639637396383963939640396413964239643396443964539646396473964839649396503965139652396533965439655396563965739658396593966039661396623966339664396653966639667396683966939670396713967239673396743967539676396773967839679396803968139682396833968439685396863968739688396893969039691396923969339694396953969639697396983969939700397013970239703397043970539706397073970839709397103971139712397133971439715397163971739718397193972039721397223972339724397253972639727397283972939730397313973239733397343973539736397373973839739397403974139742397433974439745397463974739748397493975039751397523975339754397553975639757397583975939760397613976239763397643976539766397673976839769397703977139772397733977439775397763977739778397793978039781397823978339784397853978639787397883978939790397913979239793397943979539796397973979839799398003980139802398033980439805398063980739808398093981039811398123981339814398153981639817398183981939820398213982239823398243982539826398273982839829398303983139832398333983439835398363983739838398393984039841398423984339844398453984639847398483984939850398513985239853398543985539856398573985839859398603986139862398633986439865398663986739868398693987039871398723987339874398753987639877398783987939880398813988239883398843988539886398873988839889398903989139892398933989439895398963989739898398993990039901399023990339904399053990639907399083990939910399113991239913399143991539916399173991839919399203992139922399233992439925399263992739928399293993039931399323993339934399353993639937399383993939940399413994239943399443994539946399473994839949399503995139952399533995439955399563995739958399593996039961399623996339964399653996639967399683996939970399713997239973399743997539976399773997839979399803998139982399833998439985399863998739988399893999039991399923999339994399953999639997399983999940000400014000240003400044000540006400074000840009400104001140012400134001440015400164001740018400194002040021400224002340024400254002640027400284002940030400314003240033400344003540036400374003840039400404004140042400434004440045400464004740048400494005040051400524005340054400554005640057400584005940060400614006240063400644006540066400674006840069400704007140072400734007440075400764007740078400794008040081400824008340084400854008640087400884008940090400914009240093400944009540096400974009840099401004010140102401034010440105401064010740108401094011040111401124011340114401154011640117401184011940120401214012240123401244012540126401274012840129401304013140132401334013440135401364013740138401394014040141401424014340144401454014640147401484014940150401514015240153401544015540156401574015840159401604016140162401634016440165401664016740168401694017040171401724017340174401754017640177401784017940180401814018240183401844018540186401874018840189401904019140192401934019440195401964019740198401994020040201402024020340204402054020640207402084020940210402114021240213402144021540216402174021840219402204022140222402234022440225402264022740228402294023040231402324023340234402354023640237402384023940240402414024240243402444024540246402474024840249402504025140252402534025440255402564025740258402594026040261402624026340264402654026640267402684026940270402714027240273402744027540276402774027840279402804028140282402834028440285402864028740288402894029040291402924029340294402954029640297402984029940300403014030240303403044030540306403074030840309403104031140312403134031440315403164031740318403194032040321403224032340324403254032640327403284032940330403314033240333403344033540336403374033840339403404034140342403434034440345403464034740348403494035040351403524035340354403554035640357403584035940360403614036240363403644036540366403674036840369403704037140372403734037440375403764037740378403794038040381403824038340384403854038640387403884038940390403914039240393403944039540396403974039840399404004040140402404034040440405404064040740408404094041040411404124041340414404154041640417404184041940420404214042240423404244042540426404274042840429404304043140432404334043440435404364043740438404394044040441404424044340444404454044640447404484044940450404514045240453404544045540456404574045840459404604046140462404634046440465404664046740468404694047040471404724047340474404754047640477404784047940480404814048240483404844048540486404874048840489404904049140492404934049440495404964049740498404994050040501405024050340504405054050640507405084050940510405114051240513405144051540516405174051840519405204052140522405234052440525405264052740528405294053040531405324053340534405354053640537405384053940540405414054240543405444054540546405474054840549405504055140552405534055440555405564055740558405594056040561405624056340564405654056640567405684056940570405714057240573405744057540576405774057840579405804058140582405834058440585405864058740588405894059040591405924059340594405954059640597405984059940600406014060240603406044060540606406074060840609406104061140612406134061440615406164061740618406194062040621406224062340624406254062640627406284062940630406314063240633406344063540636406374063840639406404064140642406434064440645406464064740648406494065040651406524065340654406554065640657406584065940660406614066240663406644066540666406674066840669406704067140672406734067440675406764067740678406794068040681406824068340684406854068640687406884068940690406914069240693406944069540696406974069840699407004070140702407034070440705407064070740708407094071040711407124071340714407154071640717407184071940720407214072240723407244072540726407274072840729407304073140732407334073440735407364073740738407394074040741407424074340744407454074640747407484074940750407514075240753407544075540756407574075840759407604076140762407634076440765407664076740768407694077040771407724077340774407754077640777407784077940780407814078240783407844078540786407874078840789407904079140792407934079440795407964079740798407994080040801408024080340804408054080640807408084080940810408114081240813408144081540816408174081840819408204082140822408234082440825408264082740828408294083040831408324083340834408354083640837408384083940840408414084240843408444084540846408474084840849408504085140852408534085440855408564085740858408594086040861408624086340864408654086640867408684086940870408714087240873408744087540876408774087840879408804088140882408834088440885408864088740888408894089040891408924089340894408954089640897408984089940900409014090240903409044090540906409074090840909409104091140912409134091440915409164091740918409194092040921409224092340924409254092640927409284092940930409314093240933409344093540936409374093840939409404094140942409434094440945409464094740948409494095040951409524095340954409554095640957409584095940960409614096240963409644096540966409674096840969409704097140972409734097440975409764097740978409794098040981409824098340984409854098640987409884098940990409914099240993409944099540996409974099840999410004100141002410034100441005410064100741008410094101041011410124101341014410154101641017410184101941020410214102241023410244102541026410274102841029410304103141032410334103441035410364103741038410394104041041410424104341044410454104641047410484104941050410514105241053410544105541056410574105841059410604106141062410634106441065410664106741068410694107041071410724107341074410754107641077410784107941080410814108241083410844108541086410874108841089410904109141092410934109441095410964109741098410994110041101411024110341104411054110641107411084110941110411114111241113411144111541116411174111841119411204112141122411234112441125411264112741128411294113041131411324113341134411354113641137411384113941140411414114241143411444114541146411474114841149411504115141152411534115441155411564115741158411594116041161411624116341164411654116641167411684116941170411714117241173411744117541176411774117841179411804118141182411834118441185411864118741188411894119041191411924119341194411954119641197411984119941200412014120241203412044120541206412074120841209412104121141212412134121441215412164121741218412194122041221412224122341224
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <title>FFmpeg documentation</title>
  7. <link rel="stylesheet" href="bootstrap.min.css" />
  8. <link rel="stylesheet" href="style.min.css" />
  9. <meta name="description" content="ffplay Documentation: ">
  10. <meta name="keywords" content="FFmpeg documentation : ffplay ">
  11. <meta name="Generator" content="texi2html 5.0">
  12. <!-- Created on March 9, 2020 by texi2html 5.0 -->
  13. <!--
  14. texi2html was written by:
  15. Lionel Cons <Lionel.Cons@cern.ch> (original author)
  16. Karl Berry <karl@freefriends.org>
  17. Olaf Bachmann <obachman@mathematik.uni-kl.de>
  18. and many others.
  19. Maintained by: Many creative people.
  20. Send bugs and suggestions to <texi2html-bug@nongnu.org>
  21. -->
  22. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  23. </head>
  24. <body>
  25. <div class="container">
  26. <h1 class="titlefont">ffplay Documentation</h1>
  27. <hr>
  28. <a name="SEC_Top"></a>
  29. <a name="SEC_Contents"></a>
  30. <h1>Table of Contents</h1>
  31. <div class="contents">
  32. <ul class="no-bullet">
  33. <li><a name="toc-Synopsis" href="#Synopsis">1 Synopsis</a></li>
  34. <li><a name="toc-Description" href="#Description">2 Description</a></li>
  35. <li><a name="toc-Options-2" href="#Options-2">3 Options</a>
  36. <ul class="no-bullet">
  37. <li><a name="toc-Stream-specifiers-1" href="#Stream-specifiers-1">3.1 Stream specifiers</a></li>
  38. <li><a name="toc-Generic-options" href="#Generic-options">3.2 Generic options</a></li>
  39. <li><a name="toc-AVOptions" href="#AVOptions">3.3 AVOptions</a></li>
  40. <li><a name="toc-Main-options" href="#Main-options">3.4 Main options</a></li>
  41. <li><a name="toc-Advanced-options" href="#Advanced-options">3.5 Advanced options</a></li>
  42. <li><a name="toc-While-playing" href="#While-playing">3.6 While playing</a></li>
  43. </ul></li>
  44. <li><a name="toc-Syntax-1" href="#Syntax-1">4 Syntax</a>
  45. <ul class="no-bullet">
  46. <li><a name="toc-Quoting-and-escaping" href="#Quoting-and-escaping">4.1 Quoting and escaping</a>
  47. <ul class="no-bullet">
  48. <li><a name="toc-Examples-142" href="#Examples-142">4.1.1 Examples</a></li>
  49. </ul></li>
  50. <li><a name="toc-Date" href="#Date">4.2 Date</a></li>
  51. <li><a name="toc-Time-duration" href="#Time-duration">4.3 Time duration</a>
  52. <ul class="no-bullet">
  53. <li><a name="toc-Examples-19" href="#Examples-19">4.3.1 Examples</a></li>
  54. </ul></li>
  55. <li><a name="toc-Video-size" href="#Video-size">4.4 Video size</a></li>
  56. <li><a name="toc-Video-rate" href="#Video-rate">4.5 Video rate</a></li>
  57. <li><a name="toc-Ratio" href="#Ratio">4.6 Ratio</a></li>
  58. <li><a name="toc-Color" href="#Color">4.7 Color</a></li>
  59. <li><a name="toc-Channel-Layout" href="#Channel-Layout">4.8 Channel Layout</a></li>
  60. </ul></li>
  61. <li><a name="toc-Expression-Evaluation" href="#Expression-Evaluation">5 Expression Evaluation</a></li>
  62. <li><a name="toc-Codec-Options" href="#Codec-Options">6 Codec Options</a></li>
  63. <li><a name="toc-Decoders" href="#Decoders">7 Decoders</a></li>
  64. <li><a name="toc-Video-Decoders" href="#Video-Decoders">8 Video Decoders</a>
  65. <ul class="no-bullet">
  66. <li><a name="toc-rawvideo" href="#rawvideo">8.1 rawvideo</a>
  67. <ul class="no-bullet">
  68. <li><a name="toc-Options-11" href="#Options-11">8.1.1 Options</a></li>
  69. </ul></li>
  70. <li><a name="toc-libdav1d" href="#libdav1d">8.2 libdav1d</a>
  71. <ul class="no-bullet">
  72. <li><a name="toc-Options-1" href="#Options-1">8.2.1 Options</a></li>
  73. </ul></li>
  74. <li><a name="toc-libdavs2" href="#libdavs2">8.3 libdavs2</a></li>
  75. </ul></li>
  76. <li><a name="toc-Audio-Decoders" href="#Audio-Decoders">9 Audio Decoders</a>
  77. <ul class="no-bullet">
  78. <li><a name="toc-ac3" href="#ac3">9.1 ac3</a>
  79. <ul class="no-bullet">
  80. <li><a name="toc-AC_002d3-Decoder-Options" href="#AC_002d3-Decoder-Options">9.1.1 AC-3 Decoder Options</a></li>
  81. </ul></li>
  82. <li><a name="toc-flac" href="#flac">9.2 flac</a>
  83. <ul class="no-bullet">
  84. <li><a name="toc-FLAC-Decoder-options" href="#FLAC-Decoder-options">9.2.1 FLAC Decoder options</a></li>
  85. </ul></li>
  86. <li><a name="toc-ffwavesynth" href="#ffwavesynth">9.3 ffwavesynth</a></li>
  87. <li><a name="toc-libcelt" href="#libcelt">9.4 libcelt</a></li>
  88. <li><a name="toc-libgsm" href="#libgsm">9.5 libgsm</a></li>
  89. <li><a name="toc-libilbc" href="#libilbc">9.6 libilbc</a>
  90. <ul class="no-bullet">
  91. <li><a name="toc-Options-22" href="#Options-22">9.6.1 Options</a></li>
  92. </ul></li>
  93. <li><a name="toc-libopencore_002damrnb" href="#libopencore_002damrnb">9.7 libopencore-amrnb</a></li>
  94. <li><a name="toc-libopencore_002damrwb" href="#libopencore_002damrwb">9.8 libopencore-amrwb</a></li>
  95. <li><a name="toc-libopus" href="#libopus">9.9 libopus</a></li>
  96. </ul></li>
  97. <li><a name="toc-Subtitles-Decoders" href="#Subtitles-Decoders">10 Subtitles Decoders</a>
  98. <ul class="no-bullet">
  99. <li><a name="toc-libaribb24" href="#libaribb24">10.1 libaribb24</a>
  100. <ul class="no-bullet">
  101. <li><a name="toc-libaribb24-Decoder-Options" href="#libaribb24-Decoder-Options">10.1.1 libaribb24 Decoder Options</a></li>
  102. </ul></li>
  103. <li><a name="toc-dvbsub" href="#dvbsub">10.2 dvbsub</a>
  104. <ul class="no-bullet">
  105. <li><a name="toc-Options-31" href="#Options-31">10.2.1 Options</a></li>
  106. </ul></li>
  107. <li><a name="toc-dvdsub" href="#dvdsub">10.3 dvdsub</a>
  108. <ul class="no-bullet">
  109. <li><a name="toc-Options-14" href="#Options-14">10.3.1 Options</a></li>
  110. </ul></li>
  111. <li><a name="toc-libzvbi_002dteletext" href="#libzvbi_002dteletext">10.4 libzvbi-teletext</a>
  112. <ul class="no-bullet">
  113. <li><a name="toc-Options-19" href="#Options-19">10.4.1 Options</a></li>
  114. </ul>
  115. </li>
  116. </ul></li>
  117. <li><a name="toc-Bitstream-Filters" href="#Bitstream-Filters">11 Bitstream Filters</a>
  118. <ul class="no-bullet">
  119. <li><a name="toc-aac_005fadtstoasc" href="#aac_005fadtstoasc">11.1 aac_adtstoasc</a></li>
  120. <li><a name="toc-av1_005fmetadata" href="#av1_005fmetadata">11.2 av1_metadata</a></li>
  121. <li><a name="toc-chomp" href="#chomp">11.3 chomp</a></li>
  122. <li><a name="toc-dca_005fcore" href="#dca_005fcore">11.4 dca_core</a></li>
  123. <li><a name="toc-dump_005fextra" href="#dump_005fextra">11.5 dump_extra</a></li>
  124. <li><a name="toc-eac3_005fcore" href="#eac3_005fcore">11.6 eac3_core</a></li>
  125. <li><a name="toc-extract_005fextradata" href="#extract_005fextradata">11.7 extract_extradata</a></li>
  126. <li><a name="toc-filter_005funits" href="#filter_005funits">11.8 filter_units</a></li>
  127. <li><a name="toc-hapqa_005fextract" href="#hapqa_005fextract">11.9 hapqa_extract</a></li>
  128. <li><a name="toc-h264_005fmetadata" href="#h264_005fmetadata">11.10 h264_metadata</a></li>
  129. <li><a name="toc-h264_005fmp4toannexb" href="#h264_005fmp4toannexb">11.11 h264_mp4toannexb</a></li>
  130. <li><a name="toc-h264_005fredundant_005fpps" href="#h264_005fredundant_005fpps">11.12 h264_redundant_pps</a></li>
  131. <li><a name="toc-hevc_005fmetadata" href="#hevc_005fmetadata">11.13 hevc_metadata</a></li>
  132. <li><a name="toc-hevc_005fmp4toannexb" href="#hevc_005fmp4toannexb">11.14 hevc_mp4toannexb</a></li>
  133. <li><a name="toc-imxdump" href="#imxdump">11.15 imxdump</a></li>
  134. <li><a name="toc-mjpeg2jpeg" href="#mjpeg2jpeg">11.16 mjpeg2jpeg</a></li>
  135. <li><a name="toc-mjpegadump" href="#mjpegadump">11.17 mjpegadump</a></li>
  136. <li><a name="toc-mov2textsub-1" href="#mov2textsub-1">11.18 mov2textsub</a></li>
  137. <li><a name="toc-mp3decomp" href="#mp3decomp">11.19 mp3decomp</a></li>
  138. <li><a name="toc-mpeg2_005fmetadata" href="#mpeg2_005fmetadata">11.20 mpeg2_metadata</a></li>
  139. <li><a name="toc-mpeg4_005funpack_005fbframes" href="#mpeg4_005funpack_005fbframes">11.21 mpeg4_unpack_bframes</a></li>
  140. <li><a name="toc-noise-1" href="#noise-1">11.22 noise</a></li>
  141. <li><a name="toc-null-1" href="#null-1">11.23 null</a></li>
  142. <li><a name="toc-prores_005fmetadata" href="#prores_005fmetadata">11.24 prores_metadata</a></li>
  143. <li><a name="toc-remove_005fextra" href="#remove_005fextra">11.25 remove_extra</a></li>
  144. <li><a name="toc-text2movsub-1" href="#text2movsub-1">11.26 text2movsub</a></li>
  145. <li><a name="toc-trace_005fheaders" href="#trace_005fheaders">11.27 trace_headers</a></li>
  146. <li><a name="toc-truehd_005fcore" href="#truehd_005fcore">11.28 truehd_core</a></li>
  147. <li><a name="toc-vp9_005fmetadata" href="#vp9_005fmetadata">11.29 vp9_metadata</a></li>
  148. <li><a name="toc-vp9_005fsuperframe" href="#vp9_005fsuperframe">11.30 vp9_superframe</a></li>
  149. <li><a name="toc-vp9_005fsuperframe_005fsplit" href="#vp9_005fsuperframe_005fsplit">11.31 vp9_superframe_split</a></li>
  150. <li><a name="toc-vp9_005fraw_005freorder" href="#vp9_005fraw_005freorder">11.32 vp9_raw_reorder</a></li>
  151. </ul></li>
  152. <li><a name="toc-Format-Options" href="#Format-Options">12 Format Options</a>
  153. <ul class="no-bullet">
  154. <li><a name="toc-Format-stream-specifiers-1" href="#Format-stream-specifiers-1">12.1 Format stream specifiers</a></li>
  155. </ul></li>
  156. <li><a name="toc-Demuxers" href="#Demuxers">13 Demuxers</a>
  157. <ul class="no-bullet">
  158. <li><a name="toc-aa" href="#aa">13.1 aa</a></li>
  159. <li><a name="toc-apng" href="#apng">13.2 apng</a></li>
  160. <li><a name="toc-asf" href="#asf">13.3 asf</a></li>
  161. <li><a name="toc-concat-1" href="#concat-1">13.4 concat</a>
  162. <ul class="no-bullet">
  163. <li><a name="toc-Syntax-2" href="#Syntax-2">13.4.1 Syntax</a></li>
  164. <li><a name="toc-Options-3" href="#Options-3">13.4.2 Options</a></li>
  165. <li><a name="toc-Examples-146" href="#Examples-146">13.4.3 Examples</a></li>
  166. </ul></li>
  167. <li><a name="toc-dash" href="#dash">13.5 dash</a></li>
  168. <li><a name="toc-flv_002c-live_005fflv" href="#flv_002c-live_005fflv">13.6 flv, live_flv</a></li>
  169. <li><a name="toc-gif" href="#gif">13.7 gif</a></li>
  170. <li><a name="toc-hls" href="#hls">13.8 hls</a></li>
  171. <li><a name="toc-image2" href="#image2">13.9 image2</a>
  172. <ul class="no-bullet">
  173. <li><a name="toc-Examples-138" href="#Examples-138">13.9.1 Examples</a></li>
  174. </ul></li>
  175. <li><a name="toc-libgme" href="#libgme">13.10 libgme</a></li>
  176. <li><a name="toc-libmodplug" href="#libmodplug">13.11 libmodplug</a></li>
  177. <li><a name="toc-libopenmpt" href="#libopenmpt">13.12 libopenmpt</a></li>
  178. <li><a name="toc-mov_002fmp4_002f3gp" href="#mov_002fmp4_002f3gp">13.13 mov/mp4/3gp</a>
  179. <ul class="no-bullet">
  180. <li><a name="toc-Options-26" href="#Options-26">13.13.1 Options</a></li>
  181. <li><a name="toc-Audible-AAX" href="#Audible-AAX">13.13.2 Audible AAX</a></li>
  182. </ul></li>
  183. <li><a name="toc-mpegts" href="#mpegts">13.14 mpegts</a></li>
  184. <li><a name="toc-mpjpeg" href="#mpjpeg">13.15 mpjpeg</a></li>
  185. <li><a name="toc-rawvideo-1" href="#rawvideo-1">13.16 rawvideo</a></li>
  186. <li><a name="toc-sbg" href="#sbg">13.17 sbg</a></li>
  187. <li><a name="toc-tedcaptions" href="#tedcaptions">13.18 tedcaptions</a></li>
  188. <li><a name="toc-vapoursynth" href="#vapoursynth">13.19 vapoursynth</a></li>
  189. </ul></li>
  190. <li><a name="toc-Metadata" href="#Metadata">14 Metadata</a></li>
  191. <li><a name="toc-Protocol-Options" href="#Protocol-Options">15 Protocol Options</a></li>
  192. <li><a name="toc-Protocols" href="#Protocols">16 Protocols</a>
  193. <ul class="no-bullet">
  194. <li><a name="toc-async" href="#async">16.1 async</a></li>
  195. <li><a name="toc-bluray" href="#bluray">16.2 bluray</a></li>
  196. <li><a name="toc-cache" href="#cache">16.3 cache</a></li>
  197. <li><a name="toc-concat-3" href="#concat-3">16.4 concat</a></li>
  198. <li><a name="toc-crypto" href="#crypto">16.5 crypto</a></li>
  199. <li><a name="toc-data" href="#data">16.6 data</a></li>
  200. <li><a name="toc-file" href="#file">16.7 file</a></li>
  201. <li><a name="toc-ftp" href="#ftp">16.8 ftp</a></li>
  202. <li><a name="toc-gopher" href="#gopher">16.9 gopher</a></li>
  203. <li><a name="toc-hls-1" href="#hls-1">16.10 hls</a></li>
  204. <li><a name="toc-http" href="#http">16.11 http</a>
  205. <ul class="no-bullet">
  206. <li><a name="toc-HTTP-Cookies" href="#HTTP-Cookies">16.11.1 HTTP Cookies</a></li>
  207. </ul></li>
  208. <li><a name="toc-Icecast" href="#Icecast">16.12 Icecast</a></li>
  209. <li><a name="toc-mmst" href="#mmst">16.13 mmst</a></li>
  210. <li><a name="toc-mmsh" href="#mmsh">16.14 mmsh</a></li>
  211. <li><a name="toc-md5" href="#md5">16.15 md5</a></li>
  212. <li><a name="toc-pipe" href="#pipe">16.16 pipe</a></li>
  213. <li><a name="toc-prompeg" href="#prompeg">16.17 prompeg</a></li>
  214. <li><a name="toc-rtmp" href="#rtmp">16.18 rtmp</a></li>
  215. <li><a name="toc-rtmpe" href="#rtmpe">16.19 rtmpe</a></li>
  216. <li><a name="toc-rtmps" href="#rtmps">16.20 rtmps</a></li>
  217. <li><a name="toc-rtmpt" href="#rtmpt">16.21 rtmpt</a></li>
  218. <li><a name="toc-rtmpte" href="#rtmpte">16.22 rtmpte</a></li>
  219. <li><a name="toc-rtmpts" href="#rtmpts">16.23 rtmpts</a></li>
  220. <li><a name="toc-libsmbclient" href="#libsmbclient">16.24 libsmbclient</a></li>
  221. <li><a name="toc-libssh" href="#libssh">16.25 libssh</a></li>
  222. <li><a name="toc-librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">16.26 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
  223. <li><a name="toc-rtp" href="#rtp">16.27 rtp</a></li>
  224. <li><a name="toc-rtsp" href="#rtsp">16.28 rtsp</a>
  225. <ul class="no-bullet">
  226. <li><a name="toc-Examples-23" href="#Examples-23">16.28.1 Examples</a></li>
  227. </ul></li>
  228. <li><a name="toc-sap" href="#sap">16.29 sap</a>
  229. <ul class="no-bullet">
  230. <li><a name="toc-Muxer" href="#Muxer">16.29.1 Muxer</a></li>
  231. <li><a name="toc-Demuxer" href="#Demuxer">16.29.2 Demuxer</a></li>
  232. </ul></li>
  233. <li><a name="toc-sctp" href="#sctp">16.30 sctp</a></li>
  234. <li><a name="toc-srt" href="#srt">16.31 srt</a></li>
  235. <li><a name="toc-srtp" href="#srtp">16.32 srtp</a></li>
  236. <li><a name="toc-subfile" href="#subfile">16.33 subfile</a></li>
  237. <li><a name="toc-tee" href="#tee">16.34 tee</a></li>
  238. <li><a name="toc-tcp" href="#tcp">16.35 tcp</a></li>
  239. <li><a name="toc-tls" href="#tls">16.36 tls</a></li>
  240. <li><a name="toc-udp" href="#udp">16.37 udp</a>
  241. <ul class="no-bullet">
  242. <li><a name="toc-Examples-134" href="#Examples-134">16.37.1 Examples</a></li>
  243. </ul></li>
  244. <li><a name="toc-unix" href="#unix">16.38 unix</a></li>
  245. <li><a name="toc-zmq" href="#zmq">16.39 zmq</a></li>
  246. </ul></li>
  247. <li><a name="toc-Device-Options" href="#Device-Options">17 Device Options</a></li>
  248. <li><a name="toc-Input-Devices" href="#Input-Devices">18 Input Devices</a>
  249. <ul class="no-bullet">
  250. <li><a name="toc-alsa" href="#alsa">18.1 alsa</a>
  251. <ul class="no-bullet">
  252. <li><a name="toc-Options-10" href="#Options-10">18.1.1 Options</a></li>
  253. </ul></li>
  254. <li><a name="toc-android_005fcamera" href="#android_005fcamera">18.2 android_camera</a>
  255. <ul class="no-bullet">
  256. <li><a name="toc-Options-18" href="#Options-18">18.2.1 Options</a></li>
  257. </ul></li>
  258. <li><a name="toc-avfoundation" href="#avfoundation">18.3 avfoundation</a>
  259. <ul class="no-bullet">
  260. <li><a name="toc-Options-4" href="#Options-4">18.3.1 Options</a></li>
  261. <li><a name="toc-Examples-56" href="#Examples-56">18.3.2 Examples</a></li>
  262. </ul></li>
  263. <li><a name="toc-bktr" href="#bktr">18.4 bktr</a>
  264. <ul class="no-bullet">
  265. <li><a name="toc-Options-6" href="#Options-6">18.4.1 Options</a></li>
  266. </ul></li>
  267. <li><a name="toc-decklink" href="#decklink">18.5 decklink</a>
  268. <ul class="no-bullet">
  269. <li><a name="toc-Options-8" href="#Options-8">18.5.1 Options</a></li>
  270. <li><a name="toc-Examples-39" href="#Examples-39">18.5.2 Examples</a></li>
  271. </ul></li>
  272. <li><a name="toc-dshow" href="#dshow">18.6 dshow</a>
  273. <ul class="no-bullet">
  274. <li><a name="toc-Options-29" href="#Options-29">18.6.1 Options</a></li>
  275. <li><a name="toc-Examples-115" href="#Examples-115">18.6.2 Examples</a></li>
  276. </ul></li>
  277. <li><a name="toc-fbdev" href="#fbdev">18.7 fbdev</a>
  278. <ul class="no-bullet">
  279. <li><a name="toc-Options-30" href="#Options-30">18.7.1 Options</a></li>
  280. </ul></li>
  281. <li><a name="toc-gdigrab" href="#gdigrab">18.8 gdigrab</a>
  282. <ul class="no-bullet">
  283. <li><a name="toc-Options-15" href="#Options-15">18.8.1 Options</a></li>
  284. </ul></li>
  285. <li><a name="toc-iec61883" href="#iec61883">18.9 iec61883</a>
  286. <ul class="no-bullet">
  287. <li><a name="toc-Options-9" href="#Options-9">18.9.1 Options</a></li>
  288. <li><a name="toc-Examples-50" href="#Examples-50">18.9.2 Examples</a></li>
  289. </ul></li>
  290. <li><a name="toc-jack" href="#jack">18.10 jack</a>
  291. <ul class="no-bullet">
  292. <li><a name="toc-Options-25" href="#Options-25">18.10.1 Options</a></li>
  293. </ul></li>
  294. <li><a name="toc-kmsgrab" href="#kmsgrab">18.11 kmsgrab</a>
  295. <ul class="no-bullet">
  296. <li><a name="toc-Options-23" href="#Options-23">18.11.1 Options</a></li>
  297. <li><a name="toc-Examples-62" href="#Examples-62">18.11.2 Examples</a></li>
  298. </ul></li>
  299. <li><a name="toc-lavfi" href="#lavfi">18.12 lavfi</a>
  300. <ul class="no-bullet">
  301. <li><a name="toc-Options-21" href="#Options-21">18.12.1 Options</a></li>
  302. <li><a name="toc-Examples-72" href="#Examples-72">18.12.2 Examples</a></li>
  303. </ul></li>
  304. <li><a name="toc-libcdio" href="#libcdio">18.13 libcdio</a>
  305. <ul class="no-bullet">
  306. <li><a name="toc-Options" href="#Options">18.13.1 Options</a></li>
  307. </ul></li>
  308. <li><a name="toc-libdc1394" href="#libdc1394">18.14 libdc1394</a>
  309. <ul class="no-bullet">
  310. <li><a name="toc-Options-28" href="#Options-28">18.14.1 Options</a></li>
  311. </ul></li>
  312. <li><a name="toc-openal" href="#openal">18.15 openal</a>
  313. <ul class="no-bullet">
  314. <li><a name="toc-Options-32" href="#Options-32">18.15.1 Options</a></li>
  315. <li><a name="toc-Examples-59" href="#Examples-59">18.15.2 Examples</a></li>
  316. </ul></li>
  317. <li><a name="toc-oss" href="#oss">18.16 oss</a>
  318. <ul class="no-bullet">
  319. <li><a name="toc-Options-16" href="#Options-16">18.16.1 Options</a></li>
  320. </ul></li>
  321. <li><a name="toc-pulse" href="#pulse">18.17 pulse</a>
  322. <ul class="no-bullet">
  323. <li><a name="toc-Options-13" href="#Options-13">18.17.1 Options</a></li>
  324. <li><a name="toc-Examples-123" href="#Examples-123">18.17.2 Examples</a></li>
  325. </ul></li>
  326. <li><a name="toc-sndio" href="#sndio">18.18 sndio</a>
  327. <ul class="no-bullet">
  328. <li><a name="toc-Options-7" href="#Options-7">18.18.1 Options</a></li>
  329. </ul></li>
  330. <li><a name="toc-video4linux2_002c-v4l2" href="#video4linux2_002c-v4l2">18.19 video4linux2, v4l2</a>
  331. <ul class="no-bullet">
  332. <li><a name="toc-Options-20" href="#Options-20">18.19.1 Options</a></li>
  333. </ul></li>
  334. <li><a name="toc-vfwcap" href="#vfwcap">18.20 vfwcap</a>
  335. <ul class="no-bullet">
  336. <li><a name="toc-Options-5" href="#Options-5">18.20.1 Options</a></li>
  337. </ul></li>
  338. <li><a name="toc-x11grab" href="#x11grab">18.21 x11grab</a>
  339. <ul class="no-bullet">
  340. <li><a name="toc-Options-27" href="#Options-27">18.21.1 Options</a></li>
  341. </ul>
  342. </li>
  343. </ul></li>
  344. <li><a name="toc-Resampler-Options" href="#Resampler-Options">19 Resampler Options</a></li>
  345. <li><a name="toc-Scaler-Options" href="#Scaler-Options">20 Scaler Options</a></li>
  346. <li><a name="toc-Filtering-Introduction" href="#Filtering-Introduction">21 Filtering Introduction</a></li>
  347. <li><a name="toc-graph2dot" href="#graph2dot">22 graph2dot</a></li>
  348. <li><a name="toc-Filtergraph-description" href="#Filtergraph-description">23 Filtergraph description</a>
  349. <ul class="no-bullet">
  350. <li><a name="toc-Filtergraph-syntax-1" href="#Filtergraph-syntax-1">23.1 Filtergraph syntax</a></li>
  351. <li><a name="toc-Notes-on-filtergraph-escaping" href="#Notes-on-filtergraph-escaping">23.2 Notes on filtergraph escaping</a></li>
  352. </ul></li>
  353. <li><a name="toc-Timeline-editing" href="#Timeline-editing">24 Timeline editing</a></li>
  354. <li><a name="toc-Changing-options-at-runtime-with-a-command" href="#Changing-options-at-runtime-with-a-command">25 Changing options at runtime with a command</a></li>
  355. <li><a name="toc-Options-for-filters-with-several-inputs-_0028framesync_0029" href="#Options-for-filters-with-several-inputs-_0028framesync_0029">26 Options for filters with several inputs (framesync)</a></li>
  356. <li><a name="toc-Audio-Filters" href="#Audio-Filters">27 Audio Filters</a>
  357. <ul class="no-bullet">
  358. <li><a name="toc-acompressor" href="#acompressor">27.1 acompressor</a>
  359. <ul class="no-bullet">
  360. <li><a name="toc-Commands-4" href="#Commands-4">27.1.1 Commands</a></li>
  361. </ul></li>
  362. <li><a name="toc-acontrast" href="#acontrast">27.2 acontrast</a></li>
  363. <li><a name="toc-acopy" href="#acopy">27.3 acopy</a></li>
  364. <li><a name="toc-acrossfade" href="#acrossfade">27.4 acrossfade</a>
  365. <ul class="no-bullet">
  366. <li><a name="toc-Examples-66" href="#Examples-66">27.4.1 Examples</a></li>
  367. </ul></li>
  368. <li><a name="toc-acrossover" href="#acrossover">27.5 acrossover</a></li>
  369. <li><a name="toc-acrusher" href="#acrusher">27.6 acrusher</a></li>
  370. <li><a name="toc-acue" href="#acue">27.7 acue</a></li>
  371. <li><a name="toc-adeclick" href="#adeclick">27.8 adeclick</a></li>
  372. <li><a name="toc-adeclip" href="#adeclip">27.9 adeclip</a></li>
  373. <li><a name="toc-adelay" href="#adelay">27.10 adelay</a>
  374. <ul class="no-bullet">
  375. <li><a name="toc-Examples-20" href="#Examples-20">27.10.1 Examples</a></li>
  376. </ul></li>
  377. <li><a name="toc-aderivative_002c-aintegral" href="#aderivative_002c-aintegral">27.11 aderivative, aintegral</a></li>
  378. <li><a name="toc-aecho" href="#aecho">27.12 aecho</a>
  379. <ul class="no-bullet">
  380. <li><a name="toc-Examples-98" href="#Examples-98">27.12.1 Examples</a></li>
  381. </ul></li>
  382. <li><a name="toc-aemphasis" href="#aemphasis">27.13 aemphasis</a></li>
  383. <li><a name="toc-aeval" href="#aeval">27.14 aeval</a>
  384. <ul class="no-bullet">
  385. <li><a name="toc-Examples-139" href="#Examples-139">27.14.1 Examples</a></li>
  386. </ul></li>
  387. <li><a name="toc-afade-1" href="#afade-1">27.15 afade</a>
  388. <ul class="no-bullet">
  389. <li><a name="toc-Examples-105" href="#Examples-105">27.15.1 Examples</a></li>
  390. </ul></li>
  391. <li><a name="toc-afftdn" href="#afftdn">27.16 afftdn</a>
  392. <ul class="no-bullet">
  393. <li><a name="toc-Commands-64" href="#Commands-64">27.16.1 Commands</a></li>
  394. </ul></li>
  395. <li><a name="toc-afftfilt" href="#afftfilt">27.17 afftfilt</a>
  396. <ul class="no-bullet">
  397. <li><a name="toc-Examples-109" href="#Examples-109">27.17.1 Examples</a></li>
  398. </ul></li>
  399. <li><a name="toc-afir-1" href="#afir-1">27.18 afir</a>
  400. <ul class="no-bullet">
  401. <li><a name="toc-Examples-13" href="#Examples-13">27.18.1 Examples</a></li>
  402. </ul></li>
  403. <li><a name="toc-aformat-1" href="#aformat-1">27.19 aformat</a></li>
  404. <li><a name="toc-agate" href="#agate">27.20 agate</a></li>
  405. <li><a name="toc-aiir" href="#aiir">27.21 aiir</a>
  406. <ul class="no-bullet">
  407. <li><a name="toc-Examples-156" href="#Examples-156">27.21.1 Examples</a></li>
  408. </ul></li>
  409. <li><a name="toc-alimiter" href="#alimiter">27.22 alimiter</a></li>
  410. <li><a name="toc-allpass" href="#allpass">27.23 allpass</a>
  411. <ul class="no-bullet">
  412. <li><a name="toc-Commands-13" href="#Commands-13">27.23.1 Commands</a></li>
  413. </ul></li>
  414. <li><a name="toc-aloop" href="#aloop">27.24 aloop</a></li>
  415. <li><a name="toc-amerge-1" href="#amerge-1">27.25 amerge</a>
  416. <ul class="no-bullet">
  417. <li><a name="toc-Examples-153" href="#Examples-153">27.25.1 Examples</a></li>
  418. </ul></li>
  419. <li><a name="toc-amix" href="#amix">27.26 amix</a></li>
  420. <li><a name="toc-amultiply" href="#amultiply">27.27 amultiply</a></li>
  421. <li><a name="toc-anequalizer" href="#anequalizer">27.28 anequalizer</a>
  422. <ul class="no-bullet">
  423. <li><a name="toc-Examples-43" href="#Examples-43">27.28.1 Examples</a></li>
  424. <li><a name="toc-Commands-58" href="#Commands-58">27.28.2 Commands</a></li>
  425. </ul></li>
  426. <li><a name="toc-anlmdn" href="#anlmdn">27.29 anlmdn</a>
  427. <ul class="no-bullet">
  428. <li><a name="toc-Commands-34" href="#Commands-34">27.29.1 Commands</a></li>
  429. </ul></li>
  430. <li><a name="toc-anlms" href="#anlms">27.30 anlms</a>
  431. <ul class="no-bullet">
  432. <li><a name="toc-Examples-92" href="#Examples-92">27.30.1 Examples</a></li>
  433. <li><a name="toc-Commands-32" href="#Commands-32">27.30.2 Commands</a></li>
  434. </ul></li>
  435. <li><a name="toc-anull" href="#anull">27.31 anull</a></li>
  436. <li><a name="toc-apad" href="#apad">27.32 apad</a>
  437. <ul class="no-bullet">
  438. <li><a name="toc-Examples-87" href="#Examples-87">27.32.1 Examples</a></li>
  439. </ul></li>
  440. <li><a name="toc-aphaser" href="#aphaser">27.33 aphaser</a></li>
  441. <li><a name="toc-apulsator" href="#apulsator">27.34 apulsator</a></li>
  442. <li><a name="toc-aresample-1" href="#aresample-1">27.35 aresample</a>
  443. <ul class="no-bullet">
  444. <li><a name="toc-Examples-15" href="#Examples-15">27.35.1 Examples</a></li>
  445. </ul></li>
  446. <li><a name="toc-areverse" href="#areverse">27.36 areverse</a>
  447. <ul class="no-bullet">
  448. <li><a name="toc-Examples-29" href="#Examples-29">27.36.1 Examples</a></li>
  449. </ul></li>
  450. <li><a name="toc-arnndn" href="#arnndn">27.37 arnndn</a></li>
  451. <li><a name="toc-asetnsamples" href="#asetnsamples">27.38 asetnsamples</a></li>
  452. <li><a name="toc-asetrate" href="#asetrate">27.39 asetrate</a></li>
  453. <li><a name="toc-ashowinfo" href="#ashowinfo">27.40 ashowinfo</a></li>
  454. <li><a name="toc-asoftclip" href="#asoftclip">27.41 asoftclip</a>
  455. <ul class="no-bullet">
  456. <li><a name="toc-Commands-27" href="#Commands-27">27.41.1 Commands</a></li>
  457. </ul></li>
  458. <li><a name="toc-asr" href="#asr">27.42 asr</a></li>
  459. <li><a name="toc-astats-1" href="#astats-1">27.43 astats</a></li>
  460. <li><a name="toc-atempo" href="#atempo">27.44 atempo</a>
  461. <ul class="no-bullet">
  462. <li><a name="toc-Examples-60" href="#Examples-60">27.44.1 Examples</a></li>
  463. <li><a name="toc-Commands-3" href="#Commands-3">27.44.2 Commands</a></li>
  464. </ul></li>
  465. <li><a name="toc-atrim" href="#atrim">27.45 atrim</a></li>
  466. <li><a name="toc-axcorrelate" href="#axcorrelate">27.46 axcorrelate</a>
  467. <ul class="no-bullet">
  468. <li><a name="toc-Examples-54" href="#Examples-54">27.46.1 Examples</a></li>
  469. </ul></li>
  470. <li><a name="toc-bandpass" href="#bandpass">27.47 bandpass</a>
  471. <ul class="no-bullet">
  472. <li><a name="toc-Commands-56" href="#Commands-56">27.47.1 Commands</a></li>
  473. </ul></li>
  474. <li><a name="toc-bandreject" href="#bandreject">27.48 bandreject</a>
  475. <ul class="no-bullet">
  476. <li><a name="toc-Commands-66" href="#Commands-66">27.48.1 Commands</a></li>
  477. </ul></li>
  478. <li><a name="toc-bass_002c-lowshelf" href="#bass_002c-lowshelf">27.49 bass, lowshelf</a>
  479. <ul class="no-bullet">
  480. <li><a name="toc-Commands-29" href="#Commands-29">27.49.1 Commands</a></li>
  481. </ul></li>
  482. <li><a name="toc-biquad" href="#biquad">27.50 biquad</a>
  483. <ul class="no-bullet">
  484. <li><a name="toc-Commands-25" href="#Commands-25">27.50.1 Commands</a></li>
  485. </ul></li>
  486. <li><a name="toc-bs2b" href="#bs2b">27.51 bs2b</a></li>
  487. <li><a name="toc-channelmap" href="#channelmap">27.52 channelmap</a>
  488. <ul class="no-bullet">
  489. <li><a name="toc-Examples-154" href="#Examples-154">27.52.1 Examples</a></li>
  490. </ul></li>
  491. <li><a name="toc-channelsplit" href="#channelsplit">27.53 channelsplit</a>
  492. <ul class="no-bullet">
  493. <li><a name="toc-Examples-106" href="#Examples-106">27.53.1 Examples</a></li>
  494. </ul></li>
  495. <li><a name="toc-chorus" href="#chorus">27.54 chorus</a>
  496. <ul class="no-bullet">
  497. <li><a name="toc-Examples-42" href="#Examples-42">27.54.1 Examples</a></li>
  498. </ul></li>
  499. <li><a name="toc-compand" href="#compand">27.55 compand</a>
  500. <ul class="no-bullet">
  501. <li><a name="toc-Examples-16" href="#Examples-16">27.55.1 Examples</a></li>
  502. </ul></li>
  503. <li><a name="toc-compensationdelay" href="#compensationdelay">27.56 compensationdelay</a></li>
  504. <li><a name="toc-crossfeed" href="#crossfeed">27.57 crossfeed</a></li>
  505. <li><a name="toc-crystalizer" href="#crystalizer">27.58 crystalizer</a>
  506. <ul class="no-bullet">
  507. <li><a name="toc-Commands-31" href="#Commands-31">27.58.1 Commands</a></li>
  508. </ul></li>
  509. <li><a name="toc-dcshift" href="#dcshift">27.59 dcshift</a></li>
  510. <li><a name="toc-deesser" href="#deesser">27.60 deesser</a></li>
  511. <li><a name="toc-drmeter" href="#drmeter">27.61 drmeter</a></li>
  512. <li><a name="toc-dynaudnorm" href="#dynaudnorm">27.62 dynaudnorm</a>
  513. <ul class="no-bullet">
  514. <li><a name="toc-Commands-60" href="#Commands-60">27.62.1 Commands</a></li>
  515. </ul></li>
  516. <li><a name="toc-earwax" href="#earwax">27.63 earwax</a></li>
  517. <li><a name="toc-equalizer" href="#equalizer">27.64 equalizer</a>
  518. <ul class="no-bullet">
  519. <li><a name="toc-Examples" href="#Examples">27.64.1 Examples</a></li>
  520. <li><a name="toc-Commands-51" href="#Commands-51">27.64.2 Commands</a></li>
  521. </ul></li>
  522. <li><a name="toc-extrastereo" href="#extrastereo">27.65 extrastereo</a>
  523. <ul class="no-bullet">
  524. <li><a name="toc-Commands-46" href="#Commands-46">27.65.1 Commands</a></li>
  525. </ul></li>
  526. <li><a name="toc-firequalizer" href="#firequalizer">27.66 firequalizer</a>
  527. <ul class="no-bullet">
  528. <li><a name="toc-Examples-38" href="#Examples-38">27.66.1 Examples</a></li>
  529. </ul></li>
  530. <li><a name="toc-flanger" href="#flanger">27.67 flanger</a></li>
  531. <li><a name="toc-haas" href="#haas">27.68 haas</a></li>
  532. <li><a name="toc-hdcd" href="#hdcd">27.69 hdcd</a></li>
  533. <li><a name="toc-headphone" href="#headphone">27.70 headphone</a>
  534. <ul class="no-bullet">
  535. <li><a name="toc-Examples-12" href="#Examples-12">27.70.1 Examples</a></li>
  536. </ul></li>
  537. <li><a name="toc-highpass" href="#highpass">27.71 highpass</a>
  538. <ul class="no-bullet">
  539. <li><a name="toc-Commands-11" href="#Commands-11">27.71.1 Commands</a></li>
  540. </ul></li>
  541. <li><a name="toc-join" href="#join">27.72 join</a></li>
  542. <li><a name="toc-ladspa" href="#ladspa">27.73 ladspa</a>
  543. <ul class="no-bullet">
  544. <li><a name="toc-Examples-51" href="#Examples-51">27.73.1 Examples</a></li>
  545. <li><a name="toc-Commands-12" href="#Commands-12">27.73.2 Commands</a></li>
  546. </ul></li>
  547. <li><a name="toc-loudnorm" href="#loudnorm">27.74 loudnorm</a></li>
  548. <li><a name="toc-lowpass" href="#lowpass">27.75 lowpass</a>
  549. <ul class="no-bullet">
  550. <li><a name="toc-Examples-73" href="#Examples-73">27.75.1 Examples</a></li>
  551. <li><a name="toc-Commands-39" href="#Commands-39">27.75.2 Commands</a></li>
  552. </ul></li>
  553. <li><a name="toc-lv2" href="#lv2">27.76 lv2</a>
  554. <ul class="no-bullet">
  555. <li><a name="toc-Examples-89" href="#Examples-89">27.76.1 Examples</a></li>
  556. </ul></li>
  557. <li><a name="toc-mcompand" href="#mcompand">27.77 mcompand</a></li>
  558. <li><a name="toc-pan-1" href="#pan-1">27.78 pan</a>
  559. <ul class="no-bullet">
  560. <li><a name="toc-Mixing-examples" href="#Mixing-examples">27.78.1 Mixing examples</a></li>
  561. <li><a name="toc-Remapping-examples" href="#Remapping-examples">27.78.2 Remapping examples</a></li>
  562. </ul></li>
  563. <li><a name="toc-replaygain" href="#replaygain">27.79 replaygain</a></li>
  564. <li><a name="toc-resample" href="#resample">27.80 resample</a></li>
  565. <li><a name="toc-rubberband" href="#rubberband">27.81 rubberband</a>
  566. <ul class="no-bullet">
  567. <li><a name="toc-Commands-14" href="#Commands-14">27.81.1 Commands</a></li>
  568. </ul></li>
  569. <li><a name="toc-sidechaincompress" href="#sidechaincompress">27.82 sidechaincompress</a>
  570. <ul class="no-bullet">
  571. <li><a name="toc-Commands-19" href="#Commands-19">27.82.1 Commands</a></li>
  572. <li><a name="toc-Examples-137" href="#Examples-137">27.82.2 Examples</a></li>
  573. </ul></li>
  574. <li><a name="toc-sidechaingate" href="#sidechaingate">27.83 sidechaingate</a></li>
  575. <li><a name="toc-silencedetect" href="#silencedetect">27.84 silencedetect</a>
  576. <ul class="no-bullet">
  577. <li><a name="toc-Examples-94" href="#Examples-94">27.84.1 Examples</a></li>
  578. </ul></li>
  579. <li><a name="toc-silenceremove" href="#silenceremove">27.85 silenceremove</a>
  580. <ul class="no-bullet">
  581. <li><a name="toc-Examples-90" href="#Examples-90">27.85.1 Examples</a></li>
  582. </ul></li>
  583. <li><a name="toc-sofalizer" href="#sofalizer">27.86 sofalizer</a>
  584. <ul class="no-bullet">
  585. <li><a name="toc-Examples-85" href="#Examples-85">27.86.1 Examples</a></li>
  586. </ul></li>
  587. <li><a name="toc-stereotools" href="#stereotools">27.87 stereotools</a>
  588. <ul class="no-bullet">
  589. <li><a name="toc-Examples-24" href="#Examples-24">27.87.1 Examples</a></li>
  590. </ul></li>
  591. <li><a name="toc-stereowiden" href="#stereowiden">27.88 stereowiden</a>
  592. <ul class="no-bullet">
  593. <li><a name="toc-Commands-7" href="#Commands-7">27.88.1 Commands</a></li>
  594. </ul></li>
  595. <li><a name="toc-superequalizer" href="#superequalizer">27.89 superequalizer</a></li>
  596. <li><a name="toc-surround" href="#surround">27.90 surround</a></li>
  597. <li><a name="toc-treble_002c-highshelf" href="#treble_002c-highshelf">27.91 treble, highshelf</a>
  598. <ul class="no-bullet">
  599. <li><a name="toc-Commands-36" href="#Commands-36">27.91.1 Commands</a></li>
  600. </ul></li>
  601. <li><a name="toc-tremolo" href="#tremolo">27.92 tremolo</a></li>
  602. <li><a name="toc-vibrato" href="#vibrato">27.93 vibrato</a></li>
  603. <li><a name="toc-volume" href="#volume">27.94 volume</a>
  604. <ul class="no-bullet">
  605. <li><a name="toc-Commands-23" href="#Commands-23">27.94.1 Commands</a></li>
  606. <li><a name="toc-Examples-145" href="#Examples-145">27.94.2 Examples</a></li>
  607. </ul></li>
  608. <li><a name="toc-volumedetect" href="#volumedetect">27.95 volumedetect</a>
  609. <ul class="no-bullet">
  610. <li><a name="toc-Examples-107" href="#Examples-107">27.95.1 Examples</a></li>
  611. </ul>
  612. </li>
  613. </ul></li>
  614. <li><a name="toc-Audio-Sources" href="#Audio-Sources">28 Audio Sources</a>
  615. <ul class="no-bullet">
  616. <li><a name="toc-abuffer" href="#abuffer">28.1 abuffer</a>
  617. <ul class="no-bullet">
  618. <li><a name="toc-Examples-68" href="#Examples-68">28.1.1 Examples</a></li>
  619. </ul></li>
  620. <li><a name="toc-aevalsrc" href="#aevalsrc">28.2 aevalsrc</a>
  621. <ul class="no-bullet">
  622. <li><a name="toc-Examples-152" href="#Examples-152">28.2.1 Examples</a></li>
  623. </ul></li>
  624. <li><a name="toc-afirsrc" href="#afirsrc">28.3 afirsrc</a></li>
  625. <li><a name="toc-anullsrc" href="#anullsrc">28.4 anullsrc</a>
  626. <ul class="no-bullet">
  627. <li><a name="toc-Examples-65" href="#Examples-65">28.4.1 Examples</a></li>
  628. </ul></li>
  629. <li><a name="toc-flite" href="#flite">28.5 flite</a>
  630. <ul class="no-bullet">
  631. <li><a name="toc-Examples-17" href="#Examples-17">28.5.1 Examples</a></li>
  632. </ul></li>
  633. <li><a name="toc-anoisesrc" href="#anoisesrc">28.6 anoisesrc</a>
  634. <ul class="no-bullet">
  635. <li><a name="toc-Examples-2" href="#Examples-2">28.6.1 Examples</a></li>
  636. </ul></li>
  637. <li><a name="toc-hilbert" href="#hilbert">28.7 hilbert</a></li>
  638. <li><a name="toc-sinc" href="#sinc">28.8 sinc</a></li>
  639. <li><a name="toc-sine" href="#sine">28.9 sine</a>
  640. <ul class="no-bullet">
  641. <li><a name="toc-Examples-114" href="#Examples-114">28.9.1 Examples</a></li>
  642. </ul>
  643. </li>
  644. </ul></li>
  645. <li><a name="toc-Audio-Sinks" href="#Audio-Sinks">29 Audio Sinks</a>
  646. <ul class="no-bullet">
  647. <li><a name="toc-abuffersink" href="#abuffersink">29.1 abuffersink</a></li>
  648. <li><a name="toc-anullsink" href="#anullsink">29.2 anullsink</a></li>
  649. </ul></li>
  650. <li><a name="toc-Video-Filters" href="#Video-Filters">30 Video Filters</a>
  651. <ul class="no-bullet">
  652. <li><a name="toc-addroi" href="#addroi">30.1 addroi</a>
  653. <ul class="no-bullet">
  654. <li><a name="toc-Examples-130" href="#Examples-130">30.1.1 Examples</a></li>
  655. </ul></li>
  656. <li><a name="toc-alphaextract" href="#alphaextract">30.2 alphaextract</a></li>
  657. <li><a name="toc-alphamerge" href="#alphamerge">30.3 alphamerge</a></li>
  658. <li><a name="toc-amplify" href="#amplify">30.4 amplify</a>
  659. <ul class="no-bullet">
  660. <li><a name="toc-Commands-44" href="#Commands-44">30.4.1 Commands</a></li>
  661. </ul></li>
  662. <li><a name="toc-ass" href="#ass">30.5 ass</a></li>
  663. <li><a name="toc-atadenoise" href="#atadenoise">30.6 atadenoise</a>
  664. <ul class="no-bullet">
  665. <li><a name="toc-Commands-61" href="#Commands-61">30.6.1 Commands</a></li>
  666. </ul></li>
  667. <li><a name="toc-avgblur" href="#avgblur">30.7 avgblur</a>
  668. <ul class="no-bullet">
  669. <li><a name="toc-Commands-57" href="#Commands-57">30.7.1 Commands</a></li>
  670. </ul></li>
  671. <li><a name="toc-bbox" href="#bbox">30.8 bbox</a></li>
  672. <li><a name="toc-bilateral" href="#bilateral">30.9 bilateral</a></li>
  673. <li><a name="toc-bitplanenoise" href="#bitplanenoise">30.10 bitplanenoise</a></li>
  674. <li><a name="toc-blackdetect" href="#blackdetect">30.11 blackdetect</a></li>
  675. <li><a name="toc-blackframe" href="#blackframe">30.12 blackframe</a></li>
  676. <li><a name="toc-blend-1" href="#blend-1">30.13 blend</a>
  677. <ul class="no-bullet">
  678. <li><a name="toc-Examples-61" href="#Examples-61">30.13.1 Examples</a></li>
  679. </ul></li>
  680. <li><a name="toc-bm3d" href="#bm3d">30.14 bm3d</a>
  681. <ul class="no-bullet">
  682. <li><a name="toc-Examples-37" href="#Examples-37">30.14.1 Examples</a></li>
  683. </ul></li>
  684. <li><a name="toc-boxblur" href="#boxblur">30.15 boxblur</a>
  685. <ul class="no-bullet">
  686. <li><a name="toc-Examples-18" href="#Examples-18">30.15.1 Examples</a></li>
  687. </ul></li>
  688. <li><a name="toc-bwdif" href="#bwdif">30.16 bwdif</a></li>
  689. <li><a name="toc-cas" href="#cas">30.17 cas</a></li>
  690. <li><a name="toc-chromahold" href="#chromahold">30.18 chromahold</a>
  691. <ul class="no-bullet">
  692. <li><a name="toc-Commands-67" href="#Commands-67">30.18.1 Commands</a></li>
  693. </ul></li>
  694. <li><a name="toc-chromakey" href="#chromakey">30.19 chromakey</a>
  695. <ul class="no-bullet">
  696. <li><a name="toc-Commands-10" href="#Commands-10">30.19.1 Commands</a></li>
  697. <li><a name="toc-Examples-108" href="#Examples-108">30.19.2 Examples</a></li>
  698. </ul></li>
  699. <li><a name="toc-chromashift" href="#chromashift">30.20 chromashift</a>
  700. <ul class="no-bullet">
  701. <li><a name="toc-Commands-2" href="#Commands-2">30.20.1 Commands</a></li>
  702. </ul></li>
  703. <li><a name="toc-ciescope" href="#ciescope">30.21 ciescope</a></li>
  704. <li><a name="toc-codecview" href="#codecview">30.22 codecview</a>
  705. <ul class="no-bullet">
  706. <li><a name="toc-Examples-81" href="#Examples-81">30.22.1 Examples</a></li>
  707. </ul></li>
  708. <li><a name="toc-colorbalance" href="#colorbalance">30.23 colorbalance</a>
  709. <ul class="no-bullet">
  710. <li><a name="toc-Examples-47" href="#Examples-47">30.23.1 Examples</a></li>
  711. <li><a name="toc-Commands-18" href="#Commands-18">30.23.2 Commands</a></li>
  712. </ul></li>
  713. <li><a name="toc-colorchannelmixer" href="#colorchannelmixer">30.24 colorchannelmixer</a>
  714. <ul class="no-bullet">
  715. <li><a name="toc-Examples-158" href="#Examples-158">30.24.1 Examples</a></li>
  716. <li><a name="toc-Commands-17" href="#Commands-17">30.24.2 Commands</a></li>
  717. </ul></li>
  718. <li><a name="toc-colorkey" href="#colorkey">30.25 colorkey</a>
  719. <ul class="no-bullet">
  720. <li><a name="toc-Examples-118" href="#Examples-118">30.25.1 Examples</a></li>
  721. <li><a name="toc-Commands-59" href="#Commands-59">30.25.2 Commands</a></li>
  722. </ul></li>
  723. <li><a name="toc-colorhold" href="#colorhold">30.26 colorhold</a>
  724. <ul class="no-bullet">
  725. <li><a name="toc-Commands-63" href="#Commands-63">30.26.1 Commands</a></li>
  726. </ul></li>
  727. <li><a name="toc-colorlevels" href="#colorlevels">30.27 colorlevels</a>
  728. <ul class="no-bullet">
  729. <li><a name="toc-Examples-46" href="#Examples-46">30.27.1 Examples</a></li>
  730. <li><a name="toc-Commands-40" href="#Commands-40">30.27.2 Commands</a></li>
  731. </ul></li>
  732. <li><a name="toc-colormatrix" href="#colormatrix">30.28 colormatrix</a></li>
  733. <li><a name="toc-colorspace" href="#colorspace">30.29 colorspace</a></li>
  734. <li><a name="toc-convolution" href="#convolution">30.30 convolution</a>
  735. <ul class="no-bullet">
  736. <li><a name="toc-Examples-25" href="#Examples-25">30.30.1 Examples</a></li>
  737. </ul></li>
  738. <li><a name="toc-convolve" href="#convolve">30.31 convolve</a></li>
  739. <li><a name="toc-copy" href="#copy">30.32 copy</a></li>
  740. <li><a name="toc-coreimage-1" href="#coreimage-1">30.33 coreimage</a>
  741. <ul class="no-bullet">
  742. <li><a name="toc-Examples-44" href="#Examples-44">30.33.1 Examples</a></li>
  743. </ul></li>
  744. <li><a name="toc-cover_005frect" href="#cover_005frect">30.34 cover_rect</a>
  745. <ul class="no-bullet">
  746. <li><a name="toc-Examples-10" href="#Examples-10">30.34.1 Examples</a></li>
  747. </ul></li>
  748. <li><a name="toc-crop" href="#crop">30.35 crop</a>
  749. <ul class="no-bullet">
  750. <li><a name="toc-Examples-104" href="#Examples-104">30.35.1 Examples</a></li>
  751. <li><a name="toc-Commands-42" href="#Commands-42">30.35.2 Commands</a></li>
  752. </ul></li>
  753. <li><a name="toc-cropdetect" href="#cropdetect">30.36 cropdetect</a></li>
  754. <li><a name="toc-cue-1" href="#cue-1">30.37 cue</a></li>
  755. <li><a name="toc-curves-1" href="#curves-1">30.38 curves</a>
  756. <ul class="no-bullet">
  757. <li><a name="toc-Examples-70" href="#Examples-70">30.38.1 Examples</a></li>
  758. </ul></li>
  759. <li><a name="toc-datascope" href="#datascope">30.39 datascope</a></li>
  760. <li><a name="toc-dctdnoiz" href="#dctdnoiz">30.40 dctdnoiz</a>
  761. <ul class="no-bullet">
  762. <li><a name="toc-Examples-97" href="#Examples-97">30.40.1 Examples</a></li>
  763. </ul></li>
  764. <li><a name="toc-deband" href="#deband">30.41 deband</a></li>
  765. <li><a name="toc-deblock" href="#deblock">30.42 deblock</a>
  766. <ul class="no-bullet">
  767. <li><a name="toc-Examples-31" href="#Examples-31">30.42.1 Examples</a></li>
  768. </ul></li>
  769. <li><a name="toc-decimate-1" href="#decimate-1">30.43 decimate</a></li>
  770. <li><a name="toc-deconvolve" href="#deconvolve">30.44 deconvolve</a></li>
  771. <li><a name="toc-dedot" href="#dedot">30.45 dedot</a></li>
  772. <li><a name="toc-deflate" href="#deflate">30.46 deflate</a>
  773. <ul class="no-bullet">
  774. <li><a name="toc-Commands-54" href="#Commands-54">30.46.1 Commands</a></li>
  775. </ul></li>
  776. <li><a name="toc-deflicker" href="#deflicker">30.47 deflicker</a></li>
  777. <li><a name="toc-dejudder" href="#dejudder">30.48 dejudder</a></li>
  778. <li><a name="toc-delogo" href="#delogo">30.49 delogo</a>
  779. <ul class="no-bullet">
  780. <li><a name="toc-Examples-155" href="#Examples-155">30.49.1 Examples</a></li>
  781. </ul></li>
  782. <li><a name="toc-derain" href="#derain">30.50 derain</a></li>
  783. <li><a name="toc-deshake" href="#deshake">30.51 deshake</a></li>
  784. <li><a name="toc-despill" href="#despill">30.52 despill</a></li>
  785. <li><a name="toc-detelecine" href="#detelecine">30.53 detelecine</a></li>
  786. <li><a name="toc-dilation" href="#dilation">30.54 dilation</a>
  787. <ul class="no-bullet">
  788. <li><a name="toc-Commands-43" href="#Commands-43">30.54.1 Commands</a></li>
  789. </ul></li>
  790. <li><a name="toc-displace" href="#displace">30.55 displace</a>
  791. <ul class="no-bullet">
  792. <li><a name="toc-Examples-64" href="#Examples-64">30.55.1 Examples</a></li>
  793. </ul></li>
  794. <li><a name="toc-dnn_005fprocessing" href="#dnn_005fprocessing">30.56 dnn_processing</a></li>
  795. <li><a name="toc-drawbox" href="#drawbox">30.57 drawbox</a>
  796. <ul class="no-bullet">
  797. <li><a name="toc-Examples-76" href="#Examples-76">30.57.1 Examples</a></li>
  798. <li><a name="toc-Commands-62" href="#Commands-62">30.57.2 Commands</a></li>
  799. </ul></li>
  800. <li><a name="toc-drawgraph-1" href="#drawgraph-1">30.58 drawgraph</a></li>
  801. <li><a name="toc-drawgrid" href="#drawgrid">30.59 drawgrid</a>
  802. <ul class="no-bullet">
  803. <li><a name="toc-Examples-141" href="#Examples-141">30.59.1 Examples</a></li>
  804. <li><a name="toc-Commands-48" href="#Commands-48">30.59.2 Commands</a></li>
  805. </ul></li>
  806. <li><a name="toc-drawtext-1" href="#drawtext-1">30.60 drawtext</a>
  807. <ul class="no-bullet">
  808. <li><a name="toc-Syntax" href="#Syntax">30.60.1 Syntax</a></li>
  809. <li><a name="toc-Text-expansion" href="#Text-expansion">30.60.2 Text expansion</a></li>
  810. <li><a name="toc-Commands-38" href="#Commands-38">30.60.3 Commands</a></li>
  811. <li><a name="toc-Examples-27" href="#Examples-27">30.60.4 Examples</a></li>
  812. </ul></li>
  813. <li><a name="toc-edgedetect" href="#edgedetect">30.61 edgedetect</a>
  814. <ul class="no-bullet">
  815. <li><a name="toc-Examples-132" href="#Examples-132">30.61.1 Examples</a></li>
  816. </ul></li>
  817. <li><a name="toc-elbg" href="#elbg">30.62 elbg</a></li>
  818. <li><a name="toc-entropy" href="#entropy">30.63 entropy</a></li>
  819. <li><a name="toc-eq" href="#eq">30.64 eq</a>
  820. <ul class="no-bullet">
  821. <li><a name="toc-Commands-41" href="#Commands-41">30.64.1 Commands</a></li>
  822. </ul></li>
  823. <li><a name="toc-erosion" href="#erosion">30.65 erosion</a>
  824. <ul class="no-bullet">
  825. <li><a name="toc-Commands-53" href="#Commands-53">30.65.1 Commands</a></li>
  826. </ul></li>
  827. <li><a name="toc-extractplanes" href="#extractplanes">30.66 extractplanes</a>
  828. <ul class="no-bullet">
  829. <li><a name="toc-Examples-148" href="#Examples-148">30.66.1 Examples</a></li>
  830. </ul></li>
  831. <li><a name="toc-fade" href="#fade">30.67 fade</a>
  832. <ul class="no-bullet">
  833. <li><a name="toc-Examples-140" href="#Examples-140">30.67.1 Examples</a></li>
  834. </ul></li>
  835. <li><a name="toc-fftdnoiz" href="#fftdnoiz">30.68 fftdnoiz</a></li>
  836. <li><a name="toc-fftfilt" href="#fftfilt">30.69 fftfilt</a>
  837. <ul class="no-bullet">
  838. <li><a name="toc-Examples-7" href="#Examples-7">30.69.1 Examples</a></li>
  839. </ul></li>
  840. <li><a name="toc-field" href="#field">30.70 field</a></li>
  841. <li><a name="toc-fieldhint" href="#fieldhint">30.71 fieldhint</a></li>
  842. <li><a name="toc-fieldmatch" href="#fieldmatch">30.72 fieldmatch</a>
  843. <ul class="no-bullet">
  844. <li><a name="toc-p_002fc_002fn_002fu_002fb-meaning-1" href="#p_002fc_002fn_002fu_002fb-meaning-1">30.72.1 p/c/n/u/b meaning</a>
  845. <ul class="no-bullet">
  846. <li><a name="toc-p_002fc_002fn" href="#p_002fc_002fn">30.72.1.1 p/c/n</a></li>
  847. <li><a name="toc-u_002fb" href="#u_002fb">30.72.1.2 u/b</a></li>
  848. </ul></li>
  849. <li><a name="toc-Examples-79" href="#Examples-79">30.72.2 Examples</a></li>
  850. </ul></li>
  851. <li><a name="toc-fieldorder" href="#fieldorder">30.73 fieldorder</a></li>
  852. <li><a name="toc-fifo_002c-afifo" href="#fifo_002c-afifo">30.74 fifo, afifo</a></li>
  853. <li><a name="toc-fillborders" href="#fillborders">30.75 fillborders</a>
  854. <ul class="no-bullet">
  855. <li><a name="toc-Commands-1" href="#Commands-1">30.75.1 Commands</a></li>
  856. </ul></li>
  857. <li><a name="toc-find_005frect" href="#find_005frect">30.76 find_rect</a>
  858. <ul class="no-bullet">
  859. <li><a name="toc-Examples-49" href="#Examples-49">30.76.1 Examples</a></li>
  860. </ul></li>
  861. <li><a name="toc-floodfill" href="#floodfill">30.77 floodfill</a></li>
  862. <li><a name="toc-format-1" href="#format-1">30.78 format</a>
  863. <ul class="no-bullet">
  864. <li><a name="toc-Examples-150" href="#Examples-150">30.78.1 Examples</a></li>
  865. </ul></li>
  866. <li><a name="toc-fps-1" href="#fps-1">30.79 fps</a>
  867. <ul class="no-bullet">
  868. <li><a name="toc-Examples-160" href="#Examples-160">30.79.1 Examples</a></li>
  869. </ul></li>
  870. <li><a name="toc-framepack" href="#framepack">30.80 framepack</a></li>
  871. <li><a name="toc-framerate" href="#framerate">30.81 framerate</a></li>
  872. <li><a name="toc-framestep" href="#framestep">30.82 framestep</a></li>
  873. <li><a name="toc-freezedetect" href="#freezedetect">30.83 freezedetect</a></li>
  874. <li><a name="toc-freezeframes" href="#freezeframes">30.84 freezeframes</a></li>
  875. <li><a name="toc-frei0r-1" href="#frei0r-1">30.85 frei0r</a>
  876. <ul class="no-bullet">
  877. <li><a name="toc-Examples-57" href="#Examples-57">30.85.1 Examples</a></li>
  878. </ul></li>
  879. <li><a name="toc-fspp" href="#fspp">30.86 fspp</a></li>
  880. <li><a name="toc-gblur" href="#gblur">30.87 gblur</a>
  881. <ul class="no-bullet">
  882. <li><a name="toc-Commands-24" href="#Commands-24">30.87.1 Commands</a></li>
  883. </ul></li>
  884. <li><a name="toc-geq" href="#geq">30.88 geq</a>
  885. <ul class="no-bullet">
  886. <li><a name="toc-Examples-35" href="#Examples-35">30.88.1 Examples</a></li>
  887. </ul></li>
  888. <li><a name="toc-gradfun" href="#gradfun">30.89 gradfun</a>
  889. <ul class="no-bullet">
  890. <li><a name="toc-Examples-83" href="#Examples-83">30.89.1 Examples</a></li>
  891. </ul></li>
  892. <li><a name="toc-graphmonitor-1" href="#graphmonitor-1">30.90 graphmonitor</a></li>
  893. <li><a name="toc-greyedge" href="#greyedge">30.91 greyedge</a>
  894. <ul class="no-bullet">
  895. <li><a name="toc-Examples-45" href="#Examples-45">30.91.1 Examples</a></li>
  896. </ul></li>
  897. <li><a name="toc-haldclut-1" href="#haldclut-1">30.92 haldclut</a>
  898. <ul class="no-bullet">
  899. <li><a name="toc-Workflow-examples" href="#Workflow-examples">30.92.1 Workflow examples</a>
  900. <ul class="no-bullet">
  901. <li><a name="toc-Hald-CLUT-video-stream" href="#Hald-CLUT-video-stream">30.92.1.1 Hald CLUT video stream</a></li>
  902. <li><a name="toc-Hald-CLUT-with-preview" href="#Hald-CLUT-with-preview">30.92.1.2 Hald CLUT with preview</a></li>
  903. </ul>
  904. </li>
  905. </ul></li>
  906. <li><a name="toc-hflip" href="#hflip">30.93 hflip</a></li>
  907. <li><a name="toc-histeq" href="#histeq">30.94 histeq</a></li>
  908. <li><a name="toc-histogram-1" href="#histogram-1">30.95 histogram</a>
  909. <ul class="no-bullet">
  910. <li><a name="toc-Examples-8" href="#Examples-8">30.95.1 Examples</a></li>
  911. </ul></li>
  912. <li><a name="toc-hqdn3d-1" href="#hqdn3d-1">30.96 hqdn3d</a>
  913. <ul class="no-bullet">
  914. <li><a name="toc-Commands-8" href="#Commands-8">30.96.1 Commands</a></li>
  915. </ul></li>
  916. <li><a name="toc-hwdownload-1" href="#hwdownload-1">30.97 hwdownload</a></li>
  917. <li><a name="toc-hwmap" href="#hwmap">30.98 hwmap</a></li>
  918. <li><a name="toc-hwupload-1" href="#hwupload-1">30.99 hwupload</a></li>
  919. <li><a name="toc-hwupload_005fcuda-1" href="#hwupload_005fcuda-1">30.100 hwupload_cuda</a></li>
  920. <li><a name="toc-hqx" href="#hqx">30.101 hqx</a></li>
  921. <li><a name="toc-hstack" href="#hstack">30.102 hstack</a></li>
  922. <li><a name="toc-hue" href="#hue">30.103 hue</a>
  923. <ul class="no-bullet">
  924. <li><a name="toc-Examples-143" href="#Examples-143">30.103.1 Examples</a></li>
  925. <li><a name="toc-Commands-28" href="#Commands-28">30.103.2 Commands</a></li>
  926. </ul></li>
  927. <li><a name="toc-hysteresis" href="#hysteresis">30.104 hysteresis</a></li>
  928. <li><a name="toc-idet" href="#idet">30.105 idet</a></li>
  929. <li><a name="toc-il" href="#il">30.106 il</a>
  930. <ul class="no-bullet">
  931. <li><a name="toc-Commands-47" href="#Commands-47">30.106.1 Commands</a></li>
  932. </ul></li>
  933. <li><a name="toc-inflate" href="#inflate">30.107 inflate</a>
  934. <ul class="no-bullet">
  935. <li><a name="toc-Commands-9" href="#Commands-9">30.107.1 Commands</a></li>
  936. </ul></li>
  937. <li><a name="toc-interlace" href="#interlace">30.108 interlace</a></li>
  938. <li><a name="toc-kerndeint" href="#kerndeint">30.109 kerndeint</a>
  939. <ul class="no-bullet">
  940. <li><a name="toc-Examples-102" href="#Examples-102">30.109.1 Examples</a></li>
  941. </ul></li>
  942. <li><a name="toc-lagfun" href="#lagfun">30.110 lagfun</a></li>
  943. <li><a name="toc-lenscorrection" href="#lenscorrection">30.111 lenscorrection</a>
  944. <ul class="no-bullet">
  945. <li><a name="toc-Options-34" href="#Options-34">30.111.1 Options</a></li>
  946. </ul></li>
  947. <li><a name="toc-lensfun" href="#lensfun">30.112 lensfun</a>
  948. <ul class="no-bullet">
  949. <li><a name="toc-Examples-100" href="#Examples-100">30.112.1 Examples</a></li>
  950. </ul></li>
  951. <li><a name="toc-libvmaf" href="#libvmaf">30.113 libvmaf</a>
  952. <ul class="no-bullet">
  953. <li><a name="toc-Examples-5" href="#Examples-5">30.113.1 Examples</a></li>
  954. </ul></li>
  955. <li><a name="toc-limiter" href="#limiter">30.114 limiter</a></li>
  956. <li><a name="toc-loop" href="#loop">30.115 loop</a>
  957. <ul class="no-bullet">
  958. <li><a name="toc-Examples-80" href="#Examples-80">30.115.1 Examples</a></li>
  959. </ul></li>
  960. <li><a name="toc-lut1d" href="#lut1d">30.116 lut1d</a></li>
  961. <li><a name="toc-lut3d-1" href="#lut3d-1">30.117 lut3d</a></li>
  962. <li><a name="toc-lumakey" href="#lumakey">30.118 lumakey</a>
  963. <ul class="no-bullet">
  964. <li><a name="toc-Commands-5" href="#Commands-5">30.118.1 Commands</a></li>
  965. </ul></li>
  966. <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">30.119 lut, lutrgb, lutyuv</a>
  967. <ul class="no-bullet">
  968. <li><a name="toc-Examples-88" href="#Examples-88">30.119.1 Examples</a></li>
  969. </ul></li>
  970. <li><a name="toc-lut2_002c-tlut2" href="#lut2_002c-tlut2">30.120 lut2, tlut2</a>
  971. <ul class="no-bullet">
  972. <li><a name="toc-Examples-162" href="#Examples-162">30.120.1 Examples</a></li>
  973. </ul></li>
  974. <li><a name="toc-maskedclamp" href="#maskedclamp">30.121 maskedclamp</a></li>
  975. <li><a name="toc-maskedmax" href="#maskedmax">30.122 maskedmax</a></li>
  976. <li><a name="toc-maskedmerge" href="#maskedmerge">30.123 maskedmerge</a></li>
  977. <li><a name="toc-maskedmin" href="#maskedmin">30.124 maskedmin</a></li>
  978. <li><a name="toc-maskfun" href="#maskfun">30.125 maskfun</a></li>
  979. <li><a name="toc-mcdeint" href="#mcdeint">30.126 mcdeint</a></li>
  980. <li><a name="toc-median" href="#median">30.127 median</a>
  981. <ul class="no-bullet">
  982. <li><a name="toc-Commands-52" href="#Commands-52">30.127.1 Commands</a></li>
  983. </ul></li>
  984. <li><a name="toc-mergeplanes" href="#mergeplanes">30.128 mergeplanes</a>
  985. <ul class="no-bullet">
  986. <li><a name="toc-Examples-67" href="#Examples-67">30.128.1 Examples</a></li>
  987. </ul></li>
  988. <li><a name="toc-mestimate" href="#mestimate">30.129 mestimate</a></li>
  989. <li><a name="toc-midequalizer" href="#midequalizer">30.130 midequalizer</a></li>
  990. <li><a name="toc-minterpolate" href="#minterpolate">30.131 minterpolate</a></li>
  991. <li><a name="toc-mix" href="#mix">30.132 mix</a></li>
  992. <li><a name="toc-mpdecimate" href="#mpdecimate">30.133 mpdecimate</a></li>
  993. <li><a name="toc-negate" href="#negate">30.134 negate</a></li>
  994. <li><a name="toc-nlmeans-1" href="#nlmeans-1">30.135 nlmeans</a></li>
  995. <li><a name="toc-nnedi" href="#nnedi">30.136 nnedi</a></li>
  996. <li><a name="toc-noformat" href="#noformat">30.137 noformat</a>
  997. <ul class="no-bullet">
  998. <li><a name="toc-Examples-14" href="#Examples-14">30.137.1 Examples</a></li>
  999. </ul></li>
  1000. <li><a name="toc-noise" href="#noise">30.138 noise</a>
  1001. <ul class="no-bullet">
  1002. <li><a name="toc-Examples-161" href="#Examples-161">30.138.1 Examples</a></li>
  1003. </ul></li>
  1004. <li><a name="toc-normalize" href="#normalize">30.139 normalize</a>
  1005. <ul class="no-bullet">
  1006. <li><a name="toc-Commands-49" href="#Commands-49">30.139.1 Commands</a></li>
  1007. <li><a name="toc-Examples-32" href="#Examples-32">30.139.2 Examples</a></li>
  1008. </ul></li>
  1009. <li><a name="toc-null" href="#null">30.140 null</a></li>
  1010. <li><a name="toc-ocr" href="#ocr">30.141 ocr</a></li>
  1011. <li><a name="toc-ocv" href="#ocv">30.142 ocv</a>
  1012. <ul class="no-bullet">
  1013. <li><a name="toc-dilate-1" href="#dilate-1">30.142.1 dilate</a></li>
  1014. <li><a name="toc-erode" href="#erode">30.142.2 erode</a></li>
  1015. <li><a name="toc-smooth" href="#smooth">30.142.3 smooth</a></li>
  1016. </ul></li>
  1017. <li><a name="toc-oscilloscope" href="#oscilloscope">30.143 oscilloscope</a>
  1018. <ul class="no-bullet">
  1019. <li><a name="toc-Commands-6" href="#Commands-6">30.143.1 Commands</a></li>
  1020. <li><a name="toc-Examples-71" href="#Examples-71">30.143.2 Examples</a></li>
  1021. </ul></li>
  1022. <li><a name="toc-overlay-1" href="#overlay-1">30.144 overlay</a>
  1023. <ul class="no-bullet">
  1024. <li><a name="toc-Commands-21" href="#Commands-21">30.144.1 Commands</a></li>
  1025. <li><a name="toc-Examples-40" href="#Examples-40">30.144.2 Examples</a></li>
  1026. </ul></li>
  1027. <li><a name="toc-owdenoise" href="#owdenoise">30.145 owdenoise</a></li>
  1028. <li><a name="toc-pad-1" href="#pad-1">30.146 pad</a>
  1029. <ul class="no-bullet">
  1030. <li><a name="toc-Examples-113" href="#Examples-113">30.146.1 Examples</a></li>
  1031. </ul></li>
  1032. <li><a name="toc-palettegen-1" href="#palettegen-1">30.147 palettegen</a>
  1033. <ul class="no-bullet">
  1034. <li><a name="toc-Examples-125" href="#Examples-125">30.147.1 Examples</a></li>
  1035. </ul></li>
  1036. <li><a name="toc-paletteuse" href="#paletteuse">30.148 paletteuse</a>
  1037. <ul class="no-bullet">
  1038. <li><a name="toc-Examples-6" href="#Examples-6">30.148.1 Examples</a></li>
  1039. </ul></li>
  1040. <li><a name="toc-perspective" href="#perspective">30.149 perspective</a></li>
  1041. <li><a name="toc-phase" href="#phase">30.150 phase</a></li>
  1042. <li><a name="toc-photosensitivity" href="#photosensitivity">30.151 photosensitivity</a></li>
  1043. <li><a name="toc-pixdesctest" href="#pixdesctest">30.152 pixdesctest</a></li>
  1044. <li><a name="toc-pixscope" href="#pixscope">30.153 pixscope</a></li>
  1045. <li><a name="toc-pp" href="#pp">30.154 pp</a>
  1046. <ul class="no-bullet">
  1047. <li><a name="toc-Examples-26" href="#Examples-26">30.154.1 Examples</a></li>
  1048. </ul></li>
  1049. <li><a name="toc-pp7" href="#pp7">30.155 pp7</a></li>
  1050. <li><a name="toc-premultiply" href="#premultiply">30.156 premultiply</a></li>
  1051. <li><a name="toc-prewitt" href="#prewitt">30.157 prewitt</a></li>
  1052. <li><a name="toc-pseudocolor" href="#pseudocolor">30.158 pseudocolor</a>
  1053. <ul class="no-bullet">
  1054. <li><a name="toc-Examples-147" href="#Examples-147">30.158.1 Examples</a></li>
  1055. </ul></li>
  1056. <li><a name="toc-psnr" href="#psnr">30.159 psnr</a>
  1057. <ul class="no-bullet">
  1058. <li><a name="toc-Examples-69" href="#Examples-69">30.159.1 Examples</a></li>
  1059. </ul></li>
  1060. <li><a name="toc-pullup-1" href="#pullup-1">30.160 pullup</a></li>
  1061. <li><a name="toc-qp" href="#qp">30.161 qp</a>
  1062. <ul class="no-bullet">
  1063. <li><a name="toc-Examples-4" href="#Examples-4">30.161.1 Examples</a></li>
  1064. </ul></li>
  1065. <li><a name="toc-random" href="#random">30.162 random</a></li>
  1066. <li><a name="toc-readeia608" href="#readeia608">30.163 readeia608</a>
  1067. <ul class="no-bullet">
  1068. <li><a name="toc-Examples-101" href="#Examples-101">30.163.1 Examples</a></li>
  1069. </ul></li>
  1070. <li><a name="toc-readvitc" href="#readvitc">30.164 readvitc</a>
  1071. <ul class="no-bullet">
  1072. <li><a name="toc-Examples-117" href="#Examples-117">30.164.1 Examples</a></li>
  1073. </ul></li>
  1074. <li><a name="toc-remap" href="#remap">30.165 remap</a></li>
  1075. <li><a name="toc-removegrain" href="#removegrain">30.166 removegrain</a></li>
  1076. <li><a name="toc-removelogo" href="#removelogo">30.167 removelogo</a></li>
  1077. <li><a name="toc-repeatfields" href="#repeatfields">30.168 repeatfields</a></li>
  1078. <li><a name="toc-reverse" href="#reverse">30.169 reverse</a>
  1079. <ul class="no-bullet">
  1080. <li><a name="toc-Examples-91" href="#Examples-91">30.169.1 Examples</a></li>
  1081. </ul></li>
  1082. <li><a name="toc-rgbashift" href="#rgbashift">30.170 rgbashift</a>
  1083. <ul class="no-bullet">
  1084. <li><a name="toc-Commands-33" href="#Commands-33">30.170.1 Commands</a></li>
  1085. </ul></li>
  1086. <li><a name="toc-roberts" href="#roberts">30.171 roberts</a></li>
  1087. <li><a name="toc-rotate" href="#rotate">30.172 rotate</a>
  1088. <ul class="no-bullet">
  1089. <li><a name="toc-Examples-127" href="#Examples-127">30.172.1 Examples</a></li>
  1090. <li><a name="toc-Commands-30" href="#Commands-30">30.172.2 Commands</a></li>
  1091. </ul></li>
  1092. <li><a name="toc-sab" href="#sab">30.173 sab</a></li>
  1093. <li><a name="toc-scale-1" href="#scale-1">30.174 scale</a>
  1094. <ul class="no-bullet">
  1095. <li><a name="toc-Options-12" href="#Options-12">30.174.1 Options</a></li>
  1096. <li><a name="toc-Examples-63" href="#Examples-63">30.174.2 Examples</a></li>
  1097. <li><a name="toc-Commands-20" href="#Commands-20">30.174.3 Commands</a></li>
  1098. </ul></li>
  1099. <li><a name="toc-scale_005fnpp" href="#scale_005fnpp">30.175 scale_npp</a></li>
  1100. <li><a name="toc-scale2ref" href="#scale2ref">30.176 scale2ref</a>
  1101. <ul class="no-bullet">
  1102. <li><a name="toc-Examples-129" href="#Examples-129">30.176.1 Examples</a></li>
  1103. <li><a name="toc-Commands-15" href="#Commands-15">30.176.2 Commands</a></li>
  1104. </ul></li>
  1105. <li><a name="toc-scroll" href="#scroll">30.177 scroll</a>
  1106. <ul class="no-bullet">
  1107. <li><a name="toc-Commands-16" href="#Commands-16">30.177.1 Commands</a></li>
  1108. </ul></li>
  1109. <li><a name="toc-selectivecolor-1" href="#selectivecolor-1">30.178 selectivecolor</a>
  1110. <ul class="no-bullet">
  1111. <li><a name="toc-Examples-30" href="#Examples-30">30.178.1 Examples</a></li>
  1112. </ul></li>
  1113. <li><a name="toc-separatefields-1" href="#separatefields-1">30.179 separatefields</a></li>
  1114. <li><a name="toc-setdar_002c-setsar" href="#setdar_002c-setsar">30.180 setdar, setsar</a>
  1115. <ul class="no-bullet">
  1116. <li><a name="toc-Examples-116" href="#Examples-116">30.180.1 Examples</a></li>
  1117. </ul></li>
  1118. <li><a name="toc-setfield-1" href="#setfield-1">30.181 setfield</a></li>
  1119. <li><a name="toc-setparams-1" href="#setparams-1">30.182 setparams</a></li>
  1120. <li><a name="toc-showinfo" href="#showinfo">30.183 showinfo</a></li>
  1121. <li><a name="toc-showpalette" href="#showpalette">30.184 showpalette</a></li>
  1122. <li><a name="toc-shuffleframes" href="#shuffleframes">30.185 shuffleframes</a>
  1123. <ul class="no-bullet">
  1124. <li><a name="toc-Examples-77" href="#Examples-77">30.185.1 Examples</a></li>
  1125. </ul></li>
  1126. <li><a name="toc-shuffleplanes" href="#shuffleplanes">30.186 shuffleplanes</a>
  1127. <ul class="no-bullet">
  1128. <li><a name="toc-Examples-3" href="#Examples-3">30.186.1 Examples</a></li>
  1129. </ul></li>
  1130. <li><a name="toc-signalstats-1" href="#signalstats-1">30.187 signalstats</a>
  1131. <ul class="no-bullet">
  1132. <li><a name="toc-Examples-133" href="#Examples-133">30.187.1 Examples</a></li>
  1133. </ul></li>
  1134. <li><a name="toc-signature-1" href="#signature-1">30.188 signature</a>
  1135. <ul class="no-bullet">
  1136. <li><a name="toc-Examples-84" href="#Examples-84">30.188.1 Examples</a></li>
  1137. </ul></li>
  1138. <li><a name="toc-smartblur-1" href="#smartblur-1">30.189 smartblur</a></li>
  1139. <li><a name="toc-sobel" href="#sobel">30.190 sobel</a></li>
  1140. <li><a name="toc-spp-1" href="#spp-1">30.191 spp</a>
  1141. <ul class="no-bullet">
  1142. <li><a name="toc-Commands-35" href="#Commands-35">30.191.1 Commands</a></li>
  1143. </ul></li>
  1144. <li><a name="toc-sr" href="#sr">30.192 sr</a></li>
  1145. <li><a name="toc-ssim" href="#ssim">30.193 ssim</a>
  1146. <ul class="no-bullet">
  1147. <li><a name="toc-Examples-131" href="#Examples-131">30.193.1 Examples</a></li>
  1148. </ul></li>
  1149. <li><a name="toc-stereo3d" href="#stereo3d">30.194 stereo3d</a>
  1150. <ul class="no-bullet">
  1151. <li><a name="toc-Examples-21" href="#Examples-21">30.194.1 Examples</a></li>
  1152. </ul></li>
  1153. <li><a name="toc-streamselect_002c-astreamselect" href="#streamselect_002c-astreamselect">30.195 streamselect, astreamselect</a>
  1154. <ul class="no-bullet">
  1155. <li><a name="toc-Commands-55" href="#Commands-55">30.195.1 Commands</a></li>
  1156. <li><a name="toc-Examples-28" href="#Examples-28">30.195.2 Examples</a></li>
  1157. </ul></li>
  1158. <li><a name="toc-subtitles-1" href="#subtitles-1">30.196 subtitles</a></li>
  1159. <li><a name="toc-super2xsai" href="#super2xsai">30.197 super2xsai</a></li>
  1160. <li><a name="toc-swaprect" href="#swaprect">30.198 swaprect</a></li>
  1161. <li><a name="toc-swapuv" href="#swapuv">30.199 swapuv</a></li>
  1162. <li><a name="toc-tblend" href="#tblend">30.200 tblend</a></li>
  1163. <li><a name="toc-telecine" href="#telecine">30.201 telecine</a></li>
  1164. <li><a name="toc-thistogram" href="#thistogram">30.202 thistogram</a></li>
  1165. <li><a name="toc-threshold" href="#threshold">30.203 threshold</a>
  1166. <ul class="no-bullet">
  1167. <li><a name="toc-Examples-111" href="#Examples-111">30.203.1 Examples</a></li>
  1168. </ul></li>
  1169. <li><a name="toc-thumbnail" href="#thumbnail">30.204 thumbnail</a>
  1170. <ul class="no-bullet">
  1171. <li><a name="toc-Examples-159" href="#Examples-159">30.204.1 Examples</a></li>
  1172. </ul></li>
  1173. <li><a name="toc-tile" href="#tile">30.205 tile</a>
  1174. <ul class="no-bullet">
  1175. <li><a name="toc-Examples-33" href="#Examples-33">30.205.1 Examples</a></li>
  1176. </ul></li>
  1177. <li><a name="toc-tinterlace" href="#tinterlace">30.206 tinterlace</a></li>
  1178. <li><a name="toc-tmix" href="#tmix">30.207 tmix</a>
  1179. <ul class="no-bullet">
  1180. <li><a name="toc-Examples-9" href="#Examples-9">30.207.1 Examples</a></li>
  1181. </ul></li>
  1182. <li><a name="toc-tonemap-1" href="#tonemap-1">30.208 tonemap</a>
  1183. <ul class="no-bullet">
  1184. <li><a name="toc-Options-33" href="#Options-33">30.208.1 Options</a></li>
  1185. </ul></li>
  1186. <li><a name="toc-tpad" href="#tpad">30.209 tpad</a></li>
  1187. <li><a name="toc-transpose-1" href="#transpose-1">30.210 transpose</a></li>
  1188. <li><a name="toc-transpose_005fnpp" href="#transpose_005fnpp">30.211 transpose_npp</a></li>
  1189. <li><a name="toc-trim" href="#trim">30.212 trim</a></li>
  1190. <li><a name="toc-unpremultiply" href="#unpremultiply">30.213 unpremultiply</a></li>
  1191. <li><a name="toc-unsharp-1" href="#unsharp-1">30.214 unsharp</a>
  1192. <ul class="no-bullet">
  1193. <li><a name="toc-Examples-163" href="#Examples-163">30.214.1 Examples</a></li>
  1194. </ul></li>
  1195. <li><a name="toc-uspp" href="#uspp">30.215 uspp</a></li>
  1196. <li><a name="toc-v360" href="#v360">30.216 v360</a>
  1197. <ul class="no-bullet">
  1198. <li><a name="toc-Examples-96" href="#Examples-96">30.216.1 Examples</a></li>
  1199. <li><a name="toc-Commands" href="#Commands">30.216.2 Commands</a></li>
  1200. </ul></li>
  1201. <li><a name="toc-vaguedenoiser" href="#vaguedenoiser">30.217 vaguedenoiser</a></li>
  1202. <li><a name="toc-vectorscope" href="#vectorscope">30.218 vectorscope</a></li>
  1203. <li><a name="toc-vidstabdetect-1" href="#vidstabdetect-1">30.219 vidstabdetect</a>
  1204. <ul class="no-bullet">
  1205. <li><a name="toc-Examples-119" href="#Examples-119">30.219.1 Examples</a></li>
  1206. </ul></li>
  1207. <li><a name="toc-vidstabtransform-1" href="#vidstabtransform-1">30.220 vidstabtransform</a>
  1208. <ul class="no-bullet">
  1209. <li><a name="toc-Options-17" href="#Options-17">30.220.1 Options</a></li>
  1210. <li><a name="toc-Examples-121" href="#Examples-121">30.220.2 Examples</a></li>
  1211. </ul></li>
  1212. <li><a name="toc-vflip" href="#vflip">30.221 vflip</a></li>
  1213. <li><a name="toc-vfrdet" href="#vfrdet">30.222 vfrdet</a></li>
  1214. <li><a name="toc-vibrance" href="#vibrance">30.223 vibrance</a>
  1215. <ul class="no-bullet">
  1216. <li><a name="toc-Commands-50" href="#Commands-50">30.223.1 Commands</a></li>
  1217. </ul></li>
  1218. <li><a name="toc-vignette-1" href="#vignette-1">30.224 vignette</a>
  1219. <ul class="no-bullet">
  1220. <li><a name="toc-Expressions" href="#Expressions">30.224.1 Expressions</a></li>
  1221. <li><a name="toc-Examples-86" href="#Examples-86">30.224.2 Examples</a></li>
  1222. </ul></li>
  1223. <li><a name="toc-vmafmotion" href="#vmafmotion">30.225 vmafmotion</a></li>
  1224. <li><a name="toc-vstack" href="#vstack">30.226 vstack</a></li>
  1225. <li><a name="toc-w3fdif" href="#w3fdif">30.227 w3fdif</a></li>
  1226. <li><a name="toc-waveform" href="#waveform">30.228 waveform</a></li>
  1227. <li><a name="toc-weave_002c-doubleweave" href="#weave_002c-doubleweave">30.229 weave, doubleweave</a>
  1228. <ul class="no-bullet">
  1229. <li><a name="toc-Examples-75" href="#Examples-75">30.229.1 Examples</a></li>
  1230. </ul></li>
  1231. <li><a name="toc-xbr" href="#xbr">30.230 xbr</a></li>
  1232. <li><a name="toc-xfade" href="#xfade">30.231 xfade</a>
  1233. <ul class="no-bullet">
  1234. <li><a name="toc-Examples-112" href="#Examples-112">30.231.1 Examples</a></li>
  1235. </ul></li>
  1236. <li><a name="toc-xmedian" href="#xmedian">30.232 xmedian</a></li>
  1237. <li><a name="toc-xstack" href="#xstack">30.233 xstack</a>
  1238. <ul class="no-bullet">
  1239. <li><a name="toc-Examples-120" href="#Examples-120">30.233.1 Examples</a></li>
  1240. </ul></li>
  1241. <li><a name="toc-yadif-1" href="#yadif-1">30.234 yadif</a></li>
  1242. <li><a name="toc-yadif_005fcuda" href="#yadif_005fcuda">30.235 yadif_cuda</a></li>
  1243. <li><a name="toc-yaepblur" href="#yaepblur">30.236 yaepblur</a>
  1244. <ul class="no-bullet">
  1245. <li><a name="toc-Commands-65" href="#Commands-65">30.236.1 Commands</a></li>
  1246. </ul></li>
  1247. <li><a name="toc-zoompan" href="#zoompan">30.237 zoompan</a>
  1248. <ul class="no-bullet">
  1249. <li><a name="toc-Examples-1" href="#Examples-1">30.237.1 Examples</a></li>
  1250. </ul></li>
  1251. <li><a name="toc-zscale-1" href="#zscale-1">30.238 zscale</a>
  1252. <ul class="no-bullet">
  1253. <li><a name="toc-Options-24" href="#Options-24">30.238.1 Options</a></li>
  1254. <li><a name="toc-Commands-26" href="#Commands-26">30.238.2 Commands</a></li>
  1255. </ul>
  1256. </li>
  1257. </ul></li>
  1258. <li><a name="toc-OpenCL-Video-Filters" href="#OpenCL-Video-Filters">31 OpenCL Video Filters</a>
  1259. <ul class="no-bullet">
  1260. <li><a name="toc-avgblur_005fopencl" href="#avgblur_005fopencl">31.1 avgblur_opencl</a>
  1261. <ul class="no-bullet">
  1262. <li><a name="toc-Example-6" href="#Example-6">31.1.1 Example</a></li>
  1263. </ul></li>
  1264. <li><a name="toc-boxblur_005fopencl" href="#boxblur_005fopencl">31.2 boxblur_opencl</a>
  1265. <ul class="no-bullet">
  1266. <li><a name="toc-Examples-124" href="#Examples-124">31.2.1 Examples</a></li>
  1267. </ul></li>
  1268. <li><a name="toc-colorkey_005fopencl" href="#colorkey_005fopencl">31.3 colorkey_opencl</a>
  1269. <ul class="no-bullet">
  1270. <li><a name="toc-Examples-58" href="#Examples-58">31.3.1 Examples</a></li>
  1271. </ul></li>
  1272. <li><a name="toc-convolution_005fopencl" href="#convolution_005fopencl">31.4 convolution_opencl</a>
  1273. <ul class="no-bullet">
  1274. <li><a name="toc-Examples-136" href="#Examples-136">31.4.1 Examples</a></li>
  1275. </ul></li>
  1276. <li><a name="toc-erosion_005fopencl" href="#erosion_005fopencl">31.5 erosion_opencl</a>
  1277. <ul class="no-bullet">
  1278. <li><a name="toc-Example-5" href="#Example-5">31.5.1 Example</a></li>
  1279. </ul></li>
  1280. <li><a name="toc-deshake_005fopencl" href="#deshake_005fopencl">31.6 deshake_opencl</a>
  1281. <ul class="no-bullet">
  1282. <li><a name="toc-Examples-99" href="#Examples-99">31.6.1 Examples</a></li>
  1283. </ul></li>
  1284. <li><a name="toc-dilation_005fopencl" href="#dilation_005fopencl">31.7 dilation_opencl</a>
  1285. <ul class="no-bullet">
  1286. <li><a name="toc-Example-1" href="#Example-1">31.7.1 Example</a></li>
  1287. </ul></li>
  1288. <li><a name="toc-nlmeans_005fopencl" href="#nlmeans_005fopencl">31.8 nlmeans_opencl</a></li>
  1289. <li><a name="toc-overlay_005fopencl" href="#overlay_005fopencl">31.9 overlay_opencl</a>
  1290. <ul class="no-bullet">
  1291. <li><a name="toc-Examples-48" href="#Examples-48">31.9.1 Examples</a></li>
  1292. </ul></li>
  1293. <li><a name="toc-pad_005fopencl" href="#pad_005fopencl">31.10 pad_opencl</a></li>
  1294. <li><a name="toc-prewitt_005fopencl" href="#prewitt_005fopencl">31.11 prewitt_opencl</a>
  1295. <ul class="no-bullet">
  1296. <li><a name="toc-Example-2" href="#Example-2">31.11.1 Example</a></li>
  1297. </ul></li>
  1298. <li><a name="toc-program_005fopencl-1" href="#program_005fopencl-1">31.12 program_opencl</a></li>
  1299. <li><a name="toc-roberts_005fopencl" href="#roberts_005fopencl">31.13 roberts_opencl</a>
  1300. <ul class="no-bullet">
  1301. <li><a name="toc-Example" href="#Example">31.13.1 Example</a></li>
  1302. </ul></li>
  1303. <li><a name="toc-sobel_005fopencl" href="#sobel_005fopencl">31.14 sobel_opencl</a>
  1304. <ul class="no-bullet">
  1305. <li><a name="toc-Example-3" href="#Example-3">31.14.1 Example</a></li>
  1306. </ul></li>
  1307. <li><a name="toc-tonemap_005fopencl" href="#tonemap_005fopencl">31.15 tonemap_opencl</a>
  1308. <ul class="no-bullet">
  1309. <li><a name="toc-Example-4" href="#Example-4">31.15.1 Example</a></li>
  1310. </ul></li>
  1311. <li><a name="toc-unsharp_005fopencl" href="#unsharp_005fopencl">31.16 unsharp_opencl</a>
  1312. <ul class="no-bullet">
  1313. <li><a name="toc-Examples-11" href="#Examples-11">31.16.1 Examples</a></li>
  1314. </ul></li>
  1315. <li><a name="toc-xfade_005fopencl" href="#xfade_005fopencl">31.17 xfade_opencl</a></li>
  1316. </ul></li>
  1317. <li><a name="toc-VAAPI-Video-Filters" href="#VAAPI-Video-Filters">32 VAAPI Video Filters</a>
  1318. <ul class="no-bullet">
  1319. <li><a name="toc-tonemap_005fvaapi" href="#tonemap_005fvaapi">32.1 tonemap_vaapi</a>
  1320. <ul class="no-bullet">
  1321. <li><a name="toc-Example-7" href="#Example-7">32.1.1 Example</a></li>
  1322. </ul>
  1323. </li>
  1324. </ul></li>
  1325. <li><a name="toc-Video-Sources" href="#Video-Sources">33 Video Sources</a>
  1326. <ul class="no-bullet">
  1327. <li><a name="toc-buffer" href="#buffer">33.1 buffer</a></li>
  1328. <li><a name="toc-cellauto" href="#cellauto">33.2 cellauto</a>
  1329. <ul class="no-bullet">
  1330. <li><a name="toc-Examples-55" href="#Examples-55">33.2.1 Examples</a></li>
  1331. </ul></li>
  1332. <li><a name="toc-coreimagesrc-1" href="#coreimagesrc-1">33.3 coreimagesrc</a>
  1333. <ul class="no-bullet">
  1334. <li><a name="toc-Examples-78" href="#Examples-78">33.3.1 Examples</a></li>
  1335. </ul></li>
  1336. <li><a name="toc-mandelbrot" href="#mandelbrot">33.4 mandelbrot</a></li>
  1337. <li><a name="toc-mptestsrc" href="#mptestsrc">33.5 mptestsrc</a></li>
  1338. <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">33.6 frei0r_src</a></li>
  1339. <li><a name="toc-life" href="#life">33.7 life</a>
  1340. <ul class="no-bullet">
  1341. <li><a name="toc-Examples-149" href="#Examples-149">33.7.1 Examples</a></li>
  1342. </ul></li>
  1343. <li><a name="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">33.8 allrgb, allyuv, color, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc</a>
  1344. <ul class="no-bullet">
  1345. <li><a name="toc-Examples-34" href="#Examples-34">33.8.1 Examples</a></li>
  1346. <li><a name="toc-Commands-37" href="#Commands-37">33.8.2 Commands</a></li>
  1347. </ul></li>
  1348. <li><a name="toc-openclsrc" href="#openclsrc">33.9 openclsrc</a></li>
  1349. <li><a name="toc-sierpinski" href="#sierpinski">33.10 sierpinski</a></li>
  1350. </ul></li>
  1351. <li><a name="toc-Video-Sinks" href="#Video-Sinks">34 Video Sinks</a>
  1352. <ul class="no-bullet">
  1353. <li><a name="toc-buffersink" href="#buffersink">34.1 buffersink</a></li>
  1354. <li><a name="toc-nullsink" href="#nullsink">34.2 nullsink</a></li>
  1355. </ul></li>
  1356. <li><a name="toc-Multimedia-Filters" href="#Multimedia-Filters">35 Multimedia Filters</a>
  1357. <ul class="no-bullet">
  1358. <li><a name="toc-abitscope" href="#abitscope">35.1 abitscope</a></li>
  1359. <li><a name="toc-adrawgraph" href="#adrawgraph">35.2 adrawgraph</a></li>
  1360. <li><a name="toc-agraphmonitor" href="#agraphmonitor">35.3 agraphmonitor</a></li>
  1361. <li><a name="toc-ahistogram" href="#ahistogram">35.4 ahistogram</a></li>
  1362. <li><a name="toc-aphasemeter" href="#aphasemeter">35.5 aphasemeter</a></li>
  1363. <li><a name="toc-avectorscope" href="#avectorscope">35.6 avectorscope</a>
  1364. <ul class="no-bullet">
  1365. <li><a name="toc-Examples-53" href="#Examples-53">35.6.1 Examples</a></li>
  1366. </ul></li>
  1367. <li><a name="toc-bench_002c-abench" href="#bench_002c-abench">35.7 bench, abench</a>
  1368. <ul class="no-bullet">
  1369. <li><a name="toc-Examples-151" href="#Examples-151">35.7.1 Examples</a></li>
  1370. </ul></li>
  1371. <li><a name="toc-concat-2" href="#concat-2">35.8 concat</a>
  1372. <ul class="no-bullet">
  1373. <li><a name="toc-Examples-82" href="#Examples-82">35.8.1 Examples</a></li>
  1374. <li><a name="toc-Commands-45" href="#Commands-45">35.8.2 Commands</a></li>
  1375. </ul></li>
  1376. <li><a name="toc-ebur128-1" href="#ebur128-1">35.9 ebur128</a>
  1377. <ul class="no-bullet">
  1378. <li><a name="toc-Examples-135" href="#Examples-135">35.9.1 Examples</a></li>
  1379. </ul></li>
  1380. <li><a name="toc-interleave_002c-ainterleave" href="#interleave_002c-ainterleave">35.10 interleave, ainterleave</a>
  1381. <ul class="no-bullet">
  1382. <li><a name="toc-Examples-128" href="#Examples-128">35.10.1 Examples</a></li>
  1383. </ul></li>
  1384. <li><a name="toc-metadata_002c-ametadata" href="#metadata_002c-ametadata">35.11 metadata, ametadata</a>
  1385. <ul class="no-bullet">
  1386. <li><a name="toc-Examples-144" href="#Examples-144">35.11.1 Examples</a></li>
  1387. </ul></li>
  1388. <li><a name="toc-perms_002c-aperms" href="#perms_002c-aperms">35.12 perms, aperms</a></li>
  1389. <li><a name="toc-realtime_002c-arealtime" href="#realtime_002c-arealtime">35.13 realtime, arealtime</a></li>
  1390. <li><a name="toc-select_002c-aselect" href="#select_002c-aselect">35.14 select, aselect</a>
  1391. <ul class="no-bullet">
  1392. <li><a name="toc-Examples-164" href="#Examples-164">35.14.1 Examples</a></li>
  1393. </ul></li>
  1394. <li><a name="toc-sendcmd_002c-asendcmd" href="#sendcmd_002c-asendcmd">35.15 sendcmd, asendcmd</a>
  1395. <ul class="no-bullet">
  1396. <li><a name="toc-Commands-syntax" href="#Commands-syntax">35.15.1 Commands syntax</a></li>
  1397. <li><a name="toc-Examples-126" href="#Examples-126">35.15.2 Examples</a></li>
  1398. </ul></li>
  1399. <li><a name="toc-setpts_002c-asetpts" href="#setpts_002c-asetpts">35.16 setpts, asetpts</a>
  1400. <ul class="no-bullet">
  1401. <li><a name="toc-Examples-103" href="#Examples-103">35.16.1 Examples</a></li>
  1402. </ul></li>
  1403. <li><a name="toc-setrange" href="#setrange">35.17 setrange</a></li>
  1404. <li><a name="toc-settb_002c-asettb" href="#settb_002c-asettb">35.18 settb, asettb</a>
  1405. <ul class="no-bullet">
  1406. <li><a name="toc-Examples-95" href="#Examples-95">35.18.1 Examples</a></li>
  1407. </ul></li>
  1408. <li><a name="toc-showcqt" href="#showcqt">35.19 showcqt</a>
  1409. <ul class="no-bullet">
  1410. <li><a name="toc-Examples-74" href="#Examples-74">35.19.1 Examples</a></li>
  1411. </ul></li>
  1412. <li><a name="toc-showfreqs" href="#showfreqs">35.20 showfreqs</a></li>
  1413. <li><a name="toc-showspatial" href="#showspatial">35.21 showspatial</a></li>
  1414. <li><a name="toc-showspectrum-1" href="#showspectrum-1">35.22 showspectrum</a>
  1415. <ul class="no-bullet">
  1416. <li><a name="toc-Examples-110" href="#Examples-110">35.22.1 Examples</a></li>
  1417. </ul></li>
  1418. <li><a name="toc-showspectrumpic" href="#showspectrumpic">35.23 showspectrumpic</a>
  1419. <ul class="no-bullet">
  1420. <li><a name="toc-Examples-41" href="#Examples-41">35.23.1 Examples</a></li>
  1421. </ul></li>
  1422. <li><a name="toc-showvolume" href="#showvolume">35.24 showvolume</a></li>
  1423. <li><a name="toc-showwaves" href="#showwaves">35.25 showwaves</a>
  1424. <ul class="no-bullet">
  1425. <li><a name="toc-Examples-93" href="#Examples-93">35.25.1 Examples</a></li>
  1426. </ul></li>
  1427. <li><a name="toc-showwavespic" href="#showwavespic">35.26 showwavespic</a>
  1428. <ul class="no-bullet">
  1429. <li><a name="toc-Examples-122" href="#Examples-122">35.26.1 Examples</a></li>
  1430. </ul></li>
  1431. <li><a name="toc-sidedata_002c-asidedata" href="#sidedata_002c-asidedata">35.27 sidedata, asidedata</a></li>
  1432. <li><a name="toc-spectrumsynth" href="#spectrumsynth">35.28 spectrumsynth</a>
  1433. <ul class="no-bullet">
  1434. <li><a name="toc-Examples-52" href="#Examples-52">35.28.1 Examples</a></li>
  1435. </ul></li>
  1436. <li><a name="toc-split_002c-asplit" href="#split_002c-asplit">35.29 split, asplit</a>
  1437. <ul class="no-bullet">
  1438. <li><a name="toc-Examples-22" href="#Examples-22">35.29.1 Examples</a></li>
  1439. </ul></li>
  1440. <li><a name="toc-zmq_002c-azmq" href="#zmq_002c-azmq">35.30 zmq, azmq</a>
  1441. <ul class="no-bullet">
  1442. <li><a name="toc-Examples-36" href="#Examples-36">35.30.1 Examples</a></li>
  1443. </ul>
  1444. </li>
  1445. </ul></li>
  1446. <li><a name="toc-Multimedia-Sources" href="#Multimedia-Sources">36 Multimedia Sources</a>
  1447. <ul class="no-bullet">
  1448. <li><a name="toc-amovie" href="#amovie">36.1 amovie</a></li>
  1449. <li><a name="toc-movie-1" href="#movie-1">36.2 movie</a>
  1450. <ul class="no-bullet">
  1451. <li><a name="toc-Examples-157" href="#Examples-157">36.2.1 Examples</a></li>
  1452. <li><a name="toc-Commands-22" href="#Commands-22">36.2.2 Commands</a></li>
  1453. </ul>
  1454. </li>
  1455. </ul></li>
  1456. <li><a name="toc-See-Also" href="#See-Also">37 See Also</a></li>
  1457. <li><a name="toc-Authors" href="#Authors">38 Authors</a></li>
  1458. </ul>
  1459. </div>
  1460. <hr size="6">
  1461. <a name="Synopsis"></a>
  1462. <h1 class="chapter"><a href="ffplay-all.html#toc-Synopsis">1 Synopsis</a></h1>
  1463. <p>ffplay [<var>options</var>] [&lsquo;<tt>input_url</tt>&rsquo;]
  1464. </p>
  1465. <a name="Description"></a>
  1466. <h1 class="chapter"><a href="ffplay-all.html#toc-Description">2 Description</a></h1>
  1467. <p>FFplay is a very simple and portable media player using the FFmpeg
  1468. libraries and the SDL library. It is mostly used as a testbed for the
  1469. various FFmpeg APIs.
  1470. </p>
  1471. <a name="Options-2"></a>
  1472. <h1 class="chapter"><a href="ffplay-all.html#toc-Options-2">3 Options</a></h1>
  1473. <p>All the numerical options, if not specified otherwise, accept a string
  1474. representing a number as input, which may be followed by one of the SI
  1475. unit prefixes, for example: &rsquo;K&rsquo;, &rsquo;M&rsquo;, or &rsquo;G&rsquo;.
  1476. </p>
  1477. <p>If &rsquo;i&rsquo; is appended to the SI unit prefix, the complete prefix will be
  1478. interpreted as a unit prefix for binary multiples, which are based on
  1479. powers of 1024 instead of powers of 1000. Appending &rsquo;B&rsquo; to the SI unit
  1480. prefix multiplies the value by 8. This allows using, for example:
  1481. &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as number suffixes.
  1482. </p>
  1483. <p>Options which do not take arguments are boolean options, and set the
  1484. corresponding value to true. They can be set to false by prefixing
  1485. the option name with &quot;no&quot;. For example using &quot;-nofoo&quot;
  1486. will set the boolean option with name &quot;foo&quot; to false.
  1487. </p>
  1488. <p><a name="Stream-specifiers"></a>
  1489. </p><a name="Stream-specifiers-1"></a>
  1490. <h2 class="section"><a href="ffplay-all.html#toc-Stream-specifiers-1">3.1 Stream specifiers</a></h2>
  1491. <p>Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
  1492. are used to precisely specify which stream(s) a given option belongs to.
  1493. </p>
  1494. <p>A stream specifier is a string generally appended to the option name and
  1495. separated from it by a colon. E.g. <code>-codec:a:1 ac3</code> contains the
  1496. <code>a:1</code> stream specifier, which matches the second audio stream. Therefore, it
  1497. would select the ac3 codec for the second audio stream.
  1498. </p>
  1499. <p>A stream specifier can match several streams, so that the option is applied to all
  1500. of them. E.g. the stream specifier in <code>-b:a 128k</code> matches all audio
  1501. streams.
  1502. </p>
  1503. <p>An empty stream specifier matches all streams. For example, <code>-codec copy</code>
  1504. or <code>-codec: copy</code> would copy all the streams without reencoding.
  1505. </p>
  1506. <p>Possible forms of stream specifiers are:
  1507. </p><dl compact="compact">
  1508. <dt>&lsquo;<samp><var>stream_index</var></samp>&rsquo;</dt>
  1509. <dd><p>Matches the stream with this index. E.g. <code>-threads:1 4</code> would set the
  1510. thread count for the second stream to 4. If <var>stream_index</var> is used as an
  1511. additional stream specifier (see below), then it selects stream number
  1512. <var>stream_index</var> from the matching streams. Stream numbering is based on the
  1513. order of the streams as detected by libavformat except when a program ID is
  1514. also specified. In this case it is based on the ordering of the streams in the
  1515. program.
  1516. </p></dd>
  1517. <dt>&lsquo;<samp><var>stream_type</var>[:<var>additional_stream_specifier</var>]</samp>&rsquo;</dt>
  1518. <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;
  1519. for subtitle, &rsquo;d&rsquo; for data, and &rsquo;t&rsquo; for attachments. &rsquo;v&rsquo; matches all video
  1520. streams, &rsquo;V&rsquo; only matches video streams which are not attached pictures, video
  1521. thumbnails or cover arts. If <var>additional_stream_specifier</var> is used, then
  1522. it matches streams which both have this type and match the
  1523. <var>additional_stream_specifier</var>. Otherwise, it matches all streams of the
  1524. specified type.
  1525. </p></dd>
  1526. <dt>&lsquo;<samp>p:<var>program_id</var>[:<var>additional_stream_specifier</var>]</samp>&rsquo;</dt>
  1527. <dd><p>Matches streams which are in the program with the id <var>program_id</var>. If
  1528. <var>additional_stream_specifier</var> is used, then it matches streams which both
  1529. are part of the program and match the <var>additional_stream_specifier</var>.
  1530. </p>
  1531. </dd>
  1532. <dt>&lsquo;<samp>#<var>stream_id</var> or i:<var>stream_id</var></samp>&rsquo;</dt>
  1533. <dd><p>Match the stream by stream id (e.g. PID in MPEG-TS container).
  1534. </p></dd>
  1535. <dt>&lsquo;<samp>m:<var>key</var>[:<var>value</var>]</samp>&rsquo;</dt>
  1536. <dd><p>Matches streams with the metadata tag <var>key</var> having the specified value. If
  1537. <var>value</var> is not given, matches streams that contain the given tag with any
  1538. value.
  1539. </p></dd>
  1540. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  1541. <dd><p>Matches streams with usable configuration, the codec must be defined and the
  1542. essential information such as video dimension or audio sample rate must be present.
  1543. </p>
  1544. <p>Note that in <code>ffmpeg</code>, matching by metadata will only work properly for
  1545. input files.
  1546. </p></dd>
  1547. </dl>
  1548. <a name="Generic-options"></a>
  1549. <h2 class="section"><a href="ffplay-all.html#toc-Generic-options">3.2 Generic options</a></h2>
  1550. <p>These options are shared amongst the ff* tools.
  1551. </p>
  1552. <dl compact="compact">
  1553. <dt>&lsquo;<samp>-L</samp>&rsquo;</dt>
  1554. <dd><p>Show license.
  1555. </p>
  1556. </dd>
  1557. <dt>&lsquo;<samp>-h, -?, -help, --help [<var>arg</var>]</samp>&rsquo;</dt>
  1558. <dd><p>Show help. An optional parameter may be specified to print help about a specific
  1559. item. If no argument is specified, only basic (non advanced) tool
  1560. options are shown.
  1561. </p>
  1562. <p>Possible values of <var>arg</var> are:
  1563. </p><dl compact="compact">
  1564. <dt>&lsquo;<samp>long</samp>&rsquo;</dt>
  1565. <dd><p>Print advanced tool options in addition to the basic tool options.
  1566. </p>
  1567. </dd>
  1568. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  1569. <dd><p>Print complete list of options, including shared and private options
  1570. for encoders, decoders, demuxers, muxers, filters, etc.
  1571. </p>
  1572. </dd>
  1573. <dt>&lsquo;<samp>decoder=<var>decoder_name</var></samp>&rsquo;</dt>
  1574. <dd><p>Print detailed information about the decoder named <var>decoder_name</var>. Use the
  1575. &lsquo;<samp>-decoders</samp>&rsquo; option to get a list of all decoders.
  1576. </p>
  1577. </dd>
  1578. <dt>&lsquo;<samp>encoder=<var>encoder_name</var></samp>&rsquo;</dt>
  1579. <dd><p>Print detailed information about the encoder named <var>encoder_name</var>. Use the
  1580. &lsquo;<samp>-encoders</samp>&rsquo; option to get a list of all encoders.
  1581. </p>
  1582. </dd>
  1583. <dt>&lsquo;<samp>demuxer=<var>demuxer_name</var></samp>&rsquo;</dt>
  1584. <dd><p>Print detailed information about the demuxer named <var>demuxer_name</var>. Use the
  1585. &lsquo;<samp>-formats</samp>&rsquo; option to get a list of all demuxers and muxers.
  1586. </p>
  1587. </dd>
  1588. <dt>&lsquo;<samp>muxer=<var>muxer_name</var></samp>&rsquo;</dt>
  1589. <dd><p>Print detailed information about the muxer named <var>muxer_name</var>. Use the
  1590. &lsquo;<samp>-formats</samp>&rsquo; option to get a list of all muxers and demuxers.
  1591. </p>
  1592. </dd>
  1593. <dt>&lsquo;<samp>filter=<var>filter_name</var></samp>&rsquo;</dt>
  1594. <dd><p>Print detailed information about the filter name <var>filter_name</var>. Use the
  1595. &lsquo;<samp>-filters</samp>&rsquo; option to get a list of all filters.
  1596. </p>
  1597. </dd>
  1598. <dt>&lsquo;<samp>bsf=<var>bitstream_filter_name</var></samp>&rsquo;</dt>
  1599. <dd><p>Print detailed information about the bitstream filter name <var>bitstream_filter_name</var>.
  1600. Use the &lsquo;<samp>-bsfs</samp>&rsquo; option to get a list of all bitstream filters.
  1601. </p></dd>
  1602. </dl>
  1603. </dd>
  1604. <dt>&lsquo;<samp>-version</samp>&rsquo;</dt>
  1605. <dd><p>Show version.
  1606. </p>
  1607. </dd>
  1608. <dt>&lsquo;<samp>-formats</samp>&rsquo;</dt>
  1609. <dd><p>Show available formats (including devices).
  1610. </p>
  1611. </dd>
  1612. <dt>&lsquo;<samp>-demuxers</samp>&rsquo;</dt>
  1613. <dd><p>Show available demuxers.
  1614. </p>
  1615. </dd>
  1616. <dt>&lsquo;<samp>-muxers</samp>&rsquo;</dt>
  1617. <dd><p>Show available muxers.
  1618. </p>
  1619. </dd>
  1620. <dt>&lsquo;<samp>-devices</samp>&rsquo;</dt>
  1621. <dd><p>Show available devices.
  1622. </p>
  1623. </dd>
  1624. <dt>&lsquo;<samp>-codecs</samp>&rsquo;</dt>
  1625. <dd><p>Show all codecs known to libavcodec.
  1626. </p>
  1627. <p>Note that the term &rsquo;codec&rsquo; is used throughout this documentation as a shortcut
  1628. for what is more correctly called a media bitstream format.
  1629. </p>
  1630. </dd>
  1631. <dt>&lsquo;<samp>-decoders</samp>&rsquo;</dt>
  1632. <dd><p>Show available decoders.
  1633. </p>
  1634. </dd>
  1635. <dt>&lsquo;<samp>-encoders</samp>&rsquo;</dt>
  1636. <dd><p>Show all available encoders.
  1637. </p>
  1638. </dd>
  1639. <dt>&lsquo;<samp>-bsfs</samp>&rsquo;</dt>
  1640. <dd><p>Show available bitstream filters.
  1641. </p>
  1642. </dd>
  1643. <dt>&lsquo;<samp>-protocols</samp>&rsquo;</dt>
  1644. <dd><p>Show available protocols.
  1645. </p>
  1646. </dd>
  1647. <dt>&lsquo;<samp>-filters</samp>&rsquo;</dt>
  1648. <dd><p>Show available libavfilter filters.
  1649. </p>
  1650. </dd>
  1651. <dt>&lsquo;<samp>-pix_fmts</samp>&rsquo;</dt>
  1652. <dd><p>Show available pixel formats.
  1653. </p>
  1654. </dd>
  1655. <dt>&lsquo;<samp>-sample_fmts</samp>&rsquo;</dt>
  1656. <dd><p>Show available sample formats.
  1657. </p>
  1658. </dd>
  1659. <dt>&lsquo;<samp>-layouts</samp>&rsquo;</dt>
  1660. <dd><p>Show channel names and standard channel layouts.
  1661. </p>
  1662. </dd>
  1663. <dt>&lsquo;<samp>-colors</samp>&rsquo;</dt>
  1664. <dd><p>Show recognized color names.
  1665. </p>
  1666. </dd>
  1667. <dt>&lsquo;<samp>-sources <var>device</var>[,<var>opt1</var>=<var>val1</var>[,<var>opt2</var>=<var>val2</var>]...]</samp>&rsquo;</dt>
  1668. <dd><p>Show autodetected sources of the input device.
  1669. Some devices may provide system-dependent source names that cannot be autodetected.
  1670. The returned list cannot be assumed to be always complete.
  1671. </p><div class="example">
  1672. <pre class="example">ffmpeg -sources pulse,server=192.168.0.4
  1673. </pre></div>
  1674. </dd>
  1675. <dt>&lsquo;<samp>-sinks <var>device</var>[,<var>opt1</var>=<var>val1</var>[,<var>opt2</var>=<var>val2</var>]...]</samp>&rsquo;</dt>
  1676. <dd><p>Show autodetected sinks of the output device.
  1677. Some devices may provide system-dependent sink names that cannot be autodetected.
  1678. The returned list cannot be assumed to be always complete.
  1679. </p><div class="example">
  1680. <pre class="example">ffmpeg -sinks pulse,server=192.168.0.4
  1681. </pre></div>
  1682. </dd>
  1683. <dt>&lsquo;<samp>-loglevel [<var>flags</var>+]<var>loglevel</var> | -v [<var>flags</var>+]<var>loglevel</var></samp>&rsquo;</dt>
  1684. <dd><p>Set logging level and flags used by the library.
  1685. </p>
  1686. <p>The optional <var>flags</var> prefix can consist of the following values:
  1687. </p><dl compact="compact">
  1688. <dt>&lsquo;<samp>repeat</samp>&rsquo;</dt>
  1689. <dd><p>Indicates that repeated log output should not be compressed to the first line
  1690. and the &quot;Last message repeated n times&quot; line will be omitted.
  1691. </p></dd>
  1692. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  1693. <dd><p>Indicates that log output should add a <code>[level]</code> prefix to each message
  1694. line. This can be used as an alternative to log coloring, e.g. when dumping the
  1695. log to file.
  1696. </p></dd>
  1697. </dl>
  1698. <p>Flags can also be used alone by adding a &rsquo;+&rsquo;/&rsquo;-&rsquo; prefix to set/reset a single
  1699. flag without affecting other <var>flags</var> or changing <var>loglevel</var>. When
  1700. setting both <var>flags</var> and <var>loglevel</var>, a &rsquo;+&rsquo; separator is expected
  1701. between the last <var>flags</var> value and before <var>loglevel</var>.
  1702. </p>
  1703. <p><var>loglevel</var> is a string or a number containing one of the following values:
  1704. </p><dl compact="compact">
  1705. <dt>&lsquo;<samp>quiet, -8</samp>&rsquo;</dt>
  1706. <dd><p>Show nothing at all; be silent.
  1707. </p></dd>
  1708. <dt>&lsquo;<samp>panic, 0</samp>&rsquo;</dt>
  1709. <dd><p>Only show fatal errors which could lead the process to crash, such as
  1710. an assertion failure. This is not currently used for anything.
  1711. </p></dd>
  1712. <dt>&lsquo;<samp>fatal, 8</samp>&rsquo;</dt>
  1713. <dd><p>Only show fatal errors. These are errors after which the process absolutely
  1714. cannot continue.
  1715. </p></dd>
  1716. <dt>&lsquo;<samp>error, 16</samp>&rsquo;</dt>
  1717. <dd><p>Show all errors, including ones which can be recovered from.
  1718. </p></dd>
  1719. <dt>&lsquo;<samp>warning, 24</samp>&rsquo;</dt>
  1720. <dd><p>Show all warnings and errors. Any message related to possibly
  1721. incorrect or unexpected events will be shown.
  1722. </p></dd>
  1723. <dt>&lsquo;<samp>info, 32</samp>&rsquo;</dt>
  1724. <dd><p>Show informative messages during processing. This is in addition to
  1725. warnings and errors. This is the default value.
  1726. </p></dd>
  1727. <dt>&lsquo;<samp>verbose, 40</samp>&rsquo;</dt>
  1728. <dd><p>Same as <code>info</code>, except more verbose.
  1729. </p></dd>
  1730. <dt>&lsquo;<samp>debug, 48</samp>&rsquo;</dt>
  1731. <dd><p>Show everything, including debugging information.
  1732. </p></dd>
  1733. <dt>&lsquo;<samp>trace, 56</samp>&rsquo;</dt>
  1734. </dl>
  1735. <p>For example to enable repeated log output, add the <code>level</code> prefix, and set
  1736. <var>loglevel</var> to <code>verbose</code>:
  1737. </p><div class="example">
  1738. <pre class="example">ffmpeg -loglevel repeat+level+verbose -i input output
  1739. </pre></div>
  1740. <p>Another example that enables repeated log output without affecting current
  1741. state of <code>level</code> prefix flag or <var>loglevel</var>:
  1742. </p><div class="example">
  1743. <pre class="example">ffmpeg [...] -loglevel +repeat
  1744. </pre></div>
  1745. <p>By default the program logs to stderr. If coloring is supported by the
  1746. terminal, colors are used to mark errors and warnings. Log coloring
  1747. can be disabled setting the environment variable
  1748. <code>AV_LOG_FORCE_NOCOLOR</code>, or can be forced setting
  1749. the environment variable <code>AV_LOG_FORCE_COLOR</code>.
  1750. </p>
  1751. </dd>
  1752. <dt>&lsquo;<samp>-report</samp>&rsquo;</dt>
  1753. <dd><p>Dump full command line and log output to a file named
  1754. <code><var>program</var>-<var>YYYYMMDD</var>-<var>HHMMSS</var>.log</code> in the current
  1755. directory.
  1756. This file can be useful for bug reports.
  1757. It also implies <code>-loglevel debug</code>.
  1758. </p>
  1759. <p>Setting the environment variable <code>FFREPORT</code> to any value has the
  1760. same effect. If the value is a &rsquo;:&rsquo;-separated key=value sequence, these
  1761. options will affect the report; option values must be escaped if they
  1762. contain special characters or the options delimiter &rsquo;:&rsquo; (see the
  1763. &ldquo;Quoting and escaping&rdquo; section in the ffmpeg-utils manual).
  1764. </p>
  1765. <p>The following options are recognized:
  1766. </p><dl compact="compact">
  1767. <dt>&lsquo;<samp>file</samp>&rsquo;</dt>
  1768. <dd><p>set the file name to use for the report; <code>%p</code> is expanded to the name
  1769. of the program, <code>%t</code> is expanded to a timestamp, <code>%%</code> is expanded
  1770. to a plain <code>%</code>
  1771. </p></dd>
  1772. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  1773. <dd><p>set the log verbosity level using a numerical value (see <code>-loglevel</code>).
  1774. </p></dd>
  1775. </dl>
  1776. <p>For example, to output a report to a file named &lsquo;<tt>ffreport.log</tt>&rsquo;
  1777. using a log level of <code>32</code> (alias for log level <code>info</code>):
  1778. </p>
  1779. <div class="example">
  1780. <pre class="example">FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
  1781. </pre></div>
  1782. <p>Errors in parsing the environment variable are not fatal, and will not
  1783. appear in the report.
  1784. </p>
  1785. </dd>
  1786. <dt>&lsquo;<samp>-hide_banner</samp>&rsquo;</dt>
  1787. <dd><p>Suppress printing banner.
  1788. </p>
  1789. <p>All FFmpeg tools will normally show a copyright notice, build options
  1790. and library versions. This option can be used to suppress printing
  1791. this information.
  1792. </p>
  1793. </dd>
  1794. <dt>&lsquo;<samp>-cpuflags flags (<em>global</em>)</samp>&rsquo;</dt>
  1795. <dd><p>Allows setting and clearing cpu flags. This option is intended
  1796. for testing. Do not use it unless you know what you&rsquo;re doing.
  1797. </p><div class="example">
  1798. <pre class="example">ffmpeg -cpuflags -sse+mmx ...
  1799. ffmpeg -cpuflags mmx ...
  1800. ffmpeg -cpuflags 0 ...
  1801. </pre></div>
  1802. <p>Possible flags for this option are:
  1803. </p><dl compact="compact">
  1804. <dt>&lsquo;<samp>x86</samp>&rsquo;</dt>
  1805. <dd><dl compact="compact">
  1806. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  1807. <dt>&lsquo;<samp>mmxext</samp>&rsquo;</dt>
  1808. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  1809. <dt>&lsquo;<samp>sse2</samp>&rsquo;</dt>
  1810. <dt>&lsquo;<samp>sse2slow</samp>&rsquo;</dt>
  1811. <dt>&lsquo;<samp>sse3</samp>&rsquo;</dt>
  1812. <dt>&lsquo;<samp>sse3slow</samp>&rsquo;</dt>
  1813. <dt>&lsquo;<samp>ssse3</samp>&rsquo;</dt>
  1814. <dt>&lsquo;<samp>atom</samp>&rsquo;</dt>
  1815. <dt>&lsquo;<samp>sse4.1</samp>&rsquo;</dt>
  1816. <dt>&lsquo;<samp>sse4.2</samp>&rsquo;</dt>
  1817. <dt>&lsquo;<samp>avx</samp>&rsquo;</dt>
  1818. <dt>&lsquo;<samp>avx2</samp>&rsquo;</dt>
  1819. <dt>&lsquo;<samp>xop</samp>&rsquo;</dt>
  1820. <dt>&lsquo;<samp>fma3</samp>&rsquo;</dt>
  1821. <dt>&lsquo;<samp>fma4</samp>&rsquo;</dt>
  1822. <dt>&lsquo;<samp>3dnow</samp>&rsquo;</dt>
  1823. <dt>&lsquo;<samp>3dnowext</samp>&rsquo;</dt>
  1824. <dt>&lsquo;<samp>bmi1</samp>&rsquo;</dt>
  1825. <dt>&lsquo;<samp>bmi2</samp>&rsquo;</dt>
  1826. <dt>&lsquo;<samp>cmov</samp>&rsquo;</dt>
  1827. </dl>
  1828. </dd>
  1829. <dt>&lsquo;<samp>ARM</samp>&rsquo;</dt>
  1830. <dd><dl compact="compact">
  1831. <dt>&lsquo;<samp>armv5te</samp>&rsquo;</dt>
  1832. <dt>&lsquo;<samp>armv6</samp>&rsquo;</dt>
  1833. <dt>&lsquo;<samp>armv6t2</samp>&rsquo;</dt>
  1834. <dt>&lsquo;<samp>vfp</samp>&rsquo;</dt>
  1835. <dt>&lsquo;<samp>vfpv3</samp>&rsquo;</dt>
  1836. <dt>&lsquo;<samp>neon</samp>&rsquo;</dt>
  1837. <dt>&lsquo;<samp>setend</samp>&rsquo;</dt>
  1838. </dl>
  1839. </dd>
  1840. <dt>&lsquo;<samp>AArch64</samp>&rsquo;</dt>
  1841. <dd><dl compact="compact">
  1842. <dt>&lsquo;<samp>armv8</samp>&rsquo;</dt>
  1843. <dt>&lsquo;<samp>vfp</samp>&rsquo;</dt>
  1844. <dt>&lsquo;<samp>neon</samp>&rsquo;</dt>
  1845. </dl>
  1846. </dd>
  1847. <dt>&lsquo;<samp>PowerPC</samp>&rsquo;</dt>
  1848. <dd><dl compact="compact">
  1849. <dt>&lsquo;<samp>altivec</samp>&rsquo;</dt>
  1850. </dl>
  1851. </dd>
  1852. <dt>&lsquo;<samp>Specific Processors</samp>&rsquo;</dt>
  1853. <dd><dl compact="compact">
  1854. <dt>&lsquo;<samp>pentium2</samp>&rsquo;</dt>
  1855. <dt>&lsquo;<samp>pentium3</samp>&rsquo;</dt>
  1856. <dt>&lsquo;<samp>pentium4</samp>&rsquo;</dt>
  1857. <dt>&lsquo;<samp>k6</samp>&rsquo;</dt>
  1858. <dt>&lsquo;<samp>k62</samp>&rsquo;</dt>
  1859. <dt>&lsquo;<samp>athlon</samp>&rsquo;</dt>
  1860. <dt>&lsquo;<samp>athlonxp</samp>&rsquo;</dt>
  1861. <dt>&lsquo;<samp>k8</samp>&rsquo;</dt>
  1862. </dl>
  1863. </dd>
  1864. </dl>
  1865. </dd>
  1866. </dl>
  1867. <a name="AVOptions"></a>
  1868. <h2 class="section"><a href="ffplay-all.html#toc-AVOptions">3.3 AVOptions</a></h2>
  1869. <p>These options are provided directly by the libavformat, libavdevice and
  1870. libavcodec libraries. To see the list of available AVOptions, use the
  1871. &lsquo;<samp>-help</samp>&rsquo; option. They are separated into two categories:
  1872. </p><dl compact="compact">
  1873. <dt>&lsquo;<samp>generic</samp>&rsquo;</dt>
  1874. <dd><p>These options can be set for any container, codec or device. Generic options
  1875. are listed under AVFormatContext options for containers/devices and under
  1876. AVCodecContext options for codecs.
  1877. </p></dd>
  1878. <dt>&lsquo;<samp>private</samp>&rsquo;</dt>
  1879. <dd><p>These options are specific to the given container, device or codec. Private
  1880. options are listed under their corresponding containers/devices/codecs.
  1881. </p></dd>
  1882. </dl>
  1883. <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  1884. an MP3 file, use the &lsquo;<samp>id3v2_version</samp>&rsquo; private option of the MP3
  1885. muxer:
  1886. </p><div class="example">
  1887. <pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
  1888. </pre></div>
  1889. <p>All codec AVOptions are per-stream, and thus a stream specifier
  1890. should be attached to them:
  1891. </p><div class="example">
  1892. <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
  1893. </pre></div>
  1894. <p>In the above example, a multichannel audio stream is mapped twice for output.
  1895. The first instance is encoded with codec ac3 and bitrate 640k.
  1896. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using
  1897. absolute index of the output stream.
  1898. </p>
  1899. <p>Note: the &lsquo;<samp>-nooption</samp>&rsquo; syntax cannot be used for boolean
  1900. AVOptions, use &lsquo;<samp>-option 0</samp>&rsquo;/&lsquo;<samp>-option 1</samp>&rsquo;.
  1901. </p>
  1902. <p>Note: the old undocumented way of specifying per-stream AVOptions by
  1903. prepending v/a/s to the options name is now obsolete and will be
  1904. removed soon.
  1905. </p>
  1906. <a name="Main-options"></a>
  1907. <h2 class="section"><a href="ffplay-all.html#toc-Main-options">3.4 Main options</a></h2>
  1908. <dl compact="compact">
  1909. <dt>&lsquo;<samp>-x <var>width</var></samp>&rsquo;</dt>
  1910. <dd><p>Force displayed width.
  1911. </p></dd>
  1912. <dt>&lsquo;<samp>-y <var>height</var></samp>&rsquo;</dt>
  1913. <dd><p>Force displayed height.
  1914. </p></dd>
  1915. <dt>&lsquo;<samp>-s <var>size</var></samp>&rsquo;</dt>
  1916. <dd><p>Set frame size (WxH or abbreviation), needed for videos which do
  1917. not contain a header with the frame size like raw YUV. This option
  1918. has been deprecated in favor of private options, try -video_size.
  1919. </p></dd>
  1920. <dt>&lsquo;<samp>-fs</samp>&rsquo;</dt>
  1921. <dd><p>Start in fullscreen mode.
  1922. </p></dd>
  1923. <dt>&lsquo;<samp>-an</samp>&rsquo;</dt>
  1924. <dd><p>Disable audio.
  1925. </p></dd>
  1926. <dt>&lsquo;<samp>-vn</samp>&rsquo;</dt>
  1927. <dd><p>Disable video.
  1928. </p></dd>
  1929. <dt>&lsquo;<samp>-sn</samp>&rsquo;</dt>
  1930. <dd><p>Disable subtitles.
  1931. </p></dd>
  1932. <dt>&lsquo;<samp>-ss <var>pos</var></samp>&rsquo;</dt>
  1933. <dd><p>Seek to <var>pos</var>. Note that in most formats it is not possible to seek
  1934. exactly, so <code>ffplay</code> will seek to the nearest seek point to
  1935. <var>pos</var>.
  1936. </p>
  1937. <p><var>pos</var> must be a time duration specification,
  1938. see <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  1939. </p></dd>
  1940. <dt>&lsquo;<samp>-t <var>duration</var></samp>&rsquo;</dt>
  1941. <dd><p>Play <var>duration</var> seconds of audio/video.
  1942. </p>
  1943. <p><var>duration</var> must be a time duration specification,
  1944. see <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  1945. </p></dd>
  1946. <dt>&lsquo;<samp>-bytes</samp>&rsquo;</dt>
  1947. <dd><p>Seek by bytes.
  1948. </p></dd>
  1949. <dt>&lsquo;<samp>-seek_interval</samp>&rsquo;</dt>
  1950. <dd><p>Set custom interval, in seconds, for seeking using left/right keys. Default is 10 seconds.
  1951. </p></dd>
  1952. <dt>&lsquo;<samp>-nodisp</samp>&rsquo;</dt>
  1953. <dd><p>Disable graphical display.
  1954. </p></dd>
  1955. <dt>&lsquo;<samp>-noborder</samp>&rsquo;</dt>
  1956. <dd><p>Borderless window.
  1957. </p></dd>
  1958. <dt>&lsquo;<samp>-alwaysontop</samp>&rsquo;</dt>
  1959. <dd><p>Window always on top. Available on: X11 with SDL &gt;= 2.0.5, Windows SDL &gt;= 2.0.6.
  1960. </p></dd>
  1961. <dt>&lsquo;<samp>-volume</samp>&rsquo;</dt>
  1962. <dd><p>Set the startup volume. 0 means silence, 100 means no volume reduction or
  1963. amplification. Negative values are treated as 0, values above 100 are treated
  1964. as 100.
  1965. </p></dd>
  1966. <dt>&lsquo;<samp>-f <var>fmt</var></samp>&rsquo;</dt>
  1967. <dd><p>Force format.
  1968. </p></dd>
  1969. <dt>&lsquo;<samp>-window_title <var>title</var></samp>&rsquo;</dt>
  1970. <dd><p>Set window title (default is the input filename).
  1971. </p></dd>
  1972. <dt>&lsquo;<samp>-left <var>title</var></samp>&rsquo;</dt>
  1973. <dd><p>Set the x position for the left of the window (default is a centered window).
  1974. </p></dd>
  1975. <dt>&lsquo;<samp>-top <var>title</var></samp>&rsquo;</dt>
  1976. <dd><p>Set the y position for the top of the window (default is a centered window).
  1977. </p></dd>
  1978. <dt>&lsquo;<samp>-loop <var>number</var></samp>&rsquo;</dt>
  1979. <dd><p>Loops movie playback &lt;number&gt; times. 0 means forever.
  1980. </p></dd>
  1981. <dt>&lsquo;<samp>-showmode <var>mode</var></samp>&rsquo;</dt>
  1982. <dd><p>Set the show mode to use.
  1983. Available values for <var>mode</var> are:
  1984. </p><dl compact="compact">
  1985. <dt>&lsquo;<samp>0, video</samp>&rsquo;</dt>
  1986. <dd><p>show video
  1987. </p></dd>
  1988. <dt>&lsquo;<samp>1, waves</samp>&rsquo;</dt>
  1989. <dd><p>show audio waves
  1990. </p></dd>
  1991. <dt>&lsquo;<samp>2, rdft</samp>&rsquo;</dt>
  1992. <dd><p>show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
  1993. </p></dd>
  1994. </dl>
  1995. <p>Default value is &quot;video&quot;, if video is not present or cannot be played
  1996. &quot;rdft&quot; is automatically selected.
  1997. </p>
  1998. <p>You can interactively cycle through the available show modes by
  1999. pressing the key &lt;w&gt;.
  2000. </p>
  2001. </dd>
  2002. <dt>&lsquo;<samp>-vf <var>filtergraph</var></samp>&rsquo;</dt>
  2003. <dd><p>Create the filtergraph specified by <var>filtergraph</var> and use it to
  2004. filter the video stream.
  2005. </p>
  2006. <p><var>filtergraph</var> is a description of the filtergraph to apply to
  2007. the stream, and must have a single video input and a single video
  2008. output. In the filtergraph, the input is associated to the label
  2009. <code>in</code>, and the output to the label <code>out</code>. See the
  2010. ffmpeg-filters manual for more information about the filtergraph
  2011. syntax.
  2012. </p>
  2013. <p>You can specify this parameter multiple times and cycle through the specified
  2014. filtergraphs along with the show modes by pressing the key &lt;w&gt;.
  2015. </p>
  2016. </dd>
  2017. <dt>&lsquo;<samp>-af <var>filtergraph</var></samp>&rsquo;</dt>
  2018. <dd><p><var>filtergraph</var> is a description of the filtergraph to apply to
  2019. the input audio.
  2020. Use the option &quot;-filters&quot; to show all the available filters (including
  2021. sources and sinks).
  2022. </p>
  2023. </dd>
  2024. <dt>&lsquo;<samp>-i <var>input_url</var></samp>&rsquo;</dt>
  2025. <dd><p>Read <var>input_url</var>.
  2026. </p></dd>
  2027. </dl>
  2028. <a name="Advanced-options"></a>
  2029. <h2 class="section"><a href="ffplay-all.html#toc-Advanced-options">3.5 Advanced options</a></h2>
  2030. <dl compact="compact">
  2031. <dt>&lsquo;<samp>-pix_fmt <var>format</var></samp>&rsquo;</dt>
  2032. <dd><p>Set pixel format.
  2033. This option has been deprecated in favor of private options, try -pixel_format.
  2034. </p>
  2035. </dd>
  2036. <dt>&lsquo;<samp>-stats</samp>&rsquo;</dt>
  2037. <dd><p>Print several playback statistics, in particular show the stream
  2038. duration, the codec parameters, the current position in the stream and
  2039. the audio/video synchronisation drift. It is on by default, to
  2040. explicitly disable it you need to specify <code>-nostats</code>.
  2041. </p>
  2042. </dd>
  2043. <dt>&lsquo;<samp>-fast</samp>&rsquo;</dt>
  2044. <dd><p>Non-spec-compliant optimizations.
  2045. </p></dd>
  2046. <dt>&lsquo;<samp>-genpts</samp>&rsquo;</dt>
  2047. <dd><p>Generate pts.
  2048. </p></dd>
  2049. <dt>&lsquo;<samp>-sync <var>type</var></samp>&rsquo;</dt>
  2050. <dd><p>Set the master clock to audio (<code>type=audio</code>), video
  2051. (<code>type=video</code>) or external (<code>type=ext</code>). Default is audio. The
  2052. master clock is used to control audio-video synchronization. Most media
  2053. players use audio as master clock, but in some cases (streaming or high
  2054. quality broadcast) it is necessary to change that. This option is mainly
  2055. used for debugging purposes.
  2056. </p></dd>
  2057. <dt>&lsquo;<samp>-ast <var>audio_stream_specifier</var></samp>&rsquo;</dt>
  2058. <dd><p>Select the desired audio stream using the given stream specifier. The stream
  2059. specifiers are described in the <a href="#Stream-specifiers">Stream specifiers</a> chapter. If this option
  2060. is not specified, the &quot;best&quot; audio stream is selected in the program of the
  2061. already selected video stream.
  2062. </p></dd>
  2063. <dt>&lsquo;<samp>-vst <var>video_stream_specifier</var></samp>&rsquo;</dt>
  2064. <dd><p>Select the desired video stream using the given stream specifier. The stream
  2065. specifiers are described in the <a href="#Stream-specifiers">Stream specifiers</a> chapter. If this option
  2066. is not specified, the &quot;best&quot; video stream is selected.
  2067. </p></dd>
  2068. <dt>&lsquo;<samp>-sst <var>subtitle_stream_specifier</var></samp>&rsquo;</dt>
  2069. <dd><p>Select the desired subtitle stream using the given stream specifier. The stream
  2070. specifiers are described in the <a href="#Stream-specifiers">Stream specifiers</a> chapter. If this option
  2071. is not specified, the &quot;best&quot; subtitle stream is selected in the program of the
  2072. already selected video or audio stream.
  2073. </p></dd>
  2074. <dt>&lsquo;<samp>-autoexit</samp>&rsquo;</dt>
  2075. <dd><p>Exit when video is done playing.
  2076. </p></dd>
  2077. <dt>&lsquo;<samp>-exitonkeydown</samp>&rsquo;</dt>
  2078. <dd><p>Exit if any key is pressed.
  2079. </p></dd>
  2080. <dt>&lsquo;<samp>-exitonmousedown</samp>&rsquo;</dt>
  2081. <dd><p>Exit if any mouse button is pressed.
  2082. </p>
  2083. </dd>
  2084. <dt>&lsquo;<samp>-codec:<var>media_specifier</var> <var>codec_name</var></samp>&rsquo;</dt>
  2085. <dd><p>Force a specific decoder implementation for the stream identified by
  2086. <var>media_specifier</var>, which can assume the values <code>a</code> (audio),
  2087. <code>v</code> (video), and <code>s</code> subtitle.
  2088. </p>
  2089. </dd>
  2090. <dt>&lsquo;<samp>-acodec <var>codec_name</var></samp>&rsquo;</dt>
  2091. <dd><p>Force a specific audio decoder.
  2092. </p>
  2093. </dd>
  2094. <dt>&lsquo;<samp>-vcodec <var>codec_name</var></samp>&rsquo;</dt>
  2095. <dd><p>Force a specific video decoder.
  2096. </p>
  2097. </dd>
  2098. <dt>&lsquo;<samp>-scodec <var>codec_name</var></samp>&rsquo;</dt>
  2099. <dd><p>Force a specific subtitle decoder.
  2100. </p>
  2101. </dd>
  2102. <dt>&lsquo;<samp>-autorotate</samp>&rsquo;</dt>
  2103. <dd><p>Automatically rotate the video according to file metadata. Enabled by
  2104. default, use &lsquo;<samp>-noautorotate</samp>&rsquo; to disable it.
  2105. </p>
  2106. </dd>
  2107. <dt>&lsquo;<samp>-framedrop</samp>&rsquo;</dt>
  2108. <dd><p>Drop video frames if video is out of sync. Enabled by default if the master
  2109. clock is not set to video. Use this option to enable frame dropping for all
  2110. master clock sources, use &lsquo;<samp>-noframedrop</samp>&rsquo; to disable it.
  2111. </p>
  2112. </dd>
  2113. <dt>&lsquo;<samp>-infbuf</samp>&rsquo;</dt>
  2114. <dd><p>Do not limit the input buffer size, read as much data as possible from the
  2115. input as soon as possible. Enabled by default for realtime streams, where data
  2116. may be dropped if not read in time. Use this option to enable infinite buffers
  2117. for all inputs, use &lsquo;<samp>-noinfbuf</samp>&rsquo; to disable it.
  2118. </p>
  2119. </dd>
  2120. <dt>&lsquo;<samp>-filter_threads <var>nb_threads</var></samp>&rsquo;</dt>
  2121. <dd><p>Defines how many threads are used to process a filter pipeline. Each pipeline
  2122. will produce a thread pool with this many threads available for parallel
  2123. processing. The default is 0 which means that the thread count will be
  2124. determined by the number of available CPUs.
  2125. </p>
  2126. </dd>
  2127. </dl>
  2128. <a name="While-playing"></a>
  2129. <h2 class="section"><a href="ffplay-all.html#toc-While-playing">3.6 While playing</a></h2>
  2130. <dl compact="compact">
  2131. <dt>&lt;q, ESC&gt;</dt>
  2132. <dd><p>Quit.
  2133. </p>
  2134. </dd>
  2135. <dt>&lt;f&gt;</dt>
  2136. <dd><p>Toggle full screen.
  2137. </p>
  2138. </dd>
  2139. <dt>&lt;p, SPC&gt;</dt>
  2140. <dd><p>Pause.
  2141. </p>
  2142. </dd>
  2143. <dt>&lt;m&gt;</dt>
  2144. <dd><p>Toggle mute.
  2145. </p>
  2146. </dd>
  2147. <dt>&lt;9, 0&gt;</dt>
  2148. <dd><p>Decrease and increase volume respectively.
  2149. </p>
  2150. </dd>
  2151. <dt>&lt;/, *&gt;</dt>
  2152. <dd><p>Decrease and increase volume respectively.
  2153. </p>
  2154. </dd>
  2155. <dt>&lt;a&gt;</dt>
  2156. <dd><p>Cycle audio channel in the current program.
  2157. </p>
  2158. </dd>
  2159. <dt>&lt;v&gt;</dt>
  2160. <dd><p>Cycle video channel.
  2161. </p>
  2162. </dd>
  2163. <dt>&lt;t&gt;</dt>
  2164. <dd><p>Cycle subtitle channel in the current program.
  2165. </p>
  2166. </dd>
  2167. <dt>&lt;c&gt;</dt>
  2168. <dd><p>Cycle program.
  2169. </p>
  2170. </dd>
  2171. <dt>&lt;w&gt;</dt>
  2172. <dd><p>Cycle video filters or show modes.
  2173. </p>
  2174. </dd>
  2175. <dt>&lt;s&gt;</dt>
  2176. <dd><p>Step to the next frame.
  2177. </p>
  2178. <p>Pause if the stream is not already paused, step to the next video
  2179. frame, and pause.
  2180. </p>
  2181. </dd>
  2182. <dt>&lt;left/right&gt;</dt>
  2183. <dd><p>Seek backward/forward 10 seconds.
  2184. </p>
  2185. </dd>
  2186. <dt>&lt;down/up&gt;</dt>
  2187. <dd><p>Seek backward/forward 1 minute.
  2188. </p>
  2189. </dd>
  2190. <dt>&lt;page down/page up&gt;</dt>
  2191. <dd><p>Seek to the previous/next chapter.
  2192. or if there are no chapters
  2193. Seek backward/forward 10 minutes.
  2194. </p>
  2195. </dd>
  2196. <dt>&lt;right mouse click&gt;</dt>
  2197. <dd><p>Seek to percentage in file corresponding to fraction of width.
  2198. </p>
  2199. </dd>
  2200. <dt>&lt;left mouse double-click&gt;</dt>
  2201. <dd><p>Toggle full screen.
  2202. </p>
  2203. </dd>
  2204. </dl>
  2205. <a name="Syntax-1"></a>
  2206. <h1 class="chapter"><a href="ffplay-all.html#toc-Syntax-1">4 Syntax</a></h1>
  2207. <p>This section documents the syntax and formats employed by the FFmpeg
  2208. libraries and tools.
  2209. </p>
  2210. <p><a name="quoting_005fand_005fescaping"></a>
  2211. </p><a name="Quoting-and-escaping"></a>
  2212. <h2 class="section"><a href="ffplay-all.html#toc-Quoting-and-escaping">4.1 Quoting and escaping</a></h2>
  2213. <p>FFmpeg adopts the following quoting and escaping mechanism, unless
  2214. explicitly specified. The following rules are applied:
  2215. </p>
  2216. <ul>
  2217. <li>
  2218. &lsquo;<samp>'</samp>&rsquo; and &lsquo;<samp>\</samp>&rsquo; are special characters (respectively used for
  2219. quoting and escaping). In addition to them, there might be other
  2220. special characters depending on the specific syntax where the escaping
  2221. and quoting are employed.
  2222. </li><li>
  2223. A special character is escaped by prefixing it with a &lsquo;<samp>\</samp>&rsquo;.
  2224. </li><li>
  2225. All characters enclosed between &lsquo;<samp>''</samp>&rsquo; are included literally in the
  2226. parsed string. The quote character &lsquo;<samp>'</samp>&rsquo; itself cannot be quoted,
  2227. so you may need to close the quote and escape it.
  2228. </li><li>
  2229. Leading and trailing whitespaces, unless escaped or quoted, are
  2230. removed from the parsed string.
  2231. </li></ul>
  2232. <p>Note that you may need to add a second level of escaping when using
  2233. the command line or a script, which depends on the syntax of the
  2234. adopted shell language.
  2235. </p>
  2236. <p>The function <code>av_get_token</code> defined in
  2237. &lsquo;<tt>libavutil/avstring.h</tt>&rsquo; can be used to parse a token quoted or
  2238. escaped according to the rules defined above.
  2239. </p>
  2240. <p>The tool &lsquo;<tt>tools/ffescape</tt>&rsquo; in the FFmpeg source tree can be used
  2241. to automatically quote or escape a string in a script.
  2242. </p>
  2243. <a name="Examples-142"></a>
  2244. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-142">4.1.1 Examples</a></h3>
  2245. <ul>
  2246. <li>
  2247. Escape the string <code>Crime d'Amour</code> containing the <code>'</code> special
  2248. character:
  2249. <div class="example">
  2250. <pre class="example">Crime d\'Amour
  2251. </pre></div>
  2252. </li><li>
  2253. The string above contains a quote, so the <code>'</code> needs to be escaped
  2254. when quoting it:
  2255. <div class="example">
  2256. <pre class="example">'Crime d'\''Amour'
  2257. </pre></div>
  2258. </li><li>
  2259. Include leading or trailing whitespaces using quoting:
  2260. <div class="example">
  2261. <pre class="example">' this string starts and ends with whitespaces '
  2262. </pre></div>
  2263. </li><li>
  2264. Escaping and quoting can be mixed together:
  2265. <div class="example">
  2266. <pre class="example">' The string '\'string\'' is a string '
  2267. </pre></div>
  2268. </li><li>
  2269. To include a literal &lsquo;<samp>\</samp>&rsquo; you can use either escaping or quoting:
  2270. <div class="example">
  2271. <pre class="example">'c:\foo' can be written as c:\\foo
  2272. </pre></div>
  2273. </li></ul>
  2274. <p><a name="date-syntax"></a>
  2275. </p><a name="Date"></a>
  2276. <h2 class="section"><a href="ffplay-all.html#toc-Date">4.2 Date</a></h2>
  2277. <p>The accepted syntax is:
  2278. </p><div class="example">
  2279. <pre class="example">[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
  2280. now
  2281. </pre></div>
  2282. <p>If the value is &quot;now&quot; it takes the current time.
  2283. </p>
  2284. <p>Time is local time unless Z is appended, in which case it is
  2285. interpreted as UTC.
  2286. If the year-month-day part is not specified it takes the current
  2287. year-month-day.
  2288. </p>
  2289. <p><a name="time-duration-syntax"></a>
  2290. </p><a name="Time-duration"></a>
  2291. <h2 class="section"><a href="ffplay-all.html#toc-Time-duration">4.3 Time duration</a></h2>
  2292. <p>There are two accepted syntaxes for expressing time duration.
  2293. </p>
  2294. <div class="example">
  2295. <pre class="example">[-][<var>HH</var>:]<var>MM</var>:<var>SS</var>[.<var>m</var>...]
  2296. </pre></div>
  2297. <p><var>HH</var> expresses the number of hours, <var>MM</var> the number of minutes
  2298. for a maximum of 2 digits, and <var>SS</var> the number of seconds for a
  2299. maximum of 2 digits. The <var>m</var> at the end expresses decimal value for
  2300. <var>SS</var>.
  2301. </p>
  2302. <p><em>or</em>
  2303. </p>
  2304. <div class="example">
  2305. <pre class="example">[-]<var>S</var>+[.<var>m</var>...]
  2306. </pre></div>
  2307. <p><var>S</var> expresses the number of seconds, with the optional decimal part
  2308. <var>m</var>.
  2309. </p>
  2310. <p>In both expressions, the optional &lsquo;<samp>-</samp>&rsquo; indicates negative duration.
  2311. </p>
  2312. <a name="Examples-19"></a>
  2313. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-19">4.3.1 Examples</a></h3>
  2314. <p>The following examples are all valid time duration:
  2315. </p>
  2316. <dl compact="compact">
  2317. <dt>&lsquo;<samp>55</samp>&rsquo;</dt>
  2318. <dd><p>55 seconds
  2319. </p>
  2320. </dd>
  2321. <dt>&lsquo;<samp>12:03:45</samp>&rsquo;</dt>
  2322. <dd><p>12 hours, 03 minutes and 45 seconds
  2323. </p>
  2324. </dd>
  2325. <dt>&lsquo;<samp>23.189</samp>&rsquo;</dt>
  2326. <dd><p>23.189 seconds
  2327. </p></dd>
  2328. </dl>
  2329. <p><a name="video-size-syntax"></a>
  2330. </p><a name="Video-size"></a>
  2331. <h2 class="section"><a href="ffplay-all.html#toc-Video-size">4.4 Video size</a></h2>
  2332. <p>Specify the size of the sourced video, it may be a string of the form
  2333. <var>width</var>x<var>height</var>, or the name of a size abbreviation.
  2334. </p>
  2335. <p>The following abbreviations are recognized:
  2336. </p><dl compact="compact">
  2337. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  2338. <dd><p>720x480
  2339. </p></dd>
  2340. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  2341. <dd><p>720x576
  2342. </p></dd>
  2343. <dt>&lsquo;<samp>qntsc</samp>&rsquo;</dt>
  2344. <dd><p>352x240
  2345. </p></dd>
  2346. <dt>&lsquo;<samp>qpal</samp>&rsquo;</dt>
  2347. <dd><p>352x288
  2348. </p></dd>
  2349. <dt>&lsquo;<samp>sntsc</samp>&rsquo;</dt>
  2350. <dd><p>640x480
  2351. </p></dd>
  2352. <dt>&lsquo;<samp>spal</samp>&rsquo;</dt>
  2353. <dd><p>768x576
  2354. </p></dd>
  2355. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  2356. <dd><p>352x240
  2357. </p></dd>
  2358. <dt>&lsquo;<samp>ntsc-film</samp>&rsquo;</dt>
  2359. <dd><p>352x240
  2360. </p></dd>
  2361. <dt>&lsquo;<samp>sqcif</samp>&rsquo;</dt>
  2362. <dd><p>128x96
  2363. </p></dd>
  2364. <dt>&lsquo;<samp>qcif</samp>&rsquo;</dt>
  2365. <dd><p>176x144
  2366. </p></dd>
  2367. <dt>&lsquo;<samp>cif</samp>&rsquo;</dt>
  2368. <dd><p>352x288
  2369. </p></dd>
  2370. <dt>&lsquo;<samp>4cif</samp>&rsquo;</dt>
  2371. <dd><p>704x576
  2372. </p></dd>
  2373. <dt>&lsquo;<samp>16cif</samp>&rsquo;</dt>
  2374. <dd><p>1408x1152
  2375. </p></dd>
  2376. <dt>&lsquo;<samp>qqvga</samp>&rsquo;</dt>
  2377. <dd><p>160x120
  2378. </p></dd>
  2379. <dt>&lsquo;<samp>qvga</samp>&rsquo;</dt>
  2380. <dd><p>320x240
  2381. </p></dd>
  2382. <dt>&lsquo;<samp>vga</samp>&rsquo;</dt>
  2383. <dd><p>640x480
  2384. </p></dd>
  2385. <dt>&lsquo;<samp>svga</samp>&rsquo;</dt>
  2386. <dd><p>800x600
  2387. </p></dd>
  2388. <dt>&lsquo;<samp>xga</samp>&rsquo;</dt>
  2389. <dd><p>1024x768
  2390. </p></dd>
  2391. <dt>&lsquo;<samp>uxga</samp>&rsquo;</dt>
  2392. <dd><p>1600x1200
  2393. </p></dd>
  2394. <dt>&lsquo;<samp>qxga</samp>&rsquo;</dt>
  2395. <dd><p>2048x1536
  2396. </p></dd>
  2397. <dt>&lsquo;<samp>sxga</samp>&rsquo;</dt>
  2398. <dd><p>1280x1024
  2399. </p></dd>
  2400. <dt>&lsquo;<samp>qsxga</samp>&rsquo;</dt>
  2401. <dd><p>2560x2048
  2402. </p></dd>
  2403. <dt>&lsquo;<samp>hsxga</samp>&rsquo;</dt>
  2404. <dd><p>5120x4096
  2405. </p></dd>
  2406. <dt>&lsquo;<samp>wvga</samp>&rsquo;</dt>
  2407. <dd><p>852x480
  2408. </p></dd>
  2409. <dt>&lsquo;<samp>wxga</samp>&rsquo;</dt>
  2410. <dd><p>1366x768
  2411. </p></dd>
  2412. <dt>&lsquo;<samp>wsxga</samp>&rsquo;</dt>
  2413. <dd><p>1600x1024
  2414. </p></dd>
  2415. <dt>&lsquo;<samp>wuxga</samp>&rsquo;</dt>
  2416. <dd><p>1920x1200
  2417. </p></dd>
  2418. <dt>&lsquo;<samp>woxga</samp>&rsquo;</dt>
  2419. <dd><p>2560x1600
  2420. </p></dd>
  2421. <dt>&lsquo;<samp>wqsxga</samp>&rsquo;</dt>
  2422. <dd><p>3200x2048
  2423. </p></dd>
  2424. <dt>&lsquo;<samp>wquxga</samp>&rsquo;</dt>
  2425. <dd><p>3840x2400
  2426. </p></dd>
  2427. <dt>&lsquo;<samp>whsxga</samp>&rsquo;</dt>
  2428. <dd><p>6400x4096
  2429. </p></dd>
  2430. <dt>&lsquo;<samp>whuxga</samp>&rsquo;</dt>
  2431. <dd><p>7680x4800
  2432. </p></dd>
  2433. <dt>&lsquo;<samp>cga</samp>&rsquo;</dt>
  2434. <dd><p>320x200
  2435. </p></dd>
  2436. <dt>&lsquo;<samp>ega</samp>&rsquo;</dt>
  2437. <dd><p>640x350
  2438. </p></dd>
  2439. <dt>&lsquo;<samp>hd480</samp>&rsquo;</dt>
  2440. <dd><p>852x480
  2441. </p></dd>
  2442. <dt>&lsquo;<samp>hd720</samp>&rsquo;</dt>
  2443. <dd><p>1280x720
  2444. </p></dd>
  2445. <dt>&lsquo;<samp>hd1080</samp>&rsquo;</dt>
  2446. <dd><p>1920x1080
  2447. </p></dd>
  2448. <dt>&lsquo;<samp>2k</samp>&rsquo;</dt>
  2449. <dd><p>2048x1080
  2450. </p></dd>
  2451. <dt>&lsquo;<samp>2kflat</samp>&rsquo;</dt>
  2452. <dd><p>1998x1080
  2453. </p></dd>
  2454. <dt>&lsquo;<samp>2kscope</samp>&rsquo;</dt>
  2455. <dd><p>2048x858
  2456. </p></dd>
  2457. <dt>&lsquo;<samp>4k</samp>&rsquo;</dt>
  2458. <dd><p>4096x2160
  2459. </p></dd>
  2460. <dt>&lsquo;<samp>4kflat</samp>&rsquo;</dt>
  2461. <dd><p>3996x2160
  2462. </p></dd>
  2463. <dt>&lsquo;<samp>4kscope</samp>&rsquo;</dt>
  2464. <dd><p>4096x1716
  2465. </p></dd>
  2466. <dt>&lsquo;<samp>nhd</samp>&rsquo;</dt>
  2467. <dd><p>640x360
  2468. </p></dd>
  2469. <dt>&lsquo;<samp>hqvga</samp>&rsquo;</dt>
  2470. <dd><p>240x160
  2471. </p></dd>
  2472. <dt>&lsquo;<samp>wqvga</samp>&rsquo;</dt>
  2473. <dd><p>400x240
  2474. </p></dd>
  2475. <dt>&lsquo;<samp>fwqvga</samp>&rsquo;</dt>
  2476. <dd><p>432x240
  2477. </p></dd>
  2478. <dt>&lsquo;<samp>hvga</samp>&rsquo;</dt>
  2479. <dd><p>480x320
  2480. </p></dd>
  2481. <dt>&lsquo;<samp>qhd</samp>&rsquo;</dt>
  2482. <dd><p>960x540
  2483. </p></dd>
  2484. <dt>&lsquo;<samp>2kdci</samp>&rsquo;</dt>
  2485. <dd><p>2048x1080
  2486. </p></dd>
  2487. <dt>&lsquo;<samp>4kdci</samp>&rsquo;</dt>
  2488. <dd><p>4096x2160
  2489. </p></dd>
  2490. <dt>&lsquo;<samp>uhd2160</samp>&rsquo;</dt>
  2491. <dd><p>3840x2160
  2492. </p></dd>
  2493. <dt>&lsquo;<samp>uhd4320</samp>&rsquo;</dt>
  2494. <dd><p>7680x4320
  2495. </p></dd>
  2496. </dl>
  2497. <p><a name="video-rate-syntax"></a>
  2498. </p><a name="Video-rate"></a>
  2499. <h2 class="section"><a href="ffplay-all.html#toc-Video-rate">4.5 Video rate</a></h2>
  2500. <p>Specify the frame rate of a video, expressed as the number of frames
  2501. generated per second. It has to be a string in the format
  2502. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
  2503. number or a valid video frame rate abbreviation.
  2504. </p>
  2505. <p>The following abbreviations are recognized:
  2506. </p><dl compact="compact">
  2507. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  2508. <dd><p>30000/1001
  2509. </p></dd>
  2510. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  2511. <dd><p>25/1
  2512. </p></dd>
  2513. <dt>&lsquo;<samp>qntsc</samp>&rsquo;</dt>
  2514. <dd><p>30000/1001
  2515. </p></dd>
  2516. <dt>&lsquo;<samp>qpal</samp>&rsquo;</dt>
  2517. <dd><p>25/1
  2518. </p></dd>
  2519. <dt>&lsquo;<samp>sntsc</samp>&rsquo;</dt>
  2520. <dd><p>30000/1001
  2521. </p></dd>
  2522. <dt>&lsquo;<samp>spal</samp>&rsquo;</dt>
  2523. <dd><p>25/1
  2524. </p></dd>
  2525. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  2526. <dd><p>24/1
  2527. </p></dd>
  2528. <dt>&lsquo;<samp>ntsc-film</samp>&rsquo;</dt>
  2529. <dd><p>24000/1001
  2530. </p></dd>
  2531. </dl>
  2532. <p><a name="ratio-syntax"></a>
  2533. </p><a name="Ratio"></a>
  2534. <h2 class="section"><a href="ffplay-all.html#toc-Ratio">4.6 Ratio</a></h2>
  2535. <p>A ratio can be expressed as an expression, or in the form
  2536. <var>numerator</var>:<var>denominator</var>.
  2537. </p>
  2538. <p>Note that a ratio with infinite (1/0) or negative value is
  2539. considered valid, so you should check on the returned value if you
  2540. want to exclude those values.
  2541. </p>
  2542. <p>The undefined value can be expressed using the &quot;0:0&quot; string.
  2543. </p>
  2544. <p><a name="color-syntax"></a>
  2545. </p><a name="Color"></a>
  2546. <h2 class="section"><a href="ffplay-all.html#toc-Color">4.7 Color</a></h2>
  2547. <p>It can be the name of a color as defined below (case insensitive match) or a
  2548. <code>[0x|#]RRGGBB[AA]</code> sequence, possibly followed by @ and a string
  2549. representing the alpha component.
  2550. </p>
  2551. <p>The alpha component may be a string composed by &quot;0x&quot; followed by an
  2552. hexadecimal number or a decimal number between 0.0 and 1.0, which
  2553. represents the opacity value (&lsquo;<samp>0x00</samp>&rsquo; or &lsquo;<samp>0.0</samp>&rsquo; means completely
  2554. transparent, &lsquo;<samp>0xff</samp>&rsquo; or &lsquo;<samp>1.0</samp>&rsquo; completely opaque). If the alpha
  2555. component is not specified then &lsquo;<samp>0xff</samp>&rsquo; is assumed.
  2556. </p>
  2557. <p>The string &lsquo;<samp>random</samp>&rsquo; will result in a random color.
  2558. </p>
  2559. <p>The following names of colors are recognized:
  2560. </p><dl compact="compact">
  2561. <dt>&lsquo;<samp>AliceBlue</samp>&rsquo;</dt>
  2562. <dd><p>0xF0F8FF
  2563. </p></dd>
  2564. <dt>&lsquo;<samp>AntiqueWhite</samp>&rsquo;</dt>
  2565. <dd><p>0xFAEBD7
  2566. </p></dd>
  2567. <dt>&lsquo;<samp>Aqua</samp>&rsquo;</dt>
  2568. <dd><p>0x00FFFF
  2569. </p></dd>
  2570. <dt>&lsquo;<samp>Aquamarine</samp>&rsquo;</dt>
  2571. <dd><p>0x7FFFD4
  2572. </p></dd>
  2573. <dt>&lsquo;<samp>Azure</samp>&rsquo;</dt>
  2574. <dd><p>0xF0FFFF
  2575. </p></dd>
  2576. <dt>&lsquo;<samp>Beige</samp>&rsquo;</dt>
  2577. <dd><p>0xF5F5DC
  2578. </p></dd>
  2579. <dt>&lsquo;<samp>Bisque</samp>&rsquo;</dt>
  2580. <dd><p>0xFFE4C4
  2581. </p></dd>
  2582. <dt>&lsquo;<samp>Black</samp>&rsquo;</dt>
  2583. <dd><p>0x000000
  2584. </p></dd>
  2585. <dt>&lsquo;<samp>BlanchedAlmond</samp>&rsquo;</dt>
  2586. <dd><p>0xFFEBCD
  2587. </p></dd>
  2588. <dt>&lsquo;<samp>Blue</samp>&rsquo;</dt>
  2589. <dd><p>0x0000FF
  2590. </p></dd>
  2591. <dt>&lsquo;<samp>BlueViolet</samp>&rsquo;</dt>
  2592. <dd><p>0x8A2BE2
  2593. </p></dd>
  2594. <dt>&lsquo;<samp>Brown</samp>&rsquo;</dt>
  2595. <dd><p>0xA52A2A
  2596. </p></dd>
  2597. <dt>&lsquo;<samp>BurlyWood</samp>&rsquo;</dt>
  2598. <dd><p>0xDEB887
  2599. </p></dd>
  2600. <dt>&lsquo;<samp>CadetBlue</samp>&rsquo;</dt>
  2601. <dd><p>0x5F9EA0
  2602. </p></dd>
  2603. <dt>&lsquo;<samp>Chartreuse</samp>&rsquo;</dt>
  2604. <dd><p>0x7FFF00
  2605. </p></dd>
  2606. <dt>&lsquo;<samp>Chocolate</samp>&rsquo;</dt>
  2607. <dd><p>0xD2691E
  2608. </p></dd>
  2609. <dt>&lsquo;<samp>Coral</samp>&rsquo;</dt>
  2610. <dd><p>0xFF7F50
  2611. </p></dd>
  2612. <dt>&lsquo;<samp>CornflowerBlue</samp>&rsquo;</dt>
  2613. <dd><p>0x6495ED
  2614. </p></dd>
  2615. <dt>&lsquo;<samp>Cornsilk</samp>&rsquo;</dt>
  2616. <dd><p>0xFFF8DC
  2617. </p></dd>
  2618. <dt>&lsquo;<samp>Crimson</samp>&rsquo;</dt>
  2619. <dd><p>0xDC143C
  2620. </p></dd>
  2621. <dt>&lsquo;<samp>Cyan</samp>&rsquo;</dt>
  2622. <dd><p>0x00FFFF
  2623. </p></dd>
  2624. <dt>&lsquo;<samp>DarkBlue</samp>&rsquo;</dt>
  2625. <dd><p>0x00008B
  2626. </p></dd>
  2627. <dt>&lsquo;<samp>DarkCyan</samp>&rsquo;</dt>
  2628. <dd><p>0x008B8B
  2629. </p></dd>
  2630. <dt>&lsquo;<samp>DarkGoldenRod</samp>&rsquo;</dt>
  2631. <dd><p>0xB8860B
  2632. </p></dd>
  2633. <dt>&lsquo;<samp>DarkGray</samp>&rsquo;</dt>
  2634. <dd><p>0xA9A9A9
  2635. </p></dd>
  2636. <dt>&lsquo;<samp>DarkGreen</samp>&rsquo;</dt>
  2637. <dd><p>0x006400
  2638. </p></dd>
  2639. <dt>&lsquo;<samp>DarkKhaki</samp>&rsquo;</dt>
  2640. <dd><p>0xBDB76B
  2641. </p></dd>
  2642. <dt>&lsquo;<samp>DarkMagenta</samp>&rsquo;</dt>
  2643. <dd><p>0x8B008B
  2644. </p></dd>
  2645. <dt>&lsquo;<samp>DarkOliveGreen</samp>&rsquo;</dt>
  2646. <dd><p>0x556B2F
  2647. </p></dd>
  2648. <dt>&lsquo;<samp>Darkorange</samp>&rsquo;</dt>
  2649. <dd><p>0xFF8C00
  2650. </p></dd>
  2651. <dt>&lsquo;<samp>DarkOrchid</samp>&rsquo;</dt>
  2652. <dd><p>0x9932CC
  2653. </p></dd>
  2654. <dt>&lsquo;<samp>DarkRed</samp>&rsquo;</dt>
  2655. <dd><p>0x8B0000
  2656. </p></dd>
  2657. <dt>&lsquo;<samp>DarkSalmon</samp>&rsquo;</dt>
  2658. <dd><p>0xE9967A
  2659. </p></dd>
  2660. <dt>&lsquo;<samp>DarkSeaGreen</samp>&rsquo;</dt>
  2661. <dd><p>0x8FBC8F
  2662. </p></dd>
  2663. <dt>&lsquo;<samp>DarkSlateBlue</samp>&rsquo;</dt>
  2664. <dd><p>0x483D8B
  2665. </p></dd>
  2666. <dt>&lsquo;<samp>DarkSlateGray</samp>&rsquo;</dt>
  2667. <dd><p>0x2F4F4F
  2668. </p></dd>
  2669. <dt>&lsquo;<samp>DarkTurquoise</samp>&rsquo;</dt>
  2670. <dd><p>0x00CED1
  2671. </p></dd>
  2672. <dt>&lsquo;<samp>DarkViolet</samp>&rsquo;</dt>
  2673. <dd><p>0x9400D3
  2674. </p></dd>
  2675. <dt>&lsquo;<samp>DeepPink</samp>&rsquo;</dt>
  2676. <dd><p>0xFF1493
  2677. </p></dd>
  2678. <dt>&lsquo;<samp>DeepSkyBlue</samp>&rsquo;</dt>
  2679. <dd><p>0x00BFFF
  2680. </p></dd>
  2681. <dt>&lsquo;<samp>DimGray</samp>&rsquo;</dt>
  2682. <dd><p>0x696969
  2683. </p></dd>
  2684. <dt>&lsquo;<samp>DodgerBlue</samp>&rsquo;</dt>
  2685. <dd><p>0x1E90FF
  2686. </p></dd>
  2687. <dt>&lsquo;<samp>FireBrick</samp>&rsquo;</dt>
  2688. <dd><p>0xB22222
  2689. </p></dd>
  2690. <dt>&lsquo;<samp>FloralWhite</samp>&rsquo;</dt>
  2691. <dd><p>0xFFFAF0
  2692. </p></dd>
  2693. <dt>&lsquo;<samp>ForestGreen</samp>&rsquo;</dt>
  2694. <dd><p>0x228B22
  2695. </p></dd>
  2696. <dt>&lsquo;<samp>Fuchsia</samp>&rsquo;</dt>
  2697. <dd><p>0xFF00FF
  2698. </p></dd>
  2699. <dt>&lsquo;<samp>Gainsboro</samp>&rsquo;</dt>
  2700. <dd><p>0xDCDCDC
  2701. </p></dd>
  2702. <dt>&lsquo;<samp>GhostWhite</samp>&rsquo;</dt>
  2703. <dd><p>0xF8F8FF
  2704. </p></dd>
  2705. <dt>&lsquo;<samp>Gold</samp>&rsquo;</dt>
  2706. <dd><p>0xFFD700
  2707. </p></dd>
  2708. <dt>&lsquo;<samp>GoldenRod</samp>&rsquo;</dt>
  2709. <dd><p>0xDAA520
  2710. </p></dd>
  2711. <dt>&lsquo;<samp>Gray</samp>&rsquo;</dt>
  2712. <dd><p>0x808080
  2713. </p></dd>
  2714. <dt>&lsquo;<samp>Green</samp>&rsquo;</dt>
  2715. <dd><p>0x008000
  2716. </p></dd>
  2717. <dt>&lsquo;<samp>GreenYellow</samp>&rsquo;</dt>
  2718. <dd><p>0xADFF2F
  2719. </p></dd>
  2720. <dt>&lsquo;<samp>HoneyDew</samp>&rsquo;</dt>
  2721. <dd><p>0xF0FFF0
  2722. </p></dd>
  2723. <dt>&lsquo;<samp>HotPink</samp>&rsquo;</dt>
  2724. <dd><p>0xFF69B4
  2725. </p></dd>
  2726. <dt>&lsquo;<samp>IndianRed</samp>&rsquo;</dt>
  2727. <dd><p>0xCD5C5C
  2728. </p></dd>
  2729. <dt>&lsquo;<samp>Indigo</samp>&rsquo;</dt>
  2730. <dd><p>0x4B0082
  2731. </p></dd>
  2732. <dt>&lsquo;<samp>Ivory</samp>&rsquo;</dt>
  2733. <dd><p>0xFFFFF0
  2734. </p></dd>
  2735. <dt>&lsquo;<samp>Khaki</samp>&rsquo;</dt>
  2736. <dd><p>0xF0E68C
  2737. </p></dd>
  2738. <dt>&lsquo;<samp>Lavender</samp>&rsquo;</dt>
  2739. <dd><p>0xE6E6FA
  2740. </p></dd>
  2741. <dt>&lsquo;<samp>LavenderBlush</samp>&rsquo;</dt>
  2742. <dd><p>0xFFF0F5
  2743. </p></dd>
  2744. <dt>&lsquo;<samp>LawnGreen</samp>&rsquo;</dt>
  2745. <dd><p>0x7CFC00
  2746. </p></dd>
  2747. <dt>&lsquo;<samp>LemonChiffon</samp>&rsquo;</dt>
  2748. <dd><p>0xFFFACD
  2749. </p></dd>
  2750. <dt>&lsquo;<samp>LightBlue</samp>&rsquo;</dt>
  2751. <dd><p>0xADD8E6
  2752. </p></dd>
  2753. <dt>&lsquo;<samp>LightCoral</samp>&rsquo;</dt>
  2754. <dd><p>0xF08080
  2755. </p></dd>
  2756. <dt>&lsquo;<samp>LightCyan</samp>&rsquo;</dt>
  2757. <dd><p>0xE0FFFF
  2758. </p></dd>
  2759. <dt>&lsquo;<samp>LightGoldenRodYellow</samp>&rsquo;</dt>
  2760. <dd><p>0xFAFAD2
  2761. </p></dd>
  2762. <dt>&lsquo;<samp>LightGreen</samp>&rsquo;</dt>
  2763. <dd><p>0x90EE90
  2764. </p></dd>
  2765. <dt>&lsquo;<samp>LightGrey</samp>&rsquo;</dt>
  2766. <dd><p>0xD3D3D3
  2767. </p></dd>
  2768. <dt>&lsquo;<samp>LightPink</samp>&rsquo;</dt>
  2769. <dd><p>0xFFB6C1
  2770. </p></dd>
  2771. <dt>&lsquo;<samp>LightSalmon</samp>&rsquo;</dt>
  2772. <dd><p>0xFFA07A
  2773. </p></dd>
  2774. <dt>&lsquo;<samp>LightSeaGreen</samp>&rsquo;</dt>
  2775. <dd><p>0x20B2AA
  2776. </p></dd>
  2777. <dt>&lsquo;<samp>LightSkyBlue</samp>&rsquo;</dt>
  2778. <dd><p>0x87CEFA
  2779. </p></dd>
  2780. <dt>&lsquo;<samp>LightSlateGray</samp>&rsquo;</dt>
  2781. <dd><p>0x778899
  2782. </p></dd>
  2783. <dt>&lsquo;<samp>LightSteelBlue</samp>&rsquo;</dt>
  2784. <dd><p>0xB0C4DE
  2785. </p></dd>
  2786. <dt>&lsquo;<samp>LightYellow</samp>&rsquo;</dt>
  2787. <dd><p>0xFFFFE0
  2788. </p></dd>
  2789. <dt>&lsquo;<samp>Lime</samp>&rsquo;</dt>
  2790. <dd><p>0x00FF00
  2791. </p></dd>
  2792. <dt>&lsquo;<samp>LimeGreen</samp>&rsquo;</dt>
  2793. <dd><p>0x32CD32
  2794. </p></dd>
  2795. <dt>&lsquo;<samp>Linen</samp>&rsquo;</dt>
  2796. <dd><p>0xFAF0E6
  2797. </p></dd>
  2798. <dt>&lsquo;<samp>Magenta</samp>&rsquo;</dt>
  2799. <dd><p>0xFF00FF
  2800. </p></dd>
  2801. <dt>&lsquo;<samp>Maroon</samp>&rsquo;</dt>
  2802. <dd><p>0x800000
  2803. </p></dd>
  2804. <dt>&lsquo;<samp>MediumAquaMarine</samp>&rsquo;</dt>
  2805. <dd><p>0x66CDAA
  2806. </p></dd>
  2807. <dt>&lsquo;<samp>MediumBlue</samp>&rsquo;</dt>
  2808. <dd><p>0x0000CD
  2809. </p></dd>
  2810. <dt>&lsquo;<samp>MediumOrchid</samp>&rsquo;</dt>
  2811. <dd><p>0xBA55D3
  2812. </p></dd>
  2813. <dt>&lsquo;<samp>MediumPurple</samp>&rsquo;</dt>
  2814. <dd><p>0x9370D8
  2815. </p></dd>
  2816. <dt>&lsquo;<samp>MediumSeaGreen</samp>&rsquo;</dt>
  2817. <dd><p>0x3CB371
  2818. </p></dd>
  2819. <dt>&lsquo;<samp>MediumSlateBlue</samp>&rsquo;</dt>
  2820. <dd><p>0x7B68EE
  2821. </p></dd>
  2822. <dt>&lsquo;<samp>MediumSpringGreen</samp>&rsquo;</dt>
  2823. <dd><p>0x00FA9A
  2824. </p></dd>
  2825. <dt>&lsquo;<samp>MediumTurquoise</samp>&rsquo;</dt>
  2826. <dd><p>0x48D1CC
  2827. </p></dd>
  2828. <dt>&lsquo;<samp>MediumVioletRed</samp>&rsquo;</dt>
  2829. <dd><p>0xC71585
  2830. </p></dd>
  2831. <dt>&lsquo;<samp>MidnightBlue</samp>&rsquo;</dt>
  2832. <dd><p>0x191970
  2833. </p></dd>
  2834. <dt>&lsquo;<samp>MintCream</samp>&rsquo;</dt>
  2835. <dd><p>0xF5FFFA
  2836. </p></dd>
  2837. <dt>&lsquo;<samp>MistyRose</samp>&rsquo;</dt>
  2838. <dd><p>0xFFE4E1
  2839. </p></dd>
  2840. <dt>&lsquo;<samp>Moccasin</samp>&rsquo;</dt>
  2841. <dd><p>0xFFE4B5
  2842. </p></dd>
  2843. <dt>&lsquo;<samp>NavajoWhite</samp>&rsquo;</dt>
  2844. <dd><p>0xFFDEAD
  2845. </p></dd>
  2846. <dt>&lsquo;<samp>Navy</samp>&rsquo;</dt>
  2847. <dd><p>0x000080
  2848. </p></dd>
  2849. <dt>&lsquo;<samp>OldLace</samp>&rsquo;</dt>
  2850. <dd><p>0xFDF5E6
  2851. </p></dd>
  2852. <dt>&lsquo;<samp>Olive</samp>&rsquo;</dt>
  2853. <dd><p>0x808000
  2854. </p></dd>
  2855. <dt>&lsquo;<samp>OliveDrab</samp>&rsquo;</dt>
  2856. <dd><p>0x6B8E23
  2857. </p></dd>
  2858. <dt>&lsquo;<samp>Orange</samp>&rsquo;</dt>
  2859. <dd><p>0xFFA500
  2860. </p></dd>
  2861. <dt>&lsquo;<samp>OrangeRed</samp>&rsquo;</dt>
  2862. <dd><p>0xFF4500
  2863. </p></dd>
  2864. <dt>&lsquo;<samp>Orchid</samp>&rsquo;</dt>
  2865. <dd><p>0xDA70D6
  2866. </p></dd>
  2867. <dt>&lsquo;<samp>PaleGoldenRod</samp>&rsquo;</dt>
  2868. <dd><p>0xEEE8AA
  2869. </p></dd>
  2870. <dt>&lsquo;<samp>PaleGreen</samp>&rsquo;</dt>
  2871. <dd><p>0x98FB98
  2872. </p></dd>
  2873. <dt>&lsquo;<samp>PaleTurquoise</samp>&rsquo;</dt>
  2874. <dd><p>0xAFEEEE
  2875. </p></dd>
  2876. <dt>&lsquo;<samp>PaleVioletRed</samp>&rsquo;</dt>
  2877. <dd><p>0xD87093
  2878. </p></dd>
  2879. <dt>&lsquo;<samp>PapayaWhip</samp>&rsquo;</dt>
  2880. <dd><p>0xFFEFD5
  2881. </p></dd>
  2882. <dt>&lsquo;<samp>PeachPuff</samp>&rsquo;</dt>
  2883. <dd><p>0xFFDAB9
  2884. </p></dd>
  2885. <dt>&lsquo;<samp>Peru</samp>&rsquo;</dt>
  2886. <dd><p>0xCD853F
  2887. </p></dd>
  2888. <dt>&lsquo;<samp>Pink</samp>&rsquo;</dt>
  2889. <dd><p>0xFFC0CB
  2890. </p></dd>
  2891. <dt>&lsquo;<samp>Plum</samp>&rsquo;</dt>
  2892. <dd><p>0xDDA0DD
  2893. </p></dd>
  2894. <dt>&lsquo;<samp>PowderBlue</samp>&rsquo;</dt>
  2895. <dd><p>0xB0E0E6
  2896. </p></dd>
  2897. <dt>&lsquo;<samp>Purple</samp>&rsquo;</dt>
  2898. <dd><p>0x800080
  2899. </p></dd>
  2900. <dt>&lsquo;<samp>Red</samp>&rsquo;</dt>
  2901. <dd><p>0xFF0000
  2902. </p></dd>
  2903. <dt>&lsquo;<samp>RosyBrown</samp>&rsquo;</dt>
  2904. <dd><p>0xBC8F8F
  2905. </p></dd>
  2906. <dt>&lsquo;<samp>RoyalBlue</samp>&rsquo;</dt>
  2907. <dd><p>0x4169E1
  2908. </p></dd>
  2909. <dt>&lsquo;<samp>SaddleBrown</samp>&rsquo;</dt>
  2910. <dd><p>0x8B4513
  2911. </p></dd>
  2912. <dt>&lsquo;<samp>Salmon</samp>&rsquo;</dt>
  2913. <dd><p>0xFA8072
  2914. </p></dd>
  2915. <dt>&lsquo;<samp>SandyBrown</samp>&rsquo;</dt>
  2916. <dd><p>0xF4A460
  2917. </p></dd>
  2918. <dt>&lsquo;<samp>SeaGreen</samp>&rsquo;</dt>
  2919. <dd><p>0x2E8B57
  2920. </p></dd>
  2921. <dt>&lsquo;<samp>SeaShell</samp>&rsquo;</dt>
  2922. <dd><p>0xFFF5EE
  2923. </p></dd>
  2924. <dt>&lsquo;<samp>Sienna</samp>&rsquo;</dt>
  2925. <dd><p>0xA0522D
  2926. </p></dd>
  2927. <dt>&lsquo;<samp>Silver</samp>&rsquo;</dt>
  2928. <dd><p>0xC0C0C0
  2929. </p></dd>
  2930. <dt>&lsquo;<samp>SkyBlue</samp>&rsquo;</dt>
  2931. <dd><p>0x87CEEB
  2932. </p></dd>
  2933. <dt>&lsquo;<samp>SlateBlue</samp>&rsquo;</dt>
  2934. <dd><p>0x6A5ACD
  2935. </p></dd>
  2936. <dt>&lsquo;<samp>SlateGray</samp>&rsquo;</dt>
  2937. <dd><p>0x708090
  2938. </p></dd>
  2939. <dt>&lsquo;<samp>Snow</samp>&rsquo;</dt>
  2940. <dd><p>0xFFFAFA
  2941. </p></dd>
  2942. <dt>&lsquo;<samp>SpringGreen</samp>&rsquo;</dt>
  2943. <dd><p>0x00FF7F
  2944. </p></dd>
  2945. <dt>&lsquo;<samp>SteelBlue</samp>&rsquo;</dt>
  2946. <dd><p>0x4682B4
  2947. </p></dd>
  2948. <dt>&lsquo;<samp>Tan</samp>&rsquo;</dt>
  2949. <dd><p>0xD2B48C
  2950. </p></dd>
  2951. <dt>&lsquo;<samp>Teal</samp>&rsquo;</dt>
  2952. <dd><p>0x008080
  2953. </p></dd>
  2954. <dt>&lsquo;<samp>Thistle</samp>&rsquo;</dt>
  2955. <dd><p>0xD8BFD8
  2956. </p></dd>
  2957. <dt>&lsquo;<samp>Tomato</samp>&rsquo;</dt>
  2958. <dd><p>0xFF6347
  2959. </p></dd>
  2960. <dt>&lsquo;<samp>Turquoise</samp>&rsquo;</dt>
  2961. <dd><p>0x40E0D0
  2962. </p></dd>
  2963. <dt>&lsquo;<samp>Violet</samp>&rsquo;</dt>
  2964. <dd><p>0xEE82EE
  2965. </p></dd>
  2966. <dt>&lsquo;<samp>Wheat</samp>&rsquo;</dt>
  2967. <dd><p>0xF5DEB3
  2968. </p></dd>
  2969. <dt>&lsquo;<samp>White</samp>&rsquo;</dt>
  2970. <dd><p>0xFFFFFF
  2971. </p></dd>
  2972. <dt>&lsquo;<samp>WhiteSmoke</samp>&rsquo;</dt>
  2973. <dd><p>0xF5F5F5
  2974. </p></dd>
  2975. <dt>&lsquo;<samp>Yellow</samp>&rsquo;</dt>
  2976. <dd><p>0xFFFF00
  2977. </p></dd>
  2978. <dt>&lsquo;<samp>YellowGreen</samp>&rsquo;</dt>
  2979. <dd><p>0x9ACD32
  2980. </p></dd>
  2981. </dl>
  2982. <p><a name="channel-layout-syntax"></a>
  2983. </p><a name="Channel-Layout"></a>
  2984. <h2 class="section"><a href="ffplay-all.html#toc-Channel-Layout">4.8 Channel Layout</a></h2>
  2985. <p>A channel layout specifies the spatial disposition of the channels in
  2986. a multi-channel audio stream. To specify a channel layout, FFmpeg
  2987. makes use of a special syntax.
  2988. </p>
  2989. <p>Individual channels are identified by an id, as given by the table
  2990. below:
  2991. </p><dl compact="compact">
  2992. <dt>&lsquo;<samp>FL</samp>&rsquo;</dt>
  2993. <dd><p>front left
  2994. </p></dd>
  2995. <dt>&lsquo;<samp>FR</samp>&rsquo;</dt>
  2996. <dd><p>front right
  2997. </p></dd>
  2998. <dt>&lsquo;<samp>FC</samp>&rsquo;</dt>
  2999. <dd><p>front center
  3000. </p></dd>
  3001. <dt>&lsquo;<samp>LFE</samp>&rsquo;</dt>
  3002. <dd><p>low frequency
  3003. </p></dd>
  3004. <dt>&lsquo;<samp>BL</samp>&rsquo;</dt>
  3005. <dd><p>back left
  3006. </p></dd>
  3007. <dt>&lsquo;<samp>BR</samp>&rsquo;</dt>
  3008. <dd><p>back right
  3009. </p></dd>
  3010. <dt>&lsquo;<samp>FLC</samp>&rsquo;</dt>
  3011. <dd><p>front left-of-center
  3012. </p></dd>
  3013. <dt>&lsquo;<samp>FRC</samp>&rsquo;</dt>
  3014. <dd><p>front right-of-center
  3015. </p></dd>
  3016. <dt>&lsquo;<samp>BC</samp>&rsquo;</dt>
  3017. <dd><p>back center
  3018. </p></dd>
  3019. <dt>&lsquo;<samp>SL</samp>&rsquo;</dt>
  3020. <dd><p>side left
  3021. </p></dd>
  3022. <dt>&lsquo;<samp>SR</samp>&rsquo;</dt>
  3023. <dd><p>side right
  3024. </p></dd>
  3025. <dt>&lsquo;<samp>TC</samp>&rsquo;</dt>
  3026. <dd><p>top center
  3027. </p></dd>
  3028. <dt>&lsquo;<samp>TFL</samp>&rsquo;</dt>
  3029. <dd><p>top front left
  3030. </p></dd>
  3031. <dt>&lsquo;<samp>TFC</samp>&rsquo;</dt>
  3032. <dd><p>top front center
  3033. </p></dd>
  3034. <dt>&lsquo;<samp>TFR</samp>&rsquo;</dt>
  3035. <dd><p>top front right
  3036. </p></dd>
  3037. <dt>&lsquo;<samp>TBL</samp>&rsquo;</dt>
  3038. <dd><p>top back left
  3039. </p></dd>
  3040. <dt>&lsquo;<samp>TBC</samp>&rsquo;</dt>
  3041. <dd><p>top back center
  3042. </p></dd>
  3043. <dt>&lsquo;<samp>TBR</samp>&rsquo;</dt>
  3044. <dd><p>top back right
  3045. </p></dd>
  3046. <dt>&lsquo;<samp>DL</samp>&rsquo;</dt>
  3047. <dd><p>downmix left
  3048. </p></dd>
  3049. <dt>&lsquo;<samp>DR</samp>&rsquo;</dt>
  3050. <dd><p>downmix right
  3051. </p></dd>
  3052. <dt>&lsquo;<samp>WL</samp>&rsquo;</dt>
  3053. <dd><p>wide left
  3054. </p></dd>
  3055. <dt>&lsquo;<samp>WR</samp>&rsquo;</dt>
  3056. <dd><p>wide right
  3057. </p></dd>
  3058. <dt>&lsquo;<samp>SDL</samp>&rsquo;</dt>
  3059. <dd><p>surround direct left
  3060. </p></dd>
  3061. <dt>&lsquo;<samp>SDR</samp>&rsquo;</dt>
  3062. <dd><p>surround direct right
  3063. </p></dd>
  3064. <dt>&lsquo;<samp>LFE2</samp>&rsquo;</dt>
  3065. <dd><p>low frequency 2
  3066. </p></dd>
  3067. </dl>
  3068. <p>Standard channel layout compositions can be specified by using the
  3069. following identifiers:
  3070. </p><dl compact="compact">
  3071. <dt>&lsquo;<samp>mono</samp>&rsquo;</dt>
  3072. <dd><p>FC
  3073. </p></dd>
  3074. <dt>&lsquo;<samp>stereo</samp>&rsquo;</dt>
  3075. <dd><p>FL+FR
  3076. </p></dd>
  3077. <dt>&lsquo;<samp>2.1</samp>&rsquo;</dt>
  3078. <dd><p>FL+FR+LFE
  3079. </p></dd>
  3080. <dt>&lsquo;<samp>3.0</samp>&rsquo;</dt>
  3081. <dd><p>FL+FR+FC
  3082. </p></dd>
  3083. <dt>&lsquo;<samp>3.0(back)</samp>&rsquo;</dt>
  3084. <dd><p>FL+FR+BC
  3085. </p></dd>
  3086. <dt>&lsquo;<samp>4.0</samp>&rsquo;</dt>
  3087. <dd><p>FL+FR+FC+BC
  3088. </p></dd>
  3089. <dt>&lsquo;<samp>quad</samp>&rsquo;</dt>
  3090. <dd><p>FL+FR+BL+BR
  3091. </p></dd>
  3092. <dt>&lsquo;<samp>quad(side)</samp>&rsquo;</dt>
  3093. <dd><p>FL+FR+SL+SR
  3094. </p></dd>
  3095. <dt>&lsquo;<samp>3.1</samp>&rsquo;</dt>
  3096. <dd><p>FL+FR+FC+LFE
  3097. </p></dd>
  3098. <dt>&lsquo;<samp>5.0</samp>&rsquo;</dt>
  3099. <dd><p>FL+FR+FC+BL+BR
  3100. </p></dd>
  3101. <dt>&lsquo;<samp>5.0(side)</samp>&rsquo;</dt>
  3102. <dd><p>FL+FR+FC+SL+SR
  3103. </p></dd>
  3104. <dt>&lsquo;<samp>4.1</samp>&rsquo;</dt>
  3105. <dd><p>FL+FR+FC+LFE+BC
  3106. </p></dd>
  3107. <dt>&lsquo;<samp>5.1</samp>&rsquo;</dt>
  3108. <dd><p>FL+FR+FC+LFE+BL+BR
  3109. </p></dd>
  3110. <dt>&lsquo;<samp>5.1(side)</samp>&rsquo;</dt>
  3111. <dd><p>FL+FR+FC+LFE+SL+SR
  3112. </p></dd>
  3113. <dt>&lsquo;<samp>6.0</samp>&rsquo;</dt>
  3114. <dd><p>FL+FR+FC+BC+SL+SR
  3115. </p></dd>
  3116. <dt>&lsquo;<samp>6.0(front)</samp>&rsquo;</dt>
  3117. <dd><p>FL+FR+FLC+FRC+SL+SR
  3118. </p></dd>
  3119. <dt>&lsquo;<samp>hexagonal</samp>&rsquo;</dt>
  3120. <dd><p>FL+FR+FC+BL+BR+BC
  3121. </p></dd>
  3122. <dt>&lsquo;<samp>6.1</samp>&rsquo;</dt>
  3123. <dd><p>FL+FR+FC+LFE+BC+SL+SR
  3124. </p></dd>
  3125. <dt>&lsquo;<samp>6.1</samp>&rsquo;</dt>
  3126. <dd><p>FL+FR+FC+LFE+BL+BR+BC
  3127. </p></dd>
  3128. <dt>&lsquo;<samp>6.1(front)</samp>&rsquo;</dt>
  3129. <dd><p>FL+FR+LFE+FLC+FRC+SL+SR
  3130. </p></dd>
  3131. <dt>&lsquo;<samp>7.0</samp>&rsquo;</dt>
  3132. <dd><p>FL+FR+FC+BL+BR+SL+SR
  3133. </p></dd>
  3134. <dt>&lsquo;<samp>7.0(front)</samp>&rsquo;</dt>
  3135. <dd><p>FL+FR+FC+FLC+FRC+SL+SR
  3136. </p></dd>
  3137. <dt>&lsquo;<samp>7.1</samp>&rsquo;</dt>
  3138. <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR
  3139. </p></dd>
  3140. <dt>&lsquo;<samp>7.1(wide)</samp>&rsquo;</dt>
  3141. <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC
  3142. </p></dd>
  3143. <dt>&lsquo;<samp>7.1(wide-side)</samp>&rsquo;</dt>
  3144. <dd><p>FL+FR+FC+LFE+FLC+FRC+SL+SR
  3145. </p></dd>
  3146. <dt>&lsquo;<samp>octagonal</samp>&rsquo;</dt>
  3147. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR
  3148. </p></dd>
  3149. <dt>&lsquo;<samp>hexadecagonal</samp>&rsquo;</dt>
  3150. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
  3151. </p></dd>
  3152. <dt>&lsquo;<samp>downmix</samp>&rsquo;</dt>
  3153. <dd><p>DL+DR
  3154. </p></dd>
  3155. </dl>
  3156. <p>A custom channel layout can be specified as a sequence of terms, separated by
  3157. &rsquo;+&rsquo; or &rsquo;|&rsquo;. Each term can be:
  3158. </p><ul>
  3159. <li>
  3160. the name of a standard channel layout (e.g. &lsquo;<samp>mono</samp>&rsquo;,
  3161. &lsquo;<samp>stereo</samp>&rsquo;, &lsquo;<samp>4.0</samp>&rsquo;, &lsquo;<samp>quad</samp>&rsquo;, &lsquo;<samp>5.0</samp>&rsquo;, etc.)
  3162. </li><li>
  3163. 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.)
  3164. </li><li>
  3165. a number of channels, in decimal, followed by &rsquo;c&rsquo;, yielding the default channel
  3166. layout for that number of channels (see the function
  3167. <code>av_get_default_channel_layout</code>). Note that not all channel counts have a
  3168. default layout.
  3169. </li><li>
  3170. a number of channels, in decimal, followed by &rsquo;C&rsquo;, yielding an unknown channel
  3171. layout with the specified number of channels. Note that not all channel layout
  3172. specification strings support unknown channel layouts.
  3173. </li><li>
  3174. a channel layout mask, in hexadecimal starting with &quot;0x&quot; (see the
  3175. <code>AV_CH_*</code> macros in &lsquo;<tt>libavutil/channel_layout.h</tt>&rsquo;.
  3176. </li></ul>
  3177. <p>Before libavutil version 53 the trailing character &quot;c&quot; to specify a number of
  3178. channels was optional, but now it is required, while a channel layout mask can
  3179. also be specified as a decimal number (if and only if not followed by &quot;c&quot; or &quot;C&quot;).
  3180. </p>
  3181. <p>See also the function <code>av_get_channel_layout</code> defined in
  3182. &lsquo;<tt>libavutil/channel_layout.h</tt>&rsquo;.
  3183. </p>
  3184. <a name="Expression-Evaluation"></a>
  3185. <h1 class="chapter"><a href="ffplay-all.html#toc-Expression-Evaluation">5 Expression Evaluation</a></h1>
  3186. <p>When evaluating an arithmetic expression, FFmpeg uses an internal
  3187. formula evaluator, implemented through the &lsquo;<tt>libavutil/eval.h</tt>&rsquo;
  3188. interface.
  3189. </p>
  3190. <p>An expression may contain unary, binary operators, constants, and
  3191. functions.
  3192. </p>
  3193. <p>Two expressions <var>expr1</var> and <var>expr2</var> can be combined to form
  3194. another expression &quot;<var>expr1</var>;<var>expr2</var>&quot;.
  3195. <var>expr1</var> and <var>expr2</var> are evaluated in turn, and the new
  3196. expression evaluates to the value of <var>expr2</var>.
  3197. </p>
  3198. <p>The following binary operators are available: <code>+</code>, <code>-</code>,
  3199. <code>*</code>, <code>/</code>, <code>^</code>.
  3200. </p>
  3201. <p>The following unary operators are available: <code>+</code>, <code>-</code>.
  3202. </p>
  3203. <p>The following functions are available:
  3204. </p><dl compact="compact">
  3205. <dt>&lsquo;<samp>abs(x)</samp>&rsquo;</dt>
  3206. <dd><p>Compute absolute value of <var>x</var>.
  3207. </p>
  3208. </dd>
  3209. <dt>&lsquo;<samp>acos(x)</samp>&rsquo;</dt>
  3210. <dd><p>Compute arccosine of <var>x</var>.
  3211. </p>
  3212. </dd>
  3213. <dt>&lsquo;<samp>asin(x)</samp>&rsquo;</dt>
  3214. <dd><p>Compute arcsine of <var>x</var>.
  3215. </p>
  3216. </dd>
  3217. <dt>&lsquo;<samp>atan(x)</samp>&rsquo;</dt>
  3218. <dd><p>Compute arctangent of <var>x</var>.
  3219. </p>
  3220. </dd>
  3221. <dt>&lsquo;<samp>atan2(x, y)</samp>&rsquo;</dt>
  3222. <dd><p>Compute principal value of the arc tangent of <var>y</var>/<var>x</var>.
  3223. </p>
  3224. </dd>
  3225. <dt>&lsquo;<samp>between(x, min, max)</samp>&rsquo;</dt>
  3226. <dd><p>Return 1 if <var>x</var> is greater than or equal to <var>min</var> and lesser than or
  3227. equal to <var>max</var>, 0 otherwise.
  3228. </p>
  3229. </dd>
  3230. <dt>&lsquo;<samp>bitand(x, y)</samp>&rsquo;</dt>
  3231. <dt>&lsquo;<samp>bitor(x, y)</samp>&rsquo;</dt>
  3232. <dd><p>Compute bitwise and/or operation on <var>x</var> and <var>y</var>.
  3233. </p>
  3234. <p>The results of the evaluation of <var>x</var> and <var>y</var> are converted to
  3235. integers before executing the bitwise operation.
  3236. </p>
  3237. <p>Note that both the conversion to integer and the conversion back to
  3238. floating point can lose precision. Beware of unexpected results for
  3239. large numbers (usually 2^53 and larger).
  3240. </p>
  3241. </dd>
  3242. <dt>&lsquo;<samp>ceil(expr)</samp>&rsquo;</dt>
  3243. <dd><p>Round the value of expression <var>expr</var> upwards to the nearest
  3244. integer. For example, &quot;ceil(1.5)&quot; is &quot;2.0&quot;.
  3245. </p>
  3246. </dd>
  3247. <dt>&lsquo;<samp>clip(x, min, max)</samp>&rsquo;</dt>
  3248. <dd><p>Return the value of <var>x</var> clipped between <var>min</var> and <var>max</var>.
  3249. </p>
  3250. </dd>
  3251. <dt>&lsquo;<samp>cos(x)</samp>&rsquo;</dt>
  3252. <dd><p>Compute cosine of <var>x</var>.
  3253. </p>
  3254. </dd>
  3255. <dt>&lsquo;<samp>cosh(x)</samp>&rsquo;</dt>
  3256. <dd><p>Compute hyperbolic cosine of <var>x</var>.
  3257. </p>
  3258. </dd>
  3259. <dt>&lsquo;<samp>eq(x, y)</samp>&rsquo;</dt>
  3260. <dd><p>Return 1 if <var>x</var> and <var>y</var> are equivalent, 0 otherwise.
  3261. </p>
  3262. </dd>
  3263. <dt>&lsquo;<samp>exp(x)</samp>&rsquo;</dt>
  3264. <dd><p>Compute exponential of <var>x</var> (with base <code>e</code>, the Euler&rsquo;s number).
  3265. </p>
  3266. </dd>
  3267. <dt>&lsquo;<samp>floor(expr)</samp>&rsquo;</dt>
  3268. <dd><p>Round the value of expression <var>expr</var> downwards to the nearest
  3269. integer. For example, &quot;floor(-1.5)&quot; is &quot;-2.0&quot;.
  3270. </p>
  3271. </dd>
  3272. <dt>&lsquo;<samp>gauss(x)</samp>&rsquo;</dt>
  3273. <dd><p>Compute Gauss function of <var>x</var>, corresponding to
  3274. <code>exp(-x*x/2) / sqrt(2*PI)</code>.
  3275. </p>
  3276. </dd>
  3277. <dt>&lsquo;<samp>gcd(x, y)</samp>&rsquo;</dt>
  3278. <dd><p>Return the greatest common divisor of <var>x</var> and <var>y</var>. If both <var>x</var> and
  3279. <var>y</var> are 0 or either or both are less than zero then behavior is undefined.
  3280. </p>
  3281. </dd>
  3282. <dt>&lsquo;<samp>gt(x, y)</samp>&rsquo;</dt>
  3283. <dd><p>Return 1 if <var>x</var> is greater than <var>y</var>, 0 otherwise.
  3284. </p>
  3285. </dd>
  3286. <dt>&lsquo;<samp>gte(x, y)</samp>&rsquo;</dt>
  3287. <dd><p>Return 1 if <var>x</var> is greater than or equal to <var>y</var>, 0 otherwise.
  3288. </p>
  3289. </dd>
  3290. <dt>&lsquo;<samp>hypot(x, y)</samp>&rsquo;</dt>
  3291. <dd><p>This function is similar to the C function with the same name; it returns
  3292. &quot;sqrt(<var>x</var>*<var>x</var> + <var>y</var>*<var>y</var>)&quot;, the length of the hypotenuse of a
  3293. right triangle with sides of length <var>x</var> and <var>y</var>, or the distance of the
  3294. point (<var>x</var>, <var>y</var>) from the origin.
  3295. </p>
  3296. </dd>
  3297. <dt>&lsquo;<samp>if(x, y)</samp>&rsquo;</dt>
  3298. <dd><p>Evaluate <var>x</var>, and if the result is non-zero return the result of
  3299. the evaluation of <var>y</var>, return 0 otherwise.
  3300. </p>
  3301. </dd>
  3302. <dt>&lsquo;<samp>if(x, y, z)</samp>&rsquo;</dt>
  3303. <dd><p>Evaluate <var>x</var>, and if the result is non-zero return the evaluation
  3304. result of <var>y</var>, otherwise the evaluation result of <var>z</var>.
  3305. </p>
  3306. </dd>
  3307. <dt>&lsquo;<samp>ifnot(x, y)</samp>&rsquo;</dt>
  3308. <dd><p>Evaluate <var>x</var>, and if the result is zero return the result of the
  3309. evaluation of <var>y</var>, return 0 otherwise.
  3310. </p>
  3311. </dd>
  3312. <dt>&lsquo;<samp>ifnot(x, y, z)</samp>&rsquo;</dt>
  3313. <dd><p>Evaluate <var>x</var>, and if the result is zero return the evaluation
  3314. result of <var>y</var>, otherwise the evaluation result of <var>z</var>.
  3315. </p>
  3316. </dd>
  3317. <dt>&lsquo;<samp>isinf(x)</samp>&rsquo;</dt>
  3318. <dd><p>Return 1.0 if <var>x</var> is +/-INFINITY, 0.0 otherwise.
  3319. </p>
  3320. </dd>
  3321. <dt>&lsquo;<samp>isnan(x)</samp>&rsquo;</dt>
  3322. <dd><p>Return 1.0 if <var>x</var> is NAN, 0.0 otherwise.
  3323. </p>
  3324. </dd>
  3325. <dt>&lsquo;<samp>ld(var)</samp>&rsquo;</dt>
  3326. <dd><p>Load the value of the internal variable with number
  3327. <var>var</var>, which was previously stored with st(<var>var</var>, <var>expr</var>).
  3328. The function returns the loaded value.
  3329. </p>
  3330. </dd>
  3331. <dt>&lsquo;<samp>lerp(x, y, z)</samp>&rsquo;</dt>
  3332. <dd><p>Return linear interpolation between <var>x</var> and <var>y</var> by amount of <var>z</var>.
  3333. </p>
  3334. </dd>
  3335. <dt>&lsquo;<samp>log(x)</samp>&rsquo;</dt>
  3336. <dd><p>Compute natural logarithm of <var>x</var>.
  3337. </p>
  3338. </dd>
  3339. <dt>&lsquo;<samp>lt(x, y)</samp>&rsquo;</dt>
  3340. <dd><p>Return 1 if <var>x</var> is lesser than <var>y</var>, 0 otherwise.
  3341. </p>
  3342. </dd>
  3343. <dt>&lsquo;<samp>lte(x, y)</samp>&rsquo;</dt>
  3344. <dd><p>Return 1 if <var>x</var> is lesser than or equal to <var>y</var>, 0 otherwise.
  3345. </p>
  3346. </dd>
  3347. <dt>&lsquo;<samp>max(x, y)</samp>&rsquo;</dt>
  3348. <dd><p>Return the maximum between <var>x</var> and <var>y</var>.
  3349. </p>
  3350. </dd>
  3351. <dt>&lsquo;<samp>min(x, y)</samp>&rsquo;</dt>
  3352. <dd><p>Return the minimum between <var>x</var> and <var>y</var>.
  3353. </p>
  3354. </dd>
  3355. <dt>&lsquo;<samp>mod(x, y)</samp>&rsquo;</dt>
  3356. <dd><p>Compute the remainder of division of <var>x</var> by <var>y</var>.
  3357. </p>
  3358. </dd>
  3359. <dt>&lsquo;<samp>not(expr)</samp>&rsquo;</dt>
  3360. <dd><p>Return 1.0 if <var>expr</var> is zero, 0.0 otherwise.
  3361. </p>
  3362. </dd>
  3363. <dt>&lsquo;<samp>pow(x, y)</samp>&rsquo;</dt>
  3364. <dd><p>Compute the power of <var>x</var> elevated <var>y</var>, it is equivalent to
  3365. &quot;(<var>x</var>)^(<var>y</var>)&quot;.
  3366. </p>
  3367. </dd>
  3368. <dt>&lsquo;<samp>print(t)</samp>&rsquo;</dt>
  3369. <dt>&lsquo;<samp>print(t, l)</samp>&rsquo;</dt>
  3370. <dd><p>Print the value of expression <var>t</var> with loglevel <var>l</var>. If
  3371. <var>l</var> is not specified then a default log level is used.
  3372. Returns the value of the expression printed.
  3373. </p>
  3374. <p>Prints t with loglevel l
  3375. </p>
  3376. </dd>
  3377. <dt>&lsquo;<samp>random(x)</samp>&rsquo;</dt>
  3378. <dd><p>Return a pseudo random value between 0.0 and 1.0. <var>x</var> is the index of the
  3379. internal variable which will be used to save the seed/state.
  3380. </p>
  3381. </dd>
  3382. <dt>&lsquo;<samp>root(expr, max)</samp>&rsquo;</dt>
  3383. <dd><p>Find an input value for which the function represented by <var>expr</var>
  3384. with argument <var>ld(0)</var> is 0 in the interval 0..<var>max</var>.
  3385. </p>
  3386. <p>The expression in <var>expr</var> must denote a continuous function or the
  3387. result is undefined.
  3388. </p>
  3389. <p><var>ld(0)</var> is used to represent the function input value, which means
  3390. that the given expression will be evaluated multiple times with
  3391. various input values that the expression can access through
  3392. <code>ld(0)</code>. When the expression evaluates to 0 then the
  3393. corresponding input value will be returned.
  3394. </p>
  3395. </dd>
  3396. <dt>&lsquo;<samp>round(expr)</samp>&rsquo;</dt>
  3397. <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;.
  3398. </p>
  3399. </dd>
  3400. <dt>&lsquo;<samp>sgn(x)</samp>&rsquo;</dt>
  3401. <dd><p>Compute sign of <var>x</var>.
  3402. </p>
  3403. </dd>
  3404. <dt>&lsquo;<samp>sin(x)</samp>&rsquo;</dt>
  3405. <dd><p>Compute sine of <var>x</var>.
  3406. </p>
  3407. </dd>
  3408. <dt>&lsquo;<samp>sinh(x)</samp>&rsquo;</dt>
  3409. <dd><p>Compute hyperbolic sine of <var>x</var>.
  3410. </p>
  3411. </dd>
  3412. <dt>&lsquo;<samp>sqrt(expr)</samp>&rsquo;</dt>
  3413. <dd><p>Compute the square root of <var>expr</var>. This is equivalent to
  3414. &quot;(<var>expr</var>)^.5&quot;.
  3415. </p>
  3416. </dd>
  3417. <dt>&lsquo;<samp>squish(x)</samp>&rsquo;</dt>
  3418. <dd><p>Compute expression <code>1/(1 + exp(4*x))</code>.
  3419. </p>
  3420. </dd>
  3421. <dt>&lsquo;<samp>st(var, expr)</samp>&rsquo;</dt>
  3422. <dd><p>Store the value of the expression <var>expr</var> in an internal
  3423. variable. <var>var</var> specifies the number of the variable where to
  3424. store the value, and it is a value ranging from 0 to 9. The function
  3425. returns the value stored in the internal variable.
  3426. Note, Variables are currently not shared between expressions.
  3427. </p>
  3428. </dd>
  3429. <dt>&lsquo;<samp>tan(x)</samp>&rsquo;</dt>
  3430. <dd><p>Compute tangent of <var>x</var>.
  3431. </p>
  3432. </dd>
  3433. <dt>&lsquo;<samp>tanh(x)</samp>&rsquo;</dt>
  3434. <dd><p>Compute hyperbolic tangent of <var>x</var>.
  3435. </p>
  3436. </dd>
  3437. <dt>&lsquo;<samp>taylor(expr, x)</samp>&rsquo;</dt>
  3438. <dt>&lsquo;<samp>taylor(expr, x, id)</samp>&rsquo;</dt>
  3439. <dd><p>Evaluate a Taylor series at <var>x</var>, given an expression representing
  3440. the <code>ld(id)</code>-th derivative of a function at 0.
  3441. </p>
  3442. <p>When the series does not converge the result is undefined.
  3443. </p>
  3444. <p><var>ld(id)</var> is used to represent the derivative order in <var>expr</var>,
  3445. which means that the given expression will be evaluated multiple times
  3446. with various input values that the expression can access through
  3447. <code>ld(id)</code>. If <var>id</var> is not specified then 0 is assumed.
  3448. </p>
  3449. <p>Note, when you have the derivatives at y instead of 0,
  3450. <code>taylor(expr, x-y)</code> can be used.
  3451. </p>
  3452. </dd>
  3453. <dt>&lsquo;<samp>time(0)</samp>&rsquo;</dt>
  3454. <dd><p>Return the current (wallclock) time in seconds.
  3455. </p>
  3456. </dd>
  3457. <dt>&lsquo;<samp>trunc(expr)</samp>&rsquo;</dt>
  3458. <dd><p>Round the value of expression <var>expr</var> towards zero to the nearest
  3459. integer. For example, &quot;trunc(-1.5)&quot; is &quot;-1.0&quot;.
  3460. </p>
  3461. </dd>
  3462. <dt>&lsquo;<samp>while(cond, expr)</samp>&rsquo;</dt>
  3463. <dd><p>Evaluate expression <var>expr</var> while the expression <var>cond</var> is
  3464. non-zero, and returns the value of the last <var>expr</var> evaluation, or
  3465. NAN if <var>cond</var> was always false.
  3466. </p></dd>
  3467. </dl>
  3468. <p>The following constants are available:
  3469. </p><dl compact="compact">
  3470. <dt>&lsquo;<samp>PI</samp>&rsquo;</dt>
  3471. <dd><p>area of the unit disc, approximately 3.14
  3472. </p></dd>
  3473. <dt>&lsquo;<samp>E</samp>&rsquo;</dt>
  3474. <dd><p>exp(1) (Euler&rsquo;s number), approximately 2.718
  3475. </p></dd>
  3476. <dt>&lsquo;<samp>PHI</samp>&rsquo;</dt>
  3477. <dd><p>golden ratio (1+sqrt(5))/2, approximately 1.618
  3478. </p></dd>
  3479. </dl>
  3480. <p>Assuming that an expression is considered &quot;true&quot; if it has a non-zero
  3481. value, note that:
  3482. </p>
  3483. <p><code>*</code> works like AND
  3484. </p>
  3485. <p><code>+</code> works like OR
  3486. </p>
  3487. <p>For example the construct:
  3488. </p><div class="example">
  3489. <pre class="example">if (A AND B) then C
  3490. </pre></div>
  3491. <p>is equivalent to:
  3492. </p><div class="example">
  3493. <pre class="example">if(A*B, C)
  3494. </pre></div>
  3495. <p>In your C code, you can extend the list of unary and binary functions,
  3496. and define recognized constants, so that they are available for your
  3497. expressions.
  3498. </p>
  3499. <p>The evaluator also recognizes the International System unit prefixes.
  3500. If &rsquo;i&rsquo; is appended after the prefix, binary prefixes are used, which
  3501. are based on powers of 1024 instead of powers of 1000.
  3502. The &rsquo;B&rsquo; postfix multiplies the value by 8, and can be appended after a
  3503. unit prefix or used alone. This allows using for example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;,
  3504. &rsquo;G&rsquo; and &rsquo;B&rsquo; as number postfix.
  3505. </p>
  3506. <p>The list of available International System prefixes follows, with
  3507. indication of the corresponding powers of 10 and of 2.
  3508. </p><dl compact="compact">
  3509. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  3510. <dd><p>10^-24 / 2^-80
  3511. </p></dd>
  3512. <dt>&lsquo;<samp>z</samp>&rsquo;</dt>
  3513. <dd><p>10^-21 / 2^-70
  3514. </p></dd>
  3515. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  3516. <dd><p>10^-18 / 2^-60
  3517. </p></dd>
  3518. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  3519. <dd><p>10^-15 / 2^-50
  3520. </p></dd>
  3521. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  3522. <dd><p>10^-12 / 2^-40
  3523. </p></dd>
  3524. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  3525. <dd><p>10^-9 / 2^-30
  3526. </p></dd>
  3527. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  3528. <dd><p>10^-6 / 2^-20
  3529. </p></dd>
  3530. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  3531. <dd><p>10^-3 / 2^-10
  3532. </p></dd>
  3533. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  3534. <dd><p>10^-2
  3535. </p></dd>
  3536. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  3537. <dd><p>10^-1
  3538. </p></dd>
  3539. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  3540. <dd><p>10^2
  3541. </p></dd>
  3542. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  3543. <dd><p>10^3 / 2^10
  3544. </p></dd>
  3545. <dt>&lsquo;<samp>K</samp>&rsquo;</dt>
  3546. <dd><p>10^3 / 2^10
  3547. </p></dd>
  3548. <dt>&lsquo;<samp>M</samp>&rsquo;</dt>
  3549. <dd><p>10^6 / 2^20
  3550. </p></dd>
  3551. <dt>&lsquo;<samp>G</samp>&rsquo;</dt>
  3552. <dd><p>10^9 / 2^30
  3553. </p></dd>
  3554. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  3555. <dd><p>10^12 / 2^40
  3556. </p></dd>
  3557. <dt>&lsquo;<samp>P</samp>&rsquo;</dt>
  3558. <dd><p>10^15 / 2^40
  3559. </p></dd>
  3560. <dt>&lsquo;<samp>E</samp>&rsquo;</dt>
  3561. <dd><p>10^18 / 2^50
  3562. </p></dd>
  3563. <dt>&lsquo;<samp>Z</samp>&rsquo;</dt>
  3564. <dd><p>10^21 / 2^60
  3565. </p></dd>
  3566. <dt>&lsquo;<samp>Y</samp>&rsquo;</dt>
  3567. <dd><p>10^24 / 2^70
  3568. </p></dd>
  3569. </dl>
  3570. <p><a name="codec_002doptions"></a>
  3571. </p><a name="Codec-Options"></a>
  3572. <h1 class="chapter"><a href="ffplay-all.html#toc-Codec-Options">6 Codec Options</a></h1>
  3573. <p>libavcodec provides some generic global options, which can be set on
  3574. all the encoders and decoders. In addition each codec may support
  3575. so-called private options, which are specific for a given codec.
  3576. </p>
  3577. <p>Sometimes, a global option may only affect a specific kind of codec,
  3578. and may be nonsensical or ignored by another, so you need to be aware
  3579. of the meaning of the specified options. Also some options are
  3580. meant only for decoding or encoding.
  3581. </p>
  3582. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  3583. FFmpeg tools, or by setting the value explicitly in the
  3584. <code>AVCodecContext</code> options or using the &lsquo;<tt>libavutil/opt.h</tt>&rsquo; API
  3585. for programmatic use.
  3586. </p>
  3587. <p>The list of supported options follow:
  3588. </p>
  3589. <dl compact="compact">
  3590. <dt>&lsquo;<samp>b <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  3591. <dd><p>Set bitrate in bits/s. Default value is 200K.
  3592. </p>
  3593. </dd>
  3594. <dt>&lsquo;<samp>ab <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
  3595. <dd><p>Set audio bitrate (in bits/s). Default value is 128K.
  3596. </p>
  3597. </dd>
  3598. <dt>&lsquo;<samp>bt <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3599. <dd><p>Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate
  3600. tolerance specifies how far ratecontrol is willing to deviate from the
  3601. target average bitrate value. This is not related to min/max
  3602. bitrate. Lowering tolerance too much has an adverse effect on quality.
  3603. </p>
  3604. </dd>
  3605. <dt>&lsquo;<samp>flags <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>&rsquo;</dt>
  3606. <dd><p>Set generic flags.
  3607. </p>
  3608. <p>Possible values:
  3609. </p><dl compact="compact">
  3610. <dt>&lsquo;<samp>mv4</samp>&rsquo;</dt>
  3611. <dd><p>Use four motion vector by macroblock (mpeg4).
  3612. </p></dd>
  3613. <dt>&lsquo;<samp>qpel</samp>&rsquo;</dt>
  3614. <dd><p>Use 1/4 pel motion compensation.
  3615. </p></dd>
  3616. <dt>&lsquo;<samp>loop</samp>&rsquo;</dt>
  3617. <dd><p>Use loop filter.
  3618. </p></dd>
  3619. <dt>&lsquo;<samp>qscale</samp>&rsquo;</dt>
  3620. <dd><p>Use fixed qscale.
  3621. </p></dd>
  3622. <dt>&lsquo;<samp>pass1</samp>&rsquo;</dt>
  3623. <dd><p>Use internal 2pass ratecontrol in first pass mode.
  3624. </p></dd>
  3625. <dt>&lsquo;<samp>pass2</samp>&rsquo;</dt>
  3626. <dd><p>Use internal 2pass ratecontrol in second pass mode.
  3627. </p></dd>
  3628. <dt>&lsquo;<samp>gray</samp>&rsquo;</dt>
  3629. <dd><p>Only decode/encode grayscale.
  3630. </p></dd>
  3631. <dt>&lsquo;<samp>emu_edge</samp>&rsquo;</dt>
  3632. <dd><p>Do not draw edges.
  3633. </p></dd>
  3634. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  3635. <dd><p>Set error[?] variables during encoding.
  3636. </p></dd>
  3637. <dt>&lsquo;<samp>truncated</samp>&rsquo;</dt>
  3638. <dd><p>Input bitstream might be randomly truncated.
  3639. </p></dd>
  3640. <dt>&lsquo;<samp>drop_changed</samp>&rsquo;</dt>
  3641. <dd><p>Don&rsquo;t output frames whose parameters differ from first decoded frame in stream.
  3642. Error AVERROR_INPUT_CHANGED is returned when a frame is dropped.
  3643. </p>
  3644. </dd>
  3645. <dt>&lsquo;<samp>ildct</samp>&rsquo;</dt>
  3646. <dd><p>Use interlaced DCT.
  3647. </p></dd>
  3648. <dt>&lsquo;<samp>low_delay</samp>&rsquo;</dt>
  3649. <dd><p>Force low delay.
  3650. </p></dd>
  3651. <dt>&lsquo;<samp>global_header</samp>&rsquo;</dt>
  3652. <dd><p>Place global headers in extradata instead of every keyframe.
  3653. </p></dd>
  3654. <dt>&lsquo;<samp>bitexact</samp>&rsquo;</dt>
  3655. <dd><p>Only write platform-, build- and time-independent data. (except (I)DCT).
  3656. This ensures that file and data checksums are reproducible and match between
  3657. platforms. Its primary use is for regression testing.
  3658. </p></dd>
  3659. <dt>&lsquo;<samp>aic</samp>&rsquo;</dt>
  3660. <dd><p>Apply H263 advanced intra coding / mpeg4 ac prediction.
  3661. </p></dd>
  3662. <dt>&lsquo;<samp>cbp</samp>&rsquo;</dt>
  3663. <dd><p>Deprecated, use mpegvideo private options instead.
  3664. </p></dd>
  3665. <dt>&lsquo;<samp>qprd</samp>&rsquo;</dt>
  3666. <dd><p>Deprecated, use mpegvideo private options instead.
  3667. </p></dd>
  3668. <dt>&lsquo;<samp>ilme</samp>&rsquo;</dt>
  3669. <dd><p>Apply interlaced motion estimation.
  3670. </p></dd>
  3671. <dt>&lsquo;<samp>cgop</samp>&rsquo;</dt>
  3672. <dd><p>Use closed gop.
  3673. </p></dd>
  3674. <dt>&lsquo;<samp>output_corrupt</samp>&rsquo;</dt>
  3675. <dd><p>Output even potentially corrupted frames.
  3676. </p></dd>
  3677. </dl>
  3678. </dd>
  3679. <dt>&lsquo;<samp>me_method <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3680. <dd><p>Set motion estimation method.
  3681. </p>
  3682. <p>Possible values:
  3683. </p><dl compact="compact">
  3684. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  3685. <dd><p>zero motion estimation (fastest)
  3686. </p></dd>
  3687. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  3688. <dd><p>full motion estimation (slowest)
  3689. </p></dd>
  3690. <dt>&lsquo;<samp>epzs</samp>&rsquo;</dt>
  3691. <dd><p>EPZS motion estimation (default)
  3692. </p></dd>
  3693. <dt>&lsquo;<samp>esa</samp>&rsquo;</dt>
  3694. <dd><p>esa motion estimation (alias for full)
  3695. </p></dd>
  3696. <dt>&lsquo;<samp>tesa</samp>&rsquo;</dt>
  3697. <dd><p>tesa motion estimation
  3698. </p></dd>
  3699. <dt>&lsquo;<samp>dia</samp>&rsquo;</dt>
  3700. <dd><p>dia motion estimation (alias for epzs)
  3701. </p></dd>
  3702. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  3703. <dd><p>log motion estimation
  3704. </p></dd>
  3705. <dt>&lsquo;<samp>phods</samp>&rsquo;</dt>
  3706. <dd><p>phods motion estimation
  3707. </p></dd>
  3708. <dt>&lsquo;<samp>x1</samp>&rsquo;</dt>
  3709. <dd><p>X1 motion estimation
  3710. </p></dd>
  3711. <dt>&lsquo;<samp>hex</samp>&rsquo;</dt>
  3712. <dd><p>hex motion estimation
  3713. </p></dd>
  3714. <dt>&lsquo;<samp>umh</samp>&rsquo;</dt>
  3715. <dd><p>umh motion estimation
  3716. </p></dd>
  3717. <dt>&lsquo;<samp>iter</samp>&rsquo;</dt>
  3718. <dd><p>iter motion estimation
  3719. </p></dd>
  3720. </dl>
  3721. </dd>
  3722. <dt>&lsquo;<samp>extradata_size <var>integer</var></samp>&rsquo;</dt>
  3723. <dd><p>Set extradata size.
  3724. </p>
  3725. </dd>
  3726. <dt>&lsquo;<samp>time_base <var>rational number</var></samp>&rsquo;</dt>
  3727. <dd><p>Set codec time base.
  3728. </p>
  3729. <p>It is the fundamental unit of time (in seconds) in terms of which
  3730. frame timestamps are represented. For fixed-fps content, timebase
  3731. should be <code>1 / frame_rate</code> and timestamp increments should be
  3732. identically 1.
  3733. </p>
  3734. </dd>
  3735. <dt>&lsquo;<samp>g <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3736. <dd><p>Set the group of picture (GOP) size. Default value is 12.
  3737. </p>
  3738. </dd>
  3739. <dt>&lsquo;<samp>ar <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>&rsquo;</dt>
  3740. <dd><p>Set audio sampling rate (in Hz).
  3741. </p>
  3742. </dd>
  3743. <dt>&lsquo;<samp>ac <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>&rsquo;</dt>
  3744. <dd><p>Set number of audio channels.
  3745. </p>
  3746. </dd>
  3747. <dt>&lsquo;<samp>cutoff <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
  3748. <dd><p>Set cutoff bandwidth. (Supported only by selected encoders, see
  3749. their respective documentation sections.)
  3750. </p>
  3751. </dd>
  3752. <dt>&lsquo;<samp>frame_size <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
  3753. <dd><p>Set audio frame size.
  3754. </p>
  3755. <p>Each submitted frame except the last must contain exactly frame_size
  3756. samples per channel. May be 0 when the codec has
  3757. CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not
  3758. restricted. It is set by some decoders to indicate constant frame
  3759. size.
  3760. </p>
  3761. </dd>
  3762. <dt>&lsquo;<samp>frame_number <var>integer</var></samp>&rsquo;</dt>
  3763. <dd><p>Set the frame number.
  3764. </p>
  3765. </dd>
  3766. <dt>&lsquo;<samp>delay <var>integer</var></samp>&rsquo;</dt>
  3767. <dt>&lsquo;<samp>qcomp <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3768. <dd><p>Set video quantizer scale compression (VBR). It is used as a constant
  3769. in the ratecontrol equation. Recommended range for default rc_eq:
  3770. 0.0-1.0.
  3771. </p>
  3772. </dd>
  3773. <dt>&lsquo;<samp>qblur <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3774. <dd><p>Set video quantizer scale blur (VBR).
  3775. </p>
  3776. </dd>
  3777. <dt>&lsquo;<samp>qmin <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3778. <dd><p>Set min video quantizer scale (VBR). Must be included between -1 and
  3779. 69, default value is 2.
  3780. </p>
  3781. </dd>
  3782. <dt>&lsquo;<samp>qmax <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3783. <dd><p>Set max video quantizer scale (VBR). Must be included between -1 and
  3784. 1024, default value is 31.
  3785. </p>
  3786. </dd>
  3787. <dt>&lsquo;<samp>qdiff <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3788. <dd><p>Set max difference between the quantizer scale (VBR).
  3789. </p>
  3790. </dd>
  3791. <dt>&lsquo;<samp>bf <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3792. <dd><p>Set max number of B frames between non-B-frames.
  3793. </p>
  3794. <p>Must be an integer between -1 and 16. 0 means that B-frames are
  3795. disabled. If a value of -1 is used, it will choose an automatic value
  3796. depending on the encoder.
  3797. </p>
  3798. <p>Default value is 0.
  3799. </p>
  3800. </dd>
  3801. <dt>&lsquo;<samp>b_qfactor <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3802. <dd><p>Set qp factor between P and B frames.
  3803. </p>
  3804. </dd>
  3805. <dt>&lsquo;<samp>rc_strategy <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3806. <dd><p>Set ratecontrol method.
  3807. </p>
  3808. </dd>
  3809. <dt>&lsquo;<samp>b_strategy <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3810. <dd><p>Set strategy to choose between I/P/B-frames.
  3811. </p>
  3812. </dd>
  3813. <dt>&lsquo;<samp>ps <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3814. <dd><p>Set RTP payload size in bytes.
  3815. </p>
  3816. </dd>
  3817. <dt>&lsquo;<samp>mv_bits <var>integer</var></samp>&rsquo;</dt>
  3818. <dt>&lsquo;<samp>header_bits <var>integer</var></samp>&rsquo;</dt>
  3819. <dt>&lsquo;<samp>i_tex_bits <var>integer</var></samp>&rsquo;</dt>
  3820. <dt>&lsquo;<samp>p_tex_bits <var>integer</var></samp>&rsquo;</dt>
  3821. <dt>&lsquo;<samp>i_count <var>integer</var></samp>&rsquo;</dt>
  3822. <dt>&lsquo;<samp>p_count <var>integer</var></samp>&rsquo;</dt>
  3823. <dt>&lsquo;<samp>skip_count <var>integer</var></samp>&rsquo;</dt>
  3824. <dt>&lsquo;<samp>misc_bits <var>integer</var></samp>&rsquo;</dt>
  3825. <dt>&lsquo;<samp>frame_bits <var>integer</var></samp>&rsquo;</dt>
  3826. <dt>&lsquo;<samp>codec_tag <var>integer</var></samp>&rsquo;</dt>
  3827. <dt>&lsquo;<samp>bug <var>flags</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  3828. <dd><p>Workaround not auto detected encoder bugs.
  3829. </p>
  3830. <p>Possible values:
  3831. </p><dl compact="compact">
  3832. <dt>&lsquo;<samp>autodetect</samp>&rsquo;</dt>
  3833. <dt>&lsquo;<samp>old_msmpeg4</samp>&rsquo;</dt>
  3834. <dd><p>some old lavc generated msmpeg4v3 files (no autodetection)
  3835. </p></dd>
  3836. <dt>&lsquo;<samp>xvid_ilace</samp>&rsquo;</dt>
  3837. <dd><p>Xvid interlacing bug (autodetected if fourcc==XVIX)
  3838. </p></dd>
  3839. <dt>&lsquo;<samp>ump4</samp>&rsquo;</dt>
  3840. <dd><p>(autodetected if fourcc==UMP4)
  3841. </p></dd>
  3842. <dt>&lsquo;<samp>no_padding</samp>&rsquo;</dt>
  3843. <dd><p>padding bug (autodetected)
  3844. </p></dd>
  3845. <dt>&lsquo;<samp>amv</samp>&rsquo;</dt>
  3846. <dt>&lsquo;<samp>ac_vlc</samp>&rsquo;</dt>
  3847. <dd><p>illegal vlc bug (autodetected per fourcc)
  3848. </p></dd>
  3849. <dt>&lsquo;<samp>qpel_chroma</samp>&rsquo;</dt>
  3850. <dt>&lsquo;<samp>std_qpel</samp>&rsquo;</dt>
  3851. <dd><p>old standard qpel (autodetected per fourcc/version)
  3852. </p></dd>
  3853. <dt>&lsquo;<samp>qpel_chroma2</samp>&rsquo;</dt>
  3854. <dt>&lsquo;<samp>direct_blocksize</samp>&rsquo;</dt>
  3855. <dd><p>direct-qpel-blocksize bug (autodetected per fourcc/version)
  3856. </p></dd>
  3857. <dt>&lsquo;<samp>edge</samp>&rsquo;</dt>
  3858. <dd><p>edge padding bug (autodetected per fourcc/version)
  3859. </p></dd>
  3860. <dt>&lsquo;<samp>hpel_chroma</samp>&rsquo;</dt>
  3861. <dt>&lsquo;<samp>dc_clip</samp>&rsquo;</dt>
  3862. <dt>&lsquo;<samp>ms</samp>&rsquo;</dt>
  3863. <dd><p>Workaround various bugs in microsoft broken decoders.
  3864. </p></dd>
  3865. <dt>&lsquo;<samp>trunc</samp>&rsquo;</dt>
  3866. <dd><p>trancated frames
  3867. </p></dd>
  3868. </dl>
  3869. </dd>
  3870. <dt>&lsquo;<samp>lelim <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3871. <dd><p>Set single coefficient elimination threshold for luminance (negative
  3872. values also consider DC coefficient).
  3873. </p>
  3874. </dd>
  3875. <dt>&lsquo;<samp>celim <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3876. <dd><p>Set single coefficient elimination threshold for chrominance (negative
  3877. values also consider dc coefficient)
  3878. </p>
  3879. </dd>
  3880. <dt>&lsquo;<samp>strict <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>&rsquo;</dt>
  3881. <dd><p>Specify how strictly to follow the standards.
  3882. </p>
  3883. <p>Possible values:
  3884. </p><dl compact="compact">
  3885. <dt>&lsquo;<samp>very</samp>&rsquo;</dt>
  3886. <dd><p>strictly conform to an older more strict version of the spec or reference software
  3887. </p></dd>
  3888. <dt>&lsquo;<samp>strict</samp>&rsquo;</dt>
  3889. <dd><p>strictly conform to all the things in the spec no matter what consequences
  3890. </p></dd>
  3891. <dt>&lsquo;<samp>normal</samp>&rsquo;</dt>
  3892. <dt>&lsquo;<samp>unofficial</samp>&rsquo;</dt>
  3893. <dd><p>allow unofficial extensions
  3894. </p></dd>
  3895. <dt>&lsquo;<samp>experimental</samp>&rsquo;</dt>
  3896. <dd><p>allow non standardized experimental things, experimental
  3897. (unfinished/work in progress/not well tested) decoders and encoders.
  3898. Note: experimental decoders can pose a security risk, do not use this for
  3899. decoding untrusted input.
  3900. </p></dd>
  3901. </dl>
  3902. </dd>
  3903. <dt>&lsquo;<samp>b_qoffset <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3904. <dd><p>Set QP offset between P and B frames.
  3905. </p>
  3906. </dd>
  3907. <dt>&lsquo;<samp>err_detect <var>flags</var> (<em>decoding,audio,video</em>)</samp>&rsquo;</dt>
  3908. <dd><p>Set error detection flags.
  3909. </p>
  3910. <p>Possible values:
  3911. </p><dl compact="compact">
  3912. <dt>&lsquo;<samp>crccheck</samp>&rsquo;</dt>
  3913. <dd><p>verify embedded CRCs
  3914. </p></dd>
  3915. <dt>&lsquo;<samp>bitstream</samp>&rsquo;</dt>
  3916. <dd><p>detect bitstream specification deviations
  3917. </p></dd>
  3918. <dt>&lsquo;<samp>buffer</samp>&rsquo;</dt>
  3919. <dd><p>detect improper bitstream length
  3920. </p></dd>
  3921. <dt>&lsquo;<samp>explode</samp>&rsquo;</dt>
  3922. <dd><p>abort decoding on minor error detection
  3923. </p></dd>
  3924. <dt>&lsquo;<samp>ignore_err</samp>&rsquo;</dt>
  3925. <dd><p>ignore decoding errors, and continue decoding.
  3926. This is useful if you want to analyze the content of a video and thus want
  3927. everything to be decoded no matter what. This option will not result in a video
  3928. that is pleasing to watch in case of errors.
  3929. </p></dd>
  3930. <dt>&lsquo;<samp>careful</samp>&rsquo;</dt>
  3931. <dd><p>consider things that violate the spec and have not been seen in the wild as errors
  3932. </p></dd>
  3933. <dt>&lsquo;<samp>compliant</samp>&rsquo;</dt>
  3934. <dd><p>consider all spec non compliancies as errors
  3935. </p></dd>
  3936. <dt>&lsquo;<samp>aggressive</samp>&rsquo;</dt>
  3937. <dd><p>consider things that a sane encoder should not do as an error
  3938. </p></dd>
  3939. </dl>
  3940. </dd>
  3941. <dt>&lsquo;<samp>has_b_frames <var>integer</var></samp>&rsquo;</dt>
  3942. <dt>&lsquo;<samp>block_align <var>integer</var></samp>&rsquo;</dt>
  3943. <dt>&lsquo;<samp>mpeg_quant <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3944. <dd><p>Use MPEG quantizers instead of H.263.
  3945. </p>
  3946. </dd>
  3947. <dt>&lsquo;<samp>qsquish <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3948. <dd><p>How to keep quantizer between qmin and qmax (0 = clip, 1 = use
  3949. differentiable function).
  3950. </p>
  3951. </dd>
  3952. <dt>&lsquo;<samp>rc_qmod_amp <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3953. <dd><p>Set experimental quantizer modulation.
  3954. </p>
  3955. </dd>
  3956. <dt>&lsquo;<samp>rc_qmod_freq <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3957. <dd><p>Set experimental quantizer modulation.
  3958. </p>
  3959. </dd>
  3960. <dt>&lsquo;<samp>rc_override_count <var>integer</var></samp>&rsquo;</dt>
  3961. <dt>&lsquo;<samp>rc_eq <var>string</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3962. <dd><p>Set rate control equation. When computing the expression, besides the
  3963. standard functions defined in the section &rsquo;Expression Evaluation&rsquo;, the
  3964. following functions are available: bits2qp(bits), qp2bits(qp). Also
  3965. the following constants are available: iTex pTex tex mv fCode iCount
  3966. mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
  3967. avgTex.
  3968. </p>
  3969. </dd>
  3970. <dt>&lsquo;<samp>maxrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  3971. <dd><p>Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
  3972. </p>
  3973. </dd>
  3974. <dt>&lsquo;<samp>minrate <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  3975. <dd><p>Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR
  3976. encode. It is of little use elsewise.
  3977. </p>
  3978. </dd>
  3979. <dt>&lsquo;<samp>bufsize <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  3980. <dd><p>Set ratecontrol buffer size (in bits).
  3981. </p>
  3982. </dd>
  3983. <dt>&lsquo;<samp>rc_buf_aggressivity <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3984. <dd><p>Currently useless.
  3985. </p>
  3986. </dd>
  3987. <dt>&lsquo;<samp>i_qfactor <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3988. <dd><p>Set QP factor between P and I frames.
  3989. </p>
  3990. </dd>
  3991. <dt>&lsquo;<samp>i_qoffset <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3992. <dd><p>Set QP offset between P and I frames.
  3993. </p>
  3994. </dd>
  3995. <dt>&lsquo;<samp>rc_init_cplx <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  3996. <dd><p>Set initial complexity for 1-pass encoding.
  3997. </p>
  3998. </dd>
  3999. <dt>&lsquo;<samp>dct <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4000. <dd><p>Set DCT algorithm.
  4001. </p>
  4002. <p>Possible values:
  4003. </p><dl compact="compact">
  4004. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  4005. <dd><p>autoselect a good one (default)
  4006. </p></dd>
  4007. <dt>&lsquo;<samp>fastint</samp>&rsquo;</dt>
  4008. <dd><p>fast integer
  4009. </p></dd>
  4010. <dt>&lsquo;<samp>int</samp>&rsquo;</dt>
  4011. <dd><p>accurate integer
  4012. </p></dd>
  4013. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  4014. <dt>&lsquo;<samp>altivec</samp>&rsquo;</dt>
  4015. <dt>&lsquo;<samp>faan</samp>&rsquo;</dt>
  4016. <dd><p>floating point AAN DCT
  4017. </p></dd>
  4018. </dl>
  4019. </dd>
  4020. <dt>&lsquo;<samp>lumi_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4021. <dd><p>Compress bright areas stronger than medium ones.
  4022. </p>
  4023. </dd>
  4024. <dt>&lsquo;<samp>tcplx_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4025. <dd><p>Set temporal complexity masking.
  4026. </p>
  4027. </dd>
  4028. <dt>&lsquo;<samp>scplx_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4029. <dd><p>Set spatial complexity masking.
  4030. </p>
  4031. </dd>
  4032. <dt>&lsquo;<samp>p_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4033. <dd><p>Set inter masking.
  4034. </p>
  4035. </dd>
  4036. <dt>&lsquo;<samp>dark_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4037. <dd><p>Compress dark areas stronger than medium ones.
  4038. </p>
  4039. </dd>
  4040. <dt>&lsquo;<samp>idct <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4041. <dd><p>Select IDCT implementation.
  4042. </p>
  4043. <p>Possible values:
  4044. </p><dl compact="compact">
  4045. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  4046. <dt>&lsquo;<samp>int</samp>&rsquo;</dt>
  4047. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  4048. <dt>&lsquo;<samp>simplemmx</samp>&rsquo;</dt>
  4049. <dt>&lsquo;<samp>simpleauto</samp>&rsquo;</dt>
  4050. <dd><p>Automatically pick a IDCT compatible with the simple one
  4051. </p>
  4052. </dd>
  4053. <dt>&lsquo;<samp>arm</samp>&rsquo;</dt>
  4054. <dt>&lsquo;<samp>altivec</samp>&rsquo;</dt>
  4055. <dt>&lsquo;<samp>sh4</samp>&rsquo;</dt>
  4056. <dt>&lsquo;<samp>simplearm</samp>&rsquo;</dt>
  4057. <dt>&lsquo;<samp>simplearmv5te</samp>&rsquo;</dt>
  4058. <dt>&lsquo;<samp>simplearmv6</samp>&rsquo;</dt>
  4059. <dt>&lsquo;<samp>simpleneon</samp>&rsquo;</dt>
  4060. <dt>&lsquo;<samp>simplealpha</samp>&rsquo;</dt>
  4061. <dt>&lsquo;<samp>ipp</samp>&rsquo;</dt>
  4062. <dt>&lsquo;<samp>xvidmmx</samp>&rsquo;</dt>
  4063. <dt>&lsquo;<samp>faani</samp>&rsquo;</dt>
  4064. <dd><p>floating point AAN IDCT
  4065. </p></dd>
  4066. </dl>
  4067. </dd>
  4068. <dt>&lsquo;<samp>slice_count <var>integer</var></samp>&rsquo;</dt>
  4069. <dt>&lsquo;<samp>ec <var>flags</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  4070. <dd><p>Set error concealment strategy.
  4071. </p>
  4072. <p>Possible values:
  4073. </p><dl compact="compact">
  4074. <dt>&lsquo;<samp>guess_mvs</samp>&rsquo;</dt>
  4075. <dd><p>iterative motion vector (MV) search (slow)
  4076. </p></dd>
  4077. <dt>&lsquo;<samp>deblock</samp>&rsquo;</dt>
  4078. <dd><p>use strong deblock filter for damaged MBs
  4079. </p></dd>
  4080. <dt>&lsquo;<samp>favor_inter</samp>&rsquo;</dt>
  4081. <dd><p>favor predicting from the previous frame instead of the current
  4082. </p></dd>
  4083. </dl>
  4084. </dd>
  4085. <dt>&lsquo;<samp>bits_per_coded_sample <var>integer</var></samp>&rsquo;</dt>
  4086. <dt>&lsquo;<samp>pred <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4087. <dd><p>Set prediction method.
  4088. </p>
  4089. <p>Possible values:
  4090. </p><dl compact="compact">
  4091. <dt>&lsquo;<samp>left</samp>&rsquo;</dt>
  4092. <dt>&lsquo;<samp>plane</samp>&rsquo;</dt>
  4093. <dt>&lsquo;<samp>median</samp>&rsquo;</dt>
  4094. </dl>
  4095. </dd>
  4096. <dt>&lsquo;<samp>aspect <var>rational number</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4097. <dd><p>Set sample aspect ratio.
  4098. </p>
  4099. </dd>
  4100. <dt>&lsquo;<samp>sar <var>rational number</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4101. <dd><p>Set sample aspect ratio. Alias to <var>aspect</var>.
  4102. </p>
  4103. </dd>
  4104. <dt>&lsquo;<samp>debug <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>&rsquo;</dt>
  4105. <dd><p>Print specific debug info.
  4106. </p>
  4107. <p>Possible values:
  4108. </p><dl compact="compact">
  4109. <dt>&lsquo;<samp>pict</samp>&rsquo;</dt>
  4110. <dd><p>picture info
  4111. </p></dd>
  4112. <dt>&lsquo;<samp>rc</samp>&rsquo;</dt>
  4113. <dd><p>rate control
  4114. </p></dd>
  4115. <dt>&lsquo;<samp>bitstream</samp>&rsquo;</dt>
  4116. <dt>&lsquo;<samp>mb_type</samp>&rsquo;</dt>
  4117. <dd><p>macroblock (MB) type
  4118. </p></dd>
  4119. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  4120. <dd><p>per-block quantization parameter (QP)
  4121. </p></dd>
  4122. <dt>&lsquo;<samp>dct_coeff</samp>&rsquo;</dt>
  4123. <dt>&lsquo;<samp>green_metadata</samp>&rsquo;</dt>
  4124. <dd><p>display complexity metadata for the upcoming frame, GoP or for a given duration.
  4125. </p>
  4126. </dd>
  4127. <dt>&lsquo;<samp>skip</samp>&rsquo;</dt>
  4128. <dt>&lsquo;<samp>startcode</samp>&rsquo;</dt>
  4129. <dt>&lsquo;<samp>er</samp>&rsquo;</dt>
  4130. <dd><p>error recognition
  4131. </p></dd>
  4132. <dt>&lsquo;<samp>mmco</samp>&rsquo;</dt>
  4133. <dd><p>memory management control operations (H.264)
  4134. </p></dd>
  4135. <dt>&lsquo;<samp>bugs</samp>&rsquo;</dt>
  4136. <dt>&lsquo;<samp>buffers</samp>&rsquo;</dt>
  4137. <dd><p>picture buffer allocations
  4138. </p></dd>
  4139. <dt>&lsquo;<samp>thread_ops</samp>&rsquo;</dt>
  4140. <dd><p>threading operations
  4141. </p></dd>
  4142. <dt>&lsquo;<samp>nomc</samp>&rsquo;</dt>
  4143. <dd><p>skip motion compensation
  4144. </p></dd>
  4145. </dl>
  4146. </dd>
  4147. <dt>&lsquo;<samp>cmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4148. <dd><p>Set full pel me compare function.
  4149. </p>
  4150. <p>Possible values:
  4151. </p><dl compact="compact">
  4152. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4153. <dd><p>sum of absolute differences, fast (default)
  4154. </p></dd>
  4155. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4156. <dd><p>sum of squared errors
  4157. </p></dd>
  4158. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4159. <dd><p>sum of absolute Hadamard transformed differences
  4160. </p></dd>
  4161. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4162. <dd><p>sum of absolute DCT transformed differences
  4163. </p></dd>
  4164. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4165. <dd><p>sum of squared quantization errors (avoid, low quality)
  4166. </p></dd>
  4167. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4168. <dd><p>number of bits needed for the block
  4169. </p></dd>
  4170. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4171. <dd><p>rate distortion optimal, slow
  4172. </p></dd>
  4173. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4174. <dd><p>0
  4175. </p></dd>
  4176. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4177. <dd><p>sum of absolute vertical differences
  4178. </p></dd>
  4179. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4180. <dd><p>sum of squared vertical differences
  4181. </p></dd>
  4182. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4183. <dd><p>noise preserving sum of squared differences
  4184. </p></dd>
  4185. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4186. <dd><p>5/3 wavelet, only used in snow
  4187. </p></dd>
  4188. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4189. <dd><p>9/7 wavelet, only used in snow
  4190. </p></dd>
  4191. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4192. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4193. </dl>
  4194. </dd>
  4195. <dt>&lsquo;<samp>subcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4196. <dd><p>Set sub pel me compare function.
  4197. </p>
  4198. <p>Possible values:
  4199. </p><dl compact="compact">
  4200. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4201. <dd><p>sum of absolute differences, fast (default)
  4202. </p></dd>
  4203. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4204. <dd><p>sum of squared errors
  4205. </p></dd>
  4206. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4207. <dd><p>sum of absolute Hadamard transformed differences
  4208. </p></dd>
  4209. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4210. <dd><p>sum of absolute DCT transformed differences
  4211. </p></dd>
  4212. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4213. <dd><p>sum of squared quantization errors (avoid, low quality)
  4214. </p></dd>
  4215. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4216. <dd><p>number of bits needed for the block
  4217. </p></dd>
  4218. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4219. <dd><p>rate distortion optimal, slow
  4220. </p></dd>
  4221. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4222. <dd><p>0
  4223. </p></dd>
  4224. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4225. <dd><p>sum of absolute vertical differences
  4226. </p></dd>
  4227. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4228. <dd><p>sum of squared vertical differences
  4229. </p></dd>
  4230. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4231. <dd><p>noise preserving sum of squared differences
  4232. </p></dd>
  4233. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4234. <dd><p>5/3 wavelet, only used in snow
  4235. </p></dd>
  4236. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4237. <dd><p>9/7 wavelet, only used in snow
  4238. </p></dd>
  4239. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4240. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4241. </dl>
  4242. </dd>
  4243. <dt>&lsquo;<samp>mbcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4244. <dd><p>Set macroblock compare function.
  4245. </p>
  4246. <p>Possible values:
  4247. </p><dl compact="compact">
  4248. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4249. <dd><p>sum of absolute differences, fast (default)
  4250. </p></dd>
  4251. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4252. <dd><p>sum of squared errors
  4253. </p></dd>
  4254. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4255. <dd><p>sum of absolute Hadamard transformed differences
  4256. </p></dd>
  4257. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4258. <dd><p>sum of absolute DCT transformed differences
  4259. </p></dd>
  4260. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4261. <dd><p>sum of squared quantization errors (avoid, low quality)
  4262. </p></dd>
  4263. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4264. <dd><p>number of bits needed for the block
  4265. </p></dd>
  4266. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4267. <dd><p>rate distortion optimal, slow
  4268. </p></dd>
  4269. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4270. <dd><p>0
  4271. </p></dd>
  4272. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4273. <dd><p>sum of absolute vertical differences
  4274. </p></dd>
  4275. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4276. <dd><p>sum of squared vertical differences
  4277. </p></dd>
  4278. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4279. <dd><p>noise preserving sum of squared differences
  4280. </p></dd>
  4281. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4282. <dd><p>5/3 wavelet, only used in snow
  4283. </p></dd>
  4284. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4285. <dd><p>9/7 wavelet, only used in snow
  4286. </p></dd>
  4287. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4288. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4289. </dl>
  4290. </dd>
  4291. <dt>&lsquo;<samp>ildctcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4292. <dd><p>Set interlaced dct compare function.
  4293. </p>
  4294. <p>Possible values:
  4295. </p><dl compact="compact">
  4296. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4297. <dd><p>sum of absolute differences, fast (default)
  4298. </p></dd>
  4299. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4300. <dd><p>sum of squared errors
  4301. </p></dd>
  4302. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4303. <dd><p>sum of absolute Hadamard transformed differences
  4304. </p></dd>
  4305. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4306. <dd><p>sum of absolute DCT transformed differences
  4307. </p></dd>
  4308. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4309. <dd><p>sum of squared quantization errors (avoid, low quality)
  4310. </p></dd>
  4311. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4312. <dd><p>number of bits needed for the block
  4313. </p></dd>
  4314. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4315. <dd><p>rate distortion optimal, slow
  4316. </p></dd>
  4317. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4318. <dd><p>0
  4319. </p></dd>
  4320. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4321. <dd><p>sum of absolute vertical differences
  4322. </p></dd>
  4323. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4324. <dd><p>sum of squared vertical differences
  4325. </p></dd>
  4326. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4327. <dd><p>noise preserving sum of squared differences
  4328. </p></dd>
  4329. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4330. <dd><p>5/3 wavelet, only used in snow
  4331. </p></dd>
  4332. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4333. <dd><p>9/7 wavelet, only used in snow
  4334. </p></dd>
  4335. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4336. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4337. </dl>
  4338. </dd>
  4339. <dt>&lsquo;<samp>dia_size <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4340. <dd><p>Set diamond type &amp; size for motion estimation.
  4341. </p>
  4342. </dd>
  4343. <dt>&lsquo;<samp>last_pred <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4344. <dd><p>Set amount of motion predictors from the previous frame.
  4345. </p>
  4346. </dd>
  4347. <dt>&lsquo;<samp>preme <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4348. <dd><p>Set pre motion estimation.
  4349. </p>
  4350. </dd>
  4351. <dt>&lsquo;<samp>precmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4352. <dd><p>Set pre motion estimation compare function.
  4353. </p>
  4354. <p>Possible values:
  4355. </p><dl compact="compact">
  4356. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4357. <dd><p>sum of absolute differences, fast (default)
  4358. </p></dd>
  4359. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4360. <dd><p>sum of squared errors
  4361. </p></dd>
  4362. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4363. <dd><p>sum of absolute Hadamard transformed differences
  4364. </p></dd>
  4365. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4366. <dd><p>sum of absolute DCT transformed differences
  4367. </p></dd>
  4368. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4369. <dd><p>sum of squared quantization errors (avoid, low quality)
  4370. </p></dd>
  4371. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4372. <dd><p>number of bits needed for the block
  4373. </p></dd>
  4374. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4375. <dd><p>rate distortion optimal, slow
  4376. </p></dd>
  4377. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4378. <dd><p>0
  4379. </p></dd>
  4380. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4381. <dd><p>sum of absolute vertical differences
  4382. </p></dd>
  4383. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4384. <dd><p>sum of squared vertical differences
  4385. </p></dd>
  4386. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4387. <dd><p>noise preserving sum of squared differences
  4388. </p></dd>
  4389. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4390. <dd><p>5/3 wavelet, only used in snow
  4391. </p></dd>
  4392. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4393. <dd><p>9/7 wavelet, only used in snow
  4394. </p></dd>
  4395. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4396. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4397. </dl>
  4398. </dd>
  4399. <dt>&lsquo;<samp>pre_dia_size <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4400. <dd><p>Set diamond type &amp; size for motion estimation pre-pass.
  4401. </p>
  4402. </dd>
  4403. <dt>&lsquo;<samp>subq <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4404. <dd><p>Set sub pel motion estimation quality.
  4405. </p>
  4406. </dd>
  4407. <dt>&lsquo;<samp>dtg_active_format <var>integer</var></samp>&rsquo;</dt>
  4408. <dt>&lsquo;<samp>me_range <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4409. <dd><p>Set limit motion vectors range (1023 for DivX player).
  4410. </p>
  4411. </dd>
  4412. <dt>&lsquo;<samp>ibias <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4413. <dd><p>Set intra quant bias.
  4414. </p>
  4415. </dd>
  4416. <dt>&lsquo;<samp>pbias <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4417. <dd><p>Set inter quant bias.
  4418. </p>
  4419. </dd>
  4420. <dt>&lsquo;<samp>color_table_id <var>integer</var></samp>&rsquo;</dt>
  4421. <dt>&lsquo;<samp>global_quality <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  4422. <dt>&lsquo;<samp>coder <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4423. <dd>
  4424. <p>Possible values:
  4425. </p><dl compact="compact">
  4426. <dt>&lsquo;<samp>vlc</samp>&rsquo;</dt>
  4427. <dd><p>variable length coder / huffman coder
  4428. </p></dd>
  4429. <dt>&lsquo;<samp>ac</samp>&rsquo;</dt>
  4430. <dd><p>arithmetic coder
  4431. </p></dd>
  4432. <dt>&lsquo;<samp>raw</samp>&rsquo;</dt>
  4433. <dd><p>raw (no encoding)
  4434. </p></dd>
  4435. <dt>&lsquo;<samp>rle</samp>&rsquo;</dt>
  4436. <dd><p>run-length coder
  4437. </p></dd>
  4438. <dt>&lsquo;<samp>deflate</samp>&rsquo;</dt>
  4439. <dd><p>deflate-based coder
  4440. </p></dd>
  4441. </dl>
  4442. </dd>
  4443. <dt>&lsquo;<samp>context <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4444. <dd><p>Set context model.
  4445. </p>
  4446. </dd>
  4447. <dt>&lsquo;<samp>slice_flags <var>integer</var></samp>&rsquo;</dt>
  4448. <dt>&lsquo;<samp>mbd <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4449. <dd><p>Set macroblock decision algorithm (high quality mode).
  4450. </p>
  4451. <p>Possible values:
  4452. </p><dl compact="compact">
  4453. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  4454. <dd><p>use mbcmp (default)
  4455. </p></dd>
  4456. <dt>&lsquo;<samp>bits</samp>&rsquo;</dt>
  4457. <dd><p>use fewest bits
  4458. </p></dd>
  4459. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4460. <dd><p>use best rate distortion
  4461. </p></dd>
  4462. </dl>
  4463. </dd>
  4464. <dt>&lsquo;<samp>stream_codec_tag <var>integer</var></samp>&rsquo;</dt>
  4465. <dt>&lsquo;<samp>sc_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4466. <dd><p>Set scene change threshold.
  4467. </p>
  4468. </dd>
  4469. <dt>&lsquo;<samp>lmin <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4470. <dd><p>Set min lagrange factor (VBR).
  4471. </p>
  4472. </dd>
  4473. <dt>&lsquo;<samp>lmax <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4474. <dd><p>Set max lagrange factor (VBR).
  4475. </p>
  4476. </dd>
  4477. <dt>&lsquo;<samp>nr <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4478. <dd><p>Set noise reduction.
  4479. </p>
  4480. </dd>
  4481. <dt>&lsquo;<samp>rc_init_occupancy <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4482. <dd><p>Set number of bits which should be loaded into the rc buffer before
  4483. decoding starts.
  4484. </p>
  4485. </dd>
  4486. <dt>&lsquo;<samp>flags2 <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>&rsquo;</dt>
  4487. <dd>
  4488. <p>Possible values:
  4489. </p><dl compact="compact">
  4490. <dt>&lsquo;<samp>fast</samp>&rsquo;</dt>
  4491. <dd><p>Allow non spec compliant speedup tricks.
  4492. </p></dd>
  4493. <dt>&lsquo;<samp>noout</samp>&rsquo;</dt>
  4494. <dd><p>Skip bitstream encoding.
  4495. </p></dd>
  4496. <dt>&lsquo;<samp>ignorecrop</samp>&rsquo;</dt>
  4497. <dd><p>Ignore cropping information from sps.
  4498. </p></dd>
  4499. <dt>&lsquo;<samp>local_header</samp>&rsquo;</dt>
  4500. <dd><p>Place global headers at every keyframe instead of in extradata.
  4501. </p></dd>
  4502. <dt>&lsquo;<samp>chunks</samp>&rsquo;</dt>
  4503. <dd><p>Frame data might be split into multiple chunks.
  4504. </p></dd>
  4505. <dt>&lsquo;<samp>showall</samp>&rsquo;</dt>
  4506. <dd><p>Show all frames before the first keyframe.
  4507. </p></dd>
  4508. <dt>&lsquo;<samp>export_mvs</samp>&rsquo;</dt>
  4509. <dd><p>Export motion vectors into frame side-data (see <code>AV_FRAME_DATA_MOTION_VECTORS</code>)
  4510. for codecs that support it. See also &lsquo;<tt>doc/examples/export_mvs.c</tt>&rsquo;.
  4511. </p></dd>
  4512. <dt>&lsquo;<samp>skip_manual</samp>&rsquo;</dt>
  4513. <dd><p>Do not skip samples and export skip information as frame side data.
  4514. </p></dd>
  4515. <dt>&lsquo;<samp>ass_ro_flush_noop</samp>&rsquo;</dt>
  4516. <dd><p>Do not reset ASS ReadOrder field on flush.
  4517. </p></dd>
  4518. </dl>
  4519. </dd>
  4520. <dt>&lsquo;<samp>export_side_data <var>flags</var> (<em>decoding/encoding,audio,video,subtitles</em>)</samp>&rsquo;</dt>
  4521. <dd>
  4522. <p>Possible values:
  4523. </p><dl compact="compact">
  4524. <dt>&lsquo;<samp>mvs</samp>&rsquo;</dt>
  4525. <dd><p>Export motion vectors into frame side-data (see <code>AV_FRAME_DATA_MOTION_VECTORS</code>)
  4526. for codecs that support it. See also &lsquo;<tt>doc/examples/export_mvs.c</tt>&rsquo;.
  4527. </p></dd>
  4528. <dt>&lsquo;<samp>prft</samp>&rsquo;</dt>
  4529. <dd><p>Export encoder Producer Reference Time into packet side-data (see <code>AV_PKT_DATA_PRFT</code>)
  4530. for codecs that support it.
  4531. </p></dd>
  4532. </dl>
  4533. </dd>
  4534. <dt>&lsquo;<samp>error <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4535. <dt>&lsquo;<samp>qns <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4536. <dd><p>Deprecated, use mpegvideo private options instead.
  4537. </p>
  4538. </dd>
  4539. <dt>&lsquo;<samp>threads <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4540. <dd><p>Set the number of threads to be used, in case the selected codec
  4541. implementation supports multi-threading.
  4542. </p>
  4543. <p>Possible values:
  4544. </p><dl compact="compact">
  4545. <dt>&lsquo;<samp>auto, 0</samp>&rsquo;</dt>
  4546. <dd><p>automatically select the number of threads to set
  4547. </p></dd>
  4548. </dl>
  4549. <p>Default value is &lsquo;<samp>auto</samp>&rsquo;.
  4550. </p>
  4551. </dd>
  4552. <dt>&lsquo;<samp>me_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4553. <dd><p>Set motion estimation threshold.
  4554. </p>
  4555. </dd>
  4556. <dt>&lsquo;<samp>mb_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4557. <dd><p>Set macroblock threshold.
  4558. </p>
  4559. </dd>
  4560. <dt>&lsquo;<samp>dc <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4561. <dd><p>Set intra_dc_precision.
  4562. </p>
  4563. </dd>
  4564. <dt>&lsquo;<samp>nssew <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4565. <dd><p>Set nsse weight.
  4566. </p>
  4567. </dd>
  4568. <dt>&lsquo;<samp>skip_top <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  4569. <dd><p>Set number of macroblock rows at the top which are skipped.
  4570. </p>
  4571. </dd>
  4572. <dt>&lsquo;<samp>skip_bottom <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  4573. <dd><p>Set number of macroblock rows at the bottom which are skipped.
  4574. </p>
  4575. </dd>
  4576. <dt>&lsquo;<samp>profile <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  4577. <dd>
  4578. <p>Possible values:
  4579. </p><dl compact="compact">
  4580. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  4581. <dt>&lsquo;<samp>aac_main</samp>&rsquo;</dt>
  4582. <dt>&lsquo;<samp>aac_low</samp>&rsquo;</dt>
  4583. <dt>&lsquo;<samp>aac_ssr</samp>&rsquo;</dt>
  4584. <dt>&lsquo;<samp>aac_ltp</samp>&rsquo;</dt>
  4585. <dt>&lsquo;<samp>aac_he</samp>&rsquo;</dt>
  4586. <dt>&lsquo;<samp>aac_he_v2</samp>&rsquo;</dt>
  4587. <dt>&lsquo;<samp>aac_ld</samp>&rsquo;</dt>
  4588. <dt>&lsquo;<samp>aac_eld</samp>&rsquo;</dt>
  4589. <dt>&lsquo;<samp>mpeg2_aac_low</samp>&rsquo;</dt>
  4590. <dt>&lsquo;<samp>mpeg2_aac_he</samp>&rsquo;</dt>
  4591. <dt>&lsquo;<samp>mpeg4_sp</samp>&rsquo;</dt>
  4592. <dt>&lsquo;<samp>mpeg4_core</samp>&rsquo;</dt>
  4593. <dt>&lsquo;<samp>mpeg4_main</samp>&rsquo;</dt>
  4594. <dt>&lsquo;<samp>mpeg4_asp</samp>&rsquo;</dt>
  4595. <dt>&lsquo;<samp>dts</samp>&rsquo;</dt>
  4596. <dt>&lsquo;<samp>dts_es</samp>&rsquo;</dt>
  4597. <dt>&lsquo;<samp>dts_96_24</samp>&rsquo;</dt>
  4598. <dt>&lsquo;<samp>dts_hd_hra</samp>&rsquo;</dt>
  4599. <dt>&lsquo;<samp>dts_hd_ma</samp>&rsquo;</dt>
  4600. </dl>
  4601. </dd>
  4602. <dt>&lsquo;<samp>level <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  4603. <dd>
  4604. <p>Possible values:
  4605. </p><dl compact="compact">
  4606. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  4607. </dl>
  4608. </dd>
  4609. <dt>&lsquo;<samp>lowres <var>integer</var> (<em>decoding,audio,video</em>)</samp>&rsquo;</dt>
  4610. <dd><p>Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
  4611. </p>
  4612. </dd>
  4613. <dt>&lsquo;<samp>skip_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4614. <dd><p>Set frame skip threshold.
  4615. </p>
  4616. </dd>
  4617. <dt>&lsquo;<samp>skip_factor <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4618. <dd><p>Set frame skip factor.
  4619. </p>
  4620. </dd>
  4621. <dt>&lsquo;<samp>skip_exp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4622. <dd><p>Set frame skip exponent.
  4623. Negative values behave identical to the corresponding positive ones, except
  4624. that the score is normalized.
  4625. Positive values exist primarily for compatibility reasons and are not so useful.
  4626. </p>
  4627. </dd>
  4628. <dt>&lsquo;<samp>skipcmp <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4629. <dd><p>Set frame skip compare function.
  4630. </p>
  4631. <p>Possible values:
  4632. </p><dl compact="compact">
  4633. <dt>&lsquo;<samp>sad</samp>&rsquo;</dt>
  4634. <dd><p>sum of absolute differences, fast (default)
  4635. </p></dd>
  4636. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  4637. <dd><p>sum of squared errors
  4638. </p></dd>
  4639. <dt>&lsquo;<samp>satd</samp>&rsquo;</dt>
  4640. <dd><p>sum of absolute Hadamard transformed differences
  4641. </p></dd>
  4642. <dt>&lsquo;<samp>dct</samp>&rsquo;</dt>
  4643. <dd><p>sum of absolute DCT transformed differences
  4644. </p></dd>
  4645. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  4646. <dd><p>sum of squared quantization errors (avoid, low quality)
  4647. </p></dd>
  4648. <dt>&lsquo;<samp>bit</samp>&rsquo;</dt>
  4649. <dd><p>number of bits needed for the block
  4650. </p></dd>
  4651. <dt>&lsquo;<samp>rd</samp>&rsquo;</dt>
  4652. <dd><p>rate distortion optimal, slow
  4653. </p></dd>
  4654. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  4655. <dd><p>0
  4656. </p></dd>
  4657. <dt>&lsquo;<samp>vsad</samp>&rsquo;</dt>
  4658. <dd><p>sum of absolute vertical differences
  4659. </p></dd>
  4660. <dt>&lsquo;<samp>vsse</samp>&rsquo;</dt>
  4661. <dd><p>sum of squared vertical differences
  4662. </p></dd>
  4663. <dt>&lsquo;<samp>nsse</samp>&rsquo;</dt>
  4664. <dd><p>noise preserving sum of squared differences
  4665. </p></dd>
  4666. <dt>&lsquo;<samp>w53</samp>&rsquo;</dt>
  4667. <dd><p>5/3 wavelet, only used in snow
  4668. </p></dd>
  4669. <dt>&lsquo;<samp>w97</samp>&rsquo;</dt>
  4670. <dd><p>9/7 wavelet, only used in snow
  4671. </p></dd>
  4672. <dt>&lsquo;<samp>dctmax</samp>&rsquo;</dt>
  4673. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  4674. </dl>
  4675. </dd>
  4676. <dt>&lsquo;<samp>border_mask <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4677. <dd><p>Increase the quantizer for macroblocks close to borders.
  4678. </p>
  4679. </dd>
  4680. <dt>&lsquo;<samp>mblmin <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4681. <dd><p>Set min macroblock lagrange factor (VBR).
  4682. </p>
  4683. </dd>
  4684. <dt>&lsquo;<samp>mblmax <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4685. <dd><p>Set max macroblock lagrange factor (VBR).
  4686. </p>
  4687. </dd>
  4688. <dt>&lsquo;<samp>mepc <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4689. <dd><p>Set motion estimation bitrate penalty compensation (1.0 = 256).
  4690. </p>
  4691. </dd>
  4692. <dt>&lsquo;<samp>skip_loop_filter <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  4693. <dt>&lsquo;<samp>skip_idct <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  4694. <dt>&lsquo;<samp>skip_frame <var>integer</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  4695. <dd>
  4696. <p>Make decoder discard processing depending on the frame type selected
  4697. by the option value.
  4698. </p>
  4699. <p>&lsquo;<samp>skip_loop_filter</samp>&rsquo; skips frame loop filtering, &lsquo;<samp>skip_idct</samp>&rsquo;
  4700. skips frame IDCT/dequantization, &lsquo;<samp>skip_frame</samp>&rsquo; skips decoding.
  4701. </p>
  4702. <p>Possible values:
  4703. </p><dl compact="compact">
  4704. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  4705. <dd><p>Discard no frame.
  4706. </p>
  4707. </dd>
  4708. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  4709. <dd><p>Discard useless frames like 0-sized frames.
  4710. </p>
  4711. </dd>
  4712. <dt>&lsquo;<samp>noref</samp>&rsquo;</dt>
  4713. <dd><p>Discard all non-reference frames.
  4714. </p>
  4715. </dd>
  4716. <dt>&lsquo;<samp>bidir</samp>&rsquo;</dt>
  4717. <dd><p>Discard all bidirectional frames.
  4718. </p>
  4719. </dd>
  4720. <dt>&lsquo;<samp>nokey</samp>&rsquo;</dt>
  4721. <dd><p>Discard all frames excepts keyframes.
  4722. </p>
  4723. </dd>
  4724. <dt>&lsquo;<samp>nointra</samp>&rsquo;</dt>
  4725. <dd><p>Discard all frames except I frames.
  4726. </p>
  4727. </dd>
  4728. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  4729. <dd><p>Discard all frames.
  4730. </p></dd>
  4731. </dl>
  4732. <p>Default value is &lsquo;<samp>default</samp>&rsquo;.
  4733. </p>
  4734. </dd>
  4735. <dt>&lsquo;<samp>bidir_refine <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4736. <dd><p>Refine the two motion vectors used in bidirectional macroblocks.
  4737. </p>
  4738. </dd>
  4739. <dt>&lsquo;<samp>brd_scale <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4740. <dd><p>Downscale frames for dynamic B-frame decision.
  4741. </p>
  4742. </dd>
  4743. <dt>&lsquo;<samp>keyint_min <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4744. <dd><p>Set minimum interval between IDR-frames.
  4745. </p>
  4746. </dd>
  4747. <dt>&lsquo;<samp>refs <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4748. <dd><p>Set reference frames to consider for motion compensation.
  4749. </p>
  4750. </dd>
  4751. <dt>&lsquo;<samp>chromaoffset <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4752. <dd><p>Set chroma qp offset from luma.
  4753. </p>
  4754. </dd>
  4755. <dt>&lsquo;<samp>trellis <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  4756. <dd><p>Set rate-distortion optimal quantization.
  4757. </p>
  4758. </dd>
  4759. <dt>&lsquo;<samp>mv0_threshold <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4760. <dt>&lsquo;<samp>b_sensitivity <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4761. <dd><p>Adjust sensitivity of b_frame_strategy 1.
  4762. </p>
  4763. </dd>
  4764. <dt>&lsquo;<samp>compression_level <var>integer</var> (<em>encoding,audio,video</em>)</samp>&rsquo;</dt>
  4765. <dt>&lsquo;<samp>min_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
  4766. <dt>&lsquo;<samp>max_prediction_order <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
  4767. <dt>&lsquo;<samp>timecode_frame_start <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4768. <dd><p>Set GOP timecode frame start number, in non drop frame format.
  4769. </p>
  4770. </dd>
  4771. <dt>&lsquo;<samp>request_channels <var>integer</var> (<em>decoding,audio</em>)</samp>&rsquo;</dt>
  4772. <dd><p>Set desired number of audio channels.
  4773. </p>
  4774. </dd>
  4775. <dt>&lsquo;<samp>bits_per_raw_sample <var>integer</var></samp>&rsquo;</dt>
  4776. <dt>&lsquo;<samp>channel_layout <var>integer</var> (<em>decoding/encoding,audio</em>)</samp>&rsquo;</dt>
  4777. <dd>
  4778. <p>Possible values:
  4779. </p></dd>
  4780. <dt>&lsquo;<samp>request_channel_layout <var>integer</var> (<em>decoding,audio</em>)</samp>&rsquo;</dt>
  4781. <dd>
  4782. <p>Possible values:
  4783. </p></dd>
  4784. <dt>&lsquo;<samp>rc_max_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4785. <dt>&lsquo;<samp>rc_min_vbv_use <var>float</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4786. <dt>&lsquo;<samp>ticks_per_frame <var>integer</var> (<em>decoding/encoding,audio,video</em>)</samp>&rsquo;</dt>
  4787. <dt>&lsquo;<samp>color_primaries <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4788. <dd><p>Possible values:
  4789. </p><dl compact="compact">
  4790. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  4791. <dd><p>BT.709
  4792. </p></dd>
  4793. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  4794. <dd><p>BT.470 M
  4795. </p></dd>
  4796. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  4797. <dd><p>BT.470 BG
  4798. </p></dd>
  4799. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  4800. <dd><p>SMPTE 170 M
  4801. </p></dd>
  4802. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  4803. <dd><p>SMPTE 240 M
  4804. </p></dd>
  4805. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  4806. <dd><p>Film
  4807. </p></dd>
  4808. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  4809. <dd><p>BT.2020
  4810. </p></dd>
  4811. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  4812. <dt>&lsquo;<samp>smpte428_1</samp>&rsquo;</dt>
  4813. <dd><p>SMPTE ST 428-1
  4814. </p></dd>
  4815. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  4816. <dd><p>SMPTE 431-2
  4817. </p></dd>
  4818. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  4819. <dd><p>SMPTE 432-1
  4820. </p></dd>
  4821. <dt>&lsquo;<samp>jedec-p22</samp>&rsquo;</dt>
  4822. <dd><p>JEDEC P22
  4823. </p></dd>
  4824. </dl>
  4825. </dd>
  4826. <dt>&lsquo;<samp>color_trc <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4827. <dd><p>Possible values:
  4828. </p><dl compact="compact">
  4829. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  4830. <dd><p>BT.709
  4831. </p></dd>
  4832. <dt>&lsquo;<samp>gamma22</samp>&rsquo;</dt>
  4833. <dd><p>BT.470 M
  4834. </p></dd>
  4835. <dt>&lsquo;<samp>gamma28</samp>&rsquo;</dt>
  4836. <dd><p>BT.470 BG
  4837. </p></dd>
  4838. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  4839. <dd><p>SMPTE 170 M
  4840. </p></dd>
  4841. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  4842. <dd><p>SMPTE 240 M
  4843. </p></dd>
  4844. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  4845. <dd><p>Linear
  4846. </p></dd>
  4847. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  4848. <dt>&lsquo;<samp>log100</samp>&rsquo;</dt>
  4849. <dd><p>Log
  4850. </p></dd>
  4851. <dt>&lsquo;<samp>log_sqrt</samp>&rsquo;</dt>
  4852. <dt>&lsquo;<samp>log316</samp>&rsquo;</dt>
  4853. <dd><p>Log square root
  4854. </p></dd>
  4855. <dt>&lsquo;<samp>iec61966_2_4</samp>&rsquo;</dt>
  4856. <dt>&lsquo;<samp>iec61966-2-4</samp>&rsquo;</dt>
  4857. <dd><p>IEC 61966-2-4
  4858. </p></dd>
  4859. <dt>&lsquo;<samp>bt1361</samp>&rsquo;</dt>
  4860. <dt>&lsquo;<samp>bt1361e</samp>&rsquo;</dt>
  4861. <dd><p>BT.1361
  4862. </p></dd>
  4863. <dt>&lsquo;<samp>iec61966_2_1</samp>&rsquo;</dt>
  4864. <dt>&lsquo;<samp>iec61966-2-1</samp>&rsquo;</dt>
  4865. <dd><p>IEC 61966-2-1
  4866. </p></dd>
  4867. <dt>&lsquo;<samp>bt2020_10</samp>&rsquo;</dt>
  4868. <dt>&lsquo;<samp>bt2020_10bit</samp>&rsquo;</dt>
  4869. <dd><p>BT.2020 - 10 bit
  4870. </p></dd>
  4871. <dt>&lsquo;<samp>bt2020_12</samp>&rsquo;</dt>
  4872. <dt>&lsquo;<samp>bt2020_12bit</samp>&rsquo;</dt>
  4873. <dd><p>BT.2020 - 12 bit
  4874. </p></dd>
  4875. <dt>&lsquo;<samp>smpte2084</samp>&rsquo;</dt>
  4876. <dd><p>SMPTE ST 2084
  4877. </p></dd>
  4878. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  4879. <dt>&lsquo;<samp>smpte428_1</samp>&rsquo;</dt>
  4880. <dd><p>SMPTE ST 428-1
  4881. </p></dd>
  4882. <dt>&lsquo;<samp>arib-std-b67</samp>&rsquo;</dt>
  4883. <dd><p>ARIB STD-B67
  4884. </p></dd>
  4885. </dl>
  4886. </dd>
  4887. <dt>&lsquo;<samp>colorspace <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4888. <dd><p>Possible values:
  4889. </p><dl compact="compact">
  4890. <dt>&lsquo;<samp>rgb</samp>&rsquo;</dt>
  4891. <dd><p>RGB
  4892. </p></dd>
  4893. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  4894. <dd><p>BT.709
  4895. </p></dd>
  4896. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  4897. <dd><p>FCC
  4898. </p></dd>
  4899. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  4900. <dd><p>BT.470 BG
  4901. </p></dd>
  4902. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  4903. <dd><p>SMPTE 170 M
  4904. </p></dd>
  4905. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  4906. <dd><p>SMPTE 240 M
  4907. </p></dd>
  4908. <dt>&lsquo;<samp>ycocg</samp>&rsquo;</dt>
  4909. <dd><p>YCOCG
  4910. </p></dd>
  4911. <dt>&lsquo;<samp>bt2020nc</samp>&rsquo;</dt>
  4912. <dt>&lsquo;<samp>bt2020_ncl</samp>&rsquo;</dt>
  4913. <dd><p>BT.2020 NCL
  4914. </p></dd>
  4915. <dt>&lsquo;<samp>bt2020c</samp>&rsquo;</dt>
  4916. <dt>&lsquo;<samp>bt2020_cl</samp>&rsquo;</dt>
  4917. <dd><p>BT.2020 CL
  4918. </p></dd>
  4919. <dt>&lsquo;<samp>smpte2085</samp>&rsquo;</dt>
  4920. <dd><p>SMPTE 2085
  4921. </p></dd>
  4922. </dl>
  4923. </dd>
  4924. <dt>&lsquo;<samp>color_range <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4925. <dd><p>If used as input parameter, it serves as a hint to the decoder, which
  4926. color_range the input has.
  4927. Possible values:
  4928. </p><dl compact="compact">
  4929. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  4930. <dt>&lsquo;<samp>mpeg</samp>&rsquo;</dt>
  4931. <dd><p>MPEG (219*2^(n-8))
  4932. </p></dd>
  4933. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  4934. <dt>&lsquo;<samp>jpeg</samp>&rsquo;</dt>
  4935. <dd><p>JPEG (2^n-1)
  4936. </p></dd>
  4937. </dl>
  4938. </dd>
  4939. <dt>&lsquo;<samp>chroma_sample_location <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4940. <dd><p>Possible values:
  4941. </p><dl compact="compact">
  4942. <dt>&lsquo;<samp>left</samp>&rsquo;</dt>
  4943. <dt>&lsquo;<samp>center</samp>&rsquo;</dt>
  4944. <dt>&lsquo;<samp>topleft</samp>&rsquo;</dt>
  4945. <dt>&lsquo;<samp>top</samp>&rsquo;</dt>
  4946. <dt>&lsquo;<samp>bottomleft</samp>&rsquo;</dt>
  4947. <dt>&lsquo;<samp>bottom</samp>&rsquo;</dt>
  4948. </dl>
  4949. </dd>
  4950. <dt>&lsquo;<samp>log_level_offset <var>integer</var></samp>&rsquo;</dt>
  4951. <dd><p>Set the log level offset.
  4952. </p>
  4953. </dd>
  4954. <dt>&lsquo;<samp>slices <var>integer</var> (<em>encoding,video</em>)</samp>&rsquo;</dt>
  4955. <dd><p>Number of slices, used in parallelized encoding.
  4956. </p>
  4957. </dd>
  4958. <dt>&lsquo;<samp>thread_type <var>flags</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  4959. <dd><p>Select which multithreading methods to use.
  4960. </p>
  4961. <p>Use of &lsquo;<samp>frame</samp>&rsquo; will increase decoding delay by one frame per
  4962. thread, so clients which cannot provide future frames should not use
  4963. it.
  4964. </p>
  4965. <p>Possible values:
  4966. </p><dl compact="compact">
  4967. <dt>&lsquo;<samp>slice</samp>&rsquo;</dt>
  4968. <dd><p>Decode more than one part of a single frame at once.
  4969. </p>
  4970. <p>Multithreading using slices works only when the video was encoded with
  4971. slices.
  4972. </p>
  4973. </dd>
  4974. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  4975. <dd><p>Decode more than one frame at once.
  4976. </p></dd>
  4977. </dl>
  4978. <p>Default value is &lsquo;<samp>slice+frame</samp>&rsquo;.
  4979. </p>
  4980. </dd>
  4981. <dt>&lsquo;<samp>audio_service_type <var>integer</var> (<em>encoding,audio</em>)</samp>&rsquo;</dt>
  4982. <dd><p>Set audio service type.
  4983. </p>
  4984. <p>Possible values:
  4985. </p><dl compact="compact">
  4986. <dt>&lsquo;<samp>ma</samp>&rsquo;</dt>
  4987. <dd><p>Main Audio Service
  4988. </p></dd>
  4989. <dt>&lsquo;<samp>ef</samp>&rsquo;</dt>
  4990. <dd><p>Effects
  4991. </p></dd>
  4992. <dt>&lsquo;<samp>vi</samp>&rsquo;</dt>
  4993. <dd><p>Visually Impaired
  4994. </p></dd>
  4995. <dt>&lsquo;<samp>hi</samp>&rsquo;</dt>
  4996. <dd><p>Hearing Impaired
  4997. </p></dd>
  4998. <dt>&lsquo;<samp>di</samp>&rsquo;</dt>
  4999. <dd><p>Dialogue
  5000. </p></dd>
  5001. <dt>&lsquo;<samp>co</samp>&rsquo;</dt>
  5002. <dd><p>Commentary
  5003. </p></dd>
  5004. <dt>&lsquo;<samp>em</samp>&rsquo;</dt>
  5005. <dd><p>Emergency
  5006. </p></dd>
  5007. <dt>&lsquo;<samp>vo</samp>&rsquo;</dt>
  5008. <dd><p>Voice Over
  5009. </p></dd>
  5010. <dt>&lsquo;<samp>ka</samp>&rsquo;</dt>
  5011. <dd><p>Karaoke
  5012. </p></dd>
  5013. </dl>
  5014. </dd>
  5015. <dt>&lsquo;<samp>request_sample_fmt <var>sample_fmt</var> (<em>decoding,audio</em>)</samp>&rsquo;</dt>
  5016. <dd><p>Set sample format audio decoders should prefer. Default value is
  5017. <code>none</code>.
  5018. </p>
  5019. </dd>
  5020. <dt>&lsquo;<samp>pkt_timebase <var>rational number</var></samp>&rsquo;</dt>
  5021. <dt>&lsquo;<samp>sub_charenc <var>encoding</var> (<em>decoding,subtitles</em>)</samp>&rsquo;</dt>
  5022. <dd><p>Set the input subtitles character encoding.
  5023. </p>
  5024. </dd>
  5025. <dt>&lsquo;<samp>field_order <var>field_order</var> (<em>video</em>)</samp>&rsquo;</dt>
  5026. <dd><p>Set/override the field order of the video.
  5027. Possible values:
  5028. </p><dl compact="compact">
  5029. <dt>&lsquo;<samp>progressive</samp>&rsquo;</dt>
  5030. <dd><p>Progressive video
  5031. </p></dd>
  5032. <dt>&lsquo;<samp>tt</samp>&rsquo;</dt>
  5033. <dd><p>Interlaced video, top field coded and displayed first
  5034. </p></dd>
  5035. <dt>&lsquo;<samp>bb</samp>&rsquo;</dt>
  5036. <dd><p>Interlaced video, bottom field coded and displayed first
  5037. </p></dd>
  5038. <dt>&lsquo;<samp>tb</samp>&rsquo;</dt>
  5039. <dd><p>Interlaced video, top coded first, bottom displayed first
  5040. </p></dd>
  5041. <dt>&lsquo;<samp>bt</samp>&rsquo;</dt>
  5042. <dd><p>Interlaced video, bottom coded first, top displayed first
  5043. </p></dd>
  5044. </dl>
  5045. </dd>
  5046. <dt>&lsquo;<samp>skip_alpha <var>bool</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  5047. <dd><p>Set to 1 to disable processing alpha (transparency). This works like the
  5048. &lsquo;<samp>gray</samp>&rsquo; flag in the &lsquo;<samp>flags</samp>&rsquo; option which skips chroma information
  5049. instead of alpha. Default is 0.
  5050. </p>
  5051. </dd>
  5052. <dt>&lsquo;<samp>codec_whitelist <var>list</var> (<em>input</em>)</samp>&rsquo;</dt>
  5053. <dd><p>&quot;,&quot; separated list of allowed decoders. By default all are allowed.
  5054. </p>
  5055. </dd>
  5056. <dt>&lsquo;<samp>dump_separator <var>string</var> (<em>input</em>)</samp>&rsquo;</dt>
  5057. <dd><p>Separator used to separate the fields printed on the command line about the
  5058. Stream parameters.
  5059. For example, to separate the fields with newlines and indentation:
  5060. </p><div class="example">
  5061. <pre class="example">ffprobe -dump_separator &quot;
  5062. &quot; -i ~/videos/matrixbench_mpeg2.mpg
  5063. </pre></div>
  5064. </dd>
  5065. <dt>&lsquo;<samp>max_pixels <var>integer</var> (<em>decoding/encoding,video</em>)</samp>&rsquo;</dt>
  5066. <dd><p>Maximum number of pixels per image. This value can be used to avoid out of
  5067. memory failures due to large images.
  5068. </p>
  5069. </dd>
  5070. <dt>&lsquo;<samp>apply_cropping <var>bool</var> (<em>decoding,video</em>)</samp>&rsquo;</dt>
  5071. <dd><p>Enable cropping if cropping parameters are multiples of the required
  5072. alignment for the left and top parameters. If the alignment is not met the
  5073. cropping will be partially applied to maintain alignment.
  5074. Default is 1 (enabled).
  5075. Note: The required alignment depends on if <code>AV_CODEC_FLAG_UNALIGNED</code> is set and the
  5076. CPU. <code>AV_CODEC_FLAG_UNALIGNED</code> cannot be changed from the command line. Also hardware
  5077. decoders will not apply left/top Cropping.
  5078. </p>
  5079. </dd>
  5080. </dl>
  5081. <a name="Decoders"></a>
  5082. <h1 class="chapter"><a href="ffplay-all.html#toc-Decoders">7 Decoders</a></h1>
  5083. <p>Decoders are configured elements in FFmpeg which allow the decoding of
  5084. multimedia streams.
  5085. </p>
  5086. <p>When you configure your FFmpeg build, all the supported native decoders
  5087. are enabled by default. Decoders requiring an external library must be enabled
  5088. manually via the corresponding <code>--enable-lib</code> option. You can list all
  5089. available decoders using the configure option <code>--list-decoders</code>.
  5090. </p>
  5091. <p>You can disable all the decoders with the configure option
  5092. <code>--disable-decoders</code> and selectively enable / disable single decoders
  5093. with the options <code>--enable-decoder=<var>DECODER</var></code> /
  5094. <code>--disable-decoder=<var>DECODER</var></code>.
  5095. </p>
  5096. <p>The option <code>-decoders</code> of the ff* tools will display the list of
  5097. enabled decoders.
  5098. </p>
  5099. <a name="Video-Decoders"></a>
  5100. <h1 class="chapter"><a href="ffplay-all.html#toc-Video-Decoders">8 Video Decoders</a></h1>
  5101. <p>A description of some of the currently available video decoders
  5102. follows.
  5103. </p>
  5104. <a name="rawvideo"></a>
  5105. <h2 class="section"><a href="ffplay-all.html#toc-rawvideo">8.1 rawvideo</a></h2>
  5106. <p>Raw video decoder.
  5107. </p>
  5108. <p>This decoder decodes rawvideo streams.
  5109. </p>
  5110. <a name="Options-11"></a>
  5111. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-11">8.1.1 Options</a></h3>
  5112. <dl compact="compact">
  5113. <dt>&lsquo;<samp>top <var>top_field_first</var></samp>&rsquo;</dt>
  5114. <dd><p>Specify the assumed field type of the input video.
  5115. </p><dl compact="compact">
  5116. <dt>&lsquo;<samp>-1</samp>&rsquo;</dt>
  5117. <dd><p>the video is assumed to be progressive (default)
  5118. </p></dd>
  5119. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  5120. <dd><p>bottom-field-first is assumed
  5121. </p></dd>
  5122. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  5123. <dd><p>top-field-first is assumed
  5124. </p></dd>
  5125. </dl>
  5126. </dd>
  5127. </dl>
  5128. <a name="libdav1d"></a>
  5129. <h2 class="section"><a href="ffplay-all.html#toc-libdav1d">8.2 libdav1d</a></h2>
  5130. <p>dav1d AV1 decoder.
  5131. </p>
  5132. <p>libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
  5133. Requires the presence of the libdav1d headers and library during configuration.
  5134. You need to explicitly configure the build with <code>--enable-libdav1d</code>.
  5135. </p>
  5136. <a name="Options-1"></a>
  5137. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-1">8.2.1 Options</a></h3>
  5138. <p>The following options are supported by the libdav1d wrapper.
  5139. </p>
  5140. <dl compact="compact">
  5141. <dt>&lsquo;<samp>framethreads</samp>&rsquo;</dt>
  5142. <dd><p>Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
  5143. </p>
  5144. </dd>
  5145. <dt>&lsquo;<samp>tilethreads</samp>&rsquo;</dt>
  5146. <dd><p>Set amount of tile threads to use during decoding. The default value is 0 (autodetect).
  5147. </p>
  5148. </dd>
  5149. <dt>&lsquo;<samp>filmgrain</samp>&rsquo;</dt>
  5150. <dd><p>Apply film grain to the decoded video if present in the bitstream. Defaults to the
  5151. internal default of the library.
  5152. </p>
  5153. </dd>
  5154. <dt>&lsquo;<samp>oppoint</samp>&rsquo;</dt>
  5155. <dd><p>Select an operating point of a scalable AV1 bitstream (0 - 31). Defaults to the
  5156. internal default of the library.
  5157. </p>
  5158. </dd>
  5159. <dt>&lsquo;<samp>alllayers</samp>&rsquo;</dt>
  5160. <dd><p>Output all spatial layers of a scalable AV1 bitstream. The default value is false.
  5161. </p>
  5162. </dd>
  5163. </dl>
  5164. <a name="libdavs2"></a>
  5165. <h2 class="section"><a href="ffplay-all.html#toc-libdavs2">8.3 libdavs2</a></h2>
  5166. <p>AVS2-P2/IEEE1857.4 video decoder wrapper.
  5167. </p>
  5168. <p>This decoder allows libavcodec to decode AVS2 streams with davs2 library.
  5169. </p>
  5170. <a name="Audio-Decoders"></a>
  5171. <h1 class="chapter"><a href="ffplay-all.html#toc-Audio-Decoders">9 Audio Decoders</a></h1>
  5172. <p>A description of some of the currently available audio decoders
  5173. follows.
  5174. </p>
  5175. <a name="ac3"></a>
  5176. <h2 class="section"><a href="ffplay-all.html#toc-ac3">9.1 ac3</a></h2>
  5177. <p>AC-3 audio decoder.
  5178. </p>
  5179. <p>This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as well as
  5180. the undocumented RealAudio 3 (a.k.a. dnet).
  5181. </p>
  5182. <a name="AC_002d3-Decoder-Options"></a>
  5183. <h3 class="subsection"><a href="ffplay-all.html#toc-AC_002d3-Decoder-Options">9.1.1 AC-3 Decoder Options</a></h3>
  5184. <dl compact="compact">
  5185. <dt>&lsquo;<samp>-drc_scale <var>value</var></samp>&rsquo;</dt>
  5186. <dd><p>Dynamic Range Scale Factor. The factor to apply to dynamic range values
  5187. from the AC-3 stream. This factor is applied exponentially.
  5188. There are 3 notable scale factor ranges:
  5189. </p><dl compact="compact">
  5190. <dt>&lsquo;<samp>drc_scale == 0</samp>&rsquo;</dt>
  5191. <dd><p>DRC disabled. Produces full range audio.
  5192. </p></dd>
  5193. <dt>&lsquo;<samp>0 &lt; drc_scale &lt;= 1</samp>&rsquo;</dt>
  5194. <dd><p>DRC enabled. Applies a fraction of the stream DRC value.
  5195. Audio reproduction is between full range and full compression.
  5196. </p></dd>
  5197. <dt>&lsquo;<samp>drc_scale &gt; 1</samp>&rsquo;</dt>
  5198. <dd><p>DRC enabled. Applies drc_scale asymmetrically.
  5199. Loud sounds are fully compressed. Soft sounds are enhanced.
  5200. </p></dd>
  5201. </dl>
  5202. </dd>
  5203. </dl>
  5204. <a name="flac"></a>
  5205. <h2 class="section"><a href="ffplay-all.html#toc-flac">9.2 flac</a></h2>
  5206. <p>FLAC audio decoder.
  5207. </p>
  5208. <p>This decoder aims to implement the complete FLAC specification from Xiph.
  5209. </p>
  5210. <a name="FLAC-Decoder-options"></a>
  5211. <h3 class="subsection"><a href="ffplay-all.html#toc-FLAC-Decoder-options">9.2.1 FLAC Decoder options</a></h3>
  5212. <dl compact="compact">
  5213. <dt>&lsquo;<samp>-use_buggy_lpc</samp>&rsquo;</dt>
  5214. <dd><p>The lavc FLAC encoder used to produce buggy streams with high lpc values
  5215. (like the default value). This option makes it possible to decode such streams
  5216. correctly by using lavc&rsquo;s old buggy lpc logic for decoding.
  5217. </p>
  5218. </dd>
  5219. </dl>
  5220. <a name="ffwavesynth"></a>
  5221. <h2 class="section"><a href="ffplay-all.html#toc-ffwavesynth">9.3 ffwavesynth</a></h2>
  5222. <p>Internal wave synthesizer.
  5223. </p>
  5224. <p>This decoder generates wave patterns according to predefined sequences. Its
  5225. use is purely internal and the format of the data it accepts is not publicly
  5226. documented.
  5227. </p>
  5228. <a name="libcelt"></a>
  5229. <h2 class="section"><a href="ffplay-all.html#toc-libcelt">9.4 libcelt</a></h2>
  5230. <p>libcelt decoder wrapper.
  5231. </p>
  5232. <p>libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
  5233. Requires the presence of the libcelt headers and library during configuration.
  5234. You need to explicitly configure the build with <code>--enable-libcelt</code>.
  5235. </p>
  5236. <a name="libgsm"></a>
  5237. <h2 class="section"><a href="ffplay-all.html#toc-libgsm">9.5 libgsm</a></h2>
  5238. <p>libgsm decoder wrapper.
  5239. </p>
  5240. <p>libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
  5241. the presence of the libgsm headers and library during configuration. You need
  5242. to explicitly configure the build with <code>--enable-libgsm</code>.
  5243. </p>
  5244. <p>This decoder supports both the ordinary GSM and the Microsoft variant.
  5245. </p>
  5246. <a name="libilbc"></a>
  5247. <h2 class="section"><a href="ffplay-all.html#toc-libilbc">9.6 libilbc</a></h2>
  5248. <p>libilbc decoder wrapper.
  5249. </p>
  5250. <p>libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
  5251. audio codec. Requires the presence of the libilbc headers and library during
  5252. configuration. You need to explicitly configure the build with
  5253. <code>--enable-libilbc</code>.
  5254. </p>
  5255. <a name="Options-22"></a>
  5256. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-22">9.6.1 Options</a></h3>
  5257. <p>The following option is supported by the libilbc wrapper.
  5258. </p>
  5259. <dl compact="compact">
  5260. <dt>&lsquo;<samp>enhance</samp>&rsquo;</dt>
  5261. <dd>
  5262. <p>Enable the enhancement of the decoded audio when set to 1. The default
  5263. value is 0 (disabled).
  5264. </p>
  5265. </dd>
  5266. </dl>
  5267. <a name="libopencore_002damrnb"></a>
  5268. <h2 class="section"><a href="ffplay-all.html#toc-libopencore_002damrnb">9.7 libopencore-amrnb</a></h2>
  5269. <p>libopencore-amrnb decoder wrapper.
  5270. </p>
  5271. <p>libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
  5272. Narrowband audio codec. Using it requires the presence of the
  5273. libopencore-amrnb headers and library during configuration. You need to
  5274. explicitly configure the build with <code>--enable-libopencore-amrnb</code>.
  5275. </p>
  5276. <p>An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
  5277. without this library.
  5278. </p>
  5279. <a name="libopencore_002damrwb"></a>
  5280. <h2 class="section"><a href="ffplay-all.html#toc-libopencore_002damrwb">9.8 libopencore-amrwb</a></h2>
  5281. <p>libopencore-amrwb decoder wrapper.
  5282. </p>
  5283. <p>libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
  5284. Wideband audio codec. Using it requires the presence of the
  5285. libopencore-amrwb headers and library during configuration. You need to
  5286. explicitly configure the build with <code>--enable-libopencore-amrwb</code>.
  5287. </p>
  5288. <p>An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
  5289. without this library.
  5290. </p>
  5291. <a name="libopus"></a>
  5292. <h2 class="section"><a href="ffplay-all.html#toc-libopus">9.9 libopus</a></h2>
  5293. <p>libopus decoder wrapper.
  5294. </p>
  5295. <p>libopus allows libavcodec to decode the Opus Interactive Audio Codec.
  5296. Requires the presence of the libopus headers and library during
  5297. configuration. You need to explicitly configure the build with
  5298. <code>--enable-libopus</code>.
  5299. </p>
  5300. <p>An FFmpeg native decoder for Opus exists, so users can decode Opus
  5301. without this library.
  5302. </p>
  5303. <a name="Subtitles-Decoders"></a>
  5304. <h1 class="chapter"><a href="ffplay-all.html#toc-Subtitles-Decoders">10 Subtitles Decoders</a></h1>
  5305. <a name="libaribb24"></a>
  5306. <h2 class="section"><a href="ffplay-all.html#toc-libaribb24">10.1 libaribb24</a></h2>
  5307. <p>ARIB STD-B24 caption decoder.
  5308. </p>
  5309. <p>Implements profiles A and C of the ARIB STD-B24 standard.
  5310. </p>
  5311. <a name="libaribb24-Decoder-Options"></a>
  5312. <h3 class="subsection"><a href="ffplay-all.html#toc-libaribb24-Decoder-Options">10.1.1 libaribb24 Decoder Options</a></h3>
  5313. <dl compact="compact">
  5314. <dt>&lsquo;<samp>-aribb24-base-path <var>path</var></samp>&rsquo;</dt>
  5315. <dd><p>Sets the base path for the libaribb24 library. This is utilized for reading of
  5316. configuration files (for custom unicode conversions), and for dumping of
  5317. non-text symbols as images under that location.
  5318. </p>
  5319. <p>Unset by default.
  5320. </p>
  5321. </dd>
  5322. <dt>&lsquo;<samp>-aribb24-skip-ruby-text <var>boolean</var></samp>&rsquo;</dt>
  5323. <dd><p>Tells the decoder wrapper to skip text blocks that contain half-height ruby
  5324. text.
  5325. </p>
  5326. <p>Enabled by default.
  5327. </p>
  5328. </dd>
  5329. </dl>
  5330. <a name="dvbsub"></a>
  5331. <h2 class="section"><a href="ffplay-all.html#toc-dvbsub">10.2 dvbsub</a></h2>
  5332. <a name="Options-31"></a>
  5333. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-31">10.2.1 Options</a></h3>
  5334. <dl compact="compact">
  5335. <dt>&lsquo;<samp>compute_clut</samp>&rsquo;</dt>
  5336. <dd><dl compact="compact">
  5337. <dt>&lsquo;<samp>-1</samp>&rsquo;</dt>
  5338. <dd><p>Compute clut if no matching CLUT is in the stream.
  5339. </p></dd>
  5340. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  5341. <dd><p>Never compute CLUT
  5342. </p></dd>
  5343. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  5344. <dd><p>Always compute CLUT and override the one provided in the stream.
  5345. </p></dd>
  5346. </dl>
  5347. </dd>
  5348. <dt>&lsquo;<samp>dvb_substream</samp>&rsquo;</dt>
  5349. <dd><p>Selects the dvb substream, or all substreams if -1 which is default.
  5350. </p>
  5351. </dd>
  5352. </dl>
  5353. <a name="dvdsub"></a>
  5354. <h2 class="section"><a href="ffplay-all.html#toc-dvdsub">10.3 dvdsub</a></h2>
  5355. <p>This codec decodes the bitmap subtitles used in DVDs; the same subtitles can
  5356. also be found in VobSub file pairs and in some Matroska files.
  5357. </p>
  5358. <a name="Options-14"></a>
  5359. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-14">10.3.1 Options</a></h3>
  5360. <dl compact="compact">
  5361. <dt>&lsquo;<samp>palette</samp>&rsquo;</dt>
  5362. <dd><p>Specify the global palette used by the bitmaps. When stored in VobSub, the
  5363. palette is normally specified in the index file; in Matroska, the palette is
  5364. stored in the codec extra-data in the same format as in VobSub. In DVDs, the
  5365. palette is stored in the IFO file, and therefore not available when reading
  5366. from dumped VOB files.
  5367. </p>
  5368. <p>The format for this option is a string containing 16 24-bits hexadecimal
  5369. numbers (without 0x prefix) separated by commas, for example <code>0d00ee,
  5370. ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
  5371. 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b</code>.
  5372. </p>
  5373. </dd>
  5374. <dt>&lsquo;<samp>ifo_palette</samp>&rsquo;</dt>
  5375. <dd><p>Specify the IFO file from which the global palette is obtained.
  5376. (experimental)
  5377. </p>
  5378. </dd>
  5379. <dt>&lsquo;<samp>forced_subs_only</samp>&rsquo;</dt>
  5380. <dd><p>Only decode subtitle entries marked as forced. Some titles have forced
  5381. and non-forced subtitles in the same track. Setting this flag to <code>1</code>
  5382. will only keep the forced subtitles. Default value is <code>0</code>.
  5383. </p></dd>
  5384. </dl>
  5385. <a name="libzvbi_002dteletext"></a>
  5386. <h2 class="section"><a href="ffplay-all.html#toc-libzvbi_002dteletext">10.4 libzvbi-teletext</a></h2>
  5387. <p>Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
  5388. subtitles. Requires the presence of the libzvbi headers and library during
  5389. configuration. You need to explicitly configure the build with
  5390. <code>--enable-libzvbi</code>.
  5391. </p>
  5392. <a name="Options-19"></a>
  5393. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-19">10.4.1 Options</a></h3>
  5394. <dl compact="compact">
  5395. <dt>&lsquo;<samp>txt_page</samp>&rsquo;</dt>
  5396. <dd><p>List of teletext page numbers to decode. Pages that do not match the specified
  5397. list are dropped. You may use the special <code>*</code> string to match all pages,
  5398. or <code>subtitle</code> to match all subtitle pages.
  5399. Default value is *.
  5400. </p></dd>
  5401. <dt>&lsquo;<samp>txt_default_region</samp>&rsquo;</dt>
  5402. <dd><p>Set default G0 character set used for decoding, a value between 0 and 80 (see
  5403. ETS 300 706, Section 15, Table 32). Default value is -1, which does not
  5404. override the libzvbi default. This option is needed for some legacy level 1.0
  5405. transmissions which cannot signal the proper charset.
  5406. </p></dd>
  5407. <dt>&lsquo;<samp>txt_chop_top</samp>&rsquo;</dt>
  5408. <dd><p>Discards the top teletext line. Default value is 1.
  5409. </p></dd>
  5410. <dt>&lsquo;<samp>txt_format</samp>&rsquo;</dt>
  5411. <dd><p>Specifies the format of the decoded subtitles.
  5412. </p><dl compact="compact">
  5413. <dt>&lsquo;<samp>bitmap</samp>&rsquo;</dt>
  5414. <dd><p>The default format, you should use this for teletext pages, because certain
  5415. graphics and colors cannot be expressed in simple text or even ASS.
  5416. </p></dd>
  5417. <dt>&lsquo;<samp>text</samp>&rsquo;</dt>
  5418. <dd><p>Simple text based output without formatting.
  5419. </p></dd>
  5420. <dt>&lsquo;<samp>ass</samp>&rsquo;</dt>
  5421. <dd><p>Formatted ASS output, subtitle pages and teletext pages are returned in
  5422. different styles, subtitle pages are stripped down to text, but an effort is
  5423. made to keep the text alignment and the formatting.
  5424. </p></dd>
  5425. </dl>
  5426. </dd>
  5427. <dt>&lsquo;<samp>txt_left</samp>&rsquo;</dt>
  5428. <dd><p>X offset of generated bitmaps, default is 0.
  5429. </p></dd>
  5430. <dt>&lsquo;<samp>txt_top</samp>&rsquo;</dt>
  5431. <dd><p>Y offset of generated bitmaps, default is 0.
  5432. </p></dd>
  5433. <dt>&lsquo;<samp>txt_chop_spaces</samp>&rsquo;</dt>
  5434. <dd><p>Chops leading and trailing spaces and removes empty lines from the generated
  5435. text. This option is useful for teletext based subtitles where empty spaces may
  5436. be present at the start or at the end of the lines or empty lines may be
  5437. present between the subtitle lines because of double-sized teletext characters.
  5438. Default value is 1.
  5439. </p></dd>
  5440. <dt>&lsquo;<samp>txt_duration</samp>&rsquo;</dt>
  5441. <dd><p>Sets the display duration of the decoded teletext pages or subtitles in
  5442. milliseconds. Default value is -1 which means infinity or until the next
  5443. subtitle event comes.
  5444. </p></dd>
  5445. <dt>&lsquo;<samp>txt_transparent</samp>&rsquo;</dt>
  5446. <dd><p>Force transparent background of the generated teletext bitmaps. Default value
  5447. is 0 which means an opaque background.
  5448. </p></dd>
  5449. <dt>&lsquo;<samp>txt_opacity</samp>&rsquo;</dt>
  5450. <dd><p>Sets the opacity (0-255) of the teletext background. If
  5451. &lsquo;<samp>txt_transparent</samp>&rsquo; is not set, it only affects characters between a start
  5452. box and an end box, typically subtitles. Default value is 0 if
  5453. &lsquo;<samp>txt_transparent</samp>&rsquo; is set, 255 otherwise.
  5454. </p>
  5455. </dd>
  5456. </dl>
  5457. <a name="Bitstream-Filters"></a>
  5458. <h1 class="chapter"><a href="ffplay-all.html#toc-Bitstream-Filters">11 Bitstream Filters</a></h1>
  5459. <p>When you configure your FFmpeg build, all the supported bitstream
  5460. filters are enabled by default. You can list all available ones using
  5461. the configure option <code>--list-bsfs</code>.
  5462. </p>
  5463. <p>You can disable all the bitstream filters using the configure option
  5464. <code>--disable-bsfs</code>, and selectively enable any bitstream filter using
  5465. the option <code>--enable-bsf=BSF</code>, or you can disable a particular
  5466. bitstream filter using the option <code>--disable-bsf=BSF</code>.
  5467. </p>
  5468. <p>The option <code>-bsfs</code> of the ff* tools will display the list of
  5469. all the supported bitstream filters included in your build.
  5470. </p>
  5471. <p>The ff* tools have a -bsf option applied per stream, taking a
  5472. comma-separated list of filters, whose parameters follow the filter
  5473. name after a &rsquo;=&rsquo;.
  5474. </p>
  5475. <div class="example">
  5476. <pre class="example">ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
  5477. </pre></div>
  5478. <p>Below is a description of the currently available bitstream filters,
  5479. with their parameters, if any.
  5480. </p>
  5481. <a name="aac_005fadtstoasc"></a>
  5482. <h2 class="section"><a href="ffplay-all.html#toc-aac_005fadtstoasc">11.1 aac_adtstoasc</a></h2>
  5483. <p>Convert MPEG-2/4 AAC ADTS to an MPEG-4 Audio Specific Configuration
  5484. bitstream.
  5485. </p>
  5486. <p>This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4
  5487. ADTS header and removes the ADTS header.
  5488. </p>
  5489. <p>This filter is required for example when copying an AAC stream from a
  5490. raw ADTS AAC or an MPEG-TS container to MP4A-LATM, to an FLV file, or
  5491. to MOV/MP4 files and related formats such as 3GP or M4A. Please note
  5492. that it is auto-inserted for MP4A-LATM and MOV/MP4 and related formats.
  5493. </p>
  5494. <a name="av1_005fmetadata"></a>
  5495. <h2 class="section"><a href="ffplay-all.html#toc-av1_005fmetadata">11.2 av1_metadata</a></h2>
  5496. <p>Modify metadata embedded in an AV1 stream.
  5497. </p>
  5498. <dl compact="compact">
  5499. <dt>&lsquo;<samp>td</samp>&rsquo;</dt>
  5500. <dd><p>Insert or remove temporal delimiter OBUs in all temporal units of the
  5501. stream.
  5502. </p>
  5503. <dl compact="compact">
  5504. <dt>&lsquo;<samp>insert</samp>&rsquo;</dt>
  5505. <dd><p>Insert a TD at the beginning of every TU which does not already have one.
  5506. </p></dd>
  5507. <dt>&lsquo;<samp>remove</samp>&rsquo;</dt>
  5508. <dd><p>Remove the TD from the beginning of every TU which has one.
  5509. </p></dd>
  5510. </dl>
  5511. </dd>
  5512. <dt>&lsquo;<samp>color_primaries</samp>&rsquo;</dt>
  5513. <dt>&lsquo;<samp>transfer_characteristics</samp>&rsquo;</dt>
  5514. <dt>&lsquo;<samp>matrix_coefficients</samp>&rsquo;</dt>
  5515. <dd><p>Set the color description fields in the stream (see AV1 section 6.4.2).
  5516. </p>
  5517. </dd>
  5518. <dt>&lsquo;<samp>color_range</samp>&rsquo;</dt>
  5519. <dd><p>Set the color range in the stream (see AV1 section 6.4.2; note that
  5520. this cannot be set for streams using BT.709 primaries, sRGB transfer
  5521. characteristic and identity (RGB) matrix coefficients).
  5522. </p><dl compact="compact">
  5523. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  5524. <dd><p>Limited range.
  5525. </p></dd>
  5526. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  5527. <dd><p>Full range.
  5528. </p></dd>
  5529. </dl>
  5530. </dd>
  5531. <dt>&lsquo;<samp>chroma_sample_position</samp>&rsquo;</dt>
  5532. <dd><p>Set the chroma sample location in the stream (see AV1 section 6.4.2).
  5533. This can only be set for 4:2:0 streams.
  5534. </p>
  5535. <dl compact="compact">
  5536. <dt>&lsquo;<samp>vertical</samp>&rsquo;</dt>
  5537. <dd><p>Left position (matching the default in MPEG-2 and H.264).
  5538. </p></dd>
  5539. <dt>&lsquo;<samp>colocated</samp>&rsquo;</dt>
  5540. <dd><p>Top-left position.
  5541. </p></dd>
  5542. </dl>
  5543. </dd>
  5544. <dt>&lsquo;<samp>tick_rate</samp>&rsquo;</dt>
  5545. <dd><p>Set the tick rate (<em>num_units_in_display_tick / time_scale</em>) in
  5546. the timing info in the sequence header.
  5547. </p></dd>
  5548. <dt>&lsquo;<samp>num_ticks_per_picture</samp>&rsquo;</dt>
  5549. <dd><p>Set the number of ticks in each picture, to indicate that the stream
  5550. has a fixed framerate. Ignored if &lsquo;<samp>tick_rate</samp>&rsquo; is not also set.
  5551. </p>
  5552. </dd>
  5553. <dt>&lsquo;<samp>delete_padding</samp>&rsquo;</dt>
  5554. <dd><p>Deletes Padding OBUs.
  5555. </p>
  5556. </dd>
  5557. </dl>
  5558. <a name="chomp"></a>
  5559. <h2 class="section"><a href="ffplay-all.html#toc-chomp">11.3 chomp</a></h2>
  5560. <p>Remove zero padding at the end of a packet.
  5561. </p>
  5562. <a name="dca_005fcore"></a>
  5563. <h2 class="section"><a href="ffplay-all.html#toc-dca_005fcore">11.4 dca_core</a></h2>
  5564. <p>Extract the core from a DCA/DTS stream, dropping extensions such as
  5565. DTS-HD.
  5566. </p>
  5567. <a name="dump_005fextra"></a>
  5568. <h2 class="section"><a href="ffplay-all.html#toc-dump_005fextra">11.5 dump_extra</a></h2>
  5569. <p>Add extradata to the beginning of the filtered packets except when
  5570. said packets already exactly begin with the extradata that is intended
  5571. to be added.
  5572. </p>
  5573. <dl compact="compact">
  5574. <dt>&lsquo;<samp>freq</samp>&rsquo;</dt>
  5575. <dd><p>The additional argument specifies which packets should be filtered.
  5576. It accepts the values:
  5577. </p><dl compact="compact">
  5578. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  5579. <dt>&lsquo;<samp>keyframe</samp>&rsquo;</dt>
  5580. <dd><p>add extradata to all key packets
  5581. </p>
  5582. </dd>
  5583. <dt>&lsquo;<samp>e</samp>&rsquo;</dt>
  5584. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  5585. <dd><p>add extradata to all packets
  5586. </p></dd>
  5587. </dl>
  5588. </dd>
  5589. </dl>
  5590. <p>If not specified it is assumed &lsquo;<samp>k</samp>&rsquo;.
  5591. </p>
  5592. <p>For example the following <code>ffmpeg</code> command forces a global
  5593. header (thus disabling individual packet headers) in the H.264 packets
  5594. generated by the <code>libx264</code> encoder, but corrects them by adding
  5595. the header stored in extradata to the key packets:
  5596. </p><div class="example">
  5597. <pre class="example">ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
  5598. </pre></div>
  5599. <a name="eac3_005fcore"></a>
  5600. <h2 class="section"><a href="ffplay-all.html#toc-eac3_005fcore">11.6 eac3_core</a></h2>
  5601. <p>Extract the core from a E-AC-3 stream, dropping extra channels.
  5602. </p>
  5603. <a name="extract_005fextradata"></a>
  5604. <h2 class="section"><a href="ffplay-all.html#toc-extract_005fextradata">11.7 extract_extradata</a></h2>
  5605. <p>Extract the in-band extradata.
  5606. </p>
  5607. <p>Certain codecs allow the long-term headers (e.g. MPEG-2 sequence headers,
  5608. or H.264/HEVC (VPS/)SPS/PPS) to be transmitted either &quot;in-band&quot; (i.e. as a part
  5609. of the bitstream containing the coded frames) or &quot;out of band&quot; (e.g. on the
  5610. container level). This latter form is called &quot;extradata&quot; in FFmpeg terminology.
  5611. </p>
  5612. <p>This bitstream filter detects the in-band headers and makes them available as
  5613. extradata.
  5614. </p>
  5615. <dl compact="compact">
  5616. <dt>&lsquo;<samp>remove</samp>&rsquo;</dt>
  5617. <dd><p>When this option is enabled, the long-term headers are removed from the
  5618. bitstream after extraction.
  5619. </p></dd>
  5620. </dl>
  5621. <a name="filter_005funits"></a>
  5622. <h2 class="section"><a href="ffplay-all.html#toc-filter_005funits">11.8 filter_units</a></h2>
  5623. <p>Remove units with types in or not in a given set from the stream.
  5624. </p>
  5625. <dl compact="compact">
  5626. <dt>&lsquo;<samp>pass_types</samp>&rsquo;</dt>
  5627. <dd><p>List of unit types or ranges of unit types to pass through while removing
  5628. all others. This is specified as a &rsquo;|&rsquo;-separated list of unit type values
  5629. or ranges of values with &rsquo;-&rsquo;.
  5630. </p>
  5631. </dd>
  5632. <dt>&lsquo;<samp>remove_types</samp>&rsquo;</dt>
  5633. <dd><p>Identical to &lsquo;<samp>pass_types</samp>&rsquo;, except the units in the given set
  5634. removed and all others passed through.
  5635. </p></dd>
  5636. </dl>
  5637. <p>Extradata is unchanged by this transformation, but note that if the stream
  5638. contains inline parameter sets then the output may be unusable if they are
  5639. removed.
  5640. </p>
  5641. <p>For example, to remove all non-VCL NAL units from an H.264 stream:
  5642. </p><div class="example">
  5643. <pre class="example">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=pass_types=1-5' OUTPUT
  5644. </pre></div>
  5645. <p>To remove all AUDs, SEI and filler from an H.265 stream:
  5646. </p><div class="example">
  5647. <pre class="example">ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT
  5648. </pre></div>
  5649. <a name="hapqa_005fextract"></a>
  5650. <h2 class="section"><a href="ffplay-all.html#toc-hapqa_005fextract">11.9 hapqa_extract</a></h2>
  5651. <p>Extract Rgb or Alpha part of an HAPQA file, without recompression, in order to create an HAPQ or an HAPAlphaOnly file.
  5652. </p>
  5653. <dl compact="compact">
  5654. <dt>&lsquo;<samp>texture</samp>&rsquo;</dt>
  5655. <dd><p>Specifies the texture to keep.
  5656. </p>
  5657. <dl compact="compact">
  5658. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  5659. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  5660. </dl>
  5661. </dd>
  5662. </dl>
  5663. <p>Convert HAPQA to HAPQ
  5664. </p><div class="example">
  5665. <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
  5666. </pre></div>
  5667. <p>Convert HAPQA to HAPAlphaOnly
  5668. </p><div class="example">
  5669. <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
  5670. </pre></div>
  5671. <a name="h264_005fmetadata"></a>
  5672. <h2 class="section"><a href="ffplay-all.html#toc-h264_005fmetadata">11.10 h264_metadata</a></h2>
  5673. <p>Modify metadata embedded in an H.264 stream.
  5674. </p>
  5675. <dl compact="compact">
  5676. <dt>&lsquo;<samp>aud</samp>&rsquo;</dt>
  5677. <dd><p>Insert or remove AUD NAL units in all access units of the stream.
  5678. </p>
  5679. <dl compact="compact">
  5680. <dt>&lsquo;<samp>insert</samp>&rsquo;</dt>
  5681. <dt>&lsquo;<samp>remove</samp>&rsquo;</dt>
  5682. </dl>
  5683. </dd>
  5684. <dt>&lsquo;<samp>sample_aspect_ratio</samp>&rsquo;</dt>
  5685. <dd><p>Set the sample aspect ratio of the stream in the VUI parameters.
  5686. </p>
  5687. </dd>
  5688. <dt>&lsquo;<samp>overscan_appropriate_flag</samp>&rsquo;</dt>
  5689. <dd><p>Set whether the stream is suitable for display using overscan
  5690. or not (see H.264 section E.2.1).
  5691. </p>
  5692. </dd>
  5693. <dt>&lsquo;<samp>video_format</samp>&rsquo;</dt>
  5694. <dt>&lsquo;<samp>video_full_range_flag</samp>&rsquo;</dt>
  5695. <dd><p>Set the video format in the stream (see H.264 section E.2.1 and
  5696. table E-2).
  5697. </p>
  5698. </dd>
  5699. <dt>&lsquo;<samp>colour_primaries</samp>&rsquo;</dt>
  5700. <dt>&lsquo;<samp>transfer_characteristics</samp>&rsquo;</dt>
  5701. <dt>&lsquo;<samp>matrix_coefficients</samp>&rsquo;</dt>
  5702. <dd><p>Set the colour description in the stream (see H.264 section E.2.1
  5703. and tables E-3, E-4 and E-5).
  5704. </p>
  5705. </dd>
  5706. <dt>&lsquo;<samp>chroma_sample_loc_type</samp>&rsquo;</dt>
  5707. <dd><p>Set the chroma sample location in the stream (see H.264 section
  5708. E.2.1 and figure E-1).
  5709. </p>
  5710. </dd>
  5711. <dt>&lsquo;<samp>tick_rate</samp>&rsquo;</dt>
  5712. <dd><p>Set the tick rate (num_units_in_tick / time_scale) in the VUI
  5713. parameters. This is the smallest time unit representable in the
  5714. stream, and in many cases represents the field rate of the stream
  5715. (double the frame rate).
  5716. </p></dd>
  5717. <dt>&lsquo;<samp>fixed_frame_rate_flag</samp>&rsquo;</dt>
  5718. <dd><p>Set whether the stream has fixed framerate - typically this indicates
  5719. that the framerate is exactly half the tick rate, but the exact
  5720. meaning is dependent on interlacing and the picture structure (see
  5721. H.264 section E.2.1 and table E-6).
  5722. </p>
  5723. </dd>
  5724. <dt>&lsquo;<samp>crop_left</samp>&rsquo;</dt>
  5725. <dt>&lsquo;<samp>crop_right</samp>&rsquo;</dt>
  5726. <dt>&lsquo;<samp>crop_top</samp>&rsquo;</dt>
  5727. <dt>&lsquo;<samp>crop_bottom</samp>&rsquo;</dt>
  5728. <dd><p>Set the frame cropping offsets in the SPS. These values will replace
  5729. the current ones if the stream is already cropped.
  5730. </p>
  5731. <p>These fields are set in pixels. Note that some sizes may not be
  5732. representable if the chroma is subsampled or the stream is interlaced
  5733. (see H.264 section 7.4.2.1.1).
  5734. </p>
  5735. </dd>
  5736. <dt>&lsquo;<samp>sei_user_data</samp>&rsquo;</dt>
  5737. <dd><p>Insert a string as SEI unregistered user data. The argument must
  5738. be of the form <em>UUID+string</em>, where the UUID is as hex digits
  5739. possibly separated by hyphens, and the string can be anything.
  5740. </p>
  5741. <p>For example, &lsquo;<samp>086f3693-b7b3-4f2c-9653-21492feee5b8+hello</samp>&rsquo; will
  5742. insert the string &ldquo;hello&rdquo; associated with the given UUID.
  5743. </p>
  5744. </dd>
  5745. <dt>&lsquo;<samp>delete_filler</samp>&rsquo;</dt>
  5746. <dd><p>Deletes both filler NAL units and filler SEI messages.
  5747. </p>
  5748. </dd>
  5749. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  5750. <dd><p>Set the level in the SPS. Refer to H.264 section A.3 and tables A-1
  5751. to A-5.
  5752. </p>
  5753. <p>The argument must be the name of a level (for example, &lsquo;<samp>4.2</samp>&rsquo;), a
  5754. level_idc value (for example, &lsquo;<samp>42</samp>&rsquo;), or the special name &lsquo;<samp>auto</samp>&rsquo;
  5755. indicating that the filter should attempt to guess the level from the
  5756. input stream properties.
  5757. </p>
  5758. </dd>
  5759. </dl>
  5760. <a name="h264_005fmp4toannexb"></a>
  5761. <h2 class="section"><a href="ffplay-all.html#toc-h264_005fmp4toannexb">11.11 h264_mp4toannexb</a></h2>
  5762. <p>Convert an H.264 bitstream from length prefixed mode to start code
  5763. prefixed mode (as defined in the Annex B of the ITU-T H.264
  5764. specification).
  5765. </p>
  5766. <p>This is required by some streaming formats, typically the MPEG-2
  5767. transport stream format (muxer <code>mpegts</code>).
  5768. </p>
  5769. <p>For example to remux an MP4 file containing an H.264 stream to mpegts
  5770. format with <code>ffmpeg</code>, you can use the command:
  5771. </p>
  5772. <div class="example">
  5773. <pre class="example">ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
  5774. </pre></div>
  5775. <p>Please note that this filter is auto-inserted for MPEG-TS (muxer
  5776. <code>mpegts</code>) and raw H.264 (muxer <code>h264</code>) output formats.
  5777. </p>
  5778. <a name="h264_005fredundant_005fpps"></a>
  5779. <h2 class="section"><a href="ffplay-all.html#toc-h264_005fredundant_005fpps">11.12 h264_redundant_pps</a></h2>
  5780. <p>This applies a specific fixup to some Blu-ray streams which contain
  5781. redundant PPSs modifying irrelevant parameters of the stream which
  5782. confuse other transformations which require correct extradata.
  5783. </p>
  5784. <p>A new single global PPS is created, and all of the redundant PPSs
  5785. within the stream are removed.
  5786. </p>
  5787. <a name="hevc_005fmetadata"></a>
  5788. <h2 class="section"><a href="ffplay-all.html#toc-hevc_005fmetadata">11.13 hevc_metadata</a></h2>
  5789. <p>Modify metadata embedded in an HEVC stream.
  5790. </p>
  5791. <dl compact="compact">
  5792. <dt>&lsquo;<samp>aud</samp>&rsquo;</dt>
  5793. <dd><p>Insert or remove AUD NAL units in all access units of the stream.
  5794. </p>
  5795. <dl compact="compact">
  5796. <dt>&lsquo;<samp>insert</samp>&rsquo;</dt>
  5797. <dt>&lsquo;<samp>remove</samp>&rsquo;</dt>
  5798. </dl>
  5799. </dd>
  5800. <dt>&lsquo;<samp>sample_aspect_ratio</samp>&rsquo;</dt>
  5801. <dd><p>Set the sample aspect ratio in the stream in the VUI parameters.
  5802. </p>
  5803. </dd>
  5804. <dt>&lsquo;<samp>video_format</samp>&rsquo;</dt>
  5805. <dt>&lsquo;<samp>video_full_range_flag</samp>&rsquo;</dt>
  5806. <dd><p>Set the video format in the stream (see H.265 section E.3.1 and
  5807. table E.2).
  5808. </p>
  5809. </dd>
  5810. <dt>&lsquo;<samp>colour_primaries</samp>&rsquo;</dt>
  5811. <dt>&lsquo;<samp>transfer_characteristics</samp>&rsquo;</dt>
  5812. <dt>&lsquo;<samp>matrix_coefficients</samp>&rsquo;</dt>
  5813. <dd><p>Set the colour description in the stream (see H.265 section E.3.1
  5814. and tables E.3, E.4 and E.5).
  5815. </p>
  5816. </dd>
  5817. <dt>&lsquo;<samp>chroma_sample_loc_type</samp>&rsquo;</dt>
  5818. <dd><p>Set the chroma sample location in the stream (see H.265 section
  5819. E.3.1 and figure E.1).
  5820. </p>
  5821. </dd>
  5822. <dt>&lsquo;<samp>tick_rate</samp>&rsquo;</dt>
  5823. <dd><p>Set the tick rate in the VPS and VUI parameters (num_units_in_tick /
  5824. time_scale). Combined with &lsquo;<samp>num_ticks_poc_diff_one</samp>&rsquo;, this can
  5825. set a constant framerate in the stream. Note that it is likely to be
  5826. overridden by container parameters when the stream is in a container.
  5827. </p>
  5828. </dd>
  5829. <dt>&lsquo;<samp>num_ticks_poc_diff_one</samp>&rsquo;</dt>
  5830. <dd><p>Set poc_proportional_to_timing_flag in VPS and VUI and use this value
  5831. to set num_ticks_poc_diff_one_minus1 (see H.265 sections 7.4.3.1 and
  5832. E.3.1). Ignored if &lsquo;<samp>tick_rate</samp>&rsquo; is not also set.
  5833. </p>
  5834. </dd>
  5835. <dt>&lsquo;<samp>crop_left</samp>&rsquo;</dt>
  5836. <dt>&lsquo;<samp>crop_right</samp>&rsquo;</dt>
  5837. <dt>&lsquo;<samp>crop_top</samp>&rsquo;</dt>
  5838. <dt>&lsquo;<samp>crop_bottom</samp>&rsquo;</dt>
  5839. <dd><p>Set the conformance window cropping offsets in the SPS. These values
  5840. will replace the current ones if the stream is already cropped.
  5841. </p>
  5842. <p>These fields are set in pixels. Note that some sizes may not be
  5843. representable if the chroma is subsampled (H.265 section 7.4.3.2.1).
  5844. </p>
  5845. </dd>
  5846. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  5847. <dd><p>Set the level in the VPS and SPS. See H.265 section A.4 and tables
  5848. A.6 and A.7.
  5849. </p>
  5850. <p>The argument must be the name of a level (for example, &lsquo;<samp>5.1</samp>&rsquo;), a
  5851. <em>general_level_idc</em> value (for example, &lsquo;<samp>153</samp>&rsquo; for level 5.1),
  5852. or the special name &lsquo;<samp>auto</samp>&rsquo; indicating that the filter should
  5853. attempt to guess the level from the input stream properties.
  5854. </p>
  5855. </dd>
  5856. </dl>
  5857. <a name="hevc_005fmp4toannexb"></a>
  5858. <h2 class="section"><a href="ffplay-all.html#toc-hevc_005fmp4toannexb">11.14 hevc_mp4toannexb</a></h2>
  5859. <p>Convert an HEVC/H.265 bitstream from length prefixed mode to start code
  5860. prefixed mode (as defined in the Annex B of the ITU-T H.265
  5861. specification).
  5862. </p>
  5863. <p>This is required by some streaming formats, typically the MPEG-2
  5864. transport stream format (muxer <code>mpegts</code>).
  5865. </p>
  5866. <p>For example to remux an MP4 file containing an HEVC stream to mpegts
  5867. format with <code>ffmpeg</code>, you can use the command:
  5868. </p>
  5869. <div class="example">
  5870. <pre class="example">ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
  5871. </pre></div>
  5872. <p>Please note that this filter is auto-inserted for MPEG-TS (muxer
  5873. <code>mpegts</code>) and raw HEVC/H.265 (muxer <code>h265</code> or
  5874. <code>hevc</code>) output formats.
  5875. </p>
  5876. <a name="imxdump"></a>
  5877. <h2 class="section"><a href="ffplay-all.html#toc-imxdump">11.15 imxdump</a></h2>
  5878. <p>Modifies the bitstream to fit in MOV and to be usable by the Final Cut
  5879. Pro decoder. This filter only applies to the mpeg2video codec, and is
  5880. likely not needed for Final Cut Pro 7 and newer with the appropriate
  5881. &lsquo;<samp>-tag:v</samp>&rsquo;.
  5882. </p>
  5883. <p>For example, to remux 30 MB/sec NTSC IMX to MOV:
  5884. </p>
  5885. <div class="example">
  5886. <pre class="example">ffmpeg -i input.mxf -c copy -bsf:v imxdump -tag:v mx3n output.mov
  5887. </pre></div>
  5888. <a name="mjpeg2jpeg"></a>
  5889. <h2 class="section"><a href="ffplay-all.html#toc-mjpeg2jpeg">11.16 mjpeg2jpeg</a></h2>
  5890. <p>Convert MJPEG/AVI1 packets to full JPEG/JFIF packets.
  5891. </p>
  5892. <p>MJPEG is a video codec wherein each video frame is essentially a
  5893. JPEG image. The individual frames can be extracted without loss,
  5894. e.g. by
  5895. </p>
  5896. <div class="example">
  5897. <pre class="example">ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
  5898. </pre></div>
  5899. <p>Unfortunately, these chunks are incomplete JPEG images, because
  5900. they lack the DHT segment required for decoding. Quoting from
  5901. <a href="http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml">http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml</a>:
  5902. </p>
  5903. <p>Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
  5904. commented that &quot;MJPEG, or at least the MJPEG in AVIs having the
  5905. MJPG fourcc, is restricted JPEG with a fixed &ndash; and *omitted* &ndash;
  5906. Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2,
  5907. and it must use basic Huffman encoding, not arithmetic or
  5908. progressive. . . . You can indeed extract the MJPEG frames and
  5909. decode them with a regular JPEG decoder, but you have to prepend
  5910. the DHT segment to them, or else the decoder won&rsquo;t have any idea
  5911. how to decompress the data. The exact table necessary is given in
  5912. the OpenDML spec.&quot;
  5913. </p>
  5914. <p>This bitstream filter patches the header of frames extracted from an MJPEG
  5915. stream (carrying the AVI1 header ID and lacking a DHT segment) to
  5916. produce fully qualified JPEG images.
  5917. </p>
  5918. <div class="example">
  5919. <pre class="example">ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
  5920. exiftran -i -9 frame*.jpg
  5921. ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
  5922. </pre></div>
  5923. <a name="mjpegadump"></a>
  5924. <h2 class="section"><a href="ffplay-all.html#toc-mjpegadump">11.17 mjpegadump</a></h2>
  5925. <p>Add an MJPEG A header to the bitstream, to enable decoding by
  5926. Quicktime.
  5927. </p>
  5928. <p><a name="mov2textsub"></a>
  5929. </p><a name="mov2textsub-1"></a>
  5930. <h2 class="section"><a href="ffplay-all.html#toc-mov2textsub-1">11.18 mov2textsub</a></h2>
  5931. <p>Extract a representable text file from MOV subtitles, stripping the
  5932. metadata header from each subtitle packet.
  5933. </p>
  5934. <p>See also the <a href="#text2movsub">text2movsub</a> filter.
  5935. </p>
  5936. <a name="mp3decomp"></a>
  5937. <h2 class="section"><a href="ffplay-all.html#toc-mp3decomp">11.19 mp3decomp</a></h2>
  5938. <p>Decompress non-standard compressed MP3 audio headers.
  5939. </p>
  5940. <a name="mpeg2_005fmetadata"></a>
  5941. <h2 class="section"><a href="ffplay-all.html#toc-mpeg2_005fmetadata">11.20 mpeg2_metadata</a></h2>
  5942. <p>Modify metadata embedded in an MPEG-2 stream.
  5943. </p>
  5944. <dl compact="compact">
  5945. <dt>&lsquo;<samp>display_aspect_ratio</samp>&rsquo;</dt>
  5946. <dd><p>Set the display aspect ratio in the stream.
  5947. </p>
  5948. <p>The following fixed values are supported:
  5949. </p><dl compact="compact">
  5950. <dt>&lsquo;<samp>4/3</samp>&rsquo;</dt>
  5951. <dt>&lsquo;<samp>16/9</samp>&rsquo;</dt>
  5952. <dt>&lsquo;<samp>221/100</samp>&rsquo;</dt>
  5953. </dl>
  5954. <p>Any other value will result in square pixels being signalled instead
  5955. (see H.262 section 6.3.3 and table 6-3).
  5956. </p>
  5957. </dd>
  5958. <dt>&lsquo;<samp>frame_rate</samp>&rsquo;</dt>
  5959. <dd><p>Set the frame rate in the stream. This is constructed from a table
  5960. of known values combined with a small multiplier and divisor - if
  5961. the supplied value is not exactly representable, the nearest
  5962. representable value will be used instead (see H.262 section 6.3.3
  5963. and table 6-4).
  5964. </p>
  5965. </dd>
  5966. <dt>&lsquo;<samp>video_format</samp>&rsquo;</dt>
  5967. <dd><p>Set the video format in the stream (see H.262 section 6.3.6 and
  5968. table 6-6).
  5969. </p>
  5970. </dd>
  5971. <dt>&lsquo;<samp>colour_primaries</samp>&rsquo;</dt>
  5972. <dt>&lsquo;<samp>transfer_characteristics</samp>&rsquo;</dt>
  5973. <dt>&lsquo;<samp>matrix_coefficients</samp>&rsquo;</dt>
  5974. <dd><p>Set the colour description in the stream (see H.262 section 6.3.6
  5975. and tables 6-7, 6-8 and 6-9).
  5976. </p>
  5977. </dd>
  5978. </dl>
  5979. <a name="mpeg4_005funpack_005fbframes"></a>
  5980. <h2 class="section"><a href="ffplay-all.html#toc-mpeg4_005funpack_005fbframes">11.21 mpeg4_unpack_bframes</a></h2>
  5981. <p>Unpack DivX-style packed B-frames.
  5982. </p>
  5983. <p>DivX-style packed B-frames are not valid MPEG-4 and were only a
  5984. workaround for the broken Video for Windows subsystem.
  5985. They use more space, can cause minor AV sync issues, require more
  5986. CPU power to decode (unless the player has some decoded picture queue
  5987. to compensate the 2,0,2,0 frame per packet style) and cause
  5988. trouble if copied into a standard container like mp4 or mpeg-ps/ts,
  5989. because MPEG-4 decoders may not be able to decode them, since they are
  5990. not valid MPEG-4.
  5991. </p>
  5992. <p>For example to fix an AVI file containing an MPEG-4 stream with
  5993. DivX-style packed B-frames using <code>ffmpeg</code>, you can use the command:
  5994. </p>
  5995. <div class="example">
  5996. <pre class="example">ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi
  5997. </pre></div>
  5998. <a name="noise-1"></a>
  5999. <h2 class="section"><a href="ffplay-all.html#toc-noise-1">11.22 noise</a></h2>
  6000. <p>Damages the contents of packets or simply drops them without damaging the
  6001. container. Can be used for fuzzing or testing error resilience/concealment.
  6002. </p>
  6003. <p>Parameters:
  6004. </p><dl compact="compact">
  6005. <dt>&lsquo;<samp>amount</samp>&rsquo;</dt>
  6006. <dd><p>A numeral string, whose value is related to how often output bytes will
  6007. be modified. Therefore, values below or equal to 0 are forbidden, and
  6008. the lower the more frequent bytes will be modified, with 1 meaning
  6009. every byte is modified.
  6010. </p></dd>
  6011. <dt>&lsquo;<samp>dropamount</samp>&rsquo;</dt>
  6012. <dd><p>A numeral string, whose value is related to how often packets will be dropped.
  6013. Therefore, values below or equal to 0 are forbidden, and the lower the more
  6014. frequent packets will be dropped, with 1 meaning every packet is dropped.
  6015. </p></dd>
  6016. </dl>
  6017. <p>The following example applies the modification to every byte but does not drop
  6018. any packets.
  6019. </p><div class="example">
  6020. <pre class="example">ffmpeg -i INPUT -c copy -bsf noise[=1] output.mkv
  6021. </pre></div>
  6022. <a name="null-1"></a>
  6023. <h2 class="section"><a href="ffplay-all.html#toc-null-1">11.23 null</a></h2>
  6024. <p>This bitstream filter passes the packets through unchanged.
  6025. </p>
  6026. <a name="prores_005fmetadata"></a>
  6027. <h2 class="section"><a href="ffplay-all.html#toc-prores_005fmetadata">11.24 prores_metadata</a></h2>
  6028. <p>Modify color property metadata embedded in prores stream.
  6029. </p>
  6030. <dl compact="compact">
  6031. <dt>&lsquo;<samp>color_primaries</samp>&rsquo;</dt>
  6032. <dd><p>Set the color primaries.
  6033. Available values are:
  6034. </p>
  6035. <dl compact="compact">
  6036. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  6037. <dd><p>Keep the same color primaries property (default).
  6038. </p>
  6039. </dd>
  6040. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6041. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6042. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  6043. <dd><p>BT601 625
  6044. </p>
  6045. </dd>
  6046. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  6047. <dd><p>BT601 525
  6048. </p>
  6049. </dd>
  6050. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  6051. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  6052. <dd><p>DCI P3
  6053. </p>
  6054. </dd>
  6055. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  6056. <dd><p>P3 D65
  6057. </p>
  6058. </dd>
  6059. </dl>
  6060. </dd>
  6061. <dt>&lsquo;<samp>transfer_characteristics</samp>&rsquo;</dt>
  6062. <dd><p>Set the color transfer.
  6063. Available values are:
  6064. </p>
  6065. <dl compact="compact">
  6066. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  6067. <dd><p>Keep the same transfer characteristics property (default).
  6068. </p>
  6069. </dd>
  6070. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6071. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6072. <dd><p>BT 601, BT 709, BT 2020
  6073. </p></dd>
  6074. </dl>
  6075. </dd>
  6076. <dt>&lsquo;<samp>matrix_coefficients</samp>&rsquo;</dt>
  6077. <dd><p>Set the matrix coefficient.
  6078. Available values are:
  6079. </p>
  6080. <dl compact="compact">
  6081. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  6082. <dd><p>Keep the same colorspace property (default).
  6083. </p>
  6084. </dd>
  6085. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6086. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6087. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  6088. <dd><p>BT 601
  6089. </p>
  6090. </dd>
  6091. <dt>&lsquo;<samp>bt2020nc</samp>&rsquo;</dt>
  6092. </dl>
  6093. </dd>
  6094. </dl>
  6095. <p>Set Rec709 colorspace for each frame of the file
  6096. </p><div class="example">
  6097. <pre class="example">ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
  6098. </pre></div>
  6099. <a name="remove_005fextra"></a>
  6100. <h2 class="section"><a href="ffplay-all.html#toc-remove_005fextra">11.25 remove_extra</a></h2>
  6101. <p>Remove extradata from packets.
  6102. </p>
  6103. <p>It accepts the following parameter:
  6104. </p><dl compact="compact">
  6105. <dt>&lsquo;<samp>freq</samp>&rsquo;</dt>
  6106. <dd><p>Set which frame types to remove extradata from.
  6107. </p>
  6108. <dl compact="compact">
  6109. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  6110. <dd><p>Remove extradata from non-keyframes only.
  6111. </p>
  6112. </dd>
  6113. <dt>&lsquo;<samp>keyframe</samp>&rsquo;</dt>
  6114. <dd><p>Remove extradata from keyframes only.
  6115. </p>
  6116. </dd>
  6117. <dt>&lsquo;<samp>e, all</samp>&rsquo;</dt>
  6118. <dd><p>Remove extradata from all frames.
  6119. </p>
  6120. </dd>
  6121. </dl>
  6122. </dd>
  6123. </dl>
  6124. <p><a name="text2movsub"></a>
  6125. </p><a name="text2movsub-1"></a>
  6126. <h2 class="section"><a href="ffplay-all.html#toc-text2movsub-1">11.26 text2movsub</a></h2>
  6127. <p>Convert text subtitles to MOV subtitles (as used by the <code>mov_text</code>
  6128. codec) with metadata headers.
  6129. </p>
  6130. <p>See also the <a href="#mov2textsub">mov2textsub</a> filter.
  6131. </p>
  6132. <a name="trace_005fheaders"></a>
  6133. <h2 class="section"><a href="ffplay-all.html#toc-trace_005fheaders">11.27 trace_headers</a></h2>
  6134. <p>Log trace output containing all syntax elements in the coded stream
  6135. headers (everything above the level of individual coded blocks).
  6136. This can be useful for debugging low-level stream issues.
  6137. </p>
  6138. <p>Supports AV1, H.264, H.265, (M)JPEG, MPEG-2 and VP9, but depending
  6139. on the build only a subset of these may be available.
  6140. </p>
  6141. <a name="truehd_005fcore"></a>
  6142. <h2 class="section"><a href="ffplay-all.html#toc-truehd_005fcore">11.28 truehd_core</a></h2>
  6143. <p>Extract the core from a TrueHD stream, dropping ATMOS data.
  6144. </p>
  6145. <a name="vp9_005fmetadata"></a>
  6146. <h2 class="section"><a href="ffplay-all.html#toc-vp9_005fmetadata">11.29 vp9_metadata</a></h2>
  6147. <p>Modify metadata embedded in a VP9 stream.
  6148. </p>
  6149. <dl compact="compact">
  6150. <dt>&lsquo;<samp>color_space</samp>&rsquo;</dt>
  6151. <dd><p>Set the color space value in the frame header. Note that any frame
  6152. set to RGB will be implicitly set to PC range and that RGB is
  6153. incompatible with profiles 0 and 2.
  6154. </p><dl compact="compact">
  6155. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  6156. <dt>&lsquo;<samp>bt601</samp>&rsquo;</dt>
  6157. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  6158. <dt>&lsquo;<samp>smpte170</samp>&rsquo;</dt>
  6159. <dt>&lsquo;<samp>smpte240</samp>&rsquo;</dt>
  6160. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  6161. <dt>&lsquo;<samp>rgb</samp>&rsquo;</dt>
  6162. </dl>
  6163. </dd>
  6164. <dt>&lsquo;<samp>color_range</samp>&rsquo;</dt>
  6165. <dd><p>Set the color range value in the frame header. Note that any value
  6166. imposed by the color space will take precedence over this value.
  6167. </p><dl compact="compact">
  6168. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  6169. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  6170. </dl>
  6171. </dd>
  6172. </dl>
  6173. <a name="vp9_005fsuperframe"></a>
  6174. <h2 class="section"><a href="ffplay-all.html#toc-vp9_005fsuperframe">11.30 vp9_superframe</a></h2>
  6175. <p>Merge VP9 invisible (alt-ref) frames back into VP9 superframes. This
  6176. fixes merging of split/segmented VP9 streams where the alt-ref frame
  6177. was split from its visible counterpart.
  6178. </p>
  6179. <a name="vp9_005fsuperframe_005fsplit"></a>
  6180. <h2 class="section"><a href="ffplay-all.html#toc-vp9_005fsuperframe_005fsplit">11.31 vp9_superframe_split</a></h2>
  6181. <p>Split VP9 superframes into single frames.
  6182. </p>
  6183. <a name="vp9_005fraw_005freorder"></a>
  6184. <h2 class="section"><a href="ffplay-all.html#toc-vp9_005fraw_005freorder">11.32 vp9_raw_reorder</a></h2>
  6185. <p>Given a VP9 stream with correct timestamps but possibly out of order,
  6186. insert additional show-existing-frame packets to correct the ordering.
  6187. </p>
  6188. <a name="Format-Options"></a>
  6189. <h1 class="chapter"><a href="ffplay-all.html#toc-Format-Options">12 Format Options</a></h1>
  6190. <p>The libavformat library provides some generic global options, which
  6191. can be set on all the muxers and demuxers. In addition each muxer or
  6192. demuxer may support so-called private options, which are specific for
  6193. that component.
  6194. </p>
  6195. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  6196. FFmpeg tools, or by setting the value explicitly in the
  6197. <code>AVFormatContext</code> options or using the &lsquo;<tt>libavutil/opt.h</tt>&rsquo; API
  6198. for programmatic use.
  6199. </p>
  6200. <p>The list of supported options follows:
  6201. </p>
  6202. <dl compact="compact">
  6203. <dt>&lsquo;<samp>avioflags <var>flags</var> (<em>input/output</em>)</samp>&rsquo;</dt>
  6204. <dd><p>Possible values:
  6205. </p><dl compact="compact">
  6206. <dt>&lsquo;<samp>direct</samp>&rsquo;</dt>
  6207. <dd><p>Reduce buffering.
  6208. </p></dd>
  6209. </dl>
  6210. </dd>
  6211. <dt>&lsquo;<samp>probesize <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6212. <dd><p>Set probing size in bytes, i.e. the size of the data to analyze to get
  6213. stream information. A higher value will enable detecting more
  6214. information in case it is dispersed into the stream, but will increase
  6215. latency. Must be an integer not lesser than 32. It is 5000000 by default.
  6216. </p>
  6217. </dd>
  6218. <dt>&lsquo;<samp>max_probe_packets <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6219. <dd><p>Set the maximum number of buffered packets when probing a codec.
  6220. Default is 2500 packets.
  6221. </p>
  6222. </dd>
  6223. <dt>&lsquo;<samp>packetsize <var>integer</var> (<em>output</em>)</samp>&rsquo;</dt>
  6224. <dd><p>Set packet size.
  6225. </p>
  6226. </dd>
  6227. <dt>&lsquo;<samp>fflags <var>flags</var></samp>&rsquo;</dt>
  6228. <dd><p>Set format flags. Some are implemented for a limited number of formats.
  6229. </p>
  6230. <p>Possible values for input files:
  6231. </p><dl compact="compact">
  6232. <dt>&lsquo;<samp>discardcorrupt</samp>&rsquo;</dt>
  6233. <dd><p>Discard corrupted packets.
  6234. </p></dd>
  6235. <dt>&lsquo;<samp>fastseek</samp>&rsquo;</dt>
  6236. <dd><p>Enable fast, but inaccurate seeks for some formats.
  6237. </p></dd>
  6238. <dt>&lsquo;<samp>genpts</samp>&rsquo;</dt>
  6239. <dd><p>Generate missing PTS if DTS is present.
  6240. </p></dd>
  6241. <dt>&lsquo;<samp>igndts</samp>&rsquo;</dt>
  6242. <dd><p>Ignore DTS if PTS is set. Inert when nofillin is set.
  6243. </p></dd>
  6244. <dt>&lsquo;<samp>ignidx</samp>&rsquo;</dt>
  6245. <dd><p>Ignore index.
  6246. </p></dd>
  6247. <dt>&lsquo;<samp>keepside (<em>deprecated</em>,<em>inert</em>)</samp>&rsquo;</dt>
  6248. <dt>&lsquo;<samp>nobuffer</samp>&rsquo;</dt>
  6249. <dd><p>Reduce the latency introduced by buffering during initial input streams analysis.
  6250. </p></dd>
  6251. <dt>&lsquo;<samp>nofillin</samp>&rsquo;</dt>
  6252. <dd><p>Do not fill in missing values in packet fields that can be exactly calculated.
  6253. </p></dd>
  6254. <dt>&lsquo;<samp>noparse</samp>&rsquo;</dt>
  6255. <dd><p>Disable AVParsers, this needs <code>+nofillin</code> too.
  6256. </p></dd>
  6257. <dt>&lsquo;<samp>sortdts</samp>&rsquo;</dt>
  6258. <dd><p>Try to interleave output packets by DTS. At present, available only for AVIs with an index.
  6259. </p></dd>
  6260. </dl>
  6261. <p>Possible values for output files:
  6262. </p><dl compact="compact">
  6263. <dt>&lsquo;<samp>autobsf</samp>&rsquo;</dt>
  6264. <dd><p>Automatically apply bitstream filters as required by the output format. Enabled by default.
  6265. </p></dd>
  6266. <dt>&lsquo;<samp>bitexact</samp>&rsquo;</dt>
  6267. <dd><p>Only write platform-, build- and time-independent data.
  6268. This ensures that file and data checksums are reproducible and match between
  6269. platforms. Its primary use is for regression testing.
  6270. </p></dd>
  6271. <dt>&lsquo;<samp>flush_packets</samp>&rsquo;</dt>
  6272. <dd><p>Write out packets immediately.
  6273. </p></dd>
  6274. <dt>&lsquo;<samp>latm (<em>deprecated</em>,<em>inert</em>)</samp>&rsquo;</dt>
  6275. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  6276. <dd><p>Stop muxing at the end of the shortest stream.
  6277. It may be needed to increase max_interleave_delta to avoid flushing the longer
  6278. streams before EOF.
  6279. </p></dd>
  6280. </dl>
  6281. </dd>
  6282. <dt>&lsquo;<samp>seek2any <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6283. <dd><p>Allow seeking to non-keyframes on demuxer level when supported if set to 1.
  6284. Default is 0.
  6285. </p>
  6286. </dd>
  6287. <dt>&lsquo;<samp>analyzeduration <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6288. <dd><p>Specify how many microseconds are analyzed to probe the input. A
  6289. higher value will enable detecting more accurate information, but will
  6290. increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
  6291. </p>
  6292. </dd>
  6293. <dt>&lsquo;<samp>cryptokey <var>hexadecimal string</var> (<em>input</em>)</samp>&rsquo;</dt>
  6294. <dd><p>Set decryption key.
  6295. </p>
  6296. </dd>
  6297. <dt>&lsquo;<samp>indexmem <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6298. <dd><p>Set max memory used for timestamp index (per stream).
  6299. </p>
  6300. </dd>
  6301. <dt>&lsquo;<samp>rtbufsize <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6302. <dd><p>Set max memory used for buffering real-time frames.
  6303. </p>
  6304. </dd>
  6305. <dt>&lsquo;<samp>fdebug <var>flags</var> (<em>input/output</em>)</samp>&rsquo;</dt>
  6306. <dd><p>Print specific debug info.
  6307. </p>
  6308. <p>Possible values:
  6309. </p><dl compact="compact">
  6310. <dt>&lsquo;<samp>ts</samp>&rsquo;</dt>
  6311. </dl>
  6312. </dd>
  6313. <dt>&lsquo;<samp>max_delay <var>integer</var> (<em>input/output</em>)</samp>&rsquo;</dt>
  6314. <dd><p>Set maximum muxing or demuxing delay in microseconds.
  6315. </p>
  6316. </dd>
  6317. <dt>&lsquo;<samp>fpsprobesize <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6318. <dd><p>Set number of frames used to probe fps.
  6319. </p>
  6320. </dd>
  6321. <dt>&lsquo;<samp>audio_preload <var>integer</var> (<em>output</em>)</samp>&rsquo;</dt>
  6322. <dd><p>Set microseconds by which audio packets should be interleaved earlier.
  6323. </p>
  6324. </dd>
  6325. <dt>&lsquo;<samp>chunk_duration <var>integer</var> (<em>output</em>)</samp>&rsquo;</dt>
  6326. <dd><p>Set microseconds for each chunk.
  6327. </p>
  6328. </dd>
  6329. <dt>&lsquo;<samp>chunk_size <var>integer</var> (<em>output</em>)</samp>&rsquo;</dt>
  6330. <dd><p>Set size in bytes for each chunk.
  6331. </p>
  6332. </dd>
  6333. <dt>&lsquo;<samp>err_detect, f_err_detect <var>flags</var> (<em>input</em>)</samp>&rsquo;</dt>
  6334. <dd><p>Set error detection flags. <code>f_err_detect</code> is deprecated and
  6335. should be used only via the <code>ffmpeg</code> tool.
  6336. </p>
  6337. <p>Possible values:
  6338. </p><dl compact="compact">
  6339. <dt>&lsquo;<samp>crccheck</samp>&rsquo;</dt>
  6340. <dd><p>Verify embedded CRCs.
  6341. </p></dd>
  6342. <dt>&lsquo;<samp>bitstream</samp>&rsquo;</dt>
  6343. <dd><p>Detect bitstream specification deviations.
  6344. </p></dd>
  6345. <dt>&lsquo;<samp>buffer</samp>&rsquo;</dt>
  6346. <dd><p>Detect improper bitstream length.
  6347. </p></dd>
  6348. <dt>&lsquo;<samp>explode</samp>&rsquo;</dt>
  6349. <dd><p>Abort decoding on minor error detection.
  6350. </p></dd>
  6351. <dt>&lsquo;<samp>careful</samp>&rsquo;</dt>
  6352. <dd><p>Consider things that violate the spec and have not been seen in the
  6353. wild as errors.
  6354. </p></dd>
  6355. <dt>&lsquo;<samp>compliant</samp>&rsquo;</dt>
  6356. <dd><p>Consider all spec non compliancies as errors.
  6357. </p></dd>
  6358. <dt>&lsquo;<samp>aggressive</samp>&rsquo;</dt>
  6359. <dd><p>Consider things that a sane encoder should not do as an error.
  6360. </p></dd>
  6361. </dl>
  6362. </dd>
  6363. <dt>&lsquo;<samp>max_interleave_delta <var>integer</var> (<em>output</em>)</samp>&rsquo;</dt>
  6364. <dd><p>Set maximum buffering duration for interleaving. The duration is
  6365. expressed in microseconds, and defaults to 10000000 (10 seconds).
  6366. </p>
  6367. <p>To ensure all the streams are interleaved correctly, libavformat will
  6368. wait until it has at least one packet for each stream before actually
  6369. writing any packets to the output file. When some streams are
  6370. &quot;sparse&quot; (i.e. there are large gaps between successive packets), this
  6371. can result in excessive buffering.
  6372. </p>
  6373. <p>This field specifies the maximum difference between the timestamps of the
  6374. first and the last packet in the muxing queue, above which libavformat
  6375. will output a packet regardless of whether it has queued a packet for all
  6376. the streams.
  6377. </p>
  6378. <p>If set to 0, libavformat will continue buffering packets until it has
  6379. a packet for each stream, regardless of the maximum timestamp
  6380. difference between the buffered packets.
  6381. </p>
  6382. </dd>
  6383. <dt>&lsquo;<samp>use_wallclock_as_timestamps <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6384. <dd><p>Use wallclock as timestamps if set to 1. Default is 0.
  6385. </p>
  6386. </dd>
  6387. <dt>&lsquo;<samp>avoid_negative_ts <var>integer</var> (<em>output</em>)</samp>&rsquo;</dt>
  6388. <dd>
  6389. <p>Possible values:
  6390. </p><dl compact="compact">
  6391. <dt>&lsquo;<samp>make_non_negative</samp>&rsquo;</dt>
  6392. <dd><p>Shift timestamps to make them non-negative.
  6393. Also note that this affects only leading negative timestamps, and not
  6394. non-monotonic negative timestamps.
  6395. </p></dd>
  6396. <dt>&lsquo;<samp>make_zero</samp>&rsquo;</dt>
  6397. <dd><p>Shift timestamps so that the first timestamp is 0.
  6398. </p></dd>
  6399. <dt>&lsquo;<samp>auto (default)</samp>&rsquo;</dt>
  6400. <dd><p>Enables shifting when required by the target format.
  6401. </p></dd>
  6402. <dt>&lsquo;<samp>disabled</samp>&rsquo;</dt>
  6403. <dd><p>Disables shifting of timestamp.
  6404. </p></dd>
  6405. </dl>
  6406. <p>When shifting is enabled, all output timestamps are shifted by the
  6407. same amount. Audio, video, and subtitles desynching and relative
  6408. timestamp differences are preserved compared to how they would have
  6409. been without shifting.
  6410. </p>
  6411. </dd>
  6412. <dt>&lsquo;<samp>skip_initial_bytes <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6413. <dd><p>Set number of bytes to skip before reading header and frames if set to 1.
  6414. Default is 0.
  6415. </p>
  6416. </dd>
  6417. <dt>&lsquo;<samp>correct_ts_overflow <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6418. <dd><p>Correct single timestamp overflows if set to 1. Default is 1.
  6419. </p>
  6420. </dd>
  6421. <dt>&lsquo;<samp>flush_packets <var>integer</var> (<em>output</em>)</samp>&rsquo;</dt>
  6422. <dd><p>Flush the underlying I/O stream after each packet. Default is -1 (auto), which
  6423. means that the underlying protocol will decide, 1 enables it, and has the
  6424. effect of reducing the latency, 0 disables it and may increase IO throughput in
  6425. some cases.
  6426. </p>
  6427. </dd>
  6428. <dt>&lsquo;<samp>output_ts_offset <var>offset</var> (<em>output</em>)</samp>&rsquo;</dt>
  6429. <dd><p>Set the output time offset.
  6430. </p>
  6431. <p><var>offset</var> must be a time duration specification,
  6432. see <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  6433. </p>
  6434. <p>The offset is added by the muxer to the output timestamps.
  6435. </p>
  6436. <p>Specifying a positive offset means that the corresponding streams are
  6437. delayed bt the time duration specified in <var>offset</var>. Default value
  6438. is <code>0</code> (meaning that no offset is applied).
  6439. </p>
  6440. </dd>
  6441. <dt>&lsquo;<samp>format_whitelist <var>list</var> (<em>input</em>)</samp>&rsquo;</dt>
  6442. <dd><p>&quot;,&quot; separated list of allowed demuxers. By default all are allowed.
  6443. </p>
  6444. </dd>
  6445. <dt>&lsquo;<samp>dump_separator <var>string</var> (<em>input</em>)</samp>&rsquo;</dt>
  6446. <dd><p>Separator used to separate the fields printed on the command line about the
  6447. Stream parameters.
  6448. For example, to separate the fields with newlines and indentation:
  6449. </p><div class="example">
  6450. <pre class="example">ffprobe -dump_separator &quot;
  6451. &quot; -i ~/videos/matrixbench_mpeg2.mpg
  6452. </pre></div>
  6453. </dd>
  6454. <dt>&lsquo;<samp>max_streams <var>integer</var> (<em>input</em>)</samp>&rsquo;</dt>
  6455. <dd><p>Specifies the maximum number of streams. This can be used to reject files that
  6456. would require too many resources due to a large number of streams.
  6457. </p>
  6458. </dd>
  6459. <dt>&lsquo;<samp>skip_estimate_duration_from_pts <var>bool</var> (<em>input</em>)</samp>&rsquo;</dt>
  6460. <dd><p>Skip estimation of input duration when calculated using PTS.
  6461. At present, applicable for MPEG-PS and MPEG-TS.
  6462. </p>
  6463. </dd>
  6464. <dt>&lsquo;<samp>strict, f_strict <var>integer</var> (<em>input/output</em>)</samp>&rsquo;</dt>
  6465. <dd><p>Specify how strictly to follow the standards. <code>f_strict</code> is deprecated and
  6466. should be used only via the <code>ffmpeg</code> tool.
  6467. </p>
  6468. <p>Possible values:
  6469. </p><dl compact="compact">
  6470. <dt>&lsquo;<samp>very</samp>&rsquo;</dt>
  6471. <dd><p>strictly conform to an older more strict version of the spec or reference software
  6472. </p></dd>
  6473. <dt>&lsquo;<samp>strict</samp>&rsquo;</dt>
  6474. <dd><p>strictly conform to all the things in the spec no matter what consequences
  6475. </p></dd>
  6476. <dt>&lsquo;<samp>normal</samp>&rsquo;</dt>
  6477. <dt>&lsquo;<samp>unofficial</samp>&rsquo;</dt>
  6478. <dd><p>allow unofficial extensions
  6479. </p></dd>
  6480. <dt>&lsquo;<samp>experimental</samp>&rsquo;</dt>
  6481. <dd><p>allow non standardized experimental things, experimental
  6482. (unfinished/work in progress/not well tested) decoders and encoders.
  6483. Note: experimental decoders can pose a security risk, do not use this for
  6484. decoding untrusted input.
  6485. </p></dd>
  6486. </dl>
  6487. </dd>
  6488. </dl>
  6489. <p><a name="Format-stream-specifiers"></a>
  6490. </p><a name="Format-stream-specifiers-1"></a>
  6491. <h2 class="section"><a href="ffplay-all.html#toc-Format-stream-specifiers-1">12.1 Format stream specifiers</a></h2>
  6492. <p>Format stream specifiers allow selection of one or more streams that
  6493. match specific properties.
  6494. </p>
  6495. <p>The exact semantics of stream specifiers is defined by the
  6496. <code>avformat_match_stream_specifier()</code> function declared in the
  6497. &lsquo;<tt>libavformat/avformat.h</tt>&rsquo; header and documented in the
  6498. <a href="ffmpeg.html#Stream-specifiers">(ffmpeg)Stream specifiers section in the ffmpeg(1) manual</a>.
  6499. </p>
  6500. <a name="Demuxers"></a>
  6501. <h1 class="chapter"><a href="ffplay-all.html#toc-Demuxers">13 Demuxers</a></h1>
  6502. <p>Demuxers are configured elements in FFmpeg that can read the
  6503. multimedia streams from a particular type of file.
  6504. </p>
  6505. <p>When you configure your FFmpeg build, all the supported demuxers
  6506. are enabled by default. You can list all available ones using the
  6507. configure option <code>--list-demuxers</code>.
  6508. </p>
  6509. <p>You can disable all the demuxers using the configure option
  6510. <code>--disable-demuxers</code>, and selectively enable a single demuxer with
  6511. the option <code>--enable-demuxer=<var>DEMUXER</var></code>, or disable it
  6512. with the option <code>--disable-demuxer=<var>DEMUXER</var></code>.
  6513. </p>
  6514. <p>The option <code>-demuxers</code> of the ff* tools will display the list of
  6515. enabled demuxers. Use <code>-formats</code> to view a combined list of
  6516. enabled demuxers and muxers.
  6517. </p>
  6518. <p>The description of some of the currently available demuxers follows.
  6519. </p>
  6520. <a name="aa"></a>
  6521. <h2 class="section"><a href="ffplay-all.html#toc-aa">13.1 aa</a></h2>
  6522. <p>Audible Format 2, 3, and 4 demuxer.
  6523. </p>
  6524. <p>This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files.
  6525. </p>
  6526. <a name="apng"></a>
  6527. <h2 class="section"><a href="ffplay-all.html#toc-apng">13.2 apng</a></h2>
  6528. <p>Animated Portable Network Graphics demuxer.
  6529. </p>
  6530. <p>This demuxer is used to demux APNG files.
  6531. All headers, but the PNG signature, up to (but not including) the first
  6532. fcTL chunk are transmitted as extradata.
  6533. Frames are then split as being all the chunks between two fcTL ones, or
  6534. between the last fcTL and IEND chunks.
  6535. </p>
  6536. <dl compact="compact">
  6537. <dt>&lsquo;<samp>-ignore_loop <var>bool</var></samp>&rsquo;</dt>
  6538. <dd><p>Ignore the loop variable in the file if set.
  6539. </p></dd>
  6540. <dt>&lsquo;<samp>-max_fps <var>int</var></samp>&rsquo;</dt>
  6541. <dd><p>Maximum framerate in frames per second (0 for no limit).
  6542. </p></dd>
  6543. <dt>&lsquo;<samp>-default_fps <var>int</var></samp>&rsquo;</dt>
  6544. <dd><p>Default framerate in frames per second when none is specified in the file
  6545. (0 meaning as fast as possible).
  6546. </p></dd>
  6547. </dl>
  6548. <a name="asf"></a>
  6549. <h2 class="section"><a href="ffplay-all.html#toc-asf">13.3 asf</a></h2>
  6550. <p>Advanced Systems Format demuxer.
  6551. </p>
  6552. <p>This demuxer is used to demux ASF files and MMS network streams.
  6553. </p>
  6554. <dl compact="compact">
  6555. <dt>&lsquo;<samp>-no_resync_search <var>bool</var></samp>&rsquo;</dt>
  6556. <dd><p>Do not try to resynchronize by looking for a certain optional start code.
  6557. </p></dd>
  6558. </dl>
  6559. <p><a name="concat"></a>
  6560. </p><a name="concat-1"></a>
  6561. <h2 class="section"><a href="ffplay-all.html#toc-concat-1">13.4 concat</a></h2>
  6562. <p>Virtual concatenation script demuxer.
  6563. </p>
  6564. <p>This demuxer reads a list of files and other directives from a text file and
  6565. demuxes them one after the other, as if all their packets had been muxed
  6566. together.
  6567. </p>
  6568. <p>The timestamps in the files are adjusted so that the first file starts at 0
  6569. and each next file starts where the previous one finishes. Note that it is
  6570. done globally and may cause gaps if all streams do not have exactly the same
  6571. length.
  6572. </p>
  6573. <p>All files must have the same streams (same codecs, same time base, etc.).
  6574. </p>
  6575. <p>The duration of each file is used to adjust the timestamps of the next file:
  6576. if the duration is incorrect (because it was computed using the bit-rate or
  6577. because the file is truncated, for example), it can cause artifacts. The
  6578. <code>duration</code> directive can be used to override the duration stored in
  6579. each file.
  6580. </p>
  6581. <a name="Syntax-2"></a>
  6582. <h3 class="subsection"><a href="ffplay-all.html#toc-Syntax-2">13.4.1 Syntax</a></h3>
  6583. <p>The script is a text file in extended-ASCII, with one directive per line.
  6584. Empty lines, leading spaces and lines starting with &rsquo;#&rsquo; are ignored. The
  6585. following directive is recognized:
  6586. </p>
  6587. <dl compact="compact">
  6588. <dt>&lsquo;<samp><code>file <var>path</var></code></samp>&rsquo;</dt>
  6589. <dd><p>Path to a file to read; special characters and spaces must be escaped with
  6590. backslash or single quotes.
  6591. </p>
  6592. <p>All subsequent file-related directives apply to that file.
  6593. </p>
  6594. </dd>
  6595. <dt>&lsquo;<samp><code>ffconcat version 1.0</code></samp>&rsquo;</dt>
  6596. <dd><p>Identify the script type and version. It also sets the &lsquo;<samp>safe</samp>&rsquo; option
  6597. to 1 if it was -1.
  6598. </p>
  6599. <p>To make FFmpeg recognize the format automatically, this directive must
  6600. appear exactly as is (no extra space or byte-order-mark) on the very first
  6601. line of the script.
  6602. </p>
  6603. </dd>
  6604. <dt>&lsquo;<samp><code>duration <var>dur</var></code></samp>&rsquo;</dt>
  6605. <dd><p>Duration of the file. This information can be specified from the file;
  6606. specifying it here may be more efficient or help if the information from the
  6607. file is not available or accurate.
  6608. </p>
  6609. <p>If the duration is set for all files, then it is possible to seek in the
  6610. whole concatenated video.
  6611. </p>
  6612. </dd>
  6613. <dt>&lsquo;<samp><code>inpoint <var>timestamp</var></code></samp>&rsquo;</dt>
  6614. <dd><p>In point of the file. When the demuxer opens the file it instantly seeks to the
  6615. specified timestamp. Seeking is done so that all streams can be presented
  6616. successfully at In point.
  6617. </p>
  6618. <p>This directive works best with intra frame codecs, because for non-intra frame
  6619. ones you will usually get extra packets before the actual In point and the
  6620. decoded content will most likely contain frames before In point too.
  6621. </p>
  6622. <p>For each file, packets before the file In point will have timestamps less than
  6623. the calculated start timestamp of the file (negative in case of the first
  6624. file), and the duration of the files (if not specified by the <code>duration</code>
  6625. directive) will be reduced based on their specified In point.
  6626. </p>
  6627. <p>Because of potential packets before the specified In point, packet timestamps
  6628. may overlap between two concatenated files.
  6629. </p>
  6630. </dd>
  6631. <dt>&lsquo;<samp><code>outpoint <var>timestamp</var></code></samp>&rsquo;</dt>
  6632. <dd><p>Out point of the file. When the demuxer reaches the specified decoding
  6633. timestamp in any of the streams, it handles it as an end of file condition and
  6634. skips the current and all the remaining packets from all streams.
  6635. </p>
  6636. <p>Out point is exclusive, which means that the demuxer will not output packets
  6637. with a decoding timestamp greater or equal to Out point.
  6638. </p>
  6639. <p>This directive works best with intra frame codecs and formats where all streams
  6640. are tightly interleaved. For non-intra frame codecs you will usually get
  6641. additional packets with presentation timestamp after Out point therefore the
  6642. decoded content will most likely contain frames after Out point too. If your
  6643. streams are not tightly interleaved you may not get all the packets from all
  6644. streams before Out point and you may only will be able to decode the earliest
  6645. stream until Out point.
  6646. </p>
  6647. <p>The duration of the files (if not specified by the <code>duration</code>
  6648. directive) will be reduced based on their specified Out point.
  6649. </p>
  6650. </dd>
  6651. <dt>&lsquo;<samp><code>file_packet_metadata <var>key=value</var></code></samp>&rsquo;</dt>
  6652. <dd><p>Metadata of the packets of the file. The specified metadata will be set for
  6653. each file packet. You can specify this directive multiple times to add multiple
  6654. metadata entries.
  6655. </p>
  6656. </dd>
  6657. <dt>&lsquo;<samp><code>stream</code></samp>&rsquo;</dt>
  6658. <dd><p>Introduce a stream in the virtual file.
  6659. All subsequent stream-related directives apply to the last introduced
  6660. stream.
  6661. Some streams properties must be set in order to allow identifying the
  6662. matching streams in the subfiles.
  6663. If no streams are defined in the script, the streams from the first file are
  6664. copied.
  6665. </p>
  6666. </dd>
  6667. <dt>&lsquo;<samp><code>exact_stream_id <var>id</var></code></samp>&rsquo;</dt>
  6668. <dd><p>Set the id of the stream.
  6669. If this directive is given, the string with the corresponding id in the
  6670. subfiles will be used.
  6671. This is especially useful for MPEG-PS (VOB) files, where the order of the
  6672. streams is not reliable.
  6673. </p>
  6674. </dd>
  6675. </dl>
  6676. <a name="Options-3"></a>
  6677. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-3">13.4.2 Options</a></h3>
  6678. <p>This demuxer accepts the following option:
  6679. </p>
  6680. <dl compact="compact">
  6681. <dt>&lsquo;<samp>safe</samp>&rsquo;</dt>
  6682. <dd><p>If set to 1, reject unsafe file paths. A file path is considered safe if it
  6683. does not contain a protocol specification and is relative and all components
  6684. only contain characters from the portable character set (letters, digits,
  6685. period, underscore and hyphen) and have no period at the beginning of a
  6686. component.
  6687. </p>
  6688. <p>If set to 0, any file name is accepted.
  6689. </p>
  6690. <p>The default is 1.
  6691. </p>
  6692. <p>-1 is equivalent to 1 if the format was automatically
  6693. probed and 0 otherwise.
  6694. </p>
  6695. </dd>
  6696. <dt>&lsquo;<samp>auto_convert</samp>&rsquo;</dt>
  6697. <dd><p>If set to 1, try to perform automatic conversions on packet data to make the
  6698. streams concatenable.
  6699. The default is 1.
  6700. </p>
  6701. <p>Currently, the only conversion is adding the h264_mp4toannexb bitstream
  6702. filter to H.264 streams in MP4 format. This is necessary in particular if
  6703. there are resolution changes.
  6704. </p>
  6705. </dd>
  6706. <dt>&lsquo;<samp>segment_time_metadata</samp>&rsquo;</dt>
  6707. <dd><p>If set to 1, every packet will contain the <var>lavf.concat.start_time</var> and the
  6708. <var>lavf.concat.duration</var> packet metadata values which are the start_time and
  6709. the duration of the respective file segments in the concatenated output
  6710. expressed in microseconds. The duration metadata is only set if it is known
  6711. based on the concat file.
  6712. The default is 0.
  6713. </p>
  6714. </dd>
  6715. </dl>
  6716. <a name="Examples-146"></a>
  6717. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-146">13.4.3 Examples</a></h3>
  6718. <ul>
  6719. <li>
  6720. Use absolute filenames and include some comments:
  6721. <div class="example">
  6722. <pre class="example"># my first filename
  6723. file /mnt/share/file-1.wav
  6724. # my second filename including whitespace
  6725. file '/mnt/share/file 2.wav'
  6726. # my third filename including whitespace plus single quote
  6727. file '/mnt/share/file 3'\''.wav'
  6728. </pre></div>
  6729. </li><li>
  6730. Allow for input format auto-probing, use safe filenames and set the duration of
  6731. the first file:
  6732. <div class="example">
  6733. <pre class="example">ffconcat version 1.0
  6734. file file-1.wav
  6735. duration 20.0
  6736. file subdir/file-2.wav
  6737. </pre></div>
  6738. </li></ul>
  6739. <a name="dash"></a>
  6740. <h2 class="section"><a href="ffplay-all.html#toc-dash">13.5 dash</a></h2>
  6741. <p>Dynamic Adaptive Streaming over HTTP demuxer.
  6742. </p>
  6743. <p>This demuxer presents all AVStreams found in the manifest.
  6744. By setting the discard flags on AVStreams the caller can decide
  6745. which streams to actually receive.
  6746. Each stream mirrors the <code>id</code> and <code>bandwidth</code> properties from the
  6747. <code>&lt;Representation&gt;</code> as metadata keys named &quot;id&quot; and &quot;variant_bitrate&quot; respectively.
  6748. </p>
  6749. <a name="flv_002c-live_005fflv"></a>
  6750. <h2 class="section"><a href="ffplay-all.html#toc-flv_002c-live_005fflv">13.6 flv, live_flv</a></h2>
  6751. <p>Adobe Flash Video Format demuxer.
  6752. </p>
  6753. <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.
  6754. </p>
  6755. <div class="example">
  6756. <pre class="example">ffmpeg -f flv -i myfile.flv ...
  6757. ffmpeg -f live_flv -i rtmp://&lt;any.server&gt;/anything/key ....
  6758. </pre></div>
  6759. <dl compact="compact">
  6760. <dt>&lsquo;<samp>-flv_metadata <var>bool</var></samp>&rsquo;</dt>
  6761. <dd><p>Allocate the streams according to the onMetaData array content.
  6762. </p>
  6763. </dd>
  6764. <dt>&lsquo;<samp>-flv_ignore_prevtag <var>bool</var></samp>&rsquo;</dt>
  6765. <dd><p>Ignore the size of previous tag value.
  6766. </p>
  6767. </dd>
  6768. <dt>&lsquo;<samp>-flv_full_metadata <var>bool</var></samp>&rsquo;</dt>
  6769. <dd><p>Output all context of the onMetadata.
  6770. </p></dd>
  6771. </dl>
  6772. <a name="gif"></a>
  6773. <h2 class="section"><a href="ffplay-all.html#toc-gif">13.7 gif</a></h2>
  6774. <p>Animated GIF demuxer.
  6775. </p>
  6776. <p>It accepts the following options:
  6777. </p>
  6778. <dl compact="compact">
  6779. <dt>&lsquo;<samp>min_delay</samp>&rsquo;</dt>
  6780. <dd><p>Set the minimum valid delay between frames in hundredths of seconds.
  6781. Range is 0 to 6000. Default value is 2.
  6782. </p>
  6783. </dd>
  6784. <dt>&lsquo;<samp>max_gif_delay</samp>&rsquo;</dt>
  6785. <dd><p>Set the maximum valid delay between frames in hundredth of seconds.
  6786. Range is 0 to 65535. Default value is 65535 (nearly eleven minutes),
  6787. the maximum value allowed by the specification.
  6788. </p>
  6789. </dd>
  6790. <dt>&lsquo;<samp>default_delay</samp>&rsquo;</dt>
  6791. <dd><p>Set the default delay between frames in hundredths of seconds.
  6792. Range is 0 to 6000. Default value is 10.
  6793. </p>
  6794. </dd>
  6795. <dt>&lsquo;<samp>ignore_loop</samp>&rsquo;</dt>
  6796. <dd><p>GIF files can contain information to loop a certain number of times (or
  6797. infinitely). If &lsquo;<samp>ignore_loop</samp>&rsquo; is set to 1, then the loop setting
  6798. from the input will be ignored and looping will not occur. If set to 0,
  6799. then looping will occur and will cycle the number of times according to
  6800. the GIF. Default value is 1.
  6801. </p></dd>
  6802. </dl>
  6803. <p>For example, with the overlay filter, place an infinitely looping GIF
  6804. over another video:
  6805. </p><div class="example">
  6806. <pre class="example">ffmpeg -i input.mp4 -ignore_loop 0 -i input.gif -filter_complex overlay=shortest=1 out.mkv
  6807. </pre></div>
  6808. <p>Note that in the above example the shortest option for overlay filter is
  6809. used to end the output video at the length of the shortest input file,
  6810. which in this case is &lsquo;<tt>input.mp4</tt>&rsquo; as the GIF in this example loops
  6811. infinitely.
  6812. </p>
  6813. <a name="hls"></a>
  6814. <h2 class="section"><a href="ffplay-all.html#toc-hls">13.8 hls</a></h2>
  6815. <p>HLS demuxer
  6816. </p>
  6817. <p>Apple HTTP Live Streaming demuxer.
  6818. </p>
  6819. <p>This demuxer presents all AVStreams from all variant streams.
  6820. The id field is set to the bitrate variant index number. By setting
  6821. the discard flags on AVStreams (by pressing &rsquo;a&rsquo; or &rsquo;v&rsquo; in ffplay),
  6822. the caller can decide which variant streams to actually receive.
  6823. The total bitrate of the variant that the stream belongs to is
  6824. available in a metadata key named &quot;variant_bitrate&quot;.
  6825. </p>
  6826. <p>It accepts the following options:
  6827. </p>
  6828. <dl compact="compact">
  6829. <dt>&lsquo;<samp>live_start_index</samp>&rsquo;</dt>
  6830. <dd><p>segment index to start live streams at (negative values are from the end).
  6831. </p>
  6832. </dd>
  6833. <dt>&lsquo;<samp>allowed_extensions</samp>&rsquo;</dt>
  6834. <dd><p>&rsquo;,&rsquo; separated list of file extensions that hls is allowed to access.
  6835. </p>
  6836. </dd>
  6837. <dt>&lsquo;<samp>max_reload</samp>&rsquo;</dt>
  6838. <dd><p>Maximum number of times a insufficient list is attempted to be reloaded.
  6839. Default value is 1000.
  6840. </p>
  6841. </dd>
  6842. <dt>&lsquo;<samp>m3u8_hold_counters</samp>&rsquo;</dt>
  6843. <dd><p>The maximum number of times to load m3u8 when it refreshes without new segments.
  6844. Default value is 1000.
  6845. </p>
  6846. </dd>
  6847. <dt>&lsquo;<samp>http_persistent</samp>&rsquo;</dt>
  6848. <dd><p>Use persistent HTTP connections. Applicable only for HTTP streams.
  6849. Enabled by default.
  6850. </p>
  6851. </dd>
  6852. <dt>&lsquo;<samp>http_multiple</samp>&rsquo;</dt>
  6853. <dd><p>Use multiple HTTP connections for downloading HTTP segments.
  6854. Enabled by default for HTTP/1.1 servers.
  6855. </p>
  6856. </dd>
  6857. <dt>&lsquo;<samp>http_seekable</samp>&rsquo;</dt>
  6858. <dd><p>Use HTTP partial requests for downloading HTTP segments.
  6859. 0 = disable, 1 = enable, -1 = auto, Default is auto.
  6860. </p></dd>
  6861. </dl>
  6862. <a name="image2"></a>
  6863. <h2 class="section"><a href="ffplay-all.html#toc-image2">13.9 image2</a></h2>
  6864. <p>Image file demuxer.
  6865. </p>
  6866. <p>This demuxer reads from a list of image files specified by a pattern.
  6867. The syntax and meaning of the pattern is specified by the
  6868. option <var>pattern_type</var>.
  6869. </p>
  6870. <p>The pattern may contain a suffix which is used to automatically
  6871. determine the format of the images contained in the files.
  6872. </p>
  6873. <p>The size, the pixel format, and the format of each image must be the
  6874. same for all the files in the sequence.
  6875. </p>
  6876. <p>This demuxer accepts the following options:
  6877. </p><dl compact="compact">
  6878. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  6879. <dd><p>Set the frame rate for the video stream. It defaults to 25.
  6880. </p></dd>
  6881. <dt>&lsquo;<samp>loop</samp>&rsquo;</dt>
  6882. <dd><p>If set to 1, loop over the input. Default value is 0.
  6883. </p></dd>
  6884. <dt>&lsquo;<samp>pattern_type</samp>&rsquo;</dt>
  6885. <dd><p>Select the pattern type used to interpret the provided filename.
  6886. </p>
  6887. <p><var>pattern_type</var> accepts one of the following values.
  6888. </p><dl compact="compact">
  6889. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  6890. <dd><p>Disable pattern matching, therefore the video will only contain the specified
  6891. image. You should use this option if you do not want to create sequences from
  6892. multiple images and your filenames may contain special pattern characters.
  6893. </p></dd>
  6894. <dt>&lsquo;<samp>sequence</samp>&rsquo;</dt>
  6895. <dd><p>Select a sequence pattern type, used to specify a sequence of files
  6896. indexed by sequential numbers.
  6897. </p>
  6898. <p>A sequence pattern may contain the string &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, which
  6899. specifies the position of the characters representing a sequential
  6900. number in each filename matched by the pattern. If the form
  6901. &quot;%d0<var>N</var>d&quot; is used, the string representing the number in each
  6902. filename is 0-padded and <var>N</var> is the total number of 0-padded
  6903. digits representing the number. The literal character &rsquo;%&rsquo; can be
  6904. specified in the pattern with the string &quot;%%&quot;.
  6905. </p>
  6906. <p>If the sequence pattern contains &quot;%d&quot; or &quot;%0<var>N</var>d&quot;, the first filename of
  6907. the file list specified by the pattern must contain a number
  6908. inclusively contained between <var>start_number</var> and
  6909. <var>start_number</var>+<var>start_number_range</var>-1, and all the following
  6910. numbers must be sequential.
  6911. </p>
  6912. <p>For example the pattern &quot;img-%03d.bmp&quot; will match a sequence of
  6913. filenames of the form &lsquo;<tt>img-001.bmp</tt>&rsquo;, &lsquo;<tt>img-002.bmp</tt>&rsquo;, ...,
  6914. &lsquo;<tt>img-010.bmp</tt>&rsquo;, etc.; the pattern &quot;i%%m%%g-%d.jpg&quot; will match a
  6915. sequence of filenames of the form &lsquo;<tt>i%m%g-1.jpg</tt>&rsquo;,
  6916. &lsquo;<tt>i%m%g-2.jpg</tt>&rsquo;, ..., &lsquo;<tt>i%m%g-10.jpg</tt>&rsquo;, etc.
  6917. </p>
  6918. <p>Note that the pattern must not necessarily contain &quot;%d&quot; or
  6919. &quot;%0<var>N</var>d&quot;, for example to convert a single image file
  6920. &lsquo;<tt>img.jpeg</tt>&rsquo; you can employ the command:
  6921. </p><div class="example">
  6922. <pre class="example">ffmpeg -i img.jpeg img.png
  6923. </pre></div>
  6924. </dd>
  6925. <dt>&lsquo;<samp>glob</samp>&rsquo;</dt>
  6926. <dd><p>Select a glob wildcard pattern type.
  6927. </p>
  6928. <p>The pattern is interpreted like a <code>glob()</code> pattern. This is only
  6929. selectable if libavformat was compiled with globbing support.
  6930. </p>
  6931. </dd>
  6932. <dt>&lsquo;<samp>glob_sequence <em>(deprecated, will be removed)</em></samp>&rsquo;</dt>
  6933. <dd><p>Select a mixed glob wildcard/sequence pattern.
  6934. </p>
  6935. <p>If your version of libavformat was compiled with globbing support, and
  6936. the provided pattern contains at least one glob meta character among
  6937. <code>%*?[]{}</code> that is preceded by an unescaped &quot;%&quot;, the pattern is
  6938. interpreted like a <code>glob()</code> pattern, otherwise it is interpreted
  6939. like a sequence pattern.
  6940. </p>
  6941. <p>All glob special characters <code>%*?[]{}</code> must be prefixed
  6942. with &quot;%&quot;. To escape a literal &quot;%&quot; you shall use &quot;%%&quot;.
  6943. </p>
  6944. <p>For example the pattern <code>foo-%*.jpeg</code> will match all the
  6945. filenames prefixed by &quot;foo-&quot; and terminating with &quot;.jpeg&quot;, and
  6946. <code>foo-%?%?%?.jpeg</code> will match all the filenames prefixed with
  6947. &quot;foo-&quot;, followed by a sequence of three characters, and terminating
  6948. with &quot;.jpeg&quot;.
  6949. </p>
  6950. <p>This pattern type is deprecated in favor of <var>glob</var> and
  6951. <var>sequence</var>.
  6952. </p></dd>
  6953. </dl>
  6954. <p>Default value is <var>glob_sequence</var>.
  6955. </p></dd>
  6956. <dt>&lsquo;<samp>pixel_format</samp>&rsquo;</dt>
  6957. <dd><p>Set the pixel format of the images to read. If not specified the pixel
  6958. format is guessed from the first image file in the sequence.
  6959. </p></dd>
  6960. <dt>&lsquo;<samp>start_number</samp>&rsquo;</dt>
  6961. <dd><p>Set the index of the file matched by the image file pattern to start
  6962. to read from. Default value is 0.
  6963. </p></dd>
  6964. <dt>&lsquo;<samp>start_number_range</samp>&rsquo;</dt>
  6965. <dd><p>Set the index interval range to check when looking for the first image
  6966. file in the sequence, starting from <var>start_number</var>. Default value
  6967. is 5.
  6968. </p></dd>
  6969. <dt>&lsquo;<samp>ts_from_file</samp>&rsquo;</dt>
  6970. <dd><p>If set to 1, will set frame timestamp to modification time of image file. Note
  6971. that monotonity of timestamps is not provided: images go in the same order as
  6972. without this option. Default value is 0.
  6973. If set to 2, will set frame timestamp to the modification time of the image file in
  6974. nanosecond precision.
  6975. </p></dd>
  6976. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  6977. <dd><p>Set the video size of the images to read. If not specified the video
  6978. size is guessed from the first image file in the sequence.
  6979. </p></dd>
  6980. <dt>&lsquo;<samp>export_path_metadata</samp>&rsquo;</dt>
  6981. <dd><p>If set to 1, will add two extra fields to the metadata found in input, making them
  6982. also available for other filters (see <var>drawtext</var> filter for examples). Default
  6983. value is 0. The extra fields are described below:
  6984. </p><dl compact="compact">
  6985. <dt>&lsquo;<samp>lavf.image2dec.source_path</samp>&rsquo;</dt>
  6986. <dd><p>Corresponds to the full path to the input file being read.
  6987. </p></dd>
  6988. <dt>&lsquo;<samp>lavf.image2dec.source_basename</samp>&rsquo;</dt>
  6989. <dd><p>Corresponds to the name of the file being read.
  6990. </p></dd>
  6991. </dl>
  6992. </dd>
  6993. </dl>
  6994. <a name="Examples-138"></a>
  6995. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-138">13.9.1 Examples</a></h3>
  6996. <ul>
  6997. <li>
  6998. Use <code>ffmpeg</code> for creating a video from the images in the file
  6999. sequence &lsquo;<tt>img-001.jpeg</tt>&rsquo;, &lsquo;<tt>img-002.jpeg</tt>&rsquo;, ..., assuming an
  7000. input frame rate of 10 frames per second:
  7001. <div class="example">
  7002. <pre class="example">ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
  7003. </pre></div>
  7004. </li><li>
  7005. As above, but start by reading from a file with index 100 in the sequence:
  7006. <div class="example">
  7007. <pre class="example">ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
  7008. </pre></div>
  7009. </li><li>
  7010. Read images matching the &quot;*.png&quot; glob pattern , that is all the files
  7011. terminating with the &quot;.png&quot; suffix:
  7012. <div class="example">
  7013. <pre class="example">ffmpeg -framerate 10 -pattern_type glob -i &quot;*.png&quot; out.mkv
  7014. </pre></div>
  7015. </li></ul>
  7016. <a name="libgme"></a>
  7017. <h2 class="section"><a href="ffplay-all.html#toc-libgme">13.10 libgme</a></h2>
  7018. <p>The Game Music Emu library is a collection of video game music file emulators.
  7019. </p>
  7020. <p>See <a href="https://bitbucket.org/mpyne/game-music-emu/overview">https://bitbucket.org/mpyne/game-music-emu/overview</a> for more information.
  7021. </p>
  7022. <p>It accepts the following options:
  7023. </p>
  7024. <dl compact="compact">
  7025. <dt>&lsquo;<samp>track_index</samp>&rsquo;</dt>
  7026. <dd><p>Set the index of which track to demux. The demuxer can only export one track.
  7027. Track indexes start at 0. Default is to pick the first track. Number of tracks
  7028. is exported as <var>tracks</var> metadata entry.
  7029. </p>
  7030. </dd>
  7031. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  7032. <dd><p>Set the sampling rate of the exported track. Range is 1000 to 999999. Default is 44100.
  7033. </p>
  7034. </dd>
  7035. <dt>&lsquo;<samp>max_size <em>(bytes)</em></samp>&rsquo;</dt>
  7036. <dd><p>The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size,
  7037. which in turn, acts as a ceiling for the size of files that can be read.
  7038. Default is 50 MiB.
  7039. </p>
  7040. </dd>
  7041. </dl>
  7042. <a name="libmodplug"></a>
  7043. <h2 class="section"><a href="ffplay-all.html#toc-libmodplug">13.11 libmodplug</a></h2>
  7044. <p>ModPlug based module demuxer
  7045. </p>
  7046. <p>See <a href="https://github.com/Konstanty/libmodplug">https://github.com/Konstanty/libmodplug</a>
  7047. </p>
  7048. <p>It will export one 2-channel 16-bit 44.1 kHz audio stream.
  7049. Optionally, a <code>pal8</code> 16-color video stream can be exported with or without printed metadata.
  7050. </p>
  7051. <p>It accepts the following options:
  7052. </p>
  7053. <dl compact="compact">
  7054. <dt>&lsquo;<samp>noise_reduction</samp>&rsquo;</dt>
  7055. <dd><p>Apply a simple low-pass filter. Can be 1 (on) or 0 (off). Default is 0.
  7056. </p>
  7057. </dd>
  7058. <dt>&lsquo;<samp>reverb_depth</samp>&rsquo;</dt>
  7059. <dd><p>Set amount of reverb. Range 0-100. Default is 0.
  7060. </p>
  7061. </dd>
  7062. <dt>&lsquo;<samp>reverb_delay</samp>&rsquo;</dt>
  7063. <dd><p>Set delay in ms, clamped to 40-250 ms. Default is 0.
  7064. </p>
  7065. </dd>
  7066. <dt>&lsquo;<samp>bass_amount</samp>&rsquo;</dt>
  7067. <dd><p>Apply bass expansion a.k.a. XBass or megabass. Range is 0 (quiet) to 100 (loud). Default is 0.
  7068. </p>
  7069. </dd>
  7070. <dt>&lsquo;<samp>bass_range</samp>&rsquo;</dt>
  7071. <dd><p>Set cutoff i.e. upper-bound for bass frequencies. Range is 10-100 Hz. Default is 0.
  7072. </p>
  7073. </dd>
  7074. <dt>&lsquo;<samp>surround_depth</samp>&rsquo;</dt>
  7075. <dd><p>Apply a Dolby Pro-Logic surround effect. Range is 0 (quiet) to 100 (heavy). Default is 0.
  7076. </p>
  7077. </dd>
  7078. <dt>&lsquo;<samp>surround_delay</samp>&rsquo;</dt>
  7079. <dd><p>Set surround delay in ms, clamped to 5-40 ms. Default is 0.
  7080. </p>
  7081. </dd>
  7082. <dt>&lsquo;<samp>max_size</samp>&rsquo;</dt>
  7083. <dd><p>The demuxer buffers the entire file into memory. Adjust this value to set the maximum buffer size,
  7084. which in turn, acts as a ceiling for the size of files that can be read. Range is 0 to 100 MiB.
  7085. 0 removes buffer size limit (not recommended). Default is 5 MiB.
  7086. </p>
  7087. </dd>
  7088. <dt>&lsquo;<samp>video_stream_expr</samp>&rsquo;</dt>
  7089. <dd><p>String which is evaluated using the eval API to assign colors to the generated video stream.
  7090. Variables which can be used are <code>x</code>, <code>y</code>, <code>w</code>, <code>h</code>, <code>t</code>, <code>speed</code>,
  7091. <code>tempo</code>, <code>order</code>, <code>pattern</code> and <code>row</code>.
  7092. </p>
  7093. </dd>
  7094. <dt>&lsquo;<samp>video_stream</samp>&rsquo;</dt>
  7095. <dd><p>Generate video stream. Can be 1 (on) or 0 (off). Default is 0.
  7096. </p>
  7097. </dd>
  7098. <dt>&lsquo;<samp>video_stream_w</samp>&rsquo;</dt>
  7099. <dd><p>Set video frame width in &rsquo;chars&rsquo; where one char indicates 8 pixels. Range is 20-512. Default is 30.
  7100. </p>
  7101. </dd>
  7102. <dt>&lsquo;<samp>video_stream_h</samp>&rsquo;</dt>
  7103. <dd><p>Set video frame height in &rsquo;chars&rsquo; where one char indicates 8 pixels. Range is 20-512. Default is 30.
  7104. </p>
  7105. </dd>
  7106. <dt>&lsquo;<samp>video_stream_ptxt</samp>&rsquo;</dt>
  7107. <dd><p>Print metadata on video stream. Includes <code>speed</code>, <code>tempo</code>, <code>order</code>, <code>pattern</code>,
  7108. <code>row</code> and <code>ts</code> (time in ms). Can be 1 (on) or 0 (off). Default is 1.
  7109. </p>
  7110. </dd>
  7111. </dl>
  7112. <a name="libopenmpt"></a>
  7113. <h2 class="section"><a href="ffplay-all.html#toc-libopenmpt">13.12 libopenmpt</a></h2>
  7114. <p>libopenmpt based module demuxer
  7115. </p>
  7116. <p>See <a href="https://lib.openmpt.org/libopenmpt/">https://lib.openmpt.org/libopenmpt/</a> for more information.
  7117. </p>
  7118. <p>Some files have multiple subsongs (tracks) this can be set with the &lsquo;<samp>subsong</samp>&rsquo;
  7119. option.
  7120. </p>
  7121. <p>It accepts the following options:
  7122. </p>
  7123. <dl compact="compact">
  7124. <dt>&lsquo;<samp>subsong</samp>&rsquo;</dt>
  7125. <dd><p>Set the subsong index. This can be either &rsquo;all&rsquo;, &rsquo;auto&rsquo;, or the index of the
  7126. subsong. Subsong indexes start at 0. The default is &rsquo;auto&rsquo;.
  7127. </p>
  7128. <p>The default value is to let libopenmpt choose.
  7129. </p>
  7130. </dd>
  7131. <dt>&lsquo;<samp>layout</samp>&rsquo;</dt>
  7132. <dd><p>Set the channel layout. Valid values are 1, 2, and 4 channel layouts.
  7133. The default value is STEREO.
  7134. </p>
  7135. </dd>
  7136. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  7137. <dd><p>Set the sample rate for libopenmpt to output.
  7138. Range is from 1000 to INT_MAX. The value default is 48000.
  7139. </p></dd>
  7140. </dl>
  7141. <a name="mov_002fmp4_002f3gp"></a>
  7142. <h2 class="section"><a href="ffplay-all.html#toc-mov_002fmp4_002f3gp">13.13 mov/mp4/3gp</a></h2>
  7143. <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).
  7144. </p>
  7145. <p>Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism, ismv, isma, f4v
  7146. </p>
  7147. <a name="Options-26"></a>
  7148. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-26">13.13.1 Options</a></h3>
  7149. <p>This demuxer accepts the following options:
  7150. </p><dl compact="compact">
  7151. <dt>&lsquo;<samp>enable_drefs</samp>&rsquo;</dt>
  7152. <dd><p>Enable loading of external tracks, disabled by default.
  7153. Enabling this can theoretically leak information in some use cases.
  7154. </p>
  7155. </dd>
  7156. <dt>&lsquo;<samp>use_absolute_path</samp>&rsquo;</dt>
  7157. <dd><p>Allows loading of external tracks via absolute paths, disabled by default.
  7158. Enabling this poses a security risk. It should only be enabled if the source
  7159. is known to be non-malicious.
  7160. </p>
  7161. </dd>
  7162. <dt>&lsquo;<samp>seek_streams_individually</samp>&rsquo;</dt>
  7163. <dd><p>When seeking, identify the closest point in each stream individually and demux packets in
  7164. that stream from identified point. This can lead to a different sequence of packets compared
  7165. to demuxing linearly from the beginning. Default is true.
  7166. </p>
  7167. </dd>
  7168. <dt>&lsquo;<samp>ignore_editlist</samp>&rsquo;</dt>
  7169. <dd><p>Ignore any edit list atoms. The demuxer, by default, modifies the stream index to reflect the
  7170. timeline described by the edit list. Default is false.
  7171. </p>
  7172. </dd>
  7173. <dt>&lsquo;<samp>advanced_editlist</samp>&rsquo;</dt>
  7174. <dd><p>Modify the stream index to reflect the timeline described by the edit list. <code>ignore_editlist</code>
  7175. must be set to false for this option to be effective.
  7176. If both <code>ignore_editlist</code> and this option are set to false, then only the
  7177. start of the stream index is modified to reflect initial dwell time or starting timestamp
  7178. described by the edit list. Default is true.
  7179. </p>
  7180. </dd>
  7181. <dt>&lsquo;<samp>ignore_chapters</samp>&rsquo;</dt>
  7182. <dd><p>Don&rsquo;t parse chapters. This includes GoPro &rsquo;HiLight&rsquo; tags/moments. Note that chapters are
  7183. only parsed when input is seekable. Default is false.
  7184. </p>
  7185. </dd>
  7186. <dt>&lsquo;<samp>use_mfra_for</samp>&rsquo;</dt>
  7187. <dd><p>For seekable fragmented input, set fragment&rsquo;s starting timestamp from media fragment random access box, if present.
  7188. </p>
  7189. <p>Following options are available:
  7190. </p><dl compact="compact">
  7191. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  7192. <dd><p>Auto-detect whether to set mfra timestamps as PTS or DTS <em>(default)</em>
  7193. </p>
  7194. </dd>
  7195. <dt>&lsquo;<samp>dts</samp>&rsquo;</dt>
  7196. <dd><p>Set mfra timestamps as DTS
  7197. </p>
  7198. </dd>
  7199. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  7200. <dd><p>Set mfra timestamps as PTS
  7201. </p>
  7202. </dd>
  7203. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  7204. <dd><p>Don&rsquo;t use mfra box to set timestamps
  7205. </p></dd>
  7206. </dl>
  7207. </dd>
  7208. <dt>&lsquo;<samp>export_all</samp>&rsquo;</dt>
  7209. <dd><p>Export unrecognized boxes within the <var>udta</var> box as metadata entries. The first four
  7210. characters of the box type are set as the key. Default is false.
  7211. </p>
  7212. </dd>
  7213. <dt>&lsquo;<samp>export_xmp</samp>&rsquo;</dt>
  7214. <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
  7215. if <code>export_all</code> is set and this option isn&rsquo;t, the contents of <var>XMP_</var> box are still exported
  7216. but with key <code>XMP_</code>. Default is false.
  7217. </p>
  7218. </dd>
  7219. <dt>&lsquo;<samp>activation_bytes</samp>&rsquo;</dt>
  7220. <dd><p>4-byte key required to decrypt Audible AAX and AAX+ files. See Audible AAX subsection below.
  7221. </p>
  7222. </dd>
  7223. <dt>&lsquo;<samp>audible_fixed_key</samp>&rsquo;</dt>
  7224. <dd><p>Fixed key used for handling Audible AAX/AAX+ files. It has been pre-set so should not be necessary to
  7225. specify.
  7226. </p>
  7227. </dd>
  7228. <dt>&lsquo;<samp>decryption_key</samp>&rsquo;</dt>
  7229. <dd><p>16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).
  7230. </p></dd>
  7231. </dl>
  7232. <a name="Audible-AAX"></a>
  7233. <h3 class="subsection"><a href="ffplay-all.html#toc-Audible-AAX">13.13.2 Audible AAX</a></h3>
  7234. <p>Audible AAX files are encrypted M4B files, and they can be decrypted by specifying a 4 byte activation secret.
  7235. </p><div class="example">
  7236. <pre class="example">ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
  7237. </pre></div>
  7238. <a name="mpegts"></a>
  7239. <h2 class="section"><a href="ffplay-all.html#toc-mpegts">13.14 mpegts</a></h2>
  7240. <p>MPEG-2 transport stream demuxer.
  7241. </p>
  7242. <p>This demuxer accepts the following options:
  7243. </p><dl compact="compact">
  7244. <dt>&lsquo;<samp>resync_size</samp>&rsquo;</dt>
  7245. <dd><p>Set size limit for looking up a new synchronization. Default value is
  7246. 65536.
  7247. </p>
  7248. </dd>
  7249. <dt>&lsquo;<samp>skip_unknown_pmt</samp>&rsquo;</dt>
  7250. <dd><p>Skip PMTs for programs not defined in the PAT. Default value is 0.
  7251. </p>
  7252. </dd>
  7253. <dt>&lsquo;<samp>fix_teletext_pts</samp>&rsquo;</dt>
  7254. <dd><p>Override teletext packet PTS and DTS values with the timestamps calculated
  7255. from the PCR of the first program which the teletext stream is part of and is
  7256. not discarded. Default value is 1, set this option to 0 if you want your
  7257. teletext packet PTS and DTS values untouched.
  7258. </p>
  7259. </dd>
  7260. <dt>&lsquo;<samp>ts_packetsize</samp>&rsquo;</dt>
  7261. <dd><p>Output option carrying the raw packet size in bytes.
  7262. Show the detected raw packet size, cannot be set by the user.
  7263. </p>
  7264. </dd>
  7265. <dt>&lsquo;<samp>scan_all_pmts</samp>&rsquo;</dt>
  7266. <dd><p>Scan and combine all PMTs. The value is an integer with value from -1
  7267. to 1 (-1 means automatic setting, 1 means enabled, 0 means
  7268. disabled). Default value is -1.
  7269. </p>
  7270. </dd>
  7271. <dt>&lsquo;<samp>merge_pmt_versions</samp>&rsquo;</dt>
  7272. <dd><p>Re-use existing streams when a PMT&rsquo;s version is updated and elementary
  7273. streams move to different PIDs. Default value is 0.
  7274. </p></dd>
  7275. </dl>
  7276. <a name="mpjpeg"></a>
  7277. <h2 class="section"><a href="ffplay-all.html#toc-mpjpeg">13.15 mpjpeg</a></h2>
  7278. <p>MJPEG encapsulated in multi-part MIME demuxer.
  7279. </p>
  7280. <p>This demuxer allows reading of MJPEG, where each frame is represented as a part of
  7281. multipart/x-mixed-replace stream.
  7282. </p><dl compact="compact">
  7283. <dt>&lsquo;<samp>strict_mime_boundary</samp>&rsquo;</dt>
  7284. <dd><p>Default implementation applies a relaxed standard to multi-part MIME boundary detection,
  7285. to prevent regression with numerous existing endpoints not generating a proper MIME
  7286. MJPEG stream. Turning this option on by setting it to 1 will result in a stricter check
  7287. of the boundary value.
  7288. </p></dd>
  7289. </dl>
  7290. <a name="rawvideo-1"></a>
  7291. <h2 class="section"><a href="ffplay-all.html#toc-rawvideo-1">13.16 rawvideo</a></h2>
  7292. <p>Raw video demuxer.
  7293. </p>
  7294. <p>This demuxer allows one to read raw video data. Since there is no header
  7295. specifying the assumed video parameters, the user must specify them
  7296. in order to be able to decode the data correctly.
  7297. </p>
  7298. <p>This demuxer accepts the following options:
  7299. </p><dl compact="compact">
  7300. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  7301. <dd><p>Set input video frame rate. Default value is 25.
  7302. </p>
  7303. </dd>
  7304. <dt>&lsquo;<samp>pixel_format</samp>&rsquo;</dt>
  7305. <dd><p>Set the input video pixel format. Default value is <code>yuv420p</code>.
  7306. </p>
  7307. </dd>
  7308. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  7309. <dd><p>Set the input video size. This value must be specified explicitly.
  7310. </p></dd>
  7311. </dl>
  7312. <p>For example to read a rawvideo file &lsquo;<tt>input.raw</tt>&rsquo; with
  7313. <code>ffplay</code>, assuming a pixel format of <code>rgb24</code>, a video
  7314. size of <code>320x240</code>, and a frame rate of 10 images per second, use
  7315. the command:
  7316. </p><div class="example">
  7317. <pre class="example">ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw
  7318. </pre></div>
  7319. <a name="sbg"></a>
  7320. <h2 class="section"><a href="ffplay-all.html#toc-sbg">13.17 sbg</a></h2>
  7321. <p>SBaGen script demuxer.
  7322. </p>
  7323. <p>This demuxer reads the script language used by SBaGen
  7324. <a href="http://uazu.net/sbagen/">http://uazu.net/sbagen/</a> to generate binaural beats sessions. A SBG
  7325. script looks like that:
  7326. </p><div class="example">
  7327. <pre class="example">-SE
  7328. a: 300-2.5/3 440+4.5/0
  7329. b: 300-2.5/0 440+4.5/3
  7330. off: -
  7331. NOW == a
  7332. +0:07:00 == b
  7333. +0:14:00 == a
  7334. +0:21:00 == b
  7335. +0:30:00 off
  7336. </pre></div>
  7337. <p>A SBG script can mix absolute and relative timestamps. If the script uses
  7338. either only absolute timestamps (including the script start time) or only
  7339. relative ones, then its layout is fixed, and the conversion is
  7340. straightforward. On the other hand, if the script mixes both kind of
  7341. timestamps, then the <var>NOW</var> reference for relative timestamps will be
  7342. taken from the current time of day at the time the script is read, and the
  7343. script layout will be frozen according to that reference. That means that if
  7344. the script is directly played, the actual times will match the absolute
  7345. timestamps up to the sound controller&rsquo;s clock accuracy, but if the user
  7346. somehow pauses the playback or seeks, all times will be shifted accordingly.
  7347. </p>
  7348. <a name="tedcaptions"></a>
  7349. <h2 class="section"><a href="ffplay-all.html#toc-tedcaptions">13.18 tedcaptions</a></h2>
  7350. <p>JSON captions used for <a href="http://www.ted.com/">TED Talks</a>.
  7351. </p>
  7352. <p>TED does not provide links to the captions, but they can be guessed from the
  7353. page. The file &lsquo;<tt>tools/bookmarklets.html</tt>&rsquo; from the FFmpeg source tree
  7354. contains a bookmarklet to expose them.
  7355. </p>
  7356. <p>This demuxer accepts the following option:
  7357. </p><dl compact="compact">
  7358. <dt>&lsquo;<samp>start_time</samp>&rsquo;</dt>
  7359. <dd><p>Set the start time of the TED talk, in milliseconds. The default is 15000
  7360. (15s). It is used to sync the captions with the downloadable videos, because
  7361. they include a 15s intro.
  7362. </p></dd>
  7363. </dl>
  7364. <p>Example: convert the captions to a format most players understand:
  7365. </p><div class="example">
  7366. <pre class="example">ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt
  7367. </pre></div>
  7368. <a name="vapoursynth"></a>
  7369. <h2 class="section"><a href="ffplay-all.html#toc-vapoursynth">13.19 vapoursynth</a></h2>
  7370. <p>Vapoursynth wrapper.
  7371. </p>
  7372. <p>Due to security concerns, Vapoursynth scripts will not
  7373. be autodetected so the input format has to be forced. For ff* CLI tools,
  7374. add <code>-f vapoursynth</code> before the input <code>-i yourscript.vpy</code>.
  7375. </p>
  7376. <p>This demuxer accepts the following option:
  7377. </p><dl compact="compact">
  7378. <dt>&lsquo;<samp>max_script_size</samp>&rsquo;</dt>
  7379. <dd><p>The demuxer buffers the entire script into memory. Adjust this value to set the maximum buffer size,
  7380. which in turn, acts as a ceiling for the size of scripts that can be read.
  7381. Default is 1 MiB.
  7382. </p></dd>
  7383. </dl>
  7384. <a name="Metadata"></a>
  7385. <h1 class="chapter"><a href="ffplay-all.html#toc-Metadata">14 Metadata</a></h1>
  7386. <p>FFmpeg is able to dump metadata from media files into a simple UTF-8-encoded
  7387. INI-like text file and then load it back using the metadata muxer/demuxer.
  7388. </p>
  7389. <p>The file format is as follows:
  7390. </p><ol>
  7391. <li>
  7392. A file consists of a header and a number of metadata tags divided into sections,
  7393. each on its own line.
  7394. </li><li>
  7395. The header is a &lsquo;<samp>;FFMETADATA</samp>&rsquo; string, followed by a version number (now 1).
  7396. </li><li>
  7397. Metadata tags are of the form &lsquo;<samp>key=value</samp>&rsquo;
  7398. </li><li>
  7399. Immediately after header follows global metadata
  7400. </li><li>
  7401. After global metadata there may be sections with per-stream/per-chapter
  7402. metadata.
  7403. </li><li>
  7404. A section starts with the section name in uppercase (i.e. STREAM or CHAPTER) in
  7405. brackets (&lsquo;<samp>[</samp>&rsquo;, &lsquo;<samp>]</samp>&rsquo;) and ends with next section or end of file.
  7406. </li><li>
  7407. At the beginning of a chapter section there may be an optional timebase to be
  7408. used for start/end values. It must be in form
  7409. &lsquo;<samp>TIMEBASE=<var>num</var>/<var>den</var></samp>&rsquo;, where <var>num</var> and <var>den</var> are
  7410. integers. If the timebase is missing then start/end times are assumed to
  7411. be in nanoseconds.
  7412. <p>Next a chapter section must contain chapter start and end times in form
  7413. &lsquo;<samp>START=<var>num</var></samp>&rsquo;, &lsquo;<samp>END=<var>num</var></samp>&rsquo;, where <var>num</var> is a positive
  7414. integer.
  7415. </p>
  7416. </li><li>
  7417. Empty lines and lines starting with &lsquo;<samp>;</samp>&rsquo; or &lsquo;<samp>#</samp>&rsquo; are ignored.
  7418. </li><li>
  7419. Metadata keys or values containing special characters (&lsquo;<samp>=</samp>&rsquo;, &lsquo;<samp>;</samp>&rsquo;,
  7420. &lsquo;<samp>#</samp>&rsquo;, &lsquo;<samp>\</samp>&rsquo; and a newline) must be escaped with a backslash &lsquo;<samp>\</samp>&rsquo;.
  7421. </li><li>
  7422. Note that whitespace in metadata (e.g. &lsquo;<samp>foo = bar</samp>&rsquo;) is considered to be
  7423. a part of the tag (in the example above key is &lsquo;<samp>foo </samp>&rsquo;, value is
  7424. &lsquo;<samp> bar</samp>&rsquo;).
  7425. </li></ol>
  7426. <p>A ffmetadata file might look like this:
  7427. </p><div class="example">
  7428. <pre class="example">;FFMETADATA1
  7429. title=bike\\shed
  7430. ;this is a comment
  7431. artist=FFmpeg troll team
  7432. [CHAPTER]
  7433. TIMEBASE=1/1000
  7434. START=0
  7435. #chapter ends at 0:01:00
  7436. END=60000
  7437. title=chapter \#1
  7438. [STREAM]
  7439. title=multi\
  7440. line
  7441. </pre></div>
  7442. <p>By using the ffmetadata muxer and demuxer it is possible to extract
  7443. metadata from an input file to an ffmetadata file, and then transcode
  7444. the file into an output file with the edited ffmetadata file.
  7445. </p>
  7446. <p>Extracting an ffmetadata file with &lsquo;<tt>ffmpeg</tt>&rsquo; goes as follows:
  7447. </p><div class="example">
  7448. <pre class="example">ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE
  7449. </pre></div>
  7450. <p>Reinserting edited metadata information from the FFMETADATAFILE file can
  7451. be done as:
  7452. </p><div class="example">
  7453. <pre class="example">ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
  7454. </pre></div>
  7455. <a name="Protocol-Options"></a>
  7456. <h1 class="chapter"><a href="ffplay-all.html#toc-Protocol-Options">15 Protocol Options</a></h1>
  7457. <p>The libavformat library provides some generic global options, which
  7458. can be set on all the protocols. In addition each protocol may support
  7459. so-called private options, which are specific for that component.
  7460. </p>
  7461. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  7462. FFmpeg tools, or by setting the value explicitly in the
  7463. <code>AVFormatContext</code> options or using the &lsquo;<tt>libavutil/opt.h</tt>&rsquo; API
  7464. for programmatic use.
  7465. </p>
  7466. <p>The list of supported options follows:
  7467. </p>
  7468. <dl compact="compact">
  7469. <dt>&lsquo;<samp>protocol_whitelist <var>list</var> (<em>input</em>)</samp>&rsquo;</dt>
  7470. <dd><p>Set a &quot;,&quot;-separated list of allowed protocols. &quot;ALL&quot; matches all protocols. Protocols
  7471. prefixed by &quot;-&quot; are disabled.
  7472. All protocols are allowed by default but protocols used by an another
  7473. protocol (nested protocols) are restricted to a per protocol subset.
  7474. </p></dd>
  7475. </dl>
  7476. <a name="Protocols"></a>
  7477. <h1 class="chapter"><a href="ffplay-all.html#toc-Protocols">16 Protocols</a></h1>
  7478. <p>Protocols are configured elements in FFmpeg that enable access to
  7479. resources that require specific protocols.
  7480. </p>
  7481. <p>When you configure your FFmpeg build, all the supported protocols are
  7482. enabled by default. You can list all available ones using the
  7483. configure option &quot;&ndash;list-protocols&quot;.
  7484. </p>
  7485. <p>You can disable all the protocols using the configure option
  7486. &quot;&ndash;disable-protocols&quot;, and selectively enable a protocol using the
  7487. option &quot;&ndash;enable-protocol=<var>PROTOCOL</var>&quot;, or you can disable a
  7488. particular protocol using the option
  7489. &quot;&ndash;disable-protocol=<var>PROTOCOL</var>&quot;.
  7490. </p>
  7491. <p>The option &quot;-protocols&quot; of the ff* tools will display the list of
  7492. supported protocols.
  7493. </p>
  7494. <p>All protocols accept the following options:
  7495. </p>
  7496. <dl compact="compact">
  7497. <dt>&lsquo;<samp>rw_timeout</samp>&rsquo;</dt>
  7498. <dd><p>Maximum time to wait for (network) read/write operations to complete,
  7499. in microseconds.
  7500. </p></dd>
  7501. </dl>
  7502. <p>A description of the currently available protocols follows.
  7503. </p>
  7504. <a name="async"></a>
  7505. <h2 class="section"><a href="ffplay-all.html#toc-async">16.1 async</a></h2>
  7506. <p>Asynchronous data filling wrapper for input stream.
  7507. </p>
  7508. <p>Fill data in a background thread, to decouple I/O operation from demux thread.
  7509. </p>
  7510. <div class="example">
  7511. <pre class="example">async:<var>URL</var>
  7512. async:http://host/resource
  7513. async:cache:http://host/resource
  7514. </pre></div>
  7515. <a name="bluray"></a>
  7516. <h2 class="section"><a href="ffplay-all.html#toc-bluray">16.2 bluray</a></h2>
  7517. <p>Read BluRay playlist.
  7518. </p>
  7519. <p>The accepted options are:
  7520. </p><dl compact="compact">
  7521. <dt>&lsquo;<samp>angle</samp>&rsquo;</dt>
  7522. <dd><p>BluRay angle
  7523. </p>
  7524. </dd>
  7525. <dt>&lsquo;<samp>chapter</samp>&rsquo;</dt>
  7526. <dd><p>Start chapter (1...N)
  7527. </p>
  7528. </dd>
  7529. <dt>&lsquo;<samp>playlist</samp>&rsquo;</dt>
  7530. <dd><p>Playlist to read (BDMV/PLAYLIST/?????.mpls)
  7531. </p>
  7532. </dd>
  7533. </dl>
  7534. <p>Examples:
  7535. </p>
  7536. <p>Read longest playlist from BluRay mounted to /mnt/bluray:
  7537. </p><div class="example">
  7538. <pre class="example">bluray:/mnt/bluray
  7539. </pre></div>
  7540. <p>Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
  7541. </p><div class="example">
  7542. <pre class="example">-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
  7543. </pre></div>
  7544. <a name="cache"></a>
  7545. <h2 class="section"><a href="ffplay-all.html#toc-cache">16.3 cache</a></h2>
  7546. <p>Caching wrapper for input stream.
  7547. </p>
  7548. <p>Cache the input stream to temporary file. It brings seeking capability to live streams.
  7549. </p>
  7550. <div class="example">
  7551. <pre class="example">cache:<var>URL</var>
  7552. </pre></div>
  7553. <a name="concat-3"></a>
  7554. <h2 class="section"><a href="ffplay-all.html#toc-concat-3">16.4 concat</a></h2>
  7555. <p>Physical concatenation protocol.
  7556. </p>
  7557. <p>Read and seek from many resources in sequence as if they were
  7558. a unique resource.
  7559. </p>
  7560. <p>A URL accepted by this protocol has the syntax:
  7561. </p><div class="example">
  7562. <pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
  7563. </pre></div>
  7564. <p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
  7565. resource to be concatenated, each one possibly specifying a distinct
  7566. protocol.
  7567. </p>
  7568. <p>For example to read a sequence of files &lsquo;<tt>split1.mpeg</tt>&rsquo;,
  7569. &lsquo;<tt>split2.mpeg</tt>&rsquo;, &lsquo;<tt>split3.mpeg</tt>&rsquo; with <code>ffplay</code> use the
  7570. command:
  7571. </p><div class="example">
  7572. <pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
  7573. </pre></div>
  7574. <p>Note that you may need to escape the character &quot;|&quot; which is special for
  7575. many shells.
  7576. </p>
  7577. <a name="crypto"></a>
  7578. <h2 class="section"><a href="ffplay-all.html#toc-crypto">16.5 crypto</a></h2>
  7579. <p>AES-encrypted stream reading protocol.
  7580. </p>
  7581. <p>The accepted options are:
  7582. </p><dl compact="compact">
  7583. <dt>&lsquo;<samp>key</samp>&rsquo;</dt>
  7584. <dd><p>Set the AES decryption key binary block from given hexadecimal representation.
  7585. </p>
  7586. </dd>
  7587. <dt>&lsquo;<samp>iv</samp>&rsquo;</dt>
  7588. <dd><p>Set the AES decryption initialization vector binary block from given hexadecimal representation.
  7589. </p></dd>
  7590. </dl>
  7591. <p>Accepted URL formats:
  7592. </p><div class="example">
  7593. <pre class="example">crypto:<var>URL</var>
  7594. crypto+<var>URL</var>
  7595. </pre></div>
  7596. <a name="data"></a>
  7597. <h2 class="section"><a href="ffplay-all.html#toc-data">16.6 data</a></h2>
  7598. <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>.
  7599. </p>
  7600. <p>For example, to convert a GIF file given inline with <code>ffmpeg</code>:
  7601. </p><div class="example">
  7602. <pre class="example">ffmpeg -i &quot;data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=&quot; smiley.png
  7603. </pre></div>
  7604. <a name="file"></a>
  7605. <h2 class="section"><a href="ffplay-all.html#toc-file">16.7 file</a></h2>
  7606. <p>File access protocol.
  7607. </p>
  7608. <p>Read from or write to a file.
  7609. </p>
  7610. <p>A file URL can have the form:
  7611. </p><div class="example">
  7612. <pre class="example">file:<var>filename</var>
  7613. </pre></div>
  7614. <p>where <var>filename</var> is the path of the file to read.
  7615. </p>
  7616. <p>An URL that does not have a protocol prefix will be assumed to be a
  7617. file URL. Depending on the build, an URL that looks like a Windows
  7618. path with the drive letter at the beginning will also be assumed to be
  7619. a file URL (usually not the case in builds for unix-like systems).
  7620. </p>
  7621. <p>For example to read from a file &lsquo;<tt>input.mpeg</tt>&rsquo; with <code>ffmpeg</code>
  7622. use the command:
  7623. </p><div class="example">
  7624. <pre class="example">ffmpeg -i file:input.mpeg output.mpeg
  7625. </pre></div>
  7626. <p>This protocol accepts the following options:
  7627. </p>
  7628. <dl compact="compact">
  7629. <dt>&lsquo;<samp>truncate</samp>&rsquo;</dt>
  7630. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  7631. truncating. Default value is 1.
  7632. </p>
  7633. </dd>
  7634. <dt>&lsquo;<samp>blocksize</samp>&rsquo;</dt>
  7635. <dd><p>Set I/O operation maximum block size, in bytes. Default value is
  7636. <code>INT_MAX</code>, which results in not limiting the requested block size.
  7637. Setting this value reasonably low improves user termination request reaction
  7638. time, which is valuable for files on slow medium.
  7639. </p>
  7640. </dd>
  7641. <dt>&lsquo;<samp>follow</samp>&rsquo;</dt>
  7642. <dd><p>If set to 1, the protocol will retry reading at the end of the file, allowing
  7643. reading files that still are being written. In order for this to terminate,
  7644. you either need to use the rw_timeout option, or use the interrupt callback
  7645. (for API users).
  7646. </p>
  7647. </dd>
  7648. <dt>&lsquo;<samp>seekable</samp>&rsquo;</dt>
  7649. <dd><p>Controls if seekability is advertised on the file. 0 means non-seekable, -1
  7650. means auto (seekable for normal files, non-seekable for named pipes).
  7651. </p>
  7652. <p>Many demuxers handle seekable and non-seekable resources differently,
  7653. overriding this might speed up opening certain files at the cost of losing some
  7654. features (e.g. accurate seeking).
  7655. </p></dd>
  7656. </dl>
  7657. <a name="ftp"></a>
  7658. <h2 class="section"><a href="ffplay-all.html#toc-ftp">16.8 ftp</a></h2>
  7659. <p>FTP (File Transfer Protocol).
  7660. </p>
  7661. <p>Read from or write to remote resources using FTP protocol.
  7662. </p>
  7663. <p>Following syntax is required.
  7664. </p><div class="example">
  7665. <pre class="example">ftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  7666. </pre></div>
  7667. <p>This protocol accepts the following options.
  7668. </p>
  7669. <dl compact="compact">
  7670. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  7671. <dd><p>Set timeout in microseconds of socket I/O operations used by the underlying low level
  7672. operation. By default it is set to -1, which means that the timeout is
  7673. not specified.
  7674. </p>
  7675. </dd>
  7676. <dt>&lsquo;<samp>ftp-user</samp>&rsquo;</dt>
  7677. <dd><p>Set a user to be used for authenticating to the FTP server. This is overridden by the
  7678. user in the FTP URL.
  7679. </p>
  7680. </dd>
  7681. <dt>&lsquo;<samp>ftp-password</samp>&rsquo;</dt>
  7682. <dd><p>Set a password to be used for authenticating to the FTP server. This is overridden by
  7683. the password in the FTP URL, or by &lsquo;<samp>ftp-anonymous-password</samp>&rsquo; if no user is set.
  7684. </p>
  7685. </dd>
  7686. <dt>&lsquo;<samp>ftp-anonymous-password</samp>&rsquo;</dt>
  7687. <dd><p>Password used when login as anonymous user. Typically an e-mail address
  7688. should be used.
  7689. </p>
  7690. </dd>
  7691. <dt>&lsquo;<samp>ftp-write-seekable</samp>&rsquo;</dt>
  7692. <dd><p>Control seekability of connection during encoding. If set to 1 the
  7693. resource is supposed to be seekable, if set to 0 it is assumed not
  7694. to be seekable. Default value is 0.
  7695. </p></dd>
  7696. </dl>
  7697. <p>NOTE: Protocol can be used as output, but it is recommended to not do
  7698. it, unless special care is taken (tests, customized server configuration
  7699. etc.). Different FTP servers behave in different way during seek
  7700. operation. ff* tools may produce incomplete content due to server limitations.
  7701. </p>
  7702. <a name="gopher"></a>
  7703. <h2 class="section"><a href="ffplay-all.html#toc-gopher">16.9 gopher</a></h2>
  7704. <p>Gopher protocol.
  7705. </p>
  7706. <a name="hls-1"></a>
  7707. <h2 class="section"><a href="ffplay-all.html#toc-hls-1">16.10 hls</a></h2>
  7708. <p>Read Apple HTTP Live Streaming compliant segmented stream as
  7709. a uniform one. The M3U8 playlists describing the segments can be
  7710. remote HTTP resources or local files, accessed using the standard
  7711. file protocol.
  7712. The nested protocol is declared by specifying
  7713. &quot;+<var>proto</var>&quot; after the hls URI scheme name, where <var>proto</var>
  7714. is either &quot;file&quot; or &quot;http&quot;.
  7715. </p>
  7716. <div class="example">
  7717. <pre class="example">hls+http://host/path/to/remote/resource.m3u8
  7718. hls+file://path/to/local/resource.m3u8
  7719. </pre></div>
  7720. <p>Using this protocol is discouraged - the hls demuxer should work
  7721. just as well (if not, please report the issues) and is more complete.
  7722. To use the hls demuxer instead, simply use the direct URLs to the
  7723. m3u8 files.
  7724. </p>
  7725. <a name="http"></a>
  7726. <h2 class="section"><a href="ffplay-all.html#toc-http">16.11 http</a></h2>
  7727. <p>HTTP (Hyper Text Transfer Protocol).
  7728. </p>
  7729. <p>This protocol accepts the following options:
  7730. </p>
  7731. <dl compact="compact">
  7732. <dt>&lsquo;<samp>seekable</samp>&rsquo;</dt>
  7733. <dd><p>Control seekability of connection. If set to 1 the resource is
  7734. supposed to be seekable, if set to 0 it is assumed not to be seekable,
  7735. if set to -1 it will try to autodetect if it is seekable. Default
  7736. value is -1.
  7737. </p>
  7738. </dd>
  7739. <dt>&lsquo;<samp>chunked_post</samp>&rsquo;</dt>
  7740. <dd><p>If set to 1 use chunked Transfer-Encoding for posts, default is 1.
  7741. </p>
  7742. </dd>
  7743. <dt>&lsquo;<samp>content_type</samp>&rsquo;</dt>
  7744. <dd><p>Set a specific content type for the POST messages or for listen mode.
  7745. </p>
  7746. </dd>
  7747. <dt>&lsquo;<samp>http_proxy</samp>&rsquo;</dt>
  7748. <dd><p>set HTTP proxy to tunnel through e.g. http://example.com:1234
  7749. </p>
  7750. </dd>
  7751. <dt>&lsquo;<samp>headers</samp>&rsquo;</dt>
  7752. <dd><p>Set custom HTTP headers, can override built in default headers. The
  7753. value must be a string encoding the headers.
  7754. </p>
  7755. </dd>
  7756. <dt>&lsquo;<samp>multiple_requests</samp>&rsquo;</dt>
  7757. <dd><p>Use persistent connections if set to 1, default is 0.
  7758. </p>
  7759. </dd>
  7760. <dt>&lsquo;<samp>post_data</samp>&rsquo;</dt>
  7761. <dd><p>Set custom HTTP post data.
  7762. </p>
  7763. </dd>
  7764. <dt>&lsquo;<samp>referer</samp>&rsquo;</dt>
  7765. <dd><p>Set the Referer header. Include &rsquo;Referer: URL&rsquo; header in HTTP request.
  7766. </p>
  7767. </dd>
  7768. <dt>&lsquo;<samp>user_agent</samp>&rsquo;</dt>
  7769. <dd><p>Override the User-Agent header. If not specified the protocol will use a
  7770. string describing the libavformat build. (&quot;Lavf/&lt;version&gt;&quot;)
  7771. </p>
  7772. </dd>
  7773. <dt>&lsquo;<samp>user-agent</samp>&rsquo;</dt>
  7774. <dd><p>This is a deprecated option, you can use user_agent instead it.
  7775. </p>
  7776. </dd>
  7777. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  7778. <dd><p>Set timeout in microseconds of socket I/O operations used by the underlying low level
  7779. operation. By default it is set to -1, which means that the timeout is
  7780. not specified.
  7781. </p>
  7782. </dd>
  7783. <dt>&lsquo;<samp>reconnect_at_eof</samp>&rsquo;</dt>
  7784. <dd><p>If set then eof is treated like an error and causes reconnection, this is useful
  7785. for live / endless streams.
  7786. </p>
  7787. </dd>
  7788. <dt>&lsquo;<samp>reconnect_streamed</samp>&rsquo;</dt>
  7789. <dd><p>If set then even streamed/non seekable streams will be reconnected on errors.
  7790. </p>
  7791. </dd>
  7792. <dt>&lsquo;<samp>reconnect_delay_max</samp>&rsquo;</dt>
  7793. <dd><p>Sets the maximum delay in seconds after which to give up reconnecting
  7794. </p>
  7795. </dd>
  7796. <dt>&lsquo;<samp>mime_type</samp>&rsquo;</dt>
  7797. <dd><p>Export the MIME type.
  7798. </p>
  7799. </dd>
  7800. <dt>&lsquo;<samp>http_version</samp>&rsquo;</dt>
  7801. <dd><p>Exports the HTTP response version number. Usually &quot;1.0&quot; or &quot;1.1&quot;.
  7802. </p>
  7803. </dd>
  7804. <dt>&lsquo;<samp>icy</samp>&rsquo;</dt>
  7805. <dd><p>If set to 1 request ICY (SHOUTcast) metadata from the server. If the server
  7806. supports this, the metadata has to be retrieved by the application by reading
  7807. the &lsquo;<samp>icy_metadata_headers</samp>&rsquo; and &lsquo;<samp>icy_metadata_packet</samp>&rsquo; options.
  7808. The default is 1.
  7809. </p>
  7810. </dd>
  7811. <dt>&lsquo;<samp>icy_metadata_headers</samp>&rsquo;</dt>
  7812. <dd><p>If the server supports ICY metadata, this contains the ICY-specific HTTP reply
  7813. headers, separated by newline characters.
  7814. </p>
  7815. </dd>
  7816. <dt>&lsquo;<samp>icy_metadata_packet</samp>&rsquo;</dt>
  7817. <dd><p>If the server supports ICY metadata, and &lsquo;<samp>icy</samp>&rsquo; was set to 1, this
  7818. contains the last non-empty metadata packet sent by the server. It should be
  7819. polled in regular intervals by applications interested in mid-stream metadata
  7820. updates.
  7821. </p>
  7822. </dd>
  7823. <dt>&lsquo;<samp>cookies</samp>&rsquo;</dt>
  7824. <dd><p>Set the cookies to be sent in future requests. The format of each cookie is the
  7825. same as the value of a Set-Cookie HTTP response field. Multiple cookies can be
  7826. delimited by a newline character.
  7827. </p>
  7828. </dd>
  7829. <dt>&lsquo;<samp>offset</samp>&rsquo;</dt>
  7830. <dd><p>Set initial byte offset.
  7831. </p>
  7832. </dd>
  7833. <dt>&lsquo;<samp>end_offset</samp>&rsquo;</dt>
  7834. <dd><p>Try to limit the request to bytes preceding this offset.
  7835. </p>
  7836. </dd>
  7837. <dt>&lsquo;<samp>method</samp>&rsquo;</dt>
  7838. <dd><p>When used as a client option it sets the HTTP method for the request.
  7839. </p>
  7840. <p>When used as a server option it sets the HTTP method that is going to be
  7841. expected from the client(s).
  7842. If the expected and the received HTTP method do not match the client will
  7843. be given a Bad Request response.
  7844. When unset the HTTP method is not checked for now. This will be replaced by
  7845. autodetection in the future.
  7846. </p>
  7847. </dd>
  7848. <dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
  7849. <dd><p>If set to 1 enables experimental HTTP server. This can be used to send data when
  7850. used as an output option, or read data from a client with HTTP POST when used as
  7851. an input option.
  7852. If set to 2 enables experimental multi-client HTTP server. This is not yet implemented
  7853. in ffmpeg.c and thus must not be used as a command line option.
  7854. </p><div class="example">
  7855. <pre class="example"># Server side (sending):
  7856. ffmpeg -i somefile.ogg -c copy -listen 1 -f ogg http://<var>server</var>:<var>port</var>
  7857. # Client side (receiving):
  7858. ffmpeg -i http://<var>server</var>:<var>port</var> -c copy somefile.ogg
  7859. # Client can also be done with wget:
  7860. wget http://<var>server</var>:<var>port</var> -O somefile.ogg
  7861. # Server side (receiving):
  7862. ffmpeg -listen 1 -i http://<var>server</var>:<var>port</var> -c copy somefile.ogg
  7863. # Client side (sending):
  7864. ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://<var>server</var>:<var>port</var>
  7865. # Client can also be done with wget:
  7866. wget --post-file=somefile.ogg http://<var>server</var>:<var>port</var>
  7867. </pre></div>
  7868. </dd>
  7869. <dt>&lsquo;<samp>send_expect_100</samp>&rsquo;</dt>
  7870. <dd><p>Send an Expect: 100-continue header for POST. If set to 1 it will send, if set
  7871. to 0 it won&rsquo;t, if set to -1 it will try to send if it is applicable. Default
  7872. value is -1.
  7873. </p>
  7874. </dd>
  7875. </dl>
  7876. <a name="HTTP-Cookies"></a>
  7877. <h3 class="subsection"><a href="ffplay-all.html#toc-HTTP-Cookies">16.11.1 HTTP Cookies</a></h3>
  7878. <p>Some HTTP requests will be denied unless cookie values are passed in with the
  7879. request. The &lsquo;<samp>cookies</samp>&rsquo; option allows these cookies to be specified. At
  7880. the very least, each cookie must specify a value along with a path and domain.
  7881. HTTP requests that match both the domain and path will automatically include the
  7882. cookie value in the HTTP Cookie header field. Multiple cookies can be delimited
  7883. by a newline.
  7884. </p>
  7885. <p>The required syntax to play a stream specifying a cookie is:
  7886. </p><div class="example">
  7887. <pre class="example">ffplay -cookies &quot;nlqptid=nltid=tsn; path=/; domain=somedomain.com;&quot; http://somedomain.com/somestream.m3u8
  7888. </pre></div>
  7889. <a name="Icecast"></a>
  7890. <h2 class="section"><a href="ffplay-all.html#toc-Icecast">16.12 Icecast</a></h2>
  7891. <p>Icecast protocol (stream to Icecast servers)
  7892. </p>
  7893. <p>This protocol accepts the following options:
  7894. </p>
  7895. <dl compact="compact">
  7896. <dt>&lsquo;<samp>ice_genre</samp>&rsquo;</dt>
  7897. <dd><p>Set the stream genre.
  7898. </p>
  7899. </dd>
  7900. <dt>&lsquo;<samp>ice_name</samp>&rsquo;</dt>
  7901. <dd><p>Set the stream name.
  7902. </p>
  7903. </dd>
  7904. <dt>&lsquo;<samp>ice_description</samp>&rsquo;</dt>
  7905. <dd><p>Set the stream description.
  7906. </p>
  7907. </dd>
  7908. <dt>&lsquo;<samp>ice_url</samp>&rsquo;</dt>
  7909. <dd><p>Set the stream website URL.
  7910. </p>
  7911. </dd>
  7912. <dt>&lsquo;<samp>ice_public</samp>&rsquo;</dt>
  7913. <dd><p>Set if the stream should be public.
  7914. The default is 0 (not public).
  7915. </p>
  7916. </dd>
  7917. <dt>&lsquo;<samp>user_agent</samp>&rsquo;</dt>
  7918. <dd><p>Override the User-Agent header. If not specified a string of the form
  7919. &quot;Lavf/&lt;version&gt;&quot; will be used.
  7920. </p>
  7921. </dd>
  7922. <dt>&lsquo;<samp>password</samp>&rsquo;</dt>
  7923. <dd><p>Set the Icecast mountpoint password.
  7924. </p>
  7925. </dd>
  7926. <dt>&lsquo;<samp>content_type</samp>&rsquo;</dt>
  7927. <dd><p>Set the stream content type. This must be set if it is different from
  7928. audio/mpeg.
  7929. </p>
  7930. </dd>
  7931. <dt>&lsquo;<samp>legacy_icecast</samp>&rsquo;</dt>
  7932. <dd><p>This enables support for Icecast versions &lt; 2.4.0, that do not support the
  7933. HTTP PUT method but the SOURCE method.
  7934. </p>
  7935. </dd>
  7936. </dl>
  7937. <div class="example">
  7938. <pre class="example">icecast://[<var>username</var>[:<var>password</var>]@]<var>server</var>:<var>port</var>/<var>mountpoint</var>
  7939. </pre></div>
  7940. <a name="mmst"></a>
  7941. <h2 class="section"><a href="ffplay-all.html#toc-mmst">16.13 mmst</a></h2>
  7942. <p>MMS (Microsoft Media Server) protocol over TCP.
  7943. </p>
  7944. <a name="mmsh"></a>
  7945. <h2 class="section"><a href="ffplay-all.html#toc-mmsh">16.14 mmsh</a></h2>
  7946. <p>MMS (Microsoft Media Server) protocol over HTTP.
  7947. </p>
  7948. <p>The required syntax is:
  7949. </p><div class="example">
  7950. <pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
  7951. </pre></div>
  7952. <a name="md5"></a>
  7953. <h2 class="section"><a href="ffplay-all.html#toc-md5">16.15 md5</a></h2>
  7954. <p>MD5 output protocol.
  7955. </p>
  7956. <p>Computes the MD5 hash of the data to be written, and on close writes
  7957. this to the designated output or stdout if none is specified. It can
  7958. be used to test muxers without writing an actual file.
  7959. </p>
  7960. <p>Some examples follow.
  7961. </p><div class="example">
  7962. <pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
  7963. ffmpeg -i input.flv -f avi -y md5:output.avi.md5
  7964. # Write the MD5 hash of the encoded AVI file to stdout.
  7965. ffmpeg -i input.flv -f avi -y md5:
  7966. </pre></div>
  7967. <p>Note that some formats (typically MOV) require the output protocol to
  7968. be seekable, so they will fail with the MD5 output protocol.
  7969. </p>
  7970. <a name="pipe"></a>
  7971. <h2 class="section"><a href="ffplay-all.html#toc-pipe">16.16 pipe</a></h2>
  7972. <p>UNIX pipe access protocol.
  7973. </p>
  7974. <p>Read and write from UNIX pipes.
  7975. </p>
  7976. <p>The accepted syntax is:
  7977. </p><div class="example">
  7978. <pre class="example">pipe:[<var>number</var>]
  7979. </pre></div>
  7980. <p><var>number</var> is the number corresponding to the file descriptor of the
  7981. pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If <var>number</var>
  7982. is not specified, by default the stdout file descriptor will be used
  7983. for writing, stdin for reading.
  7984. </p>
  7985. <p>For example to read from stdin with <code>ffmpeg</code>:
  7986. </p><div class="example">
  7987. <pre class="example">cat test.wav | ffmpeg -i pipe:0
  7988. # ...this is the same as...
  7989. cat test.wav | ffmpeg -i pipe:
  7990. </pre></div>
  7991. <p>For writing to stdout with <code>ffmpeg</code>:
  7992. </p><div class="example">
  7993. <pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat &gt; test.avi
  7994. # ...this is the same as...
  7995. ffmpeg -i test.wav -f avi pipe: | cat &gt; test.avi
  7996. </pre></div>
  7997. <p>This protocol accepts the following options:
  7998. </p>
  7999. <dl compact="compact">
  8000. <dt>&lsquo;<samp>blocksize</samp>&rsquo;</dt>
  8001. <dd><p>Set I/O operation maximum block size, in bytes. Default value is
  8002. <code>INT_MAX</code>, which results in not limiting the requested block size.
  8003. Setting this value reasonably low improves user termination request reaction
  8004. time, which is valuable if data transmission is slow.
  8005. </p></dd>
  8006. </dl>
  8007. <p>Note that some formats (typically MOV), require the output protocol to
  8008. be seekable, so they will fail with the pipe output protocol.
  8009. </p>
  8010. <a name="prompeg"></a>
  8011. <h2 class="section"><a href="ffplay-all.html#toc-prompeg">16.17 prompeg</a></h2>
  8012. <p>Pro-MPEG Code of Practice #3 Release 2 FEC protocol.
  8013. </p>
  8014. <p>The Pro-MPEG CoP#3 FEC is a 2D parity-check forward error correction mechanism
  8015. for MPEG-2 Transport Streams sent over RTP.
  8016. </p>
  8017. <p>This protocol must be used in conjunction with the <code>rtp_mpegts</code> muxer and
  8018. the <code>rtp</code> protocol.
  8019. </p>
  8020. <p>The required syntax is:
  8021. </p><div class="example">
  8022. <pre class="example">-f rtp_mpegts -fec prompeg=<var>option</var>=<var>val</var>... rtp://<var>hostname</var>:<var>port</var>
  8023. </pre></div>
  8024. <p>The destination UDP ports are <code>port + 2</code> for the column FEC stream
  8025. and <code>port + 4</code> for the row FEC stream.
  8026. </p>
  8027. <p>This protocol accepts the following options:
  8028. </p><dl compact="compact">
  8029. <dt>&lsquo;<samp>l=<var>n</var></samp>&rsquo;</dt>
  8030. <dd><p>The number of columns (4-20, LxD &lt;= 100)
  8031. </p>
  8032. </dd>
  8033. <dt>&lsquo;<samp>d=<var>n</var></samp>&rsquo;</dt>
  8034. <dd><p>The number of rows (4-20, LxD &lt;= 100)
  8035. </p>
  8036. </dd>
  8037. </dl>
  8038. <p>Example usage:
  8039. </p>
  8040. <div class="example">
  8041. <pre class="example">-f rtp_mpegts -fec prompeg=l=8:d=4 rtp://<var>hostname</var>:<var>port</var>
  8042. </pre></div>
  8043. <a name="rtmp"></a>
  8044. <h2 class="section"><a href="ffplay-all.html#toc-rtmp">16.18 rtmp</a></h2>
  8045. <p>Real-Time Messaging Protocol.
  8046. </p>
  8047. <p>The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
  8048. content across a TCP/IP network.
  8049. </p>
  8050. <p>The required syntax is:
  8051. </p><div class="example">
  8052. <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>]
  8053. </pre></div>
  8054. <p>The accepted parameters are:
  8055. </p><dl compact="compact">
  8056. <dt>&lsquo;<samp>username</samp>&rsquo;</dt>
  8057. <dd><p>An optional username (mostly for publishing).
  8058. </p>
  8059. </dd>
  8060. <dt>&lsquo;<samp>password</samp>&rsquo;</dt>
  8061. <dd><p>An optional password (mostly for publishing).
  8062. </p>
  8063. </dd>
  8064. <dt>&lsquo;<samp>server</samp>&rsquo;</dt>
  8065. <dd><p>The address of the RTMP server.
  8066. </p>
  8067. </dd>
  8068. <dt>&lsquo;<samp>port</samp>&rsquo;</dt>
  8069. <dd><p>The number of the TCP port to use (by default is 1935).
  8070. </p>
  8071. </dd>
  8072. <dt>&lsquo;<samp>app</samp>&rsquo;</dt>
  8073. <dd><p>It is the name of the application to access. It usually corresponds to
  8074. the path where the application is installed on the RTMP server
  8075. (e.g. &lsquo;<tt>/ondemand/</tt>&rsquo;, &lsquo;<tt>/flash/live/</tt>&rsquo;, etc.). You can override
  8076. the value parsed from the URI through the <code>rtmp_app</code> option, too.
  8077. </p>
  8078. </dd>
  8079. <dt>&lsquo;<samp>playpath</samp>&rsquo;</dt>
  8080. <dd><p>It is the path or name of the resource to play with reference to the
  8081. application specified in <var>app</var>, may be prefixed by &quot;mp4:&quot;. You
  8082. can override the value parsed from the URI through the <code>rtmp_playpath</code>
  8083. option, too.
  8084. </p>
  8085. </dd>
  8086. <dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
  8087. <dd><p>Act as a server, listening for an incoming connection.
  8088. </p>
  8089. </dd>
  8090. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  8091. <dd><p>Maximum time to wait for the incoming connection. Implies listen.
  8092. </p></dd>
  8093. </dl>
  8094. <p>Additionally, the following parameters can be set via command line options
  8095. (or in code via <code>AVOption</code>s):
  8096. </p><dl compact="compact">
  8097. <dt>&lsquo;<samp>rtmp_app</samp>&rsquo;</dt>
  8098. <dd><p>Name of application to connect on the RTMP server. This option
  8099. overrides the parameter specified in the URI.
  8100. </p>
  8101. </dd>
  8102. <dt>&lsquo;<samp>rtmp_buffer</samp>&rsquo;</dt>
  8103. <dd><p>Set the client buffer time in milliseconds. The default is 3000.
  8104. </p>
  8105. </dd>
  8106. <dt>&lsquo;<samp>rtmp_conn</samp>&rsquo;</dt>
  8107. <dd><p>Extra arbitrary AMF connection parameters, parsed from a string,
  8108. e.g. like <code>B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0</code>.
  8109. Each value is prefixed by a single character denoting the type,
  8110. B for Boolean, N for number, S for string, O for object, or Z for null,
  8111. followed by a colon. For Booleans the data must be either 0 or 1 for
  8112. FALSE or TRUE, respectively. Likewise for Objects the data must be 0 or
  8113. 1 to end or begin an object, respectively. Data items in subobjects may
  8114. be named, by prefixing the type with &rsquo;N&rsquo; and specifying the name before
  8115. the value (i.e. <code>NB:myFlag:1</code>). This option may be used multiple
  8116. times to construct arbitrary AMF sequences.
  8117. </p>
  8118. </dd>
  8119. <dt>&lsquo;<samp>rtmp_flashver</samp>&rsquo;</dt>
  8120. <dd><p>Version of the Flash plugin used to run the SWF player. The default
  8121. is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;
  8122. &lt;libavformat version&gt;).)
  8123. </p>
  8124. </dd>
  8125. <dt>&lsquo;<samp>rtmp_flush_interval</samp>&rsquo;</dt>
  8126. <dd><p>Number of packets flushed in the same request (RTMPT only). The default
  8127. is 10.
  8128. </p>
  8129. </dd>
  8130. <dt>&lsquo;<samp>rtmp_live</samp>&rsquo;</dt>
  8131. <dd><p>Specify that the media is a live stream. No resuming or seeking in
  8132. live streams is possible. The default value is <code>any</code>, which means the
  8133. subscriber first tries to play the live stream specified in the
  8134. playpath. If a live stream of that name is not found, it plays the
  8135. recorded stream. The other possible values are <code>live</code> and
  8136. <code>recorded</code>.
  8137. </p>
  8138. </dd>
  8139. <dt>&lsquo;<samp>rtmp_pageurl</samp>&rsquo;</dt>
  8140. <dd><p>URL of the web page in which the media was embedded. By default no
  8141. value will be sent.
  8142. </p>
  8143. </dd>
  8144. <dt>&lsquo;<samp>rtmp_playpath</samp>&rsquo;</dt>
  8145. <dd><p>Stream identifier to play or to publish. This option overrides the
  8146. parameter specified in the URI.
  8147. </p>
  8148. </dd>
  8149. <dt>&lsquo;<samp>rtmp_subscribe</samp>&rsquo;</dt>
  8150. <dd><p>Name of live stream to subscribe to. By default no value will be sent.
  8151. It is only sent if the option is specified or if rtmp_live
  8152. is set to live.
  8153. </p>
  8154. </dd>
  8155. <dt>&lsquo;<samp>rtmp_swfhash</samp>&rsquo;</dt>
  8156. <dd><p>SHA256 hash of the decompressed SWF file (32 bytes).
  8157. </p>
  8158. </dd>
  8159. <dt>&lsquo;<samp>rtmp_swfsize</samp>&rsquo;</dt>
  8160. <dd><p>Size of the decompressed SWF file, required for SWFVerification.
  8161. </p>
  8162. </dd>
  8163. <dt>&lsquo;<samp>rtmp_swfurl</samp>&rsquo;</dt>
  8164. <dd><p>URL of the SWF player for the media. By default no value will be sent.
  8165. </p>
  8166. </dd>
  8167. <dt>&lsquo;<samp>rtmp_swfverify</samp>&rsquo;</dt>
  8168. <dd><p>URL to player swf file, compute hash/size automatically.
  8169. </p>
  8170. </dd>
  8171. <dt>&lsquo;<samp>rtmp_tcurl</samp>&rsquo;</dt>
  8172. <dd><p>URL of the target stream. Defaults to proto://host[:port]/app.
  8173. </p>
  8174. </dd>
  8175. </dl>
  8176. <p>For example to read with <code>ffplay</code> a multimedia resource named
  8177. &quot;sample&quot; from the application &quot;vod&quot; from an RTMP server &quot;myserver&quot;:
  8178. </p><div class="example">
  8179. <pre class="example">ffplay rtmp://myserver/vod/sample
  8180. </pre></div>
  8181. <p>To publish to a password protected server, passing the playpath and
  8182. app names separately:
  8183. </p><div class="example">
  8184. <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/
  8185. </pre></div>
  8186. <a name="rtmpe"></a>
  8187. <h2 class="section"><a href="ffplay-all.html#toc-rtmpe">16.19 rtmpe</a></h2>
  8188. <p>Encrypted Real-Time Messaging Protocol.
  8189. </p>
  8190. <p>The Encrypted Real-Time Messaging Protocol (RTMPE) is used for
  8191. streaming multimedia content within standard cryptographic primitives,
  8192. consisting of Diffie-Hellman key exchange and HMACSHA256, generating
  8193. a pair of RC4 keys.
  8194. </p>
  8195. <a name="rtmps"></a>
  8196. <h2 class="section"><a href="ffplay-all.html#toc-rtmps">16.20 rtmps</a></h2>
  8197. <p>Real-Time Messaging Protocol over a secure SSL connection.
  8198. </p>
  8199. <p>The Real-Time Messaging Protocol (RTMPS) is used for streaming
  8200. multimedia content across an encrypted connection.
  8201. </p>
  8202. <a name="rtmpt"></a>
  8203. <h2 class="section"><a href="ffplay-all.html#toc-rtmpt">16.21 rtmpt</a></h2>
  8204. <p>Real-Time Messaging Protocol tunneled through HTTP.
  8205. </p>
  8206. <p>The Real-Time Messaging Protocol tunneled through HTTP (RTMPT) is used
  8207. for streaming multimedia content within HTTP requests to traverse
  8208. firewalls.
  8209. </p>
  8210. <a name="rtmpte"></a>
  8211. <h2 class="section"><a href="ffplay-all.html#toc-rtmpte">16.22 rtmpte</a></h2>
  8212. <p>Encrypted Real-Time Messaging Protocol tunneled through HTTP.
  8213. </p>
  8214. <p>The Encrypted Real-Time Messaging Protocol tunneled through HTTP (RTMPTE)
  8215. is used for streaming multimedia content within HTTP requests to traverse
  8216. firewalls.
  8217. </p>
  8218. <a name="rtmpts"></a>
  8219. <h2 class="section"><a href="ffplay-all.html#toc-rtmpts">16.23 rtmpts</a></h2>
  8220. <p>Real-Time Messaging Protocol tunneled through HTTPS.
  8221. </p>
  8222. <p>The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
  8223. for streaming multimedia content within HTTPS requests to traverse
  8224. firewalls.
  8225. </p>
  8226. <a name="libsmbclient"></a>
  8227. <h2 class="section"><a href="ffplay-all.html#toc-libsmbclient">16.24 libsmbclient</a></h2>
  8228. <p>libsmbclient permits one to manipulate CIFS/SMB network resources.
  8229. </p>
  8230. <p>Following syntax is required.
  8231. </p>
  8232. <div class="example">
  8233. <pre class="example">smb://[[domain:]user[:password@]]server[/share[/path[/file]]]
  8234. </pre></div>
  8235. <p>This protocol accepts the following options.
  8236. </p>
  8237. <dl compact="compact">
  8238. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  8239. <dd><p>Set timeout in milliseconds of socket I/O operations used by the underlying
  8240. low level operation. By default it is set to -1, which means that the timeout
  8241. is not specified.
  8242. </p>
  8243. </dd>
  8244. <dt>&lsquo;<samp>truncate</samp>&rsquo;</dt>
  8245. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  8246. truncating. Default value is 1.
  8247. </p>
  8248. </dd>
  8249. <dt>&lsquo;<samp>workgroup</samp>&rsquo;</dt>
  8250. <dd><p>Set the workgroup used for making connections. By default workgroup is not specified.
  8251. </p>
  8252. </dd>
  8253. </dl>
  8254. <p>For more information see: <a href="http://www.samba.org/">http://www.samba.org/</a>.
  8255. </p>
  8256. <a name="libssh"></a>
  8257. <h2 class="section"><a href="ffplay-all.html#toc-libssh">16.25 libssh</a></h2>
  8258. <p>Secure File Transfer Protocol via libssh
  8259. </p>
  8260. <p>Read from or write to remote resources using SFTP protocol.
  8261. </p>
  8262. <p>Following syntax is required.
  8263. </p>
  8264. <div class="example">
  8265. <pre class="example">sftp://[user[:password]@]server[:port]/path/to/remote/resource.mpeg
  8266. </pre></div>
  8267. <p>This protocol accepts the following options.
  8268. </p>
  8269. <dl compact="compact">
  8270. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  8271. <dd><p>Set timeout of socket I/O operations used by the underlying low level
  8272. operation. By default it is set to -1, which means that the timeout
  8273. is not specified.
  8274. </p>
  8275. </dd>
  8276. <dt>&lsquo;<samp>truncate</samp>&rsquo;</dt>
  8277. <dd><p>Truncate existing files on write, if set to 1. A value of 0 prevents
  8278. truncating. Default value is 1.
  8279. </p>
  8280. </dd>
  8281. <dt>&lsquo;<samp>private_key</samp>&rsquo;</dt>
  8282. <dd><p>Specify the path of the file containing private key to use during authorization.
  8283. By default libssh searches for keys in the &lsquo;<tt>~/.ssh/</tt>&rsquo; directory.
  8284. </p>
  8285. </dd>
  8286. </dl>
  8287. <p>Example: Play a file stored on remote server.
  8288. </p>
  8289. <div class="example">
  8290. <pre class="example">ffplay sftp://user:password@server_address:22/home/user/resource.mpeg
  8291. </pre></div>
  8292. <a name="librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
  8293. <h2 class="section"><a href="ffplay-all.html#toc-librtmp-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">16.26 librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>
  8294. <p>Real-Time Messaging Protocol and its variants supported through
  8295. librtmp.
  8296. </p>
  8297. <p>Requires the presence of the librtmp headers and library during
  8298. configuration. You need to explicitly configure the build with
  8299. &quot;&ndash;enable-librtmp&quot;. If enabled this will replace the native RTMP
  8300. protocol.
  8301. </p>
  8302. <p>This protocol provides most client functions and a few server
  8303. functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
  8304. encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
  8305. variants of these encrypted types (RTMPTE, RTMPTS).
  8306. </p>
  8307. <p>The required syntax is:
  8308. </p><div class="example">
  8309. <pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
  8310. </pre></div>
  8311. <p>where <var>rtmp_proto</var> is one of the strings &quot;rtmp&quot;, &quot;rtmpt&quot;, &quot;rtmpe&quot;,
  8312. &quot;rtmps&quot;, &quot;rtmpte&quot;, &quot;rtmpts&quot; corresponding to each RTMP variant, and
  8313. <var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
  8314. meaning as specified for the RTMP native protocol.
  8315. <var>options</var> contains a list of space-separated options of the form
  8316. <var>key</var>=<var>val</var>.
  8317. </p>
  8318. <p>See the librtmp manual page (man 3 librtmp) for more information.
  8319. </p>
  8320. <p>For example, to stream a file in real-time to an RTMP server using
  8321. <code>ffmpeg</code>:
  8322. </p><div class="example">
  8323. <pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
  8324. </pre></div>
  8325. <p>To play the same stream using <code>ffplay</code>:
  8326. </p><div class="example">
  8327. <pre class="example">ffplay &quot;rtmp://myserver/live/mystream live=1&quot;
  8328. </pre></div>
  8329. <a name="rtp"></a>
  8330. <h2 class="section"><a href="ffplay-all.html#toc-rtp">16.27 rtp</a></h2>
  8331. <p>Real-time Transport Protocol.
  8332. </p>
  8333. <p>The required syntax for an RTP URL is:
  8334. rtp://<var>hostname</var>[:<var>port</var>][?<var>option</var>=<var>val</var>...]
  8335. </p>
  8336. <p><var>port</var> specifies the RTP port to use.
  8337. </p>
  8338. <p>The following URL options are supported:
  8339. </p>
  8340. <dl compact="compact">
  8341. <dt>&lsquo;<samp>ttl=<var>n</var></samp>&rsquo;</dt>
  8342. <dd><p>Set the TTL (Time-To-Live) value (for multicast only).
  8343. </p>
  8344. </dd>
  8345. <dt>&lsquo;<samp>rtcpport=<var>n</var></samp>&rsquo;</dt>
  8346. <dd><p>Set the remote RTCP port to <var>n</var>.
  8347. </p>
  8348. </dd>
  8349. <dt>&lsquo;<samp>localrtpport=<var>n</var></samp>&rsquo;</dt>
  8350. <dd><p>Set the local RTP port to <var>n</var>.
  8351. </p>
  8352. </dd>
  8353. <dt>&lsquo;<samp>localrtcpport=<var>n</var>'</samp>&rsquo;</dt>
  8354. <dd><p>Set the local RTCP port to <var>n</var>.
  8355. </p>
  8356. </dd>
  8357. <dt>&lsquo;<samp>pkt_size=<var>n</var></samp>&rsquo;</dt>
  8358. <dd><p>Set max packet size (in bytes) to <var>n</var>.
  8359. </p>
  8360. </dd>
  8361. <dt>&lsquo;<samp>connect=0|1</samp>&rsquo;</dt>
  8362. <dd><p>Do a <code>connect()</code> on the UDP socket (if set to 1) or not (if set
  8363. to 0).
  8364. </p>
  8365. </dd>
  8366. <dt>&lsquo;<samp>sources=<var>ip</var>[,<var>ip</var>]</samp>&rsquo;</dt>
  8367. <dd><p>List allowed source IP addresses.
  8368. </p>
  8369. </dd>
  8370. <dt>&lsquo;<samp>block=<var>ip</var>[,<var>ip</var>]</samp>&rsquo;</dt>
  8371. <dd><p>List disallowed (blocked) source IP addresses.
  8372. </p>
  8373. </dd>
  8374. <dt>&lsquo;<samp>write_to_source=0|1</samp>&rsquo;</dt>
  8375. <dd><p>Send packets to the source address of the latest received packet (if
  8376. set to 1) or to a default remote address (if set to 0).
  8377. </p>
  8378. </dd>
  8379. <dt>&lsquo;<samp>localport=<var>n</var></samp>&rsquo;</dt>
  8380. <dd><p>Set the local RTP port to <var>n</var>.
  8381. </p>
  8382. <p>This is a deprecated option. Instead, &lsquo;<samp>localrtpport</samp>&rsquo; should be
  8383. used.
  8384. </p>
  8385. </dd>
  8386. </dl>
  8387. <p>Important notes:
  8388. </p>
  8389. <ol>
  8390. <li>
  8391. If &lsquo;<samp>rtcpport</samp>&rsquo; is not set the RTCP port will be set to the RTP
  8392. port value plus 1.
  8393. </li><li>
  8394. If &lsquo;<samp>localrtpport</samp>&rsquo; (the local RTP port) is not set any available
  8395. port will be used for the local RTP and RTCP ports.
  8396. </li><li>
  8397. If &lsquo;<samp>localrtcpport</samp>&rsquo; (the local RTCP port) is not set it will be
  8398. set to the local RTP port value plus 1.
  8399. </li></ol>
  8400. <a name="rtsp"></a>
  8401. <h2 class="section"><a href="ffplay-all.html#toc-rtsp">16.28 rtsp</a></h2>
  8402. <p>Real-Time Streaming Protocol.
  8403. </p>
  8404. <p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
  8405. and muxer. The demuxer supports both normal RTSP (with data transferred
  8406. over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
  8407. data transferred over RDT).
  8408. </p>
  8409. <p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
  8410. supporting it (currently Darwin Streaming Server and Mischa Spiegelmock&rsquo;s
  8411. <a href="https://github.com/revmischa/rtsp-server">RTSP server</a>).
  8412. </p>
  8413. <p>The required syntax for a RTSP url is:
  8414. </p><div class="example">
  8415. <pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>
  8416. </pre></div>
  8417. <p>Options can be set on the <code>ffmpeg</code>/<code>ffplay</code> command
  8418. line, or set in code via <code>AVOption</code>s or in
  8419. <code>avformat_open_input</code>.
  8420. </p>
  8421. <p>The following options are supported.
  8422. </p>
  8423. <dl compact="compact">
  8424. <dt>&lsquo;<samp>initial_pause</samp>&rsquo;</dt>
  8425. <dd><p>Do not start playing the stream immediately if set to 1. Default value
  8426. is 0.
  8427. </p>
  8428. </dd>
  8429. <dt>&lsquo;<samp>rtsp_transport</samp>&rsquo;</dt>
  8430. <dd><p>Set RTSP transport protocols.
  8431. </p>
  8432. <p>It accepts the following values:
  8433. </p><dl compact="compact">
  8434. <dt>&lsquo;<samp>udp</samp>&rsquo;</dt>
  8435. <dd><p>Use UDP as lower transport protocol.
  8436. </p>
  8437. </dd>
  8438. <dt>&lsquo;<samp>tcp</samp>&rsquo;</dt>
  8439. <dd><p>Use TCP (interleaving within the RTSP control channel) as lower
  8440. transport protocol.
  8441. </p>
  8442. </dd>
  8443. <dt>&lsquo;<samp>udp_multicast</samp>&rsquo;</dt>
  8444. <dd><p>Use UDP multicast as lower transport protocol.
  8445. </p>
  8446. </dd>
  8447. <dt>&lsquo;<samp>http</samp>&rsquo;</dt>
  8448. <dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
  8449. passing proxies.
  8450. </p></dd>
  8451. </dl>
  8452. <p>Multiple lower transport protocols may be specified, in that case they are
  8453. tried one at a time (if the setup of one fails, the next one is tried).
  8454. For the muxer, only the &lsquo;<samp>tcp</samp>&rsquo; and &lsquo;<samp>udp</samp>&rsquo; options are supported.
  8455. </p>
  8456. </dd>
  8457. <dt>&lsquo;<samp>rtsp_flags</samp>&rsquo;</dt>
  8458. <dd><p>Set RTSP flags.
  8459. </p>
  8460. <p>The following values are accepted:
  8461. </p><dl compact="compact">
  8462. <dt>&lsquo;<samp>filter_src</samp>&rsquo;</dt>
  8463. <dd><p>Accept packets only from negotiated peer address and port.
  8464. </p></dd>
  8465. <dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
  8466. <dd><p>Act as a server, listening for an incoming connection.
  8467. </p></dd>
  8468. <dt>&lsquo;<samp>prefer_tcp</samp>&rsquo;</dt>
  8469. <dd><p>Try TCP for RTP transport first, if TCP is available as RTSP RTP transport.
  8470. </p></dd>
  8471. </dl>
  8472. <p>Default value is &lsquo;<samp>none</samp>&rsquo;.
  8473. </p>
  8474. </dd>
  8475. <dt>&lsquo;<samp>allowed_media_types</samp>&rsquo;</dt>
  8476. <dd><p>Set media types to accept from the server.
  8477. </p>
  8478. <p>The following flags are accepted:
  8479. </p><dl compact="compact">
  8480. <dt>&lsquo;<samp>video</samp>&rsquo;</dt>
  8481. <dt>&lsquo;<samp>audio</samp>&rsquo;</dt>
  8482. <dt>&lsquo;<samp>data</samp>&rsquo;</dt>
  8483. </dl>
  8484. <p>By default it accepts all media types.
  8485. </p>
  8486. </dd>
  8487. <dt>&lsquo;<samp>min_port</samp>&rsquo;</dt>
  8488. <dd><p>Set minimum local UDP port. Default value is 5000.
  8489. </p>
  8490. </dd>
  8491. <dt>&lsquo;<samp>max_port</samp>&rsquo;</dt>
  8492. <dd><p>Set maximum local UDP port. Default value is 65000.
  8493. </p>
  8494. </dd>
  8495. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  8496. <dd><p>Set maximum timeout (in seconds) to wait for incoming connections.
  8497. </p>
  8498. <p>A value of -1 means infinite (default). This option implies the
  8499. &lsquo;<samp>rtsp_flags</samp>&rsquo; set to &lsquo;<samp>listen</samp>&rsquo;.
  8500. </p>
  8501. </dd>
  8502. <dt>&lsquo;<samp>reorder_queue_size</samp>&rsquo;</dt>
  8503. <dd><p>Set number of packets to buffer for handling of reordered packets.
  8504. </p>
  8505. </dd>
  8506. <dt>&lsquo;<samp>stimeout</samp>&rsquo;</dt>
  8507. <dd><p>Set socket TCP I/O timeout in microseconds.
  8508. </p>
  8509. </dd>
  8510. <dt>&lsquo;<samp>user-agent</samp>&rsquo;</dt>
  8511. <dd><p>Override User-Agent header. If not specified, it defaults to the
  8512. libavformat identifier string.
  8513. </p></dd>
  8514. </dl>
  8515. <p>When receiving data over UDP, the demuxer tries to reorder received packets
  8516. (since they may arrive out of order, or packets may get lost totally). This
  8517. can be disabled by setting the maximum demuxing delay to zero (via
  8518. the <code>max_delay</code> field of AVFormatContext).
  8519. </p>
  8520. <p>When watching multi-bitrate Real-RTSP streams with <code>ffplay</code>, the
  8521. streams to display can be chosen with <code>-vst</code> <var>n</var> and
  8522. <code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
  8523. on the fly by pressing <code>v</code> and <code>a</code>.
  8524. </p>
  8525. <a name="Examples-23"></a>
  8526. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-23">16.28.1 Examples</a></h3>
  8527. <p>The following examples all make use of the <code>ffplay</code> and
  8528. <code>ffmpeg</code> tools.
  8529. </p>
  8530. <ul>
  8531. <li>
  8532. Watch a stream over UDP, with a max reordering delay of 0.5 seconds:
  8533. <div class="example">
  8534. <pre class="example">ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
  8535. </pre></div>
  8536. </li><li>
  8537. Watch a stream tunneled over HTTP:
  8538. <div class="example">
  8539. <pre class="example">ffplay -rtsp_transport http rtsp://server/video.mp4
  8540. </pre></div>
  8541. </li><li>
  8542. Send a stream in realtime to a RTSP server, for others to watch:
  8543. <div class="example">
  8544. <pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
  8545. </pre></div>
  8546. </li><li>
  8547. Receive a stream in realtime:
  8548. <div class="example">
  8549. <pre class="example">ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp <var>output</var>
  8550. </pre></div>
  8551. </li></ul>
  8552. <a name="sap"></a>
  8553. <h2 class="section"><a href="ffplay-all.html#toc-sap">16.29 sap</a></h2>
  8554. <p>Session Announcement Protocol (RFC 2974). This is not technically a
  8555. protocol handler in libavformat, it is a muxer and demuxer.
  8556. It is used for signalling of RTP streams, by announcing the SDP for the
  8557. streams regularly on a separate port.
  8558. </p>
  8559. <a name="Muxer"></a>
  8560. <h3 class="subsection"><a href="ffplay-all.html#toc-Muxer">16.29.1 Muxer</a></h3>
  8561. <p>The syntax for a SAP url given to the muxer is:
  8562. </p><div class="example">
  8563. <pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
  8564. </pre></div>
  8565. <p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
  8566. or to port 5004 if no port is specified.
  8567. <var>options</var> is a <code>&amp;</code>-separated list. The following options
  8568. are supported:
  8569. </p>
  8570. <dl compact="compact">
  8571. <dt>&lsquo;<samp>announce_addr=<var>address</var></samp>&rsquo;</dt>
  8572. <dd><p>Specify the destination IP address for sending the announcements to.
  8573. If omitted, the announcements are sent to the commonly used SAP
  8574. announcement multicast address 224.2.127.254 (sap.mcast.net), or
  8575. ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
  8576. </p>
  8577. </dd>
  8578. <dt>&lsquo;<samp>announce_port=<var>port</var></samp>&rsquo;</dt>
  8579. <dd><p>Specify the port to send the announcements on, defaults to
  8580. 9875 if not specified.
  8581. </p>
  8582. </dd>
  8583. <dt>&lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
  8584. <dd><p>Specify the time to live value for the announcements and RTP packets,
  8585. defaults to 255.
  8586. </p>
  8587. </dd>
  8588. <dt>&lsquo;<samp>same_port=<var>0|1</var></samp>&rsquo;</dt>
  8589. <dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
  8590. default), all streams are sent on unique ports, with each stream on a
  8591. port 2 numbers higher than the previous.
  8592. VLC/Live555 requires this to be set to 1, to be able to receive the stream.
  8593. The RTP stack in libavformat for receiving requires all streams to be sent
  8594. on unique ports.
  8595. </p></dd>
  8596. </dl>
  8597. <p>Example command lines follow.
  8598. </p>
  8599. <p>To broadcast a stream on the local subnet, for watching in VLC:
  8600. </p>
  8601. <div class="example">
  8602. <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
  8603. </pre></div>
  8604. <p>Similarly, for watching in <code>ffplay</code>:
  8605. </p>
  8606. <div class="example">
  8607. <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
  8608. </pre></div>
  8609. <p>And for watching in <code>ffplay</code>, over IPv6:
  8610. </p>
  8611. <div class="example">
  8612. <pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
  8613. </pre></div>
  8614. <a name="Demuxer"></a>
  8615. <h3 class="subsection"><a href="ffplay-all.html#toc-Demuxer">16.29.2 Demuxer</a></h3>
  8616. <p>The syntax for a SAP url given to the demuxer is:
  8617. </p><div class="example">
  8618. <pre class="example">sap://[<var>address</var>][:<var>port</var>]
  8619. </pre></div>
  8620. <p><var>address</var> is the multicast address to listen for announcements on,
  8621. if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
  8622. is the port that is listened on, 9875 if omitted.
  8623. </p>
  8624. <p>The demuxers listens for announcements on the given address and port.
  8625. Once an announcement is received, it tries to receive that particular stream.
  8626. </p>
  8627. <p>Example command lines follow.
  8628. </p>
  8629. <p>To play back the first stream announced on the normal SAP multicast address:
  8630. </p>
  8631. <div class="example">
  8632. <pre class="example">ffplay sap://
  8633. </pre></div>
  8634. <p>To play back the first stream announced on one the default IPv6 SAP multicast address:
  8635. </p>
  8636. <div class="example">
  8637. <pre class="example">ffplay sap://[ff0e::2:7ffe]
  8638. </pre></div>
  8639. <a name="sctp"></a>
  8640. <h2 class="section"><a href="ffplay-all.html#toc-sctp">16.30 sctp</a></h2>
  8641. <p>Stream Control Transmission Protocol.
  8642. </p>
  8643. <p>The accepted URL syntax is:
  8644. </p><div class="example">
  8645. <pre class="example">sctp://<var>host</var>:<var>port</var>[?<var>options</var>]
  8646. </pre></div>
  8647. <p>The protocol accepts the following options:
  8648. </p><dl compact="compact">
  8649. <dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
  8650. <dd><p>If set to any value, listen for an incoming connection. Outgoing connection is done by default.
  8651. </p>
  8652. </dd>
  8653. <dt>&lsquo;<samp>max_streams</samp>&rsquo;</dt>
  8654. <dd><p>Set the maximum number of streams. By default no limit is set.
  8655. </p></dd>
  8656. </dl>
  8657. <a name="srt"></a>
  8658. <h2 class="section"><a href="ffplay-all.html#toc-srt">16.31 srt</a></h2>
  8659. <p>Haivision Secure Reliable Transport Protocol via libsrt.
  8660. </p>
  8661. <p>The supported syntax for a SRT URL is:
  8662. </p><div class="example">
  8663. <pre class="example">srt://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  8664. </pre></div>
  8665. <p><var>options</var> contains a list of &amp;-separated options of the form
  8666. <var>key</var>=<var>val</var>.
  8667. </p>
  8668. <p>or
  8669. </p>
  8670. <div class="example">
  8671. <pre class="example"><var>options</var> srt://<var>hostname</var>:<var>port</var>
  8672. </pre></div>
  8673. <p><var>options</var> contains a list of &rsquo;-<var>key</var> <var>val</var>&rsquo;
  8674. options.
  8675. </p>
  8676. <p>This protocol accepts the following options.
  8677. </p>
  8678. <dl compact="compact">
  8679. <dt>&lsquo;<samp>connect_timeout</samp>&rsquo;</dt>
  8680. <dd><p>Connection timeout; SRT cannot connect for RTT &gt; 1500 msec
  8681. (2 handshake exchanges) with the default connect timeout of
  8682. 3 seconds. This option applies to the caller and rendezvous
  8683. connection modes. The connect timeout is 10 times the value
  8684. set for the rendezvous mode (which can be used as a
  8685. workaround for this connection problem with earlier versions).
  8686. </p>
  8687. </dd>
  8688. <dt>&lsquo;<samp>ffs=<var>bytes</var></samp>&rsquo;</dt>
  8689. <dd><p>Flight Flag Size (Window Size), in bytes. FFS is actually an
  8690. internal parameter and you should set it to not less than
  8691. &lsquo;<samp>recv_buffer_size</samp>&rsquo; and &lsquo;<samp>mss</samp>&rsquo;. The default value
  8692. is relatively large, therefore unless you set a very large receiver buffer,
  8693. you do not need to change this option. Default value is 25600.
  8694. </p>
  8695. </dd>
  8696. <dt>&lsquo;<samp>inputbw=<var>bytes/seconds</var></samp>&rsquo;</dt>
  8697. <dd><p>Sender nominal input rate, in bytes per seconds. Used along with
  8698. &lsquo;<samp>oheadbw</samp>&rsquo;, when &lsquo;<samp>maxbw</samp>&rsquo; is set to relative (0), to
  8699. calculate maximum sending rate when recovery packets are sent
  8700. along with the main media stream:
  8701. &lsquo;<samp>inputbw</samp>&rsquo; * (100 + &lsquo;<samp>oheadbw</samp>&rsquo;) / 100
  8702. if &lsquo;<samp>inputbw</samp>&rsquo; is not set while &lsquo;<samp>maxbw</samp>&rsquo; is set to
  8703. relative (0), the actual input rate is evaluated inside
  8704. the library. Default value is 0.
  8705. </p>
  8706. </dd>
  8707. <dt>&lsquo;<samp>iptos=<var>tos</var></samp>&rsquo;</dt>
  8708. <dd><p>IP Type of Service. Applies to sender only. Default value is 0xB8.
  8709. </p>
  8710. </dd>
  8711. <dt>&lsquo;<samp>ipttl=<var>ttl</var></samp>&rsquo;</dt>
  8712. <dd><p>IP Time To Live. Applies to sender only. Default value is 64.
  8713. </p>
  8714. </dd>
  8715. <dt>&lsquo;<samp>latency</samp>&rsquo;</dt>
  8716. <dd><p>Timestamp-based Packet Delivery Delay.
  8717. Used to absorb bursts of missed packet retransmissions.
  8718. This flag sets both &lsquo;<samp>rcvlatency</samp>&rsquo; and &lsquo;<samp>peerlatency</samp>&rsquo;
  8719. to the same value. Note that prior to version 1.3.0
  8720. this is the only flag to set the latency, however
  8721. this is effectively equivalent to setting &lsquo;<samp>peerlatency</samp>&rsquo;,
  8722. when side is sender and &lsquo;<samp>rcvlatency</samp>&rsquo;
  8723. when side is receiver, and the bidirectional stream
  8724. sending is not supported.
  8725. </p>
  8726. </dd>
  8727. <dt>&lsquo;<samp>listen_timeout</samp>&rsquo;</dt>
  8728. <dd><p>Set socket listen timeout.
  8729. </p>
  8730. </dd>
  8731. <dt>&lsquo;<samp>maxbw=<var>bytes/seconds</var></samp>&rsquo;</dt>
  8732. <dd><p>Maximum sending bandwidth, in bytes per seconds.
  8733. -1 infinite (CSRTCC limit is 30mbps)
  8734. 0 relative to input rate (see &lsquo;<samp>inputbw</samp>&rsquo;)
  8735. &gt;0 absolute limit value
  8736. Default value is 0 (relative)
  8737. </p>
  8738. </dd>
  8739. <dt>&lsquo;<samp>mode=<var>caller|listener|rendezvous</var></samp>&rsquo;</dt>
  8740. <dd><p>Connection mode.
  8741. &lsquo;<samp>caller</samp>&rsquo; opens client connection.
  8742. &lsquo;<samp>listener</samp>&rsquo; starts server to listen for incoming connections.
  8743. &lsquo;<samp>rendezvous</samp>&rsquo; use Rendez-Vous connection mode.
  8744. Default value is caller.
  8745. </p>
  8746. </dd>
  8747. <dt>&lsquo;<samp>mss=<var>bytes</var></samp>&rsquo;</dt>
  8748. <dd><p>Maximum Segment Size, in bytes. Used for buffer allocation
  8749. and rate calculation using a packet counter assuming fully
  8750. filled packets. The smallest MSS between the peers is
  8751. used. This is 1500 by default in the overall internet.
  8752. This is the maximum size of the UDP packet and can be
  8753. only decreased, unless you have some unusual dedicated
  8754. network settings. Default value is 1500.
  8755. </p>
  8756. </dd>
  8757. <dt>&lsquo;<samp>nakreport=<var>1|0</var></samp>&rsquo;</dt>
  8758. <dd><p>If set to 1, Receiver will send &lsquo;UMSG_LOSSREPORT&lsquo; messages
  8759. periodically until a lost packet is retransmitted or
  8760. intentionally dropped. Default value is 1.
  8761. </p>
  8762. </dd>
  8763. <dt>&lsquo;<samp>oheadbw=<var>percents</var></samp>&rsquo;</dt>
  8764. <dd><p>Recovery bandwidth overhead above input rate, in percents.
  8765. See &lsquo;<samp>inputbw</samp>&rsquo;. Default value is 25%.
  8766. </p>
  8767. </dd>
  8768. <dt>&lsquo;<samp>passphrase=<var>string</var></samp>&rsquo;</dt>
  8769. <dd><p>HaiCrypt Encryption/Decryption Passphrase string, length
  8770. from 10 to 79 characters. The passphrase is the shared
  8771. secret between the sender and the receiver. It is used
  8772. to generate the Key Encrypting Key using PBKDF2
  8773. (Password-Based Key Derivation Function). It is used
  8774. only if &lsquo;<samp>pbkeylen</samp>&rsquo; is non-zero. It is used on
  8775. the receiver only if the received data is encrypted.
  8776. The configured passphrase cannot be recovered (write-only).
  8777. </p>
  8778. </dd>
  8779. <dt>&lsquo;<samp>enforced_encryption=<var>1|0</var></samp>&rsquo;</dt>
  8780. <dd><p>If true, both connection parties must have the same password
  8781. set (including empty, that is, with no encryption). If the
  8782. password doesn&rsquo;t match or only one side is unencrypted,
  8783. the connection is rejected. Default is true.
  8784. </p>
  8785. </dd>
  8786. <dt>&lsquo;<samp>kmrefreshrate=<var>packets</var></samp>&rsquo;</dt>
  8787. <dd><p>The number of packets to be transmitted after which the
  8788. encryption key is switched to a new key. Default is -1.
  8789. -1 means auto (0x1000000 in srt library). The range for
  8790. this option is integers in the 0 - <code>INT_MAX</code>.
  8791. </p>
  8792. </dd>
  8793. <dt>&lsquo;<samp>kmpreannounce=<var>packets</var></samp>&rsquo;</dt>
  8794. <dd><p>The interval between when a new encryption key is sent and
  8795. when switchover occurs. This value also applies to the
  8796. subsequent interval between when switchover occurs and
  8797. when the old encryption key is decommissioned. Default is -1.
  8798. -1 means auto (0x1000 in srt library). The range for
  8799. this option is integers in the 0 - <code>INT_MAX</code>.
  8800. </p>
  8801. </dd>
  8802. <dt>&lsquo;<samp>payload_size=<var>bytes</var></samp>&rsquo;</dt>
  8803. <dd><p>Sets the maximum declared size of a packet transferred
  8804. during the single call to the sending function in Live
  8805. mode. Use 0 if this value isn&rsquo;t used (which is default in
  8806. file mode).
  8807. Default is -1 (automatic), which typically means MPEG-TS;
  8808. if you are going to use SRT
  8809. to send any different kind of payload, such as, for example,
  8810. wrapping a live stream in very small frames, then you can
  8811. use a bigger maximum frame size, though not greater than
  8812. 1456 bytes.
  8813. </p>
  8814. </dd>
  8815. <dt>&lsquo;<samp>pkt_size=<var>bytes</var></samp>&rsquo;</dt>
  8816. <dd><p>Alias for &lsquo;<samp>payload_size</samp>&rsquo;.
  8817. </p>
  8818. </dd>
  8819. <dt>&lsquo;<samp>peerlatency</samp>&rsquo;</dt>
  8820. <dd><p>The latency value (as described in &lsquo;<samp>rcvlatency</samp>&rsquo;) that is
  8821. set by the sender side as a minimum value for the receiver.
  8822. </p>
  8823. </dd>
  8824. <dt>&lsquo;<samp>pbkeylen=<var>bytes</var></samp>&rsquo;</dt>
  8825. <dd><p>Sender encryption key length, in bytes.
  8826. Only can be set to 0, 16, 24 and 32.
  8827. Enable sender encryption if not 0.
  8828. Not required on receiver (set to 0),
  8829. key size obtained from sender in HaiCrypt handshake.
  8830. Default value is 0.
  8831. </p>
  8832. </dd>
  8833. <dt>&lsquo;<samp>rcvlatency</samp>&rsquo;</dt>
  8834. <dd><p>The time that should elapse since the moment when the
  8835. packet was sent and the moment when it&rsquo;s delivered to
  8836. the receiver application in the receiving function.
  8837. This time should be a buffer time large enough to cover
  8838. the time spent for sending, unexpectedly extended RTT
  8839. time, and the time needed to retransmit the lost UDP
  8840. packet. The effective latency value will be the maximum
  8841. of this options&rsquo; value and the value of &lsquo;<samp>peerlatency</samp>&rsquo;
  8842. set by the peer side. Before version 1.3.0 this option
  8843. is only available as &lsquo;<samp>latency</samp>&rsquo;.
  8844. </p>
  8845. </dd>
  8846. <dt>&lsquo;<samp>recv_buffer_size=<var>bytes</var></samp>&rsquo;</dt>
  8847. <dd><p>Set UDP receive buffer size, expressed in bytes.
  8848. </p>
  8849. </dd>
  8850. <dt>&lsquo;<samp>send_buffer_size=<var>bytes</var></samp>&rsquo;</dt>
  8851. <dd><p>Set UDP send buffer size, expressed in bytes.
  8852. </p>
  8853. </dd>
  8854. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  8855. <dd><p>Set raise error timeouts for read, write and connect operations. Note that the
  8856. SRT library has internal timeouts which can be controlled separately, the
  8857. value set here is only a cap on those.
  8858. </p>
  8859. </dd>
  8860. <dt>&lsquo;<samp>tlpktdrop=<var>1|0</var></samp>&rsquo;</dt>
  8861. <dd><p>Too-late Packet Drop. When enabled on receiver, it skips
  8862. missing packets that have not been delivered in time and
  8863. delivers the following packets to the application when
  8864. their time-to-play has come. It also sends a fake ACK to
  8865. the sender. When enabled on sender and enabled on the
  8866. receiving peer, the sender drops the older packets that
  8867. have no chance of being delivered in time. It was
  8868. automatically enabled in the sender if the receiver
  8869. supports it.
  8870. </p>
  8871. </dd>
  8872. <dt>&lsquo;<samp>sndbuf=<var>bytes</var></samp>&rsquo;</dt>
  8873. <dd><p>Set send buffer size, expressed in bytes.
  8874. </p>
  8875. </dd>
  8876. <dt>&lsquo;<samp>rcvbuf=<var>bytes</var></samp>&rsquo;</dt>
  8877. <dd><p>Set receive buffer size, expressed in bytes.
  8878. </p>
  8879. <p>Receive buffer must not be greater than &lsquo;<samp>ffs</samp>&rsquo;.
  8880. </p>
  8881. </dd>
  8882. <dt>&lsquo;<samp>lossmaxttl=<var>packets</var></samp>&rsquo;</dt>
  8883. <dd><p>The value up to which the Reorder Tolerance may grow. When
  8884. Reorder Tolerance is &gt; 0, then packet loss report is delayed
  8885. until that number of packets come in. Reorder Tolerance
  8886. increases every time a &quot;belated&quot; packet has come, but it
  8887. wasn&rsquo;t due to retransmission (that is, when UDP packets tend
  8888. to come out of order), with the difference between the latest
  8889. sequence and this packet&rsquo;s sequence, and not more than the
  8890. value of this option. By default it&rsquo;s 0, which means that this
  8891. mechanism is turned off, and the loss report is always sent
  8892. immediately upon experiencing a &quot;gap&quot; in sequences.
  8893. </p>
  8894. </dd>
  8895. <dt>&lsquo;<samp>minversion</samp>&rsquo;</dt>
  8896. <dd><p>The minimum SRT version that is required from the peer. A connection
  8897. to a peer that does not satisfy the minimum version requirement
  8898. will be rejected.
  8899. </p>
  8900. <p>The version format in hex is 0xXXYYZZ for x.y.z in human readable
  8901. form.
  8902. </p>
  8903. </dd>
  8904. <dt>&lsquo;<samp>streamid=<var>string</var></samp>&rsquo;</dt>
  8905. <dd><p>A string limited to 512 characters that can be set on the socket prior
  8906. to connecting. This stream ID will be able to be retrieved by the
  8907. listener side from the socket that is returned from srt_accept and
  8908. was connected by a socket with that set stream ID. SRT does not enforce
  8909. any special interpretation of the contents of this string.
  8910. This option doesn’t make sense in Rendezvous connection; the result
  8911. might be that simply one side will override the value from the other
  8912. side and it’s the matter of luck which one would win
  8913. </p>
  8914. </dd>
  8915. <dt>&lsquo;<samp>smoother=<var>live|file</var></samp>&rsquo;</dt>
  8916. <dd><p>The type of Smoother used for the transmission for that socket, which
  8917. is responsible for the transmission and congestion control. The Smoother
  8918. type must be exactly the same on both connecting parties, otherwise
  8919. the connection is rejected.
  8920. </p>
  8921. </dd>
  8922. <dt>&lsquo;<samp>messageapi=<var>1|0</var></samp>&rsquo;</dt>
  8923. <dd><p>When set, this socket uses the Message API, otherwise it uses Buffer
  8924. API. Note that in live mode (see &lsquo;<samp>transtype</samp>&rsquo;) there’s only
  8925. message API available. In File mode you can chose to use one of two modes:
  8926. </p>
  8927. <p>Stream API (default, when this option is false). In this mode you may
  8928. send as many data as you wish with one sending instruction, or even use
  8929. dedicated functions that read directly from a file. The internal facility
  8930. will take care of any speed and congestion control. When receiving, you
  8931. can also receive as many data as desired, the data not extracted will be
  8932. waiting for the next call. There is no boundary between data portions in
  8933. the Stream mode.
  8934. </p>
  8935. <p>Message API. In this mode your single sending instruction passes exactly
  8936. one piece of data that has boundaries (a message). Contrary to Live mode,
  8937. this message may span across multiple UDP packets and the only size
  8938. limitation is that it shall fit as a whole in the sending buffer. The
  8939. receiver shall use as large buffer as necessary to receive the message,
  8940. otherwise the message will not be given up. When the message is not
  8941. complete (not all packets received or there was a packet loss) it will
  8942. not be given up.
  8943. </p>
  8944. </dd>
  8945. <dt>&lsquo;<samp>transtype=<var>live|file</var></samp>&rsquo;</dt>
  8946. <dd><p>Sets the transmission type for the socket, in particular, setting this
  8947. option sets multiple other parameters to their default values as required
  8948. for a particular transmission type.
  8949. </p>
  8950. <p>live: Set options as for live transmission. In this mode, you should
  8951. send by one sending instruction only so many data that fit in one UDP packet,
  8952. and limited to the value defined first in &lsquo;<samp>payload_size</samp>&rsquo; (1316 is
  8953. default in this mode). There is no speed control in this mode, only the
  8954. bandwidth control, if configured, in order to not exceed the bandwidth with
  8955. the overhead transmission (retransmitted and control packets).
  8956. </p>
  8957. <p>file: Set options as for non-live transmission. See &lsquo;<samp>messageapi</samp>&rsquo;
  8958. for further explanations
  8959. </p>
  8960. </dd>
  8961. <dt>&lsquo;<samp>linger=<var>seconds</var></samp>&rsquo;</dt>
  8962. <dd><p>The number of seconds that the socket waits for unsent data when closing.
  8963. Default is -1. -1 means auto (off with 0 seconds in live mode, on with 180
  8964. seconds in file mode). The range for this option is integers in the
  8965. 0 - <code>INT_MAX</code>.
  8966. </p>
  8967. </dd>
  8968. </dl>
  8969. <p>For more information see: <a href="https://github.com/Haivision/srt">https://github.com/Haivision/srt</a>.
  8970. </p>
  8971. <a name="srtp"></a>
  8972. <h2 class="section"><a href="ffplay-all.html#toc-srtp">16.32 srtp</a></h2>
  8973. <p>Secure Real-time Transport Protocol.
  8974. </p>
  8975. <p>The accepted options are:
  8976. </p><dl compact="compact">
  8977. <dt>&lsquo;<samp>srtp_in_suite</samp>&rsquo;</dt>
  8978. <dt>&lsquo;<samp>srtp_out_suite</samp>&rsquo;</dt>
  8979. <dd><p>Select input and output encoding suites.
  8980. </p>
  8981. <p>Supported values:
  8982. </p><dl compact="compact">
  8983. <dt>&lsquo;<samp>AES_CM_128_HMAC_SHA1_80</samp>&rsquo;</dt>
  8984. <dt>&lsquo;<samp>SRTP_AES128_CM_HMAC_SHA1_80</samp>&rsquo;</dt>
  8985. <dt>&lsquo;<samp>AES_CM_128_HMAC_SHA1_32</samp>&rsquo;</dt>
  8986. <dt>&lsquo;<samp>SRTP_AES128_CM_HMAC_SHA1_32</samp>&rsquo;</dt>
  8987. </dl>
  8988. </dd>
  8989. <dt>&lsquo;<samp>srtp_in_params</samp>&rsquo;</dt>
  8990. <dt>&lsquo;<samp>srtp_out_params</samp>&rsquo;</dt>
  8991. <dd><p>Set input and output encoding parameters, which are expressed by a
  8992. base64-encoded representation of a binary block. The first 16 bytes of
  8993. this binary block are used as master key, the following 14 bytes are
  8994. used as master salt.
  8995. </p></dd>
  8996. </dl>
  8997. <a name="subfile"></a>
  8998. <h2 class="section"><a href="ffplay-all.html#toc-subfile">16.33 subfile</a></h2>
  8999. <p>Virtually extract a segment of a file or another stream.
  9000. The underlying stream must be seekable.
  9001. </p>
  9002. <p>Accepted options:
  9003. </p><dl compact="compact">
  9004. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  9005. <dd><p>Start offset of the extracted segment, in bytes.
  9006. </p></dd>
  9007. <dt>&lsquo;<samp>end</samp>&rsquo;</dt>
  9008. <dd><p>End offset of the extracted segment, in bytes.
  9009. If set to 0, extract till end of file.
  9010. </p></dd>
  9011. </dl>
  9012. <p>Examples:
  9013. </p>
  9014. <p>Extract a chapter from a DVD VOB file (start and end sectors obtained
  9015. externally and multiplied by 2048):
  9016. </p><div class="example">
  9017. <pre class="example">subfile,,start,153391104,end,268142592,,:/media/dvd/VIDEO_TS/VTS_08_1.VOB
  9018. </pre></div>
  9019. <p>Play an AVI file directly from a TAR archive:
  9020. </p><div class="example">
  9021. <pre class="example">subfile,,start,183241728,end,366490624,,:archive.tar
  9022. </pre></div>
  9023. <p>Play a MPEG-TS file from start offset till end:
  9024. </p><div class="example">
  9025. <pre class="example">subfile,,start,32815239,end,0,,:video.ts
  9026. </pre></div>
  9027. <a name="tee"></a>
  9028. <h2 class="section"><a href="ffplay-all.html#toc-tee">16.34 tee</a></h2>
  9029. <p>Writes the output to multiple protocols. The individual outputs are separated
  9030. by |
  9031. </p>
  9032. <div class="example">
  9033. <pre class="example">tee:file://path/to/local/this.avi|file://path/to/local/that.avi
  9034. </pre></div>
  9035. <a name="tcp"></a>
  9036. <h2 class="section"><a href="ffplay-all.html#toc-tcp">16.35 tcp</a></h2>
  9037. <p>Transmission Control Protocol.
  9038. </p>
  9039. <p>The required syntax for a TCP url is:
  9040. </p><div class="example">
  9041. <pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  9042. </pre></div>
  9043. <p><var>options</var> contains a list of &amp;-separated options of the form
  9044. <var>key</var>=<var>val</var>.
  9045. </p>
  9046. <p>The list of supported options follows.
  9047. </p>
  9048. <dl compact="compact">
  9049. <dt>&lsquo;<samp>listen=<var>1|0</var></samp>&rsquo;</dt>
  9050. <dd><p>Listen for an incoming connection. Default value is 0.
  9051. </p>
  9052. </dd>
  9053. <dt>&lsquo;<samp>timeout=<var>microseconds</var></samp>&rsquo;</dt>
  9054. <dd><p>Set raise error timeout, expressed in microseconds.
  9055. </p>
  9056. <p>This option is only relevant in read mode: if no data arrived in more
  9057. than this time interval, raise error.
  9058. </p>
  9059. </dd>
  9060. <dt>&lsquo;<samp>listen_timeout=<var>milliseconds</var></samp>&rsquo;</dt>
  9061. <dd><p>Set listen timeout, expressed in milliseconds.
  9062. </p>
  9063. </dd>
  9064. <dt>&lsquo;<samp>recv_buffer_size=<var>bytes</var></samp>&rsquo;</dt>
  9065. <dd><p>Set receive buffer size, expressed bytes.
  9066. </p>
  9067. </dd>
  9068. <dt>&lsquo;<samp>send_buffer_size=<var>bytes</var></samp>&rsquo;</dt>
  9069. <dd><p>Set send buffer size, expressed bytes.
  9070. </p>
  9071. </dd>
  9072. <dt>&lsquo;<samp>tcp_nodelay=<var>1|0</var></samp>&rsquo;</dt>
  9073. <dd><p>Set TCP_NODELAY to disable Nagle&rsquo;s algorithm. Default value is 0.
  9074. </p>
  9075. </dd>
  9076. <dt>&lsquo;<samp>tcp_mss=<var>bytes</var></samp>&rsquo;</dt>
  9077. <dd><p>Set maximum segment size for outgoing TCP packets, expressed in bytes.
  9078. </p></dd>
  9079. </dl>
  9080. <p>The following example shows how to setup a listening TCP connection
  9081. with <code>ffmpeg</code>, which is then accessed with <code>ffplay</code>:
  9082. </p><div class="example">
  9083. <pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
  9084. ffplay tcp://<var>hostname</var>:<var>port</var>
  9085. </pre></div>
  9086. <a name="tls"></a>
  9087. <h2 class="section"><a href="ffplay-all.html#toc-tls">16.36 tls</a></h2>
  9088. <p>Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
  9089. </p>
  9090. <p>The required syntax for a TLS/SSL url is:
  9091. </p><div class="example">
  9092. <pre class="example">tls://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  9093. </pre></div>
  9094. <p>The following parameters can be set via command line options
  9095. (or in code via <code>AVOption</code>s):
  9096. </p>
  9097. <dl compact="compact">
  9098. <dt>&lsquo;<samp>ca_file, cafile=<var>filename</var></samp>&rsquo;</dt>
  9099. <dd><p>A file containing certificate authority (CA) root certificates to treat
  9100. as trusted. If the linked TLS library contains a default this might not
  9101. need to be specified for verification to work, but not all libraries and
  9102. setups have defaults built in.
  9103. The file must be in OpenSSL PEM format.
  9104. </p>
  9105. </dd>
  9106. <dt>&lsquo;<samp>tls_verify=<var>1|0</var></samp>&rsquo;</dt>
  9107. <dd><p>If enabled, try to verify the peer that we are communicating with.
  9108. Note, if using OpenSSL, this currently only makes sure that the
  9109. peer certificate is signed by one of the root certificates in the CA
  9110. database, but it does not validate that the certificate actually
  9111. matches the host name we are trying to connect to. (With other backends,
  9112. the host name is validated as well.)
  9113. </p>
  9114. <p>This is disabled by default since it requires a CA database to be
  9115. provided by the caller in many cases.
  9116. </p>
  9117. </dd>
  9118. <dt>&lsquo;<samp>cert_file, cert=<var>filename</var></samp>&rsquo;</dt>
  9119. <dd><p>A file containing a certificate to use in the handshake with the peer.
  9120. (When operating as server, in listen mode, this is more often required
  9121. by the peer, while client certificates only are mandated in certain
  9122. setups.)
  9123. </p>
  9124. </dd>
  9125. <dt>&lsquo;<samp>key_file, key=<var>filename</var></samp>&rsquo;</dt>
  9126. <dd><p>A file containing the private key for the certificate.
  9127. </p>
  9128. </dd>
  9129. <dt>&lsquo;<samp>listen=<var>1|0</var></samp>&rsquo;</dt>
  9130. <dd><p>If enabled, listen for connections on the provided port, and assume
  9131. the server role in the handshake instead of the client role.
  9132. </p>
  9133. </dd>
  9134. </dl>
  9135. <p>Example command lines:
  9136. </p>
  9137. <p>To create a TLS/SSL server that serves an input stream.
  9138. </p>
  9139. <div class="example">
  9140. <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>
  9141. </pre></div>
  9142. <p>To play back a stream from the TLS/SSL server using <code>ffplay</code>:
  9143. </p>
  9144. <div class="example">
  9145. <pre class="example">ffplay tls://<var>hostname</var>:<var>port</var>
  9146. </pre></div>
  9147. <a name="udp"></a>
  9148. <h2 class="section"><a href="ffplay-all.html#toc-udp">16.37 udp</a></h2>
  9149. <p>User Datagram Protocol.
  9150. </p>
  9151. <p>The required syntax for an UDP URL is:
  9152. </p><div class="example">
  9153. <pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
  9154. </pre></div>
  9155. <p><var>options</var> contains a list of &amp;-separated options of the form <var>key</var>=<var>val</var>.
  9156. </p>
  9157. <p>In case threading is enabled on the system, a circular buffer is used
  9158. to store the incoming data, which allows one to reduce loss of data due to
  9159. UDP socket buffer overruns. The <var>fifo_size</var> and
  9160. <var>overrun_nonfatal</var> options are related to this buffer.
  9161. </p>
  9162. <p>The list of supported options follows.
  9163. </p>
  9164. <dl compact="compact">
  9165. <dt>&lsquo;<samp>buffer_size=<var>size</var></samp>&rsquo;</dt>
  9166. <dd><p>Set the UDP maximum socket buffer size in bytes. This is used to set either
  9167. the receive or send buffer size, depending on what the socket is used for.
  9168. Default is 32 KB for output, 384 KB for input. See also <var>fifo_size</var>.
  9169. </p>
  9170. </dd>
  9171. <dt>&lsquo;<samp>bitrate=<var>bitrate</var></samp>&rsquo;</dt>
  9172. <dd><p>If set to nonzero, the output will have the specified constant bitrate if the
  9173. input has enough packets to sustain it.
  9174. </p>
  9175. </dd>
  9176. <dt>&lsquo;<samp>burst_bits=<var>bits</var></samp>&rsquo;</dt>
  9177. <dd><p>When using <var>bitrate</var> this specifies the maximum number of bits in
  9178. packet bursts.
  9179. </p>
  9180. </dd>
  9181. <dt>&lsquo;<samp>localport=<var>port</var></samp>&rsquo;</dt>
  9182. <dd><p>Override the local UDP port to bind with.
  9183. </p>
  9184. </dd>
  9185. <dt>&lsquo;<samp>localaddr=<var>addr</var></samp>&rsquo;</dt>
  9186. <dd><p>Local IP address of a network interface used for sending packets or joining
  9187. multicast groups.
  9188. </p>
  9189. </dd>
  9190. <dt>&lsquo;<samp>pkt_size=<var>size</var></samp>&rsquo;</dt>
  9191. <dd><p>Set the size in bytes of UDP packets.
  9192. </p>
  9193. </dd>
  9194. <dt>&lsquo;<samp>reuse=<var>1|0</var></samp>&rsquo;</dt>
  9195. <dd><p>Explicitly allow or disallow reusing UDP sockets.
  9196. </p>
  9197. </dd>
  9198. <dt>&lsquo;<samp>ttl=<var>ttl</var></samp>&rsquo;</dt>
  9199. <dd><p>Set the time to live value (for multicast only).
  9200. </p>
  9201. </dd>
  9202. <dt>&lsquo;<samp>connect=<var>1|0</var></samp>&rsquo;</dt>
  9203. <dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
  9204. destination address can&rsquo;t be changed with ff_udp_set_remote_url later.
  9205. If the destination address isn&rsquo;t known at the start, this option can
  9206. be specified in ff_udp_set_remote_url, too.
  9207. This allows finding out the source address for the packets with getsockname,
  9208. and makes writes return with AVERROR(ECONNREFUSED) if &quot;destination
  9209. unreachable&quot; is received.
  9210. For receiving, this gives the benefit of only receiving packets from
  9211. the specified peer address/port.
  9212. </p>
  9213. </dd>
  9214. <dt>&lsquo;<samp>sources=<var>address</var>[,<var>address</var>]</samp>&rsquo;</dt>
  9215. <dd><p>Only receive packets sent from the specified addresses. In case of multicast,
  9216. also subscribe to multicast traffic coming from these addresses only.
  9217. </p>
  9218. </dd>
  9219. <dt>&lsquo;<samp>block=<var>address</var>[,<var>address</var>]</samp>&rsquo;</dt>
  9220. <dd><p>Ignore packets sent from the specified addresses. In case of multicast, also
  9221. exclude the source addresses in the multicast subscription.
  9222. </p>
  9223. </dd>
  9224. <dt>&lsquo;<samp>fifo_size=<var>units</var></samp>&rsquo;</dt>
  9225. <dd><p>Set the UDP receiving circular buffer size, expressed as a number of
  9226. packets with size of 188 bytes. If not specified defaults to 7*4096.
  9227. </p>
  9228. </dd>
  9229. <dt>&lsquo;<samp>overrun_nonfatal=<var>1|0</var></samp>&rsquo;</dt>
  9230. <dd><p>Survive in case of UDP receiving circular buffer overrun. Default
  9231. value is 0.
  9232. </p>
  9233. </dd>
  9234. <dt>&lsquo;<samp>timeout=<var>microseconds</var></samp>&rsquo;</dt>
  9235. <dd><p>Set raise error timeout, expressed in microseconds.
  9236. </p>
  9237. <p>This option is only relevant in read mode: if no data arrived in more
  9238. than this time interval, raise error.
  9239. </p>
  9240. </dd>
  9241. <dt>&lsquo;<samp>broadcast=<var>1|0</var></samp>&rsquo;</dt>
  9242. <dd><p>Explicitly allow or disallow UDP broadcasting.
  9243. </p>
  9244. <p>Note that broadcasting may not work properly on networks having
  9245. a broadcast storm protection.
  9246. </p></dd>
  9247. </dl>
  9248. <a name="Examples-134"></a>
  9249. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-134">16.37.1 Examples</a></h3>
  9250. <ul>
  9251. <li>
  9252. Use <code>ffmpeg</code> to stream over UDP to a remote endpoint:
  9253. <div class="example">
  9254. <pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
  9255. </pre></div>
  9256. </li><li>
  9257. Use <code>ffmpeg</code> to stream in mpegts format over UDP using 188
  9258. sized UDP packets, using a large input buffer:
  9259. <div class="example">
  9260. <pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&amp;buffer_size=65535
  9261. </pre></div>
  9262. </li><li>
  9263. Use <code>ffmpeg</code> to receive over UDP from a remote endpoint:
  9264. <div class="example">
  9265. <pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var> ...
  9266. </pre></div>
  9267. </li></ul>
  9268. <a name="unix"></a>
  9269. <h2 class="section"><a href="ffplay-all.html#toc-unix">16.38 unix</a></h2>
  9270. <p>Unix local socket
  9271. </p>
  9272. <p>The required syntax for a Unix socket URL is:
  9273. </p>
  9274. <div class="example">
  9275. <pre class="example">unix://<var>filepath</var>
  9276. </pre></div>
  9277. <p>The following parameters can be set via command line options
  9278. (or in code via <code>AVOption</code>s):
  9279. </p>
  9280. <dl compact="compact">
  9281. <dt>&lsquo;<samp>timeout</samp>&rsquo;</dt>
  9282. <dd><p>Timeout in ms.
  9283. </p></dd>
  9284. <dt>&lsquo;<samp>listen</samp>&rsquo;</dt>
  9285. <dd><p>Create the Unix socket in listening mode.
  9286. </p></dd>
  9287. </dl>
  9288. <a name="zmq"></a>
  9289. <h2 class="section"><a href="ffplay-all.html#toc-zmq">16.39 zmq</a></h2>
  9290. <p>ZeroMQ asynchronous messaging using the libzmq library.
  9291. </p>
  9292. <p>This library supports unicast streaming to multiple clients without relying on
  9293. an external server.
  9294. </p>
  9295. <p>The required syntax for streaming or connecting to a stream is:
  9296. </p><div class="example">
  9297. <pre class="example">zmq:tcp://ip-address:port
  9298. </pre></div>
  9299. <p>Example:
  9300. Create a localhost stream on port 5555:
  9301. </p><div class="example">
  9302. <pre class="example">ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555
  9303. </pre></div>
  9304. <p>Multiple clients may connect to the stream using:
  9305. </p><div class="example">
  9306. <pre class="example">ffplay zmq:tcp://127.0.0.1:5555
  9307. </pre></div>
  9308. <p>Streaming to multiple clients is implemented using a ZeroMQ Pub-Sub pattern.
  9309. The server side binds to a port and publishes data. Clients connect to the
  9310. server (via IP address/port) and subscribe to the stream. The order in which
  9311. the server and client start generally does not matter.
  9312. </p>
  9313. <p>ffmpeg must be compiled with the &ndash;enable-libzmq option to support
  9314. this protocol.
  9315. </p>
  9316. <p>Options can be set on the <code>ffmpeg</code>/<code>ffplay</code> command
  9317. line. The following options are supported:
  9318. </p>
  9319. <dl compact="compact">
  9320. <dt>&lsquo;<samp>pkt_size</samp>&rsquo;</dt>
  9321. <dd><p>Forces the maximum packet size for sending/receiving data. The default value is
  9322. 32,768 bytes. On the server side, this sets the maximum size of sent packets
  9323. via ZeroMQ. On the clients, it sets an internal buffer size for receiving
  9324. packets. Note that pkt_size on the clients should be equal to or greater than
  9325. pkt_size on the server. Otherwise the received message may be truncated causing
  9326. decoding errors.
  9327. </p>
  9328. </dd>
  9329. </dl>
  9330. <a name="Device-Options"></a>
  9331. <h1 class="chapter"><a href="ffplay-all.html#toc-Device-Options">17 Device Options</a></h1>
  9332. <p>The libavdevice library provides the same interface as
  9333. libavformat. Namely, an input device is considered like a demuxer, and
  9334. an output device like a muxer, and the interface and generic device
  9335. options are the same provided by libavformat (see the ffmpeg-formats
  9336. manual).
  9337. </p>
  9338. <p>In addition each input or output device may support so-called private
  9339. options, which are specific for that component.
  9340. </p>
  9341. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  9342. FFmpeg tools, or by setting the value explicitly in the device
  9343. <code>AVFormatContext</code> options or using the &lsquo;<tt>libavutil/opt.h</tt>&rsquo; API
  9344. for programmatic use.
  9345. </p>
  9346. <a name="Input-Devices"></a>
  9347. <h1 class="chapter"><a href="ffplay-all.html#toc-Input-Devices">18 Input Devices</a></h1>
  9348. <p>Input devices are configured elements in FFmpeg which enable accessing
  9349. the data coming from a multimedia device attached to your system.
  9350. </p>
  9351. <p>When you configure your FFmpeg build, all the supported input devices
  9352. are enabled by default. You can list all available ones using the
  9353. configure option &quot;&ndash;list-indevs&quot;.
  9354. </p>
  9355. <p>You can disable all the input devices using the configure option
  9356. &quot;&ndash;disable-indevs&quot;, and selectively enable an input device using the
  9357. option &quot;&ndash;enable-indev=<var>INDEV</var>&quot;, or you can disable a particular
  9358. input device using the option &quot;&ndash;disable-indev=<var>INDEV</var>&quot;.
  9359. </p>
  9360. <p>The option &quot;-devices&quot; of the ff* tools will display the list of
  9361. supported input devices.
  9362. </p>
  9363. <p>A description of the currently available input devices follows.
  9364. </p>
  9365. <a name="alsa"></a>
  9366. <h2 class="section"><a href="ffplay-all.html#toc-alsa">18.1 alsa</a></h2>
  9367. <p>ALSA (Advanced Linux Sound Architecture) input device.
  9368. </p>
  9369. <p>To enable this input device during configuration you need libasound
  9370. installed on your system.
  9371. </p>
  9372. <p>This device allows capturing from an ALSA device. The name of the
  9373. device to capture has to be an ALSA card identifier.
  9374. </p>
  9375. <p>An ALSA identifier has the syntax:
  9376. </p><div class="example">
  9377. <pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
  9378. </pre></div>
  9379. <p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
  9380. </p>
  9381. <p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
  9382. specify card number or identifier, device number and subdevice number
  9383. (-1 means any).
  9384. </p>
  9385. <p>To see the list of cards currently recognized by your system check the
  9386. files &lsquo;<tt>/proc/asound/cards</tt>&rsquo; and &lsquo;<tt>/proc/asound/devices</tt>&rsquo;.
  9387. </p>
  9388. <p>For example to capture with <code>ffmpeg</code> from an ALSA device with
  9389. card id 0, you may run the command:
  9390. </p><div class="example">
  9391. <pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
  9392. </pre></div>
  9393. <p>For more information see:
  9394. <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>
  9395. </p>
  9396. <a name="Options-10"></a>
  9397. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-10">18.1.1 Options</a></h3>
  9398. <dl compact="compact">
  9399. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  9400. <dd><p>Set the sample rate in Hz. Default is 48000.
  9401. </p>
  9402. </dd>
  9403. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  9404. <dd><p>Set the number of channels. Default is 2.
  9405. </p>
  9406. </dd>
  9407. </dl>
  9408. <a name="android_005fcamera"></a>
  9409. <h2 class="section"><a href="ffplay-all.html#toc-android_005fcamera">18.2 android_camera</a></h2>
  9410. <p>Android camera input device.
  9411. </p>
  9412. <p>This input devices uses the Android Camera2 NDK API which is
  9413. available on devices with API level 24+. The availability of
  9414. android_camera is autodetected during configuration.
  9415. </p>
  9416. <p>This device allows capturing from all cameras on an Android device,
  9417. which are integrated into the Camera2 NDK API.
  9418. </p>
  9419. <p>The available cameras are enumerated internally and can be selected
  9420. with the <var>camera_index</var> parameter. The input file string is
  9421. discarded.
  9422. </p>
  9423. <p>Generally the back facing camera has index 0 while the front facing
  9424. camera has index 1.
  9425. </p>
  9426. <a name="Options-18"></a>
  9427. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-18">18.2.1 Options</a></h3>
  9428. <dl compact="compact">
  9429. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  9430. <dd><p>Set the video size given as a string such as 640x480 or hd720.
  9431. Falls back to the first available configuration reported by
  9432. Android if requested video size is not available or by default.
  9433. </p>
  9434. </dd>
  9435. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  9436. <dd><p>Set the video framerate.
  9437. Falls back to the first available configuration reported by
  9438. Android if requested framerate is not available or by default (-1).
  9439. </p>
  9440. </dd>
  9441. <dt>&lsquo;<samp>camera_index</samp>&rsquo;</dt>
  9442. <dd><p>Set the index of the camera to use. Default is 0.
  9443. </p>
  9444. </dd>
  9445. <dt>&lsquo;<samp>input_queue_size</samp>&rsquo;</dt>
  9446. <dd><p>Set the maximum number of frames to buffer. Default is 5.
  9447. </p>
  9448. </dd>
  9449. </dl>
  9450. <a name="avfoundation"></a>
  9451. <h2 class="section"><a href="ffplay-all.html#toc-avfoundation">18.3 avfoundation</a></h2>
  9452. <p>AVFoundation input device.
  9453. </p>
  9454. <p>AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX &gt;= 10.7 as well as on iOS.
  9455. </p>
  9456. <p>The input filename has to be given in the following syntax:
  9457. </p><div class="example">
  9458. <pre class="example">-i &quot;[[VIDEO]:[AUDIO]]&quot;
  9459. </pre></div>
  9460. <p>The first entry selects the video input while the latter selects the audio input.
  9461. The stream has to be specified by the device name or the device index as shown by the device list.
  9462. Alternatively, the video and/or audio input device can be chosen by index using the
  9463. &lsquo;<samp>
  9464. -video_device_index &lt;INDEX&gt;
  9465. </samp>&rsquo;
  9466. and/or
  9467. &lsquo;<samp>
  9468. -audio_device_index &lt;INDEX&gt;
  9469. </samp>&rsquo;
  9470. , overriding any
  9471. device name or index given in the input filename.
  9472. </p>
  9473. <p>All available devices can be enumerated by using &lsquo;<samp>-list_devices true</samp>&rsquo;, listing
  9474. all device names and corresponding indices.
  9475. </p>
  9476. <p>There are two device name aliases:
  9477. </p><dl compact="compact">
  9478. <dt><code>default</code></dt>
  9479. <dd><p>Select the AVFoundation default device of the corresponding type.
  9480. </p>
  9481. </dd>
  9482. <dt><code>none</code></dt>
  9483. <dd><p>Do not record the corresponding media type.
  9484. This is equivalent to specifying an empty device name or index.
  9485. </p>
  9486. </dd>
  9487. </dl>
  9488. <a name="Options-4"></a>
  9489. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-4">18.3.1 Options</a></h3>
  9490. <p>AVFoundation supports the following options:
  9491. </p>
  9492. <dl compact="compact">
  9493. <dt>&lsquo;<samp>-list_devices &lt;TRUE|FALSE&gt;</samp>&rsquo;</dt>
  9494. <dd><p>If set to true, a list of all available input devices is given showing all
  9495. device names and indices.
  9496. </p>
  9497. </dd>
  9498. <dt>&lsquo;<samp>-video_device_index &lt;INDEX&gt;</samp>&rsquo;</dt>
  9499. <dd><p>Specify the video device by its index. Overrides anything given in the input filename.
  9500. </p>
  9501. </dd>
  9502. <dt>&lsquo;<samp>-audio_device_index &lt;INDEX&gt;</samp>&rsquo;</dt>
  9503. <dd><p>Specify the audio device by its index. Overrides anything given in the input filename.
  9504. </p>
  9505. </dd>
  9506. <dt>&lsquo;<samp>-pixel_format &lt;FORMAT&gt;</samp>&rsquo;</dt>
  9507. <dd><p>Request the video device to use a specific pixel format.
  9508. If the specified format is not supported, a list of available formats is given
  9509. and the first one in this list is used instead. Available pixel formats are:
  9510. <code>monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
  9511. bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10,
  9512. yuv420p, nv12, yuyv422, gray</code>
  9513. </p>
  9514. </dd>
  9515. <dt>&lsquo;<samp>-framerate</samp>&rsquo;</dt>
  9516. <dd><p>Set the grabbing frame rate. Default is <code>ntsc</code>, corresponding to a
  9517. frame rate of <code>30000/1001</code>.
  9518. </p>
  9519. </dd>
  9520. <dt>&lsquo;<samp>-video_size</samp>&rsquo;</dt>
  9521. <dd><p>Set the video frame size.
  9522. </p>
  9523. </dd>
  9524. <dt>&lsquo;<samp>-capture_cursor</samp>&rsquo;</dt>
  9525. <dd><p>Capture the mouse pointer. Default is 0.
  9526. </p>
  9527. </dd>
  9528. <dt>&lsquo;<samp>-capture_mouse_clicks</samp>&rsquo;</dt>
  9529. <dd><p>Capture the screen mouse clicks. Default is 0.
  9530. </p>
  9531. </dd>
  9532. <dt>&lsquo;<samp>-capture_raw_data</samp>&rsquo;</dt>
  9533. <dd><p>Capture the raw device data. Default is 0.
  9534. 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.
  9535. </p></dd>
  9536. </dl>
  9537. <a name="Examples-56"></a>
  9538. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-56">18.3.2 Examples</a></h3>
  9539. <ul>
  9540. <li>
  9541. Print the list of AVFoundation supported devices and exit:
  9542. <div class="example">
  9543. <pre class="example">$ ffmpeg -f avfoundation -list_devices true -i &quot;&quot;
  9544. </pre></div>
  9545. </li><li>
  9546. Record video from video device 0 and audio from audio device 0 into out.avi:
  9547. <div class="example">
  9548. <pre class="example">$ ffmpeg -f avfoundation -i &quot;0:0&quot; out.avi
  9549. </pre></div>
  9550. </li><li>
  9551. Record video from video device 2 and audio from audio device 1 into out.avi:
  9552. <div class="example">
  9553. <pre class="example">$ ffmpeg -f avfoundation -video_device_index 2 -i &quot;:1&quot; out.avi
  9554. </pre></div>
  9555. </li><li>
  9556. Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi:
  9557. <div class="example">
  9558. <pre class="example">$ ffmpeg -f avfoundation -pixel_format bgr0 -i &quot;default:none&quot; out.avi
  9559. </pre></div>
  9560. </li><li>
  9561. Record raw DV data from a suitable input device and write the output into out.dv:
  9562. <div class="example">
  9563. <pre class="example">$ ffmpeg -f avfoundation -capture_raw_data true -i &quot;zr100:none&quot; out.dv
  9564. </pre></div>
  9565. </li></ul>
  9566. <a name="bktr"></a>
  9567. <h2 class="section"><a href="ffplay-all.html#toc-bktr">18.4 bktr</a></h2>
  9568. <p>BSD video input device.
  9569. </p>
  9570. <a name="Options-6"></a>
  9571. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-6">18.4.1 Options</a></h3>
  9572. <dl compact="compact">
  9573. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  9574. <dd><p>Set the frame rate.
  9575. </p>
  9576. </dd>
  9577. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  9578. <dd><p>Set the video frame size. Default is <code>vga</code>.
  9579. </p>
  9580. </dd>
  9581. <dt>&lsquo;<samp>standard</samp>&rsquo;</dt>
  9582. <dd>
  9583. <p>Available values are:
  9584. </p><dl compact="compact">
  9585. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  9586. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  9587. <dt>&lsquo;<samp>secam</samp>&rsquo;</dt>
  9588. <dt>&lsquo;<samp>paln</samp>&rsquo;</dt>
  9589. <dt>&lsquo;<samp>palm</samp>&rsquo;</dt>
  9590. <dt>&lsquo;<samp>ntscj</samp>&rsquo;</dt>
  9591. </dl>
  9592. </dd>
  9593. </dl>
  9594. <a name="decklink"></a>
  9595. <h2 class="section"><a href="ffplay-all.html#toc-decklink">18.5 decklink</a></h2>
  9596. <p>The decklink input device provides capture capabilities for Blackmagic
  9597. DeckLink devices.
  9598. </p>
  9599. <p>To enable this input device, you need the Blackmagic DeckLink SDK and you
  9600. need to configure with the appropriate <code>--extra-cflags</code>
  9601. and <code>--extra-ldflags</code>.
  9602. On Windows, you need to run the IDL files through <code>widl</code>.
  9603. </p>
  9604. <p>DeckLink is very picky about the formats it supports. Pixel format of the
  9605. input can be set with &lsquo;<samp>raw_format</samp>&rsquo;.
  9606. Framerate and video size must be determined for your device with
  9607. <code>-list_formats 1</code>. Audio sample rate is always 48 kHz and the number
  9608. of channels can be 2, 8 or 16. Note that all audio channels are bundled in one single
  9609. audio track.
  9610. </p>
  9611. <a name="Options-8"></a>
  9612. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-8">18.5.1 Options</a></h3>
  9613. <dl compact="compact">
  9614. <dt>&lsquo;<samp>list_devices</samp>&rsquo;</dt>
  9615. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of devices and exit.
  9616. Defaults to &lsquo;<samp>false</samp>&rsquo;. This option is deprecated, please use the
  9617. <code>-sources</code> option of ffmpeg to list the available input devices.
  9618. </p>
  9619. </dd>
  9620. <dt>&lsquo;<samp>list_formats</samp>&rsquo;</dt>
  9621. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of supported formats and exit.
  9622. Defaults to &lsquo;<samp>false</samp>&rsquo;.
  9623. </p>
  9624. </dd>
  9625. <dt>&lsquo;<samp>format_code &lt;FourCC&gt;</samp>&rsquo;</dt>
  9626. <dd><p>This sets the input video format to the format given by the FourCC. To see
  9627. the supported values of your device(s) use &lsquo;<samp>list_formats</samp>&rsquo;.
  9628. Note that there is a FourCC &lsquo;<samp>'pal '</samp>&rsquo; that can also be used
  9629. as &lsquo;<samp>pal</samp>&rsquo; (3 letters).
  9630. Default behavior is autodetection of the input video format, if the hardware
  9631. supports it.
  9632. </p>
  9633. </dd>
  9634. <dt>&lsquo;<samp>raw_format</samp>&rsquo;</dt>
  9635. <dd><p>Set the pixel format of the captured video.
  9636. Available values are:
  9637. </p><dl compact="compact">
  9638. <dt>&lsquo;<samp>uyvy422</samp>&rsquo;</dt>
  9639. <dt>&lsquo;<samp>yuv422p10</samp>&rsquo;</dt>
  9640. <dt>&lsquo;<samp>argb</samp>&rsquo;</dt>
  9641. <dt>&lsquo;<samp>bgra</samp>&rsquo;</dt>
  9642. <dt>&lsquo;<samp>rgb10</samp>&rsquo;</dt>
  9643. </dl>
  9644. </dd>
  9645. <dt>&lsquo;<samp>teletext_lines</samp>&rsquo;</dt>
  9646. <dd><p>If set to nonzero, an additional teletext stream will be captured from the
  9647. vertical ancillary data. Both SD PAL (576i) and HD (1080i or 1080p)
  9648. sources are supported. In case of HD sources, OP47 packets are decoded.
  9649. </p>
  9650. <p>This option is a bitmask of the SD PAL VBI lines captured, specifically lines 6
  9651. to 22, and lines 318 to 335. Line 6 is the LSB in the mask. Selected lines
  9652. which do not contain teletext information will be ignored. You can use the
  9653. special &lsquo;<samp>all</samp>&rsquo; constant to select all possible lines, or
  9654. &lsquo;<samp>standard</samp>&rsquo; to skip lines 6, 318 and 319, which are not compatible with
  9655. all receivers.
  9656. </p>
  9657. <p>For SD sources, ffmpeg needs to be compiled with <code>--enable-libzvbi</code>. For
  9658. HD sources, on older (pre-4K) DeckLink card models you have to capture in 10
  9659. bit mode.
  9660. </p>
  9661. </dd>
  9662. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  9663. <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;.
  9664. Defaults to &lsquo;<samp>2</samp>&rsquo;.
  9665. </p>
  9666. </dd>
  9667. <dt>&lsquo;<samp>duplex_mode</samp>&rsquo;</dt>
  9668. <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;.
  9669. Defaults to &lsquo;<samp>unset</samp>&rsquo;.
  9670. </p>
  9671. </dd>
  9672. <dt>&lsquo;<samp>timecode_format</samp>&rsquo;</dt>
  9673. <dd><p>Timecode type to include in the frame and video stream metadata. Must be
  9674. &lsquo;<samp>none</samp>&rsquo;, &lsquo;<samp>rp188vitc</samp>&rsquo;, &lsquo;<samp>rp188vitc2</samp>&rsquo;, &lsquo;<samp>rp188ltc</samp>&rsquo;,
  9675. &lsquo;<samp>rp188any</samp>&rsquo;, &lsquo;<samp>vitc</samp>&rsquo;, &lsquo;<samp>vitc2</samp>&rsquo;, or &lsquo;<samp>serial</samp>&rsquo;. Defaults to
  9676. &lsquo;<samp>none</samp>&rsquo; (not included).
  9677. </p>
  9678. </dd>
  9679. <dt>&lsquo;<samp>video_input</samp>&rsquo;</dt>
  9680. <dd><p>Sets the video input source. Must be &lsquo;<samp>unset</samp>&rsquo;, &lsquo;<samp>sdi</samp>&rsquo;, &lsquo;<samp>hdmi</samp>&rsquo;,
  9681. &lsquo;<samp>optical_sdi</samp>&rsquo;, &lsquo;<samp>component</samp>&rsquo;, &lsquo;<samp>composite</samp>&rsquo; or &lsquo;<samp>s_video</samp>&rsquo;.
  9682. Defaults to &lsquo;<samp>unset</samp>&rsquo;.
  9683. </p>
  9684. </dd>
  9685. <dt>&lsquo;<samp>audio_input</samp>&rsquo;</dt>
  9686. <dd><p>Sets the audio input source. Must be &lsquo;<samp>unset</samp>&rsquo;, &lsquo;<samp>embedded</samp>&rsquo;,
  9687. &lsquo;<samp>aes_ebu</samp>&rsquo;, &lsquo;<samp>analog</samp>&rsquo;, &lsquo;<samp>analog_xlr</samp>&rsquo;, &lsquo;<samp>analog_rca</samp>&rsquo; or
  9688. &lsquo;<samp>microphone</samp>&rsquo;. Defaults to &lsquo;<samp>unset</samp>&rsquo;.
  9689. </p>
  9690. </dd>
  9691. <dt>&lsquo;<samp>video_pts</samp>&rsquo;</dt>
  9692. <dd><p>Sets the video packet timestamp source. Must be &lsquo;<samp>video</samp>&rsquo;, &lsquo;<samp>audio</samp>&rsquo;,
  9693. &lsquo;<samp>reference</samp>&rsquo;, &lsquo;<samp>wallclock</samp>&rsquo; or &lsquo;<samp>abs_wallclock</samp>&rsquo;.
  9694. Defaults to &lsquo;<samp>video</samp>&rsquo;.
  9695. </p>
  9696. </dd>
  9697. <dt>&lsquo;<samp>audio_pts</samp>&rsquo;</dt>
  9698. <dd><p>Sets the audio packet timestamp source. Must be &lsquo;<samp>video</samp>&rsquo;, &lsquo;<samp>audio</samp>&rsquo;,
  9699. &lsquo;<samp>reference</samp>&rsquo;, &lsquo;<samp>wallclock</samp>&rsquo; or &lsquo;<samp>abs_wallclock</samp>&rsquo;.
  9700. Defaults to &lsquo;<samp>audio</samp>&rsquo;.
  9701. </p>
  9702. </dd>
  9703. <dt>&lsquo;<samp>draw_bars</samp>&rsquo;</dt>
  9704. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, color bars are drawn in the event of a signal loss.
  9705. Defaults to &lsquo;<samp>true</samp>&rsquo;.
  9706. </p>
  9707. </dd>
  9708. <dt>&lsquo;<samp>queue_size</samp>&rsquo;</dt>
  9709. <dd><p>Sets maximum input buffer size in bytes. If the buffering reaches this value,
  9710. incoming frames will be dropped.
  9711. Defaults to &lsquo;<samp>1073741824</samp>&rsquo;.
  9712. </p>
  9713. </dd>
  9714. <dt>&lsquo;<samp>audio_depth</samp>&rsquo;</dt>
  9715. <dd><p>Sets the audio sample bit depth. Must be &lsquo;<samp>16</samp>&rsquo; or &lsquo;<samp>32</samp>&rsquo;.
  9716. Defaults to &lsquo;<samp>16</samp>&rsquo;.
  9717. </p>
  9718. </dd>
  9719. <dt>&lsquo;<samp>decklink_copyts</samp>&rsquo;</dt>
  9720. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, timestamps are forwarded as they are without removing
  9721. the initial offset.
  9722. Defaults to &lsquo;<samp>false</samp>&rsquo;.
  9723. </p>
  9724. </dd>
  9725. <dt>&lsquo;<samp>timestamp_align</samp>&rsquo;</dt>
  9726. <dd><p>Capture start time alignment in seconds. If set to nonzero, input frames are
  9727. dropped till the system timestamp aligns with configured value.
  9728. Alignment difference of up to one frame duration is tolerated.
  9729. This is useful for maintaining input synchronization across N different
  9730. hardware devices deployed for &rsquo;N-way&rsquo; redundancy. The system time of different
  9731. hardware devices should be synchronized with protocols such as NTP or PTP,
  9732. before using this option.
  9733. Note that this method is not foolproof. In some border cases input
  9734. synchronization may not happen due to thread scheduling jitters in the OS.
  9735. Either sync could go wrong by 1 frame or in a rarer case
  9736. &lsquo;<samp>timestamp_align</samp>&rsquo; seconds.
  9737. Defaults to &lsquo;<samp>0</samp>&rsquo;.
  9738. </p>
  9739. </dd>
  9740. <dt>&lsquo;<samp>wait_for_tc (<em>bool</em>)</samp>&rsquo;</dt>
  9741. <dd><p>Drop frames till a frame with timecode is received. Sometimes serial timecode
  9742. isn&rsquo;t received with the first input frame. If that happens, the stored stream
  9743. timecode will be inaccurate. If this option is set to &lsquo;<samp>true</samp>&rsquo;, input frames
  9744. are dropped till a frame with timecode is received.
  9745. Option <var>timecode_format</var> must be specified.
  9746. Defaults to &lsquo;<samp>false</samp>&rsquo;.
  9747. </p>
  9748. </dd>
  9749. </dl>
  9750. <a name="Examples-39"></a>
  9751. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-39">18.5.2 Examples</a></h3>
  9752. <ul>
  9753. <li>
  9754. List input devices:
  9755. <div class="example">
  9756. <pre class="example">ffmpeg -sources decklink
  9757. </pre></div>
  9758. </li><li>
  9759. List supported formats:
  9760. <div class="example">
  9761. <pre class="example">ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
  9762. </pre></div>
  9763. </li><li>
  9764. Capture video clip at 1080i50:
  9765. <div class="example">
  9766. <pre class="example">ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi
  9767. </pre></div>
  9768. </li><li>
  9769. Capture video clip at 1080i50 10 bit:
  9770. <div class="example">
  9771. <pre class="example">ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
  9772. </pre></div>
  9773. </li><li>
  9774. Capture video clip at 1080i50 with 16 audio channels:
  9775. <div class="example">
  9776. <pre class="example">ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
  9777. </pre></div>
  9778. </li></ul>
  9779. <a name="dshow"></a>
  9780. <h2 class="section"><a href="ffplay-all.html#toc-dshow">18.6 dshow</a></h2>
  9781. <p>Windows DirectShow input device.
  9782. </p>
  9783. <p>DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
  9784. Currently only audio and video devices are supported.
  9785. </p>
  9786. <p>Multiple devices may be opened as separate inputs, but they may also be
  9787. opened on the same input, which should improve synchronism between them.
  9788. </p>
  9789. <p>The input name should be in the format:
  9790. </p>
  9791. <div class="example">
  9792. <pre class="example"><var>TYPE</var>=<var>NAME</var>[:<var>TYPE</var>=<var>NAME</var>]
  9793. </pre></div>
  9794. <p>where <var>TYPE</var> can be either <var>audio</var> or <var>video</var>,
  9795. and <var>NAME</var> is the device&rsquo;s name or alternative name..
  9796. </p>
  9797. <a name="Options-29"></a>
  9798. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-29">18.6.1 Options</a></h3>
  9799. <p>If no options are specified, the device&rsquo;s defaults are used.
  9800. If the device does not support the requested options, it will
  9801. fail to open.
  9802. </p>
  9803. <dl compact="compact">
  9804. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  9805. <dd><p>Set the video size in the captured video.
  9806. </p>
  9807. </dd>
  9808. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  9809. <dd><p>Set the frame rate in the captured video.
  9810. </p>
  9811. </dd>
  9812. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  9813. <dd><p>Set the sample rate (in Hz) of the captured audio.
  9814. </p>
  9815. </dd>
  9816. <dt>&lsquo;<samp>sample_size</samp>&rsquo;</dt>
  9817. <dd><p>Set the sample size (in bits) of the captured audio.
  9818. </p>
  9819. </dd>
  9820. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  9821. <dd><p>Set the number of channels in the captured audio.
  9822. </p>
  9823. </dd>
  9824. <dt>&lsquo;<samp>list_devices</samp>&rsquo;</dt>
  9825. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of devices and exit.
  9826. </p>
  9827. </dd>
  9828. <dt>&lsquo;<samp>list_options</samp>&rsquo;</dt>
  9829. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of selected device&rsquo;s options
  9830. and exit.
  9831. </p>
  9832. </dd>
  9833. <dt>&lsquo;<samp>video_device_number</samp>&rsquo;</dt>
  9834. <dd><p>Set video device number for devices with the same name (starts at 0,
  9835. defaults to 0).
  9836. </p>
  9837. </dd>
  9838. <dt>&lsquo;<samp>audio_device_number</samp>&rsquo;</dt>
  9839. <dd><p>Set audio device number for devices with the same name (starts at 0,
  9840. defaults to 0).
  9841. </p>
  9842. </dd>
  9843. <dt>&lsquo;<samp>pixel_format</samp>&rsquo;</dt>
  9844. <dd><p>Select pixel format to be used by DirectShow. This may only be set when
  9845. the video codec is not set or set to rawvideo.
  9846. </p>
  9847. </dd>
  9848. <dt>&lsquo;<samp>audio_buffer_size</samp>&rsquo;</dt>
  9849. <dd><p>Set audio device buffer size in milliseconds (which can directly
  9850. impact latency, depending on the device).
  9851. Defaults to using the audio device&rsquo;s
  9852. default buffer size (typically some multiple of 500ms).
  9853. Setting this value too low can degrade performance.
  9854. See also
  9855. <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>
  9856. </p>
  9857. </dd>
  9858. <dt>&lsquo;<samp>video_pin_name</samp>&rsquo;</dt>
  9859. <dd><p>Select video capture pin to use by name or alternative name.
  9860. </p>
  9861. </dd>
  9862. <dt>&lsquo;<samp>audio_pin_name</samp>&rsquo;</dt>
  9863. <dd><p>Select audio capture pin to use by name or alternative name.
  9864. </p>
  9865. </dd>
  9866. <dt>&lsquo;<samp>crossbar_video_input_pin_number</samp>&rsquo;</dt>
  9867. <dd><p>Select video input pin number for crossbar device. This will be
  9868. routed to the crossbar device&rsquo;s Video Decoder output pin.
  9869. Note that changing this value can affect future invocations
  9870. (sets a new default) until system reboot occurs.
  9871. </p>
  9872. </dd>
  9873. <dt>&lsquo;<samp>crossbar_audio_input_pin_number</samp>&rsquo;</dt>
  9874. <dd><p>Select audio input pin number for crossbar device. This will be
  9875. routed to the crossbar device&rsquo;s Audio Decoder output pin.
  9876. Note that changing this value can affect future invocations
  9877. (sets a new default) until system reboot occurs.
  9878. </p>
  9879. </dd>
  9880. <dt>&lsquo;<samp>show_video_device_dialog</samp>&rsquo;</dt>
  9881. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, before capture starts, popup a display dialog
  9882. to the end user, allowing them to change video filter properties
  9883. and configurations manually.
  9884. Note that for crossbar devices, adjusting values in this dialog
  9885. may be needed at times to toggle between PAL (25 fps) and NTSC (29.97)
  9886. input frame rates, sizes, interlacing, etc. Changing these values can
  9887. enable different scan rates/frame rates and avoiding green bars at
  9888. the bottom, flickering scan lines, etc.
  9889. Note that with some devices, changing these properties can also affect future
  9890. invocations (sets new defaults) until system reboot occurs.
  9891. </p>
  9892. </dd>
  9893. <dt>&lsquo;<samp>show_audio_device_dialog</samp>&rsquo;</dt>
  9894. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, before capture starts, popup a display dialog
  9895. to the end user, allowing them to change audio filter properties
  9896. and configurations manually.
  9897. </p>
  9898. </dd>
  9899. <dt>&lsquo;<samp>show_video_crossbar_connection_dialog</samp>&rsquo;</dt>
  9900. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, before capture starts, popup a display
  9901. dialog to the end user, allowing them to manually
  9902. modify crossbar pin routings, when it opens a video device.
  9903. </p>
  9904. </dd>
  9905. <dt>&lsquo;<samp>show_audio_crossbar_connection_dialog</samp>&rsquo;</dt>
  9906. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, before capture starts, popup a display
  9907. dialog to the end user, allowing them to manually
  9908. modify crossbar pin routings, when it opens an audio device.
  9909. </p>
  9910. </dd>
  9911. <dt>&lsquo;<samp>show_analog_tv_tuner_dialog</samp>&rsquo;</dt>
  9912. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, before capture starts, popup a display
  9913. dialog to the end user, allowing them to manually
  9914. modify TV channels and frequencies.
  9915. </p>
  9916. </dd>
  9917. <dt>&lsquo;<samp>show_analog_tv_tuner_audio_dialog</samp>&rsquo;</dt>
  9918. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, before capture starts, popup a display
  9919. dialog to the end user, allowing them to manually
  9920. modify TV audio (like mono vs. stereo, Language A,B or C).
  9921. </p>
  9922. </dd>
  9923. <dt>&lsquo;<samp>audio_device_load</samp>&rsquo;</dt>
  9924. <dd><p>Load an audio capture filter device from file instead of searching
  9925. it by name. It may load additional parameters too, if the filter
  9926. supports the serialization of its properties to.
  9927. To use this an audio capture source has to be specified, but it can
  9928. be anything even fake one.
  9929. </p>
  9930. </dd>
  9931. <dt>&lsquo;<samp>audio_device_save</samp>&rsquo;</dt>
  9932. <dd><p>Save the currently used audio capture filter device and its
  9933. parameters (if the filter supports it) to a file.
  9934. If a file with the same name exists it will be overwritten.
  9935. </p>
  9936. </dd>
  9937. <dt>&lsquo;<samp>video_device_load</samp>&rsquo;</dt>
  9938. <dd><p>Load a video capture filter device from file instead of searching
  9939. it by name. It may load additional parameters too, if the filter
  9940. supports the serialization of its properties to.
  9941. To use this a video capture source has to be specified, but it can
  9942. be anything even fake one.
  9943. </p>
  9944. </dd>
  9945. <dt>&lsquo;<samp>video_device_save</samp>&rsquo;</dt>
  9946. <dd><p>Save the currently used video capture filter device and its
  9947. parameters (if the filter supports it) to a file.
  9948. If a file with the same name exists it will be overwritten.
  9949. </p>
  9950. </dd>
  9951. </dl>
  9952. <a name="Examples-115"></a>
  9953. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-115">18.6.2 Examples</a></h3>
  9954. <ul>
  9955. <li>
  9956. Print the list of DirectShow supported devices and exit:
  9957. <div class="example">
  9958. <pre class="example">$ ffmpeg -list_devices true -f dshow -i dummy
  9959. </pre></div>
  9960. </li><li>
  9961. Open video device <var>Camera</var>:
  9962. <div class="example">
  9963. <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;
  9964. </pre></div>
  9965. </li><li>
  9966. Open second video device with name <var>Camera</var>:
  9967. <div class="example">
  9968. <pre class="example">$ ffmpeg -f dshow -video_device_number 1 -i video=&quot;Camera&quot;
  9969. </pre></div>
  9970. </li><li>
  9971. Open video device <var>Camera</var> and audio device <var>Microphone</var>:
  9972. <div class="example">
  9973. <pre class="example">$ ffmpeg -f dshow -i video=&quot;Camera&quot;:audio=&quot;Microphone&quot;
  9974. </pre></div>
  9975. </li><li>
  9976. Print the list of supported options in selected device and exit:
  9977. <div class="example">
  9978. <pre class="example">$ ffmpeg -list_options true -f dshow -i video=&quot;Camera&quot;
  9979. </pre></div>
  9980. </li><li>
  9981. Specify pin names to capture by name or alternative name, specify alternative device name:
  9982. <div class="example">
  9983. <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;
  9984. </pre></div>
  9985. </li><li>
  9986. Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup:
  9987. <div class="example">
  9988. <pre class="example">$ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
  9989. -crossbar_audio_input_pin_number 3 -i video=&quot;AVerMedia BDA Analog Capture&quot;:audio=&quot;AVerMedia BDA Analog Capture&quot;
  9990. </pre></div>
  9991. </li></ul>
  9992. <a name="fbdev"></a>
  9993. <h2 class="section"><a href="ffplay-all.html#toc-fbdev">18.7 fbdev</a></h2>
  9994. <p>Linux framebuffer input device.
  9995. </p>
  9996. <p>The Linux framebuffer is a graphic hardware-independent abstraction
  9997. layer to show graphics on a computer monitor, typically on the
  9998. console. It is accessed through a file device node, usually
  9999. &lsquo;<tt>/dev/fb0</tt>&rsquo;.
  10000. </p>
  10001. <p>For more detailed information read the file
  10002. Documentation/fb/framebuffer.txt included in the Linux source tree.
  10003. </p>
  10004. <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
  10005. </p>
  10006. <p>To record from the framebuffer device &lsquo;<tt>/dev/fb0</tt>&rsquo; with
  10007. <code>ffmpeg</code>:
  10008. </p><div class="example">
  10009. <pre class="example">ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
  10010. </pre></div>
  10011. <p>You can take a single screenshot image with the command:
  10012. </p><div class="example">
  10013. <pre class="example">ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
  10014. </pre></div>
  10015. <a name="Options-30"></a>
  10016. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-30">18.7.1 Options</a></h3>
  10017. <dl compact="compact">
  10018. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  10019. <dd><p>Set the frame rate. Default is 25.
  10020. </p>
  10021. </dd>
  10022. </dl>
  10023. <a name="gdigrab"></a>
  10024. <h2 class="section"><a href="ffplay-all.html#toc-gdigrab">18.8 gdigrab</a></h2>
  10025. <p>Win32 GDI-based screen capture device.
  10026. </p>
  10027. <p>This device allows you to capture a region of the display on Windows.
  10028. </p>
  10029. <p>There are two options for the input filename:
  10030. </p><div class="example">
  10031. <pre class="example">desktop
  10032. </pre></div>
  10033. <p>or
  10034. </p><div class="example">
  10035. <pre class="example">title=<var>window_title</var>
  10036. </pre></div>
  10037. <p>The first option will capture the entire desktop, or a fixed region of the
  10038. desktop. The second option will instead capture the contents of a single
  10039. window, regardless of its position on the screen.
  10040. </p>
  10041. <p>For example, to grab the entire desktop using <code>ffmpeg</code>:
  10042. </p><div class="example">
  10043. <pre class="example">ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
  10044. </pre></div>
  10045. <p>Grab a 640x480 region at position <code>10,20</code>:
  10046. </p><div class="example">
  10047. <pre class="example">ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
  10048. </pre></div>
  10049. <p>Grab the contents of the window named &quot;Calculator&quot;
  10050. </p><div class="example">
  10051. <pre class="example">ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
  10052. </pre></div>
  10053. <a name="Options-15"></a>
  10054. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-15">18.8.1 Options</a></h3>
  10055. <dl compact="compact">
  10056. <dt>&lsquo;<samp>draw_mouse</samp>&rsquo;</dt>
  10057. <dd><p>Specify whether to draw the mouse pointer. Use the value <code>0</code> to
  10058. not draw the pointer. Default value is <code>1</code>.
  10059. </p>
  10060. </dd>
  10061. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  10062. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  10063. corresponding to a frame rate of <code>30000/1001</code>.
  10064. </p>
  10065. </dd>
  10066. <dt>&lsquo;<samp>show_region</samp>&rsquo;</dt>
  10067. <dd><p>Show grabbed region on screen.
  10068. </p>
  10069. <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
  10070. region will be indicated on screen. With this option, it is easy to
  10071. know what is being grabbed if only a portion of the screen is grabbed.
  10072. </p>
  10073. <p>Note that <var>show_region</var> is incompatible with grabbing the contents
  10074. of a single window.
  10075. </p>
  10076. <p>For example:
  10077. </p><div class="example">
  10078. <pre class="example">ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
  10079. </pre></div>
  10080. </dd>
  10081. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  10082. <dd><p>Set the video frame size. The default is to capture the full screen if &lsquo;<tt>desktop</tt>&rsquo; is selected, or the full window size if &lsquo;<tt>title=<var>window_title</var></tt>&rsquo; is selected.
  10083. </p>
  10084. </dd>
  10085. <dt>&lsquo;<samp>offset_x</samp>&rsquo;</dt>
  10086. <dd><p>When capturing a region with <var>video_size</var>, set the distance from the left edge of the screen or desktop.
  10087. </p>
  10088. <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.
  10089. </p>
  10090. </dd>
  10091. <dt>&lsquo;<samp>offset_y</samp>&rsquo;</dt>
  10092. <dd><p>When capturing a region with <var>video_size</var>, set the distance from the top edge of the screen or desktop.
  10093. </p>
  10094. <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.
  10095. </p>
  10096. </dd>
  10097. </dl>
  10098. <a name="iec61883"></a>
  10099. <h2 class="section"><a href="ffplay-all.html#toc-iec61883">18.9 iec61883</a></h2>
  10100. <p>FireWire DV/HDV input device using libiec61883.
  10101. </p>
  10102. <p>To enable this input device, you need libiec61883, libraw1394 and
  10103. libavc1394 installed on your system. Use the configure option
  10104. <code>--enable-libiec61883</code> to compile with the device enabled.
  10105. </p>
  10106. <p>The iec61883 capture device supports capturing from a video device
  10107. connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
  10108. FireWire stack (juju). This is the default DV/HDV input method in Linux
  10109. Kernel 2.6.37 and later, since the old FireWire stack was removed.
  10110. </p>
  10111. <p>Specify the FireWire port to be used as input file, or &quot;auto&quot;
  10112. to choose the first port connected.
  10113. </p>
  10114. <a name="Options-9"></a>
  10115. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-9">18.9.1 Options</a></h3>
  10116. <dl compact="compact">
  10117. <dt>&lsquo;<samp>dvtype</samp>&rsquo;</dt>
  10118. <dd><p>Override autodetection of DV/HDV. This should only be used if auto
  10119. detection does not work, or if usage of a different device type
  10120. should be prohibited. Treating a DV device as HDV (or vice versa) will
  10121. not work and result in undefined behavior.
  10122. The values &lsquo;<samp>auto</samp>&rsquo;, &lsquo;<samp>dv</samp>&rsquo; and &lsquo;<samp>hdv</samp>&rsquo; are supported.
  10123. </p>
  10124. </dd>
  10125. <dt>&lsquo;<samp>dvbuffer</samp>&rsquo;</dt>
  10126. <dd><p>Set maximum size of buffer for incoming data, in frames. For DV, this
  10127. is an exact value. For HDV, it is not frame exact, since HDV does
  10128. not have a fixed frame size.
  10129. </p>
  10130. </dd>
  10131. <dt>&lsquo;<samp>dvguid</samp>&rsquo;</dt>
  10132. <dd><p>Select the capture device by specifying its GUID. Capturing will only
  10133. be performed from the specified device and fails if no device with the
  10134. given GUID is found. This is useful to select the input if multiple
  10135. devices are connected at the same time.
  10136. Look at /sys/bus/firewire/devices to find out the GUIDs.
  10137. </p>
  10138. </dd>
  10139. </dl>
  10140. <a name="Examples-50"></a>
  10141. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-50">18.9.2 Examples</a></h3>
  10142. <ul>
  10143. <li>
  10144. Grab and show the input of a FireWire DV/HDV device.
  10145. <div class="example">
  10146. <pre class="example">ffplay -f iec61883 -i auto
  10147. </pre></div>
  10148. </li><li>
  10149. Grab and record the input of a FireWire DV/HDV device,
  10150. using a packet buffer of 100000 packets if the source is HDV.
  10151. <div class="example">
  10152. <pre class="example">ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
  10153. </pre></div>
  10154. </li></ul>
  10155. <a name="jack"></a>
  10156. <h2 class="section"><a href="ffplay-all.html#toc-jack">18.10 jack</a></h2>
  10157. <p>JACK input device.
  10158. </p>
  10159. <p>To enable this input device during configuration you need libjack
  10160. installed on your system.
  10161. </p>
  10162. <p>A JACK input device creates one or more JACK writable clients, one for
  10163. each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
  10164. <var>client_name</var> is the name provided by the application, and <var>N</var>
  10165. is a number which identifies the channel.
  10166. Each writable client will send the acquired data to the FFmpeg input
  10167. device.
  10168. </p>
  10169. <p>Once you have created one or more JACK readable clients, you need to
  10170. connect them to one or more JACK writable clients.
  10171. </p>
  10172. <p>To connect or disconnect JACK clients you can use the <code>jack_connect</code>
  10173. and <code>jack_disconnect</code> programs, or do it through a graphical interface,
  10174. for example with <code>qjackctl</code>.
  10175. </p>
  10176. <p>To list the JACK clients and their properties you can invoke the command
  10177. <code>jack_lsp</code>.
  10178. </p>
  10179. <p>Follows an example which shows how to capture a JACK readable client
  10180. with <code>ffmpeg</code>.
  10181. </p><div class="example">
  10182. <pre class="example"># Create a JACK writable client with name &quot;ffmpeg&quot;.
  10183. $ ffmpeg -f jack -i ffmpeg -y out.wav
  10184. # Start the sample jack_metro readable client.
  10185. $ jack_metro -b 120 -d 0.2 -f 4000
  10186. # List the current JACK clients.
  10187. $ jack_lsp -c
  10188. system:capture_1
  10189. system:capture_2
  10190. system:playback_1
  10191. system:playback_2
  10192. ffmpeg:input_1
  10193. metro:120_bpm
  10194. # Connect metro to the ffmpeg writable client.
  10195. $ jack_connect metro:120_bpm ffmpeg:input_1
  10196. </pre></div>
  10197. <p>For more information read:
  10198. <a href="http://jackaudio.org/">http://jackaudio.org/</a>
  10199. </p>
  10200. <a name="Options-25"></a>
  10201. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-25">18.10.1 Options</a></h3>
  10202. <dl compact="compact">
  10203. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  10204. <dd><p>Set the number of channels. Default is 2.
  10205. </p>
  10206. </dd>
  10207. </dl>
  10208. <a name="kmsgrab"></a>
  10209. <h2 class="section"><a href="ffplay-all.html#toc-kmsgrab">18.11 kmsgrab</a></h2>
  10210. <p>KMS video input device.
  10211. </p>
  10212. <p>Captures the KMS scanout framebuffer associated with a specified CRTC or plane as a
  10213. DRM object that can be passed to other hardware functions.
  10214. </p>
  10215. <p>Requires either DRM master or CAP_SYS_ADMIN to run.
  10216. </p>
  10217. <p>If you don&rsquo;t understand what all of that means, you probably don&rsquo;t want this. Look at
  10218. &lsquo;<samp>x11grab</samp>&rsquo; instead.
  10219. </p>
  10220. <a name="Options-23"></a>
  10221. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-23">18.11.1 Options</a></h3>
  10222. <dl compact="compact">
  10223. <dt>&lsquo;<samp>device</samp>&rsquo;</dt>
  10224. <dd><p>DRM device to capture on. Defaults to &lsquo;<samp>/dev/dri/card0</samp>&rsquo;.
  10225. </p>
  10226. </dd>
  10227. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  10228. <dd><p>Pixel format of the framebuffer. Defaults to &lsquo;<samp>bgr0</samp>&rsquo;.
  10229. </p>
  10230. </dd>
  10231. <dt>&lsquo;<samp>format_modifier</samp>&rsquo;</dt>
  10232. <dd><p>Format modifier to signal on output frames. This is necessary to import correctly into
  10233. some APIs, but can&rsquo;t be autodetected. See the libdrm documentation for possible values.
  10234. </p>
  10235. </dd>
  10236. <dt>&lsquo;<samp>crtc_id</samp>&rsquo;</dt>
  10237. <dd><p>KMS CRTC ID to define the capture source. The first active plane on the given CRTC
  10238. will be used.
  10239. </p>
  10240. </dd>
  10241. <dt>&lsquo;<samp>plane_id</samp>&rsquo;</dt>
  10242. <dd><p>KMS plane ID to define the capture source. Defaults to the first active plane found if
  10243. neither &lsquo;<samp>crtc_id</samp>&rsquo; nor &lsquo;<samp>plane_id</samp>&rsquo; are specified.
  10244. </p>
  10245. </dd>
  10246. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  10247. <dd><p>Framerate to capture at. This is not synchronised to any page flipping or framebuffer
  10248. changes - it just defines the interval at which the framebuffer is sampled. Sampling
  10249. faster than the framebuffer update rate will generate independent frames with the same
  10250. content. Defaults to <code>30</code>.
  10251. </p>
  10252. </dd>
  10253. </dl>
  10254. <a name="Examples-62"></a>
  10255. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-62">18.11.2 Examples</a></h3>
  10256. <ul>
  10257. <li>
  10258. Capture from the first active plane, download the result to normal frames and encode.
  10259. This will only work if the framebuffer is both linear and mappable - if not, the result
  10260. may be scrambled or fail to download.
  10261. <div class="example">
  10262. <pre class="example">ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
  10263. </pre></div>
  10264. </li><li>
  10265. Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and encode as H.264.
  10266. <div class="example">
  10267. <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
  10268. </pre></div>
  10269. </li><li>
  10270. To capture only part of a plane the output can be cropped - this can be used to capture
  10271. a single window, as long as it has a known absolute position and size. For example, to
  10272. capture and encode the middle quarter of a 1920x1080 plane:
  10273. <div class="example">
  10274. <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
  10275. </pre></div>
  10276. </li></ul>
  10277. <a name="lavfi"></a>
  10278. <h2 class="section"><a href="ffplay-all.html#toc-lavfi">18.12 lavfi</a></h2>
  10279. <p>Libavfilter input virtual device.
  10280. </p>
  10281. <p>This input device reads data from the open output pads of a libavfilter
  10282. filtergraph.
  10283. </p>
  10284. <p>For each filtergraph open output, the input device will create a
  10285. corresponding stream which is mapped to the generated output. Currently
  10286. only video data is supported. The filtergraph is specified through the
  10287. option &lsquo;<samp>graph</samp>&rsquo;.
  10288. </p>
  10289. <a name="Options-21"></a>
  10290. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-21">18.12.1 Options</a></h3>
  10291. <dl compact="compact">
  10292. <dt>&lsquo;<samp>graph</samp>&rsquo;</dt>
  10293. <dd><p>Specify the filtergraph to use as input. Each video open output must be
  10294. labelled by a unique string of the form &quot;out<var>N</var>&quot;, where <var>N</var> is a
  10295. number starting from 0 corresponding to the mapped input stream
  10296. generated by the device.
  10297. The first unlabelled output is automatically assigned to the &quot;out0&quot;
  10298. label, but all the others need to be specified explicitly.
  10299. </p>
  10300. <p>The suffix &quot;+subcc&quot; can be appended to the output label to create an extra
  10301. stream with the closed captions packets attached to that output
  10302. (experimental; only for EIA-608 / CEA-708 for now).
  10303. The subcc streams are created after all the normal streams, in the order of
  10304. the corresponding stream.
  10305. For example, if there is &quot;out19+subcc&quot;, &quot;out7+subcc&quot; and up to &quot;out42&quot;, the
  10306. stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19.
  10307. </p>
  10308. <p>If not specified defaults to the filename specified for the input
  10309. device.
  10310. </p>
  10311. </dd>
  10312. <dt>&lsquo;<samp>graph_file</samp>&rsquo;</dt>
  10313. <dd><p>Set the filename of the filtergraph to be read and sent to the other
  10314. filters. Syntax of the filtergraph is the same as the one specified by
  10315. the option <var>graph</var>.
  10316. </p>
  10317. </dd>
  10318. <dt>&lsquo;<samp>dumpgraph</samp>&rsquo;</dt>
  10319. <dd><p>Dump graph to stderr.
  10320. </p>
  10321. </dd>
  10322. </dl>
  10323. <a name="Examples-72"></a>
  10324. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-72">18.12.2 Examples</a></h3>
  10325. <ul>
  10326. <li>
  10327. Create a color video stream and play it back with <code>ffplay</code>:
  10328. <div class="example">
  10329. <pre class="example">ffplay -f lavfi -graph &quot;color=c=pink [out0]&quot; dummy
  10330. </pre></div>
  10331. </li><li>
  10332. As the previous example, but use filename for specifying the graph
  10333. description, and omit the &quot;out0&quot; label:
  10334. <div class="example">
  10335. <pre class="example">ffplay -f lavfi color=c=pink
  10336. </pre></div>
  10337. </li><li>
  10338. Create three different video test filtered sources and play them:
  10339. <div class="example">
  10340. <pre class="example">ffplay -f lavfi -graph &quot;testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]&quot; test3
  10341. </pre></div>
  10342. </li><li>
  10343. Read an audio stream from a file using the amovie source and play it
  10344. back with <code>ffplay</code>:
  10345. <div class="example">
  10346. <pre class="example">ffplay -f lavfi &quot;amovie=test.wav&quot;
  10347. </pre></div>
  10348. </li><li>
  10349. Read an audio stream and a video stream and play it back with
  10350. <code>ffplay</code>:
  10351. <div class="example">
  10352. <pre class="example">ffplay -f lavfi &quot;movie=test.avi[out0];amovie=test.wav[out1]&quot;
  10353. </pre></div>
  10354. </li><li>
  10355. Dump decoded frames to images and closed captions to a file (experimental):
  10356. <div class="example">
  10357. <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
  10358. </pre></div>
  10359. </li></ul>
  10360. <a name="libcdio"></a>
  10361. <h2 class="section"><a href="ffplay-all.html#toc-libcdio">18.13 libcdio</a></h2>
  10362. <p>Audio-CD input device based on libcdio.
  10363. </p>
  10364. <p>To enable this input device during configuration you need libcdio
  10365. installed on your system. It requires the configure option
  10366. <code>--enable-libcdio</code>.
  10367. </p>
  10368. <p>This device allows playing and grabbing from an Audio-CD.
  10369. </p>
  10370. <p>For example to copy with <code>ffmpeg</code> the entire Audio-CD in &lsquo;<tt>/dev/sr0</tt>&rsquo;,
  10371. you may run the command:
  10372. </p><div class="example">
  10373. <pre class="example">ffmpeg -f libcdio -i /dev/sr0 cd.wav
  10374. </pre></div>
  10375. <a name="Options"></a>
  10376. <h3 class="subsection"><a href="ffplay-all.html#toc-Options">18.13.1 Options</a></h3>
  10377. <dl compact="compact">
  10378. <dt>&lsquo;<samp>speed</samp>&rsquo;</dt>
  10379. <dd><p>Set drive reading speed. Default value is 0.
  10380. </p>
  10381. <p>The speed is specified CD-ROM speed units. The speed is set through
  10382. the libcdio <code>cdio_cddap_speed_set</code> function. On many CD-ROM
  10383. drives, specifying a value too large will result in using the fastest
  10384. speed.
  10385. </p>
  10386. </dd>
  10387. <dt>&lsquo;<samp>paranoia_mode</samp>&rsquo;</dt>
  10388. <dd><p>Set paranoia recovery mode flags. It accepts one of the following values:
  10389. </p>
  10390. <dl compact="compact">
  10391. <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
  10392. <dt>&lsquo;<samp>verify</samp>&rsquo;</dt>
  10393. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  10394. <dt>&lsquo;<samp>neverskip</samp>&rsquo;</dt>
  10395. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  10396. </dl>
  10397. <p>Default value is &lsquo;<samp>disable</samp>&rsquo;.
  10398. </p>
  10399. <p>For more information about the available recovery modes, consult the
  10400. paranoia project documentation.
  10401. </p></dd>
  10402. </dl>
  10403. <a name="libdc1394"></a>
  10404. <h2 class="section"><a href="ffplay-all.html#toc-libdc1394">18.14 libdc1394</a></h2>
  10405. <p>IIDC1394 input device, based on libdc1394 and libraw1394.
  10406. </p>
  10407. <p>Requires the configure option <code>--enable-libdc1394</code>.
  10408. </p>
  10409. <a name="Options-28"></a>
  10410. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-28">18.14.1 Options</a></h3>
  10411. <dl compact="compact">
  10412. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  10413. <dd><p>Set the frame rate. Default is <code>ntsc</code>, corresponding to a frame
  10414. rate of <code>30000/1001</code>.
  10415. </p>
  10416. </dd>
  10417. <dt>&lsquo;<samp>pixel_format</samp>&rsquo;</dt>
  10418. <dd><p>Select the pixel format. Default is <code>uyvy422</code>.
  10419. </p>
  10420. </dd>
  10421. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  10422. <dd><p>Set the video size given as a string such as <code>640x480</code> or <code>hd720</code>.
  10423. Default is <code>qvga</code>.
  10424. </p></dd>
  10425. </dl>
  10426. <a name="openal"></a>
  10427. <h2 class="section"><a href="ffplay-all.html#toc-openal">18.15 openal</a></h2>
  10428. <p>The OpenAL input device provides audio capture on all systems with a
  10429. working OpenAL 1.1 implementation.
  10430. </p>
  10431. <p>To enable this input device during configuration, you need OpenAL
  10432. headers and libraries installed on your system, and need to configure
  10433. FFmpeg with <code>--enable-openal</code>.
  10434. </p>
  10435. <p>OpenAL headers and libraries should be provided as part of your OpenAL
  10436. implementation, or as an additional download (an SDK). Depending on your
  10437. installation you may need to specify additional flags via the
  10438. <code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
  10439. system to locate the OpenAL headers and libraries.
  10440. </p>
  10441. <p>An incomplete list of OpenAL implementations follows:
  10442. </p>
  10443. <dl compact="compact">
  10444. <dt><strong>Creative</strong></dt>
  10445. <dd><p>The official Windows implementation, providing hardware acceleration
  10446. with supported devices and software fallback.
  10447. See <a href="http://openal.org/">http://openal.org/</a>.
  10448. </p></dd>
  10449. <dt><strong>OpenAL Soft</strong></dt>
  10450. <dd><p>Portable, open source (LGPL) software implementation. Includes
  10451. backends for the most common sound APIs on the Windows, Linux,
  10452. Solaris, and BSD operating systems.
  10453. See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
  10454. </p></dd>
  10455. <dt><strong>Apple</strong></dt>
  10456. <dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
  10457. See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
  10458. </p></dd>
  10459. </dl>
  10460. <p>This device allows one to capture from an audio input device handled
  10461. through OpenAL.
  10462. </p>
  10463. <p>You need to specify the name of the device to capture in the provided
  10464. filename. If the empty string is provided, the device will
  10465. automatically select the default device. You can get the list of the
  10466. supported devices by using the option <var>list_devices</var>.
  10467. </p>
  10468. <a name="Options-32"></a>
  10469. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-32">18.15.1 Options</a></h3>
  10470. <dl compact="compact">
  10471. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  10472. <dd><p>Set the number of channels in the captured audio. Only the values
  10473. &lsquo;<samp>1</samp>&rsquo; (monaural) and &lsquo;<samp>2</samp>&rsquo; (stereo) are currently supported.
  10474. Defaults to &lsquo;<samp>2</samp>&rsquo;.
  10475. </p>
  10476. </dd>
  10477. <dt>&lsquo;<samp>sample_size</samp>&rsquo;</dt>
  10478. <dd><p>Set the sample size (in bits) of the captured audio. Only the values
  10479. &lsquo;<samp>8</samp>&rsquo; and &lsquo;<samp>16</samp>&rsquo; are currently supported. Defaults to
  10480. &lsquo;<samp>16</samp>&rsquo;.
  10481. </p>
  10482. </dd>
  10483. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  10484. <dd><p>Set the sample rate (in Hz) of the captured audio.
  10485. Defaults to &lsquo;<samp>44.1k</samp>&rsquo;.
  10486. </p>
  10487. </dd>
  10488. <dt>&lsquo;<samp>list_devices</samp>&rsquo;</dt>
  10489. <dd><p>If set to &lsquo;<samp>true</samp>&rsquo;, print a list of devices and exit.
  10490. Defaults to &lsquo;<samp>false</samp>&rsquo;.
  10491. </p>
  10492. </dd>
  10493. </dl>
  10494. <a name="Examples-59"></a>
  10495. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-59">18.15.2 Examples</a></h3>
  10496. <p>Print the list of OpenAL supported devices and exit:
  10497. </p><div class="example">
  10498. <pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
  10499. </pre></div>
  10500. <p>Capture from the OpenAL device &lsquo;<tt>DR-BT101 via PulseAudio</tt>&rsquo;:
  10501. </p><div class="example">
  10502. <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
  10503. </pre></div>
  10504. <p>Capture from the default device (note the empty string &rdquo; as filename):
  10505. </p><div class="example">
  10506. <pre class="example">$ ffmpeg -f openal -i '' out.ogg
  10507. </pre></div>
  10508. <p>Capture from two devices simultaneously, writing to two different files,
  10509. within the same <code>ffmpeg</code> command:
  10510. </p><div class="example">
  10511. <pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
  10512. </pre></div>
  10513. <p>Note: not all OpenAL implementations support multiple simultaneous capture -
  10514. try the latest OpenAL Soft if the above does not work.
  10515. </p>
  10516. <a name="oss"></a>
  10517. <h2 class="section"><a href="ffplay-all.html#toc-oss">18.16 oss</a></h2>
  10518. <p>Open Sound System input device.
  10519. </p>
  10520. <p>The filename to provide to the input device is the device node
  10521. representing the OSS input device, and is usually set to
  10522. &lsquo;<tt>/dev/dsp</tt>&rsquo;.
  10523. </p>
  10524. <p>For example to grab from &lsquo;<tt>/dev/dsp</tt>&rsquo; using <code>ffmpeg</code> use the
  10525. command:
  10526. </p><div class="example">
  10527. <pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
  10528. </pre></div>
  10529. <p>For more information about OSS see:
  10530. <a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
  10531. </p>
  10532. <a name="Options-16"></a>
  10533. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-16">18.16.1 Options</a></h3>
  10534. <dl compact="compact">
  10535. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  10536. <dd><p>Set the sample rate in Hz. Default is 48000.
  10537. </p>
  10538. </dd>
  10539. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  10540. <dd><p>Set the number of channels. Default is 2.
  10541. </p>
  10542. </dd>
  10543. </dl>
  10544. <a name="pulse"></a>
  10545. <h2 class="section"><a href="ffplay-all.html#toc-pulse">18.17 pulse</a></h2>
  10546. <p>PulseAudio input device.
  10547. </p>
  10548. <p>To enable this output device you need to configure FFmpeg with <code>--enable-libpulse</code>.
  10549. </p>
  10550. <p>The filename to provide to the input device is a source device or the
  10551. string &quot;default&quot;
  10552. </p>
  10553. <p>To list the PulseAudio source devices and their properties you can invoke
  10554. the command <code>pactl list sources</code>.
  10555. </p>
  10556. <p>More information about PulseAudio can be found on <a href="http://www.pulseaudio.org">http://www.pulseaudio.org</a>.
  10557. </p>
  10558. <a name="Options-13"></a>
  10559. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-13">18.17.1 Options</a></h3>
  10560. <dl compact="compact">
  10561. <dt>&lsquo;<samp>server</samp>&rsquo;</dt>
  10562. <dd><p>Connect to a specific PulseAudio server, specified by an IP address.
  10563. Default server is used when not provided.
  10564. </p>
  10565. </dd>
  10566. <dt>&lsquo;<samp>name</samp>&rsquo;</dt>
  10567. <dd><p>Specify the application name PulseAudio will use when showing active clients,
  10568. by default it is the <code>LIBAVFORMAT_IDENT</code> string.
  10569. </p>
  10570. </dd>
  10571. <dt>&lsquo;<samp>stream_name</samp>&rsquo;</dt>
  10572. <dd><p>Specify the stream name PulseAudio will use when showing active streams,
  10573. by default it is &quot;record&quot;.
  10574. </p>
  10575. </dd>
  10576. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  10577. <dd><p>Specify the samplerate in Hz, by default 48kHz is used.
  10578. </p>
  10579. </dd>
  10580. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  10581. <dd><p>Specify the channels in use, by default 2 (stereo) is set.
  10582. </p>
  10583. </dd>
  10584. <dt>&lsquo;<samp>frame_size</samp>&rsquo;</dt>
  10585. <dd><p>Specify the number of bytes per frame, by default it is set to 1024.
  10586. </p>
  10587. </dd>
  10588. <dt>&lsquo;<samp>fragment_size</samp>&rsquo;</dt>
  10589. <dd><p>Specify the minimal buffering fragment in PulseAudio, it will affect the
  10590. audio latency. By default it is unset.
  10591. </p>
  10592. </dd>
  10593. <dt>&lsquo;<samp>wallclock</samp>&rsquo;</dt>
  10594. <dd><p>Set the initial PTS using the current time. Default is 1.
  10595. </p>
  10596. </dd>
  10597. </dl>
  10598. <a name="Examples-123"></a>
  10599. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-123">18.17.2 Examples</a></h3>
  10600. <p>Record a stream from default device:
  10601. </p><div class="example">
  10602. <pre class="example">ffmpeg -f pulse -i default /tmp/pulse.wav
  10603. </pre></div>
  10604. <a name="sndio"></a>
  10605. <h2 class="section"><a href="ffplay-all.html#toc-sndio">18.18 sndio</a></h2>
  10606. <p>sndio input device.
  10607. </p>
  10608. <p>To enable this input device during configuration you need libsndio
  10609. installed on your system.
  10610. </p>
  10611. <p>The filename to provide to the input device is the device node
  10612. representing the sndio input device, and is usually set to
  10613. &lsquo;<tt>/dev/audio0</tt>&rsquo;.
  10614. </p>
  10615. <p>For example to grab from &lsquo;<tt>/dev/audio0</tt>&rsquo; using <code>ffmpeg</code> use the
  10616. command:
  10617. </p><div class="example">
  10618. <pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
  10619. </pre></div>
  10620. <a name="Options-7"></a>
  10621. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-7">18.18.1 Options</a></h3>
  10622. <dl compact="compact">
  10623. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  10624. <dd><p>Set the sample rate in Hz. Default is 48000.
  10625. </p>
  10626. </dd>
  10627. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  10628. <dd><p>Set the number of channels. Default is 2.
  10629. </p>
  10630. </dd>
  10631. </dl>
  10632. <a name="video4linux2_002c-v4l2"></a>
  10633. <h2 class="section"><a href="ffplay-all.html#toc-video4linux2_002c-v4l2">18.19 video4linux2, v4l2</a></h2>
  10634. <p>Video4Linux2 input video device.
  10635. </p>
  10636. <p>&quot;v4l2&quot; can be used as alias for &quot;video4linux2&quot;.
  10637. </p>
  10638. <p>If FFmpeg is built with v4l-utils support (by using the
  10639. <code>--enable-libv4l2</code> configure option), it is possible to use it with the
  10640. <code>-use_libv4l2</code> input device option.
  10641. </p>
  10642. <p>The name of the device to grab is a file device node, usually Linux
  10643. systems tend to automatically create such nodes when the device
  10644. (e.g. an USB webcam) is plugged into the system, and has a name of the
  10645. kind &lsquo;<tt>/dev/video<var>N</var></tt>&rsquo;, where <var>N</var> is a number associated to
  10646. the device.
  10647. </p>
  10648. <p>Video4Linux2 devices usually support a limited set of
  10649. <var>width</var>x<var>height</var> sizes and frame rates. You can check which are
  10650. supported using <code>-list_formats all</code> for Video4Linux2 devices.
  10651. Some devices, like TV cards, support one or more standards. It is possible
  10652. to list all the supported standards using <code>-list_standards all</code>.
  10653. </p>
  10654. <p>The time base for the timestamps is 1 microsecond. Depending on the kernel
  10655. version and configuration, the timestamps may be derived from the real time
  10656. clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
  10657. boot time, unaffected by NTP or manual changes to the clock). The
  10658. &lsquo;<samp>-timestamps abs</samp>&rsquo; or &lsquo;<samp>-ts abs</samp>&rsquo; option can be used to force
  10659. conversion into the real time clock.
  10660. </p>
  10661. <p>Some usage examples of the video4linux2 device with <code>ffmpeg</code>
  10662. and <code>ffplay</code>:
  10663. </p><ul>
  10664. <li>
  10665. List supported formats for a video4linux2 device:
  10666. <div class="example">
  10667. <pre class="example">ffplay -f video4linux2 -list_formats all /dev/video0
  10668. </pre></div>
  10669. </li><li>
  10670. Grab and show the input of a video4linux2 device:
  10671. <div class="example">
  10672. <pre class="example">ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
  10673. </pre></div>
  10674. </li><li>
  10675. Grab and record the input of a video4linux2 device, leave the
  10676. frame rate and size as previously set:
  10677. <div class="example">
  10678. <pre class="example">ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
  10679. </pre></div>
  10680. </li></ul>
  10681. <p>For more information about Video4Linux, check <a href="http://linuxtv.org/">http://linuxtv.org/</a>.
  10682. </p>
  10683. <a name="Options-20"></a>
  10684. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-20">18.19.1 Options</a></h3>
  10685. <dl compact="compact">
  10686. <dt>&lsquo;<samp>standard</samp>&rsquo;</dt>
  10687. <dd><p>Set the standard. Must be the name of a supported standard. To get a
  10688. list of the supported standards, use the &lsquo;<samp>list_standards</samp>&rsquo;
  10689. option.
  10690. </p>
  10691. </dd>
  10692. <dt>&lsquo;<samp>channel</samp>&rsquo;</dt>
  10693. <dd><p>Set the input channel number. Default to -1, which means using the
  10694. previously selected channel.
  10695. </p>
  10696. </dd>
  10697. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  10698. <dd><p>Set the video frame size. The argument must be a string in the form
  10699. <var>WIDTH</var>x<var>HEIGHT</var> or a valid size abbreviation.
  10700. </p>
  10701. </dd>
  10702. <dt>&lsquo;<samp>pixel_format</samp>&rsquo;</dt>
  10703. <dd><p>Select the pixel format (only valid for raw video input).
  10704. </p>
  10705. </dd>
  10706. <dt>&lsquo;<samp>input_format</samp>&rsquo;</dt>
  10707. <dd><p>Set the preferred pixel format (for raw video) or a codec name.
  10708. This option allows one to select the input format, when several are
  10709. available.
  10710. </p>
  10711. </dd>
  10712. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  10713. <dd><p>Set the preferred video frame rate.
  10714. </p>
  10715. </dd>
  10716. <dt>&lsquo;<samp>list_formats</samp>&rsquo;</dt>
  10717. <dd><p>List available formats (supported pixel formats, codecs, and frame
  10718. sizes) and exit.
  10719. </p>
  10720. <p>Available values are:
  10721. </p><dl compact="compact">
  10722. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  10723. <dd><p>Show all available (compressed and non-compressed) formats.
  10724. </p>
  10725. </dd>
  10726. <dt>&lsquo;<samp>raw</samp>&rsquo;</dt>
  10727. <dd><p>Show only raw video (non-compressed) formats.
  10728. </p>
  10729. </dd>
  10730. <dt>&lsquo;<samp>compressed</samp>&rsquo;</dt>
  10731. <dd><p>Show only compressed formats.
  10732. </p></dd>
  10733. </dl>
  10734. </dd>
  10735. <dt>&lsquo;<samp>list_standards</samp>&rsquo;</dt>
  10736. <dd><p>List supported standards and exit.
  10737. </p>
  10738. <p>Available values are:
  10739. </p><dl compact="compact">
  10740. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  10741. <dd><p>Show all supported standards.
  10742. </p></dd>
  10743. </dl>
  10744. </dd>
  10745. <dt>&lsquo;<samp>timestamps, ts</samp>&rsquo;</dt>
  10746. <dd><p>Set type of timestamps for grabbed frames.
  10747. </p>
  10748. <p>Available values are:
  10749. </p><dl compact="compact">
  10750. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  10751. <dd><p>Use timestamps from the kernel.
  10752. </p>
  10753. </dd>
  10754. <dt>&lsquo;<samp>abs</samp>&rsquo;</dt>
  10755. <dd><p>Use absolute timestamps (wall clock).
  10756. </p>
  10757. </dd>
  10758. <dt>&lsquo;<samp>mono2abs</samp>&rsquo;</dt>
  10759. <dd><p>Force conversion from monotonic to absolute timestamps.
  10760. </p></dd>
  10761. </dl>
  10762. <p>Default value is <code>default</code>.
  10763. </p>
  10764. </dd>
  10765. <dt>&lsquo;<samp>use_libv4l2</samp>&rsquo;</dt>
  10766. <dd><p>Use libv4l2 (v4l-utils) conversion functions. Default is 0.
  10767. </p>
  10768. </dd>
  10769. </dl>
  10770. <a name="vfwcap"></a>
  10771. <h2 class="section"><a href="ffplay-all.html#toc-vfwcap">18.20 vfwcap</a></h2>
  10772. <p>VfW (Video for Windows) capture input device.
  10773. </p>
  10774. <p>The filename passed as input is the capture driver number, ranging from
  10775. 0 to 9. You may use &quot;list&quot; as filename to print a list of drivers. Any
  10776. other filename will be interpreted as device number 0.
  10777. </p>
  10778. <a name="Options-5"></a>
  10779. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-5">18.20.1 Options</a></h3>
  10780. <dl compact="compact">
  10781. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  10782. <dd><p>Set the video frame size.
  10783. </p>
  10784. </dd>
  10785. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  10786. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  10787. corresponding to a frame rate of <code>30000/1001</code>.
  10788. </p>
  10789. </dd>
  10790. </dl>
  10791. <a name="x11grab"></a>
  10792. <h2 class="section"><a href="ffplay-all.html#toc-x11grab">18.21 x11grab</a></h2>
  10793. <p>X11 video input device.
  10794. </p>
  10795. <p>To enable this input device during configuration you need libxcb
  10796. installed on your system. It will be automatically detected during
  10797. configuration.
  10798. </p>
  10799. <p>This device allows one to capture a region of an X11 display.
  10800. </p>
  10801. <p>The filename passed as input has the syntax:
  10802. </p><div class="example">
  10803. <pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
  10804. </pre></div>
  10805. <p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
  10806. X11 display name of the screen to grab from. <var>hostname</var> can be
  10807. omitted, and defaults to &quot;localhost&quot;. The environment variable
  10808. <code>DISPLAY</code> contains the default display name.
  10809. </p>
  10810. <p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
  10811. area with respect to the top-left border of the X11 screen. They
  10812. default to 0.
  10813. </p>
  10814. <p>Check the X11 documentation (e.g. <code>man X</code>) for more detailed
  10815. information.
  10816. </p>
  10817. <p>Use the <code>xdpyinfo</code> program for getting basic information about
  10818. the properties of your X11 display (e.g. grep for &quot;name&quot; or
  10819. &quot;dimensions&quot;).
  10820. </p>
  10821. <p>For example to grab from &lsquo;<tt>:0.0</tt>&rsquo; using <code>ffmpeg</code>:
  10822. </p><div class="example">
  10823. <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
  10824. </pre></div>
  10825. <p>Grab at position <code>10,20</code>:
  10826. </p><div class="example">
  10827. <pre class="example">ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  10828. </pre></div>
  10829. <a name="Options-27"></a>
  10830. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-27">18.21.1 Options</a></h3>
  10831. <dl compact="compact">
  10832. <dt>&lsquo;<samp>draw_mouse</samp>&rsquo;</dt>
  10833. <dd><p>Specify whether to draw the mouse pointer. A value of <code>0</code> specifies
  10834. not to draw the pointer. Default value is <code>1</code>.
  10835. </p>
  10836. </dd>
  10837. <dt>&lsquo;<samp>follow_mouse</samp>&rsquo;</dt>
  10838. <dd><p>Make the grabbed area follow the mouse. The argument can be
  10839. <code>centered</code> or a number of pixels <var>PIXELS</var>.
  10840. </p>
  10841. <p>When it is specified with &quot;centered&quot;, the grabbing region follows the mouse
  10842. pointer and keeps the pointer at the center of region; otherwise, the region
  10843. follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
  10844. zero) to the edge of region.
  10845. </p>
  10846. <p>For example:
  10847. </p><div class="example">
  10848. <pre class="example">ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
  10849. </pre></div>
  10850. <p>To follow only when the mouse pointer reaches within 100 pixels to edge:
  10851. </p><div class="example">
  10852. <pre class="example">ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
  10853. </pre></div>
  10854. </dd>
  10855. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  10856. <dd><p>Set the grabbing frame rate. Default value is <code>ntsc</code>,
  10857. corresponding to a frame rate of <code>30000/1001</code>.
  10858. </p>
  10859. </dd>
  10860. <dt>&lsquo;<samp>show_region</samp>&rsquo;</dt>
  10861. <dd><p>Show grabbed region on screen.
  10862. </p>
  10863. <p>If <var>show_region</var> is specified with <code>1</code>, then the grabbing
  10864. region will be indicated on screen. With this option, it is easy to
  10865. know what is being grabbed if only a portion of the screen is grabbed.
  10866. </p>
  10867. </dd>
  10868. <dt>&lsquo;<samp>region_border</samp>&rsquo;</dt>
  10869. <dd><p>Set the region border thickness if &lsquo;<samp>-show_region 1</samp>&rsquo; is used.
  10870. Range is 1 to 128 and default is 3 (XCB-based x11grab only).
  10871. </p>
  10872. <p>For example:
  10873. </p><div class="example">
  10874. <pre class="example">ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
  10875. </pre></div>
  10876. <p>With <var>follow_mouse</var>:
  10877. </p><div class="example">
  10878. <pre class="example">ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
  10879. </pre></div>
  10880. </dd>
  10881. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  10882. <dd><p>Set the video frame size. Default is the full desktop.
  10883. </p>
  10884. </dd>
  10885. <dt>&lsquo;<samp>grab_x</samp>&rsquo;</dt>
  10886. <dt>&lsquo;<samp>grab_y</samp>&rsquo;</dt>
  10887. <dd><p>Set the grabbing region coordinates. They are expressed as offset from
  10888. the top left corner of the X11 window and correspond to the
  10889. <var>x_offset</var> and <var>y_offset</var> parameters in the device name. The
  10890. default value for both options is 0.
  10891. </p></dd>
  10892. </dl>
  10893. <a name="Resampler-Options"></a>
  10894. <h1 class="chapter"><a href="ffplay-all.html#toc-Resampler-Options">19 Resampler Options</a></h1>
  10895. <p>The audio resampler supports the following named options.
  10896. </p>
  10897. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  10898. FFmpeg tools, <var>option</var>=<var>value</var> for the aresample filter,
  10899. by setting the value explicitly in the
  10900. <code>SwrContext</code> options or using the &lsquo;<tt>libavutil/opt.h</tt>&rsquo; API for
  10901. programmatic use.
  10902. </p>
  10903. <dl compact="compact">
  10904. <dt>&lsquo;<samp>ich, in_channel_count</samp>&rsquo;</dt>
  10905. <dd><p>Set the number of input channels. Default value is 0. Setting this
  10906. value is not mandatory if the corresponding channel layout
  10907. &lsquo;<samp>in_channel_layout</samp>&rsquo; is set.
  10908. </p>
  10909. </dd>
  10910. <dt>&lsquo;<samp>och, out_channel_count</samp>&rsquo;</dt>
  10911. <dd><p>Set the number of output channels. Default value is 0. Setting this
  10912. value is not mandatory if the corresponding channel layout
  10913. &lsquo;<samp>out_channel_layout</samp>&rsquo; is set.
  10914. </p>
  10915. </dd>
  10916. <dt>&lsquo;<samp>uch, used_channel_count</samp>&rsquo;</dt>
  10917. <dd><p>Set the number of used input channels. Default value is 0. This option is
  10918. only used for special remapping.
  10919. </p>
  10920. </dd>
  10921. <dt>&lsquo;<samp>isr, in_sample_rate</samp>&rsquo;</dt>
  10922. <dd><p>Set the input sample rate. Default value is 0.
  10923. </p>
  10924. </dd>
  10925. <dt>&lsquo;<samp>osr, out_sample_rate</samp>&rsquo;</dt>
  10926. <dd><p>Set the output sample rate. Default value is 0.
  10927. </p>
  10928. </dd>
  10929. <dt>&lsquo;<samp>isf, in_sample_fmt</samp>&rsquo;</dt>
  10930. <dd><p>Specify the input sample format. It is set by default to <code>none</code>.
  10931. </p>
  10932. </dd>
  10933. <dt>&lsquo;<samp>osf, out_sample_fmt</samp>&rsquo;</dt>
  10934. <dd><p>Specify the output sample format. It is set by default to <code>none</code>.
  10935. </p>
  10936. </dd>
  10937. <dt>&lsquo;<samp>tsf, internal_sample_fmt</samp>&rsquo;</dt>
  10938. <dd><p>Set the internal sample format. Default value is <code>none</code>.
  10939. This will automatically be chosen when it is not explicitly set.
  10940. </p>
  10941. </dd>
  10942. <dt>&lsquo;<samp>icl, in_channel_layout</samp>&rsquo;</dt>
  10943. <dt>&lsquo;<samp>ocl, out_channel_layout</samp>&rsquo;</dt>
  10944. <dd><p>Set the input/output channel layout.
  10945. </p>
  10946. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  10947. for the required syntax.
  10948. </p>
  10949. </dd>
  10950. <dt>&lsquo;<samp>clev, center_mix_level</samp>&rsquo;</dt>
  10951. <dd><p>Set the center mix level. It is a value expressed in deciBel, and must be
  10952. in the interval [-32,32].
  10953. </p>
  10954. </dd>
  10955. <dt>&lsquo;<samp>slev, surround_mix_level</samp>&rsquo;</dt>
  10956. <dd><p>Set the surround mix level. It is a value expressed in deciBel, and must
  10957. be in the interval [-32,32].
  10958. </p>
  10959. </dd>
  10960. <dt>&lsquo;<samp>lfe_mix_level</samp>&rsquo;</dt>
  10961. <dd><p>Set LFE mix into non LFE level. It is used when there is a LFE input but no
  10962. LFE output. It is a value expressed in deciBel, and must
  10963. be in the interval [-32,32].
  10964. </p>
  10965. </dd>
  10966. <dt>&lsquo;<samp>rmvol, rematrix_volume</samp>&rsquo;</dt>
  10967. <dd><p>Set rematrix volume. Default value is 1.0.
  10968. </p>
  10969. </dd>
  10970. <dt>&lsquo;<samp>rematrix_maxval</samp>&rsquo;</dt>
  10971. <dd><p>Set maximum output value for rematrixing.
  10972. This can be used to prevent clipping vs. preventing volume reduction.
  10973. A value of 1.0 prevents clipping.
  10974. </p>
  10975. </dd>
  10976. <dt>&lsquo;<samp>flags, swr_flags</samp>&rsquo;</dt>
  10977. <dd><p>Set flags used by the converter. Default value is 0.
  10978. </p>
  10979. <p>It supports the following individual flags:
  10980. </p><dl compact="compact">
  10981. <dt>&lsquo;<samp>res</samp>&rsquo;</dt>
  10982. <dd><p>force resampling, this flag forces resampling to be used even when the
  10983. input and output sample rates match.
  10984. </p></dd>
  10985. </dl>
  10986. </dd>
  10987. <dt>&lsquo;<samp>dither_scale</samp>&rsquo;</dt>
  10988. <dd><p>Set the dither scale. Default value is 1.
  10989. </p>
  10990. </dd>
  10991. <dt>&lsquo;<samp>dither_method</samp>&rsquo;</dt>
  10992. <dd><p>Set dither method. Default value is 0.
  10993. </p>
  10994. <p>Supported values:
  10995. </p><dl compact="compact">
  10996. <dt>&lsquo;<samp>rectangular</samp>&rsquo;</dt>
  10997. <dd><p>select rectangular dither
  10998. </p></dd>
  10999. <dt>&lsquo;<samp>triangular</samp>&rsquo;</dt>
  11000. <dd><p>select triangular dither
  11001. </p></dd>
  11002. <dt>&lsquo;<samp>triangular_hp</samp>&rsquo;</dt>
  11003. <dd><p>select triangular dither with high pass
  11004. </p></dd>
  11005. <dt>&lsquo;<samp>lipshitz</samp>&rsquo;</dt>
  11006. <dd><p>select Lipshitz noise shaping dither.
  11007. </p></dd>
  11008. <dt>&lsquo;<samp>shibata</samp>&rsquo;</dt>
  11009. <dd><p>select Shibata noise shaping dither.
  11010. </p></dd>
  11011. <dt>&lsquo;<samp>low_shibata</samp>&rsquo;</dt>
  11012. <dd><p>select low Shibata noise shaping dither.
  11013. </p></dd>
  11014. <dt>&lsquo;<samp>high_shibata</samp>&rsquo;</dt>
  11015. <dd><p>select high Shibata noise shaping dither.
  11016. </p></dd>
  11017. <dt>&lsquo;<samp>f_weighted</samp>&rsquo;</dt>
  11018. <dd><p>select f-weighted noise shaping dither
  11019. </p></dd>
  11020. <dt>&lsquo;<samp>modified_e_weighted</samp>&rsquo;</dt>
  11021. <dd><p>select modified-e-weighted noise shaping dither
  11022. </p></dd>
  11023. <dt>&lsquo;<samp>improved_e_weighted</samp>&rsquo;</dt>
  11024. <dd><p>select improved-e-weighted noise shaping dither
  11025. </p>
  11026. </dd>
  11027. </dl>
  11028. </dd>
  11029. <dt>&lsquo;<samp>resampler</samp>&rsquo;</dt>
  11030. <dd><p>Set resampling engine. Default value is swr.
  11031. </p>
  11032. <p>Supported values:
  11033. </p><dl compact="compact">
  11034. <dt>&lsquo;<samp>swr</samp>&rsquo;</dt>
  11035. <dd><p>select the native SW Resampler; filter options precision and cheby are not
  11036. applicable in this case.
  11037. </p></dd>
  11038. <dt>&lsquo;<samp>soxr</samp>&rsquo;</dt>
  11039. <dd><p>select the SoX Resampler (where available); compensation, and filter options
  11040. filter_size, phase_shift, exact_rational, filter_type &amp; kaiser_beta, are not
  11041. applicable in this case.
  11042. </p></dd>
  11043. </dl>
  11044. </dd>
  11045. <dt>&lsquo;<samp>filter_size</samp>&rsquo;</dt>
  11046. <dd><p>For swr only, set resampling filter size, default value is 32.
  11047. </p>
  11048. </dd>
  11049. <dt>&lsquo;<samp>phase_shift</samp>&rsquo;</dt>
  11050. <dd><p>For swr only, set resampling phase shift, default value is 10, and must be in
  11051. the interval [0,30].
  11052. </p>
  11053. </dd>
  11054. <dt>&lsquo;<samp>linear_interp</samp>&rsquo;</dt>
  11055. <dd><p>Use linear interpolation when enabled (the default). Disable it if you want
  11056. to preserve speed instead of quality when exact_rational fails.
  11057. </p>
  11058. </dd>
  11059. <dt>&lsquo;<samp>exact_rational</samp>&rsquo;</dt>
  11060. <dd><p>For swr only, when enabled, try to use exact phase_count based on input and
  11061. output sample rate. However, if it is larger than <code>1 &lt;&lt; phase_shift</code>,
  11062. the phase_count will be <code>1 &lt;&lt; phase_shift</code> as fallback. Default is enabled.
  11063. </p>
  11064. </dd>
  11065. <dt>&lsquo;<samp>cutoff</samp>&rsquo;</dt>
  11066. <dd><p>Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
  11067. value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
  11068. (which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
  11069. </p>
  11070. </dd>
  11071. <dt>&lsquo;<samp>precision</samp>&rsquo;</dt>
  11072. <dd><p>For soxr only, the precision in bits to which the resampled signal will be
  11073. calculated. The default value of 20 (which, with suitable dithering, is
  11074. appropriate for a destination bit-depth of 16) gives SoX&rsquo;s &rsquo;High Quality&rsquo;; a
  11075. value of 28 gives SoX&rsquo;s &rsquo;Very High Quality&rsquo;.
  11076. </p>
  11077. </dd>
  11078. <dt>&lsquo;<samp>cheby</samp>&rsquo;</dt>
  11079. <dd><p>For soxr only, selects passband rolloff none (Chebyshev) &amp; higher-precision
  11080. approximation for &rsquo;irrational&rsquo; ratios. Default value is 0.
  11081. </p>
  11082. </dd>
  11083. <dt>&lsquo;<samp>async</samp>&rsquo;</dt>
  11084. <dd><p>For swr only, simple 1 parameter audio sync to timestamps using stretching,
  11085. squeezing, filling and trimming. Setting this to 1 will enable filling and
  11086. trimming, larger values represent the maximum amount in samples that the data
  11087. may be stretched or squeezed for each second.
  11088. Default value is 0, thus no compensation is applied to make the samples match
  11089. the audio timestamps.
  11090. </p>
  11091. </dd>
  11092. <dt>&lsquo;<samp>first_pts</samp>&rsquo;</dt>
  11093. <dd><p>For swr only, assume the first pts should be this value. The time unit is 1 / sample rate.
  11094. This allows for padding/trimming at the start of stream. By default, no
  11095. assumption is made about the first frame&rsquo;s expected pts, so no padding or
  11096. trimming is done. For example, this could be set to 0 to pad the beginning with
  11097. silence if an audio stream starts after the video stream or to trim any samples
  11098. with a negative pts due to encoder delay.
  11099. </p>
  11100. </dd>
  11101. <dt>&lsquo;<samp>min_comp</samp>&rsquo;</dt>
  11102. <dd><p>For swr only, set the minimum difference between timestamps and audio data (in
  11103. seconds) to trigger stretching/squeezing/filling or trimming of the
  11104. data to make it match the timestamps. The default is that
  11105. stretching/squeezing/filling and trimming is disabled
  11106. (&lsquo;<samp>min_comp</samp>&rsquo; = <code>FLT_MAX</code>).
  11107. </p>
  11108. </dd>
  11109. <dt>&lsquo;<samp>min_hard_comp</samp>&rsquo;</dt>
  11110. <dd><p>For swr only, set the minimum difference between timestamps and audio data (in
  11111. seconds) to trigger adding/dropping samples to make it match the
  11112. timestamps. This option effectively is a threshold to select between
  11113. hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
  11114. all compensation is by default disabled through &lsquo;<samp>min_comp</samp>&rsquo;.
  11115. The default is 0.1.
  11116. </p>
  11117. </dd>
  11118. <dt>&lsquo;<samp>comp_duration</samp>&rsquo;</dt>
  11119. <dd><p>For swr only, set duration (in seconds) over which data is stretched/squeezed
  11120. to make it match the timestamps. Must be a non-negative double float value,
  11121. default value is 1.0.
  11122. </p>
  11123. </dd>
  11124. <dt>&lsquo;<samp>max_soft_comp</samp>&rsquo;</dt>
  11125. <dd><p>For swr only, set maximum factor by which data is stretched/squeezed to make it
  11126. match the timestamps. Must be a non-negative double float value, default value
  11127. is 0.
  11128. </p>
  11129. </dd>
  11130. <dt>&lsquo;<samp>matrix_encoding</samp>&rsquo;</dt>
  11131. <dd><p>Select matrixed stereo encoding.
  11132. </p>
  11133. <p>It accepts the following values:
  11134. </p><dl compact="compact">
  11135. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  11136. <dd><p>select none
  11137. </p></dd>
  11138. <dt>&lsquo;<samp>dolby</samp>&rsquo;</dt>
  11139. <dd><p>select Dolby
  11140. </p></dd>
  11141. <dt>&lsquo;<samp>dplii</samp>&rsquo;</dt>
  11142. <dd><p>select Dolby Pro Logic II
  11143. </p></dd>
  11144. </dl>
  11145. <p>Default value is <code>none</code>.
  11146. </p>
  11147. </dd>
  11148. <dt>&lsquo;<samp>filter_type</samp>&rsquo;</dt>
  11149. <dd><p>For swr only, select resampling filter type. This only affects resampling
  11150. operations.
  11151. </p>
  11152. <p>It accepts the following values:
  11153. </p><dl compact="compact">
  11154. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  11155. <dd><p>select cubic
  11156. </p></dd>
  11157. <dt>&lsquo;<samp>blackman_nuttall</samp>&rsquo;</dt>
  11158. <dd><p>select Blackman Nuttall windowed sinc
  11159. </p></dd>
  11160. <dt>&lsquo;<samp>kaiser</samp>&rsquo;</dt>
  11161. <dd><p>select Kaiser windowed sinc
  11162. </p></dd>
  11163. </dl>
  11164. </dd>
  11165. <dt>&lsquo;<samp>kaiser_beta</samp>&rsquo;</dt>
  11166. <dd><p>For swr only, set Kaiser window beta value. Must be a double float value in the
  11167. interval [2,16], default value is 9.
  11168. </p>
  11169. </dd>
  11170. <dt>&lsquo;<samp>output_sample_bits</samp>&rsquo;</dt>
  11171. <dd><p>For swr only, set number of used output sample bits for dithering. Must be an integer in the
  11172. interval [0,64], default value is 0, which means it&rsquo;s not used.
  11173. </p>
  11174. </dd>
  11175. </dl>
  11176. <p><a name="scaler_005foptions"></a>
  11177. </p><a name="Scaler-Options"></a>
  11178. <h1 class="chapter"><a href="ffplay-all.html#toc-Scaler-Options">20 Scaler Options</a></h1>
  11179. <p>The video scaler supports the following named options.
  11180. </p>
  11181. <p>Options may be set by specifying -<var>option</var> <var>value</var> in the
  11182. FFmpeg tools, with a few API-only exceptions noted below.
  11183. For programmatic use, they can be set explicitly in the
  11184. <code>SwsContext</code> options or through the &lsquo;<tt>libavutil/opt.h</tt>&rsquo; API.
  11185. </p>
  11186. <dl compact="compact">
  11187. <dd>
  11188. <p><a name="sws_005fflags"></a>
  11189. </p></dd>
  11190. <dt>&lsquo;<samp>sws_flags</samp>&rsquo;</dt>
  11191. <dd><p>Set the scaler flags. This is also used to set the scaling
  11192. algorithm. Only a single algorithm should be selected. Default
  11193. value is &lsquo;<samp>bicubic</samp>&rsquo;.
  11194. </p>
  11195. <p>It accepts the following values:
  11196. </p><dl compact="compact">
  11197. <dt>&lsquo;<samp>fast_bilinear</samp>&rsquo;</dt>
  11198. <dd><p>Select fast bilinear scaling algorithm.
  11199. </p>
  11200. </dd>
  11201. <dt>&lsquo;<samp>bilinear</samp>&rsquo;</dt>
  11202. <dd><p>Select bilinear scaling algorithm.
  11203. </p>
  11204. </dd>
  11205. <dt>&lsquo;<samp>bicubic</samp>&rsquo;</dt>
  11206. <dd><p>Select bicubic scaling algorithm.
  11207. </p>
  11208. </dd>
  11209. <dt>&lsquo;<samp>experimental</samp>&rsquo;</dt>
  11210. <dd><p>Select experimental scaling algorithm.
  11211. </p>
  11212. </dd>
  11213. <dt>&lsquo;<samp>neighbor</samp>&rsquo;</dt>
  11214. <dd><p>Select nearest neighbor rescaling algorithm.
  11215. </p>
  11216. </dd>
  11217. <dt>&lsquo;<samp>area</samp>&rsquo;</dt>
  11218. <dd><p>Select averaging area rescaling algorithm.
  11219. </p>
  11220. </dd>
  11221. <dt>&lsquo;<samp>bicublin</samp>&rsquo;</dt>
  11222. <dd><p>Select bicubic scaling algorithm for the luma component, bilinear for
  11223. chroma components.
  11224. </p>
  11225. </dd>
  11226. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  11227. <dd><p>Select Gaussian rescaling algorithm.
  11228. </p>
  11229. </dd>
  11230. <dt>&lsquo;<samp>sinc</samp>&rsquo;</dt>
  11231. <dd><p>Select sinc rescaling algorithm.
  11232. </p>
  11233. </dd>
  11234. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  11235. <dd><p>Select Lanczos rescaling algorithm. The default width (alpha) is 3 and can be
  11236. changed by setting <code>param0</code>.
  11237. </p>
  11238. </dd>
  11239. <dt>&lsquo;<samp>spline</samp>&rsquo;</dt>
  11240. <dd><p>Select natural bicubic spline rescaling algorithm.
  11241. </p>
  11242. </dd>
  11243. <dt>&lsquo;<samp>print_info</samp>&rsquo;</dt>
  11244. <dd><p>Enable printing/debug logging.
  11245. </p>
  11246. </dd>
  11247. <dt>&lsquo;<samp>accurate_rnd</samp>&rsquo;</dt>
  11248. <dd><p>Enable accurate rounding.
  11249. </p>
  11250. </dd>
  11251. <dt>&lsquo;<samp>full_chroma_int</samp>&rsquo;</dt>
  11252. <dd><p>Enable full chroma interpolation.
  11253. </p>
  11254. </dd>
  11255. <dt>&lsquo;<samp>full_chroma_inp</samp>&rsquo;</dt>
  11256. <dd><p>Select full chroma input.
  11257. </p>
  11258. </dd>
  11259. <dt>&lsquo;<samp>bitexact</samp>&rsquo;</dt>
  11260. <dd><p>Enable bitexact output.
  11261. </p></dd>
  11262. </dl>
  11263. </dd>
  11264. <dt>&lsquo;<samp>srcw <var>(API only)</var></samp>&rsquo;</dt>
  11265. <dd><p>Set source width.
  11266. </p>
  11267. </dd>
  11268. <dt>&lsquo;<samp>srch <var>(API only)</var></samp>&rsquo;</dt>
  11269. <dd><p>Set source height.
  11270. </p>
  11271. </dd>
  11272. <dt>&lsquo;<samp>dstw <var>(API only)</var></samp>&rsquo;</dt>
  11273. <dd><p>Set destination width.
  11274. </p>
  11275. </dd>
  11276. <dt>&lsquo;<samp>dsth <var>(API only)</var></samp>&rsquo;</dt>
  11277. <dd><p>Set destination height.
  11278. </p>
  11279. </dd>
  11280. <dt>&lsquo;<samp>src_format <var>(API only)</var></samp>&rsquo;</dt>
  11281. <dd><p>Set source pixel format (must be expressed as an integer).
  11282. </p>
  11283. </dd>
  11284. <dt>&lsquo;<samp>dst_format <var>(API only)</var></samp>&rsquo;</dt>
  11285. <dd><p>Set destination pixel format (must be expressed as an integer).
  11286. </p>
  11287. </dd>
  11288. <dt>&lsquo;<samp>src_range <var>(boolean)</var></samp>&rsquo;</dt>
  11289. <dd><p>If value is set to <code>1</code>, indicates source is full range. Default value is
  11290. <code>0</code>, which indicates source is limited range.
  11291. </p>
  11292. </dd>
  11293. <dt>&lsquo;<samp>dst_range <var>(boolean)</var></samp>&rsquo;</dt>
  11294. <dd><p>If value is set to <code>1</code>, enable full range for destination. Default value
  11295. is <code>0</code>, which enables limited range.
  11296. </p>
  11297. <p><a name="sws_005fparams"></a>
  11298. </p></dd>
  11299. <dt>&lsquo;<samp>param0, param1</samp>&rsquo;</dt>
  11300. <dd><p>Set scaling algorithm parameters. The specified values are specific of
  11301. some scaling algorithms and ignored by others. The specified values
  11302. are floating point number values.
  11303. </p>
  11304. </dd>
  11305. <dt>&lsquo;<samp>sws_dither</samp>&rsquo;</dt>
  11306. <dd><p>Set the dithering algorithm. Accepts one of the following
  11307. values. Default value is &lsquo;<samp>auto</samp>&rsquo;.
  11308. </p>
  11309. <dl compact="compact">
  11310. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  11311. <dd><p>automatic choice
  11312. </p>
  11313. </dd>
  11314. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  11315. <dd><p>no dithering
  11316. </p>
  11317. </dd>
  11318. <dt>&lsquo;<samp>bayer</samp>&rsquo;</dt>
  11319. <dd><p>bayer dither
  11320. </p>
  11321. </dd>
  11322. <dt>&lsquo;<samp>ed</samp>&rsquo;</dt>
  11323. <dd><p>error diffusion dither
  11324. </p>
  11325. </dd>
  11326. <dt>&lsquo;<samp>a_dither</samp>&rsquo;</dt>
  11327. <dd><p>arithmetic dither, based using addition
  11328. </p>
  11329. </dd>
  11330. <dt>&lsquo;<samp>x_dither</samp>&rsquo;</dt>
  11331. <dd><p>arithmetic dither, based using xor (more random/less apparent patterning that
  11332. a_dither).
  11333. </p>
  11334. </dd>
  11335. </dl>
  11336. </dd>
  11337. <dt>&lsquo;<samp>alphablend</samp>&rsquo;</dt>
  11338. <dd><p>Set the alpha blending to use when the input has alpha but the output does not.
  11339. Default value is &lsquo;<samp>none</samp>&rsquo;.
  11340. </p>
  11341. <dl compact="compact">
  11342. <dt>&lsquo;<samp>uniform_color</samp>&rsquo;</dt>
  11343. <dd><p>Blend onto a uniform background color
  11344. </p>
  11345. </dd>
  11346. <dt>&lsquo;<samp>checkerboard</samp>&rsquo;</dt>
  11347. <dd><p>Blend onto a checkerboard
  11348. </p>
  11349. </dd>
  11350. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  11351. <dd><p>No blending
  11352. </p>
  11353. </dd>
  11354. </dl>
  11355. </dd>
  11356. </dl>
  11357. <a name="Filtering-Introduction"></a>
  11358. <h1 class="chapter"><a href="ffplay-all.html#toc-Filtering-Introduction">21 Filtering Introduction</a></h1>
  11359. <p>Filtering in FFmpeg is enabled through the libavfilter library.
  11360. </p>
  11361. <p>In libavfilter, a filter can have multiple inputs and multiple
  11362. outputs.
  11363. To illustrate the sorts of things that are possible, we consider the
  11364. following filtergraph.
  11365. </p>
  11366. <pre class="verbatim"> [main]
  11367. input --&gt; split ---------------------&gt; overlay --&gt; output
  11368. | ^
  11369. |[tmp] [flip]|
  11370. +-----&gt; crop --&gt; vflip -------+
  11371. </pre>
  11372. <p>This filtergraph splits the input stream in two streams, then sends one
  11373. stream through the crop filter and the vflip filter, before merging it
  11374. back with the other stream by overlaying it on top. You can use the
  11375. following command to achieve this:
  11376. </p>
  11377. <div class="example">
  11378. <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
  11379. </pre></div>
  11380. <p>The result will be that the top half of the video is mirrored
  11381. onto the bottom half of the output video.
  11382. </p>
  11383. <p>Filters in the same linear chain are separated by commas, and distinct
  11384. linear chains of filters are separated by semicolons. In our example,
  11385. <var>crop,vflip</var> are in one linear chain, <var>split</var> and
  11386. <var>overlay</var> are separately in another. The points where the linear
  11387. chains join are labelled by names enclosed in square brackets. In the
  11388. example, the split filter generates two outputs that are associated to
  11389. the labels <var>[main]</var> and <var>[tmp]</var>.
  11390. </p>
  11391. <p>The stream sent to the second output of <var>split</var>, labelled as
  11392. <var>[tmp]</var>, is processed through the <var>crop</var> filter, which crops
  11393. away the lower half part of the video, and then vertically flipped. The
  11394. <var>overlay</var> filter takes in input the first unchanged output of the
  11395. split filter (which was labelled as <var>[main]</var>), and overlay on its
  11396. lower half the output generated by the <var>crop,vflip</var> filterchain.
  11397. </p>
  11398. <p>Some filters take in input a list of parameters: they are specified
  11399. after the filter name and an equal sign, and are separated from each other
  11400. by a colon.
  11401. </p>
  11402. <p>There exist so-called <var>source filters</var> that do not have an
  11403. audio/video input, and <var>sink filters</var> that will not have audio/video
  11404. output.
  11405. </p>
  11406. <a name="graph2dot"></a>
  11407. <h1 class="chapter"><a href="ffplay-all.html#toc-graph2dot">22 graph2dot</a></h1>
  11408. <p>The &lsquo;<tt>graph2dot</tt>&rsquo; program included in the FFmpeg &lsquo;<tt>tools</tt>&rsquo;
  11409. directory can be used to parse a filtergraph description and issue a
  11410. corresponding textual representation in the dot language.
  11411. </p>
  11412. <p>Invoke the command:
  11413. </p><div class="example">
  11414. <pre class="example">graph2dot -h
  11415. </pre></div>
  11416. <p>to see how to use &lsquo;<tt>graph2dot</tt>&rsquo;.
  11417. </p>
  11418. <p>You can then pass the dot description to the &lsquo;<tt>dot</tt>&rsquo; program (from
  11419. the graphviz suite of programs) and obtain a graphical representation
  11420. of the filtergraph.
  11421. </p>
  11422. <p>For example the sequence of commands:
  11423. </p><div class="example">
  11424. <pre class="example">echo <var>GRAPH_DESCRIPTION</var> | \
  11425. tools/graph2dot -o graph.tmp &amp;&amp; \
  11426. dot -Tpng graph.tmp -o graph.png &amp;&amp; \
  11427. display graph.png
  11428. </pre></div>
  11429. <p>can be used to create and display an image representing the graph
  11430. described by the <var>GRAPH_DESCRIPTION</var> string. Note that this string must be
  11431. a complete self-contained graph, with its inputs and outputs explicitly defined.
  11432. For example if your command line is of the form:
  11433. </p><div class="example">
  11434. <pre class="example">ffmpeg -i infile -vf scale=640:360 outfile
  11435. </pre></div>
  11436. <p>your <var>GRAPH_DESCRIPTION</var> string will need to be of the form:
  11437. </p><div class="example">
  11438. <pre class="example">nullsrc,scale=640:360,nullsink
  11439. </pre></div>
  11440. <p>you may also need to set the <var>nullsrc</var> parameters and add a <var>format</var>
  11441. filter in order to simulate a specific input file.
  11442. </p>
  11443. <a name="Filtergraph-description"></a>
  11444. <h1 class="chapter"><a href="ffplay-all.html#toc-Filtergraph-description">23 Filtergraph description</a></h1>
  11445. <p>A filtergraph is a directed graph of connected filters. It can contain
  11446. cycles, and there can be multiple links between a pair of
  11447. filters. Each link has one input pad on one side connecting it to one
  11448. filter from which it takes its input, and one output pad on the other
  11449. side connecting it to one filter accepting its output.
  11450. </p>
  11451. <p>Each filter in a filtergraph is an instance of a filter class
  11452. registered in the application, which defines the features and the
  11453. number of input and output pads of the filter.
  11454. </p>
  11455. <p>A filter with no input pads is called a &quot;source&quot;, and a filter with no
  11456. output pads is called a &quot;sink&quot;.
  11457. </p>
  11458. <p><a name="Filtergraph-syntax"></a>
  11459. </p><a name="Filtergraph-syntax-1"></a>
  11460. <h2 class="section"><a href="ffplay-all.html#toc-Filtergraph-syntax-1">23.1 Filtergraph syntax</a></h2>
  11461. <p>A filtergraph has a textual representation, which is recognized by the
  11462. &lsquo;<samp>-filter</samp>&rsquo;/&lsquo;<samp>-vf</samp>&rsquo;/&lsquo;<samp>-af</samp>&rsquo; and
  11463. &lsquo;<samp>-filter_complex</samp>&rsquo; options in <code>ffmpeg</code> and
  11464. &lsquo;<samp>-vf</samp>&rsquo;/&lsquo;<samp>-af</samp>&rsquo; in <code>ffplay</code>, and by the
  11465. <code>avfilter_graph_parse_ptr()</code> function defined in
  11466. &lsquo;<tt>libavfilter/avfilter.h</tt>&rsquo;.
  11467. </p>
  11468. <p>A filterchain consists of a sequence of connected filters, each one
  11469. connected to the previous one in the sequence. A filterchain is
  11470. represented by a list of &quot;,&quot;-separated filter descriptions.
  11471. </p>
  11472. <p>A filtergraph consists of a sequence of filterchains. A sequence of
  11473. filterchains is represented by a list of &quot;;&quot;-separated filterchain
  11474. descriptions.
  11475. </p>
  11476. <p>A filter is represented by a string of the form:
  11477. [<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>]
  11478. </p>
  11479. <p><var>filter_name</var> is the name of the filter class of which the
  11480. described filter is an instance of, and has to be the name of one of
  11481. the filter classes registered in the program optionally followed by &quot;@<var>id</var>&quot;.
  11482. The name of the filter class is optionally followed by a string
  11483. &quot;=<var>arguments</var>&quot;.
  11484. </p>
  11485. <p><var>arguments</var> is a string which contains the parameters used to
  11486. initialize the filter instance. It may have one of two forms:
  11487. </p><ul>
  11488. <li>
  11489. A &rsquo;:&rsquo;-separated list of <var>key=value</var> pairs.
  11490. </li><li>
  11491. A &rsquo;:&rsquo;-separated list of <var>value</var>. In this case, the keys are assumed to be
  11492. the option names in the order they are declared. E.g. the <code>fade</code> filter
  11493. declares three options in this order &ndash; &lsquo;<samp>type</samp>&rsquo;, &lsquo;<samp>start_frame</samp>&rsquo; and
  11494. &lsquo;<samp>nb_frames</samp>&rsquo;. Then the parameter list <var>in:0:30</var> means that the value
  11495. <var>in</var> is assigned to the option &lsquo;<samp>type</samp>&rsquo;, <var>0</var> to
  11496. &lsquo;<samp>start_frame</samp>&rsquo; and <var>30</var> to &lsquo;<samp>nb_frames</samp>&rsquo;.
  11497. </li><li>
  11498. A &rsquo;:&rsquo;-separated list of mixed direct <var>value</var> and long <var>key=value</var>
  11499. pairs. The direct <var>value</var> must precede the <var>key=value</var> pairs, and
  11500. follow the same constraints order of the previous point. The following
  11501. <var>key=value</var> pairs can be set in any preferred order.
  11502. </li></ul>
  11503. <p>If the option value itself is a list of items (e.g. the <code>format</code> filter
  11504. takes a list of pixel formats), the items in the list are usually separated by
  11505. &lsquo;<samp>|</samp>&rsquo;.
  11506. </p>
  11507. <p>The list of arguments can be quoted using the character &lsquo;<samp>'</samp>&rsquo; as initial
  11508. and ending mark, and the character &lsquo;<samp>\</samp>&rsquo; for escaping the characters
  11509. within the quoted text; otherwise the argument string is considered
  11510. terminated when the next special character (belonging to the set
  11511. &lsquo;<samp>[]=;,</samp>&rsquo;) is encountered.
  11512. </p>
  11513. <p>The name and arguments of the filter are optionally preceded and
  11514. followed by a list of link labels.
  11515. A link label allows one to name a link and associate it to a filter output
  11516. or input pad. The preceding labels <var>in_link_1</var>
  11517. ... <var>in_link_N</var>, are associated to the filter input pads,
  11518. the following labels <var>out_link_1</var> ... <var>out_link_M</var>, are
  11519. associated to the output pads.
  11520. </p>
  11521. <p>When two link labels with the same name are found in the
  11522. filtergraph, a link between the corresponding input and output pad is
  11523. created.
  11524. </p>
  11525. <p>If an output pad is not labelled, it is linked by default to the first
  11526. unlabelled input pad of the next filter in the filterchain.
  11527. For example in the filterchain
  11528. </p><div class="example">
  11529. <pre class="example">nullsrc, split[L1], [L2]overlay, nullsink
  11530. </pre></div>
  11531. <p>the split filter instance has two output pads, and the overlay filter
  11532. instance two input pads. The first output pad of split is labelled
  11533. &quot;L1&quot;, the first input pad of overlay is labelled &quot;L2&quot;, and the second
  11534. output pad of split is linked to the second input pad of overlay,
  11535. which are both unlabelled.
  11536. </p>
  11537. <p>In a filter description, if the input label of the first filter is not
  11538. specified, &quot;in&quot; is assumed; if the output label of the last filter is not
  11539. specified, &quot;out&quot; is assumed.
  11540. </p>
  11541. <p>In a complete filterchain all the unlabelled filter input and output
  11542. pads must be connected. A filtergraph is considered valid if all the
  11543. filter input and output pads of all the filterchains are connected.
  11544. </p>
  11545. <p>Libavfilter will automatically insert <a href="#scale">scale</a> filters where format
  11546. conversion is required. It is possible to specify swscale flags
  11547. for those automatically inserted scalers by prepending
  11548. <code>sws_flags=<var>flags</var>;</code>
  11549. to the filtergraph description.
  11550. </p>
  11551. <p>Here is a BNF description of the filtergraph syntax:
  11552. </p><div class="example">
  11553. <pre class="example"><var>NAME</var> ::= sequence of alphanumeric characters and '_'
  11554. <var>FILTER_NAME</var> ::= <var>NAME</var>[&quot;@&quot;<var>NAME</var>]
  11555. <var>LINKLABEL</var> ::= &quot;[&quot; <var>NAME</var> &quot;]&quot;
  11556. <var>LINKLABELS</var> ::= <var>LINKLABEL</var> [<var>LINKLABELS</var>]
  11557. <var>FILTER_ARGUMENTS</var> ::= sequence of chars (possibly quoted)
  11558. <var>FILTER</var> ::= [<var>LINKLABELS</var>] <var>FILTER_NAME</var> [&quot;=&quot; <var>FILTER_ARGUMENTS</var>] [<var>LINKLABELS</var>]
  11559. <var>FILTERCHAIN</var> ::= <var>FILTER</var> [,<var>FILTERCHAIN</var>]
  11560. <var>FILTERGRAPH</var> ::= [sws_flags=<var>flags</var>;] <var>FILTERCHAIN</var> [;<var>FILTERGRAPH</var>]
  11561. </pre></div>
  11562. <p><a name="filtergraph-escaping"></a>
  11563. </p><a name="Notes-on-filtergraph-escaping"></a>
  11564. <h2 class="section"><a href="ffplay-all.html#toc-Notes-on-filtergraph-escaping">23.2 Notes on filtergraph escaping</a></h2>
  11565. <p>Filtergraph description composition entails several levels of
  11566. escaping. See <a href="ffmpeg-utils.html#quoting_005fand_005fescaping">(ffmpeg-utils)the &quot;Quoting and escaping&quot; section in the ffmpeg-utils(1) manual</a> for more
  11567. information about the employed escaping procedure.
  11568. </p>
  11569. <p>A first level escaping affects the content of each filter option
  11570. value, which may contain the special character <code>:</code> used to
  11571. separate values, or one of the escaping characters <code>\'</code>.
  11572. </p>
  11573. <p>A second level escaping affects the whole filter description, which
  11574. may contain the escaping characters <code>\'</code> or the special
  11575. characters <code>[],;</code> used by the filtergraph description.
  11576. </p>
  11577. <p>Finally, when you specify a filtergraph on a shell commandline, you
  11578. need to perform a third level escaping for the shell special
  11579. characters contained within it.
  11580. </p>
  11581. <p>For example, consider the following string to be embedded in
  11582. the <a href="#drawtext">drawtext</a> filter description &lsquo;<samp>text</samp>&rsquo; value:
  11583. </p><div class="example">
  11584. <pre class="example">this is a 'string': may contain one, or more, special characters
  11585. </pre></div>
  11586. <p>This string contains the <code>'</code> special escaping character, and the
  11587. <code>:</code> special character, so it needs to be escaped in this way:
  11588. </p><div class="example">
  11589. <pre class="example">text=this is a \'string\'\: may contain one, or more, special characters
  11590. </pre></div>
  11591. <p>A second level of escaping is required when embedding the filter
  11592. description in a filtergraph description, in order to escape all the
  11593. filtergraph special characters. Thus the example above becomes:
  11594. </p><div class="example">
  11595. <pre class="example">drawtext=text=this is a \\\'string\\\'\\: may contain one\, or more\, special characters
  11596. </pre></div>
  11597. <p>(note that in addition to the <code>\'</code> escaping special characters,
  11598. also <code>,</code> needs to be escaped).
  11599. </p>
  11600. <p>Finally an additional level of escaping is needed when writing the
  11601. filtergraph description in a shell command, which depends on the
  11602. escaping rules of the adopted shell. For example, assuming that
  11603. <code>\</code> is special and needs to be escaped with another <code>\</code>, the
  11604. previous string will finally result in:
  11605. </p><div class="example">
  11606. <pre class="example">-vf &quot;drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters&quot;
  11607. </pre></div>
  11608. <a name="Timeline-editing"></a>
  11609. <h1 class="chapter"><a href="ffplay-all.html#toc-Timeline-editing">24 Timeline editing</a></h1>
  11610. <p>Some filters support a generic &lsquo;<samp>enable</samp>&rsquo; option. For the filters
  11611. supporting timeline editing, this option can be set to an expression which is
  11612. evaluated before sending a frame to the filter. If the evaluation is non-zero,
  11613. the filter will be enabled, otherwise the frame will be sent unchanged to the
  11614. next filter in the filtergraph.
  11615. </p>
  11616. <p>The expression accepts the following values:
  11617. </p><dl compact="compact">
  11618. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  11619. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  11620. </p>
  11621. </dd>
  11622. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  11623. <dd><p>sequential number of the input frame, starting from 0
  11624. </p>
  11625. </dd>
  11626. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  11627. <dd><p>the position in the file of the input frame, NAN if unknown
  11628. </p>
  11629. </dd>
  11630. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  11631. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  11632. <dd><p>width and height of the input frame if video
  11633. </p></dd>
  11634. </dl>
  11635. <p>Additionally, these filters support an &lsquo;<samp>enable</samp>&rsquo; command that can be used
  11636. to re-define the expression.
  11637. </p>
  11638. <p>Like any other filtering option, the &lsquo;<samp>enable</samp>&rsquo; option follows the same
  11639. rules.
  11640. </p>
  11641. <p>For example, to enable a blur filter (<a href="#smartblur">smartblur</a>) from 10 seconds to 3
  11642. minutes, and a <a href="#curves">curves</a> filter starting at 3 seconds:
  11643. </p><div class="example">
  11644. <pre class="example">smartblur = enable='between(t,10,3*60)',
  11645. curves = enable='gte(t,3)' : preset=cross_process
  11646. </pre></div>
  11647. <p>See <code>ffmpeg -filters</code> to view which filters have timeline support.
  11648. </p>
  11649. <p><a name="commands"></a>
  11650. </p><a name="Changing-options-at-runtime-with-a-command"></a>
  11651. <h1 class="chapter"><a href="ffplay-all.html#toc-Changing-options-at-runtime-with-a-command">25 Changing options at runtime with a command</a></h1>
  11652. <p>Some options can be changed during the operation of the filter using
  11653. a command. These options are marked &rsquo;T&rsquo; on the output of
  11654. <code>ffmpeg</code> &lsquo;<samp>-h filter=&lt;name of filter&gt;</samp>&rsquo;.
  11655. The name of the command is the name of the option and the argument is
  11656. the new value.
  11657. </p>
  11658. <p><a name="framesync"></a>
  11659. </p><a name="Options-for-filters-with-several-inputs-_0028framesync_0029"></a>
  11660. <h1 class="chapter"><a href="ffplay-all.html#toc-Options-for-filters-with-several-inputs-_0028framesync_0029">26 Options for filters with several inputs (framesync)</a></h1>
  11661. <p>Some filters with several inputs support a common set of options.
  11662. These options can only be set by name, not with the short notation.
  11663. </p>
  11664. <dl compact="compact">
  11665. <dt>&lsquo;<samp>eof_action</samp>&rsquo;</dt>
  11666. <dd><p>The action to take when EOF is encountered on the secondary input; it accepts
  11667. one of the following values:
  11668. </p>
  11669. <dl compact="compact">
  11670. <dt>&lsquo;<samp>repeat</samp>&rsquo;</dt>
  11671. <dd><p>Repeat the last frame (the default).
  11672. </p></dd>
  11673. <dt>&lsquo;<samp>endall</samp>&rsquo;</dt>
  11674. <dd><p>End both streams.
  11675. </p></dd>
  11676. <dt>&lsquo;<samp>pass</samp>&rsquo;</dt>
  11677. <dd><p>Pass the main input through.
  11678. </p></dd>
  11679. </dl>
  11680. </dd>
  11681. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  11682. <dd><p>If set to 1, force the output to terminate when the shortest input
  11683. terminates. Default value is 0.
  11684. </p>
  11685. </dd>
  11686. <dt>&lsquo;<samp>repeatlast</samp>&rsquo;</dt>
  11687. <dd><p>If set to 1, force the filter to extend the last frame of secondary streams
  11688. until the end of the primary stream. A value of 0 disables this behavior.
  11689. Default value is 1.
  11690. </p></dd>
  11691. </dl>
  11692. <a name="Audio-Filters"></a>
  11693. <h1 class="chapter"><a href="ffplay-all.html#toc-Audio-Filters">27 Audio Filters</a></h1>
  11694. <p>When you configure your FFmpeg build, you can disable any of the
  11695. existing filters using <code>--disable-filters</code>.
  11696. The configure output will show the audio filters included in your
  11697. build.
  11698. </p>
  11699. <p>Below is a description of the currently available audio filters.
  11700. </p>
  11701. <a name="acompressor"></a>
  11702. <h2 class="section"><a href="ffplay-all.html#toc-acompressor">27.1 acompressor</a></h2>
  11703. <p>A compressor is mainly used to reduce the dynamic range of a signal.
  11704. Especially modern music is mostly compressed at a high ratio to
  11705. improve the overall loudness. It&rsquo;s done to get the highest attention
  11706. of a listener, &quot;fatten&quot; the sound and bring more &quot;power&quot; to the track.
  11707. If a signal is compressed too much it may sound dull or &quot;dead&quot;
  11708. afterwards or it may start to &quot;pump&quot; (which could be a powerful effect
  11709. but can also destroy a track completely).
  11710. The right compression is the key to reach a professional sound and is
  11711. the high art of mixing and mastering. Because of its complex settings
  11712. it may take a long time to get the right feeling for this kind of effect.
  11713. </p>
  11714. <p>Compression is done by detecting the volume above a chosen level
  11715. <code>threshold</code> and dividing it by the factor set with <code>ratio</code>.
  11716. So if you set the threshold to -12dB and your signal reaches -6dB a ratio
  11717. of 2:1 will result in a signal at -9dB. Because an exact manipulation of
  11718. the signal would cause distortion of the waveform the reduction can be
  11719. levelled over the time. This is done by setting &quot;Attack&quot; and &quot;Release&quot;.
  11720. <code>attack</code> determines how long the signal has to rise above the threshold
  11721. before any reduction will occur and <code>release</code> sets the time the signal
  11722. has to fall below the threshold to reduce the reduction again. Shorter signals
  11723. than the chosen attack time will be left untouched.
  11724. The overall reduction of the signal can be made up afterwards with the
  11725. <code>makeup</code> setting. So compressing the peaks of a signal about 6dB and
  11726. raising the makeup to this level results in a signal twice as loud than the
  11727. source. To gain a softer entry in the compression the <code>knee</code> flattens the
  11728. hard edge at the threshold in the range of the chosen decibels.
  11729. </p>
  11730. <p>The filter accepts the following options:
  11731. </p>
  11732. <dl compact="compact">
  11733. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  11734. <dd><p>Set input gain. Default is 1. Range is between 0.015625 and 64.
  11735. </p>
  11736. </dd>
  11737. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  11738. <dd><p>Set mode of compressor operation. Can be <code>upward</code> or <code>downward</code>.
  11739. Default is <code>downward</code>.
  11740. </p>
  11741. </dd>
  11742. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  11743. <dd><p>If a signal of stream rises above this level it will affect the gain
  11744. reduction.
  11745. By default it is 0.125. Range is between 0.00097563 and 1.
  11746. </p>
  11747. </dd>
  11748. <dt>&lsquo;<samp>ratio</samp>&rsquo;</dt>
  11749. <dd><p>Set a ratio by which the signal is reduced. 1:2 means that if the level
  11750. rose 4dB above the threshold, it will be only 2dB above after the reduction.
  11751. Default is 2. Range is between 1 and 20.
  11752. </p>
  11753. </dd>
  11754. <dt>&lsquo;<samp>attack</samp>&rsquo;</dt>
  11755. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  11756. reduction starts. Default is 20. Range is between 0.01 and 2000.
  11757. </p>
  11758. </dd>
  11759. <dt>&lsquo;<samp>release</samp>&rsquo;</dt>
  11760. <dd><p>Amount of milliseconds the signal has to fall below the threshold before
  11761. reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
  11762. </p>
  11763. </dd>
  11764. <dt>&lsquo;<samp>makeup</samp>&rsquo;</dt>
  11765. <dd><p>Set the amount by how much signal will be amplified after processing.
  11766. Default is 1. Range is from 1 to 64.
  11767. </p>
  11768. </dd>
  11769. <dt>&lsquo;<samp>knee</samp>&rsquo;</dt>
  11770. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  11771. Default is 2.82843. Range is between 1 and 8.
  11772. </p>
  11773. </dd>
  11774. <dt>&lsquo;<samp>link</samp>&rsquo;</dt>
  11775. <dd><p>Choose if the <code>average</code> level between all channels of input stream
  11776. or the louder(<code>maximum</code>) channel of input stream affects the
  11777. reduction. Default is <code>average</code>.
  11778. </p>
  11779. </dd>
  11780. <dt>&lsquo;<samp>detection</samp>&rsquo;</dt>
  11781. <dd><p>Should the exact signal be taken in case of <code>peak</code> or an RMS one in case
  11782. of <code>rms</code>. Default is <code>rms</code> which is mostly smoother.
  11783. </p>
  11784. </dd>
  11785. <dt>&lsquo;<samp>mix</samp>&rsquo;</dt>
  11786. <dd><p>How much to use compressed signal in output. Default is 1.
  11787. Range is between 0 and 1.
  11788. </p></dd>
  11789. </dl>
  11790. <a name="Commands-4"></a>
  11791. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-4">27.1.1 Commands</a></h3>
  11792. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  11793. </p>
  11794. <a name="acontrast"></a>
  11795. <h2 class="section"><a href="ffplay-all.html#toc-acontrast">27.2 acontrast</a></h2>
  11796. <p>Simple audio dynamic range compression/expansion filter.
  11797. </p>
  11798. <p>The filter accepts the following options:
  11799. </p>
  11800. <dl compact="compact">
  11801. <dt>&lsquo;<samp>contrast</samp>&rsquo;</dt>
  11802. <dd><p>Set contrast. Default is 33. Allowed range is between 0 and 100.
  11803. </p></dd>
  11804. </dl>
  11805. <a name="acopy"></a>
  11806. <h2 class="section"><a href="ffplay-all.html#toc-acopy">27.3 acopy</a></h2>
  11807. <p>Copy the input audio source unchanged to the output. This is mainly useful for
  11808. testing purposes.
  11809. </p>
  11810. <a name="acrossfade"></a>
  11811. <h2 class="section"><a href="ffplay-all.html#toc-acrossfade">27.4 acrossfade</a></h2>
  11812. <p>Apply cross fade from one input audio stream to another input audio stream.
  11813. The cross fade is applied for specified duration near the end of first stream.
  11814. </p>
  11815. <p>The filter accepts the following options:
  11816. </p>
  11817. <dl compact="compact">
  11818. <dt>&lsquo;<samp>nb_samples, ns</samp>&rsquo;</dt>
  11819. <dd><p>Specify the number of samples for which the cross fade effect has to last.
  11820. At the end of the cross fade effect the first input audio will be completely
  11821. silent. Default is 44100.
  11822. </p>
  11823. </dd>
  11824. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  11825. <dd><p>Specify the duration of the cross fade effect. See
  11826. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  11827. for the accepted syntax.
  11828. By default the duration is determined by <var>nb_samples</var>.
  11829. If set this option is used instead of <var>nb_samples</var>.
  11830. </p>
  11831. </dd>
  11832. <dt>&lsquo;<samp>overlap, o</samp>&rsquo;</dt>
  11833. <dd><p>Should first stream end overlap with second stream start. Default is enabled.
  11834. </p>
  11835. </dd>
  11836. <dt>&lsquo;<samp>curve1</samp>&rsquo;</dt>
  11837. <dd><p>Set curve for cross fade transition for first stream.
  11838. </p>
  11839. </dd>
  11840. <dt>&lsquo;<samp>curve2</samp>&rsquo;</dt>
  11841. <dd><p>Set curve for cross fade transition for second stream.
  11842. </p>
  11843. <p>For description of available curve types see <a href="#afade">afade</a> filter description.
  11844. </p></dd>
  11845. </dl>
  11846. <a name="Examples-66"></a>
  11847. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-66">27.4.1 Examples</a></h3>
  11848. <ul>
  11849. <li>
  11850. Cross fade from one input to another:
  11851. <div class="example">
  11852. <pre class="example">ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:c1=exp:c2=exp output.flac
  11853. </pre></div>
  11854. </li><li>
  11855. Cross fade from one input to another but without overlapping:
  11856. <div class="example">
  11857. <pre class="example">ffmpeg -i first.flac -i second.flac -filter_complex acrossfade=d=10:o=0:c1=exp:c2=exp output.flac
  11858. </pre></div>
  11859. </li></ul>
  11860. <a name="acrossover"></a>
  11861. <h2 class="section"><a href="ffplay-all.html#toc-acrossover">27.5 acrossover</a></h2>
  11862. <p>Split audio stream into several bands.
  11863. </p>
  11864. <p>This filter splits audio stream into two or more frequency ranges.
  11865. Summing all streams back will give flat output.
  11866. </p>
  11867. <p>The filter accepts the following options:
  11868. </p>
  11869. <dl compact="compact">
  11870. <dt>&lsquo;<samp>split</samp>&rsquo;</dt>
  11871. <dd><p>Set split frequencies. Those must be positive and increasing.
  11872. </p>
  11873. </dd>
  11874. <dt>&lsquo;<samp>order</samp>&rsquo;</dt>
  11875. <dd><p>Set filter order, can be <var>2nd</var>, <var>4th</var> or <var>8th</var>.
  11876. Default is <var>4th</var>.
  11877. </p></dd>
  11878. </dl>
  11879. <a name="acrusher"></a>
  11880. <h2 class="section"><a href="ffplay-all.html#toc-acrusher">27.6 acrusher</a></h2>
  11881. <p>Reduce audio bit resolution.
  11882. </p>
  11883. <p>This filter is bit crusher with enhanced functionality. A bit crusher
  11884. is used to audibly reduce number of bits an audio signal is sampled
  11885. with. This doesn&rsquo;t change the bit depth at all, it just produces the
  11886. effect. Material reduced in bit depth sounds more harsh and &quot;digital&quot;.
  11887. This filter is able to even round to continuous values instead of discrete
  11888. bit depths.
  11889. Additionally it has a D/C offset which results in different crushing of
  11890. the lower and the upper half of the signal.
  11891. An Anti-Aliasing setting is able to produce &quot;softer&quot; crushing sounds.
  11892. </p>
  11893. <p>Another feature of this filter is the logarithmic mode.
  11894. This setting switches from linear distances between bits to logarithmic ones.
  11895. The result is a much more &quot;natural&quot; sounding crusher which doesn&rsquo;t gate low
  11896. signals for example. The human ear has a logarithmic perception,
  11897. so this kind of crushing is much more pleasant.
  11898. Logarithmic crushing is also able to get anti-aliased.
  11899. </p>
  11900. <p>The filter accepts the following options:
  11901. </p>
  11902. <dl compact="compact">
  11903. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  11904. <dd><p>Set level in.
  11905. </p>
  11906. </dd>
  11907. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  11908. <dd><p>Set level out.
  11909. </p>
  11910. </dd>
  11911. <dt>&lsquo;<samp>bits</samp>&rsquo;</dt>
  11912. <dd><p>Set bit reduction.
  11913. </p>
  11914. </dd>
  11915. <dt>&lsquo;<samp>mix</samp>&rsquo;</dt>
  11916. <dd><p>Set mixing amount.
  11917. </p>
  11918. </dd>
  11919. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  11920. <dd><p>Can be linear: <code>lin</code> or logarithmic: <code>log</code>.
  11921. </p>
  11922. </dd>
  11923. <dt>&lsquo;<samp>dc</samp>&rsquo;</dt>
  11924. <dd><p>Set DC.
  11925. </p>
  11926. </dd>
  11927. <dt>&lsquo;<samp>aa</samp>&rsquo;</dt>
  11928. <dd><p>Set anti-aliasing.
  11929. </p>
  11930. </dd>
  11931. <dt>&lsquo;<samp>samples</samp>&rsquo;</dt>
  11932. <dd><p>Set sample reduction.
  11933. </p>
  11934. </dd>
  11935. <dt>&lsquo;<samp>lfo</samp>&rsquo;</dt>
  11936. <dd><p>Enable LFO. By default disabled.
  11937. </p>
  11938. </dd>
  11939. <dt>&lsquo;<samp>lforange</samp>&rsquo;</dt>
  11940. <dd><p>Set LFO range.
  11941. </p>
  11942. </dd>
  11943. <dt>&lsquo;<samp>lforate</samp>&rsquo;</dt>
  11944. <dd><p>Set LFO rate.
  11945. </p></dd>
  11946. </dl>
  11947. <a name="acue"></a>
  11948. <h2 class="section"><a href="ffplay-all.html#toc-acue">27.7 acue</a></h2>
  11949. <p>Delay audio filtering until a given wallclock timestamp. See the <a href="#cue">cue</a>
  11950. filter.
  11951. </p>
  11952. <a name="adeclick"></a>
  11953. <h2 class="section"><a href="ffplay-all.html#toc-adeclick">27.8 adeclick</a></h2>
  11954. <p>Remove impulsive noise from input audio.
  11955. </p>
  11956. <p>Samples detected as impulsive noise are replaced by interpolated samples using
  11957. autoregressive modelling.
  11958. </p>
  11959. <dl compact="compact">
  11960. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  11961. <dd><p>Set window size, in milliseconds. Allowed range is from <code>10</code> to
  11962. <code>100</code>. Default value is <code>55</code> milliseconds.
  11963. This sets size of window which will be processed at once.
  11964. </p>
  11965. </dd>
  11966. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  11967. <dd><p>Set window overlap, in percentage of window size. Allowed range is from
  11968. <code>50</code> to <code>95</code>. Default value is <code>75</code> percent.
  11969. Setting this to a very high value increases impulsive noise removal but makes
  11970. whole process much slower.
  11971. </p>
  11972. </dd>
  11973. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  11974. <dd><p>Set autoregression order, in percentage of window size. Allowed range is from
  11975. <code>0</code> to <code>25</code>. Default value is <code>2</code> percent. This option also
  11976. controls quality of interpolated samples using neighbour good samples.
  11977. </p>
  11978. </dd>
  11979. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  11980. <dd><p>Set threshold value. Allowed range is from <code>1</code> to <code>100</code>.
  11981. Default value is <code>2</code>.
  11982. This controls the strength of impulsive noise which is going to be removed.
  11983. The lower value, the more samples will be detected as impulsive noise.
  11984. </p>
  11985. </dd>
  11986. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  11987. <dd><p>Set burst fusion, in percentage of window size. Allowed range is <code>0</code> to
  11988. <code>10</code>. Default value is <code>2</code>.
  11989. If any two samples detected as noise are spaced less than this value then any
  11990. sample between those two samples will be also detected as noise.
  11991. </p>
  11992. </dd>
  11993. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  11994. <dd><p>Set overlap method.
  11995. </p>
  11996. <p>It accepts the following values:
  11997. </p><dl compact="compact">
  11998. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  11999. <dd><p>Select overlap-add method. Even not interpolated samples are slightly
  12000. changed with this method.
  12001. </p>
  12002. </dd>
  12003. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  12004. <dd><p>Select overlap-save method. Not interpolated samples remain unchanged.
  12005. </p></dd>
  12006. </dl>
  12007. <p>Default value is <code>a</code>.
  12008. </p></dd>
  12009. </dl>
  12010. <a name="adeclip"></a>
  12011. <h2 class="section"><a href="ffplay-all.html#toc-adeclip">27.9 adeclip</a></h2>
  12012. <p>Remove clipped samples from input audio.
  12013. </p>
  12014. <p>Samples detected as clipped are replaced by interpolated samples using
  12015. autoregressive modelling.
  12016. </p>
  12017. <dl compact="compact">
  12018. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  12019. <dd><p>Set window size, in milliseconds. Allowed range is from <code>10</code> to <code>100</code>.
  12020. Default value is <code>55</code> milliseconds.
  12021. This sets size of window which will be processed at once.
  12022. </p>
  12023. </dd>
  12024. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  12025. <dd><p>Set window overlap, in percentage of window size. Allowed range is from <code>50</code>
  12026. to <code>95</code>. Default value is <code>75</code> percent.
  12027. </p>
  12028. </dd>
  12029. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  12030. <dd><p>Set autoregression order, in percentage of window size. Allowed range is from
  12031. <code>0</code> to <code>25</code>. Default value is <code>8</code> percent. This option also controls
  12032. quality of interpolated samples using neighbour good samples.
  12033. </p>
  12034. </dd>
  12035. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  12036. <dd><p>Set threshold value. Allowed range is from <code>1</code> to <code>100</code>.
  12037. Default value is <code>10</code>. Higher values make clip detection less aggressive.
  12038. </p>
  12039. </dd>
  12040. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  12041. <dd><p>Set size of histogram used to detect clips. Allowed range is from <code>100</code> to <code>9999</code>.
  12042. Default value is <code>1000</code>. Higher values make clip detection less aggressive.
  12043. </p>
  12044. </dd>
  12045. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  12046. <dd><p>Set overlap method.
  12047. </p>
  12048. <p>It accepts the following values:
  12049. </p><dl compact="compact">
  12050. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  12051. <dd><p>Select overlap-add method. Even not interpolated samples are slightly changed
  12052. with this method.
  12053. </p>
  12054. </dd>
  12055. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  12056. <dd><p>Select overlap-save method. Not interpolated samples remain unchanged.
  12057. </p></dd>
  12058. </dl>
  12059. <p>Default value is <code>a</code>.
  12060. </p></dd>
  12061. </dl>
  12062. <a name="adelay"></a>
  12063. <h2 class="section"><a href="ffplay-all.html#toc-adelay">27.10 adelay</a></h2>
  12064. <p>Delay one or more audio channels.
  12065. </p>
  12066. <p>Samples in delayed channel are filled with silence.
  12067. </p>
  12068. <p>The filter accepts the following option:
  12069. </p>
  12070. <dl compact="compact">
  12071. <dt>&lsquo;<samp>delays</samp>&rsquo;</dt>
  12072. <dd><p>Set list of delays in milliseconds for each channel separated by &rsquo;|&rsquo;.
  12073. Unused delays will be silently ignored. If number of given delays is
  12074. smaller than number of channels all remaining channels will not be delayed.
  12075. If you want to delay exact number of samples, append &rsquo;S&rsquo; to number.
  12076. If you want instead to delay in seconds, append &rsquo;s&rsquo; to number.
  12077. </p>
  12078. </dd>
  12079. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  12080. <dd><p>Use last set delay for all remaining channels. By default is disabled.
  12081. This option if enabled changes how option <code>delays</code> is interpreted.
  12082. </p></dd>
  12083. </dl>
  12084. <a name="Examples-20"></a>
  12085. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-20">27.10.1 Examples</a></h3>
  12086. <ul>
  12087. <li>
  12088. Delay first channel by 1.5 seconds, the third channel by 0.5 seconds and leave
  12089. the second channel (and any other channels that may be present) unchanged.
  12090. <div class="example">
  12091. <pre class="example">adelay=1500|0|500
  12092. </pre></div>
  12093. </li><li>
  12094. Delay second channel by 500 samples, the third channel by 700 samples and leave
  12095. the first channel (and any other channels that may be present) unchanged.
  12096. <div class="example">
  12097. <pre class="example">adelay=0|500S|700S
  12098. </pre></div>
  12099. </li><li>
  12100. Delay all channels by same number of samples:
  12101. <div class="example">
  12102. <pre class="example">adelay=delays=64S:all=1
  12103. </pre></div>
  12104. </li></ul>
  12105. <a name="aderivative_002c-aintegral"></a>
  12106. <h2 class="section"><a href="ffplay-all.html#toc-aderivative_002c-aintegral">27.11 aderivative, aintegral</a></h2>
  12107. <p>Compute derivative/integral of audio stream.
  12108. </p>
  12109. <p>Applying both filters one after another produces original audio.
  12110. </p>
  12111. <a name="aecho"></a>
  12112. <h2 class="section"><a href="ffplay-all.html#toc-aecho">27.12 aecho</a></h2>
  12113. <p>Apply echoing to the input audio.
  12114. </p>
  12115. <p>Echoes are reflected sound and can occur naturally amongst mountains
  12116. (and sometimes large buildings) when talking or shouting; digital echo
  12117. effects emulate this behaviour and are often used to help fill out the
  12118. sound of a single instrument or vocal. The time difference between the
  12119. original signal and the reflection is the <code>delay</code>, and the
  12120. loudness of the reflected signal is the <code>decay</code>.
  12121. Multiple echoes can have different delays and decays.
  12122. </p>
  12123. <p>A description of the accepted parameters follows.
  12124. </p>
  12125. <dl compact="compact">
  12126. <dt>&lsquo;<samp>in_gain</samp>&rsquo;</dt>
  12127. <dd><p>Set input gain of reflected signal. Default is <code>0.6</code>.
  12128. </p>
  12129. </dd>
  12130. <dt>&lsquo;<samp>out_gain</samp>&rsquo;</dt>
  12131. <dd><p>Set output gain of reflected signal. Default is <code>0.3</code>.
  12132. </p>
  12133. </dd>
  12134. <dt>&lsquo;<samp>delays</samp>&rsquo;</dt>
  12135. <dd><p>Set list of time intervals in milliseconds between original signal and reflections
  12136. separated by &rsquo;|&rsquo;. Allowed range for each <code>delay</code> is <code>(0 - 90000.0]</code>.
  12137. Default is <code>1000</code>.
  12138. </p>
  12139. </dd>
  12140. <dt>&lsquo;<samp>decays</samp>&rsquo;</dt>
  12141. <dd><p>Set list of loudness of reflected signals separated by &rsquo;|&rsquo;.
  12142. Allowed range for each <code>decay</code> is <code>(0 - 1.0]</code>.
  12143. Default is <code>0.5</code>.
  12144. </p></dd>
  12145. </dl>
  12146. <a name="Examples-98"></a>
  12147. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-98">27.12.1 Examples</a></h3>
  12148. <ul>
  12149. <li>
  12150. Make it sound as if there are twice as many instruments as are actually playing:
  12151. <div class="example">
  12152. <pre class="example">aecho=0.8:0.88:60:0.4
  12153. </pre></div>
  12154. </li><li>
  12155. If delay is very short, then it sounds like a (metallic) robot playing music:
  12156. <div class="example">
  12157. <pre class="example">aecho=0.8:0.88:6:0.4
  12158. </pre></div>
  12159. </li><li>
  12160. A longer delay will sound like an open air concert in the mountains:
  12161. <div class="example">
  12162. <pre class="example">aecho=0.8:0.9:1000:0.3
  12163. </pre></div>
  12164. </li><li>
  12165. Same as above but with one more mountain:
  12166. <div class="example">
  12167. <pre class="example">aecho=0.8:0.9:1000|1800:0.3|0.25
  12168. </pre></div>
  12169. </li></ul>
  12170. <a name="aemphasis"></a>
  12171. <h2 class="section"><a href="ffplay-all.html#toc-aemphasis">27.13 aemphasis</a></h2>
  12172. <p>Audio emphasis filter creates or restores material directly taken from LPs or
  12173. emphased CDs with different filter curves. E.g. to store music on vinyl the
  12174. signal has to be altered by a filter first to even out the disadvantages of
  12175. this recording medium.
  12176. Once the material is played back the inverse filter has to be applied to
  12177. restore the distortion of the frequency response.
  12178. </p>
  12179. <p>The filter accepts the following options:
  12180. </p>
  12181. <dl compact="compact">
  12182. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  12183. <dd><p>Set input gain.
  12184. </p>
  12185. </dd>
  12186. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  12187. <dd><p>Set output gain.
  12188. </p>
  12189. </dd>
  12190. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  12191. <dd><p>Set filter mode. For restoring material use <code>reproduction</code> mode, otherwise
  12192. use <code>production</code> mode. Default is <code>reproduction</code> mode.
  12193. </p>
  12194. </dd>
  12195. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  12196. <dd><p>Set filter type. Selects medium. Can be one of the following:
  12197. </p>
  12198. <dl compact="compact">
  12199. <dt>&lsquo;<samp>col</samp>&rsquo;</dt>
  12200. <dd><p>select Columbia.
  12201. </p></dd>
  12202. <dt>&lsquo;<samp>emi</samp>&rsquo;</dt>
  12203. <dd><p>select EMI.
  12204. </p></dd>
  12205. <dt>&lsquo;<samp>bsi</samp>&rsquo;</dt>
  12206. <dd><p>select BSI (78RPM).
  12207. </p></dd>
  12208. <dt>&lsquo;<samp>riaa</samp>&rsquo;</dt>
  12209. <dd><p>select RIAA.
  12210. </p></dd>
  12211. <dt>&lsquo;<samp>cd</samp>&rsquo;</dt>
  12212. <dd><p>select Compact Disc (CD).
  12213. </p></dd>
  12214. <dt>&lsquo;<samp>50fm</samp>&rsquo;</dt>
  12215. <dd><p>select 50µs (FM).
  12216. </p></dd>
  12217. <dt>&lsquo;<samp>75fm</samp>&rsquo;</dt>
  12218. <dd><p>select 75µs (FM).
  12219. </p></dd>
  12220. <dt>&lsquo;<samp>50kf</samp>&rsquo;</dt>
  12221. <dd><p>select 50µs (FM-KF).
  12222. </p></dd>
  12223. <dt>&lsquo;<samp>75kf</samp>&rsquo;</dt>
  12224. <dd><p>select 75µs (FM-KF).
  12225. </p></dd>
  12226. </dl>
  12227. </dd>
  12228. </dl>
  12229. <a name="aeval"></a>
  12230. <h2 class="section"><a href="ffplay-all.html#toc-aeval">27.14 aeval</a></h2>
  12231. <p>Modify an audio signal according to the specified expressions.
  12232. </p>
  12233. <p>This filter accepts one or more expressions (one for each channel),
  12234. which are evaluated and used to modify a corresponding audio signal.
  12235. </p>
  12236. <p>It accepts the following parameters:
  12237. </p>
  12238. <dl compact="compact">
  12239. <dt>&lsquo;<samp>exprs</samp>&rsquo;</dt>
  12240. <dd><p>Set the &rsquo;|&rsquo;-separated expressions list for each separate channel. If
  12241. the number of input channels is greater than the number of
  12242. expressions, the last specified expression is used for the remaining
  12243. output channels.
  12244. </p>
  12245. </dd>
  12246. <dt>&lsquo;<samp>channel_layout, c</samp>&rsquo;</dt>
  12247. <dd><p>Set output channel layout. If not specified, the channel layout is
  12248. specified by the number of expressions. If set to &lsquo;<samp>same</samp>&rsquo;, it will
  12249. use by default the same input channel layout.
  12250. </p></dd>
  12251. </dl>
  12252. <p>Each expression in <var>exprs</var> can contain the following constants and functions:
  12253. </p>
  12254. <dl compact="compact">
  12255. <dt>&lsquo;<samp>ch</samp>&rsquo;</dt>
  12256. <dd><p>channel number of the current expression
  12257. </p>
  12258. </dd>
  12259. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  12260. <dd><p>number of the evaluated sample, starting from 0
  12261. </p>
  12262. </dd>
  12263. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  12264. <dd><p>sample rate
  12265. </p>
  12266. </dd>
  12267. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  12268. <dd><p>time of the evaluated sample expressed in seconds
  12269. </p>
  12270. </dd>
  12271. <dt>&lsquo;<samp>nb_in_channels</samp>&rsquo;</dt>
  12272. <dt>&lsquo;<samp>nb_out_channels</samp>&rsquo;</dt>
  12273. <dd><p>input and output number of channels
  12274. </p>
  12275. </dd>
  12276. <dt>&lsquo;<samp>val(CH)</samp>&rsquo;</dt>
  12277. <dd><p>the value of input channel with number <var>CH</var>
  12278. </p></dd>
  12279. </dl>
  12280. <p>Note: this filter is slow. For faster processing you should use a
  12281. dedicated filter.
  12282. </p>
  12283. <a name="Examples-139"></a>
  12284. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-139">27.14.1 Examples</a></h3>
  12285. <ul>
  12286. <li>
  12287. Half volume:
  12288. <div class="example">
  12289. <pre class="example">aeval=val(ch)/2:c=same
  12290. </pre></div>
  12291. </li><li>
  12292. Invert phase of the second channel:
  12293. <div class="example">
  12294. <pre class="example">aeval=val(0)|-val(1)
  12295. </pre></div>
  12296. </li></ul>
  12297. <p><a name="afade"></a>
  12298. </p><a name="afade-1"></a>
  12299. <h2 class="section"><a href="ffplay-all.html#toc-afade-1">27.15 afade</a></h2>
  12300. <p>Apply fade-in/out effect to input audio.
  12301. </p>
  12302. <p>A description of the accepted parameters follows.
  12303. </p>
  12304. <dl compact="compact">
  12305. <dt>&lsquo;<samp>type, t</samp>&rsquo;</dt>
  12306. <dd><p>Specify the effect type, can be either <code>in</code> for fade-in, or
  12307. <code>out</code> for a fade-out effect. Default is <code>in</code>.
  12308. </p>
  12309. </dd>
  12310. <dt>&lsquo;<samp>start_sample, ss</samp>&rsquo;</dt>
  12311. <dd><p>Specify the number of the start sample for starting to apply the fade
  12312. effect. Default is 0.
  12313. </p>
  12314. </dd>
  12315. <dt>&lsquo;<samp>nb_samples, ns</samp>&rsquo;</dt>
  12316. <dd><p>Specify the number of samples for which the fade effect has to last. At
  12317. the end of the fade-in effect the output audio will have the same
  12318. volume as the input audio, at the end of the fade-out transition
  12319. the output audio will be silence. Default is 44100.
  12320. </p>
  12321. </dd>
  12322. <dt>&lsquo;<samp>start_time, st</samp>&rsquo;</dt>
  12323. <dd><p>Specify the start time of the fade effect. Default is 0.
  12324. The value must be specified as a time duration; see
  12325. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  12326. for the accepted syntax.
  12327. If set this option is used instead of <var>start_sample</var>.
  12328. </p>
  12329. </dd>
  12330. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  12331. <dd><p>Specify the duration of the fade effect. See
  12332. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  12333. for the accepted syntax.
  12334. At the end of the fade-in effect the output audio will have the same
  12335. volume as the input audio, at the end of the fade-out transition
  12336. the output audio will be silence.
  12337. By default the duration is determined by <var>nb_samples</var>.
  12338. If set this option is used instead of <var>nb_samples</var>.
  12339. </p>
  12340. </dd>
  12341. <dt>&lsquo;<samp>curve</samp>&rsquo;</dt>
  12342. <dd><p>Set curve for fade transition.
  12343. </p>
  12344. <p>It accepts the following values:
  12345. </p><dl compact="compact">
  12346. <dt>&lsquo;<samp>tri</samp>&rsquo;</dt>
  12347. <dd><p>select triangular, linear slope (default)
  12348. </p></dd>
  12349. <dt>&lsquo;<samp>qsin</samp>&rsquo;</dt>
  12350. <dd><p>select quarter of sine wave
  12351. </p></dd>
  12352. <dt>&lsquo;<samp>hsin</samp>&rsquo;</dt>
  12353. <dd><p>select half of sine wave
  12354. </p></dd>
  12355. <dt>&lsquo;<samp>esin</samp>&rsquo;</dt>
  12356. <dd><p>select exponential sine wave
  12357. </p></dd>
  12358. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  12359. <dd><p>select logarithmic
  12360. </p></dd>
  12361. <dt>&lsquo;<samp>ipar</samp>&rsquo;</dt>
  12362. <dd><p>select inverted parabola
  12363. </p></dd>
  12364. <dt>&lsquo;<samp>qua</samp>&rsquo;</dt>
  12365. <dd><p>select quadratic
  12366. </p></dd>
  12367. <dt>&lsquo;<samp>cub</samp>&rsquo;</dt>
  12368. <dd><p>select cubic
  12369. </p></dd>
  12370. <dt>&lsquo;<samp>squ</samp>&rsquo;</dt>
  12371. <dd><p>select square root
  12372. </p></dd>
  12373. <dt>&lsquo;<samp>cbr</samp>&rsquo;</dt>
  12374. <dd><p>select cubic root
  12375. </p></dd>
  12376. <dt>&lsquo;<samp>par</samp>&rsquo;</dt>
  12377. <dd><p>select parabola
  12378. </p></dd>
  12379. <dt>&lsquo;<samp>exp</samp>&rsquo;</dt>
  12380. <dd><p>select exponential
  12381. </p></dd>
  12382. <dt>&lsquo;<samp>iqsin</samp>&rsquo;</dt>
  12383. <dd><p>select inverted quarter of sine wave
  12384. </p></dd>
  12385. <dt>&lsquo;<samp>ihsin</samp>&rsquo;</dt>
  12386. <dd><p>select inverted half of sine wave
  12387. </p></dd>
  12388. <dt>&lsquo;<samp>dese</samp>&rsquo;</dt>
  12389. <dd><p>select double-exponential seat
  12390. </p></dd>
  12391. <dt>&lsquo;<samp>desi</samp>&rsquo;</dt>
  12392. <dd><p>select double-exponential sigmoid
  12393. </p></dd>
  12394. <dt>&lsquo;<samp>losi</samp>&rsquo;</dt>
  12395. <dd><p>select logistic sigmoid
  12396. </p></dd>
  12397. <dt>&lsquo;<samp>nofade</samp>&rsquo;</dt>
  12398. <dd><p>no fade applied
  12399. </p></dd>
  12400. </dl>
  12401. </dd>
  12402. </dl>
  12403. <a name="Examples-105"></a>
  12404. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-105">27.15.1 Examples</a></h3>
  12405. <ul>
  12406. <li>
  12407. Fade in first 15 seconds of audio:
  12408. <div class="example">
  12409. <pre class="example">afade=t=in:ss=0:d=15
  12410. </pre></div>
  12411. </li><li>
  12412. Fade out last 25 seconds of a 900 seconds audio:
  12413. <div class="example">
  12414. <pre class="example">afade=t=out:st=875:d=25
  12415. </pre></div>
  12416. </li></ul>
  12417. <a name="afftdn"></a>
  12418. <h2 class="section"><a href="ffplay-all.html#toc-afftdn">27.16 afftdn</a></h2>
  12419. <p>Denoise audio samples with FFT.
  12420. </p>
  12421. <p>A description of the accepted parameters follows.
  12422. </p>
  12423. <dl compact="compact">
  12424. <dt>&lsquo;<samp>nr</samp>&rsquo;</dt>
  12425. <dd><p>Set the noise reduction in dB, allowed range is 0.01 to 97.
  12426. Default value is 12 dB.
  12427. </p>
  12428. </dd>
  12429. <dt>&lsquo;<samp>nf</samp>&rsquo;</dt>
  12430. <dd><p>Set the noise floor in dB, allowed range is -80 to -20.
  12431. Default value is -50 dB.
  12432. </p>
  12433. </dd>
  12434. <dt>&lsquo;<samp>nt</samp>&rsquo;</dt>
  12435. <dd><p>Set the noise type.
  12436. </p>
  12437. <p>It accepts the following values:
  12438. </p><dl compact="compact">
  12439. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  12440. <dd><p>Select white noise.
  12441. </p>
  12442. </dd>
  12443. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  12444. <dd><p>Select vinyl noise.
  12445. </p>
  12446. </dd>
  12447. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  12448. <dd><p>Select shellac noise.
  12449. </p>
  12450. </dd>
  12451. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  12452. <dd><p>Select custom noise, defined in <code>bn</code> option.
  12453. </p>
  12454. <p>Default value is white noise.
  12455. </p></dd>
  12456. </dl>
  12457. </dd>
  12458. <dt>&lsquo;<samp>bn</samp>&rsquo;</dt>
  12459. <dd><p>Set custom band noise for every one of 15 bands.
  12460. Bands are separated by &rsquo; &rsquo; or &rsquo;|&rsquo;.
  12461. </p>
  12462. </dd>
  12463. <dt>&lsquo;<samp>rf</samp>&rsquo;</dt>
  12464. <dd><p>Set the residual floor in dB, allowed range is -80 to -20.
  12465. Default value is -38 dB.
  12466. </p>
  12467. </dd>
  12468. <dt>&lsquo;<samp>tn</samp>&rsquo;</dt>
  12469. <dd><p>Enable noise tracking. By default is disabled.
  12470. With this enabled, noise floor is automatically adjusted.
  12471. </p>
  12472. </dd>
  12473. <dt>&lsquo;<samp>tr</samp>&rsquo;</dt>
  12474. <dd><p>Enable residual tracking. By default is disabled.
  12475. </p>
  12476. </dd>
  12477. <dt>&lsquo;<samp>om</samp>&rsquo;</dt>
  12478. <dd><p>Set the output mode.
  12479. </p>
  12480. <p>It accepts the following values:
  12481. </p><dl compact="compact">
  12482. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  12483. <dd><p>Pass input unchanged.
  12484. </p>
  12485. </dd>
  12486. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  12487. <dd><p>Pass noise filtered out.
  12488. </p>
  12489. </dd>
  12490. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  12491. <dd><p>Pass only noise.
  12492. </p>
  12493. <p>Default value is <var>o</var>.
  12494. </p></dd>
  12495. </dl>
  12496. </dd>
  12497. </dl>
  12498. <a name="Commands-64"></a>
  12499. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-64">27.16.1 Commands</a></h3>
  12500. <p>This filter supports the following commands:
  12501. </p><dl compact="compact">
  12502. <dt>&lsquo;<samp>sample_noise, sn</samp>&rsquo;</dt>
  12503. <dd><p>Start or stop measuring noise profile.
  12504. Syntax for the command is : &quot;start&quot; or &quot;stop&quot; string.
  12505. After measuring noise profile is stopped it will be
  12506. automatically applied in filtering.
  12507. </p>
  12508. </dd>
  12509. <dt>&lsquo;<samp>noise_reduction, nr</samp>&rsquo;</dt>
  12510. <dd><p>Change noise reduction. Argument is single float number.
  12511. Syntax for the command is : &quot;<var>noise_reduction</var>&quot;
  12512. </p>
  12513. </dd>
  12514. <dt>&lsquo;<samp>noise_floor, nf</samp>&rsquo;</dt>
  12515. <dd><p>Change noise floor. Argument is single float number.
  12516. Syntax for the command is : &quot;<var>noise_floor</var>&quot;
  12517. </p>
  12518. </dd>
  12519. <dt>&lsquo;<samp>output_mode, om</samp>&rsquo;</dt>
  12520. <dd><p>Change output mode operation.
  12521. Syntax for the command is : &quot;i&quot;, &quot;o&quot; or &quot;n&quot; string.
  12522. </p></dd>
  12523. </dl>
  12524. <a name="afftfilt"></a>
  12525. <h2 class="section"><a href="ffplay-all.html#toc-afftfilt">27.17 afftfilt</a></h2>
  12526. <p>Apply arbitrary expressions to samples in frequency domain.
  12527. </p>
  12528. <dl compact="compact">
  12529. <dt>&lsquo;<samp>real</samp>&rsquo;</dt>
  12530. <dd><p>Set frequency domain real expression for each separate channel separated
  12531. by &rsquo;|&rsquo;. Default is &quot;re&quot;.
  12532. If the number of input channels is greater than the number of
  12533. expressions, the last specified expression is used for the remaining
  12534. output channels.
  12535. </p>
  12536. </dd>
  12537. <dt>&lsquo;<samp>imag</samp>&rsquo;</dt>
  12538. <dd><p>Set frequency domain imaginary expression for each separate channel
  12539. separated by &rsquo;|&rsquo;. Default is &quot;im&quot;.
  12540. </p>
  12541. <p>Each expression in <var>real</var> and <var>imag</var> can contain the following
  12542. constants and functions:
  12543. </p>
  12544. <dl compact="compact">
  12545. <dt>&lsquo;<samp>sr</samp>&rsquo;</dt>
  12546. <dd><p>sample rate
  12547. </p>
  12548. </dd>
  12549. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  12550. <dd><p>current frequency bin number
  12551. </p>
  12552. </dd>
  12553. <dt>&lsquo;<samp>nb</samp>&rsquo;</dt>
  12554. <dd><p>number of available bins
  12555. </p>
  12556. </dd>
  12557. <dt>&lsquo;<samp>ch</samp>&rsquo;</dt>
  12558. <dd><p>channel number of the current expression
  12559. </p>
  12560. </dd>
  12561. <dt>&lsquo;<samp>chs</samp>&rsquo;</dt>
  12562. <dd><p>number of channels
  12563. </p>
  12564. </dd>
  12565. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  12566. <dd><p>current frame pts
  12567. </p>
  12568. </dd>
  12569. <dt>&lsquo;<samp>re</samp>&rsquo;</dt>
  12570. <dd><p>current real part of frequency bin of current channel
  12571. </p>
  12572. </dd>
  12573. <dt>&lsquo;<samp>im</samp>&rsquo;</dt>
  12574. <dd><p>current imaginary part of frequency bin of current channel
  12575. </p>
  12576. </dd>
  12577. <dt>&lsquo;<samp>real(b, ch)</samp>&rsquo;</dt>
  12578. <dd><p>Return the value of real part of frequency bin at location (<var>bin</var>,<var>channel</var>)
  12579. </p>
  12580. </dd>
  12581. <dt>&lsquo;<samp>imag(b, ch)</samp>&rsquo;</dt>
  12582. <dd><p>Return the value of imaginary part of frequency bin at location (<var>bin</var>,<var>channel</var>)
  12583. </p></dd>
  12584. </dl>
  12585. </dd>
  12586. <dt>&lsquo;<samp>win_size</samp>&rsquo;</dt>
  12587. <dd><p>Set window size. Allowed range is from 16 to 131072.
  12588. Default is <code>4096</code>
  12589. </p>
  12590. </dd>
  12591. <dt>&lsquo;<samp>win_func</samp>&rsquo;</dt>
  12592. <dd><p>Set window function. Default is <code>hann</code>.
  12593. </p>
  12594. </dd>
  12595. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  12596. <dd><p>Set window overlap. If set to 1, the recommended overlap for selected
  12597. window function will be picked. Default is <code>0.75</code>.
  12598. </p></dd>
  12599. </dl>
  12600. <a name="Examples-109"></a>
  12601. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-109">27.17.1 Examples</a></h3>
  12602. <ul>
  12603. <li>
  12604. Leave almost only low frequencies in audio:
  12605. <div class="example">
  12606. <pre class="example">afftfilt=&quot;'real=re * (1-clip((b/nb)*b,0,1))':imag='im * (1-clip((b/nb)*b,0,1))'&quot;
  12607. </pre></div>
  12608. </li><li>
  12609. Apply robotize effect:
  12610. <div class="example">
  12611. <pre class="example">afftfilt=&quot;real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75&quot;
  12612. </pre></div>
  12613. </li><li>
  12614. Apply whisper effect:
  12615. <div class="example">
  12616. <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;
  12617. </pre></div>
  12618. </li></ul>
  12619. <p><a name="afir"></a>
  12620. </p><a name="afir-1"></a>
  12621. <h2 class="section"><a href="ffplay-all.html#toc-afir-1">27.18 afir</a></h2>
  12622. <p>Apply an arbitrary Finite Impulse Response filter.
  12623. </p>
  12624. <p>This filter is designed for applying long FIR filters,
  12625. up to 60 seconds long.
  12626. </p>
  12627. <p>It can be used as component for digital crossover filters,
  12628. room equalization, cross talk cancellation, wavefield synthesis,
  12629. auralization, ambiophonics, ambisonics and spatialization.
  12630. </p>
  12631. <p>This filter uses the streams higher than first one as FIR coefficients.
  12632. If the non-first stream holds a single channel, it will be used
  12633. for all input channels in the first stream, otherwise
  12634. the number of channels in the non-first stream must be same as
  12635. the number of channels in the first stream.
  12636. </p>
  12637. <p>It accepts the following parameters:
  12638. </p>
  12639. <dl compact="compact">
  12640. <dt>&lsquo;<samp>dry</samp>&rsquo;</dt>
  12641. <dd><p>Set dry gain. This sets input gain.
  12642. </p>
  12643. </dd>
  12644. <dt>&lsquo;<samp>wet</samp>&rsquo;</dt>
  12645. <dd><p>Set wet gain. This sets final output gain.
  12646. </p>
  12647. </dd>
  12648. <dt>&lsquo;<samp>length</samp>&rsquo;</dt>
  12649. <dd><p>Set Impulse Response filter length. Default is 1, which means whole IR is processed.
  12650. </p>
  12651. </dd>
  12652. <dt>&lsquo;<samp>gtype</samp>&rsquo;</dt>
  12653. <dd><p>Enable applying gain measured from power of IR.
  12654. </p>
  12655. <p>Set which approach to use for auto gain measurement.
  12656. </p>
  12657. <dl compact="compact">
  12658. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  12659. <dd><p>Do not apply any gain.
  12660. </p>
  12661. </dd>
  12662. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  12663. <dd><p>select peak gain, very conservative approach. This is default value.
  12664. </p>
  12665. </dd>
  12666. <dt>&lsquo;<samp>dc</samp>&rsquo;</dt>
  12667. <dd><p>select DC gain, limited application.
  12668. </p>
  12669. </dd>
  12670. <dt>&lsquo;<samp>gn</samp>&rsquo;</dt>
  12671. <dd><p>select gain to noise approach, this is most popular one.
  12672. </p></dd>
  12673. </dl>
  12674. </dd>
  12675. <dt>&lsquo;<samp>irgain</samp>&rsquo;</dt>
  12676. <dd><p>Set gain to be applied to IR coefficients before filtering.
  12677. Allowed range is 0 to 1. This gain is applied after any gain applied with <var>gtype</var> option.
  12678. </p>
  12679. </dd>
  12680. <dt>&lsquo;<samp>irfmt</samp>&rsquo;</dt>
  12681. <dd><p>Set format of IR stream. Can be <code>mono</code> or <code>input</code>.
  12682. Default is <code>input</code>.
  12683. </p>
  12684. </dd>
  12685. <dt>&lsquo;<samp>maxir</samp>&rsquo;</dt>
  12686. <dd><p>Set max allowed Impulse Response filter duration in seconds. Default is 30 seconds.
  12687. Allowed range is 0.1 to 60 seconds.
  12688. </p>
  12689. </dd>
  12690. <dt>&lsquo;<samp>response</samp>&rsquo;</dt>
  12691. <dd><p>Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
  12692. By default it is disabled.
  12693. </p>
  12694. </dd>
  12695. <dt>&lsquo;<samp>channel</samp>&rsquo;</dt>
  12696. <dd><p>Set for which IR channel to display frequency response. By default is first channel
  12697. displayed. This option is used only when <var>response</var> is enabled.
  12698. </p>
  12699. </dd>
  12700. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  12701. <dd><p>Set video stream size. This option is used only when <var>response</var> is enabled.
  12702. </p>
  12703. </dd>
  12704. <dt>&lsquo;<samp>rate</samp>&rsquo;</dt>
  12705. <dd><p>Set video stream frame rate. This option is used only when <var>response</var> is enabled.
  12706. </p>
  12707. </dd>
  12708. <dt>&lsquo;<samp>minp</samp>&rsquo;</dt>
  12709. <dd><p>Set minimal partition size used for convolution. Default is <var>8192</var>.
  12710. Allowed range is from <var>1</var> to <var>32768</var>.
  12711. Lower values decreases latency at cost of higher CPU usage.
  12712. </p>
  12713. </dd>
  12714. <dt>&lsquo;<samp>maxp</samp>&rsquo;</dt>
  12715. <dd><p>Set maximal partition size used for convolution. Default is <var>8192</var>.
  12716. Allowed range is from <var>8</var> to <var>32768</var>.
  12717. Lower values may increase CPU usage.
  12718. </p>
  12719. </dd>
  12720. <dt>&lsquo;<samp>nbirs</samp>&rsquo;</dt>
  12721. <dd><p>Set number of input impulse responses streams which will be switchable at runtime.
  12722. Allowed range is from <var>1</var> to <var>32</var>. Default is <var>1</var>.
  12723. </p>
  12724. </dd>
  12725. <dt>&lsquo;<samp>ir</samp>&rsquo;</dt>
  12726. <dd><p>Set IR stream which will be used for convolution, starting from <var>0</var>, should always be
  12727. lower than supplied value by <code>nbirs</code> option. Default is <var>0</var>.
  12728. This option can be changed at runtime via <a href="#commands">commands</a>.
  12729. </p></dd>
  12730. </dl>
  12731. <a name="Examples-13"></a>
  12732. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-13">27.18.1 Examples</a></h3>
  12733. <ul>
  12734. <li>
  12735. Apply reverb to stream using mono IR file as second input, complete command using ffmpeg:
  12736. <div class="example">
  12737. <pre class="example">ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav
  12738. </pre></div>
  12739. </li></ul>
  12740. <p><a name="aformat"></a>
  12741. </p><a name="aformat-1"></a>
  12742. <h2 class="section"><a href="ffplay-all.html#toc-aformat-1">27.19 aformat</a></h2>
  12743. <p>Set output format constraints for the input audio. The framework will
  12744. negotiate the most appropriate format to minimize conversions.
  12745. </p>
  12746. <p>It accepts the following parameters:
  12747. </p><dl compact="compact">
  12748. <dt>&lsquo;<samp>sample_fmts, f</samp>&rsquo;</dt>
  12749. <dd><p>A &rsquo;|&rsquo;-separated list of requested sample formats.
  12750. </p>
  12751. </dd>
  12752. <dt>&lsquo;<samp>sample_rates, r</samp>&rsquo;</dt>
  12753. <dd><p>A &rsquo;|&rsquo;-separated list of requested sample rates.
  12754. </p>
  12755. </dd>
  12756. <dt>&lsquo;<samp>channel_layouts, cl</samp>&rsquo;</dt>
  12757. <dd><p>A &rsquo;|&rsquo;-separated list of requested channel layouts.
  12758. </p>
  12759. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  12760. for the required syntax.
  12761. </p></dd>
  12762. </dl>
  12763. <p>If a parameter is omitted, all values are allowed.
  12764. </p>
  12765. <p>Force the output to either unsigned 8-bit or signed 16-bit stereo
  12766. </p><div class="example">
  12767. <pre class="example">aformat=sample_fmts=u8|s16:channel_layouts=stereo
  12768. </pre></div>
  12769. <a name="agate"></a>
  12770. <h2 class="section"><a href="ffplay-all.html#toc-agate">27.20 agate</a></h2>
  12771. <p>A gate is mainly used to reduce lower parts of a signal. This kind of signal
  12772. processing reduces disturbing noise between useful signals.
  12773. </p>
  12774. <p>Gating is done by detecting the volume below a chosen level <var>threshold</var>
  12775. and dividing it by the factor set with <var>ratio</var>. The bottom of the noise
  12776. floor is set via <var>range</var>. Because an exact manipulation of the signal
  12777. would cause distortion of the waveform the reduction can be levelled over
  12778. time. This is done by setting <var>attack</var> and <var>release</var>.
  12779. </p>
  12780. <p><var>attack</var> determines how long the signal has to fall below the threshold
  12781. before any reduction will occur and <var>release</var> sets the time the signal
  12782. has to rise above the threshold to reduce the reduction again.
  12783. Shorter signals than the chosen attack time will be left untouched.
  12784. </p>
  12785. <dl compact="compact">
  12786. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  12787. <dd><p>Set input level before filtering.
  12788. Default is 1. Allowed range is from 0.015625 to 64.
  12789. </p>
  12790. </dd>
  12791. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  12792. <dd><p>Set the mode of operation. Can be <code>upward</code> or <code>downward</code>.
  12793. Default is <code>downward</code>. If set to <code>upward</code> mode, higher parts of signal
  12794. will be amplified, expanding dynamic range in upward direction.
  12795. Otherwise, in case of <code>downward</code> lower parts of signal will be reduced.
  12796. </p>
  12797. </dd>
  12798. <dt>&lsquo;<samp>range</samp>&rsquo;</dt>
  12799. <dd><p>Set the level of gain reduction when the signal is below the threshold.
  12800. Default is 0.06125. Allowed range is from 0 to 1.
  12801. Setting this to 0 disables reduction and then filter behaves like expander.
  12802. </p>
  12803. </dd>
  12804. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  12805. <dd><p>If a signal rises above this level the gain reduction is released.
  12806. Default is 0.125. Allowed range is from 0 to 1.
  12807. </p>
  12808. </dd>
  12809. <dt>&lsquo;<samp>ratio</samp>&rsquo;</dt>
  12810. <dd><p>Set a ratio by which the signal is reduced.
  12811. Default is 2. Allowed range is from 1 to 9000.
  12812. </p>
  12813. </dd>
  12814. <dt>&lsquo;<samp>attack</samp>&rsquo;</dt>
  12815. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  12816. reduction stops.
  12817. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
  12818. </p>
  12819. </dd>
  12820. <dt>&lsquo;<samp>release</samp>&rsquo;</dt>
  12821. <dd><p>Amount of milliseconds the signal has to fall below the threshold before the
  12822. reduction is increased again. Default is 250 milliseconds.
  12823. Allowed range is from 0.01 to 9000.
  12824. </p>
  12825. </dd>
  12826. <dt>&lsquo;<samp>makeup</samp>&rsquo;</dt>
  12827. <dd><p>Set amount of amplification of signal after processing.
  12828. Default is 1. Allowed range is from 1 to 64.
  12829. </p>
  12830. </dd>
  12831. <dt>&lsquo;<samp>knee</samp>&rsquo;</dt>
  12832. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  12833. Default is 2.828427125. Allowed range is from 1 to 8.
  12834. </p>
  12835. </dd>
  12836. <dt>&lsquo;<samp>detection</samp>&rsquo;</dt>
  12837. <dd><p>Choose if exact signal should be taken for detection or an RMS like one.
  12838. Default is <code>rms</code>. Can be <code>peak</code> or <code>rms</code>.
  12839. </p>
  12840. </dd>
  12841. <dt>&lsquo;<samp>link</samp>&rsquo;</dt>
  12842. <dd><p>Choose if the average level between all channels or the louder channel affects
  12843. the reduction.
  12844. Default is <code>average</code>. Can be <code>average</code> or <code>maximum</code>.
  12845. </p></dd>
  12846. </dl>
  12847. <a name="aiir"></a>
  12848. <h2 class="section"><a href="ffplay-all.html#toc-aiir">27.21 aiir</a></h2>
  12849. <p>Apply an arbitrary Infinite Impulse Response filter.
  12850. </p>
  12851. <p>It accepts the following parameters:
  12852. </p>
  12853. <dl compact="compact">
  12854. <dt>&lsquo;<samp>z</samp>&rsquo;</dt>
  12855. <dd><p>Set numerator/zeros coefficients.
  12856. </p>
  12857. </dd>
  12858. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  12859. <dd><p>Set denominator/poles coefficients.
  12860. </p>
  12861. </dd>
  12862. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  12863. <dd><p>Set channels gains.
  12864. </p>
  12865. </dd>
  12866. <dt>&lsquo;<samp>dry_gain</samp>&rsquo;</dt>
  12867. <dd><p>Set input gain.
  12868. </p>
  12869. </dd>
  12870. <dt>&lsquo;<samp>wet_gain</samp>&rsquo;</dt>
  12871. <dd><p>Set output gain.
  12872. </p>
  12873. </dd>
  12874. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  12875. <dd><p>Set coefficients format.
  12876. </p>
  12877. <dl compact="compact">
  12878. <dt>&lsquo;<samp>tf</samp>&rsquo;</dt>
  12879. <dd><p>transfer function
  12880. </p></dd>
  12881. <dt>&lsquo;<samp>zp</samp>&rsquo;</dt>
  12882. <dd><p>Z-plane zeros/poles, cartesian (default)
  12883. </p></dd>
  12884. <dt>&lsquo;<samp>pr</samp>&rsquo;</dt>
  12885. <dd><p>Z-plane zeros/poles, polar radians
  12886. </p></dd>
  12887. <dt>&lsquo;<samp>pd</samp>&rsquo;</dt>
  12888. <dd><p>Z-plane zeros/poles, polar degrees
  12889. </p></dd>
  12890. </dl>
  12891. </dd>
  12892. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  12893. <dd><p>Set kind of processing.
  12894. Can be <code>d</code> - direct or <code>s</code> - serial cascading. Default is <code>s</code>.
  12895. </p>
  12896. </dd>
  12897. <dt>&lsquo;<samp>e</samp>&rsquo;</dt>
  12898. <dd><p>Set filtering precision.
  12899. </p>
  12900. <dl compact="compact">
  12901. <dt>&lsquo;<samp>dbl</samp>&rsquo;</dt>
  12902. <dd><p>double-precision floating-point (default)
  12903. </p></dd>
  12904. <dt>&lsquo;<samp>flt</samp>&rsquo;</dt>
  12905. <dd><p>single-precision floating-point
  12906. </p></dd>
  12907. <dt>&lsquo;<samp>i32</samp>&rsquo;</dt>
  12908. <dd><p>32-bit integers
  12909. </p></dd>
  12910. <dt>&lsquo;<samp>i16</samp>&rsquo;</dt>
  12911. <dd><p>16-bit integers
  12912. </p></dd>
  12913. </dl>
  12914. </dd>
  12915. <dt>&lsquo;<samp>mix</samp>&rsquo;</dt>
  12916. <dd><p>How much to use filtered signal in output. Default is 1.
  12917. Range is between 0 and 1.
  12918. </p>
  12919. </dd>
  12920. <dt>&lsquo;<samp>response</samp>&rsquo;</dt>
  12921. <dd><p>Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream.
  12922. By default it is disabled.
  12923. </p>
  12924. </dd>
  12925. <dt>&lsquo;<samp>channel</samp>&rsquo;</dt>
  12926. <dd><p>Set for which IR channel to display frequency response. By default is first channel
  12927. displayed. This option is used only when <var>response</var> is enabled.
  12928. </p>
  12929. </dd>
  12930. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  12931. <dd><p>Set video stream size. This option is used only when <var>response</var> is enabled.
  12932. </p></dd>
  12933. </dl>
  12934. <p>Coefficients in <code>tf</code> format are separated by spaces and are in ascending
  12935. order.
  12936. </p>
  12937. <p>Coefficients in <code>zp</code> format are separated by spaces and order of coefficients
  12938. doesn&rsquo;t matter. Coefficients in <code>zp</code> format are complex numbers with <var>i</var>
  12939. imaginary unit.
  12940. </p>
  12941. <p>Different coefficients and gains can be provided for every channel, in such case
  12942. use &rsquo;|&rsquo; to separate coefficients or gains. Last provided coefficients will be
  12943. used for all remaining channels.
  12944. </p>
  12945. <a name="Examples-156"></a>
  12946. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-156">27.21.1 Examples</a></h3>
  12947. <ul>
  12948. <li>
  12949. Apply 2 pole elliptic notch at around 5000Hz for 48000 Hz sample rate:
  12950. <div class="example">
  12951. <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
  12952. </pre></div>
  12953. </li><li>
  12954. Same as above but in <code>zp</code> format:
  12955. <div class="example">
  12956. <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
  12957. </pre></div>
  12958. </li></ul>
  12959. <a name="alimiter"></a>
  12960. <h2 class="section"><a href="ffplay-all.html#toc-alimiter">27.22 alimiter</a></h2>
  12961. <p>The limiter prevents an input signal from rising over a desired threshold.
  12962. This limiter uses lookahead technology to prevent your signal from distorting.
  12963. It means that there is a small delay after the signal is processed. Keep in mind
  12964. that the delay it produces is the attack time you set.
  12965. </p>
  12966. <p>The filter accepts the following options:
  12967. </p>
  12968. <dl compact="compact">
  12969. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  12970. <dd><p>Set input gain. Default is 1.
  12971. </p>
  12972. </dd>
  12973. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  12974. <dd><p>Set output gain. Default is 1.
  12975. </p>
  12976. </dd>
  12977. <dt>&lsquo;<samp>limit</samp>&rsquo;</dt>
  12978. <dd><p>Don&rsquo;t let signals above this level pass the limiter. Default is 1.
  12979. </p>
  12980. </dd>
  12981. <dt>&lsquo;<samp>attack</samp>&rsquo;</dt>
  12982. <dd><p>The limiter will reach its attenuation level in this amount of time in
  12983. milliseconds. Default is 5 milliseconds.
  12984. </p>
  12985. </dd>
  12986. <dt>&lsquo;<samp>release</samp>&rsquo;</dt>
  12987. <dd><p>Come back from limiting to attenuation 1.0 in this amount of milliseconds.
  12988. Default is 50 milliseconds.
  12989. </p>
  12990. </dd>
  12991. <dt>&lsquo;<samp>asc</samp>&rsquo;</dt>
  12992. <dd><p>When gain reduction is always needed ASC takes care of releasing to an
  12993. average reduction level rather than reaching a reduction of 0 in the release
  12994. time.
  12995. </p>
  12996. </dd>
  12997. <dt>&lsquo;<samp>asc_level</samp>&rsquo;</dt>
  12998. <dd><p>Select how much the release time is affected by ASC, 0 means nearly no changes
  12999. in release time while 1 produces higher release times.
  13000. </p>
  13001. </dd>
  13002. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  13003. <dd><p>Auto level output signal. Default is enabled.
  13004. This normalizes audio back to 0dB if enabled.
  13005. </p></dd>
  13006. </dl>
  13007. <p>Depending on picked setting it is recommended to upsample input 2x or 4x times
  13008. with <a href="#aresample">aresample</a> before applying this filter.
  13009. </p>
  13010. <a name="allpass"></a>
  13011. <h2 class="section"><a href="ffplay-all.html#toc-allpass">27.23 allpass</a></h2>
  13012. <p>Apply a two-pole all-pass filter with central frequency (in Hz)
  13013. <var>frequency</var>, and filter-width <var>width</var>.
  13014. An all-pass filter changes the audio&rsquo;s frequency to phase relationship
  13015. without changing its frequency to amplitude relationship.
  13016. </p>
  13017. <p>The filter accepts the following options:
  13018. </p>
  13019. <dl compact="compact">
  13020. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  13021. <dd><p>Set frequency in Hz.
  13022. </p>
  13023. </dd>
  13024. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  13025. <dd><p>Set method to specify band-width of filter.
  13026. </p><dl compact="compact">
  13027. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  13028. <dd><p>Hz
  13029. </p></dd>
  13030. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  13031. <dd><p>Q-Factor
  13032. </p></dd>
  13033. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  13034. <dd><p>octave
  13035. </p></dd>
  13036. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  13037. <dd><p>slope
  13038. </p></dd>
  13039. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  13040. <dd><p>kHz
  13041. </p></dd>
  13042. </dl>
  13043. </dd>
  13044. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  13045. <dd><p>Specify the band-width of a filter in width_type units.
  13046. </p>
  13047. </dd>
  13048. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  13049. <dd><p>How much to use filtered signal in output. Default is 1.
  13050. Range is between 0 and 1.
  13051. </p>
  13052. </dd>
  13053. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  13054. <dd><p>Specify which channels to filter, by default all available are filtered.
  13055. </p>
  13056. </dd>
  13057. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  13058. <dd><p>Normalize biquad coefficients, by default is disabled.
  13059. Enabling it will normalize magnitude response at DC to 0dB.
  13060. </p></dd>
  13061. </dl>
  13062. <a name="Commands-13"></a>
  13063. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-13">27.23.1 Commands</a></h3>
  13064. <p>This filter supports the following commands:
  13065. </p><dl compact="compact">
  13066. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  13067. <dd><p>Change allpass frequency.
  13068. Syntax for the command is : &quot;<var>frequency</var>&quot;
  13069. </p>
  13070. </dd>
  13071. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  13072. <dd><p>Change allpass width_type.
  13073. Syntax for the command is : &quot;<var>width_type</var>&quot;
  13074. </p>
  13075. </dd>
  13076. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  13077. <dd><p>Change allpass width.
  13078. Syntax for the command is : &quot;<var>width</var>&quot;
  13079. </p>
  13080. </dd>
  13081. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  13082. <dd><p>Change allpass mix.
  13083. Syntax for the command is : &quot;<var>mix</var>&quot;
  13084. </p></dd>
  13085. </dl>
  13086. <a name="aloop"></a>
  13087. <h2 class="section"><a href="ffplay-all.html#toc-aloop">27.24 aloop</a></h2>
  13088. <p>Loop audio samples.
  13089. </p>
  13090. <p>The filter accepts the following options:
  13091. </p>
  13092. <dl compact="compact">
  13093. <dt>&lsquo;<samp>loop</samp>&rsquo;</dt>
  13094. <dd><p>Set the number of loops. Setting this value to -1 will result in infinite loops.
  13095. Default is 0.
  13096. </p>
  13097. </dd>
  13098. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  13099. <dd><p>Set maximal number of samples. Default is 0.
  13100. </p>
  13101. </dd>
  13102. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  13103. <dd><p>Set first sample of loop. Default is 0.
  13104. </p></dd>
  13105. </dl>
  13106. <p><a name="amerge"></a>
  13107. </p><a name="amerge-1"></a>
  13108. <h2 class="section"><a href="ffplay-all.html#toc-amerge-1">27.25 amerge</a></h2>
  13109. <p>Merge two or more audio streams into a single multi-channel stream.
  13110. </p>
  13111. <p>The filter accepts the following options:
  13112. </p>
  13113. <dl compact="compact">
  13114. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  13115. <dd><p>Set the number of inputs. Default is 2.
  13116. </p>
  13117. </dd>
  13118. </dl>
  13119. <p>If the channel layouts of the inputs are disjoint, and therefore compatible,
  13120. the channel layout of the output will be set accordingly and the channels
  13121. will be reordered as necessary. If the channel layouts of the inputs are not
  13122. disjoint, the output will have all the channels of the first input then all
  13123. the channels of the second input, in that order, and the channel layout of
  13124. the output will be the default value corresponding to the total number of
  13125. channels.
  13126. </p>
  13127. <p>For example, if the first input is in 2.1 (FL+FR+LF) and the second input
  13128. is FC+BL+BR, then the output will be in 5.1, with the channels in the
  13129. following order: a1, a2, b1, a3, b2, b3 (a1 is the first channel of the
  13130. first input, b1 is the first channel of the second input).
  13131. </p>
  13132. <p>On the other hand, if both input are in stereo, the output channels will be
  13133. in the default order: a1, a2, b1, b2, and the channel layout will be
  13134. arbitrarily set to 4.0, which may or may not be the expected value.
  13135. </p>
  13136. <p>All inputs must have the same sample rate, and format.
  13137. </p>
  13138. <p>If inputs do not have the same duration, the output will stop with the
  13139. shortest.
  13140. </p>
  13141. <a name="Examples-153"></a>
  13142. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-153">27.25.1 Examples</a></h3>
  13143. <ul>
  13144. <li>
  13145. Merge two mono files into a stereo stream:
  13146. <div class="example">
  13147. <pre class="example">amovie=left.wav [l] ; amovie=right.mp3 [r] ; [l] [r] amerge
  13148. </pre></div>
  13149. </li><li>
  13150. Multiple merges assuming 1 video stream and 6 audio streams in &lsquo;<tt>input.mkv</tt>&rsquo;:
  13151. <div class="example">
  13152. <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
  13153. </pre></div>
  13154. </li></ul>
  13155. <a name="amix"></a>
  13156. <h2 class="section"><a href="ffplay-all.html#toc-amix">27.26 amix</a></h2>
  13157. <p>Mixes multiple audio inputs into a single output.
  13158. </p>
  13159. <p>Note that this filter only supports float samples (the <var>amerge</var>
  13160. and <var>pan</var> audio filters support many formats). If the <var>amix</var>
  13161. input has integer samples then <a href="#aresample">aresample</a> will be automatically
  13162. inserted to perform the conversion to float samples.
  13163. </p>
  13164. <p>For example
  13165. </p><div class="example">
  13166. <pre class="example">ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT
  13167. </pre></div>
  13168. <p>will mix 3 input audio streams to a single output with the same duration as the
  13169. first input and a dropout transition time of 3 seconds.
  13170. </p>
  13171. <p>It accepts the following parameters:
  13172. </p><dl compact="compact">
  13173. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  13174. <dd><p>The number of inputs. If unspecified, it defaults to 2.
  13175. </p>
  13176. </dd>
  13177. <dt>&lsquo;<samp>duration</samp>&rsquo;</dt>
  13178. <dd><p>How to determine the end-of-stream.
  13179. </p><dl compact="compact">
  13180. <dt>&lsquo;<samp>longest</samp>&rsquo;</dt>
  13181. <dd><p>The duration of the longest input. (default)
  13182. </p>
  13183. </dd>
  13184. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  13185. <dd><p>The duration of the shortest input.
  13186. </p>
  13187. </dd>
  13188. <dt>&lsquo;<samp>first</samp>&rsquo;</dt>
  13189. <dd><p>The duration of the first input.
  13190. </p>
  13191. </dd>
  13192. </dl>
  13193. </dd>
  13194. <dt>&lsquo;<samp>dropout_transition</samp>&rsquo;</dt>
  13195. <dd><p>The transition time, in seconds, for volume renormalization when an input
  13196. stream ends. The default value is 2 seconds.
  13197. </p>
  13198. </dd>
  13199. <dt>&lsquo;<samp>weights</samp>&rsquo;</dt>
  13200. <dd><p>Specify weight of each input audio stream as sequence.
  13201. Each weight is separated by space. By default all inputs have same weight.
  13202. </p></dd>
  13203. </dl>
  13204. <a name="amultiply"></a>
  13205. <h2 class="section"><a href="ffplay-all.html#toc-amultiply">27.27 amultiply</a></h2>
  13206. <p>Multiply first audio stream with second audio stream and store result
  13207. in output audio stream. Multiplication is done by multiplying each
  13208. sample from first stream with sample at same position from second stream.
  13209. </p>
  13210. <p>With this element-wise multiplication one can create amplitude fades and
  13211. amplitude modulations.
  13212. </p>
  13213. <a name="anequalizer"></a>
  13214. <h2 class="section"><a href="ffplay-all.html#toc-anequalizer">27.28 anequalizer</a></h2>
  13215. <p>High-order parametric multiband equalizer for each channel.
  13216. </p>
  13217. <p>It accepts the following parameters:
  13218. </p><dl compact="compact">
  13219. <dt>&lsquo;<samp>params</samp>&rsquo;</dt>
  13220. <dd>
  13221. <p>This option string is in format:
  13222. &quot;c<var>chn</var> f=<var>cf</var> w=<var>w</var> g=<var>g</var> t=<var>f</var> | ...&quot;
  13223. Each equalizer band is separated by &rsquo;|&rsquo;.
  13224. </p>
  13225. <dl compact="compact">
  13226. <dt>&lsquo;<samp>chn</samp>&rsquo;</dt>
  13227. <dd><p>Set channel number to which equalization will be applied.
  13228. If input doesn&rsquo;t have that channel the entry is ignored.
  13229. </p>
  13230. </dd>
  13231. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  13232. <dd><p>Set central frequency for band.
  13233. If input doesn&rsquo;t have that frequency the entry is ignored.
  13234. </p>
  13235. </dd>
  13236. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  13237. <dd><p>Set band width in hertz.
  13238. </p>
  13239. </dd>
  13240. <dt>&lsquo;<samp>g</samp>&rsquo;</dt>
  13241. <dd><p>Set band gain in dB.
  13242. </p>
  13243. </dd>
  13244. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  13245. <dd><p>Set filter type for band, optional, can be:
  13246. </p>
  13247. <dl compact="compact">
  13248. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  13249. <dd><p>Butterworth, this is default.
  13250. </p>
  13251. </dd>
  13252. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  13253. <dd><p>Chebyshev type 1.
  13254. </p>
  13255. </dd>
  13256. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  13257. <dd><p>Chebyshev type 2.
  13258. </p></dd>
  13259. </dl>
  13260. </dd>
  13261. </dl>
  13262. </dd>
  13263. <dt>&lsquo;<samp>curves</samp>&rsquo;</dt>
  13264. <dd><p>With this option activated frequency response of anequalizer is displayed
  13265. in video stream.
  13266. </p>
  13267. </dd>
  13268. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  13269. <dd><p>Set video stream size. Only useful if curves option is activated.
  13270. </p>
  13271. </dd>
  13272. <dt>&lsquo;<samp>mgain</samp>&rsquo;</dt>
  13273. <dd><p>Set max gain that will be displayed. Only useful if curves option is activated.
  13274. Setting this to a reasonable value makes it possible to display gain which is derived from
  13275. neighbour bands which are too close to each other and thus produce higher gain
  13276. when both are activated.
  13277. </p>
  13278. </dd>
  13279. <dt>&lsquo;<samp>fscale</samp>&rsquo;</dt>
  13280. <dd><p>Set frequency scale used to draw frequency response in video output.
  13281. Can be linear or logarithmic. Default is logarithmic.
  13282. </p>
  13283. </dd>
  13284. <dt>&lsquo;<samp>colors</samp>&rsquo;</dt>
  13285. <dd><p>Set color for each channel curve which is going to be displayed in video stream.
  13286. This is list of color names separated by space or by &rsquo;|&rsquo;.
  13287. Unrecognised or missing colors will be replaced by white color.
  13288. </p></dd>
  13289. </dl>
  13290. <a name="Examples-43"></a>
  13291. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-43">27.28.1 Examples</a></h3>
  13292. <ul>
  13293. <li>
  13294. Lower gain by 10 of central frequency 200Hz and width 100 Hz
  13295. for first 2 channels using Chebyshev type 1 filter:
  13296. <div class="example">
  13297. <pre class="example">anequalizer=c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
  13298. </pre></div>
  13299. </li></ul>
  13300. <a name="Commands-58"></a>
  13301. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-58">27.28.2 Commands</a></h3>
  13302. <p>This filter supports the following commands:
  13303. </p><dl compact="compact">
  13304. <dt>&lsquo;<samp>change</samp>&rsquo;</dt>
  13305. <dd><p>Alter existing filter parameters.
  13306. Syntax for the commands is : &quot;<var>fN</var>|f=<var>freq</var>|w=<var>width</var>|g=<var>gain</var>&quot;
  13307. </p>
  13308. <p><var>fN</var> is existing filter number, starting from 0, if no such filter is available
  13309. error is returned.
  13310. <var>freq</var> set new frequency parameter.
  13311. <var>width</var> set new width parameter in herz.
  13312. <var>gain</var> set new gain parameter in dB.
  13313. </p>
  13314. <p>Full filter invocation with asendcmd may look like this:
  13315. asendcmd=c=&rsquo;4.0 anequalizer change 0|f=200|w=50|g=1&rsquo;,anequalizer=...
  13316. </p></dd>
  13317. </dl>
  13318. <a name="anlmdn"></a>
  13319. <h2 class="section"><a href="ffplay-all.html#toc-anlmdn">27.29 anlmdn</a></h2>
  13320. <p>Reduce broadband noise in audio samples using Non-Local Means algorithm.
  13321. </p>
  13322. <p>Each sample is adjusted by looking for other samples with similar contexts. This
  13323. context similarity is defined by comparing their surrounding patches of size
  13324. &lsquo;<samp>p</samp>&rsquo;. Patches are searched in an area of &lsquo;<samp>r</samp>&rsquo; around the sample.
  13325. </p>
  13326. <p>The filter accepts the following options:
  13327. </p>
  13328. <dl compact="compact">
  13329. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  13330. <dd><p>Set denoising strength. Allowed range is from 0.00001 to 10. Default value is 0.00001.
  13331. </p>
  13332. </dd>
  13333. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  13334. <dd><p>Set patch radius duration. Allowed range is from 1 to 100 milliseconds.
  13335. Default value is 2 milliseconds.
  13336. </p>
  13337. </dd>
  13338. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  13339. <dd><p>Set research radius duration. Allowed range is from 2 to 300 milliseconds.
  13340. Default value is 6 milliseconds.
  13341. </p>
  13342. </dd>
  13343. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  13344. <dd><p>Set the output mode.
  13345. </p>
  13346. <p>It accepts the following values:
  13347. </p><dl compact="compact">
  13348. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  13349. <dd><p>Pass input unchanged.
  13350. </p>
  13351. </dd>
  13352. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  13353. <dd><p>Pass noise filtered out.
  13354. </p>
  13355. </dd>
  13356. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  13357. <dd><p>Pass only noise.
  13358. </p>
  13359. <p>Default value is <var>o</var>.
  13360. </p></dd>
  13361. </dl>
  13362. </dd>
  13363. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  13364. <dd><p>Set smooth factor. Default value is <var>11</var>. Allowed range is from <var>1</var> to <var>15</var>.
  13365. </p></dd>
  13366. </dl>
  13367. <a name="Commands-34"></a>
  13368. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-34">27.29.1 Commands</a></h3>
  13369. <p>This filter supports the following commands:
  13370. </p><dl compact="compact">
  13371. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  13372. <dd><p>Change denoise strength. Argument is single float number.
  13373. Syntax for the command is : &quot;<var>s</var>&quot;
  13374. </p>
  13375. </dd>
  13376. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  13377. <dd><p>Change output mode.
  13378. Syntax for the command is : &quot;i&quot;, &quot;o&quot; or &quot;n&quot; string.
  13379. </p></dd>
  13380. </dl>
  13381. <a name="anlms"></a>
  13382. <h2 class="section"><a href="ffplay-all.html#toc-anlms">27.30 anlms</a></h2>
  13383. <p>Apply Normalized Least-Mean-Squares algorithm to the first audio stream using the second audio stream.
  13384. </p>
  13385. <p>This adaptive filter is used to mimic a desired filter by finding the filter coefficients that
  13386. relate to producing the least mean square of the error signal (difference between the desired,
  13387. 2nd input audio stream and the actual signal, the 1st input audio stream).
  13388. </p>
  13389. <p>A description of the accepted options follows.
  13390. </p>
  13391. <dl compact="compact">
  13392. <dt>&lsquo;<samp>order</samp>&rsquo;</dt>
  13393. <dd><p>Set filter order.
  13394. </p>
  13395. </dd>
  13396. <dt>&lsquo;<samp>mu</samp>&rsquo;</dt>
  13397. <dd><p>Set filter mu.
  13398. </p>
  13399. </dd>
  13400. <dt>&lsquo;<samp>eps</samp>&rsquo;</dt>
  13401. <dd><p>Set the filter eps.
  13402. </p>
  13403. </dd>
  13404. <dt>&lsquo;<samp>leakage</samp>&rsquo;</dt>
  13405. <dd><p>Set the filter leakage.
  13406. </p>
  13407. </dd>
  13408. <dt>&lsquo;<samp>out_mode</samp>&rsquo;</dt>
  13409. <dd><p>It accepts the following values:
  13410. </p><dl compact="compact">
  13411. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  13412. <dd><p>Pass the 1st input.
  13413. </p>
  13414. </dd>
  13415. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  13416. <dd><p>Pass the 2nd input.
  13417. </p>
  13418. </dd>
  13419. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  13420. <dd><p>Pass filtered samples.
  13421. </p>
  13422. </dd>
  13423. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  13424. <dd><p>Pass difference between desired and filtered samples.
  13425. </p>
  13426. <p>Default value is <var>o</var>.
  13427. </p></dd>
  13428. </dl>
  13429. </dd>
  13430. </dl>
  13431. <a name="Examples-92"></a>
  13432. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-92">27.30.1 Examples</a></h3>
  13433. <ul>
  13434. <li>
  13435. One of many usages of this filter is noise reduction, input audio is filtered
  13436. with same samples that are delayed by fixed amount, one such example for stereo audio is:
  13437. <div class="example">
  13438. <pre class="example">asplit[a][b],[a]adelay=32S|32S[a],[b][a]anlms=order=128:leakage=0.0005:mu=.5:out_mode=o
  13439. </pre></div>
  13440. </li></ul>
  13441. <a name="Commands-32"></a>
  13442. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-32">27.30.2 Commands</a></h3>
  13443. <p>This filter supports the same commands as options, excluding option <code>order</code>.
  13444. </p>
  13445. <a name="anull"></a>
  13446. <h2 class="section"><a href="ffplay-all.html#toc-anull">27.31 anull</a></h2>
  13447. <p>Pass the audio source unchanged to the output.
  13448. </p>
  13449. <a name="apad"></a>
  13450. <h2 class="section"><a href="ffplay-all.html#toc-apad">27.32 apad</a></h2>
  13451. <p>Pad the end of an audio stream with silence.
  13452. </p>
  13453. <p>This can be used together with <code>ffmpeg</code> &lsquo;<samp>-shortest</samp>&rsquo; to
  13454. extend audio streams to the same length as the video stream.
  13455. </p>
  13456. <p>A description of the accepted options follows.
  13457. </p>
  13458. <dl compact="compact">
  13459. <dt>&lsquo;<samp>packet_size</samp>&rsquo;</dt>
  13460. <dd><p>Set silence packet size. Default value is 4096.
  13461. </p>
  13462. </dd>
  13463. <dt>&lsquo;<samp>pad_len</samp>&rsquo;</dt>
  13464. <dd><p>Set the number of samples of silence to add to the end. After the
  13465. value is reached, the stream is terminated. This option is mutually
  13466. exclusive with &lsquo;<samp>whole_len</samp>&rsquo;.
  13467. </p>
  13468. </dd>
  13469. <dt>&lsquo;<samp>whole_len</samp>&rsquo;</dt>
  13470. <dd><p>Set the minimum total number of samples in the output audio stream. If
  13471. the value is longer than the input audio length, silence is added to
  13472. the end, until the value is reached. This option is mutually exclusive
  13473. with &lsquo;<samp>pad_len</samp>&rsquo;.
  13474. </p>
  13475. </dd>
  13476. <dt>&lsquo;<samp>pad_dur</samp>&rsquo;</dt>
  13477. <dd><p>Specify the duration of samples of silence to add. See
  13478. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  13479. for the accepted syntax. Used only if set to non-zero value.
  13480. </p>
  13481. </dd>
  13482. <dt>&lsquo;<samp>whole_dur</samp>&rsquo;</dt>
  13483. <dd><p>Specify the minimum total duration in the output audio stream. See
  13484. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  13485. for the accepted syntax. Used only if set to non-zero value. If the value is longer than
  13486. the input audio length, silence is added to the end, until the value is reached.
  13487. This option is mutually exclusive with &lsquo;<samp>pad_dur</samp>&rsquo;
  13488. </p></dd>
  13489. </dl>
  13490. <p>If neither the &lsquo;<samp>pad_len</samp>&rsquo; nor the &lsquo;<samp>whole_len</samp>&rsquo; nor &lsquo;<samp>pad_dur</samp>&rsquo;
  13491. nor &lsquo;<samp>whole_dur</samp>&rsquo; option is set, the filter will add silence to the end of
  13492. the input stream indefinitely.
  13493. </p>
  13494. <a name="Examples-87"></a>
  13495. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-87">27.32.1 Examples</a></h3>
  13496. <ul>
  13497. <li>
  13498. Add 1024 samples of silence to the end of the input:
  13499. <div class="example">
  13500. <pre class="example">apad=pad_len=1024
  13501. </pre></div>
  13502. </li><li>
  13503. Make sure the audio output will contain at least 10000 samples, pad
  13504. the input with silence if required:
  13505. <div class="example">
  13506. <pre class="example">apad=whole_len=10000
  13507. </pre></div>
  13508. </li><li>
  13509. Use <code>ffmpeg</code> to pad the audio input with silence, so that the
  13510. video stream will always result the shortest and will be converted
  13511. until the end in the output file when using the &lsquo;<samp>shortest</samp>&rsquo;
  13512. option:
  13513. <div class="example">
  13514. <pre class="example">ffmpeg -i VIDEO -i AUDIO -filter_complex &quot;[1:0]apad&quot; -shortest OUTPUT
  13515. </pre></div>
  13516. </li></ul>
  13517. <a name="aphaser"></a>
  13518. <h2 class="section"><a href="ffplay-all.html#toc-aphaser">27.33 aphaser</a></h2>
  13519. <p>Add a phasing effect to the input audio.
  13520. </p>
  13521. <p>A phaser filter creates series of peaks and troughs in the frequency spectrum.
  13522. The position of the peaks and troughs are modulated so that they vary over time, creating a sweeping effect.
  13523. </p>
  13524. <p>A description of the accepted parameters follows.
  13525. </p>
  13526. <dl compact="compact">
  13527. <dt>&lsquo;<samp>in_gain</samp>&rsquo;</dt>
  13528. <dd><p>Set input gain. Default is 0.4.
  13529. </p>
  13530. </dd>
  13531. <dt>&lsquo;<samp>out_gain</samp>&rsquo;</dt>
  13532. <dd><p>Set output gain. Default is 0.74
  13533. </p>
  13534. </dd>
  13535. <dt>&lsquo;<samp>delay</samp>&rsquo;</dt>
  13536. <dd><p>Set delay in milliseconds. Default is 3.0.
  13537. </p>
  13538. </dd>
  13539. <dt>&lsquo;<samp>decay</samp>&rsquo;</dt>
  13540. <dd><p>Set decay. Default is 0.4.
  13541. </p>
  13542. </dd>
  13543. <dt>&lsquo;<samp>speed</samp>&rsquo;</dt>
  13544. <dd><p>Set modulation speed in Hz. Default is 0.5.
  13545. </p>
  13546. </dd>
  13547. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  13548. <dd><p>Set modulation type. Default is triangular.
  13549. </p>
  13550. <p>It accepts the following values:
  13551. </p><dl compact="compact">
  13552. <dt>&lsquo;<samp>triangular, t</samp>&rsquo;</dt>
  13553. <dt>&lsquo;<samp>sinusoidal, s</samp>&rsquo;</dt>
  13554. </dl>
  13555. </dd>
  13556. </dl>
  13557. <a name="apulsator"></a>
  13558. <h2 class="section"><a href="ffplay-all.html#toc-apulsator">27.34 apulsator</a></h2>
  13559. <p>Audio pulsator is something between an autopanner and a tremolo.
  13560. But it can produce funny stereo effects as well. Pulsator changes the volume
  13561. of the left and right channel based on a LFO (low frequency oscillator) with
  13562. different waveforms and shifted phases.
  13563. This filter have the ability to define an offset between left and right
  13564. channel. An offset of 0 means that both LFO shapes match each other.
  13565. The left and right channel are altered equally - a conventional tremolo.
  13566. An offset of 50% means that the shape of the right channel is exactly shifted
  13567. in phase (or moved backwards about half of the frequency) - pulsator acts as
  13568. an autopanner. At 1 both curves match again. Every setting in between moves the
  13569. phase shift gapless between all stages and produces some &quot;bypassing&quot; sounds with
  13570. sine and triangle waveforms. The more you set the offset near 1 (starting from
  13571. the 0.5) the faster the signal passes from the left to the right speaker.
  13572. </p>
  13573. <p>The filter accepts the following options:
  13574. </p>
  13575. <dl compact="compact">
  13576. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  13577. <dd><p>Set input gain. By default it is 1. Range is [0.015625 - 64].
  13578. </p>
  13579. </dd>
  13580. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  13581. <dd><p>Set output gain. By default it is 1. Range is [0.015625 - 64].
  13582. </p>
  13583. </dd>
  13584. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  13585. <dd><p>Set waveform shape the LFO will use. Can be one of: sine, triangle, square,
  13586. sawup or sawdown. Default is sine.
  13587. </p>
  13588. </dd>
  13589. <dt>&lsquo;<samp>amount</samp>&rsquo;</dt>
  13590. <dd><p>Set modulation. Define how much of original signal is affected by the LFO.
  13591. </p>
  13592. </dd>
  13593. <dt>&lsquo;<samp>offset_l</samp>&rsquo;</dt>
  13594. <dd><p>Set left channel offset. Default is 0. Allowed range is [0 - 1].
  13595. </p>
  13596. </dd>
  13597. <dt>&lsquo;<samp>offset_r</samp>&rsquo;</dt>
  13598. <dd><p>Set right channel offset. Default is 0.5. Allowed range is [0 - 1].
  13599. </p>
  13600. </dd>
  13601. <dt>&lsquo;<samp>width</samp>&rsquo;</dt>
  13602. <dd><p>Set pulse width. Default is 1. Allowed range is [0 - 2].
  13603. </p>
  13604. </dd>
  13605. <dt>&lsquo;<samp>timing</samp>&rsquo;</dt>
  13606. <dd><p>Set possible timing mode. Can be one of: bpm, ms or hz. Default is hz.
  13607. </p>
  13608. </dd>
  13609. <dt>&lsquo;<samp>bpm</samp>&rsquo;</dt>
  13610. <dd><p>Set bpm. Default is 120. Allowed range is [30 - 300]. Only used if timing
  13611. is set to bpm.
  13612. </p>
  13613. </dd>
  13614. <dt>&lsquo;<samp>ms</samp>&rsquo;</dt>
  13615. <dd><p>Set ms. Default is 500. Allowed range is [10 - 2000]. Only used if timing
  13616. is set to ms.
  13617. </p>
  13618. </dd>
  13619. <dt>&lsquo;<samp>hz</samp>&rsquo;</dt>
  13620. <dd><p>Set frequency in Hz. Default is 2. Allowed range is [0.01 - 100]. Only used
  13621. if timing is set to hz.
  13622. </p></dd>
  13623. </dl>
  13624. <p><a name="aresample"></a>
  13625. </p><a name="aresample-1"></a>
  13626. <h2 class="section"><a href="ffplay-all.html#toc-aresample-1">27.35 aresample</a></h2>
  13627. <p>Resample the input audio to the specified parameters, using the
  13628. libswresample library. If none are specified then the filter will
  13629. automatically convert between its input and output.
  13630. </p>
  13631. <p>This filter is also able to stretch/squeeze the audio data to make it match
  13632. the timestamps or to inject silence / cut out audio to make it match the
  13633. timestamps, do a combination of both or do neither.
  13634. </p>
  13635. <p>The filter accepts the syntax
  13636. [<var>sample_rate</var>:]<var>resampler_options</var>, where <var>sample_rate</var>
  13637. expresses a sample rate and <var>resampler_options</var> is a list of
  13638. <var>key</var>=<var>value</var> pairs, separated by &quot;:&quot;. See the
  13639. <a href="ffmpeg-resampler.html#Resampler-Options">(ffmpeg-resampler)&quot;Resampler Options&quot; section in the ffmpeg-resampler(1) manual</a>
  13640. for the complete list of supported options.
  13641. </p>
  13642. <a name="Examples-15"></a>
  13643. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-15">27.35.1 Examples</a></h3>
  13644. <ul>
  13645. <li>
  13646. Resample the input audio to 44100Hz:
  13647. <div class="example">
  13648. <pre class="example">aresample=44100
  13649. </pre></div>
  13650. </li><li>
  13651. Stretch/squeeze samples to the given timestamps, with a maximum of 1000
  13652. samples per second compensation:
  13653. <div class="example">
  13654. <pre class="example">aresample=async=1000
  13655. </pre></div>
  13656. </li></ul>
  13657. <a name="areverse"></a>
  13658. <h2 class="section"><a href="ffplay-all.html#toc-areverse">27.36 areverse</a></h2>
  13659. <p>Reverse an audio clip.
  13660. </p>
  13661. <p>Warning: This filter requires memory to buffer the entire clip, so trimming
  13662. is suggested.
  13663. </p>
  13664. <a name="Examples-29"></a>
  13665. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-29">27.36.1 Examples</a></h3>
  13666. <ul>
  13667. <li>
  13668. Take the first 5 seconds of a clip, and reverse it.
  13669. <div class="example">
  13670. <pre class="example">atrim=end=5,areverse
  13671. </pre></div>
  13672. </li></ul>
  13673. <a name="arnndn"></a>
  13674. <h2 class="section"><a href="ffplay-all.html#toc-arnndn">27.37 arnndn</a></h2>
  13675. <p>Reduce noise from speech using Recurrent Neural Networks.
  13676. </p>
  13677. <p>This filter accepts the following options:
  13678. </p>
  13679. <dl compact="compact">
  13680. <dt>&lsquo;<samp>model, m</samp>&rsquo;</dt>
  13681. <dd><p>Set train model file to load. This option is always required.
  13682. </p></dd>
  13683. </dl>
  13684. <a name="asetnsamples"></a>
  13685. <h2 class="section"><a href="ffplay-all.html#toc-asetnsamples">27.38 asetnsamples</a></h2>
  13686. <p>Set the number of samples per each output audio frame.
  13687. </p>
  13688. <p>The last output packet may contain a different number of samples, as
  13689. the filter will flush all the remaining samples when the input audio
  13690. signals its end.
  13691. </p>
  13692. <p>The filter accepts the following options:
  13693. </p>
  13694. <dl compact="compact">
  13695. <dt>&lsquo;<samp>nb_out_samples, n</samp>&rsquo;</dt>
  13696. <dd><p>Set the number of frames per each output audio frame. The number is
  13697. intended as the number of samples <em>per each channel</em>.
  13698. Default value is 1024.
  13699. </p>
  13700. </dd>
  13701. <dt>&lsquo;<samp>pad, p</samp>&rsquo;</dt>
  13702. <dd><p>If set to 1, the filter will pad the last audio frame with zeroes, so
  13703. that the last frame will contain the same number of samples as the
  13704. previous ones. Default value is 1.
  13705. </p></dd>
  13706. </dl>
  13707. <p>For example, to set the number of per-frame samples to 1234 and
  13708. disable padding for the last frame, use:
  13709. </p><div class="example">
  13710. <pre class="example">asetnsamples=n=1234:p=0
  13711. </pre></div>
  13712. <a name="asetrate"></a>
  13713. <h2 class="section"><a href="ffplay-all.html#toc-asetrate">27.39 asetrate</a></h2>
  13714. <p>Set the sample rate without altering the PCM data.
  13715. This will result in a change of speed and pitch.
  13716. </p>
  13717. <p>The filter accepts the following options:
  13718. </p>
  13719. <dl compact="compact">
  13720. <dt>&lsquo;<samp>sample_rate, r</samp>&rsquo;</dt>
  13721. <dd><p>Set the output sample rate. Default is 44100 Hz.
  13722. </p></dd>
  13723. </dl>
  13724. <a name="ashowinfo"></a>
  13725. <h2 class="section"><a href="ffplay-all.html#toc-ashowinfo">27.40 ashowinfo</a></h2>
  13726. <p>Show a line containing various information for each input audio frame.
  13727. The input audio is not modified.
  13728. </p>
  13729. <p>The shown line contains a sequence of key/value pairs of the form
  13730. <var>key</var>:<var>value</var>.
  13731. </p>
  13732. <p>The following values are shown in the output:
  13733. </p>
  13734. <dl compact="compact">
  13735. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  13736. <dd><p>The (sequential) number of the input frame, starting from 0.
  13737. </p>
  13738. </dd>
  13739. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  13740. <dd><p>The presentation timestamp of the input frame, in time base units; the time base
  13741. depends on the filter input pad, and is usually 1/<var>sample_rate</var>.
  13742. </p>
  13743. </dd>
  13744. <dt>&lsquo;<samp>pts_time</samp>&rsquo;</dt>
  13745. <dd><p>The presentation timestamp of the input frame in seconds.
  13746. </p>
  13747. </dd>
  13748. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  13749. <dd><p>position of the frame in the input stream, -1 if this information in
  13750. unavailable and/or meaningless (for example in case of synthetic audio)
  13751. </p>
  13752. </dd>
  13753. <dt>&lsquo;<samp>fmt</samp>&rsquo;</dt>
  13754. <dd><p>The sample format.
  13755. </p>
  13756. </dd>
  13757. <dt>&lsquo;<samp>chlayout</samp>&rsquo;</dt>
  13758. <dd><p>The channel layout.
  13759. </p>
  13760. </dd>
  13761. <dt>&lsquo;<samp>rate</samp>&rsquo;</dt>
  13762. <dd><p>The sample rate for the audio frame.
  13763. </p>
  13764. </dd>
  13765. <dt>&lsquo;<samp>nb_samples</samp>&rsquo;</dt>
  13766. <dd><p>The number of samples (per channel) in the frame.
  13767. </p>
  13768. </dd>
  13769. <dt>&lsquo;<samp>checksum</samp>&rsquo;</dt>
  13770. <dd><p>The Adler-32 checksum (printed in hexadecimal) of the audio data. For planar
  13771. audio, the data is treated as if all the planes were concatenated.
  13772. </p>
  13773. </dd>
  13774. <dt>&lsquo;<samp>plane_checksums</samp>&rsquo;</dt>
  13775. <dd><p>A list of Adler-32 checksums for each data plane.
  13776. </p></dd>
  13777. </dl>
  13778. <a name="asoftclip"></a>
  13779. <h2 class="section"><a href="ffplay-all.html#toc-asoftclip">27.41 asoftclip</a></h2>
  13780. <p>Apply audio soft clipping.
  13781. </p>
  13782. <p>Soft clipping is a type of distortion effect where the amplitude of a signal is saturated
  13783. along a smooth curve, rather than the abrupt shape of hard-clipping.
  13784. </p>
  13785. <p>This filter accepts the following options:
  13786. </p>
  13787. <dl compact="compact">
  13788. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  13789. <dd><p>Set type of soft-clipping.
  13790. </p>
  13791. <p>It accepts the following values:
  13792. </p><dl compact="compact">
  13793. <dt>&lsquo;<samp>tanh</samp>&rsquo;</dt>
  13794. <dt>&lsquo;<samp>atan</samp>&rsquo;</dt>
  13795. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  13796. <dt>&lsquo;<samp>exp</samp>&rsquo;</dt>
  13797. <dt>&lsquo;<samp>alg</samp>&rsquo;</dt>
  13798. <dt>&lsquo;<samp>quintic</samp>&rsquo;</dt>
  13799. <dt>&lsquo;<samp>sin</samp>&rsquo;</dt>
  13800. </dl>
  13801. </dd>
  13802. <dt>&lsquo;<samp>param</samp>&rsquo;</dt>
  13803. <dd><p>Set additional parameter which controls sigmoid function.
  13804. </p></dd>
  13805. </dl>
  13806. <a name="Commands-27"></a>
  13807. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-27">27.41.1 Commands</a></h3>
  13808. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  13809. </p>
  13810. <a name="asr"></a>
  13811. <h2 class="section"><a href="ffplay-all.html#toc-asr">27.42 asr</a></h2>
  13812. <p>Automatic Speech Recognition
  13813. </p>
  13814. <p>This filter uses PocketSphinx for speech recognition. To enable
  13815. compilation of this filter, you need to configure FFmpeg with
  13816. <code>--enable-pocketsphinx</code>.
  13817. </p>
  13818. <p>It accepts the following options:
  13819. </p>
  13820. <dl compact="compact">
  13821. <dt>&lsquo;<samp>rate</samp>&rsquo;</dt>
  13822. <dd><p>Set sampling rate of input audio. Defaults is <code>16000</code>.
  13823. This need to match speech models, otherwise one will get poor results.
  13824. </p>
  13825. </dd>
  13826. <dt>&lsquo;<samp>hmm</samp>&rsquo;</dt>
  13827. <dd><p>Set dictionary containing acoustic model files.
  13828. </p>
  13829. </dd>
  13830. <dt>&lsquo;<samp>dict</samp>&rsquo;</dt>
  13831. <dd><p>Set pronunciation dictionary.
  13832. </p>
  13833. </dd>
  13834. <dt>&lsquo;<samp>lm</samp>&rsquo;</dt>
  13835. <dd><p>Set language model file.
  13836. </p>
  13837. </dd>
  13838. <dt>&lsquo;<samp>lmctl</samp>&rsquo;</dt>
  13839. <dd><p>Set language model set.
  13840. </p>
  13841. </dd>
  13842. <dt>&lsquo;<samp>lmname</samp>&rsquo;</dt>
  13843. <dd><p>Set which language model to use.
  13844. </p>
  13845. </dd>
  13846. <dt>&lsquo;<samp>logfn</samp>&rsquo;</dt>
  13847. <dd><p>Set output for log messages.
  13848. </p></dd>
  13849. </dl>
  13850. <p>The filter exports recognized speech as the frame metadata <code>lavfi.asr.text</code>.
  13851. </p>
  13852. <p><a name="astats"></a>
  13853. </p><a name="astats-1"></a>
  13854. <h2 class="section"><a href="ffplay-all.html#toc-astats-1">27.43 astats</a></h2>
  13855. <p>Display time domain statistical information about the audio channels.
  13856. Statistics are calculated and displayed for each audio channel and,
  13857. where applicable, an overall figure is also given.
  13858. </p>
  13859. <p>It accepts the following option:
  13860. </p><dl compact="compact">
  13861. <dt>&lsquo;<samp>length</samp>&rsquo;</dt>
  13862. <dd><p>Short window length in seconds, used for peak and trough RMS measurement.
  13863. Default is <code>0.05</code> (50 milliseconds). Allowed range is <code>[0.01 - 10]</code>.
  13864. </p>
  13865. </dd>
  13866. <dt>&lsquo;<samp>metadata</samp>&rsquo;</dt>
  13867. <dd>
  13868. <p>Set metadata injection. All the metadata keys are prefixed with <code>lavfi.astats.X</code>,
  13869. where <code>X</code> is channel number starting from 1 or string <code>Overall</code>. Default is
  13870. disabled.
  13871. </p>
  13872. <p>Available keys for each channel are:
  13873. DC_offset
  13874. Min_level
  13875. Max_level
  13876. Min_difference
  13877. Max_difference
  13878. Mean_difference
  13879. RMS_difference
  13880. Peak_level
  13881. RMS_peak
  13882. RMS_trough
  13883. Crest_factor
  13884. Flat_factor
  13885. Peak_count
  13886. Bit_depth
  13887. Dynamic_range
  13888. Zero_crossings
  13889. Zero_crossings_rate
  13890. Number_of_NaNs
  13891. Number_of_Infs
  13892. Number_of_denormals
  13893. </p>
  13894. <p>and for Overall:
  13895. DC_offset
  13896. Min_level
  13897. Max_level
  13898. Min_difference
  13899. Max_difference
  13900. Mean_difference
  13901. RMS_difference
  13902. Peak_level
  13903. RMS_level
  13904. RMS_peak
  13905. RMS_trough
  13906. Flat_factor
  13907. Peak_count
  13908. Bit_depth
  13909. Number_of_samples
  13910. Number_of_NaNs
  13911. Number_of_Infs
  13912. Number_of_denormals
  13913. </p>
  13914. <p>For example full key look like this <code>lavfi.astats.1.DC_offset</code> or
  13915. this <code>lavfi.astats.Overall.Peak_count</code>.
  13916. </p>
  13917. <p>For description what each key means read below.
  13918. </p>
  13919. </dd>
  13920. <dt>&lsquo;<samp>reset</samp>&rsquo;</dt>
  13921. <dd><p>Set number of frame after which stats are going to be recalculated.
  13922. Default is disabled.
  13923. </p>
  13924. </dd>
  13925. <dt>&lsquo;<samp>measure_perchannel</samp>&rsquo;</dt>
  13926. <dd><p>Select the entries which need to be measured per channel. The metadata keys can
  13927. be used as flags, default is &lsquo;<samp>all</samp>&rsquo; which measures everything.
  13928. &lsquo;<samp>none</samp>&rsquo; disables all per channel measurement.
  13929. </p>
  13930. </dd>
  13931. <dt>&lsquo;<samp>measure_overall</samp>&rsquo;</dt>
  13932. <dd><p>Select the entries which need to be measured overall. The metadata keys can
  13933. be used as flags, default is &lsquo;<samp>all</samp>&rsquo; which measures everything.
  13934. &lsquo;<samp>none</samp>&rsquo; disables all overall measurement.
  13935. </p>
  13936. </dd>
  13937. </dl>
  13938. <p>A description of each shown parameter follows:
  13939. </p>
  13940. <dl compact="compact">
  13941. <dt>&lsquo;<samp>DC offset</samp>&rsquo;</dt>
  13942. <dd><p>Mean amplitude displacement from zero.
  13943. </p>
  13944. </dd>
  13945. <dt>&lsquo;<samp>Min level</samp>&rsquo;</dt>
  13946. <dd><p>Minimal sample level.
  13947. </p>
  13948. </dd>
  13949. <dt>&lsquo;<samp>Max level</samp>&rsquo;</dt>
  13950. <dd><p>Maximal sample level.
  13951. </p>
  13952. </dd>
  13953. <dt>&lsquo;<samp>Min difference</samp>&rsquo;</dt>
  13954. <dd><p>Minimal difference between two consecutive samples.
  13955. </p>
  13956. </dd>
  13957. <dt>&lsquo;<samp>Max difference</samp>&rsquo;</dt>
  13958. <dd><p>Maximal difference between two consecutive samples.
  13959. </p>
  13960. </dd>
  13961. <dt>&lsquo;<samp>Mean difference</samp>&rsquo;</dt>
  13962. <dd><p>Mean difference between two consecutive samples.
  13963. The average of each difference between two consecutive samples.
  13964. </p>
  13965. </dd>
  13966. <dt>&lsquo;<samp>RMS difference</samp>&rsquo;</dt>
  13967. <dd><p>Root Mean Square difference between two consecutive samples.
  13968. </p>
  13969. </dd>
  13970. <dt>&lsquo;<samp>Peak level dB</samp>&rsquo;</dt>
  13971. <dt>&lsquo;<samp>RMS level dB</samp>&rsquo;</dt>
  13972. <dd><p>Standard peak and RMS level measured in dBFS.
  13973. </p>
  13974. </dd>
  13975. <dt>&lsquo;<samp>RMS peak dB</samp>&rsquo;</dt>
  13976. <dt>&lsquo;<samp>RMS trough dB</samp>&rsquo;</dt>
  13977. <dd><p>Peak and trough values for RMS level measured over a short window.
  13978. </p>
  13979. </dd>
  13980. <dt>&lsquo;<samp>Crest factor</samp>&rsquo;</dt>
  13981. <dd><p>Standard ratio of peak to RMS level (note: not in dB).
  13982. </p>
  13983. </dd>
  13984. <dt>&lsquo;<samp>Flat factor</samp>&rsquo;</dt>
  13985. <dd><p>Flatness (i.e. consecutive samples with the same value) of the signal at its peak levels
  13986. (i.e. either <var>Min level</var> or <var>Max level</var>).
  13987. </p>
  13988. </dd>
  13989. <dt>&lsquo;<samp>Peak count</samp>&rsquo;</dt>
  13990. <dd><p>Number of occasions (not the number of samples) that the signal attained either
  13991. <var>Min level</var> or <var>Max level</var>.
  13992. </p>
  13993. </dd>
  13994. <dt>&lsquo;<samp>Bit depth</samp>&rsquo;</dt>
  13995. <dd><p>Overall bit depth of audio. Number of bits used for each sample.
  13996. </p>
  13997. </dd>
  13998. <dt>&lsquo;<samp>Dynamic range</samp>&rsquo;</dt>
  13999. <dd><p>Measured dynamic range of audio in dB.
  14000. </p>
  14001. </dd>
  14002. <dt>&lsquo;<samp>Zero crossings</samp>&rsquo;</dt>
  14003. <dd><p>Number of points where the waveform crosses the zero level axis.
  14004. </p>
  14005. </dd>
  14006. <dt>&lsquo;<samp>Zero crossings rate</samp>&rsquo;</dt>
  14007. <dd><p>Rate of Zero crossings and number of audio samples.
  14008. </p></dd>
  14009. </dl>
  14010. <a name="atempo"></a>
  14011. <h2 class="section"><a href="ffplay-all.html#toc-atempo">27.44 atempo</a></h2>
  14012. <p>Adjust audio tempo.
  14013. </p>
  14014. <p>The filter accepts exactly one parameter, the audio tempo. If not
  14015. specified then the filter will assume nominal 1.0 tempo. Tempo must
  14016. be in the [0.5, 100.0] range.
  14017. </p>
  14018. <p>Note that tempo greater than 2 will skip some samples rather than
  14019. blend them in. If for any reason this is a concern it is always
  14020. possible to daisy-chain several instances of atempo to achieve the
  14021. desired product tempo.
  14022. </p>
  14023. <a name="Examples-60"></a>
  14024. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-60">27.44.1 Examples</a></h3>
  14025. <ul>
  14026. <li>
  14027. Slow down audio to 80% tempo:
  14028. <div class="example">
  14029. <pre class="example">atempo=0.8
  14030. </pre></div>
  14031. </li><li>
  14032. To speed up audio to 300% tempo:
  14033. <div class="example">
  14034. <pre class="example">atempo=3
  14035. </pre></div>
  14036. </li><li>
  14037. To speed up audio to 300% tempo by daisy-chaining two atempo instances:
  14038. <div class="example">
  14039. <pre class="example">atempo=sqrt(3),atempo=sqrt(3)
  14040. </pre></div>
  14041. </li></ul>
  14042. <a name="Commands-3"></a>
  14043. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-3">27.44.2 Commands</a></h3>
  14044. <p>This filter supports the following commands:
  14045. </p><dl compact="compact">
  14046. <dt>&lsquo;<samp>tempo</samp>&rsquo;</dt>
  14047. <dd><p>Change filter tempo scale factor.
  14048. Syntax for the command is : &quot;<var>tempo</var>&quot;
  14049. </p></dd>
  14050. </dl>
  14051. <a name="atrim"></a>
  14052. <h2 class="section"><a href="ffplay-all.html#toc-atrim">27.45 atrim</a></h2>
  14053. <p>Trim the input so that the output contains one continuous subpart of the input.
  14054. </p>
  14055. <p>It accepts the following parameters:
  14056. </p><dl compact="compact">
  14057. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  14058. <dd><p>Timestamp (in seconds) of the start of the section to keep. I.e. the audio
  14059. sample with the timestamp <var>start</var> will be the first sample in the output.
  14060. </p>
  14061. </dd>
  14062. <dt>&lsquo;<samp>end</samp>&rsquo;</dt>
  14063. <dd><p>Specify time of the first audio sample that will be dropped, i.e. the
  14064. audio sample immediately preceding the one with the timestamp <var>end</var> will be
  14065. the last sample in the output.
  14066. </p>
  14067. </dd>
  14068. <dt>&lsquo;<samp>start_pts</samp>&rsquo;</dt>
  14069. <dd><p>Same as <var>start</var>, except this option sets the start timestamp in samples
  14070. instead of seconds.
  14071. </p>
  14072. </dd>
  14073. <dt>&lsquo;<samp>end_pts</samp>&rsquo;</dt>
  14074. <dd><p>Same as <var>end</var>, except this option sets the end timestamp in samples instead
  14075. of seconds.
  14076. </p>
  14077. </dd>
  14078. <dt>&lsquo;<samp>duration</samp>&rsquo;</dt>
  14079. <dd><p>The maximum duration of the output in seconds.
  14080. </p>
  14081. </dd>
  14082. <dt>&lsquo;<samp>start_sample</samp>&rsquo;</dt>
  14083. <dd><p>The number of the first sample that should be output.
  14084. </p>
  14085. </dd>
  14086. <dt>&lsquo;<samp>end_sample</samp>&rsquo;</dt>
  14087. <dd><p>The number of the first sample that should be dropped.
  14088. </p></dd>
  14089. </dl>
  14090. <p>&lsquo;<samp>start</samp>&rsquo;, &lsquo;<samp>end</samp>&rsquo;, and &lsquo;<samp>duration</samp>&rsquo; are expressed as time
  14091. duration specifications; see
  14092. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  14093. </p>
  14094. <p>Note that the first two sets of the start/end options and the &lsquo;<samp>duration</samp>&rsquo;
  14095. option look at the frame timestamp, while the _sample options simply count the
  14096. samples that pass through the filter. So start/end_pts and start/end_sample will
  14097. give different results when the timestamps are wrong, inexact or do not start at
  14098. zero. Also note that this filter does not modify the timestamps. If you wish
  14099. to have the output timestamps start at zero, insert the asetpts filter after the
  14100. atrim filter.
  14101. </p>
  14102. <p>If multiple start or end options are set, this filter tries to be greedy and
  14103. keep all samples that match at least one of the specified constraints. To keep
  14104. only the part that matches all the constraints at once, chain multiple atrim
  14105. filters.
  14106. </p>
  14107. <p>The defaults are such that all the input is kept. So it is possible to set e.g.
  14108. just the end values to keep everything before the specified time.
  14109. </p>
  14110. <p>Examples:
  14111. </p><ul>
  14112. <li>
  14113. Drop everything except the second minute of input:
  14114. <div class="example">
  14115. <pre class="example">ffmpeg -i INPUT -af atrim=60:120
  14116. </pre></div>
  14117. </li><li>
  14118. Keep only the first 1000 samples:
  14119. <div class="example">
  14120. <pre class="example">ffmpeg -i INPUT -af atrim=end_sample=1000
  14121. </pre></div>
  14122. </li></ul>
  14123. <a name="axcorrelate"></a>
  14124. <h2 class="section"><a href="ffplay-all.html#toc-axcorrelate">27.46 axcorrelate</a></h2>
  14125. <p>Calculate normalized cross-correlation between two input audio streams.
  14126. </p>
  14127. <p>Resulted samples are always between -1 and 1 inclusive.
  14128. If result is 1 it means two input samples are highly correlated in that selected segment.
  14129. Result 0 means they are not correlated at all.
  14130. If result is -1 it means two input samples are out of phase, which means they cancel each
  14131. other.
  14132. </p>
  14133. <p>The filter accepts the following options:
  14134. </p>
  14135. <dl compact="compact">
  14136. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  14137. <dd><p>Set size of segment over which cross-correlation is calculated.
  14138. Default is 256. Allowed range is from 2 to 131072.
  14139. </p>
  14140. </dd>
  14141. <dt>&lsquo;<samp>algo</samp>&rsquo;</dt>
  14142. <dd><p>Set algorithm for cross-correlation. Can be <code>slow</code> or <code>fast</code>.
  14143. Default is <code>slow</code>. Fast algorithm assumes mean values over any given segment
  14144. are always zero and thus need much less calculations to make.
  14145. This is generally not true, but is valid for typical audio streams.
  14146. </p></dd>
  14147. </dl>
  14148. <a name="Examples-54"></a>
  14149. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-54">27.46.1 Examples</a></h3>
  14150. <ul>
  14151. <li>
  14152. Calculate correlation between channels in stereo audio stream:
  14153. <div class="example">
  14154. <pre class="example">ffmpeg -i stereo.wav -af channelsplit,axcorrelate=size=1024:algo=fast correlation.wav
  14155. </pre></div>
  14156. </li></ul>
  14157. <a name="bandpass"></a>
  14158. <h2 class="section"><a href="ffplay-all.html#toc-bandpass">27.47 bandpass</a></h2>
  14159. <p>Apply a two-pole Butterworth band-pass filter with central
  14160. frequency <var>frequency</var>, and (3dB-point) band-width width.
  14161. The <var>csg</var> option selects a constant skirt gain (peak gain = Q)
  14162. instead of the default: constant 0dB peak gain.
  14163. The filter roll off at 6dB per octave (20dB per decade).
  14164. </p>
  14165. <p>The filter accepts the following options:
  14166. </p>
  14167. <dl compact="compact">
  14168. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  14169. <dd><p>Set the filter&rsquo;s central frequency. Default is <code>3000</code>.
  14170. </p>
  14171. </dd>
  14172. <dt>&lsquo;<samp>csg</samp>&rsquo;</dt>
  14173. <dd><p>Constant skirt gain if set to 1. Defaults to 0.
  14174. </p>
  14175. </dd>
  14176. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  14177. <dd><p>Set method to specify band-width of filter.
  14178. </p><dl compact="compact">
  14179. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  14180. <dd><p>Hz
  14181. </p></dd>
  14182. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  14183. <dd><p>Q-Factor
  14184. </p></dd>
  14185. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  14186. <dd><p>octave
  14187. </p></dd>
  14188. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  14189. <dd><p>slope
  14190. </p></dd>
  14191. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  14192. <dd><p>kHz
  14193. </p></dd>
  14194. </dl>
  14195. </dd>
  14196. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  14197. <dd><p>Specify the band-width of a filter in width_type units.
  14198. </p>
  14199. </dd>
  14200. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  14201. <dd><p>How much to use filtered signal in output. Default is 1.
  14202. Range is between 0 and 1.
  14203. </p>
  14204. </dd>
  14205. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  14206. <dd><p>Specify which channels to filter, by default all available are filtered.
  14207. </p>
  14208. </dd>
  14209. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  14210. <dd><p>Normalize biquad coefficients, by default is disabled.
  14211. Enabling it will normalize magnitude response at DC to 0dB.
  14212. </p></dd>
  14213. </dl>
  14214. <a name="Commands-56"></a>
  14215. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-56">27.47.1 Commands</a></h3>
  14216. <p>This filter supports the following commands:
  14217. </p><dl compact="compact">
  14218. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  14219. <dd><p>Change bandpass frequency.
  14220. Syntax for the command is : &quot;<var>frequency</var>&quot;
  14221. </p>
  14222. </dd>
  14223. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  14224. <dd><p>Change bandpass width_type.
  14225. Syntax for the command is : &quot;<var>width_type</var>&quot;
  14226. </p>
  14227. </dd>
  14228. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  14229. <dd><p>Change bandpass width.
  14230. Syntax for the command is : &quot;<var>width</var>&quot;
  14231. </p>
  14232. </dd>
  14233. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  14234. <dd><p>Change bandpass mix.
  14235. Syntax for the command is : &quot;<var>mix</var>&quot;
  14236. </p></dd>
  14237. </dl>
  14238. <a name="bandreject"></a>
  14239. <h2 class="section"><a href="ffplay-all.html#toc-bandreject">27.48 bandreject</a></h2>
  14240. <p>Apply a two-pole Butterworth band-reject filter with central
  14241. frequency <var>frequency</var>, and (3dB-point) band-width <var>width</var>.
  14242. The filter roll off at 6dB per octave (20dB per decade).
  14243. </p>
  14244. <p>The filter accepts the following options:
  14245. </p>
  14246. <dl compact="compact">
  14247. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  14248. <dd><p>Set the filter&rsquo;s central frequency. Default is <code>3000</code>.
  14249. </p>
  14250. </dd>
  14251. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  14252. <dd><p>Set method to specify band-width of filter.
  14253. </p><dl compact="compact">
  14254. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  14255. <dd><p>Hz
  14256. </p></dd>
  14257. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  14258. <dd><p>Q-Factor
  14259. </p></dd>
  14260. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  14261. <dd><p>octave
  14262. </p></dd>
  14263. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  14264. <dd><p>slope
  14265. </p></dd>
  14266. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  14267. <dd><p>kHz
  14268. </p></dd>
  14269. </dl>
  14270. </dd>
  14271. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  14272. <dd><p>Specify the band-width of a filter in width_type units.
  14273. </p>
  14274. </dd>
  14275. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  14276. <dd><p>How much to use filtered signal in output. Default is 1.
  14277. Range is between 0 and 1.
  14278. </p>
  14279. </dd>
  14280. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  14281. <dd><p>Specify which channels to filter, by default all available are filtered.
  14282. </p>
  14283. </dd>
  14284. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  14285. <dd><p>Normalize biquad coefficients, by default is disabled.
  14286. Enabling it will normalize magnitude response at DC to 0dB.
  14287. </p></dd>
  14288. </dl>
  14289. <a name="Commands-66"></a>
  14290. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-66">27.48.1 Commands</a></h3>
  14291. <p>This filter supports the following commands:
  14292. </p><dl compact="compact">
  14293. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  14294. <dd><p>Change bandreject frequency.
  14295. Syntax for the command is : &quot;<var>frequency</var>&quot;
  14296. </p>
  14297. </dd>
  14298. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  14299. <dd><p>Change bandreject width_type.
  14300. Syntax for the command is : &quot;<var>width_type</var>&quot;
  14301. </p>
  14302. </dd>
  14303. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  14304. <dd><p>Change bandreject width.
  14305. Syntax for the command is : &quot;<var>width</var>&quot;
  14306. </p>
  14307. </dd>
  14308. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  14309. <dd><p>Change bandreject mix.
  14310. Syntax for the command is : &quot;<var>mix</var>&quot;
  14311. </p></dd>
  14312. </dl>
  14313. <a name="bass_002c-lowshelf"></a>
  14314. <h2 class="section"><a href="ffplay-all.html#toc-bass_002c-lowshelf">27.49 bass, lowshelf</a></h2>
  14315. <p>Boost or cut the bass (lower) frequencies of the audio using a two-pole
  14316. shelving filter with a response similar to that of a standard
  14317. hi-fi&rsquo;s tone-controls. This is also known as shelving equalisation (EQ).
  14318. </p>
  14319. <p>The filter accepts the following options:
  14320. </p>
  14321. <dl compact="compact">
  14322. <dt>&lsquo;<samp>gain, g</samp>&rsquo;</dt>
  14323. <dd><p>Give the gain at 0 Hz. Its useful range is about -20
  14324. (for a large cut) to +20 (for a large boost).
  14325. Beware of clipping when using a positive gain.
  14326. </p>
  14327. </dd>
  14328. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  14329. <dd><p>Set the filter&rsquo;s central frequency and so can be used
  14330. to extend or reduce the frequency range to be boosted or cut.
  14331. The default value is <code>100</code> Hz.
  14332. </p>
  14333. </dd>
  14334. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  14335. <dd><p>Set method to specify band-width of filter.
  14336. </p><dl compact="compact">
  14337. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  14338. <dd><p>Hz
  14339. </p></dd>
  14340. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  14341. <dd><p>Q-Factor
  14342. </p></dd>
  14343. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  14344. <dd><p>octave
  14345. </p></dd>
  14346. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  14347. <dd><p>slope
  14348. </p></dd>
  14349. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  14350. <dd><p>kHz
  14351. </p></dd>
  14352. </dl>
  14353. </dd>
  14354. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  14355. <dd><p>Determine how steep is the filter&rsquo;s shelf transition.
  14356. </p>
  14357. </dd>
  14358. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  14359. <dd><p>How much to use filtered signal in output. Default is 1.
  14360. Range is between 0 and 1.
  14361. </p>
  14362. </dd>
  14363. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  14364. <dd><p>Specify which channels to filter, by default all available are filtered.
  14365. </p>
  14366. </dd>
  14367. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  14368. <dd><p>Normalize biquad coefficients, by default is disabled.
  14369. Enabling it will normalize magnitude response at DC to 0dB.
  14370. </p></dd>
  14371. </dl>
  14372. <a name="Commands-29"></a>
  14373. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-29">27.49.1 Commands</a></h3>
  14374. <p>This filter supports the following commands:
  14375. </p><dl compact="compact">
  14376. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  14377. <dd><p>Change bass frequency.
  14378. Syntax for the command is : &quot;<var>frequency</var>&quot;
  14379. </p>
  14380. </dd>
  14381. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  14382. <dd><p>Change bass width_type.
  14383. Syntax for the command is : &quot;<var>width_type</var>&quot;
  14384. </p>
  14385. </dd>
  14386. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  14387. <dd><p>Change bass width.
  14388. Syntax for the command is : &quot;<var>width</var>&quot;
  14389. </p>
  14390. </dd>
  14391. <dt>&lsquo;<samp>gain, g</samp>&rsquo;</dt>
  14392. <dd><p>Change bass gain.
  14393. Syntax for the command is : &quot;<var>gain</var>&quot;
  14394. </p>
  14395. </dd>
  14396. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  14397. <dd><p>Change bass mix.
  14398. Syntax for the command is : &quot;<var>mix</var>&quot;
  14399. </p></dd>
  14400. </dl>
  14401. <a name="biquad"></a>
  14402. <h2 class="section"><a href="ffplay-all.html#toc-biquad">27.50 biquad</a></h2>
  14403. <p>Apply a biquad IIR filter with the given coefficients.
  14404. Where <var>b0</var>, <var>b1</var>, <var>b2</var> and <var>a0</var>, <var>a1</var>, <var>a2</var>
  14405. are the numerator and denominator coefficients respectively.
  14406. and <var>channels</var>, <var>c</var> specify which channels to filter, by default all
  14407. available are filtered.
  14408. </p>
  14409. <a name="Commands-25"></a>
  14410. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-25">27.50.1 Commands</a></h3>
  14411. <p>This filter supports the following commands:
  14412. </p><dl compact="compact">
  14413. <dt>&lsquo;<samp>a0</samp>&rsquo;</dt>
  14414. <dt>&lsquo;<samp>a1</samp>&rsquo;</dt>
  14415. <dt>&lsquo;<samp>a2</samp>&rsquo;</dt>
  14416. <dt>&lsquo;<samp>b0</samp>&rsquo;</dt>
  14417. <dt>&lsquo;<samp>b1</samp>&rsquo;</dt>
  14418. <dt>&lsquo;<samp>b2</samp>&rsquo;</dt>
  14419. <dd><p>Change biquad parameter.
  14420. Syntax for the command is : &quot;<var>value</var>&quot;
  14421. </p>
  14422. </dd>
  14423. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  14424. <dd><p>How much to use filtered signal in output. Default is 1.
  14425. Range is between 0 and 1.
  14426. </p>
  14427. </dd>
  14428. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  14429. <dd><p>Specify which channels to filter, by default all available are filtered.
  14430. </p>
  14431. </dd>
  14432. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  14433. <dd><p>Normalize biquad coefficients, by default is disabled.
  14434. Enabling it will normalize magnitude response at DC to 0dB.
  14435. </p></dd>
  14436. </dl>
  14437. <a name="bs2b"></a>
  14438. <h2 class="section"><a href="ffplay-all.html#toc-bs2b">27.51 bs2b</a></h2>
  14439. <p>Bauer stereo to binaural transformation, which improves headphone listening of
  14440. stereo audio records.
  14441. </p>
  14442. <p>To enable compilation of this filter you need to configure FFmpeg with
  14443. <code>--enable-libbs2b</code>.
  14444. </p>
  14445. <p>It accepts the following parameters:
  14446. </p><dl compact="compact">
  14447. <dt>&lsquo;<samp>profile</samp>&rsquo;</dt>
  14448. <dd><p>Pre-defined crossfeed level.
  14449. </p><dl compact="compact">
  14450. <dt>&lsquo;<samp>default</samp>&rsquo;</dt>
  14451. <dd><p>Default level (fcut=700, feed=50).
  14452. </p>
  14453. </dd>
  14454. <dt>&lsquo;<samp>cmoy</samp>&rsquo;</dt>
  14455. <dd><p>Chu Moy circuit (fcut=700, feed=60).
  14456. </p>
  14457. </dd>
  14458. <dt>&lsquo;<samp>jmeier</samp>&rsquo;</dt>
  14459. <dd><p>Jan Meier circuit (fcut=650, feed=95).
  14460. </p>
  14461. </dd>
  14462. </dl>
  14463. </dd>
  14464. <dt>&lsquo;<samp>fcut</samp>&rsquo;</dt>
  14465. <dd><p>Cut frequency (in Hz).
  14466. </p>
  14467. </dd>
  14468. <dt>&lsquo;<samp>feed</samp>&rsquo;</dt>
  14469. <dd><p>Feed level (in Hz).
  14470. </p>
  14471. </dd>
  14472. </dl>
  14473. <a name="channelmap"></a>
  14474. <h2 class="section"><a href="ffplay-all.html#toc-channelmap">27.52 channelmap</a></h2>
  14475. <p>Remap input channels to new locations.
  14476. </p>
  14477. <p>It accepts the following parameters:
  14478. </p><dl compact="compact">
  14479. <dt>&lsquo;<samp>map</samp>&rsquo;</dt>
  14480. <dd><p>Map channels from input to output. The argument is a &rsquo;|&rsquo;-separated list of
  14481. mappings, each in the <code><var>in_channel</var>-<var>out_channel</var></code> or
  14482. <var>in_channel</var> form. <var>in_channel</var> can be either the name of the input
  14483. channel (e.g. FL for front left) or its index in the input channel layout.
  14484. <var>out_channel</var> is the name of the output channel or its index in the output
  14485. channel layout. If <var>out_channel</var> is not given then it is implicitly an
  14486. index, starting with zero and increasing by one for each mapping.
  14487. </p>
  14488. </dd>
  14489. <dt>&lsquo;<samp>channel_layout</samp>&rsquo;</dt>
  14490. <dd><p>The channel layout of the output stream.
  14491. </p></dd>
  14492. </dl>
  14493. <p>If no mapping is present, the filter will implicitly map input channels to
  14494. output channels, preserving indices.
  14495. </p>
  14496. <a name="Examples-154"></a>
  14497. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-154">27.52.1 Examples</a></h3>
  14498. <ul>
  14499. <li>
  14500. For example, assuming a 5.1+downmix input MOV file,
  14501. <div class="example">
  14502. <pre class="example">ffmpeg -i in.mov -filter 'channelmap=map=DL-FL|DR-FR' out.wav
  14503. </pre></div>
  14504. <p>will create an output WAV file tagged as stereo from the downmix channels of
  14505. the input.
  14506. </p>
  14507. </li><li>
  14508. To fix a 5.1 WAV improperly encoded in AAC&rsquo;s native channel order
  14509. <div class="example">
  14510. <pre class="example">ffmpeg -i in.wav -filter 'channelmap=1|2|0|5|3|4:5.1' out.wav
  14511. </pre></div>
  14512. </li></ul>
  14513. <a name="channelsplit"></a>
  14514. <h2 class="section"><a href="ffplay-all.html#toc-channelsplit">27.53 channelsplit</a></h2>
  14515. <p>Split each channel from an input audio stream into a separate output stream.
  14516. </p>
  14517. <p>It accepts the following parameters:
  14518. </p><dl compact="compact">
  14519. <dt>&lsquo;<samp>channel_layout</samp>&rsquo;</dt>
  14520. <dd><p>The channel layout of the input stream. The default is &quot;stereo&quot;.
  14521. </p></dd>
  14522. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  14523. <dd><p>A channel layout describing the channels to be extracted as separate output streams
  14524. or &quot;all&quot; to extract each input channel as a separate stream. The default is &quot;all&quot;.
  14525. </p>
  14526. <p>Choosing channels not present in channel layout in the input will result in an error.
  14527. </p></dd>
  14528. </dl>
  14529. <a name="Examples-106"></a>
  14530. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-106">27.53.1 Examples</a></h3>
  14531. <ul>
  14532. <li>
  14533. For example, assuming a stereo input MP3 file,
  14534. <div class="example">
  14535. <pre class="example">ffmpeg -i in.mp3 -filter_complex channelsplit out.mkv
  14536. </pre></div>
  14537. <p>will create an output Matroska file with two audio streams, one containing only
  14538. the left channel and the other the right channel.
  14539. </p>
  14540. </li><li>
  14541. Split a 5.1 WAV file into per-channel files:
  14542. <div class="example">
  14543. <pre class="example">ffmpeg -i in.wav -filter_complex
  14544. 'channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]'
  14545. -map '[FL]' front_left.wav -map '[FR]' front_right.wav -map '[FC]'
  14546. front_center.wav -map '[LFE]' lfe.wav -map '[SL]' side_left.wav -map '[SR]'
  14547. side_right.wav
  14548. </pre></div>
  14549. </li><li>
  14550. Extract only LFE from a 5.1 WAV file:
  14551. <div class="example">
  14552. <pre class="example">ffmpeg -i in.wav -filter_complex 'channelsplit=channel_layout=5.1:channels=LFE[LFE]'
  14553. -map '[LFE]' lfe.wav
  14554. </pre></div>
  14555. </li></ul>
  14556. <a name="chorus"></a>
  14557. <h2 class="section"><a href="ffplay-all.html#toc-chorus">27.54 chorus</a></h2>
  14558. <p>Add a chorus effect to the audio.
  14559. </p>
  14560. <p>Can make a single vocal sound like a chorus, but can also be applied to instrumentation.
  14561. </p>
  14562. <p>Chorus resembles an echo effect with a short delay, but whereas with echo the delay is
  14563. constant, with chorus, it is varied using using sinusoidal or triangular modulation.
  14564. The modulation depth defines the range the modulated delay is played before or after
  14565. the delay. Hence the delayed sound will sound slower or faster, that is the delayed
  14566. sound tuned around the original one, like in a chorus where some vocals are slightly
  14567. off key.
  14568. </p>
  14569. <p>It accepts the following parameters:
  14570. </p><dl compact="compact">
  14571. <dt>&lsquo;<samp>in_gain</samp>&rsquo;</dt>
  14572. <dd><p>Set input gain. Default is 0.4.
  14573. </p>
  14574. </dd>
  14575. <dt>&lsquo;<samp>out_gain</samp>&rsquo;</dt>
  14576. <dd><p>Set output gain. Default is 0.4.
  14577. </p>
  14578. </dd>
  14579. <dt>&lsquo;<samp>delays</samp>&rsquo;</dt>
  14580. <dd><p>Set delays. A typical delay is around 40ms to 60ms.
  14581. </p>
  14582. </dd>
  14583. <dt>&lsquo;<samp>decays</samp>&rsquo;</dt>
  14584. <dd><p>Set decays.
  14585. </p>
  14586. </dd>
  14587. <dt>&lsquo;<samp>speeds</samp>&rsquo;</dt>
  14588. <dd><p>Set speeds.
  14589. </p>
  14590. </dd>
  14591. <dt>&lsquo;<samp>depths</samp>&rsquo;</dt>
  14592. <dd><p>Set depths.
  14593. </p></dd>
  14594. </dl>
  14595. <a name="Examples-42"></a>
  14596. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-42">27.54.1 Examples</a></h3>
  14597. <ul>
  14598. <li>
  14599. A single delay:
  14600. <div class="example">
  14601. <pre class="example">chorus=0.7:0.9:55:0.4:0.25:2
  14602. </pre></div>
  14603. </li><li>
  14604. Two delays:
  14605. <div class="example">
  14606. <pre class="example">chorus=0.6:0.9:50|60:0.4|0.32:0.25|0.4:2|1.3
  14607. </pre></div>
  14608. </li><li>
  14609. Fuller sounding chorus with three delays:
  14610. <div class="example">
  14611. <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
  14612. </pre></div>
  14613. </li></ul>
  14614. <a name="compand"></a>
  14615. <h2 class="section"><a href="ffplay-all.html#toc-compand">27.55 compand</a></h2>
  14616. <p>Compress or expand the audio&rsquo;s dynamic range.
  14617. </p>
  14618. <p>It accepts the following parameters:
  14619. </p>
  14620. <dl compact="compact">
  14621. <dt>&lsquo;<samp>attacks</samp>&rsquo;</dt>
  14622. <dt>&lsquo;<samp>decays</samp>&rsquo;</dt>
  14623. <dd><p>A list of times in seconds for each channel over which the instantaneous level
  14624. of the input signal is averaged to determine its volume. <var>attacks</var> refers to
  14625. increase of volume and <var>decays</var> refers to decrease of volume. For most
  14626. situations, the attack time (response to the audio getting louder) should be
  14627. shorter than the decay time, because the human ear is more sensitive to sudden
  14628. loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and
  14629. a typical value for decay is 0.8 seconds.
  14630. If specified number of attacks &amp; decays is lower than number of channels, the last
  14631. set attack/decay will be used for all remaining channels.
  14632. </p>
  14633. </dd>
  14634. <dt>&lsquo;<samp>points</samp>&rsquo;</dt>
  14635. <dd><p>A list of points for the transfer function, specified in dB relative to the
  14636. maximum possible signal amplitude. Each key points list must be defined using
  14637. the following syntax: <code>x0/y0|x1/y1|x2/y2|....</code> or
  14638. <code>x0/y0 x1/y1 x2/y2 ....</code>
  14639. </p>
  14640. <p>The input values must be in strictly increasing order but the transfer function
  14641. does not have to be monotonically rising. The point <code>0/0</code> is assumed but
  14642. may be overridden (by <code>0/out-dBn</code>). Typical values for the transfer
  14643. function are <code>-70/-70|-60/-20|1/0</code>.
  14644. </p>
  14645. </dd>
  14646. <dt>&lsquo;<samp>soft-knee</samp>&rsquo;</dt>
  14647. <dd><p>Set the curve radius in dB for all joints. It defaults to 0.01.
  14648. </p>
  14649. </dd>
  14650. <dt>&lsquo;<samp>gain</samp>&rsquo;</dt>
  14651. <dd><p>Set the additional gain in dB to be applied at all points on the transfer
  14652. function. This allows for easy adjustment of the overall gain.
  14653. It defaults to 0.
  14654. </p>
  14655. </dd>
  14656. <dt>&lsquo;<samp>volume</samp>&rsquo;</dt>
  14657. <dd><p>Set an initial volume, in dB, to be assumed for each channel when filtering
  14658. starts. This permits the user to supply a nominal level initially, so that, for
  14659. example, a very large gain is not applied to initial signal levels before the
  14660. companding has begun to operate. A typical value for audio which is initially
  14661. quiet is -90 dB. It defaults to 0.
  14662. </p>
  14663. </dd>
  14664. <dt>&lsquo;<samp>delay</samp>&rsquo;</dt>
  14665. <dd><p>Set a delay, in seconds. The input audio is analyzed immediately, but audio is
  14666. delayed before being fed to the volume adjuster. Specifying a delay
  14667. approximately equal to the attack/decay times allows the filter to effectively
  14668. operate in predictive rather than reactive mode. It defaults to 0.
  14669. </p>
  14670. </dd>
  14671. </dl>
  14672. <a name="Examples-16"></a>
  14673. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-16">27.55.1 Examples</a></h3>
  14674. <ul>
  14675. <li>
  14676. Make music with both quiet and loud passages suitable for listening to in a
  14677. noisy environment:
  14678. <div class="example">
  14679. <pre class="example">compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2
  14680. </pre></div>
  14681. <p>Another example for audio with whisper and explosion parts:
  14682. </p><div class="example">
  14683. <pre class="example">compand=0|0:1|1:-90/-900|-70/-70|-30/-9|0/-3:6:0:0:0
  14684. </pre></div>
  14685. </li><li>
  14686. A noise gate for when the noise is at a lower level than the signal:
  14687. <div class="example">
  14688. <pre class="example">compand=.1|.1:.2|.2:-900/-900|-50.1/-900|-50/-50:.01:0:-90:.1
  14689. </pre></div>
  14690. </li><li>
  14691. Here is another noise gate, this time for when the noise is at a higher level
  14692. than the signal (making it, in some ways, similar to squelch):
  14693. <div class="example">
  14694. <pre class="example">compand=.1|.1:.1|.1:-45.1/-45.1|-45/-900|0/-900:.01:45:-90:.1
  14695. </pre></div>
  14696. </li><li>
  14697. 2:1 compression starting at -6dB:
  14698. <div class="example">
  14699. <pre class="example">compand=points=-80/-80|-6/-6|0/-3.8|20/3.5
  14700. </pre></div>
  14701. </li><li>
  14702. 2:1 compression starting at -9dB:
  14703. <div class="example">
  14704. <pre class="example">compand=points=-80/-80|-9/-9|0/-5.3|20/2.9
  14705. </pre></div>
  14706. </li><li>
  14707. 2:1 compression starting at -12dB:
  14708. <div class="example">
  14709. <pre class="example">compand=points=-80/-80|-12/-12|0/-6.8|20/1.9
  14710. </pre></div>
  14711. </li><li>
  14712. 2:1 compression starting at -18dB:
  14713. <div class="example">
  14714. <pre class="example">compand=points=-80/-80|-18/-18|0/-9.8|20/0.7
  14715. </pre></div>
  14716. </li><li>
  14717. 3:1 compression starting at -15dB:
  14718. <div class="example">
  14719. <pre class="example">compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2
  14720. </pre></div>
  14721. </li><li>
  14722. Compressor/Gate:
  14723. <div class="example">
  14724. <pre class="example">compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6
  14725. </pre></div>
  14726. </li><li>
  14727. Expander:
  14728. <div class="example">
  14729. <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
  14730. </pre></div>
  14731. </li><li>
  14732. Hard limiter at -6dB:
  14733. <div class="example">
  14734. <pre class="example">compand=attacks=0:points=-80/-80|-6/-6|20/-6
  14735. </pre></div>
  14736. </li><li>
  14737. Hard limiter at -12dB:
  14738. <div class="example">
  14739. <pre class="example">compand=attacks=0:points=-80/-80|-12/-12|20/-12
  14740. </pre></div>
  14741. </li><li>
  14742. Hard noise gate at -35 dB:
  14743. <div class="example">
  14744. <pre class="example">compand=attacks=0:points=-80/-115|-35.1/-80|-35/-35|20/20
  14745. </pre></div>
  14746. </li><li>
  14747. Soft limiter:
  14748. <div class="example">
  14749. <pre class="example">compand=attacks=0:points=-80/-80|-12.4/-12.4|-6/-8|0/-6.8|20/-2.8
  14750. </pre></div>
  14751. </li></ul>
  14752. <a name="compensationdelay"></a>
  14753. <h2 class="section"><a href="ffplay-all.html#toc-compensationdelay">27.56 compensationdelay</a></h2>
  14754. <p>Compensation Delay Line is a metric based delay to compensate differing
  14755. positions of microphones or speakers.
  14756. </p>
  14757. <p>For example, you have recorded guitar with two microphones placed in
  14758. different locations. Because the front of sound wave has fixed speed in
  14759. normal conditions, the phasing of microphones can vary and depends on
  14760. their location and interposition. The best sound mix can be achieved when
  14761. these microphones are in phase (synchronized). Note that a distance of
  14762. ~30 cm between microphones makes one microphone capture the signal in
  14763. antiphase to the other microphone. That makes the final mix sound moody.
  14764. This filter helps to solve phasing problems by adding different delays
  14765. to each microphone track and make them synchronized.
  14766. </p>
  14767. <p>The best result can be reached when you take one track as base and
  14768. synchronize other tracks one by one with it.
  14769. Remember that synchronization/delay tolerance depends on sample rate, too.
  14770. Higher sample rates will give more tolerance.
  14771. </p>
  14772. <p>The filter accepts the following parameters:
  14773. </p>
  14774. <dl compact="compact">
  14775. <dt>&lsquo;<samp>mm</samp>&rsquo;</dt>
  14776. <dd><p>Set millimeters distance. This is compensation distance for fine tuning.
  14777. Default is 0.
  14778. </p>
  14779. </dd>
  14780. <dt>&lsquo;<samp>cm</samp>&rsquo;</dt>
  14781. <dd><p>Set cm distance. This is compensation distance for tightening distance setup.
  14782. Default is 0.
  14783. </p>
  14784. </dd>
  14785. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  14786. <dd><p>Set meters distance. This is compensation distance for hard distance setup.
  14787. Default is 0.
  14788. </p>
  14789. </dd>
  14790. <dt>&lsquo;<samp>dry</samp>&rsquo;</dt>
  14791. <dd><p>Set dry amount. Amount of unprocessed (dry) signal.
  14792. Default is 0.
  14793. </p>
  14794. </dd>
  14795. <dt>&lsquo;<samp>wet</samp>&rsquo;</dt>
  14796. <dd><p>Set wet amount. Amount of processed (wet) signal.
  14797. Default is 1.
  14798. </p>
  14799. </dd>
  14800. <dt>&lsquo;<samp>temp</samp>&rsquo;</dt>
  14801. <dd><p>Set temperature in degrees Celsius. This is the temperature of the environment.
  14802. Default is 20.
  14803. </p></dd>
  14804. </dl>
  14805. <a name="crossfeed"></a>
  14806. <h2 class="section"><a href="ffplay-all.html#toc-crossfeed">27.57 crossfeed</a></h2>
  14807. <p>Apply headphone crossfeed filter.
  14808. </p>
  14809. <p>Crossfeed is the process of blending the left and right channels of stereo
  14810. audio recording.
  14811. It is mainly used to reduce extreme stereo separation of low frequencies.
  14812. </p>
  14813. <p>The intent is to produce more speaker like sound to the listener.
  14814. </p>
  14815. <p>The filter accepts the following options:
  14816. </p>
  14817. <dl compact="compact">
  14818. <dt>&lsquo;<samp>strength</samp>&rsquo;</dt>
  14819. <dd><p>Set strength of crossfeed. Default is 0.2. Allowed range is from 0 to 1.
  14820. This sets gain of low shelf filter for side part of stereo image.
  14821. Default is -6dB. Max allowed is -30db when strength is set to 1.
  14822. </p>
  14823. </dd>
  14824. <dt>&lsquo;<samp>range</samp>&rsquo;</dt>
  14825. <dd><p>Set soundstage wideness. Default is 0.5. Allowed range is from 0 to 1.
  14826. This sets cut off frequency of low shelf filter. Default is cut off near
  14827. 1550 Hz. With range set to 1 cut off frequency is set to 2100 Hz.
  14828. </p>
  14829. </dd>
  14830. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  14831. <dd><p>Set input gain. Default is 0.9.
  14832. </p>
  14833. </dd>
  14834. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  14835. <dd><p>Set output gain. Default is 1.
  14836. </p></dd>
  14837. </dl>
  14838. <a name="crystalizer"></a>
  14839. <h2 class="section"><a href="ffplay-all.html#toc-crystalizer">27.58 crystalizer</a></h2>
  14840. <p>Simple algorithm to expand audio dynamic range.
  14841. </p>
  14842. <p>The filter accepts the following options:
  14843. </p>
  14844. <dl compact="compact">
  14845. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  14846. <dd><p>Sets the intensity of effect (default: 2.0). Must be in range between 0.0
  14847. (unchanged sound) to 10.0 (maximum effect).
  14848. </p>
  14849. </dd>
  14850. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  14851. <dd><p>Enable clipping. By default is enabled.
  14852. </p></dd>
  14853. </dl>
  14854. <a name="Commands-31"></a>
  14855. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-31">27.58.1 Commands</a></h3>
  14856. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  14857. </p>
  14858. <a name="dcshift"></a>
  14859. <h2 class="section"><a href="ffplay-all.html#toc-dcshift">27.59 dcshift</a></h2>
  14860. <p>Apply a DC shift to the audio.
  14861. </p>
  14862. <p>This can be useful to remove a DC offset (caused perhaps by a hardware problem
  14863. in the recording chain) from the audio. The effect of a DC offset is reduced
  14864. headroom and hence volume. The <a href="#astats">astats</a> filter can be used to determine if
  14865. a signal has a DC offset.
  14866. </p>
  14867. <dl compact="compact">
  14868. <dt>&lsquo;<samp>shift</samp>&rsquo;</dt>
  14869. <dd><p>Set the DC shift, allowed range is [-1, 1]. It indicates the amount to shift
  14870. the audio.
  14871. </p>
  14872. </dd>
  14873. <dt>&lsquo;<samp>limitergain</samp>&rsquo;</dt>
  14874. <dd><p>Optional. It should have a value much less than 1 (e.g. 0.05 or 0.02) and is
  14875. used to prevent clipping.
  14876. </p></dd>
  14877. </dl>
  14878. <a name="deesser"></a>
  14879. <h2 class="section"><a href="ffplay-all.html#toc-deesser">27.60 deesser</a></h2>
  14880. <p>Apply de-essing to the audio samples.
  14881. </p>
  14882. <dl compact="compact">
  14883. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  14884. <dd><p>Set intensity for triggering de-essing. Allowed range is from 0 to 1.
  14885. Default is 0.
  14886. </p>
  14887. </dd>
  14888. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  14889. <dd><p>Set amount of ducking on treble part of sound. Allowed range is from 0 to 1.
  14890. Default is 0.5.
  14891. </p>
  14892. </dd>
  14893. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  14894. <dd><p>How much of original frequency content to keep when de-essing. Allowed range is from 0 to 1.
  14895. Default is 0.5.
  14896. </p>
  14897. </dd>
  14898. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  14899. <dd><p>Set the output mode.
  14900. </p>
  14901. <p>It accepts the following values:
  14902. </p><dl compact="compact">
  14903. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  14904. <dd><p>Pass input unchanged.
  14905. </p>
  14906. </dd>
  14907. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  14908. <dd><p>Pass ess filtered out.
  14909. </p>
  14910. </dd>
  14911. <dt>&lsquo;<samp>e</samp>&rsquo;</dt>
  14912. <dd><p>Pass only ess.
  14913. </p>
  14914. <p>Default value is <var>o</var>.
  14915. </p></dd>
  14916. </dl>
  14917. </dd>
  14918. </dl>
  14919. <a name="drmeter"></a>
  14920. <h2 class="section"><a href="ffplay-all.html#toc-drmeter">27.61 drmeter</a></h2>
  14921. <p>Measure audio dynamic range.
  14922. </p>
  14923. <p>DR values of 14 and higher is found in very dynamic material. DR of 8 to 13
  14924. is found in transition material. And anything less that 8 have very poor dynamics
  14925. and is very compressed.
  14926. </p>
  14927. <p>The filter accepts the following options:
  14928. </p>
  14929. <dl compact="compact">
  14930. <dt>&lsquo;<samp>length</samp>&rsquo;</dt>
  14931. <dd><p>Set window length in seconds used to split audio into segments of equal length.
  14932. Default is 3 seconds.
  14933. </p></dd>
  14934. </dl>
  14935. <a name="dynaudnorm"></a>
  14936. <h2 class="section"><a href="ffplay-all.html#toc-dynaudnorm">27.62 dynaudnorm</a></h2>
  14937. <p>Dynamic Audio Normalizer.
  14938. </p>
  14939. <p>This filter applies a certain amount of gain to the input audio in order
  14940. to bring its peak magnitude to a target level (e.g. 0 dBFS). However, in
  14941. contrast to more &quot;simple&quot; normalization algorithms, the Dynamic Audio
  14942. Normalizer *dynamically* re-adjusts the gain factor to the input audio.
  14943. This allows for applying extra gain to the &quot;quiet&quot; sections of the audio
  14944. while avoiding distortions or clipping the &quot;loud&quot; sections. In other words:
  14945. The Dynamic Audio Normalizer will &quot;even out&quot; the volume of quiet and loud
  14946. sections, in the sense that the volume of each section is brought to the
  14947. same target level. Note, however, that the Dynamic Audio Normalizer achieves
  14948. this goal *without* applying &quot;dynamic range compressing&quot;. It will retain 100%
  14949. of the dynamic range *within* each section of the audio file.
  14950. </p>
  14951. <dl compact="compact">
  14952. <dt>&lsquo;<samp>framelen, f</samp>&rsquo;</dt>
  14953. <dd><p>Set the frame length in milliseconds. In range from 10 to 8000 milliseconds.
  14954. Default is 500 milliseconds.
  14955. The Dynamic Audio Normalizer processes the input audio in small chunks,
  14956. referred to as frames. This is required, because a peak magnitude has no
  14957. meaning for just a single sample value. Instead, we need to determine the
  14958. peak magnitude for a contiguous sequence of sample values. While a &quot;standard&quot;
  14959. normalizer would simply use the peak magnitude of the complete file, the
  14960. Dynamic Audio Normalizer determines the peak magnitude individually for each
  14961. frame. The length of a frame is specified in milliseconds. By default, the
  14962. Dynamic Audio Normalizer uses a frame length of 500 milliseconds, which has
  14963. been found to give good results with most files.
  14964. Note that the exact frame length, in number of samples, will be determined
  14965. automatically, based on the sampling rate of the individual input audio file.
  14966. </p>
  14967. </dd>
  14968. <dt>&lsquo;<samp>gausssize, g</samp>&rsquo;</dt>
  14969. <dd><p>Set the Gaussian filter window size. In range from 3 to 301, must be odd
  14970. number. Default is 31.
  14971. Probably the most important parameter of the Dynamic Audio Normalizer is the
  14972. <code>window size</code> of the Gaussian smoothing filter. The filter&rsquo;s window size
  14973. is specified in frames, centered around the current frame. For the sake of
  14974. simplicity, this must be an odd number. Consequently, the default value of 31
  14975. takes into account the current frame, as well as the 15 preceding frames and
  14976. the 15 subsequent frames. Using a larger window results in a stronger
  14977. smoothing effect and thus in less gain variation, i.e. slower gain
  14978. adaptation. Conversely, using a smaller window results in a weaker smoothing
  14979. effect and thus in more gain variation, i.e. faster gain adaptation.
  14980. In other words, the more you increase this value, the more the Dynamic Audio
  14981. Normalizer will behave like a &quot;traditional&quot; normalization filter. On the
  14982. contrary, the more you decrease this value, the more the Dynamic Audio
  14983. Normalizer will behave like a dynamic range compressor.
  14984. </p>
  14985. </dd>
  14986. <dt>&lsquo;<samp>peak, p</samp>&rsquo;</dt>
  14987. <dd><p>Set the target peak value. This specifies the highest permissible magnitude
  14988. level for the normalized audio input. This filter will try to approach the
  14989. target peak magnitude as closely as possible, but at the same time it also
  14990. makes sure that the normalized signal will never exceed the peak magnitude.
  14991. A frame&rsquo;s maximum local gain factor is imposed directly by the target peak
  14992. magnitude. The default value is 0.95 and thus leaves a headroom of 5%*.
  14993. It is not recommended to go above this value.
  14994. </p>
  14995. </dd>
  14996. <dt>&lsquo;<samp>maxgain, m</samp>&rsquo;</dt>
  14997. <dd><p>Set the maximum gain factor. In range from 1.0 to 100.0. Default is 10.0.
  14998. The Dynamic Audio Normalizer determines the maximum possible (local) gain
  14999. factor for each input frame, i.e. the maximum gain factor that does not
  15000. result in clipping or distortion. The maximum gain factor is determined by
  15001. the frame&rsquo;s highest magnitude sample. However, the Dynamic Audio Normalizer
  15002. additionally bounds the frame&rsquo;s maximum gain factor by a predetermined
  15003. (global) maximum gain factor. This is done in order to avoid excessive gain
  15004. factors in &quot;silent&quot; or almost silent frames. By default, the maximum gain
  15005. factor is 10.0, For most inputs the default value should be sufficient and
  15006. it usually is not recommended to increase this value. Though, for input
  15007. with an extremely low overall volume level, it may be necessary to allow even
  15008. higher gain factors. Note, however, that the Dynamic Audio Normalizer does
  15009. not simply apply a &quot;hard&quot; threshold (i.e. cut off values above the threshold).
  15010. Instead, a &quot;sigmoid&quot; threshold function will be applied. This way, the
  15011. gain factors will smoothly approach the threshold value, but never exceed that
  15012. value.
  15013. </p>
  15014. </dd>
  15015. <dt>&lsquo;<samp>targetrms, r</samp>&rsquo;</dt>
  15016. <dd><p>Set the target RMS. In range from 0.0 to 1.0. Default is 0.0 - disabled.
  15017. By default, the Dynamic Audio Normalizer performs &quot;peak&quot; normalization.
  15018. This means that the maximum local gain factor for each frame is defined
  15019. (only) by the frame&rsquo;s highest magnitude sample. This way, the samples can
  15020. be amplified as much as possible without exceeding the maximum signal
  15021. level, i.e. without clipping. Optionally, however, the Dynamic Audio
  15022. Normalizer can also take into account the frame&rsquo;s root mean square,
  15023. abbreviated RMS. In electrical engineering, the RMS is commonly used to
  15024. determine the power of a time-varying signal. It is therefore considered
  15025. that the RMS is a better approximation of the &quot;perceived loudness&quot; than
  15026. just looking at the signal&rsquo;s peak magnitude. Consequently, by adjusting all
  15027. frames to a constant RMS value, a uniform &quot;perceived loudness&quot; can be
  15028. established. If a target RMS value has been specified, a frame&rsquo;s local gain
  15029. factor is defined as the factor that would result in exactly that RMS value.
  15030. Note, however, that the maximum local gain factor is still restricted by the
  15031. frame&rsquo;s highest magnitude sample, in order to prevent clipping.
  15032. </p>
  15033. </dd>
  15034. <dt>&lsquo;<samp>coupling, n</samp>&rsquo;</dt>
  15035. <dd><p>Enable channels coupling. By default is enabled.
  15036. By default, the Dynamic Audio Normalizer will amplify all channels by the same
  15037. amount. This means the same gain factor will be applied to all channels, i.e.
  15038. the maximum possible gain factor is determined by the &quot;loudest&quot; channel.
  15039. However, in some recordings, it may happen that the volume of the different
  15040. channels is uneven, e.g. one channel may be &quot;quieter&quot; than the other one(s).
  15041. In this case, this option can be used to disable the channel coupling. This way,
  15042. the gain factor will be determined independently for each channel, depending
  15043. only on the individual channel&rsquo;s highest magnitude sample. This allows for
  15044. harmonizing the volume of the different channels.
  15045. </p>
  15046. </dd>
  15047. <dt>&lsquo;<samp>correctdc, c</samp>&rsquo;</dt>
  15048. <dd><p>Enable DC bias correction. By default is disabled.
  15049. An audio signal (in the time domain) is a sequence of sample values.
  15050. In the Dynamic Audio Normalizer these sample values are represented in the
  15051. -1.0 to 1.0 range, regardless of the original input format. Normally, the
  15052. audio signal, or &quot;waveform&quot;, should be centered around the zero point.
  15053. That means if we calculate the mean value of all samples in a file, or in a
  15054. single frame, then the result should be 0.0 or at least very close to that
  15055. value. If, however, there is a significant deviation of the mean value from
  15056. 0.0, in either positive or negative direction, this is referred to as a
  15057. DC bias or DC offset. Since a DC bias is clearly undesirable, the Dynamic
  15058. Audio Normalizer provides optional DC bias correction.
  15059. With DC bias correction enabled, the Dynamic Audio Normalizer will determine
  15060. the mean value, or &quot;DC correction&quot; offset, of each input frame and subtract
  15061. that value from all of the frame&rsquo;s sample values which ensures those samples
  15062. are centered around 0.0 again. Also, in order to avoid &quot;gaps&quot; at the frame
  15063. boundaries, the DC correction offset values will be interpolated smoothly
  15064. between neighbouring frames.
  15065. </p>
  15066. </dd>
  15067. <dt>&lsquo;<samp>altboundary, b</samp>&rsquo;</dt>
  15068. <dd><p>Enable alternative boundary mode. By default is disabled.
  15069. The Dynamic Audio Normalizer takes into account a certain neighbourhood
  15070. around each frame. This includes the preceding frames as well as the
  15071. subsequent frames. However, for the &quot;boundary&quot; frames, located at the very
  15072. beginning and at the very end of the audio file, not all neighbouring
  15073. frames are available. In particular, for the first few frames in the audio
  15074. file, the preceding frames are not known. And, similarly, for the last few
  15075. frames in the audio file, the subsequent frames are not known. Thus, the
  15076. question arises which gain factors should be assumed for the missing frames
  15077. in the &quot;boundary&quot; region. The Dynamic Audio Normalizer implements two modes
  15078. to deal with this situation. The default boundary mode assumes a gain factor
  15079. of exactly 1.0 for the missing frames, resulting in a smooth &quot;fade in&quot; and
  15080. &quot;fade out&quot; at the beginning and at the end of the input, respectively.
  15081. </p>
  15082. </dd>
  15083. <dt>&lsquo;<samp>compress, s</samp>&rsquo;</dt>
  15084. <dd><p>Set the compress factor. In range from 0.0 to 30.0. Default is 0.0.
  15085. By default, the Dynamic Audio Normalizer does not apply &quot;traditional&quot;
  15086. compression. This means that signal peaks will not be pruned and thus the
  15087. full dynamic range will be retained within each local neighbourhood. However,
  15088. in some cases it may be desirable to combine the Dynamic Audio Normalizer&rsquo;s
  15089. normalization algorithm with a more &quot;traditional&quot; compression.
  15090. For this purpose, the Dynamic Audio Normalizer provides an optional compression
  15091. (thresholding) function. If (and only if) the compression feature is enabled,
  15092. all input frames will be processed by a soft knee thresholding function prior
  15093. to the actual normalization process. Put simply, the thresholding function is
  15094. going to prune all samples whose magnitude exceeds a certain threshold value.
  15095. However, the Dynamic Audio Normalizer does not simply apply a fixed threshold
  15096. value. Instead, the threshold value will be adjusted for each individual
  15097. frame.
  15098. In general, smaller parameters result in stronger compression, and vice versa.
  15099. Values below 3.0 are not recommended, because audible distortion may appear.
  15100. </p>
  15101. </dd>
  15102. <dt>&lsquo;<samp>threshold, t</samp>&rsquo;</dt>
  15103. <dd><p>Set the target threshold value. This specifies the lowest permissible
  15104. magnitude level for the audio input which will be normalized.
  15105. If input frame volume is above this value frame will be normalized.
  15106. Otherwise frame may not be normalized at all. The default value is set
  15107. to 0, which means all input frames will be normalized.
  15108. This option is mostly useful if digital noise is not wanted to be amplified.
  15109. </p></dd>
  15110. </dl>
  15111. <a name="Commands-60"></a>
  15112. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-60">27.62.1 Commands</a></h3>
  15113. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  15114. </p>
  15115. <a name="earwax"></a>
  15116. <h2 class="section"><a href="ffplay-all.html#toc-earwax">27.63 earwax</a></h2>
  15117. <p>Make audio easier to listen to on headphones.
  15118. </p>
  15119. <p>This filter adds &lsquo;cues&rsquo; to 44.1kHz stereo (i.e. audio CD format) audio
  15120. so that when listened to on headphones the stereo image is moved from
  15121. inside your head (standard for headphones) to outside and in front of
  15122. the listener (standard for speakers).
  15123. </p>
  15124. <p>Ported from SoX.
  15125. </p>
  15126. <a name="equalizer"></a>
  15127. <h2 class="section"><a href="ffplay-all.html#toc-equalizer">27.64 equalizer</a></h2>
  15128. <p>Apply a two-pole peaking equalisation (EQ) filter. With this
  15129. filter, the signal-level at and around a selected frequency can
  15130. be increased or decreased, whilst (unlike bandpass and bandreject
  15131. filters) that at all other frequencies is unchanged.
  15132. </p>
  15133. <p>In order to produce complex equalisation curves, this filter can
  15134. be given several times, each with a different central frequency.
  15135. </p>
  15136. <p>The filter accepts the following options:
  15137. </p>
  15138. <dl compact="compact">
  15139. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  15140. <dd><p>Set the filter&rsquo;s central frequency in Hz.
  15141. </p>
  15142. </dd>
  15143. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  15144. <dd><p>Set method to specify band-width of filter.
  15145. </p><dl compact="compact">
  15146. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  15147. <dd><p>Hz
  15148. </p></dd>
  15149. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  15150. <dd><p>Q-Factor
  15151. </p></dd>
  15152. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  15153. <dd><p>octave
  15154. </p></dd>
  15155. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  15156. <dd><p>slope
  15157. </p></dd>
  15158. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  15159. <dd><p>kHz
  15160. </p></dd>
  15161. </dl>
  15162. </dd>
  15163. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  15164. <dd><p>Specify the band-width of a filter in width_type units.
  15165. </p>
  15166. </dd>
  15167. <dt>&lsquo;<samp>gain, g</samp>&rsquo;</dt>
  15168. <dd><p>Set the required gain or attenuation in dB.
  15169. Beware of clipping when using a positive gain.
  15170. </p>
  15171. </dd>
  15172. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  15173. <dd><p>How much to use filtered signal in output. Default is 1.
  15174. Range is between 0 and 1.
  15175. </p>
  15176. </dd>
  15177. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  15178. <dd><p>Specify which channels to filter, by default all available are filtered.
  15179. </p>
  15180. </dd>
  15181. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  15182. <dd><p>Normalize biquad coefficients, by default is disabled.
  15183. Enabling it will normalize magnitude response at DC to 0dB.
  15184. </p></dd>
  15185. </dl>
  15186. <a name="Examples"></a>
  15187. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples">27.64.1 Examples</a></h3>
  15188. <ul>
  15189. <li>
  15190. Attenuate 10 dB at 1000 Hz, with a bandwidth of 200 Hz:
  15191. <div class="example">
  15192. <pre class="example">equalizer=f=1000:t=h:width=200:g=-10
  15193. </pre></div>
  15194. </li><li>
  15195. Apply 2 dB gain at 1000 Hz with Q 1 and attenuate 5 dB at 100 Hz with Q 2:
  15196. <div class="example">
  15197. <pre class="example">equalizer=f=1000:t=q:w=1:g=2,equalizer=f=100:t=q:w=2:g=-5
  15198. </pre></div>
  15199. </li></ul>
  15200. <a name="Commands-51"></a>
  15201. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-51">27.64.2 Commands</a></h3>
  15202. <p>This filter supports the following commands:
  15203. </p><dl compact="compact">
  15204. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  15205. <dd><p>Change equalizer frequency.
  15206. Syntax for the command is : &quot;<var>frequency</var>&quot;
  15207. </p>
  15208. </dd>
  15209. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  15210. <dd><p>Change equalizer width_type.
  15211. Syntax for the command is : &quot;<var>width_type</var>&quot;
  15212. </p>
  15213. </dd>
  15214. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  15215. <dd><p>Change equalizer width.
  15216. Syntax for the command is : &quot;<var>width</var>&quot;
  15217. </p>
  15218. </dd>
  15219. <dt>&lsquo;<samp>gain, g</samp>&rsquo;</dt>
  15220. <dd><p>Change equalizer gain.
  15221. Syntax for the command is : &quot;<var>gain</var>&quot;
  15222. </p>
  15223. </dd>
  15224. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  15225. <dd><p>Change equalizer mix.
  15226. Syntax for the command is : &quot;<var>mix</var>&quot;
  15227. </p></dd>
  15228. </dl>
  15229. <a name="extrastereo"></a>
  15230. <h2 class="section"><a href="ffplay-all.html#toc-extrastereo">27.65 extrastereo</a></h2>
  15231. <p>Linearly increases the difference between left and right channels which
  15232. adds some sort of &quot;live&quot; effect to playback.
  15233. </p>
  15234. <p>The filter accepts the following options:
  15235. </p>
  15236. <dl compact="compact">
  15237. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  15238. <dd><p>Sets the difference coefficient (default: 2.5). 0.0 means mono sound
  15239. (average of both channels), with 1.0 sound will be unchanged, with
  15240. -1.0 left and right channels will be swapped.
  15241. </p>
  15242. </dd>
  15243. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  15244. <dd><p>Enable clipping. By default is enabled.
  15245. </p></dd>
  15246. </dl>
  15247. <a name="Commands-46"></a>
  15248. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-46">27.65.1 Commands</a></h3>
  15249. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  15250. </p>
  15251. <a name="firequalizer"></a>
  15252. <h2 class="section"><a href="ffplay-all.html#toc-firequalizer">27.66 firequalizer</a></h2>
  15253. <p>Apply FIR Equalization using arbitrary frequency response.
  15254. </p>
  15255. <p>The filter accepts the following option:
  15256. </p>
  15257. <dl compact="compact">
  15258. <dt>&lsquo;<samp>gain</samp>&rsquo;</dt>
  15259. <dd><p>Set gain curve equation (in dB). The expression can contain variables:
  15260. </p><dl compact="compact">
  15261. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  15262. <dd><p>the evaluated frequency
  15263. </p></dd>
  15264. <dt>&lsquo;<samp>sr</samp>&rsquo;</dt>
  15265. <dd><p>sample rate
  15266. </p></dd>
  15267. <dt>&lsquo;<samp>ch</samp>&rsquo;</dt>
  15268. <dd><p>channel number, set to 0 when multichannels evaluation is disabled
  15269. </p></dd>
  15270. <dt>&lsquo;<samp>chid</samp>&rsquo;</dt>
  15271. <dd><p>channel id, see libavutil/channel_layout.h, set to the first channel id when
  15272. multichannels evaluation is disabled
  15273. </p></dd>
  15274. <dt>&lsquo;<samp>chs</samp>&rsquo;</dt>
  15275. <dd><p>number of channels
  15276. </p></dd>
  15277. <dt>&lsquo;<samp>chlayout</samp>&rsquo;</dt>
  15278. <dd><p>channel_layout, see libavutil/channel_layout.h
  15279. </p>
  15280. </dd>
  15281. </dl>
  15282. <p>and functions:
  15283. </p><dl compact="compact">
  15284. <dt>&lsquo;<samp>gain_interpolate(f)</samp>&rsquo;</dt>
  15285. <dd><p>interpolate gain on frequency f based on gain_entry
  15286. </p></dd>
  15287. <dt>&lsquo;<samp>cubic_interpolate(f)</samp>&rsquo;</dt>
  15288. <dd><p>same as gain_interpolate, but smoother
  15289. </p></dd>
  15290. </dl>
  15291. <p>This option is also available as command. Default is <code>gain_interpolate(f)</code>.
  15292. </p>
  15293. </dd>
  15294. <dt>&lsquo;<samp>gain_entry</samp>&rsquo;</dt>
  15295. <dd><p>Set gain entry for gain_interpolate function. The expression can
  15296. contain functions:
  15297. </p><dl compact="compact">
  15298. <dt>&lsquo;<samp>entry(f, g)</samp>&rsquo;</dt>
  15299. <dd><p>store gain entry at frequency f with value g
  15300. </p></dd>
  15301. </dl>
  15302. <p>This option is also available as command.
  15303. </p>
  15304. </dd>
  15305. <dt>&lsquo;<samp>delay</samp>&rsquo;</dt>
  15306. <dd><p>Set filter delay in seconds. Higher value means more accurate.
  15307. Default is <code>0.01</code>.
  15308. </p>
  15309. </dd>
  15310. <dt>&lsquo;<samp>accuracy</samp>&rsquo;</dt>
  15311. <dd><p>Set filter accuracy in Hz. Lower value means more accurate.
  15312. Default is <code>5</code>.
  15313. </p>
  15314. </dd>
  15315. <dt>&lsquo;<samp>wfunc</samp>&rsquo;</dt>
  15316. <dd><p>Set window function. Acceptable values are:
  15317. </p><dl compact="compact">
  15318. <dt>&lsquo;<samp>rectangular</samp>&rsquo;</dt>
  15319. <dd><p>rectangular window, useful when gain curve is already smooth
  15320. </p></dd>
  15321. <dt>&lsquo;<samp>hann</samp>&rsquo;</dt>
  15322. <dd><p>hann window (default)
  15323. </p></dd>
  15324. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  15325. <dd><p>hamming window
  15326. </p></dd>
  15327. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  15328. <dd><p>blackman window
  15329. </p></dd>
  15330. <dt>&lsquo;<samp>nuttall3</samp>&rsquo;</dt>
  15331. <dd><p>3-terms continuous 1st derivative nuttall window
  15332. </p></dd>
  15333. <dt>&lsquo;<samp>mnuttall3</samp>&rsquo;</dt>
  15334. <dd><p>minimum 3-terms discontinuous nuttall window
  15335. </p></dd>
  15336. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  15337. <dd><p>4-terms continuous 1st derivative nuttall window
  15338. </p></dd>
  15339. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  15340. <dd><p>minimum 4-terms discontinuous nuttall (blackman-nuttall) window
  15341. </p></dd>
  15342. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  15343. <dd><p>blackman-harris window
  15344. </p></dd>
  15345. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  15346. <dd><p>tukey window
  15347. </p></dd>
  15348. </dl>
  15349. </dd>
  15350. <dt>&lsquo;<samp>fixed</samp>&rsquo;</dt>
  15351. <dd><p>If enabled, use fixed number of audio samples. This improves speed when
  15352. filtering with large delay. Default is disabled.
  15353. </p>
  15354. </dd>
  15355. <dt>&lsquo;<samp>multi</samp>&rsquo;</dt>
  15356. <dd><p>Enable multichannels evaluation on gain. Default is disabled.
  15357. </p>
  15358. </dd>
  15359. <dt>&lsquo;<samp>zero_phase</samp>&rsquo;</dt>
  15360. <dd><p>Enable zero phase mode by subtracting timestamp to compensate delay.
  15361. Default is disabled.
  15362. </p>
  15363. </dd>
  15364. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  15365. <dd><p>Set scale used by gain. Acceptable values are:
  15366. </p><dl compact="compact">
  15367. <dt>&lsquo;<samp>linlin</samp>&rsquo;</dt>
  15368. <dd><p>linear frequency, linear gain
  15369. </p></dd>
  15370. <dt>&lsquo;<samp>linlog</samp>&rsquo;</dt>
  15371. <dd><p>linear frequency, logarithmic (in dB) gain (default)
  15372. </p></dd>
  15373. <dt>&lsquo;<samp>loglin</samp>&rsquo;</dt>
  15374. <dd><p>logarithmic (in octave scale where 20 Hz is 0) frequency, linear gain
  15375. </p></dd>
  15376. <dt>&lsquo;<samp>loglog</samp>&rsquo;</dt>
  15377. <dd><p>logarithmic frequency, logarithmic gain
  15378. </p></dd>
  15379. </dl>
  15380. </dd>
  15381. <dt>&lsquo;<samp>dumpfile</samp>&rsquo;</dt>
  15382. <dd><p>Set file for dumping, suitable for gnuplot.
  15383. </p>
  15384. </dd>
  15385. <dt>&lsquo;<samp>dumpscale</samp>&rsquo;</dt>
  15386. <dd><p>Set scale for dumpfile. Acceptable values are same with scale option.
  15387. Default is linlog.
  15388. </p>
  15389. </dd>
  15390. <dt>&lsquo;<samp>fft2</samp>&rsquo;</dt>
  15391. <dd><p>Enable 2-channel convolution using complex FFT. This improves speed significantly.
  15392. Default is disabled.
  15393. </p>
  15394. </dd>
  15395. <dt>&lsquo;<samp>min_phase</samp>&rsquo;</dt>
  15396. <dd><p>Enable minimum phase impulse response. Default is disabled.
  15397. </p></dd>
  15398. </dl>
  15399. <a name="Examples-38"></a>
  15400. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-38">27.66.1 Examples</a></h3>
  15401. <ul>
  15402. <li>
  15403. lowpass at 1000 Hz:
  15404. <div class="example">
  15405. <pre class="example">firequalizer=gain='if(lt(f,1000), 0, -INF)'
  15406. </pre></div>
  15407. </li><li>
  15408. lowpass at 1000 Hz with gain_entry:
  15409. <div class="example">
  15410. <pre class="example">firequalizer=gain_entry='entry(1000,0); entry(1001, -INF)'
  15411. </pre></div>
  15412. </li><li>
  15413. custom equalization:
  15414. <div class="example">
  15415. <pre class="example">firequalizer=gain_entry='entry(100,0); entry(400, -4); entry(1000, -6); entry(2000, 0)'
  15416. </pre></div>
  15417. </li><li>
  15418. higher delay with zero phase to compensate delay:
  15419. <div class="example">
  15420. <pre class="example">firequalizer=delay=0.1:fixed=on:zero_phase=on
  15421. </pre></div>
  15422. </li><li>
  15423. lowpass on left channel, highpass on right channel:
  15424. <div class="example">
  15425. <pre class="example">firequalizer=gain='if(eq(chid,1), gain_interpolate(f), if(eq(chid,2), gain_interpolate(1e6+f), 0))'
  15426. :gain_entry='entry(1000, 0); entry(1001,-INF); entry(1e6+1000,0)':multi=on
  15427. </pre></div>
  15428. </li></ul>
  15429. <a name="flanger"></a>
  15430. <h2 class="section"><a href="ffplay-all.html#toc-flanger">27.67 flanger</a></h2>
  15431. <p>Apply a flanging effect to the audio.
  15432. </p>
  15433. <p>The filter accepts the following options:
  15434. </p>
  15435. <dl compact="compact">
  15436. <dt>&lsquo;<samp>delay</samp>&rsquo;</dt>
  15437. <dd><p>Set base delay in milliseconds. Range from 0 to 30. Default value is 0.
  15438. </p>
  15439. </dd>
  15440. <dt>&lsquo;<samp>depth</samp>&rsquo;</dt>
  15441. <dd><p>Set added sweep delay in milliseconds. Range from 0 to 10. Default value is 2.
  15442. </p>
  15443. </dd>
  15444. <dt>&lsquo;<samp>regen</samp>&rsquo;</dt>
  15445. <dd><p>Set percentage regeneration (delayed signal feedback). Range from -95 to 95.
  15446. Default value is 0.
  15447. </p>
  15448. </dd>
  15449. <dt>&lsquo;<samp>width</samp>&rsquo;</dt>
  15450. <dd><p>Set percentage of delayed signal mixed with original. Range from 0 to 100.
  15451. Default value is 71.
  15452. </p>
  15453. </dd>
  15454. <dt>&lsquo;<samp>speed</samp>&rsquo;</dt>
  15455. <dd><p>Set sweeps per second (Hz). Range from 0.1 to 10. Default value is 0.5.
  15456. </p>
  15457. </dd>
  15458. <dt>&lsquo;<samp>shape</samp>&rsquo;</dt>
  15459. <dd><p>Set swept wave shape, can be <var>triangular</var> or <var>sinusoidal</var>.
  15460. Default value is <var>sinusoidal</var>.
  15461. </p>
  15462. </dd>
  15463. <dt>&lsquo;<samp>phase</samp>&rsquo;</dt>
  15464. <dd><p>Set swept wave percentage-shift for multi channel. Range from 0 to 100.
  15465. Default value is 25.
  15466. </p>
  15467. </dd>
  15468. <dt>&lsquo;<samp>interp</samp>&rsquo;</dt>
  15469. <dd><p>Set delay-line interpolation, <var>linear</var> or <var>quadratic</var>.
  15470. Default is <var>linear</var>.
  15471. </p></dd>
  15472. </dl>
  15473. <a name="haas"></a>
  15474. <h2 class="section"><a href="ffplay-all.html#toc-haas">27.68 haas</a></h2>
  15475. <p>Apply Haas effect to audio.
  15476. </p>
  15477. <p>Note that this makes most sense to apply on mono signals.
  15478. With this filter applied to mono signals it give some directionality and
  15479. stretches its stereo image.
  15480. </p>
  15481. <p>The filter accepts the following options:
  15482. </p>
  15483. <dl compact="compact">
  15484. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  15485. <dd><p>Set input level. By default is <var>1</var>, or 0dB
  15486. </p>
  15487. </dd>
  15488. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  15489. <dd><p>Set output level. By default is <var>1</var>, or 0dB.
  15490. </p>
  15491. </dd>
  15492. <dt>&lsquo;<samp>side_gain</samp>&rsquo;</dt>
  15493. <dd><p>Set gain applied to side part of signal. By default is <var>1</var>.
  15494. </p>
  15495. </dd>
  15496. <dt>&lsquo;<samp>middle_source</samp>&rsquo;</dt>
  15497. <dd><p>Set kind of middle source. Can be one of the following:
  15498. </p>
  15499. <dl compact="compact">
  15500. <dt>&lsquo;<samp>left</samp>&rsquo;</dt>
  15501. <dd><p>Pick left channel.
  15502. </p>
  15503. </dd>
  15504. <dt>&lsquo;<samp>right</samp>&rsquo;</dt>
  15505. <dd><p>Pick right channel.
  15506. </p>
  15507. </dd>
  15508. <dt>&lsquo;<samp>mid</samp>&rsquo;</dt>
  15509. <dd><p>Pick middle part signal of stereo image.
  15510. </p>
  15511. </dd>
  15512. <dt>&lsquo;<samp>side</samp>&rsquo;</dt>
  15513. <dd><p>Pick side part signal of stereo image.
  15514. </p></dd>
  15515. </dl>
  15516. </dd>
  15517. <dt>&lsquo;<samp>middle_phase</samp>&rsquo;</dt>
  15518. <dd><p>Change middle phase. By default is disabled.
  15519. </p>
  15520. </dd>
  15521. <dt>&lsquo;<samp>left_delay</samp>&rsquo;</dt>
  15522. <dd><p>Set left channel delay. By default is <var>2.05</var> milliseconds.
  15523. </p>
  15524. </dd>
  15525. <dt>&lsquo;<samp>left_balance</samp>&rsquo;</dt>
  15526. <dd><p>Set left channel balance. By default is <var>-1</var>.
  15527. </p>
  15528. </dd>
  15529. <dt>&lsquo;<samp>left_gain</samp>&rsquo;</dt>
  15530. <dd><p>Set left channel gain. By default is <var>1</var>.
  15531. </p>
  15532. </dd>
  15533. <dt>&lsquo;<samp>left_phase</samp>&rsquo;</dt>
  15534. <dd><p>Change left phase. By default is disabled.
  15535. </p>
  15536. </dd>
  15537. <dt>&lsquo;<samp>right_delay</samp>&rsquo;</dt>
  15538. <dd><p>Set right channel delay. By defaults is <var>2.12</var> milliseconds.
  15539. </p>
  15540. </dd>
  15541. <dt>&lsquo;<samp>right_balance</samp>&rsquo;</dt>
  15542. <dd><p>Set right channel balance. By default is <var>1</var>.
  15543. </p>
  15544. </dd>
  15545. <dt>&lsquo;<samp>right_gain</samp>&rsquo;</dt>
  15546. <dd><p>Set right channel gain. By default is <var>1</var>.
  15547. </p>
  15548. </dd>
  15549. <dt>&lsquo;<samp>right_phase</samp>&rsquo;</dt>
  15550. <dd><p>Change right phase. By default is enabled.
  15551. </p></dd>
  15552. </dl>
  15553. <a name="hdcd"></a>
  15554. <h2 class="section"><a href="ffplay-all.html#toc-hdcd">27.69 hdcd</a></h2>
  15555. <p>Decodes High Definition Compatible Digital (HDCD) data. A 16-bit PCM stream with
  15556. embedded HDCD codes is expanded into a 20-bit PCM stream.
  15557. </p>
  15558. <p>The filter supports the Peak Extend and Low-level Gain Adjustment features
  15559. of HDCD, and detects the Transient Filter flag.
  15560. </p>
  15561. <div class="example">
  15562. <pre class="example">ffmpeg -i HDCD16.flac -af hdcd OUT24.flac
  15563. </pre></div>
  15564. <p>When using the filter with wav, note the default encoding for wav is 16-bit,
  15565. so the resulting 20-bit stream will be truncated back to 16-bit. Use something
  15566. like <code>-acodec pcm_s24le</code> after the filter to get 24-bit PCM output.
  15567. </p><div class="example">
  15568. <pre class="example">ffmpeg -i HDCD16.wav -af hdcd OUT16.wav
  15569. ffmpeg -i HDCD16.wav -af hdcd -c:a pcm_s24le OUT24.wav
  15570. </pre></div>
  15571. <p>The filter accepts the following options:
  15572. </p>
  15573. <dl compact="compact">
  15574. <dt>&lsquo;<samp>disable_autoconvert</samp>&rsquo;</dt>
  15575. <dd><p>Disable any automatic format conversion or resampling in the filter graph.
  15576. </p>
  15577. </dd>
  15578. <dt>&lsquo;<samp>process_stereo</samp>&rsquo;</dt>
  15579. <dd><p>Process the stereo channels together. If target_gain does not match between
  15580. channels, consider it invalid and use the last valid target_gain.
  15581. </p>
  15582. </dd>
  15583. <dt>&lsquo;<samp>cdt_ms</samp>&rsquo;</dt>
  15584. <dd><p>Set the code detect timer period in ms.
  15585. </p>
  15586. </dd>
  15587. <dt>&lsquo;<samp>force_pe</samp>&rsquo;</dt>
  15588. <dd><p>Always extend peaks above -3dBFS even if PE isn&rsquo;t signaled.
  15589. </p>
  15590. </dd>
  15591. <dt>&lsquo;<samp>analyze_mode</samp>&rsquo;</dt>
  15592. <dd><p>Replace audio with a solid tone and adjust the amplitude to signal some
  15593. specific aspect of the decoding process. The output file can be loaded in
  15594. an audio editor alongside the original to aid analysis.
  15595. </p>
  15596. <p><code>analyze_mode=pe:force_pe=true</code> can be used to see all samples above the PE level.
  15597. </p>
  15598. <p>Modes are:
  15599. </p><dl compact="compact">
  15600. <dt>&lsquo;<samp>0, off</samp>&rsquo;</dt>
  15601. <dd><p>Disabled
  15602. </p></dd>
  15603. <dt>&lsquo;<samp>1, lle</samp>&rsquo;</dt>
  15604. <dd><p>Gain adjustment level at each sample
  15605. </p></dd>
  15606. <dt>&lsquo;<samp>2, pe</samp>&rsquo;</dt>
  15607. <dd><p>Samples where peak extend occurs
  15608. </p></dd>
  15609. <dt>&lsquo;<samp>3, cdt</samp>&rsquo;</dt>
  15610. <dd><p>Samples where the code detect timer is active
  15611. </p></dd>
  15612. <dt>&lsquo;<samp>4, tgm</samp>&rsquo;</dt>
  15613. <dd><p>Samples where the target gain does not match between channels
  15614. </p></dd>
  15615. </dl>
  15616. </dd>
  15617. </dl>
  15618. <a name="headphone"></a>
  15619. <h2 class="section"><a href="ffplay-all.html#toc-headphone">27.70 headphone</a></h2>
  15620. <p>Apply head-related transfer functions (HRTFs) to create virtual
  15621. loudspeakers around the user for binaural listening via headphones.
  15622. The HRIRs are provided via additional streams, for each channel
  15623. one stereo input stream is needed.
  15624. </p>
  15625. <p>The filter accepts the following options:
  15626. </p>
  15627. <dl compact="compact">
  15628. <dt>&lsquo;<samp>map</samp>&rsquo;</dt>
  15629. <dd><p>Set mapping of input streams for convolution.
  15630. The argument is a &rsquo;|&rsquo;-separated list of channel names in order as they
  15631. are given as additional stream inputs for filter.
  15632. This also specify number of input streams. Number of input streams
  15633. must be not less than number of channels in first stream plus one.
  15634. </p>
  15635. </dd>
  15636. <dt>&lsquo;<samp>gain</samp>&rsquo;</dt>
  15637. <dd><p>Set gain applied to audio. Value is in dB. Default is 0.
  15638. </p>
  15639. </dd>
  15640. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  15641. <dd><p>Set processing type. Can be <var>time</var> or <var>freq</var>. <var>time</var> is
  15642. processing audio in time domain which is slow.
  15643. <var>freq</var> is processing audio in frequency domain which is fast.
  15644. Default is <var>freq</var>.
  15645. </p>
  15646. </dd>
  15647. <dt>&lsquo;<samp>lfe</samp>&rsquo;</dt>
  15648. <dd><p>Set custom gain for LFE channels. Value is in dB. Default is 0.
  15649. </p>
  15650. </dd>
  15651. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  15652. <dd><p>Set size of frame in number of samples which will be processed at once.
  15653. Default value is <var>1024</var>. Allowed range is from 1024 to 96000.
  15654. </p>
  15655. </dd>
  15656. <dt>&lsquo;<samp>hrir</samp>&rsquo;</dt>
  15657. <dd><p>Set format of hrir stream.
  15658. Default value is <var>stereo</var>. Alternative value is <var>multich</var>.
  15659. If value is set to <var>stereo</var>, number of additional streams should
  15660. be greater or equal to number of input channels in first input stream.
  15661. Also each additional stream should have stereo number of channels.
  15662. If value is set to <var>multich</var>, number of additional streams should
  15663. be exactly one. Also number of input channels of additional stream
  15664. should be equal or greater than twice number of channels of first input
  15665. stream.
  15666. </p></dd>
  15667. </dl>
  15668. <a name="Examples-12"></a>
  15669. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-12">27.70.1 Examples</a></h3>
  15670. <ul>
  15671. <li>
  15672. Full example using wav files as coefficients with amovie filters for 7.1 downmix,
  15673. each amovie filter use stereo file with IR coefficients as input.
  15674. The files give coefficients for each position of virtual loudspeaker:
  15675. <div class="example">
  15676. <pre class="example">ffmpeg -i input.wav
  15677. -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;
  15678. output.wav
  15679. </pre></div>
  15680. </li><li>
  15681. Full example using wav files as coefficients with amovie filters for 7.1 downmix,
  15682. but now in <var>multich</var> <var>hrir</var> format.
  15683. <div class="example">
  15684. <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;
  15685. output.wav
  15686. </pre></div>
  15687. </li></ul>
  15688. <a name="highpass"></a>
  15689. <h2 class="section"><a href="ffplay-all.html#toc-highpass">27.71 highpass</a></h2>
  15690. <p>Apply a high-pass filter with 3dB point frequency.
  15691. The filter can be either single-pole, or double-pole (the default).
  15692. The filter roll off at 6dB per pole per octave (20dB per pole per decade).
  15693. </p>
  15694. <p>The filter accepts the following options:
  15695. </p>
  15696. <dl compact="compact">
  15697. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  15698. <dd><p>Set frequency in Hz. Default is 3000.
  15699. </p>
  15700. </dd>
  15701. <dt>&lsquo;<samp>poles, p</samp>&rsquo;</dt>
  15702. <dd><p>Set number of poles. Default is 2.
  15703. </p>
  15704. </dd>
  15705. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  15706. <dd><p>Set method to specify band-width of filter.
  15707. </p><dl compact="compact">
  15708. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  15709. <dd><p>Hz
  15710. </p></dd>
  15711. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  15712. <dd><p>Q-Factor
  15713. </p></dd>
  15714. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  15715. <dd><p>octave
  15716. </p></dd>
  15717. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  15718. <dd><p>slope
  15719. </p></dd>
  15720. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  15721. <dd><p>kHz
  15722. </p></dd>
  15723. </dl>
  15724. </dd>
  15725. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  15726. <dd><p>Specify the band-width of a filter in width_type units.
  15727. Applies only to double-pole filter.
  15728. The default is 0.707q and gives a Butterworth response.
  15729. </p>
  15730. </dd>
  15731. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  15732. <dd><p>How much to use filtered signal in output. Default is 1.
  15733. Range is between 0 and 1.
  15734. </p>
  15735. </dd>
  15736. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  15737. <dd><p>Specify which channels to filter, by default all available are filtered.
  15738. </p>
  15739. </dd>
  15740. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  15741. <dd><p>Normalize biquad coefficients, by default is disabled.
  15742. Enabling it will normalize magnitude response at DC to 0dB.
  15743. </p></dd>
  15744. </dl>
  15745. <a name="Commands-11"></a>
  15746. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-11">27.71.1 Commands</a></h3>
  15747. <p>This filter supports the following commands:
  15748. </p><dl compact="compact">
  15749. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  15750. <dd><p>Change highpass frequency.
  15751. Syntax for the command is : &quot;<var>frequency</var>&quot;
  15752. </p>
  15753. </dd>
  15754. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  15755. <dd><p>Change highpass width_type.
  15756. Syntax for the command is : &quot;<var>width_type</var>&quot;
  15757. </p>
  15758. </dd>
  15759. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  15760. <dd><p>Change highpass width.
  15761. Syntax for the command is : &quot;<var>width</var>&quot;
  15762. </p>
  15763. </dd>
  15764. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  15765. <dd><p>Change highpass mix.
  15766. Syntax for the command is : &quot;<var>mix</var>&quot;
  15767. </p></dd>
  15768. </dl>
  15769. <a name="join"></a>
  15770. <h2 class="section"><a href="ffplay-all.html#toc-join">27.72 join</a></h2>
  15771. <p>Join multiple input streams into one multi-channel stream.
  15772. </p>
  15773. <p>It accepts the following parameters:
  15774. </p><dl compact="compact">
  15775. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  15776. <dd><p>The number of input streams. It defaults to 2.
  15777. </p>
  15778. </dd>
  15779. <dt>&lsquo;<samp>channel_layout</samp>&rsquo;</dt>
  15780. <dd><p>The desired output channel layout. It defaults to stereo.
  15781. </p>
  15782. </dd>
  15783. <dt>&lsquo;<samp>map</samp>&rsquo;</dt>
  15784. <dd><p>Map channels from inputs to output. The argument is a &rsquo;|&rsquo;-separated list of
  15785. mappings, each in the <code><var>input_idx</var>.<var>in_channel</var>-<var>out_channel</var></code>
  15786. form. <var>input_idx</var> is the 0-based index of the input stream. <var>in_channel</var>
  15787. can be either the name of the input channel (e.g. FL for front left) or its
  15788. index in the specified input stream. <var>out_channel</var> is the name of the output
  15789. channel.
  15790. </p></dd>
  15791. </dl>
  15792. <p>The filter will attempt to guess the mappings when they are not specified
  15793. explicitly. It does so by first trying to find an unused matching input channel
  15794. and if that fails it picks the first unused input channel.
  15795. </p>
  15796. <p>Join 3 inputs (with properly set channel layouts):
  15797. </p><div class="example">
  15798. <pre class="example">ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT
  15799. </pre></div>
  15800. <p>Build a 5.1 output from 6 single-channel streams:
  15801. </p><div class="example">
  15802. <pre class="example">ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex
  15803. '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'
  15804. out
  15805. </pre></div>
  15806. <a name="ladspa"></a>
  15807. <h2 class="section"><a href="ffplay-all.html#toc-ladspa">27.73 ladspa</a></h2>
  15808. <p>Load a LADSPA (Linux Audio Developer&rsquo;s Simple Plugin API) plugin.
  15809. </p>
  15810. <p>To enable compilation of this filter you need to configure FFmpeg with
  15811. <code>--enable-ladspa</code>.
  15812. </p>
  15813. <dl compact="compact">
  15814. <dt>&lsquo;<samp>file, f</samp>&rsquo;</dt>
  15815. <dd><p>Specifies the name of LADSPA plugin library to load. If the environment
  15816. variable <code>LADSPA_PATH</code> is defined, the LADSPA plugin is searched in
  15817. each one of the directories specified by the colon separated list in
  15818. <code>LADSPA_PATH</code>, otherwise in the standard LADSPA paths, which are in
  15819. this order: &lsquo;<tt>HOME/.ladspa/lib/</tt>&rsquo;, &lsquo;<tt>/usr/local/lib/ladspa/</tt>&rsquo;,
  15820. &lsquo;<tt>/usr/lib/ladspa/</tt>&rsquo;.
  15821. </p>
  15822. </dd>
  15823. <dt>&lsquo;<samp>plugin, p</samp>&rsquo;</dt>
  15824. <dd><p>Specifies the plugin within the library. Some libraries contain only
  15825. one plugin, but others contain many of them. If this is not set filter
  15826. will list all available plugins within the specified library.
  15827. </p>
  15828. </dd>
  15829. <dt>&lsquo;<samp>controls, c</samp>&rsquo;</dt>
  15830. <dd><p>Set the &rsquo;|&rsquo; separated list of controls which are zero or more floating point
  15831. values that determine the behavior of the loaded plugin (for example delay,
  15832. threshold or gain).
  15833. Controls need to be defined using the following syntax:
  15834. c0=<var>value0</var>|c1=<var>value1</var>|c2=<var>value2</var>|..., where
  15835. <var>valuei</var> is the value set on the <var>i</var>-th control.
  15836. Alternatively they can be also defined using the following syntax:
  15837. <var>value0</var>|<var>value1</var>|<var>value2</var>|..., where
  15838. <var>valuei</var> is the value set on the <var>i</var>-th control.
  15839. If &lsquo;<samp>controls</samp>&rsquo; is set to <code>help</code>, all available controls and
  15840. their valid ranges are printed.
  15841. </p>
  15842. </dd>
  15843. <dt>&lsquo;<samp>sample_rate, s</samp>&rsquo;</dt>
  15844. <dd><p>Specify the sample rate, default to 44100. Only used if plugin have
  15845. zero inputs.
  15846. </p>
  15847. </dd>
  15848. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  15849. <dd><p>Set the number of samples per channel per each output frame, default
  15850. is 1024. Only used if plugin have zero inputs.
  15851. </p>
  15852. </dd>
  15853. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  15854. <dd><p>Set the minimum duration of the sourced audio. See
  15855. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  15856. for the accepted syntax.
  15857. Note that the resulting duration may be greater than the specified duration,
  15858. as the generated audio is always cut at the end of a complete frame.
  15859. If not specified, or the expressed duration is negative, the audio is
  15860. supposed to be generated forever.
  15861. Only used if plugin have zero inputs.
  15862. </p>
  15863. </dd>
  15864. </dl>
  15865. <a name="Examples-51"></a>
  15866. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-51">27.73.1 Examples</a></h3>
  15867. <ul>
  15868. <li>
  15869. List all available plugins within amp (LADSPA example plugin) library:
  15870. <div class="example">
  15871. <pre class="example">ladspa=file=amp
  15872. </pre></div>
  15873. </li><li>
  15874. List all available controls and their valid ranges for <code>vcf_notch</code>
  15875. plugin from <code>VCF</code> library:
  15876. <div class="example">
  15877. <pre class="example">ladspa=f=vcf:p=vcf_notch:c=help
  15878. </pre></div>
  15879. </li><li>
  15880. Simulate low quality audio equipment using <code>Computer Music Toolkit</code> (CMT)
  15881. plugin library:
  15882. <div class="example">
  15883. <pre class="example">ladspa=file=cmt:plugin=lofi:controls=c0=22|c1=12|c2=12
  15884. </pre></div>
  15885. </li><li>
  15886. Add reverberation to the audio using TAP-plugins
  15887. (Tom&rsquo;s Audio Processing plugins):
  15888. <div class="example">
  15889. <pre class="example">ladspa=file=tap_reverb:tap_reverb
  15890. </pre></div>
  15891. </li><li>
  15892. Generate white noise, with 0.2 amplitude:
  15893. <div class="example">
  15894. <pre class="example">ladspa=file=cmt:noise_source_white:c=c0=.2
  15895. </pre></div>
  15896. </li><li>
  15897. Generate 20 bpm clicks using plugin <code>C* Click - Metronome</code> from the
  15898. <code>C* Audio Plugin Suite</code> (CAPS) library:
  15899. <div class="example">
  15900. <pre class="example">ladspa=file=caps:Click:c=c1=20'
  15901. </pre></div>
  15902. </li><li>
  15903. Apply <code>C* Eq10X2 - Stereo 10-band equaliser</code> effect:
  15904. <div class="example">
  15905. <pre class="example">ladspa=caps:Eq10X2:c=c0=-48|c9=-24|c3=12|c4=2
  15906. </pre></div>
  15907. </li><li>
  15908. Increase volume by 20dB using fast lookahead limiter from Steve Harris
  15909. <code>SWH Plugins</code> collection:
  15910. <div class="example">
  15911. <pre class="example">ladspa=fast_lookahead_limiter_1913:fastLookaheadLimiter:20|0|2
  15912. </pre></div>
  15913. </li><li>
  15914. Attenuate low frequencies using Multiband EQ from Steve Harris
  15915. <code>SWH Plugins</code> collection:
  15916. <div class="example">
  15917. <pre class="example">ladspa=mbeq_1197:mbeq:-24|-24|-24|0|0|0|0|0|0|0|0|0|0|0|0
  15918. </pre></div>
  15919. </li><li>
  15920. Reduce stereo image using <code>Narrower</code> from the <code>C* Audio Plugin Suite</code>
  15921. (CAPS) library:
  15922. <div class="example">
  15923. <pre class="example">ladspa=caps:Narrower
  15924. </pre></div>
  15925. </li><li>
  15926. Another white noise, now using <code>C* Audio Plugin Suite</code> (CAPS) library:
  15927. <div class="example">
  15928. <pre class="example">ladspa=caps:White:.2
  15929. </pre></div>
  15930. </li><li>
  15931. Some fractal noise, using <code>C* Audio Plugin Suite</code> (CAPS) library:
  15932. <div class="example">
  15933. <pre class="example">ladspa=caps:Fractal:c=c1=1
  15934. </pre></div>
  15935. </li><li>
  15936. Dynamic volume normalization using <code>VLevel</code> plugin:
  15937. <div class="example">
  15938. <pre class="example">ladspa=vlevel-ladspa:vlevel_mono
  15939. </pre></div>
  15940. </li></ul>
  15941. <a name="Commands-12"></a>
  15942. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-12">27.73.2 Commands</a></h3>
  15943. <p>This filter supports the following commands:
  15944. </p><dl compact="compact">
  15945. <dt>&lsquo;<samp>cN</samp>&rsquo;</dt>
  15946. <dd><p>Modify the <var>N</var>-th control value.
  15947. </p>
  15948. <p>If the specified value is not valid, it is ignored and prior one is kept.
  15949. </p></dd>
  15950. </dl>
  15951. <a name="loudnorm"></a>
  15952. <h2 class="section"><a href="ffplay-all.html#toc-loudnorm">27.74 loudnorm</a></h2>
  15953. <p>EBU R128 loudness normalization. Includes both dynamic and linear normalization modes.
  15954. Support for both single pass (livestreams, files) and double pass (files) modes.
  15955. This algorithm can target IL, LRA, and maximum true peak. In dynamic mode, to accurately
  15956. detect true peaks, the audio stream will be upsampled to 192 kHz.
  15957. Use the <code>-ar</code> option or <code>aresample</code> filter to explicitly set an output sample rate.
  15958. </p>
  15959. <p>The filter accepts the following options:
  15960. </p>
  15961. <dl compact="compact">
  15962. <dt>&lsquo;<samp>I, i</samp>&rsquo;</dt>
  15963. <dd><p>Set integrated loudness target.
  15964. Range is -70.0 - -5.0. Default value is -24.0.
  15965. </p>
  15966. </dd>
  15967. <dt>&lsquo;<samp>LRA, lra</samp>&rsquo;</dt>
  15968. <dd><p>Set loudness range target.
  15969. Range is 1.0 - 20.0. Default value is 7.0.
  15970. </p>
  15971. </dd>
  15972. <dt>&lsquo;<samp>TP, tp</samp>&rsquo;</dt>
  15973. <dd><p>Set maximum true peak.
  15974. Range is -9.0 - +0.0. Default value is -2.0.
  15975. </p>
  15976. </dd>
  15977. <dt>&lsquo;<samp>measured_I, measured_i</samp>&rsquo;</dt>
  15978. <dd><p>Measured IL of input file.
  15979. Range is -99.0 - +0.0.
  15980. </p>
  15981. </dd>
  15982. <dt>&lsquo;<samp>measured_LRA, measured_lra</samp>&rsquo;</dt>
  15983. <dd><p>Measured LRA of input file.
  15984. Range is 0.0 - 99.0.
  15985. </p>
  15986. </dd>
  15987. <dt>&lsquo;<samp>measured_TP, measured_tp</samp>&rsquo;</dt>
  15988. <dd><p>Measured true peak of input file.
  15989. Range is -99.0 - +99.0.
  15990. </p>
  15991. </dd>
  15992. <dt>&lsquo;<samp>measured_thresh</samp>&rsquo;</dt>
  15993. <dd><p>Measured threshold of input file.
  15994. Range is -99.0 - +0.0.
  15995. </p>
  15996. </dd>
  15997. <dt>&lsquo;<samp>offset</samp>&rsquo;</dt>
  15998. <dd><p>Set offset gain. Gain is applied before the true-peak limiter.
  15999. Range is -99.0 - +99.0. Default is +0.0.
  16000. </p>
  16001. </dd>
  16002. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  16003. <dd><p>Normalize by linearly scaling the source audio.
  16004. <code>measured_I</code>, <code>measured_LRA</code>, <code>measured_TP</code>,
  16005. and <code>measured_thresh</code> must all be specified. Target LRA shouldn&rsquo;t
  16006. be lower than source LRA and the change in integrated loudness shouldn&rsquo;t
  16007. result in a true peak which exceeds the target TP. If any of these
  16008. conditions aren&rsquo;t met, normalization mode will revert to <var>dynamic</var>.
  16009. Options are <code>true</code> or <code>false</code>. Default is <code>true</code>.
  16010. </p>
  16011. </dd>
  16012. <dt>&lsquo;<samp>dual_mono</samp>&rsquo;</dt>
  16013. <dd><p>Treat mono input files as &quot;dual-mono&quot;. If a mono file is intended for playback
  16014. on a stereo system, its EBU R128 measurement will be perceptually incorrect.
  16015. If set to <code>true</code>, this option will compensate for this effect.
  16016. Multi-channel input files are not affected by this option.
  16017. Options are true or false. Default is false.
  16018. </p>
  16019. </dd>
  16020. <dt>&lsquo;<samp>print_format</samp>&rsquo;</dt>
  16021. <dd><p>Set print format for stats. Options are summary, json, or none.
  16022. Default value is none.
  16023. </p></dd>
  16024. </dl>
  16025. <a name="lowpass"></a>
  16026. <h2 class="section"><a href="ffplay-all.html#toc-lowpass">27.75 lowpass</a></h2>
  16027. <p>Apply a low-pass filter with 3dB point frequency.
  16028. The filter can be either single-pole or double-pole (the default).
  16029. The filter roll off at 6dB per pole per octave (20dB per pole per decade).
  16030. </p>
  16031. <p>The filter accepts the following options:
  16032. </p>
  16033. <dl compact="compact">
  16034. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  16035. <dd><p>Set frequency in Hz. Default is 500.
  16036. </p>
  16037. </dd>
  16038. <dt>&lsquo;<samp>poles, p</samp>&rsquo;</dt>
  16039. <dd><p>Set number of poles. Default is 2.
  16040. </p>
  16041. </dd>
  16042. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  16043. <dd><p>Set method to specify band-width of filter.
  16044. </p><dl compact="compact">
  16045. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  16046. <dd><p>Hz
  16047. </p></dd>
  16048. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  16049. <dd><p>Q-Factor
  16050. </p></dd>
  16051. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  16052. <dd><p>octave
  16053. </p></dd>
  16054. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  16055. <dd><p>slope
  16056. </p></dd>
  16057. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  16058. <dd><p>kHz
  16059. </p></dd>
  16060. </dl>
  16061. </dd>
  16062. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  16063. <dd><p>Specify the band-width of a filter in width_type units.
  16064. Applies only to double-pole filter.
  16065. The default is 0.707q and gives a Butterworth response.
  16066. </p>
  16067. </dd>
  16068. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  16069. <dd><p>How much to use filtered signal in output. Default is 1.
  16070. Range is between 0 and 1.
  16071. </p>
  16072. </dd>
  16073. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  16074. <dd><p>Specify which channels to filter, by default all available are filtered.
  16075. </p>
  16076. </dd>
  16077. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  16078. <dd><p>Normalize biquad coefficients, by default is disabled.
  16079. Enabling it will normalize magnitude response at DC to 0dB.
  16080. </p></dd>
  16081. </dl>
  16082. <a name="Examples-73"></a>
  16083. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-73">27.75.1 Examples</a></h3>
  16084. <ul>
  16085. <li>
  16086. Lowpass only LFE channel, it LFE is not present it does nothing:
  16087. <div class="example">
  16088. <pre class="example">lowpass=c=LFE
  16089. </pre></div>
  16090. </li></ul>
  16091. <a name="Commands-39"></a>
  16092. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-39">27.75.2 Commands</a></h3>
  16093. <p>This filter supports the following commands:
  16094. </p><dl compact="compact">
  16095. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  16096. <dd><p>Change lowpass frequency.
  16097. Syntax for the command is : &quot;<var>frequency</var>&quot;
  16098. </p>
  16099. </dd>
  16100. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  16101. <dd><p>Change lowpass width_type.
  16102. Syntax for the command is : &quot;<var>width_type</var>&quot;
  16103. </p>
  16104. </dd>
  16105. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  16106. <dd><p>Change lowpass width.
  16107. Syntax for the command is : &quot;<var>width</var>&quot;
  16108. </p>
  16109. </dd>
  16110. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  16111. <dd><p>Change lowpass mix.
  16112. Syntax for the command is : &quot;<var>mix</var>&quot;
  16113. </p></dd>
  16114. </dl>
  16115. <a name="lv2"></a>
  16116. <h2 class="section"><a href="ffplay-all.html#toc-lv2">27.76 lv2</a></h2>
  16117. <p>Load a LV2 (LADSPA Version 2) plugin.
  16118. </p>
  16119. <p>To enable compilation of this filter you need to configure FFmpeg with
  16120. <code>--enable-lv2</code>.
  16121. </p>
  16122. <dl compact="compact">
  16123. <dt>&lsquo;<samp>plugin, p</samp>&rsquo;</dt>
  16124. <dd><p>Specifies the plugin URI. You may need to escape &rsquo;:&rsquo;.
  16125. </p>
  16126. </dd>
  16127. <dt>&lsquo;<samp>controls, c</samp>&rsquo;</dt>
  16128. <dd><p>Set the &rsquo;|&rsquo; separated list of controls which are zero or more floating point
  16129. values that determine the behavior of the loaded plugin (for example delay,
  16130. threshold or gain).
  16131. If &lsquo;<samp>controls</samp>&rsquo; is set to <code>help</code>, all available controls and
  16132. their valid ranges are printed.
  16133. </p>
  16134. </dd>
  16135. <dt>&lsquo;<samp>sample_rate, s</samp>&rsquo;</dt>
  16136. <dd><p>Specify the sample rate, default to 44100. Only used if plugin have
  16137. zero inputs.
  16138. </p>
  16139. </dd>
  16140. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  16141. <dd><p>Set the number of samples per channel per each output frame, default
  16142. is 1024. Only used if plugin have zero inputs.
  16143. </p>
  16144. </dd>
  16145. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  16146. <dd><p>Set the minimum duration of the sourced audio. See
  16147. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  16148. for the accepted syntax.
  16149. Note that the resulting duration may be greater than the specified duration,
  16150. as the generated audio is always cut at the end of a complete frame.
  16151. If not specified, or the expressed duration is negative, the audio is
  16152. supposed to be generated forever.
  16153. Only used if plugin have zero inputs.
  16154. </p></dd>
  16155. </dl>
  16156. <a name="Examples-89"></a>
  16157. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-89">27.76.1 Examples</a></h3>
  16158. <ul>
  16159. <li>
  16160. Apply bass enhancer plugin from Calf:
  16161. <div class="example">
  16162. <pre class="example">lv2=p=http\\\\://calf.sourceforge.net/plugins/BassEnhancer:c=amount=2
  16163. </pre></div>
  16164. </li><li>
  16165. Apply vinyl plugin from Calf:
  16166. <div class="example">
  16167. <pre class="example">lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
  16168. </pre></div>
  16169. </li><li>
  16170. Apply bit crusher plugin from ArtyFX:
  16171. <div class="example">
  16172. <pre class="example">lv2=p=http\\\\://www.openavproductions.com/artyfx#bitta:c=crush=0.3
  16173. </pre></div>
  16174. </li></ul>
  16175. <a name="mcompand"></a>
  16176. <h2 class="section"><a href="ffplay-all.html#toc-mcompand">27.77 mcompand</a></h2>
  16177. <p>Multiband Compress or expand the audio&rsquo;s dynamic range.
  16178. </p>
  16179. <p>The input audio is divided into bands using 4th order Linkwitz-Riley IIRs.
  16180. This is akin to the crossover of a loudspeaker, and results in flat frequency
  16181. response when absent compander action.
  16182. </p>
  16183. <p>It accepts the following parameters:
  16184. </p>
  16185. <dl compact="compact">
  16186. <dt>&lsquo;<samp>args</samp>&rsquo;</dt>
  16187. <dd><p>This option syntax is:
  16188. attack,decay,[attack,decay..] soft-knee points crossover_frequency [delay [initial_volume [gain]]] | attack,decay ...
  16189. For explanation of each item refer to compand filter documentation.
  16190. </p></dd>
  16191. </dl>
  16192. <p><a name="pan"></a>
  16193. </p><a name="pan-1"></a>
  16194. <h2 class="section"><a href="ffplay-all.html#toc-pan-1">27.78 pan</a></h2>
  16195. <p>Mix channels with specific gain levels. The filter accepts the output
  16196. channel layout followed by a set of channels definitions.
  16197. </p>
  16198. <p>This filter is also designed to efficiently remap the channels of an audio
  16199. stream.
  16200. </p>
  16201. <p>The filter accepts parameters of the form:
  16202. &quot;<var>l</var>|<var>outdef</var>|<var>outdef</var>|...&quot;
  16203. </p>
  16204. <dl compact="compact">
  16205. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  16206. <dd><p>output channel layout or number of channels
  16207. </p>
  16208. </dd>
  16209. <dt>&lsquo;<samp>outdef</samp>&rsquo;</dt>
  16210. <dd><p>output channel specification, of the form:
  16211. &quot;<var>out_name</var>=[<var>gain</var>*]<var>in_name</var>[(+-)[<var>gain</var>*]<var>in_name</var>...]&quot;
  16212. </p>
  16213. </dd>
  16214. <dt>&lsquo;<samp>out_name</samp>&rsquo;</dt>
  16215. <dd><p>output channel to define, either a channel name (FL, FR, etc.) or a channel
  16216. number (c0, c1, etc.)
  16217. </p>
  16218. </dd>
  16219. <dt>&lsquo;<samp>gain</samp>&rsquo;</dt>
  16220. <dd><p>multiplicative coefficient for the channel, 1 leaving the volume unchanged
  16221. </p>
  16222. </dd>
  16223. <dt>&lsquo;<samp>in_name</samp>&rsquo;</dt>
  16224. <dd><p>input channel to use, see out_name for details; it is not possible to mix
  16225. named and numbered input channels
  16226. </p></dd>
  16227. </dl>
  16228. <p>If the &lsquo;=&rsquo; in a channel specification is replaced by &lsquo;&lt;&rsquo;, then the gains for
  16229. that specification will be renormalized so that the total is 1, thus
  16230. avoiding clipping noise.
  16231. </p>
  16232. <a name="Mixing-examples"></a>
  16233. <h3 class="subsection"><a href="ffplay-all.html#toc-Mixing-examples">27.78.1 Mixing examples</a></h3>
  16234. <p>For example, if you want to down-mix from stereo to mono, but with a bigger
  16235. factor for the left channel:
  16236. </p><div class="example">
  16237. <pre class="example">pan=1c|c0=0.9*c0+0.1*c1
  16238. </pre></div>
  16239. <p>A customized down-mix to stereo that works automatically for 3-, 4-, 5- and
  16240. 7-channels surround:
  16241. </p><div class="example">
  16242. <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
  16243. </pre></div>
  16244. <p>Note that <code>ffmpeg</code> integrates a default down-mix (and up-mix) system
  16245. that should be preferred (see &quot;-ac&quot; option) unless you have very specific
  16246. needs.
  16247. </p>
  16248. <a name="Remapping-examples"></a>
  16249. <h3 class="subsection"><a href="ffplay-all.html#toc-Remapping-examples">27.78.2 Remapping examples</a></h3>
  16250. <p>The channel remapping will be effective if, and only if:
  16251. </p>
  16252. <ul>
  16253. <li> gain coefficients are zeroes or ones,
  16254. </li><li> only one input per channel output,
  16255. </li></ul>
  16256. <p>If all these conditions are satisfied, the filter will notify the user (&quot;Pure
  16257. channel mapping detected&quot;), and use an optimized and lossless method to do the
  16258. remapping.
  16259. </p>
  16260. <p>For example, if you have a 5.1 source and want a stereo audio stream by
  16261. dropping the extra channels:
  16262. </p><div class="example">
  16263. <pre class="example">pan=&quot;stereo| c0=FL | c1=FR&quot;
  16264. </pre></div>
  16265. <p>Given the same source, you can also switch front left and front right channels
  16266. and keep the input channel layout:
  16267. </p><div class="example">
  16268. <pre class="example">pan=&quot;5.1| c0=c1 | c1=c0 | c2=c2 | c3=c3 | c4=c4 | c5=c5&quot;
  16269. </pre></div>
  16270. <p>If the input is a stereo audio stream, you can mute the front left channel (and
  16271. still keep the stereo channel layout) with:
  16272. </p><div class="example">
  16273. <pre class="example">pan=&quot;stereo|c1=c1&quot;
  16274. </pre></div>
  16275. <p>Still with a stereo audio stream input, you can copy the right channel in both
  16276. front left and right:
  16277. </p><div class="example">
  16278. <pre class="example">pan=&quot;stereo| c0=FR | c1=FR&quot;
  16279. </pre></div>
  16280. <a name="replaygain"></a>
  16281. <h2 class="section"><a href="ffplay-all.html#toc-replaygain">27.79 replaygain</a></h2>
  16282. <p>ReplayGain scanner filter. This filter takes an audio stream as an input and
  16283. outputs it unchanged.
  16284. At end of filtering it displays <code>track_gain</code> and <code>track_peak</code>.
  16285. </p>
  16286. <a name="resample"></a>
  16287. <h2 class="section"><a href="ffplay-all.html#toc-resample">27.80 resample</a></h2>
  16288. <p>Convert the audio sample format, sample rate and channel layout. It is
  16289. not meant to be used directly.
  16290. </p>
  16291. <a name="rubberband"></a>
  16292. <h2 class="section"><a href="ffplay-all.html#toc-rubberband">27.81 rubberband</a></h2>
  16293. <p>Apply time-stretching and pitch-shifting with librubberband.
  16294. </p>
  16295. <p>To enable compilation of this filter, you need to configure FFmpeg with
  16296. <code>--enable-librubberband</code>.
  16297. </p>
  16298. <p>The filter accepts the following options:
  16299. </p>
  16300. <dl compact="compact">
  16301. <dt>&lsquo;<samp>tempo</samp>&rsquo;</dt>
  16302. <dd><p>Set tempo scale factor.
  16303. </p>
  16304. </dd>
  16305. <dt>&lsquo;<samp>pitch</samp>&rsquo;</dt>
  16306. <dd><p>Set pitch scale factor.
  16307. </p>
  16308. </dd>
  16309. <dt>&lsquo;<samp>transients</samp>&rsquo;</dt>
  16310. <dd><p>Set transients detector.
  16311. Possible values are:
  16312. </p><dl compact="compact">
  16313. <dt><var>crisp</var></dt>
  16314. <dt><var>mixed</var></dt>
  16315. <dt><var>smooth</var></dt>
  16316. </dl>
  16317. </dd>
  16318. <dt>&lsquo;<samp>detector</samp>&rsquo;</dt>
  16319. <dd><p>Set detector.
  16320. Possible values are:
  16321. </p><dl compact="compact">
  16322. <dt><var>compound</var></dt>
  16323. <dt><var>percussive</var></dt>
  16324. <dt><var>soft</var></dt>
  16325. </dl>
  16326. </dd>
  16327. <dt>&lsquo;<samp>phase</samp>&rsquo;</dt>
  16328. <dd><p>Set phase.
  16329. Possible values are:
  16330. </p><dl compact="compact">
  16331. <dt><var>laminar</var></dt>
  16332. <dt><var>independent</var></dt>
  16333. </dl>
  16334. </dd>
  16335. <dt>&lsquo;<samp>window</samp>&rsquo;</dt>
  16336. <dd><p>Set processing window size.
  16337. Possible values are:
  16338. </p><dl compact="compact">
  16339. <dt><var>standard</var></dt>
  16340. <dt><var>short</var></dt>
  16341. <dt><var>long</var></dt>
  16342. </dl>
  16343. </dd>
  16344. <dt>&lsquo;<samp>smoothing</samp>&rsquo;</dt>
  16345. <dd><p>Set smoothing.
  16346. Possible values are:
  16347. </p><dl compact="compact">
  16348. <dt><var>off</var></dt>
  16349. <dt><var>on</var></dt>
  16350. </dl>
  16351. </dd>
  16352. <dt>&lsquo;<samp>formant</samp>&rsquo;</dt>
  16353. <dd><p>Enable formant preservation when shift pitching.
  16354. Possible values are:
  16355. </p><dl compact="compact">
  16356. <dt><var>shifted</var></dt>
  16357. <dt><var>preserved</var></dt>
  16358. </dl>
  16359. </dd>
  16360. <dt>&lsquo;<samp>pitchq</samp>&rsquo;</dt>
  16361. <dd><p>Set pitch quality.
  16362. Possible values are:
  16363. </p><dl compact="compact">
  16364. <dt><var>quality</var></dt>
  16365. <dt><var>speed</var></dt>
  16366. <dt><var>consistency</var></dt>
  16367. </dl>
  16368. </dd>
  16369. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  16370. <dd><p>Set channels.
  16371. Possible values are:
  16372. </p><dl compact="compact">
  16373. <dt><var>apart</var></dt>
  16374. <dt><var>together</var></dt>
  16375. </dl>
  16376. </dd>
  16377. </dl>
  16378. <a name="Commands-14"></a>
  16379. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-14">27.81.1 Commands</a></h3>
  16380. <p>This filter supports the following commands:
  16381. </p><dl compact="compact">
  16382. <dt>&lsquo;<samp>tempo</samp>&rsquo;</dt>
  16383. <dd><p>Change filter tempo scale factor.
  16384. Syntax for the command is : &quot;<var>tempo</var>&quot;
  16385. </p>
  16386. </dd>
  16387. <dt>&lsquo;<samp>pitch</samp>&rsquo;</dt>
  16388. <dd><p>Change filter pitch scale factor.
  16389. Syntax for the command is : &quot;<var>pitch</var>&quot;
  16390. </p></dd>
  16391. </dl>
  16392. <a name="sidechaincompress"></a>
  16393. <h2 class="section"><a href="ffplay-all.html#toc-sidechaincompress">27.82 sidechaincompress</a></h2>
  16394. <p>This filter acts like normal compressor but has the ability to compress
  16395. detected signal using second input signal.
  16396. It needs two input streams and returns one output stream.
  16397. First input stream will be processed depending on second stream signal.
  16398. The filtered signal then can be filtered with other filters in later stages of
  16399. processing. See <a href="#pan">pan</a> and <a href="#amerge">amerge</a> filter.
  16400. </p>
  16401. <p>The filter accepts the following options:
  16402. </p>
  16403. <dl compact="compact">
  16404. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  16405. <dd><p>Set input gain. Default is 1. Range is between 0.015625 and 64.
  16406. </p>
  16407. </dd>
  16408. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  16409. <dd><p>Set mode of compressor operation. Can be <code>upward</code> or <code>downward</code>.
  16410. Default is <code>downward</code>.
  16411. </p>
  16412. </dd>
  16413. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  16414. <dd><p>If a signal of second stream raises above this level it will affect the gain
  16415. reduction of first stream.
  16416. By default is 0.125. Range is between 0.00097563 and 1.
  16417. </p>
  16418. </dd>
  16419. <dt>&lsquo;<samp>ratio</samp>&rsquo;</dt>
  16420. <dd><p>Set a ratio about which the signal is reduced. 1:2 means that if the level
  16421. raised 4dB above the threshold, it will be only 2dB above after the reduction.
  16422. Default is 2. Range is between 1 and 20.
  16423. </p>
  16424. </dd>
  16425. <dt>&lsquo;<samp>attack</samp>&rsquo;</dt>
  16426. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  16427. reduction starts. Default is 20. Range is between 0.01 and 2000.
  16428. </p>
  16429. </dd>
  16430. <dt>&lsquo;<samp>release</samp>&rsquo;</dt>
  16431. <dd><p>Amount of milliseconds the signal has to fall below the threshold before
  16432. reduction is decreased again. Default is 250. Range is between 0.01 and 9000.
  16433. </p>
  16434. </dd>
  16435. <dt>&lsquo;<samp>makeup</samp>&rsquo;</dt>
  16436. <dd><p>Set the amount by how much signal will be amplified after processing.
  16437. Default is 1. Range is from 1 to 64.
  16438. </p>
  16439. </dd>
  16440. <dt>&lsquo;<samp>knee</samp>&rsquo;</dt>
  16441. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  16442. Default is 2.82843. Range is between 1 and 8.
  16443. </p>
  16444. </dd>
  16445. <dt>&lsquo;<samp>link</samp>&rsquo;</dt>
  16446. <dd><p>Choose if the <code>average</code> level between all channels of side-chain stream
  16447. or the louder(<code>maximum</code>) channel of side-chain stream affects the
  16448. reduction. Default is <code>average</code>.
  16449. </p>
  16450. </dd>
  16451. <dt>&lsquo;<samp>detection</samp>&rsquo;</dt>
  16452. <dd><p>Should the exact signal be taken in case of <code>peak</code> or an RMS one in case
  16453. of <code>rms</code>. Default is <code>rms</code> which is mainly smoother.
  16454. </p>
  16455. </dd>
  16456. <dt>&lsquo;<samp>level_sc</samp>&rsquo;</dt>
  16457. <dd><p>Set sidechain gain. Default is 1. Range is between 0.015625 and 64.
  16458. </p>
  16459. </dd>
  16460. <dt>&lsquo;<samp>mix</samp>&rsquo;</dt>
  16461. <dd><p>How much to use compressed signal in output. Default is 1.
  16462. Range is between 0 and 1.
  16463. </p></dd>
  16464. </dl>
  16465. <a name="Commands-19"></a>
  16466. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-19">27.82.1 Commands</a></h3>
  16467. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  16468. </p>
  16469. <a name="Examples-137"></a>
  16470. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-137">27.82.2 Examples</a></h3>
  16471. <ul>
  16472. <li>
  16473. Full ffmpeg example taking 2 audio inputs, 1st input to be compressed
  16474. depending on the signal of 2nd input and later compressed signal to be
  16475. merged with 2nd input:
  16476. <div class="example">
  16477. <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;
  16478. </pre></div>
  16479. </li></ul>
  16480. <a name="sidechaingate"></a>
  16481. <h2 class="section"><a href="ffplay-all.html#toc-sidechaingate">27.83 sidechaingate</a></h2>
  16482. <p>A sidechain gate acts like a normal (wideband) gate but has the ability to
  16483. filter the detected signal before sending it to the gain reduction stage.
  16484. Normally a gate uses the full range signal to detect a level above the
  16485. threshold.
  16486. For example: If you cut all lower frequencies from your sidechain signal
  16487. the gate will decrease the volume of your track only if not enough highs
  16488. appear. With this technique you are able to reduce the resonation of a
  16489. natural drum or remove &quot;rumbling&quot; of muted strokes from a heavily distorted
  16490. guitar.
  16491. It needs two input streams and returns one output stream.
  16492. First input stream will be processed depending on second stream signal.
  16493. </p>
  16494. <p>The filter accepts the following options:
  16495. </p>
  16496. <dl compact="compact">
  16497. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  16498. <dd><p>Set input level before filtering.
  16499. Default is 1. Allowed range is from 0.015625 to 64.
  16500. </p>
  16501. </dd>
  16502. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  16503. <dd><p>Set the mode of operation. Can be <code>upward</code> or <code>downward</code>.
  16504. Default is <code>downward</code>. If set to <code>upward</code> mode, higher parts of signal
  16505. will be amplified, expanding dynamic range in upward direction.
  16506. Otherwise, in case of <code>downward</code> lower parts of signal will be reduced.
  16507. </p>
  16508. </dd>
  16509. <dt>&lsquo;<samp>range</samp>&rsquo;</dt>
  16510. <dd><p>Set the level of gain reduction when the signal is below the threshold.
  16511. Default is 0.06125. Allowed range is from 0 to 1.
  16512. Setting this to 0 disables reduction and then filter behaves like expander.
  16513. </p>
  16514. </dd>
  16515. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  16516. <dd><p>If a signal rises above this level the gain reduction is released.
  16517. Default is 0.125. Allowed range is from 0 to 1.
  16518. </p>
  16519. </dd>
  16520. <dt>&lsquo;<samp>ratio</samp>&rsquo;</dt>
  16521. <dd><p>Set a ratio about which the signal is reduced.
  16522. Default is 2. Allowed range is from 1 to 9000.
  16523. </p>
  16524. </dd>
  16525. <dt>&lsquo;<samp>attack</samp>&rsquo;</dt>
  16526. <dd><p>Amount of milliseconds the signal has to rise above the threshold before gain
  16527. reduction stops.
  16528. Default is 20 milliseconds. Allowed range is from 0.01 to 9000.
  16529. </p>
  16530. </dd>
  16531. <dt>&lsquo;<samp>release</samp>&rsquo;</dt>
  16532. <dd><p>Amount of milliseconds the signal has to fall below the threshold before the
  16533. reduction is increased again. Default is 250 milliseconds.
  16534. Allowed range is from 0.01 to 9000.
  16535. </p>
  16536. </dd>
  16537. <dt>&lsquo;<samp>makeup</samp>&rsquo;</dt>
  16538. <dd><p>Set amount of amplification of signal after processing.
  16539. Default is 1. Allowed range is from 1 to 64.
  16540. </p>
  16541. </dd>
  16542. <dt>&lsquo;<samp>knee</samp>&rsquo;</dt>
  16543. <dd><p>Curve the sharp knee around the threshold to enter gain reduction more softly.
  16544. Default is 2.828427125. Allowed range is from 1 to 8.
  16545. </p>
  16546. </dd>
  16547. <dt>&lsquo;<samp>detection</samp>&rsquo;</dt>
  16548. <dd><p>Choose if exact signal should be taken for detection or an RMS like one.
  16549. Default is rms. Can be peak or rms.
  16550. </p>
  16551. </dd>
  16552. <dt>&lsquo;<samp>link</samp>&rsquo;</dt>
  16553. <dd><p>Choose if the average level between all channels or the louder channel affects
  16554. the reduction.
  16555. Default is average. Can be average or maximum.
  16556. </p>
  16557. </dd>
  16558. <dt>&lsquo;<samp>level_sc</samp>&rsquo;</dt>
  16559. <dd><p>Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
  16560. </p></dd>
  16561. </dl>
  16562. <a name="silencedetect"></a>
  16563. <h2 class="section"><a href="ffplay-all.html#toc-silencedetect">27.84 silencedetect</a></h2>
  16564. <p>Detect silence in an audio stream.
  16565. </p>
  16566. <p>This filter logs a message when it detects that the input audio volume is less
  16567. or equal to a noise tolerance value for a duration greater or equal to the
  16568. minimum detected noise duration.
  16569. </p>
  16570. <p>The printed times and duration are expressed in seconds. The
  16571. <code>lavfi.silence_start</code> or <code>lavfi.silence_start.X</code> metadata key
  16572. is set on the first frame whose timestamp equals or exceeds the detection
  16573. duration and it contains the timestamp of the first frame of the silence.
  16574. </p>
  16575. <p>The <code>lavfi.silence_duration</code> or <code>lavfi.silence_duration.X</code>
  16576. and <code>lavfi.silence_end</code> or <code>lavfi.silence_end.X</code> metadata
  16577. keys are set on the first frame after the silence. If &lsquo;<samp>mono</samp>&rsquo; is
  16578. enabled, and each channel is evaluated separately, the <code>.X</code>
  16579. suffixed keys are used, and <code>X</code> corresponds to the channel number.
  16580. </p>
  16581. <p>The filter accepts the following options:
  16582. </p>
  16583. <dl compact="compact">
  16584. <dt>&lsquo;<samp>noise, n</samp>&rsquo;</dt>
  16585. <dd><p>Set noise tolerance. Can be specified in dB (in case &quot;dB&quot; is appended to the
  16586. specified value) or amplitude ratio. Default is -60dB, or 0.001.
  16587. </p>
  16588. </dd>
  16589. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  16590. <dd><p>Set silence duration until notification (default is 2 seconds). See
  16591. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  16592. for the accepted syntax.
  16593. </p>
  16594. </dd>
  16595. <dt>&lsquo;<samp>mono, m</samp>&rsquo;</dt>
  16596. <dd><p>Process each channel separately, instead of combined. By default is disabled.
  16597. </p></dd>
  16598. </dl>
  16599. <a name="Examples-94"></a>
  16600. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-94">27.84.1 Examples</a></h3>
  16601. <ul>
  16602. <li>
  16603. Detect 5 seconds of silence with -50dB noise tolerance:
  16604. <div class="example">
  16605. <pre class="example">silencedetect=n=-50dB:d=5
  16606. </pre></div>
  16607. </li><li>
  16608. Complete example with <code>ffmpeg</code> to detect silence with 0.0001 noise
  16609. tolerance in &lsquo;<tt>silence.mp3</tt>&rsquo;:
  16610. <div class="example">
  16611. <pre class="example">ffmpeg -i silence.mp3 -af silencedetect=noise=0.0001 -f null -
  16612. </pre></div>
  16613. </li></ul>
  16614. <a name="silenceremove"></a>
  16615. <h2 class="section"><a href="ffplay-all.html#toc-silenceremove">27.85 silenceremove</a></h2>
  16616. <p>Remove silence from the beginning, middle or end of the audio.
  16617. </p>
  16618. <p>The filter accepts the following options:
  16619. </p>
  16620. <dl compact="compact">
  16621. <dt>&lsquo;<samp>start_periods</samp>&rsquo;</dt>
  16622. <dd><p>This value is used to indicate if audio should be trimmed at beginning of
  16623. the audio. A value of zero indicates no silence should be trimmed from the
  16624. beginning. When specifying a non-zero value, it trims audio up until it
  16625. finds non-silence. Normally, when trimming silence from beginning of audio
  16626. the <var>start_periods</var> will be <code>1</code> but it can be increased to higher
  16627. values to trim all audio up to specific count of non-silence periods.
  16628. Default value is <code>0</code>.
  16629. </p>
  16630. </dd>
  16631. <dt>&lsquo;<samp>start_duration</samp>&rsquo;</dt>
  16632. <dd><p>Specify the amount of time that non-silence must be detected before it stops
  16633. trimming audio. By increasing the duration, bursts of noises can be treated
  16634. as silence and trimmed off. Default value is <code>0</code>.
  16635. </p>
  16636. </dd>
  16637. <dt>&lsquo;<samp>start_threshold</samp>&rsquo;</dt>
  16638. <dd><p>This indicates what sample value should be treated as silence. For digital
  16639. audio, a value of <code>0</code> may be fine but for audio recorded from analog,
  16640. you may wish to increase the value to account for background noise.
  16641. Can be specified in dB (in case &quot;dB&quot; is appended to the specified value)
  16642. or amplitude ratio. Default value is <code>0</code>.
  16643. </p>
  16644. </dd>
  16645. <dt>&lsquo;<samp>start_silence</samp>&rsquo;</dt>
  16646. <dd><p>Specify max duration of silence at beginning that will be kept after
  16647. trimming. Default is 0, which is equal to trimming all samples detected
  16648. as silence.
  16649. </p>
  16650. </dd>
  16651. <dt>&lsquo;<samp>start_mode</samp>&rsquo;</dt>
  16652. <dd><p>Specify mode of detection of silence end in start of multi-channel audio.
  16653. Can be <var>any</var> or <var>all</var>. Default is <var>any</var>.
  16654. With <var>any</var>, any sample that is detected as non-silence will cause
  16655. stopped trimming of silence.
  16656. With <var>all</var>, only if all channels are detected as non-silence will cause
  16657. stopped trimming of silence.
  16658. </p>
  16659. </dd>
  16660. <dt>&lsquo;<samp>stop_periods</samp>&rsquo;</dt>
  16661. <dd><p>Set the count for trimming silence from the end of audio.
  16662. To remove silence from the middle of a file, specify a <var>stop_periods</var>
  16663. that is negative. This value is then treated as a positive value and is
  16664. used to indicate the effect should restart processing as specified by
  16665. <var>start_periods</var>, making it suitable for removing periods of silence
  16666. in the middle of the audio.
  16667. Default value is <code>0</code>.
  16668. </p>
  16669. </dd>
  16670. <dt>&lsquo;<samp>stop_duration</samp>&rsquo;</dt>
  16671. <dd><p>Specify a duration of silence that must exist before audio is not copied any
  16672. more. By specifying a higher duration, silence that is wanted can be left in
  16673. the audio.
  16674. Default value is <code>0</code>.
  16675. </p>
  16676. </dd>
  16677. <dt>&lsquo;<samp>stop_threshold</samp>&rsquo;</dt>
  16678. <dd><p>This is the same as &lsquo;<samp>start_threshold</samp>&rsquo; but for trimming silence from
  16679. the end of audio.
  16680. Can be specified in dB (in case &quot;dB&quot; is appended to the specified value)
  16681. or amplitude ratio. Default value is <code>0</code>.
  16682. </p>
  16683. </dd>
  16684. <dt>&lsquo;<samp>stop_silence</samp>&rsquo;</dt>
  16685. <dd><p>Specify max duration of silence at end that will be kept after
  16686. trimming. Default is 0, which is equal to trimming all samples detected
  16687. as silence.
  16688. </p>
  16689. </dd>
  16690. <dt>&lsquo;<samp>stop_mode</samp>&rsquo;</dt>
  16691. <dd><p>Specify mode of detection of silence start in end of multi-channel audio.
  16692. Can be <var>any</var> or <var>all</var>. Default is <var>any</var>.
  16693. With <var>any</var>, any sample that is detected as non-silence will cause
  16694. stopped trimming of silence.
  16695. With <var>all</var>, only if all channels are detected as non-silence will cause
  16696. stopped trimming of silence.
  16697. </p>
  16698. </dd>
  16699. <dt>&lsquo;<samp>detection</samp>&rsquo;</dt>
  16700. <dd><p>Set how is silence detected. Can be <code>rms</code> or <code>peak</code>. Second is faster
  16701. and works better with digital silence which is exactly 0.
  16702. Default value is <code>rms</code>.
  16703. </p>
  16704. </dd>
  16705. <dt>&lsquo;<samp>window</samp>&rsquo;</dt>
  16706. <dd><p>Set duration in number of seconds used to calculate size of window in number
  16707. of samples for detecting silence.
  16708. Default value is <code>0.02</code>. Allowed range is from <code>0</code> to <code>10</code>.
  16709. </p></dd>
  16710. </dl>
  16711. <a name="Examples-90"></a>
  16712. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-90">27.85.1 Examples</a></h3>
  16713. <ul>
  16714. <li>
  16715. The following example shows how this filter can be used to start a recording
  16716. that does not contain the delay at the start which usually occurs between
  16717. pressing the record button and the start of the performance:
  16718. <div class="example">
  16719. <pre class="example">silenceremove=start_periods=1:start_duration=5:start_threshold=0.02
  16720. </pre></div>
  16721. </li><li>
  16722. Trim all silence encountered from beginning to end where there is more than 1
  16723. second of silence in audio:
  16724. <div class="example">
  16725. <pre class="example">silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-90dB
  16726. </pre></div>
  16727. </li><li>
  16728. Trim all digital silence samples, using peak detection, from beginning to end
  16729. where there is more than 0 samples of digital silence in audio and digital
  16730. silence is detected in all channels at same positions in stream:
  16731. <div class="example">
  16732. <pre class="example">silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0
  16733. </pre></div>
  16734. </li></ul>
  16735. <a name="sofalizer"></a>
  16736. <h2 class="section"><a href="ffplay-all.html#toc-sofalizer">27.86 sofalizer</a></h2>
  16737. <p>SOFAlizer uses head-related transfer functions (HRTFs) to create virtual
  16738. loudspeakers around the user for binaural listening via headphones (audio
  16739. formats up to 9 channels supported).
  16740. The HRTFs are stored in SOFA files (see <a href="http://www.sofacoustics.org/">http://www.sofacoustics.org/</a> for a database).
  16741. SOFAlizer is developed at the Acoustics Research Institute (ARI) of the
  16742. Austrian Academy of Sciences.
  16743. </p>
  16744. <p>To enable compilation of this filter you need to configure FFmpeg with
  16745. <code>--enable-libmysofa</code>.
  16746. </p>
  16747. <p>The filter accepts the following options:
  16748. </p>
  16749. <dl compact="compact">
  16750. <dt>&lsquo;<samp>sofa</samp>&rsquo;</dt>
  16751. <dd><p>Set the SOFA file used for rendering.
  16752. </p>
  16753. </dd>
  16754. <dt>&lsquo;<samp>gain</samp>&rsquo;</dt>
  16755. <dd><p>Set gain applied to audio. Value is in dB. Default is 0.
  16756. </p>
  16757. </dd>
  16758. <dt>&lsquo;<samp>rotation</samp>&rsquo;</dt>
  16759. <dd><p>Set rotation of virtual loudspeakers in deg. Default is 0.
  16760. </p>
  16761. </dd>
  16762. <dt>&lsquo;<samp>elevation</samp>&rsquo;</dt>
  16763. <dd><p>Set elevation of virtual speakers in deg. Default is 0.
  16764. </p>
  16765. </dd>
  16766. <dt>&lsquo;<samp>radius</samp>&rsquo;</dt>
  16767. <dd><p>Set distance in meters between loudspeakers and the listener with near-field
  16768. HRTFs. Default is 1.
  16769. </p>
  16770. </dd>
  16771. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  16772. <dd><p>Set processing type. Can be <var>time</var> or <var>freq</var>. <var>time</var> is
  16773. processing audio in time domain which is slow.
  16774. <var>freq</var> is processing audio in frequency domain which is fast.
  16775. Default is <var>freq</var>.
  16776. </p>
  16777. </dd>
  16778. <dt>&lsquo;<samp>speakers</samp>&rsquo;</dt>
  16779. <dd><p>Set custom positions of virtual loudspeakers. Syntax for this option is:
  16780. &lt;CH&gt; &lt;AZIM&gt; &lt;ELEV&gt;[|&lt;CH&gt; &lt;AZIM&gt; &lt;ELEV&gt;|...].
  16781. Each virtual loudspeaker is described with short channel name following with
  16782. azimuth and elevation in degrees.
  16783. Each virtual loudspeaker description is separated by &rsquo;|&rsquo;.
  16784. For example to override front left and front right channel positions use:
  16785. &rsquo;speakers=FL 45 15|FR 345 15&rsquo;.
  16786. Descriptions with unrecognised channel names are ignored.
  16787. </p>
  16788. </dd>
  16789. <dt>&lsquo;<samp>lfegain</samp>&rsquo;</dt>
  16790. <dd><p>Set custom gain for LFE channels. Value is in dB. Default is 0.
  16791. </p>
  16792. </dd>
  16793. <dt>&lsquo;<samp>framesize</samp>&rsquo;</dt>
  16794. <dd><p>Set custom frame size in number of samples. Default is 1024.
  16795. Allowed range is from 1024 to 96000. Only used if option &lsquo;<samp>type</samp>&rsquo;
  16796. is set to <var>freq</var>.
  16797. </p>
  16798. </dd>
  16799. <dt>&lsquo;<samp>normalize</samp>&rsquo;</dt>
  16800. <dd><p>Should all IRs be normalized upon importing SOFA file.
  16801. By default is enabled.
  16802. </p>
  16803. </dd>
  16804. <dt>&lsquo;<samp>interpolate</samp>&rsquo;</dt>
  16805. <dd><p>Should nearest IRs be interpolated with neighbor IRs if exact position
  16806. does not match. By default is disabled.
  16807. </p>
  16808. </dd>
  16809. <dt>&lsquo;<samp>minphase</samp>&rsquo;</dt>
  16810. <dd><p>Minphase all IRs upon loading of SOFA file. By default is disabled.
  16811. </p>
  16812. </dd>
  16813. <dt>&lsquo;<samp>anglestep</samp>&rsquo;</dt>
  16814. <dd><p>Set neighbor search angle step. Only used if option <var>interpolate</var> is enabled.
  16815. </p>
  16816. </dd>
  16817. <dt>&lsquo;<samp>radstep</samp>&rsquo;</dt>
  16818. <dd><p>Set neighbor search radius step. Only used if option <var>interpolate</var> is enabled.
  16819. </p></dd>
  16820. </dl>
  16821. <a name="Examples-85"></a>
  16822. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-85">27.86.1 Examples</a></h3>
  16823. <ul>
  16824. <li>
  16825. Using ClubFritz6 sofa file:
  16826. <div class="example">
  16827. <pre class="example">sofalizer=sofa=/path/to/ClubFritz6.sofa:type=freq:radius=1
  16828. </pre></div>
  16829. </li><li>
  16830. Using ClubFritz12 sofa file and bigger radius with small rotation:
  16831. <div class="example">
  16832. <pre class="example">sofalizer=sofa=/path/to/ClubFritz12.sofa:type=freq:radius=2:rotation=5
  16833. </pre></div>
  16834. </li><li>
  16835. Similar as above but with custom speaker positions for front left, front right, back left and back right
  16836. and also with custom gain:
  16837. <div class="example">
  16838. <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;
  16839. </pre></div>
  16840. </li></ul>
  16841. <a name="stereotools"></a>
  16842. <h2 class="section"><a href="ffplay-all.html#toc-stereotools">27.87 stereotools</a></h2>
  16843. <p>This filter has some handy utilities to manage stereo signals, for converting
  16844. M/S stereo recordings to L/R signal while having control over the parameters
  16845. or spreading the stereo image of master track.
  16846. </p>
  16847. <p>The filter accepts the following options:
  16848. </p>
  16849. <dl compact="compact">
  16850. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  16851. <dd><p>Set input level before filtering for both channels. Defaults is 1.
  16852. Allowed range is from 0.015625 to 64.
  16853. </p>
  16854. </dd>
  16855. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  16856. <dd><p>Set output level after filtering for both channels. Defaults is 1.
  16857. Allowed range is from 0.015625 to 64.
  16858. </p>
  16859. </dd>
  16860. <dt>&lsquo;<samp>balance_in</samp>&rsquo;</dt>
  16861. <dd><p>Set input balance between both channels. Default is 0.
  16862. Allowed range is from -1 to 1.
  16863. </p>
  16864. </dd>
  16865. <dt>&lsquo;<samp>balance_out</samp>&rsquo;</dt>
  16866. <dd><p>Set output balance between both channels. Default is 0.
  16867. Allowed range is from -1 to 1.
  16868. </p>
  16869. </dd>
  16870. <dt>&lsquo;<samp>softclip</samp>&rsquo;</dt>
  16871. <dd><p>Enable softclipping. Results in analog distortion instead of harsh digital 0dB
  16872. clipping. Disabled by default.
  16873. </p>
  16874. </dd>
  16875. <dt>&lsquo;<samp>mutel</samp>&rsquo;</dt>
  16876. <dd><p>Mute the left channel. Disabled by default.
  16877. </p>
  16878. </dd>
  16879. <dt>&lsquo;<samp>muter</samp>&rsquo;</dt>
  16880. <dd><p>Mute the right channel. Disabled by default.
  16881. </p>
  16882. </dd>
  16883. <dt>&lsquo;<samp>phasel</samp>&rsquo;</dt>
  16884. <dd><p>Change the phase of the left channel. Disabled by default.
  16885. </p>
  16886. </dd>
  16887. <dt>&lsquo;<samp>phaser</samp>&rsquo;</dt>
  16888. <dd><p>Change the phase of the right channel. Disabled by default.
  16889. </p>
  16890. </dd>
  16891. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  16892. <dd><p>Set stereo mode. Available values are:
  16893. </p>
  16894. <dl compact="compact">
  16895. <dt>&lsquo;<samp>lr&gt;lr</samp>&rsquo;</dt>
  16896. <dd><p>Left/Right to Left/Right, this is default.
  16897. </p>
  16898. </dd>
  16899. <dt>&lsquo;<samp>lr&gt;ms</samp>&rsquo;</dt>
  16900. <dd><p>Left/Right to Mid/Side.
  16901. </p>
  16902. </dd>
  16903. <dt>&lsquo;<samp>ms&gt;lr</samp>&rsquo;</dt>
  16904. <dd><p>Mid/Side to Left/Right.
  16905. </p>
  16906. </dd>
  16907. <dt>&lsquo;<samp>lr&gt;ll</samp>&rsquo;</dt>
  16908. <dd><p>Left/Right to Left/Left.
  16909. </p>
  16910. </dd>
  16911. <dt>&lsquo;<samp>lr&gt;rr</samp>&rsquo;</dt>
  16912. <dd><p>Left/Right to Right/Right.
  16913. </p>
  16914. </dd>
  16915. <dt>&lsquo;<samp>lr&gt;l+r</samp>&rsquo;</dt>
  16916. <dd><p>Left/Right to Left + Right.
  16917. </p>
  16918. </dd>
  16919. <dt>&lsquo;<samp>lr&gt;rl</samp>&rsquo;</dt>
  16920. <dd><p>Left/Right to Right/Left.
  16921. </p>
  16922. </dd>
  16923. <dt>&lsquo;<samp>ms&gt;ll</samp>&rsquo;</dt>
  16924. <dd><p>Mid/Side to Left/Left.
  16925. </p>
  16926. </dd>
  16927. <dt>&lsquo;<samp>ms&gt;rr</samp>&rsquo;</dt>
  16928. <dd><p>Mid/Side to Right/Right.
  16929. </p></dd>
  16930. </dl>
  16931. </dd>
  16932. <dt>&lsquo;<samp>slev</samp>&rsquo;</dt>
  16933. <dd><p>Set level of side signal. Default is 1.
  16934. Allowed range is from 0.015625 to 64.
  16935. </p>
  16936. </dd>
  16937. <dt>&lsquo;<samp>sbal</samp>&rsquo;</dt>
  16938. <dd><p>Set balance of side signal. Default is 0.
  16939. Allowed range is from -1 to 1.
  16940. </p>
  16941. </dd>
  16942. <dt>&lsquo;<samp>mlev</samp>&rsquo;</dt>
  16943. <dd><p>Set level of the middle signal. Default is 1.
  16944. Allowed range is from 0.015625 to 64.
  16945. </p>
  16946. </dd>
  16947. <dt>&lsquo;<samp>mpan</samp>&rsquo;</dt>
  16948. <dd><p>Set middle signal pan. Default is 0. Allowed range is from -1 to 1.
  16949. </p>
  16950. </dd>
  16951. <dt>&lsquo;<samp>base</samp>&rsquo;</dt>
  16952. <dd><p>Set stereo base between mono and inversed channels. Default is 0.
  16953. Allowed range is from -1 to 1.
  16954. </p>
  16955. </dd>
  16956. <dt>&lsquo;<samp>delay</samp>&rsquo;</dt>
  16957. <dd><p>Set delay in milliseconds how much to delay left from right channel and
  16958. vice versa. Default is 0. Allowed range is from -20 to 20.
  16959. </p>
  16960. </dd>
  16961. <dt>&lsquo;<samp>sclevel</samp>&rsquo;</dt>
  16962. <dd><p>Set S/C level. Default is 1. Allowed range is from 1 to 100.
  16963. </p>
  16964. </dd>
  16965. <dt>&lsquo;<samp>phase</samp>&rsquo;</dt>
  16966. <dd><p>Set the stereo phase in degrees. Default is 0. Allowed range is from 0 to 360.
  16967. </p>
  16968. </dd>
  16969. <dt>&lsquo;<samp>bmode_in, bmode_out</samp>&rsquo;</dt>
  16970. <dd><p>Set balance mode for balance_in/balance_out option.
  16971. </p>
  16972. <p>Can be one of the following:
  16973. </p>
  16974. <dl compact="compact">
  16975. <dt>&lsquo;<samp>balance</samp>&rsquo;</dt>
  16976. <dd><p>Classic balance mode. Attenuate one channel at time.
  16977. Gain is raised up to 1.
  16978. </p>
  16979. </dd>
  16980. <dt>&lsquo;<samp>amplitude</samp>&rsquo;</dt>
  16981. <dd><p>Similar as classic mode above but gain is raised up to 2.
  16982. </p>
  16983. </dd>
  16984. <dt>&lsquo;<samp>power</samp>&rsquo;</dt>
  16985. <dd><p>Equal power distribution, from -6dB to +6dB range.
  16986. </p></dd>
  16987. </dl>
  16988. </dd>
  16989. </dl>
  16990. <a name="Examples-24"></a>
  16991. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-24">27.87.1 Examples</a></h3>
  16992. <ul>
  16993. <li>
  16994. Apply karaoke like effect:
  16995. <div class="example">
  16996. <pre class="example">stereotools=mlev=0.015625
  16997. </pre></div>
  16998. </li><li>
  16999. Convert M/S signal to L/R:
  17000. <div class="example">
  17001. <pre class="example">&quot;stereotools=mode=ms&gt;lr&quot;
  17002. </pre></div>
  17003. </li></ul>
  17004. <a name="stereowiden"></a>
  17005. <h2 class="section"><a href="ffplay-all.html#toc-stereowiden">27.88 stereowiden</a></h2>
  17006. <p>This filter enhance the stereo effect by suppressing signal common to both
  17007. channels and by delaying the signal of left into right and vice versa,
  17008. thereby widening the stereo effect.
  17009. </p>
  17010. <p>The filter accepts the following options:
  17011. </p>
  17012. <dl compact="compact">
  17013. <dt>&lsquo;<samp>delay</samp>&rsquo;</dt>
  17014. <dd><p>Time in milliseconds of the delay of left signal into right and vice versa.
  17015. Default is 20 milliseconds.
  17016. </p>
  17017. </dd>
  17018. <dt>&lsquo;<samp>feedback</samp>&rsquo;</dt>
  17019. <dd><p>Amount of gain in delayed signal into right and vice versa. Gives a delay
  17020. effect of left signal in right output and vice versa which gives widening
  17021. effect. Default is 0.3.
  17022. </p>
  17023. </dd>
  17024. <dt>&lsquo;<samp>crossfeed</samp>&rsquo;</dt>
  17025. <dd><p>Cross feed of left into right with inverted phase. This helps in suppressing
  17026. the mono. If the value is 1 it will cancel all the signal common to both
  17027. channels. Default is 0.3.
  17028. </p>
  17029. </dd>
  17030. <dt>&lsquo;<samp>drymix</samp>&rsquo;</dt>
  17031. <dd><p>Set level of input signal of original channel. Default is 0.8.
  17032. </p></dd>
  17033. </dl>
  17034. <a name="Commands-7"></a>
  17035. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-7">27.88.1 Commands</a></h3>
  17036. <p>This filter supports the all above options except <code>delay</code> as <a href="#commands">commands</a>.
  17037. </p>
  17038. <a name="superequalizer"></a>
  17039. <h2 class="section"><a href="ffplay-all.html#toc-superequalizer">27.89 superequalizer</a></h2>
  17040. <p>Apply 18 band equalizer.
  17041. </p>
  17042. <p>The filter accepts the following options:
  17043. </p><dl compact="compact">
  17044. <dt>&lsquo;<samp>1b</samp>&rsquo;</dt>
  17045. <dd><p>Set 65Hz band gain.
  17046. </p></dd>
  17047. <dt>&lsquo;<samp>2b</samp>&rsquo;</dt>
  17048. <dd><p>Set 92Hz band gain.
  17049. </p></dd>
  17050. <dt>&lsquo;<samp>3b</samp>&rsquo;</dt>
  17051. <dd><p>Set 131Hz band gain.
  17052. </p></dd>
  17053. <dt>&lsquo;<samp>4b</samp>&rsquo;</dt>
  17054. <dd><p>Set 185Hz band gain.
  17055. </p></dd>
  17056. <dt>&lsquo;<samp>5b</samp>&rsquo;</dt>
  17057. <dd><p>Set 262Hz band gain.
  17058. </p></dd>
  17059. <dt>&lsquo;<samp>6b</samp>&rsquo;</dt>
  17060. <dd><p>Set 370Hz band gain.
  17061. </p></dd>
  17062. <dt>&lsquo;<samp>7b</samp>&rsquo;</dt>
  17063. <dd><p>Set 523Hz band gain.
  17064. </p></dd>
  17065. <dt>&lsquo;<samp>8b</samp>&rsquo;</dt>
  17066. <dd><p>Set 740Hz band gain.
  17067. </p></dd>
  17068. <dt>&lsquo;<samp>9b</samp>&rsquo;</dt>
  17069. <dd><p>Set 1047Hz band gain.
  17070. </p></dd>
  17071. <dt>&lsquo;<samp>10b</samp>&rsquo;</dt>
  17072. <dd><p>Set 1480Hz band gain.
  17073. </p></dd>
  17074. <dt>&lsquo;<samp>11b</samp>&rsquo;</dt>
  17075. <dd><p>Set 2093Hz band gain.
  17076. </p></dd>
  17077. <dt>&lsquo;<samp>12b</samp>&rsquo;</dt>
  17078. <dd><p>Set 2960Hz band gain.
  17079. </p></dd>
  17080. <dt>&lsquo;<samp>13b</samp>&rsquo;</dt>
  17081. <dd><p>Set 4186Hz band gain.
  17082. </p></dd>
  17083. <dt>&lsquo;<samp>14b</samp>&rsquo;</dt>
  17084. <dd><p>Set 5920Hz band gain.
  17085. </p></dd>
  17086. <dt>&lsquo;<samp>15b</samp>&rsquo;</dt>
  17087. <dd><p>Set 8372Hz band gain.
  17088. </p></dd>
  17089. <dt>&lsquo;<samp>16b</samp>&rsquo;</dt>
  17090. <dd><p>Set 11840Hz band gain.
  17091. </p></dd>
  17092. <dt>&lsquo;<samp>17b</samp>&rsquo;</dt>
  17093. <dd><p>Set 16744Hz band gain.
  17094. </p></dd>
  17095. <dt>&lsquo;<samp>18b</samp>&rsquo;</dt>
  17096. <dd><p>Set 20000Hz band gain.
  17097. </p></dd>
  17098. </dl>
  17099. <a name="surround"></a>
  17100. <h2 class="section"><a href="ffplay-all.html#toc-surround">27.90 surround</a></h2>
  17101. <p>Apply audio surround upmix filter.
  17102. </p>
  17103. <p>This filter allows to produce multichannel output from audio stream.
  17104. </p>
  17105. <p>The filter accepts the following options:
  17106. </p>
  17107. <dl compact="compact">
  17108. <dt>&lsquo;<samp>chl_out</samp>&rsquo;</dt>
  17109. <dd><p>Set output channel layout. By default, this is <var>5.1</var>.
  17110. </p>
  17111. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  17112. for the required syntax.
  17113. </p>
  17114. </dd>
  17115. <dt>&lsquo;<samp>chl_in</samp>&rsquo;</dt>
  17116. <dd><p>Set input channel layout. By default, this is <var>stereo</var>.
  17117. </p>
  17118. <p>See <a href="ffmpeg-utils.html#channel-layout-syntax">(ffmpeg-utils)the Channel Layout section in the ffmpeg-utils(1) manual</a>
  17119. for the required syntax.
  17120. </p>
  17121. </dd>
  17122. <dt>&lsquo;<samp>level_in</samp>&rsquo;</dt>
  17123. <dd><p>Set input volume level. By default, this is <var>1</var>.
  17124. </p>
  17125. </dd>
  17126. <dt>&lsquo;<samp>level_out</samp>&rsquo;</dt>
  17127. <dd><p>Set output volume level. By default, this is <var>1</var>.
  17128. </p>
  17129. </dd>
  17130. <dt>&lsquo;<samp>lfe</samp>&rsquo;</dt>
  17131. <dd><p>Enable LFE channel output if output channel layout has it. By default, this is enabled.
  17132. </p>
  17133. </dd>
  17134. <dt>&lsquo;<samp>lfe_low</samp>&rsquo;</dt>
  17135. <dd><p>Set LFE low cut off frequency. By default, this is <var>128</var> Hz.
  17136. </p>
  17137. </dd>
  17138. <dt>&lsquo;<samp>lfe_high</samp>&rsquo;</dt>
  17139. <dd><p>Set LFE high cut off frequency. By default, this is <var>256</var> Hz.
  17140. </p>
  17141. </dd>
  17142. <dt>&lsquo;<samp>lfe_mode</samp>&rsquo;</dt>
  17143. <dd><p>Set LFE mode, can be <var>add</var> or <var>sub</var>. Default is <var>add</var>.
  17144. In <var>add</var> mode, LFE channel is created from input audio and added to output.
  17145. In <var>sub</var> mode, LFE channel is created from input audio and added to output but
  17146. also all non-LFE output channels are subtracted with output LFE channel.
  17147. </p>
  17148. </dd>
  17149. <dt>&lsquo;<samp>angle</samp>&rsquo;</dt>
  17150. <dd><p>Set angle of stereo surround transform, Allowed range is from <var>0</var> to <var>360</var>.
  17151. Default is <var>90</var>.
  17152. </p>
  17153. </dd>
  17154. <dt>&lsquo;<samp>fc_in</samp>&rsquo;</dt>
  17155. <dd><p>Set front center input volume. By default, this is <var>1</var>.
  17156. </p>
  17157. </dd>
  17158. <dt>&lsquo;<samp>fc_out</samp>&rsquo;</dt>
  17159. <dd><p>Set front center output volume. By default, this is <var>1</var>.
  17160. </p>
  17161. </dd>
  17162. <dt>&lsquo;<samp>fl_in</samp>&rsquo;</dt>
  17163. <dd><p>Set front left input volume. By default, this is <var>1</var>.
  17164. </p>
  17165. </dd>
  17166. <dt>&lsquo;<samp>fl_out</samp>&rsquo;</dt>
  17167. <dd><p>Set front left output volume. By default, this is <var>1</var>.
  17168. </p>
  17169. </dd>
  17170. <dt>&lsquo;<samp>fr_in</samp>&rsquo;</dt>
  17171. <dd><p>Set front right input volume. By default, this is <var>1</var>.
  17172. </p>
  17173. </dd>
  17174. <dt>&lsquo;<samp>fr_out</samp>&rsquo;</dt>
  17175. <dd><p>Set front right output volume. By default, this is <var>1</var>.
  17176. </p>
  17177. </dd>
  17178. <dt>&lsquo;<samp>sl_in</samp>&rsquo;</dt>
  17179. <dd><p>Set side left input volume. By default, this is <var>1</var>.
  17180. </p>
  17181. </dd>
  17182. <dt>&lsquo;<samp>sl_out</samp>&rsquo;</dt>
  17183. <dd><p>Set side left output volume. By default, this is <var>1</var>.
  17184. </p>
  17185. </dd>
  17186. <dt>&lsquo;<samp>sr_in</samp>&rsquo;</dt>
  17187. <dd><p>Set side right input volume. By default, this is <var>1</var>.
  17188. </p>
  17189. </dd>
  17190. <dt>&lsquo;<samp>sr_out</samp>&rsquo;</dt>
  17191. <dd><p>Set side right output volume. By default, this is <var>1</var>.
  17192. </p>
  17193. </dd>
  17194. <dt>&lsquo;<samp>bl_in</samp>&rsquo;</dt>
  17195. <dd><p>Set back left input volume. By default, this is <var>1</var>.
  17196. </p>
  17197. </dd>
  17198. <dt>&lsquo;<samp>bl_out</samp>&rsquo;</dt>
  17199. <dd><p>Set back left output volume. By default, this is <var>1</var>.
  17200. </p>
  17201. </dd>
  17202. <dt>&lsquo;<samp>br_in</samp>&rsquo;</dt>
  17203. <dd><p>Set back right input volume. By default, this is <var>1</var>.
  17204. </p>
  17205. </dd>
  17206. <dt>&lsquo;<samp>br_out</samp>&rsquo;</dt>
  17207. <dd><p>Set back right output volume. By default, this is <var>1</var>.
  17208. </p>
  17209. </dd>
  17210. <dt>&lsquo;<samp>bc_in</samp>&rsquo;</dt>
  17211. <dd><p>Set back center input volume. By default, this is <var>1</var>.
  17212. </p>
  17213. </dd>
  17214. <dt>&lsquo;<samp>bc_out</samp>&rsquo;</dt>
  17215. <dd><p>Set back center output volume. By default, this is <var>1</var>.
  17216. </p>
  17217. </dd>
  17218. <dt>&lsquo;<samp>lfe_in</samp>&rsquo;</dt>
  17219. <dd><p>Set LFE input volume. By default, this is <var>1</var>.
  17220. </p>
  17221. </dd>
  17222. <dt>&lsquo;<samp>lfe_out</samp>&rsquo;</dt>
  17223. <dd><p>Set LFE output volume. By default, this is <var>1</var>.
  17224. </p>
  17225. </dd>
  17226. <dt>&lsquo;<samp>allx</samp>&rsquo;</dt>
  17227. <dd><p>Set spread usage of stereo image across X axis for all channels.
  17228. </p>
  17229. </dd>
  17230. <dt>&lsquo;<samp>ally</samp>&rsquo;</dt>
  17231. <dd><p>Set spread usage of stereo image across Y axis for all channels.
  17232. </p>
  17233. </dd>
  17234. <dt>&lsquo;<samp>fcx, flx, frx, blx, brx, slx, srx, bcx</samp>&rsquo;</dt>
  17235. <dd><p>Set spread usage of stereo image across X axis for each channel.
  17236. </p>
  17237. </dd>
  17238. <dt>&lsquo;<samp>fcy, fly, fry, bly, bry, sly, sry, bcy</samp>&rsquo;</dt>
  17239. <dd><p>Set spread usage of stereo image across Y axis for each channel.
  17240. </p>
  17241. </dd>
  17242. <dt>&lsquo;<samp>win_size</samp>&rsquo;</dt>
  17243. <dd><p>Set window size. Allowed range is from <var>1024</var> to <var>65536</var>. Default size is <var>4096</var>.
  17244. </p>
  17245. </dd>
  17246. <dt>&lsquo;<samp>win_func</samp>&rsquo;</dt>
  17247. <dd><p>Set window function.
  17248. </p>
  17249. <p>It accepts the following values:
  17250. </p><dl compact="compact">
  17251. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  17252. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  17253. <dt>&lsquo;<samp>hann, hanning</samp>&rsquo;</dt>
  17254. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  17255. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  17256. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  17257. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  17258. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  17259. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  17260. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  17261. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  17262. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  17263. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  17264. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  17265. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  17266. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  17267. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  17268. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  17269. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  17270. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  17271. </dl>
  17272. <p>Default is <code>hann</code>.
  17273. </p>
  17274. </dd>
  17275. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  17276. <dd><p>Set window overlap. If set to 1, the recommended overlap for selected
  17277. window function will be picked. Default is <code>0.5</code>.
  17278. </p></dd>
  17279. </dl>
  17280. <a name="treble_002c-highshelf"></a>
  17281. <h2 class="section"><a href="ffplay-all.html#toc-treble_002c-highshelf">27.91 treble, highshelf</a></h2>
  17282. <p>Boost or cut treble (upper) frequencies of the audio using a two-pole
  17283. shelving filter with a response similar to that of a standard
  17284. hi-fi&rsquo;s tone-controls. This is also known as shelving equalisation (EQ).
  17285. </p>
  17286. <p>The filter accepts the following options:
  17287. </p>
  17288. <dl compact="compact">
  17289. <dt>&lsquo;<samp>gain, g</samp>&rsquo;</dt>
  17290. <dd><p>Give the gain at whichever is the lower of ~22 kHz and the
  17291. Nyquist frequency. Its useful range is about -20 (for a large cut)
  17292. to +20 (for a large boost). Beware of clipping when using a positive gain.
  17293. </p>
  17294. </dd>
  17295. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  17296. <dd><p>Set the filter&rsquo;s central frequency and so can be used
  17297. to extend or reduce the frequency range to be boosted or cut.
  17298. The default value is <code>3000</code> Hz.
  17299. </p>
  17300. </dd>
  17301. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  17302. <dd><p>Set method to specify band-width of filter.
  17303. </p><dl compact="compact">
  17304. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  17305. <dd><p>Hz
  17306. </p></dd>
  17307. <dt>&lsquo;<samp>q</samp>&rsquo;</dt>
  17308. <dd><p>Q-Factor
  17309. </p></dd>
  17310. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  17311. <dd><p>octave
  17312. </p></dd>
  17313. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  17314. <dd><p>slope
  17315. </p></dd>
  17316. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  17317. <dd><p>kHz
  17318. </p></dd>
  17319. </dl>
  17320. </dd>
  17321. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  17322. <dd><p>Determine how steep is the filter&rsquo;s shelf transition.
  17323. </p>
  17324. </dd>
  17325. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  17326. <dd><p>How much to use filtered signal in output. Default is 1.
  17327. Range is between 0 and 1.
  17328. </p>
  17329. </dd>
  17330. <dt>&lsquo;<samp>channels, c</samp>&rsquo;</dt>
  17331. <dd><p>Specify which channels to filter, by default all available are filtered.
  17332. </p>
  17333. </dd>
  17334. <dt>&lsquo;<samp>normalize, n</samp>&rsquo;</dt>
  17335. <dd><p>Normalize biquad coefficients, by default is disabled.
  17336. Enabling it will normalize magnitude response at DC to 0dB.
  17337. </p></dd>
  17338. </dl>
  17339. <a name="Commands-36"></a>
  17340. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-36">27.91.1 Commands</a></h3>
  17341. <p>This filter supports the following commands:
  17342. </p><dl compact="compact">
  17343. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  17344. <dd><p>Change treble frequency.
  17345. Syntax for the command is : &quot;<var>frequency</var>&quot;
  17346. </p>
  17347. </dd>
  17348. <dt>&lsquo;<samp>width_type, t</samp>&rsquo;</dt>
  17349. <dd><p>Change treble width_type.
  17350. Syntax for the command is : &quot;<var>width_type</var>&quot;
  17351. </p>
  17352. </dd>
  17353. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  17354. <dd><p>Change treble width.
  17355. Syntax for the command is : &quot;<var>width</var>&quot;
  17356. </p>
  17357. </dd>
  17358. <dt>&lsquo;<samp>gain, g</samp>&rsquo;</dt>
  17359. <dd><p>Change treble gain.
  17360. Syntax for the command is : &quot;<var>gain</var>&quot;
  17361. </p>
  17362. </dd>
  17363. <dt>&lsquo;<samp>mix, m</samp>&rsquo;</dt>
  17364. <dd><p>Change treble mix.
  17365. Syntax for the command is : &quot;<var>mix</var>&quot;
  17366. </p></dd>
  17367. </dl>
  17368. <a name="tremolo"></a>
  17369. <h2 class="section"><a href="ffplay-all.html#toc-tremolo">27.92 tremolo</a></h2>
  17370. <p>Sinusoidal amplitude modulation.
  17371. </p>
  17372. <p>The filter accepts the following options:
  17373. </p>
  17374. <dl compact="compact">
  17375. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  17376. <dd><p>Modulation frequency in Hertz. Modulation frequencies in the subharmonic range
  17377. (20 Hz or lower) will result in a tremolo effect.
  17378. This filter may also be used as a ring modulator by specifying
  17379. a modulation frequency higher than 20 Hz.
  17380. Range is 0.1 - 20000.0. Default value is 5.0 Hz.
  17381. </p>
  17382. </dd>
  17383. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  17384. <dd><p>Depth of modulation as a percentage. Range is 0.0 - 1.0.
  17385. Default value is 0.5.
  17386. </p></dd>
  17387. </dl>
  17388. <a name="vibrato"></a>
  17389. <h2 class="section"><a href="ffplay-all.html#toc-vibrato">27.93 vibrato</a></h2>
  17390. <p>Sinusoidal phase modulation.
  17391. </p>
  17392. <p>The filter accepts the following options:
  17393. </p>
  17394. <dl compact="compact">
  17395. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  17396. <dd><p>Modulation frequency in Hertz.
  17397. Range is 0.1 - 20000.0. Default value is 5.0 Hz.
  17398. </p>
  17399. </dd>
  17400. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  17401. <dd><p>Depth of modulation as a percentage. Range is 0.0 - 1.0.
  17402. Default value is 0.5.
  17403. </p></dd>
  17404. </dl>
  17405. <a name="volume"></a>
  17406. <h2 class="section"><a href="ffplay-all.html#toc-volume">27.94 volume</a></h2>
  17407. <p>Adjust the input audio volume.
  17408. </p>
  17409. <p>It accepts the following parameters:
  17410. </p><dl compact="compact">
  17411. <dt>&lsquo;<samp>volume</samp>&rsquo;</dt>
  17412. <dd><p>Set audio volume expression.
  17413. </p>
  17414. <p>Output values are clipped to the maximum value.
  17415. </p>
  17416. <p>The output audio volume is given by the relation:
  17417. </p><div class="example">
  17418. <pre class="example"><var>output_volume</var> = <var>volume</var> * <var>input_volume</var>
  17419. </pre></div>
  17420. <p>The default value for <var>volume</var> is &quot;1.0&quot;.
  17421. </p>
  17422. </dd>
  17423. <dt>&lsquo;<samp>precision</samp>&rsquo;</dt>
  17424. <dd><p>This parameter represents the mathematical precision.
  17425. </p>
  17426. <p>It determines which input sample formats will be allowed, which affects the
  17427. precision of the volume scaling.
  17428. </p>
  17429. <dl compact="compact">
  17430. <dt>&lsquo;<samp>fixed</samp>&rsquo;</dt>
  17431. <dd><p>8-bit fixed-point; this limits input sample format to U8, S16, and S32.
  17432. </p></dd>
  17433. <dt>&lsquo;<samp>float</samp>&rsquo;</dt>
  17434. <dd><p>32-bit floating-point; this limits input sample format to FLT. (default)
  17435. </p></dd>
  17436. <dt>&lsquo;<samp>double</samp>&rsquo;</dt>
  17437. <dd><p>64-bit floating-point; this limits input sample format to DBL.
  17438. </p></dd>
  17439. </dl>
  17440. </dd>
  17441. <dt>&lsquo;<samp>replaygain</samp>&rsquo;</dt>
  17442. <dd><p>Choose the behaviour on encountering ReplayGain side data in input frames.
  17443. </p>
  17444. <dl compact="compact">
  17445. <dt>&lsquo;<samp>drop</samp>&rsquo;</dt>
  17446. <dd><p>Remove ReplayGain side data, ignoring its contents (the default).
  17447. </p>
  17448. </dd>
  17449. <dt>&lsquo;<samp>ignore</samp>&rsquo;</dt>
  17450. <dd><p>Ignore ReplayGain side data, but leave it in the frame.
  17451. </p>
  17452. </dd>
  17453. <dt>&lsquo;<samp>track</samp>&rsquo;</dt>
  17454. <dd><p>Prefer the track gain, if present.
  17455. </p>
  17456. </dd>
  17457. <dt>&lsquo;<samp>album</samp>&rsquo;</dt>
  17458. <dd><p>Prefer the album gain, if present.
  17459. </p></dd>
  17460. </dl>
  17461. </dd>
  17462. <dt>&lsquo;<samp>replaygain_preamp</samp>&rsquo;</dt>
  17463. <dd><p>Pre-amplification gain in dB to apply to the selected replaygain gain.
  17464. </p>
  17465. <p>Default value for <var>replaygain_preamp</var> is 0.0.
  17466. </p>
  17467. </dd>
  17468. <dt>&lsquo;<samp>replaygain_noclip</samp>&rsquo;</dt>
  17469. <dd><p>Prevent clipping by limiting the gain applied.
  17470. </p>
  17471. <p>Default value for <var>replaygain_noclip</var> is 1.
  17472. </p>
  17473. </dd>
  17474. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  17475. <dd><p>Set when the volume expression is evaluated.
  17476. </p>
  17477. <p>It accepts the following values:
  17478. </p><dl compact="compact">
  17479. <dt>&lsquo;<samp>once</samp>&rsquo;</dt>
  17480. <dd><p>only evaluate expression once during the filter initialization, or
  17481. when the &lsquo;<samp>volume</samp>&rsquo; command is sent
  17482. </p>
  17483. </dd>
  17484. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  17485. <dd><p>evaluate expression for each incoming frame
  17486. </p></dd>
  17487. </dl>
  17488. <p>Default value is &lsquo;<samp>once</samp>&rsquo;.
  17489. </p></dd>
  17490. </dl>
  17491. <p>The volume expression can contain the following parameters.
  17492. </p>
  17493. <dl compact="compact">
  17494. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  17495. <dd><p>frame number (starting at zero)
  17496. </p></dd>
  17497. <dt>&lsquo;<samp>nb_channels</samp>&rsquo;</dt>
  17498. <dd><p>number of channels
  17499. </p></dd>
  17500. <dt>&lsquo;<samp>nb_consumed_samples</samp>&rsquo;</dt>
  17501. <dd><p>number of samples consumed by the filter
  17502. </p></dd>
  17503. <dt>&lsquo;<samp>nb_samples</samp>&rsquo;</dt>
  17504. <dd><p>number of samples in the current frame
  17505. </p></dd>
  17506. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  17507. <dd><p>original frame position in the file
  17508. </p></dd>
  17509. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  17510. <dd><p>frame PTS
  17511. </p></dd>
  17512. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  17513. <dd><p>sample rate
  17514. </p></dd>
  17515. <dt>&lsquo;<samp>startpts</samp>&rsquo;</dt>
  17516. <dd><p>PTS at start of stream
  17517. </p></dd>
  17518. <dt>&lsquo;<samp>startt</samp>&rsquo;</dt>
  17519. <dd><p>time at start of stream
  17520. </p></dd>
  17521. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  17522. <dd><p>frame time
  17523. </p></dd>
  17524. <dt>&lsquo;<samp>tb</samp>&rsquo;</dt>
  17525. <dd><p>timestamp timebase
  17526. </p></dd>
  17527. <dt>&lsquo;<samp>volume</samp>&rsquo;</dt>
  17528. <dd><p>last set volume value
  17529. </p></dd>
  17530. </dl>
  17531. <p>Note that when &lsquo;<samp>eval</samp>&rsquo; is set to &lsquo;<samp>once</samp>&rsquo; only the
  17532. <var>sample_rate</var> and <var>tb</var> variables are available, all other
  17533. variables will evaluate to NAN.
  17534. </p>
  17535. <a name="Commands-23"></a>
  17536. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-23">27.94.1 Commands</a></h3>
  17537. <p>This filter supports the following commands:
  17538. </p><dl compact="compact">
  17539. <dt>&lsquo;<samp>volume</samp>&rsquo;</dt>
  17540. <dd><p>Modify the volume expression.
  17541. The command accepts the same syntax of the corresponding option.
  17542. </p>
  17543. <p>If the specified expression is not valid, it is kept at its current
  17544. value.
  17545. </p></dd>
  17546. </dl>
  17547. <a name="Examples-145"></a>
  17548. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-145">27.94.2 Examples</a></h3>
  17549. <ul>
  17550. <li>
  17551. Halve the input audio volume:
  17552. <div class="example">
  17553. <pre class="example">volume=volume=0.5
  17554. volume=volume=1/2
  17555. volume=volume=-6.0206dB
  17556. </pre></div>
  17557. <p>In all the above example the named key for &lsquo;<samp>volume</samp>&rsquo; can be
  17558. omitted, for example like in:
  17559. </p><div class="example">
  17560. <pre class="example">volume=0.5
  17561. </pre></div>
  17562. </li><li>
  17563. Increase input audio power by 6 decibels using fixed-point precision:
  17564. <div class="example">
  17565. <pre class="example">volume=volume=6dB:precision=fixed
  17566. </pre></div>
  17567. </li><li>
  17568. Fade volume after time 10 with an annihilation period of 5 seconds:
  17569. <div class="example">
  17570. <pre class="example">volume='if(lt(t,10),1,max(1-(t-10)/5,0))':eval=frame
  17571. </pre></div>
  17572. </li></ul>
  17573. <a name="volumedetect"></a>
  17574. <h2 class="section"><a href="ffplay-all.html#toc-volumedetect">27.95 volumedetect</a></h2>
  17575. <p>Detect the volume of the input video.
  17576. </p>
  17577. <p>The filter has no parameters. The input is not modified. Statistics about
  17578. the volume will be printed in the log when the input stream end is reached.
  17579. </p>
  17580. <p>In particular it will show the mean volume (root mean square), maximum
  17581. volume (on a per-sample basis), and the beginning of a histogram of the
  17582. registered volume values (from the maximum value to a cumulated 1/1000 of
  17583. the samples).
  17584. </p>
  17585. <p>All volumes are in decibels relative to the maximum PCM value.
  17586. </p>
  17587. <a name="Examples-107"></a>
  17588. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-107">27.95.1 Examples</a></h3>
  17589. <p>Here is an excerpt of the output:
  17590. </p><div class="example">
  17591. <pre class="example">[Parsed_volumedetect_0 &nbsp;0xa23120] mean_volume: -27 dB
  17592. [Parsed_volumedetect_0 &nbsp;0xa23120] max_volume: -4 dB
  17593. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_4db: 6
  17594. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_5db: 62
  17595. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_6db: 286
  17596. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_7db: 1042
  17597. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_8db: 2551
  17598. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_9db: 4609
  17599. [Parsed_volumedetect_0 &nbsp;0xa23120] histogram_10db: 8409
  17600. </pre></div>
  17601. <p>It means that:
  17602. </p><ul>
  17603. <li>
  17604. The mean square energy is approximately -27 dB, or 10^-2.7.
  17605. </li><li>
  17606. The largest sample is at -4 dB, or more precisely between -4 dB and -5 dB.
  17607. </li><li>
  17608. There are 6 samples at -4 dB, 62 at -5 dB, 286 at -6 dB, etc.
  17609. </li></ul>
  17610. <p>In other words, raising the volume by +4 dB does not cause any clipping,
  17611. raising it by +5 dB causes clipping for 6 samples, etc.
  17612. </p>
  17613. <a name="Audio-Sources"></a>
  17614. <h1 class="chapter"><a href="ffplay-all.html#toc-Audio-Sources">28 Audio Sources</a></h1>
  17615. <p>Below is a description of the currently available audio sources.
  17616. </p>
  17617. <a name="abuffer"></a>
  17618. <h2 class="section"><a href="ffplay-all.html#toc-abuffer">28.1 abuffer</a></h2>
  17619. <p>Buffer audio frames, and make them available to the filter chain.
  17620. </p>
  17621. <p>This source is mainly intended for a programmatic use, in particular
  17622. through the interface defined in &lsquo;<tt>libavfilter/asrc_abuffer.h</tt>&rsquo;.
  17623. </p>
  17624. <p>It accepts the following parameters:
  17625. </p><dl compact="compact">
  17626. <dt>&lsquo;<samp>time_base</samp>&rsquo;</dt>
  17627. <dd><p>The timebase which will be used for timestamps of submitted frames. It must be
  17628. either a floating-point number or in <var>numerator</var>/<var>denominator</var> form.
  17629. </p>
  17630. </dd>
  17631. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  17632. <dd><p>The sample rate of the incoming audio buffers.
  17633. </p>
  17634. </dd>
  17635. <dt>&lsquo;<samp>sample_fmt</samp>&rsquo;</dt>
  17636. <dd><p>The sample format of the incoming audio buffers.
  17637. Either a sample format name or its corresponding integer representation from
  17638. the enum AVSampleFormat in &lsquo;<tt>libavutil/samplefmt.h</tt>&rsquo;
  17639. </p>
  17640. </dd>
  17641. <dt>&lsquo;<samp>channel_layout</samp>&rsquo;</dt>
  17642. <dd><p>The channel layout of the incoming audio buffers.
  17643. Either a channel layout name from channel_layout_map in
  17644. &lsquo;<tt>libavutil/channel_layout.c</tt>&rsquo; or its corresponding integer representation
  17645. from the AV_CH_LAYOUT_* macros in &lsquo;<tt>libavutil/channel_layout.h</tt>&rsquo;
  17646. </p>
  17647. </dd>
  17648. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  17649. <dd><p>The number of channels of the incoming audio buffers.
  17650. If both <var>channels</var> and <var>channel_layout</var> are specified, then they
  17651. must be consistent.
  17652. </p>
  17653. </dd>
  17654. </dl>
  17655. <a name="Examples-68"></a>
  17656. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-68">28.1.1 Examples</a></h3>
  17657. <div class="example">
  17658. <pre class="example">abuffer=sample_rate=44100:sample_fmt=s16p:channel_layout=stereo
  17659. </pre></div>
  17660. <p>will instruct the source to accept planar 16bit signed stereo at 44100Hz.
  17661. Since the sample format with name &quot;s16p&quot; corresponds to the number
  17662. 6 and the &quot;stereo&quot; channel layout corresponds to the value 0x3, this is
  17663. equivalent to:
  17664. </p><div class="example">
  17665. <pre class="example">abuffer=sample_rate=44100:sample_fmt=6:channel_layout=0x3
  17666. </pre></div>
  17667. <a name="aevalsrc"></a>
  17668. <h2 class="section"><a href="ffplay-all.html#toc-aevalsrc">28.2 aevalsrc</a></h2>
  17669. <p>Generate an audio signal specified by an expression.
  17670. </p>
  17671. <p>This source accepts in input one or more expressions (one for each
  17672. channel), which are evaluated and used to generate a corresponding
  17673. audio signal.
  17674. </p>
  17675. <p>This source accepts the following options:
  17676. </p>
  17677. <dl compact="compact">
  17678. <dt>&lsquo;<samp>exprs</samp>&rsquo;</dt>
  17679. <dd><p>Set the &rsquo;|&rsquo;-separated expressions list for each separate channel. In case the
  17680. &lsquo;<samp>channel_layout</samp>&rsquo; option is not specified, the selected channel layout
  17681. depends on the number of provided expressions. Otherwise the last
  17682. specified expression is applied to the remaining output channels.
  17683. </p>
  17684. </dd>
  17685. <dt>&lsquo;<samp>channel_layout, c</samp>&rsquo;</dt>
  17686. <dd><p>Set the channel layout. The number of channels in the specified layout
  17687. must be equal to the number of specified expressions.
  17688. </p>
  17689. </dd>
  17690. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  17691. <dd><p>Set the minimum duration of the sourced audio. See
  17692. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  17693. for the accepted syntax.
  17694. Note that the resulting duration may be greater than the specified
  17695. duration, as the generated audio is always cut at the end of a
  17696. complete frame.
  17697. </p>
  17698. <p>If not specified, or the expressed duration is negative, the audio is
  17699. supposed to be generated forever.
  17700. </p>
  17701. </dd>
  17702. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  17703. <dd><p>Set the number of samples per channel per each output frame,
  17704. default to 1024.
  17705. </p>
  17706. </dd>
  17707. <dt>&lsquo;<samp>sample_rate, s</samp>&rsquo;</dt>
  17708. <dd><p>Specify the sample rate, default to 44100.
  17709. </p></dd>
  17710. </dl>
  17711. <p>Each expression in <var>exprs</var> can contain the following constants:
  17712. </p>
  17713. <dl compact="compact">
  17714. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  17715. <dd><p>number of the evaluated sample, starting from 0
  17716. </p>
  17717. </dd>
  17718. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  17719. <dd><p>time of the evaluated sample expressed in seconds, starting from 0
  17720. </p>
  17721. </dd>
  17722. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  17723. <dd><p>sample rate
  17724. </p>
  17725. </dd>
  17726. </dl>
  17727. <a name="Examples-152"></a>
  17728. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-152">28.2.1 Examples</a></h3>
  17729. <ul>
  17730. <li>
  17731. Generate silence:
  17732. <div class="example">
  17733. <pre class="example">aevalsrc=0
  17734. </pre></div>
  17735. </li><li>
  17736. Generate a sin signal with frequency of 440 Hz, set sample rate to
  17737. 8000 Hz:
  17738. <div class="example">
  17739. <pre class="example">aevalsrc=&quot;sin(440*2*PI*t):s=8000&quot;
  17740. </pre></div>
  17741. </li><li>
  17742. Generate a two channels signal, specify the channel layout (Front
  17743. Center + Back Center) explicitly:
  17744. <div class="example">
  17745. <pre class="example">aevalsrc=&quot;sin(420*2*PI*t)|cos(430*2*PI*t):c=FC|BC&quot;
  17746. </pre></div>
  17747. </li><li>
  17748. Generate white noise:
  17749. <div class="example">
  17750. <pre class="example">aevalsrc=&quot;-2+random(0)&quot;
  17751. </pre></div>
  17752. </li><li>
  17753. Generate an amplitude modulated signal:
  17754. <div class="example">
  17755. <pre class="example">aevalsrc=&quot;sin(10*2*PI*t)*sin(880*2*PI*t)&quot;
  17756. </pre></div>
  17757. </li><li>
  17758. Generate 2.5 Hz binaural beats on a 360 Hz carrier:
  17759. <div class="example">
  17760. <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;
  17761. </pre></div>
  17762. </li></ul>
  17763. <a name="afirsrc"></a>
  17764. <h2 class="section"><a href="ffplay-all.html#toc-afirsrc">28.3 afirsrc</a></h2>
  17765. <p>Generate a FIR coefficients using frequency sampling method.
  17766. </p>
  17767. <p>The resulting stream can be used with <a href="#afir">afir</a> filter for filtering the audio signal.
  17768. </p>
  17769. <p>The filter accepts the following options:
  17770. </p>
  17771. <dl compact="compact">
  17772. <dt>&lsquo;<samp>taps, t</samp>&rsquo;</dt>
  17773. <dd><p>Set number of filter coefficents in output audio stream.
  17774. Default value is 1025.
  17775. </p>
  17776. </dd>
  17777. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  17778. <dd><p>Set frequency points from where magnitude and phase are set.
  17779. This must be in non decreasing order, and first element must be 0, while last element
  17780. must be 1. Elements are separated by white spaces.
  17781. </p>
  17782. </dd>
  17783. <dt>&lsquo;<samp>magnitude, m</samp>&rsquo;</dt>
  17784. <dd><p>Set magnitude value for every frequency point set by &lsquo;<samp>frequency</samp>&rsquo;.
  17785. Number of values must be same as number of frequency points.
  17786. Values are separated by white spaces.
  17787. </p>
  17788. </dd>
  17789. <dt>&lsquo;<samp>phase, p</samp>&rsquo;</dt>
  17790. <dd><p>Set phase value for every frequency point set by &lsquo;<samp>frequency</samp>&rsquo;.
  17791. Number of values must be same as number of frequency points.
  17792. Values are separated by white spaces.
  17793. </p>
  17794. </dd>
  17795. <dt>&lsquo;<samp>sample_rate, r</samp>&rsquo;</dt>
  17796. <dd><p>Set sample rate, default is 44100.
  17797. </p>
  17798. </dd>
  17799. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  17800. <dd><p>Set number of samples per each frame. Default is 1024.
  17801. </p>
  17802. </dd>
  17803. <dt>&lsquo;<samp>win_func, w</samp>&rsquo;</dt>
  17804. <dd><p>Set window function. Default is blackman.
  17805. </p></dd>
  17806. </dl>
  17807. <a name="anullsrc"></a>
  17808. <h2 class="section"><a href="ffplay-all.html#toc-anullsrc">28.4 anullsrc</a></h2>
  17809. <p>The null audio source, return unprocessed audio frames. It is mainly useful
  17810. as a template and to be employed in analysis / debugging tools, or as
  17811. the source for filters which ignore the input data (for example the sox
  17812. synth filter).
  17813. </p>
  17814. <p>This source accepts the following options:
  17815. </p>
  17816. <dl compact="compact">
  17817. <dt>&lsquo;<samp>channel_layout, cl</samp>&rsquo;</dt>
  17818. <dd>
  17819. <p>Specifies the channel layout, and can be either an integer or a string
  17820. representing a channel layout. The default value of <var>channel_layout</var>
  17821. is &quot;stereo&quot;.
  17822. </p>
  17823. <p>Check the channel_layout_map definition in
  17824. &lsquo;<tt>libavutil/channel_layout.c</tt>&rsquo; for the mapping between strings and
  17825. channel layout values.
  17826. </p>
  17827. </dd>
  17828. <dt>&lsquo;<samp>sample_rate, r</samp>&rsquo;</dt>
  17829. <dd><p>Specifies the sample rate, and defaults to 44100.
  17830. </p>
  17831. </dd>
  17832. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  17833. <dd><p>Set the number of samples per requested frames.
  17834. </p>
  17835. </dd>
  17836. </dl>
  17837. <a name="Examples-65"></a>
  17838. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-65">28.4.1 Examples</a></h3>
  17839. <ul>
  17840. <li>
  17841. Set the sample rate to 48000 Hz and the channel layout to AV_CH_LAYOUT_MONO.
  17842. <div class="example">
  17843. <pre class="example">anullsrc=r=48000:cl=4
  17844. </pre></div>
  17845. </li><li>
  17846. Do the same operation with a more obvious syntax:
  17847. <div class="example">
  17848. <pre class="example">anullsrc=r=48000:cl=mono
  17849. </pre></div>
  17850. </li></ul>
  17851. <p>All the parameters need to be explicitly defined.
  17852. </p>
  17853. <a name="flite"></a>
  17854. <h2 class="section"><a href="ffplay-all.html#toc-flite">28.5 flite</a></h2>
  17855. <p>Synthesize a voice utterance using the libflite library.
  17856. </p>
  17857. <p>To enable compilation of this filter you need to configure FFmpeg with
  17858. <code>--enable-libflite</code>.
  17859. </p>
  17860. <p>Note that versions of the flite library prior to 2.0 are not thread-safe.
  17861. </p>
  17862. <p>The filter accepts the following options:
  17863. </p>
  17864. <dl compact="compact">
  17865. <dt>&lsquo;<samp>list_voices</samp>&rsquo;</dt>
  17866. <dd><p>If set to 1, list the names of the available voices and exit
  17867. immediately. Default value is 0.
  17868. </p>
  17869. </dd>
  17870. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  17871. <dd><p>Set the maximum number of samples per frame. Default value is 512.
  17872. </p>
  17873. </dd>
  17874. <dt>&lsquo;<samp>textfile</samp>&rsquo;</dt>
  17875. <dd><p>Set the filename containing the text to speak.
  17876. </p>
  17877. </dd>
  17878. <dt>&lsquo;<samp>text</samp>&rsquo;</dt>
  17879. <dd><p>Set the text to speak.
  17880. </p>
  17881. </dd>
  17882. <dt>&lsquo;<samp>voice, v</samp>&rsquo;</dt>
  17883. <dd><p>Set the voice to use for the speech synthesis. Default value is
  17884. <code>kal</code>. See also the <var>list_voices</var> option.
  17885. </p></dd>
  17886. </dl>
  17887. <a name="Examples-17"></a>
  17888. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-17">28.5.1 Examples</a></h3>
  17889. <ul>
  17890. <li>
  17891. Read from file &lsquo;<tt>speech.txt</tt>&rsquo;, and synthesize the text using the
  17892. standard flite voice:
  17893. <div class="example">
  17894. <pre class="example">flite=textfile=speech.txt
  17895. </pre></div>
  17896. </li><li>
  17897. Read the specified text selecting the <code>slt</code> voice:
  17898. <div class="example">
  17899. <pre class="example">flite=text='So fare thee well, poor devil of a Sub-Sub, whose commentator I am':voice=slt
  17900. </pre></div>
  17901. </li><li>
  17902. Input text to ffmpeg:
  17903. <div class="example">
  17904. <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
  17905. </pre></div>
  17906. </li><li>
  17907. Make &lsquo;<tt>ffplay</tt>&rsquo; speak the specified text, using <code>flite</code> and
  17908. the <code>lavfi</code> device:
  17909. <div class="example">
  17910. <pre class="example">ffplay -f lavfi flite=text='No more be grieved for which that thou hast done.'
  17911. </pre></div>
  17912. </li></ul>
  17913. <p>For more information about libflite, check:
  17914. <a href="http://www.festvox.org/flite/">http://www.festvox.org/flite/</a>
  17915. </p>
  17916. <a name="anoisesrc"></a>
  17917. <h2 class="section"><a href="ffplay-all.html#toc-anoisesrc">28.6 anoisesrc</a></h2>
  17918. <p>Generate a noise audio signal.
  17919. </p>
  17920. <p>The filter accepts the following options:
  17921. </p>
  17922. <dl compact="compact">
  17923. <dt>&lsquo;<samp>sample_rate, r</samp>&rsquo;</dt>
  17924. <dd><p>Specify the sample rate. Default value is 48000 Hz.
  17925. </p>
  17926. </dd>
  17927. <dt>&lsquo;<samp>amplitude, a</samp>&rsquo;</dt>
  17928. <dd><p>Specify the amplitude (0.0 - 1.0) of the generated audio stream. Default value
  17929. is 1.0.
  17930. </p>
  17931. </dd>
  17932. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  17933. <dd><p>Specify the duration of the generated audio stream. Not specifying this option
  17934. results in noise with an infinite length.
  17935. </p>
  17936. </dd>
  17937. <dt>&lsquo;<samp>color, colour, c</samp>&rsquo;</dt>
  17938. <dd><p>Specify the color of noise. Available noise colors are white, pink, brown,
  17939. blue, violet and velvet. Default color is white.
  17940. </p>
  17941. </dd>
  17942. <dt>&lsquo;<samp>seed, s</samp>&rsquo;</dt>
  17943. <dd><p>Specify a value used to seed the PRNG.
  17944. </p>
  17945. </dd>
  17946. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  17947. <dd><p>Set the number of samples per each output frame, default is 1024.
  17948. </p></dd>
  17949. </dl>
  17950. <a name="Examples-2"></a>
  17951. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-2">28.6.1 Examples</a></h3>
  17952. <ul>
  17953. <li>
  17954. Generate 60 seconds of pink noise, with a 44.1 kHz sampling rate and an amplitude of 0.5:
  17955. <div class="example">
  17956. <pre class="example">anoisesrc=d=60:c=pink:r=44100:a=0.5
  17957. </pre></div>
  17958. </li></ul>
  17959. <a name="hilbert"></a>
  17960. <h2 class="section"><a href="ffplay-all.html#toc-hilbert">28.7 hilbert</a></h2>
  17961. <p>Generate odd-tap Hilbert transform FIR coefficients.
  17962. </p>
  17963. <p>The resulting stream can be used with <a href="#afir">afir</a> filter for phase-shifting
  17964. the signal by 90 degrees.
  17965. </p>
  17966. <p>This is used in many matrix coding schemes and for analytic signal generation.
  17967. The process is often written as a multiplication by i (or j), the imaginary unit.
  17968. </p>
  17969. <p>The filter accepts the following options:
  17970. </p>
  17971. <dl compact="compact">
  17972. <dt>&lsquo;<samp>sample_rate, s</samp>&rsquo;</dt>
  17973. <dd><p>Set sample rate, default is 44100.
  17974. </p>
  17975. </dd>
  17976. <dt>&lsquo;<samp>taps, t</samp>&rsquo;</dt>
  17977. <dd><p>Set length of FIR filter, default is 22051.
  17978. </p>
  17979. </dd>
  17980. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  17981. <dd><p>Set number of samples per each frame.
  17982. </p>
  17983. </dd>
  17984. <dt>&lsquo;<samp>win_func, w</samp>&rsquo;</dt>
  17985. <dd><p>Set window function to be used when generating FIR coefficients.
  17986. </p></dd>
  17987. </dl>
  17988. <a name="sinc"></a>
  17989. <h2 class="section"><a href="ffplay-all.html#toc-sinc">28.8 sinc</a></h2>
  17990. <p>Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.
  17991. </p>
  17992. <p>The resulting stream can be used with <a href="#afir">afir</a> filter for filtering the audio signal.
  17993. </p>
  17994. <p>The filter accepts the following options:
  17995. </p>
  17996. <dl compact="compact">
  17997. <dt>&lsquo;<samp>sample_rate, r</samp>&rsquo;</dt>
  17998. <dd><p>Set sample rate, default is 44100.
  17999. </p>
  18000. </dd>
  18001. <dt>&lsquo;<samp>nb_samples, n</samp>&rsquo;</dt>
  18002. <dd><p>Set number of samples per each frame. Default is 1024.
  18003. </p>
  18004. </dd>
  18005. <dt>&lsquo;<samp>hp</samp>&rsquo;</dt>
  18006. <dd><p>Set high-pass frequency. Default is 0.
  18007. </p>
  18008. </dd>
  18009. <dt>&lsquo;<samp>lp</samp>&rsquo;</dt>
  18010. <dd><p>Set low-pass frequency. Default is 0.
  18011. If high-pass frequency is lower than low-pass frequency and low-pass frequency
  18012. is higher than 0 then filter will create band-pass filter coefficients,
  18013. otherwise band-reject filter coefficients.
  18014. </p>
  18015. </dd>
  18016. <dt>&lsquo;<samp>phase</samp>&rsquo;</dt>
  18017. <dd><p>Set filter phase response. Default is 50. Allowed range is from 0 to 100.
  18018. </p>
  18019. </dd>
  18020. <dt>&lsquo;<samp>beta</samp>&rsquo;</dt>
  18021. <dd><p>Set Kaiser window beta.
  18022. </p>
  18023. </dd>
  18024. <dt>&lsquo;<samp>att</samp>&rsquo;</dt>
  18025. <dd><p>Set stop-band attenuation. Default is 120dB, allowed range is from 40 to 180 dB.
  18026. </p>
  18027. </dd>
  18028. <dt>&lsquo;<samp>round</samp>&rsquo;</dt>
  18029. <dd><p>Enable rounding, by default is disabled.
  18030. </p>
  18031. </dd>
  18032. <dt>&lsquo;<samp>hptaps</samp>&rsquo;</dt>
  18033. <dd><p>Set number of taps for high-pass filter.
  18034. </p>
  18035. </dd>
  18036. <dt>&lsquo;<samp>lptaps</samp>&rsquo;</dt>
  18037. <dd><p>Set number of taps for low-pass filter.
  18038. </p></dd>
  18039. </dl>
  18040. <a name="sine"></a>
  18041. <h2 class="section"><a href="ffplay-all.html#toc-sine">28.9 sine</a></h2>
  18042. <p>Generate an audio signal made of a sine wave with amplitude 1/8.
  18043. </p>
  18044. <p>The audio signal is bit-exact.
  18045. </p>
  18046. <p>The filter accepts the following options:
  18047. </p>
  18048. <dl compact="compact">
  18049. <dt>&lsquo;<samp>frequency, f</samp>&rsquo;</dt>
  18050. <dd><p>Set the carrier frequency. Default is 440 Hz.
  18051. </p>
  18052. </dd>
  18053. <dt>&lsquo;<samp>beep_factor, b</samp>&rsquo;</dt>
  18054. <dd><p>Enable a periodic beep every second with frequency <var>beep_factor</var> times
  18055. the carrier frequency. Default is 0, meaning the beep is disabled.
  18056. </p>
  18057. </dd>
  18058. <dt>&lsquo;<samp>sample_rate, r</samp>&rsquo;</dt>
  18059. <dd><p>Specify the sample rate, default is 44100.
  18060. </p>
  18061. </dd>
  18062. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  18063. <dd><p>Specify the duration of the generated audio stream.
  18064. </p>
  18065. </dd>
  18066. <dt>&lsquo;<samp>samples_per_frame</samp>&rsquo;</dt>
  18067. <dd><p>Set the number of samples per output frame.
  18068. </p>
  18069. <p>The expression can contain the following constants:
  18070. </p>
  18071. <dl compact="compact">
  18072. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  18073. <dd><p>The (sequential) number of the output audio frame, starting from 0.
  18074. </p>
  18075. </dd>
  18076. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  18077. <dd><p>The PTS (Presentation TimeStamp) of the output audio frame,
  18078. expressed in <var>TB</var> units.
  18079. </p>
  18080. </dd>
  18081. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  18082. <dd><p>The PTS of the output audio frame, expressed in seconds.
  18083. </p>
  18084. </dd>
  18085. <dt>&lsquo;<samp>TB</samp>&rsquo;</dt>
  18086. <dd><p>The timebase of the output audio frames.
  18087. </p></dd>
  18088. </dl>
  18089. <p>Default is <code>1024</code>.
  18090. </p></dd>
  18091. </dl>
  18092. <a name="Examples-114"></a>
  18093. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-114">28.9.1 Examples</a></h3>
  18094. <ul>
  18095. <li>
  18096. Generate a simple 440 Hz sine wave:
  18097. <div class="example">
  18098. <pre class="example">sine
  18099. </pre></div>
  18100. </li><li>
  18101. Generate a 220 Hz sine wave with a 880 Hz beep each second, for 5 seconds:
  18102. <div class="example">
  18103. <pre class="example">sine=220:4:d=5
  18104. sine=f=220:b=4:d=5
  18105. sine=frequency=220:beep_factor=4:duration=5
  18106. </pre></div>
  18107. </li><li>
  18108. Generate a 1 kHz sine wave following <code>1602,1601,1602,1601,1602</code> NTSC
  18109. pattern:
  18110. <div class="example">
  18111. <pre class="example">sine=1000:samples_per_frame='st(0,mod(n,5)); 1602-not(not(eq(ld(0),1)+eq(ld(0),3)))'
  18112. </pre></div>
  18113. </li></ul>
  18114. <a name="Audio-Sinks"></a>
  18115. <h1 class="chapter"><a href="ffplay-all.html#toc-Audio-Sinks">29 Audio Sinks</a></h1>
  18116. <p>Below is a description of the currently available audio sinks.
  18117. </p>
  18118. <a name="abuffersink"></a>
  18119. <h2 class="section"><a href="ffplay-all.html#toc-abuffersink">29.1 abuffersink</a></h2>
  18120. <p>Buffer audio frames, and make them available to the end of filter chain.
  18121. </p>
  18122. <p>This sink is mainly intended for programmatic use, in particular
  18123. through the interface defined in &lsquo;<tt>libavfilter/buffersink.h</tt>&rsquo;
  18124. or the options system.
  18125. </p>
  18126. <p>It accepts a pointer to an AVABufferSinkContext structure, which
  18127. defines the incoming buffers&rsquo; formats, to be passed as the opaque
  18128. parameter to <code>avfilter_init_filter</code> for initialization.
  18129. </p><a name="anullsink"></a>
  18130. <h2 class="section"><a href="ffplay-all.html#toc-anullsink">29.2 anullsink</a></h2>
  18131. <p>Null audio sink; do absolutely nothing with the input audio. It is
  18132. mainly useful as a template and for use in analysis / debugging
  18133. tools.
  18134. </p>
  18135. <a name="Video-Filters"></a>
  18136. <h1 class="chapter"><a href="ffplay-all.html#toc-Video-Filters">30 Video Filters</a></h1>
  18137. <p>When you configure your FFmpeg build, you can disable any of the
  18138. existing filters using <code>--disable-filters</code>.
  18139. The configure output will show the video filters included in your
  18140. build.
  18141. </p>
  18142. <p>Below is a description of the currently available video filters.
  18143. </p>
  18144. <a name="addroi"></a>
  18145. <h2 class="section"><a href="ffplay-all.html#toc-addroi">30.1 addroi</a></h2>
  18146. <p>Mark a region of interest in a video frame.
  18147. </p>
  18148. <p>The frame data is passed through unchanged, but metadata is attached
  18149. to the frame indicating regions of interest which can affect the
  18150. behaviour of later encoding. Multiple regions can be marked by
  18151. applying the filter multiple times.
  18152. </p>
  18153. <dl compact="compact">
  18154. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  18155. <dd><p>Region distance in pixels from the left edge of the frame.
  18156. </p></dd>
  18157. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  18158. <dd><p>Region distance in pixels from the top edge of the frame.
  18159. </p></dd>
  18160. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  18161. <dd><p>Region width in pixels.
  18162. </p></dd>
  18163. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  18164. <dd><p>Region height in pixels.
  18165. </p>
  18166. <p>The parameters <var>x</var>, <var>y</var>, <var>w</var> and <var>h</var> are expressions,
  18167. and may contain the following variables:
  18168. </p><dl compact="compact">
  18169. <dt>&lsquo;<samp>iw</samp>&rsquo;</dt>
  18170. <dd><p>Width of the input frame.
  18171. </p></dd>
  18172. <dt>&lsquo;<samp>ih</samp>&rsquo;</dt>
  18173. <dd><p>Height of the input frame.
  18174. </p></dd>
  18175. </dl>
  18176. </dd>
  18177. <dt>&lsquo;<samp>qoffset</samp>&rsquo;</dt>
  18178. <dd><p>Quantisation offset to apply within the region.
  18179. </p>
  18180. <p>This must be a real value in the range -1 to +1. A value of zero
  18181. indicates no quality change. A negative value asks for better quality
  18182. (less quantisation), while a positive value asks for worse quality
  18183. (greater quantisation).
  18184. </p>
  18185. <p>The range is calibrated so that the extreme values indicate the
  18186. largest possible offset - if the rest of the frame is encoded with the
  18187. worst possible quality, an offset of -1 indicates that this region
  18188. should be encoded with the best possible quality anyway. Intermediate
  18189. values are then interpolated in some codec-dependent way.
  18190. </p>
  18191. <p>For example, in 10-bit H.264 the quantisation parameter varies between
  18192. -12 and 51. A typical qoffset value of -1/10 therefore indicates that
  18193. this region should be encoded with a QP around one-tenth of the full
  18194. range better than the rest of the frame. So, if most of the frame
  18195. were to be encoded with a QP of around 30, this region would get a QP
  18196. of around 24 (an offset of approximately -1/10 * (51 - -12) = -6.3).
  18197. An extreme value of -1 would indicate that this region should be
  18198. encoded with the best possible quality regardless of the treatment of
  18199. the rest of the frame - that is, should be encoded at a QP of -12.
  18200. </p></dd>
  18201. <dt>&lsquo;<samp>clear</samp>&rsquo;</dt>
  18202. <dd><p>If set to true, remove any existing regions of interest marked on the
  18203. frame before adding the new one.
  18204. </p></dd>
  18205. </dl>
  18206. <a name="Examples-130"></a>
  18207. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-130">30.1.1 Examples</a></h3>
  18208. <ul>
  18209. <li>
  18210. Mark the centre quarter of the frame as interesting.
  18211. <div class="example">
  18212. <pre class="example">addroi=iw/4:ih/4:iw/2:ih/2:-1/10
  18213. </pre></div>
  18214. </li><li>
  18215. Mark the 100-pixel-wide region on the left edge of the frame as very
  18216. uninteresting (to be encoded at much lower quality than the rest of
  18217. the frame).
  18218. <div class="example">
  18219. <pre class="example">addroi=0:0:100:ih:+1/5
  18220. </pre></div>
  18221. </li></ul>
  18222. <a name="alphaextract"></a>
  18223. <h2 class="section"><a href="ffplay-all.html#toc-alphaextract">30.2 alphaextract</a></h2>
  18224. <p>Extract the alpha component from the input as a grayscale video. This
  18225. is especially useful with the <var>alphamerge</var> filter.
  18226. </p>
  18227. <a name="alphamerge"></a>
  18228. <h2 class="section"><a href="ffplay-all.html#toc-alphamerge">30.3 alphamerge</a></h2>
  18229. <p>Add or replace the alpha component of the primary input with the
  18230. grayscale value of a second input. This is intended for use with
  18231. <var>alphaextract</var> to allow the transmission or storage of frame
  18232. sequences that have alpha in a format that doesn&rsquo;t support an alpha
  18233. channel.
  18234. </p>
  18235. <p>For example, to reconstruct full frames from a normal YUV-encoded video
  18236. and a separate video created with <var>alphaextract</var>, you might use:
  18237. </p><div class="example">
  18238. <pre class="example">movie=in_alpha.mkv [alpha]; [in][alpha] alphamerge [out]
  18239. </pre></div>
  18240. <p>Since this filter is designed for reconstruction, it operates on frame
  18241. sequences without considering timestamps, and terminates when either
  18242. input reaches end of stream. This will cause problems if your encoding
  18243. pipeline drops frames. If you&rsquo;re trying to apply an image as an
  18244. overlay to a video stream, consider the <var>overlay</var> filter instead.
  18245. </p>
  18246. <a name="amplify"></a>
  18247. <h2 class="section"><a href="ffplay-all.html#toc-amplify">30.4 amplify</a></h2>
  18248. <p>Amplify differences between current pixel and pixels of adjacent frames in
  18249. same pixel location.
  18250. </p>
  18251. <p>This filter accepts the following options:
  18252. </p>
  18253. <dl compact="compact">
  18254. <dt>&lsquo;<samp>radius</samp>&rsquo;</dt>
  18255. <dd><p>Set frame radius. Default is 2. Allowed range is from 1 to 63.
  18256. For example radius of 3 will instruct filter to calculate average of 7 frames.
  18257. </p>
  18258. </dd>
  18259. <dt>&lsquo;<samp>factor</samp>&rsquo;</dt>
  18260. <dd><p>Set factor to amplify difference. Default is 2. Allowed range is from 0 to 65535.
  18261. </p>
  18262. </dd>
  18263. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  18264. <dd><p>Set threshold for difference amplification. Any difference greater or equal to
  18265. this value will not alter source pixel. Default is 10.
  18266. Allowed range is from 0 to 65535.
  18267. </p>
  18268. </dd>
  18269. <dt>&lsquo;<samp>tolerance</samp>&rsquo;</dt>
  18270. <dd><p>Set tolerance for difference amplification. Any difference lower to
  18271. this value will not alter source pixel. Default is 0.
  18272. Allowed range is from 0 to 65535.
  18273. </p>
  18274. </dd>
  18275. <dt>&lsquo;<samp>low</samp>&rsquo;</dt>
  18276. <dd><p>Set lower limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535.
  18277. This option controls maximum possible value that will decrease source pixel value.
  18278. </p>
  18279. </dd>
  18280. <dt>&lsquo;<samp>high</samp>&rsquo;</dt>
  18281. <dd><p>Set high limit for changing source pixel. Default is 65535. Allowed range is from 0 to 65535.
  18282. This option controls maximum possible value that will increase source pixel value.
  18283. </p>
  18284. </dd>
  18285. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  18286. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  18287. </p></dd>
  18288. </dl>
  18289. <a name="Commands-44"></a>
  18290. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-44">30.4.1 Commands</a></h3>
  18291. <p>This filter supports the following <a href="#commands">commands</a> that corresponds to option of same name:
  18292. </p><dl compact="compact">
  18293. <dt>&lsquo;<samp>factor</samp>&rsquo;</dt>
  18294. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  18295. <dt>&lsquo;<samp>tolerance</samp>&rsquo;</dt>
  18296. <dt>&lsquo;<samp>low</samp>&rsquo;</dt>
  18297. <dt>&lsquo;<samp>high</samp>&rsquo;</dt>
  18298. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  18299. </dl>
  18300. <a name="ass"></a>
  18301. <h2 class="section"><a href="ffplay-all.html#toc-ass">30.5 ass</a></h2>
  18302. <p>Same as the <a href="#subtitles">subtitles</a> filter, except that it doesn&rsquo;t require libavcodec
  18303. and libavformat to work. On the other hand, it is limited to ASS (Advanced
  18304. Substation Alpha) subtitles files.
  18305. </p>
  18306. <p>This filter accepts the following option in addition to the common options from
  18307. the <a href="#subtitles">subtitles</a> filter:
  18308. </p>
  18309. <dl compact="compact">
  18310. <dt>&lsquo;<samp>shaping</samp>&rsquo;</dt>
  18311. <dd><p>Set the shaping engine
  18312. </p>
  18313. <p>Available values are:
  18314. </p><dl compact="compact">
  18315. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  18316. <dd><p>The default libass shaping engine, which is the best available.
  18317. </p></dd>
  18318. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  18319. <dd><p>Fast, font-agnostic shaper that can do only substitutions
  18320. </p></dd>
  18321. <dt>&lsquo;<samp>complex</samp>&rsquo;</dt>
  18322. <dd><p>Slower shaper using OpenType for substitutions and positioning
  18323. </p></dd>
  18324. </dl>
  18325. <p>The default is <code>auto</code>.
  18326. </p></dd>
  18327. </dl>
  18328. <a name="atadenoise"></a>
  18329. <h2 class="section"><a href="ffplay-all.html#toc-atadenoise">30.6 atadenoise</a></h2>
  18330. <p>Apply an Adaptive Temporal Averaging Denoiser to the video input.
  18331. </p>
  18332. <p>The filter accepts the following options:
  18333. </p>
  18334. <dl compact="compact">
  18335. <dt>&lsquo;<samp>0a</samp>&rsquo;</dt>
  18336. <dd><p>Set threshold A for 1st plane. Default is 0.02.
  18337. Valid range is 0 to 0.3.
  18338. </p>
  18339. </dd>
  18340. <dt>&lsquo;<samp>0b</samp>&rsquo;</dt>
  18341. <dd><p>Set threshold B for 1st plane. Default is 0.04.
  18342. Valid range is 0 to 5.
  18343. </p>
  18344. </dd>
  18345. <dt>&lsquo;<samp>1a</samp>&rsquo;</dt>
  18346. <dd><p>Set threshold A for 2nd plane. Default is 0.02.
  18347. Valid range is 0 to 0.3.
  18348. </p>
  18349. </dd>
  18350. <dt>&lsquo;<samp>1b</samp>&rsquo;</dt>
  18351. <dd><p>Set threshold B for 2nd plane. Default is 0.04.
  18352. Valid range is 0 to 5.
  18353. </p>
  18354. </dd>
  18355. <dt>&lsquo;<samp>2a</samp>&rsquo;</dt>
  18356. <dd><p>Set threshold A for 3rd plane. Default is 0.02.
  18357. Valid range is 0 to 0.3.
  18358. </p>
  18359. </dd>
  18360. <dt>&lsquo;<samp>2b</samp>&rsquo;</dt>
  18361. <dd><p>Set threshold B for 3rd plane. Default is 0.04.
  18362. Valid range is 0 to 5.
  18363. </p>
  18364. <p>Threshold A is designed to react on abrupt changes in the input signal and
  18365. threshold B is designed to react on continuous changes in the input signal.
  18366. </p>
  18367. </dd>
  18368. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  18369. <dd><p>Set number of frames filter will use for averaging. Default is 9. Must be odd
  18370. number in range [5, 129].
  18371. </p>
  18372. </dd>
  18373. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  18374. <dd><p>Set what planes of frame filter will use for averaging. Default is all.
  18375. </p>
  18376. </dd>
  18377. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  18378. <dd><p>Set what variant of algorithm filter will use for averaging. Default is <code>p</code> parallel.
  18379. Alternatively can be set to <code>s</code> serial.
  18380. </p>
  18381. <p>Parallel can be faster then serial, while other way around is never true.
  18382. Parallel will abort early on first change being greater then thresholds, while serial
  18383. will continue processing other side of frames if they are equal or bellow thresholds.
  18384. </p></dd>
  18385. </dl>
  18386. <a name="Commands-61"></a>
  18387. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-61">30.6.1 Commands</a></h3>
  18388. <p>This filter supports same <a href="#commands">commands</a> as options except option <code>s</code>.
  18389. The command accepts the same syntax of the corresponding option.
  18390. </p>
  18391. <a name="avgblur"></a>
  18392. <h2 class="section"><a href="ffplay-all.html#toc-avgblur">30.7 avgblur</a></h2>
  18393. <p>Apply average blur filter.
  18394. </p>
  18395. <p>The filter accepts the following options:
  18396. </p>
  18397. <dl compact="compact">
  18398. <dt>&lsquo;<samp>sizeX</samp>&rsquo;</dt>
  18399. <dd><p>Set horizontal radius size.
  18400. </p>
  18401. </dd>
  18402. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  18403. <dd><p>Set which planes to filter. By default all planes are filtered.
  18404. </p>
  18405. </dd>
  18406. <dt>&lsquo;<samp>sizeY</samp>&rsquo;</dt>
  18407. <dd><p>Set vertical radius size, if zero it will be same as <code>sizeX</code>.
  18408. Default is <code>0</code>.
  18409. </p></dd>
  18410. </dl>
  18411. <a name="Commands-57"></a>
  18412. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-57">30.7.1 Commands</a></h3>
  18413. <p>This filter supports same commands as options.
  18414. The command accepts the same syntax of the corresponding option.
  18415. </p>
  18416. <p>If the specified expression is not valid, it is kept at its current
  18417. value.
  18418. </p>
  18419. <a name="bbox"></a>
  18420. <h2 class="section"><a href="ffplay-all.html#toc-bbox">30.8 bbox</a></h2>
  18421. <p>Compute the bounding box for the non-black pixels in the input frame
  18422. luminance plane.
  18423. </p>
  18424. <p>This filter computes the bounding box containing all the pixels with a
  18425. luminance value greater than the minimum allowed value.
  18426. The parameters describing the bounding box are printed on the filter
  18427. log.
  18428. </p>
  18429. <p>The filter accepts the following option:
  18430. </p>
  18431. <dl compact="compact">
  18432. <dt>&lsquo;<samp>min_val</samp>&rsquo;</dt>
  18433. <dd><p>Set the minimal luminance value. Default is <code>16</code>.
  18434. </p></dd>
  18435. </dl>
  18436. <a name="bilateral"></a>
  18437. <h2 class="section"><a href="ffplay-all.html#toc-bilateral">30.9 bilateral</a></h2>
  18438. <p>Apply bilateral filter, spatial smoothing while preserving edges.
  18439. </p>
  18440. <p>The filter accepts the following options:
  18441. </p><dl compact="compact">
  18442. <dt>&lsquo;<samp>sigmaS</samp>&rsquo;</dt>
  18443. <dd><p>Set sigma of gaussian function to calculate spatial weight.
  18444. Allowed range is 0 to 10. Default is 0.1.
  18445. </p>
  18446. </dd>
  18447. <dt>&lsquo;<samp>sigmaR</samp>&rsquo;</dt>
  18448. <dd><p>Set sigma of gaussian function to calculate range weight.
  18449. Allowed range is 0 to 1. Default is 0.1.
  18450. </p>
  18451. </dd>
  18452. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  18453. <dd><p>Set planes to filter. Default is first only.
  18454. </p></dd>
  18455. </dl>
  18456. <a name="bitplanenoise"></a>
  18457. <h2 class="section"><a href="ffplay-all.html#toc-bitplanenoise">30.10 bitplanenoise</a></h2>
  18458. <p>Show and measure bit plane noise.
  18459. </p>
  18460. <p>The filter accepts the following options:
  18461. </p>
  18462. <dl compact="compact">
  18463. <dt>&lsquo;<samp>bitplane</samp>&rsquo;</dt>
  18464. <dd><p>Set which plane to analyze. Default is <code>1</code>.
  18465. </p>
  18466. </dd>
  18467. <dt>&lsquo;<samp>filter</samp>&rsquo;</dt>
  18468. <dd><p>Filter out noisy pixels from <code>bitplane</code> set above.
  18469. Default is disabled.
  18470. </p></dd>
  18471. </dl>
  18472. <a name="blackdetect"></a>
  18473. <h2 class="section"><a href="ffplay-all.html#toc-blackdetect">30.11 blackdetect</a></h2>
  18474. <p>Detect video intervals that are (almost) completely black. Can be
  18475. useful to detect chapter transitions, commercials, or invalid
  18476. recordings. Output lines contains the time for the start, end and
  18477. duration of the detected black interval expressed in seconds.
  18478. </p>
  18479. <p>In order to display the output lines, you need to set the loglevel at
  18480. least to the AV_LOG_INFO value.
  18481. </p>
  18482. <p>The filter accepts the following options:
  18483. </p>
  18484. <dl compact="compact">
  18485. <dt>&lsquo;<samp>black_min_duration, d</samp>&rsquo;</dt>
  18486. <dd><p>Set the minimum detected black duration expressed in seconds. It must
  18487. be a non-negative floating point number.
  18488. </p>
  18489. <p>Default value is 2.0.
  18490. </p>
  18491. </dd>
  18492. <dt>&lsquo;<samp>picture_black_ratio_th, pic_th</samp>&rsquo;</dt>
  18493. <dd><p>Set the threshold for considering a picture &quot;black&quot;.
  18494. Express the minimum value for the ratio:
  18495. </p><div class="example">
  18496. <pre class="example"><var>nb_black_pixels</var> / <var>nb_pixels</var>
  18497. </pre></div>
  18498. <p>for which a picture is considered black.
  18499. Default value is 0.98.
  18500. </p>
  18501. </dd>
  18502. <dt>&lsquo;<samp>pixel_black_th, pix_th</samp>&rsquo;</dt>
  18503. <dd><p>Set the threshold for considering a pixel &quot;black&quot;.
  18504. </p>
  18505. <p>The threshold expresses the maximum pixel luminance value for which a
  18506. pixel is considered &quot;black&quot;. The provided value is scaled according to
  18507. the following equation:
  18508. </p><div class="example">
  18509. <pre class="example"><var>absolute_threshold</var> = <var>luminance_minimum_value</var> + <var>pixel_black_th</var> * <var>luminance_range_size</var>
  18510. </pre></div>
  18511. <p><var>luminance_range_size</var> and <var>luminance_minimum_value</var> depend on
  18512. the input video format, the range is [0-255] for YUV full-range
  18513. formats and [16-235] for YUV non full-range formats.
  18514. </p>
  18515. <p>Default value is 0.10.
  18516. </p></dd>
  18517. </dl>
  18518. <p>The following example sets the maximum pixel threshold to the minimum
  18519. value, and detects only black intervals of 2 or more seconds:
  18520. </p><div class="example">
  18521. <pre class="example">blackdetect=d=2:pix_th=0.00
  18522. </pre></div>
  18523. <a name="blackframe"></a>
  18524. <h2 class="section"><a href="ffplay-all.html#toc-blackframe">30.12 blackframe</a></h2>
  18525. <p>Detect frames that are (almost) completely black. Can be useful to
  18526. detect chapter transitions or commercials. Output lines consist of
  18527. the frame number of the detected frame, the percentage of blackness,
  18528. the position in the file if known or -1 and the timestamp in seconds.
  18529. </p>
  18530. <p>In order to display the output lines, you need to set the loglevel at
  18531. least to the AV_LOG_INFO value.
  18532. </p>
  18533. <p>This filter exports frame metadata <code>lavfi.blackframe.pblack</code>.
  18534. The value represents the percentage of pixels in the picture that
  18535. are below the threshold value.
  18536. </p>
  18537. <p>It accepts the following parameters:
  18538. </p>
  18539. <dl compact="compact">
  18540. <dt>&lsquo;<samp>amount</samp>&rsquo;</dt>
  18541. <dd><p>The percentage of the pixels that have to be below the threshold; it defaults to
  18542. <code>98</code>.
  18543. </p>
  18544. </dd>
  18545. <dt>&lsquo;<samp>threshold, thresh</samp>&rsquo;</dt>
  18546. <dd><p>The threshold below which a pixel value is considered black; it defaults to
  18547. <code>32</code>.
  18548. </p>
  18549. </dd>
  18550. </dl>
  18551. <p><a name="blend"></a>
  18552. </p><a name="blend-1"></a>
  18553. <h2 class="section"><a href="ffplay-all.html#toc-blend-1">30.13 blend</a></h2>
  18554. <p>Blend two video frames into each other.
  18555. </p>
  18556. <p>The <code>blend</code> filter takes two input streams and outputs one
  18557. stream, the first input is the &quot;top&quot; layer and second input is
  18558. &quot;bottom&quot; layer. By default, the output terminates when the longest input terminates.
  18559. </p>
  18560. <p>The <code>tblend</code> (time blend) filter takes two consecutive frames
  18561. from one single stream, and outputs the result obtained by blending
  18562. the new frame on top of the old frame.
  18563. </p>
  18564. <p>A description of the accepted options follows.
  18565. </p>
  18566. <dl compact="compact">
  18567. <dt>&lsquo;<samp>c0_mode</samp>&rsquo;</dt>
  18568. <dt>&lsquo;<samp>c1_mode</samp>&rsquo;</dt>
  18569. <dt>&lsquo;<samp>c2_mode</samp>&rsquo;</dt>
  18570. <dt>&lsquo;<samp>c3_mode</samp>&rsquo;</dt>
  18571. <dt>&lsquo;<samp>all_mode</samp>&rsquo;</dt>
  18572. <dd><p>Set blend mode for specific pixel component or all pixel components in case
  18573. of <var>all_mode</var>. Default value is <code>normal</code>.
  18574. </p>
  18575. <p>Available values for component modes are:
  18576. </p><dl compact="compact">
  18577. <dt>&lsquo;<samp>addition</samp>&rsquo;</dt>
  18578. <dt>&lsquo;<samp>grainmerge</samp>&rsquo;</dt>
  18579. <dt>&lsquo;<samp>and</samp>&rsquo;</dt>
  18580. <dt>&lsquo;<samp>average</samp>&rsquo;</dt>
  18581. <dt>&lsquo;<samp>burn</samp>&rsquo;</dt>
  18582. <dt>&lsquo;<samp>darken</samp>&rsquo;</dt>
  18583. <dt>&lsquo;<samp>difference</samp>&rsquo;</dt>
  18584. <dt>&lsquo;<samp>grainextract</samp>&rsquo;</dt>
  18585. <dt>&lsquo;<samp>divide</samp>&rsquo;</dt>
  18586. <dt>&lsquo;<samp>dodge</samp>&rsquo;</dt>
  18587. <dt>&lsquo;<samp>freeze</samp>&rsquo;</dt>
  18588. <dt>&lsquo;<samp>exclusion</samp>&rsquo;</dt>
  18589. <dt>&lsquo;<samp>extremity</samp>&rsquo;</dt>
  18590. <dt>&lsquo;<samp>glow</samp>&rsquo;</dt>
  18591. <dt>&lsquo;<samp>hardlight</samp>&rsquo;</dt>
  18592. <dt>&lsquo;<samp>hardmix</samp>&rsquo;</dt>
  18593. <dt>&lsquo;<samp>heat</samp>&rsquo;</dt>
  18594. <dt>&lsquo;<samp>lighten</samp>&rsquo;</dt>
  18595. <dt>&lsquo;<samp>linearlight</samp>&rsquo;</dt>
  18596. <dt>&lsquo;<samp>multiply</samp>&rsquo;</dt>
  18597. <dt>&lsquo;<samp>multiply128</samp>&rsquo;</dt>
  18598. <dt>&lsquo;<samp>negation</samp>&rsquo;</dt>
  18599. <dt>&lsquo;<samp>normal</samp>&rsquo;</dt>
  18600. <dt>&lsquo;<samp>or</samp>&rsquo;</dt>
  18601. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  18602. <dt>&lsquo;<samp>phoenix</samp>&rsquo;</dt>
  18603. <dt>&lsquo;<samp>pinlight</samp>&rsquo;</dt>
  18604. <dt>&lsquo;<samp>reflect</samp>&rsquo;</dt>
  18605. <dt>&lsquo;<samp>screen</samp>&rsquo;</dt>
  18606. <dt>&lsquo;<samp>softlight</samp>&rsquo;</dt>
  18607. <dt>&lsquo;<samp>subtract</samp>&rsquo;</dt>
  18608. <dt>&lsquo;<samp>vividlight</samp>&rsquo;</dt>
  18609. <dt>&lsquo;<samp>xor</samp>&rsquo;</dt>
  18610. </dl>
  18611. </dd>
  18612. <dt>&lsquo;<samp>c0_opacity</samp>&rsquo;</dt>
  18613. <dt>&lsquo;<samp>c1_opacity</samp>&rsquo;</dt>
  18614. <dt>&lsquo;<samp>c2_opacity</samp>&rsquo;</dt>
  18615. <dt>&lsquo;<samp>c3_opacity</samp>&rsquo;</dt>
  18616. <dt>&lsquo;<samp>all_opacity</samp>&rsquo;</dt>
  18617. <dd><p>Set blend opacity for specific pixel component or all pixel components in case
  18618. of <var>all_opacity</var>. Only used in combination with pixel component blend modes.
  18619. </p>
  18620. </dd>
  18621. <dt>&lsquo;<samp>c0_expr</samp>&rsquo;</dt>
  18622. <dt>&lsquo;<samp>c1_expr</samp>&rsquo;</dt>
  18623. <dt>&lsquo;<samp>c2_expr</samp>&rsquo;</dt>
  18624. <dt>&lsquo;<samp>c3_expr</samp>&rsquo;</dt>
  18625. <dt>&lsquo;<samp>all_expr</samp>&rsquo;</dt>
  18626. <dd><p>Set blend expression for specific pixel component or all pixel components in case
  18627. of <var>all_expr</var>. Note that related mode options will be ignored if those are set.
  18628. </p>
  18629. <p>The expressions can use the following variables:
  18630. </p>
  18631. <dl compact="compact">
  18632. <dt>&lsquo;<samp>N</samp>&rsquo;</dt>
  18633. <dd><p>The sequential number of the filtered frame, starting from <code>0</code>.
  18634. </p>
  18635. </dd>
  18636. <dt>&lsquo;<samp>X</samp>&rsquo;</dt>
  18637. <dt>&lsquo;<samp>Y</samp>&rsquo;</dt>
  18638. <dd><p>the coordinates of the current sample
  18639. </p>
  18640. </dd>
  18641. <dt>&lsquo;<samp>W</samp>&rsquo;</dt>
  18642. <dt>&lsquo;<samp>H</samp>&rsquo;</dt>
  18643. <dd><p>the width and height of currently filtered plane
  18644. </p>
  18645. </dd>
  18646. <dt>&lsquo;<samp>SW</samp>&rsquo;</dt>
  18647. <dt>&lsquo;<samp>SH</samp>&rsquo;</dt>
  18648. <dd><p>Width and height scale for the plane being filtered. It is the
  18649. ratio between the dimensions of the current plane to the luma plane,
  18650. e.g. for a <code>yuv420p</code> frame, the values are <code>1,1</code> for
  18651. the luma plane and <code>0.5,0.5</code> for the chroma planes.
  18652. </p>
  18653. </dd>
  18654. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  18655. <dd><p>Time of the current frame, expressed in seconds.
  18656. </p>
  18657. </dd>
  18658. <dt>&lsquo;<samp>TOP, A</samp>&rsquo;</dt>
  18659. <dd><p>Value of pixel component at current location for first video frame (top layer).
  18660. </p>
  18661. </dd>
  18662. <dt>&lsquo;<samp>BOTTOM, B</samp>&rsquo;</dt>
  18663. <dd><p>Value of pixel component at current location for second video frame (bottom layer).
  18664. </p></dd>
  18665. </dl>
  18666. </dd>
  18667. </dl>
  18668. <p>The <code>blend</code> filter also supports the <a href="#framesync">framesync</a> options.
  18669. </p>
  18670. <a name="Examples-61"></a>
  18671. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-61">30.13.1 Examples</a></h3>
  18672. <ul>
  18673. <li>
  18674. Apply transition from bottom layer to top layer in first 10 seconds:
  18675. <div class="example">
  18676. <pre class="example">blend=all_expr='A*(if(gte(T,10),1,T/10))+B*(1-(if(gte(T,10),1,T/10)))'
  18677. </pre></div>
  18678. </li><li>
  18679. Apply linear horizontal transition from top layer to bottom layer:
  18680. <div class="example">
  18681. <pre class="example">blend=all_expr='A*(X/W)+B*(1-X/W)'
  18682. </pre></div>
  18683. </li><li>
  18684. Apply 1x1 checkerboard effect:
  18685. <div class="example">
  18686. <pre class="example">blend=all_expr='if(eq(mod(X,2),mod(Y,2)),A,B)'
  18687. </pre></div>
  18688. </li><li>
  18689. Apply uncover left effect:
  18690. <div class="example">
  18691. <pre class="example">blend=all_expr='if(gte(N*SW+X,W),A,B)'
  18692. </pre></div>
  18693. </li><li>
  18694. Apply uncover down effect:
  18695. <div class="example">
  18696. <pre class="example">blend=all_expr='if(gte(Y-N*SH,0),A,B)'
  18697. </pre></div>
  18698. </li><li>
  18699. Apply uncover up-left effect:
  18700. <div class="example">
  18701. <pre class="example">blend=all_expr='if(gte(T*SH*40+Y,H)*gte((T*40*SW+X)*W/H,W),A,B)'
  18702. </pre></div>
  18703. </li><li>
  18704. Split diagonally video and shows top and bottom layer on each side:
  18705. <div class="example">
  18706. <pre class="example">blend=all_expr='if(gt(X,Y*(W/H)),A,B)'
  18707. </pre></div>
  18708. </li><li>
  18709. Display differences between the current and the previous frame:
  18710. <div class="example">
  18711. <pre class="example">tblend=all_mode=grainextract
  18712. </pre></div>
  18713. </li></ul>
  18714. <a name="bm3d"></a>
  18715. <h2 class="section"><a href="ffplay-all.html#toc-bm3d">30.14 bm3d</a></h2>
  18716. <p>Denoise frames using Block-Matching 3D algorithm.
  18717. </p>
  18718. <p>The filter accepts the following options.
  18719. </p>
  18720. <dl compact="compact">
  18721. <dt>&lsquo;<samp>sigma</samp>&rsquo;</dt>
  18722. <dd><p>Set denoising strength. Default value is 1.
  18723. Allowed range is from 0 to 999.9.
  18724. The denoising algorithm is very sensitive to sigma, so adjust it
  18725. according to the source.
  18726. </p>
  18727. </dd>
  18728. <dt>&lsquo;<samp>block</samp>&rsquo;</dt>
  18729. <dd><p>Set local patch size. This sets dimensions in 2D.
  18730. </p>
  18731. </dd>
  18732. <dt>&lsquo;<samp>bstep</samp>&rsquo;</dt>
  18733. <dd><p>Set sliding step for processing blocks. Default value is 4.
  18734. Allowed range is from 1 to 64.
  18735. Smaller values allows processing more reference blocks and is slower.
  18736. </p>
  18737. </dd>
  18738. <dt>&lsquo;<samp>group</samp>&rsquo;</dt>
  18739. <dd><p>Set maximal number of similar blocks for 3rd dimension. Default value is 1.
  18740. When set to 1, no block matching is done. Larger values allows more blocks
  18741. in single group.
  18742. Allowed range is from 1 to 256.
  18743. </p>
  18744. </dd>
  18745. <dt>&lsquo;<samp>range</samp>&rsquo;</dt>
  18746. <dd><p>Set radius for search block matching. Default is 9.
  18747. Allowed range is from 1 to INT32_MAX.
  18748. </p>
  18749. </dd>
  18750. <dt>&lsquo;<samp>mstep</samp>&rsquo;</dt>
  18751. <dd><p>Set step between two search locations for block matching. Default is 1.
  18752. Allowed range is from 1 to 64. Smaller is slower.
  18753. </p>
  18754. </dd>
  18755. <dt>&lsquo;<samp>thmse</samp>&rsquo;</dt>
  18756. <dd><p>Set threshold of mean square error for block matching. Valid range is 0 to
  18757. INT32_MAX.
  18758. </p>
  18759. </dd>
  18760. <dt>&lsquo;<samp>hdthr</samp>&rsquo;</dt>
  18761. <dd><p>Set thresholding parameter for hard thresholding in 3D transformed domain.
  18762. Larger values results in stronger hard-thresholding filtering in frequency
  18763. domain.
  18764. </p>
  18765. </dd>
  18766. <dt>&lsquo;<samp>estim</samp>&rsquo;</dt>
  18767. <dd><p>Set filtering estimation mode. Can be <code>basic</code> or <code>final</code>.
  18768. Default is <code>basic</code>.
  18769. </p>
  18770. </dd>
  18771. <dt>&lsquo;<samp>ref</samp>&rsquo;</dt>
  18772. <dd><p>If enabled, filter will use 2nd stream for block matching.
  18773. Default is disabled for <code>basic</code> value of <var>estim</var> option,
  18774. and always enabled if value of <var>estim</var> is <code>final</code>.
  18775. </p>
  18776. </dd>
  18777. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  18778. <dd><p>Set planes to filter. Default is all available except alpha.
  18779. </p></dd>
  18780. </dl>
  18781. <a name="Examples-37"></a>
  18782. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-37">30.14.1 Examples</a></h3>
  18783. <ul>
  18784. <li>
  18785. Basic filtering with bm3d:
  18786. <div class="example">
  18787. <pre class="example">bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic
  18788. </pre></div>
  18789. </li><li>
  18790. Same as above, but filtering only luma:
  18791. <div class="example">
  18792. <pre class="example">bm3d=sigma=3:block=4:bstep=2:group=1:estim=basic:planes=1
  18793. </pre></div>
  18794. </li><li>
  18795. Same as above, but with both estimation modes:
  18796. <div class="example">
  18797. <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
  18798. </pre></div>
  18799. </li><li>
  18800. Same as above, but prefilter with <a href="#nlmeans">nlmeans</a> filter instead:
  18801. <div class="example">
  18802. <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
  18803. </pre></div>
  18804. </li></ul>
  18805. <a name="boxblur"></a>
  18806. <h2 class="section"><a href="ffplay-all.html#toc-boxblur">30.15 boxblur</a></h2>
  18807. <p>Apply a boxblur algorithm to the input video.
  18808. </p>
  18809. <p>It accepts the following parameters:
  18810. </p>
  18811. <dl compact="compact">
  18812. <dt>&lsquo;<samp>luma_radius, lr</samp>&rsquo;</dt>
  18813. <dt>&lsquo;<samp>luma_power, lp</samp>&rsquo;</dt>
  18814. <dt>&lsquo;<samp>chroma_radius, cr</samp>&rsquo;</dt>
  18815. <dt>&lsquo;<samp>chroma_power, cp</samp>&rsquo;</dt>
  18816. <dt>&lsquo;<samp>alpha_radius, ar</samp>&rsquo;</dt>
  18817. <dt>&lsquo;<samp>alpha_power, ap</samp>&rsquo;</dt>
  18818. </dl>
  18819. <p>A description of the accepted options follows.
  18820. </p>
  18821. <dl compact="compact">
  18822. <dt>&lsquo;<samp>luma_radius, lr</samp>&rsquo;</dt>
  18823. <dt>&lsquo;<samp>chroma_radius, cr</samp>&rsquo;</dt>
  18824. <dt>&lsquo;<samp>alpha_radius, ar</samp>&rsquo;</dt>
  18825. <dd><p>Set an expression for the box radius in pixels used for blurring the
  18826. corresponding input plane.
  18827. </p>
  18828. <p>The radius value must be a non-negative number, and must not be
  18829. greater than the value of the expression <code>min(w,h)/2</code> for the
  18830. luma and alpha planes, and of <code>min(cw,ch)/2</code> for the chroma
  18831. planes.
  18832. </p>
  18833. <p>Default value for &lsquo;<samp>luma_radius</samp>&rsquo; is &quot;2&quot;. If not specified,
  18834. &lsquo;<samp>chroma_radius</samp>&rsquo; and &lsquo;<samp>alpha_radius</samp>&rsquo; default to the
  18835. corresponding value set for &lsquo;<samp>luma_radius</samp>&rsquo;.
  18836. </p>
  18837. <p>The expressions can contain the following constants:
  18838. </p><dl compact="compact">
  18839. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  18840. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  18841. <dd><p>The input width and height in pixels.
  18842. </p>
  18843. </dd>
  18844. <dt>&lsquo;<samp>cw</samp>&rsquo;</dt>
  18845. <dt>&lsquo;<samp>ch</samp>&rsquo;</dt>
  18846. <dd><p>The input chroma image width and height in pixels.
  18847. </p>
  18848. </dd>
  18849. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  18850. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  18851. <dd><p>The horizontal and vertical chroma subsample values. For example, for the
  18852. pixel format &quot;yuv422p&quot;, <var>hsub</var> is 2 and <var>vsub</var> is 1.
  18853. </p></dd>
  18854. </dl>
  18855. </dd>
  18856. <dt>&lsquo;<samp>luma_power, lp</samp>&rsquo;</dt>
  18857. <dt>&lsquo;<samp>chroma_power, cp</samp>&rsquo;</dt>
  18858. <dt>&lsquo;<samp>alpha_power, ap</samp>&rsquo;</dt>
  18859. <dd><p>Specify how many times the boxblur filter is applied to the
  18860. corresponding plane.
  18861. </p>
  18862. <p>Default value for &lsquo;<samp>luma_power</samp>&rsquo; is 2. If not specified,
  18863. &lsquo;<samp>chroma_power</samp>&rsquo; and &lsquo;<samp>alpha_power</samp>&rsquo; default to the
  18864. corresponding value set for &lsquo;<samp>luma_power</samp>&rsquo;.
  18865. </p>
  18866. <p>A value of 0 will disable the effect.
  18867. </p></dd>
  18868. </dl>
  18869. <a name="Examples-18"></a>
  18870. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-18">30.15.1 Examples</a></h3>
  18871. <ul>
  18872. <li>
  18873. Apply a boxblur filter with the luma, chroma, and alpha radii
  18874. set to 2:
  18875. <div class="example">
  18876. <pre class="example">boxblur=luma_radius=2:luma_power=1
  18877. boxblur=2:1
  18878. </pre></div>
  18879. </li><li>
  18880. Set the luma radius to 2, and alpha and chroma radius to 0:
  18881. <div class="example">
  18882. <pre class="example">boxblur=2:1:cr=0:ar=0
  18883. </pre></div>
  18884. </li><li>
  18885. Set the luma and chroma radii to a fraction of the video dimension:
  18886. <div class="example">
  18887. <pre class="example">boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1
  18888. </pre></div>
  18889. </li></ul>
  18890. <a name="bwdif"></a>
  18891. <h2 class="section"><a href="ffplay-all.html#toc-bwdif">30.16 bwdif</a></h2>
  18892. <p>Deinterlace the input video (&quot;bwdif&quot; stands for &quot;Bob Weaver
  18893. Deinterlacing Filter&quot;).
  18894. </p>
  18895. <p>Motion adaptive deinterlacing based on yadif with the use of w3fdif and cubic
  18896. interpolation algorithms.
  18897. It accepts the following parameters:
  18898. </p>
  18899. <dl compact="compact">
  18900. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  18901. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  18902. </p>
  18903. <dl compact="compact">
  18904. <dt>&lsquo;<samp>0, send_frame</samp>&rsquo;</dt>
  18905. <dd><p>Output one frame for each frame.
  18906. </p></dd>
  18907. <dt>&lsquo;<samp>1, send_field</samp>&rsquo;</dt>
  18908. <dd><p>Output one frame for each field.
  18909. </p></dd>
  18910. </dl>
  18911. <p>The default value is <code>send_field</code>.
  18912. </p>
  18913. </dd>
  18914. <dt>&lsquo;<samp>parity</samp>&rsquo;</dt>
  18915. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  18916. of the following values:
  18917. </p>
  18918. <dl compact="compact">
  18919. <dt>&lsquo;<samp>0, tff</samp>&rsquo;</dt>
  18920. <dd><p>Assume the top field is first.
  18921. </p></dd>
  18922. <dt>&lsquo;<samp>1, bff</samp>&rsquo;</dt>
  18923. <dd><p>Assume the bottom field is first.
  18924. </p></dd>
  18925. <dt>&lsquo;<samp>-1, auto</samp>&rsquo;</dt>
  18926. <dd><p>Enable automatic detection of field parity.
  18927. </p></dd>
  18928. </dl>
  18929. <p>The default value is <code>auto</code>.
  18930. If the interlacing is unknown or the decoder does not export this information,
  18931. top field first will be assumed.
  18932. </p>
  18933. </dd>
  18934. <dt>&lsquo;<samp>deint</samp>&rsquo;</dt>
  18935. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  18936. values:
  18937. </p>
  18938. <dl compact="compact">
  18939. <dt>&lsquo;<samp>0, all</samp>&rsquo;</dt>
  18940. <dd><p>Deinterlace all frames.
  18941. </p></dd>
  18942. <dt>&lsquo;<samp>1, interlaced</samp>&rsquo;</dt>
  18943. <dd><p>Only deinterlace frames marked as interlaced.
  18944. </p></dd>
  18945. </dl>
  18946. <p>The default value is <code>all</code>.
  18947. </p></dd>
  18948. </dl>
  18949. <a name="cas"></a>
  18950. <h2 class="section"><a href="ffplay-all.html#toc-cas">30.17 cas</a></h2>
  18951. <p>Apply Contrast Adaptive Sharpen filter to video stream.
  18952. </p>
  18953. <p>The filter accepts the following options:
  18954. </p>
  18955. <dl compact="compact">
  18956. <dt>&lsquo;<samp>strength</samp>&rsquo;</dt>
  18957. <dd><p>Set the sharpening strength. Default value is 0.
  18958. </p>
  18959. </dd>
  18960. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  18961. <dd><p>Set planes to filter. Default value is to filter all
  18962. planes except alpha plane.
  18963. </p></dd>
  18964. </dl>
  18965. <a name="chromahold"></a>
  18966. <h2 class="section"><a href="ffplay-all.html#toc-chromahold">30.18 chromahold</a></h2>
  18967. <p>Remove all color information for all colors except for certain one.
  18968. </p>
  18969. <p>The filter accepts the following options:
  18970. </p>
  18971. <dl compact="compact">
  18972. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  18973. <dd><p>The color which will not be replaced with neutral chroma.
  18974. </p>
  18975. </dd>
  18976. <dt>&lsquo;<samp>similarity</samp>&rsquo;</dt>
  18977. <dd><p>Similarity percentage with the above color.
  18978. 0.01 matches only the exact key color, while 1.0 matches everything.
  18979. </p>
  18980. </dd>
  18981. <dt>&lsquo;<samp>blend</samp>&rsquo;</dt>
  18982. <dd><p>Blend percentage.
  18983. 0.0 makes pixels either fully gray, or not gray at all.
  18984. Higher values result in more preserved color.
  18985. </p>
  18986. </dd>
  18987. <dt>&lsquo;<samp>yuv</samp>&rsquo;</dt>
  18988. <dd><p>Signals that the color passed is already in YUV instead of RGB.
  18989. </p>
  18990. <p>Literal colors like &quot;green&quot; or &quot;red&quot; don&rsquo;t make sense with this enabled anymore.
  18991. This can be used to pass exact YUV values as hexadecimal numbers.
  18992. </p></dd>
  18993. </dl>
  18994. <a name="Commands-67"></a>
  18995. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-67">30.18.1 Commands</a></h3>
  18996. <p>This filter supports same <a href="#commands">commands</a> as options.
  18997. The command accepts the same syntax of the corresponding option.
  18998. </p>
  18999. <p>If the specified expression is not valid, it is kept at its current
  19000. value.
  19001. </p>
  19002. <a name="chromakey"></a>
  19003. <h2 class="section"><a href="ffplay-all.html#toc-chromakey">30.19 chromakey</a></h2>
  19004. <p>YUV colorspace color/chroma keying.
  19005. </p>
  19006. <p>The filter accepts the following options:
  19007. </p>
  19008. <dl compact="compact">
  19009. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  19010. <dd><p>The color which will be replaced with transparency.
  19011. </p>
  19012. </dd>
  19013. <dt>&lsquo;<samp>similarity</samp>&rsquo;</dt>
  19014. <dd><p>Similarity percentage with the key color.
  19015. </p>
  19016. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  19017. </p>
  19018. </dd>
  19019. <dt>&lsquo;<samp>blend</samp>&rsquo;</dt>
  19020. <dd><p>Blend percentage.
  19021. </p>
  19022. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  19023. </p>
  19024. <p>Higher values result in semi-transparent pixels, with a higher transparency
  19025. the more similar the pixels color is to the key color.
  19026. </p>
  19027. </dd>
  19028. <dt>&lsquo;<samp>yuv</samp>&rsquo;</dt>
  19029. <dd><p>Signals that the color passed is already in YUV instead of RGB.
  19030. </p>
  19031. <p>Literal colors like &quot;green&quot; or &quot;red&quot; don&rsquo;t make sense with this enabled anymore.
  19032. This can be used to pass exact YUV values as hexadecimal numbers.
  19033. </p></dd>
  19034. </dl>
  19035. <a name="Commands-10"></a>
  19036. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-10">30.19.1 Commands</a></h3>
  19037. <p>This filter supports same <a href="#commands">commands</a> as options.
  19038. The command accepts the same syntax of the corresponding option.
  19039. </p>
  19040. <p>If the specified expression is not valid, it is kept at its current
  19041. value.
  19042. </p>
  19043. <a name="Examples-108"></a>
  19044. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-108">30.19.2 Examples</a></h3>
  19045. <ul>
  19046. <li>
  19047. Make every green pixel in the input image transparent:
  19048. <div class="example">
  19049. <pre class="example">ffmpeg -i input.png -vf chromakey=green out.png
  19050. </pre></div>
  19051. </li><li>
  19052. Overlay a greenscreen-video on top of a static black background.
  19053. <div class="example">
  19054. <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
  19055. </pre></div>
  19056. </li></ul>
  19057. <a name="chromashift"></a>
  19058. <h2 class="section"><a href="ffplay-all.html#toc-chromashift">30.20 chromashift</a></h2>
  19059. <p>Shift chroma pixels horizontally and/or vertically.
  19060. </p>
  19061. <p>The filter accepts the following options:
  19062. </p><dl compact="compact">
  19063. <dt>&lsquo;<samp>cbh</samp>&rsquo;</dt>
  19064. <dd><p>Set amount to shift chroma-blue horizontally.
  19065. </p></dd>
  19066. <dt>&lsquo;<samp>cbv</samp>&rsquo;</dt>
  19067. <dd><p>Set amount to shift chroma-blue vertically.
  19068. </p></dd>
  19069. <dt>&lsquo;<samp>crh</samp>&rsquo;</dt>
  19070. <dd><p>Set amount to shift chroma-red horizontally.
  19071. </p></dd>
  19072. <dt>&lsquo;<samp>crv</samp>&rsquo;</dt>
  19073. <dd><p>Set amount to shift chroma-red vertically.
  19074. </p></dd>
  19075. <dt>&lsquo;<samp>edge</samp>&rsquo;</dt>
  19076. <dd><p>Set edge mode, can be <var>smear</var>, default, or <var>warp</var>.
  19077. </p></dd>
  19078. </dl>
  19079. <a name="Commands-2"></a>
  19080. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-2">30.20.1 Commands</a></h3>
  19081. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  19082. </p>
  19083. <a name="ciescope"></a>
  19084. <h2 class="section"><a href="ffplay-all.html#toc-ciescope">30.21 ciescope</a></h2>
  19085. <p>Display CIE color diagram with pixels overlaid onto it.
  19086. </p>
  19087. <p>The filter accepts the following options:
  19088. </p>
  19089. <dl compact="compact">
  19090. <dt>&lsquo;<samp>system</samp>&rsquo;</dt>
  19091. <dd><p>Set color system.
  19092. </p>
  19093. <dl compact="compact">
  19094. <dt>&lsquo;<samp>ntsc, 470m</samp>&rsquo;</dt>
  19095. <dt>&lsquo;<samp>ebu, 470bg</samp>&rsquo;</dt>
  19096. <dt>&lsquo;<samp>smpte</samp>&rsquo;</dt>
  19097. <dt>&lsquo;<samp>240m</samp>&rsquo;</dt>
  19098. <dt>&lsquo;<samp>apple</samp>&rsquo;</dt>
  19099. <dt>&lsquo;<samp>widergb</samp>&rsquo;</dt>
  19100. <dt>&lsquo;<samp>cie1931</samp>&rsquo;</dt>
  19101. <dt>&lsquo;<samp>rec709, hdtv</samp>&rsquo;</dt>
  19102. <dt>&lsquo;<samp>uhdtv, rec2020</samp>&rsquo;</dt>
  19103. <dt>&lsquo;<samp>dcip3</samp>&rsquo;</dt>
  19104. </dl>
  19105. </dd>
  19106. <dt>&lsquo;<samp>cie</samp>&rsquo;</dt>
  19107. <dd><p>Set CIE system.
  19108. </p>
  19109. <dl compact="compact">
  19110. <dt>&lsquo;<samp>xyy</samp>&rsquo;</dt>
  19111. <dt>&lsquo;<samp>ucs</samp>&rsquo;</dt>
  19112. <dt>&lsquo;<samp>luv</samp>&rsquo;</dt>
  19113. </dl>
  19114. </dd>
  19115. <dt>&lsquo;<samp>gamuts</samp>&rsquo;</dt>
  19116. <dd><p>Set what gamuts to draw.
  19117. </p>
  19118. <p>See <code>system</code> option for available values.
  19119. </p>
  19120. </dd>
  19121. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  19122. <dd><p>Set ciescope size, by default set to 512.
  19123. </p>
  19124. </dd>
  19125. <dt>&lsquo;<samp>intensity, i</samp>&rsquo;</dt>
  19126. <dd><p>Set intensity used to map input pixel values to CIE diagram.
  19127. </p>
  19128. </dd>
  19129. <dt>&lsquo;<samp>contrast</samp>&rsquo;</dt>
  19130. <dd><p>Set contrast used to draw tongue colors that are out of active color system gamut.
  19131. </p>
  19132. </dd>
  19133. <dt>&lsquo;<samp>corrgamma</samp>&rsquo;</dt>
  19134. <dd><p>Correct gamma displayed on scope, by default enabled.
  19135. </p>
  19136. </dd>
  19137. <dt>&lsquo;<samp>showwhite</samp>&rsquo;</dt>
  19138. <dd><p>Show white point on CIE diagram, by default disabled.
  19139. </p>
  19140. </dd>
  19141. <dt>&lsquo;<samp>gamma</samp>&rsquo;</dt>
  19142. <dd><p>Set input gamma. Used only with XYZ input color space.
  19143. </p></dd>
  19144. </dl>
  19145. <a name="codecview"></a>
  19146. <h2 class="section"><a href="ffplay-all.html#toc-codecview">30.22 codecview</a></h2>
  19147. <p>Visualize information exported by some codecs.
  19148. </p>
  19149. <p>Some codecs can export information through frames using side-data or other
  19150. means. For example, some MPEG based codecs export motion vectors through the
  19151. <var>export_mvs</var> flag in the codec &lsquo;<samp>flags2</samp>&rsquo; option.
  19152. </p>
  19153. <p>The filter accepts the following option:
  19154. </p>
  19155. <dl compact="compact">
  19156. <dt>&lsquo;<samp>mv</samp>&rsquo;</dt>
  19157. <dd><p>Set motion vectors to visualize.
  19158. </p>
  19159. <p>Available flags for <var>mv</var> are:
  19160. </p>
  19161. <dl compact="compact">
  19162. <dt>&lsquo;<samp>pf</samp>&rsquo;</dt>
  19163. <dd><p>forward predicted MVs of P-frames
  19164. </p></dd>
  19165. <dt>&lsquo;<samp>bf</samp>&rsquo;</dt>
  19166. <dd><p>forward predicted MVs of B-frames
  19167. </p></dd>
  19168. <dt>&lsquo;<samp>bb</samp>&rsquo;</dt>
  19169. <dd><p>backward predicted MVs of B-frames
  19170. </p></dd>
  19171. </dl>
  19172. </dd>
  19173. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  19174. <dd><p>Display quantization parameters using the chroma planes.
  19175. </p>
  19176. </dd>
  19177. <dt>&lsquo;<samp>mv_type, mvt</samp>&rsquo;</dt>
  19178. <dd><p>Set motion vectors type to visualize. Includes MVs from all frames unless specified by <var>frame_type</var> option.
  19179. </p>
  19180. <p>Available flags for <var>mv_type</var> are:
  19181. </p>
  19182. <dl compact="compact">
  19183. <dt>&lsquo;<samp>fp</samp>&rsquo;</dt>
  19184. <dd><p>forward predicted MVs
  19185. </p></dd>
  19186. <dt>&lsquo;<samp>bp</samp>&rsquo;</dt>
  19187. <dd><p>backward predicted MVs
  19188. </p></dd>
  19189. </dl>
  19190. </dd>
  19191. <dt>&lsquo;<samp>frame_type, ft</samp>&rsquo;</dt>
  19192. <dd><p>Set frame type to visualize motion vectors of.
  19193. </p>
  19194. <p>Available flags for <var>frame_type</var> are:
  19195. </p>
  19196. <dl compact="compact">
  19197. <dt>&lsquo;<samp>if</samp>&rsquo;</dt>
  19198. <dd><p>intra-coded frames (I-frames)
  19199. </p></dd>
  19200. <dt>&lsquo;<samp>pf</samp>&rsquo;</dt>
  19201. <dd><p>predicted frames (P-frames)
  19202. </p></dd>
  19203. <dt>&lsquo;<samp>bf</samp>&rsquo;</dt>
  19204. <dd><p>bi-directionally predicted frames (B-frames)
  19205. </p></dd>
  19206. </dl>
  19207. </dd>
  19208. </dl>
  19209. <a name="Examples-81"></a>
  19210. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-81">30.22.1 Examples</a></h3>
  19211. <ul>
  19212. <li>
  19213. Visualize forward predicted MVs of all frames using <code>ffplay</code>:
  19214. <div class="example">
  19215. <pre class="example">ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv_type=fp
  19216. </pre></div>
  19217. </li><li>
  19218. Visualize multi-directionals MVs of P and B-Frames using <code>ffplay</code>:
  19219. <div class="example">
  19220. <pre class="example">ffplay -flags2 +export_mvs input.mp4 -vf codecview=mv=pf+bf+bb
  19221. </pre></div>
  19222. </li></ul>
  19223. <a name="colorbalance"></a>
  19224. <h2 class="section"><a href="ffplay-all.html#toc-colorbalance">30.23 colorbalance</a></h2>
  19225. <p>Modify intensity of primary colors (red, green and blue) of input frames.
  19226. </p>
  19227. <p>The filter allows an input frame to be adjusted in the shadows, midtones or highlights
  19228. regions for the red-cyan, green-magenta or blue-yellow balance.
  19229. </p>
  19230. <p>A positive adjustment value shifts the balance towards the primary color, a negative
  19231. value towards the complementary color.
  19232. </p>
  19233. <p>The filter accepts the following options:
  19234. </p>
  19235. <dl compact="compact">
  19236. <dt>&lsquo;<samp>rs</samp>&rsquo;</dt>
  19237. <dt>&lsquo;<samp>gs</samp>&rsquo;</dt>
  19238. <dt>&lsquo;<samp>bs</samp>&rsquo;</dt>
  19239. <dd><p>Adjust red, green and blue shadows (darkest pixels).
  19240. </p>
  19241. </dd>
  19242. <dt>&lsquo;<samp>rm</samp>&rsquo;</dt>
  19243. <dt>&lsquo;<samp>gm</samp>&rsquo;</dt>
  19244. <dt>&lsquo;<samp>bm</samp>&rsquo;</dt>
  19245. <dd><p>Adjust red, green and blue midtones (medium pixels).
  19246. </p>
  19247. </dd>
  19248. <dt>&lsquo;<samp>rh</samp>&rsquo;</dt>
  19249. <dt>&lsquo;<samp>gh</samp>&rsquo;</dt>
  19250. <dt>&lsquo;<samp>bh</samp>&rsquo;</dt>
  19251. <dd><p>Adjust red, green and blue highlights (brightest pixels).
  19252. </p>
  19253. <p>Allowed ranges for options are <code>[-1.0, 1.0]</code>. Defaults are <code>0</code>.
  19254. </p>
  19255. </dd>
  19256. <dt>&lsquo;<samp>pl</samp>&rsquo;</dt>
  19257. <dd><p>Preserve lightness when changing color balance. Default is disabled.
  19258. </p></dd>
  19259. </dl>
  19260. <a name="Examples-47"></a>
  19261. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-47">30.23.1 Examples</a></h3>
  19262. <ul>
  19263. <li>
  19264. Add red color cast to shadows:
  19265. <div class="example">
  19266. <pre class="example">colorbalance=rs=.3
  19267. </pre></div>
  19268. </li></ul>
  19269. <a name="Commands-18"></a>
  19270. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-18">30.23.2 Commands</a></h3>
  19271. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  19272. </p>
  19273. <a name="colorchannelmixer"></a>
  19274. <h2 class="section"><a href="ffplay-all.html#toc-colorchannelmixer">30.24 colorchannelmixer</a></h2>
  19275. <p>Adjust video input frames by re-mixing color channels.
  19276. </p>
  19277. <p>This filter modifies a color channel by adding the values associated to
  19278. the other channels of the same pixels. For example if the value to
  19279. modify is red, the output value will be:
  19280. </p><div class="example">
  19281. <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>
  19282. </pre></div>
  19283. <p>The filter accepts the following options:
  19284. </p>
  19285. <dl compact="compact">
  19286. <dt>&lsquo;<samp>rr</samp>&rsquo;</dt>
  19287. <dt>&lsquo;<samp>rg</samp>&rsquo;</dt>
  19288. <dt>&lsquo;<samp>rb</samp>&rsquo;</dt>
  19289. <dt>&lsquo;<samp>ra</samp>&rsquo;</dt>
  19290. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output red channel.
  19291. Default is <code>1</code> for <var>rr</var>, and <code>0</code> for <var>rg</var>, <var>rb</var> and <var>ra</var>.
  19292. </p>
  19293. </dd>
  19294. <dt>&lsquo;<samp>gr</samp>&rsquo;</dt>
  19295. <dt>&lsquo;<samp>gg</samp>&rsquo;</dt>
  19296. <dt>&lsquo;<samp>gb</samp>&rsquo;</dt>
  19297. <dt>&lsquo;<samp>ga</samp>&rsquo;</dt>
  19298. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output green channel.
  19299. Default is <code>1</code> for <var>gg</var>, and <code>0</code> for <var>gr</var>, <var>gb</var> and <var>ga</var>.
  19300. </p>
  19301. </dd>
  19302. <dt>&lsquo;<samp>br</samp>&rsquo;</dt>
  19303. <dt>&lsquo;<samp>bg</samp>&rsquo;</dt>
  19304. <dt>&lsquo;<samp>bb</samp>&rsquo;</dt>
  19305. <dt>&lsquo;<samp>ba</samp>&rsquo;</dt>
  19306. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output blue channel.
  19307. Default is <code>1</code> for <var>bb</var>, and <code>0</code> for <var>br</var>, <var>bg</var> and <var>ba</var>.
  19308. </p>
  19309. </dd>
  19310. <dt>&lsquo;<samp>ar</samp>&rsquo;</dt>
  19311. <dt>&lsquo;<samp>ag</samp>&rsquo;</dt>
  19312. <dt>&lsquo;<samp>ab</samp>&rsquo;</dt>
  19313. <dt>&lsquo;<samp>aa</samp>&rsquo;</dt>
  19314. <dd><p>Adjust contribution of input red, green, blue and alpha channels for output alpha channel.
  19315. Default is <code>1</code> for <var>aa</var>, and <code>0</code> for <var>ar</var>, <var>ag</var> and <var>ab</var>.
  19316. </p>
  19317. <p>Allowed ranges for options are <code>[-2.0, 2.0]</code>.
  19318. </p></dd>
  19319. </dl>
  19320. <a name="Examples-158"></a>
  19321. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-158">30.24.1 Examples</a></h3>
  19322. <ul>
  19323. <li>
  19324. Convert source to grayscale:
  19325. <div class="example">
  19326. <pre class="example">colorchannelmixer=.3:.4:.3:0:.3:.4:.3:0:.3:.4:.3
  19327. </pre></div>
  19328. </li><li>
  19329. Simulate sepia tones:
  19330. <div class="example">
  19331. <pre class="example">colorchannelmixer=.393:.769:.189:0:.349:.686:.168:0:.272:.534:.131
  19332. </pre></div>
  19333. </li></ul>
  19334. <a name="Commands-17"></a>
  19335. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-17">30.24.2 Commands</a></h3>
  19336. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  19337. </p>
  19338. <a name="colorkey"></a>
  19339. <h2 class="section"><a href="ffplay-all.html#toc-colorkey">30.25 colorkey</a></h2>
  19340. <p>RGB colorspace color keying.
  19341. </p>
  19342. <p>The filter accepts the following options:
  19343. </p>
  19344. <dl compact="compact">
  19345. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  19346. <dd><p>The color which will be replaced with transparency.
  19347. </p>
  19348. </dd>
  19349. <dt>&lsquo;<samp>similarity</samp>&rsquo;</dt>
  19350. <dd><p>Similarity percentage with the key color.
  19351. </p>
  19352. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  19353. </p>
  19354. </dd>
  19355. <dt>&lsquo;<samp>blend</samp>&rsquo;</dt>
  19356. <dd><p>Blend percentage.
  19357. </p>
  19358. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  19359. </p>
  19360. <p>Higher values result in semi-transparent pixels, with a higher transparency
  19361. the more similar the pixels color is to the key color.
  19362. </p></dd>
  19363. </dl>
  19364. <a name="Examples-118"></a>
  19365. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-118">30.25.1 Examples</a></h3>
  19366. <ul>
  19367. <li>
  19368. Make every green pixel in the input image transparent:
  19369. <div class="example">
  19370. <pre class="example">ffmpeg -i input.png -vf colorkey=green out.png
  19371. </pre></div>
  19372. </li><li>
  19373. Overlay a greenscreen-video on top of a static background image.
  19374. <div class="example">
  19375. <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
  19376. </pre></div>
  19377. </li></ul>
  19378. <a name="Commands-59"></a>
  19379. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-59">30.25.2 Commands</a></h3>
  19380. <p>This filter supports same <a href="#commands">commands</a> as options.
  19381. The command accepts the same syntax of the corresponding option.
  19382. </p>
  19383. <p>If the specified expression is not valid, it is kept at its current
  19384. value.
  19385. </p>
  19386. <a name="colorhold"></a>
  19387. <h2 class="section"><a href="ffplay-all.html#toc-colorhold">30.26 colorhold</a></h2>
  19388. <p>Remove all color information for all RGB colors except for certain one.
  19389. </p>
  19390. <p>The filter accepts the following options:
  19391. </p>
  19392. <dl compact="compact">
  19393. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  19394. <dd><p>The color which will not be replaced with neutral gray.
  19395. </p>
  19396. </dd>
  19397. <dt>&lsquo;<samp>similarity</samp>&rsquo;</dt>
  19398. <dd><p>Similarity percentage with the above color.
  19399. 0.01 matches only the exact key color, while 1.0 matches everything.
  19400. </p>
  19401. </dd>
  19402. <dt>&lsquo;<samp>blend</samp>&rsquo;</dt>
  19403. <dd><p>Blend percentage. 0.0 makes pixels fully gray.
  19404. Higher values result in more preserved color.
  19405. </p></dd>
  19406. </dl>
  19407. <a name="Commands-63"></a>
  19408. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-63">30.26.1 Commands</a></h3>
  19409. <p>This filter supports same <a href="#commands">commands</a> as options.
  19410. The command accepts the same syntax of the corresponding option.
  19411. </p>
  19412. <p>If the specified expression is not valid, it is kept at its current
  19413. value.
  19414. </p>
  19415. <a name="colorlevels"></a>
  19416. <h2 class="section"><a href="ffplay-all.html#toc-colorlevels">30.27 colorlevels</a></h2>
  19417. <p>Adjust video input frames using levels.
  19418. </p>
  19419. <p>The filter accepts the following options:
  19420. </p>
  19421. <dl compact="compact">
  19422. <dt>&lsquo;<samp>rimin</samp>&rsquo;</dt>
  19423. <dt>&lsquo;<samp>gimin</samp>&rsquo;</dt>
  19424. <dt>&lsquo;<samp>bimin</samp>&rsquo;</dt>
  19425. <dt>&lsquo;<samp>aimin</samp>&rsquo;</dt>
  19426. <dd><p>Adjust red, green, blue and alpha input black point.
  19427. Allowed ranges for options are <code>[-1.0, 1.0]</code>. Defaults are <code>0</code>.
  19428. </p>
  19429. </dd>
  19430. <dt>&lsquo;<samp>rimax</samp>&rsquo;</dt>
  19431. <dt>&lsquo;<samp>gimax</samp>&rsquo;</dt>
  19432. <dt>&lsquo;<samp>bimax</samp>&rsquo;</dt>
  19433. <dt>&lsquo;<samp>aimax</samp>&rsquo;</dt>
  19434. <dd><p>Adjust red, green, blue and alpha input white point.
  19435. Allowed ranges for options are <code>[-1.0, 1.0]</code>. Defaults are <code>1</code>.
  19436. </p>
  19437. <p>Input levels are used to lighten highlights (bright tones), darken shadows
  19438. (dark tones), change the balance of bright and dark tones.
  19439. </p>
  19440. </dd>
  19441. <dt>&lsquo;<samp>romin</samp>&rsquo;</dt>
  19442. <dt>&lsquo;<samp>gomin</samp>&rsquo;</dt>
  19443. <dt>&lsquo;<samp>bomin</samp>&rsquo;</dt>
  19444. <dt>&lsquo;<samp>aomin</samp>&rsquo;</dt>
  19445. <dd><p>Adjust red, green, blue and alpha output black point.
  19446. Allowed ranges for options are <code>[0, 1.0]</code>. Defaults are <code>0</code>.
  19447. </p>
  19448. </dd>
  19449. <dt>&lsquo;<samp>romax</samp>&rsquo;</dt>
  19450. <dt>&lsquo;<samp>gomax</samp>&rsquo;</dt>
  19451. <dt>&lsquo;<samp>bomax</samp>&rsquo;</dt>
  19452. <dt>&lsquo;<samp>aomax</samp>&rsquo;</dt>
  19453. <dd><p>Adjust red, green, blue and alpha output white point.
  19454. Allowed ranges for options are <code>[0, 1.0]</code>. Defaults are <code>1</code>.
  19455. </p>
  19456. <p>Output levels allows manual selection of a constrained output level range.
  19457. </p></dd>
  19458. </dl>
  19459. <a name="Examples-46"></a>
  19460. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-46">30.27.1 Examples</a></h3>
  19461. <ul>
  19462. <li>
  19463. Make video output darker:
  19464. <div class="example">
  19465. <pre class="example">colorlevels=rimin=0.058:gimin=0.058:bimin=0.058
  19466. </pre></div>
  19467. </li><li>
  19468. Increase contrast:
  19469. <div class="example">
  19470. <pre class="example">colorlevels=rimin=0.039:gimin=0.039:bimin=0.039:rimax=0.96:gimax=0.96:bimax=0.96
  19471. </pre></div>
  19472. </li><li>
  19473. Make video output lighter:
  19474. <div class="example">
  19475. <pre class="example">colorlevels=rimax=0.902:gimax=0.902:bimax=0.902
  19476. </pre></div>
  19477. </li><li>
  19478. Increase brightness:
  19479. <div class="example">
  19480. <pre class="example">colorlevels=romin=0.5:gomin=0.5:bomin=0.5
  19481. </pre></div>
  19482. </li></ul>
  19483. <a name="Commands-40"></a>
  19484. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-40">30.27.2 Commands</a></h3>
  19485. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  19486. </p>
  19487. <a name="colormatrix"></a>
  19488. <h2 class="section"><a href="ffplay-all.html#toc-colormatrix">30.28 colormatrix</a></h2>
  19489. <p>Convert color matrix.
  19490. </p>
  19491. <p>The filter accepts the following options:
  19492. </p>
  19493. <dl compact="compact">
  19494. <dt>&lsquo;<samp>src</samp>&rsquo;</dt>
  19495. <dt>&lsquo;<samp>dst</samp>&rsquo;</dt>
  19496. <dd><p>Specify the source and destination color matrix. Both values must be
  19497. specified.
  19498. </p>
  19499. <p>The accepted values are:
  19500. </p><dl compact="compact">
  19501. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  19502. <dd><p>BT.709
  19503. </p>
  19504. </dd>
  19505. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  19506. <dd><p>FCC
  19507. </p>
  19508. </dd>
  19509. <dt>&lsquo;<samp>bt601</samp>&rsquo;</dt>
  19510. <dd><p>BT.601
  19511. </p>
  19512. </dd>
  19513. <dt>&lsquo;<samp>bt470</samp>&rsquo;</dt>
  19514. <dd><p>BT.470
  19515. </p>
  19516. </dd>
  19517. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  19518. <dd><p>BT.470BG
  19519. </p>
  19520. </dd>
  19521. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  19522. <dd><p>SMPTE-170M
  19523. </p>
  19524. </dd>
  19525. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  19526. <dd><p>SMPTE-240M
  19527. </p>
  19528. </dd>
  19529. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  19530. <dd><p>BT.2020
  19531. </p></dd>
  19532. </dl>
  19533. </dd>
  19534. </dl>
  19535. <p>For example to convert from BT.601 to SMPTE-240M, use the command:
  19536. </p><div class="example">
  19537. <pre class="example">colormatrix=bt601:smpte240m
  19538. </pre></div>
  19539. <a name="colorspace"></a>
  19540. <h2 class="section"><a href="ffplay-all.html#toc-colorspace">30.29 colorspace</a></h2>
  19541. <p>Convert colorspace, transfer characteristics or color primaries.
  19542. Input video needs to have an even size.
  19543. </p>
  19544. <p>The filter accepts the following options:
  19545. </p>
  19546. <dl compact="compact">
  19547. <dd><p><a name="all"></a>
  19548. </p></dd>
  19549. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  19550. <dd><p>Specify all color properties at once.
  19551. </p>
  19552. <p>The accepted values are:
  19553. </p><dl compact="compact">
  19554. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  19555. <dd><p>BT.470M
  19556. </p>
  19557. </dd>
  19558. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  19559. <dd><p>BT.470BG
  19560. </p>
  19561. </dd>
  19562. <dt>&lsquo;<samp>bt601-6-525</samp>&rsquo;</dt>
  19563. <dd><p>BT.601-6 525
  19564. </p>
  19565. </dd>
  19566. <dt>&lsquo;<samp>bt601-6-625</samp>&rsquo;</dt>
  19567. <dd><p>BT.601-6 625
  19568. </p>
  19569. </dd>
  19570. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  19571. <dd><p>BT.709
  19572. </p>
  19573. </dd>
  19574. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  19575. <dd><p>SMPTE-170M
  19576. </p>
  19577. </dd>
  19578. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  19579. <dd><p>SMPTE-240M
  19580. </p>
  19581. </dd>
  19582. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  19583. <dd><p>BT.2020
  19584. </p>
  19585. </dd>
  19586. </dl>
  19587. <p><a name="space"></a>
  19588. </p></dd>
  19589. <dt>&lsquo;<samp>space</samp>&rsquo;</dt>
  19590. <dd><p>Specify output colorspace.
  19591. </p>
  19592. <p>The accepted values are:
  19593. </p><dl compact="compact">
  19594. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  19595. <dd><p>BT.709
  19596. </p>
  19597. </dd>
  19598. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  19599. <dd><p>FCC
  19600. </p>
  19601. </dd>
  19602. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  19603. <dd><p>BT.470BG or BT.601-6 625
  19604. </p>
  19605. </dd>
  19606. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  19607. <dd><p>SMPTE-170M or BT.601-6 525
  19608. </p>
  19609. </dd>
  19610. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  19611. <dd><p>SMPTE-240M
  19612. </p>
  19613. </dd>
  19614. <dt>&lsquo;<samp>ycgco</samp>&rsquo;</dt>
  19615. <dd><p>YCgCo
  19616. </p>
  19617. </dd>
  19618. <dt>&lsquo;<samp>bt2020ncl</samp>&rsquo;</dt>
  19619. <dd><p>BT.2020 with non-constant luminance
  19620. </p>
  19621. </dd>
  19622. </dl>
  19623. <p><a name="trc"></a>
  19624. </p></dd>
  19625. <dt>&lsquo;<samp>trc</samp>&rsquo;</dt>
  19626. <dd><p>Specify output transfer characteristics.
  19627. </p>
  19628. <p>The accepted values are:
  19629. </p><dl compact="compact">
  19630. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  19631. <dd><p>BT.709
  19632. </p>
  19633. </dd>
  19634. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  19635. <dd><p>BT.470M
  19636. </p>
  19637. </dd>
  19638. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  19639. <dd><p>BT.470BG
  19640. </p>
  19641. </dd>
  19642. <dt>&lsquo;<samp>gamma22</samp>&rsquo;</dt>
  19643. <dd><p>Constant gamma of 2.2
  19644. </p>
  19645. </dd>
  19646. <dt>&lsquo;<samp>gamma28</samp>&rsquo;</dt>
  19647. <dd><p>Constant gamma of 2.8
  19648. </p>
  19649. </dd>
  19650. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  19651. <dd><p>SMPTE-170M, BT.601-6 625 or BT.601-6 525
  19652. </p>
  19653. </dd>
  19654. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  19655. <dd><p>SMPTE-240M
  19656. </p>
  19657. </dd>
  19658. <dt>&lsquo;<samp>srgb</samp>&rsquo;</dt>
  19659. <dd><p>SRGB
  19660. </p>
  19661. </dd>
  19662. <dt>&lsquo;<samp>iec61966-2-1</samp>&rsquo;</dt>
  19663. <dd><p>iec61966-2-1
  19664. </p>
  19665. </dd>
  19666. <dt>&lsquo;<samp>iec61966-2-4</samp>&rsquo;</dt>
  19667. <dd><p>iec61966-2-4
  19668. </p>
  19669. </dd>
  19670. <dt>&lsquo;<samp>xvycc</samp>&rsquo;</dt>
  19671. <dd><p>xvycc
  19672. </p>
  19673. </dd>
  19674. <dt>&lsquo;<samp>bt2020-10</samp>&rsquo;</dt>
  19675. <dd><p>BT.2020 for 10-bits content
  19676. </p>
  19677. </dd>
  19678. <dt>&lsquo;<samp>bt2020-12</samp>&rsquo;</dt>
  19679. <dd><p>BT.2020 for 12-bits content
  19680. </p>
  19681. </dd>
  19682. </dl>
  19683. <p><a name="primaries"></a>
  19684. </p></dd>
  19685. <dt>&lsquo;<samp>primaries</samp>&rsquo;</dt>
  19686. <dd><p>Specify output color primaries.
  19687. </p>
  19688. <p>The accepted values are:
  19689. </p><dl compact="compact">
  19690. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  19691. <dd><p>BT.709
  19692. </p>
  19693. </dd>
  19694. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  19695. <dd><p>BT.470M
  19696. </p>
  19697. </dd>
  19698. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  19699. <dd><p>BT.470BG or BT.601-6 625
  19700. </p>
  19701. </dd>
  19702. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  19703. <dd><p>SMPTE-170M or BT.601-6 525
  19704. </p>
  19705. </dd>
  19706. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  19707. <dd><p>SMPTE-240M
  19708. </p>
  19709. </dd>
  19710. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  19711. <dd><p>film
  19712. </p>
  19713. </dd>
  19714. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  19715. <dd><p>SMPTE-431
  19716. </p>
  19717. </dd>
  19718. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  19719. <dd><p>SMPTE-432
  19720. </p>
  19721. </dd>
  19722. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  19723. <dd><p>BT.2020
  19724. </p>
  19725. </dd>
  19726. <dt>&lsquo;<samp>jedec-p22</samp>&rsquo;</dt>
  19727. <dd><p>JEDEC P22 phosphors
  19728. </p>
  19729. </dd>
  19730. </dl>
  19731. <p><a name="range"></a>
  19732. </p></dd>
  19733. <dt>&lsquo;<samp>range</samp>&rsquo;</dt>
  19734. <dd><p>Specify output color range.
  19735. </p>
  19736. <p>The accepted values are:
  19737. </p><dl compact="compact">
  19738. <dt>&lsquo;<samp>tv</samp>&rsquo;</dt>
  19739. <dd><p>TV (restricted) range
  19740. </p>
  19741. </dd>
  19742. <dt>&lsquo;<samp>mpeg</samp>&rsquo;</dt>
  19743. <dd><p>MPEG (restricted) range
  19744. </p>
  19745. </dd>
  19746. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  19747. <dd><p>PC (full) range
  19748. </p>
  19749. </dd>
  19750. <dt>&lsquo;<samp>jpeg</samp>&rsquo;</dt>
  19751. <dd><p>JPEG (full) range
  19752. </p>
  19753. </dd>
  19754. </dl>
  19755. </dd>
  19756. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  19757. <dd><p>Specify output color format.
  19758. </p>
  19759. <p>The accepted values are:
  19760. </p><dl compact="compact">
  19761. <dt>&lsquo;<samp>yuv420p</samp>&rsquo;</dt>
  19762. <dd><p>YUV 4:2:0 planar 8-bits
  19763. </p>
  19764. </dd>
  19765. <dt>&lsquo;<samp>yuv420p10</samp>&rsquo;</dt>
  19766. <dd><p>YUV 4:2:0 planar 10-bits
  19767. </p>
  19768. </dd>
  19769. <dt>&lsquo;<samp>yuv420p12</samp>&rsquo;</dt>
  19770. <dd><p>YUV 4:2:0 planar 12-bits
  19771. </p>
  19772. </dd>
  19773. <dt>&lsquo;<samp>yuv422p</samp>&rsquo;</dt>
  19774. <dd><p>YUV 4:2:2 planar 8-bits
  19775. </p>
  19776. </dd>
  19777. <dt>&lsquo;<samp>yuv422p10</samp>&rsquo;</dt>
  19778. <dd><p>YUV 4:2:2 planar 10-bits
  19779. </p>
  19780. </dd>
  19781. <dt>&lsquo;<samp>yuv422p12</samp>&rsquo;</dt>
  19782. <dd><p>YUV 4:2:2 planar 12-bits
  19783. </p>
  19784. </dd>
  19785. <dt>&lsquo;<samp>yuv444p</samp>&rsquo;</dt>
  19786. <dd><p>YUV 4:4:4 planar 8-bits
  19787. </p>
  19788. </dd>
  19789. <dt>&lsquo;<samp>yuv444p10</samp>&rsquo;</dt>
  19790. <dd><p>YUV 4:4:4 planar 10-bits
  19791. </p>
  19792. </dd>
  19793. <dt>&lsquo;<samp>yuv444p12</samp>&rsquo;</dt>
  19794. <dd><p>YUV 4:4:4 planar 12-bits
  19795. </p>
  19796. </dd>
  19797. </dl>
  19798. </dd>
  19799. <dt>&lsquo;<samp>fast</samp>&rsquo;</dt>
  19800. <dd><p>Do a fast conversion, which skips gamma/primary correction. This will take
  19801. significantly less CPU, but will be mathematically incorrect. To get output
  19802. compatible with that produced by the colormatrix filter, use fast=1.
  19803. </p>
  19804. </dd>
  19805. <dt>&lsquo;<samp>dither</samp>&rsquo;</dt>
  19806. <dd><p>Specify dithering mode.
  19807. </p>
  19808. <p>The accepted values are:
  19809. </p><dl compact="compact">
  19810. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  19811. <dd><p>No dithering
  19812. </p>
  19813. </dd>
  19814. <dt>&lsquo;<samp>fsb</samp>&rsquo;</dt>
  19815. <dd><p>Floyd-Steinberg dithering
  19816. </p></dd>
  19817. </dl>
  19818. </dd>
  19819. <dt>&lsquo;<samp>wpadapt</samp>&rsquo;</dt>
  19820. <dd><p>Whitepoint adaptation mode.
  19821. </p>
  19822. <p>The accepted values are:
  19823. </p><dl compact="compact">
  19824. <dt>&lsquo;<samp>bradford</samp>&rsquo;</dt>
  19825. <dd><p>Bradford whitepoint adaptation
  19826. </p>
  19827. </dd>
  19828. <dt>&lsquo;<samp>vonkries</samp>&rsquo;</dt>
  19829. <dd><p>von Kries whitepoint adaptation
  19830. </p>
  19831. </dd>
  19832. <dt>&lsquo;<samp>identity</samp>&rsquo;</dt>
  19833. <dd><p>identity whitepoint adaptation (i.e. no whitepoint adaptation)
  19834. </p></dd>
  19835. </dl>
  19836. </dd>
  19837. <dt>&lsquo;<samp>iall</samp>&rsquo;</dt>
  19838. <dd><p>Override all input properties at once. Same accepted values as <a href="#all">all</a>.
  19839. </p>
  19840. </dd>
  19841. <dt>&lsquo;<samp>ispace</samp>&rsquo;</dt>
  19842. <dd><p>Override input colorspace. Same accepted values as <a href="#space">space</a>.
  19843. </p>
  19844. </dd>
  19845. <dt>&lsquo;<samp>iprimaries</samp>&rsquo;</dt>
  19846. <dd><p>Override input color primaries. Same accepted values as <a href="#primaries">primaries</a>.
  19847. </p>
  19848. </dd>
  19849. <dt>&lsquo;<samp>itrc</samp>&rsquo;</dt>
  19850. <dd><p>Override input transfer characteristics. Same accepted values as <a href="#trc">trc</a>.
  19851. </p>
  19852. </dd>
  19853. <dt>&lsquo;<samp>irange</samp>&rsquo;</dt>
  19854. <dd><p>Override input color range. Same accepted values as <a href="#range">range</a>.
  19855. </p>
  19856. </dd>
  19857. </dl>
  19858. <p>The filter converts the transfer characteristics, color space and color
  19859. primaries to the specified user values. The output value, if not specified,
  19860. is set to a default value based on the &quot;all&quot; property. If that property is
  19861. also not specified, the filter will log an error. The output color range and
  19862. format default to the same value as the input color range and format. The
  19863. input transfer characteristics, color space, color primaries and color range
  19864. should be set on the input data. If any of these are missing, the filter will
  19865. log an error and no conversion will take place.
  19866. </p>
  19867. <p>For example to convert the input to SMPTE-240M, use the command:
  19868. </p><div class="example">
  19869. <pre class="example">colorspace=smpte240m
  19870. </pre></div>
  19871. <a name="convolution"></a>
  19872. <h2 class="section"><a href="ffplay-all.html#toc-convolution">30.30 convolution</a></h2>
  19873. <p>Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49 elements.
  19874. </p>
  19875. <p>The filter accepts the following options:
  19876. </p>
  19877. <dl compact="compact">
  19878. <dt>&lsquo;<samp>0m</samp>&rsquo;</dt>
  19879. <dt>&lsquo;<samp>1m</samp>&rsquo;</dt>
  19880. <dt>&lsquo;<samp>2m</samp>&rsquo;</dt>
  19881. <dt>&lsquo;<samp>3m</samp>&rsquo;</dt>
  19882. <dd><p>Set matrix for each plane.
  19883. Matrix is sequence of 9, 25 or 49 signed integers in <var>square</var> mode,
  19884. and from 1 to 49 odd number of signed integers in <var>row</var> mode.
  19885. </p>
  19886. </dd>
  19887. <dt>&lsquo;<samp>0rdiv</samp>&rsquo;</dt>
  19888. <dt>&lsquo;<samp>1rdiv</samp>&rsquo;</dt>
  19889. <dt>&lsquo;<samp>2rdiv</samp>&rsquo;</dt>
  19890. <dt>&lsquo;<samp>3rdiv</samp>&rsquo;</dt>
  19891. <dd><p>Set multiplier for calculated value for each plane.
  19892. If unset or 0, it will be sum of all matrix elements.
  19893. </p>
  19894. </dd>
  19895. <dt>&lsquo;<samp>0bias</samp>&rsquo;</dt>
  19896. <dt>&lsquo;<samp>1bias</samp>&rsquo;</dt>
  19897. <dt>&lsquo;<samp>2bias</samp>&rsquo;</dt>
  19898. <dt>&lsquo;<samp>3bias</samp>&rsquo;</dt>
  19899. <dd><p>Set bias for each plane. This value is added to the result of the multiplication.
  19900. Useful for making the overall image brighter or darker. Default is 0.0.
  19901. </p>
  19902. </dd>
  19903. <dt>&lsquo;<samp>0mode</samp>&rsquo;</dt>
  19904. <dt>&lsquo;<samp>1mode</samp>&rsquo;</dt>
  19905. <dt>&lsquo;<samp>2mode</samp>&rsquo;</dt>
  19906. <dt>&lsquo;<samp>3mode</samp>&rsquo;</dt>
  19907. <dd><p>Set matrix mode for each plane. Can be <var>square</var>, <var>row</var> or <var>column</var>.
  19908. Default is <var>square</var>.
  19909. </p></dd>
  19910. </dl>
  19911. <a name="Examples-25"></a>
  19912. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-25">30.30.1 Examples</a></h3>
  19913. <ul>
  19914. <li>
  19915. Apply sharpen:
  19916. <div class="example">
  19917. <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;
  19918. </pre></div>
  19919. </li><li>
  19920. Apply blur:
  19921. <div class="example">
  19922. <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;
  19923. </pre></div>
  19924. </li><li>
  19925. Apply edge enhance:
  19926. <div class="example">
  19927. <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;
  19928. </pre></div>
  19929. </li><li>
  19930. Apply edge detect:
  19931. <div class="example">
  19932. <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;
  19933. </pre></div>
  19934. </li><li>
  19935. Apply laplacian edge detector which includes diagonals:
  19936. <div class="example">
  19937. <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;
  19938. </pre></div>
  19939. </li><li>
  19940. Apply emboss:
  19941. <div class="example">
  19942. <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;
  19943. </pre></div>
  19944. </li></ul>
  19945. <a name="convolve"></a>
  19946. <h2 class="section"><a href="ffplay-all.html#toc-convolve">30.31 convolve</a></h2>
  19947. <p>Apply 2D convolution of video stream in frequency domain using second stream
  19948. as impulse.
  19949. </p>
  19950. <p>The filter accepts the following options:
  19951. </p>
  19952. <dl compact="compact">
  19953. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  19954. <dd><p>Set which planes to process.
  19955. </p>
  19956. </dd>
  19957. <dt>&lsquo;<samp>impulse</samp>&rsquo;</dt>
  19958. <dd><p>Set which impulse video frames will be processed, can be <var>first</var>
  19959. or <var>all</var>. Default is <var>all</var>.
  19960. </p></dd>
  19961. </dl>
  19962. <p>The <code>convolve</code> filter also supports the <a href="#framesync">framesync</a> options.
  19963. </p>
  19964. <a name="copy"></a>
  19965. <h2 class="section"><a href="ffplay-all.html#toc-copy">30.32 copy</a></h2>
  19966. <p>Copy the input video source unchanged to the output. This is mainly useful for
  19967. testing purposes.
  19968. </p>
  19969. <p><a name="coreimage"></a>
  19970. </p><a name="coreimage-1"></a>
  19971. <h2 class="section"><a href="ffplay-all.html#toc-coreimage-1">30.33 coreimage</a></h2>
  19972. <p>Video filtering on GPU using Apple&rsquo;s CoreImage API on OSX.
  19973. </p>
  19974. <p>Hardware acceleration is based on an OpenGL context. Usually, this means it is
  19975. processed by video hardware. However, software-based OpenGL implementations
  19976. exist which means there is no guarantee for hardware processing. It depends on
  19977. the respective OSX.
  19978. </p>
  19979. <p>There are many filters and image generators provided by Apple that come with a
  19980. large variety of options. The filter has to be referenced by its name along
  19981. with its options.
  19982. </p>
  19983. <p>The coreimage filter accepts the following options:
  19984. </p><dl compact="compact">
  19985. <dt>&lsquo;<samp>list_filters</samp>&rsquo;</dt>
  19986. <dd><p>List all available filters and generators along with all their respective
  19987. options as well as possible minimum and maximum values along with the default
  19988. values.
  19989. </p><div class="example">
  19990. <pre class="example">list_filters=true
  19991. </pre></div>
  19992. </dd>
  19993. <dt>&lsquo;<samp>filter</samp>&rsquo;</dt>
  19994. <dd><p>Specify all filters by their respective name and options.
  19995. Use <var>list_filters</var> to determine all valid filter names and options.
  19996. Numerical options are specified by a float value and are automatically clamped
  19997. to their respective value range. Vector and color options have to be specified
  19998. by a list of space separated float values. Character escaping has to be done.
  19999. A special option name <code>default</code> is available to use default options for a
  20000. filter.
  20001. </p>
  20002. <p>It is required to specify either <code>default</code> or at least one of the filter options.
  20003. All omitted options are used with their default values.
  20004. The syntax of the filter string is as follows:
  20005. </p><div class="example">
  20006. <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;][@...]][#...]
  20007. </pre></div>
  20008. </dd>
  20009. <dt>&lsquo;<samp>output_rect</samp>&rsquo;</dt>
  20010. <dd><p>Specify a rectangle where the output of the filter chain is copied into the
  20011. input image. It is given by a list of space separated float values:
  20012. </p><div class="example">
  20013. <pre class="example">output_rect=x\ y\ width\ height
  20014. </pre></div>
  20015. <p>If not given, the output rectangle equals the dimensions of the input image.
  20016. The output rectangle is automatically cropped at the borders of the input
  20017. image. Negative values are valid for each component.
  20018. </p><div class="example">
  20019. <pre class="example">output_rect=25\ 25\ 100\ 100
  20020. </pre></div>
  20021. </dd>
  20022. </dl>
  20023. <p>Several filters can be chained for successive processing without GPU-HOST
  20024. transfers allowing for fast processing of complex filter chains.
  20025. Currently, only filters with zero (generators) or exactly one (filters) input
  20026. image and one output image are supported. Also, transition filters are not yet
  20027. usable as intended.
  20028. </p>
  20029. <p>Some filters generate output images with additional padding depending on the
  20030. respective filter kernel. The padding is automatically removed to ensure the
  20031. filter output has the same size as the input image.
  20032. </p>
  20033. <p>For image generators, the size of the output image is determined by the
  20034. previous output image of the filter chain or the input image of the whole
  20035. filterchain, respectively. The generators do not use the pixel information of
  20036. this image to generate their output. However, the generated output is
  20037. blended onto this image, resulting in partial or complete coverage of the
  20038. output image.
  20039. </p>
  20040. <p>The <a href="#coreimagesrc">coreimagesrc</a> video source can be used for generating input images
  20041. which are directly fed into the filter chain. By using it, providing input
  20042. images by another video source or an input video is not required.
  20043. </p>
  20044. <a name="Examples-44"></a>
  20045. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-44">30.33.1 Examples</a></h3>
  20046. <ul>
  20047. <li>
  20048. List all filters available:
  20049. <div class="example">
  20050. <pre class="example">coreimage=list_filters=true
  20051. </pre></div>
  20052. </li><li>
  20053. Use the CIBoxBlur filter with default options to blur an image:
  20054. <div class="example">
  20055. <pre class="example">coreimage=filter=CIBoxBlur@default
  20056. </pre></div>
  20057. </li><li>
  20058. Use a filter chain with CISepiaTone at default values and CIVignetteEffect with
  20059. its center at 100x100 and a radius of 50 pixels:
  20060. <div class="example">
  20061. <pre class="example">coreimage=filter=CIBoxBlur@default#CIVignetteEffect@inputCenter=100\ 100@inputRadius=50
  20062. </pre></div>
  20063. </li><li>
  20064. Use nullsrc and CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
  20065. given as complete and escaped command-line for Apple&rsquo;s standard bash shell:
  20066. <div class="example">
  20067. <pre class="example">ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
  20068. </pre></div>
  20069. </li></ul>
  20070. <a name="cover_005frect"></a>
  20071. <h2 class="section"><a href="ffplay-all.html#toc-cover_005frect">30.34 cover_rect</a></h2>
  20072. <p>Cover a rectangular object
  20073. </p>
  20074. <p>It accepts the following options:
  20075. </p>
  20076. <dl compact="compact">
  20077. <dt>&lsquo;<samp>cover</samp>&rsquo;</dt>
  20078. <dd><p>Filepath of the optional cover image, needs to be in yuv420.
  20079. </p>
  20080. </dd>
  20081. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  20082. <dd><p>Set covering mode.
  20083. </p>
  20084. <p>It accepts the following values:
  20085. </p><dl compact="compact">
  20086. <dt>&lsquo;<samp>cover</samp>&rsquo;</dt>
  20087. <dd><p>cover it by the supplied image
  20088. </p></dd>
  20089. <dt>&lsquo;<samp>blur</samp>&rsquo;</dt>
  20090. <dd><p>cover it by interpolating the surrounding pixels
  20091. </p></dd>
  20092. </dl>
  20093. <p>Default value is <var>blur</var>.
  20094. </p></dd>
  20095. </dl>
  20096. <a name="Examples-10"></a>
  20097. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-10">30.34.1 Examples</a></h3>
  20098. <ul>
  20099. <li>
  20100. Cover a rectangular object by the supplied image of a given video using <code>ffmpeg</code>:
  20101. <div class="example">
  20102. <pre class="example">ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
  20103. </pre></div>
  20104. </li></ul>
  20105. <a name="crop"></a>
  20106. <h2 class="section"><a href="ffplay-all.html#toc-crop">30.35 crop</a></h2>
  20107. <p>Crop the input video to given dimensions.
  20108. </p>
  20109. <p>It accepts the following parameters:
  20110. </p>
  20111. <dl compact="compact">
  20112. <dt>&lsquo;<samp>w, out_w</samp>&rsquo;</dt>
  20113. <dd><p>The width of the output video. It defaults to <code>iw</code>.
  20114. This expression is evaluated only once during the filter
  20115. configuration, or when the &lsquo;<samp>w</samp>&rsquo; or &lsquo;<samp>out_w</samp>&rsquo; command is sent.
  20116. </p>
  20117. </dd>
  20118. <dt>&lsquo;<samp>h, out_h</samp>&rsquo;</dt>
  20119. <dd><p>The height of the output video. It defaults to <code>ih</code>.
  20120. This expression is evaluated only once during the filter
  20121. configuration, or when the &lsquo;<samp>h</samp>&rsquo; or &lsquo;<samp>out_h</samp>&rsquo; command is sent.
  20122. </p>
  20123. </dd>
  20124. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  20125. <dd><p>The horizontal position, in the input video, of the left edge of the output
  20126. video. It defaults to <code>(in_w-out_w)/2</code>.
  20127. This expression is evaluated per-frame.
  20128. </p>
  20129. </dd>
  20130. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  20131. <dd><p>The vertical position, in the input video, of the top edge of the output video.
  20132. It defaults to <code>(in_h-out_h)/2</code>.
  20133. This expression is evaluated per-frame.
  20134. </p>
  20135. </dd>
  20136. <dt>&lsquo;<samp>keep_aspect</samp>&rsquo;</dt>
  20137. <dd><p>If set to 1 will force the output display aspect ratio
  20138. to be the same of the input, by changing the output sample aspect
  20139. ratio. It defaults to 0.
  20140. </p>
  20141. </dd>
  20142. <dt>&lsquo;<samp>exact</samp>&rsquo;</dt>
  20143. <dd><p>Enable exact cropping. If enabled, subsampled videos will be cropped at exact
  20144. width/height/x/y as specified and will not be rounded to nearest smaller value.
  20145. It defaults to 0.
  20146. </p></dd>
  20147. </dl>
  20148. <p>The <var>out_w</var>, <var>out_h</var>, <var>x</var>, <var>y</var> parameters are
  20149. expressions containing the following constants:
  20150. </p>
  20151. <dl compact="compact">
  20152. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  20153. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  20154. <dd><p>The computed values for <var>x</var> and <var>y</var>. They are evaluated for
  20155. each new frame.
  20156. </p>
  20157. </dd>
  20158. <dt>&lsquo;<samp>in_w</samp>&rsquo;</dt>
  20159. <dt>&lsquo;<samp>in_h</samp>&rsquo;</dt>
  20160. <dd><p>The input width and height.
  20161. </p>
  20162. </dd>
  20163. <dt>&lsquo;<samp>iw</samp>&rsquo;</dt>
  20164. <dt>&lsquo;<samp>ih</samp>&rsquo;</dt>
  20165. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  20166. </p>
  20167. </dd>
  20168. <dt>&lsquo;<samp>out_w</samp>&rsquo;</dt>
  20169. <dt>&lsquo;<samp>out_h</samp>&rsquo;</dt>
  20170. <dd><p>The output (cropped) width and height.
  20171. </p>
  20172. </dd>
  20173. <dt>&lsquo;<samp>ow</samp>&rsquo;</dt>
  20174. <dt>&lsquo;<samp>oh</samp>&rsquo;</dt>
  20175. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>.
  20176. </p>
  20177. </dd>
  20178. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  20179. <dd><p>same as <var>iw</var> / <var>ih</var>
  20180. </p>
  20181. </dd>
  20182. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  20183. <dd><p>input sample aspect ratio
  20184. </p>
  20185. </dd>
  20186. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  20187. <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
  20188. </p>
  20189. </dd>
  20190. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  20191. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  20192. <dd><p>horizontal and vertical chroma subsample values. For example for the
  20193. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  20194. </p>
  20195. </dd>
  20196. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  20197. <dd><p>The number of the input frame, starting from 0.
  20198. </p>
  20199. </dd>
  20200. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  20201. <dd><p>the position in the file of the input frame, NAN if unknown
  20202. </p>
  20203. </dd>
  20204. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  20205. <dd><p>The timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  20206. </p>
  20207. </dd>
  20208. </dl>
  20209. <p>The expression for <var>out_w</var> may depend on the value of <var>out_h</var>,
  20210. and the expression for <var>out_h</var> may depend on <var>out_w</var>, but they
  20211. cannot depend on <var>x</var> and <var>y</var>, as <var>x</var> and <var>y</var> are
  20212. evaluated after <var>out_w</var> and <var>out_h</var>.
  20213. </p>
  20214. <p>The <var>x</var> and <var>y</var> parameters specify the expressions for the
  20215. position of the top-left corner of the output (non-cropped) area. They
  20216. are evaluated for each frame. If the evaluated value is not valid, it
  20217. is approximated to the nearest valid value.
  20218. </p>
  20219. <p>The expression for <var>x</var> may depend on <var>y</var>, and the expression
  20220. for <var>y</var> may depend on <var>x</var>.
  20221. </p>
  20222. <a name="Examples-104"></a>
  20223. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-104">30.35.1 Examples</a></h3>
  20224. <ul>
  20225. <li>
  20226. Crop area with size 100x100 at position (12,34).
  20227. <div class="example">
  20228. <pre class="example">crop=100:100:12:34
  20229. </pre></div>
  20230. <p>Using named options, the example above becomes:
  20231. </p><div class="example">
  20232. <pre class="example">crop=w=100:h=100:x=12:y=34
  20233. </pre></div>
  20234. </li><li>
  20235. Crop the central input area with size 100x100:
  20236. <div class="example">
  20237. <pre class="example">crop=100:100
  20238. </pre></div>
  20239. </li><li>
  20240. Crop the central input area with size 2/3 of the input video:
  20241. <div class="example">
  20242. <pre class="example">crop=2/3*in_w:2/3*in_h
  20243. </pre></div>
  20244. </li><li>
  20245. Crop the input video central square:
  20246. <div class="example">
  20247. <pre class="example">crop=out_w=in_h
  20248. crop=in_h
  20249. </pre></div>
  20250. </li><li>
  20251. Delimit the rectangle with the top-left corner placed at position
  20252. 100:100 and the right-bottom corner corresponding to the right-bottom
  20253. corner of the input image.
  20254. <div class="example">
  20255. <pre class="example">crop=in_w-100:in_h-100:100:100
  20256. </pre></div>
  20257. </li><li>
  20258. Crop 10 pixels from the left and right borders, and 20 pixels from
  20259. the top and bottom borders
  20260. <div class="example">
  20261. <pre class="example">crop=in_w-2*10:in_h-2*20
  20262. </pre></div>
  20263. </li><li>
  20264. Keep only the bottom right quarter of the input image:
  20265. <div class="example">
  20266. <pre class="example">crop=in_w/2:in_h/2:in_w/2:in_h/2
  20267. </pre></div>
  20268. </li><li>
  20269. Crop height for getting Greek harmony:
  20270. <div class="example">
  20271. <pre class="example">crop=in_w:1/PHI*in_w
  20272. </pre></div>
  20273. </li><li>
  20274. Apply trembling effect:
  20275. <div class="example">
  20276. <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)
  20277. </pre></div>
  20278. </li><li>
  20279. Apply erratic camera effect depending on timestamp:
  20280. <div class="example">
  20281. <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;
  20282. </pre></div>
  20283. </li><li>
  20284. Set x depending on the value of y:
  20285. <div class="example">
  20286. <pre class="example">crop=in_w/2:in_h/2:y:10+10*sin(n/10)
  20287. </pre></div>
  20288. </li></ul>
  20289. <a name="Commands-42"></a>
  20290. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-42">30.35.2 Commands</a></h3>
  20291. <p>This filter supports the following commands:
  20292. </p><dl compact="compact">
  20293. <dt>&lsquo;<samp>w, out_w</samp>&rsquo;</dt>
  20294. <dt>&lsquo;<samp>h, out_h</samp>&rsquo;</dt>
  20295. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  20296. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  20297. <dd><p>Set width/height of the output video and the horizontal/vertical position
  20298. in the input video.
  20299. The command accepts the same syntax of the corresponding option.
  20300. </p>
  20301. <p>If the specified expression is not valid, it is kept at its current
  20302. value.
  20303. </p></dd>
  20304. </dl>
  20305. <a name="cropdetect"></a>
  20306. <h2 class="section"><a href="ffplay-all.html#toc-cropdetect">30.36 cropdetect</a></h2>
  20307. <p>Auto-detect the crop size.
  20308. </p>
  20309. <p>It calculates the necessary cropping parameters and prints the
  20310. recommended parameters via the logging system. The detected dimensions
  20311. correspond to the non-black area of the input video.
  20312. </p>
  20313. <p>It accepts the following parameters:
  20314. </p>
  20315. <dl compact="compact">
  20316. <dt>&lsquo;<samp>limit</samp>&rsquo;</dt>
  20317. <dd><p>Set higher black value threshold, which can be optionally specified
  20318. from nothing (0) to everything (255 for 8-bit based formats). An intensity
  20319. value greater to the set value is considered non-black. It defaults to 24.
  20320. You can also specify a value between 0.0 and 1.0 which will be scaled depending
  20321. on the bitdepth of the pixel format.
  20322. </p>
  20323. </dd>
  20324. <dt>&lsquo;<samp>round</samp>&rsquo;</dt>
  20325. <dd><p>The value which the width/height should be divisible by. It defaults to
  20326. 16. The offset is automatically adjusted to center the video. Use 2 to
  20327. get only even dimensions (needed for 4:2:2 video). 16 is best when
  20328. encoding to most video codecs.
  20329. </p>
  20330. </dd>
  20331. <dt>&lsquo;<samp>reset_count, reset</samp>&rsquo;</dt>
  20332. <dd><p>Set the counter that determines after how many frames cropdetect will
  20333. reset the previously detected largest video area and start over to
  20334. detect the current optimal crop area. Default value is 0.
  20335. </p>
  20336. <p>This can be useful when channel logos distort the video area. 0
  20337. indicates &rsquo;never reset&rsquo;, and returns the largest area encountered during
  20338. playback.
  20339. </p></dd>
  20340. </dl>
  20341. <p><a name="cue"></a>
  20342. </p><a name="cue-1"></a>
  20343. <h2 class="section"><a href="ffplay-all.html#toc-cue-1">30.37 cue</a></h2>
  20344. <p>Delay video filtering until a given wallclock timestamp. The filter first
  20345. passes on &lsquo;<samp>preroll</samp>&rsquo; amount of frames, then it buffers at most
  20346. &lsquo;<samp>buffer</samp>&rsquo; amount of frames and waits for the cue. After reaching the cue
  20347. it forwards the buffered frames and also any subsequent frames coming in its
  20348. input.
  20349. </p>
  20350. <p>The filter can be used synchronize the output of multiple ffmpeg processes for
  20351. realtime output devices like decklink. By putting the delay in the filtering
  20352. chain and pre-buffering frames the process can pass on data to output almost
  20353. immediately after the target wallclock timestamp is reached.
  20354. </p>
  20355. <p>Perfect frame accuracy cannot be guaranteed, but the result is good enough for
  20356. some use cases.
  20357. </p>
  20358. <dl compact="compact">
  20359. <dt>&lsquo;<samp>cue</samp>&rsquo;</dt>
  20360. <dd><p>The cue timestamp expressed in a UNIX timestamp in microseconds. Default is 0.
  20361. </p>
  20362. </dd>
  20363. <dt>&lsquo;<samp>preroll</samp>&rsquo;</dt>
  20364. <dd><p>The duration of content to pass on as preroll expressed in seconds. Default is 0.
  20365. </p>
  20366. </dd>
  20367. <dt>&lsquo;<samp>buffer</samp>&rsquo;</dt>
  20368. <dd><p>The maximum duration of content to buffer before waiting for the cue expressed
  20369. in seconds. Default is 0.
  20370. </p>
  20371. </dd>
  20372. </dl>
  20373. <p><a name="curves"></a>
  20374. </p><a name="curves-1"></a>
  20375. <h2 class="section"><a href="ffplay-all.html#toc-curves-1">30.38 curves</a></h2>
  20376. <p>Apply color adjustments using curves.
  20377. </p>
  20378. <p>This filter is similar to the Adobe Photoshop and GIMP curves tools. Each
  20379. component (red, green and blue) has its values defined by <var>N</var> key points
  20380. tied from each other using a smooth curve. The x-axis represents the pixel
  20381. values from the input frame, and the y-axis the new pixel values to be set for
  20382. the output frame.
  20383. </p>
  20384. <p>By default, a component curve is defined by the two points <var>(0;0)</var> and
  20385. <var>(1;1)</var>. This creates a straight line where each original pixel value is
  20386. &quot;adjusted&quot; to its own value, which means no change to the image.
  20387. </p>
  20388. <p>The filter allows you to redefine these two points and add some more. A new
  20389. curve (using a natural cubic spline interpolation) will be define to pass
  20390. smoothly through all these new coordinates. The new defined points needs to be
  20391. strictly increasing over the x-axis, and their <var>x</var> and <var>y</var> values must
  20392. be in the <var>[0;1]</var> interval. If the computed curves happened to go outside
  20393. the vector spaces, the values will be clipped accordingly.
  20394. </p>
  20395. <p>The filter accepts the following options:
  20396. </p>
  20397. <dl compact="compact">
  20398. <dt>&lsquo;<samp>preset</samp>&rsquo;</dt>
  20399. <dd><p>Select one of the available color presets. This option can be used in addition
  20400. to the &lsquo;<samp>r</samp>&rsquo;, &lsquo;<samp>g</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo; parameters; in this case, the later
  20401. options takes priority on the preset values.
  20402. Available presets are:
  20403. </p><dl compact="compact">
  20404. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  20405. <dt>&lsquo;<samp>color_negative</samp>&rsquo;</dt>
  20406. <dt>&lsquo;<samp>cross_process</samp>&rsquo;</dt>
  20407. <dt>&lsquo;<samp>darker</samp>&rsquo;</dt>
  20408. <dt>&lsquo;<samp>increase_contrast</samp>&rsquo;</dt>
  20409. <dt>&lsquo;<samp>lighter</samp>&rsquo;</dt>
  20410. <dt>&lsquo;<samp>linear_contrast</samp>&rsquo;</dt>
  20411. <dt>&lsquo;<samp>medium_contrast</samp>&rsquo;</dt>
  20412. <dt>&lsquo;<samp>negative</samp>&rsquo;</dt>
  20413. <dt>&lsquo;<samp>strong_contrast</samp>&rsquo;</dt>
  20414. <dt>&lsquo;<samp>vintage</samp>&rsquo;</dt>
  20415. </dl>
  20416. <p>Default is <code>none</code>.
  20417. </p></dd>
  20418. <dt>&lsquo;<samp>master, m</samp>&rsquo;</dt>
  20419. <dd><p>Set the master key points. These points will define a second pass mapping. It
  20420. is sometimes called a &quot;luminance&quot; or &quot;value&quot; mapping. It can be used with
  20421. &lsquo;<samp>r</samp>&rsquo;, &lsquo;<samp>g</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo; or &lsquo;<samp>all</samp>&rsquo; since it acts like a
  20422. post-processing LUT.
  20423. </p></dd>
  20424. <dt>&lsquo;<samp>red, r</samp>&rsquo;</dt>
  20425. <dd><p>Set the key points for the red component.
  20426. </p></dd>
  20427. <dt>&lsquo;<samp>green, g</samp>&rsquo;</dt>
  20428. <dd><p>Set the key points for the green component.
  20429. </p></dd>
  20430. <dt>&lsquo;<samp>blue, b</samp>&rsquo;</dt>
  20431. <dd><p>Set the key points for the blue component.
  20432. </p></dd>
  20433. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  20434. <dd><p>Set the key points for all components (not including master).
  20435. Can be used in addition to the other key points component
  20436. options. In this case, the unset component(s) will fallback on this
  20437. &lsquo;<samp>all</samp>&rsquo; setting.
  20438. </p></dd>
  20439. <dt>&lsquo;<samp>psfile</samp>&rsquo;</dt>
  20440. <dd><p>Specify a Photoshop curves file (<code>.acv</code>) to import the settings from.
  20441. </p></dd>
  20442. <dt>&lsquo;<samp>plot</samp>&rsquo;</dt>
  20443. <dd><p>Save Gnuplot script of the curves in specified file.
  20444. </p></dd>
  20445. </dl>
  20446. <p>To avoid some filtergraph syntax conflicts, each key points list need to be
  20447. defined using the following syntax: <code>x0/y0 x1/y1 x2/y2 ...</code>.
  20448. </p>
  20449. <a name="Examples-70"></a>
  20450. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-70">30.38.1 Examples</a></h3>
  20451. <ul>
  20452. <li>
  20453. Increase slightly the middle level of blue:
  20454. <div class="example">
  20455. <pre class="example">curves=blue='0/0 0.5/0.58 1/1'
  20456. </pre></div>
  20457. </li><li>
  20458. Vintage effect:
  20459. <div class="example">
  20460. <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'
  20461. </pre></div>
  20462. <p>Here we obtain the following coordinates for each components:
  20463. </p><dl compact="compact">
  20464. <dt><var>red</var></dt>
  20465. <dd><p><code>(0;0.11) (0.42;0.51) (1;0.95)</code>
  20466. </p></dd>
  20467. <dt><var>green</var></dt>
  20468. <dd><p><code>(0;0) (0.50;0.48) (1;1)</code>
  20469. </p></dd>
  20470. <dt><var>blue</var></dt>
  20471. <dd><p><code>(0;0.22) (0.49;0.44) (1;0.80)</code>
  20472. </p></dd>
  20473. </dl>
  20474. </li><li>
  20475. The previous example can also be achieved with the associated built-in preset:
  20476. <div class="example">
  20477. <pre class="example">curves=preset=vintage
  20478. </pre></div>
  20479. </li><li>
  20480. Or simply:
  20481. <div class="example">
  20482. <pre class="example">curves=vintage
  20483. </pre></div>
  20484. </li><li>
  20485. Use a Photoshop preset and redefine the points of the green component:
  20486. <div class="example">
  20487. <pre class="example">curves=psfile='MyCurvesPresets/purple.acv':green='0/0 0.45/0.53 1/1'
  20488. </pre></div>
  20489. </li><li>
  20490. Check out the curves of the <code>cross_process</code> profile using <code>ffmpeg</code>
  20491. and <code>gnuplot</code>:
  20492. <div class="example">
  20493. <pre class="example">ffmpeg -f lavfi -i color -vf curves=cross_process:plot=/tmp/curves.plt -frames:v 1 -f null -
  20494. gnuplot -p /tmp/curves.plt
  20495. </pre></div>
  20496. </li></ul>
  20497. <a name="datascope"></a>
  20498. <h2 class="section"><a href="ffplay-all.html#toc-datascope">30.39 datascope</a></h2>
  20499. <p>Video data analysis filter.
  20500. </p>
  20501. <p>This filter shows hexadecimal pixel values of part of video.
  20502. </p>
  20503. <p>The filter accepts the following options:
  20504. </p>
  20505. <dl compact="compact">
  20506. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  20507. <dd><p>Set output video size.
  20508. </p>
  20509. </dd>
  20510. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  20511. <dd><p>Set x offset from where to pick pixels.
  20512. </p>
  20513. </dd>
  20514. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  20515. <dd><p>Set y offset from where to pick pixels.
  20516. </p>
  20517. </dd>
  20518. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  20519. <dd><p>Set scope mode, can be one of the following:
  20520. </p><dl compact="compact">
  20521. <dt>&lsquo;<samp>mono</samp>&rsquo;</dt>
  20522. <dd><p>Draw hexadecimal pixel values with white color on black background.
  20523. </p>
  20524. </dd>
  20525. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  20526. <dd><p>Draw hexadecimal pixel values with input video pixel color on black
  20527. background.
  20528. </p>
  20529. </dd>
  20530. <dt>&lsquo;<samp>color2</samp>&rsquo;</dt>
  20531. <dd><p>Draw hexadecimal pixel values on color background picked from input video,
  20532. the text color is picked in such way so its always visible.
  20533. </p></dd>
  20534. </dl>
  20535. </dd>
  20536. <dt>&lsquo;<samp>axis</samp>&rsquo;</dt>
  20537. <dd><p>Draw rows and columns numbers on left and top of video.
  20538. </p>
  20539. </dd>
  20540. <dt>&lsquo;<samp>opacity</samp>&rsquo;</dt>
  20541. <dd><p>Set background opacity.
  20542. </p>
  20543. </dd>
  20544. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  20545. <dd><p>Set display number format. Can be <code>hex</code>, or <code>dec</code>. Default is <code>hex</code>.
  20546. </p></dd>
  20547. </dl>
  20548. <a name="dctdnoiz"></a>
  20549. <h2 class="section"><a href="ffplay-all.html#toc-dctdnoiz">30.40 dctdnoiz</a></h2>
  20550. <p>Denoise frames using 2D DCT (frequency domain filtering).
  20551. </p>
  20552. <p>This filter is not designed for real time.
  20553. </p>
  20554. <p>The filter accepts the following options:
  20555. </p>
  20556. <dl compact="compact">
  20557. <dt>&lsquo;<samp>sigma, s</samp>&rsquo;</dt>
  20558. <dd><p>Set the noise sigma constant.
  20559. </p>
  20560. <p>This <var>sigma</var> defines a hard threshold of <code>3 * sigma</code>; every DCT
  20561. coefficient (absolute value) below this threshold with be dropped.
  20562. </p>
  20563. <p>If you need a more advanced filtering, see &lsquo;<samp>expr</samp>&rsquo;.
  20564. </p>
  20565. <p>Default is <code>0</code>.
  20566. </p>
  20567. </dd>
  20568. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  20569. <dd><p>Set number overlapping pixels for each block. Since the filter can be slow, you
  20570. may want to reduce this value, at the cost of a less effective filter and the
  20571. risk of various artefacts.
  20572. </p>
  20573. <p>If the overlapping value doesn&rsquo;t permit processing the whole input width or
  20574. height, a warning will be displayed and according borders won&rsquo;t be denoised.
  20575. </p>
  20576. <p>Default value is <var>blocksize</var>-1, which is the best possible setting.
  20577. </p>
  20578. </dd>
  20579. <dt>&lsquo;<samp>expr, e</samp>&rsquo;</dt>
  20580. <dd><p>Set the coefficient factor expression.
  20581. </p>
  20582. <p>For each coefficient of a DCT block, this expression will be evaluated as a
  20583. multiplier value for the coefficient.
  20584. </p>
  20585. <p>If this is option is set, the &lsquo;<samp>sigma</samp>&rsquo; option will be ignored.
  20586. </p>
  20587. <p>The absolute value of the coefficient can be accessed through the <var>c</var>
  20588. variable.
  20589. </p>
  20590. </dd>
  20591. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  20592. <dd><p>Set the <var>blocksize</var> using the number of bits. <code>1&lt;&lt;<var>n</var></code> defines the
  20593. <var>blocksize</var>, which is the width and height of the processed blocks.
  20594. </p>
  20595. <p>The default value is <var>3</var> (8x8) and can be raised to <var>4</var> for a
  20596. <var>blocksize</var> of 16x16. Note that changing this setting has huge consequences
  20597. on the speed processing. Also, a larger block size does not necessarily means a
  20598. better de-noising.
  20599. </p></dd>
  20600. </dl>
  20601. <a name="Examples-97"></a>
  20602. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-97">30.40.1 Examples</a></h3>
  20603. <p>Apply a denoise with a &lsquo;<samp>sigma</samp>&rsquo; of <code>4.5</code>:
  20604. </p><div class="example">
  20605. <pre class="example">dctdnoiz=4.5
  20606. </pre></div>
  20607. <p>The same operation can be achieved using the expression system:
  20608. </p><div class="example">
  20609. <pre class="example">dctdnoiz=e='gte(c, 4.5*3)'
  20610. </pre></div>
  20611. <p>Violent denoise using a block size of <code>16x16</code>:
  20612. </p><div class="example">
  20613. <pre class="example">dctdnoiz=15:n=4
  20614. </pre></div>
  20615. <a name="deband"></a>
  20616. <h2 class="section"><a href="ffplay-all.html#toc-deband">30.41 deband</a></h2>
  20617. <p>Remove banding artifacts from input video.
  20618. It works by replacing banded pixels with average value of referenced pixels.
  20619. </p>
  20620. <p>The filter accepts the following options:
  20621. </p>
  20622. <dl compact="compact">
  20623. <dt>&lsquo;<samp>1thr</samp>&rsquo;</dt>
  20624. <dt>&lsquo;<samp>2thr</samp>&rsquo;</dt>
  20625. <dt>&lsquo;<samp>3thr</samp>&rsquo;</dt>
  20626. <dt>&lsquo;<samp>4thr</samp>&rsquo;</dt>
  20627. <dd><p>Set banding detection threshold for each plane. Default is 0.02.
  20628. Valid range is 0.00003 to 0.5.
  20629. If difference between current pixel and reference pixel is less than threshold,
  20630. it will be considered as banded.
  20631. </p>
  20632. </dd>
  20633. <dt>&lsquo;<samp>range, r</samp>&rsquo;</dt>
  20634. <dd><p>Banding detection range in pixels. Default is 16. If positive, random number
  20635. in range 0 to set value will be used. If negative, exact absolute value
  20636. will be used.
  20637. The range defines square of four pixels around current pixel.
  20638. </p>
  20639. </dd>
  20640. <dt>&lsquo;<samp>direction, d</samp>&rsquo;</dt>
  20641. <dd><p>Set direction in radians from which four pixel will be compared. If positive,
  20642. random direction from 0 to set direction will be picked. If negative, exact of
  20643. absolute value will be picked. For example direction 0, -PI or -2*PI radians
  20644. will pick only pixels on same row and -PI/2 will pick only pixels on same
  20645. column.
  20646. </p>
  20647. </dd>
  20648. <dt>&lsquo;<samp>blur, b</samp>&rsquo;</dt>
  20649. <dd><p>If enabled, current pixel is compared with average value of all four
  20650. surrounding pixels. The default is enabled. If disabled current pixel is
  20651. compared with all four surrounding pixels. The pixel is considered banded
  20652. if only all four differences with surrounding pixels are less than threshold.
  20653. </p>
  20654. </dd>
  20655. <dt>&lsquo;<samp>coupling, c</samp>&rsquo;</dt>
  20656. <dd><p>If enabled, current pixel is changed if and only if all pixel components are banded,
  20657. e.g. banding detection threshold is triggered for all color components.
  20658. The default is disabled.
  20659. </p></dd>
  20660. </dl>
  20661. <a name="deblock"></a>
  20662. <h2 class="section"><a href="ffplay-all.html#toc-deblock">30.42 deblock</a></h2>
  20663. <p>Remove blocking artifacts from input video.
  20664. </p>
  20665. <p>The filter accepts the following options:
  20666. </p>
  20667. <dl compact="compact">
  20668. <dt>&lsquo;<samp>filter</samp>&rsquo;</dt>
  20669. <dd><p>Set filter type, can be <var>weak</var> or <var>strong</var>. Default is <var>strong</var>.
  20670. This controls what kind of deblocking is applied.
  20671. </p>
  20672. </dd>
  20673. <dt>&lsquo;<samp>block</samp>&rsquo;</dt>
  20674. <dd><p>Set size of block, allowed range is from 4 to 512. Default is <var>8</var>.
  20675. </p>
  20676. </dd>
  20677. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  20678. <dt>&lsquo;<samp>beta</samp>&rsquo;</dt>
  20679. <dt>&lsquo;<samp>gamma</samp>&rsquo;</dt>
  20680. <dt>&lsquo;<samp>delta</samp>&rsquo;</dt>
  20681. <dd><p>Set blocking detection thresholds. Allowed range is 0 to 1.
  20682. Defaults are: <var>0.098</var> for <var>alpha</var> and <var>0.05</var> for the rest.
  20683. Using higher threshold gives more deblocking strength.
  20684. Setting <var>alpha</var> controls threshold detection at exact edge of block.
  20685. Remaining options controls threshold detection near the edge. Each one for
  20686. below/above or left/right. Setting any of those to <var>0</var> disables
  20687. deblocking.
  20688. </p>
  20689. </dd>
  20690. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  20691. <dd><p>Set planes to filter. Default is to filter all available planes.
  20692. </p></dd>
  20693. </dl>
  20694. <a name="Examples-31"></a>
  20695. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-31">30.42.1 Examples</a></h3>
  20696. <ul>
  20697. <li>
  20698. Deblock using weak filter and block size of 4 pixels.
  20699. <div class="example">
  20700. <pre class="example">deblock=filter=weak:block=4
  20701. </pre></div>
  20702. </li><li>
  20703. Deblock using strong filter, block size of 4 pixels and custom thresholds for
  20704. deblocking more edges.
  20705. <div class="example">
  20706. <pre class="example">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05
  20707. </pre></div>
  20708. </li><li>
  20709. Similar as above, but filter only first plane.
  20710. <div class="example">
  20711. <pre class="example">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=1
  20712. </pre></div>
  20713. </li><li>
  20714. Similar as above, but filter only second and third plane.
  20715. <div class="example">
  20716. <pre class="example">deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes=6
  20717. </pre></div>
  20718. </li></ul>
  20719. <p><a name="decimate"></a>
  20720. </p><a name="decimate-1"></a>
  20721. <h2 class="section"><a href="ffplay-all.html#toc-decimate-1">30.43 decimate</a></h2>
  20722. <p>Drop duplicated frames at regular intervals.
  20723. </p>
  20724. <p>The filter accepts the following options:
  20725. </p>
  20726. <dl compact="compact">
  20727. <dt>&lsquo;<samp>cycle</samp>&rsquo;</dt>
  20728. <dd><p>Set the number of frames from which one will be dropped. Setting this to
  20729. <var>N</var> means one frame in every batch of <var>N</var> frames will be dropped.
  20730. Default is <code>5</code>.
  20731. </p>
  20732. </dd>
  20733. <dt>&lsquo;<samp>dupthresh</samp>&rsquo;</dt>
  20734. <dd><p>Set the threshold for duplicate detection. If the difference metric for a frame
  20735. is less than or equal to this value, then it is declared as duplicate. Default
  20736. is <code>1.1</code>
  20737. </p>
  20738. </dd>
  20739. <dt>&lsquo;<samp>scthresh</samp>&rsquo;</dt>
  20740. <dd><p>Set scene change threshold. Default is <code>15</code>.
  20741. </p>
  20742. </dd>
  20743. <dt>&lsquo;<samp>blockx</samp>&rsquo;</dt>
  20744. <dt>&lsquo;<samp>blocky</samp>&rsquo;</dt>
  20745. <dd><p>Set the size of the x and y-axis blocks used during metric calculations.
  20746. Larger blocks give better noise suppression, but also give worse detection of
  20747. small movements. Must be a power of two. Default is <code>32</code>.
  20748. </p>
  20749. </dd>
  20750. <dt>&lsquo;<samp>ppsrc</samp>&rsquo;</dt>
  20751. <dd><p>Mark main input as a pre-processed input and activate clean source input
  20752. stream. This allows the input to be pre-processed with various filters to help
  20753. the metrics calculation while keeping the frame selection lossless. When set to
  20754. <code>1</code>, the first stream is for the pre-processed input, and the second
  20755. stream is the clean source from where the kept frames are chosen. Default is
  20756. <code>0</code>.
  20757. </p>
  20758. </dd>
  20759. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  20760. <dd><p>Set whether or not chroma is considered in the metric calculations. Default is
  20761. <code>1</code>.
  20762. </p></dd>
  20763. </dl>
  20764. <a name="deconvolve"></a>
  20765. <h2 class="section"><a href="ffplay-all.html#toc-deconvolve">30.44 deconvolve</a></h2>
  20766. <p>Apply 2D deconvolution of video stream in frequency domain using second stream
  20767. as impulse.
  20768. </p>
  20769. <p>The filter accepts the following options:
  20770. </p>
  20771. <dl compact="compact">
  20772. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  20773. <dd><p>Set which planes to process.
  20774. </p>
  20775. </dd>
  20776. <dt>&lsquo;<samp>impulse</samp>&rsquo;</dt>
  20777. <dd><p>Set which impulse video frames will be processed, can be <var>first</var>
  20778. or <var>all</var>. Default is <var>all</var>.
  20779. </p>
  20780. </dd>
  20781. <dt>&lsquo;<samp>noise</samp>&rsquo;</dt>
  20782. <dd><p>Set noise when doing divisions. Default is <var>0.0000001</var>. Useful when width
  20783. and height are not same and not power of 2 or if stream prior to convolving
  20784. had noise.
  20785. </p></dd>
  20786. </dl>
  20787. <p>The <code>deconvolve</code> filter also supports the <a href="#framesync">framesync</a> options.
  20788. </p>
  20789. <a name="dedot"></a>
  20790. <h2 class="section"><a href="ffplay-all.html#toc-dedot">30.45 dedot</a></h2>
  20791. <p>Reduce cross-luminance (dot-crawl) and cross-color (rainbows) from video.
  20792. </p>
  20793. <p>It accepts the following options:
  20794. </p>
  20795. <dl compact="compact">
  20796. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  20797. <dd><p>Set mode of operation. Can be combination of <var>dotcrawl</var> for cross-luminance reduction and/or
  20798. <var>rainbows</var> for cross-color reduction.
  20799. </p>
  20800. </dd>
  20801. <dt>&lsquo;<samp>lt</samp>&rsquo;</dt>
  20802. <dd><p>Set spatial luma threshold. Lower values increases reduction of cross-luminance.
  20803. </p>
  20804. </dd>
  20805. <dt>&lsquo;<samp>tl</samp>&rsquo;</dt>
  20806. <dd><p>Set tolerance for temporal luma. Higher values increases reduction of cross-luminance.
  20807. </p>
  20808. </dd>
  20809. <dt>&lsquo;<samp>tc</samp>&rsquo;</dt>
  20810. <dd><p>Set tolerance for chroma temporal variation. Higher values increases reduction of cross-color.
  20811. </p>
  20812. </dd>
  20813. <dt>&lsquo;<samp>ct</samp>&rsquo;</dt>
  20814. <dd><p>Set temporal chroma threshold. Lower values increases reduction of cross-color.
  20815. </p></dd>
  20816. </dl>
  20817. <a name="deflate"></a>
  20818. <h2 class="section"><a href="ffplay-all.html#toc-deflate">30.46 deflate</a></h2>
  20819. <p>Apply deflate effect to the video.
  20820. </p>
  20821. <p>This filter replaces the pixel by the local(3x3) average by taking into account
  20822. only values lower than the pixel.
  20823. </p>
  20824. <p>It accepts the following options:
  20825. </p>
  20826. <dl compact="compact">
  20827. <dt>&lsquo;<samp>threshold0</samp>&rsquo;</dt>
  20828. <dt>&lsquo;<samp>threshold1</samp>&rsquo;</dt>
  20829. <dt>&lsquo;<samp>threshold2</samp>&rsquo;</dt>
  20830. <dt>&lsquo;<samp>threshold3</samp>&rsquo;</dt>
  20831. <dd><p>Limit the maximum change for each plane, default is 65535.
  20832. If 0, plane will remain unchanged.
  20833. </p></dd>
  20834. </dl>
  20835. <a name="Commands-54"></a>
  20836. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-54">30.46.1 Commands</a></h3>
  20837. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  20838. </p>
  20839. <a name="deflicker"></a>
  20840. <h2 class="section"><a href="ffplay-all.html#toc-deflicker">30.47 deflicker</a></h2>
  20841. <p>Remove temporal frame luminance variations.
  20842. </p>
  20843. <p>It accepts the following options:
  20844. </p>
  20845. <dl compact="compact">
  20846. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  20847. <dd><p>Set moving-average filter size in frames. Default is 5. Allowed range is 2 - 129.
  20848. </p>
  20849. </dd>
  20850. <dt>&lsquo;<samp>mode, m</samp>&rsquo;</dt>
  20851. <dd><p>Set averaging mode to smooth temporal luminance variations.
  20852. </p>
  20853. <p>Available values are:
  20854. </p><dl compact="compact">
  20855. <dt>&lsquo;<samp>am</samp>&rsquo;</dt>
  20856. <dd><p>Arithmetic mean
  20857. </p>
  20858. </dd>
  20859. <dt>&lsquo;<samp>gm</samp>&rsquo;</dt>
  20860. <dd><p>Geometric mean
  20861. </p>
  20862. </dd>
  20863. <dt>&lsquo;<samp>hm</samp>&rsquo;</dt>
  20864. <dd><p>Harmonic mean
  20865. </p>
  20866. </dd>
  20867. <dt>&lsquo;<samp>qm</samp>&rsquo;</dt>
  20868. <dd><p>Quadratic mean
  20869. </p>
  20870. </dd>
  20871. <dt>&lsquo;<samp>cm</samp>&rsquo;</dt>
  20872. <dd><p>Cubic mean
  20873. </p>
  20874. </dd>
  20875. <dt>&lsquo;<samp>pm</samp>&rsquo;</dt>
  20876. <dd><p>Power mean
  20877. </p>
  20878. </dd>
  20879. <dt>&lsquo;<samp>median</samp>&rsquo;</dt>
  20880. <dd><p>Median
  20881. </p></dd>
  20882. </dl>
  20883. </dd>
  20884. <dt>&lsquo;<samp>bypass</samp>&rsquo;</dt>
  20885. <dd><p>Do not actually modify frame. Useful when one only wants metadata.
  20886. </p></dd>
  20887. </dl>
  20888. <a name="dejudder"></a>
  20889. <h2 class="section"><a href="ffplay-all.html#toc-dejudder">30.48 dejudder</a></h2>
  20890. <p>Remove judder produced by partially interlaced telecined content.
  20891. </p>
  20892. <p>Judder can be introduced, for instance, by <a href="#pullup">pullup</a> filter. If the original
  20893. source was partially telecined content then the output of <code>pullup,dejudder</code>
  20894. will have a variable frame rate. May change the recorded frame rate of the
  20895. container. Aside from that change, this filter will not affect constant frame
  20896. rate video.
  20897. </p>
  20898. <p>The option available in this filter is:
  20899. </p><dl compact="compact">
  20900. <dt>&lsquo;<samp>cycle</samp>&rsquo;</dt>
  20901. <dd><p>Specify the length of the window over which the judder repeats.
  20902. </p>
  20903. <p>Accepts any integer greater than 1. Useful values are:
  20904. </p><dl compact="compact">
  20905. <dt>&lsquo;<samp>4</samp>&rsquo;</dt>
  20906. <dd><p>If the original was telecined from 24 to 30 fps (Film to NTSC).
  20907. </p>
  20908. </dd>
  20909. <dt>&lsquo;<samp>5</samp>&rsquo;</dt>
  20910. <dd><p>If the original was telecined from 25 to 30 fps (PAL to NTSC).
  20911. </p>
  20912. </dd>
  20913. <dt>&lsquo;<samp>20</samp>&rsquo;</dt>
  20914. <dd><p>If a mixture of the two.
  20915. </p></dd>
  20916. </dl>
  20917. <p>The default is &lsquo;<samp>4</samp>&rsquo;.
  20918. </p></dd>
  20919. </dl>
  20920. <a name="delogo"></a>
  20921. <h2 class="section"><a href="ffplay-all.html#toc-delogo">30.49 delogo</a></h2>
  20922. <p>Suppress a TV station logo by a simple interpolation of the surrounding
  20923. pixels. Just set a rectangle covering the logo and watch it disappear
  20924. (and sometimes something even uglier appear - your mileage may vary).
  20925. </p>
  20926. <p>It accepts the following parameters:
  20927. </p><dl compact="compact">
  20928. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  20929. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  20930. <dd><p>Specify the top left corner coordinates of the logo. They must be
  20931. specified.
  20932. </p>
  20933. </dd>
  20934. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  20935. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  20936. <dd><p>Specify the width and height of the logo to clear. They must be
  20937. specified.
  20938. </p>
  20939. </dd>
  20940. <dt>&lsquo;<samp>band, t</samp>&rsquo;</dt>
  20941. <dd><p>Specify the thickness of the fuzzy edge of the rectangle (added to
  20942. <var>w</var> and <var>h</var>). The default value is 1. This option is
  20943. deprecated, setting higher values should no longer be necessary and
  20944. is not recommended.
  20945. </p>
  20946. </dd>
  20947. <dt>&lsquo;<samp>show</samp>&rsquo;</dt>
  20948. <dd><p>When set to 1, a green rectangle is drawn on the screen to simplify
  20949. finding the right <var>x</var>, <var>y</var>, <var>w</var>, and <var>h</var> parameters.
  20950. The default value is 0.
  20951. </p>
  20952. <p>The rectangle is drawn on the outermost pixels which will be (partly)
  20953. replaced with interpolated values. The values of the next pixels
  20954. immediately outside this rectangle in each direction will be used to
  20955. compute the interpolated pixel values inside the rectangle.
  20956. </p>
  20957. </dd>
  20958. </dl>
  20959. <a name="Examples-155"></a>
  20960. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-155">30.49.1 Examples</a></h3>
  20961. <ul>
  20962. <li>
  20963. Set a rectangle covering the area with top left corner coordinates 0,0
  20964. and size 100x77, and a band of size 10:
  20965. <div class="example">
  20966. <pre class="example">delogo=x=0:y=0:w=100:h=77:band=10
  20967. </pre></div>
  20968. </li></ul>
  20969. <a name="derain"></a>
  20970. <h2 class="section"><a href="ffplay-all.html#toc-derain">30.50 derain</a></h2>
  20971. <p>Remove the rain in the input image/video by applying the derain methods based on
  20972. convolutional neural networks. Supported models:
  20973. </p>
  20974. <ul>
  20975. <li>
  20976. Recurrent Squeeze-and-Excitation Context Aggregation Net (RESCAN).
  20977. 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>.
  20978. </li></ul>
  20979. <p>Training as well as model generation scripts are provided in
  20980. the repository at <a href="https://github.com/XueweiMeng/derain_filter.git">https://github.com/XueweiMeng/derain_filter.git</a>.
  20981. </p>
  20982. <p>Native model files (.model) can be generated from TensorFlow model
  20983. files (.pb) by using tools/python/convert.py
  20984. </p>
  20985. <p>The filter accepts the following options:
  20986. </p>
  20987. <dl compact="compact">
  20988. <dt>&lsquo;<samp>filter_type</samp>&rsquo;</dt>
  20989. <dd><p>Specify which filter to use. This option accepts the following values:
  20990. </p>
  20991. <dl compact="compact">
  20992. <dt>&lsquo;<samp>derain</samp>&rsquo;</dt>
  20993. <dd><p>Derain filter. To conduct derain filter, you need to use a derain model.
  20994. </p>
  20995. </dd>
  20996. <dt>&lsquo;<samp>dehaze</samp>&rsquo;</dt>
  20997. <dd><p>Dehaze filter. To conduct dehaze filter, you need to use a dehaze model.
  20998. </p></dd>
  20999. </dl>
  21000. <p>Default value is &lsquo;<samp>derain</samp>&rsquo;.
  21001. </p>
  21002. </dd>
  21003. <dt>&lsquo;<samp>dnn_backend</samp>&rsquo;</dt>
  21004. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  21005. the following values:
  21006. </p>
  21007. <dl compact="compact">
  21008. <dt>&lsquo;<samp>native</samp>&rsquo;</dt>
  21009. <dd><p>Native implementation of DNN loading and execution.
  21010. </p>
  21011. </dd>
  21012. <dt>&lsquo;<samp>tensorflow</samp>&rsquo;</dt>
  21013. <dd><p>TensorFlow backend. To enable this backend you
  21014. need to install the TensorFlow for C library (see
  21015. <a href="https://www.tensorflow.org/install/install_c">https://www.tensorflow.org/install/install_c</a>) and configure FFmpeg with
  21016. <code>--enable-libtensorflow</code>
  21017. </p></dd>
  21018. </dl>
  21019. <p>Default value is &lsquo;<samp>native</samp>&rsquo;.
  21020. </p>
  21021. </dd>
  21022. <dt>&lsquo;<samp>model</samp>&rsquo;</dt>
  21023. <dd><p>Set path to model file specifying network architecture and its parameters.
  21024. Note that different backends use different file formats. TensorFlow and native
  21025. backend can load files for only its format.
  21026. </p></dd>
  21027. </dl>
  21028. <a name="deshake"></a>
  21029. <h2 class="section"><a href="ffplay-all.html#toc-deshake">30.51 deshake</a></h2>
  21030. <p>Attempt to fix small changes in horizontal and/or vertical shift. This
  21031. filter helps remove camera shake from hand-holding a camera, bumping a
  21032. tripod, moving on a vehicle, etc.
  21033. </p>
  21034. <p>The filter accepts the following options:
  21035. </p>
  21036. <dl compact="compact">
  21037. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  21038. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  21039. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  21040. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  21041. <dd><p>Specify a rectangular area where to limit the search for motion
  21042. vectors.
  21043. If desired the search for motion vectors can be limited to a
  21044. rectangular area of the frame defined by its top left corner, width
  21045. and height. These parameters have the same meaning as the drawbox
  21046. filter which can be used to visualise the position of the bounding
  21047. box.
  21048. </p>
  21049. <p>This is useful when simultaneous movement of subjects within the frame
  21050. might be confused for camera motion by the motion vector search.
  21051. </p>
  21052. <p>If any or all of <var>x</var>, <var>y</var>, <var>w</var> and <var>h</var> are set to -1
  21053. then the full frame is used. This allows later options to be set
  21054. without specifying the bounding box for the motion vector search.
  21055. </p>
  21056. <p>Default - search the whole frame.
  21057. </p>
  21058. </dd>
  21059. <dt>&lsquo;<samp>rx</samp>&rsquo;</dt>
  21060. <dt>&lsquo;<samp>ry</samp>&rsquo;</dt>
  21061. <dd><p>Specify the maximum extent of movement in x and y directions in the
  21062. range 0-64 pixels. Default 16.
  21063. </p>
  21064. </dd>
  21065. <dt>&lsquo;<samp>edge</samp>&rsquo;</dt>
  21066. <dd><p>Specify how to generate pixels to fill blanks at the edge of the
  21067. frame. Available values are:
  21068. </p><dl compact="compact">
  21069. <dt>&lsquo;<samp>blank, 0</samp>&rsquo;</dt>
  21070. <dd><p>Fill zeroes at blank locations
  21071. </p></dd>
  21072. <dt>&lsquo;<samp>original, 1</samp>&rsquo;</dt>
  21073. <dd><p>Original image at blank locations
  21074. </p></dd>
  21075. <dt>&lsquo;<samp>clamp, 2</samp>&rsquo;</dt>
  21076. <dd><p>Extruded edge value at blank locations
  21077. </p></dd>
  21078. <dt>&lsquo;<samp>mirror, 3</samp>&rsquo;</dt>
  21079. <dd><p>Mirrored edge at blank locations
  21080. </p></dd>
  21081. </dl>
  21082. <p>Default value is &lsquo;<samp>mirror</samp>&rsquo;.
  21083. </p>
  21084. </dd>
  21085. <dt>&lsquo;<samp>blocksize</samp>&rsquo;</dt>
  21086. <dd><p>Specify the blocksize to use for motion search. Range 4-128 pixels,
  21087. default 8.
  21088. </p>
  21089. </dd>
  21090. <dt>&lsquo;<samp>contrast</samp>&rsquo;</dt>
  21091. <dd><p>Specify the contrast threshold for blocks. Only blocks with more than
  21092. the specified contrast (difference between darkest and lightest
  21093. pixels) will be considered. Range 1-255, default 125.
  21094. </p>
  21095. </dd>
  21096. <dt>&lsquo;<samp>search</samp>&rsquo;</dt>
  21097. <dd><p>Specify the search strategy. Available values are:
  21098. </p><dl compact="compact">
  21099. <dt>&lsquo;<samp>exhaustive, 0</samp>&rsquo;</dt>
  21100. <dd><p>Set exhaustive search
  21101. </p></dd>
  21102. <dt>&lsquo;<samp>less, 1</samp>&rsquo;</dt>
  21103. <dd><p>Set less exhaustive search.
  21104. </p></dd>
  21105. </dl>
  21106. <p>Default value is &lsquo;<samp>exhaustive</samp>&rsquo;.
  21107. </p>
  21108. </dd>
  21109. <dt>&lsquo;<samp>filename</samp>&rsquo;</dt>
  21110. <dd><p>If set then a detailed log of the motion search is written to the
  21111. specified file.
  21112. </p>
  21113. </dd>
  21114. </dl>
  21115. <a name="despill"></a>
  21116. <h2 class="section"><a href="ffplay-all.html#toc-despill">30.52 despill</a></h2>
  21117. <p>Remove unwanted contamination of foreground colors, caused by reflected color of
  21118. greenscreen or bluescreen.
  21119. </p>
  21120. <p>This filter accepts the following options:
  21121. </p>
  21122. <dl compact="compact">
  21123. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  21124. <dd><p>Set what type of despill to use.
  21125. </p>
  21126. </dd>
  21127. <dt>&lsquo;<samp>mix</samp>&rsquo;</dt>
  21128. <dd><p>Set how spillmap will be generated.
  21129. </p>
  21130. </dd>
  21131. <dt>&lsquo;<samp>expand</samp>&rsquo;</dt>
  21132. <dd><p>Set how much to get rid of still remaining spill.
  21133. </p>
  21134. </dd>
  21135. <dt>&lsquo;<samp>red</samp>&rsquo;</dt>
  21136. <dd><p>Controls amount of red in spill area.
  21137. </p>
  21138. </dd>
  21139. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  21140. <dd><p>Controls amount of green in spill area.
  21141. Should be -1 for greenscreen.
  21142. </p>
  21143. </dd>
  21144. <dt>&lsquo;<samp>blue</samp>&rsquo;</dt>
  21145. <dd><p>Controls amount of blue in spill area.
  21146. Should be -1 for bluescreen.
  21147. </p>
  21148. </dd>
  21149. <dt>&lsquo;<samp>brightness</samp>&rsquo;</dt>
  21150. <dd><p>Controls brightness of spill area, preserving colors.
  21151. </p>
  21152. </dd>
  21153. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  21154. <dd><p>Modify alpha from generated spillmap.
  21155. </p></dd>
  21156. </dl>
  21157. <a name="detelecine"></a>
  21158. <h2 class="section"><a href="ffplay-all.html#toc-detelecine">30.53 detelecine</a></h2>
  21159. <p>Apply an exact inverse of the telecine operation. It requires a predefined
  21160. pattern specified using the pattern option which must be the same as that passed
  21161. to the telecine filter.
  21162. </p>
  21163. <p>This filter accepts the following options:
  21164. </p>
  21165. <dl compact="compact">
  21166. <dt>&lsquo;<samp>first_field</samp>&rsquo;</dt>
  21167. <dd><dl compact="compact">
  21168. <dt>&lsquo;<samp>top, t</samp>&rsquo;</dt>
  21169. <dd><p>top field first
  21170. </p></dd>
  21171. <dt>&lsquo;<samp>bottom, b</samp>&rsquo;</dt>
  21172. <dd><p>bottom field first
  21173. The default value is <code>top</code>.
  21174. </p></dd>
  21175. </dl>
  21176. </dd>
  21177. <dt>&lsquo;<samp>pattern</samp>&rsquo;</dt>
  21178. <dd><p>A string of numbers representing the pulldown pattern you wish to apply.
  21179. The default value is <code>23</code>.
  21180. </p>
  21181. </dd>
  21182. <dt>&lsquo;<samp>start_frame</samp>&rsquo;</dt>
  21183. <dd><p>A number representing position of the first frame with respect to the telecine
  21184. pattern. This is to be used if the stream is cut. The default value is <code>0</code>.
  21185. </p></dd>
  21186. </dl>
  21187. <a name="dilation"></a>
  21188. <h2 class="section"><a href="ffplay-all.html#toc-dilation">30.54 dilation</a></h2>
  21189. <p>Apply dilation effect to the video.
  21190. </p>
  21191. <p>This filter replaces the pixel by the local(3x3) maximum.
  21192. </p>
  21193. <p>It accepts the following options:
  21194. </p>
  21195. <dl compact="compact">
  21196. <dt>&lsquo;<samp>threshold0</samp>&rsquo;</dt>
  21197. <dt>&lsquo;<samp>threshold1</samp>&rsquo;</dt>
  21198. <dt>&lsquo;<samp>threshold2</samp>&rsquo;</dt>
  21199. <dt>&lsquo;<samp>threshold3</samp>&rsquo;</dt>
  21200. <dd><p>Limit the maximum change for each plane, default is 65535.
  21201. If 0, plane will remain unchanged.
  21202. </p>
  21203. </dd>
  21204. <dt>&lsquo;<samp>coordinates</samp>&rsquo;</dt>
  21205. <dd><p>Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
  21206. pixels are used.
  21207. </p>
  21208. <p>Flags to local 3x3 coordinates maps like this:
  21209. </p>
  21210. <p> 1 2 3
  21211. 4 5
  21212. 6 7 8
  21213. </p></dd>
  21214. </dl>
  21215. <a name="Commands-43"></a>
  21216. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-43">30.54.1 Commands</a></h3>
  21217. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  21218. </p>
  21219. <a name="displace"></a>
  21220. <h2 class="section"><a href="ffplay-all.html#toc-displace">30.55 displace</a></h2>
  21221. <p>Displace pixels as indicated by second and third input stream.
  21222. </p>
  21223. <p>It takes three input streams and outputs one stream, the first input is the
  21224. source, and second and third input are displacement maps.
  21225. </p>
  21226. <p>The second input specifies how much to displace pixels along the
  21227. x-axis, while the third input specifies how much to displace pixels
  21228. along the y-axis.
  21229. If one of displacement map streams terminates, last frame from that
  21230. displacement map will be used.
  21231. </p>
  21232. <p>Note that once generated, displacements maps can be reused over and over again.
  21233. </p>
  21234. <p>A description of the accepted options follows.
  21235. </p>
  21236. <dl compact="compact">
  21237. <dt>&lsquo;<samp>edge</samp>&rsquo;</dt>
  21238. <dd><p>Set displace behavior for pixels that are out of range.
  21239. </p>
  21240. <p>Available values are:
  21241. </p><dl compact="compact">
  21242. <dt>&lsquo;<samp>blank</samp>&rsquo;</dt>
  21243. <dd><p>Missing pixels are replaced by black pixels.
  21244. </p>
  21245. </dd>
  21246. <dt>&lsquo;<samp>smear</samp>&rsquo;</dt>
  21247. <dd><p>Adjacent pixels will spread out to replace missing pixels.
  21248. </p>
  21249. </dd>
  21250. <dt>&lsquo;<samp>wrap</samp>&rsquo;</dt>
  21251. <dd><p>Out of range pixels are wrapped so they point to pixels of other side.
  21252. </p>
  21253. </dd>
  21254. <dt>&lsquo;<samp>mirror</samp>&rsquo;</dt>
  21255. <dd><p>Out of range pixels will be replaced with mirrored pixels.
  21256. </p></dd>
  21257. </dl>
  21258. <p>Default is &lsquo;<samp>smear</samp>&rsquo;.
  21259. </p>
  21260. </dd>
  21261. </dl>
  21262. <a name="Examples-64"></a>
  21263. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-64">30.55.1 Examples</a></h3>
  21264. <ul>
  21265. <li>
  21266. Add ripple effect to rgb input of video size hd720:
  21267. <div class="example">
  21268. <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
  21269. </pre></div>
  21270. </li><li>
  21271. Add wave effect to rgb input of video size hd720:
  21272. <div class="example">
  21273. <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
  21274. </pre></div>
  21275. </li></ul>
  21276. <a name="dnn_005fprocessing"></a>
  21277. <h2 class="section"><a href="ffplay-all.html#toc-dnn_005fprocessing">30.56 dnn_processing</a></h2>
  21278. <p>Do image processing with deep neural networks. It works together with another filter
  21279. which converts the pixel format of the Frame to what the dnn network requires.
  21280. </p>
  21281. <p>The filter accepts the following options:
  21282. </p>
  21283. <dl compact="compact">
  21284. <dt>&lsquo;<samp>dnn_backend</samp>&rsquo;</dt>
  21285. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  21286. the following values:
  21287. </p>
  21288. <dl compact="compact">
  21289. <dt>&lsquo;<samp>native</samp>&rsquo;</dt>
  21290. <dd><p>Native implementation of DNN loading and execution.
  21291. </p>
  21292. </dd>
  21293. <dt>&lsquo;<samp>tensorflow</samp>&rsquo;</dt>
  21294. <dd><p>TensorFlow backend. To enable this backend you
  21295. need to install the TensorFlow for C library (see
  21296. <a href="https://www.tensorflow.org/install/install_c">https://www.tensorflow.org/install/install_c</a>) and configure FFmpeg with
  21297. <code>--enable-libtensorflow</code>
  21298. </p></dd>
  21299. </dl>
  21300. <p>Default value is &lsquo;<samp>native</samp>&rsquo;.
  21301. </p>
  21302. </dd>
  21303. <dt>&lsquo;<samp>model</samp>&rsquo;</dt>
  21304. <dd><p>Set path to model file specifying network architecture and its parameters.
  21305. Note that different backends use different file formats. TensorFlow and native
  21306. backend can load files for only its format.
  21307. </p>
  21308. <p>Native model file (.model) can be generated from TensorFlow model file (.pb) by using tools/python/convert.py
  21309. </p>
  21310. </dd>
  21311. <dt>&lsquo;<samp>input</samp>&rsquo;</dt>
  21312. <dd><p>Set the input name of the dnn network.
  21313. </p>
  21314. </dd>
  21315. <dt>&lsquo;<samp>output</samp>&rsquo;</dt>
  21316. <dd><p>Set the output name of the dnn network.
  21317. </p>
  21318. </dd>
  21319. </dl>
  21320. <ul>
  21321. <li>
  21322. Halve the red channle of the frame with format rgb24:
  21323. <div class="example">
  21324. <pre class="example">ffmpeg -i input.jpg -vf format=rgb24,dnn_processing=model=halve_first_channel.model:input=dnn_in:output=dnn_out:dnn_backend=native out.native.png
  21325. </pre></div>
  21326. </li><li>
  21327. Halve the pixel value of the frame with format gray32f:
  21328. <div class="example">
  21329. <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
  21330. </pre></div>
  21331. </li></ul>
  21332. <a name="drawbox"></a>
  21333. <h2 class="section"><a href="ffplay-all.html#toc-drawbox">30.57 drawbox</a></h2>
  21334. <p>Draw a colored box on the input image.
  21335. </p>
  21336. <p>It accepts the following parameters:
  21337. </p>
  21338. <dl compact="compact">
  21339. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  21340. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  21341. <dd><p>The expressions which specify the top left corner coordinates of the box. It defaults to 0.
  21342. </p>
  21343. </dd>
  21344. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  21345. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  21346. <dd><p>The expressions which specify the width and height of the box; if 0 they are interpreted as
  21347. the input width and height. It defaults to 0.
  21348. </p>
  21349. </dd>
  21350. <dt>&lsquo;<samp>color, c</samp>&rsquo;</dt>
  21351. <dd><p>Specify the color of the box to write. For the general syntax of this option,
  21352. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>. If the special
  21353. value <code>invert</code> is used, the box edge color is the same as the
  21354. video with inverted luma.
  21355. </p>
  21356. </dd>
  21357. <dt>&lsquo;<samp>thickness, t</samp>&rsquo;</dt>
  21358. <dd><p>The expression which sets the thickness of the box edge.
  21359. A value of <code>fill</code> will create a filled box. Default value is <code>3</code>.
  21360. </p>
  21361. <p>See below for the list of accepted constants.
  21362. </p>
  21363. </dd>
  21364. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  21365. <dd><p>Applicable if the input has alpha. With value <code>1</code>, the pixels of the painted box
  21366. will overwrite the video&rsquo;s color and alpha pixels.
  21367. Default is <code>0</code>, which composites the box onto the input, leaving the video&rsquo;s alpha intact.
  21368. </p></dd>
  21369. </dl>
  21370. <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
  21371. following constants:
  21372. </p>
  21373. <dl compact="compact">
  21374. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  21375. <dd><p>The input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>.
  21376. </p>
  21377. </dd>
  21378. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  21379. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  21380. <dd><p>horizontal and vertical chroma subsample values. For example for the
  21381. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  21382. </p>
  21383. </dd>
  21384. <dt>&lsquo;<samp>in_h, ih</samp>&rsquo;</dt>
  21385. <dt>&lsquo;<samp>in_w, iw</samp>&rsquo;</dt>
  21386. <dd><p>The input width and height.
  21387. </p>
  21388. </dd>
  21389. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  21390. <dd><p>The input sample aspect ratio.
  21391. </p>
  21392. </dd>
  21393. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  21394. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  21395. <dd><p>The x and y offset coordinates where the box is drawn.
  21396. </p>
  21397. </dd>
  21398. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  21399. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  21400. <dd><p>The width and height of the drawn box.
  21401. </p>
  21402. </dd>
  21403. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  21404. <dd><p>The thickness of the drawn box.
  21405. </p>
  21406. <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
  21407. each other, so you may for example specify <code>y=x/dar</code> or <code>h=w/dar</code>.
  21408. </p>
  21409. </dd>
  21410. </dl>
  21411. <a name="Examples-76"></a>
  21412. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-76">30.57.1 Examples</a></h3>
  21413. <ul>
  21414. <li>
  21415. Draw a black box around the edge of the input image:
  21416. <div class="example">
  21417. <pre class="example">drawbox
  21418. </pre></div>
  21419. </li><li>
  21420. Draw a box with color red and an opacity of 50%:
  21421. <div class="example">
  21422. <pre class="example">drawbox=10:20:200:60:red@0.5
  21423. </pre></div>
  21424. <p>The previous example can be specified as:
  21425. </p><div class="example">
  21426. <pre class="example">drawbox=x=10:y=20:w=200:h=60:color=red@0.5
  21427. </pre></div>
  21428. </li><li>
  21429. Fill the box with pink color:
  21430. <div class="example">
  21431. <pre class="example">drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=fill
  21432. </pre></div>
  21433. </li><li>
  21434. Draw a 2-pixel red 2.40:1 mask:
  21435. <div class="example">
  21436. <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
  21437. </pre></div>
  21438. </li></ul>
  21439. <a name="Commands-62"></a>
  21440. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-62">30.57.2 Commands</a></h3>
  21441. <p>This filter supports same commands as options.
  21442. The command accepts the same syntax of the corresponding option.
  21443. </p>
  21444. <p>If the specified expression is not valid, it is kept at its current
  21445. value.
  21446. </p>
  21447. <p><a name="drawgraph"></a>
  21448. </p><a name="drawgraph-1"></a>
  21449. <h2 class="section"><a href="ffplay-all.html#toc-drawgraph-1">30.58 drawgraph</a></h2>
  21450. <p>Draw a graph using input video metadata.
  21451. </p>
  21452. <p>It accepts the following parameters:
  21453. </p>
  21454. <dl compact="compact">
  21455. <dt>&lsquo;<samp>m1</samp>&rsquo;</dt>
  21456. <dd><p>Set 1st frame metadata key from which metadata values will be used to draw a graph.
  21457. </p>
  21458. </dd>
  21459. <dt>&lsquo;<samp>fg1</samp>&rsquo;</dt>
  21460. <dd><p>Set 1st foreground color expression.
  21461. </p>
  21462. </dd>
  21463. <dt>&lsquo;<samp>m2</samp>&rsquo;</dt>
  21464. <dd><p>Set 2nd frame metadata key from which metadata values will be used to draw a graph.
  21465. </p>
  21466. </dd>
  21467. <dt>&lsquo;<samp>fg2</samp>&rsquo;</dt>
  21468. <dd><p>Set 2nd foreground color expression.
  21469. </p>
  21470. </dd>
  21471. <dt>&lsquo;<samp>m3</samp>&rsquo;</dt>
  21472. <dd><p>Set 3rd frame metadata key from which metadata values will be used to draw a graph.
  21473. </p>
  21474. </dd>
  21475. <dt>&lsquo;<samp>fg3</samp>&rsquo;</dt>
  21476. <dd><p>Set 3rd foreground color expression.
  21477. </p>
  21478. </dd>
  21479. <dt>&lsquo;<samp>m4</samp>&rsquo;</dt>
  21480. <dd><p>Set 4th frame metadata key from which metadata values will be used to draw a graph.
  21481. </p>
  21482. </dd>
  21483. <dt>&lsquo;<samp>fg4</samp>&rsquo;</dt>
  21484. <dd><p>Set 4th foreground color expression.
  21485. </p>
  21486. </dd>
  21487. <dt>&lsquo;<samp>min</samp>&rsquo;</dt>
  21488. <dd><p>Set minimal value of metadata value.
  21489. </p>
  21490. </dd>
  21491. <dt>&lsquo;<samp>max</samp>&rsquo;</dt>
  21492. <dd><p>Set maximal value of metadata value.
  21493. </p>
  21494. </dd>
  21495. <dt>&lsquo;<samp>bg</samp>&rsquo;</dt>
  21496. <dd><p>Set graph background color. Default is white.
  21497. </p>
  21498. </dd>
  21499. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  21500. <dd><p>Set graph mode.
  21501. </p>
  21502. <p>Available values for mode is:
  21503. </p><dl compact="compact">
  21504. <dt>&lsquo;<samp>bar</samp>&rsquo;</dt>
  21505. <dt>&lsquo;<samp>dot</samp>&rsquo;</dt>
  21506. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  21507. </dl>
  21508. <p>Default is <code>line</code>.
  21509. </p>
  21510. </dd>
  21511. <dt>&lsquo;<samp>slide</samp>&rsquo;</dt>
  21512. <dd><p>Set slide mode.
  21513. </p>
  21514. <p>Available values for slide is:
  21515. </p><dl compact="compact">
  21516. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  21517. <dd><p>Draw new frame when right border is reached.
  21518. </p>
  21519. </dd>
  21520. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  21521. <dd><p>Replace old columns with new ones.
  21522. </p>
  21523. </dd>
  21524. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  21525. <dd><p>Scroll from right to left.
  21526. </p>
  21527. </dd>
  21528. <dt>&lsquo;<samp>rscroll</samp>&rsquo;</dt>
  21529. <dd><p>Scroll from left to right.
  21530. </p>
  21531. </dd>
  21532. <dt>&lsquo;<samp>picture</samp>&rsquo;</dt>
  21533. <dd><p>Draw single picture.
  21534. </p></dd>
  21535. </dl>
  21536. <p>Default is <code>frame</code>.
  21537. </p>
  21538. </dd>
  21539. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  21540. <dd><p>Set size of graph video. For the syntax of this option, check the
  21541. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  21542. The default value is <code>900x256</code>.
  21543. </p>
  21544. </dd>
  21545. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  21546. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  21547. </p>
  21548. <p>The foreground color expressions can use the following variables:
  21549. </p><dl compact="compact">
  21550. <dt>&lsquo;<samp>MIN</samp>&rsquo;</dt>
  21551. <dd><p>Minimal value of metadata value.
  21552. </p>
  21553. </dd>
  21554. <dt>&lsquo;<samp>MAX</samp>&rsquo;</dt>
  21555. <dd><p>Maximal value of metadata value.
  21556. </p>
  21557. </dd>
  21558. <dt>&lsquo;<samp>VAL</samp>&rsquo;</dt>
  21559. <dd><p>Current metadata key value.
  21560. </p></dd>
  21561. </dl>
  21562. <p>The color is defined as 0xAABBGGRR.
  21563. </p></dd>
  21564. </dl>
  21565. <p>Example using metadata from <a href="#signalstats">signalstats</a> filter:
  21566. </p><div class="example">
  21567. <pre class="example">signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
  21568. </pre></div>
  21569. <p>Example using metadata from <a href="#ebur128">ebur128</a> filter:
  21570. </p><div class="example">
  21571. <pre class="example">ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5
  21572. </pre></div>
  21573. <a name="drawgrid"></a>
  21574. <h2 class="section"><a href="ffplay-all.html#toc-drawgrid">30.59 drawgrid</a></h2>
  21575. <p>Draw a grid on the input image.
  21576. </p>
  21577. <p>It accepts the following parameters:
  21578. </p>
  21579. <dl compact="compact">
  21580. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  21581. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  21582. <dd><p>The expressions which specify the coordinates of some point of grid intersection (meant to configure offset). Both default to 0.
  21583. </p>
  21584. </dd>
  21585. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  21586. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  21587. <dd><p>The expressions which specify the width and height of the grid cell, if 0 they are interpreted as the
  21588. input width and height, respectively, minus <code>thickness</code>, so image gets
  21589. framed. Default to 0.
  21590. </p>
  21591. </dd>
  21592. <dt>&lsquo;<samp>color, c</samp>&rsquo;</dt>
  21593. <dd><p>Specify the color of the grid. For the general syntax of this option,
  21594. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>. If the special
  21595. value <code>invert</code> is used, the grid color is the same as the
  21596. video with inverted luma.
  21597. </p>
  21598. </dd>
  21599. <dt>&lsquo;<samp>thickness, t</samp>&rsquo;</dt>
  21600. <dd><p>The expression which sets the thickness of the grid line. Default value is <code>1</code>.
  21601. </p>
  21602. <p>See below for the list of accepted constants.
  21603. </p>
  21604. </dd>
  21605. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  21606. <dd><p>Applicable if the input has alpha. With <code>1</code> the pixels of the painted grid
  21607. will overwrite the video&rsquo;s color and alpha pixels.
  21608. Default is <code>0</code>, which composites the grid onto the input, leaving the video&rsquo;s alpha intact.
  21609. </p></dd>
  21610. </dl>
  21611. <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
  21612. following constants:
  21613. </p>
  21614. <dl compact="compact">
  21615. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  21616. <dd><p>The input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>.
  21617. </p>
  21618. </dd>
  21619. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  21620. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  21621. <dd><p>horizontal and vertical chroma subsample values. For example for the
  21622. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  21623. </p>
  21624. </dd>
  21625. <dt>&lsquo;<samp>in_h, ih</samp>&rsquo;</dt>
  21626. <dt>&lsquo;<samp>in_w, iw</samp>&rsquo;</dt>
  21627. <dd><p>The input grid cell width and height.
  21628. </p>
  21629. </dd>
  21630. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  21631. <dd><p>The input sample aspect ratio.
  21632. </p>
  21633. </dd>
  21634. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  21635. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  21636. <dd><p>The x and y coordinates of some point of grid intersection (meant to configure offset).
  21637. </p>
  21638. </dd>
  21639. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  21640. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  21641. <dd><p>The width and height of the drawn cell.
  21642. </p>
  21643. </dd>
  21644. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  21645. <dd><p>The thickness of the drawn cell.
  21646. </p>
  21647. <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
  21648. each other, so you may for example specify <code>y=x/dar</code> or <code>h=w/dar</code>.
  21649. </p>
  21650. </dd>
  21651. </dl>
  21652. <a name="Examples-141"></a>
  21653. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-141">30.59.1 Examples</a></h3>
  21654. <ul>
  21655. <li>
  21656. Draw a grid with cell 100x100 pixels, thickness 2 pixels, with color red and an opacity of 50%:
  21657. <div class="example">
  21658. <pre class="example">drawgrid=width=100:height=100:thickness=2:color=red@0.5
  21659. </pre></div>
  21660. </li><li>
  21661. Draw a white 3x3 grid with an opacity of 50%:
  21662. <div class="example">
  21663. <pre class="example">drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5
  21664. </pre></div>
  21665. </li></ul>
  21666. <a name="Commands-48"></a>
  21667. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-48">30.59.2 Commands</a></h3>
  21668. <p>This filter supports same commands as options.
  21669. The command accepts the same syntax of the corresponding option.
  21670. </p>
  21671. <p>If the specified expression is not valid, it is kept at its current
  21672. value.
  21673. </p>
  21674. <p><a name="drawtext"></a>
  21675. </p><a name="drawtext-1"></a>
  21676. <h2 class="section"><a href="ffplay-all.html#toc-drawtext-1">30.60 drawtext</a></h2>
  21677. <p>Draw a text string or text from a specified file on top of a video, using the
  21678. libfreetype library.
  21679. </p>
  21680. <p>To enable compilation of this filter, you need to configure FFmpeg with
  21681. <code>--enable-libfreetype</code>.
  21682. To enable default font fallback and the <var>font</var> option you need to
  21683. configure FFmpeg with <code>--enable-libfontconfig</code>.
  21684. To enable the <var>text_shaping</var> option, you need to configure FFmpeg with
  21685. <code>--enable-libfribidi</code>.
  21686. </p>
  21687. <a name="Syntax"></a>
  21688. <h3 class="subsection"><a href="ffplay-all.html#toc-Syntax">30.60.1 Syntax</a></h3>
  21689. <p>It accepts the following parameters:
  21690. </p>
  21691. <dl compact="compact">
  21692. <dt>&lsquo;<samp>box</samp>&rsquo;</dt>
  21693. <dd><p>Used to draw a box around text using the background color.
  21694. The value must be either 1 (enable) or 0 (disable).
  21695. The default value of <var>box</var> is 0.
  21696. </p>
  21697. </dd>
  21698. <dt>&lsquo;<samp>boxborderw</samp>&rsquo;</dt>
  21699. <dd><p>Set the width of the border to be drawn around the box using <var>boxcolor</var>.
  21700. The default value of <var>boxborderw</var> is 0.
  21701. </p>
  21702. </dd>
  21703. <dt>&lsquo;<samp>boxcolor</samp>&rsquo;</dt>
  21704. <dd><p>The color to be used for drawing box around text. For the syntax of this
  21705. option, check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  21706. </p>
  21707. <p>The default value of <var>boxcolor</var> is &quot;white&quot;.
  21708. </p>
  21709. </dd>
  21710. <dt>&lsquo;<samp>line_spacing</samp>&rsquo;</dt>
  21711. <dd><p>Set the line spacing in pixels of the border to be drawn around the box using <var>box</var>.
  21712. The default value of <var>line_spacing</var> is 0.
  21713. </p>
  21714. </dd>
  21715. <dt>&lsquo;<samp>borderw</samp>&rsquo;</dt>
  21716. <dd><p>Set the width of the border to be drawn around the text using <var>bordercolor</var>.
  21717. The default value of <var>borderw</var> is 0.
  21718. </p>
  21719. </dd>
  21720. <dt>&lsquo;<samp>bordercolor</samp>&rsquo;</dt>
  21721. <dd><p>Set the color to be used for drawing border around text. For the syntax of this
  21722. option, check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  21723. </p>
  21724. <p>The default value of <var>bordercolor</var> is &quot;black&quot;.
  21725. </p>
  21726. </dd>
  21727. <dt>&lsquo;<samp>expansion</samp>&rsquo;</dt>
  21728. <dd><p>Select how the <var>text</var> is expanded. Can be either <code>none</code>,
  21729. <code>strftime</code> (deprecated) or
  21730. <code>normal</code> (default). See the <a href="#drawtext_005fexpansion">Text expansion</a> section
  21731. below for details.
  21732. </p>
  21733. </dd>
  21734. <dt>&lsquo;<samp>basetime</samp>&rsquo;</dt>
  21735. <dd><p>Set a start time for the count. Value is in microseconds. Only applied
  21736. in the deprecated strftime expansion mode. To emulate in normal expansion
  21737. mode use the <code>pts</code> function, supplying the start time (in seconds)
  21738. as the second argument.
  21739. </p>
  21740. </dd>
  21741. <dt>&lsquo;<samp>fix_bounds</samp>&rsquo;</dt>
  21742. <dd><p>If true, check and fix text coords to avoid clipping.
  21743. </p>
  21744. </dd>
  21745. <dt>&lsquo;<samp>fontcolor</samp>&rsquo;</dt>
  21746. <dd><p>The color to be used for drawing fonts. For the syntax of this option, check
  21747. the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  21748. </p>
  21749. <p>The default value of <var>fontcolor</var> is &quot;black&quot;.
  21750. </p>
  21751. </dd>
  21752. <dt>&lsquo;<samp>fontcolor_expr</samp>&rsquo;</dt>
  21753. <dd><p>String which is expanded the same way as <var>text</var> to obtain dynamic
  21754. <var>fontcolor</var> value. By default this option has empty value and is not
  21755. processed. When this option is set, it overrides <var>fontcolor</var> option.
  21756. </p>
  21757. </dd>
  21758. <dt>&lsquo;<samp>font</samp>&rsquo;</dt>
  21759. <dd><p>The font family to be used for drawing text. By default Sans.
  21760. </p>
  21761. </dd>
  21762. <dt>&lsquo;<samp>fontfile</samp>&rsquo;</dt>
  21763. <dd><p>The font file to be used for drawing text. The path must be included.
  21764. This parameter is mandatory if the fontconfig support is disabled.
  21765. </p>
  21766. </dd>
  21767. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  21768. <dd><p>Draw the text applying alpha blending. The value can
  21769. be a number between 0.0 and 1.0.
  21770. The expression accepts the same variables <var>x, y</var> as well.
  21771. The default value is 1.
  21772. Please see <var>fontcolor_expr</var>.
  21773. </p>
  21774. </dd>
  21775. <dt>&lsquo;<samp>fontsize</samp>&rsquo;</dt>
  21776. <dd><p>The font size to be used for drawing text.
  21777. The default value of <var>fontsize</var> is 16.
  21778. </p>
  21779. </dd>
  21780. <dt>&lsquo;<samp>text_shaping</samp>&rsquo;</dt>
  21781. <dd><p>If set to 1, attempt to shape the text (for example, reverse the order of
  21782. right-to-left text and join Arabic characters) before drawing it.
  21783. Otherwise, just draw the text exactly as given.
  21784. By default 1 (if supported).
  21785. </p>
  21786. </dd>
  21787. <dt>&lsquo;<samp>ft_load_flags</samp>&rsquo;</dt>
  21788. <dd><p>The flags to be used for loading the fonts.
  21789. </p>
  21790. <p>The flags map the corresponding flags supported by libfreetype, and are
  21791. a combination of the following values:
  21792. </p><dl compact="compact">
  21793. <dt><var>default</var></dt>
  21794. <dt><var>no_scale</var></dt>
  21795. <dt><var>no_hinting</var></dt>
  21796. <dt><var>render</var></dt>
  21797. <dt><var>no_bitmap</var></dt>
  21798. <dt><var>vertical_layout</var></dt>
  21799. <dt><var>force_autohint</var></dt>
  21800. <dt><var>crop_bitmap</var></dt>
  21801. <dt><var>pedantic</var></dt>
  21802. <dt><var>ignore_global_advance_width</var></dt>
  21803. <dt><var>no_recurse</var></dt>
  21804. <dt><var>ignore_transform</var></dt>
  21805. <dt><var>monochrome</var></dt>
  21806. <dt><var>linear_design</var></dt>
  21807. <dt><var>no_autohint</var></dt>
  21808. </dl>
  21809. <p>Default value is &quot;default&quot;.
  21810. </p>
  21811. <p>For more information consult the documentation for the FT_LOAD_*
  21812. libfreetype flags.
  21813. </p>
  21814. </dd>
  21815. <dt>&lsquo;<samp>shadowcolor</samp>&rsquo;</dt>
  21816. <dd><p>The color to be used for drawing a shadow behind the drawn text. For the
  21817. syntax of this option, check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  21818. </p>
  21819. <p>The default value of <var>shadowcolor</var> is &quot;black&quot;.
  21820. </p>
  21821. </dd>
  21822. <dt>&lsquo;<samp>shadowx</samp>&rsquo;</dt>
  21823. <dt>&lsquo;<samp>shadowy</samp>&rsquo;</dt>
  21824. <dd><p>The x and y offsets for the text shadow position with respect to the
  21825. position of the text. They can be either positive or negative
  21826. values. The default value for both is &quot;0&quot;.
  21827. </p>
  21828. </dd>
  21829. <dt>&lsquo;<samp>start_number</samp>&rsquo;</dt>
  21830. <dd><p>The starting frame number for the n/frame_num variable. The default value
  21831. is &quot;0&quot;.
  21832. </p>
  21833. </dd>
  21834. <dt>&lsquo;<samp>tabsize</samp>&rsquo;</dt>
  21835. <dd><p>The size in number of spaces to use for rendering the tab.
  21836. Default value is 4.
  21837. </p>
  21838. </dd>
  21839. <dt>&lsquo;<samp>timecode</samp>&rsquo;</dt>
  21840. <dd><p>Set the initial timecode representation in &quot;hh:mm:ss[:;.]ff&quot;
  21841. format. It can be used with or without text parameter. <var>timecode_rate</var>
  21842. option must be specified.
  21843. </p>
  21844. </dd>
  21845. <dt>&lsquo;<samp>timecode_rate, rate, r</samp>&rsquo;</dt>
  21846. <dd><p>Set the timecode frame rate (timecode only). Value will be rounded to nearest
  21847. integer. Minimum value is &quot;1&quot;.
  21848. Drop-frame timecode is supported for frame rates 30 &amp; 60.
  21849. </p>
  21850. </dd>
  21851. <dt>&lsquo;<samp>tc24hmax</samp>&rsquo;</dt>
  21852. <dd><p>If set to 1, the output of the timecode option will wrap around at 24 hours.
  21853. Default is 0 (disabled).
  21854. </p>
  21855. </dd>
  21856. <dt>&lsquo;<samp>text</samp>&rsquo;</dt>
  21857. <dd><p>The text string to be drawn. The text must be a sequence of UTF-8
  21858. encoded characters.
  21859. This parameter is mandatory if no file is specified with the parameter
  21860. <var>textfile</var>.
  21861. </p>
  21862. </dd>
  21863. <dt>&lsquo;<samp>textfile</samp>&rsquo;</dt>
  21864. <dd><p>A text file containing text to be drawn. The text must be a sequence
  21865. of UTF-8 encoded characters.
  21866. </p>
  21867. <p>This parameter is mandatory if no text string is specified with the
  21868. parameter <var>text</var>.
  21869. </p>
  21870. <p>If both <var>text</var> and <var>textfile</var> are specified, an error is thrown.
  21871. </p>
  21872. </dd>
  21873. <dt>&lsquo;<samp>reload</samp>&rsquo;</dt>
  21874. <dd><p>If set to 1, the <var>textfile</var> will be reloaded before each frame.
  21875. Be sure to update it atomically, or it may be read partially, or even fail.
  21876. </p>
  21877. </dd>
  21878. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  21879. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  21880. <dd><p>The expressions which specify the offsets where text will be drawn
  21881. within the video frame. They are relative to the top/left border of the
  21882. output image.
  21883. </p>
  21884. <p>The default value of <var>x</var> and <var>y</var> is &quot;0&quot;.
  21885. </p>
  21886. <p>See below for the list of accepted constants and functions.
  21887. </p></dd>
  21888. </dl>
  21889. <p>The parameters for <var>x</var> and <var>y</var> are expressions containing the
  21890. following constants and functions:
  21891. </p>
  21892. <dl compact="compact">
  21893. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  21894. <dd><p>input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>
  21895. </p>
  21896. </dd>
  21897. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  21898. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  21899. <dd><p>horizontal and vertical chroma subsample values. For example for the
  21900. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  21901. </p>
  21902. </dd>
  21903. <dt>&lsquo;<samp>line_h, lh</samp>&rsquo;</dt>
  21904. <dd><p>the height of each text line
  21905. </p>
  21906. </dd>
  21907. <dt>&lsquo;<samp>main_h, h, H</samp>&rsquo;</dt>
  21908. <dd><p>the input height
  21909. </p>
  21910. </dd>
  21911. <dt>&lsquo;<samp>main_w, w, W</samp>&rsquo;</dt>
  21912. <dd><p>the input width
  21913. </p>
  21914. </dd>
  21915. <dt>&lsquo;<samp>max_glyph_a, ascent</samp>&rsquo;</dt>
  21916. <dd><p>the maximum distance from the baseline to the highest/upper grid
  21917. coordinate used to place a glyph outline point, for all the rendered
  21918. glyphs.
  21919. It is a positive value, due to the grid&rsquo;s orientation with the Y axis
  21920. upwards.
  21921. </p>
  21922. </dd>
  21923. <dt>&lsquo;<samp>max_glyph_d, descent</samp>&rsquo;</dt>
  21924. <dd><p>the maximum distance from the baseline to the lowest grid coordinate
  21925. used to place a glyph outline point, for all the rendered glyphs.
  21926. This is a negative value, due to the grid&rsquo;s orientation, with the Y axis
  21927. upwards.
  21928. </p>
  21929. </dd>
  21930. <dt>&lsquo;<samp>max_glyph_h</samp>&rsquo;</dt>
  21931. <dd><p>maximum glyph height, that is the maximum height for all the glyphs
  21932. contained in the rendered text, it is equivalent to <var>ascent</var> -
  21933. <var>descent</var>.
  21934. </p>
  21935. </dd>
  21936. <dt>&lsquo;<samp>max_glyph_w</samp>&rsquo;</dt>
  21937. <dd><p>maximum glyph width, that is the maximum width for all the glyphs
  21938. contained in the rendered text
  21939. </p>
  21940. </dd>
  21941. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  21942. <dd><p>the number of input frame, starting from 0
  21943. </p>
  21944. </dd>
  21945. <dt>&lsquo;<samp>rand(min, max)</samp>&rsquo;</dt>
  21946. <dd><p>return a random number included between <var>min</var> and <var>max</var>
  21947. </p>
  21948. </dd>
  21949. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  21950. <dd><p>The input sample aspect ratio.
  21951. </p>
  21952. </dd>
  21953. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  21954. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  21955. </p>
  21956. </dd>
  21957. <dt>&lsquo;<samp>text_h, th</samp>&rsquo;</dt>
  21958. <dd><p>the height of the rendered text
  21959. </p>
  21960. </dd>
  21961. <dt>&lsquo;<samp>text_w, tw</samp>&rsquo;</dt>
  21962. <dd><p>the width of the rendered text
  21963. </p>
  21964. </dd>
  21965. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  21966. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  21967. <dd><p>the x and y offset coordinates where the text is drawn.
  21968. </p>
  21969. <p>These parameters allow the <var>x</var> and <var>y</var> expressions to refer
  21970. to each other, so you can for example specify <code>y=x/dar</code>.
  21971. </p>
  21972. </dd>
  21973. <dt>&lsquo;<samp>pict_type</samp>&rsquo;</dt>
  21974. <dd><p>A one character description of the current frame&rsquo;s picture type.
  21975. </p>
  21976. </dd>
  21977. <dt>&lsquo;<samp>pkt_pos</samp>&rsquo;</dt>
  21978. <dd><p>The current packet&rsquo;s position in the input file or stream
  21979. (in bytes, from the start of the input). A value of -1 indicates
  21980. this info is not available.
  21981. </p>
  21982. </dd>
  21983. <dt>&lsquo;<samp>pkt_duration</samp>&rsquo;</dt>
  21984. <dd><p>The current packet&rsquo;s duration, in seconds.
  21985. </p>
  21986. </dd>
  21987. <dt>&lsquo;<samp>pkt_size</samp>&rsquo;</dt>
  21988. <dd><p>The current packet&rsquo;s size (in bytes).
  21989. </p></dd>
  21990. </dl>
  21991. <p><a name="drawtext_005fexpansion"></a>
  21992. </p><a name="Text-expansion"></a>
  21993. <h3 class="subsection"><a href="ffplay-all.html#toc-Text-expansion">30.60.2 Text expansion</a></h3>
  21994. <p>If &lsquo;<samp>expansion</samp>&rsquo; is set to <code>strftime</code>,
  21995. the filter recognizes strftime() sequences in the provided text and
  21996. expands them accordingly. Check the documentation of strftime(). This
  21997. feature is deprecated.
  21998. </p>
  21999. <p>If &lsquo;<samp>expansion</samp>&rsquo; is set to <code>none</code>, the text is printed verbatim.
  22000. </p>
  22001. <p>If &lsquo;<samp>expansion</samp>&rsquo; is set to <code>normal</code> (which is the default),
  22002. the following expansion mechanism is used.
  22003. </p>
  22004. <p>The backslash character &lsquo;<samp>\</samp>&rsquo;, followed by any character, always expands to
  22005. the second character.
  22006. </p>
  22007. <p>Sequences of the form <code>%{...}</code> are expanded. The text between the
  22008. braces is a function name, possibly followed by arguments separated by &rsquo;:&rsquo;.
  22009. If the arguments contain special characters or delimiters (&rsquo;:&rsquo; or &rsquo;}&rsquo;),
  22010. they should be escaped.
  22011. </p>
  22012. <p>Note that they probably must also be escaped as the value for the
  22013. &lsquo;<samp>text</samp>&rsquo; option in the filter argument string and as the filter
  22014. argument in the filtergraph description, and possibly also for the shell,
  22015. that makes up to four levels of escaping; using a text file avoids these
  22016. problems.
  22017. </p>
  22018. <p>The following functions are available:
  22019. </p>
  22020. <dl compact="compact">
  22021. <dt><code>expr, e</code></dt>
  22022. <dd><p>The expression evaluation result.
  22023. </p>
  22024. <p>It must take one argument specifying the expression to be evaluated,
  22025. which accepts the same constants and functions as the <var>x</var> and
  22026. <var>y</var> values. Note that not all constants should be used, for
  22027. example the text size is not known when evaluating the expression, so
  22028. the constants <var>text_w</var> and <var>text_h</var> will have an undefined
  22029. value.
  22030. </p>
  22031. </dd>
  22032. <dt><code>expr_int_format, eif</code></dt>
  22033. <dd><p>Evaluate the expression&rsquo;s value and output as formatted integer.
  22034. </p>
  22035. <p>The first argument is the expression to be evaluated, just as for the <var>expr</var> function.
  22036. The second argument specifies the output format. Allowed values are &lsquo;<samp>x</samp>&rsquo;,
  22037. &lsquo;<samp>X</samp>&rsquo;, &lsquo;<samp>d</samp>&rsquo; and &lsquo;<samp>u</samp>&rsquo;. They are treated exactly as in the
  22038. <code>printf</code> function.
  22039. The third parameter is optional and sets the number of positions taken by the output.
  22040. It can be used to add padding with zeros from the left.
  22041. </p>
  22042. </dd>
  22043. <dt><code>gmtime</code></dt>
  22044. <dd><p>The time at which the filter is running, expressed in UTC.
  22045. It can accept an argument: a strftime() format string.
  22046. </p>
  22047. </dd>
  22048. <dt><code>localtime</code></dt>
  22049. <dd><p>The time at which the filter is running, expressed in the local time zone.
  22050. It can accept an argument: a strftime() format string.
  22051. </p>
  22052. </dd>
  22053. <dt><code>metadata</code></dt>
  22054. <dd><p>Frame metadata. Takes one or two arguments.
  22055. </p>
  22056. <p>The first argument is mandatory and specifies the metadata key.
  22057. </p>
  22058. <p>The second argument is optional and specifies a default value, used when the
  22059. metadata key is not found or empty.
  22060. </p>
  22061. <p>Available metadata can be identified by inspecting entries
  22062. starting with TAG included within each frame section
  22063. printed by running <code>ffprobe -show_frames</code>.
  22064. </p>
  22065. <p>String metadata generated in filters leading to
  22066. the drawtext filter are also available.
  22067. </p>
  22068. </dd>
  22069. <dt><code>n, frame_num</code></dt>
  22070. <dd><p>The frame number, starting from 0.
  22071. </p>
  22072. </dd>
  22073. <dt><code>pict_type</code></dt>
  22074. <dd><p>A one character description of the current picture type.
  22075. </p>
  22076. </dd>
  22077. <dt><code>pts</code></dt>
  22078. <dd><p>The timestamp of the current frame.
  22079. It can take up to three arguments.
  22080. </p>
  22081. <p>The first argument is the format of the timestamp; it defaults to <code>flt</code>
  22082. for seconds as a decimal number with microsecond accuracy; <code>hms</code> stands
  22083. for a formatted <var>[-]HH:MM:SS.mmm</var> timestamp with millisecond accuracy.
  22084. <code>gmtime</code> stands for the timestamp of the frame formatted as UTC time;
  22085. <code>localtime</code> stands for the timestamp of the frame formatted as
  22086. local time zone time.
  22087. </p>
  22088. <p>The second argument is an offset added to the timestamp.
  22089. </p>
  22090. <p>If the format is set to <code>hms</code>, a third argument <code>24HH</code> may be
  22091. supplied to present the hour part of the formatted timestamp in 24h format
  22092. (00-23).
  22093. </p>
  22094. <p>If the format is set to <code>localtime</code> or <code>gmtime</code>,
  22095. a third argument may be supplied: a strftime() format string.
  22096. By default, <var>YYYY-MM-DD HH:MM:SS</var> format will be used.
  22097. </p></dd>
  22098. </dl>
  22099. <a name="Commands-38"></a>
  22100. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-38">30.60.3 Commands</a></h3>
  22101. <p>This filter supports altering parameters via commands:
  22102. </p><dl compact="compact">
  22103. <dt>&lsquo;<samp>reinit</samp>&rsquo;</dt>
  22104. <dd><p>Alter existing filter parameters.
  22105. </p>
  22106. <p>Syntax for the argument is the same as for filter invocation, e.g.
  22107. </p>
  22108. <div class="example">
  22109. <pre class="example">fontsize=56:fontcolor=green:text='Hello World'
  22110. </pre></div>
  22111. <p>Full filter invocation with sendcmd would look like this:
  22112. </p>
  22113. <div class="example">
  22114. <pre class="example">sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World'
  22115. </pre></div>
  22116. </dd>
  22117. </dl>
  22118. <p>If the entire argument can&rsquo;t be parsed or applied as valid values then the filter will
  22119. continue with its existing parameters.
  22120. </p>
  22121. <a name="Examples-27"></a>
  22122. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-27">30.60.4 Examples</a></h3>
  22123. <ul>
  22124. <li>
  22125. Draw &quot;Test Text&quot; with font FreeSerif, using the default values for the
  22126. optional parameters.
  22127. <div class="example">
  22128. <pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'&quot;
  22129. </pre></div>
  22130. </li><li>
  22131. Draw &rsquo;Test Text&rsquo; with font FreeSerif of size 24 at position x=100
  22132. and y=50 (counting from the top-left corner of the screen), text is
  22133. yellow with a red box around it. Both the text and the box have an
  22134. opacity of 20%.
  22135. <div class="example">
  22136. <pre class="example">drawtext=&quot;fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
  22137. x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2&quot;
  22138. </pre></div>
  22139. <p>Note that the double quotes are not necessary if spaces are not used
  22140. within the parameter list.
  22141. </p>
  22142. </li><li>
  22143. Show the text at the center of the video frame:
  22144. <div class="example">
  22145. <pre class="example">drawtext=&quot;fontsize=30:fontfile=FreeSerif.ttf:text='hello world':x=(w-text_w)/2:y=(h-text_h)/2&quot;
  22146. </pre></div>
  22147. </li><li>
  22148. Show the text at a random position, switching to a new position every 30 seconds:
  22149. <div class="example">
  22150. <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;
  22151. </pre></div>
  22152. </li><li>
  22153. Show a text line sliding from right to left in the last row of the video
  22154. frame. The file &lsquo;<tt>LONG_LINE</tt>&rsquo; is assumed to contain a single line
  22155. with no newlines.
  22156. <div class="example">
  22157. <pre class="example">drawtext=&quot;fontsize=15:fontfile=FreeSerif.ttf:text=LONG_LINE:y=h-line_h:x=-50*t&quot;
  22158. </pre></div>
  22159. </li><li>
  22160. Show the content of file &lsquo;<tt>CREDITS</tt>&rsquo; off the bottom of the frame and scroll up.
  22161. <div class="example">
  22162. <pre class="example">drawtext=&quot;fontsize=20:fontfile=FreeSerif.ttf:textfile=CREDITS:y=h-20*t&quot;
  22163. </pre></div>
  22164. </li><li>
  22165. Draw a single green letter &quot;g&quot;, at the center of the input video.
  22166. The glyph baseline is placed at half screen height.
  22167. <div class="example">
  22168. <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;
  22169. </pre></div>
  22170. </li><li>
  22171. Show text for 1 second every 3 seconds:
  22172. <div class="example">
  22173. <pre class="example">drawtext=&quot;fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\,3)\,1):text='blink'&quot;
  22174. </pre></div>
  22175. </li><li>
  22176. Use fontconfig to set the font. Note that the colons need to be escaped.
  22177. <div class="example">
  22178. <pre class="example">drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg'
  22179. </pre></div>
  22180. </li><li>
  22181. Print the date of a real-time encoding (see strftime(3)):
  22182. <div class="example">
  22183. <pre class="example">drawtext='fontfile=FreeSans.ttf:text=%{localtime\:%a %b %d %Y}'
  22184. </pre></div>
  22185. </li><li>
  22186. Show text fading in and out (appearing/disappearing):
  22187. <div class="example">
  22188. <pre class="example">#!/bin/sh
  22189. DS=1.0 # display start
  22190. DE=10.0 # display end
  22191. FID=1.5 # fade in duration
  22192. FOD=5 # fade out duration
  22193. 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;
  22194. </pre></div>
  22195. </li><li>
  22196. Horizontally align multiple separate texts. Note that &lsquo;<samp>max_glyph_a</samp>&rsquo;
  22197. and the &lsquo;<samp>fontsize</samp>&rsquo; value are included in the &lsquo;<samp>y</samp>&rsquo; offset.
  22198. <div class="example">
  22199. <pre class="example">drawtext=fontfile=FreeSans.ttf:text=DOG:fontsize=24:x=10:y=20+24-max_glyph_a,
  22200. drawtext=fontfile=FreeSans.ttf:text=cow:fontsize=24:x=80:y=20+24-max_glyph_a
  22201. </pre></div>
  22202. </li><li>
  22203. Plot special <var>lavf.image2dec.source_basename</var> metadata onto each frame if
  22204. such metadata exists. Otherwise, plot the string &quot;NA&quot;. Note that image2 demuxer
  22205. must have option &lsquo;<samp>-export_path_metadata 1</samp>&rsquo; for the special metadata fields
  22206. to be available for filters.
  22207. <div class="example">
  22208. <pre class="example">drawtext=&quot;fontsize=20:fontcolor=white:fontfile=FreeSans.ttf:text='%{metadata\:lavf.image2dec.source_basename\:NA}':x=10:y=10&quot;
  22209. </pre></div>
  22210. </li></ul>
  22211. <p>For more information about libfreetype, check:
  22212. <a href="http://www.freetype.org/">http://www.freetype.org/</a>.
  22213. </p>
  22214. <p>For more information about fontconfig, check:
  22215. <a href="http://freedesktop.org/software/fontconfig/fontconfig-user.html">http://freedesktop.org/software/fontconfig/fontconfig-user.html</a>.
  22216. </p>
  22217. <p>For more information about libfribidi, check:
  22218. <a href="http://fribidi.org/">http://fribidi.org/</a>.
  22219. </p>
  22220. <a name="edgedetect"></a>
  22221. <h2 class="section"><a href="ffplay-all.html#toc-edgedetect">30.61 edgedetect</a></h2>
  22222. <p>Detect and draw edges. The filter uses the Canny Edge Detection algorithm.
  22223. </p>
  22224. <p>The filter accepts the following options:
  22225. </p>
  22226. <dl compact="compact">
  22227. <dt>&lsquo;<samp>low</samp>&rsquo;</dt>
  22228. <dt>&lsquo;<samp>high</samp>&rsquo;</dt>
  22229. <dd><p>Set low and high threshold values used by the Canny thresholding
  22230. algorithm.
  22231. </p>
  22232. <p>The high threshold selects the &quot;strong&quot; edge pixels, which are then
  22233. connected through 8-connectivity with the &quot;weak&quot; edge pixels selected
  22234. by the low threshold.
  22235. </p>
  22236. <p><var>low</var> and <var>high</var> threshold values must be chosen in the range
  22237. [0,1], and <var>low</var> should be lesser or equal to <var>high</var>.
  22238. </p>
  22239. <p>Default value for <var>low</var> is <code>20/255</code>, and default value for <var>high</var>
  22240. is <code>50/255</code>.
  22241. </p>
  22242. </dd>
  22243. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  22244. <dd><p>Define the drawing mode.
  22245. </p>
  22246. <dl compact="compact">
  22247. <dt>&lsquo;<samp>wires</samp>&rsquo;</dt>
  22248. <dd><p>Draw white/gray wires on black background.
  22249. </p>
  22250. </dd>
  22251. <dt>&lsquo;<samp>colormix</samp>&rsquo;</dt>
  22252. <dd><p>Mix the colors to create a paint/cartoon effect.
  22253. </p>
  22254. </dd>
  22255. <dt>&lsquo;<samp>canny</samp>&rsquo;</dt>
  22256. <dd><p>Apply Canny edge detector on all selected planes.
  22257. </p></dd>
  22258. </dl>
  22259. <p>Default value is <var>wires</var>.
  22260. </p>
  22261. </dd>
  22262. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  22263. <dd><p>Select planes for filtering. By default all available planes are filtered.
  22264. </p></dd>
  22265. </dl>
  22266. <a name="Examples-132"></a>
  22267. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-132">30.61.1 Examples</a></h3>
  22268. <ul>
  22269. <li>
  22270. Standard edge detection with custom values for the hysteresis thresholding:
  22271. <div class="example">
  22272. <pre class="example">edgedetect=low=0.1:high=0.4
  22273. </pre></div>
  22274. </li><li>
  22275. Painting effect without thresholding:
  22276. <div class="example">
  22277. <pre class="example">edgedetect=mode=colormix:high=0
  22278. </pre></div>
  22279. </li></ul>
  22280. <a name="elbg"></a>
  22281. <h2 class="section"><a href="ffplay-all.html#toc-elbg">30.62 elbg</a></h2>
  22282. <p>Apply a posterize effect using the ELBG (Enhanced LBG) algorithm.
  22283. </p>
  22284. <p>For each input image, the filter will compute the optimal mapping from
  22285. the input to the output given the codebook length, that is the number
  22286. of distinct output colors.
  22287. </p>
  22288. <p>This filter accepts the following options.
  22289. </p>
  22290. <dl compact="compact">
  22291. <dt>&lsquo;<samp>codebook_length, l</samp>&rsquo;</dt>
  22292. <dd><p>Set codebook length. The value must be a positive integer, and
  22293. represents the number of distinct output colors. Default value is 256.
  22294. </p>
  22295. </dd>
  22296. <dt>&lsquo;<samp>nb_steps, n</samp>&rsquo;</dt>
  22297. <dd><p>Set the maximum number of iterations to apply for computing the optimal
  22298. mapping. The higher the value the better the result and the higher the
  22299. computation time. Default value is 1.
  22300. </p>
  22301. </dd>
  22302. <dt>&lsquo;<samp>seed, s</samp>&rsquo;</dt>
  22303. <dd><p>Set a random seed, must be an integer included between 0 and
  22304. UINT32_MAX. If not specified, or if explicitly set to -1, the filter
  22305. will try to use a good random seed on a best effort basis.
  22306. </p>
  22307. </dd>
  22308. <dt>&lsquo;<samp>pal8</samp>&rsquo;</dt>
  22309. <dd><p>Set pal8 output pixel format. This option does not work with codebook
  22310. length greater than 256.
  22311. </p></dd>
  22312. </dl>
  22313. <a name="entropy"></a>
  22314. <h2 class="section"><a href="ffplay-all.html#toc-entropy">30.63 entropy</a></h2>
  22315. <p>Measure graylevel entropy in histogram of color channels of video frames.
  22316. </p>
  22317. <p>It accepts the following parameters:
  22318. </p>
  22319. <dl compact="compact">
  22320. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  22321. <dd><p>Can be either <var>normal</var> or <var>diff</var>. Default is <var>normal</var>.
  22322. </p>
  22323. <p><var>diff</var> mode measures entropy of histogram delta values, absolute differences
  22324. between neighbour histogram values.
  22325. </p></dd>
  22326. </dl>
  22327. <a name="eq"></a>
  22328. <h2 class="section"><a href="ffplay-all.html#toc-eq">30.64 eq</a></h2>
  22329. <p>Set brightness, contrast, saturation and approximate gamma adjustment.
  22330. </p>
  22331. <p>The filter accepts the following options:
  22332. </p>
  22333. <dl compact="compact">
  22334. <dt>&lsquo;<samp>contrast</samp>&rsquo;</dt>
  22335. <dd><p>Set the contrast expression. The value must be a float value in range
  22336. <code>-1000.0</code> to <code>1000.0</code>. The default value is &quot;1&quot;.
  22337. </p>
  22338. </dd>
  22339. <dt>&lsquo;<samp>brightness</samp>&rsquo;</dt>
  22340. <dd><p>Set the brightness expression. The value must be a float value in
  22341. range <code>-1.0</code> to <code>1.0</code>. The default value is &quot;0&quot;.
  22342. </p>
  22343. </dd>
  22344. <dt>&lsquo;<samp>saturation</samp>&rsquo;</dt>
  22345. <dd><p>Set the saturation expression. The value must be a float in
  22346. range <code>0.0</code> to <code>3.0</code>. The default value is &quot;1&quot;.
  22347. </p>
  22348. </dd>
  22349. <dt>&lsquo;<samp>gamma</samp>&rsquo;</dt>
  22350. <dd><p>Set the gamma expression. The value must be a float in range
  22351. <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  22352. </p>
  22353. </dd>
  22354. <dt>&lsquo;<samp>gamma_r</samp>&rsquo;</dt>
  22355. <dd><p>Set the gamma expression for red. The value must be a float in
  22356. range <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  22357. </p>
  22358. </dd>
  22359. <dt>&lsquo;<samp>gamma_g</samp>&rsquo;</dt>
  22360. <dd><p>Set the gamma expression for green. The value must be a float in range
  22361. <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  22362. </p>
  22363. </dd>
  22364. <dt>&lsquo;<samp>gamma_b</samp>&rsquo;</dt>
  22365. <dd><p>Set the gamma expression for blue. The value must be a float in range
  22366. <code>0.1</code> to <code>10.0</code>. The default value is &quot;1&quot;.
  22367. </p>
  22368. </dd>
  22369. <dt>&lsquo;<samp>gamma_weight</samp>&rsquo;</dt>
  22370. <dd><p>Set the gamma weight expression. It can be used to reduce the effect
  22371. of a high gamma value on bright image areas, e.g. keep them from
  22372. getting overamplified and just plain white. The value must be a float
  22373. in range <code>0.0</code> to <code>1.0</code>. A value of <code>0.0</code> turns the
  22374. gamma correction all the way down while <code>1.0</code> leaves it at its
  22375. full strength. Default is &quot;1&quot;.
  22376. </p>
  22377. </dd>
  22378. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  22379. <dd><p>Set when the expressions for brightness, contrast, saturation and
  22380. gamma expressions are evaluated.
  22381. </p>
  22382. <p>It accepts the following values:
  22383. </p><dl compact="compact">
  22384. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  22385. <dd><p>only evaluate expressions once during the filter initialization or
  22386. when a command is processed
  22387. </p>
  22388. </dd>
  22389. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  22390. <dd><p>evaluate expressions for each incoming frame
  22391. </p></dd>
  22392. </dl>
  22393. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  22394. </p></dd>
  22395. </dl>
  22396. <p>The expressions accept the following parameters:
  22397. </p><dl compact="compact">
  22398. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  22399. <dd><p>frame count of the input frame starting from 0
  22400. </p>
  22401. </dd>
  22402. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  22403. <dd><p>byte position of the corresponding packet in the input file, NAN if
  22404. unspecified
  22405. </p>
  22406. </dd>
  22407. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  22408. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  22409. </p>
  22410. </dd>
  22411. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  22412. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  22413. </p></dd>
  22414. </dl>
  22415. <a name="Commands-41"></a>
  22416. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-41">30.64.1 Commands</a></h3>
  22417. <p>The filter supports the following commands:
  22418. </p>
  22419. <dl compact="compact">
  22420. <dt>&lsquo;<samp>contrast</samp>&rsquo;</dt>
  22421. <dd><p>Set the contrast expression.
  22422. </p>
  22423. </dd>
  22424. <dt>&lsquo;<samp>brightness</samp>&rsquo;</dt>
  22425. <dd><p>Set the brightness expression.
  22426. </p>
  22427. </dd>
  22428. <dt>&lsquo;<samp>saturation</samp>&rsquo;</dt>
  22429. <dd><p>Set the saturation expression.
  22430. </p>
  22431. </dd>
  22432. <dt>&lsquo;<samp>gamma</samp>&rsquo;</dt>
  22433. <dd><p>Set the gamma expression.
  22434. </p>
  22435. </dd>
  22436. <dt>&lsquo;<samp>gamma_r</samp>&rsquo;</dt>
  22437. <dd><p>Set the gamma_r expression.
  22438. </p>
  22439. </dd>
  22440. <dt>&lsquo;<samp>gamma_g</samp>&rsquo;</dt>
  22441. <dd><p>Set gamma_g expression.
  22442. </p>
  22443. </dd>
  22444. <dt>&lsquo;<samp>gamma_b</samp>&rsquo;</dt>
  22445. <dd><p>Set gamma_b expression.
  22446. </p>
  22447. </dd>
  22448. <dt>&lsquo;<samp>gamma_weight</samp>&rsquo;</dt>
  22449. <dd><p>Set gamma_weight expression.
  22450. </p>
  22451. <p>The command accepts the same syntax of the corresponding option.
  22452. </p>
  22453. <p>If the specified expression is not valid, it is kept at its current
  22454. value.
  22455. </p>
  22456. </dd>
  22457. </dl>
  22458. <a name="erosion"></a>
  22459. <h2 class="section"><a href="ffplay-all.html#toc-erosion">30.65 erosion</a></h2>
  22460. <p>Apply erosion effect to the video.
  22461. </p>
  22462. <p>This filter replaces the pixel by the local(3x3) minimum.
  22463. </p>
  22464. <p>It accepts the following options:
  22465. </p>
  22466. <dl compact="compact">
  22467. <dt>&lsquo;<samp>threshold0</samp>&rsquo;</dt>
  22468. <dt>&lsquo;<samp>threshold1</samp>&rsquo;</dt>
  22469. <dt>&lsquo;<samp>threshold2</samp>&rsquo;</dt>
  22470. <dt>&lsquo;<samp>threshold3</samp>&rsquo;</dt>
  22471. <dd><p>Limit the maximum change for each plane, default is 65535.
  22472. If 0, plane will remain unchanged.
  22473. </p>
  22474. </dd>
  22475. <dt>&lsquo;<samp>coordinates</samp>&rsquo;</dt>
  22476. <dd><p>Flag which specifies the pixel to refer to. Default is 255 i.e. all eight
  22477. pixels are used.
  22478. </p>
  22479. <p>Flags to local 3x3 coordinates maps like this:
  22480. </p>
  22481. <p> 1 2 3
  22482. 4 5
  22483. 6 7 8
  22484. </p></dd>
  22485. </dl>
  22486. <a name="Commands-53"></a>
  22487. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-53">30.65.1 Commands</a></h3>
  22488. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  22489. </p>
  22490. <a name="extractplanes"></a>
  22491. <h2 class="section"><a href="ffplay-all.html#toc-extractplanes">30.66 extractplanes</a></h2>
  22492. <p>Extract color channel components from input video stream into
  22493. separate grayscale video streams.
  22494. </p>
  22495. <p>The filter accepts the following option:
  22496. </p>
  22497. <dl compact="compact">
  22498. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  22499. <dd><p>Set plane(s) to extract.
  22500. </p>
  22501. <p>Available values for planes are:
  22502. </p><dl compact="compact">
  22503. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  22504. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  22505. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  22506. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  22507. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  22508. <dt>&lsquo;<samp>g</samp>&rsquo;</dt>
  22509. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  22510. </dl>
  22511. <p>Choosing planes not available in the input will result in an error.
  22512. That means you cannot select <code>r</code>, <code>g</code>, <code>b</code> planes
  22513. with <code>y</code>, <code>u</code>, <code>v</code> planes at same time.
  22514. </p></dd>
  22515. </dl>
  22516. <a name="Examples-148"></a>
  22517. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-148">30.66.1 Examples</a></h3>
  22518. <ul>
  22519. <li>
  22520. Extract luma, u and v color channel component from input video frame
  22521. into 3 grayscale outputs:
  22522. <div class="example">
  22523. <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
  22524. </pre></div>
  22525. </li></ul>
  22526. <a name="fade"></a>
  22527. <h2 class="section"><a href="ffplay-all.html#toc-fade">30.67 fade</a></h2>
  22528. <p>Apply a fade-in/out effect to the input video.
  22529. </p>
  22530. <p>It accepts the following parameters:
  22531. </p>
  22532. <dl compact="compact">
  22533. <dt>&lsquo;<samp>type, t</samp>&rsquo;</dt>
  22534. <dd><p>The effect type can be either &quot;in&quot; for a fade-in, or &quot;out&quot; for a fade-out
  22535. effect.
  22536. Default is <code>in</code>.
  22537. </p>
  22538. </dd>
  22539. <dt>&lsquo;<samp>start_frame, s</samp>&rsquo;</dt>
  22540. <dd><p>Specify the number of the frame to start applying the fade
  22541. effect at. Default is 0.
  22542. </p>
  22543. </dd>
  22544. <dt>&lsquo;<samp>nb_frames, n</samp>&rsquo;</dt>
  22545. <dd><p>The number of frames that the fade effect lasts. At the end of the
  22546. fade-in effect, the output video will have the same intensity as the input video.
  22547. At the end of the fade-out transition, the output video will be filled with the
  22548. selected &lsquo;<samp>color</samp>&rsquo;.
  22549. Default is 25.
  22550. </p>
  22551. </dd>
  22552. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  22553. <dd><p>If set to 1, fade only alpha channel, if one exists on the input.
  22554. Default value is 0.
  22555. </p>
  22556. </dd>
  22557. <dt>&lsquo;<samp>start_time, st</samp>&rsquo;</dt>
  22558. <dd><p>Specify the timestamp (in seconds) of the frame to start to apply the fade
  22559. effect. If both start_frame and start_time are specified, the fade will start at
  22560. whichever comes last. Default is 0.
  22561. </p>
  22562. </dd>
  22563. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  22564. <dd><p>The number of seconds for which the fade effect has to last. At the end of the
  22565. fade-in effect the output video will have the same intensity as the input video,
  22566. at the end of the fade-out transition the output video will be filled with the
  22567. selected &lsquo;<samp>color</samp>&rsquo;.
  22568. If both duration and nb_frames are specified, duration is used. Default is 0
  22569. (nb_frames is used by default).
  22570. </p>
  22571. </dd>
  22572. <dt>&lsquo;<samp>color, c</samp>&rsquo;</dt>
  22573. <dd><p>Specify the color of the fade. Default is &quot;black&quot;.
  22574. </p></dd>
  22575. </dl>
  22576. <a name="Examples-140"></a>
  22577. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-140">30.67.1 Examples</a></h3>
  22578. <ul>
  22579. <li>
  22580. Fade in the first 30 frames of video:
  22581. <div class="example">
  22582. <pre class="example">fade=in:0:30
  22583. </pre></div>
  22584. <p>The command above is equivalent to:
  22585. </p><div class="example">
  22586. <pre class="example">fade=t=in:s=0:n=30
  22587. </pre></div>
  22588. </li><li>
  22589. Fade out the last 45 frames of a 200-frame video:
  22590. <div class="example">
  22591. <pre class="example">fade=out:155:45
  22592. fade=type=out:start_frame=155:nb_frames=45
  22593. </pre></div>
  22594. </li><li>
  22595. Fade in the first 25 frames and fade out the last 25 frames of a 1000-frame video:
  22596. <div class="example">
  22597. <pre class="example">fade=in:0:25, fade=out:975:25
  22598. </pre></div>
  22599. </li><li>
  22600. Make the first 5 frames yellow, then fade in from frame 5-24:
  22601. <div class="example">
  22602. <pre class="example">fade=in:5:20:color=yellow
  22603. </pre></div>
  22604. </li><li>
  22605. Fade in alpha over first 25 frames of video:
  22606. <div class="example">
  22607. <pre class="example">fade=in:0:25:alpha=1
  22608. </pre></div>
  22609. </li><li>
  22610. Make the first 5.5 seconds black, then fade in for 0.5 seconds:
  22611. <div class="example">
  22612. <pre class="example">fade=t=in:st=5.5:d=0.5
  22613. </pre></div>
  22614. </li></ul>
  22615. <a name="fftdnoiz"></a>
  22616. <h2 class="section"><a href="ffplay-all.html#toc-fftdnoiz">30.68 fftdnoiz</a></h2>
  22617. <p>Denoise frames using 3D FFT (frequency domain filtering).
  22618. </p>
  22619. <p>The filter accepts the following options:
  22620. </p>
  22621. <dl compact="compact">
  22622. <dt>&lsquo;<samp>sigma</samp>&rsquo;</dt>
  22623. <dd><p>Set the noise sigma constant. This sets denoising strength.
  22624. Default value is 1. Allowed range is from 0 to 30.
  22625. Using very high sigma with low overlap may give blocking artifacts.
  22626. </p>
  22627. </dd>
  22628. <dt>&lsquo;<samp>amount</samp>&rsquo;</dt>
  22629. <dd><p>Set amount of denoising. By default all detected noise is reduced.
  22630. Default value is 1. Allowed range is from 0 to 1.
  22631. </p>
  22632. </dd>
  22633. <dt>&lsquo;<samp>block</samp>&rsquo;</dt>
  22634. <dd><p>Set size of block, Default is 4, can be 3, 4, 5 or 6.
  22635. Actual size of block in pixels is 2 to power of <var>block</var>, so by default
  22636. block size in pixels is 2^4 which is 16.
  22637. </p>
  22638. </dd>
  22639. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  22640. <dd><p>Set block overlap. Default is 0.5. Allowed range is from 0.2 to 0.8.
  22641. </p>
  22642. </dd>
  22643. <dt>&lsquo;<samp>prev</samp>&rsquo;</dt>
  22644. <dd><p>Set number of previous frames to use for denoising. By default is set to 0.
  22645. </p>
  22646. </dd>
  22647. <dt>&lsquo;<samp>next</samp>&rsquo;</dt>
  22648. <dd><p>Set number of next frames to to use for denoising. By default is set to 0.
  22649. </p>
  22650. </dd>
  22651. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  22652. <dd><p>Set planes which will be filtered, by default are all available filtered
  22653. except alpha.
  22654. </p></dd>
  22655. </dl>
  22656. <a name="fftfilt"></a>
  22657. <h2 class="section"><a href="ffplay-all.html#toc-fftfilt">30.69 fftfilt</a></h2>
  22658. <p>Apply arbitrary expressions to samples in frequency domain
  22659. </p>
  22660. <dl compact="compact">
  22661. <dt>&lsquo;<samp>dc_Y</samp>&rsquo;</dt>
  22662. <dd><p>Adjust the dc value (gain) of the luma plane of the image. The filter
  22663. accepts an integer value in range <code>0</code> to <code>1000</code>. The default
  22664. value is set to <code>0</code>.
  22665. </p>
  22666. </dd>
  22667. <dt>&lsquo;<samp>dc_U</samp>&rsquo;</dt>
  22668. <dd><p>Adjust the dc value (gain) of the 1st chroma plane of the image. The
  22669. filter accepts an integer value in range <code>0</code> to <code>1000</code>. The
  22670. default value is set to <code>0</code>.
  22671. </p>
  22672. </dd>
  22673. <dt>&lsquo;<samp>dc_V</samp>&rsquo;</dt>
  22674. <dd><p>Adjust the dc value (gain) of the 2nd chroma plane of the image. The
  22675. filter accepts an integer value in range <code>0</code> to <code>1000</code>. The
  22676. default value is set to <code>0</code>.
  22677. </p>
  22678. </dd>
  22679. <dt>&lsquo;<samp>weight_Y</samp>&rsquo;</dt>
  22680. <dd><p>Set the frequency domain weight expression for the luma plane.
  22681. </p>
  22682. </dd>
  22683. <dt>&lsquo;<samp>weight_U</samp>&rsquo;</dt>
  22684. <dd><p>Set the frequency domain weight expression for the 1st chroma plane.
  22685. </p>
  22686. </dd>
  22687. <dt>&lsquo;<samp>weight_V</samp>&rsquo;</dt>
  22688. <dd><p>Set the frequency domain weight expression for the 2nd chroma plane.
  22689. </p>
  22690. </dd>
  22691. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  22692. <dd><p>Set when the expressions are evaluated.
  22693. </p>
  22694. <p>It accepts the following values:
  22695. </p><dl compact="compact">
  22696. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  22697. <dd><p>Only evaluate expressions once during the filter initialization.
  22698. </p>
  22699. </dd>
  22700. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  22701. <dd><p>Evaluate expressions for each incoming frame.
  22702. </p></dd>
  22703. </dl>
  22704. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  22705. </p>
  22706. <p>The filter accepts the following variables:
  22707. </p></dd>
  22708. <dt>&lsquo;<samp>X</samp>&rsquo;</dt>
  22709. <dt>&lsquo;<samp>Y</samp>&rsquo;</dt>
  22710. <dd><p>The coordinates of the current sample.
  22711. </p>
  22712. </dd>
  22713. <dt>&lsquo;<samp>W</samp>&rsquo;</dt>
  22714. <dt>&lsquo;<samp>H</samp>&rsquo;</dt>
  22715. <dd><p>The width and height of the image.
  22716. </p>
  22717. </dd>
  22718. <dt>&lsquo;<samp>N</samp>&rsquo;</dt>
  22719. <dd><p>The number of input frame, starting from 0.
  22720. </p></dd>
  22721. </dl>
  22722. <a name="Examples-7"></a>
  22723. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-7">30.69.1 Examples</a></h3>
  22724. <ul>
  22725. <li>
  22726. High-pass:
  22727. <div class="example">
  22728. <pre class="example">fftfilt=dc_Y=128:weight_Y='squish(1-(Y+X)/100)'
  22729. </pre></div>
  22730. </li><li>
  22731. Low-pass:
  22732. <div class="example">
  22733. <pre class="example">fftfilt=dc_Y=0:weight_Y='squish((Y+X)/100-1)'
  22734. </pre></div>
  22735. </li><li>
  22736. Sharpen:
  22737. <div class="example">
  22738. <pre class="example">fftfilt=dc_Y=0:weight_Y='1+squish(1-(Y+X)/100)'
  22739. </pre></div>
  22740. </li><li>
  22741. Blur:
  22742. <div class="example">
  22743. <pre class="example">fftfilt=dc_Y=0:weight_Y='exp(-4 * ((Y+X)/(W+H)))'
  22744. </pre></div>
  22745. </li></ul>
  22746. <a name="field"></a>
  22747. <h2 class="section"><a href="ffplay-all.html#toc-field">30.70 field</a></h2>
  22748. <p>Extract a single field from an interlaced image using stride
  22749. arithmetic to avoid wasting CPU time. The output frames are marked as
  22750. non-interlaced.
  22751. </p>
  22752. <p>The filter accepts the following options:
  22753. </p>
  22754. <dl compact="compact">
  22755. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  22756. <dd><p>Specify whether to extract the top (if the value is <code>0</code> or
  22757. <code>top</code>) or the bottom field (if the value is <code>1</code> or
  22758. <code>bottom</code>).
  22759. </p></dd>
  22760. </dl>
  22761. <a name="fieldhint"></a>
  22762. <h2 class="section"><a href="ffplay-all.html#toc-fieldhint">30.71 fieldhint</a></h2>
  22763. <p>Create new frames by copying the top and bottom fields from surrounding frames
  22764. supplied as numbers by the hint file.
  22765. </p>
  22766. <dl compact="compact">
  22767. <dt>&lsquo;<samp>hint</samp>&rsquo;</dt>
  22768. <dd><p>Set file containing hints: absolute/relative frame numbers.
  22769. </p>
  22770. <p>There must be one line for each frame in a clip. Each line must contain two
  22771. numbers separated by the comma, optionally followed by <code>-</code> or <code>+</code>.
  22772. Numbers supplied on each line of file can not be out of [N-1,N+1] where N
  22773. is current frame number for <code>absolute</code> mode or out of [-1, 1] range
  22774. for <code>relative</code> mode. First number tells from which frame to pick up top
  22775. field and second number tells from which frame to pick up bottom field.
  22776. </p>
  22777. <p>If optionally followed by <code>+</code> output frame will be marked as interlaced,
  22778. else if followed by <code>-</code> output frame will be marked as progressive, else
  22779. it will be marked same as input frame.
  22780. If optionally followed by <code>t</code> output frame will use only top field, or in
  22781. case of <code>b</code> it will use only bottom field.
  22782. If line starts with <code>#</code> or <code>;</code> that line is skipped.
  22783. </p>
  22784. </dd>
  22785. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  22786. <dd><p>Can be item <code>absolute</code> or <code>relative</code>. Default is <code>absolute</code>.
  22787. </p></dd>
  22788. </dl>
  22789. <p>Example of first several lines of <code>hint</code> file for <code>relative</code> mode:
  22790. </p><div class="example">
  22791. <pre class="example">0,0 - # first frame
  22792. 1,0 - # second frame, use third's frame top field and second's frame bottom field
  22793. 1,0 - # third frame, use fourth's frame top field and third's frame bottom field
  22794. 1,0 -
  22795. 0,0 -
  22796. 0,0 -
  22797. 1,0 -
  22798. 1,0 -
  22799. 1,0 -
  22800. 0,0 -
  22801. 0,0 -
  22802. 1,0 -
  22803. 1,0 -
  22804. 1,0 -
  22805. 0,0 -
  22806. </pre></div>
  22807. <a name="fieldmatch"></a>
  22808. <h2 class="section"><a href="ffplay-all.html#toc-fieldmatch">30.72 fieldmatch</a></h2>
  22809. <p>Field matching filter for inverse telecine. It is meant to reconstruct the
  22810. progressive frames from a telecined stream. The filter does not drop duplicated
  22811. frames, so to achieve a complete inverse telecine <code>fieldmatch</code> needs to be
  22812. followed by a decimation filter such as <a href="#decimate">decimate</a> in the filtergraph.
  22813. </p>
  22814. <p>The separation of the field matching and the decimation is notably motivated by
  22815. the possibility of inserting a de-interlacing filter fallback between the two.
  22816. If the source has mixed telecined and real interlaced content,
  22817. <code>fieldmatch</code> will not be able to match fields for the interlaced parts.
  22818. But these remaining combed frames will be marked as interlaced, and thus can be
  22819. de-interlaced by a later filter such as <a href="#yadif">yadif</a> before decimation.
  22820. </p>
  22821. <p>In addition to the various configuration options, <code>fieldmatch</code> can take an
  22822. optional second stream, activated through the &lsquo;<samp>ppsrc</samp>&rsquo; option. If
  22823. enabled, the frames reconstruction will be based on the fields and frames from
  22824. this second stream. This allows the first input to be pre-processed in order to
  22825. help the various algorithms of the filter, while keeping the output lossless
  22826. (assuming the fields are matched properly). Typically, a field-aware denoiser,
  22827. or brightness/contrast adjustments can help.
  22828. </p>
  22829. <p>Note that this filter uses the same algorithms as TIVTC/TFM (AviSynth project)
  22830. and VIVTC/VFM (VapourSynth project). The later is a light clone of TFM from
  22831. which <code>fieldmatch</code> is based on. While the semantic and usage are very
  22832. close, some behaviour and options names can differ.
  22833. </p>
  22834. <p>The <a href="#decimate">decimate</a> filter currently only works for constant frame rate input.
  22835. If your input has mixed telecined (30fps) and progressive content with a lower
  22836. framerate like 24fps use the following filterchain to produce the necessary cfr
  22837. stream: <code>dejudder,fps=30000/1001,fieldmatch,decimate</code>.
  22838. </p>
  22839. <p>The filter accepts the following options:
  22840. </p>
  22841. <dl compact="compact">
  22842. <dt>&lsquo;<samp>order</samp>&rsquo;</dt>
  22843. <dd><p>Specify the assumed field order of the input stream. Available values are:
  22844. </p>
  22845. <dl compact="compact">
  22846. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  22847. <dd><p>Auto detect parity (use FFmpeg&rsquo;s internal parity value).
  22848. </p></dd>
  22849. <dt>&lsquo;<samp>bff</samp>&rsquo;</dt>
  22850. <dd><p>Assume bottom field first.
  22851. </p></dd>
  22852. <dt>&lsquo;<samp>tff</samp>&rsquo;</dt>
  22853. <dd><p>Assume top field first.
  22854. </p></dd>
  22855. </dl>
  22856. <p>Note that it is sometimes recommended not to trust the parity announced by the
  22857. stream.
  22858. </p>
  22859. <p>Default value is <var>auto</var>.
  22860. </p>
  22861. </dd>
  22862. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  22863. <dd><p>Set the matching mode or strategy to use. &lsquo;<samp>pc</samp>&rsquo; mode is the safest in the
  22864. sense that it won&rsquo;t risk creating jerkiness due to duplicate frames when
  22865. possible, but if there are bad edits or blended fields it will end up
  22866. outputting combed frames when a good match might actually exist. On the other
  22867. hand, &lsquo;<samp>pcn_ub</samp>&rsquo; mode is the most risky in terms of creating jerkiness,
  22868. but will almost always find a good frame if there is one. The other values are
  22869. all somewhere in between &lsquo;<samp>pc</samp>&rsquo; and &lsquo;<samp>pcn_ub</samp>&rsquo; in terms of risking
  22870. jerkiness and creating duplicate frames versus finding good matches in sections
  22871. with bad edits, orphaned fields, blended fields, etc.
  22872. </p>
  22873. <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.
  22874. </p>
  22875. <p>Available values are:
  22876. </p>
  22877. <dl compact="compact">
  22878. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  22879. <dd><p>2-way matching (p/c)
  22880. </p></dd>
  22881. <dt>&lsquo;<samp>pc_n</samp>&rsquo;</dt>
  22882. <dd><p>2-way matching, and trying 3rd match if still combed (p/c + n)
  22883. </p></dd>
  22884. <dt>&lsquo;<samp>pc_u</samp>&rsquo;</dt>
  22885. <dd><p>2-way matching, and trying 3rd match (same order) if still combed (p/c + u)
  22886. </p></dd>
  22887. <dt>&lsquo;<samp>pc_n_ub</samp>&rsquo;</dt>
  22888. <dd><p>2-way matching, trying 3rd match if still combed, and trying 4th/5th matches if
  22889. still combed (p/c + n + u/b)
  22890. </p></dd>
  22891. <dt>&lsquo;<samp>pcn</samp>&rsquo;</dt>
  22892. <dd><p>3-way matching (p/c/n)
  22893. </p></dd>
  22894. <dt>&lsquo;<samp>pcn_ub</samp>&rsquo;</dt>
  22895. <dd><p>3-way matching, and trying 4th/5th matches if all 3 of the original matches are
  22896. detected as combed (p/c/n + u/b)
  22897. </p></dd>
  22898. </dl>
  22899. <p>The parenthesis at the end indicate the matches that would be used for that
  22900. mode assuming &lsquo;<samp>order</samp>&rsquo;=<var>tff</var> (and &lsquo;<samp>field</samp>&rsquo; on <var>auto</var> or
  22901. <var>top</var>).
  22902. </p>
  22903. <p>In terms of speed &lsquo;<samp>pc</samp>&rsquo; mode is by far the fastest and &lsquo;<samp>pcn_ub</samp>&rsquo; is
  22904. the slowest.
  22905. </p>
  22906. <p>Default value is <var>pc_n</var>.
  22907. </p>
  22908. </dd>
  22909. <dt>&lsquo;<samp>ppsrc</samp>&rsquo;</dt>
  22910. <dd><p>Mark the main input stream as a pre-processed input, and enable the secondary
  22911. input stream as the clean source to pick the fields from. See the filter
  22912. introduction for more details. It is similar to the &lsquo;<samp>clip2</samp>&rsquo; feature from
  22913. VFM/TFM.
  22914. </p>
  22915. <p>Default value is <code>0</code> (disabled).
  22916. </p>
  22917. </dd>
  22918. <dt>&lsquo;<samp>field</samp>&rsquo;</dt>
  22919. <dd><p>Set the field to match from. It is recommended to set this to the same value as
  22920. &lsquo;<samp>order</samp>&rsquo; unless you experience matching failures with that setting. In
  22921. certain circumstances changing the field that is used to match from can have a
  22922. large impact on matching performance. Available values are:
  22923. </p>
  22924. <dl compact="compact">
  22925. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  22926. <dd><p>Automatic (same value as &lsquo;<samp>order</samp>&rsquo;).
  22927. </p></dd>
  22928. <dt>&lsquo;<samp>bottom</samp>&rsquo;</dt>
  22929. <dd><p>Match from the bottom field.
  22930. </p></dd>
  22931. <dt>&lsquo;<samp>top</samp>&rsquo;</dt>
  22932. <dd><p>Match from the top field.
  22933. </p></dd>
  22934. </dl>
  22935. <p>Default value is <var>auto</var>.
  22936. </p>
  22937. </dd>
  22938. <dt>&lsquo;<samp>mchroma</samp>&rsquo;</dt>
  22939. <dd><p>Set whether or not chroma is included during the match comparisons. In most
  22940. cases it is recommended to leave this enabled. You should set this to <code>0</code>
  22941. only if your clip has bad chroma problems such as heavy rainbowing or other
  22942. artifacts. Setting this to <code>0</code> could also be used to speed things up at
  22943. the cost of some accuracy.
  22944. </p>
  22945. <p>Default value is <code>1</code>.
  22946. </p>
  22947. </dd>
  22948. <dt>&lsquo;<samp>y0</samp>&rsquo;</dt>
  22949. <dt>&lsquo;<samp>y1</samp>&rsquo;</dt>
  22950. <dd><p>These define an exclusion band which excludes the lines between &lsquo;<samp>y0</samp>&rsquo; and
  22951. &lsquo;<samp>y1</samp>&rsquo; from being included in the field matching decision. An exclusion
  22952. band can be used to ignore subtitles, a logo, or other things that may
  22953. interfere with the matching. &lsquo;<samp>y0</samp>&rsquo; sets the starting scan line and
  22954. &lsquo;<samp>y1</samp>&rsquo; sets the ending line; all lines in between &lsquo;<samp>y0</samp>&rsquo; and
  22955. &lsquo;<samp>y1</samp>&rsquo; (including &lsquo;<samp>y0</samp>&rsquo; and &lsquo;<samp>y1</samp>&rsquo;) will be ignored. Setting
  22956. &lsquo;<samp>y0</samp>&rsquo; and &lsquo;<samp>y1</samp>&rsquo; to the same value will disable the feature.
  22957. &lsquo;<samp>y0</samp>&rsquo; and &lsquo;<samp>y1</samp>&rsquo; defaults to <code>0</code>.
  22958. </p>
  22959. </dd>
  22960. <dt>&lsquo;<samp>scthresh</samp>&rsquo;</dt>
  22961. <dd><p>Set the scene change detection threshold as a percentage of maximum change on
  22962. the luma plane. Good values are in the <code>[8.0, 14.0]</code> range. Scene change
  22963. detection is only relevant in case &lsquo;<samp>combmatch</samp>&rsquo;=<var>sc</var>. The range for
  22964. &lsquo;<samp>scthresh</samp>&rsquo; is <code>[0.0, 100.0]</code>.
  22965. </p>
  22966. <p>Default value is <code>12.0</code>.
  22967. </p>
  22968. </dd>
  22969. <dt>&lsquo;<samp>combmatch</samp>&rsquo;</dt>
  22970. <dd><p>When &lsquo;<samp>combatch</samp>&rsquo; is not <var>none</var>, <code>fieldmatch</code> will take into
  22971. account the combed scores of matches when deciding what match to use as the
  22972. final match. Available values are:
  22973. </p>
  22974. <dl compact="compact">
  22975. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  22976. <dd><p>No final matching based on combed scores.
  22977. </p></dd>
  22978. <dt>&lsquo;<samp>sc</samp>&rsquo;</dt>
  22979. <dd><p>Combed scores are only used when a scene change is detected.
  22980. </p></dd>
  22981. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  22982. <dd><p>Use combed scores all the time.
  22983. </p></dd>
  22984. </dl>
  22985. <p>Default is <var>sc</var>.
  22986. </p>
  22987. </dd>
  22988. <dt>&lsquo;<samp>combdbg</samp>&rsquo;</dt>
  22989. <dd><p>Force <code>fieldmatch</code> to calculate the combed metrics for certain matches and
  22990. print them. This setting is known as &lsquo;<samp>micout</samp>&rsquo; in TFM/VFM vocabulary.
  22991. Available values are:
  22992. </p>
  22993. <dl compact="compact">
  22994. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  22995. <dd><p>No forced calculation.
  22996. </p></dd>
  22997. <dt>&lsquo;<samp>pcn</samp>&rsquo;</dt>
  22998. <dd><p>Force p/c/n calculations.
  22999. </p></dd>
  23000. <dt>&lsquo;<samp>pcnub</samp>&rsquo;</dt>
  23001. <dd><p>Force p/c/n/u/b calculations.
  23002. </p></dd>
  23003. </dl>
  23004. <p>Default value is <var>none</var>.
  23005. </p>
  23006. </dd>
  23007. <dt>&lsquo;<samp>cthresh</samp>&rsquo;</dt>
  23008. <dd><p>This is the area combing threshold used for combed frame detection. This
  23009. essentially controls how &quot;strong&quot; or &quot;visible&quot; combing must be to be detected.
  23010. Larger values mean combing must be more visible and smaller values mean combing
  23011. can be less visible or strong and still be detected. Valid settings are from
  23012. <code>-1</code> (every pixel will be detected as combed) to <code>255</code> (no pixel will
  23013. be detected as combed). This is basically a pixel difference value. A good
  23014. range is <code>[8, 12]</code>.
  23015. </p>
  23016. <p>Default value is <code>9</code>.
  23017. </p>
  23018. </dd>
  23019. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  23020. <dd><p>Sets whether or not chroma is considered in the combed frame decision. Only
  23021. disable this if your source has chroma problems (rainbowing, etc.) that are
  23022. causing problems for the combed frame detection with chroma enabled. Actually,
  23023. using &lsquo;<samp>chroma</samp>&rsquo;=<var>0</var> is usually more reliable, except for the case
  23024. where there is chroma only combing in the source.
  23025. </p>
  23026. <p>Default value is <code>0</code>.
  23027. </p>
  23028. </dd>
  23029. <dt>&lsquo;<samp>blockx</samp>&rsquo;</dt>
  23030. <dt>&lsquo;<samp>blocky</samp>&rsquo;</dt>
  23031. <dd><p>Respectively set the x-axis and y-axis size of the window used during combed
  23032. frame detection. This has to do with the size of the area in which
  23033. &lsquo;<samp>combpel</samp>&rsquo; pixels are required to be detected as combed for a frame to be
  23034. declared combed. See the &lsquo;<samp>combpel</samp>&rsquo; parameter description for more info.
  23035. Possible values are any number that is a power of 2 starting at 4 and going up
  23036. to 512.
  23037. </p>
  23038. <p>Default value is <code>16</code>.
  23039. </p>
  23040. </dd>
  23041. <dt>&lsquo;<samp>combpel</samp>&rsquo;</dt>
  23042. <dd><p>The number of combed pixels inside any of the &lsquo;<samp>blocky</samp>&rsquo; by
  23043. &lsquo;<samp>blockx</samp>&rsquo; size blocks on the frame for the frame to be detected as
  23044. combed. While &lsquo;<samp>cthresh</samp>&rsquo; controls how &quot;visible&quot; the combing must be, this
  23045. setting controls &quot;how much&quot; combing there must be in any localized area (a
  23046. window defined by the &lsquo;<samp>blockx</samp>&rsquo; and &lsquo;<samp>blocky</samp>&rsquo; settings) on the
  23047. frame. Minimum value is <code>0</code> and maximum is <code>blocky x blockx</code> (at
  23048. which point no frames will ever be detected as combed). This setting is known
  23049. as &lsquo;<samp>MI</samp>&rsquo; in TFM/VFM vocabulary.
  23050. </p>
  23051. <p>Default value is <code>80</code>.
  23052. </p></dd>
  23053. </dl>
  23054. <p><a name="p_002fc_002fn_002fu_002fb-meaning"></a>
  23055. </p><a name="p_002fc_002fn_002fu_002fb-meaning-1"></a>
  23056. <h3 class="subsection"><a href="ffplay-all.html#toc-p_002fc_002fn_002fu_002fb-meaning-1">30.72.1 p/c/n/u/b meaning</a></h3>
  23057. <a name="p_002fc_002fn"></a>
  23058. <h4 class="subsubsection"><a href="ffplay-all.html#toc-p_002fc_002fn">30.72.1.1 p/c/n</a></h4>
  23059. <p>We assume the following telecined stream:
  23060. </p>
  23061. <div class="example">
  23062. <pre class="example">Top fields: 1 2 2 3 4
  23063. Bottom fields: 1 2 3 4 4
  23064. </pre></div>
  23065. <p>The numbers correspond to the progressive frame the fields relate to. Here, the
  23066. first two frames are progressive, the 3rd and 4th are combed, and so on.
  23067. </p>
  23068. <p>When <code>fieldmatch</code> is configured to run a matching from bottom
  23069. (&lsquo;<samp>field</samp>&rsquo;=<var>bottom</var>) this is how this input stream get transformed:
  23070. </p>
  23071. <div class="example">
  23072. <pre class="example">Input stream:
  23073. T 1 2 2 3 4
  23074. B 1 2 3 4 4 &lt;-- matching reference
  23075. Matches: c c n n c
  23076. Output stream:
  23077. T 1 2 3 4 4
  23078. B 1 2 3 4 4
  23079. </pre></div>
  23080. <p>As a result of the field matching, we can see that some frames get duplicated.
  23081. To perform a complete inverse telecine, you need to rely on a decimation filter
  23082. after this operation. See for instance the <a href="#decimate">decimate</a> filter.
  23083. </p>
  23084. <p>The same operation now matching from top fields (&lsquo;<samp>field</samp>&rsquo;=<var>top</var>)
  23085. looks like this:
  23086. </p>
  23087. <div class="example">
  23088. <pre class="example">Input stream:
  23089. T 1 2 2 3 4 &lt;-- matching reference
  23090. B 1 2 3 4 4
  23091. Matches: c c p p c
  23092. Output stream:
  23093. T 1 2 2 3 4
  23094. B 1 2 2 3 4
  23095. </pre></div>
  23096. <p>In these examples, we can see what <var>p</var>, <var>c</var> and <var>n</var> mean;
  23097. basically, they refer to the frame and field of the opposite parity:
  23098. </p>
  23099. <ul>
  23100. <li> <var>p</var> matches the field of the opposite parity in the previous frame
  23101. </li><li> <var>c</var> matches the field of the opposite parity in the current frame
  23102. </li><li> <var>n</var> matches the field of the opposite parity in the next frame
  23103. </li></ul>
  23104. <a name="u_002fb"></a>
  23105. <h4 class="subsubsection"><a href="ffplay-all.html#toc-u_002fb">30.72.1.2 u/b</a></h4>
  23106. <p>The <var>u</var> and <var>b</var> matching are a bit special in the sense that they match
  23107. from the opposite parity flag. In the following examples, we assume that we are
  23108. currently matching the 2nd frame (Top:2, bottom:2). According to the match, a
  23109. &rsquo;x&rsquo; is placed above and below each matched fields.
  23110. </p>
  23111. <p>With bottom matching (&lsquo;<samp>field</samp>&rsquo;=<var>bottom</var>):
  23112. </p><div class="example">
  23113. <pre class="example">Match: c p n b u
  23114. x x x x x
  23115. Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
  23116. Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
  23117. x x x x x
  23118. Output frames:
  23119. 2 1 2 2 2
  23120. 2 2 2 1 3
  23121. </pre></div>
  23122. <p>With top matching (&lsquo;<samp>field</samp>&rsquo;=<var>top</var>):
  23123. </p><div class="example">
  23124. <pre class="example">Match: c p n b u
  23125. x x x x x
  23126. Top 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2
  23127. Bottom 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
  23128. x x x x x
  23129. Output frames:
  23130. 2 2 2 1 2
  23131. 2 1 3 2 2
  23132. </pre></div>
  23133. <a name="Examples-79"></a>
  23134. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-79">30.72.2 Examples</a></h3>
  23135. <p>Simple IVTC of a top field first telecined stream:
  23136. </p><div class="example">
  23137. <pre class="example">fieldmatch=order=tff:combmatch=none, decimate
  23138. </pre></div>
  23139. <p>Advanced IVTC, with fallback on <a href="#yadif">yadif</a> for still combed frames:
  23140. </p><div class="example">
  23141. <pre class="example">fieldmatch=order=tff:combmatch=full, yadif=deint=interlaced, decimate
  23142. </pre></div>
  23143. <a name="fieldorder"></a>
  23144. <h2 class="section"><a href="ffplay-all.html#toc-fieldorder">30.73 fieldorder</a></h2>
  23145. <p>Transform the field order of the input video.
  23146. </p>
  23147. <p>It accepts the following parameters:
  23148. </p>
  23149. <dl compact="compact">
  23150. <dt>&lsquo;<samp>order</samp>&rsquo;</dt>
  23151. <dd><p>The output field order. Valid values are <var>tff</var> for top field first or <var>bff</var>
  23152. for bottom field first.
  23153. </p></dd>
  23154. </dl>
  23155. <p>The default value is &lsquo;<samp>tff</samp>&rsquo;.
  23156. </p>
  23157. <p>The transformation is done by shifting the picture content up or down
  23158. by one line, and filling the remaining line with appropriate picture content.
  23159. This method is consistent with most broadcast field order converters.
  23160. </p>
  23161. <p>If the input video is not flagged as being interlaced, or it is already
  23162. flagged as being of the required output field order, then this filter does
  23163. not alter the incoming video.
  23164. </p>
  23165. <p>It is very useful when converting to or from PAL DV material,
  23166. which is bottom field first.
  23167. </p>
  23168. <p>For example:
  23169. </p><div class="example">
  23170. <pre class="example">ffmpeg -i in.vob -vf &quot;fieldorder=bff&quot; out.dv
  23171. </pre></div>
  23172. <a name="fifo_002c-afifo"></a>
  23173. <h2 class="section"><a href="ffplay-all.html#toc-fifo_002c-afifo">30.74 fifo, afifo</a></h2>
  23174. <p>Buffer input images and send them when they are requested.
  23175. </p>
  23176. <p>It is mainly useful when auto-inserted by the libavfilter
  23177. framework.
  23178. </p>
  23179. <p>It does not take parameters.
  23180. </p>
  23181. <a name="fillborders"></a>
  23182. <h2 class="section"><a href="ffplay-all.html#toc-fillborders">30.75 fillborders</a></h2>
  23183. <p>Fill borders of the input video, without changing video stream dimensions.
  23184. Sometimes video can have garbage at the four edges and you may not want to
  23185. crop video input to keep size multiple of some number.
  23186. </p>
  23187. <p>This filter accepts the following options:
  23188. </p>
  23189. <dl compact="compact">
  23190. <dt>&lsquo;<samp>left</samp>&rsquo;</dt>
  23191. <dd><p>Number of pixels to fill from left border.
  23192. </p>
  23193. </dd>
  23194. <dt>&lsquo;<samp>right</samp>&rsquo;</dt>
  23195. <dd><p>Number of pixels to fill from right border.
  23196. </p>
  23197. </dd>
  23198. <dt>&lsquo;<samp>top</samp>&rsquo;</dt>
  23199. <dd><p>Number of pixels to fill from top border.
  23200. </p>
  23201. </dd>
  23202. <dt>&lsquo;<samp>bottom</samp>&rsquo;</dt>
  23203. <dd><p>Number of pixels to fill from bottom border.
  23204. </p>
  23205. </dd>
  23206. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  23207. <dd><p>Set fill mode.
  23208. </p>
  23209. <p>It accepts the following values:
  23210. </p><dl compact="compact">
  23211. <dt>&lsquo;<samp>smear</samp>&rsquo;</dt>
  23212. <dd><p>fill pixels using outermost pixels
  23213. </p>
  23214. </dd>
  23215. <dt>&lsquo;<samp>mirror</samp>&rsquo;</dt>
  23216. <dd><p>fill pixels using mirroring
  23217. </p>
  23218. </dd>
  23219. <dt>&lsquo;<samp>fixed</samp>&rsquo;</dt>
  23220. <dd><p>fill pixels with constant value
  23221. </p></dd>
  23222. </dl>
  23223. <p>Default is <var>smear</var>.
  23224. </p>
  23225. </dd>
  23226. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  23227. <dd><p>Set color for pixels in fixed mode. Default is <var>black</var>.
  23228. </p></dd>
  23229. </dl>
  23230. <a name="Commands-1"></a>
  23231. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-1">30.75.1 Commands</a></h3>
  23232. <p>This filter supports same <a href="#commands">commands</a> as options.
  23233. The command accepts the same syntax of the corresponding option.
  23234. </p>
  23235. <p>If the specified expression is not valid, it is kept at its current
  23236. value.
  23237. </p>
  23238. <a name="find_005frect"></a>
  23239. <h2 class="section"><a href="ffplay-all.html#toc-find_005frect">30.76 find_rect</a></h2>
  23240. <p>Find a rectangular object
  23241. </p>
  23242. <p>It accepts the following options:
  23243. </p>
  23244. <dl compact="compact">
  23245. <dt>&lsquo;<samp>object</samp>&rsquo;</dt>
  23246. <dd><p>Filepath of the object image, needs to be in gray8.
  23247. </p>
  23248. </dd>
  23249. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  23250. <dd><p>Detection threshold, default is 0.5.
  23251. </p>
  23252. </dd>
  23253. <dt>&lsquo;<samp>mipmaps</samp>&rsquo;</dt>
  23254. <dd><p>Number of mipmaps, default is 3.
  23255. </p>
  23256. </dd>
  23257. <dt>&lsquo;<samp>xmin, ymin, xmax, ymax</samp>&rsquo;</dt>
  23258. <dd><p>Specifies the rectangle in which to search.
  23259. </p></dd>
  23260. </dl>
  23261. <a name="Examples-49"></a>
  23262. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-49">30.76.1 Examples</a></h3>
  23263. <ul>
  23264. <li>
  23265. Cover a rectangular object by the supplied image of a given video using <code>ffmpeg</code>:
  23266. <div class="example">
  23267. <pre class="example">ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv
  23268. </pre></div>
  23269. </li></ul>
  23270. <a name="floodfill"></a>
  23271. <h2 class="section"><a href="ffplay-all.html#toc-floodfill">30.77 floodfill</a></h2>
  23272. <p>Flood area with values of same pixel components with another values.
  23273. </p>
  23274. <p>It accepts the following options:
  23275. </p><dl compact="compact">
  23276. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  23277. <dd><p>Set pixel x coordinate.
  23278. </p>
  23279. </dd>
  23280. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  23281. <dd><p>Set pixel y coordinate.
  23282. </p>
  23283. </dd>
  23284. <dt>&lsquo;<samp>s0</samp>&rsquo;</dt>
  23285. <dd><p>Set source #0 component value.
  23286. </p>
  23287. </dd>
  23288. <dt>&lsquo;<samp>s1</samp>&rsquo;</dt>
  23289. <dd><p>Set source #1 component value.
  23290. </p>
  23291. </dd>
  23292. <dt>&lsquo;<samp>s2</samp>&rsquo;</dt>
  23293. <dd><p>Set source #2 component value.
  23294. </p>
  23295. </dd>
  23296. <dt>&lsquo;<samp>s3</samp>&rsquo;</dt>
  23297. <dd><p>Set source #3 component value.
  23298. </p>
  23299. </dd>
  23300. <dt>&lsquo;<samp>d0</samp>&rsquo;</dt>
  23301. <dd><p>Set destination #0 component value.
  23302. </p>
  23303. </dd>
  23304. <dt>&lsquo;<samp>d1</samp>&rsquo;</dt>
  23305. <dd><p>Set destination #1 component value.
  23306. </p>
  23307. </dd>
  23308. <dt>&lsquo;<samp>d2</samp>&rsquo;</dt>
  23309. <dd><p>Set destination #2 component value.
  23310. </p>
  23311. </dd>
  23312. <dt>&lsquo;<samp>d3</samp>&rsquo;</dt>
  23313. <dd><p>Set destination #3 component value.
  23314. </p></dd>
  23315. </dl>
  23316. <p><a name="format"></a>
  23317. </p><a name="format-1"></a>
  23318. <h2 class="section"><a href="ffplay-all.html#toc-format-1">30.78 format</a></h2>
  23319. <p>Convert the input video to one of the specified pixel formats.
  23320. Libavfilter will try to pick one that is suitable as input to
  23321. the next filter.
  23322. </p>
  23323. <p>It accepts the following parameters:
  23324. </p><dl compact="compact">
  23325. <dt>&lsquo;<samp>pix_fmts</samp>&rsquo;</dt>
  23326. <dd><p>A &rsquo;|&rsquo;-separated list of pixel format names, such as
  23327. &quot;pix_fmts=yuv420p|monow|rgb24&quot;.
  23328. </p>
  23329. </dd>
  23330. </dl>
  23331. <a name="Examples-150"></a>
  23332. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-150">30.78.1 Examples</a></h3>
  23333. <ul>
  23334. <li>
  23335. Convert the input video to the <var>yuv420p</var> format
  23336. <div class="example">
  23337. <pre class="example">format=pix_fmts=yuv420p
  23338. </pre></div>
  23339. <p>Convert the input video to any of the formats in the list
  23340. </p><div class="example">
  23341. <pre class="example">format=pix_fmts=yuv420p|yuv444p|yuv410p
  23342. </pre></div>
  23343. </li></ul>
  23344. <p><a name="fps"></a>
  23345. </p><a name="fps-1"></a>
  23346. <h2 class="section"><a href="ffplay-all.html#toc-fps-1">30.79 fps</a></h2>
  23347. <p>Convert the video to specified constant frame rate by duplicating or dropping
  23348. frames as necessary.
  23349. </p>
  23350. <p>It accepts the following parameters:
  23351. </p><dl compact="compact">
  23352. <dt>&lsquo;<samp>fps</samp>&rsquo;</dt>
  23353. <dd><p>The desired output frame rate. The default is <code>25</code>.
  23354. </p>
  23355. </dd>
  23356. <dt>&lsquo;<samp>start_time</samp>&rsquo;</dt>
  23357. <dd><p>Assume the first PTS should be the given value, in seconds. This allows for
  23358. padding/trimming at the start of stream. By default, no assumption is made
  23359. about the first frame&rsquo;s expected PTS, so no padding or trimming is done.
  23360. For example, this could be set to 0 to pad the beginning with duplicates of
  23361. the first frame if a video stream starts after the audio stream or to trim any
  23362. frames with a negative PTS.
  23363. </p>
  23364. </dd>
  23365. <dt>&lsquo;<samp>round</samp>&rsquo;</dt>
  23366. <dd><p>Timestamp (PTS) rounding method.
  23367. </p>
  23368. <p>Possible values are:
  23369. </p><dl compact="compact">
  23370. <dt>&lsquo;<samp>zero</samp>&rsquo;</dt>
  23371. <dd><p>round towards 0
  23372. </p></dd>
  23373. <dt>&lsquo;<samp>inf</samp>&rsquo;</dt>
  23374. <dd><p>round away from 0
  23375. </p></dd>
  23376. <dt>&lsquo;<samp>down</samp>&rsquo;</dt>
  23377. <dd><p>round towards -infinity
  23378. </p></dd>
  23379. <dt>&lsquo;<samp>up</samp>&rsquo;</dt>
  23380. <dd><p>round towards +infinity
  23381. </p></dd>
  23382. <dt>&lsquo;<samp>near</samp>&rsquo;</dt>
  23383. <dd><p>round to nearest
  23384. </p></dd>
  23385. </dl>
  23386. <p>The default is <code>near</code>.
  23387. </p>
  23388. </dd>
  23389. <dt>&lsquo;<samp>eof_action</samp>&rsquo;</dt>
  23390. <dd><p>Action performed when reading the last frame.
  23391. </p>
  23392. <p>Possible values are:
  23393. </p><dl compact="compact">
  23394. <dt>&lsquo;<samp>round</samp>&rsquo;</dt>
  23395. <dd><p>Use same timestamp rounding method as used for other frames.
  23396. </p></dd>
  23397. <dt>&lsquo;<samp>pass</samp>&rsquo;</dt>
  23398. <dd><p>Pass through last frame if input duration has not been reached yet.
  23399. </p></dd>
  23400. </dl>
  23401. <p>The default is <code>round</code>.
  23402. </p>
  23403. </dd>
  23404. </dl>
  23405. <p>Alternatively, the options can be specified as a flat string:
  23406. <var>fps</var>[:<var>start_time</var>[:<var>round</var>]].
  23407. </p>
  23408. <p>See also the <a href="#setpts">setpts</a> filter.
  23409. </p>
  23410. <a name="Examples-160"></a>
  23411. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-160">30.79.1 Examples</a></h3>
  23412. <ul>
  23413. <li>
  23414. A typical usage in order to set the fps to 25:
  23415. <div class="example">
  23416. <pre class="example">fps=fps=25
  23417. </pre></div>
  23418. </li><li>
  23419. Sets the fps to 24, using abbreviation and rounding method to round to nearest:
  23420. <div class="example">
  23421. <pre class="example">fps=fps=film:round=near
  23422. </pre></div>
  23423. </li></ul>
  23424. <a name="framepack"></a>
  23425. <h2 class="section"><a href="ffplay-all.html#toc-framepack">30.80 framepack</a></h2>
  23426. <p>Pack two different video streams into a stereoscopic video, setting proper
  23427. metadata on supported codecs. The two views should have the same size and
  23428. framerate and processing will stop when the shorter video ends. Please note
  23429. that you may conveniently adjust view properties with the <a href="#scale">scale</a> and
  23430. <a href="#fps">fps</a> filters.
  23431. </p>
  23432. <p>It accepts the following parameters:
  23433. </p><dl compact="compact">
  23434. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  23435. <dd><p>The desired packing format. Supported values are:
  23436. </p>
  23437. <dl compact="compact">
  23438. <dt>&lsquo;<samp>sbs</samp>&rsquo;</dt>
  23439. <dd><p>The views are next to each other (default).
  23440. </p>
  23441. </dd>
  23442. <dt>&lsquo;<samp>tab</samp>&rsquo;</dt>
  23443. <dd><p>The views are on top of each other.
  23444. </p>
  23445. </dd>
  23446. <dt>&lsquo;<samp>lines</samp>&rsquo;</dt>
  23447. <dd><p>The views are packed by line.
  23448. </p>
  23449. </dd>
  23450. <dt>&lsquo;<samp>columns</samp>&rsquo;</dt>
  23451. <dd><p>The views are packed by column.
  23452. </p>
  23453. </dd>
  23454. <dt>&lsquo;<samp>frameseq</samp>&rsquo;</dt>
  23455. <dd><p>The views are temporally interleaved.
  23456. </p>
  23457. </dd>
  23458. </dl>
  23459. </dd>
  23460. </dl>
  23461. <p>Some examples:
  23462. </p>
  23463. <div class="example">
  23464. <pre class="example"># Convert left and right views into a frame-sequential video
  23465. ffmpeg -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
  23466. # Convert views into a side-by-side video with the same output resolution as the input
  23467. 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
  23468. </pre></div>
  23469. <a name="framerate"></a>
  23470. <h2 class="section"><a href="ffplay-all.html#toc-framerate">30.81 framerate</a></h2>
  23471. <p>Change the frame rate by interpolating new video output frames from the source
  23472. frames.
  23473. </p>
  23474. <p>This filter is not designed to function correctly with interlaced media. If
  23475. you wish to change the frame rate of interlaced media then you are required
  23476. to deinterlace before this filter and re-interlace after this filter.
  23477. </p>
  23478. <p>A description of the accepted options follows.
  23479. </p>
  23480. <dl compact="compact">
  23481. <dt>&lsquo;<samp>fps</samp>&rsquo;</dt>
  23482. <dd><p>Specify the output frames per second. This option can also be specified
  23483. as a value alone. The default is <code>50</code>.
  23484. </p>
  23485. </dd>
  23486. <dt>&lsquo;<samp>interp_start</samp>&rsquo;</dt>
  23487. <dd><p>Specify the start of a range where the output frame will be created as a
  23488. linear interpolation of two frames. The range is [<code>0</code>-<code>255</code>],
  23489. the default is <code>15</code>.
  23490. </p>
  23491. </dd>
  23492. <dt>&lsquo;<samp>interp_end</samp>&rsquo;</dt>
  23493. <dd><p>Specify the end of a range where the output frame will be created as a
  23494. linear interpolation of two frames. The range is [<code>0</code>-<code>255</code>],
  23495. the default is <code>240</code>.
  23496. </p>
  23497. </dd>
  23498. <dt>&lsquo;<samp>scene</samp>&rsquo;</dt>
  23499. <dd><p>Specify the level at which a scene change is detected as a value between
  23500. 0 and 100 to indicate a new scene; a low value reflects a low
  23501. probability for the current frame to introduce a new scene, while a higher
  23502. value means the current frame is more likely to be one.
  23503. The default is <code>8.2</code>.
  23504. </p>
  23505. </dd>
  23506. <dt>&lsquo;<samp>flags</samp>&rsquo;</dt>
  23507. <dd><p>Specify flags influencing the filter process.
  23508. </p>
  23509. <p>Available value for <var>flags</var> is:
  23510. </p>
  23511. <dl compact="compact">
  23512. <dt>&lsquo;<samp>scene_change_detect, scd</samp>&rsquo;</dt>
  23513. <dd><p>Enable scene change detection using the value of the option <var>scene</var>.
  23514. This flag is enabled by default.
  23515. </p></dd>
  23516. </dl>
  23517. </dd>
  23518. </dl>
  23519. <a name="framestep"></a>
  23520. <h2 class="section"><a href="ffplay-all.html#toc-framestep">30.82 framestep</a></h2>
  23521. <p>Select one frame every N-th frame.
  23522. </p>
  23523. <p>This filter accepts the following option:
  23524. </p><dl compact="compact">
  23525. <dt>&lsquo;<samp>step</samp>&rsquo;</dt>
  23526. <dd><p>Select frame after every <code>step</code> frames.
  23527. Allowed values are positive integers higher than 0. Default value is <code>1</code>.
  23528. </p></dd>
  23529. </dl>
  23530. <a name="freezedetect"></a>
  23531. <h2 class="section"><a href="ffplay-all.html#toc-freezedetect">30.83 freezedetect</a></h2>
  23532. <p>Detect frozen video.
  23533. </p>
  23534. <p>This filter logs a message and sets frame metadata when it detects that the
  23535. input video has no significant change in content during a specified duration.
  23536. Video freeze detection calculates the mean average absolute difference of all
  23537. the components of video frames and compares it to a noise floor.
  23538. </p>
  23539. <p>The printed times and duration are expressed in seconds. The
  23540. <code>lavfi.freezedetect.freeze_start</code> metadata key is set on the first frame
  23541. whose timestamp equals or exceeds the detection duration and it contains the
  23542. timestamp of the first frame of the freeze. The
  23543. <code>lavfi.freezedetect.freeze_duration</code> and
  23544. <code>lavfi.freezedetect.freeze_end</code> metadata keys are set on the first frame
  23545. after the freeze.
  23546. </p>
  23547. <p>The filter accepts the following options:
  23548. </p>
  23549. <dl compact="compact">
  23550. <dt>&lsquo;<samp>noise, n</samp>&rsquo;</dt>
  23551. <dd><p>Set noise tolerance. Can be specified in dB (in case &quot;dB&quot; is appended to the
  23552. specified value) or as a difference ratio between 0 and 1. Default is -60dB, or
  23553. 0.001.
  23554. </p>
  23555. </dd>
  23556. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  23557. <dd><p>Set freeze duration until notification (default is 2 seconds).
  23558. </p></dd>
  23559. </dl>
  23560. <a name="freezeframes"></a>
  23561. <h2 class="section"><a href="ffplay-all.html#toc-freezeframes">30.84 freezeframes</a></h2>
  23562. <p>Freeze video frames.
  23563. </p>
  23564. <p>This filter freezes video frames using frame from 2nd input.
  23565. </p>
  23566. <p>The filter accepts the following options:
  23567. </p>
  23568. <dl compact="compact">
  23569. <dt>&lsquo;<samp>first</samp>&rsquo;</dt>
  23570. <dd><p>Set number of first frame from which to start freeze.
  23571. </p>
  23572. </dd>
  23573. <dt>&lsquo;<samp>last</samp>&rsquo;</dt>
  23574. <dd><p>Set number of last frame from which to end freeze.
  23575. </p>
  23576. </dd>
  23577. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  23578. <dd><p>Set number of frame from 2nd input which will be used instead of replaced frames.
  23579. </p></dd>
  23580. </dl>
  23581. <p><a name="frei0r"></a>
  23582. </p><a name="frei0r-1"></a>
  23583. <h2 class="section"><a href="ffplay-all.html#toc-frei0r-1">30.85 frei0r</a></h2>
  23584. <p>Apply a frei0r effect to the input video.
  23585. </p>
  23586. <p>To enable the compilation of this filter, you need to install the frei0r
  23587. header and configure FFmpeg with <code>--enable-frei0r</code>.
  23588. </p>
  23589. <p>It accepts the following parameters:
  23590. </p>
  23591. <dl compact="compact">
  23592. <dt>&lsquo;<samp>filter_name</samp>&rsquo;</dt>
  23593. <dd><p>The name of the frei0r effect to load. If the environment variable
  23594. <code>FREI0R_PATH</code> is defined, the frei0r effect is searched for in each of the
  23595. directories specified by the colon-separated list in <code>FREI0R_PATH</code>.
  23596. Otherwise, the standard frei0r paths are searched, in this order:
  23597. &lsquo;<tt>HOME/.frei0r-1/lib/</tt>&rsquo;, &lsquo;<tt>/usr/local/lib/frei0r-1/</tt>&rsquo;,
  23598. &lsquo;<tt>/usr/lib/frei0r-1/</tt>&rsquo;.
  23599. </p>
  23600. </dd>
  23601. <dt>&lsquo;<samp>filter_params</samp>&rsquo;</dt>
  23602. <dd><p>A &rsquo;|&rsquo;-separated list of parameters to pass to the frei0r effect.
  23603. </p>
  23604. </dd>
  23605. </dl>
  23606. <p>A frei0r effect parameter can be a boolean (its value is either
  23607. &quot;y&quot; or &quot;n&quot;), a double, a color (specified as
  23608. <var>R</var>/<var>G</var>/<var>B</var>, where <var>R</var>, <var>G</var>, and <var>B</var> are floating point
  23609. numbers between 0.0 and 1.0, inclusive) or a color description as specified in the
  23610. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>,
  23611. a position (specified as <var>X</var>/<var>Y</var>, where
  23612. <var>X</var> and <var>Y</var> are floating point numbers) and/or a string.
  23613. </p>
  23614. <p>The number and types of parameters depend on the loaded effect. If an
  23615. effect parameter is not specified, the default value is set.
  23616. </p>
  23617. <a name="Examples-57"></a>
  23618. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-57">30.85.1 Examples</a></h3>
  23619. <ul>
  23620. <li>
  23621. Apply the distort0r effect, setting the first two double parameters:
  23622. <div class="example">
  23623. <pre class="example">frei0r=filter_name=distort0r:filter_params=0.5|0.01
  23624. </pre></div>
  23625. </li><li>
  23626. Apply the colordistance effect, taking a color as the first parameter:
  23627. <div class="example">
  23628. <pre class="example">frei0r=colordistance:0.2/0.3/0.4
  23629. frei0r=colordistance:violet
  23630. frei0r=colordistance:0x112233
  23631. </pre></div>
  23632. </li><li>
  23633. Apply the perspective effect, specifying the top left and top right image
  23634. positions:
  23635. <div class="example">
  23636. <pre class="example">frei0r=perspective:0.2/0.2|0.8/0.2
  23637. </pre></div>
  23638. </li></ul>
  23639. <p>For more information, see
  23640. <a href="http://frei0r.dyne.org">http://frei0r.dyne.org</a>
  23641. </p>
  23642. <a name="fspp"></a>
  23643. <h2 class="section"><a href="ffplay-all.html#toc-fspp">30.86 fspp</a></h2>
  23644. <p>Apply fast and simple postprocessing. It is a faster version of <a href="#spp">spp</a>.
  23645. </p>
  23646. <p>It splits (I)DCT into horizontal/vertical passes. Unlike the simple post-
  23647. processing filter, one of them is performed once per block, not per pixel.
  23648. This allows for much higher speed.
  23649. </p>
  23650. <p>The filter accepts the following options:
  23651. </p>
  23652. <dl compact="compact">
  23653. <dt>&lsquo;<samp>quality</samp>&rsquo;</dt>
  23654. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  23655. an integer in the range 4-5. Default value is <code>4</code>.
  23656. </p>
  23657. </dd>
  23658. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  23659. <dd><p>Force a constant quantization parameter. It accepts an integer in range 0-63.
  23660. If not set, the filter will use the QP from the video stream (if available).
  23661. </p>
  23662. </dd>
  23663. <dt>&lsquo;<samp>strength</samp>&rsquo;</dt>
  23664. <dd><p>Set filter strength. It accepts an integer in range -15 to 32. Lower values mean
  23665. more details but also more artifacts, while higher values make the image smoother
  23666. but also blurrier. Default value is <code>0</code> − PSNR optimal.
  23667. </p>
  23668. </dd>
  23669. <dt>&lsquo;<samp>use_bframe_qp</samp>&rsquo;</dt>
  23670. <dd><p>Enable the use of the QP from the B-Frames if set to <code>1</code>. Using this
  23671. option may cause flicker since the B-Frames have often larger QP. Default is
  23672. <code>0</code> (not enabled).
  23673. </p>
  23674. </dd>
  23675. </dl>
  23676. <a name="gblur"></a>
  23677. <h2 class="section"><a href="ffplay-all.html#toc-gblur">30.87 gblur</a></h2>
  23678. <p>Apply Gaussian blur filter.
  23679. </p>
  23680. <p>The filter accepts the following options:
  23681. </p>
  23682. <dl compact="compact">
  23683. <dt>&lsquo;<samp>sigma</samp>&rsquo;</dt>
  23684. <dd><p>Set horizontal sigma, standard deviation of Gaussian blur. Default is <code>0.5</code>.
  23685. </p>
  23686. </dd>
  23687. <dt>&lsquo;<samp>steps</samp>&rsquo;</dt>
  23688. <dd><p>Set number of steps for Gaussian approximation. Default is <code>1</code>.
  23689. </p>
  23690. </dd>
  23691. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  23692. <dd><p>Set which planes to filter. By default all planes are filtered.
  23693. </p>
  23694. </dd>
  23695. <dt>&lsquo;<samp>sigmaV</samp>&rsquo;</dt>
  23696. <dd><p>Set vertical sigma, if negative it will be same as <code>sigma</code>.
  23697. Default is <code>-1</code>.
  23698. </p></dd>
  23699. </dl>
  23700. <a name="Commands-24"></a>
  23701. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-24">30.87.1 Commands</a></h3>
  23702. <p>This filter supports same commands as options.
  23703. The command accepts the same syntax of the corresponding option.
  23704. </p>
  23705. <p>If the specified expression is not valid, it is kept at its current
  23706. value.
  23707. </p>
  23708. <a name="geq"></a>
  23709. <h2 class="section"><a href="ffplay-all.html#toc-geq">30.88 geq</a></h2>
  23710. <p>Apply generic equation to each pixel.
  23711. </p>
  23712. <p>The filter accepts the following options:
  23713. </p>
  23714. <dl compact="compact">
  23715. <dt>&lsquo;<samp>lum_expr, lum</samp>&rsquo;</dt>
  23716. <dd><p>Set the luminance expression.
  23717. </p></dd>
  23718. <dt>&lsquo;<samp>cb_expr, cb</samp>&rsquo;</dt>
  23719. <dd><p>Set the chrominance blue expression.
  23720. </p></dd>
  23721. <dt>&lsquo;<samp>cr_expr, cr</samp>&rsquo;</dt>
  23722. <dd><p>Set the chrominance red expression.
  23723. </p></dd>
  23724. <dt>&lsquo;<samp>alpha_expr, a</samp>&rsquo;</dt>
  23725. <dd><p>Set the alpha expression.
  23726. </p></dd>
  23727. <dt>&lsquo;<samp>red_expr, r</samp>&rsquo;</dt>
  23728. <dd><p>Set the red expression.
  23729. </p></dd>
  23730. <dt>&lsquo;<samp>green_expr, g</samp>&rsquo;</dt>
  23731. <dd><p>Set the green expression.
  23732. </p></dd>
  23733. <dt>&lsquo;<samp>blue_expr, b</samp>&rsquo;</dt>
  23734. <dd><p>Set the blue expression.
  23735. </p></dd>
  23736. </dl>
  23737. <p>The colorspace is selected according to the specified options. If one
  23738. of the &lsquo;<samp>lum_expr</samp>&rsquo;, &lsquo;<samp>cb_expr</samp>&rsquo;, or &lsquo;<samp>cr_expr</samp>&rsquo;
  23739. options is specified, the filter will automatically select a YCbCr
  23740. colorspace. If one of the &lsquo;<samp>red_expr</samp>&rsquo;, &lsquo;<samp>green_expr</samp>&rsquo;, or
  23741. &lsquo;<samp>blue_expr</samp>&rsquo; options is specified, it will select an RGB
  23742. colorspace.
  23743. </p>
  23744. <p>If one of the chrominance expression is not defined, it falls back on the other
  23745. one. If no alpha expression is specified it will evaluate to opaque value.
  23746. If none of chrominance expressions are specified, they will evaluate
  23747. to the luminance expression.
  23748. </p>
  23749. <p>The expressions can use the following variables and functions:
  23750. </p>
  23751. <dl compact="compact">
  23752. <dt>&lsquo;<samp>N</samp>&rsquo;</dt>
  23753. <dd><p>The sequential number of the filtered frame, starting from <code>0</code>.
  23754. </p>
  23755. </dd>
  23756. <dt>&lsquo;<samp>X</samp>&rsquo;</dt>
  23757. <dt>&lsquo;<samp>Y</samp>&rsquo;</dt>
  23758. <dd><p>The coordinates of the current sample.
  23759. </p>
  23760. </dd>
  23761. <dt>&lsquo;<samp>W</samp>&rsquo;</dt>
  23762. <dt>&lsquo;<samp>H</samp>&rsquo;</dt>
  23763. <dd><p>The width and height of the image.
  23764. </p>
  23765. </dd>
  23766. <dt>&lsquo;<samp>SW</samp>&rsquo;</dt>
  23767. <dt>&lsquo;<samp>SH</samp>&rsquo;</dt>
  23768. <dd><p>Width and height scale depending on the currently filtered plane. It is the
  23769. ratio between the corresponding luma plane number of pixels and the current
  23770. plane ones. E.g. for YUV4:2:0 the values are <code>1,1</code> for the luma plane, and
  23771. <code>0.5,0.5</code> for chroma planes.
  23772. </p>
  23773. </dd>
  23774. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  23775. <dd><p>Time of the current frame, expressed in seconds.
  23776. </p>
  23777. </dd>
  23778. <dt>&lsquo;<samp>p(x, y)</samp>&rsquo;</dt>
  23779. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the current
  23780. plane.
  23781. </p>
  23782. </dd>
  23783. <dt>&lsquo;<samp>lum(x, y)</samp>&rsquo;</dt>
  23784. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the luminance
  23785. plane.
  23786. </p>
  23787. </dd>
  23788. <dt>&lsquo;<samp>cb(x, y)</samp>&rsquo;</dt>
  23789. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  23790. blue-difference chroma plane. Return 0 if there is no such plane.
  23791. </p>
  23792. </dd>
  23793. <dt>&lsquo;<samp>cr(x, y)</samp>&rsquo;</dt>
  23794. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  23795. red-difference chroma plane. Return 0 if there is no such plane.
  23796. </p>
  23797. </dd>
  23798. <dt>&lsquo;<samp>r(x, y)</samp>&rsquo;</dt>
  23799. <dt>&lsquo;<samp>g(x, y)</samp>&rsquo;</dt>
  23800. <dt>&lsquo;<samp>b(x, y)</samp>&rsquo;</dt>
  23801. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  23802. red/green/blue component. Return 0 if there is no such component.
  23803. </p>
  23804. </dd>
  23805. <dt>&lsquo;<samp>alpha(x, y)</samp>&rsquo;</dt>
  23806. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the alpha
  23807. plane. Return 0 if there is no such plane.
  23808. </p>
  23809. </dd>
  23810. <dt>&lsquo;<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>&rsquo;</dt>
  23811. <dd><p>Sum of sample values in the rectangle from (0,0) to (x,y), this allows obtaining
  23812. sums of samples within a rectangle. See the functions without the sum postfix.
  23813. </p>
  23814. </dd>
  23815. <dt>&lsquo;<samp>interpolation</samp>&rsquo;</dt>
  23816. <dd><p>Set one of interpolation methods:
  23817. </p><dl compact="compact">
  23818. <dt>&lsquo;<samp>nearest, n</samp>&rsquo;</dt>
  23819. <dt>&lsquo;<samp>bilinear, b</samp>&rsquo;</dt>
  23820. </dl>
  23821. <p>Default is bilinear.
  23822. </p></dd>
  23823. </dl>
  23824. <p>For functions, if <var>x</var> and <var>y</var> are outside the area, the value will be
  23825. automatically clipped to the closer edge.
  23826. </p>
  23827. <p>Please note that this filter can use multiple threads in which case each slice
  23828. will have its own expression state. If you want to use only a single expression
  23829. state because your expressions depend on previous state then you should limit
  23830. the number of filter threads to 1.
  23831. </p>
  23832. <a name="Examples-35"></a>
  23833. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-35">30.88.1 Examples</a></h3>
  23834. <ul>
  23835. <li>
  23836. Flip the image horizontally:
  23837. <div class="example">
  23838. <pre class="example">geq=p(W-X\,Y)
  23839. </pre></div>
  23840. </li><li>
  23841. Generate a bidimensional sine wave, with angle <code>PI/3</code> and a
  23842. wavelength of 100 pixels:
  23843. <div class="example">
  23844. <pre class="example">geq=128 + 100*sin(2*(PI/100)*(cos(PI/3)*(X-50*T) + sin(PI/3)*Y)):128:128
  23845. </pre></div>
  23846. </li><li>
  23847. Generate a fancy enigmatic moving light:
  23848. <div class="example">
  23849. <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
  23850. </pre></div>
  23851. </li><li>
  23852. Generate a quick emboss effect:
  23853. <div class="example">
  23854. <pre class="example">format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'
  23855. </pre></div>
  23856. </li><li>
  23857. Modify RGB components depending on pixel position:
  23858. <div class="example">
  23859. <pre class="example">geq=r='X/W*r(X,Y)':g='(1-X/W)*g(X,Y)':b='(H-Y)/H*b(X,Y)'
  23860. </pre></div>
  23861. </li><li>
  23862. Create a radial gradient that is the same size as the input (also see
  23863. the <a href="#vignette">vignette</a> filter):
  23864. <div class="example">
  23865. <pre class="example">geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
  23866. </pre></div>
  23867. </li></ul>
  23868. <a name="gradfun"></a>
  23869. <h2 class="section"><a href="ffplay-all.html#toc-gradfun">30.89 gradfun</a></h2>
  23870. <p>Fix the banding artifacts that are sometimes introduced into nearly flat
  23871. regions by truncation to 8-bit color depth.
  23872. Interpolate the gradients that should go where the bands are, and
  23873. dither them.
  23874. </p>
  23875. <p>It is designed for playback only. Do not use it prior to
  23876. lossy compression, because compression tends to lose the dither and
  23877. bring back the bands.
  23878. </p>
  23879. <p>It accepts the following parameters:
  23880. </p>
  23881. <dl compact="compact">
  23882. <dt>&lsquo;<samp>strength</samp>&rsquo;</dt>
  23883. <dd><p>The maximum amount by which the filter will change any one pixel. This is also
  23884. the threshold for detecting nearly flat regions. Acceptable values range from
  23885. .51 to 64; the default value is 1.2. Out-of-range values will be clipped to the
  23886. valid range.
  23887. </p>
  23888. </dd>
  23889. <dt>&lsquo;<samp>radius</samp>&rsquo;</dt>
  23890. <dd><p>The neighborhood to fit the gradient to. A larger radius makes for smoother
  23891. gradients, but also prevents the filter from modifying the pixels near detailed
  23892. regions. Acceptable values are 8-32; the default value is 16. Out-of-range
  23893. values will be clipped to the valid range.
  23894. </p>
  23895. </dd>
  23896. </dl>
  23897. <p>Alternatively, the options can be specified as a flat string:
  23898. <var>strength</var>[:<var>radius</var>]
  23899. </p>
  23900. <a name="Examples-83"></a>
  23901. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-83">30.89.1 Examples</a></h3>
  23902. <ul>
  23903. <li>
  23904. Apply the filter with a <code>3.5</code> strength and radius of <code>8</code>:
  23905. <div class="example">
  23906. <pre class="example">gradfun=3.5:8
  23907. </pre></div>
  23908. </li><li>
  23909. Specify radius, omitting the strength (which will fall-back to the default
  23910. value):
  23911. <div class="example">
  23912. <pre class="example">gradfun=radius=8
  23913. </pre></div>
  23914. </li></ul>
  23915. <p><a name="graphmonitor"></a>
  23916. </p><a name="graphmonitor-1"></a>
  23917. <h2 class="section"><a href="ffplay-all.html#toc-graphmonitor-1">30.90 graphmonitor</a></h2>
  23918. <p>Show various filtergraph stats.
  23919. </p>
  23920. <p>With this filter one can debug complete filtergraph.
  23921. Especially issues with links filling with queued frames.
  23922. </p>
  23923. <p>The filter accepts the following options:
  23924. </p>
  23925. <dl compact="compact">
  23926. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  23927. <dd><p>Set video output size. Default is <var>hd720</var>.
  23928. </p>
  23929. </dd>
  23930. <dt>&lsquo;<samp>opacity, o</samp>&rsquo;</dt>
  23931. <dd><p>Set video opacity. Default is <var>0.9</var>. Allowed range is from <var>0</var> to <var>1</var>.
  23932. </p>
  23933. </dd>
  23934. <dt>&lsquo;<samp>mode, m</samp>&rsquo;</dt>
  23935. <dd><p>Set output mode, can be <var>fulll</var> or <var>compact</var>.
  23936. In <var>compact</var> mode only filters with some queued frames have displayed stats.
  23937. </p>
  23938. </dd>
  23939. <dt>&lsquo;<samp>flags, f</samp>&rsquo;</dt>
  23940. <dd><p>Set flags which enable which stats are shown in video.
  23941. </p>
  23942. <p>Available values for flags are:
  23943. </p><dl compact="compact">
  23944. <dt>&lsquo;<samp>queue</samp>&rsquo;</dt>
  23945. <dd><p>Display number of queued frames in each link.
  23946. </p>
  23947. </dd>
  23948. <dt>&lsquo;<samp>frame_count_in</samp>&rsquo;</dt>
  23949. <dd><p>Display number of frames taken from filter.
  23950. </p>
  23951. </dd>
  23952. <dt>&lsquo;<samp>frame_count_out</samp>&rsquo;</dt>
  23953. <dd><p>Display number of frames given out from filter.
  23954. </p>
  23955. </dd>
  23956. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  23957. <dd><p>Display current filtered frame pts.
  23958. </p>
  23959. </dd>
  23960. <dt>&lsquo;<samp>time</samp>&rsquo;</dt>
  23961. <dd><p>Display current filtered frame time.
  23962. </p>
  23963. </dd>
  23964. <dt>&lsquo;<samp>timebase</samp>&rsquo;</dt>
  23965. <dd><p>Display time base for filter link.
  23966. </p>
  23967. </dd>
  23968. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  23969. <dd><p>Display used format for filter link.
  23970. </p>
  23971. </dd>
  23972. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  23973. <dd><p>Display video size or number of audio channels in case of audio used by filter link.
  23974. </p>
  23975. </dd>
  23976. <dt>&lsquo;<samp>rate</samp>&rsquo;</dt>
  23977. <dd><p>Display video frame rate or sample rate in case of audio used by filter link.
  23978. </p></dd>
  23979. </dl>
  23980. </dd>
  23981. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  23982. <dd><p>Set upper limit for video rate of output stream, Default value is <var>25</var>.
  23983. This guarantee that output video frame rate will not be higher than this value.
  23984. </p></dd>
  23985. </dl>
  23986. <a name="greyedge"></a>
  23987. <h2 class="section"><a href="ffplay-all.html#toc-greyedge">30.91 greyedge</a></h2>
  23988. <p>A color constancy variation filter which estimates scene illumination via grey edge algorithm
  23989. and corrects the scene colors accordingly.
  23990. </p>
  23991. <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>
  23992. </p>
  23993. <p>The filter accepts the following options:
  23994. </p>
  23995. <dl compact="compact">
  23996. <dt>&lsquo;<samp>difford</samp>&rsquo;</dt>
  23997. <dd><p>The order of differentiation to be applied on the scene. Must be chosen in the range
  23998. [0,2] and default value is 1.
  23999. </p>
  24000. </dd>
  24001. <dt>&lsquo;<samp>minknorm</samp>&rsquo;</dt>
  24002. <dd><p>The Minkowski parameter to be used for calculating the Minkowski distance. Must
  24003. be chosen in the range [0,20] and default value is 1. Set to 0 for getting
  24004. max value instead of calculating Minkowski distance.
  24005. </p>
  24006. </dd>
  24007. <dt>&lsquo;<samp>sigma</samp>&rsquo;</dt>
  24008. <dd><p>The standard deviation of Gaussian blur to be applied on the scene. Must be
  24009. chosen in the range [0,1024.0] and default value = 1. floor( <var>sigma</var> * break_off_sigma(3) )
  24010. can&rsquo;t be equal to 0 if <var>difford</var> is greater than 0.
  24011. </p></dd>
  24012. </dl>
  24013. <a name="Examples-45"></a>
  24014. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-45">30.91.1 Examples</a></h3>
  24015. <ul>
  24016. <li>
  24017. Grey Edge:
  24018. <div class="example">
  24019. <pre class="example">greyedge=difford=1:minknorm=5:sigma=2
  24020. </pre></div>
  24021. </li><li>
  24022. Max Edge:
  24023. <div class="example">
  24024. <pre class="example">greyedge=difford=1:minknorm=0:sigma=2
  24025. </pre></div>
  24026. </li></ul>
  24027. <p><a name="haldclut"></a>
  24028. </p><a name="haldclut-1"></a>
  24029. <h2 class="section"><a href="ffplay-all.html#toc-haldclut-1">30.92 haldclut</a></h2>
  24030. <p>Apply a Hald CLUT to a video stream.
  24031. </p>
  24032. <p>First input is the video stream to process, and second one is the Hald CLUT.
  24033. The Hald CLUT input can be a simple picture or a complete video stream.
  24034. </p>
  24035. <p>The filter accepts the following options:
  24036. </p>
  24037. <dl compact="compact">
  24038. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  24039. <dd><p>Force termination when the shortest input terminates. Default is <code>0</code>.
  24040. </p></dd>
  24041. <dt>&lsquo;<samp>repeatlast</samp>&rsquo;</dt>
  24042. <dd><p>Continue applying the last CLUT after the end of the stream. A value of
  24043. <code>0</code> disable the filter after the last frame of the CLUT is reached.
  24044. Default is <code>1</code>.
  24045. </p></dd>
  24046. </dl>
  24047. <p><code>haldclut</code> also has the same interpolation options as <a href="#lut3d">lut3d</a> (both
  24048. filters share the same internals).
  24049. </p>
  24050. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  24051. </p>
  24052. <p>More information about the Hald CLUT can be found on Eskil Steenberg&rsquo;s website
  24053. (Hald CLUT author) at <a href="http://www.quelsolaar.com/technology/clut.html">http://www.quelsolaar.com/technology/clut.html</a>.
  24054. </p>
  24055. <a name="Workflow-examples"></a>
  24056. <h3 class="subsection"><a href="ffplay-all.html#toc-Workflow-examples">30.92.1 Workflow examples</a></h3>
  24057. <a name="Hald-CLUT-video-stream"></a>
  24058. <h4 class="subsubsection"><a href="ffplay-all.html#toc-Hald-CLUT-video-stream">30.92.1.1 Hald CLUT video stream</a></h4>
  24059. <p>Generate an identity Hald CLUT stream altered with various effects:
  24060. </p><div class="example">
  24061. <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
  24062. </pre></div>
  24063. <p>Note: make sure you use a lossless codec.
  24064. </p>
  24065. <p>Then use it with <code>haldclut</code> to apply it on some random stream:
  24066. </p><div class="example">
  24067. <pre class="example">ffmpeg -f lavfi -i mandelbrot -i clut.nut -filter_complex '[0][1] haldclut' -t 20 mandelclut.mkv
  24068. </pre></div>
  24069. <p>The Hald CLUT will be applied to the 10 first seconds (duration of
  24070. &lsquo;<tt>clut.nut</tt>&rsquo;), then the latest picture of that CLUT stream will be applied
  24071. to the remaining frames of the <code>mandelbrot</code> stream.
  24072. </p>
  24073. <a name="Hald-CLUT-with-preview"></a>
  24074. <h4 class="subsubsection"><a href="ffplay-all.html#toc-Hald-CLUT-with-preview">30.92.1.2 Hald CLUT with preview</a></h4>
  24075. <p>A Hald CLUT is supposed to be a squared image of <code>Level*Level*Level</code> by
  24076. <code>Level*Level*Level</code> pixels. For a given Hald CLUT, FFmpeg will select the
  24077. biggest possible square starting at the top left of the picture. The remaining
  24078. padding pixels (bottom or right) will be ignored. This area can be used to add
  24079. a preview of the Hald CLUT.
  24080. </p>
  24081. <p>Typically, the following generated Hald CLUT will be supported by the
  24082. <code>haldclut</code> filter:
  24083. </p>
  24084. <div class="example">
  24085. <pre class="example">ffmpeg -f lavfi -i <a href="#haldclutsrc">haldclutsrc</a>=8 -vf &quot;
  24086. pad=iw+320 [padded_clut];
  24087. smptebars=s=320x256, split [a][b];
  24088. [padded_clut][a] overlay=W-320:h, curves=color_negative [main];
  24089. [main][b] overlay=W-320&quot; -frames:v 1 clut.png
  24090. </pre></div>
  24091. <p>It contains the original and a preview of the effect of the CLUT: SMPTE color
  24092. bars are displayed on the right-top, and below the same color bars processed by
  24093. the color changes.
  24094. </p>
  24095. <p>Then, the effect of this Hald CLUT can be visualized with:
  24096. </p><div class="example">
  24097. <pre class="example">ffplay input.mkv -vf &quot;movie=clut.png, [in] haldclut&quot;
  24098. </pre></div>
  24099. <a name="hflip"></a>
  24100. <h2 class="section"><a href="ffplay-all.html#toc-hflip">30.93 hflip</a></h2>
  24101. <p>Flip the input video horizontally.
  24102. </p>
  24103. <p>For example, to horizontally flip the input video with <code>ffmpeg</code>:
  24104. </p><div class="example">
  24105. <pre class="example">ffmpeg -i in.avi -vf &quot;hflip&quot; out.avi
  24106. </pre></div>
  24107. <a name="histeq"></a>
  24108. <h2 class="section"><a href="ffplay-all.html#toc-histeq">30.94 histeq</a></h2>
  24109. <p>This filter applies a global color histogram equalization on a
  24110. per-frame basis.
  24111. </p>
  24112. <p>It can be used to correct video that has a compressed range of pixel
  24113. intensities. The filter redistributes the pixel intensities to
  24114. equalize their distribution across the intensity range. It may be
  24115. viewed as an &quot;automatically adjusting contrast filter&quot;. This filter is
  24116. useful only for correcting degraded or poorly captured source
  24117. video.
  24118. </p>
  24119. <p>The filter accepts the following options:
  24120. </p>
  24121. <dl compact="compact">
  24122. <dt>&lsquo;<samp>strength</samp>&rsquo;</dt>
  24123. <dd><p>Determine the amount of equalization to be applied. As the strength
  24124. is reduced, the distribution of pixel intensities more-and-more
  24125. approaches that of the input frame. The value must be a float number
  24126. in the range [0,1] and defaults to 0.200.
  24127. </p>
  24128. </dd>
  24129. <dt>&lsquo;<samp>intensity</samp>&rsquo;</dt>
  24130. <dd><p>Set the maximum intensity that can generated and scale the output
  24131. values appropriately. The strength should be set as desired and then
  24132. the intensity can be limited if needed to avoid washing-out. The value
  24133. must be a float number in the range [0,1] and defaults to 0.210.
  24134. </p>
  24135. </dd>
  24136. <dt>&lsquo;<samp>antibanding</samp>&rsquo;</dt>
  24137. <dd><p>Set the antibanding level. If enabled the filter will randomly vary
  24138. the luminance of output pixels by a small amount to avoid banding of
  24139. the histogram. Possible values are <code>none</code>, <code>weak</code> or
  24140. <code>strong</code>. It defaults to <code>none</code>.
  24141. </p></dd>
  24142. </dl>
  24143. <p><a name="histogram"></a>
  24144. </p><a name="histogram-1"></a>
  24145. <h2 class="section"><a href="ffplay-all.html#toc-histogram-1">30.95 histogram</a></h2>
  24146. <p>Compute and draw a color distribution histogram for the input video.
  24147. </p>
  24148. <p>The computed histogram is a representation of the color component
  24149. distribution in an image.
  24150. </p>
  24151. <p>Standard histogram displays the color components distribution in an image.
  24152. Displays color graph for each color component. Shows distribution of
  24153. the Y, U, V, A or R, G, B components, depending on input format, in the
  24154. current frame. Below each graph a color component scale meter is shown.
  24155. </p>
  24156. <p>The filter accepts the following options:
  24157. </p>
  24158. <dl compact="compact">
  24159. <dt>&lsquo;<samp>level_height</samp>&rsquo;</dt>
  24160. <dd><p>Set height of level. Default value is <code>200</code>.
  24161. Allowed range is [50, 2048].
  24162. </p>
  24163. </dd>
  24164. <dt>&lsquo;<samp>scale_height</samp>&rsquo;</dt>
  24165. <dd><p>Set height of color scale. Default value is <code>12</code>.
  24166. Allowed range is [0, 40].
  24167. </p>
  24168. </dd>
  24169. <dt>&lsquo;<samp>display_mode</samp>&rsquo;</dt>
  24170. <dd><p>Set display mode.
  24171. It accepts the following values:
  24172. </p><dl compact="compact">
  24173. <dt>&lsquo;<samp>stack</samp>&rsquo;</dt>
  24174. <dd><p>Per color component graphs are placed below each other.
  24175. </p>
  24176. </dd>
  24177. <dt>&lsquo;<samp>parade</samp>&rsquo;</dt>
  24178. <dd><p>Per color component graphs are placed side by side.
  24179. </p>
  24180. </dd>
  24181. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  24182. <dd><p>Presents information identical to that in the <code>parade</code>, except
  24183. that the graphs representing color components are superimposed directly
  24184. over one another.
  24185. </p></dd>
  24186. </dl>
  24187. <p>Default is <code>stack</code>.
  24188. </p>
  24189. </dd>
  24190. <dt>&lsquo;<samp>levels_mode</samp>&rsquo;</dt>
  24191. <dd><p>Set mode. Can be either <code>linear</code>, or <code>logarithmic</code>.
  24192. Default is <code>linear</code>.
  24193. </p>
  24194. </dd>
  24195. <dt>&lsquo;<samp>components</samp>&rsquo;</dt>
  24196. <dd><p>Set what color components to display.
  24197. Default is <code>7</code>.
  24198. </p>
  24199. </dd>
  24200. <dt>&lsquo;<samp>fgopacity</samp>&rsquo;</dt>
  24201. <dd><p>Set foreground opacity. Default is <code>0.7</code>.
  24202. </p>
  24203. </dd>
  24204. <dt>&lsquo;<samp>bgopacity</samp>&rsquo;</dt>
  24205. <dd><p>Set background opacity. Default is <code>0.5</code>.
  24206. </p></dd>
  24207. </dl>
  24208. <a name="Examples-8"></a>
  24209. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-8">30.95.1 Examples</a></h3>
  24210. <ul>
  24211. <li>
  24212. Calculate and draw histogram:
  24213. <div class="example">
  24214. <pre class="example">ffplay -i input -vf histogram
  24215. </pre></div>
  24216. </li></ul>
  24217. <p><a name="hqdn3d"></a>
  24218. </p><a name="hqdn3d-1"></a>
  24219. <h2 class="section"><a href="ffplay-all.html#toc-hqdn3d-1">30.96 hqdn3d</a></h2>
  24220. <p>This is a high precision/quality 3d denoise filter. It aims to reduce
  24221. image noise, producing smooth images and making still images really
  24222. still. It should enhance compressibility.
  24223. </p>
  24224. <p>It accepts the following optional parameters:
  24225. </p>
  24226. <dl compact="compact">
  24227. <dt>&lsquo;<samp>luma_spatial</samp>&rsquo;</dt>
  24228. <dd><p>A non-negative floating point number which specifies spatial luma strength.
  24229. It defaults to 4.0.
  24230. </p>
  24231. </dd>
  24232. <dt>&lsquo;<samp>chroma_spatial</samp>&rsquo;</dt>
  24233. <dd><p>A non-negative floating point number which specifies spatial chroma strength.
  24234. It defaults to 3.0*<var>luma_spatial</var>/4.0.
  24235. </p>
  24236. </dd>
  24237. <dt>&lsquo;<samp>luma_tmp</samp>&rsquo;</dt>
  24238. <dd><p>A floating point number which specifies luma temporal strength. It defaults to
  24239. 6.0*<var>luma_spatial</var>/4.0.
  24240. </p>
  24241. </dd>
  24242. <dt>&lsquo;<samp>chroma_tmp</samp>&rsquo;</dt>
  24243. <dd><p>A floating point number which specifies chroma temporal strength. It defaults to
  24244. <var>luma_tmp</var>*<var>chroma_spatial</var>/<var>luma_spatial</var>.
  24245. </p></dd>
  24246. </dl>
  24247. <a name="Commands-8"></a>
  24248. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-8">30.96.1 Commands</a></h3>
  24249. <p>This filter supports same <a href="#commands">commands</a> as options.
  24250. The command accepts the same syntax of the corresponding option.
  24251. </p>
  24252. <p>If the specified expression is not valid, it is kept at its current
  24253. value.
  24254. </p>
  24255. <p><a name="hwdownload"></a>
  24256. </p><a name="hwdownload-1"></a>
  24257. <h2 class="section"><a href="ffplay-all.html#toc-hwdownload-1">30.97 hwdownload</a></h2>
  24258. <p>Download hardware frames to system memory.
  24259. </p>
  24260. <p>The input must be in hardware frames, and the output a non-hardware format.
  24261. Not all formats will be supported on the output - it may be necessary to insert
  24262. an additional &lsquo;<samp>format</samp>&rsquo; filter immediately following in the graph to get
  24263. the output in a supported format.
  24264. </p>
  24265. <a name="hwmap"></a>
  24266. <h2 class="section"><a href="ffplay-all.html#toc-hwmap">30.98 hwmap</a></h2>
  24267. <p>Map hardware frames to system memory or to another device.
  24268. </p>
  24269. <p>This filter has several different modes of operation; which one is used depends
  24270. on the input and output formats:
  24271. </p><ul>
  24272. <li>
  24273. Hardware frame input, normal frame output
  24274. <p>Map the input frames to system memory and pass them to the output. If the
  24275. original hardware frame is later required (for example, after overlaying
  24276. something else on part of it), the &lsquo;<samp>hwmap</samp>&rsquo; filter can be used again
  24277. in the next mode to retrieve it.
  24278. </p></li><li>
  24279. Normal frame input, hardware frame output
  24280. <p>If the input is actually a software-mapped hardware frame, then unmap it -
  24281. that is, return the original hardware frame.
  24282. </p>
  24283. <p>Otherwise, a device must be provided. Create new hardware surfaces on that
  24284. device for the output, then map them back to the software format at the input
  24285. and give those frames to the preceding filter. This will then act like the
  24286. &lsquo;<samp>hwupload</samp>&rsquo; filter, but may be able to avoid an additional copy when
  24287. the input is already in a compatible format.
  24288. </p></li><li>
  24289. Hardware frame input and output
  24290. <p>A device must be supplied for the output, either directly or with the
  24291. &lsquo;<samp>derive_device</samp>&rsquo; option. The input and output devices must be of
  24292. different types and compatible - the exact meaning of this is
  24293. system-dependent, but typically it means that they must refer to the same
  24294. underlying hardware context (for example, refer to the same graphics card).
  24295. </p>
  24296. <p>If the input frames were originally created on the output device, then unmap
  24297. to retrieve the original frames.
  24298. </p>
  24299. <p>Otherwise, map the frames to the output device - create new hardware frames
  24300. on the output corresponding to the frames on the input.
  24301. </p></li></ul>
  24302. <p>The following additional parameters are accepted:
  24303. </p>
  24304. <dl compact="compact">
  24305. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  24306. <dd><p>Set the frame mapping mode. Some combination of:
  24307. </p><dl compact="compact">
  24308. <dt><var>read</var></dt>
  24309. <dd><p>The mapped frame should be readable.
  24310. </p></dd>
  24311. <dt><var>write</var></dt>
  24312. <dd><p>The mapped frame should be writeable.
  24313. </p></dd>
  24314. <dt><var>overwrite</var></dt>
  24315. <dd><p>The mapping will always overwrite the entire frame.
  24316. </p>
  24317. <p>This may improve performance in some cases, as the original contents of the
  24318. frame need not be loaded.
  24319. </p></dd>
  24320. <dt><var>direct</var></dt>
  24321. <dd><p>The mapping must not involve any copying.
  24322. </p>
  24323. <p>Indirect mappings to copies of frames are created in some cases where either
  24324. direct mapping is not possible or it would have unexpected properties.
  24325. Setting this flag ensures that the mapping is direct and will fail if that is
  24326. not possible.
  24327. </p></dd>
  24328. </dl>
  24329. <p>Defaults to <var>read+write</var> if not specified.
  24330. </p>
  24331. </dd>
  24332. <dt>&lsquo;<samp>derive_device <var>type</var></samp>&rsquo;</dt>
  24333. <dd><p>Rather than using the device supplied at initialisation, instead derive a new
  24334. device of type <var>type</var> from the device the input frames exist on.
  24335. </p>
  24336. </dd>
  24337. <dt>&lsquo;<samp>reverse</samp>&rsquo;</dt>
  24338. <dd><p>In a hardware to hardware mapping, map in reverse - create frames in the sink
  24339. and map them back to the source. This may be necessary in some cases where
  24340. a mapping in one direction is required but only the opposite direction is
  24341. supported by the devices being used.
  24342. </p>
  24343. <p>This option is dangerous - it may break the preceding filter in undefined
  24344. ways if there are any additional constraints on that filter&rsquo;s output.
  24345. Do not use it without fully understanding the implications of its use.
  24346. </p></dd>
  24347. </dl>
  24348. <p><a name="hwupload"></a>
  24349. </p><a name="hwupload-1"></a>
  24350. <h2 class="section"><a href="ffplay-all.html#toc-hwupload-1">30.99 hwupload</a></h2>
  24351. <p>Upload system memory frames to hardware surfaces.
  24352. </p>
  24353. <p>The device to upload to must be supplied when the filter is initialised. If
  24354. using ffmpeg, select the appropriate device with the &lsquo;<samp>-filter_hw_device</samp>&rsquo;
  24355. option or with the &lsquo;<samp>derive_device</samp>&rsquo; option. The input and output devices
  24356. must be of different types and compatible - the exact meaning of this is
  24357. system-dependent, but typically it means that they must refer to the same
  24358. underlying hardware context (for example, refer to the same graphics card).
  24359. </p>
  24360. <p>The following additional parameters are accepted:
  24361. </p>
  24362. <dl compact="compact">
  24363. <dt>&lsquo;<samp>derive_device <var>type</var></samp>&rsquo;</dt>
  24364. <dd><p>Rather than using the device supplied at initialisation, instead derive a new
  24365. device of type <var>type</var> from the device the input frames exist on.
  24366. </p></dd>
  24367. </dl>
  24368. <p><a name="hwupload_005fcuda"></a>
  24369. </p><a name="hwupload_005fcuda-1"></a>
  24370. <h2 class="section"><a href="ffplay-all.html#toc-hwupload_005fcuda-1">30.100 hwupload_cuda</a></h2>
  24371. <p>Upload system memory frames to a CUDA device.
  24372. </p>
  24373. <p>It accepts the following optional parameters:
  24374. </p>
  24375. <dl compact="compact">
  24376. <dt>&lsquo;<samp>device</samp>&rsquo;</dt>
  24377. <dd><p>The number of the CUDA device to use
  24378. </p></dd>
  24379. </dl>
  24380. <a name="hqx"></a>
  24381. <h2 class="section"><a href="ffplay-all.html#toc-hqx">30.101 hqx</a></h2>
  24382. <p>Apply a high-quality magnification filter designed for pixel art. This filter
  24383. was originally created by Maxim Stepin.
  24384. </p>
  24385. <p>It accepts the following option:
  24386. </p>
  24387. <dl compact="compact">
  24388. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  24389. <dd><p>Set the scaling dimension: <code>2</code> for <code>hq2x</code>, <code>3</code> for
  24390. <code>hq3x</code> and <code>4</code> for <code>hq4x</code>.
  24391. Default is <code>3</code>.
  24392. </p></dd>
  24393. </dl>
  24394. <a name="hstack"></a>
  24395. <h2 class="section"><a href="ffplay-all.html#toc-hstack">30.102 hstack</a></h2>
  24396. <p>Stack input videos horizontally.
  24397. </p>
  24398. <p>All streams must be of same pixel format and of same height.
  24399. </p>
  24400. <p>Note that this filter is faster than using <a href="#overlay">overlay</a> and <a href="#pad">pad</a> filter
  24401. to create same output.
  24402. </p>
  24403. <p>The filter accepts the following option:
  24404. </p>
  24405. <dl compact="compact">
  24406. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  24407. <dd><p>Set number of input streams. Default is 2.
  24408. </p>
  24409. </dd>
  24410. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  24411. <dd><p>If set to 1, force the output to terminate when the shortest input
  24412. terminates. Default value is 0.
  24413. </p></dd>
  24414. </dl>
  24415. <a name="hue"></a>
  24416. <h2 class="section"><a href="ffplay-all.html#toc-hue">30.103 hue</a></h2>
  24417. <p>Modify the hue and/or the saturation of the input.
  24418. </p>
  24419. <p>It accepts the following parameters:
  24420. </p>
  24421. <dl compact="compact">
  24422. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  24423. <dd><p>Specify the hue angle as a number of degrees. It accepts an expression,
  24424. and defaults to &quot;0&quot;.
  24425. </p>
  24426. </dd>
  24427. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  24428. <dd><p>Specify the saturation in the [-10,10] range. It accepts an expression and
  24429. defaults to &quot;1&quot;.
  24430. </p>
  24431. </dd>
  24432. <dt>&lsquo;<samp>H</samp>&rsquo;</dt>
  24433. <dd><p>Specify the hue angle as a number of radians. It accepts an
  24434. expression, and defaults to &quot;0&quot;.
  24435. </p>
  24436. </dd>
  24437. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  24438. <dd><p>Specify the brightness in the [-10,10] range. It accepts an expression and
  24439. defaults to &quot;0&quot;.
  24440. </p></dd>
  24441. </dl>
  24442. <p>&lsquo;<samp>h</samp>&rsquo; and &lsquo;<samp>H</samp>&rsquo; are mutually exclusive, and can&rsquo;t be
  24443. specified at the same time.
  24444. </p>
  24445. <p>The &lsquo;<samp>b</samp>&rsquo;, &lsquo;<samp>h</samp>&rsquo;, &lsquo;<samp>H</samp>&rsquo; and &lsquo;<samp>s</samp>&rsquo; option values are
  24446. expressions containing the following constants:
  24447. </p>
  24448. <dl compact="compact">
  24449. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  24450. <dd><p>frame count of the input frame starting from 0
  24451. </p>
  24452. </dd>
  24453. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  24454. <dd><p>presentation timestamp of the input frame expressed in time base units
  24455. </p>
  24456. </dd>
  24457. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  24458. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  24459. </p>
  24460. </dd>
  24461. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  24462. <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
  24463. </p>
  24464. </dd>
  24465. <dt>&lsquo;<samp>tb</samp>&rsquo;</dt>
  24466. <dd><p>time base of the input video
  24467. </p></dd>
  24468. </dl>
  24469. <a name="Examples-143"></a>
  24470. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-143">30.103.1 Examples</a></h3>
  24471. <ul>
  24472. <li>
  24473. Set the hue to 90 degrees and the saturation to 1.0:
  24474. <div class="example">
  24475. <pre class="example">hue=h=90:s=1
  24476. </pre></div>
  24477. </li><li>
  24478. Same command but expressing the hue in radians:
  24479. <div class="example">
  24480. <pre class="example">hue=H=PI/2:s=1
  24481. </pre></div>
  24482. </li><li>
  24483. Rotate hue and make the saturation swing between 0
  24484. and 2 over a period of 1 second:
  24485. <div class="example">
  24486. <pre class="example">hue=&quot;H=2*PI*t: s=sin(2*PI*t)+1&quot;
  24487. </pre></div>
  24488. </li><li>
  24489. Apply a 3 seconds saturation fade-in effect starting at 0:
  24490. <div class="example">
  24491. <pre class="example">hue=&quot;s=min(t/3\,1)&quot;
  24492. </pre></div>
  24493. <p>The general fade-in expression can be written as:
  24494. </p><div class="example">
  24495. <pre class="example">hue=&quot;s=min(0\, max((t-START)/DURATION\, 1))&quot;
  24496. </pre></div>
  24497. </li><li>
  24498. Apply a 3 seconds saturation fade-out effect starting at 5 seconds:
  24499. <div class="example">
  24500. <pre class="example">hue=&quot;s=max(0\, min(1\, (8-t)/3))&quot;
  24501. </pre></div>
  24502. <p>The general fade-out expression can be written as:
  24503. </p><div class="example">
  24504. <pre class="example">hue=&quot;s=max(0\, min(1\, (START+DURATION-t)/DURATION))&quot;
  24505. </pre></div>
  24506. </li></ul>
  24507. <a name="Commands-28"></a>
  24508. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-28">30.103.2 Commands</a></h3>
  24509. <p>This filter supports the following commands:
  24510. </p><dl compact="compact">
  24511. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  24512. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  24513. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  24514. <dt>&lsquo;<samp>H</samp>&rsquo;</dt>
  24515. <dd><p>Modify the hue and/or the saturation and/or brightness of the input video.
  24516. The command accepts the same syntax of the corresponding option.
  24517. </p>
  24518. <p>If the specified expression is not valid, it is kept at its current
  24519. value.
  24520. </p></dd>
  24521. </dl>
  24522. <a name="hysteresis"></a>
  24523. <h2 class="section"><a href="ffplay-all.html#toc-hysteresis">30.104 hysteresis</a></h2>
  24524. <p>Grow first stream into second stream by connecting components.
  24525. This makes it possible to build more robust edge masks.
  24526. </p>
  24527. <p>This filter accepts the following options:
  24528. </p>
  24529. <dl compact="compact">
  24530. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  24531. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  24532. copied from first stream.
  24533. By default value 0xf, all planes will be processed.
  24534. </p>
  24535. </dd>
  24536. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  24537. <dd><p>Set threshold which is used in filtering. If pixel component value is higher than
  24538. this value filter algorithm for connecting components is activated.
  24539. By default value is 0.
  24540. </p></dd>
  24541. </dl>
  24542. <p>The <code>hysteresis</code> filter also supports the <a href="#framesync">framesync</a> options.
  24543. </p>
  24544. <a name="idet"></a>
  24545. <h2 class="section"><a href="ffplay-all.html#toc-idet">30.105 idet</a></h2>
  24546. <p>Detect video interlacing type.
  24547. </p>
  24548. <p>This filter tries to detect if the input frames are interlaced, progressive,
  24549. top or bottom field first. It will also try to detect fields that are
  24550. repeated between adjacent frames (a sign of telecine).
  24551. </p>
  24552. <p>Single frame detection considers only immediately adjacent frames when classifying each frame.
  24553. Multiple frame detection incorporates the classification history of previous frames.
  24554. </p>
  24555. <p>The filter will log these metadata values:
  24556. </p>
  24557. <dl compact="compact">
  24558. <dt>&lsquo;<samp>single.current_frame</samp>&rsquo;</dt>
  24559. <dd><p>Detected type of current frame using single-frame detection. One of:
  24560. &ldquo;tff&rdquo; (top field first), &ldquo;bff&rdquo; (bottom field first),
  24561. &ldquo;progressive&rdquo;, or &ldquo;undetermined&rdquo;
  24562. </p>
  24563. </dd>
  24564. <dt>&lsquo;<samp>single.tff</samp>&rsquo;</dt>
  24565. <dd><p>Cumulative number of frames detected as top field first using single-frame detection.
  24566. </p>
  24567. </dd>
  24568. <dt>&lsquo;<samp>multiple.tff</samp>&rsquo;</dt>
  24569. <dd><p>Cumulative number of frames detected as top field first using multiple-frame detection.
  24570. </p>
  24571. </dd>
  24572. <dt>&lsquo;<samp>single.bff</samp>&rsquo;</dt>
  24573. <dd><p>Cumulative number of frames detected as bottom field first using single-frame detection.
  24574. </p>
  24575. </dd>
  24576. <dt>&lsquo;<samp>multiple.current_frame</samp>&rsquo;</dt>
  24577. <dd><p>Detected type of current frame using multiple-frame detection. One of:
  24578. &ldquo;tff&rdquo; (top field first), &ldquo;bff&rdquo; (bottom field first),
  24579. &ldquo;progressive&rdquo;, or &ldquo;undetermined&rdquo;
  24580. </p>
  24581. </dd>
  24582. <dt>&lsquo;<samp>multiple.bff</samp>&rsquo;</dt>
  24583. <dd><p>Cumulative number of frames detected as bottom field first using multiple-frame detection.
  24584. </p>
  24585. </dd>
  24586. <dt>&lsquo;<samp>single.progressive</samp>&rsquo;</dt>
  24587. <dd><p>Cumulative number of frames detected as progressive using single-frame detection.
  24588. </p>
  24589. </dd>
  24590. <dt>&lsquo;<samp>multiple.progressive</samp>&rsquo;</dt>
  24591. <dd><p>Cumulative number of frames detected as progressive using multiple-frame detection.
  24592. </p>
  24593. </dd>
  24594. <dt>&lsquo;<samp>single.undetermined</samp>&rsquo;</dt>
  24595. <dd><p>Cumulative number of frames that could not be classified using single-frame detection.
  24596. </p>
  24597. </dd>
  24598. <dt>&lsquo;<samp>multiple.undetermined</samp>&rsquo;</dt>
  24599. <dd><p>Cumulative number of frames that could not be classified using multiple-frame detection.
  24600. </p>
  24601. </dd>
  24602. <dt>&lsquo;<samp>repeated.current_frame</samp>&rsquo;</dt>
  24603. <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;.
  24604. </p>
  24605. </dd>
  24606. <dt>&lsquo;<samp>repeated.neither</samp>&rsquo;</dt>
  24607. <dd><p>Cumulative number of frames with no repeated field.
  24608. </p>
  24609. </dd>
  24610. <dt>&lsquo;<samp>repeated.top</samp>&rsquo;</dt>
  24611. <dd><p>Cumulative number of frames with the top field repeated from the previous frame&rsquo;s top field.
  24612. </p>
  24613. </dd>
  24614. <dt>&lsquo;<samp>repeated.bottom</samp>&rsquo;</dt>
  24615. <dd><p>Cumulative number of frames with the bottom field repeated from the previous frame&rsquo;s bottom field.
  24616. </p></dd>
  24617. </dl>
  24618. <p>The filter accepts the following options:
  24619. </p>
  24620. <dl compact="compact">
  24621. <dt>&lsquo;<samp>intl_thres</samp>&rsquo;</dt>
  24622. <dd><p>Set interlacing threshold.
  24623. </p></dd>
  24624. <dt>&lsquo;<samp>prog_thres</samp>&rsquo;</dt>
  24625. <dd><p>Set progressive threshold.
  24626. </p></dd>
  24627. <dt>&lsquo;<samp>rep_thres</samp>&rsquo;</dt>
  24628. <dd><p>Threshold for repeated field detection.
  24629. </p></dd>
  24630. <dt>&lsquo;<samp>half_life</samp>&rsquo;</dt>
  24631. <dd><p>Number of frames after which a given frame&rsquo;s contribution to the
  24632. statistics is halved (i.e., it contributes only 0.5 to its
  24633. classification). The default of 0 means that all frames seen are given
  24634. full weight of 1.0 forever.
  24635. </p></dd>
  24636. <dt>&lsquo;<samp>analyze_interlaced_flag</samp>&rsquo;</dt>
  24637. <dd><p>When this is not 0 then idet will use the specified number of frames to determine
  24638. if the interlaced flag is accurate, it will not count undetermined frames.
  24639. If the flag is found to be accurate it will be used without any further
  24640. computations, if it is found to be inaccurate it will be cleared without any
  24641. further computations. This allows inserting the idet filter as a low computational
  24642. method to clean up the interlaced flag
  24643. </p></dd>
  24644. </dl>
  24645. <a name="il"></a>
  24646. <h2 class="section"><a href="ffplay-all.html#toc-il">30.106 il</a></h2>
  24647. <p>Deinterleave or interleave fields.
  24648. </p>
  24649. <p>This filter allows one to process interlaced images fields without
  24650. deinterlacing them. Deinterleaving splits the input frame into 2
  24651. fields (so called half pictures). Odd lines are moved to the top
  24652. half of the output image, even lines to the bottom half.
  24653. You can process (filter) them independently and then re-interleave them.
  24654. </p>
  24655. <p>The filter accepts the following options:
  24656. </p>
  24657. <dl compact="compact">
  24658. <dt>&lsquo;<samp>luma_mode, l</samp>&rsquo;</dt>
  24659. <dt>&lsquo;<samp>chroma_mode, c</samp>&rsquo;</dt>
  24660. <dt>&lsquo;<samp>alpha_mode, a</samp>&rsquo;</dt>
  24661. <dd><p>Available values for <var>luma_mode</var>, <var>chroma_mode</var> and
  24662. <var>alpha_mode</var> are:
  24663. </p>
  24664. <dl compact="compact">
  24665. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  24666. <dd><p>Do nothing.
  24667. </p>
  24668. </dd>
  24669. <dt>&lsquo;<samp>deinterleave, d</samp>&rsquo;</dt>
  24670. <dd><p>Deinterleave fields, placing one above the other.
  24671. </p>
  24672. </dd>
  24673. <dt>&lsquo;<samp>interleave, i</samp>&rsquo;</dt>
  24674. <dd><p>Interleave fields. Reverse the effect of deinterleaving.
  24675. </p></dd>
  24676. </dl>
  24677. <p>Default value is <code>none</code>.
  24678. </p>
  24679. </dd>
  24680. <dt>&lsquo;<samp>luma_swap, ls</samp>&rsquo;</dt>
  24681. <dt>&lsquo;<samp>chroma_swap, cs</samp>&rsquo;</dt>
  24682. <dt>&lsquo;<samp>alpha_swap, as</samp>&rsquo;</dt>
  24683. <dd><p>Swap luma/chroma/alpha fields. Exchange even &amp; odd lines. Default value is <code>0</code>.
  24684. </p></dd>
  24685. </dl>
  24686. <a name="Commands-47"></a>
  24687. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-47">30.106.1 Commands</a></h3>
  24688. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  24689. </p>
  24690. <a name="inflate"></a>
  24691. <h2 class="section"><a href="ffplay-all.html#toc-inflate">30.107 inflate</a></h2>
  24692. <p>Apply inflate effect to the video.
  24693. </p>
  24694. <p>This filter replaces the pixel by the local(3x3) average by taking into account
  24695. only values higher than the pixel.
  24696. </p>
  24697. <p>It accepts the following options:
  24698. </p>
  24699. <dl compact="compact">
  24700. <dt>&lsquo;<samp>threshold0</samp>&rsquo;</dt>
  24701. <dt>&lsquo;<samp>threshold1</samp>&rsquo;</dt>
  24702. <dt>&lsquo;<samp>threshold2</samp>&rsquo;</dt>
  24703. <dt>&lsquo;<samp>threshold3</samp>&rsquo;</dt>
  24704. <dd><p>Limit the maximum change for each plane, default is 65535.
  24705. If 0, plane will remain unchanged.
  24706. </p></dd>
  24707. </dl>
  24708. <a name="Commands-9"></a>
  24709. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-9">30.107.1 Commands</a></h3>
  24710. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  24711. </p>
  24712. <a name="interlace"></a>
  24713. <h2 class="section"><a href="ffplay-all.html#toc-interlace">30.108 interlace</a></h2>
  24714. <p>Simple interlacing filter from progressive contents. This interleaves upper (or
  24715. lower) lines from odd frames with lower (or upper) lines from even frames,
  24716. halving the frame rate and preserving image height.
  24717. </p>
  24718. <div class="example">
  24719. <pre class="example"> Original Original New Frame
  24720. Frame 'j' Frame 'j+1' (tff)
  24721. ========== =========== ==================
  24722. Line 0 --------------------&gt; Frame 'j' Line 0
  24723. Line 1 Line 1 ----&gt; Frame 'j+1' Line 1
  24724. Line 2 ---------------------&gt; Frame 'j' Line 2
  24725. Line 3 Line 3 ----&gt; Frame 'j+1' Line 3
  24726. ... ... ...
  24727. New Frame + 1 will be generated by Frame 'j+2' and Frame 'j+3' and so on
  24728. </pre></div>
  24729. <p>It accepts the following optional parameters:
  24730. </p>
  24731. <dl compact="compact">
  24732. <dt>&lsquo;<samp>scan</samp>&rsquo;</dt>
  24733. <dd><p>This determines whether the interlaced frame is taken from the even
  24734. (tff - default) or odd (bff) lines of the progressive frame.
  24735. </p>
  24736. </dd>
  24737. <dt>&lsquo;<samp>lowpass</samp>&rsquo;</dt>
  24738. <dd><p>Vertical lowpass filter to avoid twitter interlacing and
  24739. reduce moire patterns.
  24740. </p>
  24741. <dl compact="compact">
  24742. <dt>&lsquo;<samp>0, off</samp>&rsquo;</dt>
  24743. <dd><p>Disable vertical lowpass filter
  24744. </p>
  24745. </dd>
  24746. <dt>&lsquo;<samp>1, linear</samp>&rsquo;</dt>
  24747. <dd><p>Enable linear filter (default)
  24748. </p>
  24749. </dd>
  24750. <dt>&lsquo;<samp>2, complex</samp>&rsquo;</dt>
  24751. <dd><p>Enable complex filter. This will slightly less reduce twitter and moire
  24752. but better retain detail and subjective sharpness impression.
  24753. </p>
  24754. </dd>
  24755. </dl>
  24756. </dd>
  24757. </dl>
  24758. <a name="kerndeint"></a>
  24759. <h2 class="section"><a href="ffplay-all.html#toc-kerndeint">30.109 kerndeint</a></h2>
  24760. <p>Deinterlace input video by applying Donald Graft&rsquo;s adaptive kernel
  24761. deinterling. Work on interlaced parts of a video to produce
  24762. progressive frames.
  24763. </p>
  24764. <p>The description of the accepted parameters follows.
  24765. </p>
  24766. <dl compact="compact">
  24767. <dt>&lsquo;<samp>thresh</samp>&rsquo;</dt>
  24768. <dd><p>Set the threshold which affects the filter&rsquo;s tolerance when
  24769. determining if a pixel line must be processed. It must be an integer
  24770. in the range [0,255] and defaults to 10. A value of 0 will result in
  24771. applying the process on every pixels.
  24772. </p>
  24773. </dd>
  24774. <dt>&lsquo;<samp>map</samp>&rsquo;</dt>
  24775. <dd><p>Paint pixels exceeding the threshold value to white if set to 1.
  24776. Default is 0.
  24777. </p>
  24778. </dd>
  24779. <dt>&lsquo;<samp>order</samp>&rsquo;</dt>
  24780. <dd><p>Set the fields order. Swap fields if set to 1, leave fields alone if
  24781. 0. Default is 0.
  24782. </p>
  24783. </dd>
  24784. <dt>&lsquo;<samp>sharp</samp>&rsquo;</dt>
  24785. <dd><p>Enable additional sharpening if set to 1. Default is 0.
  24786. </p>
  24787. </dd>
  24788. <dt>&lsquo;<samp>twoway</samp>&rsquo;</dt>
  24789. <dd><p>Enable twoway sharpening if set to 1. Default is 0.
  24790. </p></dd>
  24791. </dl>
  24792. <a name="Examples-102"></a>
  24793. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-102">30.109.1 Examples</a></h3>
  24794. <ul>
  24795. <li>
  24796. Apply default values:
  24797. <div class="example">
  24798. <pre class="example">kerndeint=thresh=10:map=0:order=0:sharp=0:twoway=0
  24799. </pre></div>
  24800. </li><li>
  24801. Enable additional sharpening:
  24802. <div class="example">
  24803. <pre class="example">kerndeint=sharp=1
  24804. </pre></div>
  24805. </li><li>
  24806. Paint processed pixels in white:
  24807. <div class="example">
  24808. <pre class="example">kerndeint=map=1
  24809. </pre></div>
  24810. </li></ul>
  24811. <a name="lagfun"></a>
  24812. <h2 class="section"><a href="ffplay-all.html#toc-lagfun">30.110 lagfun</a></h2>
  24813. <p>Slowly update darker pixels.
  24814. </p>
  24815. <p>This filter makes short flashes of light appear longer.
  24816. This filter accepts the following options:
  24817. </p>
  24818. <dl compact="compact">
  24819. <dt>&lsquo;<samp>decay</samp>&rsquo;</dt>
  24820. <dd><p>Set factor for decaying. Default is .95. Allowed range is from 0 to 1.
  24821. </p>
  24822. </dd>
  24823. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  24824. <dd><p>Set which planes to filter. Default is all. Allowed range is from 0 to 15.
  24825. </p></dd>
  24826. </dl>
  24827. <a name="lenscorrection"></a>
  24828. <h2 class="section"><a href="ffplay-all.html#toc-lenscorrection">30.111 lenscorrection</a></h2>
  24829. <p>Correct radial lens distortion
  24830. </p>
  24831. <p>This filter can be used to correct for radial distortion as can result from the use
  24832. of wide angle lenses, and thereby re-rectify the image. To find the right parameters
  24833. one can use tools available for example as part of opencv or simply trial-and-error.
  24834. To use opencv use the calibration sample (under samples/cpp) from the opencv sources
  24835. and extract the k1 and k2 coefficients from the resulting matrix.
  24836. </p>
  24837. <p>Note that effectively the same filter is available in the open-source tools Krita and
  24838. Digikam from the KDE project.
  24839. </p>
  24840. <p>In contrast to the <a href="#vignette">vignette</a> filter, which can also be used to compensate lens errors,
  24841. this filter corrects the distortion of the image, whereas <a href="#vignette">vignette</a> corrects the
  24842. brightness distribution, so you may want to use both filters together in certain
  24843. cases, though you will have to take care of ordering, i.e. whether vignetting should
  24844. be applied before or after lens correction.
  24845. </p>
  24846. <a name="Options-34"></a>
  24847. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-34">30.111.1 Options</a></h3>
  24848. <p>The filter accepts the following options:
  24849. </p>
  24850. <dl compact="compact">
  24851. <dt>&lsquo;<samp>cx</samp>&rsquo;</dt>
  24852. <dd><p>Relative x-coordinate of the focal point of the image, and thereby the center of the
  24853. distortion. This value has a range [0,1] and is expressed as fractions of the image
  24854. width. Default is 0.5.
  24855. </p></dd>
  24856. <dt>&lsquo;<samp>cy</samp>&rsquo;</dt>
  24857. <dd><p>Relative y-coordinate of the focal point of the image, and thereby the center of the
  24858. distortion. This value has a range [0,1] and is expressed as fractions of the image
  24859. height. Default is 0.5.
  24860. </p></dd>
  24861. <dt>&lsquo;<samp>k1</samp>&rsquo;</dt>
  24862. <dd><p>Coefficient of the quadratic correction term. This value has a range [-1,1]. 0 means
  24863. no correction. Default is 0.
  24864. </p></dd>
  24865. <dt>&lsquo;<samp>k2</samp>&rsquo;</dt>
  24866. <dd><p>Coefficient of the double quadratic correction term. This value has a range [-1,1].
  24867. 0 means no correction. Default is 0.
  24868. </p></dd>
  24869. </dl>
  24870. <p>The formula that generates the correction is:
  24871. </p>
  24872. <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)
  24873. </p>
  24874. <p>where <var>r_0</var> is halve of the image diagonal and <var>r_src</var> and <var>r_tgt</var> are the
  24875. distances from the focal point in the source and target images, respectively.
  24876. </p>
  24877. <a name="lensfun"></a>
  24878. <h2 class="section"><a href="ffplay-all.html#toc-lensfun">30.112 lensfun</a></h2>
  24879. <p>Apply lens correction via the lensfun library (<a href="http://lensfun.sourceforge.net/">http://lensfun.sourceforge.net/</a>).
  24880. </p>
  24881. <p>The <code>lensfun</code> filter requires the camera make, camera model, and lens model
  24882. to apply the lens correction. The filter will load the lensfun database and
  24883. query it to find the corresponding camera and lens entries in the database. As
  24884. long as these entries can be found with the given options, the filter can
  24885. perform corrections on frames. Note that incomplete strings will result in the
  24886. filter choosing the best match with the given options, and the filter will
  24887. output the chosen camera and lens models (logged with level &quot;info&quot;). You must
  24888. provide the make, camera model, and lens model as they are required.
  24889. </p>
  24890. <p>The filter accepts the following options:
  24891. </p>
  24892. <dl compact="compact">
  24893. <dt>&lsquo;<samp>make</samp>&rsquo;</dt>
  24894. <dd><p>The make of the camera (for example, &quot;Canon&quot;). This option is required.
  24895. </p>
  24896. </dd>
  24897. <dt>&lsquo;<samp>model</samp>&rsquo;</dt>
  24898. <dd><p>The model of the camera (for example, &quot;Canon EOS 100D&quot;). This option is
  24899. required.
  24900. </p>
  24901. </dd>
  24902. <dt>&lsquo;<samp>lens_model</samp>&rsquo;</dt>
  24903. <dd><p>The model of the lens (for example, &quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot;). This
  24904. option is required.
  24905. </p>
  24906. </dd>
  24907. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  24908. <dd><p>The type of correction to apply. The following values are valid options:
  24909. </p>
  24910. <dl compact="compact">
  24911. <dt>&lsquo;<samp>vignetting</samp>&rsquo;</dt>
  24912. <dd><p>Enables fixing lens vignetting.
  24913. </p>
  24914. </dd>
  24915. <dt>&lsquo;<samp>geometry</samp>&rsquo;</dt>
  24916. <dd><p>Enables fixing lens geometry. This is the default.
  24917. </p>
  24918. </dd>
  24919. <dt>&lsquo;<samp>subpixel</samp>&rsquo;</dt>
  24920. <dd><p>Enables fixing chromatic aberrations.
  24921. </p>
  24922. </dd>
  24923. <dt>&lsquo;<samp>vig_geo</samp>&rsquo;</dt>
  24924. <dd><p>Enables fixing lens vignetting and lens geometry.
  24925. </p>
  24926. </dd>
  24927. <dt>&lsquo;<samp>vig_subpixel</samp>&rsquo;</dt>
  24928. <dd><p>Enables fixing lens vignetting and chromatic aberrations.
  24929. </p>
  24930. </dd>
  24931. <dt>&lsquo;<samp>distortion</samp>&rsquo;</dt>
  24932. <dd><p>Enables fixing both lens geometry and chromatic aberrations.
  24933. </p>
  24934. </dd>
  24935. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  24936. <dd><p>Enables all possible corrections.
  24937. </p>
  24938. </dd>
  24939. </dl>
  24940. </dd>
  24941. <dt>&lsquo;<samp>focal_length</samp>&rsquo;</dt>
  24942. <dd><p>The focal length of the image/video (zoom; expected constant for video). For
  24943. example, a 18&ndash;55mm lens has focal length range of [18&ndash;55], so a value in that
  24944. range should be chosen when using that lens. Default 18.
  24945. </p>
  24946. </dd>
  24947. <dt>&lsquo;<samp>aperture</samp>&rsquo;</dt>
  24948. <dd><p>The aperture of the image/video (expected constant for video). Note that
  24949. aperture is only used for vignetting correction. Default 3.5.
  24950. </p>
  24951. </dd>
  24952. <dt>&lsquo;<samp>focus_distance</samp>&rsquo;</dt>
  24953. <dd><p>The focus distance of the image/video (expected constant for video). Note that
  24954. focus distance is only used for vignetting and only slightly affects the
  24955. vignetting correction process. If unknown, leave it at the default value (which
  24956. is 1000).
  24957. </p>
  24958. </dd>
  24959. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  24960. <dd><p>The scale factor which is applied after transformation. After correction the
  24961. video is no longer necessarily rectangular. This parameter controls how much of
  24962. the resulting image is visible. The value 0 means that a value will be chosen
  24963. automatically such that there is little or no unmapped area in the output
  24964. image. 1.0 means that no additional scaling is done. Lower values may result
  24965. in more of the corrected image being visible, while higher values may avoid
  24966. unmapped areas in the output.
  24967. </p>
  24968. </dd>
  24969. <dt>&lsquo;<samp>target_geometry</samp>&rsquo;</dt>
  24970. <dd><p>The target geometry of the output image/video. The following values are valid
  24971. options:
  24972. </p>
  24973. <dl compact="compact">
  24974. <dt>&lsquo;<samp>rectilinear (default)</samp>&rsquo;</dt>
  24975. <dt>&lsquo;<samp>fisheye</samp>&rsquo;</dt>
  24976. <dt>&lsquo;<samp>panoramic</samp>&rsquo;</dt>
  24977. <dt>&lsquo;<samp>equirectangular</samp>&rsquo;</dt>
  24978. <dt>&lsquo;<samp>fisheye_orthographic</samp>&rsquo;</dt>
  24979. <dt>&lsquo;<samp>fisheye_stereographic</samp>&rsquo;</dt>
  24980. <dt>&lsquo;<samp>fisheye_equisolid</samp>&rsquo;</dt>
  24981. <dt>&lsquo;<samp>fisheye_thoby</samp>&rsquo;</dt>
  24982. </dl>
  24983. </dd>
  24984. <dt>&lsquo;<samp>reverse</samp>&rsquo;</dt>
  24985. <dd><p>Apply the reverse of image correction (instead of correcting distortion, apply
  24986. it).
  24987. </p>
  24988. </dd>
  24989. <dt>&lsquo;<samp>interpolation</samp>&rsquo;</dt>
  24990. <dd><p>The type of interpolation used when correcting distortion. The following values
  24991. are valid options:
  24992. </p>
  24993. <dl compact="compact">
  24994. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  24995. <dt>&lsquo;<samp>linear (default)</samp>&rsquo;</dt>
  24996. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  24997. </dl>
  24998. </dd>
  24999. </dl>
  25000. <a name="Examples-100"></a>
  25001. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-100">30.112.1 Examples</a></h3>
  25002. <ul>
  25003. <li>
  25004. Apply lens correction with make &quot;Canon&quot;, camera model &quot;Canon EOS 100D&quot;, and lens
  25005. model &quot;Canon EF-S 18-55mm f/3.5-5.6 IS STM&quot; with focal length of &quot;18&quot; and
  25006. aperture of &quot;8.0&quot;.
  25007. <div class="example">
  25008. <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
  25009. </pre></div>
  25010. </li><li>
  25011. Apply the same as before, but only for the first 5 seconds of video.
  25012. <div class="example">
  25013. <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
  25014. </pre></div>
  25015. </li></ul>
  25016. <a name="libvmaf"></a>
  25017. <h2 class="section"><a href="ffplay-all.html#toc-libvmaf">30.113 libvmaf</a></h2>
  25018. <p>Obtain the VMAF (Video Multi-Method Assessment Fusion)
  25019. score between two input videos.
  25020. </p>
  25021. <p>The obtained VMAF score is printed through the logging system.
  25022. </p>
  25023. <p>It requires Netflix&rsquo;s vmaf library (libvmaf) as a pre-requisite.
  25024. After installing the library it can be enabled using:
  25025. <code>./configure --enable-libvmaf --enable-version3</code>.
  25026. If no model path is specified it uses the default model: <code>vmaf_v0.6.1.pkl</code>.
  25027. </p>
  25028. <p>The filter has following options:
  25029. </p>
  25030. <dl compact="compact">
  25031. <dt>&lsquo;<samp>model_path</samp>&rsquo;</dt>
  25032. <dd><p>Set the model path which is to be used for SVM.
  25033. Default value: <code>&quot;/usr/local/share/model/vmaf_v0.6.1.pkl&quot;</code>
  25034. </p>
  25035. </dd>
  25036. <dt>&lsquo;<samp>log_path</samp>&rsquo;</dt>
  25037. <dd><p>Set the file path to be used to store logs.
  25038. </p>
  25039. </dd>
  25040. <dt>&lsquo;<samp>log_fmt</samp>&rsquo;</dt>
  25041. <dd><p>Set the format of the log file (xml or json).
  25042. </p>
  25043. </dd>
  25044. <dt>&lsquo;<samp>enable_transform</samp>&rsquo;</dt>
  25045. <dd><p>This option can enable/disable the <code>score_transform</code> applied to the final predicted VMAF score,
  25046. if you have specified score_transform option in the input parameter file passed to <code>run_vmaf_training.py</code>
  25047. Default value: <code>false</code>
  25048. </p>
  25049. </dd>
  25050. <dt>&lsquo;<samp>phone_model</samp>&rsquo;</dt>
  25051. <dd><p>Invokes the phone model which will generate VMAF scores higher than in the
  25052. regular model, which is more suitable for laptop, TV, etc. viewing conditions.
  25053. Default value: <code>false</code>
  25054. </p>
  25055. </dd>
  25056. <dt>&lsquo;<samp>psnr</samp>&rsquo;</dt>
  25057. <dd><p>Enables computing psnr along with vmaf.
  25058. Default value: <code>false</code>
  25059. </p>
  25060. </dd>
  25061. <dt>&lsquo;<samp>ssim</samp>&rsquo;</dt>
  25062. <dd><p>Enables computing ssim along with vmaf.
  25063. Default value: <code>false</code>
  25064. </p>
  25065. </dd>
  25066. <dt>&lsquo;<samp>ms_ssim</samp>&rsquo;</dt>
  25067. <dd><p>Enables computing ms_ssim along with vmaf.
  25068. Default value: <code>false</code>
  25069. </p>
  25070. </dd>
  25071. <dt>&lsquo;<samp>pool</samp>&rsquo;</dt>
  25072. <dd><p>Set the pool method to be used for computing vmaf.
  25073. Options are <code>min</code>, <code>harmonic_mean</code> or <code>mean</code> (default).
  25074. </p>
  25075. </dd>
  25076. <dt>&lsquo;<samp>n_threads</samp>&rsquo;</dt>
  25077. <dd><p>Set number of threads to be used when computing vmaf.
  25078. Default value: <code>0</code>, which makes use of all available logical processors.
  25079. </p>
  25080. </dd>
  25081. <dt>&lsquo;<samp>n_subsample</samp>&rsquo;</dt>
  25082. <dd><p>Set interval for frame subsampling used when computing vmaf.
  25083. Default value: <code>1</code>
  25084. </p>
  25085. </dd>
  25086. <dt>&lsquo;<samp>enable_conf_interval</samp>&rsquo;</dt>
  25087. <dd><p>Enables confidence interval.
  25088. Default value: <code>false</code>
  25089. </p></dd>
  25090. </dl>
  25091. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  25092. </p>
  25093. <a name="Examples-5"></a>
  25094. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-5">30.113.1 Examples</a></h3>
  25095. <ul>
  25096. <li>
  25097. On the below examples the input file &lsquo;<tt>main.mpg</tt>&rsquo; being processed is
  25098. compared with the reference file &lsquo;<tt>ref.mpg</tt>&rsquo;.
  25099. <div class="example">
  25100. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf -f null -
  25101. </pre></div>
  25102. </li><li>
  25103. Example with options:
  25104. <div class="example">
  25105. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf=&quot;psnr=1:log_fmt=json&quot; -f null -
  25106. </pre></div>
  25107. </li><li>
  25108. Example with options and different containers:
  25109. <div class="example">
  25110. <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 -
  25111. </pre></div>
  25112. </li></ul>
  25113. <a name="limiter"></a>
  25114. <h2 class="section"><a href="ffplay-all.html#toc-limiter">30.114 limiter</a></h2>
  25115. <p>Limits the pixel components values to the specified range [min, max].
  25116. </p>
  25117. <p>The filter accepts the following options:
  25118. </p>
  25119. <dl compact="compact">
  25120. <dt>&lsquo;<samp>min</samp>&rsquo;</dt>
  25121. <dd><p>Lower bound. Defaults to the lowest allowed value for the input.
  25122. </p>
  25123. </dd>
  25124. <dt>&lsquo;<samp>max</samp>&rsquo;</dt>
  25125. <dd><p>Upper bound. Defaults to the highest allowed value for the input.
  25126. </p>
  25127. </dd>
  25128. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25129. <dd><p>Specify which planes will be processed. Defaults to all available.
  25130. </p></dd>
  25131. </dl>
  25132. <a name="loop"></a>
  25133. <h2 class="section"><a href="ffplay-all.html#toc-loop">30.115 loop</a></h2>
  25134. <p>Loop video frames.
  25135. </p>
  25136. <p>The filter accepts the following options:
  25137. </p>
  25138. <dl compact="compact">
  25139. <dt>&lsquo;<samp>loop</samp>&rsquo;</dt>
  25140. <dd><p>Set the number of loops. Setting this value to -1 will result in infinite loops.
  25141. Default is 0.
  25142. </p>
  25143. </dd>
  25144. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  25145. <dd><p>Set maximal size in number of frames. Default is 0.
  25146. </p>
  25147. </dd>
  25148. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  25149. <dd><p>Set first frame of loop. Default is 0.
  25150. </p></dd>
  25151. </dl>
  25152. <a name="Examples-80"></a>
  25153. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-80">30.115.1 Examples</a></h3>
  25154. <ul>
  25155. <li>
  25156. Loop single first frame infinitely:
  25157. <div class="example">
  25158. <pre class="example">loop=loop=-1:size=1:start=0
  25159. </pre></div>
  25160. </li><li>
  25161. Loop single first frame 10 times:
  25162. <div class="example">
  25163. <pre class="example">loop=loop=10:size=1:start=0
  25164. </pre></div>
  25165. </li><li>
  25166. Loop 10 first frames 5 times:
  25167. <div class="example">
  25168. <pre class="example">loop=loop=5:size=10:start=0
  25169. </pre></div>
  25170. </li></ul>
  25171. <a name="lut1d"></a>
  25172. <h2 class="section"><a href="ffplay-all.html#toc-lut1d">30.116 lut1d</a></h2>
  25173. <p>Apply a 1D LUT to an input video.
  25174. </p>
  25175. <p>The filter accepts the following options:
  25176. </p>
  25177. <dl compact="compact">
  25178. <dt>&lsquo;<samp>file</samp>&rsquo;</dt>
  25179. <dd><p>Set the 1D LUT file name.
  25180. </p>
  25181. <p>Currently supported formats:
  25182. </p><dl compact="compact">
  25183. <dt>&lsquo;<samp>cube</samp>&rsquo;</dt>
  25184. <dd><p>Iridas
  25185. </p></dd>
  25186. <dt>&lsquo;<samp>csp</samp>&rsquo;</dt>
  25187. <dd><p>cineSpace
  25188. </p></dd>
  25189. </dl>
  25190. </dd>
  25191. <dt>&lsquo;<samp>interp</samp>&rsquo;</dt>
  25192. <dd><p>Select interpolation mode.
  25193. </p>
  25194. <p>Available values are:
  25195. </p>
  25196. <dl compact="compact">
  25197. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  25198. <dd><p>Use values from the nearest defined point.
  25199. </p></dd>
  25200. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  25201. <dd><p>Interpolate values using the linear interpolation.
  25202. </p></dd>
  25203. <dt>&lsquo;<samp>cosine</samp>&rsquo;</dt>
  25204. <dd><p>Interpolate values using the cosine interpolation.
  25205. </p></dd>
  25206. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  25207. <dd><p>Interpolate values using the cubic interpolation.
  25208. </p></dd>
  25209. <dt>&lsquo;<samp>spline</samp>&rsquo;</dt>
  25210. <dd><p>Interpolate values using the spline interpolation.
  25211. </p></dd>
  25212. </dl>
  25213. </dd>
  25214. </dl>
  25215. <p><a name="lut3d"></a>
  25216. </p><a name="lut3d-1"></a>
  25217. <h2 class="section"><a href="ffplay-all.html#toc-lut3d-1">30.117 lut3d</a></h2>
  25218. <p>Apply a 3D LUT to an input video.
  25219. </p>
  25220. <p>The filter accepts the following options:
  25221. </p>
  25222. <dl compact="compact">
  25223. <dt>&lsquo;<samp>file</samp>&rsquo;</dt>
  25224. <dd><p>Set the 3D LUT file name.
  25225. </p>
  25226. <p>Currently supported formats:
  25227. </p><dl compact="compact">
  25228. <dt>&lsquo;<samp>3dl</samp>&rsquo;</dt>
  25229. <dd><p>AfterEffects
  25230. </p></dd>
  25231. <dt>&lsquo;<samp>cube</samp>&rsquo;</dt>
  25232. <dd><p>Iridas
  25233. </p></dd>
  25234. <dt>&lsquo;<samp>dat</samp>&rsquo;</dt>
  25235. <dd><p>DaVinci
  25236. </p></dd>
  25237. <dt>&lsquo;<samp>m3d</samp>&rsquo;</dt>
  25238. <dd><p>Pandora
  25239. </p></dd>
  25240. <dt>&lsquo;<samp>csp</samp>&rsquo;</dt>
  25241. <dd><p>cineSpace
  25242. </p></dd>
  25243. </dl>
  25244. </dd>
  25245. <dt>&lsquo;<samp>interp</samp>&rsquo;</dt>
  25246. <dd><p>Select interpolation mode.
  25247. </p>
  25248. <p>Available values are:
  25249. </p>
  25250. <dl compact="compact">
  25251. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  25252. <dd><p>Use values from the nearest defined point.
  25253. </p></dd>
  25254. <dt>&lsquo;<samp>trilinear</samp>&rsquo;</dt>
  25255. <dd><p>Interpolate values using the 8 points defining a cube.
  25256. </p></dd>
  25257. <dt>&lsquo;<samp>tetrahedral</samp>&rsquo;</dt>
  25258. <dd><p>Interpolate values using a tetrahedron.
  25259. </p></dd>
  25260. </dl>
  25261. </dd>
  25262. </dl>
  25263. <a name="lumakey"></a>
  25264. <h2 class="section"><a href="ffplay-all.html#toc-lumakey">30.118 lumakey</a></h2>
  25265. <p>Turn certain luma values into transparency.
  25266. </p>
  25267. <p>The filter accepts the following options:
  25268. </p>
  25269. <dl compact="compact">
  25270. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  25271. <dd><p>Set the luma which will be used as base for transparency.
  25272. Default value is <code>0</code>.
  25273. </p>
  25274. </dd>
  25275. <dt>&lsquo;<samp>tolerance</samp>&rsquo;</dt>
  25276. <dd><p>Set the range of luma values to be keyed out.
  25277. Default value is <code>0.01</code>.
  25278. </p>
  25279. </dd>
  25280. <dt>&lsquo;<samp>softness</samp>&rsquo;</dt>
  25281. <dd><p>Set the range of softness. Default value is <code>0</code>.
  25282. Use this to control gradual transition from zero to full transparency.
  25283. </p></dd>
  25284. </dl>
  25285. <a name="Commands-5"></a>
  25286. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-5">30.118.1 Commands</a></h3>
  25287. <p>This filter supports same <a href="#commands">commands</a> as options.
  25288. The command accepts the same syntax of the corresponding option.
  25289. </p>
  25290. <p>If the specified expression is not valid, it is kept at its current
  25291. value.
  25292. </p>
  25293. <a name="lut_002c-lutrgb_002c-lutyuv"></a>
  25294. <h2 class="section"><a href="ffplay-all.html#toc-lut_002c-lutrgb_002c-lutyuv">30.119 lut, lutrgb, lutyuv</a></h2>
  25295. <p>Compute a look-up table for binding each pixel component input value
  25296. to an output value, and apply it to the input video.
  25297. </p>
  25298. <p><var>lutyuv</var> applies a lookup table to a YUV input video, <var>lutrgb</var>
  25299. to an RGB input video.
  25300. </p>
  25301. <p>These filters accept the following parameters:
  25302. </p><dl compact="compact">
  25303. <dt>&lsquo;<samp>c0</samp>&rsquo;</dt>
  25304. <dd><p>set first pixel component expression
  25305. </p></dd>
  25306. <dt>&lsquo;<samp>c1</samp>&rsquo;</dt>
  25307. <dd><p>set second pixel component expression
  25308. </p></dd>
  25309. <dt>&lsquo;<samp>c2</samp>&rsquo;</dt>
  25310. <dd><p>set third pixel component expression
  25311. </p></dd>
  25312. <dt>&lsquo;<samp>c3</samp>&rsquo;</dt>
  25313. <dd><p>set fourth pixel component expression, corresponds to the alpha component
  25314. </p>
  25315. </dd>
  25316. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  25317. <dd><p>set red component expression
  25318. </p></dd>
  25319. <dt>&lsquo;<samp>g</samp>&rsquo;</dt>
  25320. <dd><p>set green component expression
  25321. </p></dd>
  25322. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  25323. <dd><p>set blue component expression
  25324. </p></dd>
  25325. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  25326. <dd><p>alpha component expression
  25327. </p>
  25328. </dd>
  25329. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  25330. <dd><p>set Y/luminance component expression
  25331. </p></dd>
  25332. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  25333. <dd><p>set U/Cb component expression
  25334. </p></dd>
  25335. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  25336. <dd><p>set V/Cr component expression
  25337. </p></dd>
  25338. </dl>
  25339. <p>Each of them specifies the expression to use for computing the lookup table for
  25340. the corresponding pixel component values.
  25341. </p>
  25342. <p>The exact component associated to each of the <var>c*</var> options depends on the
  25343. format in input.
  25344. </p>
  25345. <p>The <var>lut</var> filter requires either YUV or RGB pixel formats in input,
  25346. <var>lutrgb</var> requires RGB pixel formats in input, and <var>lutyuv</var> requires YUV.
  25347. </p>
  25348. <p>The expressions can contain the following constants and functions:
  25349. </p>
  25350. <dl compact="compact">
  25351. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  25352. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  25353. <dd><p>The input width and height.
  25354. </p>
  25355. </dd>
  25356. <dt>&lsquo;<samp>val</samp>&rsquo;</dt>
  25357. <dd><p>The input value for the pixel component.
  25358. </p>
  25359. </dd>
  25360. <dt>&lsquo;<samp>clipval</samp>&rsquo;</dt>
  25361. <dd><p>The input value, clipped to the <var>minval</var>-<var>maxval</var> range.
  25362. </p>
  25363. </dd>
  25364. <dt>&lsquo;<samp>maxval</samp>&rsquo;</dt>
  25365. <dd><p>The maximum value for the pixel component.
  25366. </p>
  25367. </dd>
  25368. <dt>&lsquo;<samp>minval</samp>&rsquo;</dt>
  25369. <dd><p>The minimum value for the pixel component.
  25370. </p>
  25371. </dd>
  25372. <dt>&lsquo;<samp>negval</samp>&rsquo;</dt>
  25373. <dd><p>The negated value for the pixel component value, clipped to the
  25374. <var>minval</var>-<var>maxval</var> range; it corresponds to the expression
  25375. &quot;maxval-clipval+minval&quot;.
  25376. </p>
  25377. </dd>
  25378. <dt>&lsquo;<samp>clip(val)</samp>&rsquo;</dt>
  25379. <dd><p>The computed value in <var>val</var>, clipped to the
  25380. <var>minval</var>-<var>maxval</var> range.
  25381. </p>
  25382. </dd>
  25383. <dt>&lsquo;<samp>gammaval(gamma)</samp>&rsquo;</dt>
  25384. <dd><p>The computed gamma correction value of the pixel component value,
  25385. clipped to the <var>minval</var>-<var>maxval</var> range. It corresponds to the
  25386. expression
  25387. &quot;pow((clipval-minval)/(maxval-minval)\,<var>gamma</var>)*(maxval-minval)+minval&quot;
  25388. </p>
  25389. </dd>
  25390. </dl>
  25391. <p>All expressions default to &quot;val&quot;.
  25392. </p>
  25393. <a name="Examples-88"></a>
  25394. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-88">30.119.1 Examples</a></h3>
  25395. <ul>
  25396. <li>
  25397. Negate input video:
  25398. <div class="example">
  25399. <pre class="example">lutrgb=&quot;r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val&quot;
  25400. lutyuv=&quot;y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val&quot;
  25401. </pre></div>
  25402. <p>The above is the same as:
  25403. </p><div class="example">
  25404. <pre class="example">lutrgb=&quot;r=negval:g=negval:b=negval&quot;
  25405. lutyuv=&quot;y=negval:u=negval:v=negval&quot;
  25406. </pre></div>
  25407. </li><li>
  25408. Negate luminance:
  25409. <div class="example">
  25410. <pre class="example">lutyuv=y=negval
  25411. </pre></div>
  25412. </li><li>
  25413. Remove chroma components, turning the video into a graytone image:
  25414. <div class="example">
  25415. <pre class="example">lutyuv=&quot;u=128:v=128&quot;
  25416. </pre></div>
  25417. </li><li>
  25418. Apply a luma burning effect:
  25419. <div class="example">
  25420. <pre class="example">lutyuv=&quot;y=2*val&quot;
  25421. </pre></div>
  25422. </li><li>
  25423. Remove green and blue components:
  25424. <div class="example">
  25425. <pre class="example">lutrgb=&quot;g=0:b=0&quot;
  25426. </pre></div>
  25427. </li><li>
  25428. Set a constant alpha channel value on input:
  25429. <div class="example">
  25430. <pre class="example">format=rgba,lutrgb=a=&quot;maxval-minval/2&quot;
  25431. </pre></div>
  25432. </li><li>
  25433. Correct luminance gamma by a factor of 0.5:
  25434. <div class="example">
  25435. <pre class="example">lutyuv=y=gammaval(0.5)
  25436. </pre></div>
  25437. </li><li>
  25438. Discard least significant bits of luma:
  25439. <div class="example">
  25440. <pre class="example">lutyuv=y='bitand(val, 128+64+32)'
  25441. </pre></div>
  25442. </li><li>
  25443. Technicolor like effect:
  25444. <div class="example">
  25445. <pre class="example">lutyuv=u='(val-maxval/2)*2+maxval/2':v='(val-maxval/2)*2+maxval/2'
  25446. </pre></div>
  25447. </li></ul>
  25448. <a name="lut2_002c-tlut2"></a>
  25449. <h2 class="section"><a href="ffplay-all.html#toc-lut2_002c-tlut2">30.120 lut2, tlut2</a></h2>
  25450. <p>The <code>lut2</code> filter takes two input streams and outputs one
  25451. stream.
  25452. </p>
  25453. <p>The <code>tlut2</code> (time lut2) filter takes two consecutive frames
  25454. from one single stream.
  25455. </p>
  25456. <p>This filter accepts the following parameters:
  25457. </p><dl compact="compact">
  25458. <dt>&lsquo;<samp>c0</samp>&rsquo;</dt>
  25459. <dd><p>set first pixel component expression
  25460. </p></dd>
  25461. <dt>&lsquo;<samp>c1</samp>&rsquo;</dt>
  25462. <dd><p>set second pixel component expression
  25463. </p></dd>
  25464. <dt>&lsquo;<samp>c2</samp>&rsquo;</dt>
  25465. <dd><p>set third pixel component expression
  25466. </p></dd>
  25467. <dt>&lsquo;<samp>c3</samp>&rsquo;</dt>
  25468. <dd><p>set fourth pixel component expression, corresponds to the alpha component
  25469. </p>
  25470. </dd>
  25471. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  25472. <dd><p>set output bit depth, only available for <code>lut2</code> filter. By default is 0,
  25473. which means bit depth is automatically picked from first input format.
  25474. </p></dd>
  25475. </dl>
  25476. <p>The <code>lut2</code> filter also supports the <a href="#framesync">framesync</a> options.
  25477. </p>
  25478. <p>Each of them specifies the expression to use for computing the lookup table for
  25479. the corresponding pixel component values.
  25480. </p>
  25481. <p>The exact component associated to each of the <var>c*</var> options depends on the
  25482. format in inputs.
  25483. </p>
  25484. <p>The expressions can contain the following constants:
  25485. </p>
  25486. <dl compact="compact">
  25487. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  25488. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  25489. <dd><p>The input width and height.
  25490. </p>
  25491. </dd>
  25492. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  25493. <dd><p>The first input value for the pixel component.
  25494. </p>
  25495. </dd>
  25496. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  25497. <dd><p>The second input value for the pixel component.
  25498. </p>
  25499. </dd>
  25500. <dt>&lsquo;<samp>bdx</samp>&rsquo;</dt>
  25501. <dd><p>The first input video bit depth.
  25502. </p>
  25503. </dd>
  25504. <dt>&lsquo;<samp>bdy</samp>&rsquo;</dt>
  25505. <dd><p>The second input video bit depth.
  25506. </p></dd>
  25507. </dl>
  25508. <p>All expressions default to &quot;x&quot;.
  25509. </p>
  25510. <a name="Examples-162"></a>
  25511. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-162">30.120.1 Examples</a></h3>
  25512. <ul>
  25513. <li>
  25514. Highlight differences between two RGB video streams:
  25515. <div class="example">
  25516. <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)'
  25517. </pre></div>
  25518. </li><li>
  25519. Highlight differences between two YUV video streams:
  25520. <div class="example">
  25521. <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)'
  25522. </pre></div>
  25523. </li><li>
  25524. Show max difference between two video streams:
  25525. <div class="example">
  25526. <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)))'
  25527. </pre></div>
  25528. </li></ul>
  25529. <a name="maskedclamp"></a>
  25530. <h2 class="section"><a href="ffplay-all.html#toc-maskedclamp">30.121 maskedclamp</a></h2>
  25531. <p>Clamp the first input stream with the second input and third input stream.
  25532. </p>
  25533. <p>Returns the value of first stream to be between second input
  25534. stream - <code>undershoot</code> and third input stream + <code>overshoot</code>.
  25535. </p>
  25536. <p>This filter accepts the following options:
  25537. </p><dl compact="compact">
  25538. <dt>&lsquo;<samp>undershoot</samp>&rsquo;</dt>
  25539. <dd><p>Default value is <code>0</code>.
  25540. </p>
  25541. </dd>
  25542. <dt>&lsquo;<samp>overshoot</samp>&rsquo;</dt>
  25543. <dd><p>Default value is <code>0</code>.
  25544. </p>
  25545. </dd>
  25546. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25547. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  25548. copied from first stream.
  25549. By default value 0xf, all planes will be processed.
  25550. </p></dd>
  25551. </dl>
  25552. <a name="maskedmax"></a>
  25553. <h2 class="section"><a href="ffplay-all.html#toc-maskedmax">30.122 maskedmax</a></h2>
  25554. <p>Merge the second and third input stream into output stream using absolute differences
  25555. between second input stream and first input stream and absolute difference between
  25556. third input stream and first input stream. The picked value will be from second input
  25557. stream if second absolute difference is greater than first one or from third input stream
  25558. otherwise.
  25559. </p>
  25560. <p>This filter accepts the following options:
  25561. </p><dl compact="compact">
  25562. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25563. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  25564. copied from first stream.
  25565. By default value 0xf, all planes will be processed.
  25566. </p></dd>
  25567. </dl>
  25568. <a name="maskedmerge"></a>
  25569. <h2 class="section"><a href="ffplay-all.html#toc-maskedmerge">30.123 maskedmerge</a></h2>
  25570. <p>Merge the first input stream with the second input stream using per pixel
  25571. weights in the third input stream.
  25572. </p>
  25573. <p>A value of 0 in the third stream pixel component means that pixel component
  25574. from first stream is returned unchanged, while maximum value (eg. 255 for
  25575. 8-bit videos) means that pixel component from second stream is returned
  25576. unchanged. Intermediate values define the amount of merging between both
  25577. input stream&rsquo;s pixel components.
  25578. </p>
  25579. <p>This filter accepts the following options:
  25580. </p><dl compact="compact">
  25581. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25582. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  25583. copied from first stream.
  25584. By default value 0xf, all planes will be processed.
  25585. </p></dd>
  25586. </dl>
  25587. <a name="maskedmin"></a>
  25588. <h2 class="section"><a href="ffplay-all.html#toc-maskedmin">30.124 maskedmin</a></h2>
  25589. <p>Merge the second and third input stream into output stream using absolute differences
  25590. between second input stream and first input stream and absolute difference between
  25591. third input stream and first input stream. The picked value will be from second input
  25592. stream if second absolute difference is less than first one or from third input stream
  25593. otherwise.
  25594. </p>
  25595. <p>This filter accepts the following options:
  25596. </p><dl compact="compact">
  25597. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25598. <dd><p>Set which planes will be processed as bitmap, unprocessed planes will be
  25599. copied from first stream.
  25600. By default value 0xf, all planes will be processed.
  25601. </p></dd>
  25602. </dl>
  25603. <a name="maskfun"></a>
  25604. <h2 class="section"><a href="ffplay-all.html#toc-maskfun">30.125 maskfun</a></h2>
  25605. <p>Create mask from input video.
  25606. </p>
  25607. <p>For example it is useful to create motion masks after <code>tblend</code> filter.
  25608. </p>
  25609. <p>This filter accepts the following options:
  25610. </p>
  25611. <dl compact="compact">
  25612. <dt>&lsquo;<samp>low</samp>&rsquo;</dt>
  25613. <dd><p>Set low threshold. Any pixel component lower or exact than this value will be set to 0.
  25614. </p>
  25615. </dd>
  25616. <dt>&lsquo;<samp>high</samp>&rsquo;</dt>
  25617. <dd><p>Set high threshold. Any pixel component higher than this value will be set to max value
  25618. allowed for current pixel format.
  25619. </p>
  25620. </dd>
  25621. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25622. <dd><p>Set planes to filter, by default all available planes are filtered.
  25623. </p>
  25624. </dd>
  25625. <dt>&lsquo;<samp>fill</samp>&rsquo;</dt>
  25626. <dd><p>Fill all frame pixels with this value.
  25627. </p>
  25628. </dd>
  25629. <dt>&lsquo;<samp>sum</samp>&rsquo;</dt>
  25630. <dd><p>Set max average pixel value for frame. If sum of all pixel components is higher that this
  25631. average, output frame will be completely filled with value set by <var>fill</var> option.
  25632. Typically useful for scene changes when used in combination with <code>tblend</code> filter.
  25633. </p></dd>
  25634. </dl>
  25635. <a name="mcdeint"></a>
  25636. <h2 class="section"><a href="ffplay-all.html#toc-mcdeint">30.126 mcdeint</a></h2>
  25637. <p>Apply motion-compensation deinterlacing.
  25638. </p>
  25639. <p>It needs one field per frame as input and must thus be used together
  25640. with yadif=1/3 or equivalent.
  25641. </p>
  25642. <p>This filter accepts the following options:
  25643. </p><dl compact="compact">
  25644. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  25645. <dd><p>Set the deinterlacing mode.
  25646. </p>
  25647. <p>It accepts one of the following values:
  25648. </p><dl compact="compact">
  25649. <dt>&lsquo;<samp>fast</samp>&rsquo;</dt>
  25650. <dt>&lsquo;<samp>medium</samp>&rsquo;</dt>
  25651. <dt>&lsquo;<samp>slow</samp>&rsquo;</dt>
  25652. <dd><p>use iterative motion estimation
  25653. </p></dd>
  25654. <dt>&lsquo;<samp>extra_slow</samp>&rsquo;</dt>
  25655. <dd><p>like &lsquo;<samp>slow</samp>&rsquo;, but use multiple reference frames.
  25656. </p></dd>
  25657. </dl>
  25658. <p>Default value is &lsquo;<samp>fast</samp>&rsquo;.
  25659. </p>
  25660. </dd>
  25661. <dt>&lsquo;<samp>parity</samp>&rsquo;</dt>
  25662. <dd><p>Set the picture field parity assumed for the input video. It must be
  25663. one of the following values:
  25664. </p>
  25665. <dl compact="compact">
  25666. <dt>&lsquo;<samp>0, tff</samp>&rsquo;</dt>
  25667. <dd><p>assume top field first
  25668. </p></dd>
  25669. <dt>&lsquo;<samp>1, bff</samp>&rsquo;</dt>
  25670. <dd><p>assume bottom field first
  25671. </p></dd>
  25672. </dl>
  25673. <p>Default value is &lsquo;<samp>bff</samp>&rsquo;.
  25674. </p>
  25675. </dd>
  25676. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  25677. <dd><p>Set per-block quantization parameter (QP) used by the internal
  25678. encoder.
  25679. </p>
  25680. <p>Higher values should result in a smoother motion vector field but less
  25681. optimal individual vectors. Default value is 1.
  25682. </p></dd>
  25683. </dl>
  25684. <a name="median"></a>
  25685. <h2 class="section"><a href="ffplay-all.html#toc-median">30.127 median</a></h2>
  25686. <p>Pick median pixel from certain rectangle defined by radius.
  25687. </p>
  25688. <p>This filter accepts the following options:
  25689. </p>
  25690. <dl compact="compact">
  25691. <dt>&lsquo;<samp>radius</samp>&rsquo;</dt>
  25692. <dd><p>Set horizontal radius size. Default value is <code>1</code>.
  25693. Allowed range is integer from 1 to 127.
  25694. </p>
  25695. </dd>
  25696. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25697. <dd><p>Set which planes to process. Default is <code>15</code>, which is all available planes.
  25698. </p>
  25699. </dd>
  25700. <dt>&lsquo;<samp>radiusV</samp>&rsquo;</dt>
  25701. <dd><p>Set vertical radius size. Default value is <code>0</code>.
  25702. Allowed range is integer from 0 to 127.
  25703. If it is 0, value will be picked from horizontal <code>radius</code> option.
  25704. </p>
  25705. </dd>
  25706. <dt>&lsquo;<samp>percentile</samp>&rsquo;</dt>
  25707. <dd><p>Set median percentile. Default value is <code>0.5</code>.
  25708. Default value of <code>0.5</code> will pick always median values, while <code>0</code> will pick
  25709. minimum values, and <code>1</code> maximum values.
  25710. </p></dd>
  25711. </dl>
  25712. <a name="Commands-52"></a>
  25713. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-52">30.127.1 Commands</a></h3>
  25714. <p>This filter supports same <a href="#commands">commands</a> as options.
  25715. The command accepts the same syntax of the corresponding option.
  25716. </p>
  25717. <p>If the specified expression is not valid, it is kept at its current
  25718. value.
  25719. </p>
  25720. <a name="mergeplanes"></a>
  25721. <h2 class="section"><a href="ffplay-all.html#toc-mergeplanes">30.128 mergeplanes</a></h2>
  25722. <p>Merge color channel components from several video streams.
  25723. </p>
  25724. <p>The filter accepts up to 4 input streams, and merge selected input
  25725. planes to the output video.
  25726. </p>
  25727. <p>This filter accepts the following options:
  25728. </p><dl compact="compact">
  25729. <dt>&lsquo;<samp>mapping</samp>&rsquo;</dt>
  25730. <dd><p>Set input to output plane mapping. Default is <code>0</code>.
  25731. </p>
  25732. <p>The mappings is specified as a bitmap. It should be specified as a
  25733. hexadecimal number in the form 0xAa[Bb[Cc[Dd]]]. &rsquo;Aa&rsquo; describes the
  25734. mapping for the first plane of the output stream. &rsquo;A&rsquo; sets the number of
  25735. the input stream to use (from 0 to 3), and &rsquo;a&rsquo; the plane number of the
  25736. corresponding input to use (from 0 to 3). The rest of the mappings is
  25737. similar, &rsquo;Bb&rsquo; describes the mapping for the output stream second
  25738. plane, &rsquo;Cc&rsquo; describes the mapping for the output stream third plane and
  25739. &rsquo;Dd&rsquo; describes the mapping for the output stream fourth plane.
  25740. </p>
  25741. </dd>
  25742. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  25743. <dd><p>Set output pixel format. Default is <code>yuva444p</code>.
  25744. </p></dd>
  25745. </dl>
  25746. <a name="Examples-67"></a>
  25747. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-67">30.128.1 Examples</a></h3>
  25748. <ul>
  25749. <li>
  25750. Merge three gray video streams of same width and height into single video stream:
  25751. <div class="example">
  25752. <pre class="example">[a0][a1][a2]mergeplanes=0x001020:yuv444p
  25753. </pre></div>
  25754. </li><li>
  25755. Merge 1st yuv444p stream and 2nd gray video stream into yuva444p video stream:
  25756. <div class="example">
  25757. <pre class="example">[a0][a1]mergeplanes=0x00010210:yuva444p
  25758. </pre></div>
  25759. </li><li>
  25760. Swap Y and A plane in yuva444p stream:
  25761. <div class="example">
  25762. <pre class="example">format=yuva444p,mergeplanes=0x03010200:yuva444p
  25763. </pre></div>
  25764. </li><li>
  25765. Swap U and V plane in yuv420p stream:
  25766. <div class="example">
  25767. <pre class="example">format=yuv420p,mergeplanes=0x000201:yuv420p
  25768. </pre></div>
  25769. </li><li>
  25770. Cast a rgb24 clip to yuv444p:
  25771. <div class="example">
  25772. <pre class="example">format=rgb24,mergeplanes=0x000102:yuv444p
  25773. </pre></div>
  25774. </li></ul>
  25775. <a name="mestimate"></a>
  25776. <h2 class="section"><a href="ffplay-all.html#toc-mestimate">30.129 mestimate</a></h2>
  25777. <p>Estimate and export motion vectors using block matching algorithms.
  25778. Motion vectors are stored in frame side data to be used by other filters.
  25779. </p>
  25780. <p>This filter accepts the following options:
  25781. </p><dl compact="compact">
  25782. <dt>&lsquo;<samp>method</samp>&rsquo;</dt>
  25783. <dd><p>Specify the motion estimation method. Accepts one of the following values:
  25784. </p>
  25785. <dl compact="compact">
  25786. <dt>&lsquo;<samp>esa</samp>&rsquo;</dt>
  25787. <dd><p>Exhaustive search algorithm.
  25788. </p></dd>
  25789. <dt>&lsquo;<samp>tss</samp>&rsquo;</dt>
  25790. <dd><p>Three step search algorithm.
  25791. </p></dd>
  25792. <dt>&lsquo;<samp>tdls</samp>&rsquo;</dt>
  25793. <dd><p>Two dimensional logarithmic search algorithm.
  25794. </p></dd>
  25795. <dt>&lsquo;<samp>ntss</samp>&rsquo;</dt>
  25796. <dd><p>New three step search algorithm.
  25797. </p></dd>
  25798. <dt>&lsquo;<samp>fss</samp>&rsquo;</dt>
  25799. <dd><p>Four step search algorithm.
  25800. </p></dd>
  25801. <dt>&lsquo;<samp>ds</samp>&rsquo;</dt>
  25802. <dd><p>Diamond search algorithm.
  25803. </p></dd>
  25804. <dt>&lsquo;<samp>hexbs</samp>&rsquo;</dt>
  25805. <dd><p>Hexagon-based search algorithm.
  25806. </p></dd>
  25807. <dt>&lsquo;<samp>epzs</samp>&rsquo;</dt>
  25808. <dd><p>Enhanced predictive zonal search algorithm.
  25809. </p></dd>
  25810. <dt>&lsquo;<samp>umh</samp>&rsquo;</dt>
  25811. <dd><p>Uneven multi-hexagon search algorithm.
  25812. </p></dd>
  25813. </dl>
  25814. <p>Default value is &lsquo;<samp>esa</samp>&rsquo;.
  25815. </p>
  25816. </dd>
  25817. <dt>&lsquo;<samp>mb_size</samp>&rsquo;</dt>
  25818. <dd><p>Macroblock size. Default <code>16</code>.
  25819. </p>
  25820. </dd>
  25821. <dt>&lsquo;<samp>search_param</samp>&rsquo;</dt>
  25822. <dd><p>Search parameter. Default <code>7</code>.
  25823. </p></dd>
  25824. </dl>
  25825. <a name="midequalizer"></a>
  25826. <h2 class="section"><a href="ffplay-all.html#toc-midequalizer">30.130 midequalizer</a></h2>
  25827. <p>Apply Midway Image Equalization effect using two video streams.
  25828. </p>
  25829. <p>Midway Image Equalization adjusts a pair of images to have the same
  25830. histogram, while maintaining their dynamics as much as possible. It&rsquo;s
  25831. useful for e.g. matching exposures from a pair of stereo cameras.
  25832. </p>
  25833. <p>This filter has two inputs and one output, which must be of same pixel format, but
  25834. may be of different sizes. The output of filter is first input adjusted with
  25835. midway histogram of both inputs.
  25836. </p>
  25837. <p>This filter accepts the following option:
  25838. </p>
  25839. <dl compact="compact">
  25840. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  25841. <dd><p>Set which planes to process. Default is <code>15</code>, which is all available planes.
  25842. </p></dd>
  25843. </dl>
  25844. <a name="minterpolate"></a>
  25845. <h2 class="section"><a href="ffplay-all.html#toc-minterpolate">30.131 minterpolate</a></h2>
  25846. <p>Convert the video to specified frame rate using motion interpolation.
  25847. </p>
  25848. <p>This filter accepts the following options:
  25849. </p><dl compact="compact">
  25850. <dt>&lsquo;<samp>fps</samp>&rsquo;</dt>
  25851. <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>.
  25852. </p>
  25853. </dd>
  25854. <dt>&lsquo;<samp>mi_mode</samp>&rsquo;</dt>
  25855. <dd><p>Motion interpolation mode. Following values are accepted:
  25856. </p><dl compact="compact">
  25857. <dt>&lsquo;<samp>dup</samp>&rsquo;</dt>
  25858. <dd><p>Duplicate previous or next frame for interpolating new ones.
  25859. </p></dd>
  25860. <dt>&lsquo;<samp>blend</samp>&rsquo;</dt>
  25861. <dd><p>Blend source frames. Interpolated frame is mean of previous and next frames.
  25862. </p></dd>
  25863. <dt>&lsquo;<samp>mci</samp>&rsquo;</dt>
  25864. <dd><p>Motion compensated interpolation. Following options are effective when this mode is selected:
  25865. </p>
  25866. <dl compact="compact">
  25867. <dt>&lsquo;<samp>mc_mode</samp>&rsquo;</dt>
  25868. <dd><p>Motion compensation mode. Following values are accepted:
  25869. </p><dl compact="compact">
  25870. <dt>&lsquo;<samp>obmc</samp>&rsquo;</dt>
  25871. <dd><p>Overlapped block motion compensation.
  25872. </p></dd>
  25873. <dt>&lsquo;<samp>aobmc</samp>&rsquo;</dt>
  25874. <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.
  25875. </p></dd>
  25876. </dl>
  25877. <p>Default mode is &lsquo;<samp>obmc</samp>&rsquo;.
  25878. </p>
  25879. </dd>
  25880. <dt>&lsquo;<samp>me_mode</samp>&rsquo;</dt>
  25881. <dd><p>Motion estimation mode. Following values are accepted:
  25882. </p><dl compact="compact">
  25883. <dt>&lsquo;<samp>bidir</samp>&rsquo;</dt>
  25884. <dd><p>Bidirectional motion estimation. Motion vectors are estimated for each source frame in both forward and backward directions.
  25885. </p></dd>
  25886. <dt>&lsquo;<samp>bilat</samp>&rsquo;</dt>
  25887. <dd><p>Bilateral motion estimation. Motion vectors are estimated directly for interpolated frame.
  25888. </p></dd>
  25889. </dl>
  25890. <p>Default mode is &lsquo;<samp>bilat</samp>&rsquo;.
  25891. </p>
  25892. </dd>
  25893. <dt>&lsquo;<samp>me</samp>&rsquo;</dt>
  25894. <dd><p>The algorithm to be used for motion estimation. Following values are accepted:
  25895. </p><dl compact="compact">
  25896. <dt>&lsquo;<samp>esa</samp>&rsquo;</dt>
  25897. <dd><p>Exhaustive search algorithm.
  25898. </p></dd>
  25899. <dt>&lsquo;<samp>tss</samp>&rsquo;</dt>
  25900. <dd><p>Three step search algorithm.
  25901. </p></dd>
  25902. <dt>&lsquo;<samp>tdls</samp>&rsquo;</dt>
  25903. <dd><p>Two dimensional logarithmic search algorithm.
  25904. </p></dd>
  25905. <dt>&lsquo;<samp>ntss</samp>&rsquo;</dt>
  25906. <dd><p>New three step search algorithm.
  25907. </p></dd>
  25908. <dt>&lsquo;<samp>fss</samp>&rsquo;</dt>
  25909. <dd><p>Four step search algorithm.
  25910. </p></dd>
  25911. <dt>&lsquo;<samp>ds</samp>&rsquo;</dt>
  25912. <dd><p>Diamond search algorithm.
  25913. </p></dd>
  25914. <dt>&lsquo;<samp>hexbs</samp>&rsquo;</dt>
  25915. <dd><p>Hexagon-based search algorithm.
  25916. </p></dd>
  25917. <dt>&lsquo;<samp>epzs</samp>&rsquo;</dt>
  25918. <dd><p>Enhanced predictive zonal search algorithm.
  25919. </p></dd>
  25920. <dt>&lsquo;<samp>umh</samp>&rsquo;</dt>
  25921. <dd><p>Uneven multi-hexagon search algorithm.
  25922. </p></dd>
  25923. </dl>
  25924. <p>Default algorithm is &lsquo;<samp>epzs</samp>&rsquo;.
  25925. </p>
  25926. </dd>
  25927. <dt>&lsquo;<samp>mb_size</samp>&rsquo;</dt>
  25928. <dd><p>Macroblock size. Default <code>16</code>.
  25929. </p>
  25930. </dd>
  25931. <dt>&lsquo;<samp>search_param</samp>&rsquo;</dt>
  25932. <dd><p>Motion estimation search parameter. Default <code>32</code>.
  25933. </p>
  25934. </dd>
  25935. <dt>&lsquo;<samp>vsbmc</samp>&rsquo;</dt>
  25936. <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).
  25937. </p></dd>
  25938. </dl>
  25939. </dd>
  25940. </dl>
  25941. </dd>
  25942. <dt>&lsquo;<samp>scd</samp>&rsquo;</dt>
  25943. <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:
  25944. </p><dl compact="compact">
  25945. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  25946. <dd><p>Disable scene change detection.
  25947. </p></dd>
  25948. <dt>&lsquo;<samp>fdiff</samp>&rsquo;</dt>
  25949. <dd><p>Frame difference. Corresponding pixel values are compared and if it satisfies <var>scd_threshold</var> scene change is detected.
  25950. </p></dd>
  25951. </dl>
  25952. <p>Default method is &lsquo;<samp>fdiff</samp>&rsquo;.
  25953. </p>
  25954. </dd>
  25955. <dt>&lsquo;<samp>scd_threshold</samp>&rsquo;</dt>
  25956. <dd><p>Scene change detection threshold. Default is <code>5.0</code>.
  25957. </p></dd>
  25958. </dl>
  25959. <a name="mix"></a>
  25960. <h2 class="section"><a href="ffplay-all.html#toc-mix">30.132 mix</a></h2>
  25961. <p>Mix several video input streams into one video stream.
  25962. </p>
  25963. <p>A description of the accepted options follows.
  25964. </p>
  25965. <dl compact="compact">
  25966. <dt>&lsquo;<samp>nb_inputs</samp>&rsquo;</dt>
  25967. <dd><p>The number of inputs. If unspecified, it defaults to 2.
  25968. </p>
  25969. </dd>
  25970. <dt>&lsquo;<samp>weights</samp>&rsquo;</dt>
  25971. <dd><p>Specify weight of each input video stream as sequence.
  25972. Each weight is separated by space. If number of weights
  25973. is smaller than number of <var>frames</var> last specified
  25974. weight will be used for all remaining unset weights.
  25975. </p>
  25976. </dd>
  25977. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  25978. <dd><p>Specify scale, if it is set it will be multiplied with sum
  25979. of each weight multiplied with pixel values to give final destination
  25980. pixel value. By default <var>scale</var> is auto scaled to sum of weights.
  25981. </p>
  25982. </dd>
  25983. <dt>&lsquo;<samp>duration</samp>&rsquo;</dt>
  25984. <dd><p>Specify how end of stream is determined.
  25985. </p><dl compact="compact">
  25986. <dt>&lsquo;<samp>longest</samp>&rsquo;</dt>
  25987. <dd><p>The duration of the longest input. (default)
  25988. </p>
  25989. </dd>
  25990. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  25991. <dd><p>The duration of the shortest input.
  25992. </p>
  25993. </dd>
  25994. <dt>&lsquo;<samp>first</samp>&rsquo;</dt>
  25995. <dd><p>The duration of the first input.
  25996. </p></dd>
  25997. </dl>
  25998. </dd>
  25999. </dl>
  26000. <a name="mpdecimate"></a>
  26001. <h2 class="section"><a href="ffplay-all.html#toc-mpdecimate">30.133 mpdecimate</a></h2>
  26002. <p>Drop frames that do not differ greatly from the previous frame in
  26003. order to reduce frame rate.
  26004. </p>
  26005. <p>The main use of this filter is for very-low-bitrate encoding
  26006. (e.g. streaming over dialup modem), but it could in theory be used for
  26007. fixing movies that were inverse-telecined incorrectly.
  26008. </p>
  26009. <p>A description of the accepted options follows.
  26010. </p>
  26011. <dl compact="compact">
  26012. <dt>&lsquo;<samp>max</samp>&rsquo;</dt>
  26013. <dd><p>Set the maximum number of consecutive frames which can be dropped (if
  26014. positive), or the minimum interval between dropped frames (if
  26015. negative). If the value is 0, the frame is dropped disregarding the
  26016. number of previous sequentially dropped frames.
  26017. </p>
  26018. <p>Default value is 0.
  26019. </p>
  26020. </dd>
  26021. <dt>&lsquo;<samp>hi</samp>&rsquo;</dt>
  26022. <dt>&lsquo;<samp>lo</samp>&rsquo;</dt>
  26023. <dt>&lsquo;<samp>frac</samp>&rsquo;</dt>
  26024. <dd><p>Set the dropping threshold values.
  26025. </p>
  26026. <p>Values for &lsquo;<samp>hi</samp>&rsquo; and &lsquo;<samp>lo</samp>&rsquo; are for 8x8 pixel blocks and
  26027. represent actual pixel value differences, so a threshold of 64
  26028. corresponds to 1 unit of difference for each pixel, or the same spread
  26029. out differently over the block.
  26030. </p>
  26031. <p>A frame is a candidate for dropping if no 8x8 blocks differ by more
  26032. than a threshold of &lsquo;<samp>hi</samp>&rsquo;, and if no more than &lsquo;<samp>frac</samp>&rsquo; blocks (1
  26033. meaning the whole image) differ by more than a threshold of &lsquo;<samp>lo</samp>&rsquo;.
  26034. </p>
  26035. <p>Default value for &lsquo;<samp>hi</samp>&rsquo; is 64*12, default value for &lsquo;<samp>lo</samp>&rsquo; is
  26036. 64*5, and default value for &lsquo;<samp>frac</samp>&rsquo; is 0.33.
  26037. </p></dd>
  26038. </dl>
  26039. <a name="negate"></a>
  26040. <h2 class="section"><a href="ffplay-all.html#toc-negate">30.134 negate</a></h2>
  26041. <p>Negate (invert) the input video.
  26042. </p>
  26043. <p>It accepts the following option:
  26044. </p>
  26045. <dl compact="compact">
  26046. <dt>&lsquo;<samp>negate_alpha</samp>&rsquo;</dt>
  26047. <dd><p>With value 1, it negates the alpha component, if present. Default value is 0.
  26048. </p></dd>
  26049. </dl>
  26050. <p><a name="nlmeans"></a>
  26051. </p><a name="nlmeans-1"></a>
  26052. <h2 class="section"><a href="ffplay-all.html#toc-nlmeans-1">30.135 nlmeans</a></h2>
  26053. <p>Denoise frames using Non-Local Means algorithm.
  26054. </p>
  26055. <p>Each pixel is adjusted by looking for other pixels with similar contexts. This
  26056. context similarity is defined by comparing their surrounding patches of size
  26057. &lsquo;<samp>p</samp>&rsquo;x&lsquo;<samp>p</samp>&rsquo;. Patches are searched in an area of &lsquo;<samp>r</samp>&rsquo;x&lsquo;<samp>r</samp>&rsquo;
  26058. around the pixel.
  26059. </p>
  26060. <p>Note that the research area defines centers for patches, which means some
  26061. patches will be made of pixels outside that research area.
  26062. </p>
  26063. <p>The filter accepts the following options.
  26064. </p>
  26065. <dl compact="compact">
  26066. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  26067. <dd><p>Set denoising strength. Default is 1.0. Must be in range [1.0, 30.0].
  26068. </p>
  26069. </dd>
  26070. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  26071. <dd><p>Set patch size. Default is 7. Must be odd number in range [0, 99].
  26072. </p>
  26073. </dd>
  26074. <dt>&lsquo;<samp>pc</samp>&rsquo;</dt>
  26075. <dd><p>Same as &lsquo;<samp>p</samp>&rsquo; but for chroma planes.
  26076. </p>
  26077. <p>The default value is <var>0</var> and means automatic.
  26078. </p>
  26079. </dd>
  26080. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  26081. <dd><p>Set research size. Default is 15. Must be odd number in range [0, 99].
  26082. </p>
  26083. </dd>
  26084. <dt>&lsquo;<samp>rc</samp>&rsquo;</dt>
  26085. <dd><p>Same as &lsquo;<samp>r</samp>&rsquo; but for chroma planes.
  26086. </p>
  26087. <p>The default value is <var>0</var> and means automatic.
  26088. </p></dd>
  26089. </dl>
  26090. <a name="nnedi"></a>
  26091. <h2 class="section"><a href="ffplay-all.html#toc-nnedi">30.136 nnedi</a></h2>
  26092. <p>Deinterlace video using neural network edge directed interpolation.
  26093. </p>
  26094. <p>This filter accepts the following options:
  26095. </p>
  26096. <dl compact="compact">
  26097. <dt>&lsquo;<samp>weights</samp>&rsquo;</dt>
  26098. <dd><p>Mandatory option, without binary file filter can not work.
  26099. Currently file can be found here:
  26100. https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin
  26101. </p>
  26102. </dd>
  26103. <dt>&lsquo;<samp>deint</samp>&rsquo;</dt>
  26104. <dd><p>Set which frames to deinterlace, by default it is <code>all</code>.
  26105. Can be <code>all</code> or <code>interlaced</code>.
  26106. </p>
  26107. </dd>
  26108. <dt>&lsquo;<samp>field</samp>&rsquo;</dt>
  26109. <dd><p>Set mode of operation.
  26110. </p>
  26111. <p>Can be one of the following:
  26112. </p>
  26113. <dl compact="compact">
  26114. <dt>&lsquo;<samp>af</samp>&rsquo;</dt>
  26115. <dd><p>Use frame flags, both fields.
  26116. </p></dd>
  26117. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  26118. <dd><p>Use frame flags, single field.
  26119. </p></dd>
  26120. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  26121. <dd><p>Use top field only.
  26122. </p></dd>
  26123. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  26124. <dd><p>Use bottom field only.
  26125. </p></dd>
  26126. <dt>&lsquo;<samp>tf</samp>&rsquo;</dt>
  26127. <dd><p>Use both fields, top first.
  26128. </p></dd>
  26129. <dt>&lsquo;<samp>bf</samp>&rsquo;</dt>
  26130. <dd><p>Use both fields, bottom first.
  26131. </p></dd>
  26132. </dl>
  26133. </dd>
  26134. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  26135. <dd><p>Set which planes to process, by default filter process all frames.
  26136. </p>
  26137. </dd>
  26138. <dt>&lsquo;<samp>nsize</samp>&rsquo;</dt>
  26139. <dd><p>Set size of local neighborhood around each pixel, used by the predictor neural
  26140. network.
  26141. </p>
  26142. <p>Can be one of the following:
  26143. </p>
  26144. <dl compact="compact">
  26145. <dt>&lsquo;<samp>s8x6</samp>&rsquo;</dt>
  26146. <dt>&lsquo;<samp>s16x6</samp>&rsquo;</dt>
  26147. <dt>&lsquo;<samp>s32x6</samp>&rsquo;</dt>
  26148. <dt>&lsquo;<samp>s48x6</samp>&rsquo;</dt>
  26149. <dt>&lsquo;<samp>s8x4</samp>&rsquo;</dt>
  26150. <dt>&lsquo;<samp>s16x4</samp>&rsquo;</dt>
  26151. <dt>&lsquo;<samp>s32x4</samp>&rsquo;</dt>
  26152. </dl>
  26153. </dd>
  26154. <dt>&lsquo;<samp>nns</samp>&rsquo;</dt>
  26155. <dd><p>Set the number of neurons in predictor neural network.
  26156. Can be one of the following:
  26157. </p>
  26158. <dl compact="compact">
  26159. <dt>&lsquo;<samp>n16</samp>&rsquo;</dt>
  26160. <dt>&lsquo;<samp>n32</samp>&rsquo;</dt>
  26161. <dt>&lsquo;<samp>n64</samp>&rsquo;</dt>
  26162. <dt>&lsquo;<samp>n128</samp>&rsquo;</dt>
  26163. <dt>&lsquo;<samp>n256</samp>&rsquo;</dt>
  26164. </dl>
  26165. </dd>
  26166. <dt>&lsquo;<samp>qual</samp>&rsquo;</dt>
  26167. <dd><p>Controls the number of different neural network predictions that are blended
  26168. together to compute the final output value. Can be <code>fast</code>, default or
  26169. <code>slow</code>.
  26170. </p>
  26171. </dd>
  26172. <dt>&lsquo;<samp>etype</samp>&rsquo;</dt>
  26173. <dd><p>Set which set of weights to use in the predictor.
  26174. Can be one of the following:
  26175. </p>
  26176. <dl compact="compact">
  26177. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  26178. <dd><p>weights trained to minimize absolute error
  26179. </p></dd>
  26180. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  26181. <dd><p>weights trained to minimize squared error
  26182. </p></dd>
  26183. </dl>
  26184. </dd>
  26185. <dt>&lsquo;<samp>pscrn</samp>&rsquo;</dt>
  26186. <dd><p>Controls whether or not the prescreener neural network is used to decide
  26187. which pixels should be processed by the predictor neural network and which
  26188. can be handled by simple cubic interpolation.
  26189. The prescreener is trained to know whether cubic interpolation will be
  26190. sufficient for a pixel or whether it should be predicted by the predictor nn.
  26191. The computational complexity of the prescreener nn is much less than that of
  26192. the predictor nn. Since most pixels can be handled by cubic interpolation,
  26193. using the prescreener generally results in much faster processing.
  26194. The prescreener is pretty accurate, so the difference between using it and not
  26195. using it is almost always unnoticeable.
  26196. </p>
  26197. <p>Can be one of the following:
  26198. </p>
  26199. <dl compact="compact">
  26200. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  26201. <dt>&lsquo;<samp>original</samp>&rsquo;</dt>
  26202. <dt>&lsquo;<samp>new</samp>&rsquo;</dt>
  26203. </dl>
  26204. <p>Default is <code>new</code>.
  26205. </p>
  26206. </dd>
  26207. <dt>&lsquo;<samp>fapprox</samp>&rsquo;</dt>
  26208. <dd><p>Set various debugging flags.
  26209. </p></dd>
  26210. </dl>
  26211. <a name="noformat"></a>
  26212. <h2 class="section"><a href="ffplay-all.html#toc-noformat">30.137 noformat</a></h2>
  26213. <p>Force libavfilter not to use any of the specified pixel formats for the
  26214. input to the next filter.
  26215. </p>
  26216. <p>It accepts the following parameters:
  26217. </p><dl compact="compact">
  26218. <dt>&lsquo;<samp>pix_fmts</samp>&rsquo;</dt>
  26219. <dd><p>A &rsquo;|&rsquo;-separated list of pixel format names, such as
  26220. pix_fmts=yuv420p|monow|rgb24&quot;.
  26221. </p>
  26222. </dd>
  26223. </dl>
  26224. <a name="Examples-14"></a>
  26225. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-14">30.137.1 Examples</a></h3>
  26226. <ul>
  26227. <li>
  26228. Force libavfilter to use a format different from <var>yuv420p</var> for the
  26229. input to the vflip filter:
  26230. <div class="example">
  26231. <pre class="example">noformat=pix_fmts=yuv420p,vflip
  26232. </pre></div>
  26233. </li><li>
  26234. Convert the input video to any of the formats not contained in the list:
  26235. <div class="example">
  26236. <pre class="example">noformat=yuv420p|yuv444p|yuv410p
  26237. </pre></div>
  26238. </li></ul>
  26239. <a name="noise"></a>
  26240. <h2 class="section"><a href="ffplay-all.html#toc-noise">30.138 noise</a></h2>
  26241. <p>Add noise on video input frame.
  26242. </p>
  26243. <p>The filter accepts the following options:
  26244. </p>
  26245. <dl compact="compact">
  26246. <dt>&lsquo;<samp>all_seed</samp>&rsquo;</dt>
  26247. <dt>&lsquo;<samp>c0_seed</samp>&rsquo;</dt>
  26248. <dt>&lsquo;<samp>c1_seed</samp>&rsquo;</dt>
  26249. <dt>&lsquo;<samp>c2_seed</samp>&rsquo;</dt>
  26250. <dt>&lsquo;<samp>c3_seed</samp>&rsquo;</dt>
  26251. <dd><p>Set noise seed for specific pixel component or all pixel components in case
  26252. of <var>all_seed</var>. Default value is <code>123457</code>.
  26253. </p>
  26254. </dd>
  26255. <dt>&lsquo;<samp>all_strength, alls</samp>&rsquo;</dt>
  26256. <dt>&lsquo;<samp>c0_strength, c0s</samp>&rsquo;</dt>
  26257. <dt>&lsquo;<samp>c1_strength, c1s</samp>&rsquo;</dt>
  26258. <dt>&lsquo;<samp>c2_strength, c2s</samp>&rsquo;</dt>
  26259. <dt>&lsquo;<samp>c3_strength, c3s</samp>&rsquo;</dt>
  26260. <dd><p>Set noise strength for specific pixel component or all pixel components in case
  26261. <var>all_strength</var>. Default value is <code>0</code>. Allowed range is [0, 100].
  26262. </p>
  26263. </dd>
  26264. <dt>&lsquo;<samp>all_flags, allf</samp>&rsquo;</dt>
  26265. <dt>&lsquo;<samp>c0_flags, c0f</samp>&rsquo;</dt>
  26266. <dt>&lsquo;<samp>c1_flags, c1f</samp>&rsquo;</dt>
  26267. <dt>&lsquo;<samp>c2_flags, c2f</samp>&rsquo;</dt>
  26268. <dt>&lsquo;<samp>c3_flags, c3f</samp>&rsquo;</dt>
  26269. <dd><p>Set pixel component flags or set flags for all components if <var>all_flags</var>.
  26270. Available values for component flags are:
  26271. </p><dl compact="compact">
  26272. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  26273. <dd><p>averaged temporal noise (smoother)
  26274. </p></dd>
  26275. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  26276. <dd><p>mix random noise with a (semi)regular pattern
  26277. </p></dd>
  26278. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  26279. <dd><p>temporal noise (noise pattern changes between frames)
  26280. </p></dd>
  26281. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  26282. <dd><p>uniform noise (gaussian otherwise)
  26283. </p></dd>
  26284. </dl>
  26285. </dd>
  26286. </dl>
  26287. <a name="Examples-161"></a>
  26288. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-161">30.138.1 Examples</a></h3>
  26289. <p>Add temporal and uniform noise to input video:
  26290. </p><div class="example">
  26291. <pre class="example">noise=alls=20:allf=t+u
  26292. </pre></div>
  26293. <a name="normalize"></a>
  26294. <h2 class="section"><a href="ffplay-all.html#toc-normalize">30.139 normalize</a></h2>
  26295. <p>Normalize RGB video (aka histogram stretching, contrast stretching).
  26296. See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
  26297. </p>
  26298. <p>For each channel of each frame, the filter computes the input range and maps
  26299. it linearly to the user-specified output range. The output range defaults
  26300. to the full dynamic range from pure black to pure white.
  26301. </p>
  26302. <p>Temporal smoothing can be used on the input range to reduce flickering (rapid
  26303. changes in brightness) caused when small dark or bright objects enter or leave
  26304. the scene. This is similar to the auto-exposure (automatic gain control) on a
  26305. video camera, and, like a video camera, it may cause a period of over- or
  26306. under-exposure of the video.
  26307. </p>
  26308. <p>The R,G,B channels can be normalized independently, which may cause some
  26309. color shifting, or linked together as a single channel, which prevents
  26310. color shifting. Linked normalization preserves hue. Independent normalization
  26311. does not, so it can be used to remove some color casts. Independent and linked
  26312. normalization can be combined in any ratio.
  26313. </p>
  26314. <p>The normalize filter accepts the following options:
  26315. </p>
  26316. <dl compact="compact">
  26317. <dt>&lsquo;<samp>blackpt</samp>&rsquo;</dt>
  26318. <dt>&lsquo;<samp>whitept</samp>&rsquo;</dt>
  26319. <dd><p>Colors which define the output range. The minimum input value is mapped to
  26320. the <var>blackpt</var>. The maximum input value is mapped to the <var>whitept</var>.
  26321. The defaults are black and white respectively. Specifying white for
  26322. <var>blackpt</var> and black for <var>whitept</var> will give color-inverted,
  26323. normalized video. Shades of grey can be used to reduce the dynamic range
  26324. (contrast). Specifying saturated colors here can create some interesting
  26325. effects.
  26326. </p>
  26327. </dd>
  26328. <dt>&lsquo;<samp>smoothing</samp>&rsquo;</dt>
  26329. <dd><p>The number of previous frames to use for temporal smoothing. The input range
  26330. of each channel is smoothed using a rolling average over the current frame
  26331. and the <var>smoothing</var> previous frames. The default is 0 (no temporal
  26332. smoothing).
  26333. </p>
  26334. </dd>
  26335. <dt>&lsquo;<samp>independence</samp>&rsquo;</dt>
  26336. <dd><p>Controls the ratio of independent (color shifting) channel normalization to
  26337. linked (color preserving) normalization. 0.0 is fully linked, 1.0 is fully
  26338. independent. Defaults to 1.0 (fully independent).
  26339. </p>
  26340. </dd>
  26341. <dt>&lsquo;<samp>strength</samp>&rsquo;</dt>
  26342. <dd><p>Overall strength of the filter. 1.0 is full strength. 0.0 is a rather
  26343. expensive no-op. Defaults to 1.0 (full strength).
  26344. </p>
  26345. </dd>
  26346. </dl>
  26347. <a name="Commands-49"></a>
  26348. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-49">30.139.1 Commands</a></h3>
  26349. <p>This filter supports same <a href="#commands">commands</a> as options, excluding <var>smoothing</var> option.
  26350. The command accepts the same syntax of the corresponding option.
  26351. </p>
  26352. <p>If the specified expression is not valid, it is kept at its current
  26353. value.
  26354. </p>
  26355. <a name="Examples-32"></a>
  26356. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-32">30.139.2 Examples</a></h3>
  26357. <p>Stretch video contrast to use the full dynamic range, with no temporal
  26358. smoothing; may flicker depending on the source content:
  26359. </p><div class="example">
  26360. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=0
  26361. </pre></div>
  26362. <p>As above, but with 50 frames of temporal smoothing; flicker should be
  26363. reduced, depending on the source content:
  26364. </p><div class="example">
  26365. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=50
  26366. </pre></div>
  26367. <p>As above, but with hue-preserving linked channel normalization:
  26368. </p><div class="example">
  26369. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=50:independence=0
  26370. </pre></div>
  26371. <p>As above, but with half strength:
  26372. </p><div class="example">
  26373. <pre class="example">normalize=blackpt=black:whitept=white:smoothing=50:independence=0:strength=0.5
  26374. </pre></div>
  26375. <p>Map the darkest input color to red, the brightest input color to cyan:
  26376. </p><div class="example">
  26377. <pre class="example">normalize=blackpt=red:whitept=cyan
  26378. </pre></div>
  26379. <a name="null"></a>
  26380. <h2 class="section"><a href="ffplay-all.html#toc-null">30.140 null</a></h2>
  26381. <p>Pass the video source unchanged to the output.
  26382. </p>
  26383. <a name="ocr"></a>
  26384. <h2 class="section"><a href="ffplay-all.html#toc-ocr">30.141 ocr</a></h2>
  26385. <p>Optical Character Recognition
  26386. </p>
  26387. <p>This filter uses Tesseract for optical character recognition. To enable
  26388. compilation of this filter, you need to configure FFmpeg with
  26389. <code>--enable-libtesseract</code>.
  26390. </p>
  26391. <p>It accepts the following options:
  26392. </p>
  26393. <dl compact="compact">
  26394. <dt>&lsquo;<samp>datapath</samp>&rsquo;</dt>
  26395. <dd><p>Set datapath to tesseract data. Default is to use whatever was
  26396. set at installation.
  26397. </p>
  26398. </dd>
  26399. <dt>&lsquo;<samp>language</samp>&rsquo;</dt>
  26400. <dd><p>Set language, default is &quot;eng&quot;.
  26401. </p>
  26402. </dd>
  26403. <dt>&lsquo;<samp>whitelist</samp>&rsquo;</dt>
  26404. <dd><p>Set character whitelist.
  26405. </p>
  26406. </dd>
  26407. <dt>&lsquo;<samp>blacklist</samp>&rsquo;</dt>
  26408. <dd><p>Set character blacklist.
  26409. </p></dd>
  26410. </dl>
  26411. <p>The filter exports recognized text as the frame metadata <code>lavfi.ocr.text</code>.
  26412. The filter exports confidence of recognized words as the frame metadata <code>lavfi.ocr.confidence</code>.
  26413. </p>
  26414. <a name="ocv"></a>
  26415. <h2 class="section"><a href="ffplay-all.html#toc-ocv">30.142 ocv</a></h2>
  26416. <p>Apply a video transform using libopencv.
  26417. </p>
  26418. <p>To enable this filter, install the libopencv library and headers and
  26419. configure FFmpeg with <code>--enable-libopencv</code>.
  26420. </p>
  26421. <p>It accepts the following parameters:
  26422. </p>
  26423. <dl compact="compact">
  26424. <dt>&lsquo;<samp>filter_name</samp>&rsquo;</dt>
  26425. <dd><p>The name of the libopencv filter to apply.
  26426. </p>
  26427. </dd>
  26428. <dt>&lsquo;<samp>filter_params</samp>&rsquo;</dt>
  26429. <dd><p>The parameters to pass to the libopencv filter. If not specified, the default
  26430. values are assumed.
  26431. </p>
  26432. </dd>
  26433. </dl>
  26434. <p>Refer to the official libopencv documentation for more precise
  26435. information:
  26436. <a href="http://docs.opencv.org/master/modules/imgproc/doc/filtering.html">http://docs.opencv.org/master/modules/imgproc/doc/filtering.html</a>
  26437. </p>
  26438. <p>Several libopencv filters are supported; see the following subsections.
  26439. </p>
  26440. <p><a name="dilate"></a>
  26441. </p><a name="dilate-1"></a>
  26442. <h3 class="subsection"><a href="ffplay-all.html#toc-dilate-1">30.142.1 dilate</a></h3>
  26443. <p>Dilate an image by using a specific structuring element.
  26444. It corresponds to the libopencv function <code>cvDilate</code>.
  26445. </p>
  26446. <p>It accepts the parameters: <var>struct_el</var>|<var>nb_iterations</var>.
  26447. </p>
  26448. <p><var>struct_el</var> represents a structuring element, and has the syntax:
  26449. <var>cols</var>x<var>rows</var>+<var>anchor_x</var>x<var>anchor_y</var>/<var>shape</var>
  26450. </p>
  26451. <p><var>cols</var> and <var>rows</var> represent the number of columns and rows of
  26452. the structuring element, <var>anchor_x</var> and <var>anchor_y</var> the anchor
  26453. point, and <var>shape</var> the shape for the structuring element. <var>shape</var>
  26454. must be &quot;rect&quot;, &quot;cross&quot;, &quot;ellipse&quot;, or &quot;custom&quot;.
  26455. </p>
  26456. <p>If the value for <var>shape</var> is &quot;custom&quot;, it must be followed by a
  26457. string of the form &quot;=<var>filename</var>&quot;. The file with name
  26458. <var>filename</var> is assumed to represent a binary image, with each
  26459. printable character corresponding to a bright pixel. When a custom
  26460. <var>shape</var> is used, <var>cols</var> and <var>rows</var> are ignored, the number
  26461. or columns and rows of the read file are assumed instead.
  26462. </p>
  26463. <p>The default value for <var>struct_el</var> is &quot;3x3+0x0/rect&quot;.
  26464. </p>
  26465. <p><var>nb_iterations</var> specifies the number of times the transform is
  26466. applied to the image, and defaults to 1.
  26467. </p>
  26468. <p>Some examples:
  26469. </p><div class="example">
  26470. <pre class="example"># Use the default values
  26471. ocv=dilate
  26472. # Dilate using a structuring element with a 5x5 cross, iterating two times
  26473. ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2
  26474. # Read the shape from the file diamond.shape, iterating two times.
  26475. # The file diamond.shape may contain a pattern of characters like this
  26476. # *
  26477. # ***
  26478. # *****
  26479. # ***
  26480. # *
  26481. # The specified columns and rows are ignored
  26482. # but the anchor point coordinates are not
  26483. ocv=dilate:0x0+2x2/custom=diamond.shape|2
  26484. </pre></div>
  26485. <a name="erode"></a>
  26486. <h3 class="subsection"><a href="ffplay-all.html#toc-erode">30.142.2 erode</a></h3>
  26487. <p>Erode an image by using a specific structuring element.
  26488. It corresponds to the libopencv function <code>cvErode</code>.
  26489. </p>
  26490. <p>It accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>,
  26491. with the same syntax and semantics as the <a href="#dilate">dilate</a> filter.
  26492. </p>
  26493. <a name="smooth"></a>
  26494. <h3 class="subsection"><a href="ffplay-all.html#toc-smooth">30.142.3 smooth</a></h3>
  26495. <p>Smooth the input video.
  26496. </p>
  26497. <p>The filter takes the following parameters:
  26498. <var>type</var>|<var>param1</var>|<var>param2</var>|<var>param3</var>|<var>param4</var>.
  26499. </p>
  26500. <p><var>type</var> is the type of smooth filter to apply, and must be one of
  26501. the following values: &quot;blur&quot;, &quot;blur_no_scale&quot;, &quot;median&quot;, &quot;gaussian&quot;,
  26502. or &quot;bilateral&quot;. The default value is &quot;gaussian&quot;.
  26503. </p>
  26504. <p>The meaning of <var>param1</var>, <var>param2</var>, <var>param3</var>, and <var>param4</var>
  26505. depends on the smooth type. <var>param1</var> and
  26506. <var>param2</var> accept integer positive values or 0. <var>param3</var> and
  26507. <var>param4</var> accept floating point values.
  26508. </p>
  26509. <p>The default value for <var>param1</var> is 3. The default value for the
  26510. other parameters is 0.
  26511. </p>
  26512. <p>These parameters correspond to the parameters assigned to the
  26513. libopencv function <code>cvSmooth</code>.
  26514. </p>
  26515. <a name="oscilloscope"></a>
  26516. <h2 class="section"><a href="ffplay-all.html#toc-oscilloscope">30.143 oscilloscope</a></h2>
  26517. <p>2D Video Oscilloscope.
  26518. </p>
  26519. <p>Useful to measure spatial impulse, step responses, chroma delays, etc.
  26520. </p>
  26521. <p>It accepts the following parameters:
  26522. </p>
  26523. <dl compact="compact">
  26524. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  26525. <dd><p>Set scope center x position.
  26526. </p>
  26527. </dd>
  26528. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  26529. <dd><p>Set scope center y position.
  26530. </p>
  26531. </dd>
  26532. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  26533. <dd><p>Set scope size, relative to frame diagonal.
  26534. </p>
  26535. </dd>
  26536. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  26537. <dd><p>Set scope tilt/rotation.
  26538. </p>
  26539. </dd>
  26540. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  26541. <dd><p>Set trace opacity.
  26542. </p>
  26543. </dd>
  26544. <dt>&lsquo;<samp>tx</samp>&rsquo;</dt>
  26545. <dd><p>Set trace center x position.
  26546. </p>
  26547. </dd>
  26548. <dt>&lsquo;<samp>ty</samp>&rsquo;</dt>
  26549. <dd><p>Set trace center y position.
  26550. </p>
  26551. </dd>
  26552. <dt>&lsquo;<samp>tw</samp>&rsquo;</dt>
  26553. <dd><p>Set trace width, relative to width of frame.
  26554. </p>
  26555. </dd>
  26556. <dt>&lsquo;<samp>th</samp>&rsquo;</dt>
  26557. <dd><p>Set trace height, relative to height of frame.
  26558. </p>
  26559. </dd>
  26560. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  26561. <dd><p>Set which components to trace. By default it traces first three components.
  26562. </p>
  26563. </dd>
  26564. <dt>&lsquo;<samp>g</samp>&rsquo;</dt>
  26565. <dd><p>Draw trace grid. By default is enabled.
  26566. </p>
  26567. </dd>
  26568. <dt>&lsquo;<samp>st</samp>&rsquo;</dt>
  26569. <dd><p>Draw some statistics. By default is enabled.
  26570. </p>
  26571. </dd>
  26572. <dt>&lsquo;<samp>sc</samp>&rsquo;</dt>
  26573. <dd><p>Draw scope. By default is enabled.
  26574. </p></dd>
  26575. </dl>
  26576. <a name="Commands-6"></a>
  26577. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-6">30.143.1 Commands</a></h3>
  26578. <p>This filter supports same <a href="#commands">commands</a> as options.
  26579. The command accepts the same syntax of the corresponding option.
  26580. </p>
  26581. <p>If the specified expression is not valid, it is kept at its current
  26582. value.
  26583. </p>
  26584. <a name="Examples-71"></a>
  26585. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-71">30.143.2 Examples</a></h3>
  26586. <ul>
  26587. <li>
  26588. Inspect full first row of video frame.
  26589. <div class="example">
  26590. <pre class="example">oscilloscope=x=0.5:y=0:s=1
  26591. </pre></div>
  26592. </li><li>
  26593. Inspect full last row of video frame.
  26594. <div class="example">
  26595. <pre class="example">oscilloscope=x=0.5:y=1:s=1
  26596. </pre></div>
  26597. </li><li>
  26598. Inspect full 5th line of video frame of height 1080.
  26599. <div class="example">
  26600. <pre class="example">oscilloscope=x=0.5:y=5/1080:s=1
  26601. </pre></div>
  26602. </li><li>
  26603. Inspect full last column of video frame.
  26604. <div class="example">
  26605. <pre class="example">oscilloscope=x=1:y=0.5:s=1:t=1
  26606. </pre></div>
  26607. </li></ul>
  26608. <p><a name="overlay"></a>
  26609. </p><a name="overlay-1"></a>
  26610. <h2 class="section"><a href="ffplay-all.html#toc-overlay-1">30.144 overlay</a></h2>
  26611. <p>Overlay one video on top of another.
  26612. </p>
  26613. <p>It takes two inputs and has one output. The first input is the &quot;main&quot;
  26614. video on which the second input is overlaid.
  26615. </p>
  26616. <p>It accepts the following parameters:
  26617. </p>
  26618. <p>A description of the accepted options follows.
  26619. </p>
  26620. <dl compact="compact">
  26621. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  26622. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  26623. <dd><p>Set the expression for the x and y coordinates of the overlaid video
  26624. on the main video. Default value is &quot;0&quot; for both expressions. In case
  26625. the expression is invalid, it is set to a huge value (meaning that the
  26626. overlay will not be displayed within the output visible area).
  26627. </p>
  26628. </dd>
  26629. <dt>&lsquo;<samp>eof_action</samp>&rsquo;</dt>
  26630. <dd><p>See <a href="#framesync">framesync</a>.
  26631. </p>
  26632. </dd>
  26633. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  26634. <dd><p>Set when the expressions for &lsquo;<samp>x</samp>&rsquo;, and &lsquo;<samp>y</samp>&rsquo; are evaluated.
  26635. </p>
  26636. <p>It accepts the following values:
  26637. </p><dl compact="compact">
  26638. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  26639. <dd><p>only evaluate expressions once during the filter initialization or
  26640. when a command is processed
  26641. </p>
  26642. </dd>
  26643. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  26644. <dd><p>evaluate expressions for each incoming frame
  26645. </p></dd>
  26646. </dl>
  26647. <p>Default value is &lsquo;<samp>frame</samp>&rsquo;.
  26648. </p>
  26649. </dd>
  26650. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  26651. <dd><p>See <a href="#framesync">framesync</a>.
  26652. </p>
  26653. </dd>
  26654. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  26655. <dd><p>Set the format for the output video.
  26656. </p>
  26657. <p>It accepts the following values:
  26658. </p><dl compact="compact">
  26659. <dt>&lsquo;<samp>yuv420</samp>&rsquo;</dt>
  26660. <dd><p>force YUV420 output
  26661. </p>
  26662. </dd>
  26663. <dt>&lsquo;<samp>yuv422</samp>&rsquo;</dt>
  26664. <dd><p>force YUV422 output
  26665. </p>
  26666. </dd>
  26667. <dt>&lsquo;<samp>yuv444</samp>&rsquo;</dt>
  26668. <dd><p>force YUV444 output
  26669. </p>
  26670. </dd>
  26671. <dt>&lsquo;<samp>rgb</samp>&rsquo;</dt>
  26672. <dd><p>force packed RGB output
  26673. </p>
  26674. </dd>
  26675. <dt>&lsquo;<samp>gbrp</samp>&rsquo;</dt>
  26676. <dd><p>force planar RGB output
  26677. </p>
  26678. </dd>
  26679. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  26680. <dd><p>automatically pick format
  26681. </p></dd>
  26682. </dl>
  26683. <p>Default value is &lsquo;<samp>yuv420</samp>&rsquo;.
  26684. </p>
  26685. </dd>
  26686. <dt>&lsquo;<samp>repeatlast</samp>&rsquo;</dt>
  26687. <dd><p>See <a href="#framesync">framesync</a>.
  26688. </p>
  26689. </dd>
  26690. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  26691. <dd><p>Set format of alpha of the overlaid video, it can be <var>straight</var> or
  26692. <var>premultiplied</var>. Default is <var>straight</var>.
  26693. </p></dd>
  26694. </dl>
  26695. <p>The &lsquo;<samp>x</samp>&rsquo;, and &lsquo;<samp>y</samp>&rsquo; expressions can contain the following
  26696. parameters.
  26697. </p>
  26698. <dl compact="compact">
  26699. <dt>&lsquo;<samp>main_w, W</samp>&rsquo;</dt>
  26700. <dt>&lsquo;<samp>main_h, H</samp>&rsquo;</dt>
  26701. <dd><p>The main input width and height.
  26702. </p>
  26703. </dd>
  26704. <dt>&lsquo;<samp>overlay_w, w</samp>&rsquo;</dt>
  26705. <dt>&lsquo;<samp>overlay_h, h</samp>&rsquo;</dt>
  26706. <dd><p>The overlay input width and height.
  26707. </p>
  26708. </dd>
  26709. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  26710. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  26711. <dd><p>The computed values for <var>x</var> and <var>y</var>. They are evaluated for
  26712. each new frame.
  26713. </p>
  26714. </dd>
  26715. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  26716. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  26717. <dd><p>horizontal and vertical chroma subsample values of the output
  26718. format. For example for the pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and
  26719. <var>vsub</var> is 1.
  26720. </p>
  26721. </dd>
  26722. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  26723. <dd><p>the number of input frame, starting from 0
  26724. </p>
  26725. </dd>
  26726. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  26727. <dd><p>the position in the file of the input frame, NAN if unknown
  26728. </p>
  26729. </dd>
  26730. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  26731. <dd><p>The timestamp, expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  26732. </p>
  26733. </dd>
  26734. </dl>
  26735. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  26736. </p>
  26737. <p>Note that the <var>n</var>, <var>pos</var>, <var>t</var> variables are available only
  26738. when evaluation is done <em>per frame</em>, and will evaluate to NAN
  26739. when &lsquo;<samp>eval</samp>&rsquo; is set to &lsquo;<samp>init</samp>&rsquo;.
  26740. </p>
  26741. <p>Be aware that frames are taken from each input video in timestamp
  26742. order, hence, if their initial timestamps differ, it is a good idea
  26743. to pass the two inputs through a <var>setpts=PTS-STARTPTS</var> filter to
  26744. have them begin in the same zero timestamp, as the example for
  26745. the <var>movie</var> filter does.
  26746. </p>
  26747. <p>You can chain together more overlays but you should test the
  26748. efficiency of such approach.
  26749. </p>
  26750. <a name="Commands-21"></a>
  26751. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-21">30.144.1 Commands</a></h3>
  26752. <p>This filter supports the following commands:
  26753. </p><dl compact="compact">
  26754. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  26755. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  26756. <dd><p>Modify the x and y of the overlay input.
  26757. The command accepts the same syntax of the corresponding option.
  26758. </p>
  26759. <p>If the specified expression is not valid, it is kept at its current
  26760. value.
  26761. </p></dd>
  26762. </dl>
  26763. <a name="Examples-40"></a>
  26764. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-40">30.144.2 Examples</a></h3>
  26765. <ul>
  26766. <li>
  26767. Draw the overlay at 10 pixels from the bottom right corner of the main
  26768. video:
  26769. <div class="example">
  26770. <pre class="example">overlay=main_w-overlay_w-10:main_h-overlay_h-10
  26771. </pre></div>
  26772. <p>Using named options the example above becomes:
  26773. </p><div class="example">
  26774. <pre class="example">overlay=x=main_w-overlay_w-10:y=main_h-overlay_h-10
  26775. </pre></div>
  26776. </li><li>
  26777. Insert a transparent PNG logo in the bottom left corner of the input,
  26778. using the <code>ffmpeg</code> tool with the <code>-filter_complex</code> option:
  26779. <div class="example">
  26780. <pre class="example">ffmpeg -i input -i logo -filter_complex 'overlay=10:main_h-overlay_h-10' output
  26781. </pre></div>
  26782. </li><li>
  26783. Insert 2 different transparent PNG logos (second logo on bottom
  26784. right corner) using the <code>ffmpeg</code> tool:
  26785. <div class="example">
  26786. <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
  26787. </pre></div>
  26788. </li><li>
  26789. Add a transparent color layer on top of the main video; <code>WxH</code>
  26790. must specify the size of the main input to the overlay filter:
  26791. <div class="example">
  26792. <pre class="example">color=color=red@.3:size=WxH [over]; [in][over] overlay [out]
  26793. </pre></div>
  26794. </li><li>
  26795. Play an original video and a filtered version (here with the deshake
  26796. filter) side by side using the <code>ffplay</code> tool:
  26797. <div class="example">
  26798. <pre class="example">ffplay input.avi -vf 'split[a][b]; [a]pad=iw*2:ih[src]; [b]deshake[filt]; [src][filt]overlay=w'
  26799. </pre></div>
  26800. <p>The above command is the same as:
  26801. </p><div class="example">
  26802. <pre class="example">ffplay input.avi -vf 'split[b], pad=iw*2[src], [b]deshake, [src]overlay=w'
  26803. </pre></div>
  26804. </li><li>
  26805. Make a sliding overlay appearing from the left to the right top part of the
  26806. screen starting since time 2:
  26807. <div class="example">
  26808. <pre class="example">overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0
  26809. </pre></div>
  26810. </li><li>
  26811. Compose output by putting two input videos side to side:
  26812. <div class="example">
  26813. <pre class="example">ffmpeg -i left.avi -i right.avi -filter_complex &quot;
  26814. nullsrc=size=200x100 [background];
  26815. [0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
  26816. [1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
  26817. [background][left] overlay=shortest=1 [background+left];
  26818. [background+left][right] overlay=shortest=1:x=100 [left+right]
  26819. &quot;
  26820. </pre></div>
  26821. </li><li>
  26822. Mask 10-20 seconds of a video by applying the delogo filter to a section
  26823. <div class="example">
  26824. <pre class="example">ffmpeg -i test.avi -codec:v:0 wmv2 -ar 11025 -b:v 9000k
  26825. -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]'
  26826. masked.avi
  26827. </pre></div>
  26828. </li><li>
  26829. Chain several overlays in cascade:
  26830. <div class="example">
  26831. <pre class="example">nullsrc=s=200x200 [bg];
  26832. testsrc=s=100x100, split=4 [in0][in1][in2][in3];
  26833. [in0] lutrgb=r=0, [bg] overlay=0:0 [mid0];
  26834. [in1] lutrgb=g=0, [mid0] overlay=100:0 [mid1];
  26835. [in2] lutrgb=b=0, [mid1] overlay=0:100 [mid2];
  26836. [in3] null, [mid2] overlay=100:100 [out0]
  26837. </pre></div>
  26838. </li></ul>
  26839. <a name="owdenoise"></a>
  26840. <h2 class="section"><a href="ffplay-all.html#toc-owdenoise">30.145 owdenoise</a></h2>
  26841. <p>Apply Overcomplete Wavelet denoiser.
  26842. </p>
  26843. <p>The filter accepts the following options:
  26844. </p>
  26845. <dl compact="compact">
  26846. <dt>&lsquo;<samp>depth</samp>&rsquo;</dt>
  26847. <dd><p>Set depth.
  26848. </p>
  26849. <p>Larger depth values will denoise lower frequency components more, but
  26850. slow down filtering.
  26851. </p>
  26852. <p>Must be an int in the range 8-16, default is <code>8</code>.
  26853. </p>
  26854. </dd>
  26855. <dt>&lsquo;<samp>luma_strength, ls</samp>&rsquo;</dt>
  26856. <dd><p>Set luma strength.
  26857. </p>
  26858. <p>Must be a double value in the range 0-1000, default is <code>1.0</code>.
  26859. </p>
  26860. </dd>
  26861. <dt>&lsquo;<samp>chroma_strength, cs</samp>&rsquo;</dt>
  26862. <dd><p>Set chroma strength.
  26863. </p>
  26864. <p>Must be a double value in the range 0-1000, default is <code>1.0</code>.
  26865. </p></dd>
  26866. </dl>
  26867. <p><a name="pad"></a>
  26868. </p><a name="pad-1"></a>
  26869. <h2 class="section"><a href="ffplay-all.html#toc-pad-1">30.146 pad</a></h2>
  26870. <p>Add paddings to the input image, and place the original input at the
  26871. provided <var>x</var>, <var>y</var> coordinates.
  26872. </p>
  26873. <p>It accepts the following parameters:
  26874. </p>
  26875. <dl compact="compact">
  26876. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  26877. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  26878. <dd><p>Specify an expression for the size of the output image with the
  26879. paddings added. If the value for <var>width</var> or <var>height</var> is 0, the
  26880. corresponding input size is used for the output.
  26881. </p>
  26882. <p>The <var>width</var> expression can reference the value set by the
  26883. <var>height</var> expression, and vice versa.
  26884. </p>
  26885. <p>The default value of <var>width</var> and <var>height</var> is 0.
  26886. </p>
  26887. </dd>
  26888. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  26889. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  26890. <dd><p>Specify the offsets to place the input image at within the padded area,
  26891. with respect to the top/left border of the output image.
  26892. </p>
  26893. <p>The <var>x</var> expression can reference the value set by the <var>y</var>
  26894. expression, and vice versa.
  26895. </p>
  26896. <p>The default value of <var>x</var> and <var>y</var> is 0.
  26897. </p>
  26898. <p>If <var>x</var> or <var>y</var> evaluate to a negative number, they&rsquo;ll be changed
  26899. so the input image is centered on the padded area.
  26900. </p>
  26901. </dd>
  26902. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  26903. <dd><p>Specify the color of the padded area. For the syntax of this option,
  26904. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  26905. </p>
  26906. <p>The default value of <var>color</var> is &quot;black&quot;.
  26907. </p>
  26908. </dd>
  26909. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  26910. <dd><p>Specify when to evaluate <var>width</var>, <var>height</var>, <var>x</var> and <var>y</var> expression.
  26911. </p>
  26912. <p>It accepts the following values:
  26913. </p>
  26914. <dl compact="compact">
  26915. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  26916. <dd><p>Only evaluate expressions once during the filter initialization or when
  26917. a command is processed.
  26918. </p>
  26919. </dd>
  26920. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  26921. <dd><p>Evaluate expressions for each incoming frame.
  26922. </p>
  26923. </dd>
  26924. </dl>
  26925. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  26926. </p>
  26927. </dd>
  26928. <dt>&lsquo;<samp>aspect</samp>&rsquo;</dt>
  26929. <dd><p>Pad to aspect instead to a resolution.
  26930. </p>
  26931. </dd>
  26932. </dl>
  26933. <p>The value for the <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var>
  26934. options are expressions containing the following constants:
  26935. </p>
  26936. <dl compact="compact">
  26937. <dt>&lsquo;<samp>in_w</samp>&rsquo;</dt>
  26938. <dt>&lsquo;<samp>in_h</samp>&rsquo;</dt>
  26939. <dd><p>The input video width and height.
  26940. </p>
  26941. </dd>
  26942. <dt>&lsquo;<samp>iw</samp>&rsquo;</dt>
  26943. <dt>&lsquo;<samp>ih</samp>&rsquo;</dt>
  26944. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  26945. </p>
  26946. </dd>
  26947. <dt>&lsquo;<samp>out_w</samp>&rsquo;</dt>
  26948. <dt>&lsquo;<samp>out_h</samp>&rsquo;</dt>
  26949. <dd><p>The output width and height (the size of the padded area), as
  26950. specified by the <var>width</var> and <var>height</var> expressions.
  26951. </p>
  26952. </dd>
  26953. <dt>&lsquo;<samp>ow</samp>&rsquo;</dt>
  26954. <dt>&lsquo;<samp>oh</samp>&rsquo;</dt>
  26955. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>.
  26956. </p>
  26957. </dd>
  26958. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  26959. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  26960. <dd><p>The x and y offsets as specified by the <var>x</var> and <var>y</var>
  26961. expressions, or NAN if not yet specified.
  26962. </p>
  26963. </dd>
  26964. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  26965. <dd><p>same as <var>iw</var> / <var>ih</var>
  26966. </p>
  26967. </dd>
  26968. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  26969. <dd><p>input sample aspect ratio
  26970. </p>
  26971. </dd>
  26972. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  26973. <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
  26974. </p>
  26975. </dd>
  26976. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  26977. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  26978. <dd><p>The horizontal and vertical chroma subsample values. For example for the
  26979. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  26980. </p></dd>
  26981. </dl>
  26982. <a name="Examples-113"></a>
  26983. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-113">30.146.1 Examples</a></h3>
  26984. <ul>
  26985. <li>
  26986. Add paddings with the color &quot;violet&quot; to the input video. The output video
  26987. size is 640x480, and the top-left corner of the input video is placed at
  26988. column 0, row 40
  26989. <div class="example">
  26990. <pre class="example">pad=640:480:0:40:violet
  26991. </pre></div>
  26992. <p>The example above is equivalent to the following command:
  26993. </p><div class="example">
  26994. <pre class="example">pad=width=640:height=480:x=0:y=40:color=violet
  26995. </pre></div>
  26996. </li><li>
  26997. Pad the input to get an output with dimensions increased by 3/2,
  26998. and put the input video at the center of the padded area:
  26999. <div class="example">
  27000. <pre class="example">pad=&quot;3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2&quot;
  27001. </pre></div>
  27002. </li><li>
  27003. Pad the input to get a squared output with size equal to the maximum
  27004. value between the input width and height, and put the input video at
  27005. the center of the padded area:
  27006. <div class="example">
  27007. <pre class="example">pad=&quot;max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2&quot;
  27008. </pre></div>
  27009. </li><li>
  27010. Pad the input to get a final w/h ratio of 16:9:
  27011. <div class="example">
  27012. <pre class="example">pad=&quot;ih*16/9:ih:(ow-iw)/2:(oh-ih)/2&quot;
  27013. </pre></div>
  27014. </li><li>
  27015. In case of anamorphic video, in order to set the output display aspect
  27016. correctly, it is necessary to use <var>sar</var> in the expression,
  27017. according to the relation:
  27018. <div class="example">
  27019. <pre class="example">(ih * X / ih) * sar = output_dar
  27020. X = output_dar / sar
  27021. </pre></div>
  27022. <p>Thus the previous example needs to be modified to:
  27023. </p><div class="example">
  27024. <pre class="example">pad=&quot;ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2&quot;
  27025. </pre></div>
  27026. </li><li>
  27027. Double the output size and put the input video in the bottom-right
  27028. corner of the output padded area:
  27029. <div class="example">
  27030. <pre class="example">pad=&quot;2*iw:2*ih:ow-iw:oh-ih&quot;
  27031. </pre></div>
  27032. </li></ul>
  27033. <p><a name="palettegen"></a>
  27034. </p><a name="palettegen-1"></a>
  27035. <h2 class="section"><a href="ffplay-all.html#toc-palettegen-1">30.147 palettegen</a></h2>
  27036. <p>Generate one palette for a whole video stream.
  27037. </p>
  27038. <p>It accepts the following options:
  27039. </p>
  27040. <dl compact="compact">
  27041. <dt>&lsquo;<samp>max_colors</samp>&rsquo;</dt>
  27042. <dd><p>Set the maximum number of colors to quantize in the palette.
  27043. Note: the palette will still contain 256 colors; the unused palette entries
  27044. will be black.
  27045. </p>
  27046. </dd>
  27047. <dt>&lsquo;<samp>reserve_transparent</samp>&rsquo;</dt>
  27048. <dd><p>Create a palette of 255 colors maximum and reserve the last one for
  27049. transparency. Reserving the transparency color is useful for GIF optimization.
  27050. If not set, the maximum of colors in the palette will be 256. You probably want
  27051. to disable this option for a standalone image.
  27052. Set by default.
  27053. </p>
  27054. </dd>
  27055. <dt>&lsquo;<samp>transparency_color</samp>&rsquo;</dt>
  27056. <dd><p>Set the color that will be used as background for transparency.
  27057. </p>
  27058. </dd>
  27059. <dt>&lsquo;<samp>stats_mode</samp>&rsquo;</dt>
  27060. <dd><p>Set statistics mode.
  27061. </p>
  27062. <p>It accepts the following values:
  27063. </p><dl compact="compact">
  27064. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  27065. <dd><p>Compute full frame histograms.
  27066. </p></dd>
  27067. <dt>&lsquo;<samp>diff</samp>&rsquo;</dt>
  27068. <dd><p>Compute histograms only for the part that differs from previous frame. This
  27069. might be relevant to give more importance to the moving part of your input if
  27070. the background is static.
  27071. </p></dd>
  27072. <dt>&lsquo;<samp>single</samp>&rsquo;</dt>
  27073. <dd><p>Compute new histogram for each frame.
  27074. </p></dd>
  27075. </dl>
  27076. <p>Default value is <var>full</var>.
  27077. </p></dd>
  27078. </dl>
  27079. <p>The filter also exports the frame metadata <code>lavfi.color_quant_ratio</code>
  27080. (<code>nb_color_in / nb_color_out</code>) which you can use to evaluate the degree of
  27081. color quantization of the palette. This information is also visible at
  27082. <var>info</var> logging level.
  27083. </p>
  27084. <a name="Examples-125"></a>
  27085. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-125">30.147.1 Examples</a></h3>
  27086. <ul>
  27087. <li>
  27088. Generate a representative palette of a given video using <code>ffmpeg</code>:
  27089. <div class="example">
  27090. <pre class="example">ffmpeg -i input.mkv -vf palettegen palette.png
  27091. </pre></div>
  27092. </li></ul>
  27093. <a name="paletteuse"></a>
  27094. <h2 class="section"><a href="ffplay-all.html#toc-paletteuse">30.148 paletteuse</a></h2>
  27095. <p>Use a palette to downsample an input video stream.
  27096. </p>
  27097. <p>The filter takes two inputs: one video stream and a palette. The palette must
  27098. be a 256 pixels image.
  27099. </p>
  27100. <p>It accepts the following options:
  27101. </p>
  27102. <dl compact="compact">
  27103. <dt>&lsquo;<samp>dither</samp>&rsquo;</dt>
  27104. <dd><p>Select dithering mode. Available algorithms are:
  27105. </p><dl compact="compact">
  27106. <dt>&lsquo;<samp>bayer</samp>&rsquo;</dt>
  27107. <dd><p>Ordered 8x8 bayer dithering (deterministic)
  27108. </p></dd>
  27109. <dt>&lsquo;<samp>heckbert</samp>&rsquo;</dt>
  27110. <dd><p>Dithering as defined by Paul Heckbert in 1982 (simple error diffusion).
  27111. Note: this dithering is sometimes considered &quot;wrong&quot; and is included as a
  27112. reference.
  27113. </p></dd>
  27114. <dt>&lsquo;<samp>floyd_steinberg</samp>&rsquo;</dt>
  27115. <dd><p>Floyd and Steingberg dithering (error diffusion)
  27116. </p></dd>
  27117. <dt>&lsquo;<samp>sierra2</samp>&rsquo;</dt>
  27118. <dd><p>Frankie Sierra dithering v2 (error diffusion)
  27119. </p></dd>
  27120. <dt>&lsquo;<samp>sierra2_4a</samp>&rsquo;</dt>
  27121. <dd><p>Frankie Sierra dithering v2 &quot;Lite&quot; (error diffusion)
  27122. </p></dd>
  27123. </dl>
  27124. <p>Default is <var>sierra2_4a</var>.
  27125. </p>
  27126. </dd>
  27127. <dt>&lsquo;<samp>bayer_scale</samp>&rsquo;</dt>
  27128. <dd><p>When <var>bayer</var> dithering is selected, this option defines the scale of the
  27129. pattern (how much the crosshatch pattern is visible). A low value means more
  27130. visible pattern for less banding, and higher value means less visible pattern
  27131. at the cost of more banding.
  27132. </p>
  27133. <p>The option must be an integer value in the range [0,5]. Default is <var>2</var>.
  27134. </p>
  27135. </dd>
  27136. <dt>&lsquo;<samp>diff_mode</samp>&rsquo;</dt>
  27137. <dd><p>If set, define the zone to process
  27138. </p>
  27139. <dl compact="compact">
  27140. <dt>&lsquo;<samp>rectangle</samp>&rsquo;</dt>
  27141. <dd><p>Only the changing rectangle will be reprocessed. This is similar to GIF
  27142. cropping/offsetting compression mechanism. This option can be useful for speed
  27143. if only a part of the image is changing, and has use cases such as limiting the
  27144. scope of the error diffusal &lsquo;<samp>dither</samp>&rsquo; to the rectangle that bounds the
  27145. moving scene (it leads to more deterministic output if the scene doesn&rsquo;t change
  27146. much, and as a result less moving noise and better GIF compression).
  27147. </p></dd>
  27148. </dl>
  27149. <p>Default is <var>none</var>.
  27150. </p>
  27151. </dd>
  27152. <dt>&lsquo;<samp>new</samp>&rsquo;</dt>
  27153. <dd><p>Take new palette for each output frame.
  27154. </p>
  27155. </dd>
  27156. <dt>&lsquo;<samp>alpha_threshold</samp>&rsquo;</dt>
  27157. <dd><p>Sets the alpha threshold for transparency. Alpha values above this threshold
  27158. will be treated as completely opaque, and values below this threshold will be
  27159. treated as completely transparent.
  27160. </p>
  27161. <p>The option must be an integer value in the range [0,255]. Default is <var>128</var>.
  27162. </p></dd>
  27163. </dl>
  27164. <a name="Examples-6"></a>
  27165. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-6">30.148.1 Examples</a></h3>
  27166. <ul>
  27167. <li>
  27168. Use a palette (generated for example with <a href="#palettegen">palettegen</a>) to encode a GIF
  27169. using <code>ffmpeg</code>:
  27170. <div class="example">
  27171. <pre class="example">ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif
  27172. </pre></div>
  27173. </li></ul>
  27174. <a name="perspective"></a>
  27175. <h2 class="section"><a href="ffplay-all.html#toc-perspective">30.149 perspective</a></h2>
  27176. <p>Correct perspective of video not recorded perpendicular to the screen.
  27177. </p>
  27178. <p>A description of the accepted parameters follows.
  27179. </p>
  27180. <dl compact="compact">
  27181. <dt>&lsquo;<samp>x0</samp>&rsquo;</dt>
  27182. <dt>&lsquo;<samp>y0</samp>&rsquo;</dt>
  27183. <dt>&lsquo;<samp>x1</samp>&rsquo;</dt>
  27184. <dt>&lsquo;<samp>y1</samp>&rsquo;</dt>
  27185. <dt>&lsquo;<samp>x2</samp>&rsquo;</dt>
  27186. <dt>&lsquo;<samp>y2</samp>&rsquo;</dt>
  27187. <dt>&lsquo;<samp>x3</samp>&rsquo;</dt>
  27188. <dt>&lsquo;<samp>y3</samp>&rsquo;</dt>
  27189. <dd><p>Set coordinates expression for top left, top right, bottom left and bottom right corners.
  27190. Default values are <code>0:0:W:0:0:H:W:H</code> with which perspective will remain unchanged.
  27191. If the <code>sense</code> option is set to <code>source</code>, then the specified points will be sent
  27192. to the corners of the destination. If the <code>sense</code> option is set to <code>destination</code>,
  27193. then the corners of the source will be sent to the specified coordinates.
  27194. </p>
  27195. <p>The expressions can use the following variables:
  27196. </p>
  27197. <dl compact="compact">
  27198. <dt>&lsquo;<samp>W</samp>&rsquo;</dt>
  27199. <dt>&lsquo;<samp>H</samp>&rsquo;</dt>
  27200. <dd><p>the width and height of video frame.
  27201. </p></dd>
  27202. <dt>&lsquo;<samp>in</samp>&rsquo;</dt>
  27203. <dd><p>Input frame count.
  27204. </p></dd>
  27205. <dt>&lsquo;<samp>on</samp>&rsquo;</dt>
  27206. <dd><p>Output frame count.
  27207. </p></dd>
  27208. </dl>
  27209. </dd>
  27210. <dt>&lsquo;<samp>interpolation</samp>&rsquo;</dt>
  27211. <dd><p>Set interpolation for perspective correction.
  27212. </p>
  27213. <p>It accepts the following values:
  27214. </p><dl compact="compact">
  27215. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  27216. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  27217. </dl>
  27218. <p>Default value is &lsquo;<samp>linear</samp>&rsquo;.
  27219. </p>
  27220. </dd>
  27221. <dt>&lsquo;<samp>sense</samp>&rsquo;</dt>
  27222. <dd><p>Set interpretation of coordinate options.
  27223. </p>
  27224. <p>It accepts the following values:
  27225. </p><dl compact="compact">
  27226. <dt>&lsquo;<samp>0, source</samp>&rsquo;</dt>
  27227. <dd>
  27228. <p>Send point in the source specified by the given coordinates to
  27229. the corners of the destination.
  27230. </p>
  27231. </dd>
  27232. <dt>&lsquo;<samp>1, destination</samp>&rsquo;</dt>
  27233. <dd>
  27234. <p>Send the corners of the source to the point in the destination specified
  27235. by the given coordinates.
  27236. </p>
  27237. <p>Default value is &lsquo;<samp>source</samp>&rsquo;.
  27238. </p></dd>
  27239. </dl>
  27240. </dd>
  27241. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  27242. <dd><p>Set when the expressions for coordinates &lsquo;<samp>x0,y0,...x3,y3</samp>&rsquo; are evaluated.
  27243. </p>
  27244. <p>It accepts the following values:
  27245. </p><dl compact="compact">
  27246. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  27247. <dd><p>only evaluate expressions once during the filter initialization or
  27248. when a command is processed
  27249. </p>
  27250. </dd>
  27251. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  27252. <dd><p>evaluate expressions for each incoming frame
  27253. </p></dd>
  27254. </dl>
  27255. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  27256. </p></dd>
  27257. </dl>
  27258. <a name="phase"></a>
  27259. <h2 class="section"><a href="ffplay-all.html#toc-phase">30.150 phase</a></h2>
  27260. <p>Delay interlaced video by one field time so that the field order changes.
  27261. </p>
  27262. <p>The intended use is to fix PAL movies that have been captured with the
  27263. opposite field order to the film-to-video transfer.
  27264. </p>
  27265. <p>A description of the accepted parameters follows.
  27266. </p>
  27267. <dl compact="compact">
  27268. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  27269. <dd><p>Set phase mode.
  27270. </p>
  27271. <p>It accepts the following values:
  27272. </p><dl compact="compact">
  27273. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  27274. <dd><p>Capture field order top-first, transfer bottom-first.
  27275. Filter will delay the bottom field.
  27276. </p>
  27277. </dd>
  27278. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  27279. <dd><p>Capture field order bottom-first, transfer top-first.
  27280. Filter will delay the top field.
  27281. </p>
  27282. </dd>
  27283. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  27284. <dd><p>Capture and transfer with the same field order. This mode only exists
  27285. for the documentation of the other options to refer to, but if you
  27286. actually select it, the filter will faithfully do nothing.
  27287. </p>
  27288. </dd>
  27289. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  27290. <dd><p>Capture field order determined automatically by field flags, transfer
  27291. opposite.
  27292. Filter selects among &lsquo;<samp>t</samp>&rsquo; and &lsquo;<samp>b</samp>&rsquo; modes on a frame by frame
  27293. basis using field flags. If no field information is available,
  27294. then this works just like &lsquo;<samp>u</samp>&rsquo;.
  27295. </p>
  27296. </dd>
  27297. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  27298. <dd><p>Capture unknown or varying, transfer opposite.
  27299. Filter selects among &lsquo;<samp>t</samp>&rsquo; and &lsquo;<samp>b</samp>&rsquo; on a frame by frame basis by
  27300. analyzing the images and selecting the alternative that produces best
  27301. match between the fields.
  27302. </p>
  27303. </dd>
  27304. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  27305. <dd><p>Capture top-first, transfer unknown or varying.
  27306. Filter selects among &lsquo;<samp>t</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using image analysis.
  27307. </p>
  27308. </dd>
  27309. <dt>&lsquo;<samp>B</samp>&rsquo;</dt>
  27310. <dd><p>Capture bottom-first, transfer unknown or varying.
  27311. Filter selects among &lsquo;<samp>b</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using image analysis.
  27312. </p>
  27313. </dd>
  27314. <dt>&lsquo;<samp>A</samp>&rsquo;</dt>
  27315. <dd><p>Capture determined by field flags, transfer unknown or varying.
  27316. Filter selects among &lsquo;<samp>t</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using field flags and
  27317. image analysis. If no field information is available, then this works just
  27318. like &lsquo;<samp>U</samp>&rsquo;. This is the default mode.
  27319. </p>
  27320. </dd>
  27321. <dt>&lsquo;<samp>U</samp>&rsquo;</dt>
  27322. <dd><p>Both capture and transfer unknown or varying.
  27323. Filter selects among &lsquo;<samp>t</samp>&rsquo;, &lsquo;<samp>b</samp>&rsquo; and &lsquo;<samp>p</samp>&rsquo; using image analysis only.
  27324. </p></dd>
  27325. </dl>
  27326. </dd>
  27327. </dl>
  27328. <a name="photosensitivity"></a>
  27329. <h2 class="section"><a href="ffplay-all.html#toc-photosensitivity">30.151 photosensitivity</a></h2>
  27330. <p>Reduce various flashes in video, so to help users with epilepsy.
  27331. </p>
  27332. <p>It accepts the following options:
  27333. </p><dl compact="compact">
  27334. <dt>&lsquo;<samp>frames, f</samp>&rsquo;</dt>
  27335. <dd><p>Set how many frames to use when filtering. Default is 30.
  27336. </p>
  27337. </dd>
  27338. <dt>&lsquo;<samp>threshold, t</samp>&rsquo;</dt>
  27339. <dd><p>Set detection threshold factor. Default is 1.
  27340. Lower is stricter.
  27341. </p>
  27342. </dd>
  27343. <dt>&lsquo;<samp>skip</samp>&rsquo;</dt>
  27344. <dd><p>Set how many pixels to skip when sampling frames. Default is 1.
  27345. Allowed range is from 1 to 1024.
  27346. </p>
  27347. </dd>
  27348. <dt>&lsquo;<samp>bypass</samp>&rsquo;</dt>
  27349. <dd><p>Leave frames unchanged. Default is disabled.
  27350. </p></dd>
  27351. </dl>
  27352. <a name="pixdesctest"></a>
  27353. <h2 class="section"><a href="ffplay-all.html#toc-pixdesctest">30.152 pixdesctest</a></h2>
  27354. <p>Pixel format descriptor test filter, mainly useful for internal
  27355. testing. The output video should be equal to the input video.
  27356. </p>
  27357. <p>For example:
  27358. </p><div class="example">
  27359. <pre class="example">format=monow, pixdesctest
  27360. </pre></div>
  27361. <p>can be used to test the monowhite pixel format descriptor definition.
  27362. </p>
  27363. <a name="pixscope"></a>
  27364. <h2 class="section"><a href="ffplay-all.html#toc-pixscope">30.153 pixscope</a></h2>
  27365. <p>Display sample values of color channels. Mainly useful for checking color
  27366. and levels. Minimum supported resolution is 640x480.
  27367. </p>
  27368. <p>The filters accept the following options:
  27369. </p>
  27370. <dl compact="compact">
  27371. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  27372. <dd><p>Set scope X position, relative offset on X axis.
  27373. </p>
  27374. </dd>
  27375. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  27376. <dd><p>Set scope Y position, relative offset on Y axis.
  27377. </p>
  27378. </dd>
  27379. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  27380. <dd><p>Set scope width.
  27381. </p>
  27382. </dd>
  27383. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  27384. <dd><p>Set scope height.
  27385. </p>
  27386. </dd>
  27387. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  27388. <dd><p>Set window opacity. This window also holds statistics about pixel area.
  27389. </p>
  27390. </dd>
  27391. <dt>&lsquo;<samp>wx</samp>&rsquo;</dt>
  27392. <dd><p>Set window X position, relative offset on X axis.
  27393. </p>
  27394. </dd>
  27395. <dt>&lsquo;<samp>wy</samp>&rsquo;</dt>
  27396. <dd><p>Set window Y position, relative offset on Y axis.
  27397. </p></dd>
  27398. </dl>
  27399. <a name="pp"></a>
  27400. <h2 class="section"><a href="ffplay-all.html#toc-pp">30.154 pp</a></h2>
  27401. <p>Enable the specified chain of postprocessing subfilters using libpostproc. This
  27402. library should be automatically selected with a GPL build (<code>--enable-gpl</code>).
  27403. Subfilters must be separated by &rsquo;/&rsquo; and can be disabled by prepending a &rsquo;-&rsquo;.
  27404. Each subfilter and some options have a short and a long name that can be used
  27405. interchangeably, i.e. dr/dering are the same.
  27406. </p>
  27407. <p>The filters accept the following options:
  27408. </p>
  27409. <dl compact="compact">
  27410. <dt>&lsquo;<samp>subfilters</samp>&rsquo;</dt>
  27411. <dd><p>Set postprocessing subfilters string.
  27412. </p></dd>
  27413. </dl>
  27414. <p>All subfilters share common options to determine their scope:
  27415. </p>
  27416. <dl compact="compact">
  27417. <dt>&lsquo;<samp>a/autoq</samp>&rsquo;</dt>
  27418. <dd><p>Honor the quality commands for this subfilter.
  27419. </p>
  27420. </dd>
  27421. <dt>&lsquo;<samp>c/chrom</samp>&rsquo;</dt>
  27422. <dd><p>Do chrominance filtering, too (default).
  27423. </p>
  27424. </dd>
  27425. <dt>&lsquo;<samp>y/nochrom</samp>&rsquo;</dt>
  27426. <dd><p>Do luminance filtering only (no chrominance).
  27427. </p>
  27428. </dd>
  27429. <dt>&lsquo;<samp>n/noluma</samp>&rsquo;</dt>
  27430. <dd><p>Do chrominance filtering only (no luminance).
  27431. </p></dd>
  27432. </dl>
  27433. <p>These options can be appended after the subfilter name, separated by a &rsquo;|&rsquo;.
  27434. </p>
  27435. <p>Available subfilters are:
  27436. </p>
  27437. <dl compact="compact">
  27438. <dt>&lsquo;<samp>hb/hdeblock[|difference[|flatness]]</samp>&rsquo;</dt>
  27439. <dd><p>Horizontal deblocking filter
  27440. </p><dl compact="compact">
  27441. <dt>&lsquo;<samp>difference</samp>&rsquo;</dt>
  27442. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  27443. </p></dd>
  27444. <dt>&lsquo;<samp>flatness</samp>&rsquo;</dt>
  27445. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  27446. </p></dd>
  27447. </dl>
  27448. </dd>
  27449. <dt>&lsquo;<samp>vb/vdeblock[|difference[|flatness]]</samp>&rsquo;</dt>
  27450. <dd><p>Vertical deblocking filter
  27451. </p><dl compact="compact">
  27452. <dt>&lsquo;<samp>difference</samp>&rsquo;</dt>
  27453. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  27454. </p></dd>
  27455. <dt>&lsquo;<samp>flatness</samp>&rsquo;</dt>
  27456. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  27457. </p></dd>
  27458. </dl>
  27459. </dd>
  27460. <dt>&lsquo;<samp>ha/hadeblock[|difference[|flatness]]</samp>&rsquo;</dt>
  27461. <dd><p>Accurate horizontal deblocking filter
  27462. </p><dl compact="compact">
  27463. <dt>&lsquo;<samp>difference</samp>&rsquo;</dt>
  27464. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  27465. </p></dd>
  27466. <dt>&lsquo;<samp>flatness</samp>&rsquo;</dt>
  27467. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  27468. </p></dd>
  27469. </dl>
  27470. </dd>
  27471. <dt>&lsquo;<samp>va/vadeblock[|difference[|flatness]]</samp>&rsquo;</dt>
  27472. <dd><p>Accurate vertical deblocking filter
  27473. </p><dl compact="compact">
  27474. <dt>&lsquo;<samp>difference</samp>&rsquo;</dt>
  27475. <dd><p>Difference factor where higher values mean more deblocking (default: <code>32</code>).
  27476. </p></dd>
  27477. <dt>&lsquo;<samp>flatness</samp>&rsquo;</dt>
  27478. <dd><p>Flatness threshold where lower values mean more deblocking (default: <code>39</code>).
  27479. </p></dd>
  27480. </dl>
  27481. </dd>
  27482. </dl>
  27483. <p>The horizontal and vertical deblocking filters share the difference and
  27484. flatness values so you cannot set different horizontal and vertical
  27485. thresholds.
  27486. </p>
  27487. <dl compact="compact">
  27488. <dt>&lsquo;<samp>h1/x1hdeblock</samp>&rsquo;</dt>
  27489. <dd><p>Experimental horizontal deblocking filter
  27490. </p>
  27491. </dd>
  27492. <dt>&lsquo;<samp>v1/x1vdeblock</samp>&rsquo;</dt>
  27493. <dd><p>Experimental vertical deblocking filter
  27494. </p>
  27495. </dd>
  27496. <dt>&lsquo;<samp>dr/dering</samp>&rsquo;</dt>
  27497. <dd><p>Deringing filter
  27498. </p>
  27499. </dd>
  27500. <dt>&lsquo;<samp>tn/tmpnoise[|threshold1[|threshold2[|threshold3]]], temporal noise reducer</samp>&rsquo;</dt>
  27501. <dd><dl compact="compact">
  27502. <dt>&lsquo;<samp>threshold1</samp>&rsquo;</dt>
  27503. <dd><p>larger -&gt; stronger filtering
  27504. </p></dd>
  27505. <dt>&lsquo;<samp>threshold2</samp>&rsquo;</dt>
  27506. <dd><p>larger -&gt; stronger filtering
  27507. </p></dd>
  27508. <dt>&lsquo;<samp>threshold3</samp>&rsquo;</dt>
  27509. <dd><p>larger -&gt; stronger filtering
  27510. </p></dd>
  27511. </dl>
  27512. </dd>
  27513. <dt>&lsquo;<samp>al/autolevels[:f/fullyrange], automatic brightness / contrast correction</samp>&rsquo;</dt>
  27514. <dd><dl compact="compact">
  27515. <dt>&lsquo;<samp>f/fullyrange</samp>&rsquo;</dt>
  27516. <dd><p>Stretch luminance to <code>0-255</code>.
  27517. </p></dd>
  27518. </dl>
  27519. </dd>
  27520. <dt>&lsquo;<samp>lb/linblenddeint</samp>&rsquo;</dt>
  27521. <dd><p>Linear blend deinterlacing filter that deinterlaces the given block by
  27522. filtering all lines with a <code>(1 2 1)</code> filter.
  27523. </p>
  27524. </dd>
  27525. <dt>&lsquo;<samp>li/linipoldeint</samp>&rsquo;</dt>
  27526. <dd><p>Linear interpolating deinterlacing filter that deinterlaces the given block by
  27527. linearly interpolating every second line.
  27528. </p>
  27529. </dd>
  27530. <dt>&lsquo;<samp>ci/cubicipoldeint</samp>&rsquo;</dt>
  27531. <dd><p>Cubic interpolating deinterlacing filter deinterlaces the given block by
  27532. cubically interpolating every second line.
  27533. </p>
  27534. </dd>
  27535. <dt>&lsquo;<samp>md/mediandeint</samp>&rsquo;</dt>
  27536. <dd><p>Median deinterlacing filter that deinterlaces the given block by applying a
  27537. median filter to every second line.
  27538. </p>
  27539. </dd>
  27540. <dt>&lsquo;<samp>fd/ffmpegdeint</samp>&rsquo;</dt>
  27541. <dd><p>FFmpeg deinterlacing filter that deinterlaces the given block by filtering every
  27542. second line with a <code>(-1 4 2 4 -1)</code> filter.
  27543. </p>
  27544. </dd>
  27545. <dt>&lsquo;<samp>l5/lowpass5</samp>&rsquo;</dt>
  27546. <dd><p>Vertically applied FIR lowpass deinterlacing filter that deinterlaces the given
  27547. block by filtering all lines with a <code>(-1 2 6 2 -1)</code> filter.
  27548. </p>
  27549. </dd>
  27550. <dt>&lsquo;<samp>fq/forceQuant[|quantizer]</samp>&rsquo;</dt>
  27551. <dd><p>Overrides the quantizer table from the input with the constant quantizer you
  27552. specify.
  27553. </p><dl compact="compact">
  27554. <dt>&lsquo;<samp>quantizer</samp>&rsquo;</dt>
  27555. <dd><p>Quantizer to use
  27556. </p></dd>
  27557. </dl>
  27558. </dd>
  27559. <dt>&lsquo;<samp>de/default</samp>&rsquo;</dt>
  27560. <dd><p>Default pp filter combination (<code>hb|a,vb|a,dr|a</code>)
  27561. </p>
  27562. </dd>
  27563. <dt>&lsquo;<samp>fa/fast</samp>&rsquo;</dt>
  27564. <dd><p>Fast pp filter combination (<code>h1|a,v1|a,dr|a</code>)
  27565. </p>
  27566. </dd>
  27567. <dt>&lsquo;<samp>ac</samp>&rsquo;</dt>
  27568. <dd><p>High quality pp filter combination (<code>ha|a|128|7,va|a,dr|a</code>)
  27569. </p></dd>
  27570. </dl>
  27571. <a name="Examples-26"></a>
  27572. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-26">30.154.1 Examples</a></h3>
  27573. <ul>
  27574. <li>
  27575. Apply horizontal and vertical deblocking, deringing and automatic
  27576. brightness/contrast:
  27577. <div class="example">
  27578. <pre class="example">pp=hb/vb/dr/al
  27579. </pre></div>
  27580. </li><li>
  27581. Apply default filters without brightness/contrast correction:
  27582. <div class="example">
  27583. <pre class="example">pp=de/-al
  27584. </pre></div>
  27585. </li><li>
  27586. Apply default filters and temporal denoiser:
  27587. <div class="example">
  27588. <pre class="example">pp=default/tmpnoise|1|2|3
  27589. </pre></div>
  27590. </li><li>
  27591. Apply deblocking on luminance only, and switch vertical deblocking on or off
  27592. automatically depending on available CPU time:
  27593. <div class="example">
  27594. <pre class="example">pp=hb|y/vb|a
  27595. </pre></div>
  27596. </li></ul>
  27597. <a name="pp7"></a>
  27598. <h2 class="section"><a href="ffplay-all.html#toc-pp7">30.155 pp7</a></h2>
  27599. <p>Apply Postprocessing filter 7. It is variant of the <a href="#spp">spp</a> filter,
  27600. similar to spp = 6 with 7 point DCT, where only the center sample is
  27601. used after IDCT.
  27602. </p>
  27603. <p>The filter accepts the following options:
  27604. </p>
  27605. <dl compact="compact">
  27606. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  27607. <dd><p>Force a constant quantization parameter. It accepts an integer in range
  27608. 0 to 63. If not set, the filter will use the QP from the video stream
  27609. (if available).
  27610. </p>
  27611. </dd>
  27612. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  27613. <dd><p>Set thresholding mode. Available modes are:
  27614. </p>
  27615. <dl compact="compact">
  27616. <dt>&lsquo;<samp>hard</samp>&rsquo;</dt>
  27617. <dd><p>Set hard thresholding.
  27618. </p></dd>
  27619. <dt>&lsquo;<samp>soft</samp>&rsquo;</dt>
  27620. <dd><p>Set soft thresholding (better de-ringing effect, but likely blurrier).
  27621. </p></dd>
  27622. <dt>&lsquo;<samp>medium</samp>&rsquo;</dt>
  27623. <dd><p>Set medium thresholding (good results, default).
  27624. </p></dd>
  27625. </dl>
  27626. </dd>
  27627. </dl>
  27628. <a name="premultiply"></a>
  27629. <h2 class="section"><a href="ffplay-all.html#toc-premultiply">30.156 premultiply</a></h2>
  27630. <p>Apply alpha premultiply effect to input video stream using first plane
  27631. of second stream as alpha.
  27632. </p>
  27633. <p>Both streams must have same dimensions and same pixel format.
  27634. </p>
  27635. <p>The filter accepts the following option:
  27636. </p>
  27637. <dl compact="compact">
  27638. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  27639. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  27640. By default value 0xf, all planes will be processed.
  27641. </p>
  27642. </dd>
  27643. <dt>&lsquo;<samp>inplace</samp>&rsquo;</dt>
  27644. <dd><p>Do not require 2nd input for processing, instead use alpha plane from input stream.
  27645. </p></dd>
  27646. </dl>
  27647. <a name="prewitt"></a>
  27648. <h2 class="section"><a href="ffplay-all.html#toc-prewitt">30.157 prewitt</a></h2>
  27649. <p>Apply prewitt operator to input video stream.
  27650. </p>
  27651. <p>The filter accepts the following option:
  27652. </p>
  27653. <dl compact="compact">
  27654. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  27655. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  27656. By default value 0xf, all planes will be processed.
  27657. </p>
  27658. </dd>
  27659. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  27660. <dd><p>Set value which will be multiplied with filtered result.
  27661. </p>
  27662. </dd>
  27663. <dt>&lsquo;<samp>delta</samp>&rsquo;</dt>
  27664. <dd><p>Set value which will be added to filtered result.
  27665. </p></dd>
  27666. </dl>
  27667. <a name="pseudocolor"></a>
  27668. <h2 class="section"><a href="ffplay-all.html#toc-pseudocolor">30.158 pseudocolor</a></h2>
  27669. <p>Alter frame colors in video with pseudocolors.
  27670. </p>
  27671. <p>This filter accepts the following options:
  27672. </p>
  27673. <dl compact="compact">
  27674. <dt>&lsquo;<samp>c0</samp>&rsquo;</dt>
  27675. <dd><p>set pixel first component expression
  27676. </p>
  27677. </dd>
  27678. <dt>&lsquo;<samp>c1</samp>&rsquo;</dt>
  27679. <dd><p>set pixel second component expression
  27680. </p>
  27681. </dd>
  27682. <dt>&lsquo;<samp>c2</samp>&rsquo;</dt>
  27683. <dd><p>set pixel third component expression
  27684. </p>
  27685. </dd>
  27686. <dt>&lsquo;<samp>c3</samp>&rsquo;</dt>
  27687. <dd><p>set pixel fourth component expression, corresponds to the alpha component
  27688. </p>
  27689. </dd>
  27690. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  27691. <dd><p>set component to use as base for altering colors
  27692. </p></dd>
  27693. </dl>
  27694. <p>Each of them specifies the expression to use for computing the lookup table for
  27695. the corresponding pixel component values.
  27696. </p>
  27697. <p>The expressions can contain the following constants and functions:
  27698. </p>
  27699. <dl compact="compact">
  27700. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  27701. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  27702. <dd><p>The input width and height.
  27703. </p>
  27704. </dd>
  27705. <dt>&lsquo;<samp>val</samp>&rsquo;</dt>
  27706. <dd><p>The input value for the pixel component.
  27707. </p>
  27708. </dd>
  27709. <dt>&lsquo;<samp>ymin, umin, vmin, amin</samp>&rsquo;</dt>
  27710. <dd><p>The minimum allowed component value.
  27711. </p>
  27712. </dd>
  27713. <dt>&lsquo;<samp>ymax, umax, vmax, amax</samp>&rsquo;</dt>
  27714. <dd><p>The maximum allowed component value.
  27715. </p></dd>
  27716. </dl>
  27717. <p>All expressions default to &quot;val&quot;.
  27718. </p>
  27719. <a name="Examples-147"></a>
  27720. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-147">30.158.1 Examples</a></h3>
  27721. <ul>
  27722. <li>
  27723. Change too high luma values to gradient:
  27724. <div class="example">
  27725. <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;
  27726. </pre></div>
  27727. </li></ul>
  27728. <a name="psnr"></a>
  27729. <h2 class="section"><a href="ffplay-all.html#toc-psnr">30.159 psnr</a></h2>
  27730. <p>Obtain the average, maximum and minimum PSNR (Peak Signal to Noise
  27731. Ratio) between two input videos.
  27732. </p>
  27733. <p>This filter takes in input two input videos, the first input is
  27734. considered the &quot;main&quot; source and is passed unchanged to the
  27735. output. The second input is used as a &quot;reference&quot; video for computing
  27736. the PSNR.
  27737. </p>
  27738. <p>Both video inputs must have the same resolution and pixel format for
  27739. this filter to work correctly. Also it assumes that both inputs
  27740. have the same number of frames, which are compared one by one.
  27741. </p>
  27742. <p>The obtained average PSNR is printed through the logging system.
  27743. </p>
  27744. <p>The filter stores the accumulated MSE (mean squared error) of each
  27745. frame, and at the end of the processing it is averaged across all frames
  27746. equally, and the following formula is applied to obtain the PSNR:
  27747. </p>
  27748. <div class="example">
  27749. <pre class="example">PSNR = 10*log10(MAX^2/MSE)
  27750. </pre></div>
  27751. <p>Where MAX is the average of the maximum values of each component of the
  27752. image.
  27753. </p>
  27754. <p>The description of the accepted parameters follows.
  27755. </p>
  27756. <dl compact="compact">
  27757. <dt>&lsquo;<samp>stats_file, f</samp>&rsquo;</dt>
  27758. <dd><p>If specified the filter will use the named file to save the PSNR of
  27759. each individual frame. When filename equals &quot;-&quot; the data is sent to
  27760. standard output.
  27761. </p>
  27762. </dd>
  27763. <dt>&lsquo;<samp>stats_version</samp>&rsquo;</dt>
  27764. <dd><p>Specifies which version of the stats file format to use. Details of
  27765. each format are written below.
  27766. Default value is 1.
  27767. </p>
  27768. </dd>
  27769. <dt>&lsquo;<samp>stats_add_max</samp>&rsquo;</dt>
  27770. <dd><p>Determines whether the max value is output to the stats log.
  27771. Default value is 0.
  27772. Requires stats_version &gt;= 2. If this is set and stats_version &lt; 2,
  27773. the filter will return an error.
  27774. </p></dd>
  27775. </dl>
  27776. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  27777. </p>
  27778. <p>The file printed if <var>stats_file</var> is selected, contains a sequence of
  27779. key/value pairs of the form <var>key</var>:<var>value</var> for each compared
  27780. couple of frames.
  27781. </p>
  27782. <p>If a <var>stats_version</var> greater than 1 is specified, a header line precedes
  27783. the list of per-frame-pair stats, with key value pairs following the frame
  27784. format with the following parameters:
  27785. </p>
  27786. <dl compact="compact">
  27787. <dt>&lsquo;<samp>psnr_log_version</samp>&rsquo;</dt>
  27788. <dd><p>The version of the log file format. Will match <var>stats_version</var>.
  27789. </p>
  27790. </dd>
  27791. <dt>&lsquo;<samp>fields</samp>&rsquo;</dt>
  27792. <dd><p>A comma separated list of the per-frame-pair parameters included in
  27793. the log.
  27794. </p></dd>
  27795. </dl>
  27796. <p>A description of each shown per-frame-pair parameter follows:
  27797. </p>
  27798. <dl compact="compact">
  27799. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  27800. <dd><p>sequential number of the input frame, starting from 1
  27801. </p>
  27802. </dd>
  27803. <dt>&lsquo;<samp>mse_avg</samp>&rsquo;</dt>
  27804. <dd><p>Mean Square Error pixel-by-pixel average difference of the compared
  27805. frames, averaged over all the image components.
  27806. </p>
  27807. </dd>
  27808. <dt>&lsquo;<samp>mse_y, mse_u, mse_v, mse_r, mse_g, mse_b, mse_a</samp>&rsquo;</dt>
  27809. <dd><p>Mean Square Error pixel-by-pixel average difference of the compared
  27810. frames for the component specified by the suffix.
  27811. </p>
  27812. </dd>
  27813. <dt>&lsquo;<samp>psnr_y, psnr_u, psnr_v, psnr_r, psnr_g, psnr_b, psnr_a</samp>&rsquo;</dt>
  27814. <dd><p>Peak Signal to Noise ratio of the compared frames for the component
  27815. specified by the suffix.
  27816. </p>
  27817. </dd>
  27818. <dt>&lsquo;<samp>max_avg, max_y, max_u, max_v</samp>&rsquo;</dt>
  27819. <dd><p>Maximum allowed value for each channel, and average over all
  27820. channels.
  27821. </p></dd>
  27822. </dl>
  27823. <a name="Examples-69"></a>
  27824. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-69">30.159.1 Examples</a></h3>
  27825. <ul>
  27826. <li>
  27827. For example:
  27828. <div class="example">
  27829. <pre class="example">movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
  27830. [main][ref] psnr=&quot;stats_file=stats.log&quot; [out]
  27831. </pre></div>
  27832. <p>On this example the input file being processed is compared with the
  27833. reference file &lsquo;<tt>ref_movie.mpg</tt>&rsquo;. The PSNR of each individual frame
  27834. is stored in &lsquo;<tt>stats.log</tt>&rsquo;.
  27835. </p>
  27836. </li><li>
  27837. Another example with different containers:
  27838. <div class="example">
  27839. <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 -
  27840. </pre></div>
  27841. </li></ul>
  27842. <p><a name="pullup"></a>
  27843. </p><a name="pullup-1"></a>
  27844. <h2 class="section"><a href="ffplay-all.html#toc-pullup-1">30.160 pullup</a></h2>
  27845. <p>Pulldown reversal (inverse telecine) filter, capable of handling mixed
  27846. hard-telecine, 24000/1001 fps progressive, and 30000/1001 fps progressive
  27847. content.
  27848. </p>
  27849. <p>The pullup filter is designed to take advantage of future context in making
  27850. its decisions. This filter is stateless in the sense that it does not lock
  27851. onto a pattern to follow, but it instead looks forward to the following
  27852. fields in order to identify matches and rebuild progressive frames.
  27853. </p>
  27854. <p>To produce content with an even framerate, insert the fps filter after
  27855. pullup, use <code>fps=24000/1001</code> if the input frame rate is 29.97fps,
  27856. <code>fps=24</code> for 30fps and the (rare) telecined 25fps input.
  27857. </p>
  27858. <p>The filter accepts the following options:
  27859. </p>
  27860. <dl compact="compact">
  27861. <dt>&lsquo;<samp>jl</samp>&rsquo;</dt>
  27862. <dt>&lsquo;<samp>jr</samp>&rsquo;</dt>
  27863. <dt>&lsquo;<samp>jt</samp>&rsquo;</dt>
  27864. <dt>&lsquo;<samp>jb</samp>&rsquo;</dt>
  27865. <dd><p>These options set the amount of &quot;junk&quot; to ignore at the left, right, top, and
  27866. bottom of the image, respectively. Left and right are in units of 8 pixels,
  27867. while top and bottom are in units of 2 lines.
  27868. The default is 8 pixels on each side.
  27869. </p>
  27870. </dd>
  27871. <dt>&lsquo;<samp>sb</samp>&rsquo;</dt>
  27872. <dd><p>Set the strict breaks. Setting this option to 1 will reduce the chances of
  27873. filter generating an occasional mismatched frame, but it may also cause an
  27874. excessive number of frames to be dropped during high motion sequences.
  27875. Conversely, setting it to -1 will make filter match fields more easily.
  27876. This may help processing of video where there is slight blurring between
  27877. the fields, but may also cause there to be interlaced frames in the output.
  27878. Default value is <code>0</code>.
  27879. </p>
  27880. </dd>
  27881. <dt>&lsquo;<samp>mp</samp>&rsquo;</dt>
  27882. <dd><p>Set the metric plane to use. It accepts the following values:
  27883. </p><dl compact="compact">
  27884. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  27885. <dd><p>Use luma plane.
  27886. </p>
  27887. </dd>
  27888. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  27889. <dd><p>Use chroma blue plane.
  27890. </p>
  27891. </dd>
  27892. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  27893. <dd><p>Use chroma red plane.
  27894. </p></dd>
  27895. </dl>
  27896. <p>This option may be set to use chroma plane instead of the default luma plane
  27897. for doing filter&rsquo;s computations. This may improve accuracy on very clean
  27898. source material, but more likely will decrease accuracy, especially if there
  27899. is chroma noise (rainbow effect) or any grayscale video.
  27900. The main purpose of setting &lsquo;<samp>mp</samp>&rsquo; to a chroma plane is to reduce CPU
  27901. load and make pullup usable in realtime on slow machines.
  27902. </p></dd>
  27903. </dl>
  27904. <p>For best results (without duplicated frames in the output file) it is
  27905. necessary to change the output frame rate. For example, to inverse
  27906. telecine NTSC input:
  27907. </p><div class="example">
  27908. <pre class="example">ffmpeg -i input -vf pullup -r 24000/1001 ...
  27909. </pre></div>
  27910. <a name="qp"></a>
  27911. <h2 class="section"><a href="ffplay-all.html#toc-qp">30.161 qp</a></h2>
  27912. <p>Change video quantization parameters (QP).
  27913. </p>
  27914. <p>The filter accepts the following option:
  27915. </p>
  27916. <dl compact="compact">
  27917. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  27918. <dd><p>Set expression for quantization parameter.
  27919. </p></dd>
  27920. </dl>
  27921. <p>The expression is evaluated through the eval API and can contain, among others,
  27922. the following constants:
  27923. </p>
  27924. <dl compact="compact">
  27925. <dt><var>known</var></dt>
  27926. <dd><p>1 if index is not 129, 0 otherwise.
  27927. </p>
  27928. </dd>
  27929. <dt><var>qp</var></dt>
  27930. <dd><p>Sequential index starting from -129 to 128.
  27931. </p></dd>
  27932. </dl>
  27933. <a name="Examples-4"></a>
  27934. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-4">30.161.1 Examples</a></h3>
  27935. <ul>
  27936. <li>
  27937. Some equation like:
  27938. <div class="example">
  27939. <pre class="example">qp=2+2*sin(PI*qp)
  27940. </pre></div>
  27941. </li></ul>
  27942. <a name="random"></a>
  27943. <h2 class="section"><a href="ffplay-all.html#toc-random">30.162 random</a></h2>
  27944. <p>Flush video frames from internal cache of frames into a random order.
  27945. No frame is discarded.
  27946. Inspired by <a href="#frei0r">frei0r</a> nervous filter.
  27947. </p>
  27948. <dl compact="compact">
  27949. <dt>&lsquo;<samp>frames</samp>&rsquo;</dt>
  27950. <dd><p>Set size in number of frames of internal cache, in range from <code>2</code> to
  27951. <code>512</code>. Default is <code>30</code>.
  27952. </p>
  27953. </dd>
  27954. <dt>&lsquo;<samp>seed</samp>&rsquo;</dt>
  27955. <dd><p>Set seed for random number generator, must be an integer included between
  27956. <code>0</code> and <code>UINT32_MAX</code>. If not specified, or if explicitly set to
  27957. less than <code>0</code>, the filter will try to use a good random seed on a
  27958. best effort basis.
  27959. </p></dd>
  27960. </dl>
  27961. <a name="readeia608"></a>
  27962. <h2 class="section"><a href="ffplay-all.html#toc-readeia608">30.163 readeia608</a></h2>
  27963. <p>Read closed captioning (EIA-608) information from the top lines of a video frame.
  27964. </p>
  27965. <p>This filter adds frame metadata for <code>lavfi.readeia608.X.cc</code> and
  27966. <code>lavfi.readeia608.X.line</code>, where <code>X</code> is the number of the identified line
  27967. with EIA-608 data (starting from 0). A description of each metadata value follows:
  27968. </p>
  27969. <dl compact="compact">
  27970. <dt>&lsquo;<samp>lavfi.readeia608.X.cc</samp>&rsquo;</dt>
  27971. <dd><p>The two bytes stored as EIA-608 data (printed in hexadecimal).
  27972. </p>
  27973. </dd>
  27974. <dt>&lsquo;<samp>lavfi.readeia608.X.line</samp>&rsquo;</dt>
  27975. <dd><p>The number of the line on which the EIA-608 data was identified and read.
  27976. </p></dd>
  27977. </dl>
  27978. <p>This filter accepts the following options:
  27979. </p>
  27980. <dl compact="compact">
  27981. <dt>&lsquo;<samp>scan_min</samp>&rsquo;</dt>
  27982. <dd><p>Set the line to start scanning for EIA-608 data. Default is <code>0</code>.
  27983. </p>
  27984. </dd>
  27985. <dt>&lsquo;<samp>scan_max</samp>&rsquo;</dt>
  27986. <dd><p>Set the line to end scanning for EIA-608 data. Default is <code>29</code>.
  27987. </p>
  27988. </dd>
  27989. <dt>&lsquo;<samp>spw</samp>&rsquo;</dt>
  27990. <dd><p>Set the ratio of width reserved for sync code detection.
  27991. Default is <code>0.27</code>. Allowed range is <code>[0.1 - 0.7]</code>.
  27992. </p>
  27993. </dd>
  27994. <dt>&lsquo;<samp>chp</samp>&rsquo;</dt>
  27995. <dd><p>Enable checking the parity bit. In the event of a parity error, the filter will output
  27996. <code>0x00</code> for that character. Default is false.
  27997. </p>
  27998. </dd>
  27999. <dt>&lsquo;<samp>lp</samp>&rsquo;</dt>
  28000. <dd><p>Lowpass lines prior to further processing. Default is enabled.
  28001. </p></dd>
  28002. </dl>
  28003. <a name="Examples-101"></a>
  28004. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-101">30.163.1 Examples</a></h3>
  28005. <ul>
  28006. <li>
  28007. Output a csv with presentation time and the first two lines of identified EIA-608 captioning data.
  28008. <div class="example">
  28009. <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
  28010. </pre></div>
  28011. </li></ul>
  28012. <a name="readvitc"></a>
  28013. <h2 class="section"><a href="ffplay-all.html#toc-readvitc">30.164 readvitc</a></h2>
  28014. <p>Read vertical interval timecode (VITC) information from the top lines of a
  28015. video frame.
  28016. </p>
  28017. <p>The filter adds frame metadata key <code>lavfi.readvitc.tc_str</code> with the
  28018. timecode value, if a valid timecode has been detected. Further metadata key
  28019. <code>lavfi.readvitc.found</code> is set to 0/1 depending on whether
  28020. timecode data has been found or not.
  28021. </p>
  28022. <p>This filter accepts the following options:
  28023. </p>
  28024. <dl compact="compact">
  28025. <dt>&lsquo;<samp>scan_max</samp>&rsquo;</dt>
  28026. <dd><p>Set the maximum number of lines to scan for VITC data. If the value is set to
  28027. <code>-1</code> the full video frame is scanned. Default is <code>45</code>.
  28028. </p>
  28029. </dd>
  28030. <dt>&lsquo;<samp>thr_b</samp>&rsquo;</dt>
  28031. <dd><p>Set the luma threshold for black. Accepts float numbers in the range [0.0,1.0],
  28032. default value is <code>0.2</code>. The value must be equal or less than <code>thr_w</code>.
  28033. </p>
  28034. </dd>
  28035. <dt>&lsquo;<samp>thr_w</samp>&rsquo;</dt>
  28036. <dd><p>Set the luma threshold for white. Accepts float numbers in the range [0.0,1.0],
  28037. default value is <code>0.6</code>. The value must be equal or greater than <code>thr_b</code>.
  28038. </p></dd>
  28039. </dl>
  28040. <a name="Examples-117"></a>
  28041. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-117">30.164.1 Examples</a></h3>
  28042. <ul>
  28043. <li>
  28044. Detect and draw VITC data onto the video frame; if no valid VITC is detected,
  28045. draw <code>--:--:--:--</code> as a placeholder:
  28046. <div class="example">
  28047. <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'
  28048. </pre></div>
  28049. </li></ul>
  28050. <a name="remap"></a>
  28051. <h2 class="section"><a href="ffplay-all.html#toc-remap">30.165 remap</a></h2>
  28052. <p>Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream.
  28053. </p>
  28054. <p>Destination pixel at position (X, Y) will be picked from source (x, y) position
  28055. where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are out of range, zero
  28056. value for pixel will be used for destination pixel.
  28057. </p>
  28058. <p>Xmap and Ymap input video streams must be of same dimensions. Output video stream
  28059. will have Xmap/Ymap video stream dimensions.
  28060. Xmap and Ymap input video streams are 16bit depth, single channel.
  28061. </p>
  28062. <dl compact="compact">
  28063. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  28064. <dd><p>Specify pixel format of output from this filter. Can be <code>color</code> or <code>gray</code>.
  28065. Default is <code>color</code>.
  28066. </p>
  28067. </dd>
  28068. <dt>&lsquo;<samp>fill</samp>&rsquo;</dt>
  28069. <dd><p>Specify the color of the unmapped pixels. For the syntax of this option,
  28070. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>. Default color is <code>black</code>.
  28071. </p></dd>
  28072. </dl>
  28073. <a name="removegrain"></a>
  28074. <h2 class="section"><a href="ffplay-all.html#toc-removegrain">30.166 removegrain</a></h2>
  28075. <p>The removegrain filter is a spatial denoiser for progressive video.
  28076. </p>
  28077. <dl compact="compact">
  28078. <dt>&lsquo;<samp>m0</samp>&rsquo;</dt>
  28079. <dd><p>Set mode for the first plane.
  28080. </p>
  28081. </dd>
  28082. <dt>&lsquo;<samp>m1</samp>&rsquo;</dt>
  28083. <dd><p>Set mode for the second plane.
  28084. </p>
  28085. </dd>
  28086. <dt>&lsquo;<samp>m2</samp>&rsquo;</dt>
  28087. <dd><p>Set mode for the third plane.
  28088. </p>
  28089. </dd>
  28090. <dt>&lsquo;<samp>m3</samp>&rsquo;</dt>
  28091. <dd><p>Set mode for the fourth plane.
  28092. </p></dd>
  28093. </dl>
  28094. <p>Range of mode is from 0 to 24. Description of each mode follows:
  28095. </p>
  28096. <dl compact="compact">
  28097. <dt><var>0</var></dt>
  28098. <dd><p>Leave input plane unchanged. Default.
  28099. </p>
  28100. </dd>
  28101. <dt><var>1</var></dt>
  28102. <dd><p>Clips the pixel with the minimum and maximum of the 8 neighbour pixels.
  28103. </p>
  28104. </dd>
  28105. <dt><var>2</var></dt>
  28106. <dd><p>Clips the pixel with the second minimum and maximum of the 8 neighbour pixels.
  28107. </p>
  28108. </dd>
  28109. <dt><var>3</var></dt>
  28110. <dd><p>Clips the pixel with the third minimum and maximum of the 8 neighbour pixels.
  28111. </p>
  28112. </dd>
  28113. <dt><var>4</var></dt>
  28114. <dd><p>Clips the pixel with the fourth minimum and maximum of the 8 neighbour pixels.
  28115. This is equivalent to a median filter.
  28116. </p>
  28117. </dd>
  28118. <dt><var>5</var></dt>
  28119. <dd><p>Line-sensitive clipping giving the minimal change.
  28120. </p>
  28121. </dd>
  28122. <dt><var>6</var></dt>
  28123. <dd><p>Line-sensitive clipping, intermediate.
  28124. </p>
  28125. </dd>
  28126. <dt><var>7</var></dt>
  28127. <dd><p>Line-sensitive clipping, intermediate.
  28128. </p>
  28129. </dd>
  28130. <dt><var>8</var></dt>
  28131. <dd><p>Line-sensitive clipping, intermediate.
  28132. </p>
  28133. </dd>
  28134. <dt><var>9</var></dt>
  28135. <dd><p>Line-sensitive clipping on a line where the neighbours pixels are the closest.
  28136. </p>
  28137. </dd>
  28138. <dt><var>10</var></dt>
  28139. <dd><p>Replaces the target pixel with the closest neighbour.
  28140. </p>
  28141. </dd>
  28142. <dt><var>11</var></dt>
  28143. <dd><p>[1 2 1] horizontal and vertical kernel blur.
  28144. </p>
  28145. </dd>
  28146. <dt><var>12</var></dt>
  28147. <dd><p>Same as mode 11.
  28148. </p>
  28149. </dd>
  28150. <dt><var>13</var></dt>
  28151. <dd><p>Bob mode, interpolates top field from the line where the neighbours
  28152. pixels are the closest.
  28153. </p>
  28154. </dd>
  28155. <dt><var>14</var></dt>
  28156. <dd><p>Bob mode, interpolates bottom field from the line where the neighbours
  28157. pixels are the closest.
  28158. </p>
  28159. </dd>
  28160. <dt><var>15</var></dt>
  28161. <dd><p>Bob mode, interpolates top field. Same as 13 but with a more complicated
  28162. interpolation formula.
  28163. </p>
  28164. </dd>
  28165. <dt><var>16</var></dt>
  28166. <dd><p>Bob mode, interpolates bottom field. Same as 14 but with a more complicated
  28167. interpolation formula.
  28168. </p>
  28169. </dd>
  28170. <dt><var>17</var></dt>
  28171. <dd><p>Clips the pixel with the minimum and maximum of respectively the maximum and
  28172. minimum of each pair of opposite neighbour pixels.
  28173. </p>
  28174. </dd>
  28175. <dt><var>18</var></dt>
  28176. <dd><p>Line-sensitive clipping using opposite neighbours whose greatest distance from
  28177. the current pixel is minimal.
  28178. </p>
  28179. </dd>
  28180. <dt><var>19</var></dt>
  28181. <dd><p>Replaces the pixel with the average of its 8 neighbours.
  28182. </p>
  28183. </dd>
  28184. <dt><var>20</var></dt>
  28185. <dd><p>Averages the 9 pixels ([1 1 1] horizontal and vertical blur).
  28186. </p>
  28187. </dd>
  28188. <dt><var>21</var></dt>
  28189. <dd><p>Clips pixels using the averages of opposite neighbour.
  28190. </p>
  28191. </dd>
  28192. <dt><var>22</var></dt>
  28193. <dd><p>Same as mode 21 but simpler and faster.
  28194. </p>
  28195. </dd>
  28196. <dt><var>23</var></dt>
  28197. <dd><p>Small edge and halo removal, but reputed useless.
  28198. </p>
  28199. </dd>
  28200. <dt><var>24</var></dt>
  28201. <dd><p>Similar as 23.
  28202. </p></dd>
  28203. </dl>
  28204. <a name="removelogo"></a>
  28205. <h2 class="section"><a href="ffplay-all.html#toc-removelogo">30.167 removelogo</a></h2>
  28206. <p>Suppress a TV station logo, using an image file to determine which
  28207. pixels comprise the logo. It works by filling in the pixels that
  28208. comprise the logo with neighboring pixels.
  28209. </p>
  28210. <p>The filter accepts the following options:
  28211. </p>
  28212. <dl compact="compact">
  28213. <dt>&lsquo;<samp>filename, f</samp>&rsquo;</dt>
  28214. <dd><p>Set the filter bitmap file, which can be any image format supported by
  28215. libavformat. The width and height of the image file must match those of the
  28216. video stream being processed.
  28217. </p></dd>
  28218. </dl>
  28219. <p>Pixels in the provided bitmap image with a value of zero are not
  28220. considered part of the logo, non-zero pixels are considered part of
  28221. the logo. If you use white (255) for the logo and black (0) for the
  28222. rest, you will be safe. For making the filter bitmap, it is
  28223. recommended to take a screen capture of a black frame with the logo
  28224. visible, and then using a threshold filter followed by the erode
  28225. filter once or twice.
  28226. </p>
  28227. <p>If needed, little splotches can be fixed manually. Remember that if
  28228. logo pixels are not covered, the filter quality will be much
  28229. reduced. Marking too many pixels as part of the logo does not hurt as
  28230. much, but it will increase the amount of blurring needed to cover over
  28231. the image and will destroy more information than necessary, and extra
  28232. pixels will slow things down on a large logo.
  28233. </p>
  28234. <a name="repeatfields"></a>
  28235. <h2 class="section"><a href="ffplay-all.html#toc-repeatfields">30.168 repeatfields</a></h2>
  28236. <p>This filter uses the repeat_field flag from the Video ES headers and hard repeats
  28237. fields based on its value.
  28238. </p>
  28239. <a name="reverse"></a>
  28240. <h2 class="section"><a href="ffplay-all.html#toc-reverse">30.169 reverse</a></h2>
  28241. <p>Reverse a video clip.
  28242. </p>
  28243. <p>Warning: This filter requires memory to buffer the entire clip, so trimming
  28244. is suggested.
  28245. </p>
  28246. <a name="Examples-91"></a>
  28247. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-91">30.169.1 Examples</a></h3>
  28248. <ul>
  28249. <li>
  28250. Take the first 5 seconds of a clip, and reverse it.
  28251. <div class="example">
  28252. <pre class="example">trim=end=5,reverse
  28253. </pre></div>
  28254. </li></ul>
  28255. <a name="rgbashift"></a>
  28256. <h2 class="section"><a href="ffplay-all.html#toc-rgbashift">30.170 rgbashift</a></h2>
  28257. <p>Shift R/G/B/A pixels horizontally and/or vertically.
  28258. </p>
  28259. <p>The filter accepts the following options:
  28260. </p><dl compact="compact">
  28261. <dt>&lsquo;<samp>rh</samp>&rsquo;</dt>
  28262. <dd><p>Set amount to shift red horizontally.
  28263. </p></dd>
  28264. <dt>&lsquo;<samp>rv</samp>&rsquo;</dt>
  28265. <dd><p>Set amount to shift red vertically.
  28266. </p></dd>
  28267. <dt>&lsquo;<samp>gh</samp>&rsquo;</dt>
  28268. <dd><p>Set amount to shift green horizontally.
  28269. </p></dd>
  28270. <dt>&lsquo;<samp>gv</samp>&rsquo;</dt>
  28271. <dd><p>Set amount to shift green vertically.
  28272. </p></dd>
  28273. <dt>&lsquo;<samp>bh</samp>&rsquo;</dt>
  28274. <dd><p>Set amount to shift blue horizontally.
  28275. </p></dd>
  28276. <dt>&lsquo;<samp>bv</samp>&rsquo;</dt>
  28277. <dd><p>Set amount to shift blue vertically.
  28278. </p></dd>
  28279. <dt>&lsquo;<samp>ah</samp>&rsquo;</dt>
  28280. <dd><p>Set amount to shift alpha horizontally.
  28281. </p></dd>
  28282. <dt>&lsquo;<samp>av</samp>&rsquo;</dt>
  28283. <dd><p>Set amount to shift alpha vertically.
  28284. </p></dd>
  28285. <dt>&lsquo;<samp>edge</samp>&rsquo;</dt>
  28286. <dd><p>Set edge mode, can be <var>smear</var>, default, or <var>warp</var>.
  28287. </p></dd>
  28288. </dl>
  28289. <a name="Commands-33"></a>
  28290. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-33">30.170.1 Commands</a></h3>
  28291. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  28292. </p>
  28293. <a name="roberts"></a>
  28294. <h2 class="section"><a href="ffplay-all.html#toc-roberts">30.171 roberts</a></h2>
  28295. <p>Apply roberts cross operator to input video stream.
  28296. </p>
  28297. <p>The filter accepts the following option:
  28298. </p>
  28299. <dl compact="compact">
  28300. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  28301. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  28302. By default value 0xf, all planes will be processed.
  28303. </p>
  28304. </dd>
  28305. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  28306. <dd><p>Set value which will be multiplied with filtered result.
  28307. </p>
  28308. </dd>
  28309. <dt>&lsquo;<samp>delta</samp>&rsquo;</dt>
  28310. <dd><p>Set value which will be added to filtered result.
  28311. </p></dd>
  28312. </dl>
  28313. <a name="rotate"></a>
  28314. <h2 class="section"><a href="ffplay-all.html#toc-rotate">30.172 rotate</a></h2>
  28315. <p>Rotate video by an arbitrary angle expressed in radians.
  28316. </p>
  28317. <p>The filter accepts the following options:
  28318. </p>
  28319. <p>A description of the optional parameters follows.
  28320. </p><dl compact="compact">
  28321. <dt>&lsquo;<samp>angle, a</samp>&rsquo;</dt>
  28322. <dd><p>Set an expression for the angle by which to rotate the input video
  28323. clockwise, expressed as a number of radians. A negative value will
  28324. result in a counter-clockwise rotation. By default it is set to &quot;0&quot;.
  28325. </p>
  28326. <p>This expression is evaluated for each frame.
  28327. </p>
  28328. </dd>
  28329. <dt>&lsquo;<samp>out_w, ow</samp>&rsquo;</dt>
  28330. <dd><p>Set the output width expression, default value is &quot;iw&quot;.
  28331. This expression is evaluated just once during configuration.
  28332. </p>
  28333. </dd>
  28334. <dt>&lsquo;<samp>out_h, oh</samp>&rsquo;</dt>
  28335. <dd><p>Set the output height expression, default value is &quot;ih&quot;.
  28336. This expression is evaluated just once during configuration.
  28337. </p>
  28338. </dd>
  28339. <dt>&lsquo;<samp>bilinear</samp>&rsquo;</dt>
  28340. <dd><p>Enable bilinear interpolation if set to 1, a value of 0 disables
  28341. it. Default value is 1.
  28342. </p>
  28343. </dd>
  28344. <dt>&lsquo;<samp>fillcolor, c</samp>&rsquo;</dt>
  28345. <dd><p>Set the color used to fill the output area not covered by the rotated
  28346. image. For the general syntax of this option, check the
  28347. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  28348. If the special value &quot;none&quot; is selected then no
  28349. background is printed (useful for example if the background is never shown).
  28350. </p>
  28351. <p>Default value is &quot;black&quot;.
  28352. </p></dd>
  28353. </dl>
  28354. <p>The expressions for the angle and the output size can contain the
  28355. following constants and functions:
  28356. </p>
  28357. <dl compact="compact">
  28358. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  28359. <dd><p>sequential number of the input frame, starting from 0. It is always NAN
  28360. before the first frame is filtered.
  28361. </p>
  28362. </dd>
  28363. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  28364. <dd><p>time in seconds of the input frame, it is set to 0 when the filter is
  28365. configured. It is always NAN before the first frame is filtered.
  28366. </p>
  28367. </dd>
  28368. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  28369. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  28370. <dd><p>horizontal and vertical chroma subsample values. For example for the
  28371. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  28372. </p>
  28373. </dd>
  28374. <dt>&lsquo;<samp>in_w, iw</samp>&rsquo;</dt>
  28375. <dt>&lsquo;<samp>in_h, ih</samp>&rsquo;</dt>
  28376. <dd><p>the input video width and height
  28377. </p>
  28378. </dd>
  28379. <dt>&lsquo;<samp>out_w, ow</samp>&rsquo;</dt>
  28380. <dt>&lsquo;<samp>out_h, oh</samp>&rsquo;</dt>
  28381. <dd><p>the output width and height, that is the size of the padded area as
  28382. specified by the <var>width</var> and <var>height</var> expressions
  28383. </p>
  28384. </dd>
  28385. <dt>&lsquo;<samp>rotw(a)</samp>&rsquo;</dt>
  28386. <dt>&lsquo;<samp>roth(a)</samp>&rsquo;</dt>
  28387. <dd><p>the minimal width/height required for completely containing the input
  28388. video rotated by <var>a</var> radians.
  28389. </p>
  28390. <p>These are only available when computing the &lsquo;<samp>out_w</samp>&rsquo; and
  28391. &lsquo;<samp>out_h</samp>&rsquo; expressions.
  28392. </p></dd>
  28393. </dl>
  28394. <a name="Examples-127"></a>
  28395. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-127">30.172.1 Examples</a></h3>
  28396. <ul>
  28397. <li>
  28398. Rotate the input by PI/6 radians clockwise:
  28399. <div class="example">
  28400. <pre class="example">rotate=PI/6
  28401. </pre></div>
  28402. </li><li>
  28403. Rotate the input by PI/6 radians counter-clockwise:
  28404. <div class="example">
  28405. <pre class="example">rotate=-PI/6
  28406. </pre></div>
  28407. </li><li>
  28408. Rotate the input by 45 degrees clockwise:
  28409. <div class="example">
  28410. <pre class="example">rotate=45*PI/180
  28411. </pre></div>
  28412. </li><li>
  28413. Apply a constant rotation with period T, starting from an angle of PI/3:
  28414. <div class="example">
  28415. <pre class="example">rotate=PI/3+2*PI*t/T
  28416. </pre></div>
  28417. </li><li>
  28418. Make the input video rotation oscillating with a period of T
  28419. seconds and an amplitude of A radians:
  28420. <div class="example">
  28421. <pre class="example">rotate=A*sin(2*PI/T*t)
  28422. </pre></div>
  28423. </li><li>
  28424. Rotate the video, output size is chosen so that the whole rotating
  28425. input video is always completely contained in the output:
  28426. <div class="example">
  28427. <pre class="example">rotate='2*PI*t:ow=hypot(iw,ih):oh=ow'
  28428. </pre></div>
  28429. </li><li>
  28430. Rotate the video, reduce the output size so that no background is ever
  28431. shown:
  28432. <div class="example">
  28433. <pre class="example">rotate=2*PI*t:ow='min(iw,ih)/sqrt(2)':oh=ow:c=none
  28434. </pre></div>
  28435. </li></ul>
  28436. <a name="Commands-30"></a>
  28437. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-30">30.172.2 Commands</a></h3>
  28438. <p>The filter supports the following commands:
  28439. </p>
  28440. <dl compact="compact">
  28441. <dt>&lsquo;<samp>a, angle</samp>&rsquo;</dt>
  28442. <dd><p>Set the angle expression.
  28443. The command accepts the same syntax of the corresponding option.
  28444. </p>
  28445. <p>If the specified expression is not valid, it is kept at its current
  28446. value.
  28447. </p></dd>
  28448. </dl>
  28449. <a name="sab"></a>
  28450. <h2 class="section"><a href="ffplay-all.html#toc-sab">30.173 sab</a></h2>
  28451. <p>Apply Shape Adaptive Blur.
  28452. </p>
  28453. <p>The filter accepts the following options:
  28454. </p>
  28455. <dl compact="compact">
  28456. <dt>&lsquo;<samp>luma_radius, lr</samp>&rsquo;</dt>
  28457. <dd><p>Set luma blur filter strength, must be a value in range 0.1-4.0, default
  28458. value is 1.0. A greater value will result in a more blurred image, and
  28459. in slower processing.
  28460. </p>
  28461. </dd>
  28462. <dt>&lsquo;<samp>luma_pre_filter_radius, lpfr</samp>&rsquo;</dt>
  28463. <dd><p>Set luma pre-filter radius, must be a value in the 0.1-2.0 range, default
  28464. value is 1.0.
  28465. </p>
  28466. </dd>
  28467. <dt>&lsquo;<samp>luma_strength, ls</samp>&rsquo;</dt>
  28468. <dd><p>Set luma maximum difference between pixels to still be considered, must
  28469. be a value in the 0.1-100.0 range, default value is 1.0.
  28470. </p>
  28471. </dd>
  28472. <dt>&lsquo;<samp>chroma_radius, cr</samp>&rsquo;</dt>
  28473. <dd><p>Set chroma blur filter strength, must be a value in range -0.9-4.0. A
  28474. greater value will result in a more blurred image, and in slower
  28475. processing.
  28476. </p>
  28477. </dd>
  28478. <dt>&lsquo;<samp>chroma_pre_filter_radius, cpfr</samp>&rsquo;</dt>
  28479. <dd><p>Set chroma pre-filter radius, must be a value in the -0.9-2.0 range.
  28480. </p>
  28481. </dd>
  28482. <dt>&lsquo;<samp>chroma_strength, cs</samp>&rsquo;</dt>
  28483. <dd><p>Set chroma maximum difference between pixels to still be considered,
  28484. must be a value in the -0.9-100.0 range.
  28485. </p></dd>
  28486. </dl>
  28487. <p>Each chroma option value, if not explicitly specified, is set to the
  28488. corresponding luma option value.
  28489. </p>
  28490. <p><a name="scale"></a>
  28491. </p><a name="scale-1"></a>
  28492. <h2 class="section"><a href="ffplay-all.html#toc-scale-1">30.174 scale</a></h2>
  28493. <p>Scale (resize) the input video, using the libswscale library.
  28494. </p>
  28495. <p>The scale filter forces the output display aspect ratio to be the same
  28496. of the input, by changing the output sample aspect ratio.
  28497. </p>
  28498. <p>If the input image format is different from the format requested by
  28499. the next filter, the scale filter will convert the input to the
  28500. requested format.
  28501. </p>
  28502. <a name="Options-12"></a>
  28503. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-12">30.174.1 Options</a></h3>
  28504. <p>The filter accepts the following options, or any of the options
  28505. supported by the libswscale scaler.
  28506. </p>
  28507. <p>See <a href="ffmpeg-scaler.html#scaler_005foptions">(ffmpeg-scaler)the ffmpeg-scaler manual</a> for
  28508. the complete list of scaler options.
  28509. </p>
  28510. <dl compact="compact">
  28511. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  28512. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  28513. <dd><p>Set the output video dimension expression. Default value is the input
  28514. dimension.
  28515. </p>
  28516. <p>If the <var>width</var> or <var>w</var> value is 0, the input width is used for
  28517. the output. If the <var>height</var> or <var>h</var> value is 0, the input height
  28518. is used for the output.
  28519. </p>
  28520. <p>If one and only one of the values is -n with n &gt;= 1, the scale filter
  28521. will use a value that maintains the aspect ratio of the input image,
  28522. calculated from the other specified dimension. After that it will,
  28523. however, make sure that the calculated dimension is divisible by n and
  28524. adjust the value if necessary.
  28525. </p>
  28526. <p>If both values are -n with n &gt;= 1, the behavior will be identical to
  28527. both values being set to 0 as previously detailed.
  28528. </p>
  28529. <p>See below for the list of accepted constants for use in the dimension
  28530. expression.
  28531. </p>
  28532. </dd>
  28533. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  28534. <dd><p>Specify when to evaluate <var>width</var> and <var>height</var> expression. It accepts the following values:
  28535. </p>
  28536. <dl compact="compact">
  28537. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  28538. <dd><p>Only evaluate expressions once during the filter initialization or when a command is processed.
  28539. </p>
  28540. </dd>
  28541. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  28542. <dd><p>Evaluate expressions for each incoming frame.
  28543. </p>
  28544. </dd>
  28545. </dl>
  28546. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  28547. </p>
  28548. </dd>
  28549. <dt>&lsquo;<samp>interl</samp>&rsquo;</dt>
  28550. <dd><p>Set the interlacing mode. It accepts the following values:
  28551. </p>
  28552. <dl compact="compact">
  28553. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  28554. <dd><p>Force interlaced aware scaling.
  28555. </p>
  28556. </dd>
  28557. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  28558. <dd><p>Do not apply interlaced scaling.
  28559. </p>
  28560. </dd>
  28561. <dt>&lsquo;<samp>-1</samp>&rsquo;</dt>
  28562. <dd><p>Select interlaced aware scaling depending on whether the source frames
  28563. are flagged as interlaced or not.
  28564. </p></dd>
  28565. </dl>
  28566. <p>Default value is &lsquo;<samp>0</samp>&rsquo;.
  28567. </p>
  28568. </dd>
  28569. <dt>&lsquo;<samp>flags</samp>&rsquo;</dt>
  28570. <dd><p>Set libswscale scaling flags. See
  28571. <a href="ffmpeg-scaler.html#sws_005fflags">(ffmpeg-scaler)the ffmpeg-scaler manual</a> for the
  28572. complete list of values. If not explicitly specified the filter applies
  28573. the default flags.
  28574. </p>
  28575. </dd>
  28576. <dt>&lsquo;<samp>param0, param1</samp>&rsquo;</dt>
  28577. <dd><p>Set libswscale input parameters for scaling algorithms that need them. See
  28578. <a href="ffmpeg-scaler.html#sws_005fparams">(ffmpeg-scaler)the ffmpeg-scaler manual</a> for the
  28579. complete documentation. If not explicitly specified the filter applies
  28580. empty parameters.
  28581. </p>
  28582. </dd>
  28583. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  28584. <dd><p>Set the video size. For the syntax of this option, check the
  28585. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  28586. </p>
  28587. </dd>
  28588. <dt>&lsquo;<samp>in_color_matrix</samp>&rsquo;</dt>
  28589. <dt>&lsquo;<samp>out_color_matrix</samp>&rsquo;</dt>
  28590. <dd><p>Set in/output YCbCr color space type.
  28591. </p>
  28592. <p>This allows the autodetected value to be overridden as well as allows forcing
  28593. a specific value used for the output and encoder.
  28594. </p>
  28595. <p>If not specified, the color space type depends on the pixel format.
  28596. </p>
  28597. <p>Possible values:
  28598. </p>
  28599. <dl compact="compact">
  28600. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  28601. <dd><p>Choose automatically.
  28602. </p>
  28603. </dd>
  28604. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  28605. <dd><p>Format conforming to International Telecommunication Union (ITU)
  28606. Recommendation BT.709.
  28607. </p>
  28608. </dd>
  28609. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  28610. <dd><p>Set color space conforming to the United States Federal Communications
  28611. Commission (FCC) Code of Federal Regulations (CFR) Title 47 (2003) 73.682 (a).
  28612. </p>
  28613. </dd>
  28614. <dt>&lsquo;<samp>bt601</samp>&rsquo;</dt>
  28615. <dt>&lsquo;<samp>bt470</samp>&rsquo;</dt>
  28616. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  28617. <dd><p>Set color space conforming to:
  28618. </p>
  28619. <ul>
  28620. <li>
  28621. ITU Radiocommunication Sector (ITU-R) Recommendation BT.601
  28622. </li><li>
  28623. ITU-R Rec. BT.470-6 (1998) Systems B, B1, and G
  28624. </li><li>
  28625. Society of Motion Picture and Television Engineers (SMPTE) ST 170:2004
  28626. </li></ul>
  28627. </dd>
  28628. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  28629. <dd><p>Set color space conforming to SMPTE ST 240:1999.
  28630. </p>
  28631. </dd>
  28632. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  28633. <dd><p>Set color space conforming to ITU-R BT.2020 non-constant luminance system.
  28634. </p></dd>
  28635. </dl>
  28636. </dd>
  28637. <dt>&lsquo;<samp>in_range</samp>&rsquo;</dt>
  28638. <dt>&lsquo;<samp>out_range</samp>&rsquo;</dt>
  28639. <dd><p>Set in/output YCbCr sample range.
  28640. </p>
  28641. <p>This allows the autodetected value to be overridden as well as allows forcing
  28642. a specific value used for the output and encoder. If not specified, the
  28643. range depends on the pixel format. Possible values:
  28644. </p>
  28645. <dl compact="compact">
  28646. <dt>&lsquo;<samp>auto/unknown</samp>&rsquo;</dt>
  28647. <dd><p>Choose automatically.
  28648. </p>
  28649. </dd>
  28650. <dt>&lsquo;<samp>jpeg/full/pc</samp>&rsquo;</dt>
  28651. <dd><p>Set full range (0-255 in case of 8-bit luma).
  28652. </p>
  28653. </dd>
  28654. <dt>&lsquo;<samp>mpeg/limited/tv</samp>&rsquo;</dt>
  28655. <dd><p>Set &quot;MPEG&quot; range (16-235 in case of 8-bit luma).
  28656. </p></dd>
  28657. </dl>
  28658. </dd>
  28659. <dt>&lsquo;<samp>force_original_aspect_ratio</samp>&rsquo;</dt>
  28660. <dd><p>Enable decreasing or increasing output video width or height if necessary to
  28661. keep the original aspect ratio. Possible values:
  28662. </p>
  28663. <dl compact="compact">
  28664. <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
  28665. <dd><p>Scale the video as specified and disable this feature.
  28666. </p>
  28667. </dd>
  28668. <dt>&lsquo;<samp>decrease</samp>&rsquo;</dt>
  28669. <dd><p>The output video dimensions will automatically be decreased if needed.
  28670. </p>
  28671. </dd>
  28672. <dt>&lsquo;<samp>increase</samp>&rsquo;</dt>
  28673. <dd><p>The output video dimensions will automatically be increased if needed.
  28674. </p>
  28675. </dd>
  28676. </dl>
  28677. <p>One useful instance of this option is that when you know a specific device&rsquo;s
  28678. maximum allowed resolution, you can use this to limit the output video to
  28679. that, while retaining the aspect ratio. For example, device A allows
  28680. 1280x720 playback, and your video is 1920x800. Using this option (set it to
  28681. decrease) and specifying 1280x720 to the command line makes the output
  28682. 1280x533.
  28683. </p>
  28684. <p>Please note that this is a different thing than specifying -1 for &lsquo;<samp>w</samp>&rsquo;
  28685. or &lsquo;<samp>h</samp>&rsquo;, you still need to specify the output resolution for this option
  28686. to work.
  28687. </p>
  28688. </dd>
  28689. <dt>&lsquo;<samp>force_divisible_by</samp>&rsquo;</dt>
  28690. <dd><p>Ensures that both the output dimensions, width and height, are divisible by the
  28691. given integer when used together with &lsquo;<samp>force_original_aspect_ratio</samp>&rsquo;. This
  28692. works similar to using <code>-n</code> in the &lsquo;<samp>w</samp>&rsquo; and &lsquo;<samp>h</samp>&rsquo; options.
  28693. </p>
  28694. <p>This option respects the value set for &lsquo;<samp>force_original_aspect_ratio</samp>&rsquo;,
  28695. increasing or decreasing the resolution accordingly. The video&rsquo;s aspect ratio
  28696. may be slightly modified.
  28697. </p>
  28698. <p>This option can be handy if you need to have a video fit within or exceed
  28699. a defined resolution using &lsquo;<samp>force_original_aspect_ratio</samp>&rsquo; but also have
  28700. encoder restrictions on width or height divisibility.
  28701. </p>
  28702. </dd>
  28703. </dl>
  28704. <p>The values of the &lsquo;<samp>w</samp>&rsquo; and &lsquo;<samp>h</samp>&rsquo; options are expressions
  28705. containing the following constants:
  28706. </p>
  28707. <dl compact="compact">
  28708. <dt><var>in_w</var></dt>
  28709. <dt><var>in_h</var></dt>
  28710. <dd><p>The input width and height
  28711. </p>
  28712. </dd>
  28713. <dt><var>iw</var></dt>
  28714. <dt><var>ih</var></dt>
  28715. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  28716. </p>
  28717. </dd>
  28718. <dt><var>out_w</var></dt>
  28719. <dt><var>out_h</var></dt>
  28720. <dd><p>The output (scaled) width and height
  28721. </p>
  28722. </dd>
  28723. <dt><var>ow</var></dt>
  28724. <dt><var>oh</var></dt>
  28725. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>
  28726. </p>
  28727. </dd>
  28728. <dt><var>a</var></dt>
  28729. <dd><p>The same as <var>iw</var> / <var>ih</var>
  28730. </p>
  28731. </dd>
  28732. <dt><var>sar</var></dt>
  28733. <dd><p>input sample aspect ratio
  28734. </p>
  28735. </dd>
  28736. <dt><var>dar</var></dt>
  28737. <dd><p>The input display aspect ratio. Calculated from <code>(iw / ih) * sar</code>.
  28738. </p>
  28739. </dd>
  28740. <dt><var>hsub</var></dt>
  28741. <dt><var>vsub</var></dt>
  28742. <dd><p>horizontal and vertical input chroma subsample values. For example for the
  28743. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  28744. </p>
  28745. </dd>
  28746. <dt><var>ohsub</var></dt>
  28747. <dt><var>ovsub</var></dt>
  28748. <dd><p>horizontal and vertical output chroma subsample values. For example for the
  28749. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  28750. </p>
  28751. </dd>
  28752. <dt><var>n</var></dt>
  28753. <dd><p>The (sequential) number of the input frame, starting from 0.
  28754. Only available with <code>eval=frame</code>.
  28755. </p>
  28756. </dd>
  28757. <dt><var>t</var></dt>
  28758. <dd><p>The presentation timestamp of the input frame, expressed as a number of
  28759. seconds. Only available with <code>eval=frame</code>.
  28760. </p>
  28761. </dd>
  28762. <dt><var>pos</var></dt>
  28763. <dd><p>The position (byte offset) of the frame in the input stream, or NaN if
  28764. this information is unavailable and/or meaningless (for example in case of synthetic video).
  28765. Only available with <code>eval=frame</code>.
  28766. </p></dd>
  28767. </dl>
  28768. <a name="Examples-63"></a>
  28769. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-63">30.174.2 Examples</a></h3>
  28770. <ul>
  28771. <li>
  28772. Scale the input video to a size of 200x100
  28773. <div class="example">
  28774. <pre class="example">scale=w=200:h=100
  28775. </pre></div>
  28776. <p>This is equivalent to:
  28777. </p><div class="example">
  28778. <pre class="example">scale=200:100
  28779. </pre></div>
  28780. <p>or:
  28781. </p><div class="example">
  28782. <pre class="example">scale=200x100
  28783. </pre></div>
  28784. </li><li>
  28785. Specify a size abbreviation for the output size:
  28786. <div class="example">
  28787. <pre class="example">scale=qcif
  28788. </pre></div>
  28789. <p>which can also be written as:
  28790. </p><div class="example">
  28791. <pre class="example">scale=size=qcif
  28792. </pre></div>
  28793. </li><li>
  28794. Scale the input to 2x:
  28795. <div class="example">
  28796. <pre class="example">scale=w=2*iw:h=2*ih
  28797. </pre></div>
  28798. </li><li>
  28799. The above is the same as:
  28800. <div class="example">
  28801. <pre class="example">scale=2*in_w:2*in_h
  28802. </pre></div>
  28803. </li><li>
  28804. Scale the input to 2x with forced interlaced scaling:
  28805. <div class="example">
  28806. <pre class="example">scale=2*iw:2*ih:interl=1
  28807. </pre></div>
  28808. </li><li>
  28809. Scale the input to half size:
  28810. <div class="example">
  28811. <pre class="example">scale=w=iw/2:h=ih/2
  28812. </pre></div>
  28813. </li><li>
  28814. Increase the width, and set the height to the same size:
  28815. <div class="example">
  28816. <pre class="example">scale=3/2*iw:ow
  28817. </pre></div>
  28818. </li><li>
  28819. Seek Greek harmony:
  28820. <div class="example">
  28821. <pre class="example">scale=iw:1/PHI*iw
  28822. scale=ih*PHI:ih
  28823. </pre></div>
  28824. </li><li>
  28825. Increase the height, and set the width to 3/2 of the height:
  28826. <div class="example">
  28827. <pre class="example">scale=w=3/2*oh:h=3/5*ih
  28828. </pre></div>
  28829. </li><li>
  28830. Increase the size, making the size a multiple of the chroma
  28831. subsample values:
  28832. <div class="example">
  28833. <pre class="example">scale=&quot;trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub&quot;
  28834. </pre></div>
  28835. </li><li>
  28836. Increase the width to a maximum of 500 pixels,
  28837. keeping the same aspect ratio as the input:
  28838. <div class="example">
  28839. <pre class="example">scale=w='min(500\, iw*3/2):h=-1'
  28840. </pre></div>
  28841. </li><li>
  28842. Make pixels square by combining scale and setsar:
  28843. <div class="example">
  28844. <pre class="example">scale='trunc(ih*dar):ih',setsar=1/1
  28845. </pre></div>
  28846. </li><li>
  28847. Make pixels square by combining scale and setsar,
  28848. making sure the resulting resolution is even (required by some codecs):
  28849. <div class="example">
  28850. <pre class="example">scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1
  28851. </pre></div>
  28852. </li></ul>
  28853. <a name="Commands-20"></a>
  28854. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-20">30.174.3 Commands</a></h3>
  28855. <p>This filter supports the following commands:
  28856. </p><dl compact="compact">
  28857. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  28858. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  28859. <dd><p>Set the output video dimension expression.
  28860. The command accepts the same syntax of the corresponding option.
  28861. </p>
  28862. <p>If the specified expression is not valid, it is kept at its current
  28863. value.
  28864. </p></dd>
  28865. </dl>
  28866. <a name="scale_005fnpp"></a>
  28867. <h2 class="section"><a href="ffplay-all.html#toc-scale_005fnpp">30.175 scale_npp</a></h2>
  28868. <p>Use the NVIDIA Performance Primitives (libnpp) to perform scaling and/or pixel
  28869. format conversion on CUDA video frames. Setting the output width and height
  28870. works in the same way as for the <var>scale</var> filter.
  28871. </p>
  28872. <p>The following additional options are accepted:
  28873. </p><dl compact="compact">
  28874. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  28875. <dd><p>The pixel format of the output CUDA frames. If set to the string &quot;same&quot; (the
  28876. default), the input format will be kept. Note that automatic format negotiation
  28877. and conversion is not yet supported for hardware frames
  28878. </p>
  28879. </dd>
  28880. <dt>&lsquo;<samp>interp_algo</samp>&rsquo;</dt>
  28881. <dd><p>The interpolation algorithm used for resizing. One of the following:
  28882. </p><dl compact="compact">
  28883. <dt>&lsquo;<samp>nn</samp>&rsquo;</dt>
  28884. <dd><p>Nearest neighbour.
  28885. </p>
  28886. </dd>
  28887. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  28888. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  28889. <dt>&lsquo;<samp>cubic2p_bspline</samp>&rsquo;</dt>
  28890. <dd><p>2-parameter cubic (B=1, C=0)
  28891. </p>
  28892. </dd>
  28893. <dt>&lsquo;<samp>cubic2p_catmullrom</samp>&rsquo;</dt>
  28894. <dd><p>2-parameter cubic (B=0, C=1/2)
  28895. </p>
  28896. </dd>
  28897. <dt>&lsquo;<samp>cubic2p_b05c03</samp>&rsquo;</dt>
  28898. <dd><p>2-parameter cubic (B=1/2, C=3/10)
  28899. </p>
  28900. </dd>
  28901. <dt>&lsquo;<samp>super</samp>&rsquo;</dt>
  28902. <dd><p>Supersampling
  28903. </p>
  28904. </dd>
  28905. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  28906. </dl>
  28907. </dd>
  28908. <dt>&lsquo;<samp>force_original_aspect_ratio</samp>&rsquo;</dt>
  28909. <dd><p>Enable decreasing or increasing output video width or height if necessary to
  28910. keep the original aspect ratio. Possible values:
  28911. </p>
  28912. <dl compact="compact">
  28913. <dt>&lsquo;<samp>disable</samp>&rsquo;</dt>
  28914. <dd><p>Scale the video as specified and disable this feature.
  28915. </p>
  28916. </dd>
  28917. <dt>&lsquo;<samp>decrease</samp>&rsquo;</dt>
  28918. <dd><p>The output video dimensions will automatically be decreased if needed.
  28919. </p>
  28920. </dd>
  28921. <dt>&lsquo;<samp>increase</samp>&rsquo;</dt>
  28922. <dd><p>The output video dimensions will automatically be increased if needed.
  28923. </p>
  28924. </dd>
  28925. </dl>
  28926. <p>One useful instance of this option is that when you know a specific device&rsquo;s
  28927. maximum allowed resolution, you can use this to limit the output video to
  28928. that, while retaining the aspect ratio. For example, device A allows
  28929. 1280x720 playback, and your video is 1920x800. Using this option (set it to
  28930. decrease) and specifying 1280x720 to the command line makes the output
  28931. 1280x533.
  28932. </p>
  28933. <p>Please note that this is a different thing than specifying -1 for &lsquo;<samp>w</samp>&rsquo;
  28934. or &lsquo;<samp>h</samp>&rsquo;, you still need to specify the output resolution for this option
  28935. to work.
  28936. </p>
  28937. </dd>
  28938. <dt>&lsquo;<samp>force_divisible_by</samp>&rsquo;</dt>
  28939. <dd><p>Ensures that both the output dimensions, width and height, are divisible by the
  28940. given integer when used together with &lsquo;<samp>force_original_aspect_ratio</samp>&rsquo;. This
  28941. works similar to using <code>-n</code> in the &lsquo;<samp>w</samp>&rsquo; and &lsquo;<samp>h</samp>&rsquo; options.
  28942. </p>
  28943. <p>This option respects the value set for &lsquo;<samp>force_original_aspect_ratio</samp>&rsquo;,
  28944. increasing or decreasing the resolution accordingly. The video&rsquo;s aspect ratio
  28945. may be slightly modified.
  28946. </p>
  28947. <p>This option can be handy if you need to have a video fit within or exceed
  28948. a defined resolution using &lsquo;<samp>force_original_aspect_ratio</samp>&rsquo; but also have
  28949. encoder restrictions on width or height divisibility.
  28950. </p>
  28951. </dd>
  28952. </dl>
  28953. <a name="scale2ref"></a>
  28954. <h2 class="section"><a href="ffplay-all.html#toc-scale2ref">30.176 scale2ref</a></h2>
  28955. <p>Scale (resize) the input video, based on a reference video.
  28956. </p>
  28957. <p>See the scale filter for available options, scale2ref supports the same but
  28958. uses the reference video instead of the main input as basis. scale2ref also
  28959. supports the following additional constants for the &lsquo;<samp>w</samp>&rsquo; and
  28960. &lsquo;<samp>h</samp>&rsquo; options:
  28961. </p>
  28962. <dl compact="compact">
  28963. <dt><var>main_w</var></dt>
  28964. <dt><var>main_h</var></dt>
  28965. <dd><p>The main input video&rsquo;s width and height
  28966. </p>
  28967. </dd>
  28968. <dt><var>main_a</var></dt>
  28969. <dd><p>The same as <var>main_w</var> / <var>main_h</var>
  28970. </p>
  28971. </dd>
  28972. <dt><var>main_sar</var></dt>
  28973. <dd><p>The main input video&rsquo;s sample aspect ratio
  28974. </p>
  28975. </dd>
  28976. <dt><var>main_dar, mdar</var></dt>
  28977. <dd><p>The main input video&rsquo;s display aspect ratio. Calculated from
  28978. <code>(main_w / main_h) * main_sar</code>.
  28979. </p>
  28980. </dd>
  28981. <dt><var>main_hsub</var></dt>
  28982. <dt><var>main_vsub</var></dt>
  28983. <dd><p>The main input video&rsquo;s horizontal and vertical chroma subsample values.
  28984. For example for the pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var>
  28985. is 1.
  28986. </p>
  28987. </dd>
  28988. <dt><var>main_n</var></dt>
  28989. <dd><p>The (sequential) number of the main input frame, starting from 0.
  28990. Only available with <code>eval=frame</code>.
  28991. </p>
  28992. </dd>
  28993. <dt><var>main_t</var></dt>
  28994. <dd><p>The presentation timestamp of the main input frame, expressed as a number of
  28995. seconds. Only available with <code>eval=frame</code>.
  28996. </p>
  28997. </dd>
  28998. <dt><var>main_pos</var></dt>
  28999. <dd><p>The position (byte offset) of the frame in the main input stream, or NaN if
  29000. this information is unavailable and/or meaningless (for example in case of synthetic video).
  29001. Only available with <code>eval=frame</code>.
  29002. </p></dd>
  29003. </dl>
  29004. <a name="Examples-129"></a>
  29005. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-129">30.176.1 Examples</a></h3>
  29006. <ul>
  29007. <li>
  29008. Scale a subtitle stream (b) to match the main video (a) in size before overlaying
  29009. <div class="example">
  29010. <pre class="example">'scale2ref[b][a];[a][b]overlay'
  29011. </pre></div>
  29012. </li><li>
  29013. Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio.
  29014. <div class="example">
  29015. <pre class="example">[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
  29016. </pre></div>
  29017. </li></ul>
  29018. <a name="Commands-15"></a>
  29019. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-15">30.176.2 Commands</a></h3>
  29020. <p>This filter supports the following commands:
  29021. </p><dl compact="compact">
  29022. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  29023. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  29024. <dd><p>Set the output video dimension expression.
  29025. The command accepts the same syntax of the corresponding option.
  29026. </p>
  29027. <p>If the specified expression is not valid, it is kept at its current
  29028. value.
  29029. </p></dd>
  29030. </dl>
  29031. <a name="scroll"></a>
  29032. <h2 class="section"><a href="ffplay-all.html#toc-scroll">30.177 scroll</a></h2>
  29033. <p>Scroll input video horizontally and/or vertically by constant speed.
  29034. </p>
  29035. <p>The filter accepts the following options:
  29036. </p><dl compact="compact">
  29037. <dt>&lsquo;<samp>horizontal, h</samp>&rsquo;</dt>
  29038. <dd><p>Set the horizontal scrolling speed. Default is 0. Allowed range is from -1 to 1.
  29039. Negative values changes scrolling direction.
  29040. </p>
  29041. </dd>
  29042. <dt>&lsquo;<samp>vertical, v</samp>&rsquo;</dt>
  29043. <dd><p>Set the vertical scrolling speed. Default is 0. Allowed range is from -1 to 1.
  29044. Negative values changes scrolling direction.
  29045. </p>
  29046. </dd>
  29047. <dt>&lsquo;<samp>hpos</samp>&rsquo;</dt>
  29048. <dd><p>Set the initial horizontal scrolling position. Default is 0. Allowed range is from 0 to 1.
  29049. </p>
  29050. </dd>
  29051. <dt>&lsquo;<samp>vpos</samp>&rsquo;</dt>
  29052. <dd><p>Set the initial vertical scrolling position. Default is 0. Allowed range is from 0 to 1.
  29053. </p></dd>
  29054. </dl>
  29055. <a name="Commands-16"></a>
  29056. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-16">30.177.1 Commands</a></h3>
  29057. <p>This filter supports the following <a href="#commands">commands</a>:
  29058. </p><dl compact="compact">
  29059. <dt>&lsquo;<samp>horizontal, h</samp>&rsquo;</dt>
  29060. <dd><p>Set the horizontal scrolling speed.
  29061. </p></dd>
  29062. <dt>&lsquo;<samp>vertical, v</samp>&rsquo;</dt>
  29063. <dd><p>Set the vertical scrolling speed.
  29064. </p></dd>
  29065. </dl>
  29066. <p><a name="selectivecolor"></a>
  29067. </p><a name="selectivecolor-1"></a>
  29068. <h2 class="section"><a href="ffplay-all.html#toc-selectivecolor-1">30.178 selectivecolor</a></h2>
  29069. <p>Adjust cyan, magenta, yellow and black (CMYK) to certain ranges of colors (such
  29070. as &quot;reds&quot;, &quot;yellows&quot;, &quot;greens&quot;, &quot;cyans&quot;, ...). The adjustment range is defined
  29071. by the &quot;purity&quot; of the color (that is, how saturated it already is).
  29072. </p>
  29073. <p>This filter is similar to the Adobe Photoshop Selective Color tool.
  29074. </p>
  29075. <p>The filter accepts the following options:
  29076. </p>
  29077. <dl compact="compact">
  29078. <dt>&lsquo;<samp>correction_method</samp>&rsquo;</dt>
  29079. <dd><p>Select color correction method.
  29080. </p>
  29081. <p>Available values are:
  29082. </p><dl compact="compact">
  29083. <dt>&lsquo;<samp>absolute</samp>&rsquo;</dt>
  29084. <dd><p>Specified adjustments are applied &quot;as-is&quot; (added/subtracted to original pixel
  29085. component value).
  29086. </p></dd>
  29087. <dt>&lsquo;<samp>relative</samp>&rsquo;</dt>
  29088. <dd><p>Specified adjustments are relative to the original component value.
  29089. </p></dd>
  29090. </dl>
  29091. <p>Default is <code>absolute</code>.
  29092. </p></dd>
  29093. <dt>&lsquo;<samp>reds</samp>&rsquo;</dt>
  29094. <dd><p>Adjustments for red pixels (pixels where the red component is the maximum)
  29095. </p></dd>
  29096. <dt>&lsquo;<samp>yellows</samp>&rsquo;</dt>
  29097. <dd><p>Adjustments for yellow pixels (pixels where the blue component is the minimum)
  29098. </p></dd>
  29099. <dt>&lsquo;<samp>greens</samp>&rsquo;</dt>
  29100. <dd><p>Adjustments for green pixels (pixels where the green component is the maximum)
  29101. </p></dd>
  29102. <dt>&lsquo;<samp>cyans</samp>&rsquo;</dt>
  29103. <dd><p>Adjustments for cyan pixels (pixels where the red component is the minimum)
  29104. </p></dd>
  29105. <dt>&lsquo;<samp>blues</samp>&rsquo;</dt>
  29106. <dd><p>Adjustments for blue pixels (pixels where the blue component is the maximum)
  29107. </p></dd>
  29108. <dt>&lsquo;<samp>magentas</samp>&rsquo;</dt>
  29109. <dd><p>Adjustments for magenta pixels (pixels where the green component is the minimum)
  29110. </p></dd>
  29111. <dt>&lsquo;<samp>whites</samp>&rsquo;</dt>
  29112. <dd><p>Adjustments for white pixels (pixels where all components are greater than 128)
  29113. </p></dd>
  29114. <dt>&lsquo;<samp>neutrals</samp>&rsquo;</dt>
  29115. <dd><p>Adjustments for all pixels except pure black and pure white
  29116. </p></dd>
  29117. <dt>&lsquo;<samp>blacks</samp>&rsquo;</dt>
  29118. <dd><p>Adjustments for black pixels (pixels where all components are lesser than 128)
  29119. </p></dd>
  29120. <dt>&lsquo;<samp>psfile</samp>&rsquo;</dt>
  29121. <dd><p>Specify a Photoshop selective color file (<code>.asv</code>) to import the settings from.
  29122. </p></dd>
  29123. </dl>
  29124. <p>All the adjustment settings (&lsquo;<samp>reds</samp>&rsquo;, &lsquo;<samp>yellows</samp>&rsquo;, ...) accept up to
  29125. 4 space separated floating point adjustment values in the [-1,1] range,
  29126. respectively to adjust the amount of cyan, magenta, yellow and black for the
  29127. pixels of its range.
  29128. </p>
  29129. <a name="Examples-30"></a>
  29130. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-30">30.178.1 Examples</a></h3>
  29131. <ul>
  29132. <li>
  29133. Increase cyan by 50% and reduce yellow by 33% in every green areas, and
  29134. increase magenta by 27% in blue areas:
  29135. <div class="example">
  29136. <pre class="example">selectivecolor=greens=.5 0 -.33 0:blues=0 .27
  29137. </pre></div>
  29138. </li><li>
  29139. Use a Photoshop selective color preset:
  29140. <div class="example">
  29141. <pre class="example">selectivecolor=psfile=MySelectiveColorPresets/Misty.asv
  29142. </pre></div>
  29143. </li></ul>
  29144. <p><a name="separatefields"></a>
  29145. </p><a name="separatefields-1"></a>
  29146. <h2 class="section"><a href="ffplay-all.html#toc-separatefields-1">30.179 separatefields</a></h2>
  29147. <p>The <code>separatefields</code> takes a frame-based video input and splits
  29148. each frame into its components fields, producing a new half height clip
  29149. with twice the frame rate and twice the frame count.
  29150. </p>
  29151. <p>This filter use field-dominance information in frame to decide which
  29152. of each pair of fields to place first in the output.
  29153. If it gets it wrong use <a href="#setfield">setfield</a> filter before <code>separatefields</code> filter.
  29154. </p>
  29155. <a name="setdar_002c-setsar"></a>
  29156. <h2 class="section"><a href="ffplay-all.html#toc-setdar_002c-setsar">30.180 setdar, setsar</a></h2>
  29157. <p>The <code>setdar</code> filter sets the Display Aspect Ratio for the filter
  29158. output video.
  29159. </p>
  29160. <p>This is done by changing the specified Sample (aka Pixel) Aspect
  29161. Ratio, according to the following equation:
  29162. </p><div class="example">
  29163. <pre class="example"><var>DAR</var> = <var>HORIZONTAL_RESOLUTION</var> / <var>VERTICAL_RESOLUTION</var> * <var>SAR</var>
  29164. </pre></div>
  29165. <p>Keep in mind that the <code>setdar</code> filter does not modify the pixel
  29166. dimensions of the video frame. Also, the display aspect ratio set by
  29167. this filter may be changed by later filters in the filterchain,
  29168. e.g. in case of scaling or if another &quot;setdar&quot; or a &quot;setsar&quot; filter is
  29169. applied.
  29170. </p>
  29171. <p>The <code>setsar</code> filter sets the Sample (aka Pixel) Aspect Ratio for
  29172. the filter output video.
  29173. </p>
  29174. <p>Note that as a consequence of the application of this filter, the
  29175. output display aspect ratio will change according to the equation
  29176. above.
  29177. </p>
  29178. <p>Keep in mind that the sample aspect ratio set by the <code>setsar</code>
  29179. filter may be changed by later filters in the filterchain, e.g. if
  29180. another &quot;setsar&quot; or a &quot;setdar&quot; filter is applied.
  29181. </p>
  29182. <p>It accepts the following parameters:
  29183. </p>
  29184. <dl compact="compact">
  29185. <dt>&lsquo;<samp>r, ratio, dar (<code>setdar</code> only), sar (<code>setsar</code> only)</samp>&rsquo;</dt>
  29186. <dd><p>Set the aspect ratio used by the filter.
  29187. </p>
  29188. <p>The parameter can be a floating point number string, an expression, or
  29189. a string of the form <var>num</var>:<var>den</var>, where <var>num</var> and
  29190. <var>den</var> are the numerator and denominator of the aspect ratio. If
  29191. the parameter is not specified, it is assumed the value &quot;0&quot;.
  29192. In case the form &quot;<var>num</var>:<var>den</var>&quot; is used, the <code>:</code> character
  29193. should be escaped.
  29194. </p>
  29195. </dd>
  29196. <dt>&lsquo;<samp>max</samp>&rsquo;</dt>
  29197. <dd><p>Set the maximum integer value to use for expressing numerator and
  29198. denominator when reducing the expressed aspect ratio to a rational.
  29199. Default value is <code>100</code>.
  29200. </p>
  29201. </dd>
  29202. </dl>
  29203. <p>The parameter <var>sar</var> is an expression containing
  29204. the following constants:
  29205. </p>
  29206. <dl compact="compact">
  29207. <dt>&lsquo;<samp>E, PI, PHI</samp>&rsquo;</dt>
  29208. <dd><p>These are approximated values for the mathematical constants e
  29209. (Euler&rsquo;s number), pi (Greek pi), and phi (the golden ratio).
  29210. </p>
  29211. </dd>
  29212. <dt>&lsquo;<samp>w, h</samp>&rsquo;</dt>
  29213. <dd><p>The input width and height.
  29214. </p>
  29215. </dd>
  29216. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  29217. <dd><p>These are the same as <var>w</var> / <var>h</var>.
  29218. </p>
  29219. </dd>
  29220. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  29221. <dd><p>The input sample aspect ratio.
  29222. </p>
  29223. </dd>
  29224. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  29225. <dd><p>The input display aspect ratio. It is the same as
  29226. (<var>w</var> / <var>h</var>) * <var>sar</var>.
  29227. </p>
  29228. </dd>
  29229. <dt>&lsquo;<samp>hsub, vsub</samp>&rsquo;</dt>
  29230. <dd><p>Horizontal and vertical chroma subsample values. For example, for the
  29231. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  29232. </p></dd>
  29233. </dl>
  29234. <a name="Examples-116"></a>
  29235. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-116">30.180.1 Examples</a></h3>
  29236. <ul>
  29237. <li>
  29238. To change the display aspect ratio to 16:9, specify one of the following:
  29239. <div class="example">
  29240. <pre class="example">setdar=dar=1.77777
  29241. setdar=dar=16/9
  29242. </pre></div>
  29243. </li><li>
  29244. To change the sample aspect ratio to 10:11, specify:
  29245. <div class="example">
  29246. <pre class="example">setsar=sar=10/11
  29247. </pre></div>
  29248. </li><li>
  29249. To set a display aspect ratio of 16:9, and specify a maximum integer value of
  29250. 1000 in the aspect ratio reduction, use the command:
  29251. <div class="example">
  29252. <pre class="example">setdar=ratio=16/9:max=1000
  29253. </pre></div>
  29254. </li></ul>
  29255. <p><a name="setfield"></a>
  29256. </p><a name="setfield-1"></a>
  29257. <h2 class="section"><a href="ffplay-all.html#toc-setfield-1">30.181 setfield</a></h2>
  29258. <p>Force field for the output video frame.
  29259. </p>
  29260. <p>The <code>setfield</code> filter marks the interlace type field for the
  29261. output frames. It does not change the input frame, but only sets the
  29262. corresponding property, which affects how the frame is treated by
  29263. following filters (e.g. <code>fieldorder</code> or <code>yadif</code>).
  29264. </p>
  29265. <p>The filter accepts the following options:
  29266. </p>
  29267. <dl compact="compact">
  29268. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  29269. <dd><p>Available values are:
  29270. </p>
  29271. <dl compact="compact">
  29272. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  29273. <dd><p>Keep the same field property.
  29274. </p>
  29275. </dd>
  29276. <dt>&lsquo;<samp>bff</samp>&rsquo;</dt>
  29277. <dd><p>Mark the frame as bottom-field-first.
  29278. </p>
  29279. </dd>
  29280. <dt>&lsquo;<samp>tff</samp>&rsquo;</dt>
  29281. <dd><p>Mark the frame as top-field-first.
  29282. </p>
  29283. </dd>
  29284. <dt>&lsquo;<samp>prog</samp>&rsquo;</dt>
  29285. <dd><p>Mark the frame as progressive.
  29286. </p></dd>
  29287. </dl>
  29288. </dd>
  29289. </dl>
  29290. <p><a name="setparams"></a>
  29291. </p><a name="setparams-1"></a>
  29292. <h2 class="section"><a href="ffplay-all.html#toc-setparams-1">30.182 setparams</a></h2>
  29293. <p>Force frame parameter for the output video frame.
  29294. </p>
  29295. <p>The <code>setparams</code> filter marks interlace and color range for the
  29296. output frames. It does not change the input frame, but only sets the
  29297. corresponding property, which affects how the frame is treated by
  29298. filters/encoders.
  29299. </p>
  29300. <dl compact="compact">
  29301. <dt>&lsquo;<samp>field_mode</samp>&rsquo;</dt>
  29302. <dd><p>Available values are:
  29303. </p>
  29304. <dl compact="compact">
  29305. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  29306. <dd><p>Keep the same field property (default).
  29307. </p>
  29308. </dd>
  29309. <dt>&lsquo;<samp>bff</samp>&rsquo;</dt>
  29310. <dd><p>Mark the frame as bottom-field-first.
  29311. </p>
  29312. </dd>
  29313. <dt>&lsquo;<samp>tff</samp>&rsquo;</dt>
  29314. <dd><p>Mark the frame as top-field-first.
  29315. </p>
  29316. </dd>
  29317. <dt>&lsquo;<samp>prog</samp>&rsquo;</dt>
  29318. <dd><p>Mark the frame as progressive.
  29319. </p></dd>
  29320. </dl>
  29321. </dd>
  29322. <dt>&lsquo;<samp>range</samp>&rsquo;</dt>
  29323. <dd><p>Available values are:
  29324. </p>
  29325. <dl compact="compact">
  29326. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  29327. <dd><p>Keep the same color range property (default).
  29328. </p>
  29329. </dd>
  29330. <dt>&lsquo;<samp>unspecified, unknown</samp>&rsquo;</dt>
  29331. <dd><p>Mark the frame as unspecified color range.
  29332. </p>
  29333. </dd>
  29334. <dt>&lsquo;<samp>limited, tv, mpeg</samp>&rsquo;</dt>
  29335. <dd><p>Mark the frame as limited range.
  29336. </p>
  29337. </dd>
  29338. <dt>&lsquo;<samp>full, pc, jpeg</samp>&rsquo;</dt>
  29339. <dd><p>Mark the frame as full range.
  29340. </p></dd>
  29341. </dl>
  29342. </dd>
  29343. <dt>&lsquo;<samp>color_primaries</samp>&rsquo;</dt>
  29344. <dd><p>Set the color primaries.
  29345. Available values are:
  29346. </p>
  29347. <dl compact="compact">
  29348. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  29349. <dd><p>Keep the same color primaries property (default).
  29350. </p>
  29351. </dd>
  29352. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  29353. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  29354. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  29355. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  29356. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  29357. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  29358. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  29359. <dt>&lsquo;<samp>bt2020</samp>&rsquo;</dt>
  29360. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  29361. <dt>&lsquo;<samp>smpte431</samp>&rsquo;</dt>
  29362. <dt>&lsquo;<samp>smpte432</samp>&rsquo;</dt>
  29363. <dt>&lsquo;<samp>jedec-p22</samp>&rsquo;</dt>
  29364. </dl>
  29365. </dd>
  29366. <dt>&lsquo;<samp>color_trc</samp>&rsquo;</dt>
  29367. <dd><p>Set the color transfer.
  29368. Available values are:
  29369. </p>
  29370. <dl compact="compact">
  29371. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  29372. <dd><p>Keep the same color trc property (default).
  29373. </p>
  29374. </dd>
  29375. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  29376. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  29377. <dt>&lsquo;<samp>bt470m</samp>&rsquo;</dt>
  29378. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  29379. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  29380. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  29381. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  29382. <dt>&lsquo;<samp>log100</samp>&rsquo;</dt>
  29383. <dt>&lsquo;<samp>log316</samp>&rsquo;</dt>
  29384. <dt>&lsquo;<samp>iec61966-2-4</samp>&rsquo;</dt>
  29385. <dt>&lsquo;<samp>bt1361e</samp>&rsquo;</dt>
  29386. <dt>&lsquo;<samp>iec61966-2-1</samp>&rsquo;</dt>
  29387. <dt>&lsquo;<samp>bt2020-10</samp>&rsquo;</dt>
  29388. <dt>&lsquo;<samp>bt2020-12</samp>&rsquo;</dt>
  29389. <dt>&lsquo;<samp>smpte2084</samp>&rsquo;</dt>
  29390. <dt>&lsquo;<samp>smpte428</samp>&rsquo;</dt>
  29391. <dt>&lsquo;<samp>arib-std-b67</samp>&rsquo;</dt>
  29392. </dl>
  29393. </dd>
  29394. <dt>&lsquo;<samp>colorspace</samp>&rsquo;</dt>
  29395. <dd><p>Set the colorspace.
  29396. Available values are:
  29397. </p>
  29398. <dl compact="compact">
  29399. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  29400. <dd><p>Keep the same colorspace property (default).
  29401. </p>
  29402. </dd>
  29403. <dt>&lsquo;<samp>gbr</samp>&rsquo;</dt>
  29404. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  29405. <dt>&lsquo;<samp>unknown</samp>&rsquo;</dt>
  29406. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  29407. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  29408. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  29409. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  29410. <dt>&lsquo;<samp>ycgco</samp>&rsquo;</dt>
  29411. <dt>&lsquo;<samp>bt2020nc</samp>&rsquo;</dt>
  29412. <dt>&lsquo;<samp>bt2020c</samp>&rsquo;</dt>
  29413. <dt>&lsquo;<samp>smpte2085</samp>&rsquo;</dt>
  29414. <dt>&lsquo;<samp>chroma-derived-nc</samp>&rsquo;</dt>
  29415. <dt>&lsquo;<samp>chroma-derived-c</samp>&rsquo;</dt>
  29416. <dt>&lsquo;<samp>ictcp</samp>&rsquo;</dt>
  29417. </dl>
  29418. </dd>
  29419. </dl>
  29420. <a name="showinfo"></a>
  29421. <h2 class="section"><a href="ffplay-all.html#toc-showinfo">30.183 showinfo</a></h2>
  29422. <p>Show a line containing various information for each input video frame.
  29423. The input video is not modified.
  29424. </p>
  29425. <p>This filter supports the following options:
  29426. </p>
  29427. <dl compact="compact">
  29428. <dt>&lsquo;<samp>checksum</samp>&rsquo;</dt>
  29429. <dd><p>Calculate checksums of each plane. By default enabled.
  29430. </p></dd>
  29431. </dl>
  29432. <p>The shown line contains a sequence of key/value pairs of the form
  29433. <var>key</var>:<var>value</var>.
  29434. </p>
  29435. <p>The following values are shown in the output:
  29436. </p>
  29437. <dl compact="compact">
  29438. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  29439. <dd><p>The (sequential) number of the input frame, starting from 0.
  29440. </p>
  29441. </dd>
  29442. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  29443. <dd><p>The Presentation TimeStamp of the input frame, expressed as a number of
  29444. time base units. The time base unit depends on the filter input pad.
  29445. </p>
  29446. </dd>
  29447. <dt>&lsquo;<samp>pts_time</samp>&rsquo;</dt>
  29448. <dd><p>The Presentation TimeStamp of the input frame, expressed as a number of
  29449. seconds.
  29450. </p>
  29451. </dd>
  29452. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  29453. <dd><p>The position of the frame in the input stream, or -1 if this information is
  29454. unavailable and/or meaningless (for example in case of synthetic video).
  29455. </p>
  29456. </dd>
  29457. <dt>&lsquo;<samp>fmt</samp>&rsquo;</dt>
  29458. <dd><p>The pixel format name.
  29459. </p>
  29460. </dd>
  29461. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  29462. <dd><p>The sample aspect ratio of the input frame, expressed in the form
  29463. <var>num</var>/<var>den</var>.
  29464. </p>
  29465. </dd>
  29466. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  29467. <dd><p>The size of the input frame. For the syntax of this option, check the
  29468. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  29469. </p>
  29470. </dd>
  29471. <dt>&lsquo;<samp>i</samp>&rsquo;</dt>
  29472. <dd><p>The type of interlaced mode (&quot;P&quot; for &quot;progressive&quot;, &quot;T&quot; for top field first, &quot;B&quot;
  29473. for bottom field first).
  29474. </p>
  29475. </dd>
  29476. <dt>&lsquo;<samp>iskey</samp>&rsquo;</dt>
  29477. <dd><p>This is 1 if the frame is a key frame, 0 otherwise.
  29478. </p>
  29479. </dd>
  29480. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  29481. <dd><p>The picture type of the input frame (&quot;I&quot; for an I-frame, &quot;P&quot; for a
  29482. P-frame, &quot;B&quot; for a B-frame, or &quot;?&quot; for an unknown type).
  29483. Also refer to the documentation of the <code>AVPictureType</code> enum and of
  29484. the <code>av_get_picture_type_char</code> function defined in
  29485. &lsquo;<tt>libavutil/avutil.h</tt>&rsquo;.
  29486. </p>
  29487. </dd>
  29488. <dt>&lsquo;<samp>checksum</samp>&rsquo;</dt>
  29489. <dd><p>The Adler-32 checksum (printed in hexadecimal) of all the planes of the input frame.
  29490. </p>
  29491. </dd>
  29492. <dt>&lsquo;<samp>plane_checksum</samp>&rsquo;</dt>
  29493. <dd><p>The Adler-32 checksum (printed in hexadecimal) of each plane of the input frame,
  29494. expressed in the form &quot;[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var>]&quot;.
  29495. </p>
  29496. </dd>
  29497. <dt>&lsquo;<samp>mean</samp>&rsquo;</dt>
  29498. <dd><p>The mean value of pixels in each plane of the input frame, expressed in the form
  29499. &quot;[<var>mean0</var> <var>mean1</var> <var>mean2</var> <var>mean3</var>]&quot;.
  29500. </p>
  29501. </dd>
  29502. <dt>&lsquo;<samp>stdev</samp>&rsquo;</dt>
  29503. <dd><p>The standard deviation of pixel values in each plane of the input frame, expressed
  29504. in the form &quot;[<var>stdev0</var> <var>stdev1</var> <var>stdev2</var> <var>stdev3</var>]&quot;.
  29505. </p>
  29506. </dd>
  29507. </dl>
  29508. <a name="showpalette"></a>
  29509. <h2 class="section"><a href="ffplay-all.html#toc-showpalette">30.184 showpalette</a></h2>
  29510. <p>Displays the 256 colors palette of each frame. This filter is only relevant for
  29511. <var>pal8</var> pixel format frames.
  29512. </p>
  29513. <p>It accepts the following option:
  29514. </p>
  29515. <dl compact="compact">
  29516. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  29517. <dd><p>Set the size of the box used to represent one palette color entry. Default is
  29518. <code>30</code> (for a <code>30x30</code> pixel box).
  29519. </p></dd>
  29520. </dl>
  29521. <a name="shuffleframes"></a>
  29522. <h2 class="section"><a href="ffplay-all.html#toc-shuffleframes">30.185 shuffleframes</a></h2>
  29523. <p>Reorder and/or duplicate and/or drop video frames.
  29524. </p>
  29525. <p>It accepts the following parameters:
  29526. </p>
  29527. <dl compact="compact">
  29528. <dt>&lsquo;<samp>mapping</samp>&rsquo;</dt>
  29529. <dd><p>Set the destination indexes of input frames.
  29530. This is space or &rsquo;|&rsquo; separated list of indexes that maps input frames to output
  29531. frames. Number of indexes also sets maximal value that each index may have.
  29532. &rsquo;-1&rsquo; index have special meaning and that is to drop frame.
  29533. </p></dd>
  29534. </dl>
  29535. <p>The first frame has the index 0. The default is to keep the input unchanged.
  29536. </p>
  29537. <a name="Examples-77"></a>
  29538. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-77">30.185.1 Examples</a></h3>
  29539. <ul>
  29540. <li>
  29541. Swap second and third frame of every three frames of the input:
  29542. <div class="example">
  29543. <pre class="example">ffmpeg -i INPUT -vf &quot;shuffleframes=0 2 1&quot; OUTPUT
  29544. </pre></div>
  29545. </li><li>
  29546. Swap 10th and 1st frame of every ten frames of the input:
  29547. <div class="example">
  29548. <pre class="example">ffmpeg -i INPUT -vf &quot;shuffleframes=9 1 2 3 4 5 6 7 8 0&quot; OUTPUT
  29549. </pre></div>
  29550. </li></ul>
  29551. <a name="shuffleplanes"></a>
  29552. <h2 class="section"><a href="ffplay-all.html#toc-shuffleplanes">30.186 shuffleplanes</a></h2>
  29553. <p>Reorder and/or duplicate video planes.
  29554. </p>
  29555. <p>It accepts the following parameters:
  29556. </p>
  29557. <dl compact="compact">
  29558. <dt>&lsquo;<samp>map0</samp>&rsquo;</dt>
  29559. <dd><p>The index of the input plane to be used as the first output plane.
  29560. </p>
  29561. </dd>
  29562. <dt>&lsquo;<samp>map1</samp>&rsquo;</dt>
  29563. <dd><p>The index of the input plane to be used as the second output plane.
  29564. </p>
  29565. </dd>
  29566. <dt>&lsquo;<samp>map2</samp>&rsquo;</dt>
  29567. <dd><p>The index of the input plane to be used as the third output plane.
  29568. </p>
  29569. </dd>
  29570. <dt>&lsquo;<samp>map3</samp>&rsquo;</dt>
  29571. <dd><p>The index of the input plane to be used as the fourth output plane.
  29572. </p>
  29573. </dd>
  29574. </dl>
  29575. <p>The first plane has the index 0. The default is to keep the input unchanged.
  29576. </p>
  29577. <a name="Examples-3"></a>
  29578. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-3">30.186.1 Examples</a></h3>
  29579. <ul>
  29580. <li>
  29581. Swap the second and third planes of the input:
  29582. <div class="example">
  29583. <pre class="example">ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
  29584. </pre></div>
  29585. </li></ul>
  29586. <p><a name="signalstats"></a>
  29587. </p><a name="signalstats-1"></a>
  29588. <h2 class="section"><a href="ffplay-all.html#toc-signalstats-1">30.187 signalstats</a></h2>
  29589. <p>Evaluate various visual metrics that assist in determining issues associated
  29590. with the digitization of analog video media.
  29591. </p>
  29592. <p>By default the filter will log these metadata values:
  29593. </p>
  29594. <dl compact="compact">
  29595. <dt>&lsquo;<samp>YMIN</samp>&rsquo;</dt>
  29596. <dd><p>Display the minimal Y value contained within the input frame. Expressed in
  29597. range of [0-255].
  29598. </p>
  29599. </dd>
  29600. <dt>&lsquo;<samp>YLOW</samp>&rsquo;</dt>
  29601. <dd><p>Display the Y value at the 10% percentile within the input frame. Expressed in
  29602. range of [0-255].
  29603. </p>
  29604. </dd>
  29605. <dt>&lsquo;<samp>YAVG</samp>&rsquo;</dt>
  29606. <dd><p>Display the average Y value within the input frame. Expressed in range of
  29607. [0-255].
  29608. </p>
  29609. </dd>
  29610. <dt>&lsquo;<samp>YHIGH</samp>&rsquo;</dt>
  29611. <dd><p>Display the Y value at the 90% percentile within the input frame. Expressed in
  29612. range of [0-255].
  29613. </p>
  29614. </dd>
  29615. <dt>&lsquo;<samp>YMAX</samp>&rsquo;</dt>
  29616. <dd><p>Display the maximum Y value contained within the input frame. Expressed in
  29617. range of [0-255].
  29618. </p>
  29619. </dd>
  29620. <dt>&lsquo;<samp>UMIN</samp>&rsquo;</dt>
  29621. <dd><p>Display the minimal U value contained within the input frame. Expressed in
  29622. range of [0-255].
  29623. </p>
  29624. </dd>
  29625. <dt>&lsquo;<samp>ULOW</samp>&rsquo;</dt>
  29626. <dd><p>Display the U value at the 10% percentile within the input frame. Expressed in
  29627. range of [0-255].
  29628. </p>
  29629. </dd>
  29630. <dt>&lsquo;<samp>UAVG</samp>&rsquo;</dt>
  29631. <dd><p>Display the average U value within the input frame. Expressed in range of
  29632. [0-255].
  29633. </p>
  29634. </dd>
  29635. <dt>&lsquo;<samp>UHIGH</samp>&rsquo;</dt>
  29636. <dd><p>Display the U value at the 90% percentile within the input frame. Expressed in
  29637. range of [0-255].
  29638. </p>
  29639. </dd>
  29640. <dt>&lsquo;<samp>UMAX</samp>&rsquo;</dt>
  29641. <dd><p>Display the maximum U value contained within the input frame. Expressed in
  29642. range of [0-255].
  29643. </p>
  29644. </dd>
  29645. <dt>&lsquo;<samp>VMIN</samp>&rsquo;</dt>
  29646. <dd><p>Display the minimal V value contained within the input frame. Expressed in
  29647. range of [0-255].
  29648. </p>
  29649. </dd>
  29650. <dt>&lsquo;<samp>VLOW</samp>&rsquo;</dt>
  29651. <dd><p>Display the V value at the 10% percentile within the input frame. Expressed in
  29652. range of [0-255].
  29653. </p>
  29654. </dd>
  29655. <dt>&lsquo;<samp>VAVG</samp>&rsquo;</dt>
  29656. <dd><p>Display the average V value within the input frame. Expressed in range of
  29657. [0-255].
  29658. </p>
  29659. </dd>
  29660. <dt>&lsquo;<samp>VHIGH</samp>&rsquo;</dt>
  29661. <dd><p>Display the V value at the 90% percentile within the input frame. Expressed in
  29662. range of [0-255].
  29663. </p>
  29664. </dd>
  29665. <dt>&lsquo;<samp>VMAX</samp>&rsquo;</dt>
  29666. <dd><p>Display the maximum V value contained within the input frame. Expressed in
  29667. range of [0-255].
  29668. </p>
  29669. </dd>
  29670. <dt>&lsquo;<samp>SATMIN</samp>&rsquo;</dt>
  29671. <dd><p>Display the minimal saturation value contained within the input frame.
  29672. Expressed in range of [0-~181.02].
  29673. </p>
  29674. </dd>
  29675. <dt>&lsquo;<samp>SATLOW</samp>&rsquo;</dt>
  29676. <dd><p>Display the saturation value at the 10% percentile within the input frame.
  29677. Expressed in range of [0-~181.02].
  29678. </p>
  29679. </dd>
  29680. <dt>&lsquo;<samp>SATAVG</samp>&rsquo;</dt>
  29681. <dd><p>Display the average saturation value within the input frame. Expressed in range
  29682. of [0-~181.02].
  29683. </p>
  29684. </dd>
  29685. <dt>&lsquo;<samp>SATHIGH</samp>&rsquo;</dt>
  29686. <dd><p>Display the saturation value at the 90% percentile within the input frame.
  29687. Expressed in range of [0-~181.02].
  29688. </p>
  29689. </dd>
  29690. <dt>&lsquo;<samp>SATMAX</samp>&rsquo;</dt>
  29691. <dd><p>Display the maximum saturation value contained within the input frame.
  29692. Expressed in range of [0-~181.02].
  29693. </p>
  29694. </dd>
  29695. <dt>&lsquo;<samp>HUEMED</samp>&rsquo;</dt>
  29696. <dd><p>Display the median value for hue within the input frame. Expressed in range of
  29697. [0-360].
  29698. </p>
  29699. </dd>
  29700. <dt>&lsquo;<samp>HUEAVG</samp>&rsquo;</dt>
  29701. <dd><p>Display the average value for hue within the input frame. Expressed in range of
  29702. [0-360].
  29703. </p>
  29704. </dd>
  29705. <dt>&lsquo;<samp>YDIF</samp>&rsquo;</dt>
  29706. <dd><p>Display the average of sample value difference between all values of the Y
  29707. plane in the current frame and corresponding values of the previous input frame.
  29708. Expressed in range of [0-255].
  29709. </p>
  29710. </dd>
  29711. <dt>&lsquo;<samp>UDIF</samp>&rsquo;</dt>
  29712. <dd><p>Display the average of sample value difference between all values of the U
  29713. plane in the current frame and corresponding values of the previous input frame.
  29714. Expressed in range of [0-255].
  29715. </p>
  29716. </dd>
  29717. <dt>&lsquo;<samp>VDIF</samp>&rsquo;</dt>
  29718. <dd><p>Display the average of sample value difference between all values of the V
  29719. plane in the current frame and corresponding values of the previous input frame.
  29720. Expressed in range of [0-255].
  29721. </p>
  29722. </dd>
  29723. <dt>&lsquo;<samp>YBITDEPTH</samp>&rsquo;</dt>
  29724. <dd><p>Display bit depth of Y plane in current frame.
  29725. Expressed in range of [0-16].
  29726. </p>
  29727. </dd>
  29728. <dt>&lsquo;<samp>UBITDEPTH</samp>&rsquo;</dt>
  29729. <dd><p>Display bit depth of U plane in current frame.
  29730. Expressed in range of [0-16].
  29731. </p>
  29732. </dd>
  29733. <dt>&lsquo;<samp>VBITDEPTH</samp>&rsquo;</dt>
  29734. <dd><p>Display bit depth of V plane in current frame.
  29735. Expressed in range of [0-16].
  29736. </p></dd>
  29737. </dl>
  29738. <p>The filter accepts the following options:
  29739. </p>
  29740. <dl compact="compact">
  29741. <dt>&lsquo;<samp>stat</samp>&rsquo;</dt>
  29742. <dt>&lsquo;<samp>out</samp>&rsquo;</dt>
  29743. <dd>
  29744. <p>&lsquo;<samp>stat</samp>&rsquo; specify an additional form of image analysis.
  29745. &lsquo;<samp>out</samp>&rsquo; output video with the specified type of pixel highlighted.
  29746. </p>
  29747. <p>Both options accept the following values:
  29748. </p>
  29749. <dl compact="compact">
  29750. <dt>&lsquo;<samp>tout</samp>&rsquo;</dt>
  29751. <dd><p>Identify <var>temporal outliers</var> pixels. A <var>temporal outlier</var> is a pixel
  29752. unlike the neighboring pixels of the same field. Examples of temporal outliers
  29753. include the results of video dropouts, head clogs, or tape tracking issues.
  29754. </p>
  29755. </dd>
  29756. <dt>&lsquo;<samp>vrep</samp>&rsquo;</dt>
  29757. <dd><p>Identify <var>vertical line repetition</var>. Vertical line repetition includes
  29758. similar rows of pixels within a frame. In born-digital video vertical line
  29759. repetition is common, but this pattern is uncommon in video digitized from an
  29760. analog source. When it occurs in video that results from the digitization of an
  29761. analog source it can indicate concealment from a dropout compensator.
  29762. </p>
  29763. </dd>
  29764. <dt>&lsquo;<samp>brng</samp>&rsquo;</dt>
  29765. <dd><p>Identify pixels that fall outside of legal broadcast range.
  29766. </p></dd>
  29767. </dl>
  29768. </dd>
  29769. <dt>&lsquo;<samp>color, c</samp>&rsquo;</dt>
  29770. <dd><p>Set the highlight color for the &lsquo;<samp>out</samp>&rsquo; option. The default color is
  29771. yellow.
  29772. </p></dd>
  29773. </dl>
  29774. <a name="Examples-133"></a>
  29775. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-133">30.187.1 Examples</a></h3>
  29776. <ul>
  29777. <li>
  29778. Output data of various video metrics:
  29779. <div class="example">
  29780. <pre class="example">ffprobe -f lavfi movie=example.mov,signalstats=&quot;stat=tout+vrep+brng&quot; -show_frames
  29781. </pre></div>
  29782. </li><li>
  29783. Output specific data about the minimum and maximum values of the Y plane per frame:
  29784. <div class="example">
  29785. <pre class="example">ffprobe -f lavfi movie=example.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN
  29786. </pre></div>
  29787. </li><li>
  29788. Playback video while highlighting pixels that are outside of broadcast range in red.
  29789. <div class="example">
  29790. <pre class="example">ffplay example.mov -vf signalstats=&quot;out=brng:color=red&quot;
  29791. </pre></div>
  29792. </li><li>
  29793. Playback video with signalstats metadata drawn over the frame.
  29794. <div class="example">
  29795. <pre class="example">ffplay example.mov -vf signalstats=stat=brng+vrep+tout,drawtext=fontfile=FreeSerif.ttf:textfile=signalstat_drawtext.txt
  29796. </pre></div>
  29797. <p>The contents of signalstat_drawtext.txt used in the command are:
  29798. </p><div class="example">
  29799. <pre class="example">time %{pts:hms}
  29800. Y (%{metadata:lavfi.signalstats.YMIN}-%{metadata:lavfi.signalstats.YMAX})
  29801. U (%{metadata:lavfi.signalstats.UMIN}-%{metadata:lavfi.signalstats.UMAX})
  29802. V (%{metadata:lavfi.signalstats.VMIN}-%{metadata:lavfi.signalstats.VMAX})
  29803. saturation maximum: %{metadata:lavfi.signalstats.SATMAX}
  29804. </pre></div>
  29805. </li></ul>
  29806. <p><a name="signature"></a>
  29807. </p><a name="signature-1"></a>
  29808. <h2 class="section"><a href="ffplay-all.html#toc-signature-1">30.188 signature</a></h2>
  29809. <p>Calculates the MPEG-7 Video Signature. The filter can handle more than one
  29810. input. In this case the matching between the inputs can be calculated additionally.
  29811. The filter always passes through the first input. The signature of each stream can
  29812. be written into a file.
  29813. </p>
  29814. <p>It accepts the following options:
  29815. </p>
  29816. <dl compact="compact">
  29817. <dt>&lsquo;<samp>detectmode</samp>&rsquo;</dt>
  29818. <dd><p>Enable or disable the matching process.
  29819. </p>
  29820. <p>Available values are:
  29821. </p>
  29822. <dl compact="compact">
  29823. <dt>&lsquo;<samp>off</samp>&rsquo;</dt>
  29824. <dd><p>Disable the calculation of a matching (default).
  29825. </p></dd>
  29826. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  29827. <dd><p>Calculate the matching for the whole video and output whether the whole video
  29828. matches or only parts.
  29829. </p></dd>
  29830. <dt>&lsquo;<samp>fast</samp>&rsquo;</dt>
  29831. <dd><p>Calculate only until a matching is found or the video ends. Should be faster in
  29832. some cases.
  29833. </p></dd>
  29834. </dl>
  29835. </dd>
  29836. <dt>&lsquo;<samp>nb_inputs</samp>&rsquo;</dt>
  29837. <dd><p>Set the number of inputs. The option value must be a non negative integer.
  29838. Default value is 1.
  29839. </p>
  29840. </dd>
  29841. <dt>&lsquo;<samp>filename</samp>&rsquo;</dt>
  29842. <dd><p>Set the path to which the output is written. If there is more than one input,
  29843. the path must be a prototype, i.e. must contain %d or %0nd (where n is a positive
  29844. integer), that will be replaced with the input number. If no filename is
  29845. specified, no output will be written. This is the default.
  29846. </p>
  29847. </dd>
  29848. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  29849. <dd><p>Choose the output format.
  29850. </p>
  29851. <p>Available values are:
  29852. </p>
  29853. <dl compact="compact">
  29854. <dt>&lsquo;<samp>binary</samp>&rsquo;</dt>
  29855. <dd><p>Use the specified binary representation (default).
  29856. </p></dd>
  29857. <dt>&lsquo;<samp>xml</samp>&rsquo;</dt>
  29858. <dd><p>Use the specified xml representation.
  29859. </p></dd>
  29860. </dl>
  29861. </dd>
  29862. <dt>&lsquo;<samp>th_d</samp>&rsquo;</dt>
  29863. <dd><p>Set threshold to detect one word as similar. The option value must be an integer
  29864. greater than zero. The default value is 9000.
  29865. </p>
  29866. </dd>
  29867. <dt>&lsquo;<samp>th_dc</samp>&rsquo;</dt>
  29868. <dd><p>Set threshold to detect all words as similar. The option value must be an integer
  29869. greater than zero. The default value is 60000.
  29870. </p>
  29871. </dd>
  29872. <dt>&lsquo;<samp>th_xh</samp>&rsquo;</dt>
  29873. <dd><p>Set threshold to detect frames as similar. The option value must be an integer
  29874. greater than zero. The default value is 116.
  29875. </p>
  29876. </dd>
  29877. <dt>&lsquo;<samp>th_di</samp>&rsquo;</dt>
  29878. <dd><p>Set the minimum length of a sequence in frames to recognize it as matching
  29879. sequence. The option value must be a non negative integer value.
  29880. The default value is 0.
  29881. </p>
  29882. </dd>
  29883. <dt>&lsquo;<samp>th_it</samp>&rsquo;</dt>
  29884. <dd><p>Set the minimum relation, that matching frames to all frames must have.
  29885. The option value must be a double value between 0 and 1. The default value is 0.5.
  29886. </p></dd>
  29887. </dl>
  29888. <a name="Examples-84"></a>
  29889. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-84">30.188.1 Examples</a></h3>
  29890. <ul>
  29891. <li>
  29892. To calculate the signature of an input video and store it in signature.bin:
  29893. <div class="example">
  29894. <pre class="example">ffmpeg -i input.mkv -vf signature=filename=signature.bin -map 0:v -f null -
  29895. </pre></div>
  29896. </li><li>
  29897. To detect whether two videos match and store the signatures in XML format in
  29898. signature0.xml and signature1.xml:
  29899. <div class="example">
  29900. <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 -
  29901. </pre></div>
  29902. </li></ul>
  29903. <p><a name="smartblur"></a>
  29904. </p><a name="smartblur-1"></a>
  29905. <h2 class="section"><a href="ffplay-all.html#toc-smartblur-1">30.189 smartblur</a></h2>
  29906. <p>Blur the input video without impacting the outlines.
  29907. </p>
  29908. <p>It accepts the following options:
  29909. </p>
  29910. <dl compact="compact">
  29911. <dt>&lsquo;<samp>luma_radius, lr</samp>&rsquo;</dt>
  29912. <dd><p>Set the luma radius. The option value must be a float number in
  29913. the range [0.1,5.0] that specifies the variance of the gaussian filter
  29914. used to blur the image (slower if larger). Default value is 1.0.
  29915. </p>
  29916. </dd>
  29917. <dt>&lsquo;<samp>luma_strength, ls</samp>&rsquo;</dt>
  29918. <dd><p>Set the luma strength. The option value must be a float number
  29919. in the range [-1.0,1.0] that configures the blurring. A value included
  29920. in [0.0,1.0] will blur the image whereas a value included in
  29921. [-1.0,0.0] will sharpen the image. Default value is 1.0.
  29922. </p>
  29923. </dd>
  29924. <dt>&lsquo;<samp>luma_threshold, lt</samp>&rsquo;</dt>
  29925. <dd><p>Set the luma threshold used as a coefficient to determine
  29926. whether a pixel should be blurred or not. The option value must be an
  29927. integer in the range [-30,30]. A value of 0 will filter all the image,
  29928. a value included in [0,30] will filter flat areas and a value included
  29929. in [-30,0] will filter edges. Default value is 0.
  29930. </p>
  29931. </dd>
  29932. <dt>&lsquo;<samp>chroma_radius, cr</samp>&rsquo;</dt>
  29933. <dd><p>Set the chroma radius. The option value must be a float number in
  29934. the range [0.1,5.0] that specifies the variance of the gaussian filter
  29935. used to blur the image (slower if larger). Default value is &lsquo;<samp>luma_radius</samp>&rsquo;.
  29936. </p>
  29937. </dd>
  29938. <dt>&lsquo;<samp>chroma_strength, cs</samp>&rsquo;</dt>
  29939. <dd><p>Set the chroma strength. The option value must be a float number
  29940. in the range [-1.0,1.0] that configures the blurring. A value included
  29941. in [0.0,1.0] will blur the image whereas a value included in
  29942. [-1.0,0.0] will sharpen the image. Default value is &lsquo;<samp>luma_strength</samp>&rsquo;.
  29943. </p>
  29944. </dd>
  29945. <dt>&lsquo;<samp>chroma_threshold, ct</samp>&rsquo;</dt>
  29946. <dd><p>Set the chroma threshold used as a coefficient to determine
  29947. whether a pixel should be blurred or not. The option value must be an
  29948. integer in the range [-30,30]. A value of 0 will filter all the image,
  29949. a value included in [0,30] will filter flat areas and a value included
  29950. in [-30,0] will filter edges. Default value is &lsquo;<samp>luma_threshold</samp>&rsquo;.
  29951. </p></dd>
  29952. </dl>
  29953. <p>If a chroma option is not explicitly set, the corresponding luma value
  29954. is set.
  29955. </p>
  29956. <a name="sobel"></a>
  29957. <h2 class="section"><a href="ffplay-all.html#toc-sobel">30.190 sobel</a></h2>
  29958. <p>Apply sobel operator to input video stream.
  29959. </p>
  29960. <p>The filter accepts the following option:
  29961. </p>
  29962. <dl compact="compact">
  29963. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  29964. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  29965. By default value 0xf, all planes will be processed.
  29966. </p>
  29967. </dd>
  29968. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  29969. <dd><p>Set value which will be multiplied with filtered result.
  29970. </p>
  29971. </dd>
  29972. <dt>&lsquo;<samp>delta</samp>&rsquo;</dt>
  29973. <dd><p>Set value which will be added to filtered result.
  29974. </p></dd>
  29975. </dl>
  29976. <p><a name="spp"></a>
  29977. </p><a name="spp-1"></a>
  29978. <h2 class="section"><a href="ffplay-all.html#toc-spp-1">30.191 spp</a></h2>
  29979. <p>Apply a simple postprocessing filter that compresses and decompresses the image
  29980. at several (or - in the case of &lsquo;<samp>quality</samp>&rsquo; level <code>6</code> - all) shifts
  29981. and average the results.
  29982. </p>
  29983. <p>The filter accepts the following options:
  29984. </p>
  29985. <dl compact="compact">
  29986. <dt>&lsquo;<samp>quality</samp>&rsquo;</dt>
  29987. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  29988. an integer in the range 0-6. If set to <code>0</code>, the filter will have no
  29989. effect. A value of <code>6</code> means the higher quality. For each increment of
  29990. that value the speed drops by a factor of approximately 2. Default value is
  29991. <code>3</code>.
  29992. </p>
  29993. </dd>
  29994. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  29995. <dd><p>Force a constant quantization parameter. If not set, the filter will use the QP
  29996. from the video stream (if available).
  29997. </p>
  29998. </dd>
  29999. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  30000. <dd><p>Set thresholding mode. Available modes are:
  30001. </p>
  30002. <dl compact="compact">
  30003. <dt>&lsquo;<samp>hard</samp>&rsquo;</dt>
  30004. <dd><p>Set hard thresholding (default).
  30005. </p></dd>
  30006. <dt>&lsquo;<samp>soft</samp>&rsquo;</dt>
  30007. <dd><p>Set soft thresholding (better de-ringing effect, but likely blurrier).
  30008. </p></dd>
  30009. </dl>
  30010. </dd>
  30011. <dt>&lsquo;<samp>use_bframe_qp</samp>&rsquo;</dt>
  30012. <dd><p>Enable the use of the QP from the B-Frames if set to <code>1</code>. Using this
  30013. option may cause flicker since the B-Frames have often larger QP. Default is
  30014. <code>0</code> (not enabled).
  30015. </p></dd>
  30016. </dl>
  30017. <a name="Commands-35"></a>
  30018. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-35">30.191.1 Commands</a></h3>
  30019. <p>This filter supports the following commands:
  30020. </p><dl compact="compact">
  30021. <dt>&lsquo;<samp>quality, level</samp>&rsquo;</dt>
  30022. <dd><p>Set quality level. The value <code>max</code> can be used to set the maximum level,
  30023. currently <code>6</code>.
  30024. </p></dd>
  30025. </dl>
  30026. <a name="sr"></a>
  30027. <h2 class="section"><a href="ffplay-all.html#toc-sr">30.192 sr</a></h2>
  30028. <p>Scale the input by applying one of the super-resolution methods based on
  30029. convolutional neural networks. Supported models:
  30030. </p>
  30031. <ul>
  30032. <li>
  30033. Super-Resolution Convolutional Neural Network model (SRCNN).
  30034. See <a href="https://arxiv.org/abs/1501.00092">https://arxiv.org/abs/1501.00092</a>.
  30035. </li><li>
  30036. Efficient Sub-Pixel Convolutional Neural Network model (ESPCN).
  30037. See <a href="https://arxiv.org/abs/1609.05158">https://arxiv.org/abs/1609.05158</a>.
  30038. </li></ul>
  30039. <p>Training scripts as well as scripts for model file (.pb) saving can be found at
  30040. <a href="https://github.com/XueweiMeng/sr/tree/sr_dnn_native">https://github.com/XueweiMeng/sr/tree/sr_dnn_native</a>. Original repository
  30041. is at <a href="https://github.com/HighVoltageRocknRoll/sr.git">https://github.com/HighVoltageRocknRoll/sr.git</a>.
  30042. </p>
  30043. <p>Native model files (.model) can be generated from TensorFlow model
  30044. files (.pb) by using tools/python/convert.py
  30045. </p>
  30046. <p>The filter accepts the following options:
  30047. </p>
  30048. <dl compact="compact">
  30049. <dt>&lsquo;<samp>dnn_backend</samp>&rsquo;</dt>
  30050. <dd><p>Specify which DNN backend to use for model loading and execution. This option accepts
  30051. the following values:
  30052. </p>
  30053. <dl compact="compact">
  30054. <dt>&lsquo;<samp>native</samp>&rsquo;</dt>
  30055. <dd><p>Native implementation of DNN loading and execution.
  30056. </p>
  30057. </dd>
  30058. <dt>&lsquo;<samp>tensorflow</samp>&rsquo;</dt>
  30059. <dd><p>TensorFlow backend. To enable this backend you
  30060. need to install the TensorFlow for C library (see
  30061. <a href="https://www.tensorflow.org/install/install_c">https://www.tensorflow.org/install/install_c</a>) and configure FFmpeg with
  30062. <code>--enable-libtensorflow</code>
  30063. </p></dd>
  30064. </dl>
  30065. <p>Default value is &lsquo;<samp>native</samp>&rsquo;.
  30066. </p>
  30067. </dd>
  30068. <dt>&lsquo;<samp>model</samp>&rsquo;</dt>
  30069. <dd><p>Set path to model file specifying network architecture and its parameters.
  30070. Note that different backends use different file formats. TensorFlow backend
  30071. can load files for both formats, while native backend can load files for only
  30072. its format.
  30073. </p>
  30074. </dd>
  30075. <dt>&lsquo;<samp>scale_factor</samp>&rsquo;</dt>
  30076. <dd><p>Set scale factor for SRCNN model. Allowed values are <code>2</code>, <code>3</code> and <code>4</code>.
  30077. Default value is <code>2</code>. Scale factor is necessary for SRCNN model, because it accepts
  30078. input upscaled using bicubic upscaling with proper scale factor.
  30079. </p></dd>
  30080. </dl>
  30081. <a name="ssim"></a>
  30082. <h2 class="section"><a href="ffplay-all.html#toc-ssim">30.193 ssim</a></h2>
  30083. <p>Obtain the SSIM (Structural SImilarity Metric) between two input videos.
  30084. </p>
  30085. <p>This filter takes in input two input videos, the first input is
  30086. considered the &quot;main&quot; source and is passed unchanged to the
  30087. output. The second input is used as a &quot;reference&quot; video for computing
  30088. the SSIM.
  30089. </p>
  30090. <p>Both video inputs must have the same resolution and pixel format for
  30091. this filter to work correctly. Also it assumes that both inputs
  30092. have the same number of frames, which are compared one by one.
  30093. </p>
  30094. <p>The filter stores the calculated SSIM of each frame.
  30095. </p>
  30096. <p>The description of the accepted parameters follows.
  30097. </p>
  30098. <dl compact="compact">
  30099. <dt>&lsquo;<samp>stats_file, f</samp>&rsquo;</dt>
  30100. <dd><p>If specified the filter will use the named file to save the SSIM of
  30101. each individual frame. When filename equals &quot;-&quot; the data is sent to
  30102. standard output.
  30103. </p></dd>
  30104. </dl>
  30105. <p>The file printed if <var>stats_file</var> is selected, contains a sequence of
  30106. key/value pairs of the form <var>key</var>:<var>value</var> for each compared
  30107. couple of frames.
  30108. </p>
  30109. <p>A description of each shown parameter follows:
  30110. </p>
  30111. <dl compact="compact">
  30112. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  30113. <dd><p>sequential number of the input frame, starting from 1
  30114. </p>
  30115. </dd>
  30116. <dt>&lsquo;<samp>Y, U, V, R, G, B</samp>&rsquo;</dt>
  30117. <dd><p>SSIM of the compared frames for the component specified by the suffix.
  30118. </p>
  30119. </dd>
  30120. <dt>&lsquo;<samp>All</samp>&rsquo;</dt>
  30121. <dd><p>SSIM of the compared frames for the whole frame.
  30122. </p>
  30123. </dd>
  30124. <dt>&lsquo;<samp>dB</samp>&rsquo;</dt>
  30125. <dd><p>Same as above but in dB representation.
  30126. </p></dd>
  30127. </dl>
  30128. <p>This filter also supports the <a href="#framesync">framesync</a> options.
  30129. </p>
  30130. <a name="Examples-131"></a>
  30131. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-131">30.193.1 Examples</a></h3>
  30132. <ul>
  30133. <li>
  30134. For example:
  30135. <div class="example">
  30136. <pre class="example">movie=ref_movie.mpg, setpts=PTS-STARTPTS [main];
  30137. [main][ref] ssim=&quot;stats_file=stats.log&quot; [out]
  30138. </pre></div>
  30139. <p>On this example the input file being processed is compared with the
  30140. reference file &lsquo;<tt>ref_movie.mpg</tt>&rsquo;. The SSIM of each individual frame
  30141. is stored in &lsquo;<tt>stats.log</tt>&rsquo;.
  30142. </p>
  30143. </li><li>
  30144. Another example with both psnr and ssim at same time:
  30145. <div class="example">
  30146. <pre class="example">ffmpeg -i main.mpg -i ref.mpg -lavfi &quot;ssim;[0:v][1:v]psnr&quot; -f null -
  30147. </pre></div>
  30148. </li><li>
  30149. Another example with different containers:
  30150. <div class="example">
  30151. <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 -
  30152. </pre></div>
  30153. </li></ul>
  30154. <a name="stereo3d"></a>
  30155. <h2 class="section"><a href="ffplay-all.html#toc-stereo3d">30.194 stereo3d</a></h2>
  30156. <p>Convert between different stereoscopic image formats.
  30157. </p>
  30158. <p>The filters accept the following options:
  30159. </p>
  30160. <dl compact="compact">
  30161. <dt>&lsquo;<samp>in</samp>&rsquo;</dt>
  30162. <dd><p>Set stereoscopic image format of input.
  30163. </p>
  30164. <p>Available values for input image formats are:
  30165. </p><dl compact="compact">
  30166. <dt>&lsquo;<samp>sbsl</samp>&rsquo;</dt>
  30167. <dd><p>side by side parallel (left eye left, right eye right)
  30168. </p>
  30169. </dd>
  30170. <dt>&lsquo;<samp>sbsr</samp>&rsquo;</dt>
  30171. <dd><p>side by side crosseye (right eye left, left eye right)
  30172. </p>
  30173. </dd>
  30174. <dt>&lsquo;<samp>sbs2l</samp>&rsquo;</dt>
  30175. <dd><p>side by side parallel with half width resolution
  30176. (left eye left, right eye right)
  30177. </p>
  30178. </dd>
  30179. <dt>&lsquo;<samp>sbs2r</samp>&rsquo;</dt>
  30180. <dd><p>side by side crosseye with half width resolution
  30181. (right eye left, left eye right)
  30182. </p>
  30183. </dd>
  30184. <dt>&lsquo;<samp>abl</samp>&rsquo;</dt>
  30185. <dt>&lsquo;<samp>tbl</samp>&rsquo;</dt>
  30186. <dd><p>above-below (left eye above, right eye below)
  30187. </p>
  30188. </dd>
  30189. <dt>&lsquo;<samp>abr</samp>&rsquo;</dt>
  30190. <dt>&lsquo;<samp>tbr</samp>&rsquo;</dt>
  30191. <dd><p>above-below (right eye above, left eye below)
  30192. </p>
  30193. </dd>
  30194. <dt>&lsquo;<samp>ab2l</samp>&rsquo;</dt>
  30195. <dt>&lsquo;<samp>tb2l</samp>&rsquo;</dt>
  30196. <dd><p>above-below with half height resolution
  30197. (left eye above, right eye below)
  30198. </p>
  30199. </dd>
  30200. <dt>&lsquo;<samp>ab2r</samp>&rsquo;</dt>
  30201. <dt>&lsquo;<samp>tb2r</samp>&rsquo;</dt>
  30202. <dd><p>above-below with half height resolution
  30203. (right eye above, left eye below)
  30204. </p>
  30205. </dd>
  30206. <dt>&lsquo;<samp>al</samp>&rsquo;</dt>
  30207. <dd><p>alternating frames (left eye first, right eye second)
  30208. </p>
  30209. </dd>
  30210. <dt>&lsquo;<samp>ar</samp>&rsquo;</dt>
  30211. <dd><p>alternating frames (right eye first, left eye second)
  30212. </p>
  30213. </dd>
  30214. <dt>&lsquo;<samp>irl</samp>&rsquo;</dt>
  30215. <dd><p>interleaved rows (left eye has top row, right eye starts on next row)
  30216. </p>
  30217. </dd>
  30218. <dt>&lsquo;<samp>irr</samp>&rsquo;</dt>
  30219. <dd><p>interleaved rows (right eye has top row, left eye starts on next row)
  30220. </p>
  30221. </dd>
  30222. <dt>&lsquo;<samp>icl</samp>&rsquo;</dt>
  30223. <dd><p>interleaved columns, left eye first
  30224. </p>
  30225. </dd>
  30226. <dt>&lsquo;<samp>icr</samp>&rsquo;</dt>
  30227. <dd><p>interleaved columns, right eye first
  30228. </p>
  30229. <p>Default value is &lsquo;<samp>sbsl</samp>&rsquo;.
  30230. </p></dd>
  30231. </dl>
  30232. </dd>
  30233. <dt>&lsquo;<samp>out</samp>&rsquo;</dt>
  30234. <dd><p>Set stereoscopic image format of output.
  30235. </p>
  30236. <dl compact="compact">
  30237. <dt>&lsquo;<samp>sbsl</samp>&rsquo;</dt>
  30238. <dd><p>side by side parallel (left eye left, right eye right)
  30239. </p>
  30240. </dd>
  30241. <dt>&lsquo;<samp>sbsr</samp>&rsquo;</dt>
  30242. <dd><p>side by side crosseye (right eye left, left eye right)
  30243. </p>
  30244. </dd>
  30245. <dt>&lsquo;<samp>sbs2l</samp>&rsquo;</dt>
  30246. <dd><p>side by side parallel with half width resolution
  30247. (left eye left, right eye right)
  30248. </p>
  30249. </dd>
  30250. <dt>&lsquo;<samp>sbs2r</samp>&rsquo;</dt>
  30251. <dd><p>side by side crosseye with half width resolution
  30252. (right eye left, left eye right)
  30253. </p>
  30254. </dd>
  30255. <dt>&lsquo;<samp>abl</samp>&rsquo;</dt>
  30256. <dt>&lsquo;<samp>tbl</samp>&rsquo;</dt>
  30257. <dd><p>above-below (left eye above, right eye below)
  30258. </p>
  30259. </dd>
  30260. <dt>&lsquo;<samp>abr</samp>&rsquo;</dt>
  30261. <dt>&lsquo;<samp>tbr</samp>&rsquo;</dt>
  30262. <dd><p>above-below (right eye above, left eye below)
  30263. </p>
  30264. </dd>
  30265. <dt>&lsquo;<samp>ab2l</samp>&rsquo;</dt>
  30266. <dt>&lsquo;<samp>tb2l</samp>&rsquo;</dt>
  30267. <dd><p>above-below with half height resolution
  30268. (left eye above, right eye below)
  30269. </p>
  30270. </dd>
  30271. <dt>&lsquo;<samp>ab2r</samp>&rsquo;</dt>
  30272. <dt>&lsquo;<samp>tb2r</samp>&rsquo;</dt>
  30273. <dd><p>above-below with half height resolution
  30274. (right eye above, left eye below)
  30275. </p>
  30276. </dd>
  30277. <dt>&lsquo;<samp>al</samp>&rsquo;</dt>
  30278. <dd><p>alternating frames (left eye first, right eye second)
  30279. </p>
  30280. </dd>
  30281. <dt>&lsquo;<samp>ar</samp>&rsquo;</dt>
  30282. <dd><p>alternating frames (right eye first, left eye second)
  30283. </p>
  30284. </dd>
  30285. <dt>&lsquo;<samp>irl</samp>&rsquo;</dt>
  30286. <dd><p>interleaved rows (left eye has top row, right eye starts on next row)
  30287. </p>
  30288. </dd>
  30289. <dt>&lsquo;<samp>irr</samp>&rsquo;</dt>
  30290. <dd><p>interleaved rows (right eye has top row, left eye starts on next row)
  30291. </p>
  30292. </dd>
  30293. <dt>&lsquo;<samp>arbg</samp>&rsquo;</dt>
  30294. <dd><p>anaglyph red/blue gray
  30295. (red filter on left eye, blue filter on right eye)
  30296. </p>
  30297. </dd>
  30298. <dt>&lsquo;<samp>argg</samp>&rsquo;</dt>
  30299. <dd><p>anaglyph red/green gray
  30300. (red filter on left eye, green filter on right eye)
  30301. </p>
  30302. </dd>
  30303. <dt>&lsquo;<samp>arcg</samp>&rsquo;</dt>
  30304. <dd><p>anaglyph red/cyan gray
  30305. (red filter on left eye, cyan filter on right eye)
  30306. </p>
  30307. </dd>
  30308. <dt>&lsquo;<samp>arch</samp>&rsquo;</dt>
  30309. <dd><p>anaglyph red/cyan half colored
  30310. (red filter on left eye, cyan filter on right eye)
  30311. </p>
  30312. </dd>
  30313. <dt>&lsquo;<samp>arcc</samp>&rsquo;</dt>
  30314. <dd><p>anaglyph red/cyan color
  30315. (red filter on left eye, cyan filter on right eye)
  30316. </p>
  30317. </dd>
  30318. <dt>&lsquo;<samp>arcd</samp>&rsquo;</dt>
  30319. <dd><p>anaglyph red/cyan color optimized with the least squares projection of dubois
  30320. (red filter on left eye, cyan filter on right eye)
  30321. </p>
  30322. </dd>
  30323. <dt>&lsquo;<samp>agmg</samp>&rsquo;</dt>
  30324. <dd><p>anaglyph green/magenta gray
  30325. (green filter on left eye, magenta filter on right eye)
  30326. </p>
  30327. </dd>
  30328. <dt>&lsquo;<samp>agmh</samp>&rsquo;</dt>
  30329. <dd><p>anaglyph green/magenta half colored
  30330. (green filter on left eye, magenta filter on right eye)
  30331. </p>
  30332. </dd>
  30333. <dt>&lsquo;<samp>agmc</samp>&rsquo;</dt>
  30334. <dd><p>anaglyph green/magenta colored
  30335. (green filter on left eye, magenta filter on right eye)
  30336. </p>
  30337. </dd>
  30338. <dt>&lsquo;<samp>agmd</samp>&rsquo;</dt>
  30339. <dd><p>anaglyph green/magenta color optimized with the least squares projection of dubois
  30340. (green filter on left eye, magenta filter on right eye)
  30341. </p>
  30342. </dd>
  30343. <dt>&lsquo;<samp>aybg</samp>&rsquo;</dt>
  30344. <dd><p>anaglyph yellow/blue gray
  30345. (yellow filter on left eye, blue filter on right eye)
  30346. </p>
  30347. </dd>
  30348. <dt>&lsquo;<samp>aybh</samp>&rsquo;</dt>
  30349. <dd><p>anaglyph yellow/blue half colored
  30350. (yellow filter on left eye, blue filter on right eye)
  30351. </p>
  30352. </dd>
  30353. <dt>&lsquo;<samp>aybc</samp>&rsquo;</dt>
  30354. <dd><p>anaglyph yellow/blue colored
  30355. (yellow filter on left eye, blue filter on right eye)
  30356. </p>
  30357. </dd>
  30358. <dt>&lsquo;<samp>aybd</samp>&rsquo;</dt>
  30359. <dd><p>anaglyph yellow/blue color optimized with the least squares projection of dubois
  30360. (yellow filter on left eye, blue filter on right eye)
  30361. </p>
  30362. </dd>
  30363. <dt>&lsquo;<samp>ml</samp>&rsquo;</dt>
  30364. <dd><p>mono output (left eye only)
  30365. </p>
  30366. </dd>
  30367. <dt>&lsquo;<samp>mr</samp>&rsquo;</dt>
  30368. <dd><p>mono output (right eye only)
  30369. </p>
  30370. </dd>
  30371. <dt>&lsquo;<samp>chl</samp>&rsquo;</dt>
  30372. <dd><p>checkerboard, left eye first
  30373. </p>
  30374. </dd>
  30375. <dt>&lsquo;<samp>chr</samp>&rsquo;</dt>
  30376. <dd><p>checkerboard, right eye first
  30377. </p>
  30378. </dd>
  30379. <dt>&lsquo;<samp>icl</samp>&rsquo;</dt>
  30380. <dd><p>interleaved columns, left eye first
  30381. </p>
  30382. </dd>
  30383. <dt>&lsquo;<samp>icr</samp>&rsquo;</dt>
  30384. <dd><p>interleaved columns, right eye first
  30385. </p>
  30386. </dd>
  30387. <dt>&lsquo;<samp>hdmi</samp>&rsquo;</dt>
  30388. <dd><p>HDMI frame pack
  30389. </p></dd>
  30390. </dl>
  30391. <p>Default value is &lsquo;<samp>arcd</samp>&rsquo;.
  30392. </p></dd>
  30393. </dl>
  30394. <a name="Examples-21"></a>
  30395. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-21">30.194.1 Examples</a></h3>
  30396. <ul>
  30397. <li>
  30398. Convert input video from side by side parallel to anaglyph yellow/blue dubois:
  30399. <div class="example">
  30400. <pre class="example">stereo3d=sbsl:aybd
  30401. </pre></div>
  30402. </li><li>
  30403. Convert input video from above below (left eye above, right eye below) to side by side crosseye.
  30404. <div class="example">
  30405. <pre class="example">stereo3d=abl:sbsr
  30406. </pre></div>
  30407. </li></ul>
  30408. <a name="streamselect_002c-astreamselect"></a>
  30409. <h2 class="section"><a href="ffplay-all.html#toc-streamselect_002c-astreamselect">30.195 streamselect, astreamselect</a></h2>
  30410. <p>Select video or audio streams.
  30411. </p>
  30412. <p>The filter accepts the following options:
  30413. </p>
  30414. <dl compact="compact">
  30415. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  30416. <dd><p>Set number of inputs. Default is 2.
  30417. </p>
  30418. </dd>
  30419. <dt>&lsquo;<samp>map</samp>&rsquo;</dt>
  30420. <dd><p>Set input indexes to remap to outputs.
  30421. </p></dd>
  30422. </dl>
  30423. <a name="Commands-55"></a>
  30424. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-55">30.195.1 Commands</a></h3>
  30425. <p>The <code>streamselect</code> and <code>astreamselect</code> filter supports the following
  30426. commands:
  30427. </p>
  30428. <dl compact="compact">
  30429. <dt>&lsquo;<samp>map</samp>&rsquo;</dt>
  30430. <dd><p>Set input indexes to remap to outputs.
  30431. </p></dd>
  30432. </dl>
  30433. <a name="Examples-28"></a>
  30434. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-28">30.195.2 Examples</a></h3>
  30435. <ul>
  30436. <li>
  30437. Select first 5 seconds 1st stream and rest of time 2nd stream:
  30438. <div class="example">
  30439. <pre class="example">sendcmd='5.0 streamselect map 1',streamselect=inputs=2:map=0
  30440. </pre></div>
  30441. </li><li>
  30442. Same as above, but for audio:
  30443. <div class="example">
  30444. <pre class="example">asendcmd='5.0 astreamselect map 1',astreamselect=inputs=2:map=0
  30445. </pre></div>
  30446. </li></ul>
  30447. <p><a name="subtitles"></a>
  30448. </p><a name="subtitles-1"></a>
  30449. <h2 class="section"><a href="ffplay-all.html#toc-subtitles-1">30.196 subtitles</a></h2>
  30450. <p>Draw subtitles on top of input video using the libass library.
  30451. </p>
  30452. <p>To enable compilation of this filter you need to configure FFmpeg with
  30453. <code>--enable-libass</code>. This filter also requires a build with libavcodec and
  30454. libavformat to convert the passed subtitles file to ASS (Advanced Substation
  30455. Alpha) subtitles format.
  30456. </p>
  30457. <p>The filter accepts the following options:
  30458. </p>
  30459. <dl compact="compact">
  30460. <dt>&lsquo;<samp>filename, f</samp>&rsquo;</dt>
  30461. <dd><p>Set the filename of the subtitle file to read. It must be specified.
  30462. </p>
  30463. </dd>
  30464. <dt>&lsquo;<samp>original_size</samp>&rsquo;</dt>
  30465. <dd><p>Specify the size of the original video, the video for which the ASS file
  30466. was composed. For the syntax of this option, check the
  30467. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  30468. Due to a misdesign in ASS aspect ratio arithmetic, this is necessary to
  30469. correctly scale the fonts if the aspect ratio has been changed.
  30470. </p>
  30471. </dd>
  30472. <dt>&lsquo;<samp>fontsdir</samp>&rsquo;</dt>
  30473. <dd><p>Set a directory path containing fonts that can be used by the filter.
  30474. These fonts will be used in addition to whatever the font provider uses.
  30475. </p>
  30476. </dd>
  30477. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  30478. <dd><p>Process alpha channel, by default alpha channel is untouched.
  30479. </p>
  30480. </dd>
  30481. <dt>&lsquo;<samp>charenc</samp>&rsquo;</dt>
  30482. <dd><p>Set subtitles input character encoding. <code>subtitles</code> filter only. Only
  30483. useful if not UTF-8.
  30484. </p>
  30485. </dd>
  30486. <dt>&lsquo;<samp>stream_index, si</samp>&rsquo;</dt>
  30487. <dd><p>Set subtitles stream index. <code>subtitles</code> filter only.
  30488. </p>
  30489. </dd>
  30490. <dt>&lsquo;<samp>force_style</samp>&rsquo;</dt>
  30491. <dd><p>Override default style or script info parameters of the subtitles. It accepts a
  30492. string containing ASS style format <code>KEY=VALUE</code> couples separated by &quot;,&quot;.
  30493. </p></dd>
  30494. </dl>
  30495. <p>If the first key is not specified, it is assumed that the first value
  30496. specifies the &lsquo;<samp>filename</samp>&rsquo;.
  30497. </p>
  30498. <p>For example, to render the file &lsquo;<tt>sub.srt</tt>&rsquo; on top of the input
  30499. video, use the command:
  30500. </p><div class="example">
  30501. <pre class="example">subtitles=sub.srt
  30502. </pre></div>
  30503. <p>which is equivalent to:
  30504. </p><div class="example">
  30505. <pre class="example">subtitles=filename=sub.srt
  30506. </pre></div>
  30507. <p>To render the default subtitles stream from file &lsquo;<tt>video.mkv</tt>&rsquo;, use:
  30508. </p><div class="example">
  30509. <pre class="example">subtitles=video.mkv
  30510. </pre></div>
  30511. <p>To render the second subtitles stream from that file, use:
  30512. </p><div class="example">
  30513. <pre class="example">subtitles=video.mkv:si=1
  30514. </pre></div>
  30515. <p>To make the subtitles stream from &lsquo;<tt>sub.srt</tt>&rsquo; appear in 80% transparent blue
  30516. <code>DejaVu Serif</code>, use:
  30517. </p><div class="example">
  30518. <pre class="example">subtitles=sub.srt:force_style='FontName=DejaVu Serif,PrimaryColour=&amp;HCCFF0000'
  30519. </pre></div>
  30520. <a name="super2xsai"></a>
  30521. <h2 class="section"><a href="ffplay-all.html#toc-super2xsai">30.197 super2xsai</a></h2>
  30522. <p>Scale the input by 2x and smooth using the Super2xSaI (Scale and
  30523. Interpolate) pixel art scaling algorithm.
  30524. </p>
  30525. <p>Useful for enlarging pixel art images without reducing sharpness.
  30526. </p>
  30527. <a name="swaprect"></a>
  30528. <h2 class="section"><a href="ffplay-all.html#toc-swaprect">30.198 swaprect</a></h2>
  30529. <p>Swap two rectangular objects in video.
  30530. </p>
  30531. <p>This filter accepts the following options:
  30532. </p>
  30533. <dl compact="compact">
  30534. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  30535. <dd><p>Set object width.
  30536. </p>
  30537. </dd>
  30538. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  30539. <dd><p>Set object height.
  30540. </p>
  30541. </dd>
  30542. <dt>&lsquo;<samp>x1</samp>&rsquo;</dt>
  30543. <dd><p>Set 1st rect x coordinate.
  30544. </p>
  30545. </dd>
  30546. <dt>&lsquo;<samp>y1</samp>&rsquo;</dt>
  30547. <dd><p>Set 1st rect y coordinate.
  30548. </p>
  30549. </dd>
  30550. <dt>&lsquo;<samp>x2</samp>&rsquo;</dt>
  30551. <dd><p>Set 2nd rect x coordinate.
  30552. </p>
  30553. </dd>
  30554. <dt>&lsquo;<samp>y2</samp>&rsquo;</dt>
  30555. <dd><p>Set 2nd rect y coordinate.
  30556. </p>
  30557. <p>All expressions are evaluated once for each frame.
  30558. </p></dd>
  30559. </dl>
  30560. <p>The all options are expressions containing the following constants:
  30561. </p>
  30562. <dl compact="compact">
  30563. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  30564. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  30565. <dd><p>The input width and height.
  30566. </p>
  30567. </dd>
  30568. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  30569. <dd><p>same as <var>w</var> / <var>h</var>
  30570. </p>
  30571. </dd>
  30572. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  30573. <dd><p>input sample aspect ratio
  30574. </p>
  30575. </dd>
  30576. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  30577. <dd><p>input display aspect ratio, it is the same as (<var>w</var> / <var>h</var>) * <var>sar</var>
  30578. </p>
  30579. </dd>
  30580. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  30581. <dd><p>The number of the input frame, starting from 0.
  30582. </p>
  30583. </dd>
  30584. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  30585. <dd><p>The timestamp expressed in seconds. It&rsquo;s NAN if the input timestamp is unknown.
  30586. </p>
  30587. </dd>
  30588. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  30589. <dd><p>the position in the file of the input frame, NAN if unknown
  30590. </p></dd>
  30591. </dl>
  30592. <a name="swapuv"></a>
  30593. <h2 class="section"><a href="ffplay-all.html#toc-swapuv">30.199 swapuv</a></h2>
  30594. <p>Swap U &amp; V plane.
  30595. </p>
  30596. <a name="tblend"></a>
  30597. <h2 class="section"><a href="ffplay-all.html#toc-tblend">30.200 tblend</a></h2>
  30598. <p>Blend successive video frames.
  30599. </p>
  30600. <p>See <a href="#blend">blend</a>
  30601. </p>
  30602. <a name="telecine"></a>
  30603. <h2 class="section"><a href="ffplay-all.html#toc-telecine">30.201 telecine</a></h2>
  30604. <p>Apply telecine process to the video.
  30605. </p>
  30606. <p>This filter accepts the following options:
  30607. </p>
  30608. <dl compact="compact">
  30609. <dt>&lsquo;<samp>first_field</samp>&rsquo;</dt>
  30610. <dd><dl compact="compact">
  30611. <dt>&lsquo;<samp>top, t</samp>&rsquo;</dt>
  30612. <dd><p>top field first
  30613. </p></dd>
  30614. <dt>&lsquo;<samp>bottom, b</samp>&rsquo;</dt>
  30615. <dd><p>bottom field first
  30616. The default value is <code>top</code>.
  30617. </p></dd>
  30618. </dl>
  30619. </dd>
  30620. <dt>&lsquo;<samp>pattern</samp>&rsquo;</dt>
  30621. <dd><p>A string of numbers representing the pulldown pattern you wish to apply.
  30622. The default value is <code>23</code>.
  30623. </p></dd>
  30624. </dl>
  30625. <div class="example">
  30626. <pre class="example">Some typical patterns:
  30627. NTSC output (30i):
  30628. 27.5p: 32222
  30629. 24p: 23 (classic)
  30630. 24p: 2332 (preferred)
  30631. 20p: 33
  30632. 18p: 334
  30633. 16p: 3444
  30634. PAL output (25i):
  30635. 27.5p: 12222
  30636. 24p: 222222222223 (&quot;Euro pulldown&quot;)
  30637. 16.67p: 33
  30638. 16p: 33333334
  30639. </pre></div>
  30640. <a name="thistogram"></a>
  30641. <h2 class="section"><a href="ffplay-all.html#toc-thistogram">30.202 thistogram</a></h2>
  30642. <p>Compute and draw a color distribution histogram for the input video across time.
  30643. </p>
  30644. <p>Unlike <a href="#histogram">histogram</a> video filter which only shows histogram of single input frame
  30645. at certain time, this filter shows also past histograms of number of frames defined
  30646. by <code>width</code> option.
  30647. </p>
  30648. <p>The computed histogram is a representation of the color component
  30649. distribution in an image.
  30650. </p>
  30651. <p>The filter accepts the following options:
  30652. </p>
  30653. <dl compact="compact">
  30654. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  30655. <dd><p>Set width of single color component output. Default value is <code>0</code>.
  30656. Value of <code>0</code> means width will be picked from input video.
  30657. This also set number of passed histograms to keep.
  30658. Allowed range is [0, 8192].
  30659. </p>
  30660. </dd>
  30661. <dt>&lsquo;<samp>display_mode, d</samp>&rsquo;</dt>
  30662. <dd><p>Set display mode.
  30663. It accepts the following values:
  30664. </p><dl compact="compact">
  30665. <dt>&lsquo;<samp>stack</samp>&rsquo;</dt>
  30666. <dd><p>Per color component graphs are placed below each other.
  30667. </p>
  30668. </dd>
  30669. <dt>&lsquo;<samp>parade</samp>&rsquo;</dt>
  30670. <dd><p>Per color component graphs are placed side by side.
  30671. </p>
  30672. </dd>
  30673. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  30674. <dd><p>Presents information identical to that in the <code>parade</code>, except
  30675. that the graphs representing color components are superimposed directly
  30676. over one another.
  30677. </p></dd>
  30678. </dl>
  30679. <p>Default is <code>stack</code>.
  30680. </p>
  30681. </dd>
  30682. <dt>&lsquo;<samp>levels_mode, m</samp>&rsquo;</dt>
  30683. <dd><p>Set mode. Can be either <code>linear</code>, or <code>logarithmic</code>.
  30684. Default is <code>linear</code>.
  30685. </p>
  30686. </dd>
  30687. <dt>&lsquo;<samp>components, c</samp>&rsquo;</dt>
  30688. <dd><p>Set what color components to display.
  30689. Default is <code>7</code>.
  30690. </p>
  30691. </dd>
  30692. <dt>&lsquo;<samp>bgopacity, b</samp>&rsquo;</dt>
  30693. <dd><p>Set background opacity. Default is <code>0.9</code>.
  30694. </p>
  30695. </dd>
  30696. <dt>&lsquo;<samp>envelope, e</samp>&rsquo;</dt>
  30697. <dd><p>Show envelope. Default is disabled.
  30698. </p>
  30699. </dd>
  30700. <dt>&lsquo;<samp>ecolor, ec</samp>&rsquo;</dt>
  30701. <dd><p>Set envelope color. Default is <code>gold</code>.
  30702. </p></dd>
  30703. </dl>
  30704. <a name="threshold"></a>
  30705. <h2 class="section"><a href="ffplay-all.html#toc-threshold">30.203 threshold</a></h2>
  30706. <p>Apply threshold effect to video stream.
  30707. </p>
  30708. <p>This filter needs four video streams to perform thresholding.
  30709. First stream is stream we are filtering.
  30710. Second stream is holding threshold values, third stream is holding min values,
  30711. and last, fourth stream is holding max values.
  30712. </p>
  30713. <p>The filter accepts the following option:
  30714. </p>
  30715. <dl compact="compact">
  30716. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  30717. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  30718. By default value 0xf, all planes will be processed.
  30719. </p></dd>
  30720. </dl>
  30721. <p>For example if first stream pixel&rsquo;s component value is less then threshold value
  30722. of pixel component from 2nd threshold stream, third stream value will picked,
  30723. otherwise fourth stream pixel component value will be picked.
  30724. </p>
  30725. <p>Using color source filter one can perform various types of thresholding:
  30726. </p>
  30727. <a name="Examples-111"></a>
  30728. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-111">30.203.1 Examples</a></h3>
  30729. <ul>
  30730. <li>
  30731. Binary threshold, using gray color as threshold:
  30732. <div class="example">
  30733. <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
  30734. </pre></div>
  30735. </li><li>
  30736. Inverted binary threshold, using gray color as threshold:
  30737. <div class="example">
  30738. <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
  30739. </pre></div>
  30740. </li><li>
  30741. Truncate binary threshold, using gray color as threshold:
  30742. <div class="example">
  30743. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=gray -lavfi threshold output.avi
  30744. </pre></div>
  30745. </li><li>
  30746. Threshold to zero, using gray color as threshold:
  30747. <div class="example">
  30748. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -f lavfi -i color=white -i 320x240.avi -lavfi threshold output.avi
  30749. </pre></div>
  30750. </li><li>
  30751. Inverted threshold to zero, using gray color as threshold:
  30752. <div class="example">
  30753. <pre class="example">ffmpeg -i 320x240.avi -f lavfi -i color=gray -i 320x240.avi -f lavfi -i color=white -lavfi threshold output.avi
  30754. </pre></div>
  30755. </li></ul>
  30756. <a name="thumbnail"></a>
  30757. <h2 class="section"><a href="ffplay-all.html#toc-thumbnail">30.204 thumbnail</a></h2>
  30758. <p>Select the most representative frame in a given sequence of consecutive frames.
  30759. </p>
  30760. <p>The filter accepts the following options:
  30761. </p>
  30762. <dl compact="compact">
  30763. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  30764. <dd><p>Set the frames batch size to analyze; in a set of <var>n</var> frames, the filter
  30765. will pick one of them, and then handle the next batch of <var>n</var> frames until
  30766. the end. Default is <code>100</code>.
  30767. </p></dd>
  30768. </dl>
  30769. <p>Since the filter keeps track of the whole frames sequence, a bigger <var>n</var>
  30770. value will result in a higher memory usage, so a high value is not recommended.
  30771. </p>
  30772. <a name="Examples-159"></a>
  30773. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-159">30.204.1 Examples</a></h3>
  30774. <ul>
  30775. <li>
  30776. Extract one picture each 50 frames:
  30777. <div class="example">
  30778. <pre class="example">thumbnail=50
  30779. </pre></div>
  30780. </li><li>
  30781. Complete example of a thumbnail creation with <code>ffmpeg</code>:
  30782. <div class="example">
  30783. <pre class="example">ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
  30784. </pre></div>
  30785. </li></ul>
  30786. <a name="tile"></a>
  30787. <h2 class="section"><a href="ffplay-all.html#toc-tile">30.205 tile</a></h2>
  30788. <p>Tile several successive frames together.
  30789. </p>
  30790. <p>The filter accepts the following options:
  30791. </p>
  30792. <dl compact="compact">
  30793. <dt>&lsquo;<samp>layout</samp>&rsquo;</dt>
  30794. <dd><p>Set the grid size (i.e. the number of lines and columns). For the syntax of
  30795. this option, check the
  30796. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  30797. </p>
  30798. </dd>
  30799. <dt>&lsquo;<samp>nb_frames</samp>&rsquo;</dt>
  30800. <dd><p>Set the maximum number of frames to render in the given area. It must be less
  30801. than or equal to <var>w</var>x<var>h</var>. The default value is <code>0</code>, meaning all
  30802. the area will be used.
  30803. </p>
  30804. </dd>
  30805. <dt>&lsquo;<samp>margin</samp>&rsquo;</dt>
  30806. <dd><p>Set the outer border margin in pixels.
  30807. </p>
  30808. </dd>
  30809. <dt>&lsquo;<samp>padding</samp>&rsquo;</dt>
  30810. <dd><p>Set the inner border thickness (i.e. the number of pixels between frames). For
  30811. more advanced padding options (such as having different values for the edges),
  30812. refer to the pad video filter.
  30813. </p>
  30814. </dd>
  30815. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  30816. <dd><p>Specify the color of the unused area. For the syntax of this option, check the
  30817. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  30818. The default value of <var>color</var> is &quot;black&quot;.
  30819. </p>
  30820. </dd>
  30821. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  30822. <dd><p>Set the number of frames to overlap when tiling several successive frames together.
  30823. The value must be between <code>0</code> and <var>nb_frames - 1</var>.
  30824. </p>
  30825. </dd>
  30826. <dt>&lsquo;<samp>init_padding</samp>&rsquo;</dt>
  30827. <dd><p>Set the number of frames to initially be empty before displaying first output frame.
  30828. This controls how soon will one get first output frame.
  30829. The value must be between <code>0</code> and <var>nb_frames - 1</var>.
  30830. </p></dd>
  30831. </dl>
  30832. <a name="Examples-33"></a>
  30833. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-33">30.205.1 Examples</a></h3>
  30834. <ul>
  30835. <li>
  30836. Produce 8x8 PNG tiles of all keyframes (&lsquo;<samp>-skip_frame nokey</samp>&rsquo;) in a movie:
  30837. <div class="example">
  30838. <pre class="example">ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
  30839. </pre></div>
  30840. <p>The &lsquo;<samp>-vsync 0</samp>&rsquo; is necessary to prevent <code>ffmpeg</code> from
  30841. duplicating each output frame to accommodate the originally detected frame
  30842. rate.
  30843. </p>
  30844. </li><li>
  30845. Display <code>5</code> pictures in an area of <code>3x2</code> frames,
  30846. with <code>7</code> pixels between them, and <code>2</code> pixels of initial margin, using
  30847. mixed flat and named options:
  30848. <div class="example">
  30849. <pre class="example">tile=3x2:nb_frames=5:padding=7:margin=2
  30850. </pre></div>
  30851. </li></ul>
  30852. <a name="tinterlace"></a>
  30853. <h2 class="section"><a href="ffplay-all.html#toc-tinterlace">30.206 tinterlace</a></h2>
  30854. <p>Perform various types of temporal field interlacing.
  30855. </p>
  30856. <p>Frames are counted starting from 1, so the first input frame is
  30857. considered odd.
  30858. </p>
  30859. <p>The filter accepts the following options:
  30860. </p>
  30861. <dl compact="compact">
  30862. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  30863. <dd><p>Specify the mode of the interlacing. This option can also be specified
  30864. as a value alone. See below for a list of values for this option.
  30865. </p>
  30866. <p>Available values are:
  30867. </p>
  30868. <dl compact="compact">
  30869. <dt>&lsquo;<samp>merge, 0</samp>&rsquo;</dt>
  30870. <dd><p>Move odd frames into the upper field, even into the lower field,
  30871. generating a double height frame at half frame rate.
  30872. </p><div class="example">
  30873. <pre class="example"> ------&gt; time
  30874. Input:
  30875. Frame 1 Frame 2 Frame 3 Frame 4
  30876. 11111 22222 33333 44444
  30877. 11111 22222 33333 44444
  30878. 11111 22222 33333 44444
  30879. 11111 22222 33333 44444
  30880. Output:
  30881. 11111 33333
  30882. 22222 44444
  30883. 11111 33333
  30884. 22222 44444
  30885. 11111 33333
  30886. 22222 44444
  30887. 11111 33333
  30888. 22222 44444
  30889. </pre></div>
  30890. </dd>
  30891. <dt>&lsquo;<samp>drop_even, 1</samp>&rsquo;</dt>
  30892. <dd><p>Only output odd frames, even frames are dropped, generating a frame with
  30893. unchanged height at half frame rate.
  30894. </p>
  30895. <div class="example">
  30896. <pre class="example"> ------&gt; time
  30897. Input:
  30898. Frame 1 Frame 2 Frame 3 Frame 4
  30899. 11111 22222 33333 44444
  30900. 11111 22222 33333 44444
  30901. 11111 22222 33333 44444
  30902. 11111 22222 33333 44444
  30903. Output:
  30904. 11111 33333
  30905. 11111 33333
  30906. 11111 33333
  30907. 11111 33333
  30908. </pre></div>
  30909. </dd>
  30910. <dt>&lsquo;<samp>drop_odd, 2</samp>&rsquo;</dt>
  30911. <dd><p>Only output even frames, odd frames are dropped, generating a frame with
  30912. unchanged height at half frame rate.
  30913. </p>
  30914. <div class="example">
  30915. <pre class="example"> ------&gt; time
  30916. Input:
  30917. Frame 1 Frame 2 Frame 3 Frame 4
  30918. 11111 22222 33333 44444
  30919. 11111 22222 33333 44444
  30920. 11111 22222 33333 44444
  30921. 11111 22222 33333 44444
  30922. Output:
  30923. 22222 44444
  30924. 22222 44444
  30925. 22222 44444
  30926. 22222 44444
  30927. </pre></div>
  30928. </dd>
  30929. <dt>&lsquo;<samp>pad, 3</samp>&rsquo;</dt>
  30930. <dd><p>Expand each frame to full height, but pad alternate lines with black,
  30931. generating a frame with double height at the same input frame rate.
  30932. </p>
  30933. <div class="example">
  30934. <pre class="example"> ------&gt; time
  30935. Input:
  30936. Frame 1 Frame 2 Frame 3 Frame 4
  30937. 11111 22222 33333 44444
  30938. 11111 22222 33333 44444
  30939. 11111 22222 33333 44444
  30940. 11111 22222 33333 44444
  30941. Output:
  30942. 11111 ..... 33333 .....
  30943. ..... 22222 ..... 44444
  30944. 11111 ..... 33333 .....
  30945. ..... 22222 ..... 44444
  30946. 11111 ..... 33333 .....
  30947. ..... 22222 ..... 44444
  30948. 11111 ..... 33333 .....
  30949. ..... 22222 ..... 44444
  30950. </pre></div>
  30951. </dd>
  30952. <dt>&lsquo;<samp>interleave_top, 4</samp>&rsquo;</dt>
  30953. <dd><p>Interleave the upper field from odd frames with the lower field from
  30954. even frames, generating a frame with unchanged height at half frame rate.
  30955. </p>
  30956. <div class="example">
  30957. <pre class="example"> ------&gt; time
  30958. Input:
  30959. Frame 1 Frame 2 Frame 3 Frame 4
  30960. 11111&lt;- 22222 33333&lt;- 44444
  30961. 11111 22222&lt;- 33333 44444&lt;-
  30962. 11111&lt;- 22222 33333&lt;- 44444
  30963. 11111 22222&lt;- 33333 44444&lt;-
  30964. Output:
  30965. 11111 33333
  30966. 22222 44444
  30967. 11111 33333
  30968. 22222 44444
  30969. </pre></div>
  30970. </dd>
  30971. <dt>&lsquo;<samp>interleave_bottom, 5</samp>&rsquo;</dt>
  30972. <dd><p>Interleave the lower field from odd frames with the upper field from
  30973. even frames, generating a frame with unchanged height at half frame rate.
  30974. </p>
  30975. <div class="example">
  30976. <pre class="example"> ------&gt; time
  30977. Input:
  30978. Frame 1 Frame 2 Frame 3 Frame 4
  30979. 11111 22222&lt;- 33333 44444&lt;-
  30980. 11111&lt;- 22222 33333&lt;- 44444
  30981. 11111 22222&lt;- 33333 44444&lt;-
  30982. 11111&lt;- 22222 33333&lt;- 44444
  30983. Output:
  30984. 22222 44444
  30985. 11111 33333
  30986. 22222 44444
  30987. 11111 33333
  30988. </pre></div>
  30989. </dd>
  30990. <dt>&lsquo;<samp>interlacex2, 6</samp>&rsquo;</dt>
  30991. <dd><p>Double frame rate with unchanged height. Frames are inserted each
  30992. containing the second temporal field from the previous input frame and
  30993. the first temporal field from the next input frame. This mode relies on
  30994. the top_field_first flag. Useful for interlaced video displays with no
  30995. field synchronisation.
  30996. </p>
  30997. <div class="example">
  30998. <pre class="example"> ------&gt; time
  30999. Input:
  31000. Frame 1 Frame 2 Frame 3 Frame 4
  31001. 11111 22222 33333 44444
  31002. 11111 22222 33333 44444
  31003. 11111 22222 33333 44444
  31004. 11111 22222 33333 44444
  31005. Output:
  31006. 11111 22222 22222 33333 33333 44444 44444
  31007. 11111 11111 22222 22222 33333 33333 44444
  31008. 11111 22222 22222 33333 33333 44444 44444
  31009. 11111 11111 22222 22222 33333 33333 44444
  31010. </pre></div>
  31011. </dd>
  31012. <dt>&lsquo;<samp>mergex2, 7</samp>&rsquo;</dt>
  31013. <dd><p>Move odd frames into the upper field, even into the lower field,
  31014. generating a double height frame at same frame rate.
  31015. </p>
  31016. <div class="example">
  31017. <pre class="example"> ------&gt; time
  31018. Input:
  31019. Frame 1 Frame 2 Frame 3 Frame 4
  31020. 11111 22222 33333 44444
  31021. 11111 22222 33333 44444
  31022. 11111 22222 33333 44444
  31023. 11111 22222 33333 44444
  31024. Output:
  31025. 11111 33333 33333 55555
  31026. 22222 22222 44444 44444
  31027. 11111 33333 33333 55555
  31028. 22222 22222 44444 44444
  31029. 11111 33333 33333 55555
  31030. 22222 22222 44444 44444
  31031. 11111 33333 33333 55555
  31032. 22222 22222 44444 44444
  31033. </pre></div>
  31034. </dd>
  31035. </dl>
  31036. <p>Numeric values are deprecated but are accepted for backward
  31037. compatibility reasons.
  31038. </p>
  31039. <p>Default mode is <code>merge</code>.
  31040. </p>
  31041. </dd>
  31042. <dt>&lsquo;<samp>flags</samp>&rsquo;</dt>
  31043. <dd><p>Specify flags influencing the filter process.
  31044. </p>
  31045. <p>Available value for <var>flags</var> is:
  31046. </p>
  31047. <dl compact="compact">
  31048. <dt>&lsquo;<samp>low_pass_filter, vlpf</samp>&rsquo;</dt>
  31049. <dd><p>Enable linear vertical low-pass filtering in the filter.
  31050. Vertical low-pass filtering is required when creating an interlaced
  31051. destination from a progressive source which contains high-frequency
  31052. vertical detail. Filtering will reduce interlace &rsquo;twitter&rsquo; and Moire
  31053. patterning.
  31054. </p>
  31055. </dd>
  31056. <dt>&lsquo;<samp>complex_filter, cvlpf</samp>&rsquo;</dt>
  31057. <dd><p>Enable complex vertical low-pass filtering.
  31058. This will slightly less reduce interlace &rsquo;twitter&rsquo; and Moire
  31059. patterning but better retain detail and subjective sharpness impression.
  31060. </p>
  31061. </dd>
  31062. <dt>&lsquo;<samp>bypass_il</samp>&rsquo;</dt>
  31063. <dd><p>Bypass already interlaced frames, only adjust the frame rate.
  31064. </p></dd>
  31065. </dl>
  31066. <p>Vertical low-pass filtering and bypassing already interlaced frames can only be
  31067. enabled for &lsquo;<samp>mode</samp>&rsquo; <var>interleave_top</var> and <var>interleave_bottom</var>.
  31068. </p>
  31069. </dd>
  31070. </dl>
  31071. <a name="tmix"></a>
  31072. <h2 class="section"><a href="ffplay-all.html#toc-tmix">30.207 tmix</a></h2>
  31073. <p>Mix successive video frames.
  31074. </p>
  31075. <p>A description of the accepted options follows.
  31076. </p>
  31077. <dl compact="compact">
  31078. <dt>&lsquo;<samp>frames</samp>&rsquo;</dt>
  31079. <dd><p>The number of successive frames to mix. If unspecified, it defaults to 3.
  31080. </p>
  31081. </dd>
  31082. <dt>&lsquo;<samp>weights</samp>&rsquo;</dt>
  31083. <dd><p>Specify weight of each input video frame.
  31084. Each weight is separated by space. If number of weights is smaller than
  31085. number of <var>frames</var> last specified weight will be used for all remaining
  31086. unset weights.
  31087. </p>
  31088. </dd>
  31089. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  31090. <dd><p>Specify scale, if it is set it will be multiplied with sum
  31091. of each weight multiplied with pixel values to give final destination
  31092. pixel value. By default <var>scale</var> is auto scaled to sum of weights.
  31093. </p></dd>
  31094. </dl>
  31095. <a name="Examples-9"></a>
  31096. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-9">30.207.1 Examples</a></h3>
  31097. <ul>
  31098. <li>
  31099. Average 7 successive frames:
  31100. <div class="example">
  31101. <pre class="example">tmix=frames=7:weights=&quot;1 1 1 1 1 1 1&quot;
  31102. </pre></div>
  31103. </li><li>
  31104. Apply simple temporal convolution:
  31105. <div class="example">
  31106. <pre class="example">tmix=frames=3:weights=&quot;-1 3 -1&quot;
  31107. </pre></div>
  31108. </li><li>
  31109. Similar as above but only showing temporal differences:
  31110. <div class="example">
  31111. <pre class="example">tmix=frames=3:weights=&quot;-1 2 -1&quot;:scale=1
  31112. </pre></div>
  31113. </li></ul>
  31114. <p><a name="tonemap"></a>
  31115. </p><a name="tonemap-1"></a>
  31116. <h2 class="section"><a href="ffplay-all.html#toc-tonemap-1">30.208 tonemap</a></h2>
  31117. <p>Tone map colors from different dynamic ranges.
  31118. </p>
  31119. <p>This filter expects data in single precision floating point, as it needs to
  31120. operate on (and can output) out-of-range values. Another filter, such as
  31121. <a href="#zscale">zscale</a>, is needed to convert the resulting frame to a usable format.
  31122. </p>
  31123. <p>The tonemapping algorithms implemented only work on linear light, so input
  31124. data should be linearized beforehand (and possibly correctly tagged).
  31125. </p>
  31126. <div class="example">
  31127. <pre class="example">ffmpeg -i INPUT -vf zscale=transfer=linear,tonemap=clip,zscale=transfer=bt709,format=yuv420p OUTPUT
  31128. </pre></div>
  31129. <a name="Options-33"></a>
  31130. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-33">30.208.1 Options</a></h3>
  31131. <p>The filter accepts the following options.
  31132. </p>
  31133. <dl compact="compact">
  31134. <dt>&lsquo;<samp>tonemap</samp>&rsquo;</dt>
  31135. <dd><p>Set the tone map algorithm to use.
  31136. </p>
  31137. <p>Possible values are:
  31138. </p><dl compact="compact">
  31139. <dt><var>none</var></dt>
  31140. <dd><p>Do not apply any tone map, only desaturate overbright pixels.
  31141. </p>
  31142. </dd>
  31143. <dt><var>clip</var></dt>
  31144. <dd><p>Hard-clip any out-of-range values. Use it for perfect color accuracy for
  31145. in-range values, while distorting out-of-range values.
  31146. </p>
  31147. </dd>
  31148. <dt><var>linear</var></dt>
  31149. <dd><p>Stretch the entire reference gamut to a linear multiple of the display.
  31150. </p>
  31151. </dd>
  31152. <dt><var>gamma</var></dt>
  31153. <dd><p>Fit a logarithmic transfer between the tone curves.
  31154. </p>
  31155. </dd>
  31156. <dt><var>reinhard</var></dt>
  31157. <dd><p>Preserve overall image brightness with a simple curve, using nonlinear
  31158. contrast, which results in flattening details and degrading color accuracy.
  31159. </p>
  31160. </dd>
  31161. <dt><var>hable</var></dt>
  31162. <dd><p>Preserve both dark and bright details better than <var>reinhard</var>, at the cost
  31163. of slightly darkening everything. Use it when detail preservation is more
  31164. important than color and brightness accuracy.
  31165. </p>
  31166. </dd>
  31167. <dt><var>mobius</var></dt>
  31168. <dd><p>Smoothly map out-of-range values, while retaining contrast and colors for
  31169. in-range material as much as possible. Use it when color accuracy is more
  31170. important than detail preservation.
  31171. </p></dd>
  31172. </dl>
  31173. <p>Default is none.
  31174. </p>
  31175. </dd>
  31176. <dt>&lsquo;<samp>param</samp>&rsquo;</dt>
  31177. <dd><p>Tune the tone mapping algorithm.
  31178. </p>
  31179. <p>This affects the following algorithms:
  31180. </p><dl compact="compact">
  31181. <dt><var>none</var></dt>
  31182. <dd><p>Ignored.
  31183. </p>
  31184. </dd>
  31185. <dt><var>linear</var></dt>
  31186. <dd><p>Specifies the scale factor to use while stretching.
  31187. Default to 1.0.
  31188. </p>
  31189. </dd>
  31190. <dt><var>gamma</var></dt>
  31191. <dd><p>Specifies the exponent of the function.
  31192. Default to 1.8.
  31193. </p>
  31194. </dd>
  31195. <dt><var>clip</var></dt>
  31196. <dd><p>Specify an extra linear coefficient to multiply into the signal before clipping.
  31197. Default to 1.0.
  31198. </p>
  31199. </dd>
  31200. <dt><var>reinhard</var></dt>
  31201. <dd><p>Specify the local contrast coefficient at the display peak.
  31202. Default to 0.5, which means that in-gamut values will be about half as bright
  31203. as when clipping.
  31204. </p>
  31205. </dd>
  31206. <dt><var>hable</var></dt>
  31207. <dd><p>Ignored.
  31208. </p>
  31209. </dd>
  31210. <dt><var>mobius</var></dt>
  31211. <dd><p>Specify the transition point from linear to mobius transform. Every value
  31212. below this point is guaranteed to be mapped 1:1. The higher the value, the
  31213. more accurate the result will be, at the cost of losing bright details.
  31214. Default to 0.3, which due to the steep initial slope still preserves in-range
  31215. colors fairly accurately.
  31216. </p></dd>
  31217. </dl>
  31218. </dd>
  31219. <dt>&lsquo;<samp>desat</samp>&rsquo;</dt>
  31220. <dd><p>Apply desaturation for highlights that exceed this level of brightness. The
  31221. higher the parameter, the more color information will be preserved. This
  31222. setting helps prevent unnaturally blown-out colors for super-highlights, by
  31223. (smoothly) turning into white instead. This makes images feel more natural,
  31224. at the cost of reducing information about out-of-range colors.
  31225. </p>
  31226. <p>The default of 2.0 is somewhat conservative and will mostly just apply to
  31227. skies or directly sunlit surfaces. A setting of 0.0 disables this option.
  31228. </p>
  31229. <p>This option works only if the input frame has a supported color tag.
  31230. </p>
  31231. </dd>
  31232. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  31233. <dd><p>Override signal/nominal/reference peak with this value. Useful when the
  31234. embedded peak information in display metadata is not reliable or when tone
  31235. mapping from a lower range to a higher range.
  31236. </p></dd>
  31237. </dl>
  31238. <a name="tpad"></a>
  31239. <h2 class="section"><a href="ffplay-all.html#toc-tpad">30.209 tpad</a></h2>
  31240. <p>Temporarily pad video frames.
  31241. </p>
  31242. <p>The filter accepts the following options:
  31243. </p>
  31244. <dl compact="compact">
  31245. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  31246. <dd><p>Specify number of delay frames before input video stream.
  31247. </p>
  31248. </dd>
  31249. <dt>&lsquo;<samp>stop</samp>&rsquo;</dt>
  31250. <dd><p>Specify number of padding frames after input video stream.
  31251. Set to -1 to pad indefinitely.
  31252. </p>
  31253. </dd>
  31254. <dt>&lsquo;<samp>start_mode</samp>&rsquo;</dt>
  31255. <dd><p>Set kind of frames added to beginning of stream.
  31256. Can be either <var>add</var> or <var>clone</var>.
  31257. With <var>add</var> frames of solid-color are added.
  31258. With <var>clone</var> frames are clones of first frame.
  31259. </p>
  31260. </dd>
  31261. <dt>&lsquo;<samp>stop_mode</samp>&rsquo;</dt>
  31262. <dd><p>Set kind of frames added to end of stream.
  31263. Can be either <var>add</var> or <var>clone</var>.
  31264. With <var>add</var> frames of solid-color are added.
  31265. With <var>clone</var> frames are clones of last frame.
  31266. </p>
  31267. </dd>
  31268. <dt>&lsquo;<samp>start_duration, stop_duration</samp>&rsquo;</dt>
  31269. <dd><p>Specify the duration of the start/stop delay. See
  31270. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  31271. for the accepted syntax.
  31272. These options override <var>start</var> and <var>stop</var>.
  31273. </p>
  31274. </dd>
  31275. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  31276. <dd><p>Specify the color of the padded area. For the syntax of this option,
  31277. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  31278. </p>
  31279. <p>The default value of <var>color</var> is &quot;black&quot;.
  31280. </p></dd>
  31281. </dl>
  31282. <p><a name="transpose"></a>
  31283. </p><a name="transpose-1"></a>
  31284. <h2 class="section"><a href="ffplay-all.html#toc-transpose-1">30.210 transpose</a></h2>
  31285. <p>Transpose rows with columns in the input video and optionally flip it.
  31286. </p>
  31287. <p>It accepts the following parameters:
  31288. </p>
  31289. <dl compact="compact">
  31290. <dt>&lsquo;<samp>dir</samp>&rsquo;</dt>
  31291. <dd><p>Specify the transposition direction.
  31292. </p>
  31293. <p>Can assume the following values:
  31294. </p><dl compact="compact">
  31295. <dt>&lsquo;<samp>0, 4, cclock_flip</samp>&rsquo;</dt>
  31296. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
  31297. </p><div class="example">
  31298. <pre class="example">L.R L.l
  31299. . . -&gt; . .
  31300. l.r R.r
  31301. </pre></div>
  31302. </dd>
  31303. <dt>&lsquo;<samp>1, 5, clock</samp>&rsquo;</dt>
  31304. <dd><p>Rotate by 90 degrees clockwise, that is:
  31305. </p><div class="example">
  31306. <pre class="example">L.R l.L
  31307. . . -&gt; . .
  31308. l.r r.R
  31309. </pre></div>
  31310. </dd>
  31311. <dt>&lsquo;<samp>2, 6, cclock</samp>&rsquo;</dt>
  31312. <dd><p>Rotate by 90 degrees counterclockwise, that is:
  31313. </p><div class="example">
  31314. <pre class="example">L.R R.r
  31315. . . -&gt; . .
  31316. l.r L.l
  31317. </pre></div>
  31318. </dd>
  31319. <dt>&lsquo;<samp>3, 7, clock_flip</samp>&rsquo;</dt>
  31320. <dd><p>Rotate by 90 degrees clockwise and vertically flip, that is:
  31321. </p><div class="example">
  31322. <pre class="example">L.R r.R
  31323. . . -&gt; . .
  31324. l.r l.L
  31325. </pre></div>
  31326. </dd>
  31327. </dl>
  31328. <p>For values between 4-7, the transposition is only done if the input
  31329. video geometry is portrait and not landscape. These values are
  31330. deprecated, the <code>passthrough</code> option should be used instead.
  31331. </p>
  31332. <p>Numerical values are deprecated, and should be dropped in favor of
  31333. symbolic constants.
  31334. </p>
  31335. </dd>
  31336. <dt>&lsquo;<samp>passthrough</samp>&rsquo;</dt>
  31337. <dd><p>Do not apply the transposition if the input geometry matches the one
  31338. specified by the specified value. It accepts the following values:
  31339. </p><dl compact="compact">
  31340. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  31341. <dd><p>Always apply transposition.
  31342. </p></dd>
  31343. <dt>&lsquo;<samp>portrait</samp>&rsquo;</dt>
  31344. <dd><p>Preserve portrait geometry (when <var>height</var> &gt;= <var>width</var>).
  31345. </p></dd>
  31346. <dt>&lsquo;<samp>landscape</samp>&rsquo;</dt>
  31347. <dd><p>Preserve landscape geometry (when <var>width</var> &gt;= <var>height</var>).
  31348. </p></dd>
  31349. </dl>
  31350. <p>Default value is <code>none</code>.
  31351. </p></dd>
  31352. </dl>
  31353. <p>For example to rotate by 90 degrees clockwise and preserve portrait
  31354. layout:
  31355. </p><div class="example">
  31356. <pre class="example">transpose=dir=1:passthrough=portrait
  31357. </pre></div>
  31358. <p>The command above can also be specified as:
  31359. </p><div class="example">
  31360. <pre class="example">transpose=1:portrait
  31361. </pre></div>
  31362. <a name="transpose_005fnpp"></a>
  31363. <h2 class="section"><a href="ffplay-all.html#toc-transpose_005fnpp">30.211 transpose_npp</a></h2>
  31364. <p>Transpose rows with columns in the input video and optionally flip it.
  31365. For more in depth examples see the <a href="#transpose">transpose</a> video filter, which shares mostly the same options.
  31366. </p>
  31367. <p>It accepts the following parameters:
  31368. </p>
  31369. <dl compact="compact">
  31370. <dt>&lsquo;<samp>dir</samp>&rsquo;</dt>
  31371. <dd><p>Specify the transposition direction.
  31372. </p>
  31373. <p>Can assume the following values:
  31374. </p><dl compact="compact">
  31375. <dt>&lsquo;<samp>cclock_flip</samp>&rsquo;</dt>
  31376. <dd><p>Rotate by 90 degrees counterclockwise and vertically flip. (default)
  31377. </p>
  31378. </dd>
  31379. <dt>&lsquo;<samp>clock</samp>&rsquo;</dt>
  31380. <dd><p>Rotate by 90 degrees clockwise.
  31381. </p>
  31382. </dd>
  31383. <dt>&lsquo;<samp>cclock</samp>&rsquo;</dt>
  31384. <dd><p>Rotate by 90 degrees counterclockwise.
  31385. </p>
  31386. </dd>
  31387. <dt>&lsquo;<samp>clock_flip</samp>&rsquo;</dt>
  31388. <dd><p>Rotate by 90 degrees clockwise and vertically flip.
  31389. </p></dd>
  31390. </dl>
  31391. </dd>
  31392. <dt>&lsquo;<samp>passthrough</samp>&rsquo;</dt>
  31393. <dd><p>Do not apply the transposition if the input geometry matches the one
  31394. specified by the specified value. It accepts the following values:
  31395. </p><dl compact="compact">
  31396. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  31397. <dd><p>Always apply transposition. (default)
  31398. </p></dd>
  31399. <dt>&lsquo;<samp>portrait</samp>&rsquo;</dt>
  31400. <dd><p>Preserve portrait geometry (when <var>height</var> &gt;= <var>width</var>).
  31401. </p></dd>
  31402. <dt>&lsquo;<samp>landscape</samp>&rsquo;</dt>
  31403. <dd><p>Preserve landscape geometry (when <var>width</var> &gt;= <var>height</var>).
  31404. </p></dd>
  31405. </dl>
  31406. </dd>
  31407. </dl>
  31408. <a name="trim"></a>
  31409. <h2 class="section"><a href="ffplay-all.html#toc-trim">30.212 trim</a></h2>
  31410. <p>Trim the input so that the output contains one continuous subpart of the input.
  31411. </p>
  31412. <p>It accepts the following parameters:
  31413. </p><dl compact="compact">
  31414. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  31415. <dd><p>Specify the time of the start of the kept section, i.e. the frame with the
  31416. timestamp <var>start</var> will be the first frame in the output.
  31417. </p>
  31418. </dd>
  31419. <dt>&lsquo;<samp>end</samp>&rsquo;</dt>
  31420. <dd><p>Specify the time of the first frame that will be dropped, i.e. the frame
  31421. immediately preceding the one with the timestamp <var>end</var> will be the last
  31422. frame in the output.
  31423. </p>
  31424. </dd>
  31425. <dt>&lsquo;<samp>start_pts</samp>&rsquo;</dt>
  31426. <dd><p>This is the same as <var>start</var>, except this option sets the start timestamp
  31427. in timebase units instead of seconds.
  31428. </p>
  31429. </dd>
  31430. <dt>&lsquo;<samp>end_pts</samp>&rsquo;</dt>
  31431. <dd><p>This is the same as <var>end</var>, except this option sets the end timestamp
  31432. in timebase units instead of seconds.
  31433. </p>
  31434. </dd>
  31435. <dt>&lsquo;<samp>duration</samp>&rsquo;</dt>
  31436. <dd><p>The maximum duration of the output in seconds.
  31437. </p>
  31438. </dd>
  31439. <dt>&lsquo;<samp>start_frame</samp>&rsquo;</dt>
  31440. <dd><p>The number of the first frame that should be passed to the output.
  31441. </p>
  31442. </dd>
  31443. <dt>&lsquo;<samp>end_frame</samp>&rsquo;</dt>
  31444. <dd><p>The number of the first frame that should be dropped.
  31445. </p></dd>
  31446. </dl>
  31447. <p>&lsquo;<samp>start</samp>&rsquo;, &lsquo;<samp>end</samp>&rsquo;, and &lsquo;<samp>duration</samp>&rsquo; are expressed as time
  31448. duration specifications; see
  31449. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  31450. for the accepted syntax.
  31451. </p>
  31452. <p>Note that the first two sets of the start/end options and the &lsquo;<samp>duration</samp>&rsquo;
  31453. option look at the frame timestamp, while the _frame variants simply count the
  31454. frames that pass through the filter. Also note that this filter does not modify
  31455. the timestamps. If you wish for the output timestamps to start at zero, insert a
  31456. setpts filter after the trim filter.
  31457. </p>
  31458. <p>If multiple start or end options are set, this filter tries to be greedy and
  31459. keep all the frames that match at least one of the specified constraints. To keep
  31460. only the part that matches all the constraints at once, chain multiple trim
  31461. filters.
  31462. </p>
  31463. <p>The defaults are such that all the input is kept. So it is possible to set e.g.
  31464. just the end values to keep everything before the specified time.
  31465. </p>
  31466. <p>Examples:
  31467. </p><ul>
  31468. <li>
  31469. Drop everything except the second minute of input:
  31470. <div class="example">
  31471. <pre class="example">ffmpeg -i INPUT -vf trim=60:120
  31472. </pre></div>
  31473. </li><li>
  31474. Keep only the first second:
  31475. <div class="example">
  31476. <pre class="example">ffmpeg -i INPUT -vf trim=duration=1
  31477. </pre></div>
  31478. </li></ul>
  31479. <a name="unpremultiply"></a>
  31480. <h2 class="section"><a href="ffplay-all.html#toc-unpremultiply">30.213 unpremultiply</a></h2>
  31481. <p>Apply alpha unpremultiply effect to input video stream using first plane
  31482. of second stream as alpha.
  31483. </p>
  31484. <p>Both streams must have same dimensions and same pixel format.
  31485. </p>
  31486. <p>The filter accepts the following option:
  31487. </p>
  31488. <dl compact="compact">
  31489. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  31490. <dd><p>Set which planes will be processed, unprocessed planes will be copied.
  31491. By default value 0xf, all planes will be processed.
  31492. </p>
  31493. <p>If the format has 1 or 2 components, then luma is bit 0.
  31494. If the format has 3 or 4 components:
  31495. for RGB formats bit 0 is green, bit 1 is blue and bit 2 is red;
  31496. for YUV formats bit 0 is luma, bit 1 is chroma-U and bit 2 is chroma-V.
  31497. If present, the alpha channel is always the last bit.
  31498. </p>
  31499. </dd>
  31500. <dt>&lsquo;<samp>inplace</samp>&rsquo;</dt>
  31501. <dd><p>Do not require 2nd input for processing, instead use alpha plane from input stream.
  31502. </p></dd>
  31503. </dl>
  31504. <p><a name="unsharp"></a>
  31505. </p><a name="unsharp-1"></a>
  31506. <h2 class="section"><a href="ffplay-all.html#toc-unsharp-1">30.214 unsharp</a></h2>
  31507. <p>Sharpen or blur the input video.
  31508. </p>
  31509. <p>It accepts the following parameters:
  31510. </p>
  31511. <dl compact="compact">
  31512. <dt>&lsquo;<samp>luma_msize_x, lx</samp>&rsquo;</dt>
  31513. <dd><p>Set the luma matrix horizontal size. It must be an odd integer between
  31514. 3 and 23. The default value is 5.
  31515. </p>
  31516. </dd>
  31517. <dt>&lsquo;<samp>luma_msize_y, ly</samp>&rsquo;</dt>
  31518. <dd><p>Set the luma matrix vertical size. It must be an odd integer between 3
  31519. and 23. The default value is 5.
  31520. </p>
  31521. </dd>
  31522. <dt>&lsquo;<samp>luma_amount, la</samp>&rsquo;</dt>
  31523. <dd><p>Set the luma effect strength. It must be a floating point number, reasonable
  31524. values lay between -1.5 and 1.5.
  31525. </p>
  31526. <p>Negative values will blur the input video, while positive values will
  31527. sharpen it, a value of zero will disable the effect.
  31528. </p>
  31529. <p>Default value is 1.0.
  31530. </p>
  31531. </dd>
  31532. <dt>&lsquo;<samp>chroma_msize_x, cx</samp>&rsquo;</dt>
  31533. <dd><p>Set the chroma matrix horizontal size. It must be an odd integer
  31534. between 3 and 23. The default value is 5.
  31535. </p>
  31536. </dd>
  31537. <dt>&lsquo;<samp>chroma_msize_y, cy</samp>&rsquo;</dt>
  31538. <dd><p>Set the chroma matrix vertical size. It must be an odd integer
  31539. between 3 and 23. The default value is 5.
  31540. </p>
  31541. </dd>
  31542. <dt>&lsquo;<samp>chroma_amount, ca</samp>&rsquo;</dt>
  31543. <dd><p>Set the chroma effect strength. It must be a floating point number, reasonable
  31544. values lay between -1.5 and 1.5.
  31545. </p>
  31546. <p>Negative values will blur the input video, while positive values will
  31547. sharpen it, a value of zero will disable the effect.
  31548. </p>
  31549. <p>Default value is 0.0.
  31550. </p>
  31551. </dd>
  31552. </dl>
  31553. <p>All parameters are optional and default to the equivalent of the
  31554. string &rsquo;5:5:1.0:5:5:0.0&rsquo;.
  31555. </p>
  31556. <a name="Examples-163"></a>
  31557. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-163">30.214.1 Examples</a></h3>
  31558. <ul>
  31559. <li>
  31560. Apply strong luma sharpen effect:
  31561. <div class="example">
  31562. <pre class="example">unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5
  31563. </pre></div>
  31564. </li><li>
  31565. Apply a strong blur of both luma and chroma parameters:
  31566. <div class="example">
  31567. <pre class="example">unsharp=7:7:-2:7:7:-2
  31568. </pre></div>
  31569. </li></ul>
  31570. <a name="uspp"></a>
  31571. <h2 class="section"><a href="ffplay-all.html#toc-uspp">30.215 uspp</a></h2>
  31572. <p>Apply ultra slow/simple postprocessing filter that compresses and decompresses
  31573. the image at several (or - in the case of &lsquo;<samp>quality</samp>&rsquo; level <code>8</code> - all)
  31574. shifts and average the results.
  31575. </p>
  31576. <p>The way this differs from the behavior of spp is that uspp actually encodes &amp;
  31577. decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8
  31578. DCT similar to MJPEG.
  31579. </p>
  31580. <p>The filter accepts the following options:
  31581. </p>
  31582. <dl compact="compact">
  31583. <dt>&lsquo;<samp>quality</samp>&rsquo;</dt>
  31584. <dd><p>Set quality. This option defines the number of levels for averaging. It accepts
  31585. an integer in the range 0-8. If set to <code>0</code>, the filter will have no
  31586. effect. A value of <code>8</code> means the higher quality. For each increment of
  31587. that value the speed drops by a factor of approximately 2. Default value is
  31588. <code>3</code>.
  31589. </p>
  31590. </dd>
  31591. <dt>&lsquo;<samp>qp</samp>&rsquo;</dt>
  31592. <dd><p>Force a constant quantization parameter. If not set, the filter will use the QP
  31593. from the video stream (if available).
  31594. </p></dd>
  31595. </dl>
  31596. <a name="v360"></a>
  31597. <h2 class="section"><a href="ffplay-all.html#toc-v360">30.216 v360</a></h2>
  31598. <p>Convert 360 videos between various formats.
  31599. </p>
  31600. <p>The filter accepts the following options:
  31601. </p>
  31602. <dl compact="compact">
  31603. <dt>&lsquo;<samp>input</samp>&rsquo;</dt>
  31604. <dt>&lsquo;<samp>output</samp>&rsquo;</dt>
  31605. <dd><p>Set format of the input/output video.
  31606. </p>
  31607. <p>Available formats:
  31608. </p>
  31609. <dl compact="compact">
  31610. <dt>&lsquo;<samp>e</samp>&rsquo;</dt>
  31611. <dt>&lsquo;<samp>equirect</samp>&rsquo;</dt>
  31612. <dd><p>Equirectangular projection.
  31613. </p>
  31614. </dd>
  31615. <dt>&lsquo;<samp>c3x2</samp>&rsquo;</dt>
  31616. <dt>&lsquo;<samp>c6x1</samp>&rsquo;</dt>
  31617. <dt>&lsquo;<samp>c1x6</samp>&rsquo;</dt>
  31618. <dd><p>Cubemap with 3x2/6x1/1x6 layout.
  31619. </p>
  31620. <p>Format specific options:
  31621. </p>
  31622. <dl compact="compact">
  31623. <dt>&lsquo;<samp>in_pad</samp>&rsquo;</dt>
  31624. <dt>&lsquo;<samp>out_pad</samp>&rsquo;</dt>
  31625. <dd><p>Set padding proportion for the input/output cubemap. Values in decimals.
  31626. </p>
  31627. <p>Example values:
  31628. </p><dl compact="compact">
  31629. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  31630. <dd><p>No padding.
  31631. </p></dd>
  31632. <dt>&lsquo;<samp>0.01</samp>&rsquo;</dt>
  31633. <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)
  31634. </p></dd>
  31635. </dl>
  31636. <p>Default value is <b>&lsquo;<samp>0</samp>&rsquo;</b>.
  31637. </p>
  31638. </dd>
  31639. <dt>&lsquo;<samp>fin_pad</samp>&rsquo;</dt>
  31640. <dt>&lsquo;<samp>fout_pad</samp>&rsquo;</dt>
  31641. <dd><p>Set fixed padding for the input/output cubemap. Values in pixels.
  31642. </p>
  31643. <p>Default value is <b>&lsquo;<samp>0</samp>&rsquo;</b>. If greater than zero it overrides other padding options.
  31644. </p>
  31645. </dd>
  31646. <dt>&lsquo;<samp>in_forder</samp>&rsquo;</dt>
  31647. <dt>&lsquo;<samp>out_forder</samp>&rsquo;</dt>
  31648. <dd><p>Set order of faces for the input/output cubemap. Choose one direction for each position.
  31649. </p>
  31650. <p>Designation of directions:
  31651. </p><dl compact="compact">
  31652. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  31653. <dd><p>right
  31654. </p></dd>
  31655. <dt>&lsquo;<samp>l</samp>&rsquo;</dt>
  31656. <dd><p>left
  31657. </p></dd>
  31658. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  31659. <dd><p>up
  31660. </p></dd>
  31661. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  31662. <dd><p>down
  31663. </p></dd>
  31664. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  31665. <dd><p>forward
  31666. </p></dd>
  31667. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  31668. <dd><p>back
  31669. </p></dd>
  31670. </dl>
  31671. <p>Default value is <b>&lsquo;<samp>rludfb</samp>&rsquo;</b>.
  31672. </p>
  31673. </dd>
  31674. <dt>&lsquo;<samp>in_frot</samp>&rsquo;</dt>
  31675. <dt>&lsquo;<samp>out_frot</samp>&rsquo;</dt>
  31676. <dd><p>Set rotation of faces for the input/output cubemap. Choose one angle for each position.
  31677. </p>
  31678. <p>Designation of angles:
  31679. </p><dl compact="compact">
  31680. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  31681. <dd><p>0 degrees clockwise
  31682. </p></dd>
  31683. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  31684. <dd><p>90 degrees clockwise
  31685. </p></dd>
  31686. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  31687. <dd><p>180 degrees clockwise
  31688. </p></dd>
  31689. <dt>&lsquo;<samp>3</samp>&rsquo;</dt>
  31690. <dd><p>270 degrees clockwise
  31691. </p></dd>
  31692. </dl>
  31693. <p>Default value is <b>&lsquo;<samp>000000</samp>&rsquo;</b>.
  31694. </p></dd>
  31695. </dl>
  31696. </dd>
  31697. <dt>&lsquo;<samp>eac</samp>&rsquo;</dt>
  31698. <dd><p>Equi-Angular Cubemap.
  31699. </p>
  31700. </dd>
  31701. <dt>&lsquo;<samp>flat</samp>&rsquo;</dt>
  31702. <dt>&lsquo;<samp>gnomonic</samp>&rsquo;</dt>
  31703. <dt>&lsquo;<samp>rectilinear</samp>&rsquo;</dt>
  31704. <dd><p>Regular video.
  31705. </p>
  31706. <p>Format specific options:
  31707. </p><dl compact="compact">
  31708. <dt>&lsquo;<samp>h_fov</samp>&rsquo;</dt>
  31709. <dt>&lsquo;<samp>v_fov</samp>&rsquo;</dt>
  31710. <dt>&lsquo;<samp>d_fov</samp>&rsquo;</dt>
  31711. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  31712. </p>
  31713. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31714. </p>
  31715. </dd>
  31716. <dt>&lsquo;<samp>ih_fov</samp>&rsquo;</dt>
  31717. <dt>&lsquo;<samp>iv_fov</samp>&rsquo;</dt>
  31718. <dt>&lsquo;<samp>id_fov</samp>&rsquo;</dt>
  31719. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  31720. </p>
  31721. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31722. </p></dd>
  31723. </dl>
  31724. </dd>
  31725. <dt>&lsquo;<samp>dfisheye</samp>&rsquo;</dt>
  31726. <dd><p>Dual fisheye.
  31727. </p>
  31728. <p>Format specific options:
  31729. </p><dl compact="compact">
  31730. <dt>&lsquo;<samp>in_pad</samp>&rsquo;</dt>
  31731. <dt>&lsquo;<samp>out_pad</samp>&rsquo;</dt>
  31732. <dd><p>Set padding proportion. Values in decimals.
  31733. </p>
  31734. <p>Example values:
  31735. </p><dl compact="compact">
  31736. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  31737. <dd><p>No padding.
  31738. </p></dd>
  31739. <dt>&lsquo;<samp>0.01</samp>&rsquo;</dt>
  31740. <dd><p>1% padding.
  31741. </p></dd>
  31742. </dl>
  31743. <p>Default value is <b>&lsquo;<samp>0</samp>&rsquo;</b>.
  31744. </p></dd>
  31745. </dl>
  31746. </dd>
  31747. <dt>&lsquo;<samp>barrel</samp>&rsquo;</dt>
  31748. <dt>&lsquo;<samp>fb</samp>&rsquo;</dt>
  31749. <dt>&lsquo;<samp>barrelsplit</samp>&rsquo;</dt>
  31750. <dd><p>Facebook&rsquo;s 360 formats.
  31751. </p>
  31752. </dd>
  31753. <dt>&lsquo;<samp>sg</samp>&rsquo;</dt>
  31754. <dd><p>Stereographic format.
  31755. </p>
  31756. <p>Format specific options:
  31757. </p><dl compact="compact">
  31758. <dt>&lsquo;<samp>h_fov</samp>&rsquo;</dt>
  31759. <dt>&lsquo;<samp>v_fov</samp>&rsquo;</dt>
  31760. <dt>&lsquo;<samp>d_fov</samp>&rsquo;</dt>
  31761. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  31762. </p>
  31763. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31764. </p>
  31765. </dd>
  31766. <dt>&lsquo;<samp>ih_fov</samp>&rsquo;</dt>
  31767. <dt>&lsquo;<samp>iv_fov</samp>&rsquo;</dt>
  31768. <dt>&lsquo;<samp>id_fov</samp>&rsquo;</dt>
  31769. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  31770. </p>
  31771. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31772. </p></dd>
  31773. </dl>
  31774. </dd>
  31775. <dt>&lsquo;<samp>mercator</samp>&rsquo;</dt>
  31776. <dd><p>Mercator format.
  31777. </p>
  31778. </dd>
  31779. <dt>&lsquo;<samp>ball</samp>&rsquo;</dt>
  31780. <dd><p>Ball format, gives significant distortion toward the back.
  31781. </p>
  31782. </dd>
  31783. <dt>&lsquo;<samp>hammer</samp>&rsquo;</dt>
  31784. <dd><p>Hammer-Aitoff map projection format.
  31785. </p>
  31786. </dd>
  31787. <dt>&lsquo;<samp>sinusoidal</samp>&rsquo;</dt>
  31788. <dd><p>Sinusoidal map projection format.
  31789. </p>
  31790. </dd>
  31791. <dt>&lsquo;<samp>fisheye</samp>&rsquo;</dt>
  31792. <dd><p>Fisheye projection.
  31793. </p>
  31794. <p>Format specific options:
  31795. </p><dl compact="compact">
  31796. <dt>&lsquo;<samp>h_fov</samp>&rsquo;</dt>
  31797. <dt>&lsquo;<samp>v_fov</samp>&rsquo;</dt>
  31798. <dt>&lsquo;<samp>d_fov</samp>&rsquo;</dt>
  31799. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  31800. </p>
  31801. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31802. </p>
  31803. </dd>
  31804. <dt>&lsquo;<samp>ih_fov</samp>&rsquo;</dt>
  31805. <dt>&lsquo;<samp>iv_fov</samp>&rsquo;</dt>
  31806. <dt>&lsquo;<samp>id_fov</samp>&rsquo;</dt>
  31807. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  31808. </p>
  31809. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31810. </p></dd>
  31811. </dl>
  31812. </dd>
  31813. <dt>&lsquo;<samp>pannini</samp>&rsquo;</dt>
  31814. <dd><p>Pannini projection. <i>(output only)</i>
  31815. </p>
  31816. <p>Format specific options:
  31817. </p><dl compact="compact">
  31818. <dt>&lsquo;<samp>h_fov</samp>&rsquo;</dt>
  31819. <dd><p>Set pannini parameter.
  31820. </p></dd>
  31821. </dl>
  31822. </dd>
  31823. <dt>&lsquo;<samp>cylindrical</samp>&rsquo;</dt>
  31824. <dd><p>Cylindrical projection.
  31825. </p>
  31826. <p>Format specific options:
  31827. </p><dl compact="compact">
  31828. <dt>&lsquo;<samp>h_fov</samp>&rsquo;</dt>
  31829. <dt>&lsquo;<samp>v_fov</samp>&rsquo;</dt>
  31830. <dt>&lsquo;<samp>d_fov</samp>&rsquo;</dt>
  31831. <dd><p>Set output horizontal/vertical/diagonal field of view. Values in degrees.
  31832. </p>
  31833. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31834. </p>
  31835. </dd>
  31836. <dt>&lsquo;<samp>ih_fov</samp>&rsquo;</dt>
  31837. <dt>&lsquo;<samp>iv_fov</samp>&rsquo;</dt>
  31838. <dt>&lsquo;<samp>id_fov</samp>&rsquo;</dt>
  31839. <dd><p>Set input horizontal/vertical/diagonal field of view. Values in degrees.
  31840. </p>
  31841. <p>If diagonal field of view is set it overrides horizontal and vertical field of view.
  31842. </p></dd>
  31843. </dl>
  31844. </dd>
  31845. <dt>&lsquo;<samp>perspective</samp>&rsquo;</dt>
  31846. <dd><p>Perspective projection. <i>(output only)</i>
  31847. </p>
  31848. <p>Format specific options:
  31849. </p><dl compact="compact">
  31850. <dt>&lsquo;<samp>v_fov</samp>&rsquo;</dt>
  31851. <dd><p>Set perspective parameter.
  31852. </p></dd>
  31853. </dl>
  31854. </dd>
  31855. <dt>&lsquo;<samp>tetrahedron</samp>&rsquo;</dt>
  31856. <dd><p>Tetrahedron projection.
  31857. </p>
  31858. </dd>
  31859. <dt>&lsquo;<samp>tsp</samp>&rsquo;</dt>
  31860. <dd><p>Truncated square pyramid projection.
  31861. </p>
  31862. </dd>
  31863. <dt>&lsquo;<samp>he</samp>&rsquo;</dt>
  31864. <dt>&lsquo;<samp>hequirect</samp>&rsquo;</dt>
  31865. <dd><p>Half equirectangular projection.
  31866. </p></dd>
  31867. </dl>
  31868. </dd>
  31869. <dt>&lsquo;<samp>interp</samp>&rsquo;</dt>
  31870. <dd><p>Set interpolation method.<br>
  31871. <i>Note: more complex interpolation methods require much more memory to run.</i>
  31872. </p>
  31873. <p>Available methods:
  31874. </p>
  31875. <dl compact="compact">
  31876. <dt>&lsquo;<samp>near</samp>&rsquo;</dt>
  31877. <dt>&lsquo;<samp>nearest</samp>&rsquo;</dt>
  31878. <dd><p>Nearest neighbour.
  31879. </p></dd>
  31880. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  31881. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  31882. <dd><p>Bilinear interpolation.
  31883. </p></dd>
  31884. <dt>&lsquo;<samp>cube</samp>&rsquo;</dt>
  31885. <dt>&lsquo;<samp>cubic</samp>&rsquo;</dt>
  31886. <dd><p>Bicubic interpolation.
  31887. </p></dd>
  31888. <dt>&lsquo;<samp>lanc</samp>&rsquo;</dt>
  31889. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  31890. <dd><p>Lanczos interpolation.
  31891. </p></dd>
  31892. <dt>&lsquo;<samp>sp16</samp>&rsquo;</dt>
  31893. <dt>&lsquo;<samp>spline16</samp>&rsquo;</dt>
  31894. <dd><p>Spline16 interpolation.
  31895. </p></dd>
  31896. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  31897. <dt>&lsquo;<samp>gaussian</samp>&rsquo;</dt>
  31898. <dd><p>Gaussian interpolation.
  31899. </p></dd>
  31900. </dl>
  31901. <p>Default value is <b>&lsquo;<samp>line</samp>&rsquo;</b>.
  31902. </p>
  31903. </dd>
  31904. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  31905. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  31906. <dd><p>Set the output video resolution.
  31907. </p>
  31908. <p>Default resolution depends on formats.
  31909. </p>
  31910. </dd>
  31911. <dt>&lsquo;<samp>in_stereo</samp>&rsquo;</dt>
  31912. <dt>&lsquo;<samp>out_stereo</samp>&rsquo;</dt>
  31913. <dd><p>Set the input/output stereo format.
  31914. </p>
  31915. <dl compact="compact">
  31916. <dt>&lsquo;<samp>2d</samp>&rsquo;</dt>
  31917. <dd><p>2D mono
  31918. </p></dd>
  31919. <dt>&lsquo;<samp>sbs</samp>&rsquo;</dt>
  31920. <dd><p>Side by side
  31921. </p></dd>
  31922. <dt>&lsquo;<samp>tb</samp>&rsquo;</dt>
  31923. <dd><p>Top bottom
  31924. </p></dd>
  31925. </dl>
  31926. <p>Default value is <b>&lsquo;<samp>2d</samp>&rsquo;</b> for input and output format.
  31927. </p>
  31928. </dd>
  31929. <dt>&lsquo;<samp>yaw</samp>&rsquo;</dt>
  31930. <dt>&lsquo;<samp>pitch</samp>&rsquo;</dt>
  31931. <dt>&lsquo;<samp>roll</samp>&rsquo;</dt>
  31932. <dd><p>Set rotation for the output video. Values in degrees.
  31933. </p>
  31934. </dd>
  31935. <dt>&lsquo;<samp>rorder</samp>&rsquo;</dt>
  31936. <dd><p>Set rotation order for the output video. Choose one item for each position.
  31937. </p>
  31938. <dl compact="compact">
  31939. <dt>&lsquo;<samp>y, Y</samp>&rsquo;</dt>
  31940. <dd><p>yaw
  31941. </p></dd>
  31942. <dt>&lsquo;<samp>p, P</samp>&rsquo;</dt>
  31943. <dd><p>pitch
  31944. </p></dd>
  31945. <dt>&lsquo;<samp>r, R</samp>&rsquo;</dt>
  31946. <dd><p>roll
  31947. </p></dd>
  31948. </dl>
  31949. <p>Default value is <b>&lsquo;<samp>ypr</samp>&rsquo;</b>.
  31950. </p>
  31951. </dd>
  31952. <dt>&lsquo;<samp>h_flip</samp>&rsquo;</dt>
  31953. <dt>&lsquo;<samp>v_flip</samp>&rsquo;</dt>
  31954. <dt>&lsquo;<samp>d_flip</samp>&rsquo;</dt>
  31955. <dd><p>Flip the output video horizontally(swaps left-right)/vertically(swaps up-down)/in-depth(swaps back-forward). Boolean values.
  31956. </p>
  31957. </dd>
  31958. <dt>&lsquo;<samp>ih_flip</samp>&rsquo;</dt>
  31959. <dt>&lsquo;<samp>iv_flip</samp>&rsquo;</dt>
  31960. <dd><p>Set if input video is flipped horizontally/vertically. Boolean values.
  31961. </p>
  31962. </dd>
  31963. <dt>&lsquo;<samp>in_trans</samp>&rsquo;</dt>
  31964. <dd><p>Set if input video is transposed. Boolean value, by default disabled.
  31965. </p>
  31966. </dd>
  31967. <dt>&lsquo;<samp>out_trans</samp>&rsquo;</dt>
  31968. <dd><p>Set if output video needs to be transposed. Boolean value, by default disabled.
  31969. </p>
  31970. </dd>
  31971. <dt>&lsquo;<samp>alpha_mask</samp>&rsquo;</dt>
  31972. <dd><p>Build mask in alpha plane for all unmapped pixels by marking them fully transparent. Boolean value, by default disabled.
  31973. </p></dd>
  31974. </dl>
  31975. <a name="Examples-96"></a>
  31976. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-96">30.216.1 Examples</a></h3>
  31977. <ul>
  31978. <li>
  31979. Convert equirectangular video to cubemap with 3x2 layout and 1% padding using bicubic interpolation:
  31980. <div class="example">
  31981. <pre class="example">ffmpeg -i input.mkv -vf v360=e:c3x2:cubic:out_pad=0.01 output.mkv
  31982. </pre></div>
  31983. </li><li>
  31984. Extract back view of Equi-Angular Cubemap:
  31985. <div class="example">
  31986. <pre class="example">ffmpeg -i input.mkv -vf v360=eac:flat:yaw=180 output.mkv
  31987. </pre></div>
  31988. </li><li>
  31989. Convert transposed and horizontally flipped Equi-Angular Cubemap in side-by-side stereo format to equirectangular top-bottom stereo format:
  31990. <div class="example">
  31991. <pre class="example">v360=eac:equirect:in_stereo=sbs:in_trans=1:ih_flip=1:out_stereo=tb
  31992. </pre></div>
  31993. </li></ul>
  31994. <a name="Commands"></a>
  31995. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands">30.216.2 Commands</a></h3>
  31996. <p>This filter supports subset of above options as <a href="#commands">commands</a>.
  31997. </p>
  31998. <a name="vaguedenoiser"></a>
  31999. <h2 class="section"><a href="ffplay-all.html#toc-vaguedenoiser">30.217 vaguedenoiser</a></h2>
  32000. <p>Apply a wavelet based denoiser.
  32001. </p>
  32002. <p>It transforms each frame from the video input into the wavelet domain,
  32003. using Cohen-Daubechies-Feauveau 9/7. Then it applies some filtering to
  32004. the obtained coefficients. It does an inverse wavelet transform after.
  32005. Due to wavelet properties, it should give a nice smoothed result, and
  32006. reduced noise, without blurring picture features.
  32007. </p>
  32008. <p>This filter accepts the following options:
  32009. </p>
  32010. <dl compact="compact">
  32011. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  32012. <dd><p>The filtering strength. The higher, the more filtered the video will be.
  32013. Hard thresholding can use a higher threshold than soft thresholding
  32014. before the video looks overfiltered. Default value is 2.
  32015. </p>
  32016. </dd>
  32017. <dt>&lsquo;<samp>method</samp>&rsquo;</dt>
  32018. <dd><p>The filtering method the filter will use.
  32019. </p>
  32020. <p>It accepts the following values:
  32021. </p><dl compact="compact">
  32022. <dt>&lsquo;<samp>hard</samp>&rsquo;</dt>
  32023. <dd><p>All values under the threshold will be zeroed.
  32024. </p>
  32025. </dd>
  32026. <dt>&lsquo;<samp>soft</samp>&rsquo;</dt>
  32027. <dd><p>All values under the threshold will be zeroed. All values above will be
  32028. reduced by the threshold.
  32029. </p>
  32030. </dd>
  32031. <dt>&lsquo;<samp>garrote</samp>&rsquo;</dt>
  32032. <dd><p>Scales or nullifies coefficients - intermediary between (more) soft and
  32033. (less) hard thresholding.
  32034. </p></dd>
  32035. </dl>
  32036. <p>Default is garrote.
  32037. </p>
  32038. </dd>
  32039. <dt>&lsquo;<samp>nsteps</samp>&rsquo;</dt>
  32040. <dd><p>Number of times, the wavelet will decompose the picture. Picture can&rsquo;t
  32041. be decomposed beyond a particular point (typically, 8 for a 640x480
  32042. frame - as 2^9 = 512 &gt; 480). Valid values are integers between 1 and 32. Default value is 6.
  32043. </p>
  32044. </dd>
  32045. <dt>&lsquo;<samp>percent</samp>&rsquo;</dt>
  32046. <dd><p>Partial of full denoising (limited coefficients shrinking), from 0 to 100. Default value is 85.
  32047. </p>
  32048. </dd>
  32049. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  32050. <dd><p>A list of the planes to process. By default all planes are processed.
  32051. </p></dd>
  32052. </dl>
  32053. <a name="vectorscope"></a>
  32054. <h2 class="section"><a href="ffplay-all.html#toc-vectorscope">30.218 vectorscope</a></h2>
  32055. <p>Display 2 color component values in the two dimensional graph (which is called
  32056. a vectorscope).
  32057. </p>
  32058. <p>This filter accepts the following options:
  32059. </p>
  32060. <dl compact="compact">
  32061. <dt>&lsquo;<samp>mode, m</samp>&rsquo;</dt>
  32062. <dd><p>Set vectorscope mode.
  32063. </p>
  32064. <p>It accepts the following values:
  32065. </p><dl compact="compact">
  32066. <dt>&lsquo;<samp>gray</samp>&rsquo;</dt>
  32067. <dt>&lsquo;<samp>tint</samp>&rsquo;</dt>
  32068. <dd><p>Gray values are displayed on graph, higher brightness means more pixels have
  32069. same component color value on location in graph. This is the default mode.
  32070. </p>
  32071. </dd>
  32072. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  32073. <dd><p>Gray values are displayed on graph. Surrounding pixels values which are not
  32074. present in video frame are drawn in gradient of 2 color components which are
  32075. set by option <code>x</code> and <code>y</code>. The 3rd color component is static.
  32076. </p>
  32077. </dd>
  32078. <dt>&lsquo;<samp>color2</samp>&rsquo;</dt>
  32079. <dd><p>Actual color components values present in video frame are displayed on graph.
  32080. </p>
  32081. </dd>
  32082. <dt>&lsquo;<samp>color3</samp>&rsquo;</dt>
  32083. <dd><p>Similar as color2 but higher frequency of same values <code>x</code> and <code>y</code>
  32084. on graph increases value of another color component, which is luminance by
  32085. default values of <code>x</code> and <code>y</code>.
  32086. </p>
  32087. </dd>
  32088. <dt>&lsquo;<samp>color4</samp>&rsquo;</dt>
  32089. <dd><p>Actual colors present in video frame are displayed on graph. If two different
  32090. colors map to same position on graph then color with higher value of component
  32091. not present in graph is picked.
  32092. </p>
  32093. </dd>
  32094. <dt>&lsquo;<samp>color5</samp>&rsquo;</dt>
  32095. <dd><p>Gray values are displayed on graph. Similar to <code>color</code> but with 3rd color
  32096. component picked from radial gradient.
  32097. </p></dd>
  32098. </dl>
  32099. </dd>
  32100. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  32101. <dd><p>Set which color component will be represented on X-axis. Default is <code>1</code>.
  32102. </p>
  32103. </dd>
  32104. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  32105. <dd><p>Set which color component will be represented on Y-axis. Default is <code>2</code>.
  32106. </p>
  32107. </dd>
  32108. <dt>&lsquo;<samp>intensity, i</samp>&rsquo;</dt>
  32109. <dd><p>Set intensity, used by modes: gray, color, color3 and color5 for increasing brightness
  32110. of color component which represents frequency of (X, Y) location in graph.
  32111. </p>
  32112. </dd>
  32113. <dt>&lsquo;<samp>envelope, e</samp>&rsquo;</dt>
  32114. <dd><dl compact="compact">
  32115. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  32116. <dd><p>No envelope, this is default.
  32117. </p>
  32118. </dd>
  32119. <dt>&lsquo;<samp>instant</samp>&rsquo;</dt>
  32120. <dd><p>Instant envelope, even darkest single pixel will be clearly highlighted.
  32121. </p>
  32122. </dd>
  32123. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  32124. <dd><p>Hold maximum and minimum values presented in graph over time. This way you
  32125. can still spot out of range values without constantly looking at vectorscope.
  32126. </p>
  32127. </dd>
  32128. <dt>&lsquo;<samp>peak+instant</samp>&rsquo;</dt>
  32129. <dd><p>Peak and instant envelope combined together.
  32130. </p></dd>
  32131. </dl>
  32132. </dd>
  32133. <dt>&lsquo;<samp>graticule, g</samp>&rsquo;</dt>
  32134. <dd><p>Set what kind of graticule to draw.
  32135. </p><dl compact="compact">
  32136. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  32137. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  32138. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  32139. <dt>&lsquo;<samp>invert</samp>&rsquo;</dt>
  32140. </dl>
  32141. </dd>
  32142. <dt>&lsquo;<samp>opacity, o</samp>&rsquo;</dt>
  32143. <dd><p>Set graticule opacity.
  32144. </p>
  32145. </dd>
  32146. <dt>&lsquo;<samp>flags, f</samp>&rsquo;</dt>
  32147. <dd><p>Set graticule flags.
  32148. </p>
  32149. <dl compact="compact">
  32150. <dt>&lsquo;<samp>white</samp>&rsquo;</dt>
  32151. <dd><p>Draw graticule for white point.
  32152. </p>
  32153. </dd>
  32154. <dt>&lsquo;<samp>black</samp>&rsquo;</dt>
  32155. <dd><p>Draw graticule for black point.
  32156. </p>
  32157. </dd>
  32158. <dt>&lsquo;<samp>name</samp>&rsquo;</dt>
  32159. <dd><p>Draw color points short names.
  32160. </p></dd>
  32161. </dl>
  32162. </dd>
  32163. <dt>&lsquo;<samp>bgopacity, b</samp>&rsquo;</dt>
  32164. <dd><p>Set background opacity.
  32165. </p>
  32166. </dd>
  32167. <dt>&lsquo;<samp>lthreshold, l</samp>&rsquo;</dt>
  32168. <dd><p>Set low threshold for color component not represented on X or Y axis.
  32169. Values lower than this value will be ignored. Default is 0.
  32170. Note this value is multiplied with actual max possible value one pixel component
  32171. can have. So for 8-bit input and low threshold value of 0.1 actual threshold
  32172. is 0.1 * 255 = 25.
  32173. </p>
  32174. </dd>
  32175. <dt>&lsquo;<samp>hthreshold, h</samp>&rsquo;</dt>
  32176. <dd><p>Set high threshold for color component not represented on X or Y axis.
  32177. Values higher than this value will be ignored. Default is 1.
  32178. Note this value is multiplied with actual max possible value one pixel component
  32179. can have. So for 8-bit input and high threshold value of 0.9 actual threshold
  32180. is 0.9 * 255 = 230.
  32181. </p>
  32182. </dd>
  32183. <dt>&lsquo;<samp>colorspace, c</samp>&rsquo;</dt>
  32184. <dd><p>Set what kind of colorspace to use when drawing graticule.
  32185. </p><dl compact="compact">
  32186. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  32187. <dt>&lsquo;<samp>601</samp>&rsquo;</dt>
  32188. <dt>&lsquo;<samp>709</samp>&rsquo;</dt>
  32189. </dl>
  32190. <p>Default is auto.
  32191. </p>
  32192. </dd>
  32193. <dt>&lsquo;<samp>tint0, t0</samp>&rsquo;</dt>
  32194. <dt>&lsquo;<samp>tint1, t1</samp>&rsquo;</dt>
  32195. <dd><p>Set color tint for gray/tint vectorscope mode. By default both options are zero.
  32196. This means no tint, and output will remain gray.
  32197. </p></dd>
  32198. </dl>
  32199. <p><a name="vidstabdetect"></a>
  32200. </p><a name="vidstabdetect-1"></a>
  32201. <h2 class="section"><a href="ffplay-all.html#toc-vidstabdetect-1">30.219 vidstabdetect</a></h2>
  32202. <p>Analyze video stabilization/deshaking. Perform pass 1 of 2, see
  32203. <a href="#vidstabtransform">vidstabtransform</a> for pass 2.
  32204. </p>
  32205. <p>This filter generates a file with relative translation and rotation
  32206. transform information about subsequent frames, which is then used by
  32207. the <a href="#vidstabtransform">vidstabtransform</a> filter.
  32208. </p>
  32209. <p>To enable compilation of this filter you need to configure FFmpeg with
  32210. <code>--enable-libvidstab</code>.
  32211. </p>
  32212. <p>This filter accepts the following options:
  32213. </p>
  32214. <dl compact="compact">
  32215. <dt>&lsquo;<samp>result</samp>&rsquo;</dt>
  32216. <dd><p>Set the path to the file used to write the transforms information.
  32217. Default value is &lsquo;<tt>transforms.trf</tt>&rsquo;.
  32218. </p>
  32219. </dd>
  32220. <dt>&lsquo;<samp>shakiness</samp>&rsquo;</dt>
  32221. <dd><p>Set how shaky the video is and how quick the camera is. It accepts an
  32222. integer in the range 1-10, a value of 1 means little shakiness, a
  32223. value of 10 means strong shakiness. Default value is 5.
  32224. </p>
  32225. </dd>
  32226. <dt>&lsquo;<samp>accuracy</samp>&rsquo;</dt>
  32227. <dd><p>Set the accuracy of the detection process. It must be a value in the
  32228. range 1-15. A value of 1 means low accuracy, a value of 15 means high
  32229. accuracy. Default value is 15.
  32230. </p>
  32231. </dd>
  32232. <dt>&lsquo;<samp>stepsize</samp>&rsquo;</dt>
  32233. <dd><p>Set stepsize of the search process. The region around minimum is
  32234. scanned with 1 pixel resolution. Default value is 6.
  32235. </p>
  32236. </dd>
  32237. <dt>&lsquo;<samp>mincontrast</samp>&rsquo;</dt>
  32238. <dd><p>Set minimum contrast. Below this value a local measurement field is
  32239. discarded. Must be a floating point value in the range 0-1. Default
  32240. value is 0.3.
  32241. </p>
  32242. </dd>
  32243. <dt>&lsquo;<samp>tripod</samp>&rsquo;</dt>
  32244. <dd><p>Set reference frame number for tripod mode.
  32245. </p>
  32246. <p>If enabled, the motion of the frames is compared to a reference frame
  32247. in the filtered stream, identified by the specified number. The idea
  32248. is to compensate all movements in a more-or-less static scene and keep
  32249. the camera view absolutely still.
  32250. </p>
  32251. <p>If set to 0, it is disabled. The frames are counted starting from 1.
  32252. </p>
  32253. </dd>
  32254. <dt>&lsquo;<samp>show</samp>&rsquo;</dt>
  32255. <dd><p>Show fields and transforms in the resulting frames. It accepts an
  32256. integer in the range 0-2. Default value is 0, which disables any
  32257. visualization.
  32258. </p></dd>
  32259. </dl>
  32260. <a name="Examples-119"></a>
  32261. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-119">30.219.1 Examples</a></h3>
  32262. <ul>
  32263. <li>
  32264. Use default values:
  32265. <div class="example">
  32266. <pre class="example">vidstabdetect
  32267. </pre></div>
  32268. </li><li>
  32269. Analyze strongly shaky movie and put the results in file
  32270. &lsquo;<tt>mytransforms.trf</tt>&rsquo;:
  32271. <div class="example">
  32272. <pre class="example">vidstabdetect=shakiness=10:accuracy=15:result=&quot;mytransforms.trf&quot;
  32273. </pre></div>
  32274. </li><li>
  32275. Visualize the result of internal transformations in the resulting
  32276. video:
  32277. <div class="example">
  32278. <pre class="example">vidstabdetect=show=1
  32279. </pre></div>
  32280. </li><li>
  32281. Analyze a video with medium shakiness using <code>ffmpeg</code>:
  32282. <div class="example">
  32283. <pre class="example">ffmpeg -i input -vf vidstabdetect=shakiness=5:show=1 dummy.avi
  32284. </pre></div>
  32285. </li></ul>
  32286. <p><a name="vidstabtransform"></a>
  32287. </p><a name="vidstabtransform-1"></a>
  32288. <h2 class="section"><a href="ffplay-all.html#toc-vidstabtransform-1">30.220 vidstabtransform</a></h2>
  32289. <p>Video stabilization/deshaking: pass 2 of 2,
  32290. see <a href="#vidstabdetect">vidstabdetect</a> for pass 1.
  32291. </p>
  32292. <p>Read a file with transform information for each frame and
  32293. apply/compensate them. Together with the <a href="#vidstabdetect">vidstabdetect</a>
  32294. filter this can be used to deshake videos. See also
  32295. <a href="http://public.hronopik.de/vid.stab">http://public.hronopik.de/vid.stab</a>. It is important to also use
  32296. the <a href="#unsharp">unsharp</a> filter, see below.
  32297. </p>
  32298. <p>To enable compilation of this filter you need to configure FFmpeg with
  32299. <code>--enable-libvidstab</code>.
  32300. </p>
  32301. <a name="Options-17"></a>
  32302. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-17">30.220.1 Options</a></h3>
  32303. <dl compact="compact">
  32304. <dt>&lsquo;<samp>input</samp>&rsquo;</dt>
  32305. <dd><p>Set path to the file used to read the transforms. Default value is
  32306. &lsquo;<tt>transforms.trf</tt>&rsquo;.
  32307. </p>
  32308. </dd>
  32309. <dt>&lsquo;<samp>smoothing</samp>&rsquo;</dt>
  32310. <dd><p>Set the number of frames (value*2 + 1) used for lowpass filtering the
  32311. camera movements. Default value is 10.
  32312. </p>
  32313. <p>For example a number of 10 means that 21 frames are used (10 in the
  32314. past and 10 in the future) to smoothen the motion in the video. A
  32315. larger value leads to a smoother video, but limits the acceleration of
  32316. the camera (pan/tilt movements). 0 is a special case where a static
  32317. camera is simulated.
  32318. </p>
  32319. </dd>
  32320. <dt>&lsquo;<samp>optalgo</samp>&rsquo;</dt>
  32321. <dd><p>Set the camera path optimization algorithm.
  32322. </p>
  32323. <p>Accepted values are:
  32324. </p><dl compact="compact">
  32325. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  32326. <dd><p>gaussian kernel low-pass filter on camera motion (default)
  32327. </p></dd>
  32328. <dt>&lsquo;<samp>avg</samp>&rsquo;</dt>
  32329. <dd><p>averaging on transformations
  32330. </p></dd>
  32331. </dl>
  32332. </dd>
  32333. <dt>&lsquo;<samp>maxshift</samp>&rsquo;</dt>
  32334. <dd><p>Set maximal number of pixels to translate frames. Default value is -1,
  32335. meaning no limit.
  32336. </p>
  32337. </dd>
  32338. <dt>&lsquo;<samp>maxangle</samp>&rsquo;</dt>
  32339. <dd><p>Set maximal angle in radians (degree*PI/180) to rotate frames. Default
  32340. value is -1, meaning no limit.
  32341. </p>
  32342. </dd>
  32343. <dt>&lsquo;<samp>crop</samp>&rsquo;</dt>
  32344. <dd><p>Specify how to deal with borders that may be visible due to movement
  32345. compensation.
  32346. </p>
  32347. <p>Available values are:
  32348. </p><dl compact="compact">
  32349. <dt>&lsquo;<samp>keep</samp>&rsquo;</dt>
  32350. <dd><p>keep image information from previous frame (default)
  32351. </p></dd>
  32352. <dt>&lsquo;<samp>black</samp>&rsquo;</dt>
  32353. <dd><p>fill the border black
  32354. </p></dd>
  32355. </dl>
  32356. </dd>
  32357. <dt>&lsquo;<samp>invert</samp>&rsquo;</dt>
  32358. <dd><p>Invert transforms if set to 1. Default value is 0.
  32359. </p>
  32360. </dd>
  32361. <dt>&lsquo;<samp>relative</samp>&rsquo;</dt>
  32362. <dd><p>Consider transforms as relative to previous frame if set to 1,
  32363. absolute if set to 0. Default value is 0.
  32364. </p>
  32365. </dd>
  32366. <dt>&lsquo;<samp>zoom</samp>&rsquo;</dt>
  32367. <dd><p>Set percentage to zoom. A positive value will result in a zoom-in
  32368. effect, a negative value in a zoom-out effect. Default value is 0 (no
  32369. zoom).
  32370. </p>
  32371. </dd>
  32372. <dt>&lsquo;<samp>optzoom</samp>&rsquo;</dt>
  32373. <dd><p>Set optimal zooming to avoid borders.
  32374. </p>
  32375. <p>Accepted values are:
  32376. </p><dl compact="compact">
  32377. <dt>&lsquo;<samp>0</samp>&rsquo;</dt>
  32378. <dd><p>disabled
  32379. </p></dd>
  32380. <dt>&lsquo;<samp>1</samp>&rsquo;</dt>
  32381. <dd><p>optimal static zoom value is determined (only very strong movements
  32382. will lead to visible borders) (default)
  32383. </p></dd>
  32384. <dt>&lsquo;<samp>2</samp>&rsquo;</dt>
  32385. <dd><p>optimal adaptive zoom value is determined (no borders will be
  32386. visible), see &lsquo;<samp>zoomspeed</samp>&rsquo;
  32387. </p></dd>
  32388. </dl>
  32389. <p>Note that the value given at zoom is added to the one calculated here.
  32390. </p>
  32391. </dd>
  32392. <dt>&lsquo;<samp>zoomspeed</samp>&rsquo;</dt>
  32393. <dd><p>Set percent to zoom maximally each frame (enabled when
  32394. &lsquo;<samp>optzoom</samp>&rsquo; is set to 2). Range is from 0 to 5, default value is
  32395. 0.25.
  32396. </p>
  32397. </dd>
  32398. <dt>&lsquo;<samp>interpol</samp>&rsquo;</dt>
  32399. <dd><p>Specify type of interpolation.
  32400. </p>
  32401. <p>Available values are:
  32402. </p><dl compact="compact">
  32403. <dt>&lsquo;<samp>no</samp>&rsquo;</dt>
  32404. <dd><p>no interpolation
  32405. </p></dd>
  32406. <dt>&lsquo;<samp>linear</samp>&rsquo;</dt>
  32407. <dd><p>linear only horizontal
  32408. </p></dd>
  32409. <dt>&lsquo;<samp>bilinear</samp>&rsquo;</dt>
  32410. <dd><p>linear in both directions (default)
  32411. </p></dd>
  32412. <dt>&lsquo;<samp>bicubic</samp>&rsquo;</dt>
  32413. <dd><p>cubic in both directions (slow)
  32414. </p></dd>
  32415. </dl>
  32416. </dd>
  32417. <dt>&lsquo;<samp>tripod</samp>&rsquo;</dt>
  32418. <dd><p>Enable virtual tripod mode if set to 1, which is equivalent to
  32419. <code>relative=0:smoothing=0</code>. Default value is 0.
  32420. </p>
  32421. <p>Use also <code>tripod</code> option of <a href="#vidstabdetect">vidstabdetect</a>.
  32422. </p>
  32423. </dd>
  32424. <dt>&lsquo;<samp>debug</samp>&rsquo;</dt>
  32425. <dd><p>Increase log verbosity if set to 1. Also the detected global motions
  32426. are written to the temporary file &lsquo;<tt>global_motions.trf</tt>&rsquo;. Default
  32427. value is 0.
  32428. </p></dd>
  32429. </dl>
  32430. <a name="Examples-121"></a>
  32431. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-121">30.220.2 Examples</a></h3>
  32432. <ul>
  32433. <li>
  32434. Use <code>ffmpeg</code> for a typical stabilization with default values:
  32435. <div class="example">
  32436. <pre class="example">ffmpeg -i inp.mpeg -vf vidstabtransform,unsharp=5:5:0.8:3:3:0.4 inp_stabilized.mpeg
  32437. </pre></div>
  32438. <p>Note the use of the <a href="#unsharp">unsharp</a> filter which is always recommended.
  32439. </p>
  32440. </li><li>
  32441. Zoom in a bit more and load transform data from a given file:
  32442. <div class="example">
  32443. <pre class="example">vidstabtransform=zoom=5:input=&quot;mytransforms.trf&quot;
  32444. </pre></div>
  32445. </li><li>
  32446. Smoothen the video even more:
  32447. <div class="example">
  32448. <pre class="example">vidstabtransform=smoothing=30
  32449. </pre></div>
  32450. </li></ul>
  32451. <a name="vflip"></a>
  32452. <h2 class="section"><a href="ffplay-all.html#toc-vflip">30.221 vflip</a></h2>
  32453. <p>Flip the input video vertically.
  32454. </p>
  32455. <p>For example, to vertically flip a video with <code>ffmpeg</code>:
  32456. </p><div class="example">
  32457. <pre class="example">ffmpeg -i in.avi -vf &quot;vflip&quot; out.avi
  32458. </pre></div>
  32459. <a name="vfrdet"></a>
  32460. <h2 class="section"><a href="ffplay-all.html#toc-vfrdet">30.222 vfrdet</a></h2>
  32461. <p>Detect variable frame rate video.
  32462. </p>
  32463. <p>This filter tries to detect if the input is variable or constant frame rate.
  32464. </p>
  32465. <p>At end it will output number of frames detected as having variable delta pts,
  32466. and ones with constant delta pts.
  32467. If there was frames with variable delta, than it will also show min, max and
  32468. average delta encountered.
  32469. </p>
  32470. <a name="vibrance"></a>
  32471. <h2 class="section"><a href="ffplay-all.html#toc-vibrance">30.223 vibrance</a></h2>
  32472. <p>Boost or alter saturation.
  32473. </p>
  32474. <p>The filter accepts the following options:
  32475. </p><dl compact="compact">
  32476. <dt>&lsquo;<samp>intensity</samp>&rsquo;</dt>
  32477. <dd><p>Set strength of boost if positive value or strength of alter if negative value.
  32478. Default is 0. Allowed range is from -2 to 2.
  32479. </p>
  32480. </dd>
  32481. <dt>&lsquo;<samp>rbal</samp>&rsquo;</dt>
  32482. <dd><p>Set the red balance. Default is 1. Allowed range is from -10 to 10.
  32483. </p>
  32484. </dd>
  32485. <dt>&lsquo;<samp>gbal</samp>&rsquo;</dt>
  32486. <dd><p>Set the green balance. Default is 1. Allowed range is from -10 to 10.
  32487. </p>
  32488. </dd>
  32489. <dt>&lsquo;<samp>bbal</samp>&rsquo;</dt>
  32490. <dd><p>Set the blue balance. Default is 1. Allowed range is from -10 to 10.
  32491. </p>
  32492. </dd>
  32493. <dt>&lsquo;<samp>rlum</samp>&rsquo;</dt>
  32494. <dd><p>Set the red luma coefficient.
  32495. </p>
  32496. </dd>
  32497. <dt>&lsquo;<samp>glum</samp>&rsquo;</dt>
  32498. <dd><p>Set the green luma coefficient.
  32499. </p>
  32500. </dd>
  32501. <dt>&lsquo;<samp>blum</samp>&rsquo;</dt>
  32502. <dd><p>Set the blue luma coefficient.
  32503. </p>
  32504. </dd>
  32505. <dt>&lsquo;<samp>alternate</samp>&rsquo;</dt>
  32506. <dd><p>If <code>intensity</code> is negative and this is set to 1, colors will change,
  32507. otherwise colors will be less saturated, more towards gray.
  32508. </p></dd>
  32509. </dl>
  32510. <a name="Commands-50"></a>
  32511. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-50">30.223.1 Commands</a></h3>
  32512. <p>This filter supports the all above options as <a href="#commands">commands</a>.
  32513. </p>
  32514. <p><a name="vignette"></a>
  32515. </p><a name="vignette-1"></a>
  32516. <h2 class="section"><a href="ffplay-all.html#toc-vignette-1">30.224 vignette</a></h2>
  32517. <p>Make or reverse a natural vignetting effect.
  32518. </p>
  32519. <p>The filter accepts the following options:
  32520. </p>
  32521. <dl compact="compact">
  32522. <dt>&lsquo;<samp>angle, a</samp>&rsquo;</dt>
  32523. <dd><p>Set lens angle expression as a number of radians.
  32524. </p>
  32525. <p>The value is clipped in the <code>[0,PI/2]</code> range.
  32526. </p>
  32527. <p>Default value: <code>&quot;PI/5&quot;</code>
  32528. </p>
  32529. </dd>
  32530. <dt>&lsquo;<samp>x0</samp>&rsquo;</dt>
  32531. <dt>&lsquo;<samp>y0</samp>&rsquo;</dt>
  32532. <dd><p>Set center coordinates expressions. Respectively <code>&quot;w/2&quot;</code> and <code>&quot;h/2&quot;</code>
  32533. by default.
  32534. </p>
  32535. </dd>
  32536. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  32537. <dd><p>Set forward/backward mode.
  32538. </p>
  32539. <p>Available modes are:
  32540. </p><dl compact="compact">
  32541. <dt>&lsquo;<samp>forward</samp>&rsquo;</dt>
  32542. <dd><p>The larger the distance from the central point, the darker the image becomes.
  32543. </p>
  32544. </dd>
  32545. <dt>&lsquo;<samp>backward</samp>&rsquo;</dt>
  32546. <dd><p>The larger the distance from the central point, the brighter the image becomes.
  32547. This can be used to reverse a vignette effect, though there is no automatic
  32548. detection to extract the lens &lsquo;<samp>angle</samp>&rsquo; and other settings (yet). It can
  32549. also be used to create a burning effect.
  32550. </p></dd>
  32551. </dl>
  32552. <p>Default value is &lsquo;<samp>forward</samp>&rsquo;.
  32553. </p>
  32554. </dd>
  32555. <dt>&lsquo;<samp>eval</samp>&rsquo;</dt>
  32556. <dd><p>Set evaluation mode for the expressions (&lsquo;<samp>angle</samp>&rsquo;, &lsquo;<samp>x0</samp>&rsquo;, &lsquo;<samp>y0</samp>&rsquo;).
  32557. </p>
  32558. <p>It accepts the following values:
  32559. </p><dl compact="compact">
  32560. <dt>&lsquo;<samp>init</samp>&rsquo;</dt>
  32561. <dd><p>Evaluate expressions only once during the filter initialization.
  32562. </p>
  32563. </dd>
  32564. <dt>&lsquo;<samp>frame</samp>&rsquo;</dt>
  32565. <dd><p>Evaluate expressions for each incoming frame. This is way slower than the
  32566. &lsquo;<samp>init</samp>&rsquo; mode since it requires all the scalers to be re-computed, but it
  32567. allows advanced dynamic expressions.
  32568. </p></dd>
  32569. </dl>
  32570. <p>Default value is &lsquo;<samp>init</samp>&rsquo;.
  32571. </p>
  32572. </dd>
  32573. <dt>&lsquo;<samp>dither</samp>&rsquo;</dt>
  32574. <dd><p>Set dithering to reduce the circular banding effects. Default is <code>1</code>
  32575. (enabled).
  32576. </p>
  32577. </dd>
  32578. <dt>&lsquo;<samp>aspect</samp>&rsquo;</dt>
  32579. <dd><p>Set vignette aspect. This setting allows one to adjust the shape of the vignette.
  32580. Setting this value to the SAR of the input will make a rectangular vignetting
  32581. following the dimensions of the video.
  32582. </p>
  32583. <p>Default is <code>1/1</code>.
  32584. </p></dd>
  32585. </dl>
  32586. <a name="Expressions"></a>
  32587. <h3 class="subsection"><a href="ffplay-all.html#toc-Expressions">30.224.1 Expressions</a></h3>
  32588. <p>The &lsquo;<samp>alpha</samp>&rsquo;, &lsquo;<samp>x0</samp>&rsquo; and &lsquo;<samp>y0</samp>&rsquo; expressions can contain the
  32589. following parameters.
  32590. </p>
  32591. <dl compact="compact">
  32592. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  32593. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  32594. <dd><p>input width and height
  32595. </p>
  32596. </dd>
  32597. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  32598. <dd><p>the number of input frame, starting from 0
  32599. </p>
  32600. </dd>
  32601. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  32602. <dd><p>the PTS (Presentation TimeStamp) time of the filtered video frame, expressed in
  32603. <var>TB</var> units, NAN if undefined
  32604. </p>
  32605. </dd>
  32606. <dt>&lsquo;<samp>r</samp>&rsquo;</dt>
  32607. <dd><p>frame rate of the input video, NAN if the input frame rate is unknown
  32608. </p>
  32609. </dd>
  32610. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  32611. <dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
  32612. expressed in seconds, NAN if undefined
  32613. </p>
  32614. </dd>
  32615. <dt>&lsquo;<samp>tb</samp>&rsquo;</dt>
  32616. <dd><p>time base of the input video
  32617. </p></dd>
  32618. </dl>
  32619. <a name="Examples-86"></a>
  32620. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-86">30.224.2 Examples</a></h3>
  32621. <ul>
  32622. <li>
  32623. Apply simple strong vignetting effect:
  32624. <div class="example">
  32625. <pre class="example">vignette=PI/4
  32626. </pre></div>
  32627. </li><li>
  32628. Make a flickering vignetting:
  32629. <div class="example">
  32630. <pre class="example">vignette='PI/4+random(1)*PI/50':eval=frame
  32631. </pre></div>
  32632. </li></ul>
  32633. <a name="vmafmotion"></a>
  32634. <h2 class="section"><a href="ffplay-all.html#toc-vmafmotion">30.225 vmafmotion</a></h2>
  32635. <p>Obtain the average VMAF motion score of a video.
  32636. It is one of the component metrics of VMAF.
  32637. </p>
  32638. <p>The obtained average motion score is printed through the logging system.
  32639. </p>
  32640. <p>The filter accepts the following options:
  32641. </p>
  32642. <dl compact="compact">
  32643. <dt>&lsquo;<samp>stats_file</samp>&rsquo;</dt>
  32644. <dd><p>If specified, the filter will use the named file to save the motion score of
  32645. each frame with respect to the previous frame.
  32646. When filename equals &quot;-&quot; the data is sent to standard output.
  32647. </p></dd>
  32648. </dl>
  32649. <p>Example:
  32650. </p><div class="example">
  32651. <pre class="example">ffmpeg -i ref.mpg -vf vmafmotion -f null -
  32652. </pre></div>
  32653. <a name="vstack"></a>
  32654. <h2 class="section"><a href="ffplay-all.html#toc-vstack">30.226 vstack</a></h2>
  32655. <p>Stack input videos vertically.
  32656. </p>
  32657. <p>All streams must be of same pixel format and of same width.
  32658. </p>
  32659. <p>Note that this filter is faster than using <a href="#overlay">overlay</a> and <a href="#pad">pad</a> filter
  32660. to create same output.
  32661. </p>
  32662. <p>The filter accepts the following options:
  32663. </p>
  32664. <dl compact="compact">
  32665. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  32666. <dd><p>Set number of input streams. Default is 2.
  32667. </p>
  32668. </dd>
  32669. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  32670. <dd><p>If set to 1, force the output to terminate when the shortest input
  32671. terminates. Default value is 0.
  32672. </p></dd>
  32673. </dl>
  32674. <a name="w3fdif"></a>
  32675. <h2 class="section"><a href="ffplay-all.html#toc-w3fdif">30.227 w3fdif</a></h2>
  32676. <p>Deinterlace the input video (&quot;w3fdif&quot; stands for &quot;Weston 3 Field
  32677. Deinterlacing Filter&quot;).
  32678. </p>
  32679. <p>Based on the process described by Martin Weston for BBC R&amp;D, and
  32680. implemented based on the de-interlace algorithm written by Jim
  32681. Easterbrook for BBC R&amp;D, the Weston 3 field deinterlacing filter
  32682. uses filter coefficients calculated by BBC R&amp;D.
  32683. </p>
  32684. <p>This filter uses field-dominance information in frame to decide which
  32685. of each pair of fields to place first in the output.
  32686. If it gets it wrong use <a href="#setfield">setfield</a> filter before <code>w3fdif</code> filter.
  32687. </p>
  32688. <p>There are two sets of filter coefficients, so called &quot;simple&quot;
  32689. and &quot;complex&quot;. Which set of filter coefficients is used can
  32690. be set by passing an optional parameter:
  32691. </p>
  32692. <dl compact="compact">
  32693. <dt>&lsquo;<samp>filter</samp>&rsquo;</dt>
  32694. <dd><p>Set the interlacing filter coefficients. Accepts one of the following values:
  32695. </p>
  32696. <dl compact="compact">
  32697. <dt>&lsquo;<samp>simple</samp>&rsquo;</dt>
  32698. <dd><p>Simple filter coefficient set.
  32699. </p></dd>
  32700. <dt>&lsquo;<samp>complex</samp>&rsquo;</dt>
  32701. <dd><p>More-complex filter coefficient set.
  32702. </p></dd>
  32703. </dl>
  32704. <p>Default value is &lsquo;<samp>complex</samp>&rsquo;.
  32705. </p>
  32706. </dd>
  32707. <dt>&lsquo;<samp>deint</samp>&rsquo;</dt>
  32708. <dd><p>Specify which frames to deinterlace. Accepts one of the following values:
  32709. </p>
  32710. <dl compact="compact">
  32711. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  32712. <dd><p>Deinterlace all frames,
  32713. </p></dd>
  32714. <dt>&lsquo;<samp>interlaced</samp>&rsquo;</dt>
  32715. <dd><p>Only deinterlace frames marked as interlaced.
  32716. </p></dd>
  32717. </dl>
  32718. <p>Default value is &lsquo;<samp>all</samp>&rsquo;.
  32719. </p></dd>
  32720. </dl>
  32721. <a name="waveform"></a>
  32722. <h2 class="section"><a href="ffplay-all.html#toc-waveform">30.228 waveform</a></h2>
  32723. <p>Video waveform monitor.
  32724. </p>
  32725. <p>The waveform monitor plots color component intensity. By default luminance
  32726. only. Each column of the waveform corresponds to a column of pixels in the
  32727. source video.
  32728. </p>
  32729. <p>It accepts the following options:
  32730. </p>
  32731. <dl compact="compact">
  32732. <dt>&lsquo;<samp>mode, m</samp>&rsquo;</dt>
  32733. <dd><p>Can be either <code>row</code>, or <code>column</code>. Default is <code>column</code>.
  32734. In row mode, the graph on the left side represents color component value 0 and
  32735. the right side represents value = 255. In column mode, the top side represents
  32736. color component value = 0 and bottom side represents value = 255.
  32737. </p>
  32738. </dd>
  32739. <dt>&lsquo;<samp>intensity, i</samp>&rsquo;</dt>
  32740. <dd><p>Set intensity. Smaller values are useful to find out how many values of the same
  32741. luminance are distributed across input rows/columns.
  32742. Default value is <code>0.04</code>. Allowed range is [0, 1].
  32743. </p>
  32744. </dd>
  32745. <dt>&lsquo;<samp>mirror, r</samp>&rsquo;</dt>
  32746. <dd><p>Set mirroring mode. <code>0</code> means unmirrored, <code>1</code> means mirrored.
  32747. In mirrored mode, higher values will be represented on the left
  32748. side for <code>row</code> mode and at the top for <code>column</code> mode. Default is
  32749. <code>1</code> (mirrored).
  32750. </p>
  32751. </dd>
  32752. <dt>&lsquo;<samp>display, d</samp>&rsquo;</dt>
  32753. <dd><p>Set display mode.
  32754. It accepts the following values:
  32755. </p><dl compact="compact">
  32756. <dt>&lsquo;<samp>overlay</samp>&rsquo;</dt>
  32757. <dd><p>Presents information identical to that in the <code>parade</code>, except
  32758. that the graphs representing color components are superimposed directly
  32759. over one another.
  32760. </p>
  32761. <p>This display mode makes it easier to spot relative differences or similarities
  32762. in overlapping areas of the color components that are supposed to be identical,
  32763. such as neutral whites, grays, or blacks.
  32764. </p>
  32765. </dd>
  32766. <dt>&lsquo;<samp>stack</samp>&rsquo;</dt>
  32767. <dd><p>Display separate graph for the color components side by side in
  32768. <code>row</code> mode or one below the other in <code>column</code> mode.
  32769. </p>
  32770. </dd>
  32771. <dt>&lsquo;<samp>parade</samp>&rsquo;</dt>
  32772. <dd><p>Display separate graph for the color components side by side in
  32773. <code>column</code> mode or one below the other in <code>row</code> mode.
  32774. </p>
  32775. <p>Using this display mode makes it easy to spot color casts in the highlights
  32776. and shadows of an image, by comparing the contours of the top and the bottom
  32777. graphs of each waveform. Since whites, grays, and blacks are characterized
  32778. by exactly equal amounts of red, green, and blue, neutral areas of the picture
  32779. should display three waveforms of roughly equal width/height. If not, the
  32780. correction is easy to perform by making level adjustments the three waveforms.
  32781. </p></dd>
  32782. </dl>
  32783. <p>Default is <code>stack</code>.
  32784. </p>
  32785. </dd>
  32786. <dt>&lsquo;<samp>components, c</samp>&rsquo;</dt>
  32787. <dd><p>Set which color components to display. Default is 1, which means only luminance
  32788. or red color component if input is in RGB colorspace. If is set for example to
  32789. 7 it will display all 3 (if) available color components.
  32790. </p>
  32791. </dd>
  32792. <dt>&lsquo;<samp>envelope, e</samp>&rsquo;</dt>
  32793. <dd><dl compact="compact">
  32794. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  32795. <dd><p>No envelope, this is default.
  32796. </p>
  32797. </dd>
  32798. <dt>&lsquo;<samp>instant</samp>&rsquo;</dt>
  32799. <dd><p>Instant envelope, minimum and maximum values presented in graph will be easily
  32800. visible even with small <code>step</code> value.
  32801. </p>
  32802. </dd>
  32803. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  32804. <dd><p>Hold minimum and maximum values presented in graph across time. This way you
  32805. can still spot out of range values without constantly looking at waveforms.
  32806. </p>
  32807. </dd>
  32808. <dt>&lsquo;<samp>peak+instant</samp>&rsquo;</dt>
  32809. <dd><p>Peak and instant envelope combined together.
  32810. </p></dd>
  32811. </dl>
  32812. </dd>
  32813. <dt>&lsquo;<samp>filter, f</samp>&rsquo;</dt>
  32814. <dd><dl compact="compact">
  32815. <dt>&lsquo;<samp>lowpass</samp>&rsquo;</dt>
  32816. <dd><p>No filtering, this is default.
  32817. </p>
  32818. </dd>
  32819. <dt>&lsquo;<samp>flat</samp>&rsquo;</dt>
  32820. <dd><p>Luma and chroma combined together.
  32821. </p>
  32822. </dd>
  32823. <dt>&lsquo;<samp>aflat</samp>&rsquo;</dt>
  32824. <dd><p>Similar as above, but shows difference between blue and red chroma.
  32825. </p>
  32826. </dd>
  32827. <dt>&lsquo;<samp>xflat</samp>&rsquo;</dt>
  32828. <dd><p>Similar as above, but use different colors.
  32829. </p>
  32830. </dd>
  32831. <dt>&lsquo;<samp>yflat</samp>&rsquo;</dt>
  32832. <dd><p>Similar as above, but again with different colors.
  32833. </p>
  32834. </dd>
  32835. <dt>&lsquo;<samp>chroma</samp>&rsquo;</dt>
  32836. <dd><p>Displays only chroma.
  32837. </p>
  32838. </dd>
  32839. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  32840. <dd><p>Displays actual color value on waveform.
  32841. </p>
  32842. </dd>
  32843. <dt>&lsquo;<samp>acolor</samp>&rsquo;</dt>
  32844. <dd><p>Similar as above, but with luma showing frequency of chroma values.
  32845. </p></dd>
  32846. </dl>
  32847. </dd>
  32848. <dt>&lsquo;<samp>graticule, g</samp>&rsquo;</dt>
  32849. <dd><p>Set which graticule to display.
  32850. </p>
  32851. <dl compact="compact">
  32852. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  32853. <dd><p>Do not display graticule.
  32854. </p>
  32855. </dd>
  32856. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  32857. <dd><p>Display green graticule showing legal broadcast ranges.
  32858. </p>
  32859. </dd>
  32860. <dt>&lsquo;<samp>orange</samp>&rsquo;</dt>
  32861. <dd><p>Display orange graticule showing legal broadcast ranges.
  32862. </p>
  32863. </dd>
  32864. <dt>&lsquo;<samp>invert</samp>&rsquo;</dt>
  32865. <dd><p>Display invert graticule showing legal broadcast ranges.
  32866. </p></dd>
  32867. </dl>
  32868. </dd>
  32869. <dt>&lsquo;<samp>opacity, o</samp>&rsquo;</dt>
  32870. <dd><p>Set graticule opacity.
  32871. </p>
  32872. </dd>
  32873. <dt>&lsquo;<samp>flags, fl</samp>&rsquo;</dt>
  32874. <dd><p>Set graticule flags.
  32875. </p>
  32876. <dl compact="compact">
  32877. <dt>&lsquo;<samp>numbers</samp>&rsquo;</dt>
  32878. <dd><p>Draw numbers above lines. By default enabled.
  32879. </p>
  32880. </dd>
  32881. <dt>&lsquo;<samp>dots</samp>&rsquo;</dt>
  32882. <dd><p>Draw dots instead of lines.
  32883. </p></dd>
  32884. </dl>
  32885. </dd>
  32886. <dt>&lsquo;<samp>scale, s</samp>&rsquo;</dt>
  32887. <dd><p>Set scale used for displaying graticule.
  32888. </p>
  32889. <dl compact="compact">
  32890. <dt>&lsquo;<samp>digital</samp>&rsquo;</dt>
  32891. <dt>&lsquo;<samp>millivolts</samp>&rsquo;</dt>
  32892. <dt>&lsquo;<samp>ire</samp>&rsquo;</dt>
  32893. </dl>
  32894. <p>Default is digital.
  32895. </p>
  32896. </dd>
  32897. <dt>&lsquo;<samp>bgopacity, b</samp>&rsquo;</dt>
  32898. <dd><p>Set background opacity.
  32899. </p>
  32900. </dd>
  32901. <dt>&lsquo;<samp>tint0, t0</samp>&rsquo;</dt>
  32902. <dt>&lsquo;<samp>tint1, t1</samp>&rsquo;</dt>
  32903. <dd><p>Set tint for output.
  32904. Only used with lowpass filter and when display is not overlay and input
  32905. pixel formats are not RGB.
  32906. </p></dd>
  32907. </dl>
  32908. <a name="weave_002c-doubleweave"></a>
  32909. <h2 class="section"><a href="ffplay-all.html#toc-weave_002c-doubleweave">30.229 weave, doubleweave</a></h2>
  32910. <p>The <code>weave</code> takes a field-based video input and join
  32911. each two sequential fields into single frame, producing a new double
  32912. height clip with half the frame rate and half the frame count.
  32913. </p>
  32914. <p>The <code>doubleweave</code> works same as <code>weave</code> but without
  32915. halving frame rate and frame count.
  32916. </p>
  32917. <p>It accepts the following option:
  32918. </p>
  32919. <dl compact="compact">
  32920. <dt>&lsquo;<samp>first_field</samp>&rsquo;</dt>
  32921. <dd><p>Set first field. Available values are:
  32922. </p>
  32923. <dl compact="compact">
  32924. <dt>&lsquo;<samp>top, t</samp>&rsquo;</dt>
  32925. <dd><p>Set the frame as top-field-first.
  32926. </p>
  32927. </dd>
  32928. <dt>&lsquo;<samp>bottom, b</samp>&rsquo;</dt>
  32929. <dd><p>Set the frame as bottom-field-first.
  32930. </p></dd>
  32931. </dl>
  32932. </dd>
  32933. </dl>
  32934. <a name="Examples-75"></a>
  32935. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-75">30.229.1 Examples</a></h3>
  32936. <ul>
  32937. <li>
  32938. Interlace video using <a href="#select">select</a> and <a href="#separatefields">separatefields</a> filter:
  32939. <div class="example">
  32940. <pre class="example">separatefields,select=eq(mod(n,4),0)+eq(mod(n,4),3),weave
  32941. </pre></div>
  32942. </li></ul>
  32943. <a name="xbr"></a>
  32944. <h2 class="section"><a href="ffplay-all.html#toc-xbr">30.230 xbr</a></h2>
  32945. <p>Apply the xBR high-quality magnification filter which is designed for pixel
  32946. art. It follows a set of edge-detection rules, see
  32947. <a href="https://forums.libretro.com/t/xbr-algorithm-tutorial/123">https://forums.libretro.com/t/xbr-algorithm-tutorial/123</a>.
  32948. </p>
  32949. <p>It accepts the following option:
  32950. </p>
  32951. <dl compact="compact">
  32952. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  32953. <dd><p>Set the scaling dimension: <code>2</code> for <code>2xBR</code>, <code>3</code> for
  32954. <code>3xBR</code> and <code>4</code> for <code>4xBR</code>.
  32955. Default is <code>3</code>.
  32956. </p></dd>
  32957. </dl>
  32958. <a name="xfade"></a>
  32959. <h2 class="section"><a href="ffplay-all.html#toc-xfade">30.231 xfade</a></h2>
  32960. <p>Apply cross fade from one input video stream to another input video stream.
  32961. The cross fade is applied for specified duration.
  32962. </p>
  32963. <p>The filter accepts the following options:
  32964. </p>
  32965. <dl compact="compact">
  32966. <dt>&lsquo;<samp>transition</samp>&rsquo;</dt>
  32967. <dd><p>Set one of available transition effects:
  32968. </p>
  32969. <dl compact="compact">
  32970. <dt>&lsquo;<samp>custom</samp>&rsquo;</dt>
  32971. <dt>&lsquo;<samp>fade</samp>&rsquo;</dt>
  32972. <dt>&lsquo;<samp>wipeleft</samp>&rsquo;</dt>
  32973. <dt>&lsquo;<samp>wiperight</samp>&rsquo;</dt>
  32974. <dt>&lsquo;<samp>wipeup</samp>&rsquo;</dt>
  32975. <dt>&lsquo;<samp>wipedown</samp>&rsquo;</dt>
  32976. <dt>&lsquo;<samp>slideleft</samp>&rsquo;</dt>
  32977. <dt>&lsquo;<samp>slideright</samp>&rsquo;</dt>
  32978. <dt>&lsquo;<samp>slideup</samp>&rsquo;</dt>
  32979. <dt>&lsquo;<samp>slidedown</samp>&rsquo;</dt>
  32980. <dt>&lsquo;<samp>circlecrop</samp>&rsquo;</dt>
  32981. <dt>&lsquo;<samp>rectcrop</samp>&rsquo;</dt>
  32982. <dt>&lsquo;<samp>distance</samp>&rsquo;</dt>
  32983. <dt>&lsquo;<samp>fadeblack</samp>&rsquo;</dt>
  32984. <dt>&lsquo;<samp>fadewhite</samp>&rsquo;</dt>
  32985. <dt>&lsquo;<samp>radial</samp>&rsquo;</dt>
  32986. <dt>&lsquo;<samp>smoothleft</samp>&rsquo;</dt>
  32987. <dt>&lsquo;<samp>smoothright</samp>&rsquo;</dt>
  32988. <dt>&lsquo;<samp>smoothup</samp>&rsquo;</dt>
  32989. <dt>&lsquo;<samp>smoothdown</samp>&rsquo;</dt>
  32990. <dt>&lsquo;<samp>circleopen</samp>&rsquo;</dt>
  32991. <dt>&lsquo;<samp>circleclose</samp>&rsquo;</dt>
  32992. <dt>&lsquo;<samp>vertopen</samp>&rsquo;</dt>
  32993. <dt>&lsquo;<samp>vertclose</samp>&rsquo;</dt>
  32994. <dt>&lsquo;<samp>horzopen</samp>&rsquo;</dt>
  32995. <dt>&lsquo;<samp>horzclose</samp>&rsquo;</dt>
  32996. <dt>&lsquo;<samp>dissolve</samp>&rsquo;</dt>
  32997. <dt>&lsquo;<samp>pixelize</samp>&rsquo;</dt>
  32998. <dt>&lsquo;<samp>diagtl</samp>&rsquo;</dt>
  32999. <dt>&lsquo;<samp>diagtr</samp>&rsquo;</dt>
  33000. <dt>&lsquo;<samp>diagbl</samp>&rsquo;</dt>
  33001. <dt>&lsquo;<samp>diagbr</samp>&rsquo;</dt>
  33002. </dl>
  33003. <p>Default transition effect is fade.
  33004. </p>
  33005. </dd>
  33006. <dt>&lsquo;<samp>duration</samp>&rsquo;</dt>
  33007. <dd><p>Set cross fade duration in seconds.
  33008. Default duration is 1 second.
  33009. </p>
  33010. </dd>
  33011. <dt>&lsquo;<samp>offset</samp>&rsquo;</dt>
  33012. <dd><p>Set cross fade start relative to first input stream in seconds.
  33013. Default offset is 0.
  33014. </p>
  33015. </dd>
  33016. <dt>&lsquo;<samp>expr</samp>&rsquo;</dt>
  33017. <dd><p>Set expression for custom transition effect.
  33018. </p>
  33019. <p>The expressions can use the following variables and functions:
  33020. </p>
  33021. <dl compact="compact">
  33022. <dt>&lsquo;<samp>X</samp>&rsquo;</dt>
  33023. <dt>&lsquo;<samp>Y</samp>&rsquo;</dt>
  33024. <dd><p>The coordinates of the current sample.
  33025. </p>
  33026. </dd>
  33027. <dt>&lsquo;<samp>W</samp>&rsquo;</dt>
  33028. <dt>&lsquo;<samp>H</samp>&rsquo;</dt>
  33029. <dd><p>The width and height of the image.
  33030. </p>
  33031. </dd>
  33032. <dt>&lsquo;<samp>P</samp>&rsquo;</dt>
  33033. <dd><p>Progress of transition effect.
  33034. </p>
  33035. </dd>
  33036. <dt>&lsquo;<samp>PLANE</samp>&rsquo;</dt>
  33037. <dd><p>Currently processed plane.
  33038. </p>
  33039. </dd>
  33040. <dt>&lsquo;<samp>A</samp>&rsquo;</dt>
  33041. <dd><p>Return value of first input at current location and plane.
  33042. </p>
  33043. </dd>
  33044. <dt>&lsquo;<samp>B</samp>&rsquo;</dt>
  33045. <dd><p>Return value of second input at current location and plane.
  33046. </p>
  33047. </dd>
  33048. <dt>&lsquo;<samp>a0(x, y)</samp>&rsquo;</dt>
  33049. <dt>&lsquo;<samp>a1(x, y)</samp>&rsquo;</dt>
  33050. <dt>&lsquo;<samp>a2(x, y)</samp>&rsquo;</dt>
  33051. <dt>&lsquo;<samp>a3(x, y)</samp>&rsquo;</dt>
  33052. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  33053. first/second/third/fourth component of first input.
  33054. </p>
  33055. </dd>
  33056. <dt>&lsquo;<samp>b0(x, y)</samp>&rsquo;</dt>
  33057. <dt>&lsquo;<samp>b1(x, y)</samp>&rsquo;</dt>
  33058. <dt>&lsquo;<samp>b2(x, y)</samp>&rsquo;</dt>
  33059. <dt>&lsquo;<samp>b3(x, y)</samp>&rsquo;</dt>
  33060. <dd><p>Return the value of the pixel at location (<var>x</var>,<var>y</var>) of the
  33061. first/second/third/fourth component of second input.
  33062. </p></dd>
  33063. </dl>
  33064. </dd>
  33065. </dl>
  33066. <a name="Examples-112"></a>
  33067. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-112">30.231.1 Examples</a></h3>
  33068. <ul>
  33069. <li>
  33070. Cross fade from one input video to another input video, with fade transition and duration of transition
  33071. of 2 seconds starting at offset of 5 seconds:
  33072. <div class="example">
  33073. <pre class="example">ffmpeg -i first.mp4 -i second.mp4 -filter_complex xfade=transition=fade:duration=2:offset=5 output.mp4
  33074. </pre></div>
  33075. </li></ul>
  33076. <a name="xmedian"></a>
  33077. <h2 class="section"><a href="ffplay-all.html#toc-xmedian">30.232 xmedian</a></h2>
  33078. <p>Pick median pixels from several input videos.
  33079. </p>
  33080. <p>The filter accepts the following options:
  33081. </p>
  33082. <dl compact="compact">
  33083. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  33084. <dd><p>Set number of inputs.
  33085. Default is 3. Allowed range is from 3 to 255.
  33086. If number of inputs is even number, than result will be mean value between two median values.
  33087. </p>
  33088. </dd>
  33089. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  33090. <dd><p>Set which planes to filter. Default value is <code>15</code>, by which all planes are processed.
  33091. </p>
  33092. </dd>
  33093. <dt>&lsquo;<samp>percentile</samp>&rsquo;</dt>
  33094. <dd><p>Set median percentile. Default value is <code>0.5</code>.
  33095. Default value of <code>0.5</code> will pick always median values, while <code>0</code> will pick
  33096. minimum values, and <code>1</code> maximum values.
  33097. </p></dd>
  33098. </dl>
  33099. <a name="xstack"></a>
  33100. <h2 class="section"><a href="ffplay-all.html#toc-xstack">30.233 xstack</a></h2>
  33101. <p>Stack video inputs into custom layout.
  33102. </p>
  33103. <p>All streams must be of same pixel format.
  33104. </p>
  33105. <p>The filter accepts the following options:
  33106. </p>
  33107. <dl compact="compact">
  33108. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  33109. <dd><p>Set number of input streams. Default is 2.
  33110. </p>
  33111. </dd>
  33112. <dt>&lsquo;<samp>layout</samp>&rsquo;</dt>
  33113. <dd><p>Specify layout of inputs.
  33114. This option requires the desired layout configuration to be explicitly set by the user.
  33115. This sets position of each video input in output. Each input
  33116. is separated by &rsquo;|&rsquo;.
  33117. The first number represents the column, and the second number represents the row.
  33118. Numbers start at 0 and are separated by &rsquo;_&rsquo;. Optionally one can use wX and hX,
  33119. where X is video input from which to take width or height.
  33120. Multiple values can be used when separated by &rsquo;+&rsquo;. In such
  33121. case values are summed together.
  33122. </p>
  33123. <p>Note that if inputs are of different sizes gaps may appear, as not all of
  33124. the output video frame will be filled. Similarly, videos can overlap each
  33125. other if their position doesn&rsquo;t leave enough space for the full frame of
  33126. adjoining videos.
  33127. </p>
  33128. <p>For 2 inputs, a default layout of <code>0_0|w0_0</code> is set. In all other cases,
  33129. a layout must be set by the user.
  33130. </p>
  33131. </dd>
  33132. <dt>&lsquo;<samp>shortest</samp>&rsquo;</dt>
  33133. <dd><p>If set to 1, force the output to terminate when the shortest input
  33134. terminates. Default value is 0.
  33135. </p>
  33136. </dd>
  33137. <dt>&lsquo;<samp>fill</samp>&rsquo;</dt>
  33138. <dd><p>If set to valid color, all unused pixels will be filled with that color.
  33139. By default fill is set to none, so it is disabled.
  33140. </p></dd>
  33141. </dl>
  33142. <a name="Examples-120"></a>
  33143. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-120">30.233.1 Examples</a></h3>
  33144. <ul>
  33145. <li>
  33146. Display 4 inputs into 2x2 grid.
  33147. <p>Layout:
  33148. </p><div class="example">
  33149. <pre class="example">input1(0, 0) | input3(w0, 0)
  33150. input2(0, h0) | input4(w0, h0)
  33151. </pre></div>
  33152. <div class="example">
  33153. <pre class="example">xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
  33154. </pre></div>
  33155. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  33156. </p>
  33157. </li><li>
  33158. Display 4 inputs into 1x4 grid.
  33159. <p>Layout:
  33160. </p><div class="example">
  33161. <pre class="example">input1(0, 0)
  33162. input2(0, h0)
  33163. input3(0, h0+h1)
  33164. input4(0, h0+h1+h2)
  33165. </pre></div>
  33166. <div class="example">
  33167. <pre class="example">xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
  33168. </pre></div>
  33169. <p>Note that if inputs are of different widths, unused space will appear.
  33170. </p>
  33171. </li><li>
  33172. Display 9 inputs into 3x3 grid.
  33173. <p>Layout:
  33174. </p><div class="example">
  33175. <pre class="example">input1(0, 0) | input4(w0, 0) | input7(w0+w3, 0)
  33176. input2(0, h0) | input5(w0, h0) | input8(w0+w3, h0)
  33177. input3(0, h0+h1) | input6(w0, h0+h1) | input9(w0+w3, h0+h1)
  33178. </pre></div>
  33179. <div class="example">
  33180. <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
  33181. </pre></div>
  33182. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  33183. </p>
  33184. </li><li>
  33185. Display 16 inputs into 4x4 grid.
  33186. <p>Layout:
  33187. </p><div class="example">
  33188. <pre class="example">input1(0, 0) | input5(w0, 0) | input9 (w0+w4, 0) | input13(w0+w4+w8, 0)
  33189. input2(0, h0) | input6(w0, h0) | input10(w0+w4, h0) | input14(w0+w4+w8, h0)
  33190. input3(0, h0+h1) | input7(w0, h0+h1) | input11(w0+w4, h0+h1) | input15(w0+w4+w8, h0+h1)
  33191. input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
  33192. </pre></div>
  33193. <div class="example">
  33194. <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|
  33195. 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
  33196. </pre></div>
  33197. <p>Note that if inputs are of different sizes, gaps or overlaps may occur.
  33198. </p>
  33199. </li></ul>
  33200. <p><a name="yadif"></a>
  33201. </p><a name="yadif-1"></a>
  33202. <h2 class="section"><a href="ffplay-all.html#toc-yadif-1">30.234 yadif</a></h2>
  33203. <p>Deinterlace the input video (&quot;yadif&quot; means &quot;yet another deinterlacing
  33204. filter&quot;).
  33205. </p>
  33206. <p>It accepts the following parameters:
  33207. </p>
  33208. <dl compact="compact">
  33209. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  33210. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  33211. </p>
  33212. <dl compact="compact">
  33213. <dt>&lsquo;<samp>0, send_frame</samp>&rsquo;</dt>
  33214. <dd><p>Output one frame for each frame.
  33215. </p></dd>
  33216. <dt>&lsquo;<samp>1, send_field</samp>&rsquo;</dt>
  33217. <dd><p>Output one frame for each field.
  33218. </p></dd>
  33219. <dt>&lsquo;<samp>2, send_frame_nospatial</samp>&rsquo;</dt>
  33220. <dd><p>Like <code>send_frame</code>, but it skips the spatial interlacing check.
  33221. </p></dd>
  33222. <dt>&lsquo;<samp>3, send_field_nospatial</samp>&rsquo;</dt>
  33223. <dd><p>Like <code>send_field</code>, but it skips the spatial interlacing check.
  33224. </p></dd>
  33225. </dl>
  33226. <p>The default value is <code>send_frame</code>.
  33227. </p>
  33228. </dd>
  33229. <dt>&lsquo;<samp>parity</samp>&rsquo;</dt>
  33230. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  33231. of the following values:
  33232. </p>
  33233. <dl compact="compact">
  33234. <dt>&lsquo;<samp>0, tff</samp>&rsquo;</dt>
  33235. <dd><p>Assume the top field is first.
  33236. </p></dd>
  33237. <dt>&lsquo;<samp>1, bff</samp>&rsquo;</dt>
  33238. <dd><p>Assume the bottom field is first.
  33239. </p></dd>
  33240. <dt>&lsquo;<samp>-1, auto</samp>&rsquo;</dt>
  33241. <dd><p>Enable automatic detection of field parity.
  33242. </p></dd>
  33243. </dl>
  33244. <p>The default value is <code>auto</code>.
  33245. If the interlacing is unknown or the decoder does not export this information,
  33246. top field first will be assumed.
  33247. </p>
  33248. </dd>
  33249. <dt>&lsquo;<samp>deint</samp>&rsquo;</dt>
  33250. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  33251. values:
  33252. </p>
  33253. <dl compact="compact">
  33254. <dt>&lsquo;<samp>0, all</samp>&rsquo;</dt>
  33255. <dd><p>Deinterlace all frames.
  33256. </p></dd>
  33257. <dt>&lsquo;<samp>1, interlaced</samp>&rsquo;</dt>
  33258. <dd><p>Only deinterlace frames marked as interlaced.
  33259. </p></dd>
  33260. </dl>
  33261. <p>The default value is <code>all</code>.
  33262. </p></dd>
  33263. </dl>
  33264. <a name="yadif_005fcuda"></a>
  33265. <h2 class="section"><a href="ffplay-all.html#toc-yadif_005fcuda">30.235 yadif_cuda</a></h2>
  33266. <p>Deinterlace the input video using the <a href="#yadif">yadif</a> algorithm, but implemented
  33267. in CUDA so that it can work as part of a GPU accelerated pipeline with nvdec
  33268. and/or nvenc.
  33269. </p>
  33270. <p>It accepts the following parameters:
  33271. </p>
  33272. <dl compact="compact">
  33273. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  33274. <dd><p>The interlacing mode to adopt. It accepts one of the following values:
  33275. </p>
  33276. <dl compact="compact">
  33277. <dt>&lsquo;<samp>0, send_frame</samp>&rsquo;</dt>
  33278. <dd><p>Output one frame for each frame.
  33279. </p></dd>
  33280. <dt>&lsquo;<samp>1, send_field</samp>&rsquo;</dt>
  33281. <dd><p>Output one frame for each field.
  33282. </p></dd>
  33283. <dt>&lsquo;<samp>2, send_frame_nospatial</samp>&rsquo;</dt>
  33284. <dd><p>Like <code>send_frame</code>, but it skips the spatial interlacing check.
  33285. </p></dd>
  33286. <dt>&lsquo;<samp>3, send_field_nospatial</samp>&rsquo;</dt>
  33287. <dd><p>Like <code>send_field</code>, but it skips the spatial interlacing check.
  33288. </p></dd>
  33289. </dl>
  33290. <p>The default value is <code>send_frame</code>.
  33291. </p>
  33292. </dd>
  33293. <dt>&lsquo;<samp>parity</samp>&rsquo;</dt>
  33294. <dd><p>The picture field parity assumed for the input interlaced video. It accepts one
  33295. of the following values:
  33296. </p>
  33297. <dl compact="compact">
  33298. <dt>&lsquo;<samp>0, tff</samp>&rsquo;</dt>
  33299. <dd><p>Assume the top field is first.
  33300. </p></dd>
  33301. <dt>&lsquo;<samp>1, bff</samp>&rsquo;</dt>
  33302. <dd><p>Assume the bottom field is first.
  33303. </p></dd>
  33304. <dt>&lsquo;<samp>-1, auto</samp>&rsquo;</dt>
  33305. <dd><p>Enable automatic detection of field parity.
  33306. </p></dd>
  33307. </dl>
  33308. <p>The default value is <code>auto</code>.
  33309. If the interlacing is unknown or the decoder does not export this information,
  33310. top field first will be assumed.
  33311. </p>
  33312. </dd>
  33313. <dt>&lsquo;<samp>deint</samp>&rsquo;</dt>
  33314. <dd><p>Specify which frames to deinterlace. Accepts one of the following
  33315. values:
  33316. </p>
  33317. <dl compact="compact">
  33318. <dt>&lsquo;<samp>0, all</samp>&rsquo;</dt>
  33319. <dd><p>Deinterlace all frames.
  33320. </p></dd>
  33321. <dt>&lsquo;<samp>1, interlaced</samp>&rsquo;</dt>
  33322. <dd><p>Only deinterlace frames marked as interlaced.
  33323. </p></dd>
  33324. </dl>
  33325. <p>The default value is <code>all</code>.
  33326. </p></dd>
  33327. </dl>
  33328. <a name="yaepblur"></a>
  33329. <h2 class="section"><a href="ffplay-all.html#toc-yaepblur">30.236 yaepblur</a></h2>
  33330. <p>Apply blur filter while preserving edges (&quot;yaepblur&quot; means &quot;yet another edge preserving blur filter&quot;).
  33331. The algorithm is described in
  33332. &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;
  33333. </p>
  33334. <p>It accepts the following parameters:
  33335. </p>
  33336. <dl compact="compact">
  33337. <dt>&lsquo;<samp>radius, r</samp>&rsquo;</dt>
  33338. <dd><p>Set the window radius. Default value is 3.
  33339. </p>
  33340. </dd>
  33341. <dt>&lsquo;<samp>planes, p</samp>&rsquo;</dt>
  33342. <dd><p>Set which planes to filter. Default is only the first plane.
  33343. </p>
  33344. </dd>
  33345. <dt>&lsquo;<samp>sigma, s</samp>&rsquo;</dt>
  33346. <dd><p>Set blur strength. Default value is 128.
  33347. </p></dd>
  33348. </dl>
  33349. <a name="Commands-65"></a>
  33350. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-65">30.236.1 Commands</a></h3>
  33351. <p>This filter supports same <a href="#commands">commands</a> as options.
  33352. </p>
  33353. <a name="zoompan"></a>
  33354. <h2 class="section"><a href="ffplay-all.html#toc-zoompan">30.237 zoompan</a></h2>
  33355. <p>Apply Zoom &amp; Pan effect.
  33356. </p>
  33357. <p>This filter accepts the following options:
  33358. </p>
  33359. <dl compact="compact">
  33360. <dt>&lsquo;<samp>zoom, z</samp>&rsquo;</dt>
  33361. <dd><p>Set the zoom expression. Range is 1-10. Default is 1.
  33362. </p>
  33363. </dd>
  33364. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  33365. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  33366. <dd><p>Set the x and y expression. Default is 0.
  33367. </p>
  33368. </dd>
  33369. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  33370. <dd><p>Set the duration expression in number of frames.
  33371. This sets for how many number of frames effect will last for
  33372. single input image.
  33373. </p>
  33374. </dd>
  33375. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  33376. <dd><p>Set the output image size, default is &rsquo;hd720&rsquo;.
  33377. </p>
  33378. </dd>
  33379. <dt>&lsquo;<samp>fps</samp>&rsquo;</dt>
  33380. <dd><p>Set the output frame rate, default is &rsquo;25&rsquo;.
  33381. </p></dd>
  33382. </dl>
  33383. <p>Each expression can contain the following constants:
  33384. </p>
  33385. <dl compact="compact">
  33386. <dt>&lsquo;<samp>in_w, iw</samp>&rsquo;</dt>
  33387. <dd><p>Input width.
  33388. </p>
  33389. </dd>
  33390. <dt>&lsquo;<samp>in_h, ih</samp>&rsquo;</dt>
  33391. <dd><p>Input height.
  33392. </p>
  33393. </dd>
  33394. <dt>&lsquo;<samp>out_w, ow</samp>&rsquo;</dt>
  33395. <dd><p>Output width.
  33396. </p>
  33397. </dd>
  33398. <dt>&lsquo;<samp>out_h, oh</samp>&rsquo;</dt>
  33399. <dd><p>Output height.
  33400. </p>
  33401. </dd>
  33402. <dt>&lsquo;<samp>in</samp>&rsquo;</dt>
  33403. <dd><p>Input frame count.
  33404. </p>
  33405. </dd>
  33406. <dt>&lsquo;<samp>on</samp>&rsquo;</dt>
  33407. <dd><p>Output frame count.
  33408. </p>
  33409. </dd>
  33410. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  33411. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  33412. <dd><p>Last calculated &rsquo;x&rsquo; and &rsquo;y&rsquo; position from &rsquo;x&rsquo; and &rsquo;y&rsquo; expression
  33413. for current input frame.
  33414. </p>
  33415. </dd>
  33416. <dt>&lsquo;<samp>px</samp>&rsquo;</dt>
  33417. <dt>&lsquo;<samp>py</samp>&rsquo;</dt>
  33418. <dd><p>&rsquo;x&rsquo; and &rsquo;y&rsquo; of last output frame of previous input frame or 0 when there was
  33419. not yet such frame (first input frame).
  33420. </p>
  33421. </dd>
  33422. <dt>&lsquo;<samp>zoom</samp>&rsquo;</dt>
  33423. <dd><p>Last calculated zoom from &rsquo;z&rsquo; expression for current input frame.
  33424. </p>
  33425. </dd>
  33426. <dt>&lsquo;<samp>pzoom</samp>&rsquo;</dt>
  33427. <dd><p>Last calculated zoom of last output frame of previous input frame.
  33428. </p>
  33429. </dd>
  33430. <dt>&lsquo;<samp>duration</samp>&rsquo;</dt>
  33431. <dd><p>Number of output frames for current input frame. Calculated from &rsquo;d&rsquo; expression
  33432. for each input frame.
  33433. </p>
  33434. </dd>
  33435. <dt>&lsquo;<samp>pduration</samp>&rsquo;</dt>
  33436. <dd><p>number of output frames created for previous input frame
  33437. </p>
  33438. </dd>
  33439. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  33440. <dd><p>Rational number: input width / input height
  33441. </p>
  33442. </dd>
  33443. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  33444. <dd><p>sample aspect ratio
  33445. </p>
  33446. </dd>
  33447. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  33448. <dd><p>display aspect ratio
  33449. </p>
  33450. </dd>
  33451. </dl>
  33452. <a name="Examples-1"></a>
  33453. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-1">30.237.1 Examples</a></h3>
  33454. <ul>
  33455. <li>
  33456. Zoom-in up to 1.5 and pan at same time to some spot near center of picture:
  33457. <div class="example">
  33458. <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
  33459. </pre></div>
  33460. </li><li>
  33461. Zoom-in up to 1.5 and pan always at center of picture:
  33462. <div class="example">
  33463. <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)'
  33464. </pre></div>
  33465. </li><li>
  33466. Same as above but without pausing:
  33467. <div class="example">
  33468. <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)'
  33469. </pre></div>
  33470. </li></ul>
  33471. <p><a name="zscale"></a>
  33472. </p><a name="zscale-1"></a>
  33473. <h2 class="section"><a href="ffplay-all.html#toc-zscale-1">30.238 zscale</a></h2>
  33474. <p>Scale (resize) the input video, using the z.lib library:
  33475. <a href="https://github.com/sekrit-twc/zimg">https://github.com/sekrit-twc/zimg</a>. To enable compilation of this
  33476. filter, you need to configure FFmpeg with <code>--enable-libzimg</code>.
  33477. </p>
  33478. <p>The zscale filter forces the output display aspect ratio to be the same
  33479. as the input, by changing the output sample aspect ratio.
  33480. </p>
  33481. <p>If the input image format is different from the format requested by
  33482. the next filter, the zscale filter will convert the input to the
  33483. requested format.
  33484. </p>
  33485. <a name="Options-24"></a>
  33486. <h3 class="subsection"><a href="ffplay-all.html#toc-Options-24">30.238.1 Options</a></h3>
  33487. <p>The filter accepts the following options.
  33488. </p>
  33489. <dl compact="compact">
  33490. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  33491. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  33492. <dd><p>Set the output video dimension expression. Default value is the input
  33493. dimension.
  33494. </p>
  33495. <p>If the <var>width</var> or <var>w</var> value is 0, the input width is used for
  33496. the output. If the <var>height</var> or <var>h</var> value is 0, the input height
  33497. is used for the output.
  33498. </p>
  33499. <p>If one and only one of the values is -n with n &gt;= 1, the zscale filter
  33500. will use a value that maintains the aspect ratio of the input image,
  33501. calculated from the other specified dimension. After that it will,
  33502. however, make sure that the calculated dimension is divisible by n and
  33503. adjust the value if necessary.
  33504. </p>
  33505. <p>If both values are -n with n &gt;= 1, the behavior will be identical to
  33506. both values being set to 0 as previously detailed.
  33507. </p>
  33508. <p>See below for the list of accepted constants for use in the dimension
  33509. expression.
  33510. </p>
  33511. </dd>
  33512. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  33513. <dd><p>Set the video size. For the syntax of this option, check the
  33514. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  33515. </p>
  33516. </dd>
  33517. <dt>&lsquo;<samp>dither, d</samp>&rsquo;</dt>
  33518. <dd><p>Set the dither type.
  33519. </p>
  33520. <p>Possible values are:
  33521. </p><dl compact="compact">
  33522. <dt><var>none</var></dt>
  33523. <dt><var>ordered</var></dt>
  33524. <dt><var>random</var></dt>
  33525. <dt><var>error_diffusion</var></dt>
  33526. </dl>
  33527. <p>Default is none.
  33528. </p>
  33529. </dd>
  33530. <dt>&lsquo;<samp>filter, f</samp>&rsquo;</dt>
  33531. <dd><p>Set the resize filter type.
  33532. </p>
  33533. <p>Possible values are:
  33534. </p><dl compact="compact">
  33535. <dt><var>point</var></dt>
  33536. <dt><var>bilinear</var></dt>
  33537. <dt><var>bicubic</var></dt>
  33538. <dt><var>spline16</var></dt>
  33539. <dt><var>spline36</var></dt>
  33540. <dt><var>lanczos</var></dt>
  33541. </dl>
  33542. <p>Default is bilinear.
  33543. </p>
  33544. </dd>
  33545. <dt>&lsquo;<samp>range, r</samp>&rsquo;</dt>
  33546. <dd><p>Set the color range.
  33547. </p>
  33548. <p>Possible values are:
  33549. </p><dl compact="compact">
  33550. <dt><var>input</var></dt>
  33551. <dt><var>limited</var></dt>
  33552. <dt><var>full</var></dt>
  33553. </dl>
  33554. <p>Default is same as input.
  33555. </p>
  33556. </dd>
  33557. <dt>&lsquo;<samp>primaries, p</samp>&rsquo;</dt>
  33558. <dd><p>Set the color primaries.
  33559. </p>
  33560. <p>Possible values are:
  33561. </p><dl compact="compact">
  33562. <dt><var>input</var></dt>
  33563. <dt><var>709</var></dt>
  33564. <dt><var>unspecified</var></dt>
  33565. <dt><var>170m</var></dt>
  33566. <dt><var>240m</var></dt>
  33567. <dt><var>2020</var></dt>
  33568. </dl>
  33569. <p>Default is same as input.
  33570. </p>
  33571. </dd>
  33572. <dt>&lsquo;<samp>transfer, t</samp>&rsquo;</dt>
  33573. <dd><p>Set the transfer characteristics.
  33574. </p>
  33575. <p>Possible values are:
  33576. </p><dl compact="compact">
  33577. <dt><var>input</var></dt>
  33578. <dt><var>709</var></dt>
  33579. <dt><var>unspecified</var></dt>
  33580. <dt><var>601</var></dt>
  33581. <dt><var>linear</var></dt>
  33582. <dt><var>2020_10</var></dt>
  33583. <dt><var>2020_12</var></dt>
  33584. <dt><var>smpte2084</var></dt>
  33585. <dt><var>iec61966-2-1</var></dt>
  33586. <dt><var>arib-std-b67</var></dt>
  33587. </dl>
  33588. <p>Default is same as input.
  33589. </p>
  33590. </dd>
  33591. <dt>&lsquo;<samp>matrix, m</samp>&rsquo;</dt>
  33592. <dd><p>Set the colorspace matrix.
  33593. </p>
  33594. <p>Possible value are:
  33595. </p><dl compact="compact">
  33596. <dt><var>input</var></dt>
  33597. <dt><var>709</var></dt>
  33598. <dt><var>unspecified</var></dt>
  33599. <dt><var>470bg</var></dt>
  33600. <dt><var>170m</var></dt>
  33601. <dt><var>2020_ncl</var></dt>
  33602. <dt><var>2020_cl</var></dt>
  33603. </dl>
  33604. <p>Default is same as input.
  33605. </p>
  33606. </dd>
  33607. <dt>&lsquo;<samp>rangein, rin</samp>&rsquo;</dt>
  33608. <dd><p>Set the input color range.
  33609. </p>
  33610. <p>Possible values are:
  33611. </p><dl compact="compact">
  33612. <dt><var>input</var></dt>
  33613. <dt><var>limited</var></dt>
  33614. <dt><var>full</var></dt>
  33615. </dl>
  33616. <p>Default is same as input.
  33617. </p>
  33618. </dd>
  33619. <dt>&lsquo;<samp>primariesin, pin</samp>&rsquo;</dt>
  33620. <dd><p>Set the input color primaries.
  33621. </p>
  33622. <p>Possible values are:
  33623. </p><dl compact="compact">
  33624. <dt><var>input</var></dt>
  33625. <dt><var>709</var></dt>
  33626. <dt><var>unspecified</var></dt>
  33627. <dt><var>170m</var></dt>
  33628. <dt><var>240m</var></dt>
  33629. <dt><var>2020</var></dt>
  33630. </dl>
  33631. <p>Default is same as input.
  33632. </p>
  33633. </dd>
  33634. <dt>&lsquo;<samp>transferin, tin</samp>&rsquo;</dt>
  33635. <dd><p>Set the input transfer characteristics.
  33636. </p>
  33637. <p>Possible values are:
  33638. </p><dl compact="compact">
  33639. <dt><var>input</var></dt>
  33640. <dt><var>709</var></dt>
  33641. <dt><var>unspecified</var></dt>
  33642. <dt><var>601</var></dt>
  33643. <dt><var>linear</var></dt>
  33644. <dt><var>2020_10</var></dt>
  33645. <dt><var>2020_12</var></dt>
  33646. </dl>
  33647. <p>Default is same as input.
  33648. </p>
  33649. </dd>
  33650. <dt>&lsquo;<samp>matrixin, min</samp>&rsquo;</dt>
  33651. <dd><p>Set the input colorspace matrix.
  33652. </p>
  33653. <p>Possible value are:
  33654. </p><dl compact="compact">
  33655. <dt><var>input</var></dt>
  33656. <dt><var>709</var></dt>
  33657. <dt><var>unspecified</var></dt>
  33658. <dt><var>470bg</var></dt>
  33659. <dt><var>170m</var></dt>
  33660. <dt><var>2020_ncl</var></dt>
  33661. <dt><var>2020_cl</var></dt>
  33662. </dl>
  33663. </dd>
  33664. <dt>&lsquo;<samp>chromal, c</samp>&rsquo;</dt>
  33665. <dd><p>Set the output chroma location.
  33666. </p>
  33667. <p>Possible values are:
  33668. </p><dl compact="compact">
  33669. <dt><var>input</var></dt>
  33670. <dt><var>left</var></dt>
  33671. <dt><var>center</var></dt>
  33672. <dt><var>topleft</var></dt>
  33673. <dt><var>top</var></dt>
  33674. <dt><var>bottomleft</var></dt>
  33675. <dt><var>bottom</var></dt>
  33676. </dl>
  33677. </dd>
  33678. <dt>&lsquo;<samp>chromalin, cin</samp>&rsquo;</dt>
  33679. <dd><p>Set the input chroma location.
  33680. </p>
  33681. <p>Possible values are:
  33682. </p><dl compact="compact">
  33683. <dt><var>input</var></dt>
  33684. <dt><var>left</var></dt>
  33685. <dt><var>center</var></dt>
  33686. <dt><var>topleft</var></dt>
  33687. <dt><var>top</var></dt>
  33688. <dt><var>bottomleft</var></dt>
  33689. <dt><var>bottom</var></dt>
  33690. </dl>
  33691. </dd>
  33692. <dt>&lsquo;<samp>npl</samp>&rsquo;</dt>
  33693. <dd><p>Set the nominal peak luminance.
  33694. </p></dd>
  33695. </dl>
  33696. <p>The values of the &lsquo;<samp>w</samp>&rsquo; and &lsquo;<samp>h</samp>&rsquo; options are expressions
  33697. containing the following constants:
  33698. </p>
  33699. <dl compact="compact">
  33700. <dt><var>in_w</var></dt>
  33701. <dt><var>in_h</var></dt>
  33702. <dd><p>The input width and height
  33703. </p>
  33704. </dd>
  33705. <dt><var>iw</var></dt>
  33706. <dt><var>ih</var></dt>
  33707. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  33708. </p>
  33709. </dd>
  33710. <dt><var>out_w</var></dt>
  33711. <dt><var>out_h</var></dt>
  33712. <dd><p>The output (scaled) width and height
  33713. </p>
  33714. </dd>
  33715. <dt><var>ow</var></dt>
  33716. <dt><var>oh</var></dt>
  33717. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>
  33718. </p>
  33719. </dd>
  33720. <dt><var>a</var></dt>
  33721. <dd><p>The same as <var>iw</var> / <var>ih</var>
  33722. </p>
  33723. </dd>
  33724. <dt><var>sar</var></dt>
  33725. <dd><p>input sample aspect ratio
  33726. </p>
  33727. </dd>
  33728. <dt><var>dar</var></dt>
  33729. <dd><p>The input display aspect ratio. Calculated from <code>(iw / ih) * sar</code>.
  33730. </p>
  33731. </dd>
  33732. <dt><var>hsub</var></dt>
  33733. <dt><var>vsub</var></dt>
  33734. <dd><p>horizontal and vertical input chroma subsample values. For example for the
  33735. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  33736. </p>
  33737. </dd>
  33738. <dt><var>ohsub</var></dt>
  33739. <dt><var>ovsub</var></dt>
  33740. <dd><p>horizontal and vertical output chroma subsample values. For example for the
  33741. pixel format &quot;yuv422p&quot; <var>hsub</var> is 2 and <var>vsub</var> is 1.
  33742. </p></dd>
  33743. </dl>
  33744. <a name="Commands-26"></a>
  33745. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-26">30.238.2 Commands</a></h3>
  33746. <p>This filter supports the following commands:
  33747. </p><dl compact="compact">
  33748. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  33749. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  33750. <dd><p>Set the output video dimension expression.
  33751. The command accepts the same syntax of the corresponding option.
  33752. </p>
  33753. <p>If the specified expression is not valid, it is kept at its current
  33754. value.
  33755. </p></dd>
  33756. </dl>
  33757. <a name="OpenCL-Video-Filters"></a>
  33758. <h1 class="chapter"><a href="ffplay-all.html#toc-OpenCL-Video-Filters">31 OpenCL Video Filters</a></h1>
  33759. <p>Below is a description of the currently available OpenCL video filters.
  33760. </p>
  33761. <p>To enable compilation of these filters you need to configure FFmpeg with
  33762. <code>--enable-opencl</code>.
  33763. </p>
  33764. <p>Running OpenCL filters requires you to initialize a hardware device and to pass that device to all filters in any filter graph.
  33765. </p><dl compact="compact">
  33766. <dt>&lsquo;<samp>-init_hw_device opencl[=<var>name</var>][:<var>device</var>[,<var>key=value</var>...]]</samp>&rsquo;</dt>
  33767. <dd><p>Initialise a new hardware device of type <var>opencl</var> called <var>name</var>, using the
  33768. given device parameters.
  33769. </p>
  33770. </dd>
  33771. <dt>&lsquo;<samp>-filter_hw_device <var>name</var></samp>&rsquo;</dt>
  33772. <dd><p>Pass the hardware device called <var>name</var> to all filters in any filter graph.
  33773. </p>
  33774. </dd>
  33775. </dl>
  33776. <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>
  33777. </p>
  33778. <ul>
  33779. <li>
  33780. Example of choosing the first device on the second platform and running avgblur_opencl filter with default parameters on it.
  33781. <div class="example">
  33782. <pre class="example">-init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf &quot;hwupload, avgblur_opencl, hwdownload&quot; OUTPUT
  33783. </pre></div>
  33784. </li></ul>
  33785. <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.
  33786. </p>
  33787. <a name="avgblur_005fopencl"></a>
  33788. <h2 class="section"><a href="ffplay-all.html#toc-avgblur_005fopencl">31.1 avgblur_opencl</a></h2>
  33789. <p>Apply average blur filter.
  33790. </p>
  33791. <p>The filter accepts the following options:
  33792. </p>
  33793. <dl compact="compact">
  33794. <dt>&lsquo;<samp>sizeX</samp>&rsquo;</dt>
  33795. <dd><p>Set horizontal radius size.
  33796. Range is <code>[1, 1024]</code> and default value is <code>1</code>.
  33797. </p>
  33798. </dd>
  33799. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  33800. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  33801. </p>
  33802. </dd>
  33803. <dt>&lsquo;<samp>sizeY</samp>&rsquo;</dt>
  33804. <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.
  33805. </p></dd>
  33806. </dl>
  33807. <a name="Example-6"></a>
  33808. <h3 class="subsection"><a href="ffplay-all.html#toc-Example-6">31.1.1 Example</a></h3>
  33809. <ul>
  33810. <li>
  33811. 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.
  33812. <div class="example">
  33813. <pre class="example">-i INPUT -vf &quot;hwupload, avgblur_opencl=3, hwdownload&quot; OUTPUT
  33814. </pre></div>
  33815. </li></ul>
  33816. <a name="boxblur_005fopencl"></a>
  33817. <h2 class="section"><a href="ffplay-all.html#toc-boxblur_005fopencl">31.2 boxblur_opencl</a></h2>
  33818. <p>Apply a boxblur algorithm to the input video.
  33819. </p>
  33820. <p>It accepts the following parameters:
  33821. </p>
  33822. <dl compact="compact">
  33823. <dt>&lsquo;<samp>luma_radius, lr</samp>&rsquo;</dt>
  33824. <dt>&lsquo;<samp>luma_power, lp</samp>&rsquo;</dt>
  33825. <dt>&lsquo;<samp>chroma_radius, cr</samp>&rsquo;</dt>
  33826. <dt>&lsquo;<samp>chroma_power, cp</samp>&rsquo;</dt>
  33827. <dt>&lsquo;<samp>alpha_radius, ar</samp>&rsquo;</dt>
  33828. <dt>&lsquo;<samp>alpha_power, ap</samp>&rsquo;</dt>
  33829. </dl>
  33830. <p>A description of the accepted options follows.
  33831. </p>
  33832. <dl compact="compact">
  33833. <dt>&lsquo;<samp>luma_radius, lr</samp>&rsquo;</dt>
  33834. <dt>&lsquo;<samp>chroma_radius, cr</samp>&rsquo;</dt>
  33835. <dt>&lsquo;<samp>alpha_radius, ar</samp>&rsquo;</dt>
  33836. <dd><p>Set an expression for the box radius in pixels used for blurring the
  33837. corresponding input plane.
  33838. </p>
  33839. <p>The radius value must be a non-negative number, and must not be
  33840. greater than the value of the expression <code>min(w,h)/2</code> for the
  33841. luma and alpha planes, and of <code>min(cw,ch)/2</code> for the chroma
  33842. planes.
  33843. </p>
  33844. <p>Default value for &lsquo;<samp>luma_radius</samp>&rsquo; is &quot;2&quot;. If not specified,
  33845. &lsquo;<samp>chroma_radius</samp>&rsquo; and &lsquo;<samp>alpha_radius</samp>&rsquo; default to the
  33846. corresponding value set for &lsquo;<samp>luma_radius</samp>&rsquo;.
  33847. </p>
  33848. <p>The expressions can contain the following constants:
  33849. </p><dl compact="compact">
  33850. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  33851. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  33852. <dd><p>The input width and height in pixels.
  33853. </p>
  33854. </dd>
  33855. <dt>&lsquo;<samp>cw</samp>&rsquo;</dt>
  33856. <dt>&lsquo;<samp>ch</samp>&rsquo;</dt>
  33857. <dd><p>The input chroma image width and height in pixels.
  33858. </p>
  33859. </dd>
  33860. <dt>&lsquo;<samp>hsub</samp>&rsquo;</dt>
  33861. <dt>&lsquo;<samp>vsub</samp>&rsquo;</dt>
  33862. <dd><p>The horizontal and vertical chroma subsample values. For example, for the
  33863. pixel format &quot;yuv422p&quot;, <var>hsub</var> is 2 and <var>vsub</var> is 1.
  33864. </p></dd>
  33865. </dl>
  33866. </dd>
  33867. <dt>&lsquo;<samp>luma_power, lp</samp>&rsquo;</dt>
  33868. <dt>&lsquo;<samp>chroma_power, cp</samp>&rsquo;</dt>
  33869. <dt>&lsquo;<samp>alpha_power, ap</samp>&rsquo;</dt>
  33870. <dd><p>Specify how many times the boxblur filter is applied to the
  33871. corresponding plane.
  33872. </p>
  33873. <p>Default value for &lsquo;<samp>luma_power</samp>&rsquo; is 2. If not specified,
  33874. &lsquo;<samp>chroma_power</samp>&rsquo; and &lsquo;<samp>alpha_power</samp>&rsquo; default to the
  33875. corresponding value set for &lsquo;<samp>luma_power</samp>&rsquo;.
  33876. </p>
  33877. <p>A value of 0 will disable the effect.
  33878. </p></dd>
  33879. </dl>
  33880. <a name="Examples-124"></a>
  33881. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-124">31.2.1 Examples</a></h3>
  33882. <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.
  33883. </p>
  33884. <ul>
  33885. <li>
  33886. Apply a boxblur filter with the luma, chroma, and alpha radius
  33887. 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.
  33888. <div class="example">
  33889. <pre class="example">-i INPUT -vf &quot;hwupload, boxblur_opencl=luma_radius=2:luma_power=3, hwdownload&quot; OUTPUT
  33890. -i INPUT -vf &quot;hwupload, boxblur_opencl=2:3, hwdownload&quot; OUTPUT
  33891. </pre></div>
  33892. </li><li>
  33893. 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.
  33894. <p>For the luma plane, a 2x2 box radius will be run once.
  33895. </p>
  33896. <p>For the chroma plane, a 4x4 box radius will be run 5 times.
  33897. </p>
  33898. <p>For the alpha plane, a 3x3 box radius will be run 7 times.
  33899. </p><div class="example">
  33900. <pre class="example">-i INPUT -vf &quot;hwupload, boxblur_opencl=2:1:4:5:3:7, hwdownload&quot; OUTPUT
  33901. </pre></div>
  33902. </li></ul>
  33903. <a name="colorkey_005fopencl"></a>
  33904. <h2 class="section"><a href="ffplay-all.html#toc-colorkey_005fopencl">31.3 colorkey_opencl</a></h2>
  33905. <p>RGB colorspace color keying.
  33906. </p>
  33907. <p>The filter accepts the following options:
  33908. </p>
  33909. <dl compact="compact">
  33910. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  33911. <dd><p>The color which will be replaced with transparency.
  33912. </p>
  33913. </dd>
  33914. <dt>&lsquo;<samp>similarity</samp>&rsquo;</dt>
  33915. <dd><p>Similarity percentage with the key color.
  33916. </p>
  33917. <p>0.01 matches only the exact key color, while 1.0 matches everything.
  33918. </p>
  33919. </dd>
  33920. <dt>&lsquo;<samp>blend</samp>&rsquo;</dt>
  33921. <dd><p>Blend percentage.
  33922. </p>
  33923. <p>0.0 makes pixels either fully transparent, or not transparent at all.
  33924. </p>
  33925. <p>Higher values result in semi-transparent pixels, with a higher transparency
  33926. the more similar the pixels color is to the key color.
  33927. </p></dd>
  33928. </dl>
  33929. <a name="Examples-58"></a>
  33930. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-58">31.3.1 Examples</a></h3>
  33931. <ul>
  33932. <li>
  33933. Make every semi-green pixel in the input transparent with some slight blending:
  33934. <div class="example">
  33935. <pre class="example">-i INPUT -vf &quot;hwupload, colorkey_opencl=green:0.3:0.1, hwdownload&quot; OUTPUT
  33936. </pre></div>
  33937. </li></ul>
  33938. <a name="convolution_005fopencl"></a>
  33939. <h2 class="section"><a href="ffplay-all.html#toc-convolution_005fopencl">31.4 convolution_opencl</a></h2>
  33940. <p>Apply convolution of 3x3, 5x5, 7x7 matrix.
  33941. </p>
  33942. <p>The filter accepts the following options:
  33943. </p>
  33944. <dl compact="compact">
  33945. <dt>&lsquo;<samp>0m</samp>&rsquo;</dt>
  33946. <dt>&lsquo;<samp>1m</samp>&rsquo;</dt>
  33947. <dt>&lsquo;<samp>2m</samp>&rsquo;</dt>
  33948. <dt>&lsquo;<samp>3m</samp>&rsquo;</dt>
  33949. <dd><p>Set matrix for each plane.
  33950. Matrix is sequence of 9, 25 or 49 signed numbers.
  33951. Default value for each plane is <code>0 0 0 0 1 0 0 0 0</code>.
  33952. </p>
  33953. </dd>
  33954. <dt>&lsquo;<samp>0rdiv</samp>&rsquo;</dt>
  33955. <dt>&lsquo;<samp>1rdiv</samp>&rsquo;</dt>
  33956. <dt>&lsquo;<samp>2rdiv</samp>&rsquo;</dt>
  33957. <dt>&lsquo;<samp>3rdiv</samp>&rsquo;</dt>
  33958. <dd><p>Set multiplier for calculated value for each plane.
  33959. If unset or 0, it will be sum of all matrix elements.
  33960. The option value must be a float number greater or equal to <code>0.0</code>. Default value is <code>1.0</code>.
  33961. </p>
  33962. </dd>
  33963. <dt>&lsquo;<samp>0bias</samp>&rsquo;</dt>
  33964. <dt>&lsquo;<samp>1bias</samp>&rsquo;</dt>
  33965. <dt>&lsquo;<samp>2bias</samp>&rsquo;</dt>
  33966. <dt>&lsquo;<samp>3bias</samp>&rsquo;</dt>
  33967. <dd><p>Set bias for each plane. This value is added to the result of the multiplication.
  33968. Useful for making the overall image brighter or darker.
  33969. The option value must be a float number greater or equal to <code>0.0</code>. Default value is <code>0.0</code>.
  33970. </p>
  33971. </dd>
  33972. </dl>
  33973. <a name="Examples-136"></a>
  33974. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-136">31.4.1 Examples</a></h3>
  33975. <ul>
  33976. <li>
  33977. Apply sharpen:
  33978. <div class="example">
  33979. <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
  33980. </pre></div>
  33981. </li><li>
  33982. Apply blur:
  33983. <div class="example">
  33984. <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
  33985. </pre></div>
  33986. </li><li>
  33987. Apply edge enhance:
  33988. <div class="example">
  33989. <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
  33990. </pre></div>
  33991. </li><li>
  33992. Apply edge detect:
  33993. <div class="example">
  33994. <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
  33995. </pre></div>
  33996. </li><li>
  33997. Apply laplacian edge detector which includes diagonals:
  33998. <div class="example">
  33999. <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
  34000. </pre></div>
  34001. </li><li>
  34002. Apply emboss:
  34003. <div class="example">
  34004. <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
  34005. </pre></div>
  34006. </li></ul>
  34007. <a name="erosion_005fopencl"></a>
  34008. <h2 class="section"><a href="ffplay-all.html#toc-erosion_005fopencl">31.5 erosion_opencl</a></h2>
  34009. <p>Apply erosion effect to the video.
  34010. </p>
  34011. <p>This filter replaces the pixel by the local(3x3) minimum.
  34012. </p>
  34013. <p>It accepts the following options:
  34014. </p>
  34015. <dl compact="compact">
  34016. <dt>&lsquo;<samp>threshold0</samp>&rsquo;</dt>
  34017. <dt>&lsquo;<samp>threshold1</samp>&rsquo;</dt>
  34018. <dt>&lsquo;<samp>threshold2</samp>&rsquo;</dt>
  34019. <dt>&lsquo;<samp>threshold3</samp>&rsquo;</dt>
  34020. <dd><p>Limit the maximum change for each plane. Range is <code>[0, 65535]</code> and default value is <code>65535</code>.
  34021. If <code>0</code>, plane will remain unchanged.
  34022. </p>
  34023. </dd>
  34024. <dt>&lsquo;<samp>coordinates</samp>&rsquo;</dt>
  34025. <dd><p>Flag which specifies the pixel to refer to.
  34026. Range is <code>[0, 255]</code> and default value is <code>255</code>, i.e. all eight pixels are used.
  34027. </p>
  34028. <p>Flags to local 3x3 coordinates region centered on <code>x</code>:
  34029. </p>
  34030. <p> 1 2 3
  34031. </p>
  34032. <p> 4 x 5
  34033. </p>
  34034. <p> 6 7 8
  34035. </p></dd>
  34036. </dl>
  34037. <a name="Example-5"></a>
  34038. <h3 class="subsection"><a href="ffplay-all.html#toc-Example-5">31.5.1 Example</a></h3>
  34039. <ul>
  34040. <li>
  34041. 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.
  34042. <div class="example">
  34043. <pre class="example">-i INPUT -vf &quot;hwupload, erosion_opencl=30:40:50:coordinates=231, hwdownload&quot; OUTPUT
  34044. </pre></div>
  34045. </li></ul>
  34046. <a name="deshake_005fopencl"></a>
  34047. <h2 class="section"><a href="ffplay-all.html#toc-deshake_005fopencl">31.6 deshake_opencl</a></h2>
  34048. <p>Feature-point based video stabilization filter.
  34049. </p>
  34050. <p>The filter accepts the following options:
  34051. </p>
  34052. <dl compact="compact">
  34053. <dt>&lsquo;<samp>tripod</samp>&rsquo;</dt>
  34054. <dd><p>Simulates a tripod by preventing any camera movement whatsoever from the original frame. Defaults to <code>0</code>.
  34055. </p>
  34056. </dd>
  34057. <dt>&lsquo;<samp>debug</samp>&rsquo;</dt>
  34058. <dd><p>Whether or not additional debug info should be displayed, both in the processed output and in the console.
  34059. </p>
  34060. <p>Note that in order to see console debug output you will also need to pass <code>-v verbose</code> to ffmpeg.
  34061. </p>
  34062. <p>Viewing point matches in the output video is only supported for RGB input.
  34063. </p>
  34064. <p>Defaults to <code>0</code>.
  34065. </p>
  34066. </dd>
  34067. <dt>&lsquo;<samp>adaptive_crop</samp>&rsquo;</dt>
  34068. <dd><p>Whether or not to do a tiny bit of cropping at the borders to cut down on the amount of mirrored pixels.
  34069. </p>
  34070. <p>Defaults to <code>1</code>.
  34071. </p>
  34072. </dd>
  34073. <dt>&lsquo;<samp>refine_features</samp>&rsquo;</dt>
  34074. <dd><p>Whether or not feature points should be refined at a sub-pixel level.
  34075. </p>
  34076. <p>This can be turned off for a slight performance gain at the cost of precision.
  34077. </p>
  34078. <p>Defaults to <code>1</code>.
  34079. </p>
  34080. </dd>
  34081. <dt>&lsquo;<samp>smooth_strength</samp>&rsquo;</dt>
  34082. <dd><p>The strength of the smoothing applied to the camera path from <code>0.0</code> to <code>1.0</code>.
  34083. </p>
  34084. <p><code>1.0</code> is the maximum smoothing strength while values less than that result in less smoothing.
  34085. </p>
  34086. <p><code>0.0</code> causes the filter to adaptively choose a smoothing strength on a per-frame basis.
  34087. </p>
  34088. <p>Defaults to <code>0.0</code>.
  34089. </p>
  34090. </dd>
  34091. <dt>&lsquo;<samp>smooth_window_multiplier</samp>&rsquo;</dt>
  34092. <dd><p>Controls the size of the smoothing window (the number of frames buffered to determine motion information from).
  34093. </p>
  34094. <p>The size of the smoothing window is determined by multiplying the framerate of the video by this number.
  34095. </p>
  34096. <p>Acceptable values range from <code>0.1</code> to <code>10.0</code>.
  34097. </p>
  34098. <p>Larger values increase the amount of motion data available for determining how to smooth the camera path,
  34099. potentially improving smoothness, but also increase latency and memory usage.
  34100. </p>
  34101. <p>Defaults to <code>2.0</code>.
  34102. </p>
  34103. </dd>
  34104. </dl>
  34105. <a name="Examples-99"></a>
  34106. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-99">31.6.1 Examples</a></h3>
  34107. <ul>
  34108. <li>
  34109. Stabilize a video with a fixed, medium smoothing strength:
  34110. <div class="example">
  34111. <pre class="example">-i INPUT -vf &quot;hwupload, deshake_opencl=smooth_strength=0.5, hwdownload&quot; OUTPUT
  34112. </pre></div>
  34113. </li><li>
  34114. Stabilize a video with debugging (both in console and in rendered video):
  34115. <div class="example">
  34116. <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
  34117. </pre></div>
  34118. </li></ul>
  34119. <a name="dilation_005fopencl"></a>
  34120. <h2 class="section"><a href="ffplay-all.html#toc-dilation_005fopencl">31.7 dilation_opencl</a></h2>
  34121. <p>Apply dilation effect to the video.
  34122. </p>
  34123. <p>This filter replaces the pixel by the local(3x3) maximum.
  34124. </p>
  34125. <p>It accepts the following options:
  34126. </p>
  34127. <dl compact="compact">
  34128. <dt>&lsquo;<samp>threshold0</samp>&rsquo;</dt>
  34129. <dt>&lsquo;<samp>threshold1</samp>&rsquo;</dt>
  34130. <dt>&lsquo;<samp>threshold2</samp>&rsquo;</dt>
  34131. <dt>&lsquo;<samp>threshold3</samp>&rsquo;</dt>
  34132. <dd><p>Limit the maximum change for each plane. Range is <code>[0, 65535]</code> and default value is <code>65535</code>.
  34133. If <code>0</code>, plane will remain unchanged.
  34134. </p>
  34135. </dd>
  34136. <dt>&lsquo;<samp>coordinates</samp>&rsquo;</dt>
  34137. <dd><p>Flag which specifies the pixel to refer to.
  34138. Range is <code>[0, 255]</code> and default value is <code>255</code>, i.e. all eight pixels are used.
  34139. </p>
  34140. <p>Flags to local 3x3 coordinates region centered on <code>x</code>:
  34141. </p>
  34142. <p> 1 2 3
  34143. </p>
  34144. <p> 4 x 5
  34145. </p>
  34146. <p> 6 7 8
  34147. </p></dd>
  34148. </dl>
  34149. <a name="Example-1"></a>
  34150. <h3 class="subsection"><a href="ffplay-all.html#toc-Example-1">31.7.1 Example</a></h3>
  34151. <ul>
  34152. <li>
  34153. 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.
  34154. <div class="example">
  34155. <pre class="example">-i INPUT -vf &quot;hwupload, dilation_opencl=30:40:50:coordinates=231, hwdownload&quot; OUTPUT
  34156. </pre></div>
  34157. </li></ul>
  34158. <a name="nlmeans_005fopencl"></a>
  34159. <h2 class="section"><a href="ffplay-all.html#toc-nlmeans_005fopencl">31.8 nlmeans_opencl</a></h2>
  34160. <p>Non-local Means denoise filter through OpenCL, this filter accepts same options as <a href="#nlmeans">nlmeans</a>.
  34161. </p>
  34162. <a name="overlay_005fopencl"></a>
  34163. <h2 class="section"><a href="ffplay-all.html#toc-overlay_005fopencl">31.9 overlay_opencl</a></h2>
  34164. <p>Overlay one video on top of another.
  34165. </p>
  34166. <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.
  34167. This filter requires same memory layout for all the inputs. So, format conversion may be needed.
  34168. </p>
  34169. <p>The filter accepts the following options:
  34170. </p>
  34171. <dl compact="compact">
  34172. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  34173. <dd><p>Set the x coordinate of the overlaid video on the main video.
  34174. Default value is <code>0</code>.
  34175. </p>
  34176. </dd>
  34177. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  34178. <dd><p>Set the y coordinate of the overlaid video on the main video.
  34179. Default value is <code>0</code>.
  34180. </p>
  34181. </dd>
  34182. </dl>
  34183. <a name="Examples-48"></a>
  34184. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-48">31.9.1 Examples</a></h3>
  34185. <ul>
  34186. <li>
  34187. Overlay an image LOGO at the top-left corner of the INPUT video. Both inputs are yuv420p format.
  34188. <div class="example">
  34189. <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
  34190. </pre></div>
  34191. </li><li>
  34192. The inputs have same memory layout for color channels , the overlay has additional alpha plane, like INPUT is yuv420p, and the LOGO is yuva420p.
  34193. <div class="example">
  34194. <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
  34195. </pre></div>
  34196. </li></ul>
  34197. <a name="pad_005fopencl"></a>
  34198. <h2 class="section"><a href="ffplay-all.html#toc-pad_005fopencl">31.10 pad_opencl</a></h2>
  34199. <p>Add paddings to the input image, and place the original input at the
  34200. provided <var>x</var>, <var>y</var> coordinates.
  34201. </p>
  34202. <p>It accepts the following options:
  34203. </p>
  34204. <dl compact="compact">
  34205. <dt>&lsquo;<samp>width, w</samp>&rsquo;</dt>
  34206. <dt>&lsquo;<samp>height, h</samp>&rsquo;</dt>
  34207. <dd><p>Specify an expression for the size of the output image with the
  34208. paddings added. If the value for <var>width</var> or <var>height</var> is 0, the
  34209. corresponding input size is used for the output.
  34210. </p>
  34211. <p>The <var>width</var> expression can reference the value set by the
  34212. <var>height</var> expression, and vice versa.
  34213. </p>
  34214. <p>The default value of <var>width</var> and <var>height</var> is 0.
  34215. </p>
  34216. </dd>
  34217. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  34218. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  34219. <dd><p>Specify the offsets to place the input image at within the padded area,
  34220. with respect to the top/left border of the output image.
  34221. </p>
  34222. <p>The <var>x</var> expression can reference the value set by the <var>y</var>
  34223. expression, and vice versa.
  34224. </p>
  34225. <p>The default value of <var>x</var> and <var>y</var> is 0.
  34226. </p>
  34227. <p>If <var>x</var> or <var>y</var> evaluate to a negative number, they&rsquo;ll be changed
  34228. so the input image is centered on the padded area.
  34229. </p>
  34230. </dd>
  34231. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  34232. <dd><p>Specify the color of the padded area. For the syntax of this option,
  34233. check the <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  34234. </p>
  34235. </dd>
  34236. <dt>&lsquo;<samp>aspect</samp>&rsquo;</dt>
  34237. <dd><p>Pad to an aspect instead to a resolution.
  34238. </p></dd>
  34239. </dl>
  34240. <p>The value for the <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var>
  34241. options are expressions containing the following constants:
  34242. </p>
  34243. <dl compact="compact">
  34244. <dt>&lsquo;<samp>in_w</samp>&rsquo;</dt>
  34245. <dt>&lsquo;<samp>in_h</samp>&rsquo;</dt>
  34246. <dd><p>The input video width and height.
  34247. </p>
  34248. </dd>
  34249. <dt>&lsquo;<samp>iw</samp>&rsquo;</dt>
  34250. <dt>&lsquo;<samp>ih</samp>&rsquo;</dt>
  34251. <dd><p>These are the same as <var>in_w</var> and <var>in_h</var>.
  34252. </p>
  34253. </dd>
  34254. <dt>&lsquo;<samp>out_w</samp>&rsquo;</dt>
  34255. <dt>&lsquo;<samp>out_h</samp>&rsquo;</dt>
  34256. <dd><p>The output width and height (the size of the padded area), as
  34257. specified by the <var>width</var> and <var>height</var> expressions.
  34258. </p>
  34259. </dd>
  34260. <dt>&lsquo;<samp>ow</samp>&rsquo;</dt>
  34261. <dt>&lsquo;<samp>oh</samp>&rsquo;</dt>
  34262. <dd><p>These are the same as <var>out_w</var> and <var>out_h</var>.
  34263. </p>
  34264. </dd>
  34265. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  34266. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  34267. <dd><p>The x and y offsets as specified by the <var>x</var> and <var>y</var>
  34268. expressions, or NAN if not yet specified.
  34269. </p>
  34270. </dd>
  34271. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  34272. <dd><p>same as <var>iw</var> / <var>ih</var>
  34273. </p>
  34274. </dd>
  34275. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  34276. <dd><p>input sample aspect ratio
  34277. </p>
  34278. </dd>
  34279. <dt>&lsquo;<samp>dar</samp>&rsquo;</dt>
  34280. <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
  34281. </p></dd>
  34282. </dl>
  34283. <a name="prewitt_005fopencl"></a>
  34284. <h2 class="section"><a href="ffplay-all.html#toc-prewitt_005fopencl">31.11 prewitt_opencl</a></h2>
  34285. <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.
  34286. </p>
  34287. <p>The filter accepts the following option:
  34288. </p>
  34289. <dl compact="compact">
  34290. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  34291. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  34292. </p>
  34293. </dd>
  34294. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  34295. <dd><p>Set value which will be multiplied with filtered result.
  34296. Range is <code>[0.0, 65535]</code> and default value is <code>1.0</code>.
  34297. </p>
  34298. </dd>
  34299. <dt>&lsquo;<samp>delta</samp>&rsquo;</dt>
  34300. <dd><p>Set value which will be added to filtered result.
  34301. Range is <code>[-65535, 65535]</code> and default value is <code>0.0</code>.
  34302. </p></dd>
  34303. </dl>
  34304. <a name="Example-2"></a>
  34305. <h3 class="subsection"><a href="ffplay-all.html#toc-Example-2">31.11.1 Example</a></h3>
  34306. <ul>
  34307. <li>
  34308. Apply the Prewitt operator with scale set to 2 and delta set to 10.
  34309. <div class="example">
  34310. <pre class="example">-i INPUT -vf &quot;hwupload, prewitt_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  34311. </pre></div>
  34312. </li></ul>
  34313. <p><a name="program_005fopencl"></a>
  34314. </p><a name="program_005fopencl-1"></a>
  34315. <h2 class="section"><a href="ffplay-all.html#toc-program_005fopencl-1">31.12 program_opencl</a></h2>
  34316. <p>Filter video using an OpenCL program.
  34317. </p>
  34318. <dl compact="compact">
  34319. <dt>&lsquo;<samp>source</samp>&rsquo;</dt>
  34320. <dd><p>OpenCL program source file.
  34321. </p>
  34322. </dd>
  34323. <dt>&lsquo;<samp>kernel</samp>&rsquo;</dt>
  34324. <dd><p>Kernel name in program.
  34325. </p>
  34326. </dd>
  34327. <dt>&lsquo;<samp>inputs</samp>&rsquo;</dt>
  34328. <dd><p>Number of inputs to the filter. Defaults to 1.
  34329. </p>
  34330. </dd>
  34331. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  34332. <dd><p>Size of output frames. Defaults to the same as the first input.
  34333. </p>
  34334. </dd>
  34335. </dl>
  34336. <p>The <code>program_opencl</code> filter also supports the <a href="#framesync">framesync</a> options.
  34337. </p>
  34338. <p>The program source file must contain a kernel function with the given name,
  34339. which will be run once for each plane of the output. Each run on a plane
  34340. gets enqueued as a separate 2D global NDRange with one work-item for each
  34341. pixel to be generated. The global ID offset for each work-item is therefore
  34342. the coordinates of a pixel in the destination image.
  34343. </p>
  34344. <p>The kernel function needs to take the following arguments:
  34345. </p><ul>
  34346. <li>
  34347. Destination image, <var>__write_only image2d_t</var>.
  34348. <p>This image will become the output; the kernel should write all of it.
  34349. </p></li><li>
  34350. Frame index, <var>unsigned int</var>.
  34351. <p>This is a counter starting from zero and increasing by one for each frame.
  34352. </p></li><li>
  34353. Source images, <var>__read_only image2d_t</var>.
  34354. <p>These are the most recent images on each input. The kernel may read from
  34355. them to generate the output, but they can&rsquo;t be written to.
  34356. </p></li></ul>
  34357. <p>Example programs:
  34358. </p>
  34359. <ul>
  34360. <li>
  34361. Copy the input to the output (output must be the same size as the input).
  34362. <pre class="verbatim">__kernel void copy(__write_only image2d_t destination,
  34363. unsigned int index,
  34364. __read_only image2d_t source)
  34365. {
  34366. const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE;
  34367. int2 location = (int2)(get_global_id(0), get_global_id(1));
  34368. float4 value = read_imagef(source, sampler, location);
  34369. write_imagef(destination, location, value);
  34370. }
  34371. </pre>
  34372. </li><li>
  34373. Apply a simple transformation, rotating the input by an amount increasing
  34374. with the index counter. Pixel values are linearly interpolated by the
  34375. sampler, and the output need not have the same dimensions as the input.
  34376. <pre class="verbatim">__kernel void rotate_image(__write_only image2d_t dst,
  34377. unsigned int index,
  34378. __read_only image2d_t src)
  34379. {
  34380. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  34381. CLK_FILTER_LINEAR);
  34382. float angle = (float)index / 100.0f;
  34383. float2 dst_dim = convert_float2(get_image_dim(dst));
  34384. float2 src_dim = convert_float2(get_image_dim(src));
  34385. float2 dst_cen = dst_dim / 2.0f;
  34386. float2 src_cen = src_dim / 2.0f;
  34387. int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
  34388. float2 dst_pos = convert_float2(dst_loc) - dst_cen;
  34389. float2 src_pos = {
  34390. cos(angle) * dst_pos.x - sin(angle) * dst_pos.y,
  34391. sin(angle) * dst_pos.x + cos(angle) * dst_pos.y
  34392. };
  34393. src_pos = src_pos * src_dim / dst_dim;
  34394. float2 src_loc = src_pos + src_cen;
  34395. if (src_loc.x &lt; 0.0f || src_loc.y &lt; 0.0f ||
  34396. src_loc.x &gt; src_dim.x || src_loc.y &gt; src_dim.y)
  34397. write_imagef(dst, dst_loc, 0.5f);
  34398. else
  34399. write_imagef(dst, dst_loc, read_imagef(src, sampler, src_loc));
  34400. }
  34401. </pre>
  34402. </li><li>
  34403. Blend two inputs together, with the amount of each input used varying
  34404. with the index counter.
  34405. <pre class="verbatim">__kernel void blend_images(__write_only image2d_t dst,
  34406. unsigned int index,
  34407. __read_only image2d_t src1,
  34408. __read_only image2d_t src2)
  34409. {
  34410. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  34411. CLK_FILTER_LINEAR);
  34412. float blend = (cos((float)index / 50.0f) + 1.0f) / 2.0f;
  34413. int2 dst_loc = (int2)(get_global_id(0), get_global_id(1));
  34414. int2 src1_loc = dst_loc * get_image_dim(src1) / get_image_dim(dst);
  34415. int2 src2_loc = dst_loc * get_image_dim(src2) / get_image_dim(dst);
  34416. float4 val1 = read_imagef(src1, sampler, src1_loc);
  34417. float4 val2 = read_imagef(src2, sampler, src2_loc);
  34418. write_imagef(dst, dst_loc, val1 * blend + val2 * (1.0f - blend));
  34419. }
  34420. </pre>
  34421. </li></ul>
  34422. <a name="roberts_005fopencl"></a>
  34423. <h2 class="section"><a href="ffplay-all.html#toc-roberts_005fopencl">31.13 roberts_opencl</a></h2>
  34424. <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.
  34425. </p>
  34426. <p>The filter accepts the following option:
  34427. </p>
  34428. <dl compact="compact">
  34429. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  34430. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  34431. </p>
  34432. </dd>
  34433. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  34434. <dd><p>Set value which will be multiplied with filtered result.
  34435. Range is <code>[0.0, 65535]</code> and default value is <code>1.0</code>.
  34436. </p>
  34437. </dd>
  34438. <dt>&lsquo;<samp>delta</samp>&rsquo;</dt>
  34439. <dd><p>Set value which will be added to filtered result.
  34440. Range is <code>[-65535, 65535]</code> and default value is <code>0.0</code>.
  34441. </p></dd>
  34442. </dl>
  34443. <a name="Example"></a>
  34444. <h3 class="subsection"><a href="ffplay-all.html#toc-Example">31.13.1 Example</a></h3>
  34445. <ul>
  34446. <li>
  34447. Apply the Roberts cross operator with scale set to 2 and delta set to 10
  34448. <div class="example">
  34449. <pre class="example">-i INPUT -vf &quot;hwupload, roberts_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  34450. </pre></div>
  34451. </li></ul>
  34452. <a name="sobel_005fopencl"></a>
  34453. <h2 class="section"><a href="ffplay-all.html#toc-sobel_005fopencl">31.14 sobel_opencl</a></h2>
  34454. <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.
  34455. </p>
  34456. <p>The filter accepts the following option:
  34457. </p>
  34458. <dl compact="compact">
  34459. <dt>&lsquo;<samp>planes</samp>&rsquo;</dt>
  34460. <dd><p>Set which planes to filter. Default value is <code>0xf</code>, by which all planes are processed.
  34461. </p>
  34462. </dd>
  34463. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  34464. <dd><p>Set value which will be multiplied with filtered result.
  34465. Range is <code>[0.0, 65535]</code> and default value is <code>1.0</code>.
  34466. </p>
  34467. </dd>
  34468. <dt>&lsquo;<samp>delta</samp>&rsquo;</dt>
  34469. <dd><p>Set value which will be added to filtered result.
  34470. Range is <code>[-65535, 65535]</code> and default value is <code>0.0</code>.
  34471. </p></dd>
  34472. </dl>
  34473. <a name="Example-3"></a>
  34474. <h3 class="subsection"><a href="ffplay-all.html#toc-Example-3">31.14.1 Example</a></h3>
  34475. <ul>
  34476. <li>
  34477. Apply sobel operator with scale set to 2 and delta set to 10
  34478. <div class="example">
  34479. <pre class="example">-i INPUT -vf &quot;hwupload, sobel_opencl=scale=2:delta=10, hwdownload&quot; OUTPUT
  34480. </pre></div>
  34481. </li></ul>
  34482. <a name="tonemap_005fopencl"></a>
  34483. <h2 class="section"><a href="ffplay-all.html#toc-tonemap_005fopencl">31.15 tonemap_opencl</a></h2>
  34484. <p>Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
  34485. </p>
  34486. <p>It accepts the following parameters:
  34487. </p>
  34488. <dl compact="compact">
  34489. <dt>&lsquo;<samp>tonemap</samp>&rsquo;</dt>
  34490. <dd><p>Specify the tone-mapping operator to be used. Same as tonemap option in <a href="#tonemap">tonemap</a>.
  34491. </p>
  34492. </dd>
  34493. <dt>&lsquo;<samp>param</samp>&rsquo;</dt>
  34494. <dd><p>Tune the tone mapping algorithm. same as param option in <a href="#tonemap">tonemap</a>.
  34495. </p>
  34496. </dd>
  34497. <dt>&lsquo;<samp>desat</samp>&rsquo;</dt>
  34498. <dd><p>Apply desaturation for highlights that exceed this level of brightness. The
  34499. higher the parameter, the more color information will be preserved. This
  34500. setting helps prevent unnaturally blown-out colors for super-highlights, by
  34501. (smoothly) turning into white instead. This makes images feel more natural,
  34502. at the cost of reducing information about out-of-range colors.
  34503. </p>
  34504. <p>The default value is 0.5, and the algorithm here is a little different from
  34505. the cpu version tonemap currently. A setting of 0.0 disables this option.
  34506. </p>
  34507. </dd>
  34508. <dt>&lsquo;<samp>threshold</samp>&rsquo;</dt>
  34509. <dd><p>The tonemapping algorithm parameters is fine-tuned per each scene. And a threshold
  34510. is used to detect whether the scene has changed or not. If the distance between
  34511. the current frame average brightness and the current running average exceeds
  34512. a threshold value, we would re-calculate scene average and peak brightness.
  34513. The default value is 0.2.
  34514. </p>
  34515. </dd>
  34516. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  34517. <dd><p>Specify the output pixel format.
  34518. </p>
  34519. <p>Currently supported formats are:
  34520. </p><dl compact="compact">
  34521. <dt><var>p010</var></dt>
  34522. <dt><var>nv12</var></dt>
  34523. </dl>
  34524. </dd>
  34525. <dt>&lsquo;<samp>range, r</samp>&rsquo;</dt>
  34526. <dd><p>Set the output color range.
  34527. </p>
  34528. <p>Possible values are:
  34529. </p><dl compact="compact">
  34530. <dt><var>tv/mpeg</var></dt>
  34531. <dt><var>pc/jpeg</var></dt>
  34532. </dl>
  34533. <p>Default is same as input.
  34534. </p>
  34535. </dd>
  34536. <dt>&lsquo;<samp>primaries, p</samp>&rsquo;</dt>
  34537. <dd><p>Set the output color primaries.
  34538. </p>
  34539. <p>Possible values are:
  34540. </p><dl compact="compact">
  34541. <dt><var>bt709</var></dt>
  34542. <dt><var>bt2020</var></dt>
  34543. </dl>
  34544. <p>Default is same as input.
  34545. </p>
  34546. </dd>
  34547. <dt>&lsquo;<samp>transfer, t</samp>&rsquo;</dt>
  34548. <dd><p>Set the output transfer characteristics.
  34549. </p>
  34550. <p>Possible values are:
  34551. </p><dl compact="compact">
  34552. <dt><var>bt709</var></dt>
  34553. <dt><var>bt2020</var></dt>
  34554. </dl>
  34555. <p>Default is bt709.
  34556. </p>
  34557. </dd>
  34558. <dt>&lsquo;<samp>matrix, m</samp>&rsquo;</dt>
  34559. <dd><p>Set the output colorspace matrix.
  34560. </p>
  34561. <p>Possible value are:
  34562. </p><dl compact="compact">
  34563. <dt><var>bt709</var></dt>
  34564. <dt><var>bt2020</var></dt>
  34565. </dl>
  34566. <p>Default is same as input.
  34567. </p>
  34568. </dd>
  34569. </dl>
  34570. <a name="Example-4"></a>
  34571. <h3 class="subsection"><a href="ffplay-all.html#toc-Example-4">31.15.1 Example</a></h3>
  34572. <ul>
  34573. <li>
  34574. Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010 format using linear operator.
  34575. <div class="example">
  34576. <pre class="example">-i INPUT -vf &quot;format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010&quot; OUTPUT
  34577. </pre></div>
  34578. </li></ul>
  34579. <a name="unsharp_005fopencl"></a>
  34580. <h2 class="section"><a href="ffplay-all.html#toc-unsharp_005fopencl">31.16 unsharp_opencl</a></h2>
  34581. <p>Sharpen or blur the input video.
  34582. </p>
  34583. <p>It accepts the following parameters:
  34584. </p>
  34585. <dl compact="compact">
  34586. <dt>&lsquo;<samp>luma_msize_x, lx</samp>&rsquo;</dt>
  34587. <dd><p>Set the luma matrix horizontal size.
  34588. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  34589. </p>
  34590. </dd>
  34591. <dt>&lsquo;<samp>luma_msize_y, ly</samp>&rsquo;</dt>
  34592. <dd><p>Set the luma matrix vertical size.
  34593. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  34594. </p>
  34595. </dd>
  34596. <dt>&lsquo;<samp>luma_amount, la</samp>&rsquo;</dt>
  34597. <dd><p>Set the luma effect strength.
  34598. Range is <code>[-10, 10]</code> and default value is <code>1.0</code>.
  34599. </p>
  34600. <p>Negative values will blur the input video, while positive values will
  34601. sharpen it, a value of zero will disable the effect.
  34602. </p>
  34603. </dd>
  34604. <dt>&lsquo;<samp>chroma_msize_x, cx</samp>&rsquo;</dt>
  34605. <dd><p>Set the chroma matrix horizontal size.
  34606. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  34607. </p>
  34608. </dd>
  34609. <dt>&lsquo;<samp>chroma_msize_y, cy</samp>&rsquo;</dt>
  34610. <dd><p>Set the chroma matrix vertical size.
  34611. Range is <code>[1, 23]</code> and default value is <code>5</code>.
  34612. </p>
  34613. </dd>
  34614. <dt>&lsquo;<samp>chroma_amount, ca</samp>&rsquo;</dt>
  34615. <dd><p>Set the chroma effect strength.
  34616. Range is <code>[-10, 10]</code> and default value is <code>0.0</code>.
  34617. </p>
  34618. <p>Negative values will blur the input video, while positive values will
  34619. sharpen it, a value of zero will disable the effect.
  34620. </p>
  34621. </dd>
  34622. </dl>
  34623. <p>All parameters are optional and default to the equivalent of the
  34624. string &rsquo;5:5:1.0:5:5:0.0&rsquo;.
  34625. </p>
  34626. <a name="Examples-11"></a>
  34627. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-11">31.16.1 Examples</a></h3>
  34628. <ul>
  34629. <li>
  34630. Apply strong luma sharpen effect:
  34631. <div class="example">
  34632. <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
  34633. </pre></div>
  34634. </li><li>
  34635. Apply a strong blur of both luma and chroma parameters:
  34636. <div class="example">
  34637. <pre class="example">-i INPUT -vf &quot;hwupload, unsharp_opencl=7:7:-2:7:7:-2, hwdownload&quot; OUTPUT
  34638. </pre></div>
  34639. </li></ul>
  34640. <a name="xfade_005fopencl"></a>
  34641. <h2 class="section"><a href="ffplay-all.html#toc-xfade_005fopencl">31.17 xfade_opencl</a></h2>
  34642. <p>Cross fade two videos with custom transition effect by using OpenCL.
  34643. </p>
  34644. <p>It accepts the following options:
  34645. </p>
  34646. <dl compact="compact">
  34647. <dt>&lsquo;<samp>transition</samp>&rsquo;</dt>
  34648. <dd><p>Set one of possible transition effects.
  34649. </p>
  34650. <dl compact="compact">
  34651. <dt>&lsquo;<samp>custom</samp>&rsquo;</dt>
  34652. <dd><p>Select custom transition effect, the actual transition description
  34653. will be picked from source and kernel options.
  34654. </p>
  34655. </dd>
  34656. <dt>&lsquo;<samp>fade</samp>&rsquo;</dt>
  34657. <dt>&lsquo;<samp>wipeleft</samp>&rsquo;</dt>
  34658. <dt>&lsquo;<samp>wiperight</samp>&rsquo;</dt>
  34659. <dt>&lsquo;<samp>wipeup</samp>&rsquo;</dt>
  34660. <dt>&lsquo;<samp>wipedown</samp>&rsquo;</dt>
  34661. <dt>&lsquo;<samp>slideleft</samp>&rsquo;</dt>
  34662. <dt>&lsquo;<samp>slideright</samp>&rsquo;</dt>
  34663. <dt>&lsquo;<samp>slideup</samp>&rsquo;</dt>
  34664. <dt>&lsquo;<samp>slidedown</samp>&rsquo;</dt>
  34665. <dd>
  34666. <p>Default transition is fade.
  34667. </p></dd>
  34668. </dl>
  34669. </dd>
  34670. <dt>&lsquo;<samp>source</samp>&rsquo;</dt>
  34671. <dd><p>OpenCL program source file for custom transition.
  34672. </p>
  34673. </dd>
  34674. <dt>&lsquo;<samp>kernel</samp>&rsquo;</dt>
  34675. <dd><p>Set name of kernel to use for custom transition from program source file.
  34676. </p>
  34677. </dd>
  34678. <dt>&lsquo;<samp>duration</samp>&rsquo;</dt>
  34679. <dd><p>Set duration of video transition.
  34680. </p>
  34681. </dd>
  34682. <dt>&lsquo;<samp>offset</samp>&rsquo;</dt>
  34683. <dd><p>Set time of start of transition relative to first video.
  34684. </p></dd>
  34685. </dl>
  34686. <p>The program source file must contain a kernel function with the given name,
  34687. which will be run once for each plane of the output. Each run on a plane
  34688. gets enqueued as a separate 2D global NDRange with one work-item for each
  34689. pixel to be generated. The global ID offset for each work-item is therefore
  34690. the coordinates of a pixel in the destination image.
  34691. </p>
  34692. <p>The kernel function needs to take the following arguments:
  34693. </p><ul>
  34694. <li>
  34695. Destination image, <var>__write_only image2d_t</var>.
  34696. <p>This image will become the output; the kernel should write all of it.
  34697. </p>
  34698. </li><li>
  34699. First Source image, <var>__read_only image2d_t</var>.
  34700. Second Source image, <var>__read_only image2d_t</var>.
  34701. <p>These are the most recent images on each input. The kernel may read from
  34702. them to generate the output, but they can&rsquo;t be written to.
  34703. </p>
  34704. </li><li>
  34705. Transition progress, <var>float</var>. This value is always between 0 and 1 inclusive.
  34706. </li></ul>
  34707. <p>Example programs:
  34708. </p>
  34709. <ul>
  34710. <li>
  34711. Apply dots curtain transition effect:
  34712. <pre class="verbatim">__kernel void blend_images(__write_only image2d_t dst,
  34713. __read_only image2d_t src1,
  34714. __read_only image2d_t src2,
  34715. float progress)
  34716. {
  34717. const sampler_t sampler = (CLK_NORMALIZED_COORDS_FALSE |
  34718. CLK_FILTER_LINEAR);
  34719. int2 p = (int2)(get_global_id(0), get_global_id(1));
  34720. float2 rp = (float2)(get_global_id(0), get_global_id(1));
  34721. float2 dim = (float2)(get_image_dim(src1).x, get_image_dim(src1).y);
  34722. rp = rp / dim;
  34723. float2 dots = (float2)(20.0, 20.0);
  34724. float2 center = (float2)(0,0);
  34725. float2 unused;
  34726. float4 val1 = read_imagef(src1, sampler, p);
  34727. float4 val2 = read_imagef(src2, sampler, p);
  34728. bool next = distance(fract(rp * dots, &amp;unused), (float2)(0.5, 0.5)) &lt; (progress / distance(rp, center));
  34729. write_imagef(dst, p, next ? val1 : val2);
  34730. }
  34731. </pre>
  34732. </li></ul>
  34733. <a name="VAAPI-Video-Filters"></a>
  34734. <h1 class="chapter"><a href="ffplay-all.html#toc-VAAPI-Video-Filters">32 VAAPI Video Filters</a></h1>
  34735. <p>VAAPI Video filters are usually used with VAAPI decoder and VAAPI encoder. Below is a description of VAAPI video filters.
  34736. </p>
  34737. <p>To enable compilation of these filters you need to configure FFmpeg with
  34738. <code>--enable-vaapi</code>.
  34739. </p>
  34740. <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>
  34741. </p>
  34742. <a name="tonemap_005fvaapi"></a>
  34743. <h2 class="section"><a href="ffplay-all.html#toc-tonemap_005fvaapi">32.1 tonemap_vaapi</a></h2>
  34744. <p>Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion with tone-mapping.
  34745. It maps the dynamic range of HDR10 content to the SDR content.
  34746. It currently only accepts HDR10 as input.
  34747. </p>
  34748. <p>It accepts the following parameters:
  34749. </p>
  34750. <dl compact="compact">
  34751. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  34752. <dd><p>Specify the output pixel format.
  34753. </p>
  34754. <p>Currently supported formats are:
  34755. </p><dl compact="compact">
  34756. <dt><var>p010</var></dt>
  34757. <dt><var>nv12</var></dt>
  34758. </dl>
  34759. <p>Default is nv12.
  34760. </p>
  34761. </dd>
  34762. <dt>&lsquo;<samp>primaries, p</samp>&rsquo;</dt>
  34763. <dd><p>Set the output color primaries.
  34764. </p>
  34765. <p>Default is same as input.
  34766. </p>
  34767. </dd>
  34768. <dt>&lsquo;<samp>transfer, t</samp>&rsquo;</dt>
  34769. <dd><p>Set the output transfer characteristics.
  34770. </p>
  34771. <p>Default is bt709.
  34772. </p>
  34773. </dd>
  34774. <dt>&lsquo;<samp>matrix, m</samp>&rsquo;</dt>
  34775. <dd><p>Set the output colorspace matrix.
  34776. </p>
  34777. <p>Default is same as input.
  34778. </p>
  34779. </dd>
  34780. </dl>
  34781. <a name="Example-7"></a>
  34782. <h3 class="subsection"><a href="ffplay-all.html#toc-Example-7">32.1.1 Example</a></h3>
  34783. <ul>
  34784. <li>
  34785. Convert HDR(HDR10) video to bt2020-transfer-characteristic p010 format
  34786. <div class="example">
  34787. <pre class="example">tonemap_vaapi=format=p010:t=bt2020-10
  34788. </pre></div>
  34789. </li></ul>
  34790. <a name="Video-Sources"></a>
  34791. <h1 class="chapter"><a href="ffplay-all.html#toc-Video-Sources">33 Video Sources</a></h1>
  34792. <p>Below is a description of the currently available video sources.
  34793. </p>
  34794. <a name="buffer"></a>
  34795. <h2 class="section"><a href="ffplay-all.html#toc-buffer">33.1 buffer</a></h2>
  34796. <p>Buffer video frames, and make them available to the filter chain.
  34797. </p>
  34798. <p>This source is mainly intended for a programmatic use, in particular
  34799. through the interface defined in &lsquo;<tt>libavfilter/vsrc_buffer.h</tt>&rsquo;.
  34800. </p>
  34801. <p>It accepts the following parameters:
  34802. </p>
  34803. <dl compact="compact">
  34804. <dt>&lsquo;<samp>video_size</samp>&rsquo;</dt>
  34805. <dd><p>Specify the size (width and height) of the buffered video frames. For the
  34806. syntax of this option, check the
  34807. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  34808. </p>
  34809. </dd>
  34810. <dt>&lsquo;<samp>width</samp>&rsquo;</dt>
  34811. <dd><p>The input video width.
  34812. </p>
  34813. </dd>
  34814. <dt>&lsquo;<samp>height</samp>&rsquo;</dt>
  34815. <dd><p>The input video height.
  34816. </p>
  34817. </dd>
  34818. <dt>&lsquo;<samp>pix_fmt</samp>&rsquo;</dt>
  34819. <dd><p>A string representing the pixel format of the buffered video frames.
  34820. It may be a number corresponding to a pixel format, or a pixel format
  34821. name.
  34822. </p>
  34823. </dd>
  34824. <dt>&lsquo;<samp>time_base</samp>&rsquo;</dt>
  34825. <dd><p>Specify the timebase assumed by the timestamps of the buffered frames.
  34826. </p>
  34827. </dd>
  34828. <dt>&lsquo;<samp>frame_rate</samp>&rsquo;</dt>
  34829. <dd><p>Specify the frame rate expected for the video stream.
  34830. </p>
  34831. </dd>
  34832. <dt>&lsquo;<samp>pixel_aspect, sar</samp>&rsquo;</dt>
  34833. <dd><p>The sample (pixel) aspect ratio of the input video.
  34834. </p>
  34835. </dd>
  34836. <dt>&lsquo;<samp>sws_param</samp>&rsquo;</dt>
  34837. <dd><p>This option is deprecated and ignored. Prepend <code>sws_flags=<var>flags</var>;</code>
  34838. to the filtergraph description to specify swscale flags for automatically
  34839. inserted scalers. See <a href="#Filtergraph-syntax">Filtergraph syntax</a>.
  34840. </p>
  34841. </dd>
  34842. <dt>&lsquo;<samp>hw_frames_ctx</samp>&rsquo;</dt>
  34843. <dd><p>When using a hardware pixel format, this should be a reference to an
  34844. AVHWFramesContext describing input frames.
  34845. </p></dd>
  34846. </dl>
  34847. <p>For example:
  34848. </p><div class="example">
  34849. <pre class="example">buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1
  34850. </pre></div>
  34851. <p>will instruct the source to accept video frames with size 320x240 and
  34852. with format &quot;yuv410p&quot;, assuming 1/24 as the timestamps timebase and
  34853. square pixels (1:1 sample aspect ratio).
  34854. Since the pixel format with name &quot;yuv410p&quot; corresponds to the number 6
  34855. (check the enum AVPixelFormat definition in &lsquo;<tt>libavutil/pixfmt.h</tt>&rsquo;),
  34856. this example corresponds to:
  34857. </p><div class="example">
  34858. <pre class="example">buffer=size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
  34859. </pre></div>
  34860. <p>Alternatively, the options can be specified as a flat string, but this
  34861. syntax is deprecated:
  34862. </p>
  34863. <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>
  34864. </p>
  34865. <a name="cellauto"></a>
  34866. <h2 class="section"><a href="ffplay-all.html#toc-cellauto">33.2 cellauto</a></h2>
  34867. <p>Create a pattern generated by an elementary cellular automaton.
  34868. </p>
  34869. <p>The initial state of the cellular automaton can be defined through the
  34870. &lsquo;<samp>filename</samp>&rsquo; and &lsquo;<samp>pattern</samp>&rsquo; options. If such options are
  34871. not specified an initial state is created randomly.
  34872. </p>
  34873. <p>At each new frame a new row in the video is filled with the result of
  34874. the cellular automaton next generation. The behavior when the whole
  34875. frame is filled is defined by the &lsquo;<samp>scroll</samp>&rsquo; option.
  34876. </p>
  34877. <p>This source accepts the following options:
  34878. </p>
  34879. <dl compact="compact">
  34880. <dt>&lsquo;<samp>filename, f</samp>&rsquo;</dt>
  34881. <dd><p>Read the initial cellular automaton state, i.e. the starting row, from
  34882. the specified file.
  34883. In the file, each non-whitespace character is considered an alive
  34884. cell, a newline will terminate the row, and further characters in the
  34885. file will be ignored.
  34886. </p>
  34887. </dd>
  34888. <dt>&lsquo;<samp>pattern, p</samp>&rsquo;</dt>
  34889. <dd><p>Read the initial cellular automaton state, i.e. the starting row, from
  34890. the specified string.
  34891. </p>
  34892. <p>Each non-whitespace character in the string is considered an alive
  34893. cell, a newline will terminate the row, and further characters in the
  34894. string will be ignored.
  34895. </p>
  34896. </dd>
  34897. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  34898. <dd><p>Set the video rate, that is the number of frames generated per second.
  34899. Default is 25.
  34900. </p>
  34901. </dd>
  34902. <dt>&lsquo;<samp>random_fill_ratio, ratio</samp>&rsquo;</dt>
  34903. <dd><p>Set the random fill ratio for the initial cellular automaton row. It
  34904. is a floating point number value ranging from 0 to 1, defaults to
  34905. 1/PHI.
  34906. </p>
  34907. <p>This option is ignored when a file or a pattern is specified.
  34908. </p>
  34909. </dd>
  34910. <dt>&lsquo;<samp>random_seed, seed</samp>&rsquo;</dt>
  34911. <dd><p>Set the seed for filling randomly the initial row, must be an integer
  34912. included between 0 and UINT32_MAX. If not specified, or if explicitly
  34913. set to -1, the filter will try to use a good random seed on a best
  34914. effort basis.
  34915. </p>
  34916. </dd>
  34917. <dt>&lsquo;<samp>rule</samp>&rsquo;</dt>
  34918. <dd><p>Set the cellular automaton rule, it is a number ranging from 0 to 255.
  34919. Default value is 110.
  34920. </p>
  34921. </dd>
  34922. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  34923. <dd><p>Set the size of the output video. For the syntax of this option, check the
  34924. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  34925. </p>
  34926. <p>If &lsquo;<samp>filename</samp>&rsquo; or &lsquo;<samp>pattern</samp>&rsquo; is specified, the size is set
  34927. by default to the width of the specified initial state row, and the
  34928. height is set to <var>width</var> * PHI.
  34929. </p>
  34930. <p>If &lsquo;<samp>size</samp>&rsquo; is set, it must contain the width of the specified
  34931. pattern string, and the specified pattern will be centered in the
  34932. larger row.
  34933. </p>
  34934. <p>If a filename or a pattern string is not specified, the size value
  34935. defaults to &quot;320x518&quot; (used for a randomly generated initial state).
  34936. </p>
  34937. </dd>
  34938. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  34939. <dd><p>If set to 1, scroll the output upward when all the rows in the output
  34940. have been already filled. If set to 0, the new generated row will be
  34941. written over the top row just after the bottom row is filled.
  34942. Defaults to 1.
  34943. </p>
  34944. </dd>
  34945. <dt>&lsquo;<samp>start_full, full</samp>&rsquo;</dt>
  34946. <dd><p>If set to 1, completely fill the output with generated rows before
  34947. outputting the first frame.
  34948. This is the default behavior, for disabling set the value to 0.
  34949. </p>
  34950. </dd>
  34951. <dt>&lsquo;<samp>stitch</samp>&rsquo;</dt>
  34952. <dd><p>If set to 1, stitch the left and right row edges together.
  34953. This is the default behavior, for disabling set the value to 0.
  34954. </p></dd>
  34955. </dl>
  34956. <a name="Examples-55"></a>
  34957. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-55">33.2.1 Examples</a></h3>
  34958. <ul>
  34959. <li>
  34960. Read the initial state from &lsquo;<tt>pattern</tt>&rsquo;, and specify an output of
  34961. size 200x400.
  34962. <div class="example">
  34963. <pre class="example">cellauto=f=pattern:s=200x400
  34964. </pre></div>
  34965. </li><li>
  34966. Generate a random initial row with a width of 200 cells, with a fill
  34967. ratio of 2/3:
  34968. <div class="example">
  34969. <pre class="example">cellauto=ratio=2/3:s=200x200
  34970. </pre></div>
  34971. </li><li>
  34972. Create a pattern generated by rule 18 starting by a single alive cell
  34973. centered on an initial row with width 100:
  34974. <div class="example">
  34975. <pre class="example">cellauto=p=@:s=100x400:full=0:rule=18
  34976. </pre></div>
  34977. </li><li>
  34978. Specify a more elaborated initial pattern:
  34979. <div class="example">
  34980. <pre class="example">cellauto=p='@@ @ @@':s=100x400:full=0:rule=18
  34981. </pre></div>
  34982. </li></ul>
  34983. <p><a name="coreimagesrc"></a>
  34984. </p><a name="coreimagesrc-1"></a>
  34985. <h2 class="section"><a href="ffplay-all.html#toc-coreimagesrc-1">33.3 coreimagesrc</a></h2>
  34986. <p>Video source generated on GPU using Apple&rsquo;s CoreImage API on OSX.
  34987. </p>
  34988. <p>This video source is a specialized version of the <a href="#coreimage">coreimage</a> video filter.
  34989. Use a core image generator at the beginning of the applied filterchain to
  34990. generate the content.
  34991. </p>
  34992. <p>The coreimagesrc video source accepts the following options:
  34993. </p><dl compact="compact">
  34994. <dt>&lsquo;<samp>list_generators</samp>&rsquo;</dt>
  34995. <dd><p>List all available generators along with all their respective options as well as
  34996. possible minimum and maximum values along with the default values.
  34997. </p><div class="example">
  34998. <pre class="example">list_generators=true
  34999. </pre></div>
  35000. </dd>
  35001. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35002. <dd><p>Specify the size of the sourced video. For the syntax of this option, check the
  35003. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35004. The default value is <code>320x240</code>.
  35005. </p>
  35006. </dd>
  35007. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35008. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  35009. generated per second. It has to be a string in the format
  35010. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a floating point
  35011. number or a valid video frame rate abbreviation. The default value is
  35012. &quot;25&quot;.
  35013. </p>
  35014. </dd>
  35015. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  35016. <dd><p>Set the sample aspect ratio of the sourced video.
  35017. </p>
  35018. </dd>
  35019. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  35020. <dd><p>Set the duration of the sourced video. See
  35021. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  35022. for the accepted syntax.
  35023. </p>
  35024. <p>If not specified, or the expressed duration is negative, the video is
  35025. supposed to be generated forever.
  35026. </p></dd>
  35027. </dl>
  35028. <p>Additionally, all options of the <a href="#coreimage">coreimage</a> video filter are accepted.
  35029. A complete filterchain can be used for further processing of the
  35030. generated input without CPU-HOST transfer. See <a href="#coreimage">coreimage</a> documentation
  35031. and examples for details.
  35032. </p>
  35033. <a name="Examples-78"></a>
  35034. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-78">33.3.1 Examples</a></h3>
  35035. <ul>
  35036. <li>
  35037. Use CIQRCodeGenerator to create a QR code for the FFmpeg homepage,
  35038. given as complete and escaped command-line for Apple&rsquo;s standard bash shell:
  35039. <div class="example">
  35040. <pre class="example">ffmpeg -f lavfi -i coreimagesrc=s=100x100:filter=CIQRCodeGenerator@inputMessage=https\\\\\://FFmpeg.org/@inputCorrectionLevel=H -frames:v 1 QRCode.png
  35041. </pre></div>
  35042. <p>This example is equivalent to the QRCode example of <a href="#coreimage">coreimage</a> without the
  35043. need for a nullsrc video source.
  35044. </p></li></ul>
  35045. <a name="mandelbrot"></a>
  35046. <h2 class="section"><a href="ffplay-all.html#toc-mandelbrot">33.4 mandelbrot</a></h2>
  35047. <p>Generate a Mandelbrot set fractal, and progressively zoom towards the
  35048. point specified with <var>start_x</var> and <var>start_y</var>.
  35049. </p>
  35050. <p>This source accepts the following options:
  35051. </p>
  35052. <dl compact="compact">
  35053. <dt>&lsquo;<samp>end_pts</samp>&rsquo;</dt>
  35054. <dd><p>Set the terminal pts value. Default value is 400.
  35055. </p>
  35056. </dd>
  35057. <dt>&lsquo;<samp>end_scale</samp>&rsquo;</dt>
  35058. <dd><p>Set the terminal scale value.
  35059. Must be a floating point value. Default value is 0.3.
  35060. </p>
  35061. </dd>
  35062. <dt>&lsquo;<samp>inner</samp>&rsquo;</dt>
  35063. <dd><p>Set the inner coloring mode, that is the algorithm used to draw the
  35064. Mandelbrot fractal internal region.
  35065. </p>
  35066. <p>It shall assume one of the following values:
  35067. </p><dl compact="compact">
  35068. <dt>&lsquo;<samp>black</samp>&rsquo;</dt>
  35069. <dd><p>Set black mode.
  35070. </p></dd>
  35071. <dt>&lsquo;<samp>convergence</samp>&rsquo;</dt>
  35072. <dd><p>Show time until convergence.
  35073. </p></dd>
  35074. <dt>&lsquo;<samp>mincol</samp>&rsquo;</dt>
  35075. <dd><p>Set color based on point closest to the origin of the iterations.
  35076. </p></dd>
  35077. <dt>&lsquo;<samp>period</samp>&rsquo;</dt>
  35078. <dd><p>Set period mode.
  35079. </p></dd>
  35080. </dl>
  35081. <p>Default value is <var>mincol</var>.
  35082. </p>
  35083. </dd>
  35084. <dt>&lsquo;<samp>bailout</samp>&rsquo;</dt>
  35085. <dd><p>Set the bailout value. Default value is 10.0.
  35086. </p>
  35087. </dd>
  35088. <dt>&lsquo;<samp>maxiter</samp>&rsquo;</dt>
  35089. <dd><p>Set the maximum of iterations performed by the rendering
  35090. algorithm. Default value is 7189.
  35091. </p>
  35092. </dd>
  35093. <dt>&lsquo;<samp>outer</samp>&rsquo;</dt>
  35094. <dd><p>Set outer coloring mode.
  35095. It shall assume one of following values:
  35096. </p><dl compact="compact">
  35097. <dt>&lsquo;<samp>iteration_count</samp>&rsquo;</dt>
  35098. <dd><p>Set iteration count mode.
  35099. </p></dd>
  35100. <dt>&lsquo;<samp>normalized_iteration_count</samp>&rsquo;</dt>
  35101. <dd><p>set normalized iteration count mode.
  35102. </p></dd>
  35103. </dl>
  35104. <p>Default value is <var>normalized_iteration_count</var>.
  35105. </p>
  35106. </dd>
  35107. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35108. <dd><p>Set frame rate, expressed as number of frames per second. Default
  35109. value is &quot;25&quot;.
  35110. </p>
  35111. </dd>
  35112. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35113. <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 size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  35114. </p>
  35115. </dd>
  35116. <dt>&lsquo;<samp>start_scale</samp>&rsquo;</dt>
  35117. <dd><p>Set the initial scale value. Default value is 3.0.
  35118. </p>
  35119. </dd>
  35120. <dt>&lsquo;<samp>start_x</samp>&rsquo;</dt>
  35121. <dd><p>Set the initial x position. Must be a floating point value between
  35122. -100 and 100. Default value is -0.743643887037158704752191506114774.
  35123. </p>
  35124. </dd>
  35125. <dt>&lsquo;<samp>start_y</samp>&rsquo;</dt>
  35126. <dd><p>Set the initial y position. Must be a floating point value between
  35127. -100 and 100. Default value is -0.131825904205311970493132056385139.
  35128. </p></dd>
  35129. </dl>
  35130. <a name="mptestsrc"></a>
  35131. <h2 class="section"><a href="ffplay-all.html#toc-mptestsrc">33.5 mptestsrc</a></h2>
  35132. <p>Generate various test patterns, as generated by the MPlayer test filter.
  35133. </p>
  35134. <p>The size of the generated video is fixed, and is 256x256.
  35135. This source is useful in particular for testing encoding features.
  35136. </p>
  35137. <p>This source accepts the following options:
  35138. </p>
  35139. <dl compact="compact">
  35140. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35141. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  35142. generated per second. It has to be a string in the format
  35143. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a floating point
  35144. number or a valid video frame rate abbreviation. The default value is
  35145. &quot;25&quot;.
  35146. </p>
  35147. </dd>
  35148. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  35149. <dd><p>Set the duration of the sourced video. See
  35150. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  35151. for the accepted syntax.
  35152. </p>
  35153. <p>If not specified, or the expressed duration is negative, the video is
  35154. supposed to be generated forever.
  35155. </p>
  35156. </dd>
  35157. <dt>&lsquo;<samp>test, t</samp>&rsquo;</dt>
  35158. <dd>
  35159. <p>Set the number or the name of the test to perform. Supported tests are:
  35160. </p><dl compact="compact">
  35161. <dt>&lsquo;<samp>dc_luma</samp>&rsquo;</dt>
  35162. <dt>&lsquo;<samp>dc_chroma</samp>&rsquo;</dt>
  35163. <dt>&lsquo;<samp>freq_luma</samp>&rsquo;</dt>
  35164. <dt>&lsquo;<samp>freq_chroma</samp>&rsquo;</dt>
  35165. <dt>&lsquo;<samp>amp_luma</samp>&rsquo;</dt>
  35166. <dt>&lsquo;<samp>amp_chroma</samp>&rsquo;</dt>
  35167. <dt>&lsquo;<samp>cbp</samp>&rsquo;</dt>
  35168. <dt>&lsquo;<samp>mv</samp>&rsquo;</dt>
  35169. <dt>&lsquo;<samp>ring1</samp>&rsquo;</dt>
  35170. <dt>&lsquo;<samp>ring2</samp>&rsquo;</dt>
  35171. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  35172. <dt>&lsquo;<samp>max_frames, m</samp>&rsquo;</dt>
  35173. <dd><p>Set the maximum number of frames generated for each test, default value is 30.
  35174. </p>
  35175. </dd>
  35176. </dl>
  35177. <p>Default value is &quot;all&quot;, which will cycle through the list of all tests.
  35178. </p></dd>
  35179. </dl>
  35180. <p>Some examples:
  35181. </p><div class="example">
  35182. <pre class="example">mptestsrc=t=dc_luma
  35183. </pre></div>
  35184. <p>will generate a &quot;dc_luma&quot; test pattern.
  35185. </p>
  35186. <a name="frei0r_005fsrc"></a>
  35187. <h2 class="section"><a href="ffplay-all.html#toc-frei0r_005fsrc">33.6 frei0r_src</a></h2>
  35188. <p>Provide a frei0r source.
  35189. </p>
  35190. <p>To enable compilation of this filter you need to install the frei0r
  35191. header and configure FFmpeg with <code>--enable-frei0r</code>.
  35192. </p>
  35193. <p>This source accepts the following parameters:
  35194. </p>
  35195. <dl compact="compact">
  35196. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  35197. <dd><p>The size of the video to generate. For the syntax of this option, check the
  35198. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35199. </p>
  35200. </dd>
  35201. <dt>&lsquo;<samp>framerate</samp>&rsquo;</dt>
  35202. <dd><p>The framerate of the generated video. It may be a string of the form
  35203. <var>num</var>/<var>den</var> or a frame rate abbreviation.
  35204. </p>
  35205. </dd>
  35206. <dt>&lsquo;<samp>filter_name</samp>&rsquo;</dt>
  35207. <dd><p>The name to the frei0r source to load. For more information regarding frei0r and
  35208. how to set the parameters, read the <a href="#frei0r">frei0r</a> section in the video filters
  35209. documentation.
  35210. </p>
  35211. </dd>
  35212. <dt>&lsquo;<samp>filter_params</samp>&rsquo;</dt>
  35213. <dd><p>A &rsquo;|&rsquo;-separated list of parameters to pass to the frei0r source.
  35214. </p>
  35215. </dd>
  35216. </dl>
  35217. <p>For example, to generate a frei0r partik0l source with size 200x200
  35218. and frame rate 10 which is overlaid on the overlay filter main input:
  35219. </p><div class="example">
  35220. <pre class="example">frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
  35221. </pre></div>
  35222. <a name="life"></a>
  35223. <h2 class="section"><a href="ffplay-all.html#toc-life">33.7 life</a></h2>
  35224. <p>Generate a life pattern.
  35225. </p>
  35226. <p>This source is based on a generalization of John Conway&rsquo;s life game.
  35227. </p>
  35228. <p>The sourced input represents a life grid, each pixel represents a cell
  35229. which can be in one of two possible states, alive or dead. Every cell
  35230. interacts with its eight neighbours, which are the cells that are
  35231. horizontally, vertically, or diagonally adjacent.
  35232. </p>
  35233. <p>At each interaction the grid evolves according to the adopted rule,
  35234. which specifies the number of neighbor alive cells which will make a
  35235. cell stay alive or born. The &lsquo;<samp>rule</samp>&rsquo; option allows one to specify
  35236. the rule to adopt.
  35237. </p>
  35238. <p>This source accepts the following options:
  35239. </p>
  35240. <dl compact="compact">
  35241. <dt>&lsquo;<samp>filename, f</samp>&rsquo;</dt>
  35242. <dd><p>Set the file from which to read the initial grid state. In the file,
  35243. each non-whitespace character is considered an alive cell, and newline
  35244. is used to delimit the end of each row.
  35245. </p>
  35246. <p>If this option is not specified, the initial grid is generated
  35247. randomly.
  35248. </p>
  35249. </dd>
  35250. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35251. <dd><p>Set the video rate, that is the number of frames generated per second.
  35252. Default is 25.
  35253. </p>
  35254. </dd>
  35255. <dt>&lsquo;<samp>random_fill_ratio, ratio</samp>&rsquo;</dt>
  35256. <dd><p>Set the random fill ratio for the initial random grid. It is a
  35257. floating point number value ranging from 0 to 1, defaults to 1/PHI.
  35258. It is ignored when a file is specified.
  35259. </p>
  35260. </dd>
  35261. <dt>&lsquo;<samp>random_seed, seed</samp>&rsquo;</dt>
  35262. <dd><p>Set the seed for filling the initial random grid, must be an integer
  35263. included between 0 and UINT32_MAX. If not specified, or if explicitly
  35264. set to -1, the filter will try to use a good random seed on a best
  35265. effort basis.
  35266. </p>
  35267. </dd>
  35268. <dt>&lsquo;<samp>rule</samp>&rsquo;</dt>
  35269. <dd><p>Set the life rule.
  35270. </p>
  35271. <p>A rule can be specified with a code of the kind &quot;S<var>NS</var>/B<var>NB</var>&quot;,
  35272. where <var>NS</var> and <var>NB</var> are sequences of numbers in the range 0-8,
  35273. <var>NS</var> specifies the number of alive neighbor cells which make a
  35274. live cell stay alive, and <var>NB</var> the number of alive neighbor cells
  35275. which make a dead cell to become alive (i.e. to &quot;born&quot;).
  35276. &quot;s&quot; and &quot;b&quot; can be used in place of &quot;S&quot; and &quot;B&quot;, respectively.
  35277. </p>
  35278. <p>Alternatively a rule can be specified by an 18-bits integer. The 9
  35279. high order bits are used to encode the next cell state if it is alive
  35280. for each number of neighbor alive cells, the low order bits specify
  35281. the rule for &quot;borning&quot; new cells. Higher order bits encode for an
  35282. higher number of neighbor cells.
  35283. For example the number 6153 = <code>(12&lt;&lt;9)+9</code> specifies a stay alive
  35284. rule of 12 and a born rule of 9, which corresponds to &quot;S23/B03&quot;.
  35285. </p>
  35286. <p>Default value is &quot;S23/B3&quot;, which is the original Conway&rsquo;s game of life
  35287. rule, and will keep a cell alive if it has 2 or 3 neighbor alive
  35288. cells, and will born a new cell if there are three alive cells around
  35289. a dead cell.
  35290. </p>
  35291. </dd>
  35292. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35293. <dd><p>Set the size of the output video. For the syntax of this option, check the
  35294. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35295. </p>
  35296. <p>If &lsquo;<samp>filename</samp>&rsquo; is specified, the size is set by default to the
  35297. same size of the input file. If &lsquo;<samp>size</samp>&rsquo; is set, it must contain
  35298. the size specified in the input file, and the initial grid defined in
  35299. that file is centered in the larger resulting area.
  35300. </p>
  35301. <p>If a filename is not specified, the size value defaults to &quot;320x240&quot;
  35302. (used for a randomly generated initial grid).
  35303. </p>
  35304. </dd>
  35305. <dt>&lsquo;<samp>stitch</samp>&rsquo;</dt>
  35306. <dd><p>If set to 1, stitch the left and right grid edges together, and the
  35307. top and bottom edges also. Defaults to 1.
  35308. </p>
  35309. </dd>
  35310. <dt>&lsquo;<samp>mold</samp>&rsquo;</dt>
  35311. <dd><p>Set cell mold speed. If set, a dead cell will go from &lsquo;<samp>death_color</samp>&rsquo; to
  35312. &lsquo;<samp>mold_color</samp>&rsquo; with a step of &lsquo;<samp>mold</samp>&rsquo;. &lsquo;<samp>mold</samp>&rsquo; can have a
  35313. value from 0 to 255.
  35314. </p>
  35315. </dd>
  35316. <dt>&lsquo;<samp>life_color</samp>&rsquo;</dt>
  35317. <dd><p>Set the color of living (or new born) cells.
  35318. </p>
  35319. </dd>
  35320. <dt>&lsquo;<samp>death_color</samp>&rsquo;</dt>
  35321. <dd><p>Set the color of dead cells. If &lsquo;<samp>mold</samp>&rsquo; is set, this is the first color
  35322. used to represent a dead cell.
  35323. </p>
  35324. </dd>
  35325. <dt>&lsquo;<samp>mold_color</samp>&rsquo;</dt>
  35326. <dd><p>Set mold color, for definitely dead and moldy cells.
  35327. </p>
  35328. <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 ffmpeg-utils manual</a>.
  35329. </p></dd>
  35330. </dl>
  35331. <a name="Examples-149"></a>
  35332. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-149">33.7.1 Examples</a></h3>
  35333. <ul>
  35334. <li>
  35335. Read a grid from &lsquo;<tt>pattern</tt>&rsquo;, and center it on a grid of size
  35336. 300x300 pixels:
  35337. <div class="example">
  35338. <pre class="example">life=f=pattern:s=300x300
  35339. </pre></div>
  35340. </li><li>
  35341. Generate a random grid of size 200x200, with a fill ratio of 2/3:
  35342. <div class="example">
  35343. <pre class="example">life=ratio=2/3:s=200x200
  35344. </pre></div>
  35345. </li><li>
  35346. Specify a custom rule for evolving a randomly generated grid:
  35347. <div class="example">
  35348. <pre class="example">life=rule=S14/B34
  35349. </pre></div>
  35350. </li><li>
  35351. Full example with slow death effect (mold) using <code>ffplay</code>:
  35352. <div class="example">
  35353. <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
  35354. </pre></div>
  35355. </li></ul>
  35356. <p><a name="allrgb"></a>
  35357. <a name="allyuv"></a>
  35358. <a name="color"></a>
  35359. <a name="haldclutsrc"></a>
  35360. <a name="nullsrc"></a>
  35361. <a name="pal75bars"></a>
  35362. <a name="pal100bars"></a>
  35363. <a name="rgbtestsrc"></a>
  35364. <a name="smptebars"></a>
  35365. <a name="smptehdbars"></a>
  35366. <a name="testsrc"></a>
  35367. <a name="testsrc2"></a>
  35368. <a name="yuvtestsrc"></a>
  35369. </p><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>
  35370. <h2 class="section"><a href="ffplay-all.html#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">33.8 allrgb, allyuv, color, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc</a></h2>
  35371. <p>The <code>allrgb</code> source returns frames of size 4096x4096 of all rgb colors.
  35372. </p>
  35373. <p>The <code>allyuv</code> source returns frames of size 4096x4096 of all yuv colors.
  35374. </p>
  35375. <p>The <code>color</code> source provides an uniformly colored input.
  35376. </p>
  35377. <p>The <code>haldclutsrc</code> source provides an identity Hald CLUT. See also
  35378. <a href="#haldclut">haldclut</a> filter.
  35379. </p>
  35380. <p>The <code>nullsrc</code> source returns unprocessed video frames. It is
  35381. mainly useful to be employed in analysis / debugging tools, or as the
  35382. source for filters which ignore the input data.
  35383. </p>
  35384. <p>The <code>pal75bars</code> source generates a color bars pattern, based on
  35385. EBU PAL recommendations with 75% color levels.
  35386. </p>
  35387. <p>The <code>pal100bars</code> source generates a color bars pattern, based on
  35388. EBU PAL recommendations with 100% color levels.
  35389. </p>
  35390. <p>The <code>rgbtestsrc</code> source generates an RGB test pattern useful for
  35391. detecting RGB vs BGR issues. You should see a red, green and blue
  35392. stripe from top to bottom.
  35393. </p>
  35394. <p>The <code>smptebars</code> source generates a color bars pattern, based on
  35395. the SMPTE Engineering Guideline EG 1-1990.
  35396. </p>
  35397. <p>The <code>smptehdbars</code> source generates a color bars pattern, based on
  35398. the SMPTE RP 219-2002.
  35399. </p>
  35400. <p>The <code>testsrc</code> source generates a test video pattern, showing a
  35401. color pattern, a scrolling gradient and a timestamp. This is mainly
  35402. intended for testing purposes.
  35403. </p>
  35404. <p>The <code>testsrc2</code> source is similar to testsrc, but supports more
  35405. pixel formats instead of just <code>rgb24</code>. This allows using it as an
  35406. input for other tests without requiring a format conversion.
  35407. </p>
  35408. <p>The <code>yuvtestsrc</code> source generates an YUV test pattern. You should
  35409. see a y, cb and cr stripe from top to bottom.
  35410. </p>
  35411. <p>The sources accept the following parameters:
  35412. </p>
  35413. <dl compact="compact">
  35414. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  35415. <dd><p>Specify the level of the Hald CLUT, only available in the <code>haldclutsrc</code>
  35416. source. A level of <code>N</code> generates a picture of <code>N*N*N</code> by <code>N*N*N</code>
  35417. pixels to be used as identity matrix for 3D lookup tables. Each component is
  35418. coded on a <code>1/(N*N)</code> scale.
  35419. </p>
  35420. </dd>
  35421. <dt>&lsquo;<samp>color, c</samp>&rsquo;</dt>
  35422. <dd><p>Specify the color of the source, only available in the <code>color</code>
  35423. source. For the syntax of this option, check the
  35424. <a href="ffmpeg-utils.html#color-syntax">(ffmpeg-utils)&quot;Color&quot; section in the ffmpeg-utils manual</a>.
  35425. </p>
  35426. </dd>
  35427. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35428. <dd><p>Specify the size of the sourced video. For the syntax of this option, check the
  35429. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35430. The default value is <code>320x240</code>.
  35431. </p>
  35432. <p>This option is not available with the <code>allrgb</code>, <code>allyuv</code>, and
  35433. <code>haldclutsrc</code> filters.
  35434. </p>
  35435. </dd>
  35436. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35437. <dd><p>Specify the frame rate of the sourced video, as the number of frames
  35438. generated per second. It has to be a string in the format
  35439. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a floating point
  35440. number or a valid video frame rate abbreviation. The default value is
  35441. &quot;25&quot;.
  35442. </p>
  35443. </dd>
  35444. <dt>&lsquo;<samp>duration, d</samp>&rsquo;</dt>
  35445. <dd><p>Set the duration of the sourced video. See
  35446. <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>
  35447. for the accepted syntax.
  35448. </p>
  35449. <p>If not specified, or the expressed duration is negative, the video is
  35450. supposed to be generated forever.
  35451. </p>
  35452. </dd>
  35453. <dt>&lsquo;<samp>sar</samp>&rsquo;</dt>
  35454. <dd><p>Set the sample aspect ratio of the sourced video.
  35455. </p>
  35456. </dd>
  35457. <dt>&lsquo;<samp>alpha</samp>&rsquo;</dt>
  35458. <dd><p>Specify the alpha (opacity) of the background, only available in the
  35459. <code>testsrc2</code> source. The value must be between 0 (fully transparent) and
  35460. 255 (fully opaque, the default).
  35461. </p>
  35462. </dd>
  35463. <dt>&lsquo;<samp>decimals, n</samp>&rsquo;</dt>
  35464. <dd><p>Set the number of decimals to show in the timestamp, only available in the
  35465. <code>testsrc</code> source.
  35466. </p>
  35467. <p>The displayed timestamp value will correspond to the original
  35468. timestamp value multiplied by the power of 10 of the specified
  35469. value. Default value is 0.
  35470. </p></dd>
  35471. </dl>
  35472. <a name="Examples-34"></a>
  35473. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-34">33.8.1 Examples</a></h3>
  35474. <ul>
  35475. <li>
  35476. Generate a video with a duration of 5.3 seconds, with size
  35477. 176x144 and a frame rate of 10 frames per second:
  35478. <div class="example">
  35479. <pre class="example">testsrc=duration=5.3:size=qcif:rate=10
  35480. </pre></div>
  35481. </li><li>
  35482. The following graph description will generate a red source
  35483. with an opacity of 0.2, with size &quot;qcif&quot; and a frame rate of 10
  35484. frames per second:
  35485. <div class="example">
  35486. <pre class="example">color=c=red@0.2:s=qcif:r=10
  35487. </pre></div>
  35488. </li><li>
  35489. If the input content is to be ignored, <code>nullsrc</code> can be used. The
  35490. following command generates noise in the luminance plane by employing
  35491. the <code>geq</code> filter:
  35492. <div class="example">
  35493. <pre class="example">nullsrc=s=256x256, geq=random(1)*255:128:128
  35494. </pre></div>
  35495. </li></ul>
  35496. <a name="Commands-37"></a>
  35497. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-37">33.8.2 Commands</a></h3>
  35498. <p>The <code>color</code> source supports the following commands:
  35499. </p>
  35500. <dl compact="compact">
  35501. <dt>&lsquo;<samp>c, color</samp>&rsquo;</dt>
  35502. <dd><p>Set the color of the created image. Accepts the same syntax of the
  35503. corresponding &lsquo;<samp>color</samp>&rsquo; option.
  35504. </p></dd>
  35505. </dl>
  35506. <a name="openclsrc"></a>
  35507. <h2 class="section"><a href="ffplay-all.html#toc-openclsrc">33.9 openclsrc</a></h2>
  35508. <p>Generate video using an OpenCL program.
  35509. </p>
  35510. <dl compact="compact">
  35511. <dt>&lsquo;<samp>source</samp>&rsquo;</dt>
  35512. <dd><p>OpenCL program source file.
  35513. </p>
  35514. </dd>
  35515. <dt>&lsquo;<samp>kernel</samp>&rsquo;</dt>
  35516. <dd><p>Kernel name in program.
  35517. </p>
  35518. </dd>
  35519. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35520. <dd><p>Size of frames to generate. This must be set.
  35521. </p>
  35522. </dd>
  35523. <dt>&lsquo;<samp>format</samp>&rsquo;</dt>
  35524. <dd><p>Pixel format to use for the generated frames. This must be set.
  35525. </p>
  35526. </dd>
  35527. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35528. <dd><p>Number of frames generated every second. Default value is &rsquo;25&rsquo;.
  35529. </p>
  35530. </dd>
  35531. </dl>
  35532. <p>For details of how the program loading works, see the <a href="#program_005fopencl">program_opencl</a>
  35533. filter.
  35534. </p>
  35535. <p>Example programs:
  35536. </p>
  35537. <ul>
  35538. <li>
  35539. Generate a colour ramp by setting pixel values from the position of the pixel
  35540. in the output image. (Note that this will work with all pixel formats, but
  35541. the generated output will not be the same.)
  35542. <pre class="verbatim">__kernel void ramp(__write_only image2d_t dst,
  35543. unsigned int index)
  35544. {
  35545. int2 loc = (int2)(get_global_id(0), get_global_id(1));
  35546. float4 val;
  35547. val.xy = val.zw = convert_float2(loc) / convert_float2(get_image_dim(dst));
  35548. write_imagef(dst, loc, val);
  35549. }
  35550. </pre>
  35551. </li><li>
  35552. Generate a Sierpinski carpet pattern, panning by a single pixel each frame.
  35553. <pre class="verbatim">__kernel void sierpinski_carpet(__write_only image2d_t dst,
  35554. unsigned int index)
  35555. {
  35556. int2 loc = (int2)(get_global_id(0), get_global_id(1));
  35557. float4 value = 0.0f;
  35558. int x = loc.x + index;
  35559. int y = loc.y + index;
  35560. while (x &gt; 0 || y &gt; 0) {
  35561. if (x % 3 == 1 &amp;&amp; y % 3 == 1) {
  35562. value = 1.0f;
  35563. break;
  35564. }
  35565. x /= 3;
  35566. y /= 3;
  35567. }
  35568. write_imagef(dst, loc, value);
  35569. }
  35570. </pre>
  35571. </li></ul>
  35572. <a name="sierpinski"></a>
  35573. <h2 class="section"><a href="ffplay-all.html#toc-sierpinski">33.10 sierpinski</a></h2>
  35574. <p>Generate a Sierpinski carpet/triangle fractal, and randomly pan around.
  35575. </p>
  35576. <p>This source accepts the following options:
  35577. </p>
  35578. <dl compact="compact">
  35579. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35580. <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 size&quot; section in the ffmpeg-utils manual</a>. Default value is &quot;640x480&quot;.
  35581. </p>
  35582. </dd>
  35583. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35584. <dd><p>Set frame rate, expressed as number of frames per second. Default
  35585. value is &quot;25&quot;.
  35586. </p>
  35587. </dd>
  35588. <dt>&lsquo;<samp>seed</samp>&rsquo;</dt>
  35589. <dd><p>Set seed which is used for random panning.
  35590. </p>
  35591. </dd>
  35592. <dt>&lsquo;<samp>jump</samp>&rsquo;</dt>
  35593. <dd><p>Set max jump for single pan destination. Allowed range is from 1 to 10000.
  35594. </p>
  35595. </dd>
  35596. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  35597. <dd><p>Set fractal type, can be default <code>carpet</code> or <code>triangle</code>.
  35598. </p></dd>
  35599. </dl>
  35600. <a name="Video-Sinks"></a>
  35601. <h1 class="chapter"><a href="ffplay-all.html#toc-Video-Sinks">34 Video Sinks</a></h1>
  35602. <p>Below is a description of the currently available video sinks.
  35603. </p>
  35604. <a name="buffersink"></a>
  35605. <h2 class="section"><a href="ffplay-all.html#toc-buffersink">34.1 buffersink</a></h2>
  35606. <p>Buffer video frames, and make them available to the end of the filter
  35607. graph.
  35608. </p>
  35609. <p>This sink is mainly intended for programmatic use, in particular
  35610. through the interface defined in &lsquo;<tt>libavfilter/buffersink.h</tt>&rsquo;
  35611. or the options system.
  35612. </p>
  35613. <p>It accepts a pointer to an AVBufferSinkContext structure, which
  35614. defines the incoming buffers&rsquo; formats, to be passed as the opaque
  35615. parameter to <code>avfilter_init_filter</code> for initialization.
  35616. </p>
  35617. <a name="nullsink"></a>
  35618. <h2 class="section"><a href="ffplay-all.html#toc-nullsink">34.2 nullsink</a></h2>
  35619. <p>Null video sink: do absolutely nothing with the input video. It is
  35620. mainly useful as a template and for use in analysis / debugging
  35621. tools.
  35622. </p>
  35623. <a name="Multimedia-Filters"></a>
  35624. <h1 class="chapter"><a href="ffplay-all.html#toc-Multimedia-Filters">35 Multimedia Filters</a></h1>
  35625. <p>Below is a description of the currently available multimedia filters.
  35626. </p>
  35627. <a name="abitscope"></a>
  35628. <h2 class="section"><a href="ffplay-all.html#toc-abitscope">35.1 abitscope</a></h2>
  35629. <p>Convert input audio to a video output, displaying the audio bit scope.
  35630. </p>
  35631. <p>The filter accepts the following options:
  35632. </p>
  35633. <dl compact="compact">
  35634. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35635. <dd><p>Set frame rate, expressed as number of frames per second. Default
  35636. value is &quot;25&quot;.
  35637. </p>
  35638. </dd>
  35639. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35640. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  35641. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35642. Default value is <code>1024x256</code>.
  35643. </p>
  35644. </dd>
  35645. <dt>&lsquo;<samp>colors</samp>&rsquo;</dt>
  35646. <dd><p>Specify list of colors separated by space or by &rsquo;|&rsquo; which will be used to
  35647. draw channels. Unrecognized or missing colors will be replaced
  35648. by white color.
  35649. </p></dd>
  35650. </dl>
  35651. <a name="adrawgraph"></a>
  35652. <h2 class="section"><a href="ffplay-all.html#toc-adrawgraph">35.2 adrawgraph</a></h2>
  35653. <p>Draw a graph using input audio metadata.
  35654. </p>
  35655. <p>See <a href="#drawgraph">drawgraph</a>
  35656. </p>
  35657. <a name="agraphmonitor"></a>
  35658. <h2 class="section"><a href="ffplay-all.html#toc-agraphmonitor">35.3 agraphmonitor</a></h2>
  35659. <p>See <a href="#graphmonitor">graphmonitor</a>.
  35660. </p>
  35661. <a name="ahistogram"></a>
  35662. <h2 class="section"><a href="ffplay-all.html#toc-ahistogram">35.4 ahistogram</a></h2>
  35663. <p>Convert input audio to a video output, displaying the volume histogram.
  35664. </p>
  35665. <p>The filter accepts the following options:
  35666. </p>
  35667. <dl compact="compact">
  35668. <dt>&lsquo;<samp>dmode</samp>&rsquo;</dt>
  35669. <dd><p>Specify how histogram is calculated.
  35670. </p>
  35671. <p>It accepts the following values:
  35672. </p><dl compact="compact">
  35673. <dt>&lsquo;<samp>single</samp>&rsquo;</dt>
  35674. <dd><p>Use single histogram for all channels.
  35675. </p></dd>
  35676. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  35677. <dd><p>Use separate histogram for each channel.
  35678. </p></dd>
  35679. </dl>
  35680. <p>Default is <code>single</code>.
  35681. </p>
  35682. </dd>
  35683. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35684. <dd><p>Set frame rate, expressed as number of frames per second. Default
  35685. value is &quot;25&quot;.
  35686. </p>
  35687. </dd>
  35688. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35689. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  35690. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35691. Default value is <code>hd720</code>.
  35692. </p>
  35693. </dd>
  35694. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  35695. <dd><p>Set display scale.
  35696. </p>
  35697. <p>It accepts the following values:
  35698. </p><dl compact="compact">
  35699. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  35700. <dd><p>logarithmic
  35701. </p></dd>
  35702. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  35703. <dd><p>square root
  35704. </p></dd>
  35705. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  35706. <dd><p>cubic root
  35707. </p></dd>
  35708. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  35709. <dd><p>linear
  35710. </p></dd>
  35711. <dt>&lsquo;<samp>rlog</samp>&rsquo;</dt>
  35712. <dd><p>reverse logarithmic
  35713. </p></dd>
  35714. </dl>
  35715. <p>Default is <code>log</code>.
  35716. </p>
  35717. </dd>
  35718. <dt>&lsquo;<samp>ascale</samp>&rsquo;</dt>
  35719. <dd><p>Set amplitude scale.
  35720. </p>
  35721. <p>It accepts the following values:
  35722. </p><dl compact="compact">
  35723. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  35724. <dd><p>logarithmic
  35725. </p></dd>
  35726. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  35727. <dd><p>linear
  35728. </p></dd>
  35729. </dl>
  35730. <p>Default is <code>log</code>.
  35731. </p>
  35732. </dd>
  35733. <dt>&lsquo;<samp>acount</samp>&rsquo;</dt>
  35734. <dd><p>Set how much frames to accumulate in histogram.
  35735. Default is 1. Setting this to -1 accumulates all frames.
  35736. </p>
  35737. </dd>
  35738. <dt>&lsquo;<samp>rheight</samp>&rsquo;</dt>
  35739. <dd><p>Set histogram ratio of window height.
  35740. </p>
  35741. </dd>
  35742. <dt>&lsquo;<samp>slide</samp>&rsquo;</dt>
  35743. <dd><p>Set sonogram sliding.
  35744. </p>
  35745. <p>It accepts the following values:
  35746. </p><dl compact="compact">
  35747. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  35748. <dd><p>replace old rows with new ones.
  35749. </p></dd>
  35750. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  35751. <dd><p>scroll from top to bottom.
  35752. </p></dd>
  35753. </dl>
  35754. <p>Default is <code>replace</code>.
  35755. </p></dd>
  35756. </dl>
  35757. <a name="aphasemeter"></a>
  35758. <h2 class="section"><a href="ffplay-all.html#toc-aphasemeter">35.5 aphasemeter</a></h2>
  35759. <p>Measures phase of input audio, which is exported as metadata <code>lavfi.aphasemeter.phase</code>,
  35760. representing mean phase of current audio frame. A video output can also be produced and is
  35761. enabled by default. The audio is passed through as first output.
  35762. </p>
  35763. <p>Audio will be rematrixed to stereo if it has a different channel layout. Phase value is in
  35764. range <code>[-1, 1]</code> where <code>-1</code> means left and right channels are completely out of phase
  35765. and <code>1</code> means channels are in phase.
  35766. </p>
  35767. <p>The filter accepts the following options, all related to its video output:
  35768. </p>
  35769. <dl compact="compact">
  35770. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35771. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  35772. </p>
  35773. </dd>
  35774. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35775. <dd><p>Set the video size for the output. For the syntax of this option, check the
  35776. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35777. Default value is <code>800x400</code>.
  35778. </p>
  35779. </dd>
  35780. <dt>&lsquo;<samp>rc</samp>&rsquo;</dt>
  35781. <dt>&lsquo;<samp>gc</samp>&rsquo;</dt>
  35782. <dt>&lsquo;<samp>bc</samp>&rsquo;</dt>
  35783. <dd><p>Specify the red, green, blue contrast. Default values are <code>2</code>,
  35784. <code>7</code> and <code>1</code>.
  35785. Allowed range is <code>[0, 255]</code>.
  35786. </p>
  35787. </dd>
  35788. <dt>&lsquo;<samp>mpc</samp>&rsquo;</dt>
  35789. <dd><p>Set color which will be used for drawing median phase. If color is
  35790. <code>none</code> which is default, no median phase value will be drawn.
  35791. </p>
  35792. </dd>
  35793. <dt>&lsquo;<samp>video</samp>&rsquo;</dt>
  35794. <dd><p>Enable video output. Default is enabled.
  35795. </p></dd>
  35796. </dl>
  35797. <a name="avectorscope"></a>
  35798. <h2 class="section"><a href="ffplay-all.html#toc-avectorscope">35.6 avectorscope</a></h2>
  35799. <p>Convert input audio to a video output, representing the audio vector
  35800. scope.
  35801. </p>
  35802. <p>The filter is used to measure the difference between channels of stereo
  35803. audio stream. A monaural signal, consisting of identical left and right
  35804. signal, results in straight vertical line. Any stereo separation is visible
  35805. as a deviation from this line, creating a Lissajous figure.
  35806. If the straight (or deviation from it) but horizontal line appears this
  35807. indicates that the left and right channels are out of phase.
  35808. </p>
  35809. <p>The filter accepts the following options:
  35810. </p>
  35811. <dl compact="compact">
  35812. <dt>&lsquo;<samp>mode, m</samp>&rsquo;</dt>
  35813. <dd><p>Set the vectorscope mode.
  35814. </p>
  35815. <p>Available values are:
  35816. </p><dl compact="compact">
  35817. <dt>&lsquo;<samp>lissajous</samp>&rsquo;</dt>
  35818. <dd><p>Lissajous rotated by 45 degrees.
  35819. </p>
  35820. </dd>
  35821. <dt>&lsquo;<samp>lissajous_xy</samp>&rsquo;</dt>
  35822. <dd><p>Same as above but not rotated.
  35823. </p>
  35824. </dd>
  35825. <dt>&lsquo;<samp>polar</samp>&rsquo;</dt>
  35826. <dd><p>Shape resembling half of circle.
  35827. </p></dd>
  35828. </dl>
  35829. <p>Default value is &lsquo;<samp>lissajous</samp>&rsquo;.
  35830. </p>
  35831. </dd>
  35832. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  35833. <dd><p>Set the video size for the output. For the syntax of this option, check the
  35834. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  35835. Default value is <code>400x400</code>.
  35836. </p>
  35837. </dd>
  35838. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  35839. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  35840. </p>
  35841. </dd>
  35842. <dt>&lsquo;<samp>rc</samp>&rsquo;</dt>
  35843. <dt>&lsquo;<samp>gc</samp>&rsquo;</dt>
  35844. <dt>&lsquo;<samp>bc</samp>&rsquo;</dt>
  35845. <dt>&lsquo;<samp>ac</samp>&rsquo;</dt>
  35846. <dd><p>Specify the red, green, blue and alpha contrast. Default values are <code>40</code>,
  35847. <code>160</code>, <code>80</code> and <code>255</code>.
  35848. Allowed range is <code>[0, 255]</code>.
  35849. </p>
  35850. </dd>
  35851. <dt>&lsquo;<samp>rf</samp>&rsquo;</dt>
  35852. <dt>&lsquo;<samp>gf</samp>&rsquo;</dt>
  35853. <dt>&lsquo;<samp>bf</samp>&rsquo;</dt>
  35854. <dt>&lsquo;<samp>af</samp>&rsquo;</dt>
  35855. <dd><p>Specify the red, green, blue and alpha fade. Default values are <code>15</code>,
  35856. <code>10</code>, <code>5</code> and <code>5</code>.
  35857. Allowed range is <code>[0, 255]</code>.
  35858. </p>
  35859. </dd>
  35860. <dt>&lsquo;<samp>zoom</samp>&rsquo;</dt>
  35861. <dd><p>Set the zoom factor. Default value is <code>1</code>. Allowed range is <code>[0, 10]</code>.
  35862. Values lower than <var>1</var> will auto adjust zoom factor to maximal possible value.
  35863. </p>
  35864. </dd>
  35865. <dt>&lsquo;<samp>draw</samp>&rsquo;</dt>
  35866. <dd><p>Set the vectorscope drawing mode.
  35867. </p>
  35868. <p>Available values are:
  35869. </p><dl compact="compact">
  35870. <dt>&lsquo;<samp>dot</samp>&rsquo;</dt>
  35871. <dd><p>Draw dot for each sample.
  35872. </p>
  35873. </dd>
  35874. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  35875. <dd><p>Draw line between previous and current sample.
  35876. </p></dd>
  35877. </dl>
  35878. <p>Default value is &lsquo;<samp>dot</samp>&rsquo;.
  35879. </p>
  35880. </dd>
  35881. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  35882. <dd><p>Specify amplitude scale of audio samples.
  35883. </p>
  35884. <p>Available values are:
  35885. </p><dl compact="compact">
  35886. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  35887. <dd><p>Linear.
  35888. </p>
  35889. </dd>
  35890. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  35891. <dd><p>Square root.
  35892. </p>
  35893. </dd>
  35894. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  35895. <dd><p>Cubic root.
  35896. </p>
  35897. </dd>
  35898. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  35899. <dd><p>Logarithmic.
  35900. </p></dd>
  35901. </dl>
  35902. </dd>
  35903. <dt>&lsquo;<samp>swap</samp>&rsquo;</dt>
  35904. <dd><p>Swap left channel axis with right channel axis.
  35905. </p>
  35906. </dd>
  35907. <dt>&lsquo;<samp>mirror</samp>&rsquo;</dt>
  35908. <dd><p>Mirror axis.
  35909. </p>
  35910. <dl compact="compact">
  35911. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  35912. <dd><p>No mirror.
  35913. </p>
  35914. </dd>
  35915. <dt>&lsquo;<samp>x</samp>&rsquo;</dt>
  35916. <dd><p>Mirror only x axis.
  35917. </p>
  35918. </dd>
  35919. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  35920. <dd><p>Mirror only y axis.
  35921. </p>
  35922. </dd>
  35923. <dt>&lsquo;<samp>xy</samp>&rsquo;</dt>
  35924. <dd><p>Mirror both axis.
  35925. </p></dd>
  35926. </dl>
  35927. </dd>
  35928. </dl>
  35929. <a name="Examples-53"></a>
  35930. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-53">35.6.1 Examples</a></h3>
  35931. <ul>
  35932. <li>
  35933. Complete example using <code>ffplay</code>:
  35934. <div class="example">
  35935. <pre class="example">ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
  35936. [a] avectorscope=zoom=1.3:rc=2:gc=200:bc=10:rf=1:gf=8:bf=7 [out0]'
  35937. </pre></div>
  35938. </li></ul>
  35939. <a name="bench_002c-abench"></a>
  35940. <h2 class="section"><a href="ffplay-all.html#toc-bench_002c-abench">35.7 bench, abench</a></h2>
  35941. <p>Benchmark part of a filtergraph.
  35942. </p>
  35943. <p>The filter accepts the following options:
  35944. </p>
  35945. <dl compact="compact">
  35946. <dt>&lsquo;<samp>action</samp>&rsquo;</dt>
  35947. <dd><p>Start or stop a timer.
  35948. </p>
  35949. <p>Available values are:
  35950. </p><dl compact="compact">
  35951. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  35952. <dd><p>Get the current time, set it as frame metadata (using the key
  35953. <code>lavfi.bench.start_time</code>), and forward the frame to the next filter.
  35954. </p>
  35955. </dd>
  35956. <dt>&lsquo;<samp>stop</samp>&rsquo;</dt>
  35957. <dd><p>Get the current time and fetch the <code>lavfi.bench.start_time</code> metadata from
  35958. the input frame metadata to get the time difference. Time difference, average,
  35959. maximum and minimum time (respectively <code>t</code>, <code>avg</code>, <code>max</code> and
  35960. <code>min</code>) are then printed. The timestamps are expressed in seconds.
  35961. </p></dd>
  35962. </dl>
  35963. </dd>
  35964. </dl>
  35965. <a name="Examples-151"></a>
  35966. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-151">35.7.1 Examples</a></h3>
  35967. <ul>
  35968. <li>
  35969. Benchmark <a href="#selectivecolor">selectivecolor</a> filter:
  35970. <div class="example">
  35971. <pre class="example">bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop
  35972. </pre></div>
  35973. </li></ul>
  35974. <a name="concat-2"></a>
  35975. <h2 class="section"><a href="ffplay-all.html#toc-concat-2">35.8 concat</a></h2>
  35976. <p>Concatenate audio and video streams, joining them together one after the
  35977. other.
  35978. </p>
  35979. <p>The filter works on segments of synchronized video and audio streams. All
  35980. segments must have the same number of streams of each type, and that will
  35981. also be the number of streams at output.
  35982. </p>
  35983. <p>The filter accepts the following options:
  35984. </p>
  35985. <dl compact="compact">
  35986. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  35987. <dd><p>Set the number of segments. Default is 2.
  35988. </p>
  35989. </dd>
  35990. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  35991. <dd><p>Set the number of output video streams, that is also the number of video
  35992. streams in each segment. Default is 1.
  35993. </p>
  35994. </dd>
  35995. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  35996. <dd><p>Set the number of output audio streams, that is also the number of audio
  35997. streams in each segment. Default is 0.
  35998. </p>
  35999. </dd>
  36000. <dt>&lsquo;<samp>unsafe</samp>&rsquo;</dt>
  36001. <dd><p>Activate unsafe mode: do not fail if segments have a different format.
  36002. </p>
  36003. </dd>
  36004. </dl>
  36005. <p>The filter has <var>v</var>+<var>a</var> outputs: first <var>v</var> video outputs, then
  36006. <var>a</var> audio outputs.
  36007. </p>
  36008. <p>There are <var>n</var>x(<var>v</var>+<var>a</var>) inputs: first the inputs for the first
  36009. segment, in the same order as the outputs, then the inputs for the second
  36010. segment, etc.
  36011. </p>
  36012. <p>Related streams do not always have exactly the same duration, for various
  36013. reasons including codec frame size or sloppy authoring. For that reason,
  36014. related synchronized streams (e.g. a video and its audio track) should be
  36015. concatenated at once. The concat filter will use the duration of the longest
  36016. stream in each segment (except the last one), and if necessary pad shorter
  36017. audio streams with silence.
  36018. </p>
  36019. <p>For this filter to work correctly, all segments must start at timestamp 0.
  36020. </p>
  36021. <p>All corresponding streams must have the same parameters in all segments; the
  36022. filtering system will automatically select a common pixel format for video
  36023. streams, and a common sample format, sample rate and channel layout for
  36024. audio streams, but other settings, such as resolution, must be converted
  36025. explicitly by the user.
  36026. </p>
  36027. <p>Different frame rates are acceptable but will result in variable frame rate
  36028. at output; be sure to configure the output file to handle it.
  36029. </p>
  36030. <a name="Examples-82"></a>
  36031. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-82">35.8.1 Examples</a></h3>
  36032. <ul>
  36033. <li>
  36034. Concatenate an opening, an episode and an ending, all in bilingual version
  36035. (video in stream 0, audio in streams 1 and 2):
  36036. <div class="example">
  36037. <pre class="example">ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv -filter_complex \
  36038. '[0:0] [0:1] [0:2] [1:0] [1:1] [1:2] [2:0] [2:1] [2:2]
  36039. concat=n=3:v=1:a=2 [v] [a1] [a2]' \
  36040. -map '[v]' -map '[a1]' -map '[a2]' output.mkv
  36041. </pre></div>
  36042. </li><li>
  36043. Concatenate two parts, handling audio and video separately, using the
  36044. (a)movie sources, and adjusting the resolution:
  36045. <div class="example">
  36046. <pre class="example">movie=part1.mp4, scale=512:288 [v1] ; amovie=part1.mp4 [a1] ;
  36047. movie=part2.mp4, scale=512:288 [v2] ; amovie=part2.mp4 [a2] ;
  36048. [v1] [v2] concat [outv] ; [a1] [a2] concat=v=0:a=1 [outa]
  36049. </pre></div>
  36050. <p>Note that a desync will happen at the stitch if the audio and video streams
  36051. do not have exactly the same duration in the first file.
  36052. </p>
  36053. </li></ul>
  36054. <a name="Commands-45"></a>
  36055. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-45">35.8.2 Commands</a></h3>
  36056. <p>This filter supports the following commands:
  36057. </p><dl compact="compact">
  36058. <dt>&lsquo;<samp>next</samp>&rsquo;</dt>
  36059. <dd><p>Close the current segment and step to the next one
  36060. </p></dd>
  36061. </dl>
  36062. <p><a name="ebur128"></a>
  36063. </p><a name="ebur128-1"></a>
  36064. <h2 class="section"><a href="ffplay-all.html#toc-ebur128-1">35.9 ebur128</a></h2>
  36065. <p>EBU R128 scanner filter. This filter takes an audio stream and analyzes its loudness
  36066. level. By default, it logs a message at a frequency of 10Hz with the
  36067. Momentary loudness (identified by <code>M</code>), Short-term loudness (<code>S</code>),
  36068. Integrated loudness (<code>I</code>) and Loudness Range (<code>LRA</code>).
  36069. </p>
  36070. <p>The filter can only analyze streams which have a sampling rate of 48000 Hz and whose
  36071. sample format is double-precision floating point. The input stream will be converted to
  36072. this specification, if needed. Users may need to insert aformat and/or aresample filters
  36073. after this filter to obtain the original parameters.
  36074. </p>
  36075. <p>The filter also has a video output (see the <var>video</var> option) with a real
  36076. time graph to observe the loudness evolution. The graphic contains the logged
  36077. message mentioned above, so it is not printed anymore when this option is set,
  36078. unless the verbose logging is set. The main graphing area contains the
  36079. short-term loudness (3 seconds of analysis), and the gauge on the right is for
  36080. the momentary loudness (400 milliseconds), but can optionally be configured
  36081. to instead display short-term loudness (see <var>gauge</var>).
  36082. </p>
  36083. <p>The green area marks a +/- 1LU target range around the target loudness
  36084. (-23LUFS by default, unless modified through <var>target</var>).
  36085. </p>
  36086. <p>More information about the Loudness Recommendation EBU R128 on
  36087. <a href="http://tech.ebu.ch/loudness">http://tech.ebu.ch/loudness</a>.
  36088. </p>
  36089. <p>The filter accepts the following options:
  36090. </p>
  36091. <dl compact="compact">
  36092. <dt>&lsquo;<samp>video</samp>&rsquo;</dt>
  36093. <dd><p>Activate the video output. The audio stream is passed unchanged whether this
  36094. option is set or no. The video stream will be the first output stream if
  36095. activated. Default is <code>0</code>.
  36096. </p>
  36097. </dd>
  36098. <dt>&lsquo;<samp>size</samp>&rsquo;</dt>
  36099. <dd><p>Set the video size. This option is for video only. For the syntax of this
  36100. option, check the
  36101. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  36102. Default and minimum resolution is <code>640x480</code>.
  36103. </p>
  36104. </dd>
  36105. <dt>&lsquo;<samp>meter</samp>&rsquo;</dt>
  36106. <dd><p>Set the EBU scale meter. Default is <code>9</code>. Common values are <code>9</code> and
  36107. <code>18</code>, respectively for EBU scale meter +9 and EBU scale meter +18. Any
  36108. other integer value between this range is allowed.
  36109. </p>
  36110. </dd>
  36111. <dt>&lsquo;<samp>metadata</samp>&rsquo;</dt>
  36112. <dd><p>Set metadata injection. If set to <code>1</code>, the audio input will be segmented
  36113. into 100ms output frames, each of them containing various loudness information
  36114. in metadata. All the metadata keys are prefixed with <code>lavfi.r128.</code>.
  36115. </p>
  36116. <p>Default is <code>0</code>.
  36117. </p>
  36118. </dd>
  36119. <dt>&lsquo;<samp>framelog</samp>&rsquo;</dt>
  36120. <dd><p>Force the frame logging level.
  36121. </p>
  36122. <p>Available values are:
  36123. </p><dl compact="compact">
  36124. <dt>&lsquo;<samp>info</samp>&rsquo;</dt>
  36125. <dd><p>information logging level
  36126. </p></dd>
  36127. <dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
  36128. <dd><p>verbose logging level
  36129. </p></dd>
  36130. </dl>
  36131. <p>By default, the logging level is set to <var>info</var>. If the &lsquo;<samp>video</samp>&rsquo; or
  36132. the &lsquo;<samp>metadata</samp>&rsquo; options are set, it switches to <var>verbose</var>.
  36133. </p>
  36134. </dd>
  36135. <dt>&lsquo;<samp>peak</samp>&rsquo;</dt>
  36136. <dd><p>Set peak mode(s).
  36137. </p>
  36138. <p>Available modes can be cumulated (the option is a <code>flag</code> type). Possible
  36139. values are:
  36140. </p><dl compact="compact">
  36141. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  36142. <dd><p>Disable any peak mode (default).
  36143. </p></dd>
  36144. <dt>&lsquo;<samp>sample</samp>&rsquo;</dt>
  36145. <dd><p>Enable sample-peak mode.
  36146. </p>
  36147. <p>Simple peak mode looking for the higher sample value. It logs a message
  36148. for sample-peak (identified by <code>SPK</code>).
  36149. </p></dd>
  36150. <dt>&lsquo;<samp>true</samp>&rsquo;</dt>
  36151. <dd><p>Enable true-peak mode.
  36152. </p>
  36153. <p>If enabled, the peak lookup is done on an over-sampled version of the input
  36154. stream for better peak accuracy. It logs a message for true-peak.
  36155. (identified by <code>TPK</code>) and true-peak per frame (identified by <code>FTPK</code>).
  36156. This mode requires a build with <code>libswresample</code>.
  36157. </p></dd>
  36158. </dl>
  36159. </dd>
  36160. <dt>&lsquo;<samp>dualmono</samp>&rsquo;</dt>
  36161. <dd><p>Treat mono input files as &quot;dual mono&quot;. If a mono file is intended for playback
  36162. on a stereo system, its EBU R128 measurement will be perceptually incorrect.
  36163. If set to <code>true</code>, this option will compensate for this effect.
  36164. Multi-channel input files are not affected by this option.
  36165. </p>
  36166. </dd>
  36167. <dt>&lsquo;<samp>panlaw</samp>&rsquo;</dt>
  36168. <dd><p>Set a specific pan law to be used for the measurement of dual mono files.
  36169. This parameter is optional, and has a default value of -3.01dB.
  36170. </p>
  36171. </dd>
  36172. <dt>&lsquo;<samp>target</samp>&rsquo;</dt>
  36173. <dd><p>Set a specific target level (in LUFS) used as relative zero in the visualization.
  36174. This parameter is optional and has a default value of -23LUFS as specified
  36175. by EBU R128. However, material published online may prefer a level of -16LUFS
  36176. (e.g. for use with podcasts or video platforms).
  36177. </p>
  36178. </dd>
  36179. <dt>&lsquo;<samp>gauge</samp>&rsquo;</dt>
  36180. <dd><p>Set the value displayed by the gauge. Valid values are <code>momentary</code> and s
  36181. <code>shortterm</code>. By default the momentary value will be used, but in certain
  36182. scenarios it may be more useful to observe the short term value instead (e.g.
  36183. live mixing).
  36184. </p>
  36185. </dd>
  36186. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  36187. <dd><p>Sets the display scale for the loudness. Valid parameters are <code>absolute</code>
  36188. (in LUFS) or <code>relative</code> (LU) relative to the target. This only affects the
  36189. video output, not the summary or continuous log output.
  36190. </p></dd>
  36191. </dl>
  36192. <a name="Examples-135"></a>
  36193. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-135">35.9.1 Examples</a></h3>
  36194. <ul>
  36195. <li>
  36196. Real-time graph using <code>ffplay</code>, with a EBU scale meter +18:
  36197. <div class="example">
  36198. <pre class="example">ffplay -f lavfi -i &quot;amovie=input.mp3,ebur128=video=1:meter=18 [out0][out1]&quot;
  36199. </pre></div>
  36200. </li><li>
  36201. Run an analysis with <code>ffmpeg</code>:
  36202. <div class="example">
  36203. <pre class="example">ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
  36204. </pre></div>
  36205. </li></ul>
  36206. <a name="interleave_002c-ainterleave"></a>
  36207. <h2 class="section"><a href="ffplay-all.html#toc-interleave_002c-ainterleave">35.10 interleave, ainterleave</a></h2>
  36208. <p>Temporally interleave frames from several inputs.
  36209. </p>
  36210. <p><code>interleave</code> works with video inputs, <code>ainterleave</code> with audio.
  36211. </p>
  36212. <p>These filters read frames from several inputs and send the oldest
  36213. queued frame to the output.
  36214. </p>
  36215. <p>Input streams must have well defined, monotonically increasing frame
  36216. timestamp values.
  36217. </p>
  36218. <p>In order to submit one frame to output, these filters need to enqueue
  36219. at least one frame for each input, so they cannot work in case one
  36220. input is not yet terminated and will not receive incoming frames.
  36221. </p>
  36222. <p>For example consider the case when one input is a <code>select</code> filter
  36223. which always drops input frames. The <code>interleave</code> filter will keep
  36224. reading from that input, but it will never be able to send new frames
  36225. to output until the input sends an end-of-stream signal.
  36226. </p>
  36227. <p>Also, depending on inputs synchronization, the filters will drop
  36228. frames in case one input receives more frames than the other ones, and
  36229. the queue is already filled.
  36230. </p>
  36231. <p>These filters accept the following options:
  36232. </p>
  36233. <dl compact="compact">
  36234. <dt>&lsquo;<samp>nb_inputs, n</samp>&rsquo;</dt>
  36235. <dd><p>Set the number of different inputs, it is 2 by default.
  36236. </p></dd>
  36237. </dl>
  36238. <a name="Examples-128"></a>
  36239. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-128">35.10.1 Examples</a></h3>
  36240. <ul>
  36241. <li>
  36242. Interleave frames belonging to different streams using <code>ffmpeg</code>:
  36243. <div class="example">
  36244. <pre class="example">ffmpeg -i bambi.avi -i pr0n.mkv -filter_complex &quot;[0:v][1:v] interleave&quot; out.avi
  36245. </pre></div>
  36246. </li><li>
  36247. Add flickering blur effect:
  36248. <div class="example">
  36249. <pre class="example">select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave
  36250. </pre></div>
  36251. </li></ul>
  36252. <a name="metadata_002c-ametadata"></a>
  36253. <h2 class="section"><a href="ffplay-all.html#toc-metadata_002c-ametadata">35.11 metadata, ametadata</a></h2>
  36254. <p>Manipulate frame metadata.
  36255. </p>
  36256. <p>This filter accepts the following options:
  36257. </p>
  36258. <dl compact="compact">
  36259. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  36260. <dd><p>Set mode of operation of the filter.
  36261. </p>
  36262. <p>Can be one of the following:
  36263. </p>
  36264. <dl compact="compact">
  36265. <dt>&lsquo;<samp>select</samp>&rsquo;</dt>
  36266. <dd><p>If both <code>value</code> and <code>key</code> is set, select frames
  36267. which have such metadata. If only <code>key</code> is set, select
  36268. every frame that has such key in metadata.
  36269. </p>
  36270. </dd>
  36271. <dt>&lsquo;<samp>add</samp>&rsquo;</dt>
  36272. <dd><p>Add new metadata <code>key</code> and <code>value</code>. If key is already available
  36273. do nothing.
  36274. </p>
  36275. </dd>
  36276. <dt>&lsquo;<samp>modify</samp>&rsquo;</dt>
  36277. <dd><p>Modify value of already present key.
  36278. </p>
  36279. </dd>
  36280. <dt>&lsquo;<samp>delete</samp>&rsquo;</dt>
  36281. <dd><p>If <code>value</code> is set, delete only keys that have such value.
  36282. Otherwise, delete key. If <code>key</code> is not set, delete all metadata values in
  36283. the frame.
  36284. </p>
  36285. </dd>
  36286. <dt>&lsquo;<samp>print</samp>&rsquo;</dt>
  36287. <dd><p>Print key and its value if metadata was found. If <code>key</code> is not set print all
  36288. metadata values available in frame.
  36289. </p></dd>
  36290. </dl>
  36291. </dd>
  36292. <dt>&lsquo;<samp>key</samp>&rsquo;</dt>
  36293. <dd><p>Set key used with all modes. Must be set for all modes except <code>print</code> and <code>delete</code>.
  36294. </p>
  36295. </dd>
  36296. <dt>&lsquo;<samp>value</samp>&rsquo;</dt>
  36297. <dd><p>Set metadata value which will be used. This option is mandatory for
  36298. <code>modify</code> and <code>add</code> mode.
  36299. </p>
  36300. </dd>
  36301. <dt>&lsquo;<samp>function</samp>&rsquo;</dt>
  36302. <dd><p>Which function to use when comparing metadata value and <code>value</code>.
  36303. </p>
  36304. <p>Can be one of following:
  36305. </p>
  36306. <dl compact="compact">
  36307. <dt>&lsquo;<samp>same_str</samp>&rsquo;</dt>
  36308. <dd><p>Values are interpreted as strings, returns true if metadata value is same as <code>value</code>.
  36309. </p>
  36310. </dd>
  36311. <dt>&lsquo;<samp>starts_with</samp>&rsquo;</dt>
  36312. <dd><p>Values are interpreted as strings, returns true if metadata value starts with
  36313. the <code>value</code> option string.
  36314. </p>
  36315. </dd>
  36316. <dt>&lsquo;<samp>less</samp>&rsquo;</dt>
  36317. <dd><p>Values are interpreted as floats, returns true if metadata value is less than <code>value</code>.
  36318. </p>
  36319. </dd>
  36320. <dt>&lsquo;<samp>equal</samp>&rsquo;</dt>
  36321. <dd><p>Values are interpreted as floats, returns true if <code>value</code> is equal with metadata value.
  36322. </p>
  36323. </dd>
  36324. <dt>&lsquo;<samp>greater</samp>&rsquo;</dt>
  36325. <dd><p>Values are interpreted as floats, returns true if metadata value is greater than <code>value</code>.
  36326. </p>
  36327. </dd>
  36328. <dt>&lsquo;<samp>expr</samp>&rsquo;</dt>
  36329. <dd><p>Values are interpreted as floats, returns true if expression from option <code>expr</code>
  36330. evaluates to true.
  36331. </p>
  36332. </dd>
  36333. <dt>&lsquo;<samp>ends_with</samp>&rsquo;</dt>
  36334. <dd><p>Values are interpreted as strings, returns true if metadata value ends with
  36335. the <code>value</code> option string.
  36336. </p></dd>
  36337. </dl>
  36338. </dd>
  36339. <dt>&lsquo;<samp>expr</samp>&rsquo;</dt>
  36340. <dd><p>Set expression which is used when <code>function</code> is set to <code>expr</code>.
  36341. The expression is evaluated through the eval API and can contain the following
  36342. constants:
  36343. </p>
  36344. <dl compact="compact">
  36345. <dt>&lsquo;<samp>VALUE1</samp>&rsquo;</dt>
  36346. <dd><p>Float representation of <code>value</code> from metadata key.
  36347. </p>
  36348. </dd>
  36349. <dt>&lsquo;<samp>VALUE2</samp>&rsquo;</dt>
  36350. <dd><p>Float representation of <code>value</code> as supplied by user in <code>value</code> option.
  36351. </p></dd>
  36352. </dl>
  36353. </dd>
  36354. <dt>&lsquo;<samp>file</samp>&rsquo;</dt>
  36355. <dd><p>If specified in <code>print</code> mode, output is written to the named file. Instead of
  36356. plain filename any writable url can be specified. Filename &ldquo;-&rdquo; is a shorthand
  36357. for standard output. If <code>file</code> option is not set, output is written to the log
  36358. with AV_LOG_INFO loglevel.
  36359. </p>
  36360. </dd>
  36361. <dt>&lsquo;<samp>direct</samp>&rsquo;</dt>
  36362. <dd><p>Reduces buffering in print mode when output is written to a URL set using <var>file</var>.
  36363. </p>
  36364. </dd>
  36365. </dl>
  36366. <a name="Examples-144"></a>
  36367. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-144">35.11.1 Examples</a></h3>
  36368. <ul>
  36369. <li>
  36370. Print all metadata values for frames with key <code>lavfi.signalstats.YDIF</code> with values
  36371. between 0 and 1.
  36372. <div class="example">
  36373. <pre class="example">signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)'
  36374. </pre></div>
  36375. </li><li>
  36376. Print silencedetect output to file &lsquo;<tt>metadata.txt</tt>&rsquo;.
  36377. <div class="example">
  36378. <pre class="example">silencedetect,ametadata=mode=print:file=metadata.txt
  36379. </pre></div>
  36380. </li><li>
  36381. Direct all metadata to a pipe with file descriptor 4.
  36382. <div class="example">
  36383. <pre class="example">metadata=mode=print:file='pipe\:4'
  36384. </pre></div>
  36385. </li></ul>
  36386. <a name="perms_002c-aperms"></a>
  36387. <h2 class="section"><a href="ffplay-all.html#toc-perms_002c-aperms">35.12 perms, aperms</a></h2>
  36388. <p>Set read/write permissions for the output frames.
  36389. </p>
  36390. <p>These filters are mainly aimed at developers to test direct path in the
  36391. following filter in the filtergraph.
  36392. </p>
  36393. <p>The filters accept the following options:
  36394. </p>
  36395. <dl compact="compact">
  36396. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  36397. <dd><p>Select the permissions mode.
  36398. </p>
  36399. <p>It accepts the following values:
  36400. </p><dl compact="compact">
  36401. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  36402. <dd><p>Do nothing. This is the default.
  36403. </p></dd>
  36404. <dt>&lsquo;<samp>ro</samp>&rsquo;</dt>
  36405. <dd><p>Set all the output frames read-only.
  36406. </p></dd>
  36407. <dt>&lsquo;<samp>rw</samp>&rsquo;</dt>
  36408. <dd><p>Set all the output frames directly writable.
  36409. </p></dd>
  36410. <dt>&lsquo;<samp>toggle</samp>&rsquo;</dt>
  36411. <dd><p>Make the frame read-only if writable, and writable if read-only.
  36412. </p></dd>
  36413. <dt>&lsquo;<samp>random</samp>&rsquo;</dt>
  36414. <dd><p>Set each output frame read-only or writable randomly.
  36415. </p></dd>
  36416. </dl>
  36417. </dd>
  36418. <dt>&lsquo;<samp>seed</samp>&rsquo;</dt>
  36419. <dd><p>Set the seed for the <var>random</var> mode, must be an integer included between
  36420. <code>0</code> and <code>UINT32_MAX</code>. If not specified, or if explicitly set to
  36421. <code>-1</code>, the filter will try to use a good random seed on a best effort
  36422. basis.
  36423. </p></dd>
  36424. </dl>
  36425. <p>Note: in case of auto-inserted filter between the permission filter and the
  36426. following one, the permission might not be received as expected in that
  36427. following filter. Inserting a <a href="#format">format</a> or <a href="#aformat">aformat</a> filter before the
  36428. perms/aperms filter can avoid this problem.
  36429. </p>
  36430. <a name="realtime_002c-arealtime"></a>
  36431. <h2 class="section"><a href="ffplay-all.html#toc-realtime_002c-arealtime">35.13 realtime, arealtime</a></h2>
  36432. <p>Slow down filtering to match real time approximately.
  36433. </p>
  36434. <p>These filters will pause the filtering for a variable amount of time to
  36435. match the output rate with the input timestamps.
  36436. They are similar to the &lsquo;<samp>re</samp>&rsquo; option to <code>ffmpeg</code>.
  36437. </p>
  36438. <p>They accept the following options:
  36439. </p>
  36440. <dl compact="compact">
  36441. <dt>&lsquo;<samp>limit</samp>&rsquo;</dt>
  36442. <dd><p>Time limit for the pauses. Any pause longer than that will be considered
  36443. a timestamp discontinuity and reset the timer. Default is 2 seconds.
  36444. </p></dd>
  36445. <dt>&lsquo;<samp>speed</samp>&rsquo;</dt>
  36446. <dd><p>Speed factor for processing. The value must be a float larger than zero.
  36447. Values larger than 1.0 will result in faster than realtime processing,
  36448. smaller will slow processing down. The <var>limit</var> is automatically adapted
  36449. accordingly. Default is 1.0.
  36450. </p>
  36451. <p>A processing speed faster than what is possible without these filters cannot
  36452. be achieved.
  36453. </p></dd>
  36454. </dl>
  36455. <p><a name="select"></a>
  36456. </p><a name="select_002c-aselect"></a>
  36457. <h2 class="section"><a href="ffplay-all.html#toc-select_002c-aselect">35.14 select, aselect</a></h2>
  36458. <p>Select frames to pass in output.
  36459. </p>
  36460. <p>This filter accepts the following options:
  36461. </p>
  36462. <dl compact="compact">
  36463. <dt>&lsquo;<samp>expr, e</samp>&rsquo;</dt>
  36464. <dd><p>Set expression, which is evaluated for each input frame.
  36465. </p>
  36466. <p>If the expression is evaluated to zero, the frame is discarded.
  36467. </p>
  36468. <p>If the evaluation result is negative or NaN, the frame is sent to the
  36469. first output; otherwise it is sent to the output with index
  36470. <code>ceil(val)-1</code>, assuming that the input index starts from 0.
  36471. </p>
  36472. <p>For example a value of <code>1.2</code> corresponds to the output with index
  36473. <code>ceil(1.2)-1 = 2-1 = 1</code>, that is the second output.
  36474. </p>
  36475. </dd>
  36476. <dt>&lsquo;<samp>outputs, n</samp>&rsquo;</dt>
  36477. <dd><p>Set the number of outputs. The output to which to send the selected
  36478. frame is based on the result of the evaluation. Default value is 1.
  36479. </p></dd>
  36480. </dl>
  36481. <p>The expression can contain the following constants:
  36482. </p>
  36483. <dl compact="compact">
  36484. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  36485. <dd><p>The (sequential) number of the filtered frame, starting from 0.
  36486. </p>
  36487. </dd>
  36488. <dt>&lsquo;<samp>selected_n</samp>&rsquo;</dt>
  36489. <dd><p>The (sequential) number of the selected frame, starting from 0.
  36490. </p>
  36491. </dd>
  36492. <dt>&lsquo;<samp>prev_selected_n</samp>&rsquo;</dt>
  36493. <dd><p>The sequential number of the last selected frame. It&rsquo;s NAN if undefined.
  36494. </p>
  36495. </dd>
  36496. <dt>&lsquo;<samp>TB</samp>&rsquo;</dt>
  36497. <dd><p>The timebase of the input timestamps.
  36498. </p>
  36499. </dd>
  36500. <dt>&lsquo;<samp>pts</samp>&rsquo;</dt>
  36501. <dd><p>The PTS (Presentation TimeStamp) of the filtered video frame,
  36502. expressed in <var>TB</var> units. It&rsquo;s NAN if undefined.
  36503. </p>
  36504. </dd>
  36505. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  36506. <dd><p>The PTS of the filtered video frame,
  36507. expressed in seconds. It&rsquo;s NAN if undefined.
  36508. </p>
  36509. </dd>
  36510. <dt>&lsquo;<samp>prev_pts</samp>&rsquo;</dt>
  36511. <dd><p>The PTS of the previously filtered video frame. It&rsquo;s NAN if undefined.
  36512. </p>
  36513. </dd>
  36514. <dt>&lsquo;<samp>prev_selected_pts</samp>&rsquo;</dt>
  36515. <dd><p>The PTS of the last previously filtered video frame. It&rsquo;s NAN if undefined.
  36516. </p>
  36517. </dd>
  36518. <dt>&lsquo;<samp>prev_selected_t</samp>&rsquo;</dt>
  36519. <dd><p>The PTS of the last previously selected video frame, expressed in seconds. It&rsquo;s NAN if undefined.
  36520. </p>
  36521. </dd>
  36522. <dt>&lsquo;<samp>start_pts</samp>&rsquo;</dt>
  36523. <dd><p>The PTS of the first video frame in the video. It&rsquo;s NAN if undefined.
  36524. </p>
  36525. </dd>
  36526. <dt>&lsquo;<samp>start_t</samp>&rsquo;</dt>
  36527. <dd><p>The time of the first video frame in the video. It&rsquo;s NAN if undefined.
  36528. </p>
  36529. </dd>
  36530. <dt>&lsquo;<samp>pict_type <em>(video only)</em></samp>&rsquo;</dt>
  36531. <dd><p>The type of the filtered frame. It can assume one of the following
  36532. values:
  36533. </p><dl compact="compact">
  36534. <dt>&lsquo;<samp>I</samp>&rsquo;</dt>
  36535. <dt>&lsquo;<samp>P</samp>&rsquo;</dt>
  36536. <dt>&lsquo;<samp>B</samp>&rsquo;</dt>
  36537. <dt>&lsquo;<samp>S</samp>&rsquo;</dt>
  36538. <dt>&lsquo;<samp>SI</samp>&rsquo;</dt>
  36539. <dt>&lsquo;<samp>SP</samp>&rsquo;</dt>
  36540. <dt>&lsquo;<samp>BI</samp>&rsquo;</dt>
  36541. </dl>
  36542. </dd>
  36543. <dt>&lsquo;<samp>interlace_type <em>(video only)</em></samp>&rsquo;</dt>
  36544. <dd><p>The frame interlace type. It can assume one of the following values:
  36545. </p><dl compact="compact">
  36546. <dt>&lsquo;<samp>PROGRESSIVE</samp>&rsquo;</dt>
  36547. <dd><p>The frame is progressive (not interlaced).
  36548. </p></dd>
  36549. <dt>&lsquo;<samp>TOPFIRST</samp>&rsquo;</dt>
  36550. <dd><p>The frame is top-field-first.
  36551. </p></dd>
  36552. <dt>&lsquo;<samp>BOTTOMFIRST</samp>&rsquo;</dt>
  36553. <dd><p>The frame is bottom-field-first.
  36554. </p></dd>
  36555. </dl>
  36556. </dd>
  36557. <dt>&lsquo;<samp>consumed_sample_n <em>(audio only)</em></samp>&rsquo;</dt>
  36558. <dd><p>the number of selected samples before the current frame
  36559. </p>
  36560. </dd>
  36561. <dt>&lsquo;<samp>samples_n <em>(audio only)</em></samp>&rsquo;</dt>
  36562. <dd><p>the number of samples in the current frame
  36563. </p>
  36564. </dd>
  36565. <dt>&lsquo;<samp>sample_rate <em>(audio only)</em></samp>&rsquo;</dt>
  36566. <dd><p>the input sample rate
  36567. </p>
  36568. </dd>
  36569. <dt>&lsquo;<samp>key</samp>&rsquo;</dt>
  36570. <dd><p>This is 1 if the filtered frame is a key-frame, 0 otherwise.
  36571. </p>
  36572. </dd>
  36573. <dt>&lsquo;<samp>pos</samp>&rsquo;</dt>
  36574. <dd><p>the position in the file of the filtered frame, -1 if the information
  36575. is not available (e.g. for synthetic video)
  36576. </p>
  36577. </dd>
  36578. <dt>&lsquo;<samp>scene <em>(video only)</em></samp>&rsquo;</dt>
  36579. <dd><p>value between 0 and 1 to indicate a new scene; a low value reflects a low
  36580. probability for the current frame to introduce a new scene, while a higher
  36581. value means the current frame is more likely to be one (see the example below)
  36582. </p>
  36583. </dd>
  36584. <dt>&lsquo;<samp>concatdec_select</samp>&rsquo;</dt>
  36585. <dd><p>The concat demuxer can select only part of a concat input file by setting an
  36586. inpoint and an outpoint, but the output packets may not be entirely contained
  36587. in the selected interval. By using this variable, it is possible to skip frames
  36588. generated by the concat demuxer which are not exactly contained in the selected
  36589. interval.
  36590. </p>
  36591. <p>This works by comparing the frame pts against the <var>lavf.concat.start_time</var>
  36592. and the <var>lavf.concat.duration</var> packet metadata values which are also
  36593. present in the decoded frames.
  36594. </p>
  36595. <p>The <var>concatdec_select</var> variable is -1 if the frame pts is at least
  36596. start_time and either the duration metadata is missing or the frame pts is less
  36597. than start_time + duration, 0 otherwise, and NaN if the start_time metadata is
  36598. missing.
  36599. </p>
  36600. <p>That basically means that an input frame is selected if its pts is within the
  36601. interval set by the concat demuxer.
  36602. </p>
  36603. </dd>
  36604. </dl>
  36605. <p>The default value of the select expression is &quot;1&quot;.
  36606. </p>
  36607. <a name="Examples-164"></a>
  36608. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-164">35.14.1 Examples</a></h3>
  36609. <ul>
  36610. <li>
  36611. Select all frames in input:
  36612. <div class="example">
  36613. <pre class="example">select
  36614. </pre></div>
  36615. <p>The example above is the same as:
  36616. </p><div class="example">
  36617. <pre class="example">select=1
  36618. </pre></div>
  36619. </li><li>
  36620. Skip all frames:
  36621. <div class="example">
  36622. <pre class="example">select=0
  36623. </pre></div>
  36624. </li><li>
  36625. Select only I-frames:
  36626. <div class="example">
  36627. <pre class="example">select='eq(pict_type\,I)'
  36628. </pre></div>
  36629. </li><li>
  36630. Select one frame every 100:
  36631. <div class="example">
  36632. <pre class="example">select='not(mod(n\,100))'
  36633. </pre></div>
  36634. </li><li>
  36635. Select only frames contained in the 10-20 time interval:
  36636. <div class="example">
  36637. <pre class="example">select=between(t\,10\,20)
  36638. </pre></div>
  36639. </li><li>
  36640. Select only I-frames contained in the 10-20 time interval:
  36641. <div class="example">
  36642. <pre class="example">select=between(t\,10\,20)*eq(pict_type\,I)
  36643. </pre></div>
  36644. </li><li>
  36645. Select frames with a minimum distance of 10 seconds:
  36646. <div class="example">
  36647. <pre class="example">select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
  36648. </pre></div>
  36649. </li><li>
  36650. Use aselect to select only audio frames with samples number &gt; 100:
  36651. <div class="example">
  36652. <pre class="example">aselect='gt(samples_n\,100)'
  36653. </pre></div>
  36654. </li><li>
  36655. Create a mosaic of the first scenes:
  36656. <div class="example">
  36657. <pre class="example">ffmpeg -i video.avi -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 preview.png
  36658. </pre></div>
  36659. <p>Comparing <var>scene</var> against a value between 0.3 and 0.5 is generally a sane
  36660. choice.
  36661. </p>
  36662. </li><li>
  36663. Send even and odd frames to separate outputs, and compose them:
  36664. <div class="example">
  36665. <pre class="example">select=n=2:e='mod(n, 2)+1' [odd][even]; [odd] pad=h=2*ih [tmp]; [tmp][even] overlay=y=h
  36666. </pre></div>
  36667. </li><li>
  36668. Select useful frames from an ffconcat file which is using inpoints and
  36669. outpoints but where the source files are not intra frame only.
  36670. <div class="example">
  36671. <pre class="example">ffmpeg -copyts -vsync 0 -segment_time_metadata 1 -i input.ffconcat -vf select=concatdec_select -af aselect=concatdec_select output.avi
  36672. </pre></div>
  36673. </li></ul>
  36674. <a name="sendcmd_002c-asendcmd"></a>
  36675. <h2 class="section"><a href="ffplay-all.html#toc-sendcmd_002c-asendcmd">35.15 sendcmd, asendcmd</a></h2>
  36676. <p>Send commands to filters in the filtergraph.
  36677. </p>
  36678. <p>These filters read commands to be sent to other filters in the
  36679. filtergraph.
  36680. </p>
  36681. <p><code>sendcmd</code> must be inserted between two video filters,
  36682. <code>asendcmd</code> must be inserted between two audio filters, but apart
  36683. from that they act the same way.
  36684. </p>
  36685. <p>The specification of commands can be provided in the filter arguments
  36686. with the <var>commands</var> option, or in a file specified by the
  36687. <var>filename</var> option.
  36688. </p>
  36689. <p>These filters accept the following options:
  36690. </p><dl compact="compact">
  36691. <dt>&lsquo;<samp>commands, c</samp>&rsquo;</dt>
  36692. <dd><p>Set the commands to be read and sent to the other filters.
  36693. </p></dd>
  36694. <dt>&lsquo;<samp>filename, f</samp>&rsquo;</dt>
  36695. <dd><p>Set the filename of the commands to be read and sent to the other
  36696. filters.
  36697. </p></dd>
  36698. </dl>
  36699. <a name="Commands-syntax"></a>
  36700. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-syntax">35.15.1 Commands syntax</a></h3>
  36701. <p>A commands description consists of a sequence of interval
  36702. specifications, comprising a list of commands to be executed when a
  36703. particular event related to that interval occurs. The occurring event
  36704. is typically the current frame time entering or leaving a given time
  36705. interval.
  36706. </p>
  36707. <p>An interval is specified by the following syntax:
  36708. </p><div class="example">
  36709. <pre class="example"><var>START</var>[-<var>END</var>] <var>COMMANDS</var>;
  36710. </pre></div>
  36711. <p>The time interval is specified by the <var>START</var> and <var>END</var> times.
  36712. <var>END</var> is optional and defaults to the maximum time.
  36713. </p>
  36714. <p>The current frame time is considered within the specified interval if
  36715. it is included in the interval [<var>START</var>, <var>END</var>), that is when
  36716. the time is greater or equal to <var>START</var> and is lesser than
  36717. <var>END</var>.
  36718. </p>
  36719. <p><var>COMMANDS</var> consists of a sequence of one or more command
  36720. specifications, separated by &quot;,&quot;, relating to that interval. The
  36721. syntax of a command specification is given by:
  36722. </p><div class="example">
  36723. <pre class="example">[<var>FLAGS</var>] <var>TARGET</var> <var>COMMAND</var> <var>ARG</var>
  36724. </pre></div>
  36725. <p><var>FLAGS</var> is optional and specifies the type of events relating to
  36726. the time interval which enable sending the specified command, and must
  36727. be a non-null sequence of identifier flags separated by &quot;+&quot; or &quot;|&quot; and
  36728. enclosed between &quot;[&quot; and &quot;]&quot;.
  36729. </p>
  36730. <p>The following flags are recognized:
  36731. </p><dl compact="compact">
  36732. <dt>&lsquo;<samp>enter</samp>&rsquo;</dt>
  36733. <dd><p>The command is sent when the current frame timestamp enters the
  36734. specified interval. In other words, the command is sent when the
  36735. previous frame timestamp was not in the given interval, and the
  36736. current is.
  36737. </p>
  36738. </dd>
  36739. <dt>&lsquo;<samp>leave</samp>&rsquo;</dt>
  36740. <dd><p>The command is sent when the current frame timestamp leaves the
  36741. specified interval. In other words, the command is sent when the
  36742. previous frame timestamp was in the given interval, and the
  36743. current is not.
  36744. </p>
  36745. </dd>
  36746. <dt>&lsquo;<samp>expr</samp>&rsquo;</dt>
  36747. <dd><p>The command <var>ARG</var> is interpreted as expression and result of
  36748. expression is passed as <var>ARG</var>.
  36749. </p>
  36750. <p>The expression is evaluated through the eval API and can contain the following
  36751. constants:
  36752. </p>
  36753. <dl compact="compact">
  36754. <dt>&lsquo;<samp>POS</samp>&rsquo;</dt>
  36755. <dd><p>Original position in the file of the frame, or undefined if undefined
  36756. for the current frame.
  36757. </p>
  36758. </dd>
  36759. <dt>&lsquo;<samp>PTS</samp>&rsquo;</dt>
  36760. <dd><p>The presentation timestamp in input.
  36761. </p>
  36762. </dd>
  36763. <dt>&lsquo;<samp>N</samp>&rsquo;</dt>
  36764. <dd><p>The count of the input frame for video or audio, starting from 0.
  36765. </p>
  36766. </dd>
  36767. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  36768. <dd><p>The time in seconds of the current frame.
  36769. </p></dd>
  36770. </dl>
  36771. </dd>
  36772. </dl>
  36773. <p>If <var>FLAGS</var> is not specified, a default value of <code>[enter]</code> is
  36774. assumed.
  36775. </p>
  36776. <p><var>TARGET</var> specifies the target of the command, usually the name of
  36777. the filter class or a specific filter instance name.
  36778. </p>
  36779. <p><var>COMMAND</var> specifies the name of the command for the target filter.
  36780. </p>
  36781. <p><var>ARG</var> is optional and specifies the optional list of argument for
  36782. the given <var>COMMAND</var>.
  36783. </p>
  36784. <p>Between one interval specification and another, whitespaces, or
  36785. sequences of characters starting with <code>#</code> until the end of line,
  36786. are ignored and can be used to annotate comments.
  36787. </p>
  36788. <p>A simplified BNF description of the commands specification syntax
  36789. follows:
  36790. </p><div class="example">
  36791. <pre class="example"><var>COMMAND_FLAG</var> ::= &quot;enter&quot; | &quot;leave&quot;
  36792. <var>COMMAND_FLAGS</var> ::= <var>COMMAND_FLAG</var> [(+|&quot;|&quot;)<var>COMMAND_FLAG</var>]
  36793. <var>COMMAND</var> ::= [&quot;[&quot; <var>COMMAND_FLAGS</var> &quot;]&quot;] <var>TARGET</var> <var>COMMAND</var> [<var>ARG</var>]
  36794. <var>COMMANDS</var> ::= <var>COMMAND</var> [,<var>COMMANDS</var>]
  36795. <var>INTERVAL</var> ::= <var>START</var>[-<var>END</var>] <var>COMMANDS</var>
  36796. <var>INTERVALS</var> ::= <var>INTERVAL</var>[;<var>INTERVALS</var>]
  36797. </pre></div>
  36798. <a name="Examples-126"></a>
  36799. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-126">35.15.2 Examples</a></h3>
  36800. <ul>
  36801. <li>
  36802. Specify audio tempo change at second 4:
  36803. <div class="example">
  36804. <pre class="example">asendcmd=c='4.0 atempo tempo 1.5',atempo
  36805. </pre></div>
  36806. </li><li>
  36807. Target a specific filter instance:
  36808. <div class="example">
  36809. <pre class="example">asendcmd=c='4.0 atempo@my tempo 1.5',atempo@my
  36810. </pre></div>
  36811. </li><li>
  36812. Specify a list of drawtext and hue commands in a file.
  36813. <div class="example">
  36814. <pre class="example"># show text in the interval 5-10
  36815. 5.0-10.0 [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=hello world',
  36816. [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=';
  36817. # desaturate the image in the interval 15-20
  36818. 15.0-20.0 [enter] hue s 0,
  36819. [enter] drawtext reinit 'fontfile=FreeSerif.ttf:text=nocolor',
  36820. [leave] hue s 1,
  36821. [leave] drawtext reinit 'fontfile=FreeSerif.ttf:text=color';
  36822. # apply an exponential saturation fade-out effect, starting from time 25
  36823. 25 [enter] hue s exp(25-t)
  36824. </pre></div>
  36825. <p>A filtergraph allowing to read and process the above command list
  36826. stored in a file &lsquo;<tt>test.cmd</tt>&rsquo;, can be specified with:
  36827. </p><div class="example">
  36828. <pre class="example">sendcmd=f=test.cmd,drawtext=fontfile=FreeSerif.ttf:text='',hue
  36829. </pre></div>
  36830. </li></ul>
  36831. <p><a name="setpts"></a>
  36832. </p><a name="setpts_002c-asetpts"></a>
  36833. <h2 class="section"><a href="ffplay-all.html#toc-setpts_002c-asetpts">35.16 setpts, asetpts</a></h2>
  36834. <p>Change the PTS (presentation timestamp) of the input frames.
  36835. </p>
  36836. <p><code>setpts</code> works on video frames, <code>asetpts</code> on audio frames.
  36837. </p>
  36838. <p>This filter accepts the following options:
  36839. </p>
  36840. <dl compact="compact">
  36841. <dt>&lsquo;<samp>expr</samp>&rsquo;</dt>
  36842. <dd><p>The expression which is evaluated for each frame to construct its timestamp.
  36843. </p>
  36844. </dd>
  36845. </dl>
  36846. <p>The expression is evaluated through the eval API and can contain the following
  36847. constants:
  36848. </p>
  36849. <dl compact="compact">
  36850. <dt>&lsquo;<samp>FRAME_RATE, FR</samp>&rsquo;</dt>
  36851. <dd><p>frame rate, only defined for constant frame-rate video
  36852. </p>
  36853. </dd>
  36854. <dt>&lsquo;<samp>PTS</samp>&rsquo;</dt>
  36855. <dd><p>The presentation timestamp in input
  36856. </p>
  36857. </dd>
  36858. <dt>&lsquo;<samp>N</samp>&rsquo;</dt>
  36859. <dd><p>The count of the input frame for video or the number of consumed samples,
  36860. not including the current frame for audio, starting from 0.
  36861. </p>
  36862. </dd>
  36863. <dt>&lsquo;<samp>NB_CONSUMED_SAMPLES</samp>&rsquo;</dt>
  36864. <dd><p>The number of consumed samples, not including the current frame (only
  36865. audio)
  36866. </p>
  36867. </dd>
  36868. <dt>&lsquo;<samp>NB_SAMPLES, S</samp>&rsquo;</dt>
  36869. <dd><p>The number of samples in the current frame (only audio)
  36870. </p>
  36871. </dd>
  36872. <dt>&lsquo;<samp>SAMPLE_RATE, SR</samp>&rsquo;</dt>
  36873. <dd><p>The audio sample rate.
  36874. </p>
  36875. </dd>
  36876. <dt>&lsquo;<samp>STARTPTS</samp>&rsquo;</dt>
  36877. <dd><p>The PTS of the first frame.
  36878. </p>
  36879. </dd>
  36880. <dt>&lsquo;<samp>STARTT</samp>&rsquo;</dt>
  36881. <dd><p>the time in seconds of the first frame
  36882. </p>
  36883. </dd>
  36884. <dt>&lsquo;<samp>INTERLACED</samp>&rsquo;</dt>
  36885. <dd><p>State whether the current frame is interlaced.
  36886. </p>
  36887. </dd>
  36888. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  36889. <dd><p>the time in seconds of the current frame
  36890. </p>
  36891. </dd>
  36892. <dt>&lsquo;<samp>POS</samp>&rsquo;</dt>
  36893. <dd><p>original position in the file of the frame, or undefined if undefined
  36894. for the current frame
  36895. </p>
  36896. </dd>
  36897. <dt>&lsquo;<samp>PREV_INPTS</samp>&rsquo;</dt>
  36898. <dd><p>The previous input PTS.
  36899. </p>
  36900. </dd>
  36901. <dt>&lsquo;<samp>PREV_INT</samp>&rsquo;</dt>
  36902. <dd><p>previous input time in seconds
  36903. </p>
  36904. </dd>
  36905. <dt>&lsquo;<samp>PREV_OUTPTS</samp>&rsquo;</dt>
  36906. <dd><p>The previous output PTS.
  36907. </p>
  36908. </dd>
  36909. <dt>&lsquo;<samp>PREV_OUTT</samp>&rsquo;</dt>
  36910. <dd><p>previous output time in seconds
  36911. </p>
  36912. </dd>
  36913. <dt>&lsquo;<samp>RTCTIME</samp>&rsquo;</dt>
  36914. <dd><p>The wallclock (RTC) time in microseconds. This is deprecated, use time(0)
  36915. instead.
  36916. </p>
  36917. </dd>
  36918. <dt>&lsquo;<samp>RTCSTART</samp>&rsquo;</dt>
  36919. <dd><p>The wallclock (RTC) time at the start of the movie in microseconds.
  36920. </p>
  36921. </dd>
  36922. <dt>&lsquo;<samp>TB</samp>&rsquo;</dt>
  36923. <dd><p>The timebase of the input timestamps.
  36924. </p>
  36925. </dd>
  36926. </dl>
  36927. <a name="Examples-103"></a>
  36928. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-103">35.16.1 Examples</a></h3>
  36929. <ul>
  36930. <li>
  36931. Start counting PTS from zero
  36932. <div class="example">
  36933. <pre class="example">setpts=PTS-STARTPTS
  36934. </pre></div>
  36935. </li><li>
  36936. Apply fast motion effect:
  36937. <div class="example">
  36938. <pre class="example">setpts=0.5*PTS
  36939. </pre></div>
  36940. </li><li>
  36941. Apply slow motion effect:
  36942. <div class="example">
  36943. <pre class="example">setpts=2.0*PTS
  36944. </pre></div>
  36945. </li><li>
  36946. Set fixed rate of 25 frames per second:
  36947. <div class="example">
  36948. <pre class="example">setpts=N/(25*TB)
  36949. </pre></div>
  36950. </li><li>
  36951. Set fixed rate 25 fps with some jitter:
  36952. <div class="example">
  36953. <pre class="example">setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
  36954. </pre></div>
  36955. </li><li>
  36956. Apply an offset of 10 seconds to the input PTS:
  36957. <div class="example">
  36958. <pre class="example">setpts=PTS+10/TB
  36959. </pre></div>
  36960. </li><li>
  36961. Generate timestamps from a &quot;live source&quot; and rebase onto the current timebase:
  36962. <div class="example">
  36963. <pre class="example">setpts='(RTCTIME - RTCSTART) / (TB * 1000000)'
  36964. </pre></div>
  36965. </li><li>
  36966. Generate timestamps by counting samples:
  36967. <div class="example">
  36968. <pre class="example">asetpts=N/SR/TB
  36969. </pre></div>
  36970. </li></ul>
  36971. <a name="setrange"></a>
  36972. <h2 class="section"><a href="ffplay-all.html#toc-setrange">35.17 setrange</a></h2>
  36973. <p>Force color range for the output video frame.
  36974. </p>
  36975. <p>The <code>setrange</code> filter marks the color range property for the
  36976. output frames. It does not change the input frame, but only sets the
  36977. corresponding property, which affects how the frame is treated by
  36978. following filters.
  36979. </p>
  36980. <p>The filter accepts the following options:
  36981. </p>
  36982. <dl compact="compact">
  36983. <dt>&lsquo;<samp>range</samp>&rsquo;</dt>
  36984. <dd><p>Available values are:
  36985. </p>
  36986. <dl compact="compact">
  36987. <dt>&lsquo;<samp>auto</samp>&rsquo;</dt>
  36988. <dd><p>Keep the same color range property.
  36989. </p>
  36990. </dd>
  36991. <dt>&lsquo;<samp>unspecified, unknown</samp>&rsquo;</dt>
  36992. <dd><p>Set the color range as unspecified.
  36993. </p>
  36994. </dd>
  36995. <dt>&lsquo;<samp>limited, tv, mpeg</samp>&rsquo;</dt>
  36996. <dd><p>Set the color range as limited.
  36997. </p>
  36998. </dd>
  36999. <dt>&lsquo;<samp>full, pc, jpeg</samp>&rsquo;</dt>
  37000. <dd><p>Set the color range as full.
  37001. </p></dd>
  37002. </dl>
  37003. </dd>
  37004. </dl>
  37005. <a name="settb_002c-asettb"></a>
  37006. <h2 class="section"><a href="ffplay-all.html#toc-settb_002c-asettb">35.18 settb, asettb</a></h2>
  37007. <p>Set the timebase to use for the output frames timestamps.
  37008. It is mainly useful for testing timebase configuration.
  37009. </p>
  37010. <p>It accepts the following parameters:
  37011. </p>
  37012. <dl compact="compact">
  37013. <dt>&lsquo;<samp>expr, tb</samp>&rsquo;</dt>
  37014. <dd><p>The expression which is evaluated into the output timebase.
  37015. </p>
  37016. </dd>
  37017. </dl>
  37018. <p>The value for &lsquo;<samp>tb</samp>&rsquo; is an arithmetic expression representing a
  37019. rational. The expression can contain the constants &quot;AVTB&quot; (the default
  37020. timebase), &quot;intb&quot; (the input timebase) and &quot;sr&quot; (the sample rate,
  37021. audio only). Default value is &quot;intb&quot;.
  37022. </p>
  37023. <a name="Examples-95"></a>
  37024. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-95">35.18.1 Examples</a></h3>
  37025. <ul>
  37026. <li>
  37027. Set the timebase to 1/25:
  37028. <div class="example">
  37029. <pre class="example">settb=expr=1/25
  37030. </pre></div>
  37031. </li><li>
  37032. Set the timebase to 1/10:
  37033. <div class="example">
  37034. <pre class="example">settb=expr=0.1
  37035. </pre></div>
  37036. </li><li>
  37037. Set the timebase to 1001/1000:
  37038. <div class="example">
  37039. <pre class="example">settb=1+0.001
  37040. </pre></div>
  37041. </li><li>
  37042. Set the timebase to 2*intb:
  37043. <div class="example">
  37044. <pre class="example">settb=2*intb
  37045. </pre></div>
  37046. </li><li>
  37047. Set the default timebase value:
  37048. <div class="example">
  37049. <pre class="example">settb=AVTB
  37050. </pre></div>
  37051. </li></ul>
  37052. <a name="showcqt"></a>
  37053. <h2 class="section"><a href="ffplay-all.html#toc-showcqt">35.19 showcqt</a></h2>
  37054. <p>Convert input audio to a video output representing frequency spectrum
  37055. logarithmically using Brown-Puckette constant Q transform algorithm with
  37056. direct frequency domain coefficient calculation (but the transform itself
  37057. is not really constant Q, instead the Q factor is actually variable/clamped),
  37058. with musical tone scale, from E0 to D#10.
  37059. </p>
  37060. <p>The filter accepts the following options:
  37061. </p>
  37062. <dl compact="compact">
  37063. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  37064. <dd><p>Specify the video size for the output. It must be even. For the syntax of this option,
  37065. check the <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37066. Default value is <code>1920x1080</code>.
  37067. </p>
  37068. </dd>
  37069. <dt>&lsquo;<samp>fps, rate, r</samp>&rsquo;</dt>
  37070. <dd><p>Set the output frame rate. Default value is <code>25</code>.
  37071. </p>
  37072. </dd>
  37073. <dt>&lsquo;<samp>bar_h</samp>&rsquo;</dt>
  37074. <dd><p>Set the bargraph height. It must be even. Default value is <code>-1</code> which
  37075. computes the bargraph height automatically.
  37076. </p>
  37077. </dd>
  37078. <dt>&lsquo;<samp>axis_h</samp>&rsquo;</dt>
  37079. <dd><p>Set the axis height. It must be even. Default value is <code>-1</code> which computes
  37080. the axis height automatically.
  37081. </p>
  37082. </dd>
  37083. <dt>&lsquo;<samp>sono_h</samp>&rsquo;</dt>
  37084. <dd><p>Set the sonogram height. It must be even. Default value is <code>-1</code> which
  37085. computes the sonogram height automatically.
  37086. </p>
  37087. </dd>
  37088. <dt>&lsquo;<samp>fullhd</samp>&rsquo;</dt>
  37089. <dd><p>Set the fullhd resolution. This option is deprecated, use <var>size</var>, <var>s</var>
  37090. instead. Default value is <code>1</code>.
  37091. </p>
  37092. </dd>
  37093. <dt>&lsquo;<samp>sono_v, volume</samp>&rsquo;</dt>
  37094. <dd><p>Specify the sonogram volume expression. It can contain variables:
  37095. </p><dl compact="compact">
  37096. <dt>&lsquo;<samp>bar_v</samp>&rsquo;</dt>
  37097. <dd><p>the <var>bar_v</var> evaluated expression
  37098. </p></dd>
  37099. <dt>&lsquo;<samp>frequency, freq, f</samp>&rsquo;</dt>
  37100. <dd><p>the frequency where it is evaluated
  37101. </p></dd>
  37102. <dt>&lsquo;<samp>timeclamp, tc</samp>&rsquo;</dt>
  37103. <dd><p>the value of <var>timeclamp</var> option
  37104. </p></dd>
  37105. </dl>
  37106. <p>and functions:
  37107. </p><dl compact="compact">
  37108. <dt>&lsquo;<samp>a_weighting(f)</samp>&rsquo;</dt>
  37109. <dd><p>A-weighting of equal loudness
  37110. </p></dd>
  37111. <dt>&lsquo;<samp>b_weighting(f)</samp>&rsquo;</dt>
  37112. <dd><p>B-weighting of equal loudness
  37113. </p></dd>
  37114. <dt>&lsquo;<samp>c_weighting(f)</samp>&rsquo;</dt>
  37115. <dd><p>C-weighting of equal loudness.
  37116. </p></dd>
  37117. </dl>
  37118. <p>Default value is <code>16</code>.
  37119. </p>
  37120. </dd>
  37121. <dt>&lsquo;<samp>bar_v, volume2</samp>&rsquo;</dt>
  37122. <dd><p>Specify the bargraph volume expression. It can contain variables:
  37123. </p><dl compact="compact">
  37124. <dt>&lsquo;<samp>sono_v</samp>&rsquo;</dt>
  37125. <dd><p>the <var>sono_v</var> evaluated expression
  37126. </p></dd>
  37127. <dt>&lsquo;<samp>frequency, freq, f</samp>&rsquo;</dt>
  37128. <dd><p>the frequency where it is evaluated
  37129. </p></dd>
  37130. <dt>&lsquo;<samp>timeclamp, tc</samp>&rsquo;</dt>
  37131. <dd><p>the value of <var>timeclamp</var> option
  37132. </p></dd>
  37133. </dl>
  37134. <p>and functions:
  37135. </p><dl compact="compact">
  37136. <dt>&lsquo;<samp>a_weighting(f)</samp>&rsquo;</dt>
  37137. <dd><p>A-weighting of equal loudness
  37138. </p></dd>
  37139. <dt>&lsquo;<samp>b_weighting(f)</samp>&rsquo;</dt>
  37140. <dd><p>B-weighting of equal loudness
  37141. </p></dd>
  37142. <dt>&lsquo;<samp>c_weighting(f)</samp>&rsquo;</dt>
  37143. <dd><p>C-weighting of equal loudness.
  37144. </p></dd>
  37145. </dl>
  37146. <p>Default value is <code>sono_v</code>.
  37147. </p>
  37148. </dd>
  37149. <dt>&lsquo;<samp>sono_g, gamma</samp>&rsquo;</dt>
  37150. <dd><p>Specify the sonogram gamma. Lower gamma makes the spectrum more contrast,
  37151. higher gamma makes the spectrum having more range. Default value is <code>3</code>.
  37152. Acceptable range is <code>[1, 7]</code>.
  37153. </p>
  37154. </dd>
  37155. <dt>&lsquo;<samp>bar_g, gamma2</samp>&rsquo;</dt>
  37156. <dd><p>Specify the bargraph gamma. Default value is <code>1</code>. Acceptable range is
  37157. <code>[1, 7]</code>.
  37158. </p>
  37159. </dd>
  37160. <dt>&lsquo;<samp>bar_t</samp>&rsquo;</dt>
  37161. <dd><p>Specify the bargraph transparency level. Lower value makes the bargraph sharper.
  37162. Default value is <code>1</code>. Acceptable range is <code>[0, 1]</code>.
  37163. </p>
  37164. </dd>
  37165. <dt>&lsquo;<samp>timeclamp, tc</samp>&rsquo;</dt>
  37166. <dd><p>Specify the transform timeclamp. At low frequency, there is trade-off between
  37167. accuracy in time domain and frequency domain. If timeclamp is lower,
  37168. event in time domain is represented more accurately (such as fast bass drum),
  37169. otherwise event in frequency domain is represented more accurately
  37170. (such as bass guitar). Acceptable range is <code>[0.002, 1]</code>. Default value is <code>0.17</code>.
  37171. </p>
  37172. </dd>
  37173. <dt>&lsquo;<samp>attack</samp>&rsquo;</dt>
  37174. <dd><p>Set attack time in seconds. The default is <code>0</code> (disabled). Otherwise, it
  37175. limits future samples by applying asymmetric windowing in time domain, useful
  37176. when low latency is required. Accepted range is <code>[0, 1]</code>.
  37177. </p>
  37178. </dd>
  37179. <dt>&lsquo;<samp>basefreq</samp>&rsquo;</dt>
  37180. <dd><p>Specify the transform base frequency. Default value is <code>20.01523126408007475</code>,
  37181. which is frequency 50 cents below E0. Acceptable range is <code>[10, 100000]</code>.
  37182. </p>
  37183. </dd>
  37184. <dt>&lsquo;<samp>endfreq</samp>&rsquo;</dt>
  37185. <dd><p>Specify the transform end frequency. Default value is <code>20495.59681441799654</code>,
  37186. which is frequency 50 cents above D#10. Acceptable range is <code>[10, 100000]</code>.
  37187. </p>
  37188. </dd>
  37189. <dt>&lsquo;<samp>coeffclamp</samp>&rsquo;</dt>
  37190. <dd><p>This option is deprecated and ignored.
  37191. </p>
  37192. </dd>
  37193. <dt>&lsquo;<samp>tlength</samp>&rsquo;</dt>
  37194. <dd><p>Specify the transform length in time domain. Use this option to control accuracy
  37195. trade-off between time domain and frequency domain at every frequency sample.
  37196. It can contain variables:
  37197. </p><dl compact="compact">
  37198. <dt>&lsquo;<samp>frequency, freq, f</samp>&rsquo;</dt>
  37199. <dd><p>the frequency where it is evaluated
  37200. </p></dd>
  37201. <dt>&lsquo;<samp>timeclamp, tc</samp>&rsquo;</dt>
  37202. <dd><p>the value of <var>timeclamp</var> option.
  37203. </p></dd>
  37204. </dl>
  37205. <p>Default value is <code>384*tc/(384+tc*f)</code>.
  37206. </p>
  37207. </dd>
  37208. <dt>&lsquo;<samp>count</samp>&rsquo;</dt>
  37209. <dd><p>Specify the transform count for every video frame. Default value is <code>6</code>.
  37210. Acceptable range is <code>[1, 30]</code>.
  37211. </p>
  37212. </dd>
  37213. <dt>&lsquo;<samp>fcount</samp>&rsquo;</dt>
  37214. <dd><p>Specify the transform count for every single pixel. Default value is <code>0</code>,
  37215. which makes it computed automatically. Acceptable range is <code>[0, 10]</code>.
  37216. </p>
  37217. </dd>
  37218. <dt>&lsquo;<samp>fontfile</samp>&rsquo;</dt>
  37219. <dd><p>Specify font file for use with freetype to draw the axis. If not specified,
  37220. use embedded font. Note that drawing with font file or embedded font is not
  37221. implemented with custom <var>basefreq</var> and <var>endfreq</var>, use <var>axisfile</var>
  37222. option instead.
  37223. </p>
  37224. </dd>
  37225. <dt>&lsquo;<samp>font</samp>&rsquo;</dt>
  37226. <dd><p>Specify fontconfig pattern. This has lower priority than <var>fontfile</var>. The
  37227. <code>:</code> in the pattern may be replaced by <code>|</code> to avoid unnecessary
  37228. escaping.
  37229. </p>
  37230. </dd>
  37231. <dt>&lsquo;<samp>fontcolor</samp>&rsquo;</dt>
  37232. <dd><p>Specify font color expression. This is arithmetic expression that should return
  37233. integer value 0xRRGGBB. It can contain variables:
  37234. </p><dl compact="compact">
  37235. <dt>&lsquo;<samp>frequency, freq, f</samp>&rsquo;</dt>
  37236. <dd><p>the frequency where it is evaluated
  37237. </p></dd>
  37238. <dt>&lsquo;<samp>timeclamp, tc</samp>&rsquo;</dt>
  37239. <dd><p>the value of <var>timeclamp</var> option
  37240. </p></dd>
  37241. </dl>
  37242. <p>and functions:
  37243. </p><dl compact="compact">
  37244. <dt>&lsquo;<samp>midi(f)</samp>&rsquo;</dt>
  37245. <dd><p>midi number of frequency f, some midi numbers: E0(16), C1(24), C2(36), A4(69)
  37246. </p></dd>
  37247. <dt>&lsquo;<samp>r(x), g(x), b(x)</samp>&rsquo;</dt>
  37248. <dd><p>red, green, and blue value of intensity x.
  37249. </p></dd>
  37250. </dl>
  37251. <p>Default value is <code>st(0, (midi(f)-59.5)/12);
  37252. st(1, if(between(ld(0),0,1), 0.5-0.5*cos(2*PI*ld(0)), 0));
  37253. r(1-ld(1)) + b(ld(1))</code>.
  37254. </p>
  37255. </dd>
  37256. <dt>&lsquo;<samp>axisfile</samp>&rsquo;</dt>
  37257. <dd><p>Specify image file to draw the axis. This option override <var>fontfile</var> and
  37258. <var>fontcolor</var> option.
  37259. </p>
  37260. </dd>
  37261. <dt>&lsquo;<samp>axis, text</samp>&rsquo;</dt>
  37262. <dd><p>Enable/disable drawing text to the axis. If it is set to <code>0</code>, drawing to
  37263. the axis is disabled, ignoring <var>fontfile</var> and <var>axisfile</var> option.
  37264. Default value is <code>1</code>.
  37265. </p>
  37266. </dd>
  37267. <dt>&lsquo;<samp>csp</samp>&rsquo;</dt>
  37268. <dd><p>Set colorspace. The accepted values are:
  37269. </p><dl compact="compact">
  37270. <dt>&lsquo;<samp>unspecified</samp>&rsquo;</dt>
  37271. <dd><p>Unspecified (default)
  37272. </p>
  37273. </dd>
  37274. <dt>&lsquo;<samp>bt709</samp>&rsquo;</dt>
  37275. <dd><p>BT.709
  37276. </p>
  37277. </dd>
  37278. <dt>&lsquo;<samp>fcc</samp>&rsquo;</dt>
  37279. <dd><p>FCC
  37280. </p>
  37281. </dd>
  37282. <dt>&lsquo;<samp>bt470bg</samp>&rsquo;</dt>
  37283. <dd><p>BT.470BG or BT.601-6 625
  37284. </p>
  37285. </dd>
  37286. <dt>&lsquo;<samp>smpte170m</samp>&rsquo;</dt>
  37287. <dd><p>SMPTE-170M or BT.601-6 525
  37288. </p>
  37289. </dd>
  37290. <dt>&lsquo;<samp>smpte240m</samp>&rsquo;</dt>
  37291. <dd><p>SMPTE-240M
  37292. </p>
  37293. </dd>
  37294. <dt>&lsquo;<samp>bt2020ncl</samp>&rsquo;</dt>
  37295. <dd><p>BT.2020 with non-constant luminance
  37296. </p>
  37297. </dd>
  37298. </dl>
  37299. </dd>
  37300. <dt>&lsquo;<samp>cscheme</samp>&rsquo;</dt>
  37301. <dd><p>Set spectrogram color scheme. This is list of floating point values with format
  37302. <code>left_r|left_g|left_b|right_r|right_g|right_b</code>.
  37303. The default is <code>1|0.5|0|0|0.5|1</code>.
  37304. </p>
  37305. </dd>
  37306. </dl>
  37307. <a name="Examples-74"></a>
  37308. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-74">35.19.1 Examples</a></h3>
  37309. <ul>
  37310. <li>
  37311. Playing audio while showing the spectrum:
  37312. <div class="example">
  37313. <pre class="example">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]'
  37314. </pre></div>
  37315. </li><li>
  37316. Same as above, but with frame rate 30 fps:
  37317. <div class="example">
  37318. <pre class="example">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]'
  37319. </pre></div>
  37320. </li><li>
  37321. Playing at 1280x720:
  37322. <div class="example">
  37323. <pre class="example">ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]'
  37324. </pre></div>
  37325. </li><li>
  37326. Disable sonogram display:
  37327. <div class="example">
  37328. <pre class="example">sono_h=0
  37329. </pre></div>
  37330. </li><li>
  37331. A1 and its harmonics: A1, A2, (near)E3, A3:
  37332. <div class="example">
  37333. <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),
  37334. asplit[a][out1]; [a] showcqt [out0]'
  37335. </pre></div>
  37336. </li><li>
  37337. Same as above, but with more accuracy in frequency domain:
  37338. <div class="example">
  37339. <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),
  37340. asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]'
  37341. </pre></div>
  37342. </li><li>
  37343. Custom volume:
  37344. <div class="example">
  37345. <pre class="example">bar_v=10:sono_v=bar_v*a_weighting(f)
  37346. </pre></div>
  37347. </li><li>
  37348. Custom gamma, now spectrum is linear to the amplitude.
  37349. <div class="example">
  37350. <pre class="example">bar_g=2:sono_g=2
  37351. </pre></div>
  37352. </li><li>
  37353. Custom tlength equation:
  37354. <div class="example">
  37355. <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)))'
  37356. </pre></div>
  37357. </li><li>
  37358. Custom fontcolor and fontfile, C-note is colored green, others are colored blue:
  37359. <div class="example">
  37360. <pre class="example">fontcolor='if(mod(floor(midi(f)+0.5),12), 0x0000FF, g(1))':fontfile=myfont.ttf
  37361. </pre></div>
  37362. </li><li>
  37363. Custom font using fontconfig:
  37364. <div class="example">
  37365. <pre class="example">font='Courier New,Monospace,mono|bold'
  37366. </pre></div>
  37367. </li><li>
  37368. Custom frequency range with custom axis using image file:
  37369. <div class="example">
  37370. <pre class="example">axisfile=myaxis.png:basefreq=40:endfreq=10000
  37371. </pre></div>
  37372. </li></ul>
  37373. <a name="showfreqs"></a>
  37374. <h2 class="section"><a href="ffplay-all.html#toc-showfreqs">35.20 showfreqs</a></h2>
  37375. <p>Convert input audio to video output representing the audio power spectrum.
  37376. Audio amplitude is on Y-axis while frequency is on X-axis.
  37377. </p>
  37378. <p>The filter accepts the following options:
  37379. </p>
  37380. <dl compact="compact">
  37381. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  37382. <dd><p>Specify size of video. For the syntax of this option, check the
  37383. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37384. Default is <code>1024x512</code>.
  37385. </p>
  37386. </dd>
  37387. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  37388. <dd><p>Set display mode.
  37389. This set how each frequency bin will be represented.
  37390. </p>
  37391. <p>It accepts the following values:
  37392. </p><dl compact="compact">
  37393. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  37394. <dt>&lsquo;<samp>bar</samp>&rsquo;</dt>
  37395. <dt>&lsquo;<samp>dot</samp>&rsquo;</dt>
  37396. </dl>
  37397. <p>Default is <code>bar</code>.
  37398. </p>
  37399. </dd>
  37400. <dt>&lsquo;<samp>ascale</samp>&rsquo;</dt>
  37401. <dd><p>Set amplitude scale.
  37402. </p>
  37403. <p>It accepts the following values:
  37404. </p><dl compact="compact">
  37405. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  37406. <dd><p>Linear scale.
  37407. </p>
  37408. </dd>
  37409. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  37410. <dd><p>Square root scale.
  37411. </p>
  37412. </dd>
  37413. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  37414. <dd><p>Cubic root scale.
  37415. </p>
  37416. </dd>
  37417. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  37418. <dd><p>Logarithmic scale.
  37419. </p></dd>
  37420. </dl>
  37421. <p>Default is <code>log</code>.
  37422. </p>
  37423. </dd>
  37424. <dt>&lsquo;<samp>fscale</samp>&rsquo;</dt>
  37425. <dd><p>Set frequency scale.
  37426. </p>
  37427. <p>It accepts the following values:
  37428. </p><dl compact="compact">
  37429. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  37430. <dd><p>Linear scale.
  37431. </p>
  37432. </dd>
  37433. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  37434. <dd><p>Logarithmic scale.
  37435. </p>
  37436. </dd>
  37437. <dt>&lsquo;<samp>rlog</samp>&rsquo;</dt>
  37438. <dd><p>Reverse logarithmic scale.
  37439. </p></dd>
  37440. </dl>
  37441. <p>Default is <code>lin</code>.
  37442. </p>
  37443. </dd>
  37444. <dt>&lsquo;<samp>win_size</samp>&rsquo;</dt>
  37445. <dd><p>Set window size. Allowed range is from 16 to 65536.
  37446. </p>
  37447. <p>Default is <code>2048</code>
  37448. </p>
  37449. </dd>
  37450. <dt>&lsquo;<samp>win_func</samp>&rsquo;</dt>
  37451. <dd><p>Set windowing function.
  37452. </p>
  37453. <p>It accepts the following values:
  37454. </p><dl compact="compact">
  37455. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  37456. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  37457. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  37458. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  37459. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  37460. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  37461. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  37462. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  37463. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  37464. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  37465. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  37466. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  37467. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  37468. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  37469. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  37470. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  37471. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  37472. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  37473. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  37474. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  37475. </dl>
  37476. <p>Default is <code>hanning</code>.
  37477. </p>
  37478. </dd>
  37479. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  37480. <dd><p>Set window overlap. In range <code>[0, 1]</code>. Default is <code>1</code>,
  37481. which means optimal overlap for selected window function will be picked.
  37482. </p>
  37483. </dd>
  37484. <dt>&lsquo;<samp>averaging</samp>&rsquo;</dt>
  37485. <dd><p>Set time averaging. Setting this to 0 will display current maximal peaks.
  37486. Default is <code>1</code>, which means time averaging is disabled.
  37487. </p>
  37488. </dd>
  37489. <dt>&lsquo;<samp>colors</samp>&rsquo;</dt>
  37490. <dd><p>Specify list of colors separated by space or by &rsquo;|&rsquo; which will be used to
  37491. draw channel frequencies. Unrecognized or missing colors will be replaced
  37492. by white color.
  37493. </p>
  37494. </dd>
  37495. <dt>&lsquo;<samp>cmode</samp>&rsquo;</dt>
  37496. <dd><p>Set channel display mode.
  37497. </p>
  37498. <p>It accepts the following values:
  37499. </p><dl compact="compact">
  37500. <dt>&lsquo;<samp>combined</samp>&rsquo;</dt>
  37501. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  37502. </dl>
  37503. <p>Default is <code>combined</code>.
  37504. </p>
  37505. </dd>
  37506. <dt>&lsquo;<samp>minamp</samp>&rsquo;</dt>
  37507. <dd><p>Set minimum amplitude used in <code>log</code> amplitude scaler.
  37508. </p>
  37509. </dd>
  37510. </dl>
  37511. <a name="showspatial"></a>
  37512. <h2 class="section"><a href="ffplay-all.html#toc-showspatial">35.21 showspatial</a></h2>
  37513. <p>Convert stereo input audio to a video output, representing the spatial relationship
  37514. between two channels.
  37515. </p>
  37516. <p>The filter accepts the following options:
  37517. </p>
  37518. <dl compact="compact">
  37519. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  37520. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  37521. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37522. Default value is <code>512x512</code>.
  37523. </p>
  37524. </dd>
  37525. <dt>&lsquo;<samp>win_size</samp>&rsquo;</dt>
  37526. <dd><p>Set window size. Allowed range is from <var>1024</var> to <var>65536</var>. Default size is <var>4096</var>.
  37527. </p>
  37528. </dd>
  37529. <dt>&lsquo;<samp>win_func</samp>&rsquo;</dt>
  37530. <dd><p>Set window function.
  37531. </p>
  37532. <p>It accepts the following values:
  37533. </p><dl compact="compact">
  37534. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  37535. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  37536. <dt>&lsquo;<samp>hann</samp>&rsquo;</dt>
  37537. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  37538. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  37539. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  37540. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  37541. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  37542. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  37543. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  37544. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  37545. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  37546. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  37547. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  37548. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  37549. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  37550. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  37551. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  37552. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  37553. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  37554. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  37555. </dl>
  37556. <p>Default value is <code>hann</code>.
  37557. </p>
  37558. </dd>
  37559. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  37560. <dd><p>Set ratio of overlap window. Default value is <code>0.5</code>.
  37561. When value is <code>1</code> overlap is set to recommended size for specific
  37562. window function currently used.
  37563. </p></dd>
  37564. </dl>
  37565. <p><a name="showspectrum"></a>
  37566. </p><a name="showspectrum-1"></a>
  37567. <h2 class="section"><a href="ffplay-all.html#toc-showspectrum-1">35.22 showspectrum</a></h2>
  37568. <p>Convert input audio to a video output, representing the audio frequency
  37569. spectrum.
  37570. </p>
  37571. <p>The filter accepts the following options:
  37572. </p>
  37573. <dl compact="compact">
  37574. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  37575. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  37576. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37577. Default value is <code>640x512</code>.
  37578. </p>
  37579. </dd>
  37580. <dt>&lsquo;<samp>slide</samp>&rsquo;</dt>
  37581. <dd><p>Specify how the spectrum should slide along the window.
  37582. </p>
  37583. <p>It accepts the following values:
  37584. </p><dl compact="compact">
  37585. <dt>&lsquo;<samp>replace</samp>&rsquo;</dt>
  37586. <dd><p>the samples start again on the left when they reach the right
  37587. </p></dd>
  37588. <dt>&lsquo;<samp>scroll</samp>&rsquo;</dt>
  37589. <dd><p>the samples scroll from right to left
  37590. </p></dd>
  37591. <dt>&lsquo;<samp>fullframe</samp>&rsquo;</dt>
  37592. <dd><p>frames are only produced when the samples reach the right
  37593. </p></dd>
  37594. <dt>&lsquo;<samp>rscroll</samp>&rsquo;</dt>
  37595. <dd><p>the samples scroll from left to right
  37596. </p></dd>
  37597. </dl>
  37598. <p>Default value is <code>replace</code>.
  37599. </p>
  37600. </dd>
  37601. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  37602. <dd><p>Specify display mode.
  37603. </p>
  37604. <p>It accepts the following values:
  37605. </p><dl compact="compact">
  37606. <dt>&lsquo;<samp>combined</samp>&rsquo;</dt>
  37607. <dd><p>all channels are displayed in the same row
  37608. </p></dd>
  37609. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  37610. <dd><p>all channels are displayed in separate rows
  37611. </p></dd>
  37612. </dl>
  37613. <p>Default value is &lsquo;<samp>combined</samp>&rsquo;.
  37614. </p>
  37615. </dd>
  37616. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  37617. <dd><p>Specify display color mode.
  37618. </p>
  37619. <p>It accepts the following values:
  37620. </p><dl compact="compact">
  37621. <dt>&lsquo;<samp>channel</samp>&rsquo;</dt>
  37622. <dd><p>each channel is displayed in a separate color
  37623. </p></dd>
  37624. <dt>&lsquo;<samp>intensity</samp>&rsquo;</dt>
  37625. <dd><p>each channel is displayed using the same color scheme
  37626. </p></dd>
  37627. <dt>&lsquo;<samp>rainbow</samp>&rsquo;</dt>
  37628. <dd><p>each channel is displayed using the rainbow color scheme
  37629. </p></dd>
  37630. <dt>&lsquo;<samp>moreland</samp>&rsquo;</dt>
  37631. <dd><p>each channel is displayed using the moreland color scheme
  37632. </p></dd>
  37633. <dt>&lsquo;<samp>nebulae</samp>&rsquo;</dt>
  37634. <dd><p>each channel is displayed using the nebulae color scheme
  37635. </p></dd>
  37636. <dt>&lsquo;<samp>fire</samp>&rsquo;</dt>
  37637. <dd><p>each channel is displayed using the fire color scheme
  37638. </p></dd>
  37639. <dt>&lsquo;<samp>fiery</samp>&rsquo;</dt>
  37640. <dd><p>each channel is displayed using the fiery color scheme
  37641. </p></dd>
  37642. <dt>&lsquo;<samp>fruit</samp>&rsquo;</dt>
  37643. <dd><p>each channel is displayed using the fruit color scheme
  37644. </p></dd>
  37645. <dt>&lsquo;<samp>cool</samp>&rsquo;</dt>
  37646. <dd><p>each channel is displayed using the cool color scheme
  37647. </p></dd>
  37648. <dt>&lsquo;<samp>magma</samp>&rsquo;</dt>
  37649. <dd><p>each channel is displayed using the magma color scheme
  37650. </p></dd>
  37651. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  37652. <dd><p>each channel is displayed using the green color scheme
  37653. </p></dd>
  37654. <dt>&lsquo;<samp>viridis</samp>&rsquo;</dt>
  37655. <dd><p>each channel is displayed using the viridis color scheme
  37656. </p></dd>
  37657. <dt>&lsquo;<samp>plasma</samp>&rsquo;</dt>
  37658. <dd><p>each channel is displayed using the plasma color scheme
  37659. </p></dd>
  37660. <dt>&lsquo;<samp>cividis</samp>&rsquo;</dt>
  37661. <dd><p>each channel is displayed using the cividis color scheme
  37662. </p></dd>
  37663. <dt>&lsquo;<samp>terrain</samp>&rsquo;</dt>
  37664. <dd><p>each channel is displayed using the terrain color scheme
  37665. </p></dd>
  37666. </dl>
  37667. <p>Default value is &lsquo;<samp>channel</samp>&rsquo;.
  37668. </p>
  37669. </dd>
  37670. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  37671. <dd><p>Specify scale used for calculating intensity color values.
  37672. </p>
  37673. <p>It accepts the following values:
  37674. </p><dl compact="compact">
  37675. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  37676. <dd><p>linear
  37677. </p></dd>
  37678. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  37679. <dd><p>square root, default
  37680. </p></dd>
  37681. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  37682. <dd><p>cubic root
  37683. </p></dd>
  37684. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  37685. <dd><p>logarithmic
  37686. </p></dd>
  37687. <dt>&lsquo;<samp>4thrt</samp>&rsquo;</dt>
  37688. <dd><p>4th root
  37689. </p></dd>
  37690. <dt>&lsquo;<samp>5thrt</samp>&rsquo;</dt>
  37691. <dd><p>5th root
  37692. </p></dd>
  37693. </dl>
  37694. <p>Default value is &lsquo;<samp>sqrt</samp>&rsquo;.
  37695. </p>
  37696. </dd>
  37697. <dt>&lsquo;<samp>fscale</samp>&rsquo;</dt>
  37698. <dd><p>Specify frequency scale.
  37699. </p>
  37700. <p>It accepts the following values:
  37701. </p><dl compact="compact">
  37702. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  37703. <dd><p>linear
  37704. </p></dd>
  37705. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  37706. <dd><p>logarithmic
  37707. </p></dd>
  37708. </dl>
  37709. <p>Default value is &lsquo;<samp>lin</samp>&rsquo;.
  37710. </p>
  37711. </dd>
  37712. <dt>&lsquo;<samp>saturation</samp>&rsquo;</dt>
  37713. <dd><p>Set saturation modifier for displayed colors. Negative values provide
  37714. alternative color scheme. <code>0</code> is no saturation at all.
  37715. Saturation must be in [-10.0, 10.0] range.
  37716. Default value is <code>1</code>.
  37717. </p>
  37718. </dd>
  37719. <dt>&lsquo;<samp>win_func</samp>&rsquo;</dt>
  37720. <dd><p>Set window function.
  37721. </p>
  37722. <p>It accepts the following values:
  37723. </p><dl compact="compact">
  37724. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  37725. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  37726. <dt>&lsquo;<samp>hann</samp>&rsquo;</dt>
  37727. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  37728. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  37729. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  37730. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  37731. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  37732. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  37733. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  37734. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  37735. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  37736. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  37737. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  37738. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  37739. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  37740. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  37741. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  37742. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  37743. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  37744. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  37745. </dl>
  37746. <p>Default value is <code>hann</code>.
  37747. </p>
  37748. </dd>
  37749. <dt>&lsquo;<samp>orientation</samp>&rsquo;</dt>
  37750. <dd><p>Set orientation of time vs frequency axis. Can be <code>vertical</code> or
  37751. <code>horizontal</code>. Default is <code>vertical</code>.
  37752. </p>
  37753. </dd>
  37754. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  37755. <dd><p>Set ratio of overlap window. Default value is <code>0</code>.
  37756. When value is <code>1</code> overlap is set to recommended size for specific
  37757. window function currently used.
  37758. </p>
  37759. </dd>
  37760. <dt>&lsquo;<samp>gain</samp>&rsquo;</dt>
  37761. <dd><p>Set scale gain for calculating intensity color values.
  37762. Default value is <code>1</code>.
  37763. </p>
  37764. </dd>
  37765. <dt>&lsquo;<samp>data</samp>&rsquo;</dt>
  37766. <dd><p>Set which data to display. Can be <code>magnitude</code>, default or <code>phase</code>.
  37767. </p>
  37768. </dd>
  37769. <dt>&lsquo;<samp>rotation</samp>&rsquo;</dt>
  37770. <dd><p>Set color rotation, must be in [-1.0, 1.0] range.
  37771. Default value is <code>0</code>.
  37772. </p>
  37773. </dd>
  37774. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  37775. <dd><p>Set start frequency from which to display spectrogram. Default is <code>0</code>.
  37776. </p>
  37777. </dd>
  37778. <dt>&lsquo;<samp>stop</samp>&rsquo;</dt>
  37779. <dd><p>Set stop frequency to which to display spectrogram. Default is <code>0</code>.
  37780. </p>
  37781. </dd>
  37782. <dt>&lsquo;<samp>fps</samp>&rsquo;</dt>
  37783. <dd><p>Set upper frame rate limit. Default is <code>auto</code>, unlimited.
  37784. </p>
  37785. </dd>
  37786. <dt>&lsquo;<samp>legend</samp>&rsquo;</dt>
  37787. <dd><p>Draw time and frequency axes and legends. Default is disabled.
  37788. </p></dd>
  37789. </dl>
  37790. <p>The usage is very similar to the showwaves filter; see the examples in that
  37791. section.
  37792. </p>
  37793. <a name="Examples-110"></a>
  37794. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-110">35.22.1 Examples</a></h3>
  37795. <ul>
  37796. <li>
  37797. Large window with logarithmic color scaling:
  37798. <div class="example">
  37799. <pre class="example">showspectrum=s=1280x480:scale=log
  37800. </pre></div>
  37801. </li><li>
  37802. Complete example for a colored and sliding spectrum per channel using <code>ffplay</code>:
  37803. <div class="example">
  37804. <pre class="example">ffplay -f lavfi 'amovie=input.mp3, asplit [a][out1];
  37805. [a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
  37806. </pre></div>
  37807. </li></ul>
  37808. <a name="showspectrumpic"></a>
  37809. <h2 class="section"><a href="ffplay-all.html#toc-showspectrumpic">35.23 showspectrumpic</a></h2>
  37810. <p>Convert input audio to a single video frame, representing the audio frequency
  37811. spectrum.
  37812. </p>
  37813. <p>The filter accepts the following options:
  37814. </p>
  37815. <dl compact="compact">
  37816. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  37817. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  37818. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  37819. Default value is <code>4096x2048</code>.
  37820. </p>
  37821. </dd>
  37822. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  37823. <dd><p>Specify display mode.
  37824. </p>
  37825. <p>It accepts the following values:
  37826. </p><dl compact="compact">
  37827. <dt>&lsquo;<samp>combined</samp>&rsquo;</dt>
  37828. <dd><p>all channels are displayed in the same row
  37829. </p></dd>
  37830. <dt>&lsquo;<samp>separate</samp>&rsquo;</dt>
  37831. <dd><p>all channels are displayed in separate rows
  37832. </p></dd>
  37833. </dl>
  37834. <p>Default value is &lsquo;<samp>combined</samp>&rsquo;.
  37835. </p>
  37836. </dd>
  37837. <dt>&lsquo;<samp>color</samp>&rsquo;</dt>
  37838. <dd><p>Specify display color mode.
  37839. </p>
  37840. <p>It accepts the following values:
  37841. </p><dl compact="compact">
  37842. <dt>&lsquo;<samp>channel</samp>&rsquo;</dt>
  37843. <dd><p>each channel is displayed in a separate color
  37844. </p></dd>
  37845. <dt>&lsquo;<samp>intensity</samp>&rsquo;</dt>
  37846. <dd><p>each channel is displayed using the same color scheme
  37847. </p></dd>
  37848. <dt>&lsquo;<samp>rainbow</samp>&rsquo;</dt>
  37849. <dd><p>each channel is displayed using the rainbow color scheme
  37850. </p></dd>
  37851. <dt>&lsquo;<samp>moreland</samp>&rsquo;</dt>
  37852. <dd><p>each channel is displayed using the moreland color scheme
  37853. </p></dd>
  37854. <dt>&lsquo;<samp>nebulae</samp>&rsquo;</dt>
  37855. <dd><p>each channel is displayed using the nebulae color scheme
  37856. </p></dd>
  37857. <dt>&lsquo;<samp>fire</samp>&rsquo;</dt>
  37858. <dd><p>each channel is displayed using the fire color scheme
  37859. </p></dd>
  37860. <dt>&lsquo;<samp>fiery</samp>&rsquo;</dt>
  37861. <dd><p>each channel is displayed using the fiery color scheme
  37862. </p></dd>
  37863. <dt>&lsquo;<samp>fruit</samp>&rsquo;</dt>
  37864. <dd><p>each channel is displayed using the fruit color scheme
  37865. </p></dd>
  37866. <dt>&lsquo;<samp>cool</samp>&rsquo;</dt>
  37867. <dd><p>each channel is displayed using the cool color scheme
  37868. </p></dd>
  37869. <dt>&lsquo;<samp>magma</samp>&rsquo;</dt>
  37870. <dd><p>each channel is displayed using the magma color scheme
  37871. </p></dd>
  37872. <dt>&lsquo;<samp>green</samp>&rsquo;</dt>
  37873. <dd><p>each channel is displayed using the green color scheme
  37874. </p></dd>
  37875. <dt>&lsquo;<samp>viridis</samp>&rsquo;</dt>
  37876. <dd><p>each channel is displayed using the viridis color scheme
  37877. </p></dd>
  37878. <dt>&lsquo;<samp>plasma</samp>&rsquo;</dt>
  37879. <dd><p>each channel is displayed using the plasma color scheme
  37880. </p></dd>
  37881. <dt>&lsquo;<samp>cividis</samp>&rsquo;</dt>
  37882. <dd><p>each channel is displayed using the cividis color scheme
  37883. </p></dd>
  37884. <dt>&lsquo;<samp>terrain</samp>&rsquo;</dt>
  37885. <dd><p>each channel is displayed using the terrain color scheme
  37886. </p></dd>
  37887. </dl>
  37888. <p>Default value is &lsquo;<samp>intensity</samp>&rsquo;.
  37889. </p>
  37890. </dd>
  37891. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  37892. <dd><p>Specify scale used for calculating intensity color values.
  37893. </p>
  37894. <p>It accepts the following values:
  37895. </p><dl compact="compact">
  37896. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  37897. <dd><p>linear
  37898. </p></dd>
  37899. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  37900. <dd><p>square root, default
  37901. </p></dd>
  37902. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  37903. <dd><p>cubic root
  37904. </p></dd>
  37905. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  37906. <dd><p>logarithmic
  37907. </p></dd>
  37908. <dt>&lsquo;<samp>4thrt</samp>&rsquo;</dt>
  37909. <dd><p>4th root
  37910. </p></dd>
  37911. <dt>&lsquo;<samp>5thrt</samp>&rsquo;</dt>
  37912. <dd><p>5th root
  37913. </p></dd>
  37914. </dl>
  37915. <p>Default value is &lsquo;<samp>log</samp>&rsquo;.
  37916. </p>
  37917. </dd>
  37918. <dt>&lsquo;<samp>fscale</samp>&rsquo;</dt>
  37919. <dd><p>Specify frequency scale.
  37920. </p>
  37921. <p>It accepts the following values:
  37922. </p><dl compact="compact">
  37923. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  37924. <dd><p>linear
  37925. </p></dd>
  37926. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  37927. <dd><p>logarithmic
  37928. </p></dd>
  37929. </dl>
  37930. <p>Default value is &lsquo;<samp>lin</samp>&rsquo;.
  37931. </p>
  37932. </dd>
  37933. <dt>&lsquo;<samp>saturation</samp>&rsquo;</dt>
  37934. <dd><p>Set saturation modifier for displayed colors. Negative values provide
  37935. alternative color scheme. <code>0</code> is no saturation at all.
  37936. Saturation must be in [-10.0, 10.0] range.
  37937. Default value is <code>1</code>.
  37938. </p>
  37939. </dd>
  37940. <dt>&lsquo;<samp>win_func</samp>&rsquo;</dt>
  37941. <dd><p>Set window function.
  37942. </p>
  37943. <p>It accepts the following values:
  37944. </p><dl compact="compact">
  37945. <dt>&lsquo;<samp>rect</samp>&rsquo;</dt>
  37946. <dt>&lsquo;<samp>bartlett</samp>&rsquo;</dt>
  37947. <dt>&lsquo;<samp>hann</samp>&rsquo;</dt>
  37948. <dt>&lsquo;<samp>hanning</samp>&rsquo;</dt>
  37949. <dt>&lsquo;<samp>hamming</samp>&rsquo;</dt>
  37950. <dt>&lsquo;<samp>blackman</samp>&rsquo;</dt>
  37951. <dt>&lsquo;<samp>welch</samp>&rsquo;</dt>
  37952. <dt>&lsquo;<samp>flattop</samp>&rsquo;</dt>
  37953. <dt>&lsquo;<samp>bharris</samp>&rsquo;</dt>
  37954. <dt>&lsquo;<samp>bnuttall</samp>&rsquo;</dt>
  37955. <dt>&lsquo;<samp>bhann</samp>&rsquo;</dt>
  37956. <dt>&lsquo;<samp>sine</samp>&rsquo;</dt>
  37957. <dt>&lsquo;<samp>nuttall</samp>&rsquo;</dt>
  37958. <dt>&lsquo;<samp>lanczos</samp>&rsquo;</dt>
  37959. <dt>&lsquo;<samp>gauss</samp>&rsquo;</dt>
  37960. <dt>&lsquo;<samp>tukey</samp>&rsquo;</dt>
  37961. <dt>&lsquo;<samp>dolph</samp>&rsquo;</dt>
  37962. <dt>&lsquo;<samp>cauchy</samp>&rsquo;</dt>
  37963. <dt>&lsquo;<samp>parzen</samp>&rsquo;</dt>
  37964. <dt>&lsquo;<samp>poisson</samp>&rsquo;</dt>
  37965. <dt>&lsquo;<samp>bohman</samp>&rsquo;</dt>
  37966. </dl>
  37967. <p>Default value is <code>hann</code>.
  37968. </p>
  37969. </dd>
  37970. <dt>&lsquo;<samp>orientation</samp>&rsquo;</dt>
  37971. <dd><p>Set orientation of time vs frequency axis. Can be <code>vertical</code> or
  37972. <code>horizontal</code>. Default is <code>vertical</code>.
  37973. </p>
  37974. </dd>
  37975. <dt>&lsquo;<samp>gain</samp>&rsquo;</dt>
  37976. <dd><p>Set scale gain for calculating intensity color values.
  37977. Default value is <code>1</code>.
  37978. </p>
  37979. </dd>
  37980. <dt>&lsquo;<samp>legend</samp>&rsquo;</dt>
  37981. <dd><p>Draw time and frequency axes and legends. Default is enabled.
  37982. </p>
  37983. </dd>
  37984. <dt>&lsquo;<samp>rotation</samp>&rsquo;</dt>
  37985. <dd><p>Set color rotation, must be in [-1.0, 1.0] range.
  37986. Default value is <code>0</code>.
  37987. </p>
  37988. </dd>
  37989. <dt>&lsquo;<samp>start</samp>&rsquo;</dt>
  37990. <dd><p>Set start frequency from which to display spectrogram. Default is <code>0</code>.
  37991. </p>
  37992. </dd>
  37993. <dt>&lsquo;<samp>stop</samp>&rsquo;</dt>
  37994. <dd><p>Set stop frequency to which to display spectrogram. Default is <code>0</code>.
  37995. </p></dd>
  37996. </dl>
  37997. <a name="Examples-41"></a>
  37998. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-41">35.23.1 Examples</a></h3>
  37999. <ul>
  38000. <li>
  38001. Extract an audio spectrogram of a whole audio track
  38002. in a 1024x1024 picture using <code>ffmpeg</code>:
  38003. <div class="example">
  38004. <pre class="example">ffmpeg -i audio.flac -lavfi showspectrumpic=s=1024x1024 spectrogram.png
  38005. </pre></div>
  38006. </li></ul>
  38007. <a name="showvolume"></a>
  38008. <h2 class="section"><a href="ffplay-all.html#toc-showvolume">35.24 showvolume</a></h2>
  38009. <p>Convert input audio volume to a video output.
  38010. </p>
  38011. <p>The filter accepts the following options:
  38012. </p>
  38013. <dl compact="compact">
  38014. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  38015. <dd><p>Set video rate.
  38016. </p>
  38017. </dd>
  38018. <dt>&lsquo;<samp>b</samp>&rsquo;</dt>
  38019. <dd><p>Set border width, allowed range is [0, 5]. Default is 1.
  38020. </p>
  38021. </dd>
  38022. <dt>&lsquo;<samp>w</samp>&rsquo;</dt>
  38023. <dd><p>Set channel width, allowed range is [80, 8192]. Default is 400.
  38024. </p>
  38025. </dd>
  38026. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  38027. <dd><p>Set channel height, allowed range is [1, 900]. Default is 20.
  38028. </p>
  38029. </dd>
  38030. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  38031. <dd><p>Set fade, allowed range is [0, 1]. Default is 0.95.
  38032. </p>
  38033. </dd>
  38034. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  38035. <dd><p>Set volume color expression.
  38036. </p>
  38037. <p>The expression can use the following variables:
  38038. </p>
  38039. <dl compact="compact">
  38040. <dt>&lsquo;<samp>VOLUME</samp>&rsquo;</dt>
  38041. <dd><p>Current max volume of channel in dB.
  38042. </p>
  38043. </dd>
  38044. <dt>&lsquo;<samp>PEAK</samp>&rsquo;</dt>
  38045. <dd><p>Current peak.
  38046. </p>
  38047. </dd>
  38048. <dt>&lsquo;<samp>CHANNEL</samp>&rsquo;</dt>
  38049. <dd><p>Current channel number, starting from 0.
  38050. </p></dd>
  38051. </dl>
  38052. </dd>
  38053. <dt>&lsquo;<samp>t</samp>&rsquo;</dt>
  38054. <dd><p>If set, displays channel names. Default is enabled.
  38055. </p>
  38056. </dd>
  38057. <dt>&lsquo;<samp>v</samp>&rsquo;</dt>
  38058. <dd><p>If set, displays volume values. Default is enabled.
  38059. </p>
  38060. </dd>
  38061. <dt>&lsquo;<samp>o</samp>&rsquo;</dt>
  38062. <dd><p>Set orientation, can be horizontal: <code>h</code> or vertical: <code>v</code>,
  38063. default is <code>h</code>.
  38064. </p>
  38065. </dd>
  38066. <dt>&lsquo;<samp>s</samp>&rsquo;</dt>
  38067. <dd><p>Set step size, allowed range is [0, 5]. Default is 0, which means
  38068. step is disabled.
  38069. </p>
  38070. </dd>
  38071. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  38072. <dd><p>Set background opacity, allowed range is [0, 1]. Default is 0.
  38073. </p>
  38074. </dd>
  38075. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  38076. <dd><p>Set metering mode, can be peak: <code>p</code> or rms: <code>r</code>,
  38077. default is <code>p</code>.
  38078. </p>
  38079. </dd>
  38080. <dt>&lsquo;<samp>ds</samp>&rsquo;</dt>
  38081. <dd><p>Set display scale, can be linear: <code>lin</code> or log: <code>log</code>,
  38082. default is <code>lin</code>.
  38083. </p>
  38084. </dd>
  38085. <dt>&lsquo;<samp>dm</samp>&rsquo;</dt>
  38086. <dd><p>In second.
  38087. If set to &gt; 0., display a line for the max level
  38088. in the previous seconds.
  38089. default is disabled: <code>0.</code>
  38090. </p>
  38091. </dd>
  38092. <dt>&lsquo;<samp>dmc</samp>&rsquo;</dt>
  38093. <dd><p>The color of the max line. Use when <code>dm</code> option is set to &gt; 0.
  38094. default is: <code>orange</code>
  38095. </p></dd>
  38096. </dl>
  38097. <a name="showwaves"></a>
  38098. <h2 class="section"><a href="ffplay-all.html#toc-showwaves">35.25 showwaves</a></h2>
  38099. <p>Convert input audio to a video output, representing the samples waves.
  38100. </p>
  38101. <p>The filter accepts the following options:
  38102. </p>
  38103. <dl compact="compact">
  38104. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  38105. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  38106. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  38107. Default value is <code>600x240</code>.
  38108. </p>
  38109. </dd>
  38110. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  38111. <dd><p>Set display mode.
  38112. </p>
  38113. <p>Available values are:
  38114. </p><dl compact="compact">
  38115. <dt>&lsquo;<samp>point</samp>&rsquo;</dt>
  38116. <dd><p>Draw a point for each sample.
  38117. </p>
  38118. </dd>
  38119. <dt>&lsquo;<samp>line</samp>&rsquo;</dt>
  38120. <dd><p>Draw a vertical line for each sample.
  38121. </p>
  38122. </dd>
  38123. <dt>&lsquo;<samp>p2p</samp>&rsquo;</dt>
  38124. <dd><p>Draw a point for each sample and a line between them.
  38125. </p>
  38126. </dd>
  38127. <dt>&lsquo;<samp>cline</samp>&rsquo;</dt>
  38128. <dd><p>Draw a centered vertical line for each sample.
  38129. </p></dd>
  38130. </dl>
  38131. <p>Default value is <code>point</code>.
  38132. </p>
  38133. </dd>
  38134. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  38135. <dd><p>Set the number of samples which are printed on the same column. A
  38136. larger value will decrease the frame rate. Must be a positive
  38137. integer. This option can be set only if the value for <var>rate</var>
  38138. is not explicitly specified.
  38139. </p>
  38140. </dd>
  38141. <dt>&lsquo;<samp>rate, r</samp>&rsquo;</dt>
  38142. <dd><p>Set the (approximate) output frame rate. This is done by setting the
  38143. option <var>n</var>. Default value is &quot;25&quot;.
  38144. </p>
  38145. </dd>
  38146. <dt>&lsquo;<samp>split_channels</samp>&rsquo;</dt>
  38147. <dd><p>Set if channels should be drawn separately or overlap. Default value is 0.
  38148. </p>
  38149. </dd>
  38150. <dt>&lsquo;<samp>colors</samp>&rsquo;</dt>
  38151. <dd><p>Set colors separated by &rsquo;|&rsquo; which are going to be used for drawing of each channel.
  38152. </p>
  38153. </dd>
  38154. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  38155. <dd><p>Set amplitude scale.
  38156. </p>
  38157. <p>Available values are:
  38158. </p><dl compact="compact">
  38159. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  38160. <dd><p>Linear.
  38161. </p>
  38162. </dd>
  38163. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  38164. <dd><p>Logarithmic.
  38165. </p>
  38166. </dd>
  38167. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  38168. <dd><p>Square root.
  38169. </p>
  38170. </dd>
  38171. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  38172. <dd><p>Cubic root.
  38173. </p></dd>
  38174. </dl>
  38175. <p>Default is linear.
  38176. </p>
  38177. </dd>
  38178. <dt>&lsquo;<samp>draw</samp>&rsquo;</dt>
  38179. <dd><p>Set the draw mode. This is mostly useful to set for high <var>n</var>.
  38180. </p>
  38181. <p>Available values are:
  38182. </p><dl compact="compact">
  38183. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  38184. <dd><p>Scale pixel values for each drawn sample.
  38185. </p>
  38186. </dd>
  38187. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  38188. <dd><p>Draw every sample directly.
  38189. </p></dd>
  38190. </dl>
  38191. <p>Default value is <code>scale</code>.
  38192. </p></dd>
  38193. </dl>
  38194. <a name="Examples-93"></a>
  38195. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-93">35.25.1 Examples</a></h3>
  38196. <ul>
  38197. <li>
  38198. Output the input file audio and the corresponding video representation
  38199. at the same time:
  38200. <div class="example">
  38201. <pre class="example">amovie=a.mp3,asplit[out0],showwaves[out1]
  38202. </pre></div>
  38203. </li><li>
  38204. Create a synthetic signal and show it with showwaves, forcing a
  38205. frame rate of 30 frames per second:
  38206. <div class="example">
  38207. <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]
  38208. </pre></div>
  38209. </li></ul>
  38210. <a name="showwavespic"></a>
  38211. <h2 class="section"><a href="ffplay-all.html#toc-showwavespic">35.26 showwavespic</a></h2>
  38212. <p>Convert input audio to a single video frame, representing the samples waves.
  38213. </p>
  38214. <p>The filter accepts the following options:
  38215. </p>
  38216. <dl compact="compact">
  38217. <dt>&lsquo;<samp>size, s</samp>&rsquo;</dt>
  38218. <dd><p>Specify the video size for the output. For the syntax of this option, check the
  38219. <a href="ffmpeg-utils.html#video-size-syntax">(ffmpeg-utils)&quot;Video size&quot; section in the ffmpeg-utils manual</a>.
  38220. Default value is <code>600x240</code>.
  38221. </p>
  38222. </dd>
  38223. <dt>&lsquo;<samp>split_channels</samp>&rsquo;</dt>
  38224. <dd><p>Set if channels should be drawn separately or overlap. Default value is 0.
  38225. </p>
  38226. </dd>
  38227. <dt>&lsquo;<samp>colors</samp>&rsquo;</dt>
  38228. <dd><p>Set colors separated by &rsquo;|&rsquo; which are going to be used for drawing of each channel.
  38229. </p>
  38230. </dd>
  38231. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  38232. <dd><p>Set amplitude scale.
  38233. </p>
  38234. <p>Available values are:
  38235. </p><dl compact="compact">
  38236. <dt>&lsquo;<samp>lin</samp>&rsquo;</dt>
  38237. <dd><p>Linear.
  38238. </p>
  38239. </dd>
  38240. <dt>&lsquo;<samp>log</samp>&rsquo;</dt>
  38241. <dd><p>Logarithmic.
  38242. </p>
  38243. </dd>
  38244. <dt>&lsquo;<samp>sqrt</samp>&rsquo;</dt>
  38245. <dd><p>Square root.
  38246. </p>
  38247. </dd>
  38248. <dt>&lsquo;<samp>cbrt</samp>&rsquo;</dt>
  38249. <dd><p>Cubic root.
  38250. </p></dd>
  38251. </dl>
  38252. <p>Default is linear.
  38253. </p>
  38254. </dd>
  38255. <dt>&lsquo;<samp>draw</samp>&rsquo;</dt>
  38256. <dd><p>Set the draw mode.
  38257. </p>
  38258. <p>Available values are:
  38259. </p><dl compact="compact">
  38260. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  38261. <dd><p>Scale pixel values for each drawn sample.
  38262. </p>
  38263. </dd>
  38264. <dt>&lsquo;<samp>full</samp>&rsquo;</dt>
  38265. <dd><p>Draw every sample directly.
  38266. </p></dd>
  38267. </dl>
  38268. <p>Default value is <code>scale</code>.
  38269. </p></dd>
  38270. </dl>
  38271. <a name="Examples-122"></a>
  38272. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-122">35.26.1 Examples</a></h3>
  38273. <ul>
  38274. <li>
  38275. Extract a channel split representation of the wave form of a whole audio track
  38276. in a 1024x800 picture using <code>ffmpeg</code>:
  38277. <div class="example">
  38278. <pre class="example">ffmpeg -i audio.flac -lavfi showwavespic=split_channels=1:s=1024x800 waveform.png
  38279. </pre></div>
  38280. </li></ul>
  38281. <a name="sidedata_002c-asidedata"></a>
  38282. <h2 class="section"><a href="ffplay-all.html#toc-sidedata_002c-asidedata">35.27 sidedata, asidedata</a></h2>
  38283. <p>Delete frame side data, or select frames based on it.
  38284. </p>
  38285. <p>This filter accepts the following options:
  38286. </p>
  38287. <dl compact="compact">
  38288. <dt>&lsquo;<samp>mode</samp>&rsquo;</dt>
  38289. <dd><p>Set mode of operation of the filter.
  38290. </p>
  38291. <p>Can be one of the following:
  38292. </p>
  38293. <dl compact="compact">
  38294. <dt>&lsquo;<samp>select</samp>&rsquo;</dt>
  38295. <dd><p>Select every frame with side data of <code>type</code>.
  38296. </p>
  38297. </dd>
  38298. <dt>&lsquo;<samp>delete</samp>&rsquo;</dt>
  38299. <dd><p>Delete side data of <code>type</code>. If <code>type</code> is not set, delete all side
  38300. data in the frame.
  38301. </p>
  38302. </dd>
  38303. </dl>
  38304. </dd>
  38305. <dt>&lsquo;<samp>type</samp>&rsquo;</dt>
  38306. <dd><p>Set side data type used with all modes. Must be set for <code>select</code> mode. For
  38307. the list of frame side data types, refer to the <code>AVFrameSideDataType</code> enum
  38308. in &lsquo;<tt>libavutil/frame.h</tt>&rsquo;. For example, to choose
  38309. <code>AV_FRAME_DATA_PANSCAN</code> side data, you must specify <code>PANSCAN</code>.
  38310. </p>
  38311. </dd>
  38312. </dl>
  38313. <a name="spectrumsynth"></a>
  38314. <h2 class="section"><a href="ffplay-all.html#toc-spectrumsynth">35.28 spectrumsynth</a></h2>
  38315. <p>Synthesize audio from 2 input video spectrums, first input stream represents
  38316. magnitude across time and second represents phase across time.
  38317. The filter will transform from frequency domain as displayed in videos back
  38318. to time domain as presented in audio output.
  38319. </p>
  38320. <p>This filter is primarily created for reversing processed <a href="#showspectrum">showspectrum</a>
  38321. filter outputs, but can synthesize sound from other spectrograms too.
  38322. But in such case results are going to be poor if the phase data is not
  38323. available, because in such cases phase data need to be recreated, usually
  38324. it&rsquo;s just recreated from random noise.
  38325. For best results use gray only output (<code>channel</code> color mode in
  38326. <a href="#showspectrum">showspectrum</a> filter) and <code>log</code> scale for magnitude video and
  38327. <code>lin</code> scale for phase video. To produce phase, for 2nd video, use
  38328. <code>data</code> option. Inputs videos should generally use <code>fullframe</code>
  38329. slide mode as that saves resources needed for decoding video.
  38330. </p>
  38331. <p>The filter accepts the following options:
  38332. </p>
  38333. <dl compact="compact">
  38334. <dt>&lsquo;<samp>sample_rate</samp>&rsquo;</dt>
  38335. <dd><p>Specify sample rate of output audio, the sample rate of audio from which
  38336. spectrum was generated may differ.
  38337. </p>
  38338. </dd>
  38339. <dt>&lsquo;<samp>channels</samp>&rsquo;</dt>
  38340. <dd><p>Set number of channels represented in input video spectrums.
  38341. </p>
  38342. </dd>
  38343. <dt>&lsquo;<samp>scale</samp>&rsquo;</dt>
  38344. <dd><p>Set scale which was used when generating magnitude input spectrum.
  38345. Can be <code>lin</code> or <code>log</code>. Default is <code>log</code>.
  38346. </p>
  38347. </dd>
  38348. <dt>&lsquo;<samp>slide</samp>&rsquo;</dt>
  38349. <dd><p>Set slide which was used when generating inputs spectrums.
  38350. Can be <code>replace</code>, <code>scroll</code>, <code>fullframe</code> or <code>rscroll</code>.
  38351. Default is <code>fullframe</code>.
  38352. </p>
  38353. </dd>
  38354. <dt>&lsquo;<samp>win_func</samp>&rsquo;</dt>
  38355. <dd><p>Set window function used for resynthesis.
  38356. </p>
  38357. </dd>
  38358. <dt>&lsquo;<samp>overlap</samp>&rsquo;</dt>
  38359. <dd><p>Set window overlap. In range <code>[0, 1]</code>. Default is <code>1</code>,
  38360. which means optimal overlap for selected window function will be picked.
  38361. </p>
  38362. </dd>
  38363. <dt>&lsquo;<samp>orientation</samp>&rsquo;</dt>
  38364. <dd><p>Set orientation of input videos. Can be <code>vertical</code> or <code>horizontal</code>.
  38365. Default is <code>vertical</code>.
  38366. </p></dd>
  38367. </dl>
  38368. <a name="Examples-52"></a>
  38369. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-52">35.28.1 Examples</a></h3>
  38370. <ul>
  38371. <li>
  38372. First create magnitude and phase videos from audio, assuming audio is stereo with 44100 sample rate,
  38373. then resynthesize videos back to audio with spectrumsynth:
  38374. <div class="example">
  38375. <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
  38376. 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
  38377. ffmpeg -i magnitude.nut -i phase.nut -lavfi spectrumsynth=channels=2:sample_rate=44100:win_func=hann:overlap=0.875:slide=fullframe output.flac
  38378. </pre></div>
  38379. </li></ul>
  38380. <a name="split_002c-asplit"></a>
  38381. <h2 class="section"><a href="ffplay-all.html#toc-split_002c-asplit">35.29 split, asplit</a></h2>
  38382. <p>Split input into several identical outputs.
  38383. </p>
  38384. <p><code>asplit</code> works with audio input, <code>split</code> with video.
  38385. </p>
  38386. <p>The filter accepts a single parameter which specifies the number of outputs. If
  38387. unspecified, it defaults to 2.
  38388. </p>
  38389. <a name="Examples-22"></a>
  38390. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-22">35.29.1 Examples</a></h3>
  38391. <ul>
  38392. <li>
  38393. Create two separate outputs from the same input:
  38394. <div class="example">
  38395. <pre class="example">[in] split [out0][out1]
  38396. </pre></div>
  38397. </li><li>
  38398. To create 3 or more outputs, you need to specify the number of
  38399. outputs, like in:
  38400. <div class="example">
  38401. <pre class="example">[in] asplit=3 [out0][out1][out2]
  38402. </pre></div>
  38403. </li><li>
  38404. Create two separate outputs from the same input, one cropped and
  38405. one padded:
  38406. <div class="example">
  38407. <pre class="example">[in] split [splitout1][splitout2];
  38408. [splitout1] crop=100:100:0:0 [cropout];
  38409. [splitout2] pad=200:200:100:100 [padout];
  38410. </pre></div>
  38411. </li><li>
  38412. Create 5 copies of the input audio with <code>ffmpeg</code>:
  38413. <div class="example">
  38414. <pre class="example">ffmpeg -i INPUT -filter_complex asplit=5 OUTPUT
  38415. </pre></div>
  38416. </li></ul>
  38417. <a name="zmq_002c-azmq"></a>
  38418. <h2 class="section"><a href="ffplay-all.html#toc-zmq_002c-azmq">35.30 zmq, azmq</a></h2>
  38419. <p>Receive commands sent through a libzmq client, and forward them to
  38420. filters in the filtergraph.
  38421. </p>
  38422. <p><code>zmq</code> and <code>azmq</code> work as a pass-through filters. <code>zmq</code>
  38423. must be inserted between two video filters, <code>azmq</code> between two
  38424. audio filters. Both are capable to send messages to any filter type.
  38425. </p>
  38426. <p>To enable these filters you need to install the libzmq library and
  38427. headers and configure FFmpeg with <code>--enable-libzmq</code>.
  38428. </p>
  38429. <p>For more information about libzmq see:
  38430. <a href="http://www.zeromq.org/">http://www.zeromq.org/</a>
  38431. </p>
  38432. <p>The <code>zmq</code> and <code>azmq</code> filters work as a libzmq server, which
  38433. receives messages sent through a network interface defined by the
  38434. &lsquo;<samp>bind_address</samp>&rsquo; (or the abbreviation &quot;&lsquo;<samp>b</samp>&rsquo;&quot;) option.
  38435. Default value of this option is &lsquo;<tt>tcp://localhost:5555</tt>&rsquo;. You may
  38436. want to alter this value to your needs, but do not forget to escape any
  38437. &rsquo;:&rsquo; signs (see <a href="#filtergraph-escaping">filtergraph escaping</a>).
  38438. </p>
  38439. <p>The received message must be in the form:
  38440. </p><div class="example">
  38441. <pre class="example"><var>TARGET</var> <var>COMMAND</var> [<var>ARG</var>]
  38442. </pre></div>
  38443. <p><var>TARGET</var> specifies the target of the command, usually the name of
  38444. the filter class or a specific filter instance name. The default
  38445. filter instance name uses the pattern &lsquo;<samp>Parsed_&lt;filter_name&gt;_&lt;index&gt;</samp>&rsquo;,
  38446. but you can override this by using the &lsquo;<samp>filter_name@id</samp>&rsquo; syntax
  38447. (see <a href="#Filtergraph-syntax">Filtergraph syntax</a>).
  38448. </p>
  38449. <p><var>COMMAND</var> specifies the name of the command for the target filter.
  38450. </p>
  38451. <p><var>ARG</var> is optional and specifies the optional argument list for the
  38452. given <var>COMMAND</var>.
  38453. </p>
  38454. <p>Upon reception, the message is processed and the corresponding command
  38455. is injected into the filtergraph. Depending on the result, the filter
  38456. will send a reply to the client, adopting the format:
  38457. </p><div class="example">
  38458. <pre class="example"><var>ERROR_CODE</var> <var>ERROR_REASON</var>
  38459. <var>MESSAGE</var>
  38460. </pre></div>
  38461. <p><var>MESSAGE</var> is optional.
  38462. </p>
  38463. <a name="Examples-36"></a>
  38464. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-36">35.30.1 Examples</a></h3>
  38465. <p>Look at &lsquo;<tt>tools/zmqsend</tt>&rsquo; for an example of a zmq client which can
  38466. be used to send commands processed by these filters.
  38467. </p>
  38468. <p>Consider the following filtergraph generated by <code>ffplay</code>.
  38469. In this example the last overlay filter has an instance name. All other
  38470. filters will have default instance names.
  38471. </p>
  38472. <div class="example">
  38473. <pre class="example">ffplay -dumpgraph 1 -f lavfi &quot;
  38474. color=s=100x100:c=red [l];
  38475. color=s=100x100:c=blue [r];
  38476. nullsrc=s=200x100, zmq [bg];
  38477. [bg][l] overlay [bg+l];
  38478. [bg+l][r] overlay@my=x=100 &quot;
  38479. </pre></div>
  38480. <p>To change the color of the left side of the video, the following
  38481. command can be used:
  38482. </p><div class="example">
  38483. <pre class="example">echo Parsed_color_0 c yellow | tools/zmqsend
  38484. </pre></div>
  38485. <p>To change the right side:
  38486. </p><div class="example">
  38487. <pre class="example">echo Parsed_color_1 c pink | tools/zmqsend
  38488. </pre></div>
  38489. <p>To change the position of the right side:
  38490. </p><div class="example">
  38491. <pre class="example">echo overlay@my x 150 | tools/zmqsend
  38492. </pre></div>
  38493. <a name="Multimedia-Sources"></a>
  38494. <h1 class="chapter"><a href="ffplay-all.html#toc-Multimedia-Sources">36 Multimedia Sources</a></h1>
  38495. <p>Below is a description of the currently available multimedia sources.
  38496. </p>
  38497. <a name="amovie"></a>
  38498. <h2 class="section"><a href="ffplay-all.html#toc-amovie">36.1 amovie</a></h2>
  38499. <p>This is the same as <a href="#movie">movie</a> source, except it selects an audio
  38500. stream by default.
  38501. </p>
  38502. <p><a name="movie"></a>
  38503. </p><a name="movie-1"></a>
  38504. <h2 class="section"><a href="ffplay-all.html#toc-movie-1">36.2 movie</a></h2>
  38505. <p>Read audio and/or video stream(s) from a movie container.
  38506. </p>
  38507. <p>It accepts the following parameters:
  38508. </p>
  38509. <dl compact="compact">
  38510. <dt>&lsquo;<samp>filename</samp>&rsquo;</dt>
  38511. <dd><p>The name of the resource to read (not necessarily a file; it can also be a
  38512. device or a stream accessed through some protocol).
  38513. </p>
  38514. </dd>
  38515. <dt>&lsquo;<samp>format_name, f</samp>&rsquo;</dt>
  38516. <dd><p>Specifies the format assumed for the movie to read, and can be either
  38517. the name of a container or an input device. If not specified, the
  38518. format is guessed from <var>movie_name</var> or by probing.
  38519. </p>
  38520. </dd>
  38521. <dt>&lsquo;<samp>seek_point, sp</samp>&rsquo;</dt>
  38522. <dd><p>Specifies the seek point in seconds. The frames will be output
  38523. starting from this seek point. The parameter is evaluated with
  38524. <code>av_strtod</code>, so the numerical value may be suffixed by an IS
  38525. postfix. The default value is &quot;0&quot;.
  38526. </p>
  38527. </dd>
  38528. <dt>&lsquo;<samp>streams, s</samp>&rsquo;</dt>
  38529. <dd><p>Specifies the streams to read. Several streams can be specified,
  38530. separated by &quot;+&quot;. The source will then have as many outputs, in the
  38531. same order. The syntax is explained in the <a href="ffmpeg.html#Stream-specifiers">(ffmpeg)&quot;Stream specifiers&quot; section in the ffmpeg manual</a>. Two special names, &quot;dv&quot; and &quot;da&quot; specify
  38532. respectively the default (best suited) video and audio stream. Default
  38533. is &quot;dv&quot;, or &quot;da&quot; if the filter is called as &quot;amovie&quot;.
  38534. </p>
  38535. </dd>
  38536. <dt>&lsquo;<samp>stream_index, si</samp>&rsquo;</dt>
  38537. <dd><p>Specifies the index of the video stream to read. If the value is -1,
  38538. the most suitable video stream will be automatically selected. The default
  38539. value is &quot;-1&quot;. Deprecated. If the filter is called &quot;amovie&quot;, it will select
  38540. audio instead of video.
  38541. </p>
  38542. </dd>
  38543. <dt>&lsquo;<samp>loop</samp>&rsquo;</dt>
  38544. <dd><p>Specifies how many times to read the stream in sequence.
  38545. If the value is 0, the stream will be looped infinitely.
  38546. Default value is &quot;1&quot;.
  38547. </p>
  38548. <p>Note that when the movie is looped the source timestamps are not
  38549. changed, so it will generate non monotonically increasing timestamps.
  38550. </p>
  38551. </dd>
  38552. <dt>&lsquo;<samp>discontinuity</samp>&rsquo;</dt>
  38553. <dd><p>Specifies the time difference between frames above which the point is
  38554. considered a timestamp discontinuity which is removed by adjusting the later
  38555. timestamps.
  38556. </p></dd>
  38557. </dl>
  38558. <p>It allows overlaying a second video on top of the main input of
  38559. a filtergraph, as shown in this graph:
  38560. </p><div class="example">
  38561. <pre class="example">input -----------&gt; deltapts0 --&gt; overlay --&gt; output
  38562. ^
  38563. |
  38564. movie --&gt; scale--&gt; deltapts1 -------+
  38565. </pre></div>
  38566. <a name="Examples-157"></a>
  38567. <h3 class="subsection"><a href="ffplay-all.html#toc-Examples-157">36.2.1 Examples</a></h3>
  38568. <ul>
  38569. <li>
  38570. Skip 3.2 seconds from the start of the AVI file in.avi, and overlay it
  38571. on top of the input labelled &quot;in&quot;:
  38572. <div class="example">
  38573. <pre class="example">movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [over];
  38574. [in] setpts=PTS-STARTPTS [main];
  38575. [main][over] overlay=16:16 [out]
  38576. </pre></div>
  38577. </li><li>
  38578. Read from a video4linux2 device, and overlay it on top of the input
  38579. labelled &quot;in&quot;:
  38580. <div class="example">
  38581. <pre class="example">movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [over];
  38582. [in] setpts=PTS-STARTPTS [main];
  38583. [main][over] overlay=16:16 [out]
  38584. </pre></div>
  38585. </li><li>
  38586. Read the first video stream and the audio stream with id 0x81 from
  38587. dvd.vob; the video is connected to the pad named &quot;video&quot; and the audio is
  38588. connected to the pad named &quot;audio&quot;:
  38589. <div class="example">
  38590. <pre class="example">movie=dvd.vob:s=v:0+#0x81 [video] [audio]
  38591. </pre></div>
  38592. </li></ul>
  38593. <a name="Commands-22"></a>
  38594. <h3 class="subsection"><a href="ffplay-all.html#toc-Commands-22">36.2.2 Commands</a></h3>
  38595. <p>Both movie and amovie support the following commands:
  38596. </p><dl compact="compact">
  38597. <dt>&lsquo;<samp>seek</samp>&rsquo;</dt>
  38598. <dd><p>Perform seek using &quot;av_seek_frame&quot;.
  38599. The syntax is: seek <var>stream_index</var>|<var>timestamp</var>|<var>flags</var>
  38600. </p><ul>
  38601. <li>
  38602. <var>stream_index</var>: If stream_index is -1, a default
  38603. stream is selected, and <var>timestamp</var> is automatically converted
  38604. from AV_TIME_BASE units to the stream specific time_base.
  38605. </li><li>
  38606. <var>timestamp</var>: Timestamp in AVStream.time_base units
  38607. or, if no stream is specified, in AV_TIME_BASE units.
  38608. </li><li>
  38609. <var>flags</var>: Flags which select direction and seeking mode.
  38610. </li></ul>
  38611. </dd>
  38612. <dt>&lsquo;<samp>get_duration</samp>&rsquo;</dt>
  38613. <dd><p>Get movie duration in AV_TIME_BASE units.
  38614. </p>
  38615. </dd>
  38616. </dl>
  38617. <a name="See-Also"></a>
  38618. <h1 class="chapter"><a href="ffplay-all.html#toc-See-Also">37 See Also</a></h1>
  38619. <p><a href="ffplay.html">ffplay</a>,
  38620. <a href="ffmpeg.html">ffmpeg</a>, <a href="ffprobe.html">ffprobe</a>,
  38621. <a href="ffmpeg-utils.html">ffmpeg-utils</a>,
  38622. <a href="ffmpeg-scaler.html">ffmpeg-scaler</a>,
  38623. <a href="ffmpeg-resampler.html">ffmpeg-resampler</a>,
  38624. <a href="ffmpeg-codecs.html">ffmpeg-codecs</a>,
  38625. <a href="ffmpeg-bitstream-filters.html">ffmpeg-bitstream-filters</a>,
  38626. <a href="ffmpeg-formats.html">ffmpeg-formats</a>,
  38627. <a href="ffmpeg-devices.html">ffmpeg-devices</a>,
  38628. <a href="ffmpeg-protocols.html">ffmpeg-protocols</a>,
  38629. <a href="ffmpeg-filters.html">ffmpeg-filters</a>
  38630. </p>
  38631. <a name="Authors"></a>
  38632. <h1 class="chapter"><a href="ffplay-all.html#toc-Authors">38 Authors</a></h1>
  38633. <p>The FFmpeg developers.
  38634. </p>
  38635. <p>For details about the authorship, see the Git history of the project
  38636. (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
  38637. <code>git log</code> in the FFmpeg source directory, or browsing the
  38638. online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
  38639. </p>
  38640. <p>Maintainers for the specific components are listed in the file
  38641. &lsquo;<tt>MAINTAINERS</tt>&rsquo; in the source code tree.
  38642. </p>
  38643. </div>
  38644. </body>
  38645. </html>