ffmpeg-utils.html 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512
  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="FFmpeg Utilities Documentation: ">
  10. <meta name="keywords" content="FFmpeg documentation : FFmpeg Utilities ">
  11. <meta name="Generator" content="texi2html 5.0">
  12. <!-- Created on June 8, 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">FFmpeg Utilities 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-Description" href="#Description">1 Description</a></li>
  34. <li><a name="toc-Syntax" href="#Syntax">2 Syntax</a>
  35. <ul class="no-bullet">
  36. <li><a name="toc-Quoting-and-escaping" href="#Quoting-and-escaping">2.1 Quoting and escaping</a>
  37. <ul class="no-bullet">
  38. <li><a name="toc-Examples" href="#Examples">2.1.1 Examples</a></li>
  39. </ul></li>
  40. <li><a name="toc-Date" href="#Date">2.2 Date</a></li>
  41. <li><a name="toc-Time-duration" href="#Time-duration">2.3 Time duration</a>
  42. <ul class="no-bullet">
  43. <li><a name="toc-Examples-1" href="#Examples-1">2.3.1 Examples</a></li>
  44. </ul></li>
  45. <li><a name="toc-Video-size" href="#Video-size">2.4 Video size</a></li>
  46. <li><a name="toc-Video-rate" href="#Video-rate">2.5 Video rate</a></li>
  47. <li><a name="toc-Ratio" href="#Ratio">2.6 Ratio</a></li>
  48. <li><a name="toc-Color" href="#Color">2.7 Color</a></li>
  49. <li><a name="toc-Channel-Layout" href="#Channel-Layout">2.8 Channel Layout</a></li>
  50. </ul></li>
  51. <li><a name="toc-Expression-Evaluation" href="#Expression-Evaluation">3 Expression Evaluation</a></li>
  52. <li><a name="toc-See-Also" href="#See-Also">4 See Also</a></li>
  53. <li><a name="toc-Authors" href="#Authors">5 Authors</a></li>
  54. </ul>
  55. </div>
  56. <hr size="6">
  57. <a name="Description"></a>
  58. <h1 class="chapter"><a href="ffmpeg-utils.html#toc-Description">1 Description</a></h1>
  59. <p>This document describes some generic features and utilities provided
  60. by the libavutil library.
  61. </p>
  62. <a name="Syntax"></a>
  63. <h1 class="chapter"><a href="ffmpeg-utils.html#toc-Syntax">2 Syntax</a></h1>
  64. <p>This section documents the syntax and formats employed by the FFmpeg
  65. libraries and tools.
  66. </p>
  67. <p><a name="quoting_005fand_005fescaping"></a>
  68. </p><a name="Quoting-and-escaping"></a>
  69. <h2 class="section"><a href="ffmpeg-utils.html#toc-Quoting-and-escaping">2.1 Quoting and escaping</a></h2>
  70. <p>FFmpeg adopts the following quoting and escaping mechanism, unless
  71. explicitly specified. The following rules are applied:
  72. </p>
  73. <ul>
  74. <li>
  75. &lsquo;<samp>'</samp>&rsquo; and &lsquo;<samp>\</samp>&rsquo; are special characters (respectively used for
  76. quoting and escaping). In addition to them, there might be other
  77. special characters depending on the specific syntax where the escaping
  78. and quoting are employed.
  79. </li><li>
  80. A special character is escaped by prefixing it with a &lsquo;<samp>\</samp>&rsquo;.
  81. </li><li>
  82. All characters enclosed between &lsquo;<samp>''</samp>&rsquo; are included literally in the
  83. parsed string. The quote character &lsquo;<samp>'</samp>&rsquo; itself cannot be quoted,
  84. so you may need to close the quote and escape it.
  85. </li><li>
  86. Leading and trailing whitespaces, unless escaped or quoted, are
  87. removed from the parsed string.
  88. </li></ul>
  89. <p>Note that you may need to add a second level of escaping when using
  90. the command line or a script, which depends on the syntax of the
  91. adopted shell language.
  92. </p>
  93. <p>The function <code>av_get_token</code> defined in
  94. &lsquo;<tt>libavutil/avstring.h</tt>&rsquo; can be used to parse a token quoted or
  95. escaped according to the rules defined above.
  96. </p>
  97. <p>The tool &lsquo;<tt>tools/ffescape</tt>&rsquo; in the FFmpeg source tree can be used
  98. to automatically quote or escape a string in a script.
  99. </p>
  100. <a name="Examples"></a>
  101. <h3 class="subsection"><a href="ffmpeg-utils.html#toc-Examples">2.1.1 Examples</a></h3>
  102. <ul>
  103. <li>
  104. Escape the string <code>Crime d'Amour</code> containing the <code>'</code> special
  105. character:
  106. <div class="example">
  107. <pre class="example">Crime d\'Amour
  108. </pre></div>
  109. </li><li>
  110. The string above contains a quote, so the <code>'</code> needs to be escaped
  111. when quoting it:
  112. <div class="example">
  113. <pre class="example">'Crime d'\''Amour'
  114. </pre></div>
  115. </li><li>
  116. Include leading or trailing whitespaces using quoting:
  117. <div class="example">
  118. <pre class="example">' this string starts and ends with whitespaces '
  119. </pre></div>
  120. </li><li>
  121. Escaping and quoting can be mixed together:
  122. <div class="example">
  123. <pre class="example">' The string '\'string\'' is a string '
  124. </pre></div>
  125. </li><li>
  126. To include a literal &lsquo;<samp>\</samp>&rsquo; you can use either escaping or quoting:
  127. <div class="example">
  128. <pre class="example">'c:\foo' can be written as c:\\foo
  129. </pre></div>
  130. </li></ul>
  131. <p><a name="date-syntax"></a>
  132. </p><a name="Date"></a>
  133. <h2 class="section"><a href="ffmpeg-utils.html#toc-Date">2.2 Date</a></h2>
  134. <p>The accepted syntax is:
  135. </p><div class="example">
  136. <pre class="example">[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
  137. now
  138. </pre></div>
  139. <p>If the value is &quot;now&quot; it takes the current time.
  140. </p>
  141. <p>Time is local time unless Z is appended, in which case it is
  142. interpreted as UTC.
  143. If the year-month-day part is not specified it takes the current
  144. year-month-day.
  145. </p>
  146. <p><a name="time-duration-syntax"></a>
  147. </p><a name="Time-duration"></a>
  148. <h2 class="section"><a href="ffmpeg-utils.html#toc-Time-duration">2.3 Time duration</a></h2>
  149. <p>There are two accepted syntaxes for expressing time duration.
  150. </p>
  151. <div class="example">
  152. <pre class="example">[-][<var>HH</var>:]<var>MM</var>:<var>SS</var>[.<var>m</var>...]
  153. </pre></div>
  154. <p><var>HH</var> expresses the number of hours, <var>MM</var> the number of minutes
  155. for a maximum of 2 digits, and <var>SS</var> the number of seconds for a
  156. maximum of 2 digits. The <var>m</var> at the end expresses decimal value for
  157. <var>SS</var>.
  158. </p>
  159. <p><em>or</em>
  160. </p>
  161. <div class="example">
  162. <pre class="example">[-]<var>S</var>+[.<var>m</var>...]
  163. </pre></div>
  164. <p><var>S</var> expresses the number of seconds, with the optional decimal part
  165. <var>m</var>.
  166. </p>
  167. <p>In both expressions, the optional &lsquo;<samp>-</samp>&rsquo; indicates negative duration.
  168. </p>
  169. <a name="Examples-1"></a>
  170. <h3 class="subsection"><a href="ffmpeg-utils.html#toc-Examples-1">2.3.1 Examples</a></h3>
  171. <p>The following examples are all valid time duration:
  172. </p>
  173. <dl compact="compact">
  174. <dt>&lsquo;<samp>55</samp>&rsquo;</dt>
  175. <dd><p>55 seconds
  176. </p>
  177. </dd>
  178. <dt>&lsquo;<samp>0.2</samp>&rsquo;</dt>
  179. <dd><p>0.2 seconds
  180. </p>
  181. </dd>
  182. <dt>&lsquo;<samp>200ms</samp>&rsquo;</dt>
  183. <dd><p>200 milliseconds, that&rsquo;s 0.2s
  184. </p>
  185. </dd>
  186. <dt>&lsquo;<samp>200000us</samp>&rsquo;</dt>
  187. <dd><p>200000 microseconds, that&rsquo;s 0.2s
  188. </p>
  189. </dd>
  190. <dt>&lsquo;<samp>12:03:45</samp>&rsquo;</dt>
  191. <dd><p>12 hours, 03 minutes and 45 seconds
  192. </p>
  193. </dd>
  194. <dt>&lsquo;<samp>23.189</samp>&rsquo;</dt>
  195. <dd><p>23.189 seconds
  196. </p></dd>
  197. </dl>
  198. <p><a name="video-size-syntax"></a>
  199. </p><a name="Video-size"></a>
  200. <h2 class="section"><a href="ffmpeg-utils.html#toc-Video-size">2.4 Video size</a></h2>
  201. <p>Specify the size of the sourced video, it may be a string of the form
  202. <var>width</var>x<var>height</var>, or the name of a size abbreviation.
  203. </p>
  204. <p>The following abbreviations are recognized:
  205. </p><dl compact="compact">
  206. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  207. <dd><p>720x480
  208. </p></dd>
  209. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  210. <dd><p>720x576
  211. </p></dd>
  212. <dt>&lsquo;<samp>qntsc</samp>&rsquo;</dt>
  213. <dd><p>352x240
  214. </p></dd>
  215. <dt>&lsquo;<samp>qpal</samp>&rsquo;</dt>
  216. <dd><p>352x288
  217. </p></dd>
  218. <dt>&lsquo;<samp>sntsc</samp>&rsquo;</dt>
  219. <dd><p>640x480
  220. </p></dd>
  221. <dt>&lsquo;<samp>spal</samp>&rsquo;</dt>
  222. <dd><p>768x576
  223. </p></dd>
  224. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  225. <dd><p>352x240
  226. </p></dd>
  227. <dt>&lsquo;<samp>ntsc-film</samp>&rsquo;</dt>
  228. <dd><p>352x240
  229. </p></dd>
  230. <dt>&lsquo;<samp>sqcif</samp>&rsquo;</dt>
  231. <dd><p>128x96
  232. </p></dd>
  233. <dt>&lsquo;<samp>qcif</samp>&rsquo;</dt>
  234. <dd><p>176x144
  235. </p></dd>
  236. <dt>&lsquo;<samp>cif</samp>&rsquo;</dt>
  237. <dd><p>352x288
  238. </p></dd>
  239. <dt>&lsquo;<samp>4cif</samp>&rsquo;</dt>
  240. <dd><p>704x576
  241. </p></dd>
  242. <dt>&lsquo;<samp>16cif</samp>&rsquo;</dt>
  243. <dd><p>1408x1152
  244. </p></dd>
  245. <dt>&lsquo;<samp>qqvga</samp>&rsquo;</dt>
  246. <dd><p>160x120
  247. </p></dd>
  248. <dt>&lsquo;<samp>qvga</samp>&rsquo;</dt>
  249. <dd><p>320x240
  250. </p></dd>
  251. <dt>&lsquo;<samp>vga</samp>&rsquo;</dt>
  252. <dd><p>640x480
  253. </p></dd>
  254. <dt>&lsquo;<samp>svga</samp>&rsquo;</dt>
  255. <dd><p>800x600
  256. </p></dd>
  257. <dt>&lsquo;<samp>xga</samp>&rsquo;</dt>
  258. <dd><p>1024x768
  259. </p></dd>
  260. <dt>&lsquo;<samp>uxga</samp>&rsquo;</dt>
  261. <dd><p>1600x1200
  262. </p></dd>
  263. <dt>&lsquo;<samp>qxga</samp>&rsquo;</dt>
  264. <dd><p>2048x1536
  265. </p></dd>
  266. <dt>&lsquo;<samp>sxga</samp>&rsquo;</dt>
  267. <dd><p>1280x1024
  268. </p></dd>
  269. <dt>&lsquo;<samp>qsxga</samp>&rsquo;</dt>
  270. <dd><p>2560x2048
  271. </p></dd>
  272. <dt>&lsquo;<samp>hsxga</samp>&rsquo;</dt>
  273. <dd><p>5120x4096
  274. </p></dd>
  275. <dt>&lsquo;<samp>wvga</samp>&rsquo;</dt>
  276. <dd><p>852x480
  277. </p></dd>
  278. <dt>&lsquo;<samp>wxga</samp>&rsquo;</dt>
  279. <dd><p>1366x768
  280. </p></dd>
  281. <dt>&lsquo;<samp>wsxga</samp>&rsquo;</dt>
  282. <dd><p>1600x1024
  283. </p></dd>
  284. <dt>&lsquo;<samp>wuxga</samp>&rsquo;</dt>
  285. <dd><p>1920x1200
  286. </p></dd>
  287. <dt>&lsquo;<samp>woxga</samp>&rsquo;</dt>
  288. <dd><p>2560x1600
  289. </p></dd>
  290. <dt>&lsquo;<samp>wqsxga</samp>&rsquo;</dt>
  291. <dd><p>3200x2048
  292. </p></dd>
  293. <dt>&lsquo;<samp>wquxga</samp>&rsquo;</dt>
  294. <dd><p>3840x2400
  295. </p></dd>
  296. <dt>&lsquo;<samp>whsxga</samp>&rsquo;</dt>
  297. <dd><p>6400x4096
  298. </p></dd>
  299. <dt>&lsquo;<samp>whuxga</samp>&rsquo;</dt>
  300. <dd><p>7680x4800
  301. </p></dd>
  302. <dt>&lsquo;<samp>cga</samp>&rsquo;</dt>
  303. <dd><p>320x200
  304. </p></dd>
  305. <dt>&lsquo;<samp>ega</samp>&rsquo;</dt>
  306. <dd><p>640x350
  307. </p></dd>
  308. <dt>&lsquo;<samp>hd480</samp>&rsquo;</dt>
  309. <dd><p>852x480
  310. </p></dd>
  311. <dt>&lsquo;<samp>hd720</samp>&rsquo;</dt>
  312. <dd><p>1280x720
  313. </p></dd>
  314. <dt>&lsquo;<samp>hd1080</samp>&rsquo;</dt>
  315. <dd><p>1920x1080
  316. </p></dd>
  317. <dt>&lsquo;<samp>2k</samp>&rsquo;</dt>
  318. <dd><p>2048x1080
  319. </p></dd>
  320. <dt>&lsquo;<samp>2kflat</samp>&rsquo;</dt>
  321. <dd><p>1998x1080
  322. </p></dd>
  323. <dt>&lsquo;<samp>2kscope</samp>&rsquo;</dt>
  324. <dd><p>2048x858
  325. </p></dd>
  326. <dt>&lsquo;<samp>4k</samp>&rsquo;</dt>
  327. <dd><p>4096x2160
  328. </p></dd>
  329. <dt>&lsquo;<samp>4kflat</samp>&rsquo;</dt>
  330. <dd><p>3996x2160
  331. </p></dd>
  332. <dt>&lsquo;<samp>4kscope</samp>&rsquo;</dt>
  333. <dd><p>4096x1716
  334. </p></dd>
  335. <dt>&lsquo;<samp>nhd</samp>&rsquo;</dt>
  336. <dd><p>640x360
  337. </p></dd>
  338. <dt>&lsquo;<samp>hqvga</samp>&rsquo;</dt>
  339. <dd><p>240x160
  340. </p></dd>
  341. <dt>&lsquo;<samp>wqvga</samp>&rsquo;</dt>
  342. <dd><p>400x240
  343. </p></dd>
  344. <dt>&lsquo;<samp>fwqvga</samp>&rsquo;</dt>
  345. <dd><p>432x240
  346. </p></dd>
  347. <dt>&lsquo;<samp>hvga</samp>&rsquo;</dt>
  348. <dd><p>480x320
  349. </p></dd>
  350. <dt>&lsquo;<samp>qhd</samp>&rsquo;</dt>
  351. <dd><p>960x540
  352. </p></dd>
  353. <dt>&lsquo;<samp>2kdci</samp>&rsquo;</dt>
  354. <dd><p>2048x1080
  355. </p></dd>
  356. <dt>&lsquo;<samp>4kdci</samp>&rsquo;</dt>
  357. <dd><p>4096x2160
  358. </p></dd>
  359. <dt>&lsquo;<samp>uhd2160</samp>&rsquo;</dt>
  360. <dd><p>3840x2160
  361. </p></dd>
  362. <dt>&lsquo;<samp>uhd4320</samp>&rsquo;</dt>
  363. <dd><p>7680x4320
  364. </p></dd>
  365. </dl>
  366. <p><a name="video-rate-syntax"></a>
  367. </p><a name="Video-rate"></a>
  368. <h2 class="section"><a href="ffmpeg-utils.html#toc-Video-rate">2.5 Video rate</a></h2>
  369. <p>Specify the frame rate of a video, expressed as the number of frames
  370. generated per second. It has to be a string in the format
  371. <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
  372. number or a valid video frame rate abbreviation.
  373. </p>
  374. <p>The following abbreviations are recognized:
  375. </p><dl compact="compact">
  376. <dt>&lsquo;<samp>ntsc</samp>&rsquo;</dt>
  377. <dd><p>30000/1001
  378. </p></dd>
  379. <dt>&lsquo;<samp>pal</samp>&rsquo;</dt>
  380. <dd><p>25/1
  381. </p></dd>
  382. <dt>&lsquo;<samp>qntsc</samp>&rsquo;</dt>
  383. <dd><p>30000/1001
  384. </p></dd>
  385. <dt>&lsquo;<samp>qpal</samp>&rsquo;</dt>
  386. <dd><p>25/1
  387. </p></dd>
  388. <dt>&lsquo;<samp>sntsc</samp>&rsquo;</dt>
  389. <dd><p>30000/1001
  390. </p></dd>
  391. <dt>&lsquo;<samp>spal</samp>&rsquo;</dt>
  392. <dd><p>25/1
  393. </p></dd>
  394. <dt>&lsquo;<samp>film</samp>&rsquo;</dt>
  395. <dd><p>24/1
  396. </p></dd>
  397. <dt>&lsquo;<samp>ntsc-film</samp>&rsquo;</dt>
  398. <dd><p>24000/1001
  399. </p></dd>
  400. </dl>
  401. <p><a name="ratio-syntax"></a>
  402. </p><a name="Ratio"></a>
  403. <h2 class="section"><a href="ffmpeg-utils.html#toc-Ratio">2.6 Ratio</a></h2>
  404. <p>A ratio can be expressed as an expression, or in the form
  405. <var>numerator</var>:<var>denominator</var>.
  406. </p>
  407. <p>Note that a ratio with infinite (1/0) or negative value is
  408. considered valid, so you should check on the returned value if you
  409. want to exclude those values.
  410. </p>
  411. <p>The undefined value can be expressed using the &quot;0:0&quot; string.
  412. </p>
  413. <p><a name="color-syntax"></a>
  414. </p><a name="Color"></a>
  415. <h2 class="section"><a href="ffmpeg-utils.html#toc-Color">2.7 Color</a></h2>
  416. <p>It can be the name of a color as defined below (case insensitive match) or a
  417. <code>[0x|#]RRGGBB[AA]</code> sequence, possibly followed by @ and a string
  418. representing the alpha component.
  419. </p>
  420. <p>The alpha component may be a string composed by &quot;0x&quot; followed by an
  421. hexadecimal number or a decimal number between 0.0 and 1.0, which
  422. represents the opacity value (&lsquo;<samp>0x00</samp>&rsquo; or &lsquo;<samp>0.0</samp>&rsquo; means completely
  423. transparent, &lsquo;<samp>0xff</samp>&rsquo; or &lsquo;<samp>1.0</samp>&rsquo; completely opaque). If the alpha
  424. component is not specified then &lsquo;<samp>0xff</samp>&rsquo; is assumed.
  425. </p>
  426. <p>The string &lsquo;<samp>random</samp>&rsquo; will result in a random color.
  427. </p>
  428. <p>The following names of colors are recognized:
  429. </p><dl compact="compact">
  430. <dt>&lsquo;<samp>AliceBlue</samp>&rsquo;</dt>
  431. <dd><p>0xF0F8FF
  432. </p></dd>
  433. <dt>&lsquo;<samp>AntiqueWhite</samp>&rsquo;</dt>
  434. <dd><p>0xFAEBD7
  435. </p></dd>
  436. <dt>&lsquo;<samp>Aqua</samp>&rsquo;</dt>
  437. <dd><p>0x00FFFF
  438. </p></dd>
  439. <dt>&lsquo;<samp>Aquamarine</samp>&rsquo;</dt>
  440. <dd><p>0x7FFFD4
  441. </p></dd>
  442. <dt>&lsquo;<samp>Azure</samp>&rsquo;</dt>
  443. <dd><p>0xF0FFFF
  444. </p></dd>
  445. <dt>&lsquo;<samp>Beige</samp>&rsquo;</dt>
  446. <dd><p>0xF5F5DC
  447. </p></dd>
  448. <dt>&lsquo;<samp>Bisque</samp>&rsquo;</dt>
  449. <dd><p>0xFFE4C4
  450. </p></dd>
  451. <dt>&lsquo;<samp>Black</samp>&rsquo;</dt>
  452. <dd><p>0x000000
  453. </p></dd>
  454. <dt>&lsquo;<samp>BlanchedAlmond</samp>&rsquo;</dt>
  455. <dd><p>0xFFEBCD
  456. </p></dd>
  457. <dt>&lsquo;<samp>Blue</samp>&rsquo;</dt>
  458. <dd><p>0x0000FF
  459. </p></dd>
  460. <dt>&lsquo;<samp>BlueViolet</samp>&rsquo;</dt>
  461. <dd><p>0x8A2BE2
  462. </p></dd>
  463. <dt>&lsquo;<samp>Brown</samp>&rsquo;</dt>
  464. <dd><p>0xA52A2A
  465. </p></dd>
  466. <dt>&lsquo;<samp>BurlyWood</samp>&rsquo;</dt>
  467. <dd><p>0xDEB887
  468. </p></dd>
  469. <dt>&lsquo;<samp>CadetBlue</samp>&rsquo;</dt>
  470. <dd><p>0x5F9EA0
  471. </p></dd>
  472. <dt>&lsquo;<samp>Chartreuse</samp>&rsquo;</dt>
  473. <dd><p>0x7FFF00
  474. </p></dd>
  475. <dt>&lsquo;<samp>Chocolate</samp>&rsquo;</dt>
  476. <dd><p>0xD2691E
  477. </p></dd>
  478. <dt>&lsquo;<samp>Coral</samp>&rsquo;</dt>
  479. <dd><p>0xFF7F50
  480. </p></dd>
  481. <dt>&lsquo;<samp>CornflowerBlue</samp>&rsquo;</dt>
  482. <dd><p>0x6495ED
  483. </p></dd>
  484. <dt>&lsquo;<samp>Cornsilk</samp>&rsquo;</dt>
  485. <dd><p>0xFFF8DC
  486. </p></dd>
  487. <dt>&lsquo;<samp>Crimson</samp>&rsquo;</dt>
  488. <dd><p>0xDC143C
  489. </p></dd>
  490. <dt>&lsquo;<samp>Cyan</samp>&rsquo;</dt>
  491. <dd><p>0x00FFFF
  492. </p></dd>
  493. <dt>&lsquo;<samp>DarkBlue</samp>&rsquo;</dt>
  494. <dd><p>0x00008B
  495. </p></dd>
  496. <dt>&lsquo;<samp>DarkCyan</samp>&rsquo;</dt>
  497. <dd><p>0x008B8B
  498. </p></dd>
  499. <dt>&lsquo;<samp>DarkGoldenRod</samp>&rsquo;</dt>
  500. <dd><p>0xB8860B
  501. </p></dd>
  502. <dt>&lsquo;<samp>DarkGray</samp>&rsquo;</dt>
  503. <dd><p>0xA9A9A9
  504. </p></dd>
  505. <dt>&lsquo;<samp>DarkGreen</samp>&rsquo;</dt>
  506. <dd><p>0x006400
  507. </p></dd>
  508. <dt>&lsquo;<samp>DarkKhaki</samp>&rsquo;</dt>
  509. <dd><p>0xBDB76B
  510. </p></dd>
  511. <dt>&lsquo;<samp>DarkMagenta</samp>&rsquo;</dt>
  512. <dd><p>0x8B008B
  513. </p></dd>
  514. <dt>&lsquo;<samp>DarkOliveGreen</samp>&rsquo;</dt>
  515. <dd><p>0x556B2F
  516. </p></dd>
  517. <dt>&lsquo;<samp>Darkorange</samp>&rsquo;</dt>
  518. <dd><p>0xFF8C00
  519. </p></dd>
  520. <dt>&lsquo;<samp>DarkOrchid</samp>&rsquo;</dt>
  521. <dd><p>0x9932CC
  522. </p></dd>
  523. <dt>&lsquo;<samp>DarkRed</samp>&rsquo;</dt>
  524. <dd><p>0x8B0000
  525. </p></dd>
  526. <dt>&lsquo;<samp>DarkSalmon</samp>&rsquo;</dt>
  527. <dd><p>0xE9967A
  528. </p></dd>
  529. <dt>&lsquo;<samp>DarkSeaGreen</samp>&rsquo;</dt>
  530. <dd><p>0x8FBC8F
  531. </p></dd>
  532. <dt>&lsquo;<samp>DarkSlateBlue</samp>&rsquo;</dt>
  533. <dd><p>0x483D8B
  534. </p></dd>
  535. <dt>&lsquo;<samp>DarkSlateGray</samp>&rsquo;</dt>
  536. <dd><p>0x2F4F4F
  537. </p></dd>
  538. <dt>&lsquo;<samp>DarkTurquoise</samp>&rsquo;</dt>
  539. <dd><p>0x00CED1
  540. </p></dd>
  541. <dt>&lsquo;<samp>DarkViolet</samp>&rsquo;</dt>
  542. <dd><p>0x9400D3
  543. </p></dd>
  544. <dt>&lsquo;<samp>DeepPink</samp>&rsquo;</dt>
  545. <dd><p>0xFF1493
  546. </p></dd>
  547. <dt>&lsquo;<samp>DeepSkyBlue</samp>&rsquo;</dt>
  548. <dd><p>0x00BFFF
  549. </p></dd>
  550. <dt>&lsquo;<samp>DimGray</samp>&rsquo;</dt>
  551. <dd><p>0x696969
  552. </p></dd>
  553. <dt>&lsquo;<samp>DodgerBlue</samp>&rsquo;</dt>
  554. <dd><p>0x1E90FF
  555. </p></dd>
  556. <dt>&lsquo;<samp>FireBrick</samp>&rsquo;</dt>
  557. <dd><p>0xB22222
  558. </p></dd>
  559. <dt>&lsquo;<samp>FloralWhite</samp>&rsquo;</dt>
  560. <dd><p>0xFFFAF0
  561. </p></dd>
  562. <dt>&lsquo;<samp>ForestGreen</samp>&rsquo;</dt>
  563. <dd><p>0x228B22
  564. </p></dd>
  565. <dt>&lsquo;<samp>Fuchsia</samp>&rsquo;</dt>
  566. <dd><p>0xFF00FF
  567. </p></dd>
  568. <dt>&lsquo;<samp>Gainsboro</samp>&rsquo;</dt>
  569. <dd><p>0xDCDCDC
  570. </p></dd>
  571. <dt>&lsquo;<samp>GhostWhite</samp>&rsquo;</dt>
  572. <dd><p>0xF8F8FF
  573. </p></dd>
  574. <dt>&lsquo;<samp>Gold</samp>&rsquo;</dt>
  575. <dd><p>0xFFD700
  576. </p></dd>
  577. <dt>&lsquo;<samp>GoldenRod</samp>&rsquo;</dt>
  578. <dd><p>0xDAA520
  579. </p></dd>
  580. <dt>&lsquo;<samp>Gray</samp>&rsquo;</dt>
  581. <dd><p>0x808080
  582. </p></dd>
  583. <dt>&lsquo;<samp>Green</samp>&rsquo;</dt>
  584. <dd><p>0x008000
  585. </p></dd>
  586. <dt>&lsquo;<samp>GreenYellow</samp>&rsquo;</dt>
  587. <dd><p>0xADFF2F
  588. </p></dd>
  589. <dt>&lsquo;<samp>HoneyDew</samp>&rsquo;</dt>
  590. <dd><p>0xF0FFF0
  591. </p></dd>
  592. <dt>&lsquo;<samp>HotPink</samp>&rsquo;</dt>
  593. <dd><p>0xFF69B4
  594. </p></dd>
  595. <dt>&lsquo;<samp>IndianRed</samp>&rsquo;</dt>
  596. <dd><p>0xCD5C5C
  597. </p></dd>
  598. <dt>&lsquo;<samp>Indigo</samp>&rsquo;</dt>
  599. <dd><p>0x4B0082
  600. </p></dd>
  601. <dt>&lsquo;<samp>Ivory</samp>&rsquo;</dt>
  602. <dd><p>0xFFFFF0
  603. </p></dd>
  604. <dt>&lsquo;<samp>Khaki</samp>&rsquo;</dt>
  605. <dd><p>0xF0E68C
  606. </p></dd>
  607. <dt>&lsquo;<samp>Lavender</samp>&rsquo;</dt>
  608. <dd><p>0xE6E6FA
  609. </p></dd>
  610. <dt>&lsquo;<samp>LavenderBlush</samp>&rsquo;</dt>
  611. <dd><p>0xFFF0F5
  612. </p></dd>
  613. <dt>&lsquo;<samp>LawnGreen</samp>&rsquo;</dt>
  614. <dd><p>0x7CFC00
  615. </p></dd>
  616. <dt>&lsquo;<samp>LemonChiffon</samp>&rsquo;</dt>
  617. <dd><p>0xFFFACD
  618. </p></dd>
  619. <dt>&lsquo;<samp>LightBlue</samp>&rsquo;</dt>
  620. <dd><p>0xADD8E6
  621. </p></dd>
  622. <dt>&lsquo;<samp>LightCoral</samp>&rsquo;</dt>
  623. <dd><p>0xF08080
  624. </p></dd>
  625. <dt>&lsquo;<samp>LightCyan</samp>&rsquo;</dt>
  626. <dd><p>0xE0FFFF
  627. </p></dd>
  628. <dt>&lsquo;<samp>LightGoldenRodYellow</samp>&rsquo;</dt>
  629. <dd><p>0xFAFAD2
  630. </p></dd>
  631. <dt>&lsquo;<samp>LightGreen</samp>&rsquo;</dt>
  632. <dd><p>0x90EE90
  633. </p></dd>
  634. <dt>&lsquo;<samp>LightGrey</samp>&rsquo;</dt>
  635. <dd><p>0xD3D3D3
  636. </p></dd>
  637. <dt>&lsquo;<samp>LightPink</samp>&rsquo;</dt>
  638. <dd><p>0xFFB6C1
  639. </p></dd>
  640. <dt>&lsquo;<samp>LightSalmon</samp>&rsquo;</dt>
  641. <dd><p>0xFFA07A
  642. </p></dd>
  643. <dt>&lsquo;<samp>LightSeaGreen</samp>&rsquo;</dt>
  644. <dd><p>0x20B2AA
  645. </p></dd>
  646. <dt>&lsquo;<samp>LightSkyBlue</samp>&rsquo;</dt>
  647. <dd><p>0x87CEFA
  648. </p></dd>
  649. <dt>&lsquo;<samp>LightSlateGray</samp>&rsquo;</dt>
  650. <dd><p>0x778899
  651. </p></dd>
  652. <dt>&lsquo;<samp>LightSteelBlue</samp>&rsquo;</dt>
  653. <dd><p>0xB0C4DE
  654. </p></dd>
  655. <dt>&lsquo;<samp>LightYellow</samp>&rsquo;</dt>
  656. <dd><p>0xFFFFE0
  657. </p></dd>
  658. <dt>&lsquo;<samp>Lime</samp>&rsquo;</dt>
  659. <dd><p>0x00FF00
  660. </p></dd>
  661. <dt>&lsquo;<samp>LimeGreen</samp>&rsquo;</dt>
  662. <dd><p>0x32CD32
  663. </p></dd>
  664. <dt>&lsquo;<samp>Linen</samp>&rsquo;</dt>
  665. <dd><p>0xFAF0E6
  666. </p></dd>
  667. <dt>&lsquo;<samp>Magenta</samp>&rsquo;</dt>
  668. <dd><p>0xFF00FF
  669. </p></dd>
  670. <dt>&lsquo;<samp>Maroon</samp>&rsquo;</dt>
  671. <dd><p>0x800000
  672. </p></dd>
  673. <dt>&lsquo;<samp>MediumAquaMarine</samp>&rsquo;</dt>
  674. <dd><p>0x66CDAA
  675. </p></dd>
  676. <dt>&lsquo;<samp>MediumBlue</samp>&rsquo;</dt>
  677. <dd><p>0x0000CD
  678. </p></dd>
  679. <dt>&lsquo;<samp>MediumOrchid</samp>&rsquo;</dt>
  680. <dd><p>0xBA55D3
  681. </p></dd>
  682. <dt>&lsquo;<samp>MediumPurple</samp>&rsquo;</dt>
  683. <dd><p>0x9370D8
  684. </p></dd>
  685. <dt>&lsquo;<samp>MediumSeaGreen</samp>&rsquo;</dt>
  686. <dd><p>0x3CB371
  687. </p></dd>
  688. <dt>&lsquo;<samp>MediumSlateBlue</samp>&rsquo;</dt>
  689. <dd><p>0x7B68EE
  690. </p></dd>
  691. <dt>&lsquo;<samp>MediumSpringGreen</samp>&rsquo;</dt>
  692. <dd><p>0x00FA9A
  693. </p></dd>
  694. <dt>&lsquo;<samp>MediumTurquoise</samp>&rsquo;</dt>
  695. <dd><p>0x48D1CC
  696. </p></dd>
  697. <dt>&lsquo;<samp>MediumVioletRed</samp>&rsquo;</dt>
  698. <dd><p>0xC71585
  699. </p></dd>
  700. <dt>&lsquo;<samp>MidnightBlue</samp>&rsquo;</dt>
  701. <dd><p>0x191970
  702. </p></dd>
  703. <dt>&lsquo;<samp>MintCream</samp>&rsquo;</dt>
  704. <dd><p>0xF5FFFA
  705. </p></dd>
  706. <dt>&lsquo;<samp>MistyRose</samp>&rsquo;</dt>
  707. <dd><p>0xFFE4E1
  708. </p></dd>
  709. <dt>&lsquo;<samp>Moccasin</samp>&rsquo;</dt>
  710. <dd><p>0xFFE4B5
  711. </p></dd>
  712. <dt>&lsquo;<samp>NavajoWhite</samp>&rsquo;</dt>
  713. <dd><p>0xFFDEAD
  714. </p></dd>
  715. <dt>&lsquo;<samp>Navy</samp>&rsquo;</dt>
  716. <dd><p>0x000080
  717. </p></dd>
  718. <dt>&lsquo;<samp>OldLace</samp>&rsquo;</dt>
  719. <dd><p>0xFDF5E6
  720. </p></dd>
  721. <dt>&lsquo;<samp>Olive</samp>&rsquo;</dt>
  722. <dd><p>0x808000
  723. </p></dd>
  724. <dt>&lsquo;<samp>OliveDrab</samp>&rsquo;</dt>
  725. <dd><p>0x6B8E23
  726. </p></dd>
  727. <dt>&lsquo;<samp>Orange</samp>&rsquo;</dt>
  728. <dd><p>0xFFA500
  729. </p></dd>
  730. <dt>&lsquo;<samp>OrangeRed</samp>&rsquo;</dt>
  731. <dd><p>0xFF4500
  732. </p></dd>
  733. <dt>&lsquo;<samp>Orchid</samp>&rsquo;</dt>
  734. <dd><p>0xDA70D6
  735. </p></dd>
  736. <dt>&lsquo;<samp>PaleGoldenRod</samp>&rsquo;</dt>
  737. <dd><p>0xEEE8AA
  738. </p></dd>
  739. <dt>&lsquo;<samp>PaleGreen</samp>&rsquo;</dt>
  740. <dd><p>0x98FB98
  741. </p></dd>
  742. <dt>&lsquo;<samp>PaleTurquoise</samp>&rsquo;</dt>
  743. <dd><p>0xAFEEEE
  744. </p></dd>
  745. <dt>&lsquo;<samp>PaleVioletRed</samp>&rsquo;</dt>
  746. <dd><p>0xD87093
  747. </p></dd>
  748. <dt>&lsquo;<samp>PapayaWhip</samp>&rsquo;</dt>
  749. <dd><p>0xFFEFD5
  750. </p></dd>
  751. <dt>&lsquo;<samp>PeachPuff</samp>&rsquo;</dt>
  752. <dd><p>0xFFDAB9
  753. </p></dd>
  754. <dt>&lsquo;<samp>Peru</samp>&rsquo;</dt>
  755. <dd><p>0xCD853F
  756. </p></dd>
  757. <dt>&lsquo;<samp>Pink</samp>&rsquo;</dt>
  758. <dd><p>0xFFC0CB
  759. </p></dd>
  760. <dt>&lsquo;<samp>Plum</samp>&rsquo;</dt>
  761. <dd><p>0xDDA0DD
  762. </p></dd>
  763. <dt>&lsquo;<samp>PowderBlue</samp>&rsquo;</dt>
  764. <dd><p>0xB0E0E6
  765. </p></dd>
  766. <dt>&lsquo;<samp>Purple</samp>&rsquo;</dt>
  767. <dd><p>0x800080
  768. </p></dd>
  769. <dt>&lsquo;<samp>Red</samp>&rsquo;</dt>
  770. <dd><p>0xFF0000
  771. </p></dd>
  772. <dt>&lsquo;<samp>RosyBrown</samp>&rsquo;</dt>
  773. <dd><p>0xBC8F8F
  774. </p></dd>
  775. <dt>&lsquo;<samp>RoyalBlue</samp>&rsquo;</dt>
  776. <dd><p>0x4169E1
  777. </p></dd>
  778. <dt>&lsquo;<samp>SaddleBrown</samp>&rsquo;</dt>
  779. <dd><p>0x8B4513
  780. </p></dd>
  781. <dt>&lsquo;<samp>Salmon</samp>&rsquo;</dt>
  782. <dd><p>0xFA8072
  783. </p></dd>
  784. <dt>&lsquo;<samp>SandyBrown</samp>&rsquo;</dt>
  785. <dd><p>0xF4A460
  786. </p></dd>
  787. <dt>&lsquo;<samp>SeaGreen</samp>&rsquo;</dt>
  788. <dd><p>0x2E8B57
  789. </p></dd>
  790. <dt>&lsquo;<samp>SeaShell</samp>&rsquo;</dt>
  791. <dd><p>0xFFF5EE
  792. </p></dd>
  793. <dt>&lsquo;<samp>Sienna</samp>&rsquo;</dt>
  794. <dd><p>0xA0522D
  795. </p></dd>
  796. <dt>&lsquo;<samp>Silver</samp>&rsquo;</dt>
  797. <dd><p>0xC0C0C0
  798. </p></dd>
  799. <dt>&lsquo;<samp>SkyBlue</samp>&rsquo;</dt>
  800. <dd><p>0x87CEEB
  801. </p></dd>
  802. <dt>&lsquo;<samp>SlateBlue</samp>&rsquo;</dt>
  803. <dd><p>0x6A5ACD
  804. </p></dd>
  805. <dt>&lsquo;<samp>SlateGray</samp>&rsquo;</dt>
  806. <dd><p>0x708090
  807. </p></dd>
  808. <dt>&lsquo;<samp>Snow</samp>&rsquo;</dt>
  809. <dd><p>0xFFFAFA
  810. </p></dd>
  811. <dt>&lsquo;<samp>SpringGreen</samp>&rsquo;</dt>
  812. <dd><p>0x00FF7F
  813. </p></dd>
  814. <dt>&lsquo;<samp>SteelBlue</samp>&rsquo;</dt>
  815. <dd><p>0x4682B4
  816. </p></dd>
  817. <dt>&lsquo;<samp>Tan</samp>&rsquo;</dt>
  818. <dd><p>0xD2B48C
  819. </p></dd>
  820. <dt>&lsquo;<samp>Teal</samp>&rsquo;</dt>
  821. <dd><p>0x008080
  822. </p></dd>
  823. <dt>&lsquo;<samp>Thistle</samp>&rsquo;</dt>
  824. <dd><p>0xD8BFD8
  825. </p></dd>
  826. <dt>&lsquo;<samp>Tomato</samp>&rsquo;</dt>
  827. <dd><p>0xFF6347
  828. </p></dd>
  829. <dt>&lsquo;<samp>Turquoise</samp>&rsquo;</dt>
  830. <dd><p>0x40E0D0
  831. </p></dd>
  832. <dt>&lsquo;<samp>Violet</samp>&rsquo;</dt>
  833. <dd><p>0xEE82EE
  834. </p></dd>
  835. <dt>&lsquo;<samp>Wheat</samp>&rsquo;</dt>
  836. <dd><p>0xF5DEB3
  837. </p></dd>
  838. <dt>&lsquo;<samp>White</samp>&rsquo;</dt>
  839. <dd><p>0xFFFFFF
  840. </p></dd>
  841. <dt>&lsquo;<samp>WhiteSmoke</samp>&rsquo;</dt>
  842. <dd><p>0xF5F5F5
  843. </p></dd>
  844. <dt>&lsquo;<samp>Yellow</samp>&rsquo;</dt>
  845. <dd><p>0xFFFF00
  846. </p></dd>
  847. <dt>&lsquo;<samp>YellowGreen</samp>&rsquo;</dt>
  848. <dd><p>0x9ACD32
  849. </p></dd>
  850. </dl>
  851. <p><a name="channel-layout-syntax"></a>
  852. </p><a name="Channel-Layout"></a>
  853. <h2 class="section"><a href="ffmpeg-utils.html#toc-Channel-Layout">2.8 Channel Layout</a></h2>
  854. <p>A channel layout specifies the spatial disposition of the channels in
  855. a multi-channel audio stream. To specify a channel layout, FFmpeg
  856. makes use of a special syntax.
  857. </p>
  858. <p>Individual channels are identified by an id, as given by the table
  859. below:
  860. </p><dl compact="compact">
  861. <dt>&lsquo;<samp>FL</samp>&rsquo;</dt>
  862. <dd><p>front left
  863. </p></dd>
  864. <dt>&lsquo;<samp>FR</samp>&rsquo;</dt>
  865. <dd><p>front right
  866. </p></dd>
  867. <dt>&lsquo;<samp>FC</samp>&rsquo;</dt>
  868. <dd><p>front center
  869. </p></dd>
  870. <dt>&lsquo;<samp>LFE</samp>&rsquo;</dt>
  871. <dd><p>low frequency
  872. </p></dd>
  873. <dt>&lsquo;<samp>BL</samp>&rsquo;</dt>
  874. <dd><p>back left
  875. </p></dd>
  876. <dt>&lsquo;<samp>BR</samp>&rsquo;</dt>
  877. <dd><p>back right
  878. </p></dd>
  879. <dt>&lsquo;<samp>FLC</samp>&rsquo;</dt>
  880. <dd><p>front left-of-center
  881. </p></dd>
  882. <dt>&lsquo;<samp>FRC</samp>&rsquo;</dt>
  883. <dd><p>front right-of-center
  884. </p></dd>
  885. <dt>&lsquo;<samp>BC</samp>&rsquo;</dt>
  886. <dd><p>back center
  887. </p></dd>
  888. <dt>&lsquo;<samp>SL</samp>&rsquo;</dt>
  889. <dd><p>side left
  890. </p></dd>
  891. <dt>&lsquo;<samp>SR</samp>&rsquo;</dt>
  892. <dd><p>side right
  893. </p></dd>
  894. <dt>&lsquo;<samp>TC</samp>&rsquo;</dt>
  895. <dd><p>top center
  896. </p></dd>
  897. <dt>&lsquo;<samp>TFL</samp>&rsquo;</dt>
  898. <dd><p>top front left
  899. </p></dd>
  900. <dt>&lsquo;<samp>TFC</samp>&rsquo;</dt>
  901. <dd><p>top front center
  902. </p></dd>
  903. <dt>&lsquo;<samp>TFR</samp>&rsquo;</dt>
  904. <dd><p>top front right
  905. </p></dd>
  906. <dt>&lsquo;<samp>TBL</samp>&rsquo;</dt>
  907. <dd><p>top back left
  908. </p></dd>
  909. <dt>&lsquo;<samp>TBC</samp>&rsquo;</dt>
  910. <dd><p>top back center
  911. </p></dd>
  912. <dt>&lsquo;<samp>TBR</samp>&rsquo;</dt>
  913. <dd><p>top back right
  914. </p></dd>
  915. <dt>&lsquo;<samp>DL</samp>&rsquo;</dt>
  916. <dd><p>downmix left
  917. </p></dd>
  918. <dt>&lsquo;<samp>DR</samp>&rsquo;</dt>
  919. <dd><p>downmix right
  920. </p></dd>
  921. <dt>&lsquo;<samp>WL</samp>&rsquo;</dt>
  922. <dd><p>wide left
  923. </p></dd>
  924. <dt>&lsquo;<samp>WR</samp>&rsquo;</dt>
  925. <dd><p>wide right
  926. </p></dd>
  927. <dt>&lsquo;<samp>SDL</samp>&rsquo;</dt>
  928. <dd><p>surround direct left
  929. </p></dd>
  930. <dt>&lsquo;<samp>SDR</samp>&rsquo;</dt>
  931. <dd><p>surround direct right
  932. </p></dd>
  933. <dt>&lsquo;<samp>LFE2</samp>&rsquo;</dt>
  934. <dd><p>low frequency 2
  935. </p></dd>
  936. </dl>
  937. <p>Standard channel layout compositions can be specified by using the
  938. following identifiers:
  939. </p><dl compact="compact">
  940. <dt>&lsquo;<samp>mono</samp>&rsquo;</dt>
  941. <dd><p>FC
  942. </p></dd>
  943. <dt>&lsquo;<samp>stereo</samp>&rsquo;</dt>
  944. <dd><p>FL+FR
  945. </p></dd>
  946. <dt>&lsquo;<samp>2.1</samp>&rsquo;</dt>
  947. <dd><p>FL+FR+LFE
  948. </p></dd>
  949. <dt>&lsquo;<samp>3.0</samp>&rsquo;</dt>
  950. <dd><p>FL+FR+FC
  951. </p></dd>
  952. <dt>&lsquo;<samp>3.0(back)</samp>&rsquo;</dt>
  953. <dd><p>FL+FR+BC
  954. </p></dd>
  955. <dt>&lsquo;<samp>4.0</samp>&rsquo;</dt>
  956. <dd><p>FL+FR+FC+BC
  957. </p></dd>
  958. <dt>&lsquo;<samp>quad</samp>&rsquo;</dt>
  959. <dd><p>FL+FR+BL+BR
  960. </p></dd>
  961. <dt>&lsquo;<samp>quad(side)</samp>&rsquo;</dt>
  962. <dd><p>FL+FR+SL+SR
  963. </p></dd>
  964. <dt>&lsquo;<samp>3.1</samp>&rsquo;</dt>
  965. <dd><p>FL+FR+FC+LFE
  966. </p></dd>
  967. <dt>&lsquo;<samp>5.0</samp>&rsquo;</dt>
  968. <dd><p>FL+FR+FC+BL+BR
  969. </p></dd>
  970. <dt>&lsquo;<samp>5.0(side)</samp>&rsquo;</dt>
  971. <dd><p>FL+FR+FC+SL+SR
  972. </p></dd>
  973. <dt>&lsquo;<samp>4.1</samp>&rsquo;</dt>
  974. <dd><p>FL+FR+FC+LFE+BC
  975. </p></dd>
  976. <dt>&lsquo;<samp>5.1</samp>&rsquo;</dt>
  977. <dd><p>FL+FR+FC+LFE+BL+BR
  978. </p></dd>
  979. <dt>&lsquo;<samp>5.1(side)</samp>&rsquo;</dt>
  980. <dd><p>FL+FR+FC+LFE+SL+SR
  981. </p></dd>
  982. <dt>&lsquo;<samp>6.0</samp>&rsquo;</dt>
  983. <dd><p>FL+FR+FC+BC+SL+SR
  984. </p></dd>
  985. <dt>&lsquo;<samp>6.0(front)</samp>&rsquo;</dt>
  986. <dd><p>FL+FR+FLC+FRC+SL+SR
  987. </p></dd>
  988. <dt>&lsquo;<samp>hexagonal</samp>&rsquo;</dt>
  989. <dd><p>FL+FR+FC+BL+BR+BC
  990. </p></dd>
  991. <dt>&lsquo;<samp>6.1</samp>&rsquo;</dt>
  992. <dd><p>FL+FR+FC+LFE+BC+SL+SR
  993. </p></dd>
  994. <dt>&lsquo;<samp>6.1</samp>&rsquo;</dt>
  995. <dd><p>FL+FR+FC+LFE+BL+BR+BC
  996. </p></dd>
  997. <dt>&lsquo;<samp>6.1(front)</samp>&rsquo;</dt>
  998. <dd><p>FL+FR+LFE+FLC+FRC+SL+SR
  999. </p></dd>
  1000. <dt>&lsquo;<samp>7.0</samp>&rsquo;</dt>
  1001. <dd><p>FL+FR+FC+BL+BR+SL+SR
  1002. </p></dd>
  1003. <dt>&lsquo;<samp>7.0(front)</samp>&rsquo;</dt>
  1004. <dd><p>FL+FR+FC+FLC+FRC+SL+SR
  1005. </p></dd>
  1006. <dt>&lsquo;<samp>7.1</samp>&rsquo;</dt>
  1007. <dd><p>FL+FR+FC+LFE+BL+BR+SL+SR
  1008. </p></dd>
  1009. <dt>&lsquo;<samp>7.1(wide)</samp>&rsquo;</dt>
  1010. <dd><p>FL+FR+FC+LFE+BL+BR+FLC+FRC
  1011. </p></dd>
  1012. <dt>&lsquo;<samp>7.1(wide-side)</samp>&rsquo;</dt>
  1013. <dd><p>FL+FR+FC+LFE+FLC+FRC+SL+SR
  1014. </p></dd>
  1015. <dt>&lsquo;<samp>octagonal</samp>&rsquo;</dt>
  1016. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR
  1017. </p></dd>
  1018. <dt>&lsquo;<samp>hexadecagonal</samp>&rsquo;</dt>
  1019. <dd><p>FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR
  1020. </p></dd>
  1021. <dt>&lsquo;<samp>downmix</samp>&rsquo;</dt>
  1022. <dd><p>DL+DR
  1023. </p></dd>
  1024. </dl>
  1025. <p>A custom channel layout can be specified as a sequence of terms, separated by
  1026. &rsquo;+&rsquo; or &rsquo;|&rsquo;. Each term can be:
  1027. </p><ul>
  1028. <li>
  1029. the name of a standard channel layout (e.g. &lsquo;<samp>mono</samp>&rsquo;,
  1030. &lsquo;<samp>stereo</samp>&rsquo;, &lsquo;<samp>4.0</samp>&rsquo;, &lsquo;<samp>quad</samp>&rsquo;, &lsquo;<samp>5.0</samp>&rsquo;, etc.)
  1031. </li><li>
  1032. 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.)
  1033. </li><li>
  1034. a number of channels, in decimal, followed by &rsquo;c&rsquo;, yielding the default channel
  1035. layout for that number of channels (see the function
  1036. <code>av_get_default_channel_layout</code>). Note that not all channel counts have a
  1037. default layout.
  1038. </li><li>
  1039. a number of channels, in decimal, followed by &rsquo;C&rsquo;, yielding an unknown channel
  1040. layout with the specified number of channels. Note that not all channel layout
  1041. specification strings support unknown channel layouts.
  1042. </li><li>
  1043. a channel layout mask, in hexadecimal starting with &quot;0x&quot; (see the
  1044. <code>AV_CH_*</code> macros in &lsquo;<tt>libavutil/channel_layout.h</tt>&rsquo;.
  1045. </li></ul>
  1046. <p>Before libavutil version 53 the trailing character &quot;c&quot; to specify a number of
  1047. channels was optional, but now it is required, while a channel layout mask can
  1048. also be specified as a decimal number (if and only if not followed by &quot;c&quot; or &quot;C&quot;).
  1049. </p>
  1050. <p>See also the function <code>av_get_channel_layout</code> defined in
  1051. &lsquo;<tt>libavutil/channel_layout.h</tt>&rsquo;.
  1052. </p>
  1053. <a name="Expression-Evaluation"></a>
  1054. <h1 class="chapter"><a href="ffmpeg-utils.html#toc-Expression-Evaluation">3 Expression Evaluation</a></h1>
  1055. <p>When evaluating an arithmetic expression, FFmpeg uses an internal
  1056. formula evaluator, implemented through the &lsquo;<tt>libavutil/eval.h</tt>&rsquo;
  1057. interface.
  1058. </p>
  1059. <p>An expression may contain unary, binary operators, constants, and
  1060. functions.
  1061. </p>
  1062. <p>Two expressions <var>expr1</var> and <var>expr2</var> can be combined to form
  1063. another expression &quot;<var>expr1</var>;<var>expr2</var>&quot;.
  1064. <var>expr1</var> and <var>expr2</var> are evaluated in turn, and the new
  1065. expression evaluates to the value of <var>expr2</var>.
  1066. </p>
  1067. <p>The following binary operators are available: <code>+</code>, <code>-</code>,
  1068. <code>*</code>, <code>/</code>, <code>^</code>.
  1069. </p>
  1070. <p>The following unary operators are available: <code>+</code>, <code>-</code>.
  1071. </p>
  1072. <p>The following functions are available:
  1073. </p><dl compact="compact">
  1074. <dt>&lsquo;<samp>abs(x)</samp>&rsquo;</dt>
  1075. <dd><p>Compute absolute value of <var>x</var>.
  1076. </p>
  1077. </dd>
  1078. <dt>&lsquo;<samp>acos(x)</samp>&rsquo;</dt>
  1079. <dd><p>Compute arccosine of <var>x</var>.
  1080. </p>
  1081. </dd>
  1082. <dt>&lsquo;<samp>asin(x)</samp>&rsquo;</dt>
  1083. <dd><p>Compute arcsine of <var>x</var>.
  1084. </p>
  1085. </dd>
  1086. <dt>&lsquo;<samp>atan(x)</samp>&rsquo;</dt>
  1087. <dd><p>Compute arctangent of <var>x</var>.
  1088. </p>
  1089. </dd>
  1090. <dt>&lsquo;<samp>atan2(x, y)</samp>&rsquo;</dt>
  1091. <dd><p>Compute principal value of the arc tangent of <var>y</var>/<var>x</var>.
  1092. </p>
  1093. </dd>
  1094. <dt>&lsquo;<samp>between(x, min, max)</samp>&rsquo;</dt>
  1095. <dd><p>Return 1 if <var>x</var> is greater than or equal to <var>min</var> and lesser than or
  1096. equal to <var>max</var>, 0 otherwise.
  1097. </p>
  1098. </dd>
  1099. <dt>&lsquo;<samp>bitand(x, y)</samp>&rsquo;</dt>
  1100. <dt>&lsquo;<samp>bitor(x, y)</samp>&rsquo;</dt>
  1101. <dd><p>Compute bitwise and/or operation on <var>x</var> and <var>y</var>.
  1102. </p>
  1103. <p>The results of the evaluation of <var>x</var> and <var>y</var> are converted to
  1104. integers before executing the bitwise operation.
  1105. </p>
  1106. <p>Note that both the conversion to integer and the conversion back to
  1107. floating point can lose precision. Beware of unexpected results for
  1108. large numbers (usually 2^53 and larger).
  1109. </p>
  1110. </dd>
  1111. <dt>&lsquo;<samp>ceil(expr)</samp>&rsquo;</dt>
  1112. <dd><p>Round the value of expression <var>expr</var> upwards to the nearest
  1113. integer. For example, &quot;ceil(1.5)&quot; is &quot;2.0&quot;.
  1114. </p>
  1115. </dd>
  1116. <dt>&lsquo;<samp>clip(x, min, max)</samp>&rsquo;</dt>
  1117. <dd><p>Return the value of <var>x</var> clipped between <var>min</var> and <var>max</var>.
  1118. </p>
  1119. </dd>
  1120. <dt>&lsquo;<samp>cos(x)</samp>&rsquo;</dt>
  1121. <dd><p>Compute cosine of <var>x</var>.
  1122. </p>
  1123. </dd>
  1124. <dt>&lsquo;<samp>cosh(x)</samp>&rsquo;</dt>
  1125. <dd><p>Compute hyperbolic cosine of <var>x</var>.
  1126. </p>
  1127. </dd>
  1128. <dt>&lsquo;<samp>eq(x, y)</samp>&rsquo;</dt>
  1129. <dd><p>Return 1 if <var>x</var> and <var>y</var> are equivalent, 0 otherwise.
  1130. </p>
  1131. </dd>
  1132. <dt>&lsquo;<samp>exp(x)</samp>&rsquo;</dt>
  1133. <dd><p>Compute exponential of <var>x</var> (with base <code>e</code>, the Euler&rsquo;s number).
  1134. </p>
  1135. </dd>
  1136. <dt>&lsquo;<samp>floor(expr)</samp>&rsquo;</dt>
  1137. <dd><p>Round the value of expression <var>expr</var> downwards to the nearest
  1138. integer. For example, &quot;floor(-1.5)&quot; is &quot;-2.0&quot;.
  1139. </p>
  1140. </dd>
  1141. <dt>&lsquo;<samp>gauss(x)</samp>&rsquo;</dt>
  1142. <dd><p>Compute Gauss function of <var>x</var>, corresponding to
  1143. <code>exp(-x*x/2) / sqrt(2*PI)</code>.
  1144. </p>
  1145. </dd>
  1146. <dt>&lsquo;<samp>gcd(x, y)</samp>&rsquo;</dt>
  1147. <dd><p>Return the greatest common divisor of <var>x</var> and <var>y</var>. If both <var>x</var> and
  1148. <var>y</var> are 0 or either or both are less than zero then behavior is undefined.
  1149. </p>
  1150. </dd>
  1151. <dt>&lsquo;<samp>gt(x, y)</samp>&rsquo;</dt>
  1152. <dd><p>Return 1 if <var>x</var> is greater than <var>y</var>, 0 otherwise.
  1153. </p>
  1154. </dd>
  1155. <dt>&lsquo;<samp>gte(x, y)</samp>&rsquo;</dt>
  1156. <dd><p>Return 1 if <var>x</var> is greater than or equal to <var>y</var>, 0 otherwise.
  1157. </p>
  1158. </dd>
  1159. <dt>&lsquo;<samp>hypot(x, y)</samp>&rsquo;</dt>
  1160. <dd><p>This function is similar to the C function with the same name; it returns
  1161. &quot;sqrt(<var>x</var>*<var>x</var> + <var>y</var>*<var>y</var>)&quot;, the length of the hypotenuse of a
  1162. right triangle with sides of length <var>x</var> and <var>y</var>, or the distance of the
  1163. point (<var>x</var>, <var>y</var>) from the origin.
  1164. </p>
  1165. </dd>
  1166. <dt>&lsquo;<samp>if(x, y)</samp>&rsquo;</dt>
  1167. <dd><p>Evaluate <var>x</var>, and if the result is non-zero return the result of
  1168. the evaluation of <var>y</var>, return 0 otherwise.
  1169. </p>
  1170. </dd>
  1171. <dt>&lsquo;<samp>if(x, y, z)</samp>&rsquo;</dt>
  1172. <dd><p>Evaluate <var>x</var>, and if the result is non-zero return the evaluation
  1173. result of <var>y</var>, otherwise the evaluation result of <var>z</var>.
  1174. </p>
  1175. </dd>
  1176. <dt>&lsquo;<samp>ifnot(x, y)</samp>&rsquo;</dt>
  1177. <dd><p>Evaluate <var>x</var>, and if the result is zero return the result of the
  1178. evaluation of <var>y</var>, return 0 otherwise.
  1179. </p>
  1180. </dd>
  1181. <dt>&lsquo;<samp>ifnot(x, y, z)</samp>&rsquo;</dt>
  1182. <dd><p>Evaluate <var>x</var>, and if the result is zero return the evaluation
  1183. result of <var>y</var>, otherwise the evaluation result of <var>z</var>.
  1184. </p>
  1185. </dd>
  1186. <dt>&lsquo;<samp>isinf(x)</samp>&rsquo;</dt>
  1187. <dd><p>Return 1.0 if <var>x</var> is +/-INFINITY, 0.0 otherwise.
  1188. </p>
  1189. </dd>
  1190. <dt>&lsquo;<samp>isnan(x)</samp>&rsquo;</dt>
  1191. <dd><p>Return 1.0 if <var>x</var> is NAN, 0.0 otherwise.
  1192. </p>
  1193. </dd>
  1194. <dt>&lsquo;<samp>ld(var)</samp>&rsquo;</dt>
  1195. <dd><p>Load the value of the internal variable with number
  1196. <var>var</var>, which was previously stored with st(<var>var</var>, <var>expr</var>).
  1197. The function returns the loaded value.
  1198. </p>
  1199. </dd>
  1200. <dt>&lsquo;<samp>lerp(x, y, z)</samp>&rsquo;</dt>
  1201. <dd><p>Return linear interpolation between <var>x</var> and <var>y</var> by amount of <var>z</var>.
  1202. </p>
  1203. </dd>
  1204. <dt>&lsquo;<samp>log(x)</samp>&rsquo;</dt>
  1205. <dd><p>Compute natural logarithm of <var>x</var>.
  1206. </p>
  1207. </dd>
  1208. <dt>&lsquo;<samp>lt(x, y)</samp>&rsquo;</dt>
  1209. <dd><p>Return 1 if <var>x</var> is lesser than <var>y</var>, 0 otherwise.
  1210. </p>
  1211. </dd>
  1212. <dt>&lsquo;<samp>lte(x, y)</samp>&rsquo;</dt>
  1213. <dd><p>Return 1 if <var>x</var> is lesser than or equal to <var>y</var>, 0 otherwise.
  1214. </p>
  1215. </dd>
  1216. <dt>&lsquo;<samp>max(x, y)</samp>&rsquo;</dt>
  1217. <dd><p>Return the maximum between <var>x</var> and <var>y</var>.
  1218. </p>
  1219. </dd>
  1220. <dt>&lsquo;<samp>min(x, y)</samp>&rsquo;</dt>
  1221. <dd><p>Return the minimum between <var>x</var> and <var>y</var>.
  1222. </p>
  1223. </dd>
  1224. <dt>&lsquo;<samp>mod(x, y)</samp>&rsquo;</dt>
  1225. <dd><p>Compute the remainder of division of <var>x</var> by <var>y</var>.
  1226. </p>
  1227. </dd>
  1228. <dt>&lsquo;<samp>not(expr)</samp>&rsquo;</dt>
  1229. <dd><p>Return 1.0 if <var>expr</var> is zero, 0.0 otherwise.
  1230. </p>
  1231. </dd>
  1232. <dt>&lsquo;<samp>pow(x, y)</samp>&rsquo;</dt>
  1233. <dd><p>Compute the power of <var>x</var> elevated <var>y</var>, it is equivalent to
  1234. &quot;(<var>x</var>)^(<var>y</var>)&quot;.
  1235. </p>
  1236. </dd>
  1237. <dt>&lsquo;<samp>print(t)</samp>&rsquo;</dt>
  1238. <dt>&lsquo;<samp>print(t, l)</samp>&rsquo;</dt>
  1239. <dd><p>Print the value of expression <var>t</var> with loglevel <var>l</var>. If
  1240. <var>l</var> is not specified then a default log level is used.
  1241. Returns the value of the expression printed.
  1242. </p>
  1243. <p>Prints t with loglevel l
  1244. </p>
  1245. </dd>
  1246. <dt>&lsquo;<samp>random(x)</samp>&rsquo;</dt>
  1247. <dd><p>Return a pseudo random value between 0.0 and 1.0. <var>x</var> is the index of the
  1248. internal variable which will be used to save the seed/state.
  1249. </p>
  1250. </dd>
  1251. <dt>&lsquo;<samp>root(expr, max)</samp>&rsquo;</dt>
  1252. <dd><p>Find an input value for which the function represented by <var>expr</var>
  1253. with argument <var>ld(0)</var> is 0 in the interval 0..<var>max</var>.
  1254. </p>
  1255. <p>The expression in <var>expr</var> must denote a continuous function or the
  1256. result is undefined.
  1257. </p>
  1258. <p><var>ld(0)</var> is used to represent the function input value, which means
  1259. that the given expression will be evaluated multiple times with
  1260. various input values that the expression can access through
  1261. <code>ld(0)</code>. When the expression evaluates to 0 then the
  1262. corresponding input value will be returned.
  1263. </p>
  1264. </dd>
  1265. <dt>&lsquo;<samp>round(expr)</samp>&rsquo;</dt>
  1266. <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;.
  1267. </p>
  1268. </dd>
  1269. <dt>&lsquo;<samp>sgn(x)</samp>&rsquo;</dt>
  1270. <dd><p>Compute sign of <var>x</var>.
  1271. </p>
  1272. </dd>
  1273. <dt>&lsquo;<samp>sin(x)</samp>&rsquo;</dt>
  1274. <dd><p>Compute sine of <var>x</var>.
  1275. </p>
  1276. </dd>
  1277. <dt>&lsquo;<samp>sinh(x)</samp>&rsquo;</dt>
  1278. <dd><p>Compute hyperbolic sine of <var>x</var>.
  1279. </p>
  1280. </dd>
  1281. <dt>&lsquo;<samp>sqrt(expr)</samp>&rsquo;</dt>
  1282. <dd><p>Compute the square root of <var>expr</var>. This is equivalent to
  1283. &quot;(<var>expr</var>)^.5&quot;.
  1284. </p>
  1285. </dd>
  1286. <dt>&lsquo;<samp>squish(x)</samp>&rsquo;</dt>
  1287. <dd><p>Compute expression <code>1/(1 + exp(4*x))</code>.
  1288. </p>
  1289. </dd>
  1290. <dt>&lsquo;<samp>st(var, expr)</samp>&rsquo;</dt>
  1291. <dd><p>Store the value of the expression <var>expr</var> in an internal
  1292. variable. <var>var</var> specifies the number of the variable where to
  1293. store the value, and it is a value ranging from 0 to 9. The function
  1294. returns the value stored in the internal variable.
  1295. Note, Variables are currently not shared between expressions.
  1296. </p>
  1297. </dd>
  1298. <dt>&lsquo;<samp>tan(x)</samp>&rsquo;</dt>
  1299. <dd><p>Compute tangent of <var>x</var>.
  1300. </p>
  1301. </dd>
  1302. <dt>&lsquo;<samp>tanh(x)</samp>&rsquo;</dt>
  1303. <dd><p>Compute hyperbolic tangent of <var>x</var>.
  1304. </p>
  1305. </dd>
  1306. <dt>&lsquo;<samp>taylor(expr, x)</samp>&rsquo;</dt>
  1307. <dt>&lsquo;<samp>taylor(expr, x, id)</samp>&rsquo;</dt>
  1308. <dd><p>Evaluate a Taylor series at <var>x</var>, given an expression representing
  1309. the <code>ld(id)</code>-th derivative of a function at 0.
  1310. </p>
  1311. <p>When the series does not converge the result is undefined.
  1312. </p>
  1313. <p><var>ld(id)</var> is used to represent the derivative order in <var>expr</var>,
  1314. which means that the given expression will be evaluated multiple times
  1315. with various input values that the expression can access through
  1316. <code>ld(id)</code>. If <var>id</var> is not specified then 0 is assumed.
  1317. </p>
  1318. <p>Note, when you have the derivatives at y instead of 0,
  1319. <code>taylor(expr, x-y)</code> can be used.
  1320. </p>
  1321. </dd>
  1322. <dt>&lsquo;<samp>time(0)</samp>&rsquo;</dt>
  1323. <dd><p>Return the current (wallclock) time in seconds.
  1324. </p>
  1325. </dd>
  1326. <dt>&lsquo;<samp>trunc(expr)</samp>&rsquo;</dt>
  1327. <dd><p>Round the value of expression <var>expr</var> towards zero to the nearest
  1328. integer. For example, &quot;trunc(-1.5)&quot; is &quot;-1.0&quot;.
  1329. </p>
  1330. </dd>
  1331. <dt>&lsquo;<samp>while(cond, expr)</samp>&rsquo;</dt>
  1332. <dd><p>Evaluate expression <var>expr</var> while the expression <var>cond</var> is
  1333. non-zero, and returns the value of the last <var>expr</var> evaluation, or
  1334. NAN if <var>cond</var> was always false.
  1335. </p></dd>
  1336. </dl>
  1337. <p>The following constants are available:
  1338. </p><dl compact="compact">
  1339. <dt>&lsquo;<samp>PI</samp>&rsquo;</dt>
  1340. <dd><p>area of the unit disc, approximately 3.14
  1341. </p></dd>
  1342. <dt>&lsquo;<samp>E</samp>&rsquo;</dt>
  1343. <dd><p>exp(1) (Euler&rsquo;s number), approximately 2.718
  1344. </p></dd>
  1345. <dt>&lsquo;<samp>PHI</samp>&rsquo;</dt>
  1346. <dd><p>golden ratio (1+sqrt(5))/2, approximately 1.618
  1347. </p></dd>
  1348. </dl>
  1349. <p>Assuming that an expression is considered &quot;true&quot; if it has a non-zero
  1350. value, note that:
  1351. </p>
  1352. <p><code>*</code> works like AND
  1353. </p>
  1354. <p><code>+</code> works like OR
  1355. </p>
  1356. <p>For example the construct:
  1357. </p><div class="example">
  1358. <pre class="example">if (A AND B) then C
  1359. </pre></div>
  1360. <p>is equivalent to:
  1361. </p><div class="example">
  1362. <pre class="example">if(A*B, C)
  1363. </pre></div>
  1364. <p>In your C code, you can extend the list of unary and binary functions,
  1365. and define recognized constants, so that they are available for your
  1366. expressions.
  1367. </p>
  1368. <p>The evaluator also recognizes the International System unit prefixes.
  1369. If &rsquo;i&rsquo; is appended after the prefix, binary prefixes are used, which
  1370. are based on powers of 1024 instead of powers of 1000.
  1371. The &rsquo;B&rsquo; postfix multiplies the value by 8, and can be appended after a
  1372. unit prefix or used alone. This allows using for example &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;,
  1373. &rsquo;G&rsquo; and &rsquo;B&rsquo; as number postfix.
  1374. </p>
  1375. <p>The list of available International System prefixes follows, with
  1376. indication of the corresponding powers of 10 and of 2.
  1377. </p><dl compact="compact">
  1378. <dt>&lsquo;<samp>y</samp>&rsquo;</dt>
  1379. <dd><p>10^-24 / 2^-80
  1380. </p></dd>
  1381. <dt>&lsquo;<samp>z</samp>&rsquo;</dt>
  1382. <dd><p>10^-21 / 2^-70
  1383. </p></dd>
  1384. <dt>&lsquo;<samp>a</samp>&rsquo;</dt>
  1385. <dd><p>10^-18 / 2^-60
  1386. </p></dd>
  1387. <dt>&lsquo;<samp>f</samp>&rsquo;</dt>
  1388. <dd><p>10^-15 / 2^-50
  1389. </p></dd>
  1390. <dt>&lsquo;<samp>p</samp>&rsquo;</dt>
  1391. <dd><p>10^-12 / 2^-40
  1392. </p></dd>
  1393. <dt>&lsquo;<samp>n</samp>&rsquo;</dt>
  1394. <dd><p>10^-9 / 2^-30
  1395. </p></dd>
  1396. <dt>&lsquo;<samp>u</samp>&rsquo;</dt>
  1397. <dd><p>10^-6 / 2^-20
  1398. </p></dd>
  1399. <dt>&lsquo;<samp>m</samp>&rsquo;</dt>
  1400. <dd><p>10^-3 / 2^-10
  1401. </p></dd>
  1402. <dt>&lsquo;<samp>c</samp>&rsquo;</dt>
  1403. <dd><p>10^-2
  1404. </p></dd>
  1405. <dt>&lsquo;<samp>d</samp>&rsquo;</dt>
  1406. <dd><p>10^-1
  1407. </p></dd>
  1408. <dt>&lsquo;<samp>h</samp>&rsquo;</dt>
  1409. <dd><p>10^2
  1410. </p></dd>
  1411. <dt>&lsquo;<samp>k</samp>&rsquo;</dt>
  1412. <dd><p>10^3 / 2^10
  1413. </p></dd>
  1414. <dt>&lsquo;<samp>K</samp>&rsquo;</dt>
  1415. <dd><p>10^3 / 2^10
  1416. </p></dd>
  1417. <dt>&lsquo;<samp>M</samp>&rsquo;</dt>
  1418. <dd><p>10^6 / 2^20
  1419. </p></dd>
  1420. <dt>&lsquo;<samp>G</samp>&rsquo;</dt>
  1421. <dd><p>10^9 / 2^30
  1422. </p></dd>
  1423. <dt>&lsquo;<samp>T</samp>&rsquo;</dt>
  1424. <dd><p>10^12 / 2^40
  1425. </p></dd>
  1426. <dt>&lsquo;<samp>P</samp>&rsquo;</dt>
  1427. <dd><p>10^15 / 2^40
  1428. </p></dd>
  1429. <dt>&lsquo;<samp>E</samp>&rsquo;</dt>
  1430. <dd><p>10^18 / 2^50
  1431. </p></dd>
  1432. <dt>&lsquo;<samp>Z</samp>&rsquo;</dt>
  1433. <dd><p>10^21 / 2^60
  1434. </p></dd>
  1435. <dt>&lsquo;<samp>Y</samp>&rsquo;</dt>
  1436. <dd><p>10^24 / 2^70
  1437. </p></dd>
  1438. </dl>
  1439. <a name="See-Also"></a>
  1440. <h1 class="chapter"><a href="ffmpeg-utils.html#toc-See-Also">4 See Also</a></h1>
  1441. <p><a href="ffmpeg.html">ffmpeg</a>, <a href="ffplay.html">ffplay</a>, <a href="ffprobe.html">ffprobe</a>,
  1442. <a href="libavutil.html">libavutil</a>
  1443. </p>
  1444. <a name="Authors"></a>
  1445. <h1 class="chapter"><a href="ffmpeg-utils.html#toc-Authors">5 Authors</a></h1>
  1446. <p>The FFmpeg developers.
  1447. </p>
  1448. <p>For details about the authorship, see the Git history of the project
  1449. (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
  1450. <code>git log</code> in the FFmpeg source directory, or browsing the
  1451. online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
  1452. </p>
  1453. <p>Maintainers for the specific components are listed in the file
  1454. &lsquo;<tt>MAINTAINERS</tt>&rsquo; in the source code tree.
  1455. </p>
  1456. </div>
  1457. </body>
  1458. </html>