You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ffplay.html 36KB

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