1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
3 <!-- Created on September 2, 2011 by texi2html 1.82
4 texi2html was written by:
5 Lionel Cons <Lionel.Cons@cern.ch> (original author)
6 Karl Berry <karl@freefriends.org>
7 Olaf Bachmann <obachman@mathematik.uni-kl.de>
9 Maintained by: Many creative people.
10 Send bugs and suggestions to <texi2html-bug@nongnu.org>
13 <title>ffplay Documentation</title>
15 <meta name="description" content="ffplay Documentation">
16 <meta name="keywords" content="ffplay Documentation">
17 <meta name="resource-type" content="document">
18 <meta name="distribution" content="global">
19 <meta name="Generator" content="texi2html 1.82">
20 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
21 <style type="text/css">
23 a.summary-letter {text-decoration: none}
24 blockquote.smallquotation {font-size: smaller}
25 pre.display {font-family: serif}
26 pre.format {font-family: serif}
27 pre.menu-comment {font-family: serif}
28 pre.menu-preformatted {font-family: serif}
29 pre.smalldisplay {font-family: serif; font-size: smaller}
30 pre.smallexample {font-size: smaller}
31 pre.smallformat {font-family: serif; font-size: smaller}
32 pre.smalllisp {font-size: smaller}
33 span.roman {font-family:serif; font-weight:normal;}
34 span.sansserif {font-family:sans-serif; font-weight:normal;}
35 ul.toc {list-style: none}
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
44 <a name="SEC_Top"></a>
45 <h1 class="settitle">ffplay Documentation</h1>
47 <a name="SEC_Contents"></a>
48 <h1>Table of Contents</h1>
49 <div class="contents">
52 <li><a name="toc-Synopsis" href="#Synopsis">1. Synopsis</a></li>
53 <li><a name="toc-Description" href="#Description">2. Description</a></li>
54 <li><a name="toc-Options-4" href="#Options-4">3. Options</a>
56 <li><a name="toc-Generic-options" href="#Generic-options">3.1 Generic options</a></li>
57 <li><a name="toc-AVOptions" href="#AVOptions">3.2 AVOptions</a></li>
58 <li><a name="toc-Main-options" href="#Main-options">3.3 Main options</a></li>
59 <li><a name="toc-Advanced-options" href="#Advanced-options">3.4 Advanced options</a></li>
60 <li><a name="toc-While-playing" href="#While-playing">3.5 While playing</a></li>
62 <li><a name="toc-Expression-Evaluation" href="#Expression-Evaluation">4. Expression Evaluation</a></li>
63 <li><a name="toc-Decoders" href="#Decoders">5. Decoders</a></li>
64 <li><a name="toc-Video-Decoders" href="#Video-Decoders">6. Video Decoders</a>
66 <li><a name="toc-rawvideo" href="#rawvideo">6.1 rawvideo</a>
68 <li><a name="toc-Options-3" href="#Options-3">6.1.1 Options</a></li>
72 <li><a name="toc-Demuxers" href="#Demuxers">7. Demuxers</a>
74 <li><a name="toc-image2-1" href="#image2-1">7.1 image2</a></li>
75 <li><a name="toc-applehttp" href="#applehttp">7.2 applehttp</a></li>
77 <li><a name="toc-Muxers" href="#Muxers">8. Muxers</a>
79 <li><a name="toc-crc-1" href="#crc-1">8.1 crc</a></li>
80 <li><a name="toc-framecrc-1" href="#framecrc-1">8.2 framecrc</a></li>
81 <li><a name="toc-image2" href="#image2">8.3 image2</a></li>
82 <li><a name="toc-mpegts" href="#mpegts">8.4 mpegts</a></li>
83 <li><a name="toc-null" href="#null">8.5 null</a></li>
84 <li><a name="toc-matroska" href="#matroska">8.6 matroska</a></li>
86 <li><a name="toc-Input-Devices" href="#Input-Devices">9. Input Devices</a>
88 <li><a name="toc-alsa-1" href="#alsa-1">9.1 alsa</a></li>
89 <li><a name="toc-bktr" href="#bktr">9.2 bktr</a></li>
90 <li><a name="toc-dv1394" href="#dv1394">9.3 dv1394</a></li>
91 <li><a name="toc-fbdev" href="#fbdev">9.4 fbdev</a></li>
92 <li><a name="toc-jack" href="#jack">9.5 jack</a></li>
93 <li><a name="toc-lavfi" href="#lavfi">9.6 lavfi</a>
95 <li><a name="toc-Options" href="#Options">9.6.1 Options</a></li>
96 <li><a name="toc-Examples" href="#Examples">9.6.2 Examples</a></li>
98 <li><a name="toc-libdc1394" href="#libdc1394">9.7 libdc1394</a></li>
99 <li><a name="toc-openal" href="#openal">9.8 openal</a>
101 <li><a name="toc-Options-1" href="#Options-1">9.8.1 Options</a></li>
102 <li><a name="toc-Examples-2" href="#Examples-2">9.8.2 Examples</a></li>
104 <li><a name="toc-oss" href="#oss">9.9 oss</a></li>
105 <li><a name="toc-sndio-1" href="#sndio-1">9.10 sndio</a></li>
106 <li><a name="toc-video4linux-and-video4linux2" href="#video4linux-and-video4linux2">9.11 video4linux and video4linux2</a></li>
107 <li><a name="toc-vfwcap" href="#vfwcap">9.12 vfwcap</a></li>
108 <li><a name="toc-x11grab" href="#x11grab">9.13 x11grab</a>
110 <li><a name="toc-follow_005fmouse-AVOption" href="#follow_005fmouse-AVOption">9.13.1 <var>follow_mouse</var> AVOption</a></li>
111 <li><a name="toc-show_005fregion-AVOption" href="#show_005fregion-AVOption">9.13.2 <var>show_region</var> AVOption</a></li>
115 <li><a name="toc-Output-Devices" href="#Output-Devices">10. Output Devices</a>
117 <li><a name="toc-alsa" href="#alsa">10.1 alsa</a></li>
118 <li><a name="toc-oss-1" href="#oss-1">10.2 oss</a></li>
119 <li><a name="toc-sdl" href="#sdl">10.3 sdl</a>
121 <li><a name="toc-Options-2" href="#Options-2">10.3.1 Options</a></li>
122 <li><a name="toc-Examples-1" href="#Examples-1">10.3.2 Examples</a></li>
124 <li><a name="toc-sndio" href="#sndio">10.4 sndio</a></li>
126 <li><a name="toc-Protocols" href="#Protocols">11. Protocols</a>
128 <li><a name="toc-applehttp-1" href="#applehttp-1">11.1 applehttp</a></li>
129 <li><a name="toc-concat" href="#concat">11.2 concat</a></li>
130 <li><a name="toc-file" href="#file">11.3 file</a></li>
131 <li><a name="toc-gopher" href="#gopher">11.4 gopher</a></li>
132 <li><a name="toc-http" href="#http">11.5 http</a></li>
133 <li><a name="toc-mmst" href="#mmst">11.6 mmst</a></li>
134 <li><a name="toc-mmsh" href="#mmsh">11.7 mmsh</a></li>
135 <li><a name="toc-md5" href="#md5">11.8 md5</a></li>
136 <li><a name="toc-pipe" href="#pipe">11.9 pipe</a></li>
137 <li><a name="toc-rtmp" href="#rtmp">11.10 rtmp</a></li>
138 <li><a name="toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte" href="#rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">11.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></li>
139 <li><a name="toc-rtp" href="#rtp">11.12 rtp</a></li>
140 <li><a name="toc-rtsp" href="#rtsp">11.13 rtsp</a></li>
141 <li><a name="toc-sap" href="#sap">11.14 sap</a>
143 <li><a name="toc-Muxer" href="#Muxer">11.14.1 Muxer</a></li>
144 <li><a name="toc-Demuxer" href="#Demuxer">11.14.2 Demuxer</a></li>
146 <li><a name="toc-tcp" href="#tcp">11.15 tcp</a></li>
147 <li><a name="toc-udp" href="#udp">11.16 udp</a></li>
149 <li><a name="toc-Filtergraph-description" href="#Filtergraph-description">12. Filtergraph description</a>
151 <li><a name="toc-Filtergraph-syntax" href="#Filtergraph-syntax">12.1 Filtergraph syntax</a></li>
153 <li><a name="toc-Audio-Filters" href="#Audio-Filters">13. Audio Filters</a>
155 <li><a name="toc-aformat" href="#aformat">13.1 aformat</a></li>
156 <li><a name="toc-anull" href="#anull">13.2 anull</a></li>
157 <li><a name="toc-aresample" href="#aresample">13.3 aresample</a></li>
158 <li><a name="toc-ashowinfo" href="#ashowinfo">13.4 ashowinfo</a></li>
160 <li><a name="toc-Audio-Sources" href="#Audio-Sources">14. Audio Sources</a>
162 <li><a name="toc-abuffer" href="#abuffer">14.1 abuffer</a></li>
163 <li><a name="toc-amovie" href="#amovie">14.2 amovie</a></li>
164 <li><a name="toc-anullsrc" href="#anullsrc">14.3 anullsrc</a></li>
166 <li><a name="toc-Audio-Sinks" href="#Audio-Sinks">15. Audio Sinks</a>
168 <li><a name="toc-abuffersink" href="#abuffersink">15.1 abuffersink</a></li>
169 <li><a name="toc-anullsink" href="#anullsink">15.2 anullsink</a></li>
171 <li><a name="toc-Video-Filters" href="#Video-Filters">16. Video Filters</a>
173 <li><a name="toc-blackframe" href="#blackframe">16.1 blackframe</a></li>
174 <li><a name="toc-boxblur" href="#boxblur">16.2 boxblur</a></li>
175 <li><a name="toc-copy" href="#copy">16.3 copy</a></li>
176 <li><a name="toc-crop" href="#crop">16.4 crop</a></li>
177 <li><a name="toc-cropdetect" href="#cropdetect">16.5 cropdetect</a></li>
178 <li><a name="toc-delogo" href="#delogo">16.6 delogo</a></li>
179 <li><a name="toc-drawbox" href="#drawbox">16.7 drawbox</a></li>
180 <li><a name="toc-drawtext" href="#drawtext">16.8 drawtext</a></li>
181 <li><a name="toc-fade" href="#fade">16.9 fade</a></li>
182 <li><a name="toc-fieldorder" href="#fieldorder">16.10 fieldorder</a></li>
183 <li><a name="toc-fifo" href="#fifo">16.11 fifo</a></li>
184 <li><a name="toc-format" href="#format">16.12 format</a></li>
185 <li><a name="toc-frei0r-1" href="#frei0r-1">16.13 frei0r</a></li>
186 <li><a name="toc-gradfun" href="#gradfun">16.14 gradfun</a></li>
187 <li><a name="toc-hflip" href="#hflip">16.15 hflip</a></li>
188 <li><a name="toc-hqdn3d" href="#hqdn3d">16.16 hqdn3d</a></li>
189 <li><a name="toc-lut_002c-lutrgb_002c-lutyuv" href="#lut_002c-lutrgb_002c-lutyuv">16.17 lut, lutrgb, lutyuv</a></li>
190 <li><a name="toc-mp" href="#mp">16.18 mp</a></li>
191 <li><a name="toc-negate" href="#negate">16.19 negate</a></li>
192 <li><a name="toc-noformat" href="#noformat">16.20 noformat</a></li>
193 <li><a name="toc-null-1" href="#null-1">16.21 null</a></li>
194 <li><a name="toc-ocv" href="#ocv">16.22 ocv</a>
196 <li><a name="toc-dilate-1" href="#dilate-1">16.22.1 dilate</a></li>
197 <li><a name="toc-erode" href="#erode">16.22.2 erode</a></li>
198 <li><a name="toc-smooth" href="#smooth">16.22.3 smooth</a></li>
200 <li><a name="toc-overlay" href="#overlay">16.23 overlay</a></li>
201 <li><a name="toc-pad" href="#pad">16.24 pad</a></li>
202 <li><a name="toc-pixdesctest" href="#pixdesctest">16.25 pixdesctest</a></li>
203 <li><a name="toc-scale" href="#scale">16.26 scale</a></li>
204 <li><a name="toc-select" href="#select">16.27 select</a></li>
205 <li><a name="toc-setdar-1" href="#setdar-1">16.28 setdar</a></li>
206 <li><a name="toc-setpts" href="#setpts">16.29 setpts</a></li>
207 <li><a name="toc-setsar-1" href="#setsar-1">16.30 setsar</a></li>
208 <li><a name="toc-settb" href="#settb">16.31 settb</a></li>
209 <li><a name="toc-showinfo" href="#showinfo">16.32 showinfo</a></li>
210 <li><a name="toc-slicify" href="#slicify">16.33 slicify</a></li>
211 <li><a name="toc-split" href="#split">16.34 split</a></li>
212 <li><a name="toc-transpose" href="#transpose">16.35 transpose</a></li>
213 <li><a name="toc-unsharp" href="#unsharp">16.36 unsharp</a></li>
214 <li><a name="toc-vflip" href="#vflip">16.37 vflip</a></li>
215 <li><a name="toc-yadif" href="#yadif">16.38 yadif</a></li>
217 <li><a name="toc-Video-Sources" href="#Video-Sources">17. Video Sources</a>
219 <li><a name="toc-buffer" href="#buffer">17.1 buffer</a></li>
220 <li><a name="toc-color" href="#color">17.2 color</a></li>
221 <li><a name="toc-movie" href="#movie">17.3 movie</a></li>
222 <li><a name="toc-mptestsrc" href="#mptestsrc">17.4 mptestsrc</a></li>
223 <li><a name="toc-nullsrc" href="#nullsrc">17.5 nullsrc</a></li>
224 <li><a name="toc-frei0r_005fsrc" href="#frei0r_005fsrc">17.6 frei0r_src</a></li>
225 <li><a name="toc-rgbtestsrc_002c-testsrc" href="#rgbtestsrc_002c-testsrc">17.7 rgbtestsrc, testsrc</a></li>
227 <li><a name="toc-Video-Sinks" href="#Video-Sinks">18. Video Sinks</a>
229 <li><a name="toc-buffersink" href="#buffersink">18.1 buffersink</a></li>
230 <li><a name="toc-nullsink" href="#nullsink">18.2 nullsink</a></li>
237 <a name="Synopsis"></a>
238 <h1 class="chapter"><a href="ffplay.html#toc-Synopsis">1. Synopsis</a></h1>
240 <table><tr><td> </td><td><pre class="example">ffplay [options] [‘<tt>input_file</tt>’]
241 </pre></td></tr></table>
243 <a name="Description"></a>
244 <h1 class="chapter"><a href="ffplay.html#toc-Description">2. Description</a></h1>
246 <p>FFplay is a very simple and portable media player using the FFmpeg
247 libraries and the SDL library. It is mostly used as a testbed for the
250 <a name="Options-4"></a>
251 <h1 class="chapter"><a href="ffplay.html#toc-Options-4">3. Options</a></h1>
253 <p>All the numerical options, if not specified otherwise, accept in input
254 a string representing a number, which may contain one of the
255 International System number postfixes, for example ’K’, ’M’, ’G’.
256 If ’i’ is appended after the postfix, powers of 2 are used instead of
257 powers of 10. The ’B’ postfix multiplies the value for 8, and can be
258 appended after another postfix or used alone. This allows using for
259 example ’KB’, ’MiB’, ’G’ and ’B’ as postfix.
261 <p>Options which do not take arguments are boolean options, and set the
262 corresponding value to true. They can be set to false by prefixing
263 with "no" the option name, for example using "-nofoo" in the
264 commandline will set to false the boolean option with name "foo".
266 <a name="Generic-options"></a>
267 <h2 class="section"><a href="ffplay.html#toc-Generic-options">3.1 Generic options</a></h2>
269 <p>These options are shared amongst the ff* tools.
271 <dl compact="compact">
272 <dt> ‘<samp>-L</samp>’</dt>
276 <dt> ‘<samp>-h, -?, -help, --help</samp>’</dt>
280 <dt> ‘<samp>-version</samp>’</dt>
284 <dt> ‘<samp>-formats</samp>’</dt>
285 <dd><p>Show available formats.
287 <p>The fields preceding the format names have the following meanings:
288 </p><dl compact="compact">
289 <dt> ‘<samp>D</samp>’</dt>
290 <dd><p>Decoding available
292 <dt> ‘<samp>E</samp>’</dt>
293 <dd><p>Encoding available
298 <dt> ‘<samp>-codecs</samp>’</dt>
299 <dd><p>Show available codecs.
301 <p>The fields preceding the codec names have the following meanings:
302 </p><dl compact="compact">
303 <dt> ‘<samp>D</samp>’</dt>
304 <dd><p>Decoding available
306 <dt> ‘<samp>E</samp>’</dt>
307 <dd><p>Encoding available
309 <dt> ‘<samp>V/A/S</samp>’</dt>
310 <dd><p>Video/audio/subtitle codec
312 <dt> ‘<samp>S</samp>’</dt>
313 <dd><p>Codec supports slices
315 <dt> ‘<samp>D</samp>’</dt>
316 <dd><p>Codec supports direct rendering
318 <dt> ‘<samp>T</samp>’</dt>
319 <dd><p>Codec can handle input truncated at random locations instead of only at frame boundaries
324 <dt> ‘<samp>-bsfs</samp>’</dt>
325 <dd><p>Show available bitstream filters.
328 <dt> ‘<samp>-protocols</samp>’</dt>
329 <dd><p>Show available protocols.
332 <dt> ‘<samp>-filters</samp>’</dt>
333 <dd><p>Show available libavfilter filters.
336 <dt> ‘<samp>-pix_fmts</samp>’</dt>
337 <dd><p>Show available pixel formats.
340 <dt> ‘<samp>-loglevel <var>loglevel</var></samp>’</dt>
341 <dd><p>Set the logging level used by the library.
342 <var>loglevel</var> is a number or a string containing one of the following values:
343 </p><dl compact="compact">
344 <dt> ‘<samp>quiet</samp>’</dt>
345 <dt> ‘<samp>panic</samp>’</dt>
346 <dt> ‘<samp>fatal</samp>’</dt>
347 <dt> ‘<samp>error</samp>’</dt>
348 <dt> ‘<samp>warning</samp>’</dt>
349 <dt> ‘<samp>info</samp>’</dt>
350 <dt> ‘<samp>verbose</samp>’</dt>
351 <dt> ‘<samp>debug</samp>’</dt>
354 <p>By default the program logs to stderr, if coloring is supported by the
355 terminal, colors are used to mark errors and warnings. Log coloring
356 can be disabled setting the environment variable
357 <code>FFMPEG_FORCE_NOCOLOR</code> or <code>NO_COLOR</code>, or can be forced setting
358 the environment variable <code>FFMPEG_FORCE_COLOR</code>.
359 The use of the environment variable <code>NO_COLOR</code> is deprecated and
360 will be dropped in a following FFmpeg version.
365 <a name="AVOptions"></a>
366 <h2 class="section"><a href="ffplay.html#toc-AVOptions">3.2 AVOptions</a></h2>
368 <p>These options are provided directly by the libavformat, libavdevice and
369 libavcodec libraries. To see the list of available AVOptions, use the
370 ‘<samp>-help</samp>’ option. They are separated into two categories:
371 </p><dl compact="compact">
372 <dt> ‘<samp>generic</samp>’</dt>
373 <dd><p>These options can be set for any container, codec or device. Generic options are
374 listed under AVFormatContext options for containers/devices and under
375 AVCodecContext options for codecs.
377 <dt> ‘<samp>private</samp>’</dt>
378 <dd><p>These options are specific to the given container, device or codec. Private
379 options are listed under their corresponding containers/devices/codecs.
383 <p>For example to write an ID3v2.3 header instead of a default ID3v2.4 to
384 an MP3 file, use the ‘<samp>id3v2_version</samp>’ private option of the MP3
386 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i input.flac -id3v2_version 3 out.mp3
387 </pre></td></tr></table>
389 <p>You can precisely specify which stream(s) should the codec AVOption apply to by
390 appending a stream specifier of the form
391 ‘<samp>[:<var>stream_type</var>][:<var>stream_index</var>]</samp>’ to the option name.
392 <var>stream_type</var> is ’v’ for video, ’a’ for audio and ’s’ for subtitle streams.
393 <var>stream_index</var> is a global stream index when <var>stream_type</var> isn’t
394 given, otherwise it counts streams of the given type only. As always, the index
395 is zero-based. For example
396 </p><table><tr><td> </td><td><pre class="example">-foo -- applies to all applicable streams
397 -foo:v -- applies to all video streams
398 -foo:a:2 -- applies to the third audio stream
399 -foo:0 -- applies to the first stream
400 </pre></td></tr></table>
402 <p>Note -nooption syntax cannot be used for boolean AVOptions, use -option
405 <p>Note2 old undocumented way of specifying per-stream AVOptions by prepending
406 v/a/s to the options name is now obsolete and will be removed soon.
408 <a name="Main-options"></a>
409 <h2 class="section"><a href="ffplay.html#toc-Main-options">3.3 Main options</a></h2>
411 <dl compact="compact">
412 <dt> ‘<samp>-x <var>width</var></samp>’</dt>
413 <dd><p>Force displayed width.
415 <dt> ‘<samp>-y <var>height</var></samp>’</dt>
416 <dd><p>Force displayed height.
418 <dt> ‘<samp>-s <var>size</var></samp>’</dt>
419 <dd><p>Set frame size (WxH or abbreviation), needed for videos which do
420 not contain a header with the frame size like raw YUV. This option
421 has been deprecated in favor of private options, try -video_size.
423 <dt> ‘<samp>-an</samp>’</dt>
424 <dd><p>Disable audio.
426 <dt> ‘<samp>-vn</samp>’</dt>
427 <dd><p>Disable video.
429 <dt> ‘<samp>-ss <var>pos</var></samp>’</dt>
430 <dd><p>Seek to a given position in seconds.
432 <dt> ‘<samp>-t <var>duration</var></samp>’</dt>
433 <dd><p>play <duration> seconds of audio/video
435 <dt> ‘<samp>-bytes</samp>’</dt>
436 <dd><p>Seek by bytes.
438 <dt> ‘<samp>-nodisp</samp>’</dt>
439 <dd><p>Disable graphical display.
441 <dt> ‘<samp>-f <var>fmt</var></samp>’</dt>
444 <dt> ‘<samp>-window_title <var>title</var></samp>’</dt>
445 <dd><p>Set window title (default is the input filename).
447 <dt> ‘<samp>-loop <var>number</var></samp>’</dt>
448 <dd><p>Loops movie playback <number> times. 0 means forever.
450 <dt> ‘<samp>-showmode <var>mode</var></samp>’</dt>
451 <dd><p>Set the show mode to use.
452 Available values for <var>mode</var> are:
453 </p><dl compact="compact">
454 <dt> ‘<samp>0, video</samp>’</dt>
457 <dt> ‘<samp>1, waves</samp>’</dt>
458 <dd><p>show audio waves
460 <dt> ‘<samp>2, rdft</samp>’</dt>
461 <dd><p>show audio frequency band using RDFT ((Inverse) Real Discrete Fourier Transform)
465 <p>Default value is "video", if video is not present or cannot be played
466 "rdft" is automatically selected.
468 <p>You can interactively cycle through the available show modes by
469 pressing the key <w>.
472 <dt> ‘<samp>-vf <var>filter_graph</var></samp>’</dt>
473 <dd><p><var>filter_graph</var> is a description of the filter graph to apply to
475 Use the option "-filters" to show all the available filters (including
476 also sources and sinks).
479 <dt> ‘<samp>-i <var>input_file</var></samp>’</dt>
480 <dd><p>Read <var>input_file</var>.
484 <a name="Advanced-options"></a>
485 <h2 class="section"><a href="ffplay.html#toc-Advanced-options">3.4 Advanced options</a></h2>
486 <dl compact="compact">
487 <dt> ‘<samp>-pix_fmt <var>format</var></samp>’</dt>
488 <dd><p>Set pixel format.
489 This option has been deprecated in favor of private options, try -pixel_format.
491 <dt> ‘<samp>-stats</samp>’</dt>
492 <dd><p>Show the stream duration, the codec parameters, the current position in
493 the stream and the audio/video synchronisation drift.
495 <dt> ‘<samp>-bug</samp>’</dt>
496 <dd><p>Work around bugs.
498 <dt> ‘<samp>-fast</samp>’</dt>
499 <dd><p>Non-spec-compliant optimizations.
501 <dt> ‘<samp>-genpts</samp>’</dt>
504 <dt> ‘<samp>-rtp_tcp</samp>’</dt>
505 <dd><p>Force RTP/TCP protocol usage instead of RTP/UDP. It is only meaningful
506 if you are streaming with the RTSP protocol.
508 <dt> ‘<samp>-sync <var>type</var></samp>’</dt>
509 <dd><p>Set the master clock to audio (<code>type=audio</code>), video
510 (<code>type=video</code>) or external (<code>type=ext</code>). Default is audio. The
511 master clock is used to control audio-video synchronization. Most media
512 players use audio as master clock, but in some cases (streaming or high
513 quality broadcast) it is necessary to change that. This option is mainly
514 used for debugging purposes.
516 <dt> ‘<samp>-threads <var>count</var></samp>’</dt>
517 <dd><p>Set the thread count.
519 <dt> ‘<samp>-ast <var>audio_stream_number</var></samp>’</dt>
520 <dd><p>Select the desired audio stream number, counting from 0. The number
521 refers to the list of all the input audio streams. If it is greater
522 than the number of audio streams minus one, then the last one is
523 selected, if it is negative the audio playback is disabled.
525 <dt> ‘<samp>-vst <var>video_stream_number</var></samp>’</dt>
526 <dd><p>Select the desired video stream number, counting from 0. The number
527 refers to the list of all the input video streams. If it is greater
528 than the number of video streams minus one, then the last one is
529 selected, if it is negative the video playback is disabled.
531 <dt> ‘<samp>-sst <var>subtitle_stream_number</var></samp>’</dt>
532 <dd><p>Select the desired subtitle stream number, counting from 0. The number
533 refers to the list of all the input subtitle streams. If it is greater
534 than the number of subtitle streams minus one, then the last one is
535 selected, if it is negative the subtitle rendering is disabled.
537 <dt> ‘<samp>-autoexit</samp>’</dt>
538 <dd><p>Exit when video is done playing.
540 <dt> ‘<samp>-exitonkeydown</samp>’</dt>
541 <dd><p>Exit if any key is pressed.
543 <dt> ‘<samp>-exitonmousedown</samp>’</dt>
544 <dd><p>Exit if any mouse button is pressed.
548 <a name="While-playing"></a>
549 <h2 class="section"><a href="ffplay.html#toc-While-playing">3.5 While playing</a></h2>
551 <dl compact="compact">
552 <dt> <q, ESC></dt>
557 <dd><p>Toggle full screen.
560 <dt> <p, SPC></dt>
565 <dd><p>Cycle audio channel.
569 <dd><p>Cycle video channel.
573 <dd><p>Cycle subtitle channel.
577 <dd><p>Show audio waves.
580 <dt> <left/right></dt>
581 <dd><p>Seek backward/forward 10 seconds.
584 <dt> <down/up></dt>
585 <dd><p>Seek backward/forward 1 minute.
588 <dt> <mouse click></dt>
589 <dd><p>Seek to percentage in file corresponding to fraction of width.
595 <a name="Expression-Evaluation"></a>
596 <h1 class="chapter"><a href="ffplay.html#toc-Expression-Evaluation">4. Expression Evaluation</a></h1>
598 <p>When evaluating an arithemetic expression, FFmpeg uses an internal
599 formula evaluator, implemented through the ‘<tt>libavutil/eval.h</tt>’
602 <p>An expression may contain unary, binary operators, constants, and
605 <p>Two expressions <var>expr1</var> and <var>expr2</var> can be combined to form
606 another expression "<var>expr1</var>;<var>expr2</var>".
607 <var>expr1</var> and <var>expr2</var> are evaluated in turn, and the new
608 expression evaluates to the value of <var>expr2</var>.
610 <p>The following binary operators are available: <code>+</code>, <code>-</code>,
611 <code>*</code>, <code>/</code>, <code>^</code>.
613 <p>The following unary operators are available: <code>+</code>, <code>-</code>.
615 <p>The following functions are available:
616 </p><dl compact="compact">
617 <dt> ‘<samp>sinh(x)</samp>’</dt>
618 <dt> ‘<samp>cosh(x)</samp>’</dt>
619 <dt> ‘<samp>tanh(x)</samp>’</dt>
620 <dt> ‘<samp>sin(x)</samp>’</dt>
621 <dt> ‘<samp>cos(x)</samp>’</dt>
622 <dt> ‘<samp>tan(x)</samp>’</dt>
623 <dt> ‘<samp>atan(x)</samp>’</dt>
624 <dt> ‘<samp>asin(x)</samp>’</dt>
625 <dt> ‘<samp>acos(x)</samp>’</dt>
626 <dt> ‘<samp>exp(x)</samp>’</dt>
627 <dt> ‘<samp>log(x)</samp>’</dt>
628 <dt> ‘<samp>abs(x)</samp>’</dt>
629 <dt> ‘<samp>squish(x)</samp>’</dt>
630 <dt> ‘<samp>gauss(x)</samp>’</dt>
631 <dt> ‘<samp>isnan(x)</samp>’</dt>
632 <dd><p>Return 1.0 if <var>x</var> is NAN, 0.0 otherwise.
635 <dt> ‘<samp>mod(x, y)</samp>’</dt>
636 <dt> ‘<samp>max(x, y)</samp>’</dt>
637 <dt> ‘<samp>min(x, y)</samp>’</dt>
638 <dt> ‘<samp>eq(x, y)</samp>’</dt>
639 <dt> ‘<samp>gte(x, y)</samp>’</dt>
640 <dt> ‘<samp>gt(x, y)</samp>’</dt>
641 <dt> ‘<samp>lte(x, y)</samp>’</dt>
642 <dt> ‘<samp>lt(x, y)</samp>’</dt>
643 <dt> ‘<samp>st(var, expr)</samp>’</dt>
644 <dd><p>Allow to store the value of the expression <var>expr</var> in an internal
645 variable. <var>var</var> specifies the number of the variable where to
646 store the value, and it is a value ranging from 0 to 9. The function
647 returns the value stored in the internal variable.
650 <dt> ‘<samp>ld(var)</samp>’</dt>
651 <dd><p>Allow to load the value of the internal variable with number
652 <var>var</var>, which was previosly stored with st(<var>var</var>, <var>expr</var>).
653 The function returns the loaded value.
656 <dt> ‘<samp>while(cond, expr)</samp>’</dt>
657 <dd><p>Evaluate expression <var>expr</var> while the expression <var>cond</var> is
658 non-zero, and returns the value of the last <var>expr</var> evaluation, or
659 NAN if <var>cond</var> was always false.
662 <dt> ‘<samp>ceil(expr)</samp>’</dt>
663 <dd><p>Round the value of expression <var>expr</var> upwards to the nearest
664 integer. For example, "ceil(1.5)" is "2.0".
667 <dt> ‘<samp>floor(expr)</samp>’</dt>
668 <dd><p>Round the value of expression <var>expr</var> downwards to the nearest
669 integer. For example, "floor(-1.5)" is "-2.0".
672 <dt> ‘<samp>trunc(expr)</samp>’</dt>
673 <dd><p>Round the value of expression <var>expr</var> towards zero to the nearest
674 integer. For example, "trunc(-1.5)" is "-1.0".
677 <dt> ‘<samp>sqrt(expr)</samp>’</dt>
678 <dd><p>Compute the square root of <var>expr</var>. This is equivalent to
679 "(<var>expr</var>)^.5".
682 <dt> ‘<samp>not(expr)</samp>’</dt>
683 <dd><p>Return 1.0 if <var>expr</var> is zero, 0.0 otherwise.
686 <dt> ‘<samp>pow(x, y)</samp>’</dt>
687 <dd><p>Compute the power of <var>x</var> elevated <var>y</var>, it is equivalent to
688 "(<var>x</var>)^(<var>y</var>)".
694 <p><code>*</code> works like AND
696 <p><code>+</code> works like OR
699 </p><table><tr><td> </td><td><pre class="example">if A then B else C
700 </pre></td></tr></table>
702 </p><table><tr><td> </td><td><pre class="example">A*B + not(A)*C
703 </pre></td></tr></table>
705 <p>In your C code, you can extend the list of unary and binary functions,
706 and define recognized constants, so that they are available for your
709 <p>The evaluator also recognizes the International System number
710 postfixes. If ’i’ is appended after the postfix, powers of 2 are used
711 instead of powers of 10. The ’B’ postfix multiplies the value for 8,
712 and can be appended after another postfix or used alone. This allows
713 using for example ’KB’, ’MiB’, ’G’ and ’B’ as postfix.
715 <p>Follows the list of available International System postfixes, with
716 indication of the corresponding powers of 10 and of 2.
717 </p><dl compact="compact">
718 <dt> ‘<samp>y</samp>’</dt>
721 <dt> ‘<samp>z</samp>’</dt>
724 <dt> ‘<samp>a</samp>’</dt>
727 <dt> ‘<samp>f</samp>’</dt>
730 <dt> ‘<samp>p</samp>’</dt>
733 <dt> ‘<samp>n</samp>’</dt>
736 <dt> ‘<samp>u</samp>’</dt>
739 <dt> ‘<samp>m</samp>’</dt>
742 <dt> ‘<samp>c</samp>’</dt>
745 <dt> ‘<samp>d</samp>’</dt>
748 <dt> ‘<samp>h</samp>’</dt>
751 <dt> ‘<samp>k</samp>’</dt>
754 <dt> ‘<samp>K</samp>’</dt>
757 <dt> ‘<samp>M</samp>’</dt>
760 <dt> ‘<samp>G</samp>’</dt>
763 <dt> ‘<samp>T</samp>’</dt>
766 <dt> ‘<samp>P</samp>’</dt>
769 <dt> ‘<samp>E</samp>’</dt>
772 <dt> ‘<samp>Z</samp>’</dt>
775 <dt> ‘<samp>Y</samp>’</dt>
780 <a name="Decoders"></a>
781 <h1 class="chapter"><a href="ffplay.html#toc-Decoders">5. Decoders</a></h1>
783 <p>Decoders are configured elements in FFmpeg which allow the decoding of
786 <p>When you configure your FFmpeg build, all the supported native decoders
787 are enabled by default. Decoders requiring an external library must be enabled
788 manually via the corresponding <code>--enable-lib</code> option. You can list all
789 available decoders using the configure option <code>--list-decoders</code>.
791 <p>You can disable all the decoders with the configure option
792 <code>--disable-decoders</code> and selectively enable / disable single decoders
793 with the options <code>--enable-decoder=<var>DECODER</var></code> /
794 <code>--disable-decoder=<var>DECODER</var></code>.
796 <p>The option <code>-codecs</code> of the ff* tools will display the list of
800 <a name="Video-Decoders"></a>
801 <h1 class="chapter"><a href="ffplay.html#toc-Video-Decoders">6. Video Decoders</a></h1>
803 <p>A description of some of the currently available video decoders
806 <a name="rawvideo"></a>
807 <h2 class="section"><a href="ffplay.html#toc-rawvideo">6.1 rawvideo</a></h2>
811 <p>This decoder decodes rawvideo streams.
813 <a name="Options-3"></a>
814 <h3 class="subsection"><a href="ffplay.html#toc-Options-3">6.1.1 Options</a></h3>
816 <dl compact="compact">
817 <dt> ‘<samp>top <var>top_field_first</var></samp>’</dt>
818 <dd><p>Specify the assumed field type of the input video.
819 </p><dl compact="compact">
820 <dt> ‘<samp>-1</samp>’</dt>
821 <dd><p>the video is assumed to be progressive (default)
823 <dt> ‘<samp>0</samp>’</dt>
824 <dd><p>bottom-field-first is assumed
826 <dt> ‘<samp>1</samp>’</dt>
827 <dd><p>top-field-first is assumed
834 <a name="Demuxers"></a>
835 <h1 class="chapter"><a href="ffplay.html#toc-Demuxers">7. Demuxers</a></h1>
837 <p>Demuxers are configured elements in FFmpeg which allow to read the
838 multimedia streams from a particular type of file.
840 <p>When you configure your FFmpeg build, all the supported demuxers
841 are enabled by default. You can list all available ones using the
842 configure option "–list-demuxers".
844 <p>You can disable all the demuxers using the configure option
845 "–disable-demuxers", and selectively enable a single demuxer with
846 the option "–enable-demuxer=<var>DEMUXER</var>", or disable it
847 with the option "–disable-demuxer=<var>DEMUXER</var>".
849 <p>The option "-formats" of the ff* tools will display the list of
852 <p>The description of some of the currently available demuxers follows.
854 <a name="image2-1"></a>
855 <h2 class="section"><a href="ffplay.html#toc-image2-1">7.1 image2</a></h2>
857 <p>Image file demuxer.
859 <p>This demuxer reads from a list of image files specified by a pattern.
861 <p>The pattern may contain the string "%d" or "%0<var>N</var>d", which
862 specifies the position of the characters representing a sequential
863 number in each filename matched by the pattern. If the form
864 "%d0<var>N</var>d" is used, the string representing the number in each
865 filename is 0-padded and <var>N</var> is the total number of 0-padded
866 digits representing the number. The literal character ’%’ can be
867 specified in the pattern with the string "%%".
869 <p>If the pattern contains "%d" or "%0<var>N</var>d", the first filename of
870 the file list specified by the pattern must contain a number
871 inclusively contained between 0 and 4, all the following numbers must
872 be sequential. This limitation may be hopefully fixed.
874 <p>The pattern may contain a suffix which is used to automatically
875 determine the format of the images contained in the files.
877 <p>For example the pattern "img-%03d.bmp" will match a sequence of
878 filenames of the form ‘<tt>img-001.bmp</tt>’, ‘<tt>img-002.bmp</tt>’, ...,
879 ‘<tt>img-010.bmp</tt>’, etc.; the pattern "i%%m%%g-%d.jpg" will match a
880 sequence of filenames of the form ‘<tt>i%m%g-1.jpg</tt>’,
881 ‘<tt>i%m%g-2.jpg</tt>’, ..., ‘<tt>i%m%g-10.jpg</tt>’, etc.
883 <p>The size, the pixel format, and the format of each image must be the
884 same for all the files in the sequence.
886 <p>The following example shows how to use ‘<tt>ffmpeg</tt>’ for creating a
887 video from the images in the file sequence ‘<tt>img-001.jpeg</tt>’,
888 ‘<tt>img-002.jpeg</tt>’, ..., assuming an input framerate of 10 frames per
890 </p><table><tr><td> </td><td><pre class="example">ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
891 </pre></td></tr></table>
893 <p>Note that the pattern must not necessarily contain "%d" or
894 "%0<var>N</var>d", for example to convert a single image file
895 ‘<tt>img.jpeg</tt>’ you can employ the command:
896 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f image2 -i img.jpeg img.png
897 </pre></td></tr></table>
899 <a name="applehttp"></a>
900 <h2 class="section"><a href="ffplay.html#toc-applehttp">7.2 applehttp</a></h2>
902 <p>Apple HTTP Live Streaming demuxer.
904 <p>This demuxer presents all AVStreams from all variant streams.
905 The id field is set to the bitrate variant index number. By setting
906 the discard flags on AVStreams (by pressing ’a’ or ’v’ in ffplay),
907 the caller can decide which variant streams to actually receive.
908 The total bitrate of the variant that the stream belongs to is
909 available in a metadata key named "variant_bitrate".
911 <a name="Muxers"></a>
912 <h1 class="chapter"><a href="ffplay.html#toc-Muxers">8. Muxers</a></h1>
914 <p>Muxers are configured elements in FFmpeg which allow writing
915 multimedia streams to a particular type of file.
917 <p>When you configure your FFmpeg build, all the supported muxers
918 are enabled by default. You can list all available muxers using the
919 configure option <code>--list-muxers</code>.
921 <p>You can disable all the muxers with the configure option
922 <code>--disable-muxers</code> and selectively enable / disable single muxers
923 with the options <code>--enable-muxer=<var>MUXER</var></code> /
924 <code>--disable-muxer=<var>MUXER</var></code>.
926 <p>The option <code>-formats</code> of the ff* tools will display the list of
929 <p>A description of some of the currently available muxers follows.
931 <p><a name="crc"></a>
932 </p><a name="crc-1"></a>
933 <h2 class="section"><a href="ffplay.html#toc-crc-1">8.1 crc</a></h2>
935 <p>CRC (Cyclic Redundancy Check) testing format.
937 <p>This muxer computes and prints the Adler-32 CRC of all the input audio
938 and video frames. By default audio frames are converted to signed
939 16-bit raw audio and video frames to raw video before computing the
942 <p>The output of the muxer consists of a single line of the form:
943 CRC=0x<var>CRC</var>, where <var>CRC</var> is a hexadecimal number 0-padded to
944 8 digits containing the CRC for all the decoded input frames.
946 <p>For example to compute the CRC of the input, and store it in the file
947 ‘<tt>out.crc</tt>’:
948 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -f crc out.crc
949 </pre></td></tr></table>
951 <p>You can print the CRC to stdout with the command:
952 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -f crc -
953 </pre></td></tr></table>
955 <p>You can select the output format of each frame with ‘<tt>ffmpeg</tt>’ by
956 specifying the audio and video codec and format. For example to
957 compute the CRC of the input audio converted to PCM unsigned 8-bit
958 and the input video converted to MPEG-2 video, use the command:
959 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
960 </pre></td></tr></table>
962 <p>See also the <a href="#framecrc">framecrc</a> muxer.
964 <p><a name="framecrc"></a>
965 </p><a name="framecrc-1"></a>
966 <h2 class="section"><a href="ffplay.html#toc-framecrc-1">8.2 framecrc</a></h2>
968 <p>Per-frame CRC (Cyclic Redundancy Check) testing format.
970 <p>This muxer computes and prints the Adler-32 CRC for each decoded audio
971 and video frame. By default audio frames are converted to signed
972 16-bit raw audio and video frames to raw video before computing the
975 <p>The output of the muxer consists of a line for each audio and video
976 frame of the form: <var>stream_index</var>, <var>frame_dts</var>,
977 <var>frame_size</var>, 0x<var>CRC</var>, where <var>CRC</var> is a hexadecimal
978 number 0-padded to 8 digits containing the CRC of the decoded frame.
980 <p>For example to compute the CRC of each decoded frame in the input, and
981 store it in the file ‘<tt>out.crc</tt>’:
982 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -f framecrc out.crc
983 </pre></td></tr></table>
985 <p>You can print the CRC of each decoded frame to stdout with the command:
986 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -f framecrc -
987 </pre></td></tr></table>
989 <p>You can select the output format of each frame with ‘<tt>ffmpeg</tt>’ by
990 specifying the audio and video codec and format. For example, to
991 compute the CRC of each decoded input audio frame converted to PCM
992 unsigned 8-bit and of each decoded input video frame converted to
993 MPEG-2 video, use the command:
994 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
995 </pre></td></tr></table>
997 <p>See also the <a href="#crc">crc</a> muxer.
999 <a name="image2"></a>
1000 <h2 class="section"><a href="ffplay.html#toc-image2">8.3 image2</a></h2>
1002 <p>Image file muxer.
1004 <p>The image file muxer writes video frames to image files.
1006 <p>The output filenames are specified by a pattern, which can be used to
1007 produce sequentially numbered series of files.
1008 The pattern may contain the string "%d" or "%0<var>N</var>d", this string
1009 specifies the position of the characters representing a numbering in
1010 the filenames. If the form "%0<var>N</var>d" is used, the string
1011 representing the number in each filename is 0-padded to <var>N</var>
1012 digits. The literal character ’%’ can be specified in the pattern with
1013 the string "%%".
1015 <p>If the pattern contains "%d" or "%0<var>N</var>d", the first filename of
1016 the file list specified will contain the number 1, all the following
1017 numbers will be sequential.
1019 <p>The pattern may contain a suffix which is used to automatically
1020 determine the format of the image files to write.
1022 <p>For example the pattern "img-%03d.bmp" will specify a sequence of
1023 filenames of the form ‘<tt>img-001.bmp</tt>’, ‘<tt>img-002.bmp</tt>’, ...,
1024 ‘<tt>img-010.bmp</tt>’, etc.
1025 The pattern "img%%-%d.jpg" will specify a sequence of filenames of the
1026 form ‘<tt>img%-1.jpg</tt>’, ‘<tt>img%-2.jpg</tt>’, ..., ‘<tt>img%-10.jpg</tt>’,
1029 <p>The following example shows how to use ‘<tt>ffmpeg</tt>’ for creating a
1030 sequence of files ‘<tt>img-001.jpeg</tt>’, ‘<tt>img-002.jpeg</tt>’, ...,
1031 taking one image every second from the input video:
1032 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'
1033 </pre></td></tr></table>
1035 <p>Note that with ‘<tt>ffmpeg</tt>’, if the format is not specified with the
1036 <code>-f</code> option and the output filename specifies an image file
1037 format, the image2 muxer is automatically selected, so the previous
1038 command can be written as:
1039 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i in.avi -r 1 'img-%03d.jpeg'
1040 </pre></td></tr></table>
1042 <p>Note also that the pattern must not necessarily contain "%d" or
1043 "%0<var>N</var>d", for example to create a single image file
1044 ‘<tt>img.jpeg</tt>’ from the input video you can employ the command:
1045 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i in.avi -f image2 -vframes 1 img.jpeg
1046 </pre></td></tr></table>
1048 <p>The image muxer supports the .Y.U.V image file format. This format is
1049 special in that that each image frame consists of three files, for
1050 each of the YUV420P components. To read or write this image file format,
1051 specify the name of the ’.Y’ file. The muxer will automatically open the
1052 ’.U’ and ’.V’ files as required.
1054 <a name="mpegts"></a>
1055 <h2 class="section"><a href="ffplay.html#toc-mpegts">8.4 mpegts</a></h2>
1057 <p>MPEG transport stream muxer.
1059 <p>This muxer implements ISO 13818-1 and part of ETSI EN 300 468.
1061 <p>The muxer options are:
1063 <dl compact="compact">
1064 <dt> ‘<samp>-mpegts_original_network_id <var>number</var></samp>’</dt>
1065 <dd><p>Set the original_network_id (default 0x0001). This is unique identifier
1066 of a network in DVB. Its main use is in the unique identification of a
1067 service through the path Original_Network_ID, Transport_Stream_ID.
1069 <dt> ‘<samp>-mpegts_transport_stream_id <var>number</var></samp>’</dt>
1070 <dd><p>Set the transport_stream_id (default 0x0001). This identifies a
1073 <dt> ‘<samp>-mpegts_service_id <var>number</var></samp>’</dt>
1074 <dd><p>Set the service_id (default 0x0001) also known as program in DVB.
1076 <dt> ‘<samp>-mpegts_pmt_start_pid <var>number</var></samp>’</dt>
1077 <dd><p>Set the first PID for PMT (default 0x1000, max 0x1f00).
1079 <dt> ‘<samp>-mpegts_start_pid <var>number</var></samp>’</dt>
1080 <dd><p>Set the first PID for data packets (default 0x0100, max 0x0f00).
1084 <p>The recognized metadata settings in mpegts muxer are <code>service_provider</code>
1085 and <code>service_name</code>. If they are not set the default for
1086 <code>service_provider</code> is "FFmpeg" and the default for
1087 <code>service_name</code> is "Service01".
1089 <table><tr><td> </td><td><pre class="example">ffmpeg -i file.mpg -acodec copy -vcodec copy \
1090 -mpegts_original_network_id 0x1122 \
1091 -mpegts_transport_stream_id 0x3344 \
1092 -mpegts_service_id 0x5566 \
1093 -mpegts_pmt_start_pid 0x1500 \
1094 -mpegts_start_pid 0x150 \
1095 -metadata service_provider="Some provider" \
1096 -metadata service_name="Some Channel" \
1098 </pre></td></tr></table>
1101 <h2 class="section"><a href="ffplay.html#toc-null">8.5 null</a></h2>
1105 <p>This muxer does not generate any output file, it is mainly useful for
1106 testing or benchmarking purposes.
1108 <p>For example to benchmark decoding with ‘<tt>ffmpeg</tt>’ you can use the
1110 </p><table><tr><td> </td><td><pre class="example">ffmpeg -benchmark -i INPUT -f null out.null
1111 </pre></td></tr></table>
1113 <p>Note that the above command does not read or write the ‘<tt>out.null</tt>’
1114 file, but specifying the output file is required by the ‘<tt>ffmpeg</tt>’
1117 <p>Alternatively you can write the command as:
1118 </p><table><tr><td> </td><td><pre class="example">ffmpeg -benchmark -i INPUT -f null -
1119 </pre></td></tr></table>
1121 <a name="matroska"></a>
1122 <h2 class="section"><a href="ffplay.html#toc-matroska">8.6 matroska</a></h2>
1124 <p>Matroska container muxer.
1126 <p>This muxer implements the matroska and webm container specs.
1128 <p>The recognized metadata settings in this muxer are:
1130 <dl compact="compact">
1131 <dt> ‘<samp>title=<var>title name</var></samp>’</dt>
1132 <dd><p>Name provided to a single track
1136 <dl compact="compact">
1137 <dt> ‘<samp>language=<var>language name</var></samp>’</dt>
1138 <dd><p>Specifies the language of the track in the Matroska languages form
1142 <dl compact="compact">
1143 <dt> ‘<samp>stereo_mode=<var>mode</var></samp>’</dt>
1144 <dd><p>Stereo 3D video layout of two views in a single video track
1145 </p><dl compact="compact">
1146 <dt> ‘<samp>mono</samp>’</dt>
1147 <dd><p>video is not stereo
1149 <dt> ‘<samp>left_right</samp>’</dt>
1150 <dd><p>Both views are arranged side by side, Left-eye view is on the left
1152 <dt> ‘<samp>bottom_top</samp>’</dt>
1153 <dd><p>Both views are arranged in top-bottom orientation, Left-eye view is at bottom
1155 <dt> ‘<samp>top_bottom</samp>’</dt>
1156 <dd><p>Both views are arranged in top-bottom orientation, Left-eye view is on top
1158 <dt> ‘<samp>checkerboard_rl</samp>’</dt>
1159 <dd><p>Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first
1161 <dt> ‘<samp>checkerboard_lr</samp>’</dt>
1162 <dd><p>Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first
1164 <dt> ‘<samp>row_interleaved_rl</samp>’</dt>
1165 <dd><p>Each view is constituted by a row based interleaving, Right-eye view is first row
1167 <dt> ‘<samp>row_interleaved_lr</samp>’</dt>
1168 <dd><p>Each view is constituted by a row based interleaving, Left-eye view is first row
1170 <dt> ‘<samp>col_interleaved_rl</samp>’</dt>
1171 <dd><p>Both views are arranged in a column based interleaving manner, Right-eye view is first column
1173 <dt> ‘<samp>col_interleaved_lr</samp>’</dt>
1174 <dd><p>Both views are arranged in a column based interleaving manner, Left-eye view is first column
1176 <dt> ‘<samp>anaglyph_cyan_red</samp>’</dt>
1177 <dd><p>All frames are in anaglyph format viewable through red-cyan filters
1179 <dt> ‘<samp>right_left</samp>’</dt>
1180 <dd><p>Both views are arranged side by side, Right-eye view is on the left
1182 <dt> ‘<samp>anaglyph_green_magenta</samp>’</dt>
1183 <dd><p>All frames are in anaglyph format viewable through green-magenta filters
1185 <dt> ‘<samp>block_lr</samp>’</dt>
1186 <dd><p>Both eyes laced in one Block, Left-eye view is first
1188 <dt> ‘<samp>block_rl</samp>’</dt>
1189 <dd><p>Both eyes laced in one Block, Right-eye view is first
1195 <p>For example a 3D WebM clip can be created using the following command line:
1196 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i sample_left_right_clip.mpg -an -vcodec libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
1197 </pre></td></tr></table>
1199 <a name="Input-Devices"></a>
1200 <h1 class="chapter"><a href="ffplay.html#toc-Input-Devices">9. Input Devices</a></h1>
1202 <p>Input devices are configured elements in FFmpeg which allow to access
1203 the data coming from a multimedia device attached to your system.
1205 <p>When you configure your FFmpeg build, all the supported input devices
1206 are enabled by default. You can list all available ones using the
1207 configure option "–list-indevs".
1209 <p>You can disable all the input devices using the configure option
1210 "–disable-indevs", and selectively enable an input device using the
1211 option "–enable-indev=<var>INDEV</var>", or you can disable a particular
1212 input device using the option "–disable-indev=<var>INDEV</var>".
1214 <p>The option "-formats" of the ff* tools will display the list of
1215 supported input devices (amongst the demuxers).
1217 <p>A description of the currently available input devices follows.
1219 <a name="alsa-1"></a>
1220 <h2 class="section"><a href="ffplay.html#toc-alsa-1">9.1 alsa</a></h2>
1222 <p>ALSA (Advanced Linux Sound Architecture) input device.
1224 <p>To enable this input device during configuration you need libasound
1225 installed on your system.
1227 <p>This device allows capturing from an ALSA device. The name of the
1228 device to capture has to be an ALSA card identifier.
1230 <p>An ALSA identifier has the syntax:
1231 </p><table><tr><td> </td><td><pre class="example">hw:<var>CARD</var>[,<var>DEV</var>[,<var>SUBDEV</var>]]
1232 </pre></td></tr></table>
1234 <p>where the <var>DEV</var> and <var>SUBDEV</var> components are optional.
1236 <p>The three arguments (in order: <var>CARD</var>,<var>DEV</var>,<var>SUBDEV</var>)
1237 specify card number or identifier, device number and subdevice number
1240 <p>To see the list of cards currently recognized by your system check the
1241 files ‘<tt>/proc/asound/cards</tt>’ and ‘<tt>/proc/asound/devices</tt>’.
1243 <p>For example to capture with ‘<tt>ffmpeg</tt>’ from an ALSA device with
1244 card id 0, you may run the command:
1245 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f alsa -i hw:0 alsaout.wav
1246 </pre></td></tr></table>
1248 <p>For more information see:
1249 <a href="http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html">http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html</a>
1252 <h2 class="section"><a href="ffplay.html#toc-bktr">9.2 bktr</a></h2>
1254 <p>BSD video input device.
1256 <a name="dv1394"></a>
1257 <h2 class="section"><a href="ffplay.html#toc-dv1394">9.3 dv1394</a></h2>
1259 <p>Linux DV 1394 input device.
1261 <a name="fbdev"></a>
1262 <h2 class="section"><a href="ffplay.html#toc-fbdev">9.4 fbdev</a></h2>
1264 <p>Linux framebuffer input device.
1266 <p>The Linux framebuffer is a graphic hardware-independent abstraction
1267 layer to show graphics on a computer monitor, typically on the
1268 console. It is accessed through a file device node, usually
1269 ‘<tt>/dev/fb0</tt>’.
1271 <p>For more detailed information read the file
1272 Documentation/fb/framebuffer.txt included in the Linux source tree.
1274 <p>To record from the framebuffer device ‘<tt>/dev/fb0</tt>’ with
1275 ‘<tt>ffmpeg</tt>’:
1276 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
1277 </pre></td></tr></table>
1279 <p>You can take a single screenshot image with the command:
1280 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
1281 </pre></td></tr></table>
1283 <p>See also <a href="http://linux-fbdev.sourceforge.net/">http://linux-fbdev.sourceforge.net/</a>, and fbset(1).
1286 <h2 class="section"><a href="ffplay.html#toc-jack">9.5 jack</a></h2>
1288 <p>JACK input device.
1290 <p>To enable this input device during configuration you need libjack
1291 installed on your system.
1293 <p>A JACK input device creates one or more JACK writable clients, one for
1294 each audio channel, with name <var>client_name</var>:input_<var>N</var>, where
1295 <var>client_name</var> is the name provided by the application, and <var>N</var>
1296 is a number which identifies the channel.
1297 Each writable client will send the acquired data to the FFmpeg input
1300 <p>Once you have created one or more JACK readable clients, you need to
1301 connect them to one or more JACK writable clients.
1303 <p>To connect or disconnect JACK clients you can use the
1304 ‘<tt>jack_connect</tt>’ and ‘<tt>jack_disconnect</tt>’ programs, or do it
1305 through a graphical interface, for example with ‘<tt>qjackctl</tt>’.
1307 <p>To list the JACK clients and their properties you can invoke the command
1308 ‘<tt>jack_lsp</tt>’.
1310 <p>Follows an example which shows how to capture a JACK readable client
1311 with ‘<tt>ffmpeg</tt>’.
1312 </p><table><tr><td> </td><td><pre class="example"># Create a JACK writable client with name "ffmpeg".
1313 $ ffmpeg -f jack -i ffmpeg -y out.wav
1315 # Start the sample jack_metro readable client.
1316 $ jack_metro -b 120 -d 0.2 -f 4000
1318 # List the current JACK clients.
1327 # Connect metro to the ffmpeg writable client.
1328 $ jack_connect metro:120_bpm ffmpeg:input_1
1329 </pre></td></tr></table>
1331 <p>For more information read:
1332 <a href="http://jackaudio.org/">http://jackaudio.org/</a>
1334 <a name="lavfi"></a>
1335 <h2 class="section"><a href="ffplay.html#toc-lavfi">9.6 lavfi</a></h2>
1337 <p>Libavfilter input virtual device.
1339 <p>This input device reads data from the open output pads of a libavfilter
1342 <p>For each filtergraph open output, the input device will create a
1343 corresponding stream which is mapped to the generated output. Currently
1344 only video data is supported. The filtergraph is specified through the
1345 option ‘<samp>graph</samp>’.
1347 <p>To enable this input device, you need to configure your build with
1348 <code>--enable-libavfilter</code>.
1350 <a name="Options"></a>
1351 <h3 class="subsection"><a href="ffplay.html#toc-Options">9.6.1 Options</a></h3>
1353 <dl compact="compact">
1354 <dt> ‘<samp>graph</samp>’</dt>
1355 <dd><p>Specify the filtergraph to use as input. Each video open output must be
1356 labelled by a unique string of the form "out<var>N</var>", where <var>N</var> is a
1357 number starting from 0 corresponding to the mapped input stream
1358 generated by the device.
1359 The first unlabelled output is automatically assigned to the "out0"
1360 label, but all the others need to be specified explicitely.
1362 <p>If not specified defaults to the filename specified for the input
1367 <a name="Examples"></a>
1368 <h3 class="subsection"><a href="ffplay.html#toc-Examples">9.6.2 Examples</a></h3>
1372 Create a color video stream and play it back with ‘<tt>ffplay</tt>’:
1373 <table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "color=pink [out0]" dummy
1374 </pre></td></tr></table>
1377 As the previous example, but use filename for specifying the graph
1378 description, and omit the "out0" label:
1379 <table><tr><td> </td><td><pre class="example">ffplay -f lavfi color=pink
1380 </pre></td></tr></table>
1383 Create three different video test filtered sources and play them:
1384 <table><tr><td> </td><td><pre class="example">ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
1385 </pre></td></tr></table>
1388 <a name="libdc1394"></a>
1389 <h2 class="section"><a href="ffplay.html#toc-libdc1394">9.7 libdc1394</a></h2>
1391 <p>IIDC1394 input device, based on libdc1394 and libraw1394.
1393 <a name="openal"></a>
1394 <h2 class="section"><a href="ffplay.html#toc-openal">9.8 openal</a></h2>
1396 <p>The OpenAL input device provides audio capture on all systems with a
1397 working OpenAL 1.1 implementation.
1399 <p>To enable this input device during configuration, you need OpenAL
1400 headers and libraries installed on your system, and need to configure
1401 FFmpeg with <code>--enable-openal</code>.
1403 <p>OpenAL headers and libraries should be provided as part of your OpenAL
1404 implementation, or as an additional download (an SDK). Depending on your
1405 installation you may need to specify additional flags via the
1406 <code>--extra-cflags</code> and <code>--extra-ldflags</code> for allowing the build
1407 system to locate the OpenAL headers and libraries.
1409 <p>An incomplete list of OpenAL implementations follows:
1411 <dl compact="compact">
1412 <dt> <strong>Creative</strong></dt>
1413 <dd><p>The official Windows implementation, providing hardware acceleration
1414 with supported devices and software fallback.
1415 See <a href="http://openal.org/">http://openal.org/</a>.
1417 <dt> <strong>OpenAL Soft</strong></dt>
1418 <dd><p>Portable, open source (LGPL) software implementation. Includes
1419 backends for the most common sound APIs on the Windows, Linux,
1420 Solaris, and BSD operating systems.
1421 See <a href="http://kcat.strangesoft.net/openal.html">http://kcat.strangesoft.net/openal.html</a>.
1423 <dt> <strong>Apple</strong></dt>
1424 <dd><p>OpenAL is part of Core Audio, the official Mac OS X Audio interface.
1425 See <a href="http://developer.apple.com/technologies/mac/audio-and-video.html">http://developer.apple.com/technologies/mac/audio-and-video.html</a>
1429 <p>This device allows to capture from an audio input device handled
1432 <p>You need to specify the name of the device to capture in the provided
1433 filename. If the empty string is provided, the device will
1434 automatically select the default device. You can get the list of the
1435 supported devices by using the option <var>list_devices</var>.
1437 <a name="Options-1"></a>
1438 <h3 class="subsection"><a href="ffplay.html#toc-Options-1">9.8.1 Options</a></h3>
1440 <dl compact="compact">
1441 <dt> ‘<samp>channels</samp>’</dt>
1442 <dd><p>Set the number of channels in the captured audio. Only the values
1443 ‘<samp>1</samp>’ (monaural) and ‘<samp>2</samp>’ (stereo) are currently supported.
1444 Defaults to ‘<samp>2</samp>’.
1447 <dt> ‘<samp>sample_size</samp>’</dt>
1448 <dd><p>Set the sample size (in bits) of the captured audio. Only the values
1449 ‘<samp>8</samp>’ and ‘<samp>16</samp>’ are currently supported. Defaults to
1450 ‘<samp>16</samp>’.
1453 <dt> ‘<samp>sample_rate</samp>’</dt>
1454 <dd><p>Set the sample rate (in Hz) of the captured audio.
1455 Defaults to ‘<samp>44.1k</samp>’.
1458 <dt> ‘<samp>list_devices</samp>’</dt>
1459 <dd><p>If set to ‘<samp>true</samp>’, print a list of devices and exit.
1460 Defaults to ‘<samp>false</samp>’.
1465 <a name="Examples-2"></a>
1466 <h3 class="subsection"><a href="ffplay.html#toc-Examples-2">9.8.2 Examples</a></h3>
1468 <p>Print the list of OpenAL supported devices and exit:
1469 </p><table><tr><td> </td><td><pre class="example">$ ffmpeg -list_devices true -f openal -i dummy out.ogg
1470 </pre></td></tr></table>
1472 <p>Capture from the OpenAL device ‘<tt>DR-BT101 via PulseAudio</tt>’:
1473 </p><table><tr><td> </td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
1474 </pre></td></tr></table>
1476 <p>Capture from the default device (note the empty string ” as filename):
1477 </p><table><tr><td> </td><td><pre class="example">$ ffmpeg -f openal -i '' out.ogg
1478 </pre></td></tr></table>
1480 <p>Capture from two devices simultaneously, writing to two different files,
1481 within the same ‘<tt>ffmpeg</tt>’ command:
1482 </p><table><tr><td> </td><td><pre class="example">$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
1483 </pre></td></tr></table>
1484 <p>Note: not all OpenAL implementations support multiple simultaneous capture -
1485 try the latest OpenAL Soft if the above does not work.
1488 <h2 class="section"><a href="ffplay.html#toc-oss">9.9 oss</a></h2>
1490 <p>Open Sound System input device.
1492 <p>The filename to provide to the input device is the device node
1493 representing the OSS input device, and is usually set to
1494 ‘<tt>/dev/dsp</tt>’.
1496 <p>For example to grab from ‘<tt>/dev/dsp</tt>’ using ‘<tt>ffmpeg</tt>’ use the
1498 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
1499 </pre></td></tr></table>
1501 <p>For more information about OSS see:
1502 <a href="http://manuals.opensound.com/usersguide/dsp.html">http://manuals.opensound.com/usersguide/dsp.html</a>
1504 <a name="sndio-1"></a>
1505 <h2 class="section"><a href="ffplay.html#toc-sndio-1">9.10 sndio</a></h2>
1507 <p>sndio input device.
1509 <p>To enable this input device during configuration you need libsndio
1510 installed on your system.
1512 <p>The filename to provide to the input device is the device node
1513 representing the sndio input device, and is usually set to
1514 ‘<tt>/dev/audio0</tt>’.
1516 <p>For example to grab from ‘<tt>/dev/audio0</tt>’ using ‘<tt>ffmpeg</tt>’ use the
1518 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
1519 </pre></td></tr></table>
1521 <a name="video4linux-and-video4linux2"></a>
1522 <h2 class="section"><a href="ffplay.html#toc-video4linux-and-video4linux2">9.11 video4linux and video4linux2</a></h2>
1524 <p>Video4Linux and Video4Linux2 input video devices.
1526 <p>The name of the device to grab is a file device node, usually Linux
1527 systems tend to automatically create such nodes when the device
1528 (e.g. an USB webcam) is plugged into the system, and has a name of the
1529 kind ‘<tt>/dev/video<var>N</var></tt>’, where <var>N</var> is a number associated to
1532 <p>Video4Linux and Video4Linux2 devices only support a limited set of
1533 <var>width</var>x<var>height</var> sizes and framerates. You can check which are
1534 supported for example with the command ‘<tt>dov4l</tt>’ for Video4Linux
1535 devices and the command ‘<tt>v4l-info</tt>’ for Video4Linux2 devices.
1537 <p>If the size for the device is set to 0x0, the input device will
1538 try to autodetect the size to use.
1539 Only for the video4linux2 device, if the frame rate is set to 0/0 the
1540 input device will use the frame rate value already set in the driver.
1542 <p>Video4Linux support is deprecated since Linux 2.6.30, and will be
1543 dropped in later versions.
1545 <p>Follow some usage examples of the video4linux devices with the ff*
1547 </p><table><tr><td> </td><td><pre class="example"># Grab and show the input of a video4linux device, frame rate is set
1548 # to the default of 25/1.
1549 ffplay -s 320x240 -f video4linux /dev/video0
1551 # Grab and show the input of a video4linux2 device, autoadjust size.
1552 ffplay -f video4linux2 /dev/video0
1554 # Grab and record the input of a video4linux2 device, autoadjust size,
1555 # frame rate value defaults to 0/0 so it is read from the video4linux2
1557 ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
1558 </pre></td></tr></table>
1560 <a name="vfwcap"></a>
1561 <h2 class="section"><a href="ffplay.html#toc-vfwcap">9.12 vfwcap</a></h2>
1563 <p>VfW (Video for Windows) capture input device.
1565 <p>The filename passed as input is the capture driver number, ranging from
1566 0 to 9. You may use "list" as filename to print a list of drivers. Any
1567 other filename will be interpreted as device number 0.
1569 <a name="x11grab"></a>
1570 <h2 class="section"><a href="ffplay.html#toc-x11grab">9.13 x11grab</a></h2>
1572 <p>X11 video input device.
1574 <p>This device allows to capture a region of an X11 display.
1576 <p>The filename passed as input has the syntax:
1577 </p><table><tr><td> </td><td><pre class="example">[<var>hostname</var>]:<var>display_number</var>.<var>screen_number</var>[+<var>x_offset</var>,<var>y_offset</var>]
1578 </pre></td></tr></table>
1580 <p><var>hostname</var>:<var>display_number</var>.<var>screen_number</var> specifies the
1581 X11 display name of the screen to grab from. <var>hostname</var> can be
1582 ommitted, and defaults to "localhost". The environment variable
1583 <code>DISPLAY</code> contains the default display name.
1585 <p><var>x_offset</var> and <var>y_offset</var> specify the offsets of the grabbed
1586 area with respect to the top-left border of the X11 screen. They
1589 <p>Check the X11 documentation (e.g. man X) for more detailed information.
1591 <p>Use the ‘<tt>dpyinfo</tt>’ program for getting basic information about the
1592 properties of your X11 display (e.g. grep for "name" or "dimensions").
1594 <p>For example to grab from ‘<tt>:0.0</tt>’ using ‘<tt>ffmpeg</tt>’:
1595 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
1597 # Grab at position 10,20.
1598 ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
1599 </pre></td></tr></table>
1601 <a name="follow_005fmouse-AVOption"></a>
1602 <h3 class="subsection"><a href="ffplay.html#toc-follow_005fmouse-AVOption">9.13.1 <var>follow_mouse</var> AVOption</a></h3>
1605 </p><table><tr><td> </td><td><pre class="example">-follow_mouse centered|<var>PIXELS</var>
1606 </pre></td></tr></table>
1608 <p>When it is specified with "centered", the grabbing region follows the mouse
1609 pointer and keeps the pointer at the center of region; otherwise, the region
1610 follows only when the mouse pointer reaches within <var>PIXELS</var> (greater than
1611 zero) to the edge of region.
1614 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
1616 # Follows only when the mouse pointer reaches within 100 pixels to edge
1617 ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
1618 </pre></td></tr></table>
1620 <a name="show_005fregion-AVOption"></a>
1621 <h3 class="subsection"><a href="ffplay.html#toc-show_005fregion-AVOption">9.13.2 <var>show_region</var> AVOption</a></h3>
1624 </p><table><tr><td> </td><td><pre class="example">-show_region 1
1625 </pre></td></tr></table>
1627 <p>If <var>show_region</var> AVOption is specified with <var>1</var>, then the grabbing
1628 region will be indicated on screen. With this option, it’s easy to know what is
1629 being grabbed if only a portion of the screen is grabbed.
1632 </p><table><tr><td> </td><td><pre class="example">ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
1635 ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
1636 </pre></td></tr></table>
1638 <a name="Output-Devices"></a>
1639 <h1 class="chapter"><a href="ffplay.html#toc-Output-Devices">10. Output Devices</a></h1>
1641 <p>Output devices are configured elements in FFmpeg which allow to write
1642 multimedia data to an output device attached to your system.
1644 <p>When you configure your FFmpeg build, all the supported output devices
1645 are enabled by default. You can list all available ones using the
1646 configure option "–list-outdevs".
1648 <p>You can disable all the output devices using the configure option
1649 "–disable-outdevs", and selectively enable an output device using the
1650 option "–enable-outdev=<var>OUTDEV</var>", or you can disable a particular
1651 input device using the option "–disable-outdev=<var>OUTDEV</var>".
1653 <p>The option "-formats" of the ff* tools will display the list of
1654 enabled output devices (amongst the muxers).
1656 <p>A description of the currently available output devices follows.
1659 <h2 class="section"><a href="ffplay.html#toc-alsa">10.1 alsa</a></h2>
1661 <p>ALSA (Advanced Linux Sound Architecture) output device.
1663 <a name="oss-1"></a>
1664 <h2 class="section"><a href="ffplay.html#toc-oss-1">10.2 oss</a></h2>
1666 <p>OSS (Open Sound System) output device.
1669 <h2 class="section"><a href="ffplay.html#toc-sdl">10.3 sdl</a></h2>
1671 <p>SDL (Simple Directmedia Layer) output device.
1673 <p>This output devices allows to show a video stream in an SDL
1674 window. Only one SDL window is allowed per application, so you can
1675 have only one instance of this output device in an application.
1677 <p>To enable this output device you need libsdl installed on your system
1678 when configuring your build.
1680 <p>For more information about SDL, check:
1681 <a href="http://www.libsdl.org/">http://www.libsdl.org/</a>
1683 <a name="Options-2"></a>
1684 <h3 class="subsection"><a href="ffplay.html#toc-Options-2">10.3.1 Options</a></h3>
1686 <dl compact="compact">
1687 <dt> ‘<samp>window_title</samp>’</dt>
1688 <dd><p>Set the SDL window title, if not specified default to the filename
1689 specified for the output device.
1692 <dt> ‘<samp>icon_title</samp>’</dt>
1693 <dd><p>Set the name of the iconified SDL window, if not specified it is set
1694 to the same value of <var>window_title</var>.
1697 <dt> ‘<samp>window_size</samp>’</dt>
1698 <dd><p>Set the SDL window size, can be a string of the form
1699 <var>width</var>x<var>height</var> or a video size abbreviation.
1700 If not specified it defaults to the size of the input video.
1704 <a name="Examples-1"></a>
1705 <h3 class="subsection"><a href="ffplay.html#toc-Examples-1">10.3.2 Examples</a></h3>
1707 <p>The following command shows the ‘<tt>ffmpeg</tt>’ output is an
1708 SDL window, forcing its size to the qcif format:
1709 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
1710 </pre></td></tr></table>
1712 <a name="sndio"></a>
1713 <h2 class="section"><a href="ffplay.html#toc-sndio">10.4 sndio</a></h2>
1715 <p>sndio audio output device.
1717 <a name="Protocols"></a>
1718 <h1 class="chapter"><a href="ffplay.html#toc-Protocols">11. Protocols</a></h1>
1720 <p>Protocols are configured elements in FFmpeg which allow to access
1721 resources which require the use of a particular protocol.
1723 <p>When you configure your FFmpeg build, all the supported protocols are
1724 enabled by default. You can list all available ones using the
1725 configure option "–list-protocols".
1727 <p>You can disable all the protocols using the configure option
1728 "–disable-protocols", and selectively enable a protocol using the
1729 option "–enable-protocol=<var>PROTOCOL</var>", or you can disable a
1730 particular protocol using the option
1731 "–disable-protocol=<var>PROTOCOL</var>".
1733 <p>The option "-protocols" of the ff* tools will display the list of
1734 supported protocols.
1736 <p>A description of the currently available protocols follows.
1738 <a name="applehttp-1"></a>
1739 <h2 class="section"><a href="ffplay.html#toc-applehttp-1">11.1 applehttp</a></h2>
1741 <p>Read Apple HTTP Live Streaming compliant segmented stream as
1742 a uniform one. The M3U8 playlists describing the segments can be
1743 remote HTTP resources or local files, accessed using the standard
1745 HTTP is default, specific protocol can be declared by specifying
1746 "+<var>proto</var>" after the applehttp URI scheme name, where <var>proto</var>
1747 is either "file" or "http".
1749 <table><tr><td> </td><td><pre class="example">applehttp://host/path/to/remote/resource.m3u8
1750 applehttp+http://host/path/to/remote/resource.m3u8
1751 applehttp+file://path/to/local/resource.m3u8
1752 </pre></td></tr></table>
1754 <a name="concat"></a>
1755 <h2 class="section"><a href="ffplay.html#toc-concat">11.2 concat</a></h2>
1757 <p>Physical concatenation protocol.
1759 <p>Allow to read and seek from many resource in sequence as if they were
1762 <p>A URL accepted by this protocol has the syntax:
1763 </p><table><tr><td> </td><td><pre class="example">concat:<var>URL1</var>|<var>URL2</var>|...|<var>URLN</var>
1764 </pre></td></tr></table>
1766 <p>where <var>URL1</var>, <var>URL2</var>, ..., <var>URLN</var> are the urls of the
1767 resource to be concatenated, each one possibly specifying a distinct
1770 <p>For example to read a sequence of files ‘<tt>split1.mpeg</tt>’,
1771 ‘<tt>split2.mpeg</tt>’, ‘<tt>split3.mpeg</tt>’ with ‘<tt>ffplay</tt>’ use the
1773 </p><table><tr><td> </td><td><pre class="example">ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
1774 </pre></td></tr></table>
1776 <p>Note that you may need to escape the character "|" which is special for
1780 <h2 class="section"><a href="ffplay.html#toc-file">11.3 file</a></h2>
1782 <p>File access protocol.
1784 <p>Allow to read from or read to a file.
1786 <p>For example to read from a file ‘<tt>input.mpeg</tt>’ with ‘<tt>ffmpeg</tt>’
1788 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i file:input.mpeg output.mpeg
1789 </pre></td></tr></table>
1791 <p>The ff* tools default to the file protocol, that is a resource
1792 specified with the name "FILE.mpeg" is interpreted as the URL
1793 "file:FILE.mpeg".
1795 <a name="gopher"></a>
1796 <h2 class="section"><a href="ffplay.html#toc-gopher">11.4 gopher</a></h2>
1801 <h2 class="section"><a href="ffplay.html#toc-http">11.5 http</a></h2>
1803 <p>HTTP (Hyper Text Transfer Protocol).
1806 <h2 class="section"><a href="ffplay.html#toc-mmst">11.6 mmst</a></h2>
1808 <p>MMS (Microsoft Media Server) protocol over TCP.
1811 <h2 class="section"><a href="ffplay.html#toc-mmsh">11.7 mmsh</a></h2>
1813 <p>MMS (Microsoft Media Server) protocol over HTTP.
1815 <p>The required syntax is:
1816 </p><table><tr><td> </td><td><pre class="example">mmsh://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
1817 </pre></td></tr></table>
1820 <h2 class="section"><a href="ffplay.html#toc-md5">11.8 md5</a></h2>
1822 <p>MD5 output protocol.
1824 <p>Computes the MD5 hash of the data to be written, and on close writes
1825 this to the designated output or stdout if none is specified. It can
1826 be used to test muxers without writing an actual file.
1828 <p>Some examples follow.
1829 </p><table><tr><td> </td><td><pre class="example"># Write the MD5 hash of the encoded AVI file to the file output.avi.md5.
1830 ffmpeg -i input.flv -f avi -y md5:output.avi.md5
1832 # Write the MD5 hash of the encoded AVI file to stdout.
1833 ffmpeg -i input.flv -f avi -y md5:
1834 </pre></td></tr></table>
1836 <p>Note that some formats (typically MOV) require the output protocol to
1837 be seekable, so they will fail with the MD5 output protocol.
1840 <h2 class="section"><a href="ffplay.html#toc-pipe">11.9 pipe</a></h2>
1842 <p>UNIX pipe access protocol.
1844 <p>Allow to read and write from UNIX pipes.
1846 <p>The accepted syntax is:
1847 </p><table><tr><td> </td><td><pre class="example">pipe:[<var>number</var>]
1848 </pre></td></tr></table>
1850 <p><var>number</var> is the number corresponding to the file descriptor of the
1851 pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If <var>number</var>
1852 is not specified, by default the stdout file descriptor will be used
1853 for writing, stdin for reading.
1855 <p>For example to read from stdin with ‘<tt>ffmpeg</tt>’:
1856 </p><table><tr><td> </td><td><pre class="example">cat test.wav | ffmpeg -i pipe:0
1857 # ...this is the same as...
1858 cat test.wav | ffmpeg -i pipe:
1859 </pre></td></tr></table>
1861 <p>For writing to stdout with ‘<tt>ffmpeg</tt>’:
1862 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
1863 # ...this is the same as...
1864 ffmpeg -i test.wav -f avi pipe: | cat > test.avi
1865 </pre></td></tr></table>
1867 <p>Note that some formats (typically MOV), require the output protocol to
1868 be seekable, so they will fail with the pipe output protocol.
1871 <h2 class="section"><a href="ffplay.html#toc-rtmp">11.10 rtmp</a></h2>
1873 <p>Real-Time Messaging Protocol.
1875 <p>The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
1876 dia content across a TCP/IP network.
1878 <p>The required syntax is:
1879 </p><table><tr><td> </td><td><pre class="example">rtmp://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>]
1880 </pre></td></tr></table>
1882 <p>The accepted parameters are:
1883 </p><dl compact="compact">
1884 <dt> ‘<samp>server</samp>’</dt>
1885 <dd><p>The address of the RTMP server.
1888 <dt> ‘<samp>port</samp>’</dt>
1889 <dd><p>The number of the TCP port to use (by default is 1935).
1892 <dt> ‘<samp>app</samp>’</dt>
1893 <dd><p>It is the name of the application to access. It usually corresponds to
1894 the path where the application is installed on the RTMP server
1895 (e.g. ‘<tt>/ondemand/</tt>’, ‘<tt>/flash/live/</tt>’, etc.).
1898 <dt> ‘<samp>playpath</samp>’</dt>
1899 <dd><p>It is the path or name of the resource to play with reference to the
1900 application specified in <var>app</var>, may be prefixed by "mp4:".
1905 <p>For example to read with ‘<tt>ffplay</tt>’ a multimedia resource named
1906 "sample" from the application "vod" from an RTMP server "myserver":
1907 </p><table><tr><td> </td><td><pre class="example">ffplay rtmp://myserver/vod/sample
1908 </pre></td></tr></table>
1910 <a name="rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte"></a>
1911 <h2 class="section"><a href="ffplay.html#toc-rtmp_002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte">11.11 rtmp, rtmpe, rtmps, rtmpt, rtmpte</a></h2>
1913 <p>Real-Time Messaging Protocol and its variants supported through
1916 <p>Requires the presence of the librtmp headers and library during
1917 configuration. You need to explicitely configure the build with
1918 "–enable-librtmp". If enabled this will replace the native RTMP
1921 <p>This protocol provides most client functions and a few server
1922 functions needed to support RTMP, RTMP tunneled in HTTP (RTMPT),
1923 encrypted RTMP (RTMPE), RTMP over SSL/TLS (RTMPS) and tunneled
1924 variants of these encrypted types (RTMPTE, RTMPTS).
1926 <p>The required syntax is:
1927 </p><table><tr><td> </td><td><pre class="example"><var>rtmp_proto</var>://<var>server</var>[:<var>port</var>][/<var>app</var>][/<var>playpath</var>] <var>options</var>
1928 </pre></td></tr></table>
1930 <p>where <var>rtmp_proto</var> is one of the strings "rtmp", "rtmpt", "rtmpe",
1931 "rtmps", "rtmpte", "rtmpts" corresponding to each RTMP variant, and
1932 <var>server</var>, <var>port</var>, <var>app</var> and <var>playpath</var> have the same
1933 meaning as specified for the RTMP native protocol.
1934 <var>options</var> contains a list of space-separated options of the form
1935 <var>key</var>=<var>val</var>.
1937 <p>See the librtmp manual page (man 3 librtmp) for more information.
1939 <p>For example, to stream a file in real-time to an RTMP server using
1940 ‘<tt>ffmpeg</tt>’:
1941 </p><table><tr><td> </td><td><pre class="example">ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
1942 </pre></td></tr></table>
1944 <p>To play the same stream using ‘<tt>ffplay</tt>’:
1945 </p><table><tr><td> </td><td><pre class="example">ffplay "rtmp://myserver/live/mystream live=1"
1946 </pre></td></tr></table>
1949 <h2 class="section"><a href="ffplay.html#toc-rtp">11.12 rtp</a></h2>
1951 <p>Real-Time Protocol.
1954 <h2 class="section"><a href="ffplay.html#toc-rtsp">11.13 rtsp</a></h2>
1956 <p>RTSP is not technically a protocol handler in libavformat, it is a demuxer
1957 and muxer. The demuxer supports both normal RTSP (with data transferred
1958 over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with
1959 data transferred over RDT).
1961 <p>The muxer can be used to send a stream using RTSP ANNOUNCE to a server
1962 supporting it (currently Darwin Streaming Server and Mischa Spiegelmock’s
1963 <a href="http://github.com/revmischa/rtsp-server">RTSP server</a>).
1965 <p>The required syntax for a RTSP url is:
1966 </p><table><tr><td> </td><td><pre class="example">rtsp://<var>hostname</var>[:<var>port</var>]/<var>path</var>[?<var>options</var>]
1967 </pre></td></tr></table>
1969 <p><var>options</var> is a <code>&</code>-separated list. The following options
1972 <dl compact="compact">
1973 <dt> ‘<samp>udp</samp>’</dt>
1974 <dd><p>Use UDP as lower transport protocol.
1977 <dt> ‘<samp>tcp</samp>’</dt>
1978 <dd><p>Use TCP (interleaving within the RTSP control channel) as lower
1982 <dt> ‘<samp>multicast</samp>’</dt>
1983 <dd><p>Use UDP multicast as lower transport protocol.
1986 <dt> ‘<samp>http</samp>’</dt>
1987 <dd><p>Use HTTP tunneling as lower transport protocol, which is useful for
1991 <dt> ‘<samp>filter_src</samp>’</dt>
1992 <dd><p>Accept packets only from negotiated peer address and port.
1996 <p>Multiple lower transport protocols may be specified, in that case they are
1997 tried one at a time (if the setup of one fails, the next one is tried).
1998 For the muxer, only the <code>tcp</code> and <code>udp</code> options are supported.
2000 <p>When receiving data over UDP, the demuxer tries to reorder received packets
2001 (since they may arrive out of order, or packets may get lost totally). In
2002 order for this to be enabled, a maximum delay must be specified in the
2003 <code>max_delay</code> field of AVFormatContext.
2005 <p>When watching multi-bitrate Real-RTSP streams with ‘<tt>ffplay</tt>’, the
2006 streams to display can be chosen with <code>-vst</code> <var>n</var> and
2007 <code>-ast</code> <var>n</var> for video and audio respectively, and can be switched
2008 on the fly by pressing <code>v</code> and <code>a</code>.
2010 <p>Example command lines:
2012 <p>To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
2014 <table><tr><td> </td><td><pre class="example">ffplay -max_delay 500000 rtsp://server/video.mp4?udp
2015 </pre></td></tr></table>
2017 <p>To watch a stream tunneled over HTTP:
2019 <table><tr><td> </td><td><pre class="example">ffplay rtsp://server/video.mp4?http
2020 </pre></td></tr></table>
2022 <p>To send a stream in realtime to a RTSP server, for others to watch:
2024 <table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
2025 </pre></td></tr></table>
2028 <h2 class="section"><a href="ffplay.html#toc-sap">11.14 sap</a></h2>
2030 <p>Session Announcement Protocol (RFC 2974). This is not technically a
2031 protocol handler in libavformat, it is a muxer and demuxer.
2032 It is used for signalling of RTP streams, by announcing the SDP for the
2033 streams regularly on a separate port.
2035 <a name="Muxer"></a>
2036 <h3 class="subsection"><a href="ffplay.html#toc-Muxer">11.14.1 Muxer</a></h3>
2038 <p>The syntax for a SAP url given to the muxer is:
2039 </p><table><tr><td> </td><td><pre class="example">sap://<var>destination</var>[:<var>port</var>][?<var>options</var>]
2040 </pre></td></tr></table>
2042 <p>The RTP packets are sent to <var>destination</var> on port <var>port</var>,
2043 or to port 5004 if no port is specified.
2044 <var>options</var> is a <code>&</code>-separated list. The following options
2047 <dl compact="compact">
2048 <dt> ‘<samp>announce_addr=<var>address</var></samp>’</dt>
2049 <dd><p>Specify the destination IP address for sending the announcements to.
2050 If omitted, the announcements are sent to the commonly used SAP
2051 announcement multicast address 224.2.127.254 (sap.mcast.net), or
2052 ff0e::2:7ffe if <var>destination</var> is an IPv6 address.
2055 <dt> ‘<samp>announce_port=<var>port</var></samp>’</dt>
2056 <dd><p>Specify the port to send the announcements on, defaults to
2057 9875 if not specified.
2060 <dt> ‘<samp>ttl=<var>ttl</var></samp>’</dt>
2061 <dd><p>Specify the time to live value for the announcements and RTP packets,
2065 <dt> ‘<samp>same_port=<var>0|1</var></samp>’</dt>
2066 <dd><p>If set to 1, send all RTP streams on the same port pair. If zero (the
2067 default), all streams are sent on unique ports, with each stream on a
2068 port 2 numbers higher than the previous.
2069 VLC/Live555 requires this to be set to 1, to be able to receive the stream.
2070 The RTP stack in libavformat for receiving requires all streams to be sent
2075 <p>Example command lines follow.
2077 <p>To broadcast a stream on the local subnet, for watching in VLC:
2079 <table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255?same_port=1
2080 </pre></td></tr></table>
2082 <p>Similarly, for watching in ffplay:
2084 <table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://224.0.0.255
2085 </pre></td></tr></table>
2087 <p>And for watching in ffplay, over IPv6:
2089 <table><tr><td> </td><td><pre class="example">ffmpeg -re -i <var>input</var> -f sap sap://[ff0e::1:2:3:4]
2090 </pre></td></tr></table>
2092 <a name="Demuxer"></a>
2093 <h3 class="subsection"><a href="ffplay.html#toc-Demuxer">11.14.2 Demuxer</a></h3>
2095 <p>The syntax for a SAP url given to the demuxer is:
2096 </p><table><tr><td> </td><td><pre class="example">sap://[<var>address</var>][:<var>port</var>]
2097 </pre></td></tr></table>
2099 <p><var>address</var> is the multicast address to listen for announcements on,
2100 if omitted, the default 224.2.127.254 (sap.mcast.net) is used. <var>port</var>
2101 is the port that is listened on, 9875 if omitted.
2103 <p>The demuxers listens for announcements on the given address and port.
2104 Once an announcement is received, it tries to receive that particular stream.
2106 <p>Example command lines follow.
2108 <p>To play back the first stream announced on the normal SAP multicast address:
2110 <table><tr><td> </td><td><pre class="example">ffplay sap://
2111 </pre></td></tr></table>
2113 <p>To play back the first stream announced on one the default IPv6 SAP multicast address:
2115 <table><tr><td> </td><td><pre class="example">ffplay sap://[ff0e::2:7ffe]
2116 </pre></td></tr></table>
2119 <h2 class="section"><a href="ffplay.html#toc-tcp">11.15 tcp</a></h2>
2121 <p>Trasmission Control Protocol.
2123 <p>The required syntax for a TCP url is:
2124 </p><table><tr><td> </td><td><pre class="example">tcp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
2125 </pre></td></tr></table>
2127 <dl compact="compact">
2128 <dt> ‘<samp>listen</samp>’</dt>
2129 <dd><p>Listen for an incoming connection
2131 <table><tr><td> </td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> tcp://<var>hostname</var>:<var>port</var>?listen
2132 ffplay tcp://<var>hostname</var>:<var>port</var>
2133 </pre></td></tr></table>
2139 <h2 class="section"><a href="ffplay.html#toc-udp">11.16 udp</a></h2>
2141 <p>User Datagram Protocol.
2143 <p>The required syntax for a UDP url is:
2144 </p><table><tr><td> </td><td><pre class="example">udp://<var>hostname</var>:<var>port</var>[?<var>options</var>]
2145 </pre></td></tr></table>
2147 <p><var>options</var> contains a list of &-seperated options of the form <var>key</var>=<var>val</var>.
2148 Follow the list of supported options.
2150 <dl compact="compact">
2151 <dt> ‘<samp>buffer_size=<var>size</var></samp>’</dt>
2152 <dd><p>set the UDP buffer size in bytes
2155 <dt> ‘<samp>localport=<var>port</var></samp>’</dt>
2156 <dd><p>override the local UDP port to bind with
2159 <dt> ‘<samp>pkt_size=<var>size</var></samp>’</dt>
2160 <dd><p>set the size in bytes of UDP packets
2163 <dt> ‘<samp>reuse=<var>1|0</var></samp>’</dt>
2164 <dd><p>explicitly allow or disallow reusing UDP sockets
2167 <dt> ‘<samp>ttl=<var>ttl</var></samp>’</dt>
2168 <dd><p>set the time to live value (for multicast only)
2171 <dt> ‘<samp>connect=<var>1|0</var></samp>’</dt>
2172 <dd><p>Initialize the UDP socket with <code>connect()</code>. In this case, the
2173 destination address can’t be changed with ff_udp_set_remote_url later.
2174 If the destination address isn’t known at the start, this option can
2175 be specified in ff_udp_set_remote_url, too.
2176 This allows finding out the source address for the packets with getsockname,
2177 and makes writes return with AVERROR(ECONNREFUSED) if "destination
2178 unreachable" is received.
2179 For receiving, this gives the benefit of only receiving packets from
2180 the specified peer address/port.
2184 <p>Some usage examples of the udp protocol with ‘<tt>ffmpeg</tt>’ follow.
2186 <p>To stream over UDP to a remote endpoint:
2187 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i <var>input</var> -f <var>format</var> udp://<var>hostname</var>:<var>port</var>
2188 </pre></td></tr></table>
2190 <p>To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
2191 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i <var>input</var> -f mpegts udp://<var>hostname</var>:<var>port</var>?pkt_size=188&buffer_size=65535
2192 </pre></td></tr></table>
2194 <p>To receive over UDP from a remote endpoint:
2195 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i udp://[<var>multicast-address</var>]:<var>port</var>
2196 </pre></td></tr></table>
2198 <a name="Filtergraph-description"></a>
2199 <h1 class="chapter"><a href="ffplay.html#toc-Filtergraph-description">12. Filtergraph description</a></h1>
2201 <p>A filtergraph is a directed graph of connected filters. It can contain
2202 cycles, and there can be multiple links between a pair of
2203 filters. Each link has one input pad on one side connecting it to one
2204 filter from which it takes its input, and one output pad on the other
2205 side connecting it to the one filter accepting its output.
2207 <p>Each filter in a filtergraph is an instance of a filter class
2208 registered in the application, which defines the features and the
2209 number of input and output pads of the filter.
2211 <p>A filter with no input pads is called a "source", a filter with no
2212 output pads is called a "sink".
2214 <a name="Filtergraph-syntax"></a>
2215 <h2 class="section"><a href="ffplay.html#toc-Filtergraph-syntax">12.1 Filtergraph syntax</a></h2>
2217 <p>A filtergraph can be represented using a textual representation, which
2218 is recognized by the <code>-vf</code> and <code>-af</code> options of the ff*
2219 tools, and by the <code>avfilter_graph_parse()</code> function defined in
2220 ‘<tt>libavfilter/avfiltergraph.h</tt>’.
2222 <p>A filterchain consists of a sequence of connected filters, each one
2223 connected to the previous one in the sequence. A filterchain is
2224 represented by a list of ","-separated filter descriptions.
2226 <p>A filtergraph consists of a sequence of filterchains. A sequence of
2227 filterchains is represented by a list of ";"-separated filterchain
2230 <p>A filter is represented by a string of the form:
2231 [<var>in_link_1</var>]...[<var>in_link_N</var>]<var>filter_name</var>=<var>arguments</var>[<var>out_link_1</var>]...[<var>out_link_M</var>]
2233 <p><var>filter_name</var> is the name of the filter class of which the
2234 described filter is an instance of, and has to be the name of one of
2235 the filter classes registered in the program.
2236 The name of the filter class is optionally followed by a string
2237 "=<var>arguments</var>".
2239 <p><var>arguments</var> is a string which contains the parameters used to
2240 initialize the filter instance, and are described in the filter
2243 <p>The list of arguments can be quoted using the character "’" as initial
2244 and ending mark, and the character ’\’ for escaping the characters
2245 within the quoted text; otherwise the argument string is considered
2246 terminated when the next special character (belonging to the set
2247 "[]=;,") is encountered.
2249 <p>The name and arguments of the filter are optionally preceded and
2250 followed by a list of link labels.
2251 A link label allows to name a link and associate it to a filter output
2252 or input pad. The preceding labels <var>in_link_1</var>
2253 ... <var>in_link_N</var>, are associated to the filter input pads,
2254 the following labels <var>out_link_1</var> ... <var>out_link_M</var>, are
2255 associated to the output pads.
2257 <p>When two link labels with the same name are found in the
2258 filtergraph, a link between the corresponding input and output pad is
2261 <p>If an output pad is not labelled, it is linked by default to the first
2262 unlabelled input pad of the next filter in the filterchain.
2263 For example in the filterchain:
2264 </p><table><tr><td> </td><td><pre class="example">nullsrc, split[L1], [L2]overlay, nullsink
2265 </pre></td></tr></table>
2266 <p>the split filter instance has two output pads, and the overlay filter
2267 instance two input pads. The first output pad of split is labelled
2268 "L1", the first input pad of overlay is labelled "L2", and the second
2269 output pad of split is linked to the second input pad of overlay,
2270 which are both unlabelled.
2272 <p>In a complete filterchain all the unlabelled filter input and output
2273 pads must be connected. A filtergraph is considered valid if all the
2274 filter input and output pads of all the filterchains are connected.
2276 <p>Follows a BNF description for the filtergraph syntax:
2277 </p><table><tr><td> </td><td><pre class="example"><var>NAME</var> ::= sequence of alphanumeric characters and '_'
2278 <var>LINKLABEL</var> ::= "[" <var>NAME</var> "]"
2279 <var>LINKLABELS</var> ::= <var>LINKLABEL</var> [<var>LINKLABELS</var>]
2280 <var>FILTER_ARGUMENTS</var> ::= sequence of chars (eventually quoted)
2281 <var>FILTER</var> ::= [<var>LINKNAMES</var>] <var>NAME</var> ["=" <var>ARGUMENTS</var>] [<var>LINKNAMES</var>]
2282 <var>FILTERCHAIN</var> ::= <var>FILTER</var> [,<var>FILTERCHAIN</var>]
2283 <var>FILTERGRAPH</var> ::= <var>FILTERCHAIN</var> [;<var>FILTERGRAPH</var>]
2284 </pre></td></tr></table>
2287 <a name="Audio-Filters"></a>
2288 <h1 class="chapter"><a href="ffplay.html#toc-Audio-Filters">13. Audio Filters</a></h1>
2290 <p>When you configure your FFmpeg build, you can disable any of the
2291 existing filters using –disable-filters.
2292 The configure output will show the audio filters included in your
2295 <p>Below is a description of the currently available audio filters.
2297 <a name="aformat"></a>
2298 <h2 class="section"><a href="ffplay.html#toc-aformat">13.1 aformat</a></h2>
2300 <p>Convert the input audio to one of the specified formats. The framework will
2301 negotiate the most appropriate format to minimize conversions.
2303 <p>The filter accepts three lists of formats, separated by ":", in the form:
2304 "<var>sample_formats</var>:<var>channel_layouts</var>:<var>packing_formats</var>".
2306 <p>Elements in each list are separated by "," which has to be escaped in the
2307 filtergraph specification.
2309 <p>The special parameter "all", in place of a list of elements, signifies all
2312 <p>Some examples follow:
2313 </p><table><tr><td> </td><td><pre class="example">aformat=u8\\,s16:mono:packed
2315 aformat=s16:mono\\,stereo:all
2316 </pre></td></tr></table>
2318 <a name="anull"></a>
2319 <h2 class="section"><a href="ffplay.html#toc-anull">13.2 anull</a></h2>
2321 <p>Pass the audio source unchanged to the output.
2323 <a name="aresample"></a>
2324 <h2 class="section"><a href="ffplay.html#toc-aresample">13.3 aresample</a></h2>
2326 <p>Resample the input audio to the specified sample rate.
2328 <p>The filter accepts exactly one parameter, the output sample rate. If not
2329 specified then the filter will automatically convert between its input
2330 and output sample rates.
2332 <p>For example, to resample the input audio to 44100Hz:
2333 </p><table><tr><td> </td><td><pre class="example">aresample=44100
2334 </pre></td></tr></table>
2336 <a name="ashowinfo"></a>
2337 <h2 class="section"><a href="ffplay.html#toc-ashowinfo">13.4 ashowinfo</a></h2>
2339 <p>Show a line containing various information for each input audio frame.
2340 The input audio is not modified.
2342 <p>The shown line contains a sequence of key/value pairs of the form
2343 <var>key</var>:<var>value</var>.
2345 <p>A description of each shown parameter follows:
2347 <dl compact="compact">
2348 <dt> ‘<samp>n</samp>’</dt>
2349 <dd><p>sequential number of the input frame, starting from 0
2352 <dt> ‘<samp>pts</samp>’</dt>
2353 <dd><p>presentation TimeStamp of the input frame, expressed as a number of
2354 time base units. The time base unit depends on the filter input pad, and
2355 is usually 1/<var>sample_rate</var>.
2358 <dt> ‘<samp>pts_time</samp>’</dt>
2359 <dd><p>presentation TimeStamp of the input frame, expressed as a number of
2363 <dt> ‘<samp>pos</samp>’</dt>
2364 <dd><p>position of the frame in the input stream, -1 if this information in
2365 unavailable and/or meanigless (for example in case of synthetic audio)
2368 <dt> ‘<samp>fmt</samp>’</dt>
2369 <dd><p>sample format name
2372 <dt> ‘<samp>chlayout</samp>’</dt>
2373 <dd><p>channel layout description
2376 <dt> ‘<samp>nb_samples</samp>’</dt>
2377 <dd><p>number of samples (per each channel) contained in the filtered frame
2380 <dt> ‘<samp>rate</samp>’</dt>
2381 <dd><p>sample rate for the audio frame
2384 <dt> ‘<samp>planar</samp>’</dt>
2385 <dd><p>if the packing format is planar, 0 if packed
2388 <dt> ‘<samp>checksum</samp>’</dt>
2389 <dd><p>Adler-32 checksum of all the planes of the input frame
2392 <dt> ‘<samp>plane_checksum</samp>’</dt>
2393 <dd><p>Adler-32 checksum for each input frame plane, expressed in the form
2394 "[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var> <var>c4</var> <var>c5</var> <var>c6</var> <var>c7</var>]"
2399 <a name="Audio-Sources"></a>
2400 <h1 class="chapter"><a href="ffplay.html#toc-Audio-Sources">14. Audio Sources</a></h1>
2402 <p>Below is a description of the currently available audio sources.
2404 <a name="abuffer"></a>
2405 <h2 class="section"><a href="ffplay.html#toc-abuffer">14.1 abuffer</a></h2>
2407 <p>Buffer audio frames, and make them available to the filter chain.
2409 <p>This source is mainly intended for a programmatic use, in particular
2410 through the interface defined in ‘<tt>libavfilter/asrc_abuffer.h</tt>’.
2412 <p>It accepts the following mandatory parameters:
2413 <var>sample_rate</var>:<var>sample_fmt</var>:<var>channel_layout</var>:<var>packing</var>
2415 <dl compact="compact">
2416 <dt> ‘<samp>sample_rate</samp>’</dt>
2417 <dd><p>The sample rate of the incoming audio buffers.
2420 <dt> ‘<samp>sample_fmt</samp>’</dt>
2421 <dd><p>The sample format of the incoming audio buffers.
2422 Either a sample format name or its corresponging integer representation from
2423 the enum AVSampleFormat in ‘<tt>libavutil/samplefmt.h</tt>’
2426 <dt> ‘<samp>channel_layout</samp>’</dt>
2427 <dd><p>The channel layout of the incoming audio buffers.
2428 Either a channel layout name from channel_layout_map in
2429 ‘<tt>libavutil/audioconvert.c</tt>’ or its corresponding integer representation
2430 from the AV_CH_LAYOUT_* macros in ‘<tt>libavutil/audioconvert.h</tt>’
2433 <dt> ‘<samp>packing</samp>’</dt>
2434 <dd><p>Either "packed" or "planar", or their integer representation: 0 or 1
2441 </p><table><tr><td> </td><td><pre class="example">abuffer=44100:s16:stereo:planar
2442 </pre></td></tr></table>
2444 <p>will instruct the source to accept planar 16bit signed stereo at 44100Hz.
2445 Since the sample format with name "s16" corresponds to the number
2446 1 and the "stereo" channel layout corresponds to the value 3, this is
2448 </p><table><tr><td> </td><td><pre class="example">abuffer=44100:1:3:1
2449 </pre></td></tr></table>
2451 <a name="amovie"></a>
2452 <h2 class="section"><a href="ffplay.html#toc-amovie">14.2 amovie</a></h2>
2454 <p>Read an audio stream from a movie container.
2456 <p>It accepts the syntax: <var>movie_name</var>[:<var>options</var>] where
2457 <var>movie_name</var> is the name of the resource to read (not necessarily
2458 a file but also a device or a stream accessed through some protocol),
2459 and <var>options</var> is an optional sequence of <var>key</var>=<var>value</var>
2460 pairs, separated by ":".
2462 <p>The description of the accepted options follows.
2464 <dl compact="compact">
2465 <dt> ‘<samp>format_name, f</samp>’</dt>
2466 <dd><p>Specify the format assumed for the movie to read, and can be either
2467 the name of a container or an input device. If not specified the
2468 format is guessed from <var>movie_name</var> or by probing.
2471 <dt> ‘<samp>seek_point, sp</samp>’</dt>
2472 <dd><p>Specify the seek point in seconds, the frames will be output
2473 starting from this seek point, the parameter is evaluated with
2474 <code>av_strtod</code> so the numerical value may be suffixed by an IS
2475 postfix. Default value is "0".
2478 <dt> ‘<samp>stream_index, si</samp>’</dt>
2479 <dd><p>Specify the index of the audio stream to read. If the value is -1,
2480 the best suited audio stream will be automatically selected. Default
2481 value is "-1".
2486 <a name="anullsrc"></a>
2487 <h2 class="section"><a href="ffplay.html#toc-anullsrc">14.3 anullsrc</a></h2>
2489 <p>Null audio source, never return audio frames. It is mainly useful as a
2490 template and to be employed in analysis / debugging tools.
2492 <p>It accepts as optional parameter a string of the form
2493 <var>sample_rate</var>:<var>channel_layout</var>.
2495 <p><var>sample_rate</var> specify the sample rate, and defaults to 44100.
2497 <p><var>channel_layout</var> specify the channel layout, and can be either an
2498 integer or a string representing a channel layout. The default value
2499 of <var>channel_layout</var> is 3, which corresponds to CH_LAYOUT_STEREO.
2501 <p>Check the channel_layout_map definition in
2502 ‘<tt>libavcodec/audioconvert.c</tt>’ for the mapping between strings and
2503 channel layout values.
2505 <p>Follow some examples:
2506 </p><table><tr><td> </td><td><pre class="example"># set the sample rate to 48000 Hz and the channel layout to CH_LAYOUT_MONO.
2511 </pre></td></tr></table>
2514 <a name="Audio-Sinks"></a>
2515 <h1 class="chapter"><a href="ffplay.html#toc-Audio-Sinks">15. Audio Sinks</a></h1>
2517 <p>Below is a description of the currently available audio sinks.
2519 <a name="abuffersink"></a>
2520 <h2 class="section"><a href="ffplay.html#toc-abuffersink">15.1 abuffersink</a></h2>
2522 <p>Buffer audio frames, and make them available to the end of filter chain.
2524 <p>This sink is mainly intended for programmatic use, in particular
2525 through the interface defined in ‘<tt>libavfilter/asink_abuffer.h</tt>’.
2527 <p>It requires a pointer to a ABufferSinkContext structure, which defines the
2528 incoming buffers’ format, to be passed as the opaque parameter to
2529 <code>avfilter_init_filter</code> for initialization.
2531 <a name="anullsink"></a>
2532 <h2 class="section"><a href="ffplay.html#toc-anullsink">15.2 anullsink</a></h2>
2534 <p>Null audio sink, do absolutely nothing with the input audio. It is
2535 mainly useful as a template and to be employed in analysis / debugging
2539 <a name="Video-Filters"></a>
2540 <h1 class="chapter"><a href="ffplay.html#toc-Video-Filters">16. Video Filters</a></h1>
2542 <p>When you configure your FFmpeg build, you can disable any of the
2543 existing filters using –disable-filters.
2544 The configure output will show the video filters included in your
2547 <p>Below is a description of the currently available video filters.
2549 <a name="blackframe"></a>
2550 <h2 class="section"><a href="ffplay.html#toc-blackframe">16.1 blackframe</a></h2>
2552 <p>Detect frames that are (almost) completely black. Can be useful to
2553 detect chapter transitions or commercials. Output lines consist of
2554 the frame number of the detected frame, the percentage of blackness,
2555 the position in the file if known or -1 and the timestamp in seconds.
2557 <p>In order to display the output lines, you need to set the loglevel at
2558 least to the AV_LOG_INFO value.
2560 <p>The filter accepts the syntax:
2561 </p><table><tr><td> </td><td><pre class="example">blackframe[=<var>amount</var>:[<var>threshold</var>]]
2562 </pre></td></tr></table>
2564 <p><var>amount</var> is the percentage of the pixels that have to be below the
2565 threshold, and defaults to 98.
2567 <p><var>threshold</var> is the threshold below which a pixel value is
2568 considered black, and defaults to 32.
2570 <a name="boxblur"></a>
2571 <h2 class="section"><a href="ffplay.html#toc-boxblur">16.2 boxblur</a></h2>
2573 <p>Apply boxblur algorithm to the input video.
2575 <p>This filter accepts the parameters:
2576 <var>luma_power</var>:<var>luma_radius</var>:<var>chroma_radius</var>:<var>chroma_power</var>:<var>alpha_radius</var>:<var>alpha_power</var>
2578 <p>Chroma and alpha parameters are optional, if not specified they default
2579 to the corresponding values set for <var>luma_radius</var> and
2580 <var>luma_power</var>.
2582 <p><var>luma_radius</var>, <var>chroma_radius</var>, and <var>alpha_radius</var> represent
2583 the radius in pixels of the box used for blurring the corresponding
2584 input plane. They are expressions, and can contain the following
2586 </p><dl compact="compact">
2587 <dt> ‘<samp>w, h</samp>’</dt>
2588 <dd><p>the input width and heigth in pixels
2591 <dt> ‘<samp>cw, ch</samp>’</dt>
2592 <dd><p>the input chroma image width and height in pixels
2595 <dt> ‘<samp>hsub, vsub</samp>’</dt>
2596 <dd><p>horizontal and vertical chroma subsample values. For example for the
2597 pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
2601 <p>The radius must be a non-negative number, and must be not greater than
2602 the value of the expression <code>min(w,h)/2</code> for the luma and alpha planes,
2603 and of <code>min(cw,ch)/2</code> for the chroma planes.
2605 <p><var>luma_power</var>, <var>chroma_power</var>, and <var>alpha_power</var> represent
2606 how many times the boxblur filter is applied to the corresponding
2609 <p>Some examples follow:
2613 Apply a boxblur filter with luma, chroma, and alpha radius
2615 <table><tr><td> </td><td><pre class="example">boxblur=2:1
2616 </pre></td></tr></table>
2619 Set luma radius to 2, alpha and chroma radius to 0
2620 <table><tr><td> </td><td><pre class="example">boxblur=2:1:0:0:0:0
2621 </pre></td></tr></table>
2624 Set luma and chroma radius to a fraction of the video dimension
2625 <table><tr><td> </td><td><pre class="example">boxblur=min(h\,w)/10:1:min(cw\,ch)/10:1
2626 </pre></td></tr></table>
2631 <h2 class="section"><a href="ffplay.html#toc-copy">16.3 copy</a></h2>
2633 <p>Copy the input source unchanged to the output. Mainly useful for
2637 <h2 class="section"><a href="ffplay.html#toc-crop">16.4 crop</a></h2>
2639 <p>Crop the input video to <var>out_w</var>:<var>out_h</var>:<var>x</var>:<var>y</var>.
2641 <p>The parameters are expressions containing the following constants:
2643 <dl compact="compact">
2644 <dt> ‘<samp>E, PI, PHI</samp>’</dt>
2645 <dd><p>the corresponding mathematical approximated values for e
2646 (euler number), pi (greek PI), PHI (golden ratio)
2649 <dt> ‘<samp>x, y</samp>’</dt>
2650 <dd><p>the computed values for <var>x</var> and <var>y</var>. They are evaluated for
2654 <dt> ‘<samp>in_w, in_h</samp>’</dt>
2655 <dd><p>the input width and heigth
2658 <dt> ‘<samp>iw, ih</samp>’</dt>
2659 <dd><p>same as <var>in_w</var> and <var>in_h</var>
2662 <dt> ‘<samp>out_w, out_h</samp>’</dt>
2663 <dd><p>the output (cropped) width and heigth
2666 <dt> ‘<samp>ow, oh</samp>’</dt>
2667 <dd><p>same as <var>out_w</var> and <var>out_h</var>
2670 <dt> ‘<samp>a</samp>’</dt>
2671 <dd><p>same as <var>iw</var> / <var>ih</var>
2674 <dt> ‘<samp>sar</samp>’</dt>
2675 <dd><p>input sample aspect ratio
2678 <dt> ‘<samp>dar</samp>’</dt>
2679 <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
2682 <dt> ‘<samp>hsub, vsub</samp>’</dt>
2683 <dd><p>horizontal and vertical chroma subsample values. For example for the
2684 pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
2687 <dt> ‘<samp>n</samp>’</dt>
2688 <dd><p>the number of input frame, starting from 0
2691 <dt> ‘<samp>pos</samp>’</dt>
2692 <dd><p>the position in the file of the input frame, NAN if unknown
2695 <dt> ‘<samp>t</samp>’</dt>
2696 <dd><p>timestamp expressed in seconds, NAN if the input timestamp is unknown
2701 <p>The <var>out_w</var> and <var>out_h</var> parameters specify the expressions for
2702 the width and height of the output (cropped) video. They are
2703 evaluated just at the configuration of the filter.
2705 <p>The default value of <var>out_w</var> is "in_w", and the default value of
2706 <var>out_h</var> is "in_h".
2708 <p>The expression for <var>out_w</var> may depend on the value of <var>out_h</var>,
2709 and the expression for <var>out_h</var> may depend on <var>out_w</var>, but they
2710 cannot depend on <var>x</var> and <var>y</var>, as <var>x</var> and <var>y</var> are
2711 evaluated after <var>out_w</var> and <var>out_h</var>.
2713 <p>The <var>x</var> and <var>y</var> parameters specify the expressions for the
2714 position of the top-left corner of the output (non-cropped) area. They
2715 are evaluated for each frame. If the evaluated value is not valid, it
2716 is approximated to the nearest valid value.
2718 <p>The default value of <var>x</var> is "(in_w-out_w)/2", and the default
2719 value for <var>y</var> is "(in_h-out_h)/2", which set the cropped area at
2720 the center of the input image.
2722 <p>The expression for <var>x</var> may depend on <var>y</var>, and the expression
2723 for <var>y</var> may depend on <var>x</var>.
2725 <p>Follow some examples:
2726 </p><table><tr><td> </td><td><pre class="example"># crop the central input area with size 100x100
2729 # crop the central input area with size 2/3 of the input video
2730 "crop=2/3*in_w:2/3*in_h"
2732 # crop the input video central square
2735 # delimit the rectangle with the top-left corner placed at position
2736 # 100:100 and the right-bottom corner corresponding to the right-bottom
2737 # corner of the input image.
2738 crop=in_w-100:in_h-100:100:100
2740 # crop 10 pixels from the left and right borders, and 20 pixels from
2741 # the top and bottom borders
2742 "crop=in_w-2*10:in_h-2*20"
2744 # keep only the bottom right quarter of the input image
2745 "crop=in_w/2:in_h/2:in_w/2:in_h/2"
2747 # crop height for getting Greek harmony
2748 "crop=in_w:1/PHI*in_w"
2751 "crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)"
2753 # erratic camera effect depending on timestamp
2754 "crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)"
2756 # set x depending on the value of y
2757 "crop=in_w/2:in_h/2:y:10+10*sin(n/10)"
2758 </pre></td></tr></table>
2760 <a name="cropdetect"></a>
2761 <h2 class="section"><a href="ffplay.html#toc-cropdetect">16.5 cropdetect</a></h2>
2763 <p>Auto-detect crop size.
2765 <p>Calculate necessary cropping parameters and prints the recommended
2766 parameters through the logging system. The detected dimensions
2767 correspond to the non-black area of the input video.
2769 <p>It accepts the syntax:
2770 </p><table><tr><td> </td><td><pre class="example">cropdetect[=<var>limit</var>[:<var>round</var>[:<var>reset</var>]]]
2771 </pre></td></tr></table>
2773 <dl compact="compact">
2774 <dt> ‘<samp>limit</samp>’</dt>
2775 <dd><p>Threshold, which can be optionally specified from nothing (0) to
2776 everything (255), defaults to 24.
2779 <dt> ‘<samp>round</samp>’</dt>
2780 <dd><p>Value which the width/height should be divisible by, defaults to
2781 16. The offset is automatically adjusted to center the video. Use 2 to
2782 get only even dimensions (needed for 4:2:2 video). 16 is best when
2783 encoding to most video codecs.
2786 <dt> ‘<samp>reset</samp>’</dt>
2787 <dd><p>Counter that determines after how many frames cropdetect will reset
2788 the previously detected largest video area and start over to detect
2789 the current optimal crop area. Defaults to 0.
2791 <p>This can be useful when channel logos distort the video area. 0
2792 indicates never reset and return the largest area encountered during
2797 <a name="delogo"></a>
2798 <h2 class="section"><a href="ffplay.html#toc-delogo">16.6 delogo</a></h2>
2800 <p>Suppress a TV station logo by a simple interpolation of the surrounding
2801 pixels. Just set a rectangle covering the logo and watch it disappear
2802 (and sometimes something even uglier appear - your mileage may vary).
2804 <p>The filter accepts parameters as a string of the form
2805 "<var>x</var>:<var>y</var>:<var>w</var>:<var>h</var>:<var>band</var>", or as a list of
2806 <var>key</var>=<var>value</var> pairs, separated by ":".
2808 <p>The description of the accepted parameters follows.
2810 <dl compact="compact">
2811 <dt> ‘<samp>x, y</samp>’</dt>
2812 <dd><p>Specify the top left corner coordinates of the logo. They must be
2816 <dt> ‘<samp>w, h</samp>’</dt>
2817 <dd><p>Specify the width and height of the logo to clear. They must be
2821 <dt> ‘<samp>band, t</samp>’</dt>
2822 <dd><p>Specify the thickness of the fuzzy edge of the rectangle (added to
2823 <var>w</var> and <var>h</var>). The default value is 4.
2826 <dt> ‘<samp>show</samp>’</dt>
2827 <dd><p>When set to 1, a green rectangle is drawn on the screen to simplify
2828 finding the right <var>x</var>, <var>y</var>, <var>w</var>, <var>h</var> parameters, and
2829 <var>band</var> is set to 4. The default value is 0.
2834 <p>Some examples follow.
2838 Set a rectangle covering the area with top left corner coordinates 0,0
2839 and size 100x77, setting a band of size 10:
2840 <table><tr><td> </td><td><pre class="example">delogo=0:0:100:77:10
2841 </pre></td></tr></table>
2844 As the previous example, but use named options:
2845 <table><tr><td> </td><td><pre class="example">delogo=x=0:y=0:w=100:h=77:band=10
2846 </pre></td></tr></table>
2850 <a name="drawbox"></a>
2851 <h2 class="section"><a href="ffplay.html#toc-drawbox">16.7 drawbox</a></h2>
2853 <p>Draw a colored box on the input image.
2855 <p>It accepts the syntax:
2856 </p><table><tr><td> </td><td><pre class="example">drawbox=<var>x</var>:<var>y</var>:<var>width</var>:<var>height</var>:<var>color</var>
2857 </pre></td></tr></table>
2859 <dl compact="compact">
2860 <dt> ‘<samp>x, y</samp>’</dt>
2861 <dd><p>Specify the top left corner coordinates of the box. Default to 0.
2864 <dt> ‘<samp>width, height</samp>’</dt>
2865 <dd><p>Specify the width and height of the box, if 0 they are interpreted as
2866 the input width and height. Default to 0.
2869 <dt> ‘<samp>color</samp>’</dt>
2870 <dd><p>Specify the color of the box to write, it can be the name of a color
2871 (case insensitive match) or a 0xRRGGBB[AA] sequence.
2875 <p>Follow some examples:
2876 </p><table><tr><td> </td><td><pre class="example"># draw a black box around the edge of the input image
2879 # draw a box with color red and an opacity of 50%
2880 drawbox=10:20:200:60:red@0.5"
2881 </pre></td></tr></table>
2883 <a name="drawtext"></a>
2884 <h2 class="section"><a href="ffplay.html#toc-drawtext">16.8 drawtext</a></h2>
2886 <p>Draw text string or text from specified file on top of video using the
2887 libfreetype library.
2889 <p>To enable compilation of this filter you need to configure FFmpeg with
2890 <code>--enable-libfreetype</code>.
2892 <p>The filter also recognizes strftime() sequences in the provided text
2893 and expands them accordingly. Check the documentation of strftime().
2895 <p>The filter accepts parameters as a list of <var>key</var>=<var>value</var> pairs,
2896 separated by ":".
2898 <p>The description of the accepted parameters follows.
2900 <dl compact="compact">
2901 <dt> ‘<samp>fontfile</samp>’</dt>
2902 <dd><p>The font file to be used for drawing text. Path must be included.
2903 This parameter is mandatory.
2906 <dt> ‘<samp>text</samp>’</dt>
2907 <dd><p>The text string to be drawn. The text must be a sequence of UTF-8
2909 This parameter is mandatory if no file is specified with the parameter
2910 <var>textfile</var>.
2913 <dt> ‘<samp>textfile</samp>’</dt>
2914 <dd><p>A text file containing text to be drawn. The text must be a sequence
2915 of UTF-8 encoded characters.
2917 <p>This parameter is mandatory if no text string is specified with the
2918 parameter <var>text</var>.
2920 <p>If both text and textfile are specified, an error is thrown.
2923 <dt> ‘<samp>x, y</samp>’</dt>
2924 <dd><p>The offsets where text will be drawn within the video frame.
2925 Relative to the top/left border of the output image.
2927 <p>The default value of <var>x</var> and <var>y</var> is 0.
2930 <dt> ‘<samp>fontsize</samp>’</dt>
2931 <dd><p>The font size to be used for drawing text.
2932 The default value of <var>fontsize</var> is 16.
2935 <dt> ‘<samp>fontcolor</samp>’</dt>
2936 <dd><p>The color to be used for drawing fonts.
2937 Either a string (e.g. "red") or in 0xRRGGBB[AA] format
2938 (e.g. "0xff000033"), possibly followed by an alpha specifier.
2939 The default value of <var>fontcolor</var> is "black".
2942 <dt> ‘<samp>boxcolor</samp>’</dt>
2943 <dd><p>The color to be used for drawing box around text.
2944 Either a string (e.g. "yellow") or in 0xRRGGBB[AA] format
2945 (e.g. "0xff00ff"), possibly followed by an alpha specifier.
2946 The default value of <var>boxcolor</var> is "white".
2949 <dt> ‘<samp>box</samp>’</dt>
2950 <dd><p>Used to draw a box around text using background color.
2951 Value should be either 1 (enable) or 0 (disable).
2952 The default value of <var>box</var> is 0.
2955 <dt> ‘<samp>shadowx, shadowy</samp>’</dt>
2956 <dd><p>The x and y offsets for the text shadow position with respect to the
2957 position of the text. They can be either positive or negative
2958 values. Default value for both is "0".
2961 <dt> ‘<samp>shadowcolor</samp>’</dt>
2962 <dd><p>The color to be used for drawing a shadow behind the drawn text. It
2963 can be a color name (e.g. "yellow") or a string in the 0xRRGGBB[AA]
2964 form (e.g. "0xff00ff"), possibly followed by an alpha specifier.
2965 The default value of <var>shadowcolor</var> is "black".
2968 <dt> ‘<samp>ft_load_flags</samp>’</dt>
2969 <dd><p>Flags to be used for loading the fonts.
2971 <p>The flags map the corresponding flags supported by libfreetype, and are
2972 a combination of the following values:
2973 </p><dl compact="compact">
2974 <dt> <var>default</var></dt>
2975 <dt> <var>no_scale</var></dt>
2976 <dt> <var>no_hinting</var></dt>
2977 <dt> <var>render</var></dt>
2978 <dt> <var>no_bitmap</var></dt>
2979 <dt> <var>vertical_layout</var></dt>
2980 <dt> <var>force_autohint</var></dt>
2981 <dt> <var>crop_bitmap</var></dt>
2982 <dt> <var>pedantic</var></dt>
2983 <dt> <var>ignore_global_advance_width</var></dt>
2984 <dt> <var>no_recurse</var></dt>
2985 <dt> <var>ignore_transform</var></dt>
2986 <dt> <var>monochrome</var></dt>
2987 <dt> <var>linear_design</var></dt>
2988 <dt> <var>no_autohint</var></dt>
2989 <dt> <var>end table</var></dt>
2992 <p>Default value is "render".
2994 <p>For more information consult the documentation for the FT_LOAD_*
2998 <dt> ‘<samp>tabsize</samp>’</dt>
2999 <dd><p>The size in number of spaces to use for rendering the tab.
3004 <p>For example the command:
3005 </p><table><tr><td> </td><td><pre class="example">drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text'"
3006 </pre></td></tr></table>
3008 <p>will draw "Test Text" with font FreeSerif, using the default values
3009 for the optional parameters.
3012 </p><table><tr><td> </td><td><pre class="example">drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='Test Text':\
3013 x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2"
3014 </pre></td></tr></table>
3016 <p>will draw ’Test Text’ with font FreeSerif of size 24 at position x=100
3017 and y=50 (counting from the top-left corner of the screen), text is
3018 yellow with a red box around it. Both the text and the box have an
3021 <p>Note that the double quotes are not necessary if spaces are not used
3022 within the parameter list.
3024 <p>For more information about libfreetype, check:
3025 <a href="http://www.freetype.org/">http://www.freetype.org/</a>.
3028 <h2 class="section"><a href="ffplay.html#toc-fade">16.9 fade</a></h2>
3030 <p>Apply fade-in/out effect to input video.
3032 <p>It accepts the parameters:
3033 <var>type</var>:<var>start_frame</var>:<var>nb_frames</var>
3035 <p><var>type</var> specifies if the effect type, can be either "in" for
3036 fade-in, or "out" for a fade-out effect.
3038 <p><var>start_frame</var> specifies the number of the start frame for starting
3039 to apply the fade effect.
3041 <p><var>nb_frames</var> specifies the number of frames for which the fade
3042 effect has to last. At the end of the fade-in effect the output video
3043 will have the same intensity as the input video, at the end of the
3044 fade-out transition the output video will be completely black.
3046 <p>A few usage examples follow, usable too as test scenarios.
3047 </p><table><tr><td> </td><td><pre class="example"># fade in first 30 frames of video
3050 # fade out last 45 frames of a 200-frame video
3053 # fade in first 25 frames and fade out last 25 frames of a 1000-frame video
3054 fade=in:0:25, fade=out:975:25
3056 # make first 5 frames black, then fade in from frame 5-24
3058 </pre></td></tr></table>
3060 <a name="fieldorder"></a>
3061 <h2 class="section"><a href="ffplay.html#toc-fieldorder">16.10 fieldorder</a></h2>
3063 <p>Transform the field order of the input video.
3065 <p>It accepts one parameter which specifies the required field order that
3066 the input interlaced video will be transformed to. The parameter can
3067 assume one of the following values:
3069 <dl compact="compact">
3070 <dt> ‘<samp>0 or bff</samp>’</dt>
3071 <dd><p>output bottom field first
3073 <dt> ‘<samp>1 or tff</samp>’</dt>
3074 <dd><p>output top field first
3078 <p>Default value is "tff".
3080 <p>Transformation is achieved by shifting the picture content up or down
3081 by one line, and filling the remaining line with appropriate picture content.
3082 This method is consistent with most broadcast field order converters.
3084 <p>If the input video is not flagged as being interlaced, or it is already
3085 flagged as being of the required output field order then this filter does
3086 not alter the incoming video.
3088 <p>This filter is very useful when converting to or from PAL DV material,
3089 which is bottom field first.
3092 </p><table><tr><td> </td><td><pre class="example">./ffmpeg -i in.vob -vf "fieldorder=bff" out.dv
3093 </pre></td></tr></table>
3096 <h2 class="section"><a href="ffplay.html#toc-fifo">16.11 fifo</a></h2>
3098 <p>Buffer input images and send them when they are requested.
3100 <p>This filter is mainly useful when auto-inserted by the libavfilter
3103 <p>The filter does not take parameters.
3105 <a name="format"></a>
3106 <h2 class="section"><a href="ffplay.html#toc-format">16.12 format</a></h2>
3108 <p>Convert the input video to one of the specified pixel formats.
3109 Libavfilter will try to pick one that is supported for the input to
3112 <p>The filter accepts a list of pixel format names, separated by ":",
3113 for example "yuv420p:monow:rgb24".
3115 <p>Some examples follow:
3116 </p><table><tr><td> </td><td><pre class="example"># convert the input video to the format "yuv420p"
3119 # convert the input video to any of the formats in the list
3120 format=yuv420p:yuv444p:yuv410p
3121 </pre></td></tr></table>
3123 <p><a name="frei0r"></a>
3124 </p><a name="frei0r-1"></a>
3125 <h2 class="section"><a href="ffplay.html#toc-frei0r-1">16.13 frei0r</a></h2>
3127 <p>Apply a frei0r effect to the input video.
3129 <p>To enable compilation of this filter you need to install the frei0r
3130 header and configure FFmpeg with –enable-frei0r.
3132 <p>The filter supports the syntax:
3133 </p><table><tr><td> </td><td><pre class="example"><var>filter_name</var>[{:|=}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
3134 </pre></td></tr></table>
3136 <p><var>filter_name</var> is the name to the frei0r effect to load. If the
3137 environment variable <code>FREI0R_PATH</code> is defined, the frei0r effect
3138 is searched in each one of the directories specified by the colon
3139 separated list in <code>FREIOR_PATH</code>, otherwise in the standard frei0r
3140 paths, which are in this order: ‘<tt>HOME/.frei0r-1/lib/</tt>’,
3141 ‘<tt>/usr/local/lib/frei0r-1/</tt>’, ‘<tt>/usr/lib/frei0r-1/</tt>’.
3143 <p><var>param1</var>, <var>param2</var>, ... , <var>paramN</var> specify the parameters
3144 for the frei0r effect.
3146 <p>A frei0r effect parameter can be a boolean (whose values are specified
3147 with "y" and "n"), a double, a color (specified by the syntax
3148 <var>R</var>/<var>G</var>/<var>B</var>, <var>R</var>, <var>G</var>, and <var>B</var> being float
3149 numbers from 0.0 to 1.0) or by an <code>av_parse_color()</code> color
3150 description), a position (specified by the syntax <var>X</var>/<var>Y</var>,
3151 <var>X</var> and <var>Y</var> being float numbers) and a string.
3153 <p>The number and kind of parameters depend on the loaded effect. If an
3154 effect parameter is not specified the default value is set.
3156 <p>Some examples follow:
3157 </p><table><tr><td> </td><td><pre class="example"># apply the distort0r effect, set the first two double parameters
3158 frei0r=distort0r:0.5:0.01
3160 # apply the colordistance effect, takes a color as first parameter
3161 frei0r=colordistance:0.2/0.3/0.4
3162 frei0r=colordistance:violet
3163 frei0r=colordistance:0x112233
3165 # apply the perspective effect, specify the top left and top right
3167 frei0r=perspective:0.2/0.2:0.8/0.2
3168 </pre></td></tr></table>
3170 <p>For more information see:
3171 <a href="http://piksel.org/frei0r">http://piksel.org/frei0r</a>
3173 <a name="gradfun"></a>
3174 <h2 class="section"><a href="ffplay.html#toc-gradfun">16.14 gradfun</a></h2>
3176 <p>Fix the banding artifacts that are sometimes introduced into nearly flat
3177 regions by truncation to 8bit colordepth.
3178 Interpolate the gradients that should go where the bands are, and
3181 <p>This filter is designed for playback only. Do not use it prior to
3182 lossy compression, because compression tends to lose the dither and
3183 bring back the bands.
3185 <p>The filter takes two optional parameters, separated by ’:’:
3186 <var>strength</var>:<var>radius</var>
3188 <p><var>strength</var> is the maximum amount by which the filter will change
3189 any one pixel. Also the threshold for detecting nearly flat
3190 regions. Acceptable values range from .51 to 255, default value is
3191 1.2, out-of-range values will be clipped to the valid range.
3193 <p><var>radius</var> is the neighborhood to fit the gradient to. A larger
3194 radius makes for smoother gradients, but also prevents the filter from
3195 modifying the pixels near detailed regions. Acceptable values are
3196 8-32, default value is 16, out-of-range values will be clipped to the
3199 <table><tr><td> </td><td><pre class="example"># default parameters
3204 </pre></td></tr></table>
3206 <a name="hflip"></a>
3207 <h2 class="section"><a href="ffplay.html#toc-hflip">16.15 hflip</a></h2>
3209 <p>Flip the input video horizontally.
3211 <p>For example to horizontally flip the video in input with
3212 ‘<tt>ffmpeg</tt>’:
3213 </p><table><tr><td> </td><td><pre class="example">ffmpeg -i in.avi -vf "hflip" out.avi
3214 </pre></td></tr></table>
3216 <a name="hqdn3d"></a>
3217 <h2 class="section"><a href="ffplay.html#toc-hqdn3d">16.16 hqdn3d</a></h2>
3219 <p>High precision/quality 3d denoise filter. This filter aims to reduce
3220 image noise producing smooth images and making still images really
3221 still. It should enhance compressibility.
3223 <p>It accepts the following optional parameters:
3224 <var>luma_spatial</var>:<var>chroma_spatial</var>:<var>luma_tmp</var>:<var>chroma_tmp</var>
3226 <dl compact="compact">
3227 <dt> ‘<samp>luma_spatial</samp>’</dt>
3228 <dd><p>a non-negative float number which specifies spatial luma strength,
3232 <dt> ‘<samp>chroma_spatial</samp>’</dt>
3233 <dd><p>a non-negative float number which specifies spatial chroma strength,
3234 defaults to 3.0*<var>luma_spatial</var>/4.0
3237 <dt> ‘<samp>luma_tmp</samp>’</dt>
3238 <dd><p>a float number which specifies luma temporal strength, defaults to
3239 6.0*<var>luma_spatial</var>/4.0
3242 <dt> ‘<samp>chroma_tmp</samp>’</dt>
3243 <dd><p>a float number which specifies chroma temporal strength, defaults to
3244 <var>luma_tmp</var>*<var>chroma_spatial</var>/<var>luma_spatial</var>
3248 <a name="lut_002c-lutrgb_002c-lutyuv"></a>
3249 <h2 class="section"><a href="ffplay.html#toc-lut_002c-lutrgb_002c-lutyuv">16.17 lut, lutrgb, lutyuv</a></h2>
3251 <p>Compute a look-up table for binding each pixel component input value
3252 to an output value, and apply it to input video.
3254 <p><var>lutyuv</var> applies a lookup table to a YUV input video, <var>lutrgb</var>
3255 to an RGB input video.
3257 <p>These filters accept in input a ":"-separated list of options, which
3258 specify the expressions used for computing the lookup table for the
3259 corresponding pixel component values.
3261 <p>The <var>lut</var> filter requires either YUV or RGB pixel formats in
3262 input, and accepts the options:
3263 </p><dl compact="compact">
3264 <dd><p><var>c0</var> (first pixel component)
3265 <var>c1</var> (second pixel component)
3266 <var>c2</var> (third pixel component)
3267 <var>c3</var> (fourth pixel component, corresponds to the alpha component)
3271 <p>The exact component associated to each option depends on the format in
3274 <p>The <var>lutrgb</var> filter requires RGB pixel formats in input, and
3275 accepts the options:
3276 </p><dl compact="compact">
3277 <dd><p><var>r</var> (red component)
3278 <var>g</var> (green component)
3279 <var>b</var> (blue component)
3280 <var>a</var> (alpha component)
3284 <p>The <var>lutyuv</var> filter requires YUV pixel formats in input, and
3285 accepts the options:
3286 </p><dl compact="compact">
3287 <dd><p><var>y</var> (Y/luminance component)
3288 <var>u</var> (U/Cb component)
3289 <var>v</var> (V/Cr component)
3290 <var>a</var> (alpha component)
3294 <p>The expressions can contain the following constants and functions:
3296 <dl compact="compact">
3297 <dt> ‘<samp>E, PI, PHI</samp>’</dt>
3298 <dd><p>the corresponding mathematical approximated values for e
3299 (euler number), pi (greek PI), PHI (golden ratio)
3302 <dt> ‘<samp>w, h</samp>’</dt>
3303 <dd><p>the input width and heigth
3306 <dt> ‘<samp>val</samp>’</dt>
3307 <dd><p>input value for the pixel component
3310 <dt> ‘<samp>clipval</samp>’</dt>
3311 <dd><p>the input value clipped in the <var>minval</var>-<var>maxval</var> range
3314 <dt> ‘<samp>maxval</samp>’</dt>
3315 <dd><p>maximum value for the pixel component
3318 <dt> ‘<samp>minval</samp>’</dt>
3319 <dd><p>minimum value for the pixel component
3322 <dt> ‘<samp>negval</samp>’</dt>
3323 <dd><p>the negated value for the pixel component value clipped in the
3324 <var>minval</var>-<var>maxval</var> range , it corresponds to the expression
3325 "maxval-clipval+minval"
3328 <dt> ‘<samp>clip(val)</samp>’</dt>
3329 <dd><p>the computed value in <var>val</var> clipped in the
3330 <var>minval</var>-<var>maxval</var> range
3333 <dt> ‘<samp>gammaval(gamma)</samp>’</dt>
3334 <dd><p>the computed gamma correction value of the pixel component value
3335 clipped in the <var>minval</var>-<var>maxval</var> range, corresponds to the
3337 "pow((clipval-minval)/(maxval-minval)\,<var>gamma</var>)*(maxval-minval)+minval"
3342 <p>All expressions default to "val".
3344 <p>Some examples follow:
3345 </p><table><tr><td> </td><td><pre class="example"># negate input video
3346 lutrgb="r=maxval+minval-val:g=maxval+minval-val:b=maxval+minval-val"
3347 lutyuv="y=maxval+minval-val:u=maxval+minval-val:v=maxval+minval-val"
3349 # the above is the same as
3350 lutrgb="r=negval:g=negval:b=negval"
3351 lutyuv="y=negval:u=negval:v=negval"
3356 # remove chroma components, turns the video into a graytone image
3357 lutyuv="u=128:v=128"
3359 # apply a luma burning effect
3360 lutyuv="y=2*val"
3362 # remove green and blue components
3363 lutrgb="g=0:b=0"
3365 # set a constant alpha channel value on input
3366 format=rgba,lutrgb=a="maxval-minval/2"
3368 # correct luminance gamma by a 0.5 factor
3369 lutyuv=y=gammaval(0.5)
3370 </pre></td></tr></table>
3373 <h2 class="section"><a href="ffplay.html#toc-mp">16.18 mp</a></h2>
3375 <p>Apply an MPlayer filter to the input video.
3377 <p>This filter provides a wrapper around most of the filters of
3380 <p>This wrapper is considered experimental. Some of the wrapped filters
3381 may not work properly and we may drop support for them, as they will
3382 be implemented natively into FFmpeg. Thus you should avoid
3383 depending on them when writing portable scripts.
3385 <p>The filters accepts the parameters:
3386 <var>filter_name</var>[:=]<var>filter_params</var>
3388 <p><var>filter_name</var> is the name of a supported MPlayer filter,
3389 <var>filter_params</var> is a string containing the parameters accepted by
3392 <p>The list of the currently supported filters follows:
3393 </p><dl compact="compact">
3394 <dt> <var>2xsai</var></dt>
3395 <dt> <var>decimate</var></dt>
3396 <dt> <var>denoise3d</var></dt>
3397 <dt> <var>detc</var></dt>
3398 <dt> <var>dint</var></dt>
3399 <dt> <var>divtc</var></dt>
3400 <dt> <var>down3dright</var></dt>
3401 <dt> <var>dsize</var></dt>
3402 <dt> <var>eq2</var></dt>
3403 <dt> <var>eq</var></dt>
3404 <dt> <var>field</var></dt>
3405 <dt> <var>fil</var></dt>
3406 <dt> <var>fixpts</var></dt>
3407 <dt> <var>framestep</var></dt>
3408 <dt> <var>fspp</var></dt>
3409 <dt> <var>geq</var></dt>
3410 <dt> <var>harddup</var></dt>
3411 <dt> <var>hqdn3d</var></dt>
3412 <dt> <var>hue</var></dt>
3413 <dt> <var>il</var></dt>
3414 <dt> <var>ilpack</var></dt>
3415 <dt> <var>ivtc</var></dt>
3416 <dt> <var>kerndeint</var></dt>
3417 <dt> <var>mcdeint</var></dt>
3418 <dt> <var>mirror</var></dt>
3419 <dt> <var>noise</var></dt>
3420 <dt> <var>ow</var></dt>
3421 <dt> <var>palette</var></dt>
3422 <dt> <var>perspective</var></dt>
3423 <dt> <var>phase</var></dt>
3424 <dt> <var>pp7</var></dt>
3425 <dt> <var>pullup</var></dt>
3426 <dt> <var>qp</var></dt>
3427 <dt> <var>rectangle</var></dt>
3428 <dt> <var>remove-logo</var></dt>
3429 <dt> <var>rotate</var></dt>
3430 <dt> <var>sab</var></dt>
3431 <dt> <var>screenshot</var></dt>
3432 <dt> <var>smartblur</var></dt>
3433 <dt> <var>softpulldown</var></dt>
3434 <dt> <var>softskip</var></dt>
3435 <dt> <var>spp</var></dt>
3436 <dt> <var>swapuv</var></dt>
3437 <dt> <var>telecine</var></dt>
3438 <dt> <var>tile</var></dt>
3439 <dt> <var>tinterlace</var></dt>
3440 <dt> <var>unsharp</var></dt>
3441 <dt> <var>uspp</var></dt>
3442 <dt> <var>yuvcsp</var></dt>
3443 <dt> <var>yvu9</var></dt>
3446 <p>The parameter syntax and behavior for the listed filters are the same
3447 of the corresponding MPlayer filters. For detailed instructions check
3448 the "VIDEO FILTERS" section in the MPlayer manual.
3450 <p>Some examples follow:
3451 </p><table><tr><td> </td><td><pre class="example"># remove a logo by interpolating the surrounding pixels
3452 mp=delogo=200:200:80:20:1
3454 # adjust gamma, brightness, contrast
3457 # tweak hue and saturation
3459 </pre></td></tr></table>
3461 <p>See also mplayer(1), <a href="http://www.mplayerhq.hu/">http://www.mplayerhq.hu/</a>.
3463 <a name="negate"></a>
3464 <h2 class="section"><a href="ffplay.html#toc-negate">16.19 negate</a></h2>
3466 <p>Negate input video.
3468 <p>This filter accepts an integer in input, if non-zero it negates the
3469 alpha component (if available). The default value in input is 0.
3471 <a name="noformat"></a>
3472 <h2 class="section"><a href="ffplay.html#toc-noformat">16.20 noformat</a></h2>
3474 <p>Force libavfilter not to use any of the specified pixel formats for the
3475 input to the next filter.
3477 <p>The filter accepts a list of pixel format names, separated by ":",
3478 for example "yuv420p:monow:rgb24".
3480 <p>Some examples follow:
3481 </p><table><tr><td> </td><td><pre class="example"># force libavfilter to use a format different from "yuv420p" for the
3482 # input to the vflip filter
3483 noformat=yuv420p,vflip
3485 # convert the input video to any of the formats not contained in the list
3486 noformat=yuv420p:yuv444p:yuv410p
3487 </pre></td></tr></table>
3489 <a name="null-1"></a>
3490 <h2 class="section"><a href="ffplay.html#toc-null-1">16.21 null</a></h2>
3492 <p>Pass the video source unchanged to the output.
3495 <h2 class="section"><a href="ffplay.html#toc-ocv">16.22 ocv</a></h2>
3497 <p>Apply video transform using libopencv.
3499 <p>To enable this filter install libopencv library and headers and
3500 configure FFmpeg with –enable-libopencv.
3502 <p>The filter takes the parameters: <var>filter_name</var>{:=}<var>filter_params</var>.
3504 <p><var>filter_name</var> is the name of the libopencv filter to apply.
3506 <p><var>filter_params</var> specifies the parameters to pass to the libopencv
3507 filter. If not specified the default values are assumed.
3509 <p>Refer to the official libopencv documentation for more precise
3511 <a href="http://opencv.willowgarage.com/documentation/c/image_filtering.html">http://opencv.willowgarage.com/documentation/c/image_filtering.html</a>
3513 <p>Follows the list of supported libopencv filters.
3515 <p><a name="dilate"></a>
3516 </p><a name="dilate-1"></a>
3517 <h3 class="subsection"><a href="ffplay.html#toc-dilate-1">16.22.1 dilate</a></h3>
3519 <p>Dilate an image by using a specific structuring element.
3520 This filter corresponds to the libopencv function <code>cvDilate</code>.
3522 <p>It accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>.
3524 <p><var>struct_el</var> represents a structuring element, and has the syntax:
3525 <var>cols</var>x<var>rows</var>+<var>anchor_x</var>x<var>anchor_y</var>/<var>shape</var>
3527 <p><var>cols</var> and <var>rows</var> represent the number of colums and rows of
3528 the structuring element, <var>anchor_x</var> and <var>anchor_y</var> the anchor
3529 point, and <var>shape</var> the shape for the structuring element, and
3530 can be one of the values "rect", "cross", "ellipse", "custom".
3532 <p>If the value for <var>shape</var> is "custom", it must be followed by a
3533 string of the form "=<var>filename</var>". The file with name
3534 <var>filename</var> is assumed to represent a binary image, with each
3535 printable character corresponding to a bright pixel. When a custom
3536 <var>shape</var> is used, <var>cols</var> and <var>rows</var> are ignored, the number
3537 or columns and rows of the read file are assumed instead.
3539 <p>The default value for <var>struct_el</var> is "3x3+0x0/rect".
3541 <p><var>nb_iterations</var> specifies the number of times the transform is
3542 applied to the image, and defaults to 1.
3544 <p>Follow some example:
3545 </p><table><tr><td> </td><td><pre class="example"># use the default values
3548 # dilate using a structuring element with a 5x5 cross, iterate two times
3549 ocv=dilate=5x5+2x2/cross:2
3551 # read the shape from the file diamond.shape, iterate two times
3552 # the file diamond.shape may contain a pattern of characters like this:
3558 # the specified cols and rows are ignored (but not the anchor point coordinates)
3559 ocv=0x0+2x2/custom=diamond.shape:2
3560 </pre></td></tr></table>
3562 <a name="erode"></a>
3563 <h3 class="subsection"><a href="ffplay.html#toc-erode">16.22.2 erode</a></h3>
3565 <p>Erode an image by using a specific structuring element.
3566 This filter corresponds to the libopencv function <code>cvErode</code>.
3568 <p>The filter accepts the parameters: <var>struct_el</var>:<var>nb_iterations</var>,
3569 with the same syntax and semantics as the <a href="#dilate">dilate</a> filter.
3571 <a name="smooth"></a>
3572 <h3 class="subsection"><a href="ffplay.html#toc-smooth">16.22.3 smooth</a></h3>
3574 <p>Smooth the input video.
3576 <p>The filter takes the following parameters:
3577 <var>type</var>:<var>param1</var>:<var>param2</var>:<var>param3</var>:<var>param4</var>.
3579 <p><var>type</var> is the type of smooth filter to apply, and can be one of
3580 the following values: "blur", "blur_no_scale", "median", "gaussian",
3581 "bilateral". The default value is "gaussian".
3583 <p><var>param1</var>, <var>param2</var>, <var>param3</var>, and <var>param4</var> are
3584 parameters whose meanings depend on smooth type. <var>param1</var> and
3585 <var>param2</var> accept integer positive values or 0, <var>param3</var> and
3586 <var>param4</var> accept float values.
3588 <p>The default value for <var>param1</var> is 3, the default value for the
3589 other parameters is 0.
3591 <p>These parameters correspond to the parameters assigned to the
3592 libopencv function <code>cvSmooth</code>.
3594 <a name="overlay"></a>
3595 <h2 class="section"><a href="ffplay.html#toc-overlay">16.23 overlay</a></h2>
3597 <p>Overlay one video on top of another.
3599 <p>It takes two inputs and one output, the first input is the "main"
3600 video on which the second input is overlayed.
3602 <p>It accepts the parameters: <var>x</var>:<var>y</var>.
3604 <p><var>x</var> is the x coordinate of the overlayed video on the main video,
3605 <var>y</var> is the y coordinate. The parameters are expressions containing
3606 the following parameters:
3608 <dl compact="compact">
3609 <dt> ‘<samp>main_w, main_h</samp>’</dt>
3610 <dd><p>main input width and height
3613 <dt> ‘<samp>W, H</samp>’</dt>
3614 <dd><p>same as <var>main_w</var> and <var>main_h</var>
3617 <dt> ‘<samp>overlay_w, overlay_h</samp>’</dt>
3618 <dd><p>overlay input width and height
3621 <dt> ‘<samp>w, h</samp>’</dt>
3622 <dd><p>same as <var>overlay_w</var> and <var>overlay_h</var>
3626 <p>Be aware that frames are taken from each input video in timestamp
3627 order, hence, if their initial timestamps differ, it is a a good idea
3628 to pass the two inputs through a <var>setpts=PTS-STARTPTS</var> filter to
3629 have them begin in the same zero timestamp, as it does the example for
3630 the <var>movie</var> filter.
3632 <p>Follow some examples:
3633 </p><table><tr><td> </td><td><pre class="example"># draw the overlay at 10 pixels from the bottom right
3634 # corner of the main video.
3635 overlay=main_w-overlay_w-10:main_h-overlay_h-10
3637 # insert a transparent PNG logo in the bottom left corner of the input
3638 movie=logo.png [logo];
3639 [in][logo] overlay=10:main_h-overlay_h-10 [out]
3641 # insert 2 different transparent PNG logos (second logo on bottom
3643 movie=logo1.png [logo1];
3644 movie=logo2.png [logo2];
3645 [in][logo1] overlay=10:H-h-10 [in+logo1];
3646 [in+logo1][logo2] overlay=W-w-10:H-h-10 [out]
3648 # add a transparent color layer on top of the main video,
3649 # WxH specifies the size of the main input to the overlay filter
3650 color=red.3:WxH [over]; [in][over] overlay [out]
3651 </pre></td></tr></table>
3653 <p>You can chain togheter more overlays but the efficiency of such
3654 approach is yet to be tested.
3657 <h2 class="section"><a href="ffplay.html#toc-pad">16.24 pad</a></h2>
3659 <p>Add paddings to the input image, and places the original input at the
3660 given coordinates <var>x</var>, <var>y</var>.
3662 <p>It accepts the following parameters:
3663 <var>width</var>:<var>height</var>:<var>x</var>:<var>y</var>:<var>color</var>.
3665 <p>The parameters <var>width</var>, <var>height</var>, <var>x</var>, and <var>y</var> are
3666 expressions containing the following constants:
3668 <dl compact="compact">
3669 <dt> ‘<samp>E, PI, PHI</samp>’</dt>
3670 <dd><p>the corresponding mathematical approximated values for e
3671 (euler number), pi (greek PI), phi (golden ratio)
3674 <dt> ‘<samp>in_w, in_h</samp>’</dt>
3675 <dd><p>the input video width and heigth
3678 <dt> ‘<samp>iw, ih</samp>’</dt>
3679 <dd><p>same as <var>in_w</var> and <var>in_h</var>
3682 <dt> ‘<samp>out_w, out_h</samp>’</dt>
3683 <dd><p>the output width and heigth, that is the size of the padded area as
3684 specified by the <var>width</var> and <var>height</var> expressions
3687 <dt> ‘<samp>ow, oh</samp>’</dt>
3688 <dd><p>same as <var>out_w</var> and <var>out_h</var>
3691 <dt> ‘<samp>x, y</samp>’</dt>
3692 <dd><p>x and y offsets as specified by the <var>x</var> and <var>y</var>
3693 expressions, or NAN if not yet specified
3696 <dt> ‘<samp>a</samp>’</dt>
3697 <dd><p>same as <var>iw</var> / <var>ih</var>
3700 <dt> ‘<samp>sar</samp>’</dt>
3701 <dd><p>input sample aspect ratio
3704 <dt> ‘<samp>dar</samp>’</dt>
3705 <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
3708 <dt> ‘<samp>hsub, vsub</samp>’</dt>
3709 <dd><p>horizontal and vertical chroma subsample values. For example for the
3710 pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
3714 <p>Follows the description of the accepted parameters.
3716 <dl compact="compact">
3717 <dt> ‘<samp>width, height</samp>’</dt>
3719 <p>Specify the size of the output image with the paddings added. If the
3720 value for <var>width</var> or <var>height</var> is 0, the corresponding input size
3721 is used for the output.
3723 <p>The <var>width</var> expression can reference the value set by the
3724 <var>height</var> expression, and viceversa.
3726 <p>The default value of <var>width</var> and <var>height</var> is 0.
3729 <dt> ‘<samp>x, y</samp>’</dt>
3731 <p>Specify the offsets where to place the input image in the padded area
3732 with respect to the top/left border of the output image.
3734 <p>The <var>x</var> expression can reference the value set by the <var>y</var>
3735 expression, and viceversa.
3737 <p>The default value of <var>x</var> and <var>y</var> is 0.
3740 <dt> ‘<samp>color</samp>’</dt>
3742 <p>Specify the color of the padded area, it can be the name of a color
3743 (case insensitive match) or a 0xRRGGBB[AA] sequence.
3745 <p>The default value of <var>color</var> is "black".
3750 <p>Some examples follow:
3752 <table><tr><td> </td><td><pre class="example"># Add paddings with color "violet" to the input video. Output video
3753 # size is 640x480, the top-left corner of the input video is placed at
3755 pad=640:480:0:40:violet
3757 # pad the input to get an output with dimensions increased bt 3/2,
3758 # and put the input video at the center of the padded area
3759 pad="3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2"
3761 # pad the input to get a squared output with size equal to the maximum
3762 # value between the input width and height, and put the input video at
3763 # the center of the padded area
3764 pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
3766 # pad the input to get a final w/h ratio of 16:9
3767 pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
3769 # for anamorphic video, in order to set the output display aspect ratio,
3770 # it is necessary to use sar in the expression, according to the relation:
3771 # (ih * X / ih) * sar = output_dar
3772 # X = output_dar / sar
3773 pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
3775 # double output size and put the input video in the bottom-right
3776 # corner of the output padded area
3777 pad="2*iw:2*ih:ow-iw:oh-ih"
3778 </pre></td></tr></table>
3780 <a name="pixdesctest"></a>
3781 <h2 class="section"><a href="ffplay.html#toc-pixdesctest">16.25 pixdesctest</a></h2>
3783 <p>Pixel format descriptor test filter, mainly useful for internal
3784 testing. The output video should be equal to the input video.
3787 </p><table><tr><td> </td><td><pre class="example">format=monow, pixdesctest
3788 </pre></td></tr></table>
3790 <p>can be used to test the monowhite pixel format descriptor definition.
3792 <a name="scale"></a>
3793 <h2 class="section"><a href="ffplay.html#toc-scale">16.26 scale</a></h2>
3795 <p>Scale the input video to <var>width</var>:<var>height</var> and/or convert the image format.
3797 <p>The parameters <var>width</var> and <var>height</var> are expressions containing
3798 the following constants:
3800 <dl compact="compact">
3801 <dt> ‘<samp>E, PI, PHI</samp>’</dt>
3802 <dd><p>the corresponding mathematical approximated values for e
3803 (euler number), pi (greek PI), phi (golden ratio)
3806 <dt> ‘<samp>in_w, in_h</samp>’</dt>
3807 <dd><p>the input width and heigth
3810 <dt> ‘<samp>iw, ih</samp>’</dt>
3811 <dd><p>same as <var>in_w</var> and <var>in_h</var>
3814 <dt> ‘<samp>out_w, out_h</samp>’</dt>
3815 <dd><p>the output (cropped) width and heigth
3818 <dt> ‘<samp>ow, oh</samp>’</dt>
3819 <dd><p>same as <var>out_w</var> and <var>out_h</var>
3822 <dt> ‘<samp>a</samp>’</dt>
3823 <dd><p>same as <var>iw</var> / <var>ih</var>
3826 <dt> ‘<samp>sar</samp>’</dt>
3827 <dd><p>input sample aspect ratio
3830 <dt> ‘<samp>dar</samp>’</dt>
3831 <dd><p>input display aspect ratio, it is the same as (<var>iw</var> / <var>ih</var>) * <var>sar</var>
3834 <dt> ‘<samp>hsub, vsub</samp>’</dt>
3835 <dd><p>horizontal and vertical chroma subsample values. For example for the
3836 pixel format "yuv422p" <var>hsub</var> is 2 and <var>vsub</var> is 1.
3840 <p>If the input image format is different from the format requested by
3841 the next filter, the scale filter will convert the input to the
3844 <p>If the value for <var>width</var> or <var>height</var> is 0, the respective input
3845 size is used for the output.
3847 <p>If the value for <var>width</var> or <var>height</var> is -1, the scale filter will
3848 use, for the respective output size, a value that maintains the aspect
3849 ratio of the input image.
3851 <p>The default value of <var>width</var> and <var>height</var> is 0.
3853 <p>Some examples follow:
3854 </p><table><tr><td> </td><td><pre class="example"># scale the input video to a size of 200x100.
3857 # scale the input to 2x
3859 # the above is the same as
3862 # scale the input to half size
3865 # increase the width, and set the height to the same size
3868 # seek for Greek harmony
3872 # increase the height, and set the width to 3/2 of the height
3875 # increase the size, but make the size a multiple of the chroma
3876 scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub"
3878 # increase the width to a maximum of 500 pixels, keep the same input aspect ratio
3879 scale='min(500\, iw*3/2):-1'
3880 </pre></td></tr></table>
3882 <a name="select"></a>
3883 <h2 class="section"><a href="ffplay.html#toc-select">16.27 select</a></h2>
3884 <p>Select frames to pass in output.
3886 <p>It accepts in input an expression, which is evaluated for each input
3887 frame. If the expression is evaluated to a non-zero value, the frame
3888 is selected and passed to the output, otherwise it is discarded.
3890 <p>The expression can contain the following constants:
3892 <dl compact="compact">
3893 <dt> ‘<samp>PI</samp>’</dt>
3897 <dt> ‘<samp>PHI</samp>’</dt>
3901 <dt> ‘<samp>E</samp>’</dt>
3905 <dt> ‘<samp>n</samp>’</dt>
3906 <dd><p>the sequential number of the filtered frame, starting from 0
3909 <dt> ‘<samp>selected_n</samp>’</dt>
3910 <dd><p>the sequential number of the selected frame, starting from 0
3913 <dt> ‘<samp>prev_selected_n</samp>’</dt>
3914 <dd><p>the sequential number of the last selected frame, NAN if undefined
3917 <dt> ‘<samp>TB</samp>’</dt>
3918 <dd><p>timebase of the input timestamps
3921 <dt> ‘<samp>pts</samp>’</dt>
3922 <dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
3923 expressed in <var>TB</var> units, NAN if undefined
3926 <dt> ‘<samp>t</samp>’</dt>
3927 <dd><p>the PTS (Presentation TimeStamp) of the filtered video frame,
3928 expressed in seconds, NAN if undefined
3931 <dt> ‘<samp>prev_pts</samp>’</dt>
3932 <dd><p>the PTS of the previously filtered video frame, NAN if undefined
3935 <dt> ‘<samp>prev_selected_pts</samp>’</dt>
3936 <dd><p>the PTS of the last previously filtered video frame, NAN if undefined
3939 <dt> ‘<samp>prev_selected_t</samp>’</dt>
3940 <dd><p>the PTS of the last previously selected video frame, NAN if undefined
3943 <dt> ‘<samp>start_pts</samp>’</dt>
3944 <dd><p>the PTS of the first video frame in the video, NAN if undefined
3947 <dt> ‘<samp>start_t</samp>’</dt>
3948 <dd><p>the time of the first video frame in the video, NAN if undefined
3951 <dt> ‘<samp>pict_type</samp>’</dt>
3952 <dd><p>the picture type of the filtered frame, can assume one of the following
3954 </p><dl compact="compact">
3955 <dt> ‘<samp>PICT_TYPE_I</samp>’</dt>
3956 <dt> ‘<samp>PICT_TYPE_P</samp>’</dt>
3957 <dt> ‘<samp>PICT_TYPE_B</samp>’</dt>
3958 <dt> ‘<samp>PICT_TYPE_S</samp>’</dt>
3959 <dt> ‘<samp>PICT_TYPE_SI</samp>’</dt>
3960 <dt> ‘<samp>PICT_TYPE_SP</samp>’</dt>
3961 <dt> ‘<samp>PICT_TYPE_BI</samp>’</dt>
3965 <dt> ‘<samp>interlace_type</samp>’</dt>
3966 <dd><p>the frame interlace type, can assume one of the following values:
3967 </p><dl compact="compact">
3968 <dt> ‘<samp>INTERLACE_TYPE_P</samp>’</dt>
3969 <dd><p>the frame is progressive (not interlaced)
3971 <dt> ‘<samp>INTERLACE_TYPE_T</samp>’</dt>
3972 <dd><p>the frame is top-field-first
3974 <dt> ‘<samp>INTERLACE_TYPE_B</samp>’</dt>
3975 <dd><p>the frame is bottom-field-first
3980 <dt> ‘<samp>key</samp>’</dt>
3981 <dd><p>1 if the filtered frame is a key-frame, 0 otherwise
3984 <dt> ‘<samp>pos</samp>’</dt>
3985 <dd><p>the position in the file of the filtered frame, -1 if the information
3986 is not available (e.g. for synthetic video)
3990 <p>The default value of the select expression is "1".
3992 <p>Some examples follow:
3994 <table><tr><td> </td><td><pre class="example"># select all frames in input
3997 # the above is the same as:
4003 # select only I-frames
4004 select='eq(pict_type\,PICT_TYPE_I)'
4006 # select one frame every 100
4007 select='not(mod(n\,100))'
4009 # select only frames contained in the 10-20 time interval
4010 select='gte(t\,10)*lte(t\,20)'
4012 # select only I frames contained in the 10-20 time interval
4013 select='gte(t\,10)*lte(t\,20)*eq(pict_type\,PICT_TYPE_I)'
4015 # select frames with a minimum distance of 10 seconds
4016 select='isnan(prev_selected_t)+gte(t-prev_selected_t\,10)'
4017 </pre></td></tr></table>
4019 <p><a name="setdar"></a>
4020 </p><a name="setdar-1"></a>
4021 <h2 class="section"><a href="ffplay.html#toc-setdar-1">16.28 setdar</a></h2>
4023 <p>Set the Display Aspect Ratio for the filter output video.
4025 <p>This is done by changing the specified Sample (aka Pixel) Aspect
4026 Ratio, according to the following equation:
4027 <em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
4029 <p>Keep in mind that this filter does not modify the pixel dimensions of
4030 the video frame. Also the display aspect ratio set by this filter may
4031 be changed by later filters in the filterchain, e.g. in case of
4032 scaling or if another "setdar" or a "setsar" filter is applied.
4034 <p>The filter accepts a parameter string which represents the wanted
4035 display aspect ratio.
4036 The parameter can be a floating point number string, or an expression
4037 of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
4038 numerator and denominator of the aspect ratio.
4039 If the parameter is not specified, it is assumed the value "0:1".
4041 <p>For example to change the display aspect ratio to 16:9, specify:
4042 </p><table><tr><td> </td><td><pre class="example">setdar=16:9
4043 # the above is equivalent to
4045 </pre></td></tr></table>
4047 <p>See also the <a href="#setsar">setsar</a> filter documentation.
4049 <a name="setpts"></a>
4050 <h2 class="section"><a href="ffplay.html#toc-setpts">16.29 setpts</a></h2>
4052 <p>Change the PTS (presentation timestamp) of the input video frames.
4054 <p>Accept in input an expression evaluated through the eval API, which
4055 can contain the following constants:
4057 <dl compact="compact">
4058 <dt> ‘<samp>PTS</samp>’</dt>
4059 <dd><p>the presentation timestamp in input
4062 <dt> ‘<samp>PI</samp>’</dt>
4066 <dt> ‘<samp>PHI</samp>’</dt>
4070 <dt> ‘<samp>E</samp>’</dt>
4074 <dt> ‘<samp>N</samp>’</dt>
4075 <dd><p>the count of the input frame, starting from 0.
4078 <dt> ‘<samp>STARTPTS</samp>’</dt>
4079 <dd><p>the PTS of the first video frame
4082 <dt> ‘<samp>INTERLACED</samp>’</dt>
4083 <dd><p>tell if the current frame is interlaced
4086 <dt> ‘<samp>POS</samp>’</dt>
4087 <dd><p>original position in the file of the frame, or undefined if undefined
4088 for the current frame
4091 <dt> ‘<samp>PREV_INPTS</samp>’</dt>
4092 <dd><p>previous input PTS
4095 <dt> ‘<samp>PREV_OUTPTS</samp>’</dt>
4096 <dd><p>previous output PTS
4101 <p>Some examples follow:
4103 <table><tr><td> </td><td><pre class="example"># start counting PTS from zero
4115 # fixed rate 25 fps with some jitter
4116 setpts='1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))'
4117 </pre></td></tr></table>
4119 <p><a name="setsar"></a>
4120 </p><a name="setsar-1"></a>
4121 <h2 class="section"><a href="ffplay.html#toc-setsar-1">16.30 setsar</a></h2>
4123 <p>Set the Sample (aka Pixel) Aspect Ratio for the filter output video.
4125 <p>Note that as a consequence of the application of this filter, the
4126 output display aspect ratio will change according to the following
4128 <em>DAR = HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION * SAR</em>
4130 <p>Keep in mind that the sample aspect ratio set by this filter may be
4131 changed by later filters in the filterchain, e.g. if another "setsar"
4132 or a "setdar" filter is applied.
4134 <p>The filter accepts a parameter string which represents the wanted
4135 sample aspect ratio.
4136 The parameter can be a floating point number string, or an expression
4137 of the form <var>num</var>:<var>den</var>, where <var>num</var> and <var>den</var> are the
4138 numerator and denominator of the aspect ratio.
4139 If the parameter is not specified, it is assumed the value "0:1".
4141 <p>For example to change the sample aspect ratio to 10:11, specify:
4142 </p><table><tr><td> </td><td><pre class="example">setsar=10:11
4143 </pre></td></tr></table>
4145 <a name="settb"></a>
4146 <h2 class="section"><a href="ffplay.html#toc-settb">16.31 settb</a></h2>
4148 <p>Set the timebase to use for the output frames timestamps.
4149 It is mainly useful for testing timebase configuration.
4151 <p>It accepts in input an arithmetic expression representing a rational.
4152 The expression can contain the constants "PI", "E", "PHI", "AVTB" (the
4153 default timebase), and "intb" (the input timebase).
4155 <p>The default value for the input is "intb".
4157 <p>Follow some examples.
4159 <table><tr><td> </td><td><pre class="example"># set the timebase to 1/25
4162 # set the timebase to 1/10
4165 #set the timebase to 1001/1000
4168 #set the timebase to 2*intb
4171 #set the default timebase value
4173 </pre></td></tr></table>
4175 <a name="showinfo"></a>
4176 <h2 class="section"><a href="ffplay.html#toc-showinfo">16.32 showinfo</a></h2>
4178 <p>Show a line containing various information for each input video frame.
4179 The input video is not modified.
4181 <p>The shown line contains a sequence of key/value pairs of the form
4182 <var>key</var>:<var>value</var>.
4184 <p>A description of each shown parameter follows:
4186 <dl compact="compact">
4187 <dt> ‘<samp>n</samp>’</dt>
4188 <dd><p>sequential number of the input frame, starting from 0
4191 <dt> ‘<samp>pts</samp>’</dt>
4192 <dd><p>Presentation TimeStamp of the input frame, expressed as a number of
4193 time base units. The time base unit depends on the filter input pad.
4196 <dt> ‘<samp>pts_time</samp>’</dt>
4197 <dd><p>Presentation TimeStamp of the input frame, expressed as a number of
4201 <dt> ‘<samp>pos</samp>’</dt>
4202 <dd><p>position of the frame in the input stream, -1 if this information in
4203 unavailable and/or meanigless (for example in case of synthetic video)
4206 <dt> ‘<samp>fmt</samp>’</dt>
4207 <dd><p>pixel format name
4210 <dt> ‘<samp>sar</samp>’</dt>
4211 <dd><p>sample aspect ratio of the input frame, expressed in the form
4212 <var>num</var>/<var>den</var>
4215 <dt> ‘<samp>s</samp>’</dt>
4216 <dd><p>size of the input frame, expressed in the form
4217 <var>width</var>x<var>height</var>
4220 <dt> ‘<samp>i</samp>’</dt>
4221 <dd><p>interlaced mode ("P" for "progressive", "T" for top field first, "B"
4222 for bottom field first)
4225 <dt> ‘<samp>iskey</samp>’</dt>
4226 <dd><p>1 if the frame is a key frame, 0 otherwise
4229 <dt> ‘<samp>type</samp>’</dt>
4230 <dd><p>picture type of the input frame ("I" for an I-frame, "P" for a
4231 P-frame, "B" for a B-frame, "?" for unknown type).
4232 Check also the documentation of the <code>AVPictureType</code> enum and of
4233 the <code>av_get_picture_type_char</code> function defined in
4234 ‘<tt>libavutil/avutil.h</tt>’.
4237 <dt> ‘<samp>checksum</samp>’</dt>
4238 <dd><p>Adler-32 checksum of all the planes of the input frame
4241 <dt> ‘<samp>plane_checksum</samp>’</dt>
4242 <dd><p>Adler-32 checksum of each plane of the input frame, expressed in the form
4243 "[<var>c0</var> <var>c1</var> <var>c2</var> <var>c3</var>]"
4247 <a name="slicify"></a>
4248 <h2 class="section"><a href="ffplay.html#toc-slicify">16.33 slicify</a></h2>
4250 <p>Pass the images of input video on to next video filter as multiple
4253 <table><tr><td> </td><td><pre class="example">./ffmpeg -i in.avi -vf "slicify=32" out.avi
4254 </pre></td></tr></table>
4256 <p>The filter accepts the slice height as parameter. If the parameter is
4257 not specified it will use the default value of 16.
4259 <p>Adding this in the beginning of filter chains should make filtering
4260 faster due to better use of the memory cache.
4262 <a name="split"></a>
4263 <h2 class="section"><a href="ffplay.html#toc-split">16.34 split</a></h2>
4265 <p>Pass on the input video to two outputs. Both outputs are identical to
4269 </p><table><tr><td> </td><td><pre class="example">[in] split [splitout1][splitout2];
4270 [splitout1] crop=100:100:0:0 [cropout];
4271 [splitout2] pad=200:200:100:100 [padout];
4272 </pre></td></tr></table>
4274 <p>will create two separate outputs from the same input, one cropped and
4277 <a name="transpose"></a>
4278 <h2 class="section"><a href="ffplay.html#toc-transpose">16.35 transpose</a></h2>
4280 <p>Transpose rows with columns in the input video and optionally flip it.
4282 <p>It accepts a parameter representing an integer, which can assume the
4285 <dl compact="compact">
4286 <dt> ‘<samp>0</samp>’</dt>
4287 <dd><p>Rotate by 90 degrees counterclockwise and vertically flip (default), that is:
4288 </p><table><tr><td> </td><td><pre class="example">L.R L.l
4291 </pre></td></tr></table>
4294 <dt> ‘<samp>1</samp>’</dt>
4295 <dd><p>Rotate by 90 degrees clockwise, that is:
4296 </p><table><tr><td> </td><td><pre class="example">L.R l.L
4299 </pre></td></tr></table>
4302 <dt> ‘<samp>2</samp>’</dt>
4303 <dd><p>Rotate by 90 degrees counterclockwise, that is:
4304 </p><table><tr><td> </td><td><pre class="example">L.R R.r
4307 </pre></td></tr></table>
4310 <dt> ‘<samp>3</samp>’</dt>
4311 <dd><p>Rotate by 90 degrees clockwise and vertically flip, that is:
4312 </p><table><tr><td> </td><td><pre class="example">L.R r.R
4315 </pre></td></tr></table>
4319 <a name="unsharp"></a>
4320 <h2 class="section"><a href="ffplay.html#toc-unsharp">16.36 unsharp</a></h2>
4322 <p>Sharpen or blur the input video.
4324 <p>It accepts the following parameters:
4325 <var>luma_msize_x</var>:<var>luma_msize_y</var>:<var>luma_amount</var>:<var>chroma_msize_x</var>:<var>chroma_msize_y</var>:<var>chroma_amount</var>
4327 <p>Negative values for the amount will blur the input video, while positive
4328 values will sharpen. All parameters are optional and default to the
4329 equivalent of the string ’5:5:1.0:5:5:0.0’.
4331 <dl compact="compact">
4332 <dt> ‘<samp>luma_msize_x</samp>’</dt>
4333 <dd><p>Set the luma matrix horizontal size. It can be an integer between 3
4334 and 13, default value is 5.
4337 <dt> ‘<samp>luma_msize_y</samp>’</dt>
4338 <dd><p>Set the luma matrix vertical size. It can be an integer between 3
4339 and 13, default value is 5.
4342 <dt> ‘<samp>luma_amount</samp>’</dt>
4343 <dd><p>Set the luma effect strength. It can be a float number between -2.0
4344 and 5.0, default value is 1.0.
4347 <dt> ‘<samp>chroma_msize_x</samp>’</dt>
4348 <dd><p>Set the chroma matrix horizontal size. It can be an integer between 3
4349 and 13, default value is 5.
4352 <dt> ‘<samp>chroma_msize_y</samp>’</dt>
4353 <dd><p>Set the chroma matrix vertical size. It can be an integer between 3
4354 and 13, default value is 5.
4357 <dt> ‘<samp>chroma_amount</samp>’</dt>
4358 <dd><p>Set the chroma effect strength. It can be a float number between -2.0
4359 and 5.0, default value is 0.0.
4364 <table><tr><td> </td><td><pre class="example"># Strong luma sharpen effect parameters
4367 # Strong blur of both luma and chroma parameters
4368 unsharp=7:7:-2:7:7:-2
4370 # Use the default values with <code>ffmpeg</code>
4371 ./ffmpeg -i in.avi -vf "unsharp" out.mp4
4372 </pre></td></tr></table>
4374 <a name="vflip"></a>
4375 <h2 class="section"><a href="ffplay.html#toc-vflip">16.37 vflip</a></h2>
4377 <p>Flip the input video vertically.
4379 <table><tr><td> </td><td><pre class="example">./ffmpeg -i in.avi -vf "vflip" out.avi
4380 </pre></td></tr></table>
4382 <a name="yadif"></a>
4383 <h2 class="section"><a href="ffplay.html#toc-yadif">16.38 yadif</a></h2>
4385 <p>Deinterlace the input video ("yadif" means "yet another deinterlacing
4388 <p>It accepts the optional parameters: <var>mode</var>:<var>parity</var>:<var>auto</var>.
4390 <p><var>mode</var> specifies the interlacing mode to adopt, accepts one of the
4393 <dl compact="compact">
4394 <dt> ‘<samp>0</samp>’</dt>
4395 <dd><p>output 1 frame for each frame
4397 <dt> ‘<samp>1</samp>’</dt>
4398 <dd><p>output 1 frame for each field
4400 <dt> ‘<samp>2</samp>’</dt>
4401 <dd><p>like 0 but skips spatial interlacing check
4403 <dt> ‘<samp>3</samp>’</dt>
4404 <dd><p>like 1 but skips spatial interlacing check
4408 <p>Default value is 0.
4410 <p><var>parity</var> specifies the picture field parity assumed for the input
4411 interlaced video, accepts one of the following values:
4413 <dl compact="compact">
4414 <dt> ‘<samp>0</samp>’</dt>
4415 <dd><p>assume top field first
4417 <dt> ‘<samp>1</samp>’</dt>
4418 <dd><p>assume bottom field first
4420 <dt> ‘<samp>-1</samp>’</dt>
4421 <dd><p>enable automatic detection
4425 <p>Default value is -1.
4426 If interlacing is unknown or decoder does not export this information,
4427 top field first will be assumed.
4429 <p><var>auto</var> specifies if deinterlacer should trust the interlaced flag
4430 and only deinterlace frames marked as interlaced
4432 <dl compact="compact">
4433 <dt> ‘<samp>0</samp>’</dt>
4434 <dd><p>deinterlace all frames
4436 <dt> ‘<samp>1</samp>’</dt>
4437 <dd><p>only deinterlace frames marked as interlaced
4441 <p>Default value is 0.
4444 <a name="Video-Sources"></a>
4445 <h1 class="chapter"><a href="ffplay.html#toc-Video-Sources">17. Video Sources</a></h1>
4447 <p>Below is a description of the currently available video sources.
4449 <a name="buffer"></a>
4450 <h2 class="section"><a href="ffplay.html#toc-buffer">17.1 buffer</a></h2>
4452 <p>Buffer video frames, and make them available to the filter chain.
4454 <p>This source is mainly intended for a programmatic use, in particular
4455 through the interface defined in ‘<tt>libavfilter/vsrc_buffer.h</tt>’.
4457 <p>It accepts the following parameters:
4458 <var>width</var>:<var>height</var>:<var>pix_fmt_string</var>:<var>timebase_num</var>:<var>timebase_den</var>:<var>sample_aspect_ratio_num</var>:<var>sample_aspect_ratio.den</var>:<var>scale_params</var>
4460 <p>All the parameters but <var>scale_params</var> need to be explicitely
4463 <p>Follows the list of the accepted parameters.
4465 <dl compact="compact">
4466 <dt> ‘<samp>width, height</samp>’</dt>
4467 <dd><p>Specify the width and height of the buffered video frames.
4470 <dt> ‘<samp>pix_fmt_string</samp>’</dt>
4471 <dd><p>A string representing the pixel format of the buffered video frames.
4472 It may be a number corresponding to a pixel format, or a pixel format
4476 <dt> ‘<samp>timebase_num, timebase_den</samp>’</dt>
4477 <dd><p>Specify numerator and denomitor of the timebase assumed by the
4478 timestamps of the buffered frames.
4481 <dt> ‘<samp>sample_aspect_ratio.num, sample_aspect_ratio.den</samp>’</dt>
4482 <dd><p>Specify numerator and denominator of the sample aspect ratio assumed
4483 by the video frames.
4486 <dt> ‘<samp>scale_params</samp>’</dt>
4487 <dd><p>Specify the optional parameters to be used for the scale filter which
4488 is automatically inserted when an input change is detected in the
4489 input size or format.
4494 </p><table><tr><td> </td><td><pre class="example">buffer=320:240:yuv410p:1:24:1:1
4495 </pre></td></tr></table>
4497 <p>will instruct the source to accept video frames with size 320x240 and
4498 with format "yuv410p", assuming 1/24 as the timestamps timebase and
4499 square pixels (1:1 sample aspect ratio).
4500 Since the pixel format with name "yuv410p" corresponds to the number 6
4501 (check the enum PixelFormat definition in ‘<tt>libavutil/pixfmt.h</tt>’),
4502 this example corresponds to:
4503 </p><table><tr><td> </td><td><pre class="example">buffer=320:240:6:1:24:1:1
4504 </pre></td></tr></table>
4506 <a name="color"></a>
4507 <h2 class="section"><a href="ffplay.html#toc-color">17.2 color</a></h2>
4509 <p>Provide an uniformly colored input.
4511 <p>It accepts the following parameters:
4512 <var>color</var>:<var>frame_size</var>:<var>frame_rate</var>
4514 <p>Follows the description of the accepted parameters.
4516 <dl compact="compact">
4517 <dt> ‘<samp>color</samp>’</dt>
4518 <dd><p>Specify the color of the source. It can be the name of a color (case
4519 insensitive match) or a 0xRRGGBB[AA] sequence, possibly followed by an
4520 alpha specifier. The default value is "black".
4523 <dt> ‘<samp>frame_size</samp>’</dt>
4524 <dd><p>Specify the size of the sourced video, it may be a string of the form
4525 <var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
4526 default value is "320x240".
4529 <dt> ‘<samp>frame_rate</samp>’</dt>
4530 <dd><p>Specify the frame rate of the sourced video, as the number of frames
4531 generated per second. It has to be a string in the format
4532 <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
4533 number or a valid video frame rate abbreviation. The default value is
4539 <p>For example the following graph description will generate a red source
4540 with an opacity of 0.2, with size "qcif" and a frame rate of 10
4541 frames per second, which will be overlayed over the source connected
4542 to the pad with identifier "in".
4544 <table><tr><td> </td><td><pre class="example">"color=red@0.2:qcif:10 [color]; [in][color] overlay [out]"
4545 </pre></td></tr></table>
4547 <a name="movie"></a>
4548 <h2 class="section"><a href="ffplay.html#toc-movie">17.3 movie</a></h2>
4550 <p>Read a video stream from a movie container.
4552 <p>It accepts the syntax: <var>movie_name</var>[:<var>options</var>] where
4553 <var>movie_name</var> is the name of the resource to read (not necessarily
4554 a file but also a device or a stream accessed through some protocol),
4555 and <var>options</var> is an optional sequence of <var>key</var>=<var>value</var>
4556 pairs, separated by ":".
4558 <p>The description of the accepted options follows.
4560 <dl compact="compact">
4561 <dt> ‘<samp>format_name, f</samp>’</dt>
4562 <dd><p>Specifies the format assumed for the movie to read, and can be either
4563 the name of a container or an input device. If not specified the
4564 format is guessed from <var>movie_name</var> or by probing.
4567 <dt> ‘<samp>seek_point, sp</samp>’</dt>
4568 <dd><p>Specifies the seek point in seconds, the frames will be output
4569 starting from this seek point, the parameter is evaluated with
4570 <code>av_strtod</code> so the numerical value may be suffixed by an IS
4571 postfix. Default value is "0".
4574 <dt> ‘<samp>stream_index, si</samp>’</dt>
4575 <dd><p>Specifies the index of the video stream to read. If the value is -1,
4576 the best suited video stream will be automatically selected. Default
4577 value is "-1".
4582 <p>This filter allows to overlay a second video on top of main input of
4583 a filtergraph as shown in this graph:
4584 </p><table><tr><td> </td><td><pre class="example">input -----------> deltapts0 --> overlay --> output
4587 movie --> scale--> deltapts1 -------+
4588 </pre></td></tr></table>
4590 <p>Some examples follow:
4591 </p><table><tr><td> </td><td><pre class="example"># skip 3.2 seconds from the start of the avi file in.avi, and overlay it
4592 # on top of the input labelled as "in".
4593 movie=in.avi:seek_point=3.2, scale=180:-1, setpts=PTS-STARTPTS [movie];
4594 [in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
4596 # read from a video4linux2 device, and overlay it on top of the input
4597 # labelled as "in"
4598 movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie];
4599 [in] setpts=PTS-STARTPTS, [movie] overlay=16:16 [out]
4601 </pre></td></tr></table>
4603 <a name="mptestsrc"></a>
4604 <h2 class="section"><a href="ffplay.html#toc-mptestsrc">17.4 mptestsrc</a></h2>
4606 <p>Generate various test patterns, as generated by the MPlayer test filter.
4608 <p>The size of the generated video is fixed, and is 256x256.
4609 This source is useful in particular for testing encoding features.
4611 <p>This source accepts an optional sequence of <var>key</var>=<var>value</var> pairs,
4612 separated by ":". The description of the accepted options follows.
4614 <dl compact="compact">
4615 <dt> ‘<samp>rate, r</samp>’</dt>
4616 <dd><p>Specify the frame rate of the sourced video, as the number of frames
4617 generated per second. It has to be a string in the format
4618 <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
4619 number or a valid video frame rate abbreviation. The default value is
4623 <dt> ‘<samp>duration, d</samp>’</dt>
4624 <dd><p>Set the video duration of the sourced video. The accepted syntax is:
4625 </p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
4627 </pre></td></tr></table>
4628 <p>See also the function <code>av_parse_time()</code>.
4630 <p>If not specified, or the expressed duration is negative, the video is
4631 supposed to be generated forever.
4634 <dt> ‘<samp>test, t</samp>’</dt>
4636 <p>Set the number or the name of the test to perform. Supported tests are:
4637 </p><dl compact="compact">
4638 <dt> ‘<samp>dc_luma</samp>’</dt>
4639 <dt> ‘<samp>dc_chroma</samp>’</dt>
4640 <dt> ‘<samp>freq_luma</samp>’</dt>
4641 <dt> ‘<samp>freq_chroma</samp>’</dt>
4642 <dt> ‘<samp>amp_luma</samp>’</dt>
4643 <dt> ‘<samp>amp_chroma</samp>’</dt>
4644 <dt> ‘<samp>cbp</samp>’</dt>
4645 <dt> ‘<samp>mv</samp>’</dt>
4646 <dt> ‘<samp>ring1</samp>’</dt>
4647 <dt> ‘<samp>ring2</samp>’</dt>
4648 <dt> ‘<samp>all</samp>’</dt>
4651 <p>Default value is "all", which will cycle through the list of all tests.
4655 <p>For example the following:
4656 </p><table><tr><td> </td><td><pre class="example">testsrc=t=dc_luma
4657 </pre></td></tr></table>
4659 <p>will generate a "dc_luma" test pattern.
4661 <a name="nullsrc"></a>
4662 <h2 class="section"><a href="ffplay.html#toc-nullsrc">17.5 nullsrc</a></h2>
4664 <p>Null video source, never return images. It is mainly useful as a
4665 template and to be employed in analysis / debugging tools.
4667 <p>It accepts as optional parameter a string of the form
4668 <var>width</var>:<var>height</var>:<var>timebase</var>.
4670 <p><var>width</var> and <var>height</var> specify the size of the configured
4671 source. The default values of <var>width</var> and <var>height</var> are
4672 respectively 352 and 288 (corresponding to the CIF size format).
4674 <p><var>timebase</var> specifies an arithmetic expression representing a
4675 timebase. The expression can contain the constants "PI", "E", "PHI",
4676 "AVTB" (the default timebase), and defaults to the value "AVTB".
4678 <a name="frei0r_005fsrc"></a>
4679 <h2 class="section"><a href="ffplay.html#toc-frei0r_005fsrc">17.6 frei0r_src</a></h2>
4681 <p>Provide a frei0r source.
4683 <p>To enable compilation of this filter you need to install the frei0r
4684 header and configure FFmpeg with –enable-frei0r.
4686 <p>The source supports the syntax:
4687 </p><table><tr><td> </td><td><pre class="example"><var>size</var>:<var>rate</var>:<var>src_name</var>[{=|:}<var>param1</var>:<var>param2</var>:...:<var>paramN</var>]
4688 </pre></td></tr></table>
4690 <p><var>size</var> is the size of the video to generate, may be a string of the
4691 form <var>width</var>x<var>height</var> or a frame size abbreviation.
4692 <var>rate</var> is the rate of the video to generate, may be a string of
4693 the form <var>num</var>/<var>den</var> or a frame rate abbreviation.
4694 <var>src_name</var> is the name to the frei0r source to load. For more
4695 information regarding frei0r and how to set the parameters read the
4696 section <a href="#frei0r">frei0r</a> in the description of the video filters.
4698 <p>Some examples follow:
4699 </p><table><tr><td> </td><td><pre class="example"># generate a frei0r partik0l source with size 200x200 and framerate 10
4700 # which is overlayed on the overlay filter main input
4701 frei0r_src=200x200:10:partik0l=1234 [overlay]; [in][overlay] overlay
4702 </pre></td></tr></table>
4704 <a name="rgbtestsrc_002c-testsrc"></a>
4705 <h2 class="section"><a href="ffplay.html#toc-rgbtestsrc_002c-testsrc">17.7 rgbtestsrc, testsrc</a></h2>
4707 <p>The <code>rgbtestsrc</code> source generates an RGB test pattern useful for
4708 detecting RGB vs BGR issues. You should see a red, green and blue
4709 stripe from top to bottom.
4711 <p>The <code>testsrc</code> source generates a test video pattern, showing a
4712 color pattern, a scrolling gradient and a timestamp. This is mainly
4713 intended for testing purposes.
4715 <p>Both sources accept an optional sequence of <var>key</var>=<var>value</var> pairs,
4716 separated by ":". The description of the accepted options follows.
4718 <dl compact="compact">
4719 <dt> ‘<samp>size, s</samp>’</dt>
4720 <dd><p>Specify the size of the sourced video, it may be a string of the form
4721 <var>width</var>x<var>heigth</var>, or the name of a size abbreviation. The
4722 default value is "320x240".
4725 <dt> ‘<samp>rate, r</samp>’</dt>
4726 <dd><p>Specify the frame rate of the sourced video, as the number of frames
4727 generated per second. It has to be a string in the format
4728 <var>frame_rate_num</var>/<var>frame_rate_den</var>, an integer number, a float
4729 number or a valid video frame rate abbreviation. The default value is
4733 <dt> ‘<samp>sar</samp>’</dt>
4734 <dd><p>Set the sample aspect ratio of the sourced video.
4737 <dt> ‘<samp>duration</samp>’</dt>
4738 <dd><p>Set the video duration of the sourced video. The accepted syntax is:
4739 </p><table><tr><td> </td><td><pre class="example">[-]HH[:MM[:SS[.m...]]]
4741 </pre></td></tr></table>
4742 <p>See also the function <code>av_parse_time()</code>.
4744 <p>If not specified, or the expressed duration is negative, the video is
4745 supposed to be generated forever.
4749 <p>For example the following:
4750 </p><table><tr><td> </td><td><pre class="example">testsrc=duration=5.3:size=qcif:rate=10
4751 </pre></td></tr></table>
4753 <p>will generate a video with a duration of 5.3 seconds, with size
4754 176x144 and a framerate of 10 frames per second.
4757 <a name="Video-Sinks"></a>
4758 <h1 class="chapter"><a href="ffplay.html#toc-Video-Sinks">18. Video Sinks</a></h1>
4760 <p>Below is a description of the currently available video sinks.
4762 <a name="buffersink"></a>
4763 <h2 class="section"><a href="ffplay.html#toc-buffersink">18.1 buffersink</a></h2>
4765 <p>Buffer video frames, and make them available to the end of the filter
4768 <p>This sink is mainly intended for a programmatic use, in particular
4769 through the interface defined in ‘<tt>libavfilter/vsink_buffer.h</tt>’.
4771 <p>It does not require a string parameter in input, but you need to
4772 specify a pointer to a list of supported pixel formats terminated by
4773 -1 in the opaque parameter provided to <code>avfilter_init_filter</code>
4774 when initializing this sink.
4776 <a name="nullsink"></a>
4777 <h2 class="section"><a href="ffplay.html#toc-nullsink">18.2 nullsink</a></h2>
4779 <p>Null video sink, do absolutely nothing with the input video. It is
4780 mainly useful as a template and to be employed in analysis / debugging
4789 This document was generated by <em>Kyle Schwarz</em> on <em>September 2, 2011</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.