| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Created by , GNU Texinfo 7.1 -->
- <head>
- <meta charset="utf-8">
- <title>
- FFmpeg Utilities Documentation
- </title>
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
- <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
- <link rel="stylesheet" type="text/css" href="style.min.css">
- </head>
- <body>
- <div class="container">
- <h1>
- FFmpeg Utilities Documentation
- </h1>
- <div class="top-level-extent" id="SEC_Top">
- <div class="element-contents" id="SEC_Contents">
- <h2 class="contents-heading">Table of Contents</h2>
- <div class="contents">
- <ul class="toc-numbered-mark">
- <li><a id="toc-Description" href="#Description">1 Description</a></li>
- <li><a id="toc-Syntax" href="#Syntax">2 Syntax</a>
- <ul class="toc-numbered-mark">
- <li><a id="toc-Quoting-and-escaping" href="#Quoting-and-escaping">2.1 Quoting and escaping</a>
- <ul class="toc-numbered-mark">
- <li><a id="toc-Examples" href="#Examples">2.1.1 Examples</a></li>
- </ul></li>
- <li><a id="toc-Date" href="#Date">2.2 Date</a></li>
- <li><a id="toc-Time-duration" href="#Time-duration">2.3 Time duration</a>
- <ul class="toc-numbered-mark">
- <li><a id="toc-Examples-1" href="#Examples-1">2.3.1 Examples</a></li>
- </ul></li>
- <li><a id="toc-Video-size" href="#Video-size">2.4 Video size</a></li>
- <li><a id="toc-Video-rate" href="#Video-rate">2.5 Video rate</a></li>
- <li><a id="toc-Ratio" href="#Ratio">2.6 Ratio</a></li>
- <li><a id="toc-Color" href="#Color">2.7 Color</a></li>
- <li><a id="toc-Channel-Layout" href="#Channel-Layout">2.8 Channel Layout</a></li>
- </ul></li>
- <li><a id="toc-Expression-Evaluation" href="#Expression-Evaluation">3 Expression Evaluation</a></li>
- <li><a id="toc-See-Also" href="#See-Also">4 See Also</a></li>
- <li><a id="toc-Authors" href="#Authors">5 Authors</a></li>
- </ul>
- </div>
- </div>
- <ul class="mini-toc">
- <li><a href="#Description" accesskey="1">Description</a></li>
- <li><a href="#Syntax" accesskey="2">Syntax</a></li>
- <li><a href="#Expression-Evaluation" accesskey="3">Expression Evaluation</a></li>
- <li><a href="#See-Also" accesskey="4">See Also</a></li>
- <li><a href="#Authors" accesskey="5">Authors</a></li>
- </ul>
- <div class="chapter-level-extent" id="Description">
- <h2 class="chapter"><span>1 Description<a class="copiable-link" href="#Description"> ¶</a></span></h2>
- <p>This document describes some generic features and utilities provided
- by the libavutil library.
- </p>
- </div>
- <div class="chapter-level-extent" id="Syntax">
- <h2 class="chapter"><span>2 Syntax<a class="copiable-link" href="#Syntax"> ¶</a></span></h2>
- <p>This section documents the syntax and formats employed by the FFmpeg
- libraries and tools.
- </p>
- <a class="anchor" id="quoting_005fand_005fescaping"></a><ul class="mini-toc">
- <li><a href="#Quoting-and-escaping" accesskey="1">Quoting and escaping</a></li>
- <li><a href="#Date" accesskey="2">Date</a></li>
- <li><a href="#Time-duration" accesskey="3">Time duration</a></li>
- <li><a href="#Video-size" accesskey="4">Video size</a></li>
- <li><a href="#Video-rate" accesskey="5">Video rate</a></li>
- <li><a href="#Ratio" accesskey="6">Ratio</a></li>
- <li><a href="#Color" accesskey="7">Color</a></li>
- <li><a href="#Channel-Layout" accesskey="8">Channel Layout</a></li>
- </ul>
- <div class="section-level-extent" id="Quoting-and-escaping">
- <h3 class="section"><span>2.1 Quoting and escaping<a class="copiable-link" href="#Quoting-and-escaping"> ¶</a></span></h3>
- <p>FFmpeg adopts the following quoting and escaping mechanism, unless
- explicitly specified. The following rules are applied:
- </p>
- <ul class="itemize mark-bullet">
- <li>‘<samp class="samp">'</samp>’ and ‘<samp class="samp">\</samp>’ are special characters (respectively used for
- quoting and escaping). In addition to them, there might be other
- special characters depending on the specific syntax where the escaping
- and quoting are employed.
- </li><li>A special character is escaped by prefixing it with a ‘<samp class="samp">\</samp>’.
- </li><li>All characters enclosed between ‘<samp class="samp">''</samp>’ are included literally in the
- parsed string. The quote character ‘<samp class="samp">'</samp>’ itself cannot be quoted,
- so you may need to close the quote and escape it.
- </li><li>Leading and trailing whitespaces, unless escaped or quoted, are
- removed from the parsed string.
- </li></ul>
- <p>Note that you may need to add a second level of escaping when using
- the command line or a script, which depends on the syntax of the
- adopted shell language.
- </p>
- <p>The function <code class="code">av_get_token</code> defined in
- <samp class="file">libavutil/avstring.h</samp> can be used to parse a token quoted or
- escaped according to the rules defined above.
- </p>
- <p>The tool <samp class="file">tools/ffescape</samp> in the FFmpeg source tree can be used
- to automatically quote or escape a string in a script.
- </p>
- <ul class="mini-toc">
- <li><a href="#Examples" accesskey="1">Examples</a></li>
- </ul>
- <div class="subsection-level-extent" id="Examples">
- <h4 class="subsection"><span>2.1.1 Examples<a class="copiable-link" href="#Examples"> ¶</a></span></h4>
- <ul class="itemize mark-bullet">
- <li>Escape the string <code class="code">Crime d'Amour</code> containing the <code class="code">'</code> special
- character:
- <div class="example">
- <pre class="example-preformatted">Crime d\'Amour
- </pre></div>
- </li><li>The string above contains a quote, so the <code class="code">'</code> needs to be escaped
- when quoting it:
- <div class="example">
- <pre class="example-preformatted">'Crime d'\''Amour'
- </pre></div>
- </li><li>Include leading or trailing whitespaces using quoting:
- <div class="example">
- <pre class="example-preformatted">' this string starts and ends with whitespaces '
- </pre></div>
- </li><li>Escaping and quoting can be mixed together:
- <div class="example">
- <pre class="example-preformatted">' The string '\'string\'' is a string '
- </pre></div>
- </li><li>To include a literal ‘<samp class="samp">\</samp>’ you can use either escaping or quoting:
- <div class="example">
- <pre class="example-preformatted">'c:\foo' can be written as c:\\foo
- </pre></div>
- </li></ul>
- <a class="anchor" id="date-syntax"></a></div>
- </div>
- <div class="section-level-extent" id="Date">
- <h3 class="section"><span>2.2 Date<a class="copiable-link" href="#Date"> ¶</a></span></h3>
- <p>The accepted syntax is:
- </p><div class="example">
- <pre class="example-preformatted">[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
- now
- </pre></div>
- <p>If the value is "now" it takes the current time.
- </p>
- <p>Time is local time unless Z is appended, in which case it is
- interpreted as UTC.
- If the year-month-day part is not specified it takes the current
- year-month-day.
- </p>
- <a class="anchor" id="time-duration-syntax"></a></div>
- <div class="section-level-extent" id="Time-duration">
- <h3 class="section"><span>2.3 Time duration<a class="copiable-link" href="#Time-duration"> ¶</a></span></h3>
- <p>There are two accepted syntaxes for expressing time duration.
- </p>
- <div class="example">
- <pre class="example-preformatted">[-][<var class="var">HH</var>:]<var class="var">MM</var>:<var class="var">SS</var>[.<var class="var">m</var>...]
- </pre></div>
- <p><var class="var">HH</var> expresses the number of hours, <var class="var">MM</var> the number of minutes
- for a maximum of 2 digits, and <var class="var">SS</var> the number of seconds for a
- maximum of 2 digits. The <var class="var">m</var> at the end expresses decimal value for
- <var class="var">SS</var>.
- </p>
- <p><em class="emph">or</em>
- </p>
- <div class="example">
- <pre class="example-preformatted">[-]<var class="var">S</var>+[.<var class="var">m</var>...][s|ms|us]
- </pre></div>
- <p><var class="var">S</var> expresses the number of seconds, with the optional decimal part
- <var class="var">m</var>. The optional literal suffixes ‘<samp class="samp">s</samp>’, ‘<samp class="samp">ms</samp>’ or ‘<samp class="samp">us</samp>’
- indicate to interpret the value as seconds, milliseconds or microseconds,
- respectively.
- </p>
- <p>In both expressions, the optional ‘<samp class="samp">-</samp>’ indicates negative duration.
- </p>
- <ul class="mini-toc">
- <li><a href="#Examples-1" accesskey="1">Examples</a></li>
- </ul>
- <div class="subsection-level-extent" id="Examples-1">
- <h4 class="subsection"><span>2.3.1 Examples<a class="copiable-link" href="#Examples-1"> ¶</a></span></h4>
- <p>The following examples are all valid time duration:
- </p>
- <dl class="table">
- <dt>‘<samp class="samp">55</samp>’</dt>
- <dd><p>55 seconds
- </p>
- </dd>
- <dt>‘<samp class="samp">0.2</samp>’</dt>
- <dd><p>0.2 seconds
- </p>
- </dd>
- <dt>‘<samp class="samp">200ms</samp>’</dt>
- <dd><p>200 milliseconds, that’s 0.2s
- </p>
- </dd>
- <dt>‘<samp class="samp">200000us</samp>’</dt>
- <dd><p>200000 microseconds, that’s 0.2s
- </p>
- </dd>
- <dt>‘<samp class="samp">12:03:45</samp>’</dt>
- <dd><p>12 hours, 03 minutes and 45 seconds
- </p>
- </dd>
- <dt>‘<samp class="samp">23.189</samp>’</dt>
- <dd><p>23.189 seconds
- </p></dd>
- </dl>
- <a class="anchor" id="video-size-syntax"></a></div>
- </div>
- <div class="section-level-extent" id="Video-size">
- <h3 class="section"><span>2.4 Video size<a class="copiable-link" href="#Video-size"> ¶</a></span></h3>
- <p>Specify the size of the sourced video, it may be a string of the form
- <var class="var">width</var>x<var class="var">height</var>, or the name of a size abbreviation.
- </p>
- <p>The following abbreviations are recognized:
- </p><dl class="table">
- <dt>‘<samp class="samp">ntsc</samp>’</dt>
- <dd><p>720x480
- </p></dd>
- <dt>‘<samp class="samp">pal</samp>’</dt>
- <dd><p>720x576
- </p></dd>
- <dt>‘<samp class="samp">qntsc</samp>’</dt>
- <dd><p>352x240
- </p></dd>
- <dt>‘<samp class="samp">qpal</samp>’</dt>
- <dd><p>352x288
- </p></dd>
- <dt>‘<samp class="samp">sntsc</samp>’</dt>
- <dd><p>640x480
- </p></dd>
- <dt>‘<samp class="samp">spal</samp>’</dt>
- <dd><p>768x576
- </p></dd>
- <dt>‘<samp class="samp">film</samp>’</dt>
- <dd><p>352x240
- </p></dd>
- <dt>‘<samp class="samp">ntsc-film</samp>’</dt>
- <dd><p>352x240
- </p></dd>
- <dt>‘<samp class="samp">sqcif</samp>’</dt>
- <dd><p>128x96
- </p></dd>
- <dt>‘<samp class="samp">qcif</samp>’</dt>
- <dd><p>176x144
- </p></dd>
- <dt>‘<samp class="samp">cif</samp>’</dt>
- <dd><p>352x288
- </p></dd>
- <dt>‘<samp class="samp">4cif</samp>’</dt>
- <dd><p>704x576
- </p></dd>
- <dt>‘<samp class="samp">16cif</samp>’</dt>
- <dd><p>1408x1152
- </p></dd>
- <dt>‘<samp class="samp">qqvga</samp>’</dt>
- <dd><p>160x120
- </p></dd>
- <dt>‘<samp class="samp">qvga</samp>’</dt>
- <dd><p>320x240
- </p></dd>
- <dt>‘<samp class="samp">vga</samp>’</dt>
- <dd><p>640x480
- </p></dd>
- <dt>‘<samp class="samp">svga</samp>’</dt>
- <dd><p>800x600
- </p></dd>
- <dt>‘<samp class="samp">xga</samp>’</dt>
- <dd><p>1024x768
- </p></dd>
- <dt>‘<samp class="samp">uxga</samp>’</dt>
- <dd><p>1600x1200
- </p></dd>
- <dt>‘<samp class="samp">qxga</samp>’</dt>
- <dd><p>2048x1536
- </p></dd>
- <dt>‘<samp class="samp">sxga</samp>’</dt>
- <dd><p>1280x1024
- </p></dd>
- <dt>‘<samp class="samp">qsxga</samp>’</dt>
- <dd><p>2560x2048
- </p></dd>
- <dt>‘<samp class="samp">hsxga</samp>’</dt>
- <dd><p>5120x4096
- </p></dd>
- <dt>‘<samp class="samp">wvga</samp>’</dt>
- <dd><p>852x480
- </p></dd>
- <dt>‘<samp class="samp">wxga</samp>’</dt>
- <dd><p>1366x768
- </p></dd>
- <dt>‘<samp class="samp">wsxga</samp>’</dt>
- <dd><p>1600x1024
- </p></dd>
- <dt>‘<samp class="samp">wuxga</samp>’</dt>
- <dd><p>1920x1200
- </p></dd>
- <dt>‘<samp class="samp">woxga</samp>’</dt>
- <dd><p>2560x1600
- </p></dd>
- <dt>‘<samp class="samp">wqsxga</samp>’</dt>
- <dd><p>3200x2048
- </p></dd>
- <dt>‘<samp class="samp">wquxga</samp>’</dt>
- <dd><p>3840x2400
- </p></dd>
- <dt>‘<samp class="samp">whsxga</samp>’</dt>
- <dd><p>6400x4096
- </p></dd>
- <dt>‘<samp class="samp">whuxga</samp>’</dt>
- <dd><p>7680x4800
- </p></dd>
- <dt>‘<samp class="samp">cga</samp>’</dt>
- <dd><p>320x200
- </p></dd>
- <dt>‘<samp class="samp">ega</samp>’</dt>
- <dd><p>640x350
- </p></dd>
- <dt>‘<samp class="samp">hd480</samp>’</dt>
- <dd><p>852x480
- </p></dd>
- <dt>‘<samp class="samp">hd720</samp>’</dt>
- <dd><p>1280x720
- </p></dd>
- <dt>‘<samp class="samp">hd1080</samp>’</dt>
- <dd><p>1920x1080
- </p></dd>
- <dt>‘<samp class="samp">2k</samp>’</dt>
- <dd><p>2048x1080
- </p></dd>
- <dt>‘<samp class="samp">2kflat</samp>’</dt>
- <dd><p>1998x1080
- </p></dd>
- <dt>‘<samp class="samp">2kscope</samp>’</dt>
- <dd><p>2048x858
- </p></dd>
- <dt>‘<samp class="samp">4k</samp>’</dt>
- <dd><p>4096x2160
- </p></dd>
- <dt>‘<samp class="samp">4kflat</samp>’</dt>
- <dd><p>3996x2160
- </p></dd>
- <dt>‘<samp class="samp">4kscope</samp>’</dt>
- <dd><p>4096x1716
- </p></dd>
- <dt>‘<samp class="samp">nhd</samp>’</dt>
- <dd><p>640x360
- </p></dd>
- <dt>‘<samp class="samp">hqvga</samp>’</dt>
- <dd><p>240x160
- </p></dd>
- <dt>‘<samp class="samp">wqvga</samp>’</dt>
- <dd><p>400x240
- </p></dd>
- <dt>‘<samp class="samp">fwqvga</samp>’</dt>
- <dd><p>432x240
- </p></dd>
- <dt>‘<samp class="samp">hvga</samp>’</dt>
- <dd><p>480x320
- </p></dd>
- <dt>‘<samp class="samp">qhd</samp>’</dt>
- <dd><p>960x540
- </p></dd>
- <dt>‘<samp class="samp">2kdci</samp>’</dt>
- <dd><p>2048x1080
- </p></dd>
- <dt>‘<samp class="samp">4kdci</samp>’</dt>
- <dd><p>4096x2160
- </p></dd>
- <dt>‘<samp class="samp">uhd2160</samp>’</dt>
- <dd><p>3840x2160
- </p></dd>
- <dt>‘<samp class="samp">uhd4320</samp>’</dt>
- <dd><p>7680x4320
- </p></dd>
- </dl>
- <a class="anchor" id="video-rate-syntax"></a></div>
- <div class="section-level-extent" id="Video-rate">
- <h3 class="section"><span>2.5 Video rate<a class="copiable-link" href="#Video-rate"> ¶</a></span></h3>
- <p>Specify the frame rate of a video, expressed as the number of frames
- generated per second. It has to be a string in the format
- <var class="var">frame_rate_num</var>/<var class="var">frame_rate_den</var>, an integer number, a float
- number or a valid video frame rate abbreviation.
- </p>
- <p>The following abbreviations are recognized:
- </p><dl class="table">
- <dt>‘<samp class="samp">ntsc</samp>’</dt>
- <dd><p>30000/1001
- </p></dd>
- <dt>‘<samp class="samp">pal</samp>’</dt>
- <dd><p>25/1
- </p></dd>
- <dt>‘<samp class="samp">qntsc</samp>’</dt>
- <dd><p>30000/1001
- </p></dd>
- <dt>‘<samp class="samp">qpal</samp>’</dt>
- <dd><p>25/1
- </p></dd>
- <dt>‘<samp class="samp">sntsc</samp>’</dt>
- <dd><p>30000/1001
- </p></dd>
- <dt>‘<samp class="samp">spal</samp>’</dt>
- <dd><p>25/1
- </p></dd>
- <dt>‘<samp class="samp">film</samp>’</dt>
- <dd><p>24/1
- </p></dd>
- <dt>‘<samp class="samp">ntsc-film</samp>’</dt>
- <dd><p>24000/1001
- </p></dd>
- </dl>
- <a class="anchor" id="ratio-syntax"></a></div>
- <div class="section-level-extent" id="Ratio">
- <h3 class="section"><span>2.6 Ratio<a class="copiable-link" href="#Ratio"> ¶</a></span></h3>
- <p>A ratio can be expressed as an expression, or in the form
- <var class="var">numerator</var>:<var class="var">denominator</var>.
- </p>
- <p>Note that a ratio with infinite (1/0) or negative value is
- considered valid, so you should check on the returned value if you
- want to exclude those values.
- </p>
- <p>The undefined value can be expressed using the "0:0" string.
- </p>
- <a class="anchor" id="color-syntax"></a></div>
- <div class="section-level-extent" id="Color">
- <h3 class="section"><span>2.7 Color<a class="copiable-link" href="#Color"> ¶</a></span></h3>
- <p>It can be the name of a color as defined below (case insensitive match) or a
- <code class="code">[0x|#]RRGGBB[AA]</code> sequence, possibly followed by @ and a string
- representing the alpha component.
- </p>
- <p>The alpha component may be a string composed by "0x" followed by an
- hexadecimal number or a decimal number between 0.0 and 1.0, which
- represents the opacity value (‘<samp class="samp">0x00</samp>’ or ‘<samp class="samp">0.0</samp>’ means completely
- transparent, ‘<samp class="samp">0xff</samp>’ or ‘<samp class="samp">1.0</samp>’ completely opaque). If the alpha
- component is not specified then ‘<samp class="samp">0xff</samp>’ is assumed.
- </p>
- <p>The string ‘<samp class="samp">random</samp>’ will result in a random color.
- </p>
- <p>The following names of colors are recognized:
- </p><dl class="table">
- <dt>‘<samp class="samp">AliceBlue</samp>’</dt>
- <dd><p>0xF0F8FF
- </p></dd>
- <dt>‘<samp class="samp">AntiqueWhite</samp>’</dt>
- <dd><p>0xFAEBD7
- </p></dd>
- <dt>‘<samp class="samp">Aqua</samp>’</dt>
- <dd><p>0x00FFFF
- </p></dd>
- <dt>‘<samp class="samp">Aquamarine</samp>’</dt>
- <dd><p>0x7FFFD4
- </p></dd>
- <dt>‘<samp class="samp">Azure</samp>’</dt>
- <dd><p>0xF0FFFF
- </p></dd>
- <dt>‘<samp class="samp">Beige</samp>’</dt>
- <dd><p>0xF5F5DC
- </p></dd>
- <dt>‘<samp class="samp">Bisque</samp>’</dt>
- <dd><p>0xFFE4C4
- </p></dd>
- <dt>‘<samp class="samp">Black</samp>’</dt>
- <dd><p>0x000000
- </p></dd>
- <dt>‘<samp class="samp">BlanchedAlmond</samp>’</dt>
- <dd><p>0xFFEBCD
- </p></dd>
- <dt>‘<samp class="samp">Blue</samp>’</dt>
- <dd><p>0x0000FF
- </p></dd>
- <dt>‘<samp class="samp">BlueViolet</samp>’</dt>
- <dd><p>0x8A2BE2
- </p></dd>
- <dt>‘<samp class="samp">Brown</samp>’</dt>
- <dd><p>0xA52A2A
- </p></dd>
- <dt>‘<samp class="samp">BurlyWood</samp>’</dt>
- <dd><p>0xDEB887
- </p></dd>
- <dt>‘<samp class="samp">CadetBlue</samp>’</dt>
- <dd><p>0x5F9EA0
- </p></dd>
- <dt>‘<samp class="samp">Chartreuse</samp>’</dt>
- <dd><p>0x7FFF00
- </p></dd>
- <dt>‘<samp class="samp">Chocolate</samp>’</dt>
- <dd><p>0xD2691E
- </p></dd>
- <dt>‘<samp class="samp">Coral</samp>’</dt>
- <dd><p>0xFF7F50
- </p></dd>
- <dt>‘<samp class="samp">CornflowerBlue</samp>’</dt>
- <dd><p>0x6495ED
- </p></dd>
- <dt>‘<samp class="samp">Cornsilk</samp>’</dt>
- <dd><p>0xFFF8DC
- </p></dd>
- <dt>‘<samp class="samp">Crimson</samp>’</dt>
- <dd><p>0xDC143C
- </p></dd>
- <dt>‘<samp class="samp">Cyan</samp>’</dt>
- <dd><p>0x00FFFF
- </p></dd>
- <dt>‘<samp class="samp">DarkBlue</samp>’</dt>
- <dd><p>0x00008B
- </p></dd>
- <dt>‘<samp class="samp">DarkCyan</samp>’</dt>
- <dd><p>0x008B8B
- </p></dd>
- <dt>‘<samp class="samp">DarkGoldenRod</samp>’</dt>
- <dd><p>0xB8860B
- </p></dd>
- <dt>‘<samp class="samp">DarkGray</samp>’</dt>
- <dd><p>0xA9A9A9
- </p></dd>
- <dt>‘<samp class="samp">DarkGreen</samp>’</dt>
- <dd><p>0x006400
- </p></dd>
- <dt>‘<samp class="samp">DarkKhaki</samp>’</dt>
- <dd><p>0xBDB76B
- </p></dd>
- <dt>‘<samp class="samp">DarkMagenta</samp>’</dt>
- <dd><p>0x8B008B
- </p></dd>
- <dt>‘<samp class="samp">DarkOliveGreen</samp>’</dt>
- <dd><p>0x556B2F
- </p></dd>
- <dt>‘<samp class="samp">Darkorange</samp>’</dt>
- <dd><p>0xFF8C00
- </p></dd>
- <dt>‘<samp class="samp">DarkOrchid</samp>’</dt>
- <dd><p>0x9932CC
- </p></dd>
- <dt>‘<samp class="samp">DarkRed</samp>’</dt>
- <dd><p>0x8B0000
- </p></dd>
- <dt>‘<samp class="samp">DarkSalmon</samp>’</dt>
- <dd><p>0xE9967A
- </p></dd>
- <dt>‘<samp class="samp">DarkSeaGreen</samp>’</dt>
- <dd><p>0x8FBC8F
- </p></dd>
- <dt>‘<samp class="samp">DarkSlateBlue</samp>’</dt>
- <dd><p>0x483D8B
- </p></dd>
- <dt>‘<samp class="samp">DarkSlateGray</samp>’</dt>
- <dd><p>0x2F4F4F
- </p></dd>
- <dt>‘<samp class="samp">DarkTurquoise</samp>’</dt>
- <dd><p>0x00CED1
- </p></dd>
- <dt>‘<samp class="samp">DarkViolet</samp>’</dt>
- <dd><p>0x9400D3
- </p></dd>
- <dt>‘<samp class="samp">DeepPink</samp>’</dt>
- <dd><p>0xFF1493
- </p></dd>
- <dt>‘<samp class="samp">DeepSkyBlue</samp>’</dt>
- <dd><p>0x00BFFF
- </p></dd>
- <dt>‘<samp class="samp">DimGray</samp>’</dt>
- <dd><p>0x696969
- </p></dd>
- <dt>‘<samp class="samp">DodgerBlue</samp>’</dt>
- <dd><p>0x1E90FF
- </p></dd>
- <dt>‘<samp class="samp">FireBrick</samp>’</dt>
- <dd><p>0xB22222
- </p></dd>
- <dt>‘<samp class="samp">FloralWhite</samp>’</dt>
- <dd><p>0xFFFAF0
- </p></dd>
- <dt>‘<samp class="samp">ForestGreen</samp>’</dt>
- <dd><p>0x228B22
- </p></dd>
- <dt>‘<samp class="samp">Fuchsia</samp>’</dt>
- <dd><p>0xFF00FF
- </p></dd>
- <dt>‘<samp class="samp">Gainsboro</samp>’</dt>
- <dd><p>0xDCDCDC
- </p></dd>
- <dt>‘<samp class="samp">GhostWhite</samp>’</dt>
- <dd><p>0xF8F8FF
- </p></dd>
- <dt>‘<samp class="samp">Gold</samp>’</dt>
- <dd><p>0xFFD700
- </p></dd>
- <dt>‘<samp class="samp">GoldenRod</samp>’</dt>
- <dd><p>0xDAA520
- </p></dd>
- <dt>‘<samp class="samp">Gray</samp>’</dt>
- <dd><p>0x808080
- </p></dd>
- <dt>‘<samp class="samp">Green</samp>’</dt>
- <dd><p>0x008000
- </p></dd>
- <dt>‘<samp class="samp">GreenYellow</samp>’</dt>
- <dd><p>0xADFF2F
- </p></dd>
- <dt>‘<samp class="samp">HoneyDew</samp>’</dt>
- <dd><p>0xF0FFF0
- </p></dd>
- <dt>‘<samp class="samp">HotPink</samp>’</dt>
- <dd><p>0xFF69B4
- </p></dd>
- <dt>‘<samp class="samp">IndianRed</samp>’</dt>
- <dd><p>0xCD5C5C
- </p></dd>
- <dt>‘<samp class="samp">Indigo</samp>’</dt>
- <dd><p>0x4B0082
- </p></dd>
- <dt>‘<samp class="samp">Ivory</samp>’</dt>
- <dd><p>0xFFFFF0
- </p></dd>
- <dt>‘<samp class="samp">Khaki</samp>’</dt>
- <dd><p>0xF0E68C
- </p></dd>
- <dt>‘<samp class="samp">Lavender</samp>’</dt>
- <dd><p>0xE6E6FA
- </p></dd>
- <dt>‘<samp class="samp">LavenderBlush</samp>’</dt>
- <dd><p>0xFFF0F5
- </p></dd>
- <dt>‘<samp class="samp">LawnGreen</samp>’</dt>
- <dd><p>0x7CFC00
- </p></dd>
- <dt>‘<samp class="samp">LemonChiffon</samp>’</dt>
- <dd><p>0xFFFACD
- </p></dd>
- <dt>‘<samp class="samp">LightBlue</samp>’</dt>
- <dd><p>0xADD8E6
- </p></dd>
- <dt>‘<samp class="samp">LightCoral</samp>’</dt>
- <dd><p>0xF08080
- </p></dd>
- <dt>‘<samp class="samp">LightCyan</samp>’</dt>
- <dd><p>0xE0FFFF
- </p></dd>
- <dt>‘<samp class="samp">LightGoldenRodYellow</samp>’</dt>
- <dd><p>0xFAFAD2
- </p></dd>
- <dt>‘<samp class="samp">LightGreen</samp>’</dt>
- <dd><p>0x90EE90
- </p></dd>
- <dt>‘<samp class="samp">LightGrey</samp>’</dt>
- <dd><p>0xD3D3D3
- </p></dd>
- <dt>‘<samp class="samp">LightPink</samp>’</dt>
- <dd><p>0xFFB6C1
- </p></dd>
- <dt>‘<samp class="samp">LightSalmon</samp>’</dt>
- <dd><p>0xFFA07A
- </p></dd>
- <dt>‘<samp class="samp">LightSeaGreen</samp>’</dt>
- <dd><p>0x20B2AA
- </p></dd>
- <dt>‘<samp class="samp">LightSkyBlue</samp>’</dt>
- <dd><p>0x87CEFA
- </p></dd>
- <dt>‘<samp class="samp">LightSlateGray</samp>’</dt>
- <dd><p>0x778899
- </p></dd>
- <dt>‘<samp class="samp">LightSteelBlue</samp>’</dt>
- <dd><p>0xB0C4DE
- </p></dd>
- <dt>‘<samp class="samp">LightYellow</samp>’</dt>
- <dd><p>0xFFFFE0
- </p></dd>
- <dt>‘<samp class="samp">Lime</samp>’</dt>
- <dd><p>0x00FF00
- </p></dd>
- <dt>‘<samp class="samp">LimeGreen</samp>’</dt>
- <dd><p>0x32CD32
- </p></dd>
- <dt>‘<samp class="samp">Linen</samp>’</dt>
- <dd><p>0xFAF0E6
- </p></dd>
- <dt>‘<samp class="samp">Magenta</samp>’</dt>
- <dd><p>0xFF00FF
- </p></dd>
- <dt>‘<samp class="samp">Maroon</samp>’</dt>
- <dd><p>0x800000
- </p></dd>
- <dt>‘<samp class="samp">MediumAquaMarine</samp>’</dt>
- <dd><p>0x66CDAA
- </p></dd>
- <dt>‘<samp class="samp">MediumBlue</samp>’</dt>
- <dd><p>0x0000CD
- </p></dd>
- <dt>‘<samp class="samp">MediumOrchid</samp>’</dt>
- <dd><p>0xBA55D3
- </p></dd>
- <dt>‘<samp class="samp">MediumPurple</samp>’</dt>
- <dd><p>0x9370D8
- </p></dd>
- <dt>‘<samp class="samp">MediumSeaGreen</samp>’</dt>
- <dd><p>0x3CB371
- </p></dd>
- <dt>‘<samp class="samp">MediumSlateBlue</samp>’</dt>
- <dd><p>0x7B68EE
- </p></dd>
- <dt>‘<samp class="samp">MediumSpringGreen</samp>’</dt>
- <dd><p>0x00FA9A
- </p></dd>
- <dt>‘<samp class="samp">MediumTurquoise</samp>’</dt>
- <dd><p>0x48D1CC
- </p></dd>
- <dt>‘<samp class="samp">MediumVioletRed</samp>’</dt>
- <dd><p>0xC71585
- </p></dd>
- <dt>‘<samp class="samp">MidnightBlue</samp>’</dt>
- <dd><p>0x191970
- </p></dd>
- <dt>‘<samp class="samp">MintCream</samp>’</dt>
- <dd><p>0xF5FFFA
- </p></dd>
- <dt>‘<samp class="samp">MistyRose</samp>’</dt>
- <dd><p>0xFFE4E1
- </p></dd>
- <dt>‘<samp class="samp">Moccasin</samp>’</dt>
- <dd><p>0xFFE4B5
- </p></dd>
- <dt>‘<samp class="samp">NavajoWhite</samp>’</dt>
- <dd><p>0xFFDEAD
- </p></dd>
- <dt>‘<samp class="samp">Navy</samp>’</dt>
- <dd><p>0x000080
- </p></dd>
- <dt>‘<samp class="samp">OldLace</samp>’</dt>
- <dd><p>0xFDF5E6
- </p></dd>
- <dt>‘<samp class="samp">Olive</samp>’</dt>
- <dd><p>0x808000
- </p></dd>
- <dt>‘<samp class="samp">OliveDrab</samp>’</dt>
- <dd><p>0x6B8E23
- </p></dd>
- <dt>‘<samp class="samp">Orange</samp>’</dt>
- <dd><p>0xFFA500
- </p></dd>
- <dt>‘<samp class="samp">OrangeRed</samp>’</dt>
- <dd><p>0xFF4500
- </p></dd>
- <dt>‘<samp class="samp">Orchid</samp>’</dt>
- <dd><p>0xDA70D6
- </p></dd>
- <dt>‘<samp class="samp">PaleGoldenRod</samp>’</dt>
- <dd><p>0xEEE8AA
- </p></dd>
- <dt>‘<samp class="samp">PaleGreen</samp>’</dt>
- <dd><p>0x98FB98
- </p></dd>
- <dt>‘<samp class="samp">PaleTurquoise</samp>’</dt>
- <dd><p>0xAFEEEE
- </p></dd>
- <dt>‘<samp class="samp">PaleVioletRed</samp>’</dt>
- <dd><p>0xD87093
- </p></dd>
- <dt>‘<samp class="samp">PapayaWhip</samp>’</dt>
- <dd><p>0xFFEFD5
- </p></dd>
- <dt>‘<samp class="samp">PeachPuff</samp>’</dt>
- <dd><p>0xFFDAB9
- </p></dd>
- <dt>‘<samp class="samp">Peru</samp>’</dt>
- <dd><p>0xCD853F
- </p></dd>
- <dt>‘<samp class="samp">Pink</samp>’</dt>
- <dd><p>0xFFC0CB
- </p></dd>
- <dt>‘<samp class="samp">Plum</samp>’</dt>
- <dd><p>0xDDA0DD
- </p></dd>
- <dt>‘<samp class="samp">PowderBlue</samp>’</dt>
- <dd><p>0xB0E0E6
- </p></dd>
- <dt>‘<samp class="samp">Purple</samp>’</dt>
- <dd><p>0x800080
- </p></dd>
- <dt>‘<samp class="samp">Red</samp>’</dt>
- <dd><p>0xFF0000
- </p></dd>
- <dt>‘<samp class="samp">RosyBrown</samp>’</dt>
- <dd><p>0xBC8F8F
- </p></dd>
- <dt>‘<samp class="samp">RoyalBlue</samp>’</dt>
- <dd><p>0x4169E1
- </p></dd>
- <dt>‘<samp class="samp">SaddleBrown</samp>’</dt>
- <dd><p>0x8B4513
- </p></dd>
- <dt>‘<samp class="samp">Salmon</samp>’</dt>
- <dd><p>0xFA8072
- </p></dd>
- <dt>‘<samp class="samp">SandyBrown</samp>’</dt>
- <dd><p>0xF4A460
- </p></dd>
- <dt>‘<samp class="samp">SeaGreen</samp>’</dt>
- <dd><p>0x2E8B57
- </p></dd>
- <dt>‘<samp class="samp">SeaShell</samp>’</dt>
- <dd><p>0xFFF5EE
- </p></dd>
- <dt>‘<samp class="samp">Sienna</samp>’</dt>
- <dd><p>0xA0522D
- </p></dd>
- <dt>‘<samp class="samp">Silver</samp>’</dt>
- <dd><p>0xC0C0C0
- </p></dd>
- <dt>‘<samp class="samp">SkyBlue</samp>’</dt>
- <dd><p>0x87CEEB
- </p></dd>
- <dt>‘<samp class="samp">SlateBlue</samp>’</dt>
- <dd><p>0x6A5ACD
- </p></dd>
- <dt>‘<samp class="samp">SlateGray</samp>’</dt>
- <dd><p>0x708090
- </p></dd>
- <dt>‘<samp class="samp">Snow</samp>’</dt>
- <dd><p>0xFFFAFA
- </p></dd>
- <dt>‘<samp class="samp">SpringGreen</samp>’</dt>
- <dd><p>0x00FF7F
- </p></dd>
- <dt>‘<samp class="samp">SteelBlue</samp>’</dt>
- <dd><p>0x4682B4
- </p></dd>
- <dt>‘<samp class="samp">Tan</samp>’</dt>
- <dd><p>0xD2B48C
- </p></dd>
- <dt>‘<samp class="samp">Teal</samp>’</dt>
- <dd><p>0x008080
- </p></dd>
- <dt>‘<samp class="samp">Thistle</samp>’</dt>
- <dd><p>0xD8BFD8
- </p></dd>
- <dt>‘<samp class="samp">Tomato</samp>’</dt>
- <dd><p>0xFF6347
- </p></dd>
- <dt>‘<samp class="samp">Turquoise</samp>’</dt>
- <dd><p>0x40E0D0
- </p></dd>
- <dt>‘<samp class="samp">Violet</samp>’</dt>
- <dd><p>0xEE82EE
- </p></dd>
- <dt>‘<samp class="samp">Wheat</samp>’</dt>
- <dd><p>0xF5DEB3
- </p></dd>
- <dt>‘<samp class="samp">White</samp>’</dt>
- <dd><p>0xFFFFFF
- </p></dd>
- <dt>‘<samp class="samp">WhiteSmoke</samp>’</dt>
- <dd><p>0xF5F5F5
- </p></dd>
- <dt>‘<samp class="samp">Yellow</samp>’</dt>
- <dd><p>0xFFFF00
- </p></dd>
- <dt>‘<samp class="samp">YellowGreen</samp>’</dt>
- <dd><p>0x9ACD32
- </p></dd>
- </dl>
- <a class="anchor" id="channel-layout-syntax"></a></div>
- <div class="section-level-extent" id="Channel-Layout">
- <h3 class="section"><span>2.8 Channel Layout<a class="copiable-link" href="#Channel-Layout"> ¶</a></span></h3>
- <p>A channel layout specifies the spatial disposition of the channels in
- a multi-channel audio stream. To specify a channel layout, FFmpeg
- makes use of a special syntax.
- </p>
- <p>Individual channels are identified by an id, as given by the table
- below:
- </p><dl class="table">
- <dt>‘<samp class="samp">FL</samp>’</dt>
- <dd><p>front left
- </p></dd>
- <dt>‘<samp class="samp">FR</samp>’</dt>
- <dd><p>front right
- </p></dd>
- <dt>‘<samp class="samp">FC</samp>’</dt>
- <dd><p>front center
- </p></dd>
- <dt>‘<samp class="samp">LFE</samp>’</dt>
- <dd><p>low frequency
- </p></dd>
- <dt>‘<samp class="samp">BL</samp>’</dt>
- <dd><p>back left
- </p></dd>
- <dt>‘<samp class="samp">BR</samp>’</dt>
- <dd><p>back right
- </p></dd>
- <dt>‘<samp class="samp">FLC</samp>’</dt>
- <dd><p>front left-of-center
- </p></dd>
- <dt>‘<samp class="samp">FRC</samp>’</dt>
- <dd><p>front right-of-center
- </p></dd>
- <dt>‘<samp class="samp">BC</samp>’</dt>
- <dd><p>back center
- </p></dd>
- <dt>‘<samp class="samp">SL</samp>’</dt>
- <dd><p>side left
- </p></dd>
- <dt>‘<samp class="samp">SR</samp>’</dt>
- <dd><p>side right
- </p></dd>
- <dt>‘<samp class="samp">TC</samp>’</dt>
- <dd><p>top center
- </p></dd>
- <dt>‘<samp class="samp">TFL</samp>’</dt>
- <dd><p>top front left
- </p></dd>
- <dt>‘<samp class="samp">TFC</samp>’</dt>
- <dd><p>top front center
- </p></dd>
- <dt>‘<samp class="samp">TFR</samp>’</dt>
- <dd><p>top front right
- </p></dd>
- <dt>‘<samp class="samp">TBL</samp>’</dt>
- <dd><p>top back left
- </p></dd>
- <dt>‘<samp class="samp">TBC</samp>’</dt>
- <dd><p>top back center
- </p></dd>
- <dt>‘<samp class="samp">TBR</samp>’</dt>
- <dd><p>top back right
- </p></dd>
- <dt>‘<samp class="samp">DL</samp>’</dt>
- <dd><p>downmix left
- </p></dd>
- <dt>‘<samp class="samp">DR</samp>’</dt>
- <dd><p>downmix right
- </p></dd>
- <dt>‘<samp class="samp">WL</samp>’</dt>
- <dd><p>wide left
- </p></dd>
- <dt>‘<samp class="samp">WR</samp>’</dt>
- <dd><p>wide right
- </p></dd>
- <dt>‘<samp class="samp">SDL</samp>’</dt>
- <dd><p>surround direct left
- </p></dd>
- <dt>‘<samp class="samp">SDR</samp>’</dt>
- <dd><p>surround direct right
- </p></dd>
- <dt>‘<samp class="samp">LFE2</samp>’</dt>
- <dd><p>low frequency 2
- </p></dd>
- </dl>
- <p>Standard channel layout compositions can be specified by using the
- following identifiers:
- </p><dl class="table">
- <dt>‘<samp class="samp">mono</samp>’</dt>
- <dd><p>FC
- </p></dd>
- <dt>‘<samp class="samp">stereo</samp>’</dt>
- <dd><p>FL+FR
- </p></dd>
- <dt>‘<samp class="samp">2.1</samp>’</dt>
- <dd><p>FL+FR+LFE
- </p></dd>
- <dt>‘<samp class="samp">3.0</samp>’</dt>
- <dd><p>FL+FR+FC
- </p></dd>
- <dt>‘<samp class="samp">3.0(back)</samp>’</dt>
- <dd><p>FL+FR+BC
- </p></dd>
- <dt>‘<samp class="samp">4.0</samp>’</dt>
- <dd><p>FL+FR+FC+BC
- </p></dd>
- <dt>‘<samp class="samp">quad</samp>’</dt>
- <dd><p>FL+FR+BL+BR
- </p></dd>
- <dt>‘<samp class="samp">quad(side)</samp>’</dt>
- <dd><p>FL+FR+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">3.1</samp>’</dt>
- <dd><p>FL+FR+FC+LFE
- </p></dd>
- <dt>‘<samp class="samp">5.0</samp>’</dt>
- <dd><p>FL+FR+FC+BL+BR
- </p></dd>
- <dt>‘<samp class="samp">5.0(side)</samp>’</dt>
- <dd><p>FL+FR+FC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">4.1</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BC
- </p></dd>
- <dt>‘<samp class="samp">5.1</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR
- </p></dd>
- <dt>‘<samp class="samp">5.1(side)</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">6.0</samp>’</dt>
- <dd><p>FL+FR+FC+BC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">6.0(front)</samp>’</dt>
- <dd><p>FL+FR+FLC+FRC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">3.1.2</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+TFL+TFR
- </p></dd>
- <dt>‘<samp class="samp">hexagonal</samp>’</dt>
- <dd><p>FL+FR+FC+BL+BR+BC
- </p></dd>
- <dt>‘<samp class="samp">6.1</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">6.1</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+BC
- </p></dd>
- <dt>‘<samp class="samp">6.1(front)</samp>’</dt>
- <dd><p>FL+FR+LFE+FLC+FRC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">7.0</samp>’</dt>
- <dd><p>FL+FR+FC+BL+BR+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">7.0(front)</samp>’</dt>
- <dd><p>FL+FR+FC+FLC+FRC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">7.1</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">7.1(wide)</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC
- </p></dd>
- <dt>‘<samp class="samp">7.1(wide-side)</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+FLC+FRC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">5.1.2</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+TFL+TFR
- </p></dd>
- <dt>‘<samp class="samp">octagonal</samp>’</dt>
- <dd><p>FL+FR+FC+BL+BR+BC+SL+SR
- </p></dd>
- <dt>‘<samp class="samp">cube</samp>’</dt>
- <dd><p>FL+FR+BL+BR+TFL+TFR+TBL+TBR
- </p></dd>
- <dt>‘<samp class="samp">5.1.4</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR
- </p></dd>
- <dt>‘<samp class="samp">7.1.2</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR
- </p></dd>
- <dt>‘<samp class="samp">7.1.4</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBL+TBR
- </p></dd>
- <dt>‘<samp class="samp">7.2.3</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBC+LFE2
- </p></dd>
- <dt>‘<samp class="samp">9.1.4</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC+SL+SR+TFL+TFR+TBL+TBR
- </p></dd>
- <dt>‘<samp class="samp">hexadecagonal</samp>’</dt>
- <dd><p>FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
- </p></dd>
- <dt>‘<samp class="samp">downmix</samp>’</dt>
- <dd><p>DL+DR
- </p></dd>
- <dt>‘<samp class="samp">22.2</samp>’</dt>
- <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC+BC+SL+SR+TC+TFL+TFC+TFR+TBL+TBC+TBR+LFE2+TSL+TSR+BFC+BFL+BFR
- </p></dd>
- </dl>
- <p>A custom channel layout can be specified as a sequence of terms, separated by ’+’.
- Each term can be:
- </p><ul class="itemize mark-bullet">
- <li>the name of a single channel (e.g. ‘<samp class="samp">FL</samp>’, ‘<samp class="samp">FR</samp>’, ‘<samp class="samp">FC</samp>’, ‘<samp class="samp">LFE</samp>’, etc.),
- each optionally containing a custom name after a ’@’, (e.g. ‘<samp class="samp">FL@Left</samp>’,
- ‘<samp class="samp">FR@Right</samp>’, ‘<samp class="samp">FC@Center</samp>’, ‘<samp class="samp">LFE@Low_Frequency</samp>’, etc.)
- </li></ul>
- <p>A standard channel layout can be specified by the following:
- </p><ul class="itemize mark-bullet">
- <li>the name of a single channel (e.g. ‘<samp class="samp">FL</samp>’, ‘<samp class="samp">FR</samp>’, ‘<samp class="samp">FC</samp>’, ‘<samp class="samp">LFE</samp>’, etc.)
- </li><li>the name of a standard channel layout (e.g. ‘<samp class="samp">mono</samp>’,
- ‘<samp class="samp">stereo</samp>’, ‘<samp class="samp">4.0</samp>’, ‘<samp class="samp">quad</samp>’, ‘<samp class="samp">5.0</samp>’, etc.)
- </li><li>a number of channels, in decimal, followed by ’c’, yielding the default channel
- layout for that number of channels (see the function
- <code class="code">av_channel_layout_default</code>). Note that not all channel counts have a
- default layout.
- </li><li>a number of channels, in decimal, followed by ’C’, yielding an unknown channel
- layout with the specified number of channels. Note that not all channel layout
- specification strings support unknown channel layouts.
- </li><li>a channel layout mask, in hexadecimal starting with "0x" (see the
- <code class="code">AV_CH_*</code> macros in <samp class="file">libavutil/channel_layout.h</samp>.
- </li></ul>
- <p>Before libavutil version 53 the trailing character "c" to specify a number of
- channels was optional, but now it is required, while a channel layout mask can
- also be specified as a decimal number (if and only if not followed by "c" or "C").
- </p>
- <p>See also the function <code class="code">av_channel_layout_from_string</code> defined in
- <samp class="file">libavutil/channel_layout.h</samp>.
- </p>
- </div>
- </div>
- <div class="chapter-level-extent" id="Expression-Evaluation">
- <h2 class="chapter"><span>3 Expression Evaluation<a class="copiable-link" href="#Expression-Evaluation"> ¶</a></span></h2>
- <p>When evaluating an arithmetic expression, FFmpeg uses an internal
- formula evaluator, implemented through the <samp class="file">libavutil/eval.h</samp>
- interface.
- </p>
- <p>An expression may contain unary, binary operators, constants, and
- functions.
- </p>
- <p>Two expressions <var class="var">expr1</var> and <var class="var">expr2</var> can be combined to form
- another expression "<var class="var">expr1</var>;<var class="var">expr2</var>".
- <var class="var">expr1</var> and <var class="var">expr2</var> are evaluated in turn, and the new
- expression evaluates to the value of <var class="var">expr2</var>.
- </p>
- <p>The following binary operators are available: <code class="code">+</code>, <code class="code">-</code>,
- <code class="code">*</code>, <code class="code">/</code>, <code class="code">^</code>.
- </p>
- <p>The following unary operators are available: <code class="code">+</code>, <code class="code">-</code>.
- </p>
- <p>The following functions are available:
- </p><dl class="table">
- <dt><samp class="option">abs(x)</samp></dt>
- <dd><p>Compute absolute value of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">acos(x)</samp></dt>
- <dd><p>Compute arccosine of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">asin(x)</samp></dt>
- <dd><p>Compute arcsine of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">atan(x)</samp></dt>
- <dd><p>Compute arctangent of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">atan2(y, x)</samp></dt>
- <dd><p>Compute principal value of the arc tangent of <var class="var">y</var>/<var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">between(x, min, max)</samp></dt>
- <dd><p>Return 1 if <var class="var">x</var> is greater than or equal to <var class="var">min</var> and lesser than or
- equal to <var class="var">max</var>, 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">bitand(x, y)</samp></dt>
- <dt><samp class="option">bitor(x, y)</samp></dt>
- <dd><p>Compute bitwise and/or operation on <var class="var">x</var> and <var class="var">y</var>.
- </p>
- <p>The results of the evaluation of <var class="var">x</var> and <var class="var">y</var> are converted to
- integers before executing the bitwise operation.
- </p>
- <p>Note that both the conversion to integer and the conversion back to
- floating point can lose precision. Beware of unexpected results for
- large numbers (usually 2^53 and larger).
- </p>
- </dd>
- <dt><samp class="option">ceil(expr)</samp></dt>
- <dd><p>Round the value of expression <var class="var">expr</var> upwards to the nearest
- integer. For example, "ceil(1.5)" is "2.0".
- </p>
- </dd>
- <dt><samp class="option">clip(x, min, max)</samp></dt>
- <dd><p>Return the value of <var class="var">x</var> clipped between <var class="var">min</var> and <var class="var">max</var>.
- </p>
- </dd>
- <dt><samp class="option">cos(x)</samp></dt>
- <dd><p>Compute cosine of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">cosh(x)</samp></dt>
- <dd><p>Compute hyperbolic cosine of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">eq(x, y)</samp></dt>
- <dd><p>Return 1 if <var class="var">x</var> and <var class="var">y</var> are equivalent, 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">exp(x)</samp></dt>
- <dd><p>Compute exponential of <var class="var">x</var> (with base <code class="code">e</code>, the Euler’s number).
- </p>
- </dd>
- <dt><samp class="option">floor(expr)</samp></dt>
- <dd><p>Round the value of expression <var class="var">expr</var> downwards to the nearest
- integer. For example, "floor(-1.5)" is "-2.0".
- </p>
- </dd>
- <dt><samp class="option">gauss(x)</samp></dt>
- <dd><p>Compute Gauss function of <var class="var">x</var>, corresponding to
- <code class="code">exp(-x*x/2) / sqrt(2*PI)</code>.
- </p>
- </dd>
- <dt><samp class="option">gcd(x, y)</samp></dt>
- <dd><p>Return the greatest common divisor of <var class="var">x</var> and <var class="var">y</var>. If both <var class="var">x</var> and
- <var class="var">y</var> are 0 or either or both are less than zero then behavior is undefined.
- </p>
- </dd>
- <dt><samp class="option">gt(x, y)</samp></dt>
- <dd><p>Return 1 if <var class="var">x</var> is greater than <var class="var">y</var>, 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">gte(x, y)</samp></dt>
- <dd><p>Return 1 if <var class="var">x</var> is greater than or equal to <var class="var">y</var>, 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">hypot(x, y)</samp></dt>
- <dd><p>This function is similar to the C function with the same name; it returns
- "sqrt(<var class="var">x</var>*<var class="var">x</var> + <var class="var">y</var>*<var class="var">y</var>)", the length of the hypotenuse of a
- right triangle with sides of length <var class="var">x</var> and <var class="var">y</var>, or the distance of the
- point (<var class="var">x</var>, <var class="var">y</var>) from the origin.
- </p>
- </dd>
- <dt><samp class="option">if(x, y)</samp></dt>
- <dd><p>Evaluate <var class="var">x</var>, and if the result is non-zero return the result of
- the evaluation of <var class="var">y</var>, return 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">if(x, y, z)</samp></dt>
- <dd><p>Evaluate <var class="var">x</var>, and if the result is non-zero return the evaluation
- result of <var class="var">y</var>, otherwise the evaluation result of <var class="var">z</var>.
- </p>
- </dd>
- <dt><samp class="option">ifnot(x, y)</samp></dt>
- <dd><p>Evaluate <var class="var">x</var>, and if the result is zero return the result of the
- evaluation of <var class="var">y</var>, return 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">ifnot(x, y, z)</samp></dt>
- <dd><p>Evaluate <var class="var">x</var>, and if the result is zero return the evaluation
- result of <var class="var">y</var>, otherwise the evaluation result of <var class="var">z</var>.
- </p>
- </dd>
- <dt><samp class="option">isinf(x)</samp></dt>
- <dd><p>Return 1.0 if <var class="var">x</var> is +/-INFINITY, 0.0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">isnan(x)</samp></dt>
- <dd><p>Return 1.0 if <var class="var">x</var> is NAN, 0.0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">ld(var)</samp></dt>
- <dd><p>Load the value of the internal variable with number
- <var class="var">var</var>, which was previously stored with st(<var class="var">var</var>, <var class="var">expr</var>).
- The function returns the loaded value.
- </p>
- </dd>
- <dt><samp class="option">lerp(x, y, z)</samp></dt>
- <dd><p>Return linear interpolation between <var class="var">x</var> and <var class="var">y</var> by amount of <var class="var">z</var>.
- </p>
- </dd>
- <dt><samp class="option">log(x)</samp></dt>
- <dd><p>Compute natural logarithm of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">lt(x, y)</samp></dt>
- <dd><p>Return 1 if <var class="var">x</var> is lesser than <var class="var">y</var>, 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">lte(x, y)</samp></dt>
- <dd><p>Return 1 if <var class="var">x</var> is lesser than or equal to <var class="var">y</var>, 0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">max(x, y)</samp></dt>
- <dd><p>Return the maximum between <var class="var">x</var> and <var class="var">y</var>.
- </p>
- </dd>
- <dt><samp class="option">min(x, y)</samp></dt>
- <dd><p>Return the minimum between <var class="var">x</var> and <var class="var">y</var>.
- </p>
- </dd>
- <dt><samp class="option">mod(x, y)</samp></dt>
- <dd><p>Compute the remainder of division of <var class="var">x</var> by <var class="var">y</var>.
- </p>
- </dd>
- <dt><samp class="option">not(expr)</samp></dt>
- <dd><p>Return 1.0 if <var class="var">expr</var> is zero, 0.0 otherwise.
- </p>
- </dd>
- <dt><samp class="option">pow(x, y)</samp></dt>
- <dd><p>Compute the power of <var class="var">x</var> elevated <var class="var">y</var>, it is equivalent to
- "(<var class="var">x</var>)^(<var class="var">y</var>)".
- </p>
- </dd>
- <dt><samp class="option">print(t)</samp></dt>
- <dt><samp class="option">print(t, l)</samp></dt>
- <dd><p>Print the value of expression <var class="var">t</var> with loglevel <var class="var">l</var>. If
- <var class="var">l</var> is not specified then a default log level is used.
- Returns the value of the expression printed.
- </p>
- <p>Prints t with loglevel l
- </p>
- </dd>
- <dt><samp class="option">random(idx)</samp></dt>
- <dd><p>Return a pseudo random value between 0.0 and 1.0. <var class="var">idx</var> is the
- index of the internal variable which will be used to save the
- seed/state.
- </p>
- </dd>
- <dt><samp class="option">randomi(idx, min, max)</samp></dt>
- <dd><p>Return a pseudo random value in the interval between <var class="var">min</var> and
- <var class="var">max</var>. <var class="var">idx</var> is the index of the internal variable which will
- be used to save the seed/state.
- </p>
- </dd>
- <dt><samp class="option">root(expr, max)</samp></dt>
- <dd><p>Find an input value for which the function represented by <var class="var">expr</var>
- with argument <var class="var">ld(0)</var> is 0 in the interval 0..<var class="var">max</var>.
- </p>
- <p>The expression in <var class="var">expr</var> must denote a continuous function or the
- result is undefined.
- </p>
- <p><var class="var">ld(0)</var> is used to represent the function input value, which means
- that the given expression will be evaluated multiple times with
- various input values that the expression can access through
- <code class="code">ld(0)</code>. When the expression evaluates to 0 then the
- corresponding input value will be returned.
- </p>
- </dd>
- <dt><samp class="option">round(expr)</samp></dt>
- <dd><p>Round the value of expression <var class="var">expr</var> to the nearest integer. For example, "round(1.5)" is "2.0".
- </p>
- </dd>
- <dt><samp class="option">sgn(x)</samp></dt>
- <dd><p>Compute sign of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">sin(x)</samp></dt>
- <dd><p>Compute sine of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">sinh(x)</samp></dt>
- <dd><p>Compute hyperbolic sine of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">sqrt(expr)</samp></dt>
- <dd><p>Compute the square root of <var class="var">expr</var>. This is equivalent to
- "(<var class="var">expr</var>)^.5".
- </p>
- </dd>
- <dt><samp class="option">squish(x)</samp></dt>
- <dd><p>Compute expression <code class="code">1/(1 + exp(4*x))</code>.
- </p>
- </dd>
- <dt><samp class="option">st(var, expr)</samp></dt>
- <dd><p>Store the value of the expression <var class="var">expr</var> in an internal
- variable. <var class="var">var</var> specifies the number of the variable where to
- store the value, and it is a value ranging from 0 to 9. The function
- returns the value stored in the internal variable.
- Note, Variables are currently not shared between expressions.
- </p>
- </dd>
- <dt><samp class="option">tan(x)</samp></dt>
- <dd><p>Compute tangent of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">tanh(x)</samp></dt>
- <dd><p>Compute hyperbolic tangent of <var class="var">x</var>.
- </p>
- </dd>
- <dt><samp class="option">taylor(expr, x)</samp></dt>
- <dt><samp class="option">taylor(expr, x, id)</samp></dt>
- <dd><p>Evaluate a Taylor series at <var class="var">x</var>, given an expression representing
- the <code class="code">ld(id)</code>-th derivative of a function at 0.
- </p>
- <p>When the series does not converge the result is undefined.
- </p>
- <p><var class="var">ld(id)</var> is used to represent the derivative order in <var class="var">expr</var>,
- which means that the given expression will be evaluated multiple times
- with various input values that the expression can access through
- <code class="code">ld(id)</code>. If <var class="var">id</var> is not specified then 0 is assumed.
- </p>
- <p>Note, when you have the derivatives at y instead of 0,
- <code class="code">taylor(expr, x-y)</code> can be used.
- </p>
- </dd>
- <dt><samp class="option">time(0)</samp></dt>
- <dd><p>Return the current (wallclock) time in seconds.
- </p>
- </dd>
- <dt><samp class="option">trunc(expr)</samp></dt>
- <dd><p>Round the value of expression <var class="var">expr</var> towards zero to the nearest
- integer. For example, "trunc(-1.5)" is "-1.0".
- </p>
- </dd>
- <dt><samp class="option">while(cond, expr)</samp></dt>
- <dd><p>Evaluate expression <var class="var">expr</var> while the expression <var class="var">cond</var> is
- non-zero, and returns the value of the last <var class="var">expr</var> evaluation, or
- NAN if <var class="var">cond</var> was always false.
- </p></dd>
- </dl>
- <p>The following constants are available:
- </p><dl class="table">
- <dt><samp class="option">PI</samp></dt>
- <dd><p>area of the unit disc, approximately 3.14
- </p></dd>
- <dt><samp class="option">E</samp></dt>
- <dd><p>exp(1) (Euler’s number), approximately 2.718
- </p></dd>
- <dt><samp class="option">PHI</samp></dt>
- <dd><p>golden ratio (1+sqrt(5))/2, approximately 1.618
- </p></dd>
- </dl>
- <p>Assuming that an expression is considered "true" if it has a non-zero
- value, note that:
- </p>
- <p><code class="code">*</code> works like AND
- </p>
- <p><code class="code">+</code> works like OR
- </p>
- <p>For example the construct:
- </p><div class="example">
- <pre class="example-preformatted">if (A AND B) then C
- </pre></div>
- <p>is equivalent to:
- </p><div class="example">
- <pre class="example-preformatted">if(A*B, C)
- </pre></div>
- <p>In your C code, you can extend the list of unary and binary functions,
- and define recognized constants, so that they are available for your
- expressions.
- </p>
- <p>The evaluator also recognizes the International System unit prefixes.
- If ’i’ is appended after the prefix, binary prefixes are used, which
- are based on powers of 1024 instead of powers of 1000.
- The ’B’ postfix multiplies the value by 8, and can be appended after a
- unit prefix or used alone. This allows using for example ’KB’, ’MiB’,
- ’G’ and ’B’ as number postfix.
- </p>
- <p>The list of available International System prefixes follows, with
- indication of the corresponding powers of 10 and of 2.
- </p><dl class="table">
- <dt><samp class="option">y</samp></dt>
- <dd><p>10^-24 / 2^-80
- </p></dd>
- <dt><samp class="option">z</samp></dt>
- <dd><p>10^-21 / 2^-70
- </p></dd>
- <dt><samp class="option">a</samp></dt>
- <dd><p>10^-18 / 2^-60
- </p></dd>
- <dt><samp class="option">f</samp></dt>
- <dd><p>10^-15 / 2^-50
- </p></dd>
- <dt><samp class="option">p</samp></dt>
- <dd><p>10^-12 / 2^-40
- </p></dd>
- <dt><samp class="option">n</samp></dt>
- <dd><p>10^-9 / 2^-30
- </p></dd>
- <dt><samp class="option">u</samp></dt>
- <dd><p>10^-6 / 2^-20
- </p></dd>
- <dt><samp class="option">m</samp></dt>
- <dd><p>10^-3 / 2^-10
- </p></dd>
- <dt><samp class="option">c</samp></dt>
- <dd><p>10^-2
- </p></dd>
- <dt><samp class="option">d</samp></dt>
- <dd><p>10^-1
- </p></dd>
- <dt><samp class="option">h</samp></dt>
- <dd><p>10^2
- </p></dd>
- <dt><samp class="option">k</samp></dt>
- <dd><p>10^3 / 2^10
- </p></dd>
- <dt><samp class="option">K</samp></dt>
- <dd><p>10^3 / 2^10
- </p></dd>
- <dt><samp class="option">M</samp></dt>
- <dd><p>10^6 / 2^20
- </p></dd>
- <dt><samp class="option">G</samp></dt>
- <dd><p>10^9 / 2^30
- </p></dd>
- <dt><samp class="option">T</samp></dt>
- <dd><p>10^12 / 2^40
- </p></dd>
- <dt><samp class="option">P</samp></dt>
- <dd><p>10^15 / 2^50
- </p></dd>
- <dt><samp class="option">E</samp></dt>
- <dd><p>10^18 / 2^60
- </p></dd>
- <dt><samp class="option">Z</samp></dt>
- <dd><p>10^21 / 2^70
- </p></dd>
- <dt><samp class="option">Y</samp></dt>
- <dd><p>10^24 / 2^80
- </p></dd>
- </dl>
- </div>
- <div class="chapter-level-extent" id="See-Also">
- <h2 class="chapter"><span>4 See Also<a class="copiable-link" href="#See-Also"> ¶</a></span></h2>
- <p><a class="url" href="ffmpeg.html">ffmpeg</a>, <a class="url" href="ffplay.html">ffplay</a>, <a class="url" href="ffprobe.html">ffprobe</a>,
- <a class="url" href="libavutil.html">libavutil</a>
- </p>
- </div>
- <div class="chapter-level-extent" id="Authors">
- <h2 class="chapter"><span>5 Authors<a class="copiable-link" href="#Authors"> ¶</a></span></h2>
- <p>The FFmpeg developers.
- </p>
- <p>For details about the authorship, see the Git history of the project
- (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
- <code class="command">git log</code> in the FFmpeg source directory, or browsing the
- online repository at <a class="url" href="https://git.ffmpeg.org/ffmpeg">https://git.ffmpeg.org/ffmpeg</a>.
- </p>
- <p>Maintainers for the specific components are listed in the file
- <samp class="file">MAINTAINERS</samp> in the source code tree.
- </p>
- </div>
- </div>
- <p style="font-size: small;">
- This document was generated using <a class="uref" href="https://www.gnu.org/software/texinfo/"><em class="emph">makeinfo</em></a>.
- </p>
- </div>
- </body>
- </html>
|