ffplay.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta charset="utf-8">
  6. <title>
  7. ffplay Documentation
  8. </title>
  9. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  10. <link rel="stylesheet" type="text/css" href="bootstrap.min.css">
  11. <link rel="stylesheet" type="text/css" href="style.min.css">
  12. </head>
  13. <body>
  14. <div class="container">
  15. <h1>
  16. ffplay Documentation
  17. </h1>
  18. <div align="center">
  19. </div>
  20. <a name="SEC_Top"></a>
  21. <span id="SEC_Contents"></span>
  22. <h2 class="contents-heading">Table of Contents</h2>
  23. <div class="contents">
  24. <ul class="no-bullet">
  25. <li><a id="toc-Synopsis" href="#Synopsis">1 Synopsis</a></li>
  26. <li><a id="toc-Description" href="#Description">2 Description</a></li>
  27. <li><a id="toc-Options" href="#Options">3 Options</a>
  28. <ul class="no-bullet">
  29. <li><a id="toc-Stream-specifiers-1" href="#Stream-specifiers-1">3.1 Stream specifiers</a></li>
  30. <li><a id="toc-Generic-options" href="#Generic-options">3.2 Generic options</a></li>
  31. <li><a id="toc-AVOptions" href="#AVOptions">3.3 AVOptions</a></li>
  32. <li><a id="toc-Main-options" href="#Main-options">3.4 Main options</a></li>
  33. <li><a id="toc-Advanced-options" href="#Advanced-options">3.5 Advanced options</a></li>
  34. <li><a id="toc-While-playing" href="#While-playing">3.6 While playing</a></li>
  35. </ul></li>
  36. <li><a id="toc-See-Also" href="#See-Also">4 See Also</a></li>
  37. <li><a id="toc-Authors" href="#Authors">5 Authors</a></li>
  38. </ul>
  39. </div>
  40. <a name="Synopsis"></a>
  41. <h2 class="chapter">1 Synopsis<span class="pull-right"><a class="anchor hidden-xs" href="#Synopsis" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Synopsis" aria-hidden="true">TOC</a></span></h2>
  42. <p>ffplay [<var>options</var>] [<samp>input_url</samp>]
  43. </p>
  44. <a name="Description"></a>
  45. <h2 class="chapter">2 Description<span class="pull-right"><a class="anchor hidden-xs" href="#Description" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Description" aria-hidden="true">TOC</a></span></h2>
  46. <p>FFplay is a very simple and portable media player using the FFmpeg
  47. libraries and the SDL library. It is mostly used as a testbed for the
  48. various FFmpeg APIs.
  49. </p>
  50. <a name="Options"></a>
  51. <h2 class="chapter">3 Options<span class="pull-right"><a class="anchor hidden-xs" href="#Options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Options" aria-hidden="true">TOC</a></span></h2>
  52. <p>All the numerical options, if not specified otherwise, accept a string
  53. representing a number as input, which may be followed by one of the SI
  54. unit prefixes, for example: &rsquo;K&rsquo;, &rsquo;M&rsquo;, or &rsquo;G&rsquo;.
  55. </p>
  56. <p>If &rsquo;i&rsquo; is appended to the SI unit prefix, the complete prefix will be
  57. interpreted as a unit prefix for binary multiples, which are based on
  58. powers of 1024 instead of powers of 1000. Appending &rsquo;B&rsquo; to the SI unit
  59. prefix multiplies the value by 8. This allows using, for example:
  60. &rsquo;KB&rsquo;, &rsquo;MiB&rsquo;, &rsquo;G&rsquo; and &rsquo;B&rsquo; as number suffixes.
  61. </p>
  62. <p>Options which do not take arguments are boolean options, and set the
  63. corresponding value to true. They can be set to false by prefixing
  64. the option name with &quot;no&quot;. For example using &quot;-nofoo&quot;
  65. will set the boolean option with name &quot;foo&quot; to false.
  66. </p>
  67. <span id="Stream-specifiers"></span><a name="Stream-specifiers-1"></a>
  68. <h3 class="section">3.1 Stream specifiers<span class="pull-right"><a class="anchor hidden-xs" href="#Stream-specifiers-1" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Stream-specifiers-1" aria-hidden="true">TOC</a></span></h3>
  69. <p>Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
  70. are used to precisely specify which stream(s) a given option belongs to.
  71. </p>
  72. <p>A stream specifier is a string generally appended to the option name and
  73. separated from it by a colon. E.g. <code>-codec:a:1 ac3</code> contains the
  74. <code>a:1</code> stream specifier, which matches the second audio stream. Therefore, it
  75. would select the ac3 codec for the second audio stream.
  76. </p>
  77. <p>A stream specifier can match several streams, so that the option is applied to all
  78. of them. E.g. the stream specifier in <code>-b:a 128k</code> matches all audio
  79. streams.
  80. </p>
  81. <p>An empty stream specifier matches all streams. For example, <code>-codec copy</code>
  82. or <code>-codec: copy</code> would copy all the streams without reencoding.
  83. </p>
  84. <p>Possible forms of stream specifiers are:
  85. </p><dl compact="compact">
  86. <dt><samp><var>stream_index</var></samp></dt>
  87. <dd><p>Matches the stream with this index. E.g. <code>-threads:1 4</code> would set the
  88. thread count for the second stream to 4. If <var>stream_index</var> is used as an
  89. additional stream specifier (see below), then it selects stream number
  90. <var>stream_index</var> from the matching streams. Stream numbering is based on the
  91. order of the streams as detected by libavformat except when a program ID is
  92. also specified. In this case it is based on the ordering of the streams in the
  93. program.
  94. </p></dd>
  95. <dt><samp><var>stream_type</var>[:<var>additional_stream_specifier</var>]</samp></dt>
  96. <dd><p><var>stream_type</var> is one of following: &rsquo;v&rsquo; or &rsquo;V&rsquo; for video, &rsquo;a&rsquo; for audio, &rsquo;s&rsquo;
  97. for subtitle, &rsquo;d&rsquo; for data, and &rsquo;t&rsquo; for attachments. &rsquo;v&rsquo; matches all video
  98. streams, &rsquo;V&rsquo; only matches video streams which are not attached pictures, video
  99. thumbnails or cover arts. If <var>additional_stream_specifier</var> is used, then
  100. it matches streams which both have this type and match the
  101. <var>additional_stream_specifier</var>. Otherwise, it matches all streams of the
  102. specified type.
  103. </p></dd>
  104. <dt><samp>p:<var>program_id</var>[:<var>additional_stream_specifier</var>]</samp></dt>
  105. <dd><p>Matches streams which are in the program with the id <var>program_id</var>. If
  106. <var>additional_stream_specifier</var> is used, then it matches streams which both
  107. are part of the program and match the <var>additional_stream_specifier</var>.
  108. </p>
  109. </dd>
  110. <dt><samp>#<var>stream_id</var> or i:<var>stream_id</var></samp></dt>
  111. <dd><p>Match the stream by stream id (e.g. PID in MPEG-TS container).
  112. </p></dd>
  113. <dt><samp>m:<var>key</var>[:<var>value</var>]</samp></dt>
  114. <dd><p>Matches streams with the metadata tag <var>key</var> having the specified value. If
  115. <var>value</var> is not given, matches streams that contain the given tag with any
  116. value.
  117. </p></dd>
  118. <dt><samp>u</samp></dt>
  119. <dd><p>Matches streams with usable configuration, the codec must be defined and the
  120. essential information such as video dimension or audio sample rate must be present.
  121. </p>
  122. <p>Note that in <code>ffmpeg</code>, matching by metadata will only work properly for
  123. input files.
  124. </p></dd>
  125. </dl>
  126. <a name="Generic-options"></a>
  127. <h3 class="section">3.2 Generic options<span class="pull-right"><a class="anchor hidden-xs" href="#Generic-options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Generic-options" aria-hidden="true">TOC</a></span></h3>
  128. <p>These options are shared amongst the ff* tools.
  129. </p>
  130. <dl compact="compact">
  131. <dt><samp>-L</samp></dt>
  132. <dd><p>Show license.
  133. </p>
  134. </dd>
  135. <dt><samp>-h, -?, -help, --help [<var>arg</var>]</samp></dt>
  136. <dd><p>Show help. An optional parameter may be specified to print help about a specific
  137. item. If no argument is specified, only basic (non advanced) tool
  138. options are shown.
  139. </p>
  140. <p>Possible values of <var>arg</var> are:
  141. </p><dl compact="compact">
  142. <dt><samp>long</samp></dt>
  143. <dd><p>Print advanced tool options in addition to the basic tool options.
  144. </p>
  145. </dd>
  146. <dt><samp>full</samp></dt>
  147. <dd><p>Print complete list of options, including shared and private options
  148. for encoders, decoders, demuxers, muxers, filters, etc.
  149. </p>
  150. </dd>
  151. <dt><samp>decoder=<var>decoder_name</var></samp></dt>
  152. <dd><p>Print detailed information about the decoder named <var>decoder_name</var>. Use the
  153. <samp>-decoders</samp> option to get a list of all decoders.
  154. </p>
  155. </dd>
  156. <dt><samp>encoder=<var>encoder_name</var></samp></dt>
  157. <dd><p>Print detailed information about the encoder named <var>encoder_name</var>. Use the
  158. <samp>-encoders</samp> option to get a list of all encoders.
  159. </p>
  160. </dd>
  161. <dt><samp>demuxer=<var>demuxer_name</var></samp></dt>
  162. <dd><p>Print detailed information about the demuxer named <var>demuxer_name</var>. Use the
  163. <samp>-formats</samp> option to get a list of all demuxers and muxers.
  164. </p>
  165. </dd>
  166. <dt><samp>muxer=<var>muxer_name</var></samp></dt>
  167. <dd><p>Print detailed information about the muxer named <var>muxer_name</var>. Use the
  168. <samp>-formats</samp> option to get a list of all muxers and demuxers.
  169. </p>
  170. </dd>
  171. <dt><samp>filter=<var>filter_name</var></samp></dt>
  172. <dd><p>Print detailed information about the filter named <var>filter_name</var>. Use the
  173. <samp>-filters</samp> option to get a list of all filters.
  174. </p>
  175. </dd>
  176. <dt><samp>bsf=<var>bitstream_filter_name</var></samp></dt>
  177. <dd><p>Print detailed information about the bitstream filter named <var>bitstream_filter_name</var>.
  178. Use the <samp>-bsfs</samp> option to get a list of all bitstream filters.
  179. </p>
  180. </dd>
  181. <dt><samp>protocol=<var>protocol_name</var></samp></dt>
  182. <dd><p>Print detailed information about the protocol named <var>protocol_name</var>.
  183. Use the <samp>-protocols</samp> option to get a list of all protocols.
  184. </p></dd>
  185. </dl>
  186. </dd>
  187. <dt><samp>-version</samp></dt>
  188. <dd><p>Show version.
  189. </p>
  190. </dd>
  191. <dt><samp>-buildconf</samp></dt>
  192. <dd><p>Show the build configuration, one option per line.
  193. </p>
  194. </dd>
  195. <dt><samp>-formats</samp></dt>
  196. <dd><p>Show available formats (including devices).
  197. </p>
  198. </dd>
  199. <dt><samp>-demuxers</samp></dt>
  200. <dd><p>Show available demuxers.
  201. </p>
  202. </dd>
  203. <dt><samp>-muxers</samp></dt>
  204. <dd><p>Show available muxers.
  205. </p>
  206. </dd>
  207. <dt><samp>-devices</samp></dt>
  208. <dd><p>Show available devices.
  209. </p>
  210. </dd>
  211. <dt><samp>-codecs</samp></dt>
  212. <dd><p>Show all codecs known to libavcodec.
  213. </p>
  214. <p>Note that the term &rsquo;codec&rsquo; is used throughout this documentation as a shortcut
  215. for what is more correctly called a media bitstream format.
  216. </p>
  217. </dd>
  218. <dt><samp>-decoders</samp></dt>
  219. <dd><p>Show available decoders.
  220. </p>
  221. </dd>
  222. <dt><samp>-encoders</samp></dt>
  223. <dd><p>Show all available encoders.
  224. </p>
  225. </dd>
  226. <dt><samp>-bsfs</samp></dt>
  227. <dd><p>Show available bitstream filters.
  228. </p>
  229. </dd>
  230. <dt><samp>-protocols</samp></dt>
  231. <dd><p>Show available protocols.
  232. </p>
  233. </dd>
  234. <dt><samp>-filters</samp></dt>
  235. <dd><p>Show available libavfilter filters.
  236. </p>
  237. </dd>
  238. <dt><samp>-pix_fmts</samp></dt>
  239. <dd><p>Show available pixel formats.
  240. </p>
  241. </dd>
  242. <dt><samp>-sample_fmts</samp></dt>
  243. <dd><p>Show available sample formats.
  244. </p>
  245. </dd>
  246. <dt><samp>-layouts</samp></dt>
  247. <dd><p>Show channel names and standard channel layouts.
  248. </p>
  249. </dd>
  250. <dt><samp>-colors</samp></dt>
  251. <dd><p>Show recognized color names.
  252. </p>
  253. </dd>
  254. <dt><samp>-sources <var>device</var>[,<var>opt1</var>=<var>val1</var>[,<var>opt2</var>=<var>val2</var>]...]</samp></dt>
  255. <dd><p>Show autodetected sources of the input device.
  256. Some devices may provide system-dependent source names that cannot be autodetected.
  257. The returned list cannot be assumed to be always complete.
  258. </p><div class="example">
  259. <pre class="example">ffmpeg -sources pulse,server=192.168.0.4
  260. </pre></div>
  261. </dd>
  262. <dt><samp>-sinks <var>device</var>[,<var>opt1</var>=<var>val1</var>[,<var>opt2</var>=<var>val2</var>]...]</samp></dt>
  263. <dd><p>Show autodetected sinks of the output device.
  264. Some devices may provide system-dependent sink names that cannot be autodetected.
  265. The returned list cannot be assumed to be always complete.
  266. </p><div class="example">
  267. <pre class="example">ffmpeg -sinks pulse,server=192.168.0.4
  268. </pre></div>
  269. </dd>
  270. <dt><samp>-loglevel [<var>flags</var>+]<var>loglevel</var> | -v [<var>flags</var>+]<var>loglevel</var></samp></dt>
  271. <dd><p>Set logging level and flags used by the library.
  272. </p>
  273. <p>The optional <var>flags</var> prefix can consist of the following values:
  274. </p><dl compact="compact">
  275. <dt>&lsquo;<samp>repeat</samp>&rsquo;</dt>
  276. <dd><p>Indicates that repeated log output should not be compressed to the first line
  277. and the &quot;Last message repeated n times&quot; line will be omitted.
  278. </p></dd>
  279. <dt>&lsquo;<samp>level</samp>&rsquo;</dt>
  280. <dd><p>Indicates that log output should add a <code>[level]</code> prefix to each message
  281. line. This can be used as an alternative to log coloring, e.g. when dumping the
  282. log to file.
  283. </p></dd>
  284. </dl>
  285. <p>Flags can also be used alone by adding a &rsquo;+&rsquo;/&rsquo;-&rsquo; prefix to set/reset a single
  286. flag without affecting other <var>flags</var> or changing <var>loglevel</var>. When
  287. setting both <var>flags</var> and <var>loglevel</var>, a &rsquo;+&rsquo; separator is expected
  288. between the last <var>flags</var> value and before <var>loglevel</var>.
  289. </p>
  290. <p><var>loglevel</var> is a string or a number containing one of the following values:
  291. </p><dl compact="compact">
  292. <dt>&lsquo;<samp>quiet, -8</samp>&rsquo;</dt>
  293. <dd><p>Show nothing at all; be silent.
  294. </p></dd>
  295. <dt>&lsquo;<samp>panic, 0</samp>&rsquo;</dt>
  296. <dd><p>Only show fatal errors which could lead the process to crash, such as
  297. an assertion failure. This is not currently used for anything.
  298. </p></dd>
  299. <dt>&lsquo;<samp>fatal, 8</samp>&rsquo;</dt>
  300. <dd><p>Only show fatal errors. These are errors after which the process absolutely
  301. cannot continue.
  302. </p></dd>
  303. <dt>&lsquo;<samp>error, 16</samp>&rsquo;</dt>
  304. <dd><p>Show all errors, including ones which can be recovered from.
  305. </p></dd>
  306. <dt>&lsquo;<samp>warning, 24</samp>&rsquo;</dt>
  307. <dd><p>Show all warnings and errors. Any message related to possibly
  308. incorrect or unexpected events will be shown.
  309. </p></dd>
  310. <dt>&lsquo;<samp>info, 32</samp>&rsquo;</dt>
  311. <dd><p>Show informative messages during processing. This is in addition to
  312. warnings and errors. This is the default value.
  313. </p></dd>
  314. <dt>&lsquo;<samp>verbose, 40</samp>&rsquo;</dt>
  315. <dd><p>Same as <code>info</code>, except more verbose.
  316. </p></dd>
  317. <dt>&lsquo;<samp>debug, 48</samp>&rsquo;</dt>
  318. <dd><p>Show everything, including debugging information.
  319. </p></dd>
  320. <dt>&lsquo;<samp>trace, 56</samp>&rsquo;</dt>
  321. </dl>
  322. <p>For example to enable repeated log output, add the <code>level</code> prefix, and set
  323. <var>loglevel</var> to <code>verbose</code>:
  324. </p><div class="example">
  325. <pre class="example">ffmpeg -loglevel repeat+level+verbose -i input output
  326. </pre></div>
  327. <p>Another example that enables repeated log output without affecting current
  328. state of <code>level</code> prefix flag or <var>loglevel</var>:
  329. </p><div class="example">
  330. <pre class="example">ffmpeg [...] -loglevel +repeat
  331. </pre></div>
  332. <p>By default the program logs to stderr. If coloring is supported by the
  333. terminal, colors are used to mark errors and warnings. Log coloring
  334. can be disabled setting the environment variable
  335. <code>AV_LOG_FORCE_NOCOLOR</code>, or can be forced setting
  336. the environment variable <code>AV_LOG_FORCE_COLOR</code>.
  337. </p>
  338. </dd>
  339. <dt><samp>-report</samp></dt>
  340. <dd><p>Dump full command line and log output to a file named
  341. <code><var>program</var>-<var>YYYYMMDD</var>-<var>HHMMSS</var>.log</code> in the current
  342. directory.
  343. This file can be useful for bug reports.
  344. It also implies <code>-loglevel debug</code>.
  345. </p>
  346. <p>Setting the environment variable <code>FFREPORT</code> to any value has the
  347. same effect. If the value is a &rsquo;:&rsquo;-separated key=value sequence, these
  348. options will affect the report; option values must be escaped if they
  349. contain special characters or the options delimiter &rsquo;:&rsquo; (see the
  350. &ldquo;Quoting and escaping&rdquo; section in the ffmpeg-utils manual).
  351. </p>
  352. <p>The following options are recognized:
  353. </p><dl compact="compact">
  354. <dt><samp>file</samp></dt>
  355. <dd><p>set the file name to use for the report; <code>%p</code> is expanded to the name
  356. of the program, <code>%t</code> is expanded to a timestamp, <code>%%</code> is expanded
  357. to a plain <code>%</code>
  358. </p></dd>
  359. <dt><samp>level</samp></dt>
  360. <dd><p>set the log verbosity level using a numerical value (see <code>-loglevel</code>).
  361. </p></dd>
  362. </dl>
  363. <p>For example, to output a report to a file named <samp>ffreport.log</samp>
  364. using a log level of <code>32</code> (alias for log level <code>info</code>):
  365. </p>
  366. <div class="example">
  367. <pre class="example">FFREPORT=file=ffreport.log:level=32 ffmpeg -i input output
  368. </pre></div>
  369. <p>Errors in parsing the environment variable are not fatal, and will not
  370. appear in the report.
  371. </p>
  372. </dd>
  373. <dt><samp>-hide_banner</samp></dt>
  374. <dd><p>Suppress printing banner.
  375. </p>
  376. <p>All FFmpeg tools will normally show a copyright notice, build options
  377. and library versions. This option can be used to suppress printing
  378. this information.
  379. </p>
  380. </dd>
  381. <dt><samp>-cpuflags flags (<em>global</em>)</samp></dt>
  382. <dd><p>Allows setting and clearing cpu flags. This option is intended
  383. for testing. Do not use it unless you know what you&rsquo;re doing.
  384. </p><div class="example">
  385. <pre class="example">ffmpeg -cpuflags -sse+mmx ...
  386. ffmpeg -cpuflags mmx ...
  387. ffmpeg -cpuflags 0 ...
  388. </pre></div>
  389. <p>Possible flags for this option are:
  390. </p><dl compact="compact">
  391. <dt>&lsquo;<samp>x86</samp>&rsquo;</dt>
  392. <dd><dl compact="compact">
  393. <dt>&lsquo;<samp>mmx</samp>&rsquo;</dt>
  394. <dt>&lsquo;<samp>mmxext</samp>&rsquo;</dt>
  395. <dt>&lsquo;<samp>sse</samp>&rsquo;</dt>
  396. <dt>&lsquo;<samp>sse2</samp>&rsquo;</dt>
  397. <dt>&lsquo;<samp>sse2slow</samp>&rsquo;</dt>
  398. <dt>&lsquo;<samp>sse3</samp>&rsquo;</dt>
  399. <dt>&lsquo;<samp>sse3slow</samp>&rsquo;</dt>
  400. <dt>&lsquo;<samp>ssse3</samp>&rsquo;</dt>
  401. <dt>&lsquo;<samp>atom</samp>&rsquo;</dt>
  402. <dt>&lsquo;<samp>sse4.1</samp>&rsquo;</dt>
  403. <dt>&lsquo;<samp>sse4.2</samp>&rsquo;</dt>
  404. <dt>&lsquo;<samp>avx</samp>&rsquo;</dt>
  405. <dt>&lsquo;<samp>avx2</samp>&rsquo;</dt>
  406. <dt>&lsquo;<samp>xop</samp>&rsquo;</dt>
  407. <dt>&lsquo;<samp>fma3</samp>&rsquo;</dt>
  408. <dt>&lsquo;<samp>fma4</samp>&rsquo;</dt>
  409. <dt>&lsquo;<samp>3dnow</samp>&rsquo;</dt>
  410. <dt>&lsquo;<samp>3dnowext</samp>&rsquo;</dt>
  411. <dt>&lsquo;<samp>bmi1</samp>&rsquo;</dt>
  412. <dt>&lsquo;<samp>bmi2</samp>&rsquo;</dt>
  413. <dt>&lsquo;<samp>cmov</samp>&rsquo;</dt>
  414. </dl>
  415. </dd>
  416. <dt>&lsquo;<samp>ARM</samp>&rsquo;</dt>
  417. <dd><dl compact="compact">
  418. <dt>&lsquo;<samp>armv5te</samp>&rsquo;</dt>
  419. <dt>&lsquo;<samp>armv6</samp>&rsquo;</dt>
  420. <dt>&lsquo;<samp>armv6t2</samp>&rsquo;</dt>
  421. <dt>&lsquo;<samp>vfp</samp>&rsquo;</dt>
  422. <dt>&lsquo;<samp>vfpv3</samp>&rsquo;</dt>
  423. <dt>&lsquo;<samp>neon</samp>&rsquo;</dt>
  424. <dt>&lsquo;<samp>setend</samp>&rsquo;</dt>
  425. </dl>
  426. </dd>
  427. <dt>&lsquo;<samp>AArch64</samp>&rsquo;</dt>
  428. <dd><dl compact="compact">
  429. <dt>&lsquo;<samp>armv8</samp>&rsquo;</dt>
  430. <dt>&lsquo;<samp>vfp</samp>&rsquo;</dt>
  431. <dt>&lsquo;<samp>neon</samp>&rsquo;</dt>
  432. </dl>
  433. </dd>
  434. <dt>&lsquo;<samp>PowerPC</samp>&rsquo;</dt>
  435. <dd><dl compact="compact">
  436. <dt>&lsquo;<samp>altivec</samp>&rsquo;</dt>
  437. </dl>
  438. </dd>
  439. <dt>&lsquo;<samp>Specific Processors</samp>&rsquo;</dt>
  440. <dd><dl compact="compact">
  441. <dt>&lsquo;<samp>pentium2</samp>&rsquo;</dt>
  442. <dt>&lsquo;<samp>pentium3</samp>&rsquo;</dt>
  443. <dt>&lsquo;<samp>pentium4</samp>&rsquo;</dt>
  444. <dt>&lsquo;<samp>k6</samp>&rsquo;</dt>
  445. <dt>&lsquo;<samp>k62</samp>&rsquo;</dt>
  446. <dt>&lsquo;<samp>athlon</samp>&rsquo;</dt>
  447. <dt>&lsquo;<samp>athlonxp</samp>&rsquo;</dt>
  448. <dt>&lsquo;<samp>k8</samp>&rsquo;</dt>
  449. </dl>
  450. </dd>
  451. </dl>
  452. </dd>
  453. <dt><samp>-max_alloc <var>bytes</var></samp></dt>
  454. <dd><p>Set the maximum size limit for allocating a block on the heap by ffmpeg&rsquo;s
  455. family of malloc functions. Exercise <strong>extreme caution</strong> when using
  456. this option. Don&rsquo;t use if you do not understand the full consequence of doing so.
  457. Default is INT_MAX.
  458. </p></dd>
  459. </dl>
  460. <a name="AVOptions"></a>
  461. <h3 class="section">3.3 AVOptions<span class="pull-right"><a class="anchor hidden-xs" href="#AVOptions" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-AVOptions" aria-hidden="true">TOC</a></span></h3>
  462. <p>These options are provided directly by the libavformat, libavdevice and
  463. libavcodec libraries. To see the list of available AVOptions, use the
  464. <samp>-help</samp> option. They are separated into two categories:
  465. </p><dl compact="compact">
  466. <dt><samp>generic</samp></dt>
  467. <dd><p>These options can be set for any container, codec or device. Generic options
  468. are listed under AVFormatContext options for containers/devices and under
  469. AVCodecContext options for codecs.
  470. </p></dd>
  471. <dt><samp>private</samp></dt>
  472. <dd><p>These options are specific to the given container, device or codec. Private
  473. options are listed under their corresponding containers/devices/codecs.
  474. </p></dd>
  475. </dl>
  476. <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
  477. an MP3 file, use the <samp>id3v2_version</samp> private option of the MP3
  478. muxer:
  479. </p><div class="example">
  480. <pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
  481. </pre></div>
  482. <p>All codec AVOptions are per-stream, and thus a stream specifier
  483. should be attached to them:
  484. </p><div class="example">
  485. <pre class="example">ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:1 2 -c:a:1 aac -b:2 128k out.mp4
  486. </pre></div>
  487. <p>In the above example, a multichannel audio stream is mapped twice for output.
  488. The first instance is encoded with codec ac3 and bitrate 640k.
  489. The second instance is downmixed to 2 channels and encoded with codec aac. A bitrate of 128k is specified for it using
  490. absolute index of the output stream.
  491. </p>
  492. <p>Note: the <samp>-nooption</samp> syntax cannot be used for boolean
  493. AVOptions, use <samp>-option 0</samp>/<samp>-option 1</samp>.
  494. </p>
  495. <p>Note: the old undocumented way of specifying per-stream AVOptions by
  496. prepending v/a/s to the options name is now obsolete and will be
  497. removed soon.
  498. </p>
  499. <a name="Main-options"></a>
  500. <h3 class="section">3.4 Main options<span class="pull-right"><a class="anchor hidden-xs" href="#Main-options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Main-options" aria-hidden="true">TOC</a></span></h3>
  501. <dl compact="compact">
  502. <dt><samp>-x <var>width</var></samp></dt>
  503. <dd><p>Force displayed width.
  504. </p></dd>
  505. <dt><samp>-y <var>height</var></samp></dt>
  506. <dd><p>Force displayed height.
  507. </p></dd>
  508. <dt><samp>-s <var>size</var></samp></dt>
  509. <dd><p>Set frame size (WxH or abbreviation), needed for videos which do
  510. not contain a header with the frame size like raw YUV. This option
  511. has been deprecated in favor of private options, try -video_size.
  512. </p></dd>
  513. <dt><samp>-fs</samp></dt>
  514. <dd><p>Start in fullscreen mode.
  515. </p></dd>
  516. <dt><samp>-an</samp></dt>
  517. <dd><p>Disable audio.
  518. </p></dd>
  519. <dt><samp>-vn</samp></dt>
  520. <dd><p>Disable video.
  521. </p></dd>
  522. <dt><samp>-sn</samp></dt>
  523. <dd><p>Disable subtitles.
  524. </p></dd>
  525. <dt><samp>-ss <var>pos</var></samp></dt>
  526. <dd><p>Seek to <var>pos</var>. Note that in most formats it is not possible to seek
  527. exactly, so <code>ffplay</code> will seek to the nearest seek point to
  528. <var>pos</var>.
  529. </p>
  530. <p><var>pos</var> must be a time duration specification,
  531. see <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  532. </p></dd>
  533. <dt><samp>-t <var>duration</var></samp></dt>
  534. <dd><p>Play <var>duration</var> seconds of audio/video.
  535. </p>
  536. <p><var>duration</var> must be a time duration specification,
  537. see <a href="ffmpeg-utils.html#time-duration-syntax">(ffmpeg-utils)the Time duration section in the ffmpeg-utils(1) manual</a>.
  538. </p></dd>
  539. <dt><samp>-bytes</samp></dt>
  540. <dd><p>Seek by bytes.
  541. </p></dd>
  542. <dt><samp>-seek_interval</samp></dt>
  543. <dd><p>Set custom interval, in seconds, for seeking using left/right keys. Default is 10 seconds.
  544. </p></dd>
  545. <dt><samp>-nodisp</samp></dt>
  546. <dd><p>Disable graphical display.
  547. </p></dd>
  548. <dt><samp>-noborder</samp></dt>
  549. <dd><p>Borderless window.
  550. </p></dd>
  551. <dt><samp>-alwaysontop</samp></dt>
  552. <dd><p>Window always on top. Available on: X11 with SDL &gt;= 2.0.5, Windows SDL &gt;= 2.0.6.
  553. </p></dd>
  554. <dt><samp>-volume</samp></dt>
  555. <dd><p>Set the startup volume. 0 means silence, 100 means no volume reduction or
  556. amplification. Negative values are treated as 0, values above 100 are treated
  557. as 100.
  558. </p></dd>
  559. <dt><samp>-f <var>fmt</var></samp></dt>
  560. <dd><p>Force format.
  561. </p></dd>
  562. <dt><samp>-window_title <var>title</var></samp></dt>
  563. <dd><p>Set window title (default is the input filename).
  564. </p></dd>
  565. <dt><samp>-left <var>title</var></samp></dt>
  566. <dd><p>Set the x position for the left of the window (default is a centered window).
  567. </p></dd>
  568. <dt><samp>-top <var>title</var></samp></dt>
  569. <dd><p>Set the y position for the top of the window (default is a centered window).
  570. </p></dd>
  571. <dt><samp>-loop <var>number</var></samp></dt>
  572. <dd><p>Loops movie playback &lt;number&gt; times. 0 means forever.
  573. </p></dd>
  574. <dt><samp>-showmode <var>mode</var></samp></dt>
  575. <dd><p>Set the show mode to use.
  576. Available values for <var>mode</var> are:
  577. </p><dl compact="compact">
  578. <dt>&lsquo;<samp>0, video</samp>&rsquo;</dt>
  579. <dd><p>show video
  580. </p></dd>
  581. <dt>&lsquo;<samp>1, waves</samp>&rsquo;</dt>
  582. <dd><p>show audio waves
  583. </p></dd>
  584. <dt>&lsquo;<samp>2, rdft</samp>&rsquo;</dt>
  585. <dd><p>show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
  586. </p></dd>
  587. </dl>
  588. <p>Default value is &quot;video&quot;, if video is not present or cannot be played
  589. &quot;rdft&quot; is automatically selected.
  590. </p>
  591. <p>You can interactively cycle through the available show modes by
  592. pressing the key <tt class="key">w</tt>.
  593. </p>
  594. </dd>
  595. <dt><samp>-vf <var>filtergraph</var></samp></dt>
  596. <dd><p>Create the filtergraph specified by <var>filtergraph</var> and use it to
  597. filter the video stream.
  598. </p>
  599. <p><var>filtergraph</var> is a description of the filtergraph to apply to
  600. the stream, and must have a single video input and a single video
  601. output. In the filtergraph, the input is associated to the label
  602. <code>in</code>, and the output to the label <code>out</code>. See the
  603. ffmpeg-filters manual for more information about the filtergraph
  604. syntax.
  605. </p>
  606. <p>You can specify this parameter multiple times and cycle through the specified
  607. filtergraphs along with the show modes by pressing the key <tt class="key">w</tt>.
  608. </p>
  609. </dd>
  610. <dt><samp>-af <var>filtergraph</var></samp></dt>
  611. <dd><p><var>filtergraph</var> is a description of the filtergraph to apply to
  612. the input audio.
  613. Use the option &quot;-filters&quot; to show all the available filters (including
  614. sources and sinks).
  615. </p>
  616. </dd>
  617. <dt><samp>-i <var>input_url</var></samp></dt>
  618. <dd><p>Read <var>input_url</var>.
  619. </p></dd>
  620. </dl>
  621. <a name="Advanced-options"></a>
  622. <h3 class="section">3.5 Advanced options<span class="pull-right"><a class="anchor hidden-xs" href="#Advanced-options" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Advanced-options" aria-hidden="true">TOC</a></span></h3>
  623. <dl compact="compact">
  624. <dt><samp>-pix_fmt <var>format</var></samp></dt>
  625. <dd><p>Set pixel format.
  626. This option has been deprecated in favor of private options, try -pixel_format.
  627. </p>
  628. </dd>
  629. <dt><samp>-stats</samp></dt>
  630. <dd><p>Print several playback statistics, in particular show the stream
  631. duration, the codec parameters, the current position in the stream and
  632. the audio/video synchronisation drift. It is shown by default, unless the
  633. log level is lower than <code>info</code>. Its display can be forced by manually
  634. specifying this option. To disable it, you need to specify <code>-nostats</code>.
  635. </p>
  636. </dd>
  637. <dt><samp>-fast</samp></dt>
  638. <dd><p>Non-spec-compliant optimizations.
  639. </p></dd>
  640. <dt><samp>-genpts</samp></dt>
  641. <dd><p>Generate pts.
  642. </p></dd>
  643. <dt><samp>-sync <var>type</var></samp></dt>
  644. <dd><p>Set the master clock to audio (<code>type=audio</code>), video
  645. (<code>type=video</code>) or external (<code>type=ext</code>). Default is audio. The
  646. master clock is used to control audio-video synchronization. Most media
  647. players use audio as master clock, but in some cases (streaming or high
  648. quality broadcast) it is necessary to change that. This option is mainly
  649. used for debugging purposes.
  650. </p></dd>
  651. <dt><samp>-ast <var>audio_stream_specifier</var></samp></dt>
  652. <dd><p>Select the desired audio stream using the given stream specifier. The stream
  653. specifiers are described in the <a href="#Stream-specifiers">Stream specifiers</a> chapter. If this option
  654. is not specified, the &quot;best&quot; audio stream is selected in the program of the
  655. already selected video stream.
  656. </p></dd>
  657. <dt><samp>-vst <var>video_stream_specifier</var></samp></dt>
  658. <dd><p>Select the desired video stream using the given stream specifier. The stream
  659. specifiers are described in the <a href="#Stream-specifiers">Stream specifiers</a> chapter. If this option
  660. is not specified, the &quot;best&quot; video stream is selected.
  661. </p></dd>
  662. <dt><samp>-sst <var>subtitle_stream_specifier</var></samp></dt>
  663. <dd><p>Select the desired subtitle stream using the given stream specifier. The stream
  664. specifiers are described in the <a href="#Stream-specifiers">Stream specifiers</a> chapter. If this option
  665. is not specified, the &quot;best&quot; subtitle stream is selected in the program of the
  666. already selected video or audio stream.
  667. </p></dd>
  668. <dt><samp>-autoexit</samp></dt>
  669. <dd><p>Exit when video is done playing.
  670. </p></dd>
  671. <dt><samp>-exitonkeydown</samp></dt>
  672. <dd><p>Exit if any key is pressed.
  673. </p></dd>
  674. <dt><samp>-exitonmousedown</samp></dt>
  675. <dd><p>Exit if any mouse button is pressed.
  676. </p>
  677. </dd>
  678. <dt><samp>-codec:<var>media_specifier</var> <var>codec_name</var></samp></dt>
  679. <dd><p>Force a specific decoder implementation for the stream identified by
  680. <var>media_specifier</var>, which can assume the values <code>a</code> (audio),
  681. <code>v</code> (video), and <code>s</code> subtitle.
  682. </p>
  683. </dd>
  684. <dt><samp>-acodec <var>codec_name</var></samp></dt>
  685. <dd><p>Force a specific audio decoder.
  686. </p>
  687. </dd>
  688. <dt><samp>-vcodec <var>codec_name</var></samp></dt>
  689. <dd><p>Force a specific video decoder.
  690. </p>
  691. </dd>
  692. <dt><samp>-scodec <var>codec_name</var></samp></dt>
  693. <dd><p>Force a specific subtitle decoder.
  694. </p>
  695. </dd>
  696. <dt><samp>-autorotate</samp></dt>
  697. <dd><p>Automatically rotate the video according to file metadata. Enabled by
  698. default, use <samp>-noautorotate</samp> to disable it.
  699. </p>
  700. </dd>
  701. <dt><samp>-framedrop</samp></dt>
  702. <dd><p>Drop video frames if video is out of sync. Enabled by default if the master
  703. clock is not set to video. Use this option to enable frame dropping for all
  704. master clock sources, use <samp>-noframedrop</samp> to disable it.
  705. </p>
  706. </dd>
  707. <dt><samp>-infbuf</samp></dt>
  708. <dd><p>Do not limit the input buffer size, read as much data as possible from the
  709. input as soon as possible. Enabled by default for realtime streams, where data
  710. may be dropped if not read in time. Use this option to enable infinite buffers
  711. for all inputs, use <samp>-noinfbuf</samp> to disable it.
  712. </p>
  713. </dd>
  714. <dt><samp>-filter_threads <var>nb_threads</var></samp></dt>
  715. <dd><p>Defines how many threads are used to process a filter pipeline. Each pipeline
  716. will produce a thread pool with this many threads available for parallel
  717. processing. The default is 0 which means that the thread count will be
  718. determined by the number of available CPUs.
  719. </p>
  720. </dd>
  721. </dl>
  722. <a name="While-playing"></a>
  723. <h3 class="section">3.6 While playing<span class="pull-right"><a class="anchor hidden-xs" href="#While-playing" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-While-playing" aria-hidden="true">TOC</a></span></h3>
  724. <dl compact="compact">
  725. <dt><tt class="key">q, ESC</tt></dt>
  726. <dd><p>Quit.
  727. </p>
  728. </dd>
  729. <dt><tt class="key">f</tt></dt>
  730. <dd><p>Toggle full screen.
  731. </p>
  732. </dd>
  733. <dt><tt class="key">p, SPC</tt></dt>
  734. <dd><p>Pause.
  735. </p>
  736. </dd>
  737. <dt><tt class="key">m</tt></dt>
  738. <dd><p>Toggle mute.
  739. </p>
  740. </dd>
  741. <dt><tt class="key">9, 0</tt></dt>
  742. <dd><p>Decrease and increase volume respectively.
  743. </p>
  744. </dd>
  745. <dt><tt class="key">/, *</tt></dt>
  746. <dd><p>Decrease and increase volume respectively.
  747. </p>
  748. </dd>
  749. <dt><tt class="key">a</tt></dt>
  750. <dd><p>Cycle audio channel in the current program.
  751. </p>
  752. </dd>
  753. <dt><tt class="key">v</tt></dt>
  754. <dd><p>Cycle video channel.
  755. </p>
  756. </dd>
  757. <dt><tt class="key">t</tt></dt>
  758. <dd><p>Cycle subtitle channel in the current program.
  759. </p>
  760. </dd>
  761. <dt><tt class="key">c</tt></dt>
  762. <dd><p>Cycle program.
  763. </p>
  764. </dd>
  765. <dt><tt class="key">w</tt></dt>
  766. <dd><p>Cycle video filters or show modes.
  767. </p>
  768. </dd>
  769. <dt><tt class="key">s</tt></dt>
  770. <dd><p>Step to the next frame.
  771. </p>
  772. <p>Pause if the stream is not already paused, step to the next video
  773. frame, and pause.
  774. </p>
  775. </dd>
  776. <dt><tt class="key">left/right</tt></dt>
  777. <dd><p>Seek backward/forward 10 seconds.
  778. </p>
  779. </dd>
  780. <dt><tt class="key">down/up</tt></dt>
  781. <dd><p>Seek backward/forward 1 minute.
  782. </p>
  783. </dd>
  784. <dt><tt class="key">page down/page up</tt></dt>
  785. <dd><p>Seek to the previous/next chapter.
  786. or if there are no chapters
  787. Seek backward/forward 10 minutes.
  788. </p>
  789. </dd>
  790. <dt><tt class="key">right mouse click</tt></dt>
  791. <dd><p>Seek to percentage in file corresponding to fraction of width.
  792. </p>
  793. </dd>
  794. <dt><tt class="key">left mouse double-click</tt></dt>
  795. <dd><p>Toggle full screen.
  796. </p>
  797. </dd>
  798. </dl>
  799. <a name="See-Also"></a>
  800. <h2 class="chapter">4 See Also<span class="pull-right"><a class="anchor hidden-xs" href="#See-Also" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-See-Also" aria-hidden="true">TOC</a></span></h2>
  801. <p><a href="ffplay-all.html">ffmpeg-all</a>,
  802. <a href="ffmpeg.html">ffmpeg</a>, <a href="ffprobe.html">ffprobe</a>,
  803. <a href="ffmpeg-utils.html">ffmpeg-utils</a>,
  804. <a href="ffmpeg-scaler.html">ffmpeg-scaler</a>,
  805. <a href="ffmpeg-resampler.html">ffmpeg-resampler</a>,
  806. <a href="ffmpeg-codecs.html">ffmpeg-codecs</a>,
  807. <a href="ffmpeg-bitstream-filters.html">ffmpeg-bitstream-filters</a>,
  808. <a href="ffmpeg-formats.html">ffmpeg-formats</a>,
  809. <a href="ffmpeg-devices.html">ffmpeg-devices</a>,
  810. <a href="ffmpeg-protocols.html">ffmpeg-protocols</a>,
  811. <a href="ffmpeg-filters.html">ffmpeg-filters</a>
  812. </p>
  813. <a name="Authors"></a>
  814. <h2 class="chapter">5 Authors<span class="pull-right"><a class="anchor hidden-xs" href="#Authors" aria-hidden="true">#</a> <a class="anchor hidden-xs"href="#toc-Authors" aria-hidden="true">TOC</a></span></h2>
  815. <p>The FFmpeg developers.
  816. </p>
  817. <p>For details about the authorship, see the Git history of the project
  818. (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
  819. <code>git log</code> in the FFmpeg source directory, or browsing the
  820. online repository at <a href="http://source.ffmpeg.org">http://source.ffmpeg.org</a>.
  821. </p>
  822. <p>Maintainers for the specific components are listed in the file
  823. <samp>MAINTAINERS</samp> in the source code tree.
  824. </p>
  825. <p style="font-size: small;">
  826. This document was generated using <a href="http://www.gnu.org/software/texinfo/"><em>makeinfo</em></a>.
  827. </p>
  828. </div>
  829. </body>
  830. </html>