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